ui-ingredients 0.0.37 → 0.0.38
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +11 -0
- package/dist/accordion/context.svelte.d.ts +2 -3
- package/dist/accordion/context.svelte.js +3 -3
- package/dist/accordion/create-accordion.svelte.js +5 -3
- package/dist/accordion/index.d.ts +1 -0
- package/dist/accordion/index.js +1 -0
- package/dist/accordion/item-content.svelte +4 -4
- package/dist/accordion/item-indicator.svelte +4 -4
- package/dist/accordion/item-trigger.svelte +4 -4
- package/dist/accordion/item.svelte +4 -4
- package/dist/accordion/root.svelte +2 -2
- package/dist/avatar/context.svelte.d.ts +1 -2
- package/dist/avatar/context.svelte.js +2 -2
- package/dist/avatar/create-avatar.svelte.js +5 -3
- package/dist/avatar/fallback.svelte +2 -2
- package/dist/avatar/image.svelte +2 -2
- package/dist/avatar/index.d.ts +1 -0
- package/dist/avatar/index.js +1 -0
- package/dist/avatar/root.svelte +2 -2
- package/dist/carousel/context.svelte.d.ts +1 -2
- package/dist/carousel/context.svelte.js +2 -2
- package/dist/carousel/create-carousel.svelte.js +5 -3
- package/dist/carousel/index.d.ts +1 -0
- package/dist/carousel/index.js +1 -0
- package/dist/carousel/indicator-group.svelte +2 -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 +2 -2
- package/dist/carousel/prev-trigger.svelte +2 -2
- package/dist/carousel/root.svelte +2 -2
- package/dist/carousel/viewport.svelte +2 -2
- package/dist/checkbox/context.svelte.d.ts +1 -2
- package/dist/checkbox/context.svelte.js +2 -2
- package/dist/checkbox/control.svelte +2 -2
- package/dist/checkbox/create-checkbox.svelte.js +5 -3
- package/dist/checkbox/hidden-input.svelte +2 -2
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +1 -0
- 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 -2
- package/dist/clipboard/context.svelte.js +2 -2
- package/dist/clipboard/control.svelte +2 -2
- package/dist/clipboard/create-clipboard.svelte.js +5 -3
- package/dist/clipboard/index.d.ts +1 -0
- package/dist/clipboard/index.js +1 -0
- package/dist/clipboard/indicator.svelte +2 -2
- 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 +2 -2
- package/dist/collapsible/context.svelte.d.ts +1 -2
- package/dist/collapsible/context.svelte.js +2 -2
- package/dist/collapsible/create-collapsible.svelte.js +5 -3
- package/dist/collapsible/index.d.ts +1 -0
- package/dist/collapsible/index.js +1 -0
- package/dist/collapsible/root.svelte +2 -2
- package/dist/collapsible/trigger.svelte +2 -2
- package/dist/color-picker/area-background.svelte +4 -4
- package/dist/color-picker/area-thumb.svelte +4 -4
- package/dist/color-picker/area.svelte +4 -4
- package/dist/color-picker/channel-input.svelte +2 -2
- package/dist/color-picker/channel-slider-label.svelte +4 -4
- package/dist/color-picker/channel-slider-thumb.svelte +4 -4
- package/dist/color-picker/channel-slider-track.svelte +4 -4
- package/dist/color-picker/channel-slider-value-text.svelte +6 -6
- package/dist/color-picker/channel-slider.svelte +4 -4
- package/dist/color-picker/content.svelte +2 -2
- package/dist/color-picker/context.svelte.d.ts +5 -6
- package/dist/color-picker/context.svelte.js +6 -6
- package/dist/color-picker/control.svelte +2 -2
- package/dist/color-picker/create-color-picker.svelte.js +5 -3
- package/dist/color-picker/eye-dropper-trigger.svelte +2 -2
- package/dist/color-picker/format-select.svelte +2 -2
- package/dist/color-picker/format-trigger.svelte +2 -2
- package/dist/color-picker/hidden-input.svelte +2 -2
- package/dist/color-picker/index.d.ts +1 -0
- package/dist/color-picker/index.js +1 -0
- package/dist/color-picker/label.svelte +2 -2
- package/dist/color-picker/positioner.svelte +2 -2
- package/dist/color-picker/root.svelte +34 -49
- package/dist/color-picker/swatch-group.svelte +2 -2
- package/dist/color-picker/swatch-indicator.svelte +4 -4
- package/dist/color-picker/swatch-trigger.svelte +4 -4
- package/dist/color-picker/swatch.svelte +4 -4
- package/dist/color-picker/transparency-grid.svelte +2 -2
- package/dist/color-picker/trigger.svelte +2 -2
- package/dist/color-picker/value-text.svelte +2 -2
- package/dist/combobox/clear-trigger.svelte +2 -2
- package/dist/combobox/content.svelte +2 -2
- package/dist/combobox/context.svelte.d.ts +3 -4
- package/dist/combobox/context.svelte.js +4 -4
- package/dist/combobox/control.svelte +2 -2
- package/dist/combobox/create-combobox.svelte.d.ts +3 -5
- package/dist/combobox/create-combobox.svelte.js +17 -13
- package/dist/combobox/input.svelte +2 -2
- package/dist/combobox/item-group-label.svelte +4 -4
- package/dist/combobox/item-group.svelte +4 -4
- package/dist/combobox/item-indicator.svelte +6 -3
- package/dist/combobox/item-text.svelte +6 -3
- package/dist/combobox/item.svelte +6 -3
- package/dist/combobox/label.svelte +2 -2
- package/dist/combobox/list.svelte +2 -2
- package/dist/combobox/positioner.svelte +2 -2
- package/dist/combobox/root.svelte +2 -2
- package/dist/combobox/trigger.svelte +2 -2
- package/dist/create-context.svelte.d.ts +5 -0
- package/dist/{context.svelte.js → create-context.svelte.js} +8 -13
- package/dist/date-picker/clear-trigger.svelte +2 -2
- package/dist/date-picker/content.svelte +2 -2
- package/dist/date-picker/context.svelte.d.ts +5 -6
- package/dist/date-picker/context.svelte.js +6 -6
- package/dist/date-picker/control.svelte +2 -2
- package/dist/date-picker/create-date-picker.svelte.js +5 -3
- package/dist/date-picker/day-table-cell-trigger.svelte +4 -4
- package/dist/date-picker/day-table-cell.svelte +4 -4
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/date-picker/index.js +1 -0
- package/dist/date-picker/input.svelte +2 -2
- package/dist/date-picker/label.svelte +2 -2
- package/dist/date-picker/month-select.svelte +2 -2
- package/dist/date-picker/month-table-cell-trigger.svelte +4 -4
- package/dist/date-picker/month-table-cell.svelte +4 -4
- package/dist/date-picker/next-trigger.svelte +4 -4
- package/dist/date-picker/positioner.svelte +2 -2
- package/dist/date-picker/preset-trigger.svelte +2 -2
- package/dist/date-picker/prev-trigger.svelte +4 -4
- package/dist/date-picker/range-text.svelte +2 -2
- package/dist/date-picker/root.svelte +2 -2
- package/dist/date-picker/table-body.svelte +4 -4
- package/dist/date-picker/table-head.svelte +4 -4
- package/dist/date-picker/table-header.svelte +4 -4
- package/dist/date-picker/table-row.svelte +4 -4
- package/dist/date-picker/table.svelte +6 -6
- package/dist/date-picker/trigger.svelte +2 -2
- package/dist/date-picker/view-control.svelte +4 -4
- package/dist/date-picker/view-trigger.svelte +4 -4
- package/dist/date-picker/view.svelte +4 -4
- package/dist/date-picker/year-select.svelte +2 -2
- package/dist/date-picker/year-table-cell-trigger.svelte +4 -4
- package/dist/date-picker/year-table-cell.svelte +4 -4
- package/dist/dialog/backdrop.svelte +2 -2
- package/dist/dialog/close-trigger.svelte +2 -2
- package/dist/dialog/content.svelte +2 -2
- package/dist/dialog/context.svelte.d.ts +1 -2
- package/dist/dialog/context.svelte.js +2 -2
- package/dist/dialog/create-dialog.svelte.js +5 -3
- package/dist/dialog/description.svelte +2 -2
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -0
- package/dist/dialog/positioner.svelte +2 -2
- package/dist/dialog/root.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 +2 -2
- package/dist/editable/context.svelte.d.ts +1 -2
- package/dist/editable/context.svelte.js +2 -2
- package/dist/editable/control.svelte +2 -2
- package/dist/editable/create-editable.svelte.js +5 -3
- package/dist/editable/edit-trigger.svelte +2 -2
- package/dist/editable/index.d.ts +1 -0
- package/dist/editable/index.js +1 -0
- 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 +2 -2
- package/dist/environment-provider/context.svelte.d.ts +1 -3
- package/dist/environment-provider/context.svelte.js +2 -3
- package/dist/environment-provider/root.svelte +2 -2
- package/dist/field/context.svelte.d.ts +1 -3
- package/dist/field/context.svelte.js +2 -3
- package/dist/field/error-text.svelte +2 -2
- package/dist/field/helper-text.svelte +2 -2
- package/dist/field/index.d.ts +3 -2
- package/dist/field/index.js +2 -1
- 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 -3
- package/dist/file-upload/context.svelte.js +3 -3
- package/dist/file-upload/create-file-upload.svelte.js +5 -3
- package/dist/file-upload/dropzone.svelte +2 -2
- package/dist/file-upload/hidden-input.svelte +2 -2
- package/dist/file-upload/index.d.ts +1 -0
- package/dist/file-upload/index.js +1 -0
- package/dist/file-upload/item-delete-trigger.svelte +4 -4
- package/dist/file-upload/item-group.svelte +2 -2
- package/dist/file-upload/item-name.svelte +4 -4
- package/dist/file-upload/item-preview-image.svelte +4 -4
- package/dist/file-upload/item-preview.svelte +4 -4
- package/dist/file-upload/item-size-text.svelte +4 -4
- package/dist/file-upload/item.svelte +4 -4
- 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/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 -2
- package/dist/hover-card/context.svelte.js +2 -2
- package/dist/hover-card/create-hover-card.svelte.js +5 -3
- package/dist/hover-card/index.d.ts +1 -0
- package/dist/hover-card/index.js +1 -0
- package/dist/hover-card/positioner.svelte +2 -2
- package/dist/hover-card/root.svelte +2 -2
- package/dist/hover-card/trigger.svelte +2 -2
- package/dist/locale-provider/context.svelte.d.ts +1 -3
- package/dist/locale-provider/context.svelte.js +2 -3
- package/dist/locale-provider/root.svelte +2 -2
- 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 +2 -2
- package/dist/menu/context.svelte.d.ts +3 -4
- package/dist/menu/context.svelte.js +4 -4
- package/dist/menu/create-menu.svelte.js +5 -3
- package/dist/menu/index.d.ts +1 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/indicator.svelte +2 -2
- package/dist/menu/item-group-label.svelte +6 -3
- package/dist/menu/item-group.svelte +6 -3
- package/dist/menu/item.svelte +2 -2
- package/dist/menu/option-item-indicator.svelte +6 -3
- package/dist/menu/option-item-text.svelte +6 -3
- package/dist/menu/option-item.svelte +6 -3
- package/dist/menu/positioner.svelte +2 -2
- package/dist/menu/root.svelte +2 -2
- package/dist/menu/separator.svelte +2 -2
- package/dist/menu/trigger-item.svelte +2 -2
- package/dist/menu/trigger.svelte +2 -2
- package/dist/number-input/context.svelte.d.ts +1 -2
- package/dist/number-input/context.svelte.js +2 -2
- package/dist/number-input/control.svelte +2 -2
- package/dist/number-input/create-number-input.svelte.js +5 -3
- package/dist/number-input/decrement-trigger.svelte +2 -2
- package/dist/number-input/increment-trigger.svelte +2 -2
- package/dist/number-input/index.d.ts +1 -0
- package/dist/number-input/index.js +1 -0
- 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 +2 -2
- package/dist/pagination/context.svelte.d.ts +1 -2
- package/dist/pagination/context.svelte.js +2 -2
- package/dist/pagination/create-pagination.svelte.js +5 -3
- package/dist/pagination/ellipsis.svelte +2 -2
- package/dist/pagination/index.d.ts +1 -0
- package/dist/pagination/index.js +1 -0
- package/dist/pagination/item.svelte +2 -2
- package/dist/pagination/next-trigger.svelte +2 -2
- package/dist/pagination/prev-trigger.svelte +2 -2
- package/dist/pagination/root.svelte +2 -2
- package/dist/pin-input/clear-trigger.svelte +2 -2
- package/dist/pin-input/context.svelte.d.ts +1 -2
- package/dist/pin-input/context.svelte.js +2 -2
- package/dist/pin-input/create-pin-input.svelte.js +5 -3
- package/dist/pin-input/hidden-input.svelte +2 -2
- package/dist/pin-input/index.d.ts +1 -0
- package/dist/pin-input/index.js +1 -0
- 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 +2 -2
- package/dist/popover/content.svelte +2 -2
- package/dist/popover/context.svelte.d.ts +1 -2
- package/dist/popover/context.svelte.js +2 -2
- package/dist/popover/create-popover.svelte.js +5 -3
- package/dist/popover/description.svelte +2 -2
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/popover.d.ts +0 -1
- package/dist/popover/popover.js +0 -1
- package/dist/popover/positioner.svelte +2 -2
- package/dist/popover/root.svelte +2 -2
- package/dist/popover/title.svelte +2 -2
- package/dist/popover/trigger.svelte +2 -2
- package/dist/presence/context.svelte.d.ts +1 -2
- package/dist/presence/context.svelte.js +2 -2
- package/dist/presence/create-presence.svelte.js +4 -3
- package/dist/progress/circle-range.svelte +2 -2
- package/dist/progress/circle-track.svelte +2 -2
- package/dist/progress/circle.svelte +2 -2
- package/dist/progress/context.svelte.d.ts +1 -2
- package/dist/progress/context.svelte.js +2 -2
- package/dist/progress/create-progress.svelte.js +5 -3
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +1 -0
- 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 +2 -2
- package/dist/qr-code/context.svelte.d.ts +1 -2
- package/dist/qr-code/context.svelte.js +2 -2
- package/dist/qr-code/create-qr-code.svelte.js +5 -3
- package/dist/qr-code/frame.svelte +2 -2
- package/dist/qr-code/index.d.ts +1 -0
- package/dist/qr-code/index.js +1 -0
- 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 -3
- package/dist/radio-group/context.svelte.js +3 -3
- package/dist/radio-group/create-radio-group.svelte.js +5 -3
- package/dist/radio-group/index.d.ts +1 -0
- package/dist/radio-group/index.js +1 -0
- package/dist/radio-group/indicator.svelte +2 -2
- package/dist/radio-group/item-control.svelte +4 -4
- package/dist/radio-group/item-hidden-input.svelte +4 -4
- package/dist/radio-group/item-text.svelte +4 -4
- package/dist/radio-group/item.svelte +5 -4
- 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 -2
- package/dist/rating-group/context.svelte.js +2 -2
- package/dist/rating-group/control.svelte +2 -2
- package/dist/rating-group/create-rating-group.svelte.js +5 -3
- package/dist/rating-group/hidden-input.svelte +2 -2
- package/dist/rating-group/index.d.ts +1 -0
- package/dist/rating-group/index.js +1 -0
- package/dist/rating-group/item.svelte +2 -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 -3
- package/dist/segment-group/context.svelte.js +3 -3
- package/dist/segment-group/create-segment-group.svelte.js +5 -3
- package/dist/segment-group/index.d.ts +1 -0
- package/dist/segment-group/index.js +1 -0
- package/dist/segment-group/indicator.svelte +2 -2
- package/dist/segment-group/item-control.svelte +4 -4
- package/dist/segment-group/item-hidden-input.svelte +4 -4
- package/dist/segment-group/item-text.svelte +4 -4
- package/dist/segment-group/item.svelte +4 -4
- package/dist/segment-group/label.svelte +2 -2
- package/dist/segment-group/root.svelte +2 -2
- package/dist/select/clear-trigger.svelte +2 -2
- package/dist/select/content.svelte +2 -2
- package/dist/select/context.svelte.d.ts +3 -4
- package/dist/select/context.svelte.js +4 -4
- package/dist/select/control.svelte +2 -2
- package/dist/select/create-select.svelte.d.ts +3 -5
- package/dist/select/create-select.svelte.js +15 -12
- package/dist/select/hidden-select.svelte +2 -2
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +1 -0
- package/dist/select/indicator.svelte +2 -2
- package/dist/select/item-group-label.svelte +5 -4
- package/dist/select/item-group.svelte +4 -4
- package/dist/select/item-indicator.svelte +6 -3
- package/dist/select/item-text.svelte +6 -3
- package/dist/select/item.svelte +6 -3
- 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 +2 -2
- package/dist/signature-pad/clear-trigger.svelte +2 -2
- package/dist/signature-pad/context.svelte.d.ts +1 -2
- package/dist/signature-pad/context.svelte.js +2 -2
- package/dist/signature-pad/control.svelte +2 -2
- package/dist/signature-pad/create-signature-pad.svelte.js +5 -3
- package/dist/signature-pad/current-segment-path.svelte +2 -2
- package/dist/signature-pad/guide.svelte +2 -2
- package/dist/signature-pad/hidden-input.svelte +2 -2
- package/dist/signature-pad/index.d.ts +1 -0
- package/dist/signature-pad/index.js +1 -0
- package/dist/signature-pad/label.svelte +2 -2
- package/dist/signature-pad/root.svelte +2 -2
- package/dist/signature-pad/segment-path.svelte +2 -2
- package/dist/signature-pad/segment.svelte +2 -2
- package/dist/slider/context.svelte.d.ts +2 -3
- package/dist/slider/context.svelte.js +3 -3
- package/dist/slider/control.svelte +2 -2
- package/dist/slider/create-slider.svelte.js +5 -3
- package/dist/slider/hidden-input.svelte +6 -3
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/label.svelte +2 -2
- package/dist/slider/marker-group.svelte +2 -2
- package/dist/slider/marker.svelte +2 -2
- package/dist/slider/range.svelte +2 -2
- package/dist/slider/root.svelte +2 -2
- package/dist/slider/thumb.svelte +6 -3
- package/dist/slider/track.svelte +2 -2
- package/dist/slider/value-text.svelte +2 -2
- package/dist/splitter/context.svelte.d.ts +1 -2
- package/dist/splitter/context.svelte.js +2 -2
- package/dist/splitter/create-splitter.svelte.js +3 -2
- package/dist/splitter/index.d.ts +1 -0
- package/dist/splitter/index.js +1 -0
- package/dist/splitter/panel.svelte +2 -2
- package/dist/splitter/resize-trigger.svelte +2 -2
- package/dist/splitter/root.svelte +2 -2
- package/dist/steps/completed-content.svelte +2 -2
- package/dist/steps/content.svelte +2 -2
- package/dist/steps/context.svelte.d.ts +2 -3
- package/dist/steps/context.svelte.js +3 -3
- package/dist/steps/create-steps.svelte.js +5 -3
- package/dist/steps/index.d.ts +1 -0
- package/dist/steps/index.js +1 -0
- package/dist/steps/indicator.svelte +3 -3
- package/dist/steps/item.svelte +3 -3
- 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 +3 -3
- package/dist/steps/trigger.svelte +3 -3
- package/dist/switch/context.svelte.d.ts +1 -2
- package/dist/switch/context.svelte.js +2 -2
- package/dist/switch/control.svelte +2 -2
- package/dist/switch/create-switch.svelte.js +5 -3
- package/dist/switch/hidden-input.svelte +2 -2
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/label.svelte +2 -2
- package/dist/switch/root.svelte +2 -2
- package/dist/switch/thumb.svelte +2 -2
- package/dist/tabs/content.svelte +2 -2
- package/dist/tabs/context.svelte.d.ts +1 -2
- package/dist/tabs/context.svelte.js +2 -2
- package/dist/tabs/create-tabs.svelte.js +5 -3
- package/dist/tabs/index.d.ts +1 -0
- package/dist/tabs/index.js +1 -0
- 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 +2 -2
- package/dist/tags-input/context.svelte.d.ts +2 -3
- package/dist/tags-input/context.svelte.js +3 -3
- package/dist/tags-input/control.svelte +2 -2
- package/dist/tags-input/create-tags-input.svelte.js +5 -3
- package/dist/tags-input/hidden-input.svelte +2 -2
- package/dist/tags-input/index.d.ts +1 -0
- package/dist/tags-input/index.js +1 -0
- package/dist/tags-input/input.svelte +2 -2
- package/dist/tags-input/item-delete-trigger.svelte +4 -4
- package/dist/tags-input/item-input.svelte +4 -4
- package/dist/tags-input/item-preview.svelte +4 -4
- package/dist/tags-input/item-text.svelte +4 -4
- package/dist/tags-input/item.svelte +4 -4
- package/dist/tags-input/label.svelte +2 -2
- package/dist/tags-input/root.svelte +2 -2
- package/dist/time-picker/clear-trigger.svelte +2 -2
- package/dist/time-picker/column.svelte +2 -2
- package/dist/time-picker/content.svelte +2 -2
- package/dist/time-picker/context.svelte.d.ts +1 -2
- package/dist/time-picker/context.svelte.js +2 -2
- package/dist/time-picker/control.svelte +2 -2
- package/dist/time-picker/create-time-picker.svelte.js +5 -3
- package/dist/time-picker/hour-cell.svelte +2 -2
- package/dist/time-picker/index.d.ts +1 -0
- package/dist/time-picker/index.js +1 -0
- package/dist/time-picker/input.svelte +2 -2
- package/dist/time-picker/label.svelte +2 -2
- package/dist/time-picker/minute-cell.svelte +2 -2
- package/dist/time-picker/period-cell.svelte +2 -2
- package/dist/time-picker/positioner.svelte +2 -2
- package/dist/time-picker/root.svelte +2 -2
- package/dist/time-picker/second-cell.svelte +2 -2
- package/dist/time-picker/spacer.svelte +2 -2
- package/dist/time-picker/trigger.svelte +2 -2
- package/dist/timer/action-trigger.svelte +2 -2
- package/dist/timer/context.svelte.d.ts +2 -3
- package/dist/timer/context.svelte.js +3 -3
- package/dist/timer/create-timer.svelte.js +5 -3
- package/dist/timer/index.d.ts +1 -0
- package/dist/timer/index.js +1 -0
- package/dist/timer/item-label.svelte +3 -3
- package/dist/timer/item-value.svelte +3 -3
- package/dist/timer/item.svelte +3 -3
- package/dist/timer/root.svelte +2 -2
- package/dist/timer/separator.svelte +2 -2
- package/dist/toast/action-trigger.svelte +2 -2
- package/dist/toast/actor.svelte +2 -2
- package/dist/toast/close-trigger.svelte +2 -2
- package/dist/toast/context.svelte.d.ts +1 -2
- package/dist/toast/context.svelte.js +2 -2
- package/dist/toast/create-toaster.svelte.js +2 -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/index.d.ts +1 -0
- package/dist/toast/index.js +1 -0
- package/dist/toast/root.svelte +2 -2
- package/dist/toast/title.svelte +2 -2
- package/dist/toggle-group/context.svelte.d.ts +1 -2
- package/dist/toggle-group/context.svelte.js +2 -2
- package/dist/toggle-group/create-toggle-group.svelte.js +5 -3
- package/dist/toggle-group/index.d.ts +1 -0
- package/dist/toggle-group/index.js +1 -0
- 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 -2
- package/dist/tooltip/context.svelte.js +2 -2
- package/dist/tooltip/create-tooltip.svelte.js +5 -3
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/positioner.svelte +2 -2
- package/dist/tooltip/root.svelte +2 -2
- package/dist/tooltip/trigger.svelte +2 -2
- package/dist/tree-view/branch-content.svelte +4 -4
- package/dist/tree-view/branch-control.svelte +4 -4
- package/dist/tree-view/branch-indicator.svelte +4 -4
- package/dist/tree-view/branch-text.svelte +4 -4
- package/dist/tree-view/branch-trigger.svelte +4 -4
- package/dist/tree-view/branch.svelte +4 -4
- package/dist/tree-view/context.svelte.d.ts +3 -4
- package/dist/tree-view/context.svelte.js +4 -4
- package/dist/tree-view/create-tree-view.svelte.js +5 -3
- package/dist/tree-view/index.d.ts +1 -0
- package/dist/tree-view/index.js +1 -0
- package/dist/tree-view/item-indicator.svelte +6 -3
- package/dist/tree-view/item-text.svelte +6 -3
- package/dist/tree-view/item.svelte +6 -3
- 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/package.json +1 -1
- package/dist/context.svelte.d.ts +0 -8
package/dist/menu/trigger.svelte
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getMenuContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: MenuTriggerProps = $props();
|
14
14
|
|
15
|
-
let menu =
|
15
|
+
let menu = getMenuContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, menu.getTriggerProps()));
|
18
18
|
</script>
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import { Context } from '../context.svelte.js';
|
2
1
|
import type { CreateNumberInputReturn } from './create-number-input.svelte.js';
|
3
|
-
export declare const
|
2
|
+
export declare const getNumberInputContext: () => CreateNumberInputReturn, setNumberInputContext: (context: CreateNumberInputReturn | (() => CreateNumberInputReturn)) => void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export const
|
1
|
+
import { createContext } from '../create-context.svelte.js';
|
2
|
+
export const [getNumberInputContext, setNumberInputContext] = createContext('NumberInput');
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getNumberInputContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: NumberInputControlTriggerProps = $props();
|
14
14
|
|
15
|
-
let numberInput =
|
15
|
+
let numberInput = getNumberInputContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, numberInput.getControlProps()));
|
18
18
|
</script>
|
@@ -8,7 +8,8 @@ export function createNumberInput(props) {
|
|
8
8
|
const field = getFieldContext();
|
9
9
|
const locale = getLocaleContext();
|
10
10
|
const environment = getEnvironmentContext();
|
11
|
-
const
|
11
|
+
const id = uid();
|
12
|
+
const context = $derived(reflect(() => ({
|
12
13
|
ids: {
|
13
14
|
label: field?.ids.label,
|
14
15
|
input: field?.ids.control,
|
@@ -18,11 +19,12 @@ export function createNumberInput(props) {
|
|
18
19
|
readOnly: field?.readOnly,
|
19
20
|
required: field?.required,
|
20
21
|
...props,
|
21
|
-
id: props.id ??
|
22
|
+
id: props.id ?? id,
|
22
23
|
dir: locale?.dir,
|
23
24
|
locale: props.locale ?? locale?.locale,
|
24
25
|
getRootNode: environment?.getRootNode,
|
25
|
-
}));
|
26
|
+
})));
|
27
|
+
const [state, send] = useMachine(numberInput.machine(context), { context });
|
26
28
|
const api = $derived(reflect(() => {
|
27
29
|
const o = numberInput.connect(state, send, normalizeProps);
|
28
30
|
return {
|
@@ -9,12 +9,12 @@
|
|
9
9
|
|
10
10
|
<script lang="ts">
|
11
11
|
import {mergeProps} from '../merge-props.js';
|
12
|
-
import {
|
12
|
+
import {getNumberInputContext} from './context.svelte.js';
|
13
13
|
|
14
14
|
let {asChild, children, ...props}: NumberInputDecrementTriggerProps =
|
15
15
|
$props();
|
16
16
|
|
17
|
-
let numberInput =
|
17
|
+
let numberInput = getNumberInputContext();
|
18
18
|
|
19
19
|
let mergedProps = $derived(
|
20
20
|
mergeProps(props, numberInput.getDecrementTriggerProps()),
|
@@ -9,12 +9,12 @@
|
|
9
9
|
|
10
10
|
<script lang="ts">
|
11
11
|
import {mergeProps} from '../merge-props.js';
|
12
|
-
import {
|
12
|
+
import {getNumberInputContext} from './context.svelte.js';
|
13
13
|
|
14
14
|
let {asChild, children, ...props}: NumberInputIncrementTriggerProps =
|
15
15
|
$props();
|
16
16
|
|
17
|
-
let numberInput =
|
17
|
+
let numberInput = getNumberInputContext();
|
18
18
|
|
19
19
|
let mergedProps = $derived(
|
20
20
|
mergeProps(props, numberInput.getIncrementTriggerProps()),
|
@@ -7,3 +7,4 @@ export type { NumberInputLabelProps } from './label.svelte';
|
|
7
7
|
export type { NumberInputProps } from './root.svelte';
|
8
8
|
export type { NumberInputScrubberProps } from './scrubber.svelte';
|
9
9
|
export { anatomy as numberInputAnatomy } from '@zag-js/number-input';
|
10
|
+
export { getNumberInputContext } from './context.svelte.js';
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getNumberInputContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, ...props}: NumberInputInputProps = $props();
|
14
14
|
|
15
|
-
let numberInput =
|
15
|
+
let numberInput = getNumberInputContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, numberInput.getInputProps()));
|
18
18
|
</script>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getNumberInputContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: NumberInputLabelProps = $props();
|
14
14
|
|
15
|
-
let numberInput =
|
15
|
+
let numberInput = getNumberInputContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, numberInput.getLabelProps()));
|
18
18
|
</script>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
import {mergeProps} from '../merge-props.js';
|
18
18
|
import {reflect} from '@zag-js/svelte';
|
19
19
|
import {createSplitProps} from '@zag-js/utils';
|
20
|
-
import {
|
20
|
+
import {setNumberInputContext} from './context.svelte.js';
|
21
21
|
import {createNumberInput} from './create-number-input.svelte.js';
|
22
22
|
|
23
23
|
let {asChild, children, ...props}: NumberInputProps = $props();
|
@@ -58,7 +58,7 @@
|
|
58
58
|
mergeProps(otherProps, numberInput.getRootProps()),
|
59
59
|
);
|
60
60
|
|
61
|
-
|
61
|
+
setNumberInputContext(numberInput);
|
62
62
|
</script>
|
63
63
|
|
64
64
|
{#if asChild}
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getNumberInputContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: NumberInputScrubberProps = $props();
|
14
14
|
|
15
|
-
let numberInput =
|
15
|
+
let numberInput = getNumberInputContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, numberInput.getScrubberProps()));
|
18
18
|
</script>
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import { Context } from '../context.svelte.js';
|
2
1
|
import type { CreatePaginationReturn } from './create-pagination.svelte.js';
|
3
|
-
export declare const
|
2
|
+
export declare const getPaginationContext: () => CreatePaginationReturn, setPaginationContext: (context: CreatePaginationReturn | (() => CreatePaginationReturn)) => void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export const
|
1
|
+
import { createContext } from '../create-context.svelte.js';
|
2
|
+
export const [getPaginationContext, setPaginationContext] = createContext('Pagination');
|
@@ -6,12 +6,14 @@ import { uid } from 'uid';
|
|
6
6
|
export function createPagination(props) {
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
|
-
const
|
9
|
+
const id = uid();
|
10
|
+
const context = $derived(reflect(() => ({
|
10
11
|
...props,
|
11
|
-
id: props.id ??
|
12
|
+
id: props.id ?? id,
|
12
13
|
dir: locale?.dir,
|
13
14
|
getRootNode: environment?.getRootNode,
|
14
|
-
}));
|
15
|
+
})));
|
16
|
+
const [state, send] = useMachine(pagination.machine(context), { context });
|
15
17
|
const api = $derived(reflect(() => pagination.connect(state, send, normalizeProps)));
|
16
18
|
return api;
|
17
19
|
}
|
@@ -10,11 +10,11 @@
|
|
10
10
|
|
11
11
|
<script lang="ts">
|
12
12
|
import {mergeProps} from '../merge-props.js';
|
13
|
-
import {
|
13
|
+
import {getPaginationContext} from './context.svelte.js';
|
14
14
|
|
15
15
|
let {index, asChild, children, ...props}: PaginationEllipsisProps = $props();
|
16
16
|
|
17
|
-
let pagination =
|
17
|
+
let pagination = getPaginationContext();
|
18
18
|
|
19
19
|
let mergedProps = $derived(
|
20
20
|
mergeProps(props, pagination.getEllipsisProps({index})),
|
@@ -5,3 +5,4 @@ export type { PaginationNextTriggerProps } from './next-trigger.svelte';
|
|
5
5
|
export type { PaginationPrevTriggerProps } from './prev-trigger.svelte';
|
6
6
|
export type { PaginationProps } from './root.svelte';
|
7
7
|
export { anatomy as paginationAnatomy } from '@zag-js/pagination';
|
8
|
+
export { getPaginationContext } from './context.svelte.js';
|
package/dist/pagination/index.js
CHANGED
@@ -10,11 +10,11 @@
|
|
10
10
|
|
11
11
|
<script lang="ts">
|
12
12
|
import {mergeProps} from '../merge-props.js';
|
13
|
-
import {
|
13
|
+
import {getPaginationContext} from './context.svelte.js';
|
14
14
|
|
15
15
|
let {value, asChild, children, ...props}: PaginationItemProps = $props();
|
16
16
|
|
17
|
-
let pagination =
|
17
|
+
let pagination = getPaginationContext();
|
18
18
|
|
19
19
|
let mergedProps = $derived(
|
20
20
|
mergeProps(
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPaginationContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PaginationNextTriggerProps = $props();
|
14
14
|
|
15
|
-
let pagination =
|
15
|
+
let pagination = getPaginationContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(
|
18
18
|
mergeProps(props, pagination.getNextTriggerProps()),
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPaginationContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PaginationPrevTriggerProps = $props();
|
14
14
|
|
15
|
-
let pagination =
|
15
|
+
let pagination = getPaginationContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(
|
18
18
|
mergeProps(props, pagination.getPrevTriggerProps()),
|
@@ -17,7 +17,7 @@
|
|
17
17
|
import {mergeProps} from '../merge-props.js';
|
18
18
|
import {reflect} from '@zag-js/svelte';
|
19
19
|
import {createSplitProps} from '@zag-js/utils';
|
20
|
-
import {
|
20
|
+
import {setPaginationContext} from './context.svelte.js';
|
21
21
|
import {createPagination} from './create-pagination.svelte.js';
|
22
22
|
|
23
23
|
let {asChild, children, ...props}: PaginationProps = $props();
|
@@ -41,7 +41,7 @@
|
|
41
41
|
|
42
42
|
let mergedProps = $derived(mergeProps(otherProps, pagination.getRootProps()));
|
43
43
|
|
44
|
-
|
44
|
+
setPaginationContext(pagination);
|
45
45
|
</script>
|
46
46
|
|
47
47
|
{#if asChild}
|
@@ -9,11 +9,11 @@
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
11
|
import {parts} from './anatomy.js';
|
12
|
-
import {
|
12
|
+
import {getPinInputContext} from './context.svelte.js';
|
13
13
|
|
14
14
|
let {asChild, children, ...props}: PinInputClearTriggerProps = $props();
|
15
15
|
|
16
|
-
let pinInput =
|
16
|
+
let pinInput = getPinInputContext();
|
17
17
|
|
18
18
|
let mergedProps = $derived(
|
19
19
|
mergeProps(
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import { Context } from '../context.svelte.js';
|
2
1
|
import type { CreatePinInputReturn } from './create-pin-input.svelte.js';
|
3
|
-
export declare const
|
2
|
+
export declare const getPinInputContext: () => CreatePinInputReturn, setPinInputContext: (context: CreatePinInputReturn | (() => CreatePinInputReturn)) => void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export const
|
1
|
+
import { createContext } from '../create-context.svelte.js';
|
2
|
+
export const [getPinInputContext, setPinInputContext] = createContext('PinInput');
|
@@ -8,7 +8,8 @@ export function createPinInputContext(props) {
|
|
8
8
|
const field = getFieldContext();
|
9
9
|
const locale = getLocaleContext();
|
10
10
|
const environment = getEnvironmentContext();
|
11
|
-
const
|
11
|
+
const id = uid();
|
12
|
+
const context = $derived(reflect(() => ({
|
12
13
|
ids: {
|
13
14
|
label: field?.ids.label,
|
14
15
|
hiddenInput: field?.ids.control,
|
@@ -18,10 +19,11 @@ export function createPinInputContext(props) {
|
|
18
19
|
disabled: field?.disabled,
|
19
20
|
readOnly: field?.readOnly,
|
20
21
|
...props,
|
21
|
-
id: props.id ??
|
22
|
+
id: props.id ?? id,
|
22
23
|
dir: locale?.dir,
|
23
24
|
getRootNode: environment?.getRootNode,
|
24
|
-
}));
|
25
|
+
})));
|
26
|
+
const [state, send] = useMachine(pinInput.machine(context), { context });
|
25
27
|
const api = $derived(reflect(() => {
|
26
28
|
const o = pinInput.connect(state, send, normalizeProps);
|
27
29
|
return {
|
@@ -6,11 +6,11 @@
|
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
8
|
import {mergeProps} from '../merge-props.js';
|
9
|
-
import {
|
9
|
+
import {getPinInputContext} from './context.svelte.js';
|
10
10
|
|
11
11
|
let {...props}: PinInputHiddenInputProps = $props();
|
12
12
|
|
13
|
-
let pinInput =
|
13
|
+
let pinInput = getPinInputContext();
|
14
14
|
|
15
15
|
let mergedProps = $derived(mergeProps(props, pinInput.getHiddenInputProps()));
|
16
16
|
</script>
|
@@ -5,3 +5,4 @@ export type { PinInputInputProps } from './input.svelte';
|
|
5
5
|
export type { PinInputLabelProps } from './label.svelte';
|
6
6
|
export type { PinInputProps } from './root.svelte';
|
7
7
|
export { anatomy as pinInputAnatomy } from './anatomy.js';
|
8
|
+
export { getPinInputContext } from './context.svelte.js';
|
package/dist/pin-input/index.js
CHANGED
@@ -10,11 +10,11 @@
|
|
10
10
|
|
11
11
|
<script lang="ts">
|
12
12
|
import {mergeProps} from '../merge-props.js';
|
13
|
-
import {
|
13
|
+
import {getPinInputContext} from './context.svelte.js';
|
14
14
|
|
15
15
|
let {index, asChild, ...props}: PinInputInputProps = $props();
|
16
16
|
|
17
|
-
let pinInput =
|
17
|
+
let pinInput = getPinInputContext();
|
18
18
|
|
19
19
|
let mergedProps = $derived(
|
20
20
|
mergeProps(props, pinInput.getInputProps({index})),
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPinInputContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PinInputLabelProps = $props();
|
14
14
|
|
15
|
-
let pinInput =
|
15
|
+
let pinInput = getPinInputContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, pinInput.getLabelProps()));
|
18
18
|
</script>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
import {mergeProps} from '../merge-props.js';
|
18
18
|
import {reflect} from '@zag-js/svelte';
|
19
19
|
import {createSplitProps} from '@zag-js/utils';
|
20
|
-
import {
|
20
|
+
import {setPinInputContext} from './context.svelte.js';
|
21
21
|
import {createPinInputContext} from './create-pin-input.svelte.js';
|
22
22
|
|
23
23
|
let {asChild, children, ...props}: PinInputProps = $props();
|
@@ -52,7 +52,7 @@
|
|
52
52
|
|
53
53
|
let mergedProps = $derived(mergeProps(otherProps, pinInput.getRootProps()));
|
54
54
|
|
55
|
-
|
55
|
+
setPinInputContext(pinInput);
|
56
56
|
</script>
|
57
57
|
|
58
58
|
{#if asChild}
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverArrowTipProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getArrowTipProps()));
|
18
18
|
</script>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverArrowProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getArrowProps()));
|
18
18
|
</script>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverCloseTriggerProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getCloseTriggerProps()));
|
18
18
|
</script>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverContentProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getContentProps()));
|
18
18
|
</script>
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import { Context } from '../context.svelte.js';
|
2
1
|
import type { CreatePopoverReturn } from './create-popover.svelte.js';
|
3
|
-
export declare const
|
2
|
+
export declare const getPopoverContext: () => CreatePopoverReturn, setPopoverContext: (context: CreatePopoverReturn | (() => CreatePopoverReturn)) => void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export const
|
1
|
+
import { createContext } from '../create-context.svelte.js';
|
2
|
+
export const [getPopoverContext, setPopoverContext] = createContext('Popover');
|
@@ -6,14 +6,16 @@ import { uid } from 'uid';
|
|
6
6
|
export function createPopover(props) {
|
7
7
|
const locale = getLocaleContext();
|
8
8
|
const environment = getEnvironmentContext();
|
9
|
-
const
|
9
|
+
const id = uid();
|
10
|
+
const context = $derived(reflect(() => ({
|
10
11
|
...props,
|
11
|
-
id: props.id ??
|
12
|
+
id: props.id ?? id,
|
12
13
|
dir: locale?.dir,
|
13
14
|
open: props.defaultOpen ?? props.open,
|
14
15
|
getRootNode: environment?.getRootNode,
|
15
16
|
'open.controlled': props.open != null,
|
16
|
-
}));
|
17
|
+
})));
|
18
|
+
const [state, send] = useMachine(popover.machine(context), { context });
|
17
19
|
const api = $derived(reflect(() => popover.connect(state, send, normalizeProps)));
|
18
20
|
return api;
|
19
21
|
}
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverDescriptionProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getDescriptionProps()));
|
18
18
|
</script>
|
package/dist/popover/index.d.ts
CHANGED
@@ -8,3 +8,5 @@ export type { PopoverPositionerProps } from './positioner.svelte';
|
|
8
8
|
export type { PopoverProps } from './root.svelte';
|
9
9
|
export type { PopoverTitleProps } from './title.svelte';
|
10
10
|
export type { PopoverTriggerProps } from './trigger.svelte';
|
11
|
+
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
12
|
+
export { getPopoverContext } from './context.svelte.js';
|
package/dist/popover/index.js
CHANGED
@@ -7,4 +7,3 @@ export { default as Positioner } from './positioner.svelte';
|
|
7
7
|
export { default as Root } from './root.svelte';
|
8
8
|
export { default as Title } from './title.svelte';
|
9
9
|
export { default as Trigger } from './trigger.svelte';
|
10
|
-
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
package/dist/popover/popover.js
CHANGED
@@ -7,4 +7,3 @@ export { default as Positioner } from './positioner.svelte';
|
|
7
7
|
export { default as Root } from './root.svelte';
|
8
8
|
export { default as Title } from './title.svelte';
|
9
9
|
export { default as Trigger } from './trigger.svelte';
|
10
|
-
export { anatomy as popoverAnatomy } from '@zag-js/popover';
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverPositionerProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getPositionerProps()));
|
18
18
|
</script>
|
package/dist/popover/root.svelte
CHANGED
@@ -11,14 +11,14 @@
|
|
11
11
|
</script>
|
12
12
|
|
13
13
|
<script lang="ts">
|
14
|
-
import {
|
14
|
+
import {setPopoverContext} from './context.svelte.js';
|
15
15
|
import {createPopover} from './create-popover.svelte.js';
|
16
16
|
|
17
17
|
let {children, ...props}: PopoverProps = $props();
|
18
18
|
|
19
19
|
let popover = createPopover(props);
|
20
20
|
|
21
|
-
|
21
|
+
setPopoverContext(popover);
|
22
22
|
</script>
|
23
23
|
|
24
24
|
{@render children?.(popover)}
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverTitleProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getTitleProps()));
|
18
18
|
</script>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
10
|
import {mergeProps} from '../merge-props.js';
|
11
|
-
import {
|
11
|
+
import {getPopoverContext} from './context.svelte.js';
|
12
12
|
|
13
13
|
let {asChild, children, ...props}: PopoverTriggerProps = $props();
|
14
14
|
|
15
|
-
let popover =
|
15
|
+
let popover = getPopoverContext();
|
16
16
|
|
17
17
|
let mergedProps = $derived(mergeProps(props, popover.getTriggerProps()));
|
18
18
|
</script>
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import { Context } from '../context.svelte.js';
|
2
1
|
import type { CreatePresenceReturn } from './create-presence.svelte.js';
|
3
|
-
export declare const
|
2
|
+
export declare const getPresenceContext: () => CreatePresenceReturn, setPresenceContext: (context: CreatePresenceReturn | (() => CreatePresenceReturn)) => void;
|