ui-ingredients 0.0.27 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +80 -80
- package/dist/accordion/context.svelte.d.ts +1 -1
- package/dist/accordion/context.svelte.js +1 -1
- package/dist/accordion/create-accordion.svelte.js +1 -1
- package/dist/accordion/item-content.svelte +32 -27
- package/dist/accordion/item-indicator.svelte +32 -27
- package/dist/accordion/item-trigger.svelte +32 -27
- package/dist/accordion/item.svelte +43 -37
- package/dist/accordion/root.svelte +50 -56
- package/dist/avatar/context.svelte.d.ts +1 -1
- package/dist/avatar/context.svelte.js +1 -1
- package/dist/avatar/create-avatar.svelte.js +1 -1
- package/dist/avatar/fallback.svelte +26 -26
- package/dist/avatar/image.svelte +24 -24
- package/dist/avatar/root.svelte +41 -37
- package/dist/carousel/context.svelte.d.ts +1 -1
- package/dist/carousel/context.svelte.js +1 -1
- package/dist/carousel/create-carousel.svelte.js +1 -1
- package/dist/carousel/indicator-group.svelte +28 -26
- package/dist/carousel/indicator.svelte +35 -35
- package/dist/carousel/item-group.svelte +26 -26
- package/dist/carousel/item.svelte +38 -30
- package/dist/carousel/next-trigger.svelte +26 -26
- package/dist/carousel/prev-trigger.svelte +26 -26
- package/dist/carousel/root.svelte +51 -56
- package/dist/carousel/viewport.svelte +26 -26
- package/dist/checkbox/context.svelte.d.ts +1 -1
- package/dist/checkbox/context.svelte.js +1 -1
- package/dist/checkbox/control.svelte +26 -26
- package/dist/checkbox/create-checkbox.svelte.js +1 -1
- package/dist/checkbox/hidden-input.svelte +18 -18
- package/dist/checkbox/indicator.svelte +26 -26
- package/dist/checkbox/label.svelte +26 -26
- package/dist/checkbox/root.svelte +53 -60
- package/dist/clipboard/context.svelte.d.ts +1 -1
- package/dist/clipboard/context.svelte.js +1 -1
- package/dist/clipboard/control.svelte +26 -26
- package/dist/clipboard/create-clipboard.svelte.js +1 -1
- package/dist/clipboard/indicator.svelte +35 -28
- package/dist/clipboard/input.svelte +24 -24
- package/dist/clipboard/label.svelte +26 -26
- package/dist/clipboard/root.svelte +47 -49
- package/dist/clipboard/trigger.svelte +26 -26
- package/dist/collapsible/content.svelte +26 -26
- package/dist/collapsible/context.svelte.d.ts +1 -1
- package/dist/collapsible/context.svelte.js +1 -1
- package/dist/collapsible/create-collapsible.svelte.js +2 -2
- package/dist/collapsible/root.svelte +51 -55
- package/dist/collapsible/trigger.svelte +26 -26
- package/dist/color-picker/area-background.svelte +26 -21
- package/dist/color-picker/area-thumb.svelte +26 -21
- package/dist/color-picker/area.svelte +33 -27
- package/dist/color-picker/channel-input.svelte +28 -28
- package/dist/color-picker/channel-slider-label.svelte +36 -25
- package/dist/color-picker/channel-slider-thumb.svelte +30 -23
- package/dist/color-picker/channel-slider-track.svelte +30 -23
- package/dist/color-picker/channel-slider-value-text.svelte +36 -29
- package/dist/color-picker/channel-slider.svelte +40 -29
- package/dist/color-picker/content.svelte +20 -20
- package/dist/color-picker/context.svelte.d.ts +1 -1
- package/dist/color-picker/context.svelte.js +1 -1
- package/dist/color-picker/control.svelte +20 -20
- package/dist/color-picker/create-color-picker.svelte.js +2 -2
- package/dist/color-picker/eye-dropper-trigger.svelte +23 -20
- package/dist/color-picker/format-select.svelte +30 -28
- package/dist/color-picker/format-trigger.svelte +22 -20
- package/dist/color-picker/hidden-input.svelte +20 -18
- package/dist/color-picker/label.svelte +20 -20
- package/dist/color-picker/positioner.svelte +22 -20
- package/dist/color-picker/root.svelte +75 -75
- package/dist/color-picker/swatch-group.svelte +22 -20
- package/dist/color-picker/swatch-indicator.svelte +26 -21
- package/dist/color-picker/swatch-trigger.svelte +34 -31
- package/dist/color-picker/swatch.svelte +34 -27
- package/dist/color-picker/transparency-grid.svelte +29 -29
- package/dist/color-picker/trigger.svelte +20 -20
- package/dist/color-picker/value-text.svelte +26 -24
- package/dist/combobox/clear-trigger.svelte +28 -26
- package/dist/combobox/content.svelte +26 -26
- package/dist/combobox/context.svelte.d.ts +1 -1
- package/dist/combobox/context.svelte.js +1 -1
- package/dist/combobox/control.svelte +26 -26
- package/dist/combobox/create-combobox.svelte.js +5 -5
- package/dist/combobox/input.svelte +24 -24
- package/dist/combobox/item-group-label.svelte +37 -34
- package/dist/combobox/item-group.svelte +40 -36
- package/dist/combobox/item-indicator.svelte +29 -27
- package/dist/combobox/item-text.svelte +33 -31
- package/dist/combobox/item.svelte +40 -36
- package/dist/combobox/label.svelte +26 -26
- package/dist/combobox/list.svelte +26 -26
- package/dist/combobox/positioner.svelte +26 -26
- package/dist/combobox/root.svelte +83 -120
- package/dist/combobox/trigger.svelte +26 -26
- package/dist/context.svelte.d.ts +8 -0
- package/dist/{utils.svelte.js → context.svelte.js} +1 -17
- package/dist/create-unique-id.d.ts +1 -0
- package/dist/create-unique-id.js +4 -0
- package/dist/date-picker/clear-trigger.svelte +28 -26
- package/dist/date-picker/content.svelte +26 -26
- package/dist/date-picker/context.svelte.d.ts +1 -1
- package/dist/date-picker/context.svelte.js +1 -1
- package/dist/date-picker/control.svelte +26 -26
- package/dist/date-picker/create-date-picker.svelte.d.ts +2 -2
- package/dist/date-picker/create-date-picker.svelte.js +7 -3
- package/dist/date-picker/day-table-cell-trigger.svelte +34 -27
- package/dist/date-picker/day-table-cell.svelte +48 -39
- package/dist/date-picker/input.svelte +28 -25
- package/dist/date-picker/label.svelte +30 -27
- package/dist/date-picker/month-select.svelte +49 -47
- package/dist/date-picker/month-table-cell-trigger.svelte +34 -27
- package/dist/date-picker/month-table-cell.svelte +46 -39
- package/dist/date-picker/next-trigger.svelte +32 -27
- package/dist/date-picker/positioner.svelte +28 -26
- package/dist/date-picker/preset-trigger.svelte +31 -28
- package/dist/date-picker/prev-trigger.svelte +32 -27
- package/dist/date-picker/range-text.svelte +30 -30
- package/dist/date-picker/root.svelte +70 -94
- package/dist/date-picker/table-body.svelte +32 -27
- package/dist/date-picker/table-head.svelte +32 -27
- package/dist/date-picker/table-header.svelte +32 -27
- package/dist/date-picker/table-row.svelte +32 -27
- package/dist/date-picker/table.svelte +39 -36
- package/dist/date-picker/trigger.svelte +26 -26
- package/dist/date-picker/view-control.svelte +32 -27
- package/dist/date-picker/view-trigger.svelte +32 -27
- package/dist/date-picker/view.svelte +42 -36
- package/dist/date-picker/year-select.svelte +49 -47
- package/dist/date-picker/year-table-cell-trigger.svelte +34 -27
- package/dist/date-picker/year-table-cell.svelte +46 -39
- package/dist/dialog/backdrop.svelte +26 -26
- package/dist/dialog/close-trigger.svelte +26 -26
- package/dist/dialog/content.svelte +26 -26
- package/dist/dialog/context.svelte.d.ts +1 -1
- package/dist/dialog/context.svelte.js +1 -1
- package/dist/dialog/create-dialog.svelte.js +2 -2
- package/dist/dialog/description.svelte +26 -26
- package/dist/dialog/positioner.svelte +27 -27
- package/dist/dialog/root.svelte +24 -21
- package/dist/dialog/title.svelte +26 -26
- package/dist/dialog/trigger.svelte +26 -26
- package/dist/editable/area.svelte +26 -26
- package/dist/editable/cancel-trigger.svelte +28 -26
- package/dist/editable/context.svelte.d.ts +1 -1
- package/dist/editable/context.svelte.js +1 -1
- package/dist/editable/control.svelte +26 -26
- package/dist/editable/create-editable.svelte.js +2 -2
- package/dist/editable/edit-trigger.svelte +26 -26
- package/dist/editable/input.svelte +24 -24
- package/dist/editable/label.svelte +26 -26
- package/dist/editable/preview.svelte +30 -30
- package/dist/editable/root.svelte +68 -90
- package/dist/editable/submit-trigger.svelte +28 -26
- package/dist/environment-provider/context.svelte.d.ts +1 -1
- package/dist/environment-provider/context.svelte.js +1 -1
- package/dist/environment-provider/index.d.ts +1 -1
- package/dist/environment-provider/index.js +1 -1
- package/dist/environment-provider/root.svelte +44 -40
- package/dist/file-upload/context.svelte.d.ts +1 -1
- package/dist/file-upload/context.svelte.js +1 -1
- package/dist/file-upload/create-file-upload.svelte.js +1 -1
- package/dist/file-upload/dropzone.svelte +26 -26
- package/dist/file-upload/hidden-input.svelte +20 -18
- package/dist/file-upload/item-delete-trigger.svelte +34 -27
- package/dist/file-upload/item-group.svelte +26 -26
- package/dist/file-upload/item-name.svelte +36 -31
- package/dist/file-upload/item-preview-image.svelte +38 -33
- package/dist/file-upload/item-preview.svelte +32 -27
- package/dist/file-upload/item-size-text.svelte +36 -31
- package/dist/file-upload/item.svelte +40 -32
- package/dist/file-upload/label.svelte +26 -26
- package/dist/file-upload/root.svelte +60 -74
- package/dist/file-upload/trigger.svelte +26 -26
- package/dist/hover-card/arrow-tip.svelte +26 -26
- package/dist/hover-card/arrow.svelte +26 -26
- package/dist/hover-card/content.svelte +26 -26
- package/dist/hover-card/context.svelte.d.ts +1 -1
- package/dist/hover-card/context.svelte.js +1 -1
- package/dist/hover-card/create-hover-card.svelte.js +2 -2
- package/dist/hover-card/positioner.svelte +26 -26
- package/dist/hover-card/root.svelte +24 -21
- package/dist/hover-card/trigger.svelte +26 -26
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/locale-provider/context.svelte.d.ts +1 -1
- package/dist/locale-provider/context.svelte.js +1 -1
- package/dist/locale-provider/index.d.ts +1 -1
- package/dist/locale-provider/index.js +1 -1
- package/dist/locale-provider/root.svelte +24 -24
- package/dist/menu/arrow-tip.svelte +26 -26
- package/dist/menu/arrow.svelte +26 -26
- package/dist/menu/content.svelte +26 -26
- package/dist/menu/context-trigger.svelte +26 -26
- package/dist/menu/context.svelte.d.ts +1 -1
- package/dist/menu/context.svelte.js +1 -1
- package/dist/menu/create-menu.svelte.js +2 -2
- package/dist/menu/indicator.svelte +26 -26
- package/dist/menu/item-group-label.svelte +35 -34
- package/dist/menu/item-group.svelte +37 -35
- package/dist/menu/item.svelte +43 -37
- package/dist/menu/option-item-indicator.svelte +30 -27
- package/dist/menu/option-item-text.svelte +34 -31
- package/dist/menu/option-item.svelte +49 -53
- package/dist/menu/positioner.svelte +26 -26
- package/dist/menu/root.svelte +24 -21
- package/dist/menu/separator.svelte +26 -26
- package/dist/menu/trigger-item.svelte +26 -26
- package/dist/menu/trigger.svelte +26 -26
- package/dist/merge-props.d.ts +2 -0
- package/dist/merge-props.js +18 -0
- package/dist/number-input/context.svelte.d.ts +1 -1
- package/dist/number-input/context.svelte.js +1 -1
- package/dist/number-input/control.svelte +26 -26
- package/dist/number-input/create-number-input.svelte.js +1 -1
- package/dist/number-input/decrement-trigger.svelte +30 -26
- package/dist/number-input/increment-trigger.svelte +30 -26
- package/dist/number-input/input.svelte +24 -24
- package/dist/number-input/label.svelte +26 -26
- package/dist/number-input/root.svelte +69 -91
- package/dist/number-input/scrubber.svelte +26 -26
- package/dist/pagination/context.svelte.d.ts +1 -1
- package/dist/pagination/context.svelte.js +1 -1
- package/dist/pagination/create-pagination.svelte.js +1 -1
- package/dist/pagination/ellipsis.svelte +30 -27
- package/dist/pagination/item.svelte +36 -36
- package/dist/pagination/next-trigger.svelte +28 -26
- package/dist/pagination/prev-trigger.svelte +28 -26
- package/dist/pagination/root.svelte +52 -58
- package/dist/pin-input/clear-trigger.svelte +34 -29
- package/dist/pin-input/context.svelte.d.ts +1 -1
- package/dist/pin-input/context.svelte.js +1 -1
- package/dist/pin-input/create-pin-input.svelte.d.ts +2 -2
- package/dist/pin-input/create-pin-input.svelte.js +1 -1
- package/dist/pin-input/hidden-input.svelte +18 -18
- package/dist/pin-input/input.svelte +28 -25
- package/dist/pin-input/label.svelte +26 -26
- package/dist/pin-input/root.svelte +63 -80
- package/dist/popover/arrow-tip.svelte +26 -26
- package/dist/popover/arrow.svelte +26 -26
- package/dist/popover/close-trigger.svelte +26 -26
- package/dist/popover/content.svelte +26 -26
- package/dist/popover/context.svelte.d.ts +1 -1
- package/dist/popover/context.svelte.js +1 -1
- package/dist/popover/create-popover.svelte.js +2 -2
- package/dist/popover/description.svelte +26 -26
- package/dist/popover/positioner.svelte +26 -26
- package/dist/popover/root.svelte +24 -21
- package/dist/popover/title.svelte +26 -26
- package/dist/popover/trigger.svelte +26 -26
- package/dist/portal/root.svelte +28 -28
- package/dist/presence/context.svelte.d.ts +1 -1
- package/dist/presence/context.svelte.js +1 -1
- package/dist/presence/root.svelte +29 -32
- package/dist/presence/root.svelte.d.ts +1 -1
- package/dist/progress/circle-range.svelte +26 -26
- package/dist/progress/circle-track.svelte +26 -26
- package/dist/progress/circle.svelte +26 -26
- package/dist/progress/context.svelte.d.ts +1 -1
- package/dist/progress/context.svelte.js +1 -1
- package/dist/progress/create-progress.svelte.js +1 -1
- package/dist/progress/label.svelte +26 -26
- package/dist/progress/range.svelte +26 -26
- package/dist/progress/root.svelte +49 -53
- package/dist/progress/track.svelte +26 -26
- package/dist/progress/value-text.svelte +30 -30
- package/dist/progress/view.svelte +28 -27
- package/dist/qr-code/context.svelte.d.ts +1 -1
- package/dist/qr-code/context.svelte.js +1 -1
- package/dist/qr-code/create-qr-code.svelte.js +1 -1
- package/dist/qr-code/frame.svelte +26 -26
- package/dist/qr-code/overlay.svelte +26 -26
- package/dist/qr-code/pattern.svelte +26 -26
- package/dist/qr-code/root.svelte +43 -47
- package/dist/radio-group/context.svelte.d.ts +1 -1
- package/dist/radio-group/context.svelte.js +1 -1
- package/dist/radio-group/create-radio-group.svelte.js +1 -1
- package/dist/radio-group/indicator.svelte +26 -26
- package/dist/radio-group/item-control.svelte +32 -27
- package/dist/radio-group/item-hidden-input.svelte +24 -19
- package/dist/radio-group/item-text.svelte +32 -27
- package/dist/radio-group/item.svelte +43 -38
- package/dist/radio-group/label.svelte +26 -26
- package/dist/radio-group/root.svelte +51 -56
- package/dist/rating-group/context.svelte.d.ts +1 -1
- package/dist/rating-group/context.svelte.js +1 -1
- package/dist/rating-group/control.svelte +26 -26
- package/dist/rating-group/create-rating-group.svelte.js +1 -1
- package/dist/rating-group/hidden-input.svelte +20 -18
- package/dist/rating-group/item.svelte +33 -31
- package/dist/rating-group/label.svelte +26 -26
- package/dist/rating-group/root.svelte +58 -69
- package/dist/segment-group/context.svelte.d.ts +1 -1
- package/dist/segment-group/context.svelte.js +1 -1
- package/dist/segment-group/create-segment-group.svelte.js +1 -1
- package/dist/segment-group/indicator.svelte +29 -27
- package/dist/segment-group/item-control.svelte +37 -30
- package/dist/segment-group/item-hidden-input.svelte +25 -19
- package/dist/segment-group/item-text.svelte +37 -30
- package/dist/segment-group/item.svelte +48 -47
- package/dist/segment-group/label.svelte +29 -27
- package/dist/segment-group/root.svelte +57 -60
- package/dist/select/clear-trigger.svelte +26 -26
- package/dist/select/content.svelte +26 -26
- package/dist/select/context.svelte.d.ts +1 -1
- package/dist/select/context.svelte.js +1 -1
- package/dist/select/control.svelte +26 -26
- package/dist/select/create-select.svelte.js +5 -5
- package/dist/select/hidden-select.svelte +20 -20
- package/dist/select/indicator.svelte +26 -26
- package/dist/select/item-group-label.svelte +35 -29
- package/dist/select/item-group.svelte +40 -36
- package/dist/select/item-indicator.svelte +29 -27
- package/dist/select/item-text.svelte +33 -31
- package/dist/select/item.svelte +40 -36
- package/dist/select/label.svelte +26 -26
- package/dist/select/list.svelte +26 -26
- package/dist/select/positioner.svelte +26 -26
- package/dist/select/root.svelte +70 -94
- package/dist/select/trigger.svelte +26 -26
- package/dist/select/value-text.svelte +33 -32
- package/dist/signature-pad/clear-trigger.svelte +28 -26
- package/dist/signature-pad/context.svelte.d.ts +1 -1
- package/dist/signature-pad/context.svelte.js +1 -1
- package/dist/signature-pad/control.svelte +26 -26
- package/dist/signature-pad/create-signature-pad.svelte.js +1 -1
- package/dist/signature-pad/current-segment-path.svelte +37 -35
- package/dist/signature-pad/guide.svelte +26 -26
- package/dist/signature-pad/hidden-input.svelte +22 -20
- package/dist/signature-pad/label.svelte +26 -26
- package/dist/signature-pad/root.svelte +57 -61
- package/dist/signature-pad/segment-path.svelte +31 -28
- package/dist/signature-pad/segment.svelte +26 -26
- package/dist/slider/context.svelte.d.ts +1 -1
- package/dist/slider/context.svelte.js +1 -1
- package/dist/slider/control.svelte +26 -26
- package/dist/slider/create-slider.svelte.js +1 -1
- package/dist/slider/hidden-input.svelte +21 -19
- package/dist/slider/label.svelte +26 -26
- package/dist/slider/marker-group.svelte +26 -26
- package/dist/slider/marker.svelte +35 -34
- package/dist/slider/range.svelte +26 -26
- package/dist/slider/root.svelte +64 -82
- package/dist/slider/thumb.svelte +37 -33
- package/dist/slider/track.svelte +26 -26
- package/dist/slider/value-text.svelte +30 -30
- package/dist/splitter/context.svelte.d.ts +1 -1
- package/dist/splitter/context.svelte.js +1 -1
- package/dist/splitter/create-splitter.svelte.js +1 -1
- package/dist/splitter/panel.svelte +35 -35
- package/dist/splitter/resize-trigger.svelte +48 -46
- package/dist/splitter/root.svelte +48 -50
- package/dist/steps/completed-content.svelte +33 -33
- package/dist/steps/content.svelte +28 -27
- package/dist/steps/context.svelte.d.ts +1 -1
- package/dist/steps/context.svelte.js +1 -1
- package/dist/steps/create-steps.svelte.js +1 -1
- package/dist/steps/indicator.svelte +30 -27
- package/dist/steps/item.svelte +41 -35
- package/dist/steps/list.svelte +26 -26
- package/dist/steps/next-trigger.svelte +26 -26
- package/dist/steps/prev-trigger.svelte +26 -26
- package/dist/steps/progress.svelte +26 -26
- package/dist/steps/root.svelte +50 -53
- package/dist/steps/separator.svelte +29 -27
- package/dist/steps/trigger.svelte +29 -27
- package/dist/switch/context.svelte.d.ts +1 -1
- package/dist/switch/context.svelte.js +1 -1
- package/dist/switch/control.svelte +26 -26
- package/dist/switch/create-switch.svelte.js +1 -1
- package/dist/switch/hidden-input.svelte +18 -18
- package/dist/switch/label.svelte +26 -26
- package/dist/switch/root.svelte +54 -62
- package/dist/switch/thumb.svelte +26 -26
- package/dist/tabs/content.svelte +35 -27
- package/dist/tabs/context.svelte.d.ts +1 -1
- package/dist/tabs/context.svelte.js +1 -1
- package/dist/tabs/create-tabs.svelte.js +1 -1
- package/dist/tabs/list.svelte +26 -26
- package/dist/tabs/root.svelte +52 -57
- package/dist/tabs/trigger.svelte +35 -35
- package/dist/tags-input/clear-trigger.svelte +28 -26
- package/dist/tags-input/context.svelte.d.ts +1 -1
- package/dist/tags-input/context.svelte.js +1 -1
- package/dist/tags-input/control.svelte +26 -26
- package/dist/tags-input/create-tags-input.svelte.d.ts +1 -1
- package/dist/tags-input/create-tags-input.svelte.js +2 -2
- package/dist/tags-input/hidden-input.svelte +20 -18
- package/dist/tags-input/input.svelte +24 -24
- package/dist/tags-input/item-delete-trigger.svelte +32 -27
- package/dist/tags-input/item-input.svelte +30 -25
- package/dist/tags-input/item-preview.svelte +32 -27
- package/dist/tags-input/item-text.svelte +32 -27
- package/dist/tags-input/item.svelte +44 -38
- package/dist/tags-input/label.svelte +26 -26
- package/dist/tags-input/root.svelte +69 -92
- package/dist/time-picker/clear-trigger.svelte +28 -26
- package/dist/time-picker/column.svelte +30 -27
- package/dist/time-picker/content.svelte +26 -26
- package/dist/time-picker/context.svelte.d.ts +1 -1
- package/dist/time-picker/context.svelte.js +1 -1
- package/dist/time-picker/control.svelte +26 -26
- package/dist/time-picker/create-time-picker.svelte.js +2 -2
- package/dist/time-picker/hour-cell.svelte +30 -27
- package/dist/time-picker/input.svelte +24 -24
- package/dist/time-picker/label.svelte +26 -26
- package/dist/time-picker/minute-cell.svelte +31 -27
- package/dist/time-picker/period-cell.svelte +36 -34
- package/dist/time-picker/positioner.svelte +28 -26
- package/dist/time-picker/root.svelte +61 -76
- package/dist/time-picker/second-cell.svelte +31 -27
- package/dist/time-picker/spacer.svelte +26 -26
- package/dist/time-picker/trigger.svelte +26 -26
- package/dist/timer/action-trigger.svelte +30 -27
- package/dist/timer/context.svelte.d.ts +1 -1
- package/dist/timer/context.svelte.js +1 -1
- package/dist/timer/create-timer.svelte.js +1 -1
- package/dist/timer/item-label.svelte +29 -27
- package/dist/timer/item-value.svelte +33 -31
- package/dist/timer/item.svelte +36 -32
- package/dist/timer/root.svelte +50 -53
- package/dist/timer/separator.svelte +26 -26
- package/dist/toast/action-trigger.svelte +28 -26
- package/dist/toast/close-trigger.svelte +26 -26
- package/dist/toast/context.svelte.d.ts +1 -1
- package/dist/toast/context.svelte.js +1 -1
- package/dist/toast/create-toaster.svelte.js +1 -1
- package/dist/toast/description.svelte +30 -30
- package/dist/toast/ghost-after.svelte +19 -18
- package/dist/toast/ghost-before.svelte +19 -18
- package/dist/toast/root.svelte +31 -30
- package/dist/toast/title.svelte +30 -30
- package/dist/toast/toaster.svelte +40 -40
- package/dist/toggle-group/context.svelte.d.ts +1 -1
- package/dist/toggle-group/context.svelte.js +1 -1
- package/dist/toggle-group/create-toggle-group.svelte.js +1 -1
- package/dist/toggle-group/item.svelte +39 -35
- package/dist/toggle-group/root.svelte +53 -59
- package/dist/tooltip/arrow-tip.svelte +26 -26
- package/dist/tooltip/arrow.svelte +26 -26
- package/dist/tooltip/content.svelte +26 -26
- package/dist/tooltip/context.svelte.d.ts +1 -1
- package/dist/tooltip/context.svelte.js +1 -1
- package/dist/tooltip/create-tooltip.svelte.js +2 -2
- package/dist/tooltip/positioner.svelte +26 -26
- package/dist/tooltip/root.svelte +24 -21
- package/dist/tooltip/trigger.svelte +26 -26
- package/dist/tree-view/branch-content.svelte +33 -27
- package/dist/tree-view/branch-control.svelte +33 -27
- package/dist/tree-view/branch-indicator.svelte +33 -27
- package/dist/tree-view/branch-text.svelte +33 -27
- package/dist/tree-view/branch-trigger.svelte +33 -27
- package/dist/tree-view/branch.svelte +44 -38
- package/dist/tree-view/context.svelte.d.ts +1 -1
- package/dist/tree-view/context.svelte.js +1 -1
- package/dist/tree-view/create-tree-view.svelte.js +1 -1
- package/dist/tree-view/item-indicator.svelte +30 -27
- package/dist/tree-view/item-text.svelte +30 -27
- package/dist/tree-view/item.svelte +41 -37
- package/dist/tree-view/label.svelte +26 -26
- package/dist/tree-view/root.svelte +53 -60
- package/dist/tree-view/tree.svelte +26 -26
- package/dist/types.d.ts +5 -9
- package/package.json +2 -1
- package/dist/utils.svelte.d.ts +0 -10
@@ -1,26 +1,26 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface MenuTriggerItemIndicatorProps extends
|
5
|
-
asChild?: AsChild
|
6
|
-
}
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<script lang="ts">
|
10
|
-
import {mergeProps} from '../
|
11
|
-
import {menuContext} from './context.svelte.js';
|
12
|
-
|
13
|
-
let {asChild, children, ...props}: MenuTriggerItemIndicatorProps = $props();
|
14
|
-
|
15
|
-
let menu = menuContext.get();
|
16
|
-
|
17
|
-
let
|
18
|
-
</script>
|
19
|
-
|
20
|
-
{#if asChild}
|
21
|
-
{@render asChild(
|
22
|
-
{:else}
|
23
|
-
<button type="button" {...
|
24
|
-
{@render children?.()}
|
25
|
-
</button>
|
26
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuTriggerItemIndicatorProps extends HTMLProps<'button'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '../merge-props.js';
|
11
|
+
import {menuContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, children, ...props}: MenuTriggerItemIndicatorProps = $props();
|
14
|
+
|
15
|
+
let menu = menuContext.get();
|
16
|
+
|
17
|
+
let mergedProps = $derived(mergeProps(props, menu.getTriggerItemProps(menu)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(mergedProps)}
|
22
|
+
{:else}
|
23
|
+
<button type="button" {...mergedProps}>
|
24
|
+
{@render children?.()}
|
25
|
+
</button>
|
26
|
+
{/if}
|
package/dist/menu/trigger.svelte
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface MenuTriggerProps extends
|
5
|
-
asChild?: AsChild;
|
6
|
-
}
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<script lang="ts">
|
10
|
-
import {mergeProps} from '../
|
11
|
-
import {menuContext} from './context.svelte.js';
|
12
|
-
|
13
|
-
let {asChild, children, ...props}: MenuTriggerProps = $props();
|
14
|
-
|
15
|
-
let menu = menuContext.get();
|
16
|
-
|
17
|
-
let
|
18
|
-
</script>
|
19
|
-
|
20
|
-
{#if asChild}
|
21
|
-
{@render asChild(
|
22
|
-
{:else}
|
23
|
-
<button type="button" {...
|
24
|
-
{@render children?.()}
|
25
|
-
</button>
|
26
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuTriggerProps extends HTMLProps<'button'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '../merge-props.js';
|
11
|
+
import {menuContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, children, ...props}: MenuTriggerProps = $props();
|
14
|
+
|
15
|
+
let menu = menuContext.get();
|
16
|
+
|
17
|
+
let mergedProps = $derived(mergeProps(props, menu.getTriggerProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(mergedProps)}
|
22
|
+
{:else}
|
23
|
+
<button type="button" {...mergedProps}>
|
24
|
+
{@render children?.()}
|
25
|
+
</button>
|
26
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { mergeProps as fn } from '@zag-js/svelte';
|
2
|
+
function isObject(value) {
|
3
|
+
return (Object.prototype.toString.call(value) === '[object Object]' &&
|
4
|
+
value === Object(value));
|
5
|
+
}
|
6
|
+
export function mergeProps(...args) {
|
7
|
+
const r = fn(...args);
|
8
|
+
const i = 'style';
|
9
|
+
if (r[i] && isObject(r[i])) {
|
10
|
+
let s = '';
|
11
|
+
for (const k in r[i]) {
|
12
|
+
const v = r[i][k];
|
13
|
+
s += `${k}:${v};`;
|
14
|
+
}
|
15
|
+
r[i] = s;
|
16
|
+
}
|
17
|
+
return r;
|
18
|
+
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Context } from '../
|
1
|
+
import { Context } from '../context.svelte.js';
|
2
2
|
export const numberInputContext = new Context('NumberInput');
|
@@ -1,26 +1,26 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface NumberInputControlTriggerProps extends
|
5
|
-
asChild?: AsChild;
|
6
|
-
}
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<script lang="ts">
|
10
|
-
import {mergeProps} from '../
|
11
|
-
import {numberInputContext} from './context.svelte.js';
|
12
|
-
|
13
|
-
let {asChild, children, ...props}: NumberInputControlTriggerProps = $props();
|
14
|
-
|
15
|
-
let numberInput = numberInputContext.get();
|
16
|
-
|
17
|
-
let
|
18
|
-
</script>
|
19
|
-
|
20
|
-
{#if asChild}
|
21
|
-
{@render asChild(
|
22
|
-
{:else}
|
23
|
-
<div {...
|
24
|
-
{@render children?.()}
|
25
|
-
</div>
|
26
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface NumberInputControlTriggerProps extends HTMLProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '../merge-props.js';
|
11
|
+
import {numberInputContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, children, ...props}: NumberInputControlTriggerProps = $props();
|
14
|
+
|
15
|
+
let numberInput = numberInputContext.get();
|
16
|
+
|
17
|
+
let mergedProps = $derived(mergeProps(props, numberInput.getControlProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(mergedProps)}
|
22
|
+
{:else}
|
23
|
+
<div {...mergedProps}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { createUniqueId } from '../create-unique-id.js';
|
1
2
|
import { getEnvironmentContext } from '../environment-provider/context.svelte.js';
|
2
3
|
import { getLocaleContext } from '../locale-provider/context.svelte.js';
|
3
|
-
import { createUniqueId } from '../utils.svelte.js';
|
4
4
|
import * as numberInput from '@zag-js/number-input';
|
5
5
|
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
6
6
|
export function createNumberInput(props) {
|
@@ -1,26 +1,30 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface NumberInputDecrementTriggerProps
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
import {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
let
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
{
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface NumberInputDecrementTriggerProps
|
5
|
+
extends HTMLProps<'button'> {
|
6
|
+
asChild?: AsChild;
|
7
|
+
}
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<script lang="ts">
|
11
|
+
import {mergeProps} from '../merge-props.js';
|
12
|
+
import {numberInputContext} from './context.svelte.js';
|
13
|
+
|
14
|
+
let {asChild, children, ...props}: NumberInputDecrementTriggerProps =
|
15
|
+
$props();
|
16
|
+
|
17
|
+
let numberInput = numberInputContext.get();
|
18
|
+
|
19
|
+
let mergedProps = $derived(
|
20
|
+
mergeProps(props, numberInput.getDecrementTriggerProps()),
|
21
|
+
);
|
22
|
+
</script>
|
23
|
+
|
24
|
+
{#if asChild}
|
25
|
+
{@render asChild(mergedProps)}
|
26
|
+
{:else}
|
27
|
+
<button type="button" {...mergedProps}>
|
28
|
+
{@render children?.()}
|
29
|
+
</button>
|
30
|
+
{/if}
|
@@ -1,26 +1,30 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface NumberInputIncrementTriggerProps
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
import {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
let
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
{
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface NumberInputIncrementTriggerProps
|
5
|
+
extends HTMLProps<'button'> {
|
6
|
+
asChild?: AsChild;
|
7
|
+
}
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<script lang="ts">
|
11
|
+
import {mergeProps} from '../merge-props.js';
|
12
|
+
import {numberInputContext} from './context.svelte.js';
|
13
|
+
|
14
|
+
let {asChild, children, ...props}: NumberInputIncrementTriggerProps =
|
15
|
+
$props();
|
16
|
+
|
17
|
+
let numberInput = numberInputContext.get();
|
18
|
+
|
19
|
+
let mergedProps = $derived(
|
20
|
+
mergeProps(props, numberInput.getIncrementTriggerProps()),
|
21
|
+
);
|
22
|
+
</script>
|
23
|
+
|
24
|
+
{#if asChild}
|
25
|
+
{@render asChild(mergedProps)}
|
26
|
+
{:else}
|
27
|
+
<button type="button" {...mergedProps}>
|
28
|
+
{@render children?.()}
|
29
|
+
</button>
|
30
|
+
{/if}
|
@@ -1,24 +1,24 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface NumberInputInputProps extends
|
5
|
-
asChild?: AsChild
|
6
|
-
}
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<script lang="ts">
|
10
|
-
import {mergeProps} from '../
|
11
|
-
import {numberInputContext} from './context.svelte.js';
|
12
|
-
|
13
|
-
let {asChild, ...props}: NumberInputInputProps = $props();
|
14
|
-
|
15
|
-
let numberInput = numberInputContext.get();
|
16
|
-
|
17
|
-
let
|
18
|
-
</script>
|
19
|
-
|
20
|
-
{#if asChild}
|
21
|
-
{@render asChild(
|
22
|
-
{:else}
|
23
|
-
<input {...
|
24
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface NumberInputInputProps extends HTMLProps<'input'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '../merge-props.js';
|
11
|
+
import {numberInputContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, ...props}: NumberInputInputProps = $props();
|
14
|
+
|
15
|
+
let numberInput = numberInputContext.get();
|
16
|
+
|
17
|
+
let mergedProps = $derived(mergeProps(props, numberInput.getInputProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(mergedProps)}
|
22
|
+
{:else}
|
23
|
+
<input {...mergedProps} />
|
24
|
+
{/if}
|
@@ -1,26 +1,26 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface NumberInputLabelProps extends
|
5
|
-
asChild?: AsChild
|
6
|
-
}
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<script lang="ts">
|
10
|
-
import {mergeProps} from '../
|
11
|
-
import {numberInputContext} from './context.svelte.js';
|
12
|
-
|
13
|
-
let {asChild, children, ...props}: NumberInputLabelProps = $props();
|
14
|
-
|
15
|
-
let numberInput = numberInputContext.get();
|
16
|
-
|
17
|
-
let
|
18
|
-
</script>
|
19
|
-
|
20
|
-
{#if asChild}
|
21
|
-
{@render asChild(
|
22
|
-
{:else}
|
23
|
-
<label {...
|
24
|
-
{@render children?.()}
|
25
|
-
</label>
|
26
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface NumberInputLabelProps extends HTMLProps<'label'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '../merge-props.js';
|
11
|
+
import {numberInputContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, children, ...props}: NumberInputLabelProps = $props();
|
14
|
+
|
15
|
+
let numberInput = numberInputContext.get();
|
16
|
+
|
17
|
+
let mergedProps = $derived(mergeProps(props, numberInput.getLabelProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(mergedProps)}
|
22
|
+
{:else}
|
23
|
+
<label {...mergedProps}>
|
24
|
+
{@render children?.()}
|
25
|
+
</label>
|
26
|
+
{/if}
|
@@ -1,91 +1,69 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild, Assign,
|
3
|
-
import type {Snippet} from 'svelte';
|
4
|
-
import type {
|
5
|
-
CreateNumberInputProps,
|
6
|
-
CreateNumberInputReturn,
|
7
|
-
} from './create-number-input.svelte.js';
|
8
|
-
|
9
|
-
export interface NumberInputProps
|
10
|
-
extends Assign<Omit<
|
11
|
-
asChild?: AsChild<
|
12
|
-
children?: Snippet<[
|
13
|
-
}
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<script lang="ts">
|
17
|
-
import {mergeProps} from '../
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
formatOptions,
|
71
|
-
allowOverflow,
|
72
|
-
allowMouseWheel,
|
73
|
-
clampValueOnBlur,
|
74
|
-
focusInputOnChange,
|
75
|
-
onFocusChange,
|
76
|
-
onValueChange,
|
77
|
-
onValueInvalid,
|
78
|
-
});
|
79
|
-
|
80
|
-
let attrs = $derived(mergeProps(props, numberInput.getRootProps()));
|
81
|
-
|
82
|
-
numberInputContext.set(numberInput);
|
83
|
-
</script>
|
84
|
-
|
85
|
-
{#if asChild}
|
86
|
-
{@render asChild(attrs, numberInput)}
|
87
|
-
{:else}
|
88
|
-
<div {...attrs}>
|
89
|
-
{@render children?.(numberInput)}
|
90
|
-
</div>
|
91
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, Assign, HTMLProps} from '../types.js';
|
3
|
+
import type {Snippet} from 'svelte';
|
4
|
+
import type {
|
5
|
+
CreateNumberInputProps,
|
6
|
+
CreateNumberInputReturn,
|
7
|
+
} from './create-number-input.svelte.js';
|
8
|
+
|
9
|
+
export interface NumberInputProps
|
10
|
+
extends Assign<Omit<HTMLProps<'div'>, 'children'>, CreateNumberInputProps> {
|
11
|
+
asChild?: AsChild<CreateNumberInputReturn>;
|
12
|
+
children?: Snippet<[CreateNumberInputReturn]>;
|
13
|
+
}
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script lang="ts">
|
17
|
+
import {mergeProps} from '../merge-props.js';
|
18
|
+
import {createSplitProps} from '@zag-js/utils';
|
19
|
+
import {numberInputContext} from './context.svelte.js';
|
20
|
+
import {createNumberInput} from './create-number-input.svelte.js';
|
21
|
+
|
22
|
+
let {asChild, children, ...props}: NumberInputProps = $props();
|
23
|
+
|
24
|
+
let [numberInputProps, otherProps] = $derived(
|
25
|
+
createSplitProps<CreateNumberInputProps>([
|
26
|
+
'id',
|
27
|
+
'ids',
|
28
|
+
'max',
|
29
|
+
'min',
|
30
|
+
'step',
|
31
|
+
'name',
|
32
|
+
'form',
|
33
|
+
'value',
|
34
|
+
'locale',
|
35
|
+
'pattern',
|
36
|
+
'invalid',
|
37
|
+
'disabled',
|
38
|
+
'readOnly',
|
39
|
+
'required',
|
40
|
+
'inputMode',
|
41
|
+
'spinOnPress',
|
42
|
+
'translations',
|
43
|
+
'formatOptions',
|
44
|
+
'allowOverflow',
|
45
|
+
'allowMouseWheel',
|
46
|
+
'clampValueOnBlur',
|
47
|
+
'focusInputOnChange',
|
48
|
+
'onFocusChange',
|
49
|
+
'onValueChange',
|
50
|
+
'onValueInvalid',
|
51
|
+
])(props),
|
52
|
+
);
|
53
|
+
|
54
|
+
let numberInput = createNumberInput(numberInputProps);
|
55
|
+
|
56
|
+
let mergedProps = $derived(
|
57
|
+
mergeProps(otherProps, numberInput.getRootProps()),
|
58
|
+
);
|
59
|
+
|
60
|
+
numberInputContext.set(numberInput);
|
61
|
+
</script>
|
62
|
+
|
63
|
+
{#if asChild}
|
64
|
+
{@render asChild(mergedProps, numberInput)}
|
65
|
+
{:else}
|
66
|
+
<div {...mergedProps}>
|
67
|
+
{@render children?.(numberInput)}
|
68
|
+
</div>
|
69
|
+
{/if}
|
@@ -1,26 +1,26 @@
|
|
1
|
-
<script lang="ts" module>
|
2
|
-
import type {AsChild,
|
3
|
-
|
4
|
-
export interface NumberInputScrubberProps extends
|
5
|
-
asChild?: AsChild;
|
6
|
-
}
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<script lang="ts">
|
10
|
-
import {mergeProps} from '../
|
11
|
-
import {numberInputContext} from './context.svelte.js';
|
12
|
-
|
13
|
-
let {asChild, children, ...props}: NumberInputScrubberProps = $props();
|
14
|
-
|
15
|
-
let numberInput = numberInputContext.get();
|
16
|
-
|
17
|
-
let
|
18
|
-
</script>
|
19
|
-
|
20
|
-
{#if asChild}
|
21
|
-
{@render asChild(
|
22
|
-
{:else}
|
23
|
-
<div {...
|
24
|
-
{@render children?.()}
|
25
|
-
</div>
|
26
|
-
{/if}
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {AsChild, HTMLProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface NumberInputScrubberProps extends HTMLProps<'div'> {
|
5
|
+
asChild?: AsChild;
|
6
|
+
}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '../merge-props.js';
|
11
|
+
import {numberInputContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, children, ...props}: NumberInputScrubberProps = $props();
|
14
|
+
|
15
|
+
let numberInput = numberInputContext.get();
|
16
|
+
|
17
|
+
let mergedProps = $derived(mergeProps(props, numberInput.getScrubberProps()));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
{#if asChild}
|
21
|
+
{@render asChild(mergedProps)}
|
22
|
+
{:else}
|
23
|
+
<div {...mergedProps}>
|
24
|
+
{@render children?.()}
|
25
|
+
</div>
|
26
|
+
{/if}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Context } from '../
|
1
|
+
import { Context } from '../context.svelte.js';
|
2
2
|
export const paginationContext = new Context('Pagination');
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { createUniqueId } from '../create-unique-id.js';
|
1
2
|
import { getEnvironmentContext } from '../environment-provider/context.svelte.js';
|
2
3
|
import { getLocaleContext } from '../locale-provider/context.svelte.js';
|
3
|
-
import { createUniqueId } from '../utils.svelte.js';
|
4
4
|
import * as pagination from '@zag-js/pagination';
|
5
5
|
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
6
6
|
export function createPagination(props) {
|