ui-ingredients 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/accordion/context.svelte.d.ts +10 -0
- package/dist/accordion/context.svelte.js +20 -0
- package/dist/accordion/index.d.ts +5 -0
- package/dist/accordion/index.js +5 -0
- package/dist/accordion/item-content.svelte +13 -0
- package/dist/accordion/item-content.svelte.d.ts +22 -0
- package/dist/accordion/item-indicator.svelte +13 -0
- package/dist/accordion/item-indicator.svelte.d.ts +22 -0
- package/dist/accordion/item-trigger.svelte +13 -0
- package/dist/accordion/item-trigger.svelte.d.ts +22 -0
- package/dist/accordion/item.svelte +24 -0
- package/dist/accordion/item.svelte.d.ts +23 -0
- package/dist/accordion/root.svelte +40 -0
- package/dist/accordion/root.svelte.d.ts +25 -0
- package/dist/avatar/context.svelte.d.ts +8 -0
- package/dist/avatar/context.svelte.js +14 -0
- package/dist/avatar/fallback.svelte +12 -0
- package/dist/avatar/fallback.svelte.d.ts +22 -0
- package/dist/avatar/image.svelte +10 -0
- package/dist/avatar/image.svelte.d.ts +22 -0
- package/dist/avatar/index.d.ts +3 -0
- package/dist/avatar/index.js +3 -0
- package/dist/avatar/root.svelte +29 -0
- package/dist/avatar/root.svelte.d.ts +25 -0
- package/dist/carousel/context.svelte.d.ts +8 -0
- package/dist/carousel/context.svelte.js +14 -0
- package/dist/carousel/index.d.ts +8 -0
- package/dist/carousel/index.js +8 -0
- package/dist/carousel/indicator-group.svelte +12 -0
- package/dist/carousel/indicator-group.svelte.d.ts +22 -0
- package/dist/carousel/indicator.svelte +20 -0
- package/dist/carousel/indicator.svelte.d.ts +23 -0
- package/dist/carousel/item-group.svelte +12 -0
- package/dist/carousel/item-group.svelte.d.ts +22 -0
- package/dist/carousel/item.svelte +12 -0
- package/dist/carousel/item.svelte.d.ts +23 -0
- package/dist/carousel/next-trigger.svelte +12 -0
- package/dist/carousel/next-trigger.svelte.d.ts +22 -0
- package/dist/carousel/prev-trigger.svelte +12 -0
- package/dist/carousel/prev-trigger.svelte.d.ts +22 -0
- package/dist/carousel/root.svelte +40 -0
- package/dist/carousel/root.svelte.d.ts +25 -0
- package/dist/carousel/viewport.svelte +12 -0
- package/dist/carousel/viewport.svelte.d.ts +22 -0
- package/dist/checkbox/context.svelte.d.ts +8 -0
- package/dist/checkbox/context.svelte.js +14 -0
- package/dist/checkbox/control.svelte +12 -0
- package/dist/checkbox/control.svelte.d.ts +22 -0
- package/dist/checkbox/hidden-input.svelte +10 -0
- package/dist/checkbox/hidden-input.svelte.d.ts +22 -0
- package/dist/checkbox/index.d.ts +5 -0
- package/dist/checkbox/index.js +5 -0
- package/dist/checkbox/indicator.svelte +12 -0
- package/dist/checkbox/indicator.svelte.d.ts +22 -0
- package/dist/checkbox/label.svelte +12 -0
- package/dist/checkbox/label.svelte.d.ts +22 -0
- package/dist/checkbox/root.svelte +44 -0
- package/dist/checkbox/root.svelte.d.ts +25 -0
- package/dist/clipboard/context.svelte.d.ts +8 -0
- package/dist/clipboard/context.svelte.js +14 -0
- package/dist/clipboard/control.svelte +12 -0
- package/dist/clipboard/control.svelte.d.ts +22 -0
- package/dist/clipboard/index.d.ts +6 -0
- package/dist/clipboard/index.js +6 -0
- package/dist/clipboard/indicator.svelte +12 -0
- package/dist/clipboard/indicator.svelte.d.ts +23 -0
- package/dist/clipboard/input.svelte +10 -0
- package/dist/clipboard/input.svelte.d.ts +22 -0
- package/dist/clipboard/label.svelte +12 -0
- package/dist/clipboard/label.svelte.d.ts +22 -0
- package/dist/clipboard/root.svelte +30 -0
- package/dist/clipboard/root.svelte.d.ts +25 -0
- package/dist/clipboard/trigger.svelte +12 -0
- package/dist/clipboard/trigger.svelte.d.ts +22 -0
- package/dist/collapsible/content.svelte +12 -0
- package/dist/collapsible/content.svelte.d.ts +22 -0
- package/dist/collapsible/context.svelte.d.ts +8 -0
- package/dist/collapsible/context.svelte.js +14 -0
- package/dist/collapsible/index.d.ts +3 -0
- package/dist/collapsible/index.js +3 -0
- package/dist/collapsible/root.svelte +36 -0
- package/dist/collapsible/root.svelte.d.ts +25 -0
- package/dist/collapsible/trigger.svelte +12 -0
- package/dist/collapsible/trigger.svelte.d.ts +22 -0
- package/dist/color-picker/.gitkeep +0 -0
- package/dist/combobox/clear-trigger.svelte +12 -0
- package/dist/combobox/clear-trigger.svelte.d.ts +22 -0
- package/dist/combobox/content.svelte +12 -0
- package/dist/combobox/content.svelte.d.ts +22 -0
- package/dist/combobox/context.svelte.d.ts +16 -0
- package/dist/combobox/context.svelte.js +38 -0
- package/dist/combobox/control.svelte +12 -0
- package/dist/combobox/control.svelte.d.ts +22 -0
- package/dist/combobox/index.d.ts +14 -0
- package/dist/combobox/index.js +14 -0
- package/dist/combobox/input.svelte +10 -0
- package/dist/combobox/input.svelte.d.ts +22 -0
- package/dist/combobox/item-group-label.svelte +20 -0
- package/dist/combobox/item-group-label.svelte.d.ts +22 -0
- package/dist/combobox/item-group.svelte +14 -0
- package/dist/combobox/item-group.svelte.d.ts +23 -0
- package/dist/combobox/item-indicator.svelte +13 -0
- package/dist/combobox/item-indicator.svelte.d.ts +22 -0
- package/dist/combobox/item-text.svelte +17 -0
- package/dist/combobox/item-text.svelte.d.ts +22 -0
- package/dist/combobox/item.svelte +24 -0
- package/dist/combobox/item.svelte.d.ts +23 -0
- package/dist/combobox/label.svelte +12 -0
- package/dist/combobox/label.svelte.d.ts +22 -0
- package/dist/combobox/list.svelte +12 -0
- package/dist/combobox/list.svelte.d.ts +22 -0
- package/dist/combobox/positioner.svelte +12 -0
- package/dist/combobox/positioner.svelte.d.ts +22 -0
- package/dist/combobox/root.svelte +104 -0
- package/dist/combobox/root.svelte.d.ts +28 -0
- package/dist/combobox/trigger.svelte +12 -0
- package/dist/combobox/trigger.svelte.d.ts +22 -0
- package/dist/date-picker/.gitkeep +0 -0
- package/dist/dialog/backdrop.svelte +12 -0
- package/dist/dialog/backdrop.svelte.d.ts +22 -0
- package/dist/dialog/close-trigger.svelte +12 -0
- package/dist/dialog/close-trigger.svelte.d.ts +22 -0
- package/dist/dialog/content.svelte +12 -0
- package/dist/dialog/content.svelte.d.ts +22 -0
- package/dist/dialog/context.svelte.d.ts +8 -0
- package/dist/dialog/context.svelte.js +14 -0
- package/dist/dialog/description.svelte +12 -0
- package/dist/dialog/description.svelte.d.ts +22 -0
- package/dist/dialog/index.d.ts +8 -0
- package/dist/dialog/index.js +8 -0
- package/dist/dialog/positioner.svelte +12 -0
- package/dist/dialog/positioner.svelte.d.ts +22 -0
- package/dist/dialog/root.svelte +10 -0
- package/dist/dialog/root.svelte.d.ts +24 -0
- package/dist/dialog/title.svelte +12 -0
- package/dist/dialog/title.svelte.d.ts +22 -0
- package/dist/dialog/trigger.svelte +12 -0
- package/dist/dialog/trigger.svelte.d.ts +22 -0
- package/dist/editable/.gitkeep +0 -0
- package/dist/file-upload/.gitkeep +0 -0
- package/dist/hover-card/arrow-tip.svelte +12 -0
- package/dist/hover-card/arrow-tip.svelte.d.ts +22 -0
- package/dist/hover-card/arrow.svelte +12 -0
- package/dist/hover-card/arrow.svelte.d.ts +22 -0
- package/dist/hover-card/content.svelte +12 -0
- package/dist/hover-card/content.svelte.d.ts +22 -0
- package/dist/hover-card/context.svelte.d.ts +8 -0
- package/dist/hover-card/context.svelte.js +14 -0
- package/dist/hover-card/index.d.ts +6 -0
- package/dist/hover-card/index.js +6 -0
- package/dist/hover-card/positioner.svelte +12 -0
- package/dist/hover-card/positioner.svelte.d.ts +22 -0
- package/dist/hover-card/root.svelte +10 -0
- package/dist/hover-card/root.svelte.d.ts +24 -0
- package/dist/hover-card/trigger.svelte +12 -0
- package/dist/hover-card/trigger.svelte.d.ts +22 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +52 -0
- package/dist/menu/.gitkeep +0 -0
- package/dist/number-input/context.svelte.d.ts +8 -0
- package/dist/number-input/context.svelte.js +14 -0
- package/dist/number-input/control.svelte +12 -0
- package/dist/number-input/control.svelte.d.ts +22 -0
- package/dist/number-input/decrement-trigger.svelte +12 -0
- package/dist/number-input/decrement-trigger.svelte.d.ts +22 -0
- package/dist/number-input/increment-trigger.svelte +12 -0
- package/dist/number-input/increment-trigger.svelte.d.ts +22 -0
- package/dist/number-input/index.d.ts +7 -0
- package/dist/number-input/index.js +7 -0
- package/dist/number-input/input.svelte +10 -0
- package/dist/number-input/input.svelte.d.ts +22 -0
- package/dist/number-input/label.svelte +12 -0
- package/dist/number-input/label.svelte.d.ts +22 -0
- package/dist/number-input/root.svelte +72 -0
- package/dist/number-input/root.svelte.d.ts +25 -0
- package/dist/number-input/scrubber.svelte +12 -0
- package/dist/number-input/scrubber.svelte.d.ts +22 -0
- package/dist/pagination/context.svelte.d.ts +8 -0
- package/dist/pagination/context.svelte.js +14 -0
- package/dist/pagination/ellipsis.svelte +12 -0
- package/dist/pagination/ellipsis.svelte.d.ts +23 -0
- package/dist/pagination/index.d.ts +5 -0
- package/dist/pagination/index.js +5 -0
- package/dist/pagination/item.svelte +20 -0
- package/dist/pagination/item.svelte.d.ts +23 -0
- package/dist/pagination/next-trigger.svelte +12 -0
- package/dist/pagination/next-trigger.svelte.d.ts +22 -0
- package/dist/pagination/prev-trigger.svelte +12 -0
- package/dist/pagination/prev-trigger.svelte.d.ts +22 -0
- package/dist/pagination/root.svelte +42 -0
- package/dist/pagination/root.svelte.d.ts +25 -0
- package/dist/pin-input/clear-trigger.svelte +17 -0
- package/dist/pin-input/clear-trigger.svelte.d.ts +22 -0
- package/dist/pin-input/context.svelte.d.ts +8 -0
- package/dist/pin-input/context.svelte.js +14 -0
- package/dist/pin-input/hidden-input.svelte +10 -0
- package/dist/pin-input/hidden-input.svelte.d.ts +22 -0
- package/dist/pin-input/index.d.ts +5 -0
- package/dist/pin-input/index.js +5 -0
- package/dist/pin-input/input.svelte +10 -0
- package/dist/pin-input/input.svelte.d.ts +23 -0
- package/dist/pin-input/label.svelte +12 -0
- package/dist/pin-input/label.svelte.d.ts +22 -0
- package/dist/pin-input/root.svelte +64 -0
- package/dist/pin-input/root.svelte.d.ts +25 -0
- package/dist/popover/arrow-tip.svelte +12 -0
- package/dist/popover/arrow-tip.svelte.d.ts +22 -0
- package/dist/popover/arrow.svelte +12 -0
- package/dist/popover/arrow.svelte.d.ts +22 -0
- package/dist/popover/close-trigger.svelte +12 -0
- package/dist/popover/close-trigger.svelte.d.ts +22 -0
- package/dist/popover/content.svelte +12 -0
- package/dist/popover/content.svelte.d.ts +22 -0
- package/dist/popover/context.svelte.d.ts +8 -0
- package/dist/popover/context.svelte.js +14 -0
- package/dist/popover/description.svelte +12 -0
- package/dist/popover/description.svelte.d.ts +22 -0
- package/dist/popover/index.d.ts +9 -0
- package/dist/popover/index.js +9 -0
- package/dist/popover/positioner.svelte +12 -0
- package/dist/popover/positioner.svelte.d.ts +22 -0
- package/dist/popover/root.svelte +10 -0
- package/dist/popover/root.svelte.d.ts +24 -0
- package/dist/popover/title.svelte +12 -0
- package/dist/popover/title.svelte.d.ts +22 -0
- package/dist/popover/trigger.svelte +12 -0
- package/dist/popover/trigger.svelte.d.ts +22 -0
- package/dist/portal/index.d.ts +1 -0
- package/dist/portal/index.js +1 -0
- package/dist/portal/root.svelte +10 -0
- package/dist/portal/root.svelte.d.ts +25 -0
- package/dist/presence/index.d.ts +1 -0
- package/dist/presence/index.js +1 -0
- package/dist/presence/root.svelte +27 -0
- package/dist/presence/root.svelte.d.ts +23 -0
- package/dist/progress/circle-range.svelte +12 -0
- package/dist/progress/circle-range.svelte.d.ts +22 -0
- package/dist/progress/circle-track.svelte +12 -0
- package/dist/progress/circle-track.svelte.d.ts +22 -0
- package/dist/progress/circle.svelte +12 -0
- package/dist/progress/circle.svelte.d.ts +22 -0
- package/dist/progress/context.svelte.d.ts +8 -0
- package/dist/progress/context.svelte.js +14 -0
- package/dist/progress/index.d.ts +8 -0
- package/dist/progress/index.js +8 -0
- package/dist/progress/label.svelte +12 -0
- package/dist/progress/label.svelte.d.ts +22 -0
- package/dist/progress/range.svelte +12 -0
- package/dist/progress/range.svelte.d.ts +22 -0
- package/dist/progress/root.svelte +36 -0
- package/dist/progress/root.svelte.d.ts +25 -0
- package/dist/progress/track.svelte +12 -0
- package/dist/progress/track.svelte.d.ts +22 -0
- package/dist/progress/value-text.svelte +16 -0
- package/dist/progress/value-text.svelte.d.ts +22 -0
- package/dist/qr-code/.gitkeep +0 -0
- package/dist/radio-group/context.svelte.d.ts +10 -0
- package/dist/radio-group/context.svelte.js +20 -0
- package/dist/radio-group/index.d.ts +7 -0
- package/dist/radio-group/index.js +7 -0
- package/dist/radio-group/indicator.svelte +12 -0
- package/dist/radio-group/indicator.svelte.d.ts +22 -0
- package/dist/radio-group/item-control.svelte +13 -0
- package/dist/radio-group/item-control.svelte.d.ts +22 -0
- package/dist/radio-group/item-hidden-input.svelte +11 -0
- package/dist/radio-group/item-hidden-input.svelte.d.ts +22 -0
- package/dist/radio-group/item-text.svelte +13 -0
- package/dist/radio-group/item-text.svelte.d.ts +22 -0
- package/dist/radio-group/item.svelte +26 -0
- package/dist/radio-group/item.svelte.d.ts +23 -0
- package/dist/radio-group/label.svelte +12 -0
- package/dist/radio-group/label.svelte.d.ts +22 -0
- package/dist/radio-group/root.svelte +40 -0
- package/dist/radio-group/root.svelte.d.ts +25 -0
- package/dist/rating-group/.gitkeep +0 -0
- package/dist/select/clear-trigger.svelte +12 -0
- package/dist/select/clear-trigger.svelte.d.ts +22 -0
- package/dist/select/content.svelte +12 -0
- package/dist/select/content.svelte.d.ts +22 -0
- package/dist/select/context.svelte.d.ts +19 -0
- package/dist/select/context.svelte.js +38 -0
- package/dist/select/control.svelte +12 -0
- package/dist/select/control.svelte.d.ts +22 -0
- package/dist/select/hidden-select.svelte +12 -0
- package/dist/select/hidden-select.svelte.d.ts +22 -0
- package/dist/select/index.d.ts +16 -0
- package/dist/select/index.js +16 -0
- package/dist/select/indicator.svelte +12 -0
- package/dist/select/indicator.svelte.d.ts +22 -0
- package/dist/select/item-group-label.svelte +15 -0
- package/dist/select/item-group-label.svelte.d.ts +22 -0
- package/dist/select/item-group.svelte +14 -0
- package/dist/select/item-group.svelte.d.ts +23 -0
- package/dist/select/item-indicator.svelte +13 -0
- package/dist/select/item-indicator.svelte.d.ts +22 -0
- package/dist/select/item-text.svelte +17 -0
- package/dist/select/item-text.svelte.d.ts +22 -0
- package/dist/select/item.svelte +24 -0
- package/dist/select/item.svelte.d.ts +23 -0
- package/dist/select/label.svelte +12 -0
- package/dist/select/label.svelte.d.ts +22 -0
- package/dist/select/list.svelte +12 -0
- package/dist/select/list.svelte.d.ts +22 -0
- package/dist/select/positioner.svelte +12 -0
- package/dist/select/positioner.svelte.d.ts +22 -0
- package/dist/select/root.svelte +78 -0
- package/dist/select/root.svelte.d.ts +28 -0
- package/dist/select/trigger.svelte +12 -0
- package/dist/select/trigger.svelte.d.ts +22 -0
- package/dist/select/value-text.svelte +18 -0
- package/dist/select/value-text.svelte.d.ts +22 -0
- package/dist/signature-pad/.gitkeep +0 -0
- package/dist/slider/context.svelte.d.ts +10 -0
- package/dist/slider/context.svelte.js +20 -0
- package/dist/slider/control.svelte +12 -0
- package/dist/slider/control.svelte.d.ts +22 -0
- package/dist/slider/hidden-input.svelte +11 -0
- package/dist/slider/hidden-input.svelte.d.ts +22 -0
- package/dist/slider/index.d.ts +10 -0
- package/dist/slider/index.js +10 -0
- package/dist/slider/label.svelte +12 -0
- package/dist/slider/label.svelte.d.ts +22 -0
- package/dist/slider/marker-group.svelte +12 -0
- package/dist/slider/marker-group.svelte.d.ts +22 -0
- package/dist/slider/marker.svelte +19 -0
- package/dist/slider/marker.svelte.d.ts +23 -0
- package/dist/slider/range.svelte +12 -0
- package/dist/slider/range.svelte.d.ts +22 -0
- package/dist/slider/root.svelte +66 -0
- package/dist/slider/root.svelte.d.ts +25 -0
- package/dist/slider/thumb.svelte +24 -0
- package/dist/slider/thumb.svelte.d.ts +23 -0
- package/dist/slider/track.svelte +12 -0
- package/dist/slider/track.svelte.d.ts +22 -0
- package/dist/slider/value-text.svelte +16 -0
- package/dist/slider/value-text.svelte.d.ts +22 -0
- package/dist/steps/.gitkeep +0 -0
- package/dist/switch/context.svelte.d.ts +8 -0
- package/dist/switch/context.svelte.js +14 -0
- package/dist/switch/control.svelte +12 -0
- package/dist/switch/control.svelte.d.ts +22 -0
- package/dist/switch/hidden-input.svelte +10 -0
- package/dist/switch/hidden-input.svelte.d.ts +22 -0
- package/dist/switch/index.d.ts +5 -0
- package/dist/switch/index.js +5 -0
- package/dist/switch/label.svelte +12 -0
- package/dist/switch/label.svelte.d.ts +22 -0
- package/dist/switch/root.svelte +46 -0
- package/dist/switch/root.svelte.d.ts +25 -0
- package/dist/switch/thumb.svelte +12 -0
- package/dist/switch/thumb.svelte.d.ts +22 -0
- package/dist/tabs/content.svelte +12 -0
- package/dist/tabs/content.svelte.d.ts +23 -0
- package/dist/tabs/context.svelte.d.ts +8 -0
- package/dist/tabs/context.svelte.js +14 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +4 -0
- package/dist/tabs/list.svelte +12 -0
- package/dist/tabs/list.svelte.d.ts +22 -0
- package/dist/tabs/root.svelte +42 -0
- package/dist/tabs/root.svelte.d.ts +25 -0
- package/dist/tabs/trigger.svelte +12 -0
- package/dist/tabs/trigger.svelte.d.ts +23 -0
- package/dist/tags-input/.gitkeep +0 -0
- package/dist/timer/.gitkeep +0 -0
- package/dist/toast/action-trigger.svelte +12 -0
- package/dist/toast/action-trigger.svelte.d.ts +22 -0
- package/dist/toast/actor.svelte +11 -0
- package/dist/toast/actor.svelte.d.ts +24 -0
- package/dist/toast/close-trigger.svelte +12 -0
- package/dist/toast/close-trigger.svelte.d.ts +22 -0
- package/dist/toast/context.svelte.d.ts +8 -0
- package/dist/toast/context.svelte.js +14 -0
- package/dist/toast/create-toaster.svelte.d.ts +18 -0
- package/dist/toast/create-toaster.svelte.js +12 -0
- package/dist/toast/description.svelte +16 -0
- package/dist/toast/description.svelte.d.ts +22 -0
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +3 -0
- package/dist/toast/root.svelte +16 -0
- package/dist/toast/root.svelte.d.ts +22 -0
- package/dist/toast/title.svelte +16 -0
- package/dist/toast/title.svelte.d.ts +22 -0
- package/dist/toast/toast.d.ts +5 -0
- package/dist/toast/toast.js +5 -0
- package/dist/toast/toaster.svelte +25 -0
- package/dist/toast/toaster.svelte.d.ts +27 -0
- package/dist/toggle-group/context.svelte.d.ts +8 -0
- package/dist/toggle-group/context.svelte.js +14 -0
- package/dist/toggle-group/index.d.ts +2 -0
- package/dist/toggle-group/index.js +2 -0
- package/dist/toggle-group/item.svelte +12 -0
- package/dist/toggle-group/item.svelte.d.ts +23 -0
- package/dist/toggle-group/root.svelte +40 -0
- package/dist/toggle-group/root.svelte.d.ts +25 -0
- package/dist/tooltip/arrow-tip.svelte +12 -0
- package/dist/tooltip/arrow-tip.svelte.d.ts +22 -0
- package/dist/tooltip/arrow.svelte +12 -0
- package/dist/tooltip/arrow.svelte.d.ts +22 -0
- package/dist/tooltip/content.svelte +12 -0
- package/dist/tooltip/content.svelte.d.ts +22 -0
- package/dist/tooltip/context.svelte.d.ts +8 -0
- package/dist/tooltip/context.svelte.js +14 -0
- package/dist/tooltip/index.d.ts +6 -0
- package/dist/tooltip/index.js +6 -0
- package/dist/tooltip/positioner.svelte +12 -0
- package/dist/tooltip/positioner.svelte.d.ts +22 -0
- package/dist/tooltip/root.svelte +10 -0
- package/dist/tooltip/root.svelte.d.ts +24 -0
- package/dist/tooltip/trigger.svelte +12 -0
- package/dist/tooltip/trigger.svelte.d.ts +22 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +1 -0
- package/dist/utils.svelte.d.ts +2 -0
- package/dist/utils.svelte.js +24 -0
- package/package.json +167 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as toast from '@zag-js/toast';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import { type CreateToastContextReturn } from './context.svelte.js';
|
|
4
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
5
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
6
|
+
$$bindings?: Bindings;
|
|
7
|
+
} & Exports;
|
|
8
|
+
(internal: unknown, props: Props & {
|
|
9
|
+
$$events?: Events;
|
|
10
|
+
$$slots?: Slots;
|
|
11
|
+
}): Exports & {
|
|
12
|
+
$set?: any;
|
|
13
|
+
$on?: any;
|
|
14
|
+
};
|
|
15
|
+
z_$$bindings?: Bindings;
|
|
16
|
+
}
|
|
17
|
+
declare const Actor: $$__sveltets_2_IsomorphicComponent<{
|
|
18
|
+
actor: toast.Service;
|
|
19
|
+
children$: Snippet<[CreateToastContextReturn]>;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, "">;
|
|
23
|
+
type Actor = InstanceType<typeof Actor>;
|
|
24
|
+
export default Actor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useToastContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useToastContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getCloseTriggerProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<button type="button" {...attrs}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</button>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
export interface ToastCloseTriggerProps extends Assign<SvelteHTMLElements['button'], {}> {
|
|
3
|
+
}
|
|
4
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const CloseTrigger: $$__sveltets_2_IsomorphicComponent<ToastCloseTriggerProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type CloseTrigger = InstanceType<typeof CloseTrigger>;
|
|
22
|
+
export default CloseTrigger;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as toast from '@zag-js/toast';
|
|
2
|
+
export interface CreateToastContextProps extends toast.Service {
|
|
3
|
+
}
|
|
4
|
+
export interface CreateToastContextReturn extends ReturnType<typeof createToastContext> {
|
|
5
|
+
}
|
|
6
|
+
export declare function createToastContext(props: CreateToastContextProps): any;
|
|
7
|
+
export declare function setToastContext(value: CreateToastContextReturn): void;
|
|
8
|
+
export declare function useToastContext(): CreateToastContextReturn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { normalizeProps, reflect, useActor } from '@zag-js/svelte';
|
|
2
|
+
import * as toast from '@zag-js/toast';
|
|
3
|
+
import { getContext, setContext } from 'svelte';
|
|
4
|
+
export function createToastContext(props) {
|
|
5
|
+
const [state, send] = useActor(props);
|
|
6
|
+
const api = $derived(reflect(() => toast.connect(state, send, normalizeProps)));
|
|
7
|
+
return api;
|
|
8
|
+
}
|
|
9
|
+
export function setToastContext(value) {
|
|
10
|
+
setContext('Toast', value);
|
|
11
|
+
}
|
|
12
|
+
export function useToastContext() {
|
|
13
|
+
return getContext('Toast');
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as toast from '@zag-js/toast';
|
|
2
|
+
export interface CreateToasterProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
dir?: toast.GroupMachineContext['dir'];
|
|
5
|
+
max?: toast.GroupMachineContext['max'];
|
|
6
|
+
gap?: toast.GroupMachineContext['gap'];
|
|
7
|
+
hotkey?: toast.GroupMachineContext['hotkey'];
|
|
8
|
+
offsets?: toast.GroupMachineContext['offsets'];
|
|
9
|
+
overlap?: toast.GroupMachineContext['overlap'];
|
|
10
|
+
duration?: toast.GroupMachineContext['duration'];
|
|
11
|
+
placement?: toast.GroupMachineContext['placement'];
|
|
12
|
+
removeDelay?: toast.GroupMachineContext['removeDelay'];
|
|
13
|
+
pauseOnPageIdle?: toast.GroupMachineContext['pauseOnPageIdle'];
|
|
14
|
+
getRootNode?: toast.GroupMachineContext['getRootNode'];
|
|
15
|
+
}
|
|
16
|
+
export interface CreateToasterReturn extends ReturnType<typeof createToaster> {
|
|
17
|
+
}
|
|
18
|
+
export default function createToaster(props?: CreateToasterProps): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { normalizeProps, reflect } from '@zag-js/svelte';
|
|
2
|
+
import * as toast from '@zag-js/toast';
|
|
3
|
+
import { nanoid } from 'nanoid/non-secure';
|
|
4
|
+
export default function createToaster(props) {
|
|
5
|
+
const id = $derived(props?.id ?? nanoid());
|
|
6
|
+
const machine = $derived(toast.group.machine({ ...props, id }));
|
|
7
|
+
const api = $derived(reflect(() => ({
|
|
8
|
+
machine,
|
|
9
|
+
...toast.group.connect(machine, machine.send, normalizeProps),
|
|
10
|
+
})));
|
|
11
|
+
return api;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useToastContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useToastContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getDescriptionProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
{#if children}
|
|
12
|
+
{@render children?.()}
|
|
13
|
+
{:else}
|
|
14
|
+
{context.description}
|
|
15
|
+
{/if}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
export interface ToastDescriptionProps extends Assign<SvelteHTMLElements['div'], {}> {
|
|
3
|
+
}
|
|
4
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const Description: $$__sveltets_2_IsomorphicComponent<ToastDescriptionProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type Description = InstanceType<typeof Description>;
|
|
22
|
+
export default Description;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as createToaster, type CreateToasterProps, type CreateToasterReturn, } from './create-toaster.svelte.js';
|
|
2
|
+
export * as Toast from './toast.js';
|
|
3
|
+
export type { ToastActionTriggerProps, ToastCloseTriggerProps, ToastDescriptionProps, ToastProps, ToastTitleProps, } from './toast.js';
|
|
4
|
+
export { default as Toaster, type ToasterProps } from './toaster.svelte';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useToastContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useToastContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getRootProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
<div {...context.getGhostBeforeProps()}></div>
|
|
12
|
+
|
|
13
|
+
{@render children?.()}
|
|
14
|
+
|
|
15
|
+
<div {...context.getGhostAfterProps()}></div>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
export interface ToastProps extends Assign<SvelteHTMLElements['div'], {}> {
|
|
3
|
+
}
|
|
4
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<ToastProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type Root = InstanceType<typeof Root>;
|
|
22
|
+
export default Root;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useToastContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useToastContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getTitleProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
{#if children}
|
|
12
|
+
{@render children?.()}
|
|
13
|
+
{:else}
|
|
14
|
+
{context.title}
|
|
15
|
+
{/if}
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
export interface ToastTitleProps extends Assign<SvelteHTMLElements['div'], {}> {
|
|
3
|
+
}
|
|
4
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const Title: $$__sveltets_2_IsomorphicComponent<ToastTitleProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type Title = InstanceType<typeof Title>;
|
|
22
|
+
export default Title;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ActionTrigger, type ToastActionTriggerProps } from './action-trigger.svelte';
|
|
2
|
+
export { default as CloseTrigger, type ToastCloseTriggerProps } from './close-trigger.svelte';
|
|
3
|
+
export { default as Description, type ToastDescriptionProps } from './description.svelte';
|
|
4
|
+
export { default as Root, type ToastProps } from './root.svelte';
|
|
5
|
+
export { default as Title, type ToastTitleProps } from './title.svelte';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ActionTrigger } from './action-trigger.svelte';
|
|
2
|
+
export { default as CloseTrigger } from './close-trigger.svelte';
|
|
3
|
+
export { default as Description } from './description.svelte';
|
|
4
|
+
export { default as Root } from './root.svelte';
|
|
5
|
+
export { default as Title } from './title.svelte';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { Portal } from "../portal/index.js";
|
|
4
|
+
import { mergeProps, normalizeProps, useMachine } from "@zag-js/svelte";
|
|
5
|
+
import * as toast from "@zag-js/toast";
|
|
6
|
+
import ToastActor from "./actor.svelte";
|
|
7
|
+
let { toaster, children, ...props } = $props();
|
|
8
|
+
let [state, send] = useMachine(toaster.machine);
|
|
9
|
+
let placement = $derived(state.context.placement);
|
|
10
|
+
let api = $derived(toast.group.connect(state, send, normalizeProps));
|
|
11
|
+
let toasts = $derived(api.getToastsByPlacement(placement));
|
|
12
|
+
let attrs = $derived(mergeProps(props, api.getGroupProps({ placement })));
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Portal>
|
|
16
|
+
<div {...attrs}>
|
|
17
|
+
{#each toasts as toast (toast.id)}
|
|
18
|
+
<ToastActor actor={toast}>
|
|
19
|
+
{#snippet children$(ctx)}
|
|
20
|
+
{@render children(ctx)}
|
|
21
|
+
{/snippet}
|
|
22
|
+
</ToastActor>
|
|
23
|
+
{/each}
|
|
24
|
+
</div>
|
|
25
|
+
</Portal>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WithoutChildren } from '../types.js';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
4
|
+
import type { CreateToastContextReturn } from './context.svelte.js';
|
|
5
|
+
import type { CreateToasterReturn } from './create-toaster.svelte.js';
|
|
6
|
+
export interface ToasterProps extends WithoutChildren<SvelteHTMLElements['div']> {
|
|
7
|
+
toaster: CreateToasterReturn;
|
|
8
|
+
children: Snippet<[CreateToastContextReturn]>;
|
|
9
|
+
}
|
|
10
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
11
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
12
|
+
$$bindings?: Bindings;
|
|
13
|
+
} & Exports;
|
|
14
|
+
(internal: unknown, props: Props & {
|
|
15
|
+
$$events?: Events;
|
|
16
|
+
$$slots?: Slots;
|
|
17
|
+
}): Exports & {
|
|
18
|
+
$set?: any;
|
|
19
|
+
$on?: any;
|
|
20
|
+
};
|
|
21
|
+
z_$$bindings?: Bindings;
|
|
22
|
+
}
|
|
23
|
+
declare const Toaster: $$__sveltets_2_IsomorphicComponent<ToasterProps, {
|
|
24
|
+
[evt: string]: CustomEvent<any>;
|
|
25
|
+
}, {}, {}, "">;
|
|
26
|
+
type Toaster = InstanceType<typeof Toaster>;
|
|
27
|
+
export default Toaster;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as toggleGroup from '@zag-js/toggle-group';
|
|
2
|
+
export interface CreateToggleGroupContextProps extends toggleGroup.Context {
|
|
3
|
+
}
|
|
4
|
+
export interface CreateToggleGroupContextReturn extends ReturnType<typeof createToggleGroupContext> {
|
|
5
|
+
}
|
|
6
|
+
export declare function createToggleGroupContext(props: CreateToggleGroupContextProps): any;
|
|
7
|
+
export declare function setToggleGroupContext(value: CreateToggleGroupContextReturn): void;
|
|
8
|
+
export declare function useToggleGroupContext(): CreateToggleGroupContextReturn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
|
2
|
+
import * as toggleGroup from '@zag-js/toggle-group';
|
|
3
|
+
import { getContext, setContext } from 'svelte';
|
|
4
|
+
export function createToggleGroupContext(props) {
|
|
5
|
+
const [state, send] = useMachine(toggleGroup.machine(props));
|
|
6
|
+
const api = $derived(reflect(() => toggleGroup.connect(state, send, normalizeProps)));
|
|
7
|
+
return api;
|
|
8
|
+
}
|
|
9
|
+
export function setToggleGroupContext(value) {
|
|
10
|
+
setContext('ToggleGroup', value);
|
|
11
|
+
}
|
|
12
|
+
export function useToggleGroupContext() {
|
|
13
|
+
return getContext('ToggleGroup');
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useToggleGroupContext } from "./context.svelte.js";
|
|
5
|
+
let { value, disabled, children, ...props } = $props();
|
|
6
|
+
let context = useToggleGroupContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getItemProps({ value, disabled })));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<button type="button" {...attrs}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</button>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
export interface ToggleGroupItemProps extends Assign<SvelteHTMLElements['button'], ItemProps> {
|
|
4
|
+
}
|
|
5
|
+
import type { ItemProps } from '@zag-js/toggle-group';
|
|
6
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
7
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
8
|
+
$$bindings?: Bindings;
|
|
9
|
+
} & Exports;
|
|
10
|
+
(internal: unknown, props: Props & {
|
|
11
|
+
$$events?: Events;
|
|
12
|
+
$$slots?: Slots;
|
|
13
|
+
}): Exports & {
|
|
14
|
+
$set?: any;
|
|
15
|
+
$on?: any;
|
|
16
|
+
};
|
|
17
|
+
z_$$bindings?: Bindings;
|
|
18
|
+
}
|
|
19
|
+
declare const Item: $$__sveltets_2_IsomorphicComponent<ToggleGroupItemProps, {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
}, {}, {}, "">;
|
|
22
|
+
type Item = InstanceType<typeof Item>;
|
|
23
|
+
export default Item;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { nanoid } from "nanoid/non-secure";
|
|
5
|
+
import { createToggleGroupContext, setToggleGroupContext } from "./context.svelte.js";
|
|
6
|
+
let {
|
|
7
|
+
id = nanoid(),
|
|
8
|
+
ids,
|
|
9
|
+
dir,
|
|
10
|
+
value,
|
|
11
|
+
disabled,
|
|
12
|
+
multiple,
|
|
13
|
+
loopFocus,
|
|
14
|
+
rovingFocus,
|
|
15
|
+
orientation,
|
|
16
|
+
onValueChange,
|
|
17
|
+
getRootNode,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
} = $props();
|
|
21
|
+
let context = createToggleGroupContext({
|
|
22
|
+
id: nanoid(),
|
|
23
|
+
ids,
|
|
24
|
+
dir,
|
|
25
|
+
value: $state.snapshot(value),
|
|
26
|
+
disabled,
|
|
27
|
+
multiple,
|
|
28
|
+
loopFocus,
|
|
29
|
+
rovingFocus,
|
|
30
|
+
orientation,
|
|
31
|
+
onValueChange,
|
|
32
|
+
getRootNode
|
|
33
|
+
});
|
|
34
|
+
let attrs = $derived(mergeProps(props, context.getRootProps()));
|
|
35
|
+
setToggleGroupContext(context);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div {...attrs}>
|
|
39
|
+
{@render children?.(context)}
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Assign, OptionalId, WithoutChildren } from '../types.js';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
4
|
+
import type { CreateToggleGroupContextProps, CreateToggleGroupContextReturn } from './context.svelte.js';
|
|
5
|
+
export interface ToggleGroupProps extends Assign<WithoutChildren<SvelteHTMLElements['div']>, OptionalId<CreateToggleGroupContextProps>> {
|
|
6
|
+
children?: Snippet<[CreateToggleGroupContextReturn]>;
|
|
7
|
+
}
|
|
8
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
9
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
10
|
+
$$bindings?: Bindings;
|
|
11
|
+
} & Exports;
|
|
12
|
+
(internal: unknown, props: Props & {
|
|
13
|
+
$$events?: Events;
|
|
14
|
+
$$slots?: Slots;
|
|
15
|
+
}): Exports & {
|
|
16
|
+
$set?: any;
|
|
17
|
+
$on?: any;
|
|
18
|
+
};
|
|
19
|
+
z_$$bindings?: Bindings;
|
|
20
|
+
}
|
|
21
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<ToggleGroupProps, {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
}, {}, {}, "">;
|
|
24
|
+
type Root = InstanceType<typeof Root>;
|
|
25
|
+
export default Root;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useTooltipContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useTooltipContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getArrowTipProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
export interface TooltipArrowTipProps extends Assign<SvelteHTMLElements['div'], {}> {
|
|
4
|
+
}
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const ArrowTip: $$__sveltets_2_IsomorphicComponent<TooltipArrowTipProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type ArrowTip = InstanceType<typeof ArrowTip>;
|
|
22
|
+
export default ArrowTip;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useTooltipContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useTooltipContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getArrowProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
export interface TooltipArrowProps extends Assign<SvelteHTMLElements['div'], {}> {
|
|
4
|
+
}
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const Arrow: $$__sveltets_2_IsomorphicComponent<TooltipArrowProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type Arrow = InstanceType<typeof Arrow>;
|
|
22
|
+
export default Arrow;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useTooltipContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useTooltipContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getContentProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Assign } from '../types.js';
|
|
2
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
3
|
+
export interface TooltipContentProps extends Assign<SvelteHTMLElements['div'], {}> {
|
|
4
|
+
}
|
|
5
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
6
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
7
|
+
$$bindings?: Bindings;
|
|
8
|
+
} & Exports;
|
|
9
|
+
(internal: unknown, props: Props & {
|
|
10
|
+
$$events?: Events;
|
|
11
|
+
$$slots?: Slots;
|
|
12
|
+
}): Exports & {
|
|
13
|
+
$set?: any;
|
|
14
|
+
$on?: any;
|
|
15
|
+
};
|
|
16
|
+
z_$$bindings?: Bindings;
|
|
17
|
+
}
|
|
18
|
+
declare const Content: $$__sveltets_2_IsomorphicComponent<TooltipContentProps, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, "">;
|
|
21
|
+
type Content = InstanceType<typeof Content>;
|
|
22
|
+
export default Content;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as tooltip from '@zag-js/tooltip';
|
|
2
|
+
export interface CreateTooltipContextProps extends tooltip.Context {
|
|
3
|
+
}
|
|
4
|
+
export interface CreateTooltipContextReturn extends ReturnType<typeof createTooltipContext> {
|
|
5
|
+
}
|
|
6
|
+
export declare function createTooltipContext(props: CreateTooltipContextProps): any;
|
|
7
|
+
export declare function setTooltipContext(value: CreateTooltipContextReturn): void;
|
|
8
|
+
export declare function useTooltipContext(): CreateTooltipContextReturn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
|
2
|
+
import * as tooltip from '@zag-js/tooltip';
|
|
3
|
+
import { getContext, setContext } from 'svelte';
|
|
4
|
+
export function createTooltipContext(props) {
|
|
5
|
+
const [state, send] = useMachine(tooltip.machine(props));
|
|
6
|
+
const api = $derived(reflect(() => tooltip.connect(state, send, normalizeProps)));
|
|
7
|
+
return api;
|
|
8
|
+
}
|
|
9
|
+
export function setTooltipContext(value) {
|
|
10
|
+
setContext('Tooltip', value);
|
|
11
|
+
}
|
|
12
|
+
export function useTooltipContext() {
|
|
13
|
+
return getContext('Tooltip');
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as ArrowTip, type TooltipArrowTipProps } from './arrow-tip.svelte';
|
|
2
|
+
export { default as Arrow, type TooltipArrowProps } from './arrow.svelte';
|
|
3
|
+
export { default as Content, type TooltipContentProps } from './content.svelte';
|
|
4
|
+
export { default as Positioner, type TooltipPositionerProps } from './positioner.svelte';
|
|
5
|
+
export { default as Root, type TooltipProps } from './root.svelte';
|
|
6
|
+
export { default as Trigger, type TooltipTriggerProps } from './trigger.svelte';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as ArrowTip } from './arrow-tip.svelte';
|
|
2
|
+
export { default as Arrow } from './arrow.svelte';
|
|
3
|
+
export { default as Content } from './content.svelte';
|
|
4
|
+
export { default as Positioner } from './positioner.svelte';
|
|
5
|
+
export { default as Root } from './root.svelte';
|
|
6
|
+
export { default as Trigger } from './trigger.svelte';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts" context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script lang="ts">import { mergeProps } from "@zag-js/svelte";
|
|
4
|
+
import { useTooltipContext } from "./context.svelte.js";
|
|
5
|
+
let { children, ...props } = $props();
|
|
6
|
+
let context = useTooltipContext();
|
|
7
|
+
let attrs = $derived(mergeProps(props, context.getPositionerProps()));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div {...attrs}>
|
|
11
|
+
{@render children?.()}
|
|
12
|
+
</div>
|