ui-ingredients 0.0.16 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/accordion/context.svelte.d.ts +5 -10
- package/dist/accordion/context.svelte.js +3 -20
- package/dist/accordion/create-accordion.svelte.d.ts +7 -0
- package/dist/accordion/create-accordion.svelte.js +17 -0
- package/dist/accordion/item-content.svelte +7 -13
- package/dist/accordion/item-content.svelte.d.ts +0 -3
- package/dist/accordion/item-indicator.svelte +7 -13
- package/dist/accordion/item-indicator.svelte.d.ts +0 -3
- package/dist/accordion/item-trigger.svelte +7 -13
- package/dist/accordion/item-trigger.svelte.d.ts +0 -3
- package/dist/accordion/item.svelte +12 -27
- package/dist/accordion/item.svelte.d.ts +0 -6
- package/dist/accordion/root.svelte +10 -28
- package/dist/accordion/root.svelte.d.ts +0 -6
- package/dist/avatar/context.svelte.d.ts +3 -8
- package/dist/avatar/context.svelte.js +2 -14
- package/dist/avatar/create-avatar.svelte.d.ts +7 -0
- package/dist/avatar/create-avatar.svelte.js +17 -0
- package/dist/avatar/fallback.svelte +5 -5
- package/dist/avatar/fallback.svelte.d.ts +0 -3
- package/dist/avatar/image.svelte +5 -5
- package/dist/avatar/image.svelte.d.ts +0 -3
- package/dist/avatar/root.svelte +11 -25
- package/dist/avatar/root.svelte.d.ts +0 -6
- package/dist/carousel/context.svelte.d.ts +3 -8
- package/dist/carousel/context.svelte.js +2 -14
- package/dist/carousel/create-carousel.svelte.d.ts +7 -0
- package/dist/carousel/create-carousel.svelte.js +17 -0
- package/dist/carousel/indicator-group.svelte +5 -6
- package/dist/carousel/indicator-group.svelte.d.ts +0 -3
- package/dist/carousel/indicator.svelte +5 -6
- package/dist/carousel/indicator.svelte.d.ts +0 -4
- package/dist/carousel/item-group.svelte +5 -5
- package/dist/carousel/item-group.svelte.d.ts +0 -3
- package/dist/carousel/item.svelte +5 -6
- package/dist/carousel/item.svelte.d.ts +0 -6
- package/dist/carousel/next-trigger.svelte +5 -6
- package/dist/carousel/next-trigger.svelte.d.ts +0 -3
- package/dist/carousel/prev-trigger.svelte +5 -6
- package/dist/carousel/prev-trigger.svelte.d.ts +0 -3
- package/dist/carousel/root.svelte +10 -25
- package/dist/carousel/root.svelte.d.ts +0 -6
- package/dist/carousel/viewport.svelte +5 -5
- package/dist/carousel/viewport.svelte.d.ts +0 -3
- package/dist/checkbox/context.svelte.d.ts +3 -8
- package/dist/checkbox/context.svelte.js +2 -14
- package/dist/checkbox/control.svelte +5 -5
- package/dist/checkbox/control.svelte.d.ts +0 -3
- package/dist/checkbox/create-checkbox.svelte.d.ts +7 -0
- package/dist/checkbox/create-checkbox.svelte.js +17 -0
- package/dist/checkbox/hidden-input.svelte +5 -6
- package/dist/checkbox/hidden-input.svelte.d.ts +0 -3
- package/dist/checkbox/indicator.svelte +5 -5
- package/dist/checkbox/indicator.svelte.d.ts +0 -3
- package/dist/checkbox/label.svelte +5 -5
- package/dist/checkbox/label.svelte.d.ts +0 -3
- package/dist/checkbox/root.svelte +10 -25
- package/dist/checkbox/root.svelte.d.ts +0 -6
- package/dist/clipboard/context.svelte.d.ts +3 -8
- package/dist/clipboard/context.svelte.js +2 -14
- package/dist/clipboard/control.svelte +5 -5
- package/dist/clipboard/control.svelte.d.ts +0 -3
- package/dist/clipboard/create-clipboard.svelte.d.ts +7 -0
- package/dist/clipboard/create-clipboard.svelte.js +14 -0
- package/dist/clipboard/indicator.svelte +5 -5
- package/dist/clipboard/indicator.svelte.d.ts +0 -4
- package/dist/clipboard/input.svelte +5 -5
- package/dist/clipboard/input.svelte.d.ts +0 -3
- package/dist/clipboard/label.svelte +5 -5
- package/dist/clipboard/label.svelte.d.ts +0 -3
- package/dist/clipboard/root.svelte +11 -24
- package/dist/clipboard/root.svelte.d.ts +0 -6
- package/dist/clipboard/trigger.svelte +5 -6
- package/dist/clipboard/trigger.svelte.d.ts +0 -3
- package/dist/collapsible/content.svelte +5 -5
- package/dist/collapsible/content.svelte.d.ts +0 -3
- package/dist/collapsible/context.svelte.d.ts +3 -8
- package/dist/collapsible/context.svelte.js +2 -14
- package/dist/collapsible/create-collapsible.svelte.d.ts +7 -0
- package/dist/collapsible/create-collapsible.svelte.js +18 -0
- package/dist/collapsible/root.svelte +12 -29
- package/dist/collapsible/root.svelte.d.ts +0 -6
- package/dist/collapsible/trigger.svelte +7 -6
- package/dist/collapsible/trigger.svelte.d.ts +0 -3
- package/dist/combobox/clear-trigger.svelte +5 -6
- package/dist/combobox/clear-trigger.svelte.d.ts +0 -3
- package/dist/combobox/content.svelte +5 -5
- package/dist/combobox/content.svelte.d.ts +0 -3
- package/dist/combobox/context.svelte.d.ts +6 -16
- package/dist/combobox/context.svelte.js +4 -38
- package/dist/combobox/control.svelte +5 -5
- package/dist/combobox/control.svelte.d.ts +0 -3
- package/dist/combobox/create-combobox.svelte.d.ts +11 -0
- package/dist/combobox/create-combobox.svelte.js +28 -0
- package/dist/combobox/input.svelte +5 -5
- package/dist/combobox/input.svelte.d.ts +0 -3
- package/dist/combobox/item-group-label.svelte +6 -10
- package/dist/combobox/item-group-label.svelte.d.ts +0 -3
- package/dist/combobox/item-group.svelte +11 -12
- package/dist/combobox/item-group.svelte.d.ts +0 -4
- package/dist/combobox/item-indicator.svelte +7 -13
- package/dist/combobox/item-indicator.svelte.d.ts +0 -3
- package/dist/combobox/item-text.svelte +6 -9
- package/dist/combobox/item-text.svelte.d.ts +0 -3
- package/dist/combobox/item.svelte +12 -28
- package/dist/combobox/item.svelte.d.ts +0 -6
- package/dist/combobox/label.svelte +5 -5
- package/dist/combobox/label.svelte.d.ts +0 -3
- package/dist/combobox/list.svelte +5 -5
- package/dist/combobox/list.svelte.d.ts +0 -3
- package/dist/combobox/positioner.svelte +5 -5
- package/dist/combobox/positioner.svelte.d.ts +0 -3
- package/dist/combobox/root.svelte +10 -27
- package/dist/combobox/root.svelte.d.ts +1 -7
- package/dist/combobox/trigger.svelte +5 -5
- package/dist/combobox/trigger.svelte.d.ts +0 -3
- package/dist/date-picker/clear-trigger.svelte +3 -0
- package/dist/{menu/item-text.svelte.d.ts → date-picker/clear-trigger.svelte.d.ts} +6 -14
- package/dist/date-picker/content.svelte +3 -0
- package/dist/{menu/item-indicator.svelte.d.ts → date-picker/content.svelte.d.ts} +6 -14
- package/dist/date-picker/context.svelte.d.ts +8 -0
- package/dist/date-picker/context.svelte.js +14 -0
- package/dist/date-picker/control.svelte +3 -0
- package/dist/date-picker/control.svelte.d.ts +18 -0
- package/dist/date-picker/date-picker.d.ts +27 -0
- package/dist/date-picker/date-picker.js +27 -0
- package/dist/date-picker/day-table-cell-trigger.svelte +3 -0
- package/dist/date-picker/day-table-cell-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/day-table-cell.svelte +3 -0
- package/dist/date-picker/day-table-cell.svelte.d.ts +18 -0
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/date-picker/index.js +1 -0
- package/dist/date-picker/input.svelte +3 -0
- package/dist/date-picker/input.svelte.d.ts +18 -0
- package/dist/date-picker/label.svelte +3 -0
- package/dist/date-picker/label.svelte.d.ts +18 -0
- package/dist/date-picker/month-select.svelte +3 -0
- package/dist/date-picker/month-select.svelte.d.ts +18 -0
- package/dist/date-picker/month-table-cell-trigger.svelte +3 -0
- package/dist/date-picker/month-table-cell-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/month-table-cell.svelte +3 -0
- package/dist/date-picker/month-table-cell.svelte.d.ts +18 -0
- package/dist/date-picker/next-trigger.svelte +3 -0
- package/dist/date-picker/next-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/positioner.svelte +3 -0
- package/dist/date-picker/positioner.svelte.d.ts +18 -0
- package/dist/date-picker/preset-trigger.svelte +3 -0
- package/dist/date-picker/preset-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/prev-trigger.svelte +3 -0
- package/dist/date-picker/prev-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/range-text.svelte +3 -0
- package/dist/date-picker/range-text.svelte.d.ts +18 -0
- package/dist/date-picker/root.svelte +3 -0
- package/dist/date-picker/root.svelte.d.ts +18 -0
- package/dist/date-picker/table-body.svelte +3 -0
- package/dist/date-picker/table-body.svelte.d.ts +18 -0
- package/dist/date-picker/table-head.svelte +3 -0
- package/dist/date-picker/table-head.svelte.d.ts +18 -0
- package/dist/date-picker/table-header.svelte +3 -0
- package/dist/date-picker/table-header.svelte.d.ts +18 -0
- package/dist/date-picker/table-row.svelte +3 -0
- package/dist/date-picker/table-row.svelte.d.ts +18 -0
- package/dist/date-picker/table.svelte +3 -0
- package/dist/date-picker/table.svelte.d.ts +18 -0
- package/dist/date-picker/trigger.svelte +3 -0
- package/dist/date-picker/trigger.svelte.d.ts +18 -0
- package/dist/date-picker/view-control.svelte +3 -0
- package/dist/date-picker/view-control.svelte.d.ts +18 -0
- package/dist/date-picker/view-trigger.svelte +3 -0
- package/dist/date-picker/view-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/year-select.svelte +3 -0
- package/dist/date-picker/year-select.svelte.d.ts +18 -0
- package/dist/date-picker/year-table-cell-trigger.svelte +3 -0
- package/dist/date-picker/year-table-cell-trigger.svelte.d.ts +18 -0
- package/dist/date-picker/year-table-cell.svelte +3 -0
- package/dist/date-picker/year-table-cell.svelte.d.ts +18 -0
- package/dist/dialog/backdrop.svelte +5 -5
- package/dist/dialog/backdrop.svelte.d.ts +0 -3
- package/dist/dialog/close-trigger.svelte +5 -6
- package/dist/dialog/close-trigger.svelte.d.ts +0 -3
- package/dist/dialog/content.svelte +5 -5
- package/dist/dialog/content.svelte.d.ts +0 -3
- package/dist/dialog/context.svelte.d.ts +3 -8
- package/dist/dialog/context.svelte.js +2 -14
- package/dist/dialog/create-dialog.svelte.d.ts +7 -0
- package/dist/dialog/create-dialog.svelte.js +18 -0
- package/dist/dialog/description.svelte +5 -5
- package/dist/dialog/description.svelte.d.ts +0 -3
- package/dist/dialog/positioner.svelte +5 -5
- package/dist/dialog/positioner.svelte.d.ts +0 -3
- package/dist/dialog/root.svelte +9 -23
- package/dist/dialog/root.svelte.d.ts +0 -6
- package/dist/dialog/title.svelte +5 -5
- package/dist/dialog/title.svelte.d.ts +0 -3
- package/dist/dialog/trigger.svelte +5 -5
- package/dist/dialog/trigger.svelte.d.ts +0 -3
- package/dist/editable/area.svelte +5 -5
- package/dist/editable/area.svelte.d.ts +0 -3
- package/dist/editable/cancel-trigger.svelte +5 -6
- package/dist/editable/cancel-trigger.svelte.d.ts +0 -3
- package/dist/editable/context.svelte.d.ts +3 -8
- package/dist/editable/context.svelte.js +2 -14
- package/dist/editable/control.svelte +5 -5
- package/dist/editable/control.svelte.d.ts +0 -3
- package/dist/editable/create-editable.svelte.d.ts +7 -0
- package/dist/editable/create-editable.svelte.js +18 -0
- package/dist/editable/edit-trigger.svelte +5 -6
- package/dist/editable/edit-trigger.svelte.d.ts +0 -3
- package/dist/editable/input.svelte +5 -5
- package/dist/editable/input.svelte.d.ts +0 -3
- package/dist/editable/label.svelte +5 -5
- package/dist/editable/label.svelte.d.ts +0 -3
- package/dist/editable/preview.svelte +5 -5
- package/dist/editable/preview.svelte.d.ts +0 -3
- package/dist/editable/root.svelte +9 -24
- package/dist/editable/root.svelte.d.ts +0 -6
- package/dist/editable/submit-trigger.svelte +5 -6
- package/dist/editable/submit-trigger.svelte.d.ts +0 -3
- package/dist/environment-provider/context.svelte.d.ts +7 -13
- package/dist/environment-provider/context.svelte.js +3 -25
- package/dist/environment-provider/index.d.ts +2 -2
- package/dist/environment-provider/index.js +2 -2
- package/dist/environment-provider/root.svelte +31 -12
- package/dist/environment-provider/root.svelte.d.ts +0 -5
- package/dist/file-upload/context.svelte.d.ts +8 -0
- package/dist/file-upload/context.svelte.js +14 -0
- package/dist/file-upload/dropzone.svelte +3 -0
- package/dist/file-upload/dropzone.svelte.d.ts +18 -0
- package/dist/file-upload/file-upload.d.ts +12 -0
- package/dist/file-upload/file-upload.js +12 -0
- package/dist/file-upload/hidden-input.svelte +3 -0
- package/dist/file-upload/hidden-input.svelte.d.ts +18 -0
- 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 +3 -0
- package/dist/file-upload/item-delete-trigger.svelte.d.ts +18 -0
- package/dist/file-upload/item-group.svelte +3 -0
- package/dist/file-upload/item-group.svelte.d.ts +18 -0
- package/dist/file-upload/item-name.svelte +3 -0
- package/dist/file-upload/item-name.svelte.d.ts +18 -0
- package/dist/file-upload/item-preview-image.svelte +3 -0
- package/dist/file-upload/item-preview-image.svelte.d.ts +18 -0
- package/dist/file-upload/item-preview.svelte +3 -0
- package/dist/file-upload/item-preview.svelte.d.ts +18 -0
- package/dist/file-upload/item-size-text.svelte +3 -0
- package/dist/file-upload/item-size-text.svelte.d.ts +18 -0
- package/dist/file-upload/item.svelte +3 -0
- package/dist/file-upload/item.svelte.d.ts +18 -0
- package/dist/file-upload/label.svelte +3 -0
- package/dist/file-upload/label.svelte.d.ts +18 -0
- package/dist/file-upload/root.svelte +3 -0
- package/dist/file-upload/root.svelte.d.ts +18 -0
- package/dist/file-upload/trigger.svelte +3 -0
- package/dist/file-upload/trigger.svelte.d.ts +18 -0
- package/dist/hover-card/arrow-tip.svelte +5 -5
- package/dist/hover-card/arrow-tip.svelte.d.ts +0 -3
- package/dist/hover-card/arrow.svelte +5 -5
- package/dist/hover-card/arrow.svelte.d.ts +0 -3
- package/dist/hover-card/content.svelte +5 -5
- package/dist/hover-card/content.svelte.d.ts +0 -3
- package/dist/hover-card/context.svelte.d.ts +3 -8
- package/dist/hover-card/context.svelte.js +2 -14
- package/dist/hover-card/create-hover-card.svelte.d.ts +7 -0
- package/dist/hover-card/create-hover-card.svelte.js +18 -0
- package/dist/hover-card/positioner.svelte +5 -6
- package/dist/hover-card/positioner.svelte.d.ts +0 -3
- package/dist/hover-card/root.svelte +9 -27
- package/dist/hover-card/root.svelte.d.ts +0 -6
- package/dist/hover-card/trigger.svelte +5 -5
- package/dist/hover-card/trigger.svelte.d.ts +0 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -0
- package/dist/locale-provider/context.svelte.d.ts +4 -11
- package/dist/locale-provider/context.svelte.js +3 -23
- package/dist/locale-provider/index.d.ts +3 -2
- package/dist/locale-provider/index.js +2 -2
- package/dist/locale-provider/root.svelte +10 -6
- package/dist/locale-provider/root.svelte.d.ts +0 -5
- package/dist/menu/arrow-tip.svelte +20 -0
- package/dist/menu/arrow-tip.svelte.d.ts +7 -15
- package/dist/menu/arrow.svelte +20 -0
- package/dist/menu/arrow.svelte.d.ts +7 -15
- package/dist/menu/content.svelte +20 -0
- package/dist/menu/content.svelte.d.ts +7 -15
- package/dist/menu/context-trigger.svelte +20 -0
- package/dist/menu/context-trigger.svelte.d.ts +7 -15
- package/dist/menu/context.svelte.d.ts +6 -10
- package/dist/menu/context.svelte.js +4 -20
- package/dist/menu/create-menu.svelte.d.ts +7 -0
- package/dist/menu/create-menu.svelte.js +18 -0
- package/dist/menu/index.d.ts +18 -1
- package/dist/menu/index.js +18 -1
- package/dist/menu/indicator.svelte +20 -0
- package/dist/menu/indicator.svelte.d.ts +7 -15
- package/dist/menu/item-group-label.svelte +29 -0
- package/dist/menu/item-group-label.svelte.d.ts +7 -15
- package/dist/menu/item-group.svelte +31 -0
- package/dist/menu/item-group.svelte.d.ts +7 -15
- package/dist/menu/item.svelte +32 -0
- package/dist/menu/item.svelte.d.ts +7 -15
- package/dist/menu/menu.d.ts +16 -1
- package/dist/menu/menu.js +16 -1
- package/dist/menu/option-item-indicator.svelte +22 -0
- package/dist/menu/option-item-indicator.svelte.d.ts +18 -0
- package/dist/menu/option-item-text.svelte +26 -0
- package/dist/menu/option-item-text.svelte.d.ts +18 -0
- package/dist/menu/option-item.svelte +51 -0
- package/dist/menu/option-item.svelte.d.ts +7 -15
- package/dist/menu/positioner.svelte +20 -0
- package/dist/menu/positioner.svelte.d.ts +7 -15
- package/dist/menu/root.svelte +21 -0
- package/dist/menu/root.svelte.d.ts +7 -15
- package/dist/menu/separator.svelte +20 -0
- package/dist/menu/separator.svelte.d.ts +7 -15
- package/dist/menu/trigger-item.svelte +20 -0
- package/dist/menu/trigger-item.svelte.d.ts +7 -15
- package/dist/menu/trigger.svelte +20 -0
- package/dist/menu/trigger.svelte.d.ts +7 -15
- package/dist/number-input/context.svelte.d.ts +3 -8
- package/dist/number-input/context.svelte.js +2 -14
- package/dist/number-input/control.svelte +5 -6
- package/dist/number-input/control.svelte.d.ts +0 -3
- package/dist/number-input/create-number-input.svelte.d.ts +7 -0
- package/dist/number-input/create-number-input.svelte.js +18 -0
- package/dist/number-input/decrement-trigger.svelte +5 -6
- package/dist/number-input/decrement-trigger.svelte.d.ts +0 -3
- package/dist/number-input/increment-trigger.svelte +5 -6
- package/dist/number-input/increment-trigger.svelte.d.ts +0 -3
- package/dist/number-input/input.svelte +5 -5
- package/dist/number-input/input.svelte.d.ts +0 -3
- package/dist/number-input/label.svelte +5 -5
- package/dist/number-input/label.svelte.d.ts +0 -3
- package/dist/number-input/root.svelte +12 -29
- package/dist/number-input/root.svelte.d.ts +0 -6
- package/dist/number-input/scrubber.svelte +5 -6
- package/dist/number-input/scrubber.svelte.d.ts +0 -3
- package/dist/pagination/context.svelte.d.ts +3 -8
- package/dist/pagination/context.svelte.js +2 -14
- package/dist/pagination/create-pagination.svelte.d.ts +7 -0
- package/dist/pagination/create-pagination.svelte.js +17 -0
- package/dist/pagination/ellipsis.svelte +5 -6
- package/dist/pagination/ellipsis.svelte.d.ts +0 -4
- package/dist/pagination/item.svelte +5 -5
- package/dist/pagination/item.svelte.d.ts +0 -4
- package/dist/pagination/next-trigger.svelte +5 -6
- package/dist/pagination/next-trigger.svelte.d.ts +0 -3
- package/dist/pagination/prev-trigger.svelte +5 -6
- package/dist/pagination/prev-trigger.svelte.d.ts +0 -3
- package/dist/pagination/root.svelte +10 -28
- package/dist/pagination/root.svelte.d.ts +0 -6
- package/dist/pin-input/clear-trigger.svelte +5 -6
- package/dist/pin-input/clear-trigger.svelte.d.ts +0 -3
- package/dist/pin-input/context.svelte.d.ts +3 -8
- package/dist/pin-input/context.svelte.js +2 -14
- package/dist/pin-input/create-pin-input.svelte.d.ts +7 -0
- package/dist/pin-input/create-pin-input.svelte.js +17 -0
- package/dist/pin-input/hidden-input.svelte +5 -6
- package/dist/pin-input/hidden-input.svelte.d.ts +0 -3
- package/dist/pin-input/input.svelte +5 -6
- package/dist/pin-input/input.svelte.d.ts +0 -4
- package/dist/pin-input/label.svelte +5 -5
- package/dist/pin-input/label.svelte.d.ts +0 -3
- package/dist/pin-input/root.svelte +9 -24
- package/dist/pin-input/root.svelte.d.ts +0 -6
- package/dist/popover/arrow-tip.svelte +5 -5
- package/dist/popover/arrow-tip.svelte.d.ts +0 -3
- package/dist/popover/arrow.svelte +5 -5
- package/dist/popover/arrow.svelte.d.ts +0 -3
- package/dist/popover/close-trigger.svelte +5 -6
- package/dist/popover/close-trigger.svelte.d.ts +0 -3
- package/dist/popover/content.svelte +5 -5
- package/dist/popover/content.svelte.d.ts +0 -3
- package/dist/popover/context.svelte.d.ts +3 -8
- package/dist/popover/context.svelte.js +2 -14
- package/dist/popover/create-popover.svelte.d.ts +7 -0
- package/dist/popover/create-popover.svelte.js +18 -0
- package/dist/popover/description.svelte +5 -5
- package/dist/popover/description.svelte.d.ts +0 -3
- package/dist/popover/positioner.svelte +5 -5
- package/dist/popover/positioner.svelte.d.ts +0 -3
- package/dist/popover/root.svelte +9 -23
- package/dist/popover/root.svelte.d.ts +0 -6
- package/dist/popover/title.svelte +5 -5
- package/dist/popover/title.svelte.d.ts +0 -3
- package/dist/popover/trigger.svelte +5 -5
- package/dist/popover/trigger.svelte.d.ts +0 -3
- package/dist/portal/root.svelte +9 -7
- package/dist/portal/root.svelte.d.ts +0 -7
- package/dist/presence/root.svelte +5 -4
- package/dist/presence/root.svelte.d.ts +0 -4
- package/dist/progress/circle-range.svelte +5 -6
- package/dist/progress/circle-range.svelte.d.ts +0 -3
- package/dist/progress/circle-track.svelte +5 -6
- package/dist/progress/circle-track.svelte.d.ts +0 -3
- package/dist/progress/circle.svelte +5 -5
- package/dist/progress/circle.svelte.d.ts +0 -3
- package/dist/progress/context.svelte.d.ts +3 -8
- package/dist/progress/context.svelte.js +2 -14
- package/dist/progress/create-progress.svelte.d.ts +7 -0
- package/dist/progress/create-progress.svelte.js +17 -0
- package/dist/progress/label.svelte +5 -5
- package/dist/progress/label.svelte.d.ts +0 -3
- package/dist/progress/range.svelte +5 -5
- package/dist/progress/range.svelte.d.ts +0 -3
- package/dist/progress/root.svelte +11 -25
- package/dist/progress/root.svelte.d.ts +0 -6
- package/dist/progress/track.svelte +5 -5
- package/dist/progress/track.svelte.d.ts +0 -3
- package/dist/progress/value-text.svelte +5 -5
- package/dist/progress/value-text.svelte.d.ts +0 -3
- package/dist/qr-code/context.svelte.d.ts +3 -8
- package/dist/qr-code/context.svelte.js +2 -14
- package/dist/qr-code/create-qr-code.svelte.d.ts +7 -0
- package/dist/qr-code/create-qr-code.svelte.js +17 -0
- package/dist/qr-code/frame.svelte +5 -5
- package/dist/qr-code/frame.svelte.d.ts +0 -3
- package/dist/qr-code/overlay.svelte +5 -5
- package/dist/qr-code/overlay.svelte.d.ts +0 -3
- package/dist/qr-code/pattern.svelte +5 -5
- package/dist/qr-code/pattern.svelte.d.ts +0 -3
- package/dist/qr-code/root.svelte +11 -25
- package/dist/qr-code/root.svelte.d.ts +0 -6
- package/dist/radio-group/context.svelte.d.ts +5 -10
- package/dist/radio-group/context.svelte.js +3 -20
- package/dist/radio-group/create-radio-group.svelte.d.ts +7 -0
- package/dist/radio-group/create-radio-group.svelte.js +17 -0
- package/dist/radio-group/indicator.svelte +5 -6
- package/dist/radio-group/indicator.svelte.d.ts +0 -3
- package/dist/radio-group/item-control.svelte +7 -13
- package/dist/radio-group/item-control.svelte.d.ts +0 -3
- package/dist/radio-group/item-hidden-input.svelte +7 -13
- package/dist/radio-group/item-hidden-input.svelte.d.ts +0 -3
- package/dist/radio-group/item-text.svelte +6 -10
- package/dist/radio-group/item-text.svelte.d.ts +0 -3
- package/dist/radio-group/item.svelte +12 -29
- package/dist/radio-group/item.svelte.d.ts +0 -6
- package/dist/radio-group/label.svelte +5 -5
- package/dist/radio-group/label.svelte.d.ts +0 -3
- package/dist/radio-group/root.svelte +10 -28
- package/dist/radio-group/root.svelte.d.ts +0 -6
- package/dist/rating-group/context.svelte.d.ts +3 -8
- package/dist/rating-group/context.svelte.js +2 -14
- package/dist/rating-group/control.svelte +5 -5
- package/dist/rating-group/control.svelte.d.ts +0 -3
- package/dist/rating-group/create-rating-group.svelte.d.ts +7 -0
- package/dist/rating-group/create-rating-group.svelte.js +17 -0
- package/dist/rating-group/hidden-input.svelte +5 -6
- package/dist/rating-group/hidden-input.svelte.d.ts +0 -3
- package/dist/rating-group/item.svelte +5 -5
- package/dist/rating-group/item.svelte.d.ts +0 -6
- package/dist/rating-group/label.svelte +5 -5
- package/dist/rating-group/label.svelte.d.ts +0 -3
- package/dist/rating-group/root.svelte +12 -27
- package/dist/rating-group/root.svelte.d.ts +0 -6
- package/dist/segment-group/context.svelte.d.ts +5 -10
- package/dist/segment-group/context.svelte.js +3 -60
- package/dist/segment-group/create-segment-group.svelte.d.ts +7 -0
- package/dist/segment-group/create-segment-group.svelte.js +17 -0
- package/dist/segment-group/indicator.svelte +9 -8
- package/dist/segment-group/indicator.svelte.d.ts +0 -3
- package/dist/segment-group/item-control.svelte +10 -12
- package/dist/segment-group/item-control.svelte.d.ts +0 -3
- package/dist/segment-group/item-hidden-input.svelte +7 -13
- package/dist/segment-group/item-hidden-input.svelte.d.ts +0 -3
- package/dist/segment-group/item-text.svelte +12 -12
- package/dist/segment-group/item-text.svelte.d.ts +0 -3
- package/dist/segment-group/item.svelte +15 -30
- package/dist/segment-group/item.svelte.d.ts +0 -6
- package/dist/segment-group/label.svelte +9 -7
- package/dist/segment-group/label.svelte.d.ts +0 -3
- package/dist/segment-group/root.svelte +16 -29
- package/dist/segment-group/root.svelte.d.ts +0 -6
- package/dist/select/clear-trigger.svelte +5 -6
- package/dist/select/clear-trigger.svelte.d.ts +0 -3
- package/dist/select/content.svelte +5 -5
- package/dist/select/content.svelte.d.ts +0 -3
- package/dist/select/context.svelte.d.ts +6 -16
- package/dist/select/context.svelte.js +4 -38
- package/dist/select/control.svelte +5 -5
- package/dist/select/control.svelte.d.ts +0 -3
- package/dist/select/create-select.svelte.d.ts +11 -0
- package/dist/select/create-select.svelte.js +28 -0
- package/dist/select/hidden-select.svelte +5 -6
- package/dist/select/hidden-select.svelte.d.ts +0 -3
- package/dist/select/indicator.svelte +5 -5
- package/dist/select/indicator.svelte.d.ts +0 -3
- package/dist/select/item-group-label.svelte +7 -14
- package/dist/select/item-group-label.svelte.d.ts +0 -3
- package/dist/select/item-group.svelte +11 -12
- package/dist/select/item-group.svelte.d.ts +0 -4
- package/dist/select/item-indicator.svelte +7 -13
- package/dist/select/item-indicator.svelte.d.ts +0 -3
- package/dist/select/item-text.svelte +6 -9
- package/dist/select/item-text.svelte.d.ts +0 -3
- package/dist/select/item.svelte +12 -28
- package/dist/select/item.svelte.d.ts +0 -6
- package/dist/select/label.svelte +5 -5
- package/dist/select/label.svelte.d.ts +0 -3
- package/dist/select/list.svelte +5 -5
- package/dist/select/list.svelte.d.ts +0 -3
- package/dist/select/positioner.svelte +5 -5
- package/dist/select/positioner.svelte.d.ts +0 -3
- package/dist/select/root.svelte +10 -27
- package/dist/select/root.svelte.d.ts +1 -7
- package/dist/select/trigger.svelte +5 -5
- package/dist/select/trigger.svelte.d.ts +0 -3
- package/dist/select/value-text.svelte +5 -5
- package/dist/select/value-text.svelte.d.ts +0 -3
- package/dist/slider/context.svelte.d.ts +5 -10
- package/dist/slider/context.svelte.js +3 -20
- package/dist/slider/control.svelte +5 -5
- package/dist/slider/control.svelte.d.ts +0 -3
- package/dist/slider/create-slider.svelte.d.ts +7 -0
- package/dist/slider/create-slider.svelte.js +17 -0
- package/dist/slider/hidden-input.svelte +7 -13
- package/dist/slider/hidden-input.svelte.d.ts +0 -3
- package/dist/slider/label.svelte +5 -5
- package/dist/slider/label.svelte.d.ts +0 -3
- package/dist/slider/marker-group.svelte +5 -5
- package/dist/slider/marker-group.svelte.d.ts +0 -3
- package/dist/slider/marker.svelte +5 -6
- package/dist/slider/marker.svelte.d.ts +0 -4
- package/dist/slider/range.svelte +5 -5
- package/dist/slider/range.svelte.d.ts +0 -3
- package/dist/slider/root.svelte +10 -25
- package/dist/slider/root.svelte.d.ts +0 -6
- package/dist/slider/thumb.svelte +10 -20
- package/dist/slider/thumb.svelte.d.ts +0 -4
- package/dist/slider/track.svelte +5 -5
- package/dist/slider/track.svelte.d.ts +0 -3
- package/dist/slider/value-text.svelte +5 -5
- package/dist/slider/value-text.svelte.d.ts +0 -3
- package/dist/steps/content.svelte +5 -6
- package/dist/steps/content.svelte.d.ts +0 -4
- package/dist/steps/context.svelte.d.ts +5 -10
- package/dist/steps/context.svelte.js +3 -20
- package/dist/steps/create-steps.svelte.d.ts +7 -0
- package/dist/steps/create-steps.svelte.js +17 -0
- package/dist/steps/indicator.svelte +6 -6
- package/dist/steps/indicator.svelte.d.ts +0 -3
- package/dist/steps/item.svelte +11 -9
- package/dist/steps/item.svelte.d.ts +0 -6
- package/dist/steps/list.svelte +5 -5
- package/dist/steps/list.svelte.d.ts +0 -3
- package/dist/steps/next-trigger.svelte +5 -6
- package/dist/steps/next-trigger.svelte.d.ts +0 -3
- package/dist/steps/prev-trigger.svelte +5 -6
- package/dist/steps/prev-trigger.svelte.d.ts +0 -3
- package/dist/steps/progress.svelte +5 -5
- package/dist/steps/progress.svelte.d.ts +0 -3
- package/dist/steps/root.svelte +10 -25
- package/dist/steps/root.svelte.d.ts +0 -6
- package/dist/steps/separator.svelte +6 -6
- package/dist/steps/separator.svelte.d.ts +0 -3
- package/dist/steps/trigger.svelte +6 -6
- package/dist/steps/trigger.svelte.d.ts +0 -3
- package/dist/switch/context.svelte.d.ts +3 -8
- package/dist/switch/context.svelte.js +2 -14
- package/dist/switch/control.svelte +5 -5
- package/dist/switch/control.svelte.d.ts +0 -3
- package/dist/switch/create-switch.svelte.d.ts +7 -0
- package/dist/switch/create-switch.svelte.js +17 -0
- package/dist/switch/hidden-input.svelte +5 -6
- package/dist/switch/hidden-input.svelte.d.ts +0 -3
- package/dist/switch/label.svelte +5 -5
- package/dist/switch/label.svelte.d.ts +0 -3
- package/dist/switch/root.svelte +10 -25
- package/dist/switch/root.svelte.d.ts +0 -6
- package/dist/switch/thumb.svelte +5 -5
- package/dist/switch/thumb.svelte.d.ts +0 -3
- package/dist/tabs/content.svelte +5 -6
- package/dist/tabs/content.svelte.d.ts +0 -4
- package/dist/tabs/context.svelte.d.ts +3 -8
- package/dist/tabs/context.svelte.js +2 -14
- package/dist/tabs/create-tabs.svelte.d.ts +7 -0
- package/dist/tabs/create-tabs.svelte.js +17 -0
- package/dist/tabs/list.svelte +5 -5
- package/dist/tabs/list.svelte.d.ts +0 -3
- package/dist/tabs/root.svelte +10 -26
- package/dist/tabs/root.svelte.d.ts +0 -6
- package/dist/tabs/trigger.svelte +12 -7
- package/dist/tabs/trigger.svelte.d.ts +0 -4
- package/dist/tags-input/clear-trigger.svelte +5 -6
- package/dist/tags-input/clear-trigger.svelte.d.ts +0 -3
- package/dist/tags-input/context.svelte.d.ts +5 -10
- package/dist/tags-input/context.svelte.js +3 -20
- package/dist/tags-input/control.svelte +5 -5
- package/dist/tags-input/control.svelte.d.ts +0 -3
- package/dist/tags-input/create-tags-input.svelte.d.ts +7 -0
- package/dist/tags-input/create-tags-input.svelte.js +17 -0
- package/dist/tags-input/hidden-input.svelte +5 -6
- package/dist/tags-input/hidden-input.svelte.d.ts +0 -3
- package/dist/tags-input/input.svelte +5 -5
- package/dist/tags-input/input.svelte.d.ts +0 -3
- package/dist/tags-input/item-delete-trigger.svelte +7 -13
- package/dist/tags-input/item-delete-trigger.svelte.d.ts +0 -3
- package/dist/tags-input/item-input.svelte +6 -10
- package/dist/tags-input/item-input.svelte.d.ts +0 -3
- package/dist/tags-input/item-preview.svelte +7 -13
- package/dist/tags-input/item-preview.svelte.d.ts +0 -3
- package/dist/tags-input/item-text.svelte +6 -9
- package/dist/tags-input/item-text.svelte.d.ts +0 -3
- package/dist/tags-input/item.svelte +12 -29
- package/dist/tags-input/item.svelte.d.ts +0 -6
- package/dist/tags-input/label.svelte +5 -5
- package/dist/tags-input/label.svelte.d.ts +0 -3
- package/dist/tags-input/root.svelte +10 -28
- package/dist/tags-input/root.svelte.d.ts +0 -6
- package/dist/timer/action-trigger.svelte +6 -8
- package/dist/timer/action-trigger.svelte.d.ts +0 -4
- package/dist/timer/context.svelte.d.ts +5 -10
- package/dist/timer/context.svelte.js +3 -20
- package/dist/timer/create-timer.svelte.d.ts +7 -0
- package/dist/timer/create-timer.svelte.js +14 -0
- package/dist/timer/item-label.svelte +6 -6
- package/dist/timer/item-label.svelte.d.ts +0 -3
- package/dist/timer/item-value.svelte +6 -6
- package/dist/timer/item-value.svelte.d.ts +0 -3
- package/dist/timer/item.svelte +11 -8
- package/dist/timer/item.svelte.d.ts +0 -4
- package/dist/timer/root.svelte +10 -22
- package/dist/timer/root.svelte.d.ts +0 -6
- package/dist/timer/separator.svelte +5 -5
- package/dist/timer/separator.svelte.d.ts +0 -3
- package/dist/toast/action-trigger.svelte +5 -6
- package/dist/toast/action-trigger.svelte.d.ts +0 -3
- package/dist/toast/actor.svelte +5 -8
- package/dist/toast/actor.svelte.d.ts +2 -2
- package/dist/toast/close-trigger.svelte +5 -6
- package/dist/toast/close-trigger.svelte.d.ts +0 -3
- package/dist/toast/context.svelte.d.ts +3 -8
- package/dist/toast/context.svelte.js +2 -14
- package/dist/toast/create-toast.svelte.d.ts +6 -0
- package/dist/toast/create-toast.svelte.js +7 -0
- package/dist/toast/create-toaster.svelte.d.ts +2 -4
- package/dist/toast/create-toaster.svelte.js +8 -11
- package/dist/toast/description.svelte +5 -5
- package/dist/toast/description.svelte.d.ts +0 -3
- package/dist/toast/index.d.ts +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/root.svelte +7 -8
- package/dist/toast/root.svelte.d.ts +0 -6
- package/dist/toast/title.svelte +5 -5
- package/dist/toast/title.svelte.d.ts +0 -3
- package/dist/toast/toast.d.ts +3 -3
- package/dist/toast/toast.js +3 -3
- package/dist/toast/toaster.svelte +5 -6
- package/dist/toast/toaster.svelte.d.ts +0 -8
- package/dist/toggle-group/context.svelte.d.ts +3 -8
- package/dist/toggle-group/context.svelte.js +2 -14
- package/dist/toggle-group/create-toggle-group.svelte.d.ts +7 -0
- package/dist/toggle-group/create-toggle-group.svelte.js +17 -0
- package/dist/toggle-group/item.svelte +11 -9
- package/dist/toggle-group/item.svelte.d.ts +0 -6
- package/dist/toggle-group/root.svelte +12 -27
- package/dist/toggle-group/root.svelte.d.ts +0 -6
- package/dist/tooltip/arrow-tip.svelte +5 -5
- package/dist/tooltip/arrow-tip.svelte.d.ts +0 -3
- package/dist/tooltip/arrow.svelte +5 -5
- package/dist/tooltip/arrow.svelte.d.ts +0 -3
- package/dist/tooltip/content.svelte +5 -5
- package/dist/tooltip/content.svelte.d.ts +0 -3
- package/dist/tooltip/context.svelte.d.ts +3 -8
- package/dist/tooltip/context.svelte.js +2 -14
- package/dist/tooltip/create-tooltip.svelte.d.ts +7 -0
- package/dist/tooltip/create-tooltip.svelte.js +18 -0
- package/dist/tooltip/positioner.svelte +5 -5
- package/dist/tooltip/positioner.svelte.d.ts +0 -3
- package/dist/tooltip/root.svelte +9 -23
- package/dist/tooltip/root.svelte.d.ts +0 -6
- package/dist/tooltip/trigger.svelte +5 -5
- package/dist/tooltip/trigger.svelte.d.ts +0 -3
- package/dist/types.d.ts +2 -5
- package/dist/utils.svelte.d.ts +12 -0
- package/dist/utils.svelte.js +44 -0
- package/package.json +7 -4
- package/dist/date-picker/.gitkeep +0 -0
- package/dist/file-upload/.gitkeep +0 -0
- package/dist/menu/item-indicator.svelte +0 -0
- package/dist/menu/item-text.svelte +0 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
import { getEnvironmentContext } from '../environment-provider/context.svelte.js';
|
2
|
+
import { getLocaleContext } from '../locale-provider/context.svelte.js';
|
3
|
+
import { createUniqueId } from '../utils.svelte.js';
|
4
|
+
import * as menu from '@zag-js/menu';
|
5
|
+
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
6
|
+
export function createMenu(props) {
|
7
|
+
const localeContext = getLocaleContext();
|
8
|
+
const environmentContext = getEnvironmentContext();
|
9
|
+
const [state, send] = useMachine(menu.machine({
|
10
|
+
...props,
|
11
|
+
id: props.id ?? createUniqueId(),
|
12
|
+
dir: localeContext?.dir,
|
13
|
+
getRootNode: environmentContext?.getRootNode,
|
14
|
+
'open.controlled': props.open != null,
|
15
|
+
}));
|
16
|
+
const api = $derived(reflect(() => menu.connect(state, send, normalizeProps)));
|
17
|
+
return api;
|
18
|
+
}
|
package/dist/menu/index.d.ts
CHANGED
@@ -1 +1,18 @@
|
|
1
|
-
export {};
|
1
|
+
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
2
|
+
export { type MenuArrowTipProps } from './arrow-tip.svelte';
|
3
|
+
export { type MenuArrowProps } from './arrow.svelte';
|
4
|
+
export { type MenuContentProps } from './content.svelte';
|
5
|
+
export { type MenuContextTriggerProps } from './context-trigger.svelte';
|
6
|
+
export { type MenuIndicatorProps } from './indicator.svelte';
|
7
|
+
export { type MenuItemGroupLabelProps } from './item-group-label.svelte';
|
8
|
+
export { type MenuItemGroupProps } from './item-group.svelte';
|
9
|
+
export { type MenuItemProps } from './item.svelte';
|
10
|
+
export * as Menu from './menu.js';
|
11
|
+
export { type MenuOptionItemIndicatorProps } from './option-item-indicator.svelte';
|
12
|
+
export { type MenuOptionItemTextProps } from './option-item-text.svelte';
|
13
|
+
export { type MenuOptionItemProps } from './option-item.svelte';
|
14
|
+
export { type MenuPositionerProps } from './positioner.svelte';
|
15
|
+
export { type MenuRootProps } from './root.svelte';
|
16
|
+
export { type MenuSeparatorProps } from './separator.svelte';
|
17
|
+
export { type MenuTriggerItemIndicatorProps } from './trigger-item.svelte';
|
18
|
+
export { type MenuTriggerProps } from './trigger.svelte';
|
package/dist/menu/index.js
CHANGED
@@ -1 +1,18 @@
|
|
1
|
-
|
1
|
+
export { anatomy as menuAnatomy } from '@zag-js/menu';
|
2
|
+
export {} from './arrow-tip.svelte';
|
3
|
+
export {} from './arrow.svelte';
|
4
|
+
export {} from './content.svelte';
|
5
|
+
export {} from './context-trigger.svelte';
|
6
|
+
export {} from './indicator.svelte';
|
7
|
+
export {} from './item-group-label.svelte';
|
8
|
+
export {} from './item-group.svelte';
|
9
|
+
export {} from './item.svelte';
|
10
|
+
export * as Menu from './menu.js';
|
11
|
+
export {} from './option-item-indicator.svelte';
|
12
|
+
export {} from './option-item-text.svelte';
|
13
|
+
export {} from './option-item.svelte';
|
14
|
+
export {} from './positioner.svelte';
|
15
|
+
export {} from './root.svelte';
|
16
|
+
export {} from './separator.svelte';
|
17
|
+
export {} from './trigger-item.svelte';
|
18
|
+
export {} from './trigger.svelte';
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuIndicatorProps extends HtmlProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {menuContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: MenuIndicatorProps = $props();
|
12
|
+
|
13
|
+
let context = menuContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, context.getIndicatorProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<span {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</span>
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default Indicator;
|
2
|
-
type Indicator = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const Indicator: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const Indicator: $$__sveltets_2_IsomorphicComponent<MenuIndicatorProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Indicator = InstanceType<typeof Indicator>;
|
18
|
+
export default Indicator;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuItemGroupLabelProps extends HtmlProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {menuContext, menuItemGroupPropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: MenuItemGroupLabelProps = $props();
|
12
|
+
|
13
|
+
let context = menuContext.get();
|
14
|
+
|
15
|
+
let itemGroupProps = menuItemGroupPropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(
|
18
|
+
mergeProps(
|
19
|
+
props,
|
20
|
+
context.getItemGroupLabelProps({
|
21
|
+
htmlFor: itemGroupProps.id,
|
22
|
+
}),
|
23
|
+
),
|
24
|
+
);
|
25
|
+
</script>
|
26
|
+
|
27
|
+
<span {...attrs}>
|
28
|
+
{@render children?.()}
|
29
|
+
</span>
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default ItemGroupLabel;
|
2
|
-
type ItemGroupLabel = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const ItemGroupLabel: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const ItemGroupLabel: $$__sveltets_2_IsomorphicComponent<MenuItemGroupLabelProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type ItemGroupLabel = InstanceType<typeof ItemGroupLabel>;
|
18
|
+
export default ItemGroupLabel;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {ItemGroupProps} from '@zag-js/menu';
|
4
|
+
|
5
|
+
export interface MenuItemGroupProps
|
6
|
+
extends Assign<HtmlProps<'div'>, Omit<ItemGroupProps, 'id'>> {}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {createUniqueId} from '../utils.svelte.js';
|
11
|
+
import {mergeProps} from '@zag-js/svelte';
|
12
|
+
import {menuContext, menuItemGroupPropsContext} from './context.svelte.js';
|
13
|
+
|
14
|
+
let {id, children, ...props}: MenuItemGroupProps = $props();
|
15
|
+
|
16
|
+
let context = menuContext.get();
|
17
|
+
|
18
|
+
let uid = createUniqueId();
|
19
|
+
|
20
|
+
let itemGroupProps = $derived({
|
21
|
+
id: id ?? uid,
|
22
|
+
});
|
23
|
+
|
24
|
+
let attrs = $derived(mergeProps(props, context.getItemGroupProps(itemGroupProps)));
|
25
|
+
|
26
|
+
menuItemGroupPropsContext.set(() => itemGroupProps);
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<div {...attrs}>
|
30
|
+
{@render children?.()}
|
31
|
+
</div>
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default ItemGroup;
|
2
|
-
type ItemGroup = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const ItemGroup: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const ItemGroup: $$__sveltets_2_IsomorphicComponent<MenuItemGroupProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type ItemGroup = InstanceType<typeof ItemGroup>;
|
18
|
+
export default ItemGroup;
|
package/dist/menu/item.svelte
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {ItemProps, ItemState} from '@zag-js/menu';
|
4
|
+
import type {Snippet} from 'svelte';
|
5
|
+
|
6
|
+
export interface MenuItemProps extends Assign<Omit<HtmlProps<'div'>, 'children'>, ItemProps> {
|
7
|
+
children?: Snippet<[state: ItemState]>;
|
8
|
+
}
|
9
|
+
</script>
|
10
|
+
|
11
|
+
<script lang="ts">
|
12
|
+
import {mergeProps} from '@zag-js/svelte';
|
13
|
+
import {menuContext} from './context.svelte.js';
|
14
|
+
|
15
|
+
let {value, valueText, disabled, closeOnSelect, children, ...props}: MenuItemProps = $props();
|
16
|
+
|
17
|
+
let context = menuContext.get();
|
18
|
+
|
19
|
+
let itemProps = $derived({
|
20
|
+
value,
|
21
|
+
valueText,
|
22
|
+
disabled,
|
23
|
+
closeOnSelect,
|
24
|
+
});
|
25
|
+
|
26
|
+
let state = $derived(context.getItemState(itemProps));
|
27
|
+
let attrs = $derived(mergeProps(props, context.getItemProps(itemProps)));
|
28
|
+
</script>
|
29
|
+
|
30
|
+
<div {...attrs}>
|
31
|
+
{@render children?.(state)}
|
32
|
+
</div>
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default Item;
|
2
|
-
type Item = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const Item: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const Item: $$__sveltets_2_IsomorphicComponent<MenuItemProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Item = InstanceType<typeof Item>;
|
18
|
+
export default Item;
|
package/dist/menu/menu.d.ts
CHANGED
@@ -1 +1,16 @@
|
|
1
|
-
export {};
|
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 ContextTrigger } from './context-trigger.svelte';
|
5
|
+
export { default as Indicator } from './indicator.svelte';
|
6
|
+
export { default as ItemGroupLabel } from './item-group-label.svelte';
|
7
|
+
export { default as ItemGroup } from './item-group.svelte';
|
8
|
+
export { default as Item } from './item.svelte';
|
9
|
+
export { default as OptionItemIndicator } from './option-item-indicator.svelte';
|
10
|
+
export { default as OptionItemText } from './option-item-text.svelte';
|
11
|
+
export { default as OptionItem } from './option-item.svelte';
|
12
|
+
export { default as Positioner } from './positioner.svelte';
|
13
|
+
export { default as Root } from './root.svelte';
|
14
|
+
export { default as Separator } from './separator.svelte';
|
15
|
+
export { default as TriggerItem } from './trigger-item.svelte';
|
16
|
+
export { default as Trigger } from './trigger.svelte';
|
package/dist/menu/menu.js
CHANGED
@@ -1 +1,16 @@
|
|
1
|
-
|
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 ContextTrigger } from './context-trigger.svelte';
|
5
|
+
export { default as Indicator } from './indicator.svelte';
|
6
|
+
export { default as ItemGroupLabel } from './item-group-label.svelte';
|
7
|
+
export { default as ItemGroup } from './item-group.svelte';
|
8
|
+
export { default as Item } from './item.svelte';
|
9
|
+
export { default as OptionItemIndicator } from './option-item-indicator.svelte';
|
10
|
+
export { default as OptionItemText } from './option-item-text.svelte';
|
11
|
+
export { default as OptionItem } from './option-item.svelte';
|
12
|
+
export { default as Positioner } from './positioner.svelte';
|
13
|
+
export { default as Root } from './root.svelte';
|
14
|
+
export { default as Separator } from './separator.svelte';
|
15
|
+
export { default as TriggerItem } from './trigger-item.svelte';
|
16
|
+
export { default as Trigger } from './trigger.svelte';
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuOptionItemIndicatorProps extends HtmlProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {menuContext, menuOptionItemPropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: MenuOptionItemIndicatorProps = $props();
|
12
|
+
|
13
|
+
let context = menuContext.get();
|
14
|
+
|
15
|
+
let optionItemProps = menuOptionItemPropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getItemIndicatorProps(optionItemProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<span {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</span>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
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> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const OptionItemIndicator: $$__sveltets_2_IsomorphicComponent<MenuOptionItemIndicatorProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type OptionItemIndicator = InstanceType<typeof OptionItemIndicator>;
|
18
|
+
export default OptionItemIndicator;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuOptionItemTextProps extends HtmlProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {menuContext, menuOptionItemPropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: MenuOptionItemTextProps = $props();
|
12
|
+
|
13
|
+
let context = menuContext.get();
|
14
|
+
|
15
|
+
let optionItemProps = menuOptionItemPropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getItemTextProps(optionItemProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<span {...attrs}>
|
21
|
+
{#if children}
|
22
|
+
{@render children()}
|
23
|
+
{:else}
|
24
|
+
{optionItemProps.valueText}
|
25
|
+
{/if}
|
26
|
+
</span>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
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> {
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
|
+
$$bindings?: Bindings;
|
4
|
+
} & Exports;
|
5
|
+
(internal: unknown, props: Props & {
|
6
|
+
$$events?: Events;
|
7
|
+
$$slots?: Slots;
|
8
|
+
}): Exports & {
|
9
|
+
$set?: any;
|
10
|
+
$on?: any;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const OptionItemText: $$__sveltets_2_IsomorphicComponent<MenuOptionItemTextProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type OptionItemText = InstanceType<typeof OptionItemText>;
|
18
|
+
export default OptionItemText;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps, PickPartial} from '../types.js';
|
3
|
+
import type {OptionItemProps, OptionItemState} from '@zag-js/menu';
|
4
|
+
import type {Snippet} from 'svelte';
|
5
|
+
|
6
|
+
export interface MenuOptionItemProps
|
7
|
+
extends Assign<
|
8
|
+
Omit<HtmlProps<'div'>, 'children'>,
|
9
|
+
PickPartial<OptionItemProps, 'type' | 'checked'>
|
10
|
+
> {
|
11
|
+
children?: Snippet<[state: OptionItemState]>;
|
12
|
+
}
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script lang="ts">
|
16
|
+
import {mergeProps} from '@zag-js/svelte';
|
17
|
+
import {menuContext, menuOptionItemPropsContext} from './context.svelte.js';
|
18
|
+
|
19
|
+
let {
|
20
|
+
type = 'checkbox',
|
21
|
+
value,
|
22
|
+
checked = false,
|
23
|
+
disabled,
|
24
|
+
valueText,
|
25
|
+
closeOnSelect,
|
26
|
+
onCheckedChange,
|
27
|
+
children,
|
28
|
+
...props
|
29
|
+
}: MenuOptionItemProps = $props();
|
30
|
+
|
31
|
+
let context = menuContext.get();
|
32
|
+
|
33
|
+
let itemProps = $derived({
|
34
|
+
type,
|
35
|
+
value,
|
36
|
+
checked,
|
37
|
+
disabled,
|
38
|
+
valueText,
|
39
|
+
closeOnSelect,
|
40
|
+
onCheckedChange,
|
41
|
+
});
|
42
|
+
|
43
|
+
let state = $derived(context.getOptionItemState(itemProps));
|
44
|
+
let attrs = $derived(mergeProps(props, context.getOptionItemProps(itemProps)));
|
45
|
+
|
46
|
+
menuOptionItemPropsContext.set(() => itemProps);
|
47
|
+
</script>
|
48
|
+
|
49
|
+
<div {...attrs}>
|
50
|
+
{@render children?.(state)}
|
51
|
+
</div>
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default OptionItem;
|
2
|
-
type OptionItem = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const OptionItem: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const OptionItem: $$__sveltets_2_IsomorphicComponent<MenuOptionItemProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type OptionItem = InstanceType<typeof OptionItem>;
|
18
|
+
export default OptionItem;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuPositionerProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {menuContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: MenuPositionerProps = $props();
|
12
|
+
|
13
|
+
let context = menuContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, context.getPositionerProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<div {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</div>
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default Positioner;
|
2
|
-
type Positioner = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const Positioner: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const Positioner: $$__sveltets_2_IsomorphicComponent<MenuPositionerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Positioner = InstanceType<typeof Positioner>;
|
18
|
+
export default Positioner;
|
package/dist/menu/root.svelte
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Snippet} from 'svelte';
|
3
|
+
import {type CreateMenuProps, type CreateMenuReturn} from './create-menu.svelte.js';
|
4
|
+
|
5
|
+
export interface MenuRootProps extends CreateMenuProps {
|
6
|
+
children?: Snippet<[api: CreateMenuReturn]>;
|
7
|
+
}
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<script lang="ts">
|
11
|
+
import {menuContext} from './context.svelte.js';
|
12
|
+
import {createMenu} from './create-menu.svelte.js';
|
13
|
+
|
14
|
+
let {children, ...props}: MenuRootProps = $props();
|
15
|
+
|
16
|
+
let context = createMenu(props);
|
17
|
+
|
18
|
+
menuContext.set(context);
|
19
|
+
</script>
|
20
|
+
|
21
|
+
{@render children?.(context)}
|
@@ -1,21 +1,8 @@
|
|
1
|
-
export default Root;
|
2
|
-
type Root = SvelteComponent<{
|
3
|
-
[x: string]: never;
|
4
|
-
}, {
|
5
|
-
[evt: string]: CustomEvent<any>;
|
6
|
-
}, {}> & {
|
7
|
-
$$bindings?: string | undefined;
|
8
|
-
};
|
9
|
-
declare const Root: $$__sveltets_2_IsomorphicComponent<{
|
10
|
-
[x: string]: never;
|
11
|
-
}, {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
}, {}, {}, string>;
|
14
1
|
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> {
|
15
|
-
new (options: import(
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
16
3
|
$$bindings?: Bindings;
|
17
4
|
} & Exports;
|
18
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
19
6
|
$$events?: Events;
|
20
7
|
$$slots?: Slots;
|
21
8
|
}): Exports & {
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
24
11
|
};
|
25
12
|
z_$$bindings?: Bindings;
|
26
13
|
}
|
14
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<MenuRootProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Root = InstanceType<typeof Root>;
|
18
|
+
export default Root;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface MenuSeparatorProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {menuContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: MenuSeparatorProps = $props();
|
12
|
+
|
13
|
+
let context = menuContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, context.getSeparatorProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<div {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</div>
|