@spinjs/components 0.1.0-preview.2 → 0.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/dist/angle-slider/angle-slider.events.d.ts +2 -3
- package/dist/angle-slider/angle-slider.machine.d.ts +4 -5
- package/dist/angle-slider/angle-slider.machine.js +2 -2
- package/dist/angle-slider/angle-slider.presentation.d.ts +10 -11
- package/dist/angle-slider/angle-slider.presentation.js +2 -2
- package/dist/angle-slider/angle-slider.state.d.ts +1 -2
- package/dist/angle-slider/angle-slider.state.js +1 -1
- package/dist/angle-slider/angle-slider.transitions.d.ts +2 -3
- package/dist/angle-slider/examples/basic.html +2 -2
- package/dist/angle-slider/examples/basic.html.js +5 -0
- package/dist/angle-slider/examples/knob.html +1 -1
- package/dist/angle-slider/examples/knob.html.js +5 -0
- package/dist/angle-slider/examples/labeled.html +11 -11
- package/dist/angle-slider/examples/labeled.html.js +5 -0
- package/dist/angle-slider/examples/marks.html +2 -2
- package/dist/angle-slider/examples/marks.html.js +5 -0
- package/dist/async-list/async-list.events.d.ts +2 -3
- package/dist/async-list/async-list.machine.d.ts +2 -3
- package/dist/async-list/async-list.machine.js +1 -1
- package/dist/async-list/async-list.presentation.d.ts +13 -14
- package/dist/async-list/async-list.presentation.js +2 -2
- package/dist/async-list/async-list.state.d.ts +1 -2
- package/dist/async-list/async-list.state.js +1 -1
- package/dist/async-list/async-list.transitions.d.ts +3 -4
- package/dist/async-list/examples/basic.html +7 -7
- package/dist/async-list/examples/basic.html.js +5 -0
- package/dist/avatar/avatar.events.d.ts +2 -3
- package/dist/avatar/avatar.machine.d.ts +12 -4
- package/dist/avatar/avatar.machine.js +1 -1
- package/dist/avatar/avatar.presentation.d.ts +5 -6
- package/dist/avatar/avatar.presentation.js +1 -1
- package/dist/avatar/avatar.state.d.ts +1 -2
- package/dist/avatar/avatar.state.js +1 -1
- package/dist/avatar/avatar.transitions.d.ts +2 -3
- package/dist/avatar/examples/badge.html +2 -2
- package/dist/avatar/examples/badge.html.js +5 -0
- package/dist/avatar/examples/badgeminimal.html +1 -1
- package/dist/avatar/examples/badgeminimal.html.js +5 -0
- package/dist/avatar/examples/basic.html +1 -1
- package/dist/avatar/examples/basic.html.js +5 -0
- package/dist/avatar/examples/count.html +5 -5
- package/dist/avatar/examples/count.html.js +5 -0
- package/dist/avatar/examples/fallback.html +1 -1
- package/dist/avatar/examples/fallback.html.js +5 -0
- package/dist/avatar/examples/group.html +4 -4
- package/dist/avatar/examples/group.html.js +5 -0
- package/dist/avatar/examples/icon.html +2 -2
- package/dist/avatar/examples/icon.html.js +5 -0
- package/dist/avatar/examples/multiples.html +4 -4
- package/dist/avatar/examples/multiples.html.js +5 -0
- package/dist/avatar/examples/pills.html +12 -12
- package/dist/avatar/examples/pills.html.js +5 -0
- package/dist/avatar/examples/pillsolid.html +4 -4
- package/dist/avatar/examples/pillsolid.html.js +5 -0
- package/dist/avatar/examples/rounded.html +1 -1
- package/dist/avatar/examples/rounded.html.js +5 -0
- package/dist/avatar/examples/status.html +2 -2
- package/dist/avatar/examples/status.html.js +5 -0
- package/dist/avatar/examples/statusminimal.html +1 -1
- package/dist/avatar/examples/statusminimal.html.js +5 -0
- package/dist/avatar/examples/trusted.html +6 -6
- package/dist/avatar/examples/trusted.html.js +5 -0
- package/dist/avatar/examples/verification.html +3 -3
- package/dist/avatar/examples/verification.html.js +5 -0
- package/dist/carousel/carousel.events.d.ts +2 -3
- package/dist/carousel/carousel.machine.d.ts +3 -4
- package/dist/carousel/carousel.machine.js +1 -1
- package/dist/carousel/carousel.presentation.d.ts +14 -15
- package/dist/carousel/carousel.presentation.js +2 -2
- package/dist/carousel/carousel.state.d.ts +1 -2
- package/dist/carousel/carousel.state.js +1 -1
- package/dist/carousel/carousel.transitions.d.ts +2 -3
- package/dist/carousel/examples/autoplay.html +8 -8
- package/dist/carousel/examples/autoplay.html.js +5 -0
- package/dist/carousel/examples/basic.html +7 -7
- package/dist/carousel/examples/basic.html.js +5 -0
- package/dist/carousel/examples/cards.html +8 -8
- package/dist/carousel/examples/cards.html.js +5 -0
- package/dist/carousel/examples/hero.html +6 -6
- package/dist/carousel/examples/hero.html.js +5 -0
- package/dist/carousel/examples/infinite.html +7 -7
- package/dist/carousel/examples/infinite.html.js +5 -0
- package/dist/carousel/examples/minimal.html +5 -5
- package/dist/carousel/examples/minimal.html.js +5 -0
- package/dist/carousel/examples/testimonials.html +10 -10
- package/dist/carousel/examples/testimonials.html.js +5 -0
- package/dist/carousel/examples/thumbnails.html +8 -8
- package/dist/carousel/examples/thumbnails.html.js +5 -0
- package/dist/carousel/examples/vertical.html +8 -8
- package/dist/carousel/examples/vertical.html.js +5 -0
- package/dist/cascade-select/cascade.events.d.ts +2 -3
- package/dist/cascade-select/cascade.machine.d.ts +3 -4
- package/dist/cascade-select/cascade.machine.js +1 -1
- package/dist/cascade-select/cascade.presentation.d.ts +8 -9
- package/dist/cascade-select/cascade.presentation.js +12 -12
- package/dist/cascade-select/cascade.state.d.ts +1 -2
- package/dist/cascade-select/cascade.state.js +1 -1
- package/dist/cascade-select/cascade.transitions.d.ts +2 -3
- package/dist/cascade-select/examples/basic.html +13 -11
- package/dist/cascade-select/examples/basic.html.js +5 -0
- package/dist/color-picker/color-picker.events.d.ts +3 -4
- package/dist/color-picker/color-picker.machine.d.ts +3 -3
- package/dist/color-picker/color-picker.machine.js +1 -1
- package/dist/color-picker/color-picker.presentation.d.ts +18 -19
- package/dist/color-picker/color-picker.presentation.js +4 -5
- package/dist/color-picker/color-picker.state.d.ts +2 -3
- package/dist/color-picker/color-picker.state.js +2 -2
- package/dist/color-picker/color-picker.transitions.d.ts +3 -4
- package/dist/color-picker/color.d.ts +39 -0
- package/dist/color-picker/color.js +401 -0
- package/dist/color-picker/examples/basic.html +14 -14
- package/dist/color-picker/examples/basic.html.js +5 -0
- package/dist/color-picker/examples/hue-wheel.html +9 -9
- package/dist/color-picker/examples/hue-wheel.html.js +5 -0
- package/dist/color-picker/examples/inline.html +8 -8
- package/dist/color-picker/examples/inline.html.js +5 -0
- package/dist/color-picker/examples/with-presets.html +10 -10
- package/dist/color-picker/examples/with-presets.html.js +5 -0
- package/dist/combobox/combobox.events.d.ts +2 -3
- package/dist/combobox/combobox.machine.d.ts +3 -4
- package/dist/combobox/combobox.machine.js +1 -1
- package/dist/combobox/combobox.presentation.d.ts +8 -9
- package/dist/combobox/combobox.presentation.js +3 -3
- package/dist/combobox/combobox.state.d.ts +1 -2
- package/dist/combobox/combobox.state.js +1 -1
- package/dist/combobox/combobox.transitions.d.ts +3 -4
- package/dist/combobox/examples/basic.html +7 -7
- package/dist/combobox/examples/basic.html.js +5 -0
- package/dist/combobox/examples/directory.html +7 -7
- package/dist/combobox/examples/directory.html.js +5 -0
- package/dist/combobox/examples/grouping.html +7 -7
- package/dist/combobox/examples/grouping.html.js +5 -0
- package/dist/combobox/examples/multiple.html +8 -8
- package/dist/combobox/examples/multiple.html.js +5 -0
- package/dist/compiler/emit.d.ts +6 -0
- package/dist/compiler/emit.js +217 -0
- package/dist/compiler/transform.d.ts +52 -0
- package/dist/compiler/transform.js +169 -0
- package/dist/controller.d.ts +2 -3
- package/dist/controller.js +1 -1
- package/dist/date-input/date-input.events.d.ts +2 -3
- package/dist/date-input/date-input.machine.d.ts +3 -3
- package/dist/date-input/date-input.machine.js +1 -1
- package/dist/date-input/date-input.presentation.d.ts +6 -7
- package/dist/date-input/date-input.presentation.js +1 -1
- package/dist/date-input/date-input.state.d.ts +1 -2
- package/dist/date-input/date-input.state.js +1 -1
- package/dist/date-input/date-input.transitions.d.ts +3 -4
- package/dist/date-input/examples/basic.html +3 -3
- package/dist/date-input/examples/basic.html.js +5 -0
- package/dist/date-picker/date-picker.events.d.ts +2 -3
- package/dist/date-picker/date-picker.machine.d.ts +2 -3
- package/dist/date-picker/date-picker.machine.js +1 -1
- package/dist/date-picker/date-picker.presentation.d.ts +14 -15
- package/dist/date-picker/date-picker.presentation.js +2 -2
- package/dist/date-picker/date-picker.state.d.ts +1 -2
- package/dist/date-picker/date-picker.state.js +1 -1
- package/dist/date-picker/date-picker.transitions.d.ts +3 -4
- package/dist/date-picker/examples/appointment.html +7 -7
- package/dist/date-picker/examples/appointment.html.js +5 -0
- package/dist/date-picker/examples/basic.html.js +5 -0
- package/dist/date-picker/examples/multiple.html.js +5 -0
- package/dist/date-picker/examples/pricing.html.js +5 -0
- package/dist/date-picker/examples/range.html.js +5 -0
- package/dist/date-picker/examples/unavailable.html.js +5 -0
- package/dist/editable/editable.events.d.ts +2 -3
- package/dist/editable/editable.machine.d.ts +3 -4
- package/dist/editable/editable.machine.js +1 -1
- package/dist/editable/editable.presentation.d.ts +6 -7
- package/dist/editable/editable.presentation.js +1 -1
- package/dist/editable/editable.state.d.ts +1 -2
- package/dist/editable/editable.state.js +1 -1
- package/dist/editable/editable.transitions.d.ts +3 -4
- package/dist/editable/examples/basic.html +7 -7
- package/dist/editable/examples/basic.html.js +5 -0
- package/dist/editable/examples/doubleclick.html +6 -6
- package/dist/editable/examples/doubleclick.html.js +5 -0
- package/dist/editable/examples/inline-edit.html +4 -4
- package/dist/editable/examples/inline-edit.html.js +5 -0
- package/dist/editable/examples/profile-field.html +7 -7
- package/dist/editable/examples/profile-field.html.js +5 -0
- package/dist/editable/examples/resize.html +6 -6
- package/dist/editable/examples/resize.html.js +5 -0
- package/dist/editable/examples/task-item.html +7 -7
- package/dist/editable/examples/task-item.html.js +5 -0
- package/dist/editable/examples/title-editor.html +3 -3
- package/dist/editable/examples/title-editor.html.js +5 -0
- package/dist/editable/examples/with-controls.html +4 -4
- package/dist/editable/examples/with-controls.html.js +5 -0
- package/dist/examples.d.ts +22 -0
- package/dist/examples.js +501 -0
- package/dist/file-upload/examples/avatar.html +8 -8
- package/dist/file-upload/examples/avatar.html.js +5 -0
- package/dist/file-upload/examples/basic.html +8 -8
- package/dist/file-upload/examples/basic.html.js +5 -0
- package/dist/file-upload/examples/directory.html +8 -8
- package/dist/file-upload/examples/directory.html.js +5 -0
- package/dist/file-upload/examples/dragdrop.html +8 -8
- package/dist/file-upload/examples/dragdrop.html.js +5 -0
- package/dist/file-upload/examples/files.html +9 -9
- package/dist/file-upload/examples/files.html.js +5 -0
- package/dist/file-upload/examples/images.html +8 -8
- package/dist/file-upload/examples/images.html.js +5 -0
- package/dist/file-upload/examples/paste.html +8 -8
- package/dist/file-upload/examples/paste.html.js +5 -0
- package/dist/file-upload/examples/table.html +7 -7
- package/dist/file-upload/examples/table.html.js +5 -0
- package/dist/file-upload/file-upload.events.d.ts +2 -3
- package/dist/file-upload/file-upload.machine.d.ts +5 -3
- package/dist/file-upload/file-upload.machine.js +1 -1
- package/dist/file-upload/file-upload.presentation.d.ts +10 -11
- package/dist/file-upload/file-upload.presentation.js +1 -1
- package/dist/file-upload/file-upload.state.d.ts +1 -2
- package/dist/file-upload/file-upload.state.js +1 -1
- package/dist/file-upload/file-upload.transitions.d.ts +3 -4
- package/dist/floating-panel/examples/basic.html +22 -23
- package/dist/floating-panel/examples/basic.html.js +5 -0
- package/dist/floating-panel/examples/calculator.html +41 -41
- package/dist/floating-panel/examples/calculator.html.js +5 -0
- package/dist/floating-panel/examples/chat.html +29 -29
- package/dist/floating-panel/examples/chat.html.js +5 -0
- package/dist/floating-panel/examples/media-player.html +27 -27
- package/dist/floating-panel/examples/media-player.html.js +5 -0
- package/dist/floating-panel/examples/notes.html +36 -36
- package/dist/floating-panel/examples/notes.html.js +5 -0
- package/dist/floating-panel/examples/settings.html +34 -34
- package/dist/floating-panel/examples/settings.html.js +5 -0
- package/dist/floating-panel/examples/task.html +40 -40
- package/dist/floating-panel/examples/task.html.js +5 -0
- package/dist/floating-panel/examples/video-call.html +25 -25
- package/dist/floating-panel/examples/video-call.html.js +5 -0
- package/dist/floating-panel/floating-panel.events.d.ts +2 -3
- package/dist/floating-panel/floating-panel.machine.d.ts +2 -3
- package/dist/floating-panel/floating-panel.machine.js +1 -1
- package/dist/floating-panel/floating-panel.presentation.d.ts +11 -13
- package/dist/floating-panel/floating-panel.presentation.js +3 -6
- package/dist/floating-panel/floating-panel.state.d.ts +1 -2
- package/dist/floating-panel/floating-panel.state.js +1 -1
- package/dist/floating-panel/floating-panel.transitions.d.ts +3 -4
- package/dist/hover-card/examples/basic.html +5 -5
- package/dist/hover-card/examples/basic.html.js +5 -0
- package/dist/hover-card/examples/controlled.html +9 -10
- package/dist/hover-card/examples/controlled.html.js +5 -0
- package/dist/hover-card/examples/custom-positioning.html +8 -8
- package/dist/hover-card/examples/custom-positioning.html.js +5 -0
- package/dist/hover-card/examples/link.html +2 -2
- package/dist/hover-card/examples/link.html.js +5 -0
- package/dist/hover-card/examples/product.html +9 -9
- package/dist/hover-card/examples/product.html.js +5 -0
- package/dist/hover-card/examples/user.html +11 -11
- package/dist/hover-card/examples/user.html.js +5 -0
- package/dist/hover-card/examples/with-arrow.html +9 -9
- package/dist/hover-card/examples/with-arrow.html.js +5 -0
- package/dist/hover-card/hover-card.controller-def.d.ts +2 -4
- package/dist/hover-card/hover-card.controller-def.js +1 -1
- package/dist/image-cropper/crop-geometry.d.ts +1 -2
- package/dist/image-cropper/crop-geometry.js +1 -1
- package/dist/image-cropper/examples/basic.html +3 -3
- package/dist/image-cropper/examples/basic.html.js +5 -0
- package/dist/image-cropper/examples/circle.html +3 -3
- package/dist/image-cropper/examples/circle.html.js +5 -0
- package/dist/image-cropper/image-cropper.events.d.ts +2 -3
- package/dist/image-cropper/image-cropper.machine.d.ts +3 -4
- package/dist/image-cropper/image-cropper.machine.js +2 -2
- package/dist/image-cropper/image-cropper.presentation.d.ts +7 -8
- package/dist/image-cropper/image-cropper.presentation.js +2 -2
- package/dist/image-cropper/image-cropper.state.d.ts +1 -2
- package/dist/image-cropper/image-cropper.state.js +1 -1
- package/dist/image-cropper/image-cropper.transitions.d.ts +3 -4
- package/dist/index.d.ts +28 -13
- package/dist/index.js +21 -14
- package/dist/listbox/examples/basic.html +9 -9
- package/dist/listbox/examples/basic.html.js +5 -0
- package/dist/listbox/examples/controlled.html +9 -9
- package/dist/listbox/examples/controlled.html.js +5 -0
- package/dist/listbox/examples/countries.html +9 -9
- package/dist/listbox/examples/countries.html.js +5 -0
- package/dist/listbox/examples/grouped.html +9 -9
- package/dist/listbox/examples/grouped.html.js +5 -0
- package/dist/listbox/examples/icons.html +10 -10
- package/dist/listbox/examples/icons.html.js +5 -0
- package/dist/listbox/examples/multiple.html +9 -9
- package/dist/listbox/examples/multiple.html.js +5 -0
- package/dist/listbox/examples/priority.html +9 -9
- package/dist/listbox/examples/priority.html.js +5 -0
- package/dist/listbox/examples/settings.html +9 -9
- package/dist/listbox/examples/settings.html.js +5 -0
- package/dist/listbox/listbox.events.d.ts +2 -3
- package/dist/listbox/listbox.machine.d.ts +2 -3
- package/dist/listbox/listbox.machine.js +1 -1
- package/dist/listbox/listbox.presentation.d.ts +6 -5
- package/dist/listbox/listbox.presentation.js +1 -1
- package/dist/listbox/listbox.state.d.ts +1 -2
- package/dist/listbox/listbox.state.js +1 -1
- package/dist/listbox/listbox.transitions.d.ts +3 -4
- package/dist/menu/examples/basic.html +15 -13
- package/dist/menu/examples/basic.html.js +5 -0
- package/dist/menu/examples/context.html +14 -12
- package/dist/menu/examples/context.html.js +5 -0
- package/dist/menu/examples/groups.html +15 -13
- package/dist/menu/examples/groups.html.js +5 -0
- package/dist/menu/examples/icons.html +17 -15
- package/dist/menu/examples/icons.html.js +5 -0
- package/dist/menu/examples/nested.html +15 -13
- package/dist/menu/examples/nested.html.js +5 -0
- package/dist/menu/examples/user.html +21 -19
- package/dist/menu/examples/user.html.js +5 -0
- package/dist/menu/menu.events.d.ts +2 -3
- package/dist/menu/menu.machine.d.ts +2 -3
- package/dist/menu/menu.machine.js +1 -1
- package/dist/menu/menu.presentation.d.ts +6 -8
- package/dist/menu/menu.presentation.js +4 -5
- package/dist/menu/menu.state.d.ts +1 -2
- package/dist/menu/menu.state.js +1 -1
- package/dist/mode-picker/examples/basic.html +1 -1
- package/dist/mode-picker/examples/basic.html.js +5 -0
- package/dist/mode-picker/examples/minimal.html +1 -1
- package/dist/mode-picker/examples/minimal.html.js +5 -0
- package/dist/mode-picker/examples/pill.html +1 -1
- package/dist/mode-picker/examples/pill.html.js +5 -0
- package/dist/mode-picker/mode-picker.events.d.ts +2 -3
- package/dist/mode-picker/mode-picker.machine.d.ts +3 -3
- package/dist/mode-picker/mode-picker.machine.js +1 -1
- package/dist/mode-picker/mode-picker.presentation.d.ts +7 -8
- package/dist/mode-picker/mode-picker.presentation.js +2 -2
- package/dist/mode-picker/mode-picker.state.d.ts +1 -2
- package/dist/mode-picker/mode-picker.transitions.d.ts +3 -4
- package/dist/navigation-menu/examples/basic.html +6 -6
- package/dist/navigation-menu/examples/basic.html.js +5 -0
- package/dist/navigation-menu/examples/grouped.html +14 -12
- package/dist/navigation-menu/examples/grouped.html.js +5 -0
- package/dist/navigation-menu/examples/minimal.html +7 -5
- package/dist/navigation-menu/examples/minimal.html.js +5 -0
- package/dist/navigation-menu/navigation-menu.events.d.ts +2 -3
- package/dist/navigation-menu/navigation-menu.machine.d.ts +3 -3
- package/dist/navigation-menu/navigation-menu.machine.js +1 -1
- package/dist/navigation-menu/navigation-menu.presentation.d.ts +6 -7
- package/dist/navigation-menu/navigation-menu.presentation.js +2 -2
- package/dist/navigation-menu/navigation-menu.state.d.ts +1 -2
- package/dist/navigation-menu/navigation-menu.state.js +1 -1
- package/dist/navigation-menu/navigation-menu.transitions.d.ts +3 -4
- package/dist/number-input/examples/basic.html +10 -10
- package/dist/number-input/examples/basic.html.js +5 -0
- package/dist/number-input/examples/currency.html +6 -6
- package/dist/number-input/examples/currency.html.js +5 -0
- package/dist/number-input/examples/decimal.html +4 -4
- package/dist/number-input/examples/decimal.html.js +5 -0
- package/dist/number-input/examples/limits.html +6 -6
- package/dist/number-input/examples/limits.html.js +5 -0
- package/dist/number-input/examples/percentage.html +6 -6
- package/dist/number-input/examples/percentage.html.js +5 -0
- package/dist/number-input/examples/quantity.html +6 -6
- package/dist/number-input/examples/quantity.html.js +5 -0
- package/dist/number-input/examples/scrubber.html +11 -11
- package/dist/number-input/examples/scrubber.html.js +5 -0
- package/dist/number-input/examples/wheel.html +7 -7
- package/dist/number-input/examples/wheel.html.js +5 -0
- package/dist/number-input/number-input.events.d.ts +2 -3
- package/dist/number-input/number-input.machine.d.ts +4 -4
- package/dist/number-input/number-input.machine.js +1 -1
- package/dist/number-input/number-input.presentation.d.ts +7 -8
- package/dist/number-input/number-input.presentation.js +4 -4
- package/dist/number-input/number-input.state.d.ts +1 -2
- package/dist/number-input/number-input.state.js +1 -1
- package/dist/number-input/number-input.transitions.d.ts +3 -4
- package/dist/pagination/examples/basic.html +2 -2
- package/dist/pagination/examples/basic.html.js +5 -0
- package/dist/pagination/examples/dropdown.html +2 -2
- package/dist/pagination/examples/dropdown.html.js +5 -0
- package/dist/pagination/examples/info.html +3 -3
- package/dist/pagination/examples/info.html.js +5 -0
- package/dist/pagination/examples/jump.html +2 -2
- package/dist/pagination/examples/jump.html.js +5 -0
- package/dist/pagination/examples/numbered.html +2 -2
- package/dist/pagination/examples/numbered.html.js +5 -0
- package/dist/pagination/examples/pagesize.html +4 -4
- package/dist/pagination/examples/pagesize.html.js +5 -0
- package/dist/pagination/pagination.events.d.ts +2 -3
- package/dist/pagination/pagination.machine.d.ts +4 -4
- package/dist/pagination/pagination.machine.js +1 -1
- package/dist/pagination/pagination.presentation.d.ts +4 -5
- package/dist/pagination/pagination.presentation.js +1 -1
- package/dist/pagination/pagination.state.d.ts +1 -2
- package/dist/pagination/pagination.state.js +1 -1
- package/dist/pagination/pagination.transitions.d.ts +2 -3
- package/dist/pin-input/examples/basic.html +2 -2
- package/dist/pin-input/examples/basic.html.js +5 -0
- package/dist/pin-input/examples/field.html +4 -4
- package/dist/pin-input/examples/field.html.js +5 -0
- package/dist/pin-input/examples/masked.html +3 -3
- package/dist/pin-input/examples/masked.html.js +5 -0
- package/dist/pin-input/examples/placeholder.html +3 -3
- package/dist/pin-input/examples/placeholder.html.js +5 -0
- package/dist/pin-input/examples/twofactor.html +4 -4
- package/dist/pin-input/examples/twofactor.html.js +5 -0
- package/dist/pin-input/examples/verification.html +6 -6
- package/dist/pin-input/examples/verification.html.js +5 -0
- package/dist/pin-input/pin-input.events.d.ts +2 -3
- package/dist/pin-input/pin-input.machine.d.ts +3 -3
- package/dist/pin-input/pin-input.machine.js +1 -1
- package/dist/pin-input/pin-input.presentation.d.ts +4 -5
- package/dist/pin-input/pin-input.presentation.js +2 -2
- package/dist/pin-input/pin-input.state.d.ts +1 -2
- package/dist/pin-input/pin-input.state.js +1 -1
- package/dist/pin-input/pin-input.transitions.d.ts +1 -2
- package/dist/popover/examples/basic.html +4 -4
- package/dist/popover/examples/basic.html.js +5 -0
- package/dist/popover/examples/feedback.html +5 -5
- package/dist/popover/examples/feedback.html.js +5 -0
- package/dist/popover/examples/notifications.html +5 -5
- package/dist/popover/examples/notifications.html.js +5 -0
- package/dist/popover/examples/settings.html +8 -8
- package/dist/popover/examples/settings.html.js +5 -0
- package/dist/popover/examples/share.html +5 -5
- package/dist/popover/examples/share.html.js +5 -0
- package/dist/popover/examples/user.html +10 -10
- package/dist/popover/examples/user.html.js +5 -0
- package/dist/popover/popover.controller-def.d.ts +2 -4
- package/dist/popover/popover.controller-def.js +1 -1
- package/dist/rating-group/examples/basic.html +9 -9
- package/dist/rating-group/examples/basic.html.js +5 -0
- package/dist/rating-group/examples/movie.html +11 -11
- package/dist/rating-group/examples/movie.html.js +5 -0
- package/dist/rating-group/examples/product-review.html +13 -13
- package/dist/rating-group/examples/product-review.html.js +5 -0
- package/dist/rating-group/examples/service-evaluation.html +5 -5
- package/dist/rating-group/examples/service-evaluation.html.js +5 -0
- package/dist/rating-group/rating-group.events.d.ts +2 -3
- package/dist/rating-group/rating-group.machine.d.ts +2 -3
- package/dist/rating-group/rating-group.machine.js +1 -1
- package/dist/rating-group/rating-group.presentation.d.ts +6 -7
- package/dist/rating-group/rating-group.presentation.js +2 -2
- package/dist/rating-group/rating-group.state.d.ts +1 -2
- package/dist/rating-group/rating-group.state.js +1 -1
- package/dist/rating-group/rating-group.transitions.d.ts +3 -4
- package/dist/react/react.d.ts +2 -3
- package/dist/runtime/actions/action.d.ts +64 -0
- package/dist/runtime/actions/action.js +45 -0
- package/dist/runtime/actions/anchor.d.ts +43 -0
- package/dist/runtime/actions/anchor.js +127 -0
- package/dist/runtime/actions/date-picker-focus.d.ts +19 -0
- package/dist/runtime/actions/date-picker-focus.js +16 -0
- package/dist/runtime/actions/drag.d.ts +66 -0
- package/dist/runtime/actions/drag.js +118 -0
- package/dist/runtime/actions/form-control.d.ts +18 -0
- package/dist/runtime/actions/form-control.js +41 -0
- package/dist/runtime/actions/hover-delay.d.ts +26 -0
- package/dist/runtime/actions/hover-delay.js +61 -0
- package/dist/runtime/actions/index.d.ts +113 -0
- package/dist/runtime/actions/index.js +240 -0
- package/dist/runtime/actions/infinite-scroll.d.ts +22 -0
- package/dist/runtime/actions/infinite-scroll.js +33 -0
- package/dist/runtime/actions/interact-outside.d.ts +43 -0
- package/dist/runtime/actions/interact-outside.js +72 -0
- package/dist/runtime/actions/observe.d.ts +27 -0
- package/dist/runtime/actions/observe.js +25 -0
- package/dist/runtime/actions/scroll-into-view.d.ts +32 -0
- package/dist/runtime/actions/scroll-into-view.js +36 -0
- package/dist/runtime/actions/select-focus.d.ts +17 -0
- package/dist/runtime/actions/select-focus.js +16 -0
- package/dist/runtime/actions/select-options.d.ts +25 -0
- package/dist/runtime/actions/select-options.js +27 -0
- package/dist/runtime/actions/toast-actions.d.ts +65 -0
- package/dist/runtime/actions/toast-actions.js +143 -0
- package/dist/runtime/aria.d.ts +231 -0
- package/dist/runtime/aria.js +193 -0
- package/dist/runtime/component/define.d.ts +242 -0
- package/dist/runtime/component/define.js +12 -0
- package/dist/runtime/component/ids.d.ts +14 -0
- package/dist/runtime/component/ids.js +35 -0
- package/dist/runtime/component/synthesize.d.ts +32 -0
- package/dist/runtime/component/synthesize.js +385 -0
- package/dist/runtime/core/signal.d.ts +57 -0
- package/dist/runtime/core/signal.js +100 -0
- package/dist/runtime/core/style.d.ts +14 -0
- package/dist/runtime/core/style.js +31 -0
- package/dist/runtime/directives/bind.d.ts +38 -0
- package/dist/runtime/directives/bind.js +244 -0
- package/dist/runtime/directives/for.d.ts +12 -0
- package/dist/runtime/directives/for.js +104 -0
- package/dist/runtime/directives/if.d.ts +10 -0
- package/dist/runtime/directives/if.js +45 -0
- package/dist/runtime/directives/load.d.ts +13 -0
- package/dist/runtime/directives/load.js +119 -0
- package/dist/runtime/directives/spread.d.ts +17 -0
- package/dist/runtime/directives/spread.js +121 -0
- package/dist/runtime/directives/tpl.d.ts +11 -0
- package/dist/runtime/directives/tpl.js +39 -0
- package/dist/runtime/directives/use.d.ts +13 -0
- package/dist/runtime/directives/use.js +34 -0
- package/dist/runtime/index.d.ts +101 -0
- package/dist/runtime/index.js +40 -0
- package/dist/runtime/machine/fsm/machine.d.ts +192 -0
- package/dist/runtime/machine/fsm/machine.js +248 -0
- package/dist/runtime/math/index.d.ts +2 -0
- package/dist/runtime/math/index.js +1 -0
- package/dist/runtime/math/numbers.d.ts +58 -0
- package/dist/runtime/math/numbers.js +115 -0
- package/dist/runtime/props.d.ts +61 -0
- package/dist/runtime/props.js +113 -0
- package/dist/runtime/scope/element.d.ts +86 -0
- package/dist/runtime/scope/element.js +226 -0
- package/dist/runtime/scope/table.d.ts +55 -0
- package/dist/runtime/scope/table.js +174 -0
- package/dist/runtime/syntax/braces.d.ts +2 -0
- package/dist/runtime/syntax/braces.js +35 -0
- package/dist/runtime/syntax/classes.d.ts +22 -0
- package/dist/runtime/syntax/classes.js +119 -0
- package/dist/runtime/syntax/display.d.ts +25 -0
- package/dist/runtime/syntax/display.js +344 -0
- package/dist/runtime/syntax/expand-groups.d.ts +12 -0
- package/dist/runtime/syntax/expand-groups.js +31 -0
- package/dist/runtime/syntax/ir.d.ts +76 -0
- package/dist/runtime/syntax/ir.js +11 -0
- package/dist/runtime/syntax/parse.d.ts +2 -0
- package/dist/runtime/syntax/parse.js +407 -0
- package/dist/runtime/syntax/script-block.d.ts +43 -0
- package/dist/runtime/syntax/script-block.js +190 -0
- package/dist/runtime/testing.d.ts +11 -0
- package/dist/runtime/testing.js +1 -0
- package/dist/select/examples/basic.html +9 -9
- package/dist/select/examples/basic.html.js +5 -0
- package/dist/select/examples/category.html +10 -10
- package/dist/select/examples/category.html.js +5 -0
- package/dist/select/examples/country.html +10 -10
- package/dist/select/examples/country.html.js +5 -0
- package/dist/select/examples/language.html.js +5 -0
- package/dist/select/examples/multiple.html.js +5 -0
- package/dist/select/examples/profile.html +10 -10
- package/dist/select/examples/profile.html.js +5 -0
- package/dist/select/examples/theme.html.js +5 -0
- package/dist/select/examples/with-overlapping-label.html +8 -8
- package/dist/select/examples/with-overlapping-label.html.js +5 -0
- package/dist/select/select.events.d.ts +2 -3
- package/dist/select/select.machine.d.ts +2 -3
- package/dist/select/select.machine.js +1 -1
- package/dist/select/select.presentation.d.ts +16 -20
- package/dist/select/select.presentation.js +6 -6
- package/dist/select/select.shared.d.ts +1 -2
- package/dist/select/select.state.d.ts +1 -2
- package/dist/select/select.state.js +1 -1
- package/dist/select/select.transitions.d.ts +2 -3
- package/dist/shared/keyboard.d.ts +1 -2
- package/dist/signature-pad/examples/basic.html +3 -3
- package/dist/signature-pad/examples/basic.html.js +5 -0
- package/dist/signature-pad/examples/contract.html +7 -7
- package/dist/signature-pad/examples/contract.html.js +5 -0
- package/dist/signature-pad/examples/receipt.html +8 -8
- package/dist/signature-pad/examples/receipt.html.js +5 -0
- package/dist/signature-pad/examples/with-preview.html +6 -6
- package/dist/signature-pad/examples/with-preview.html.js +5 -0
- package/dist/signature-pad/signature-pad.events.d.ts +2 -3
- package/dist/signature-pad/signature-pad.machine.d.ts +4 -4
- package/dist/signature-pad/signature-pad.machine.js +2 -2
- package/dist/signature-pad/signature-pad.presentation.d.ts +10 -11
- package/dist/signature-pad/signature-pad.presentation.js +2 -2
- package/dist/signature-pad/signature-pad.state.d.ts +1 -2
- package/dist/signature-pad/signature-pad.state.js +1 -1
- package/dist/signature-pad/signature-pad.transitions.d.ts +3 -4
- package/dist/slider/examples/basic.html +1 -1
- package/dist/slider/examples/basic.html.js +5 -0
- package/dist/slider/examples/equalizer.html +13 -13
- package/dist/slider/examples/equalizer.html.js +5 -0
- package/dist/slider/examples/fractional.html.js +5 -0
- package/dist/slider/examples/marks.html +2 -2
- package/dist/slider/examples/marks.html.js +5 -0
- package/dist/slider/examples/range.html +1 -1
- package/dist/slider/examples/range.html.js +5 -0
- package/dist/slider/examples/stepped.html.js +5 -0
- package/dist/slider/examples/ticks.html +2 -2
- package/dist/slider/examples/ticks.html.js +5 -0
- package/dist/slider/examples/vertical.html.js +5 -0
- package/dist/slider/slider.events.d.ts +2 -3
- package/dist/slider/slider.machine.d.ts +3 -3
- package/dist/slider/slider.machine.js +2 -2
- package/dist/slider/slider.presentation.d.ts +8 -9
- package/dist/slider/slider.presentation.js +2 -2
- package/dist/slider/slider.state.d.ts +1 -2
- package/dist/slider/slider.state.js +1 -1
- package/dist/slider/slider.transitions.d.ts +3 -4
- package/dist/slider/slider.transitions.js +1 -1
- package/dist/solid/solid.d.ts +2 -3
- package/dist/spin-element.d.ts +1 -2
- package/dist/spin-element.js +1 -1
- package/dist/splitter/examples/basic.html +2 -2
- package/dist/splitter/examples/basic.html.js +5 -0
- package/dist/splitter/examples/nested.html +4 -4
- package/dist/splitter/examples/nested.html.js +5 -0
- package/dist/splitter/examples/threepanels.html +2 -2
- package/dist/splitter/examples/threepanels.html.js +5 -0
- package/dist/splitter/examples/vertical.html +2 -2
- package/dist/splitter/examples/vertical.html.js +5 -0
- package/dist/splitter/splitter.events.d.ts +2 -3
- package/dist/splitter/splitter.machine.d.ts +2 -3
- package/dist/splitter/splitter.machine.js +1 -1
- package/dist/splitter/splitter.presentation.d.ts +5 -6
- package/dist/splitter/splitter.presentation.js +1 -1
- package/dist/splitter/splitter.state.d.ts +1 -2
- package/dist/splitter/splitter.state.js +1 -1
- package/dist/splitter/splitter.transitions.d.ts +2 -3
- package/dist/steps/examples/basic.html +5 -5
- package/dist/steps/examples/basic.html.js +5 -0
- package/dist/steps/examples/checkmarks.html +4 -4
- package/dist/steps/examples/checkmarks.html.js +5 -0
- package/dist/steps/examples/content.html +5 -5
- package/dist/steps/examples/content.html.js +5 -0
- package/dist/steps/examples/descriptions.html +2 -2
- package/dist/steps/examples/descriptions.html.js +5 -0
- package/dist/steps/examples/icons.html +2 -2
- package/dist/steps/examples/icons.html.js +5 -0
- package/dist/steps/examples/lines.html +2 -2
- package/dist/steps/examples/lines.html.js +5 -0
- package/dist/steps/examples/navigation.html +4 -4
- package/dist/steps/examples/navigation.html.js +5 -0
- package/dist/steps/examples/onboarding.html +4 -4
- package/dist/steps/examples/onboarding.html.js +5 -0
- package/dist/steps/examples/progress.html +3 -3
- package/dist/steps/examples/progress.html.js +5 -0
- package/dist/steps/examples/segmented.html +6 -6
- package/dist/steps/examples/segmented.html.js +5 -0
- package/dist/steps/examples/vertical.html +5 -5
- package/dist/steps/examples/vertical.html.js +5 -0
- package/dist/steps/examples/verticallabels.html +2 -2
- package/dist/steps/examples/verticallabels.html.js +5 -0
- package/dist/steps/examples/verticalnavigation.html +2 -2
- package/dist/steps/examples/verticalnavigation.html.js +5 -0
- package/dist/steps/steps.events.d.ts +2 -3
- package/dist/steps/steps.machine.d.ts +3 -3
- package/dist/steps/steps.machine.js +1 -1
- package/dist/steps/steps.presentation.d.ts +4 -5
- package/dist/steps/steps.presentation.js +1 -1
- package/dist/steps/steps.state.d.ts +1 -2
- package/dist/steps/steps.state.js +1 -1
- package/dist/steps/steps.transitions.d.ts +3 -4
- package/dist/tabs/examples/basic.html +2 -2
- package/dist/tabs/examples/basic.html.js +5 -0
- package/dist/tabs/examples/dashboard.html +42 -42
- package/dist/tabs/examples/dashboard.html.js +5 -0
- package/dist/tabs/examples/ghost.html +2 -2
- package/dist/tabs/examples/ghost.html.js +5 -0
- package/dist/tabs/examples/icon-above.html +6 -6
- package/dist/tabs/examples/icon-above.html.js +5 -0
- package/dist/tabs/examples/icon-only.html +3 -3
- package/dist/tabs/examples/icon-only.html.js +5 -0
- package/dist/tabs/examples/outline-with-icons.html +6 -6
- package/dist/tabs/examples/outline-with-icons.html.js +5 -0
- package/dist/tabs/examples/outline.html +3 -3
- package/dist/tabs/examples/outline.html.js +5 -0
- package/dist/tabs/examples/pills.html +2 -2
- package/dist/tabs/examples/pills.html.js +5 -0
- package/dist/tabs/examples/project.html +33 -33
- package/dist/tabs/examples/project.html.js +5 -0
- package/dist/tabs/examples/settings.html +35 -35
- package/dist/tabs/examples/settings.html.js +5 -0
- package/dist/tabs/examples/stack-with-icons.html +7 -7
- package/dist/tabs/examples/stack-with-icons.html.js +5 -0
- package/dist/tabs/examples/stack.html +3 -3
- package/dist/tabs/examples/stack.html.js +5 -0
- package/dist/tabs/examples/underline.html +3 -3
- package/dist/tabs/examples/underline.html.js +5 -0
- package/dist/tabs/examples/vertical-ghost.html +3 -3
- package/dist/tabs/examples/vertical-ghost.html.js +5 -0
- package/dist/tabs/examples/vertical-icons.html +5 -5
- package/dist/tabs/examples/vertical-icons.html.js +5 -0
- package/dist/tabs/examples/vertical-underline.html +4 -4
- package/dist/tabs/examples/vertical-underline.html.js +5 -0
- package/dist/tabs/examples/vertical-with-icons.html +6 -6
- package/dist/tabs/examples/vertical-with-icons.html.js +5 -0
- package/dist/tabs/examples/vertical.html +2 -2
- package/dist/tabs/examples/vertical.html.js +5 -0
- package/dist/tabs/examples/with-badges.html +3 -3
- package/dist/tabs/examples/with-badges.html.js +5 -0
- package/dist/tabs/examples/with-icons.html +4 -4
- package/dist/tabs/examples/with-icons.html.js +5 -0
- package/dist/tabs/tabs.events.d.ts +2 -3
- package/dist/tabs/tabs.machine.d.ts +3 -3
- package/dist/tabs/tabs.machine.js +1 -1
- package/dist/tabs/tabs.presentation.d.ts +6 -7
- package/dist/tabs/tabs.presentation.js +1 -1
- package/dist/tabs/tabs.state.d.ts +1 -2
- package/dist/tabs/tabs.state.js +1 -1
- package/dist/tabs/tabs.transitions.d.ts +3 -4
- package/dist/tags-input/examples/basic.html +9 -9
- package/dist/tags-input/examples/basic.html.js +5 -0
- package/dist/tags-input/examples/with-combobox.html +14 -14
- package/dist/tags-input/examples/with-combobox.html.js +5 -0
- package/dist/tags-input/tags.events.d.ts +2 -3
- package/dist/tags-input/tags.machine.d.ts +6 -4
- package/dist/tags-input/tags.machine.js +2 -2
- package/dist/tags-input/tags.presentation.d.ts +6 -7
- package/dist/tags-input/tags.presentation.js +1 -1
- package/dist/tags-input/tags.state.d.ts +1 -2
- package/dist/tags-input/tags.state.js +2 -2
- package/dist/tags-input/tags.transitions.d.ts +2 -3
- package/dist/theme-picker/examples/basic.html +6 -6
- package/dist/theme-picker/examples/basic.html.js +5 -0
- package/dist/theme-picker/examples/cards.html +4 -4
- package/dist/theme-picker/examples/cards.html.js +5 -0
- package/dist/theme-picker/examples/compact.html +3 -3
- package/dist/theme-picker/examples/compact.html.js +5 -0
- package/dist/theme-picker/examples/swatches.html +2 -2
- package/dist/theme-picker/examples/swatches.html.js +5 -0
- package/dist/theme-picker/theme-picker.events.d.ts +2 -3
- package/dist/theme-picker/theme-picker.machine.d.ts +3 -3
- package/dist/theme-picker/theme-picker.machine.js +1 -1
- package/dist/theme-picker/theme-picker.presentation.d.ts +9 -10
- package/dist/theme-picker/theme-picker.presentation.js +2 -2
- package/dist/theme-picker/theme-picker.state.d.ts +1 -2
- package/dist/theme-picker/theme-picker.transitions.d.ts +3 -4
- package/dist/timer/examples/basic.html +1 -1
- package/dist/timer/examples/basic.html.js +5 -0
- package/dist/timer/examples/card.html +4 -4
- package/dist/timer/examples/card.html.js +5 -0
- package/dist/timer/examples/compact.html +5 -5
- package/dist/timer/examples/compact.html.js +5 -0
- package/dist/timer/examples/countdown.html +3 -3
- package/dist/timer/examples/countdown.html.js +5 -0
- package/dist/timer/examples/labels.html +3 -3
- package/dist/timer/examples/labels.html.js +5 -0
- package/dist/timer/examples/large.html +2 -2
- package/dist/timer/examples/large.html.js +5 -0
- package/dist/timer/examples/minimal.html +1 -1
- package/dist/timer/examples/minimal.html.js +5 -0
- package/dist/timer/examples/pomodoro.html +3 -3
- package/dist/timer/examples/pomodoro.html.js +5 -0
- package/dist/timer/examples/workout.html +4 -4
- package/dist/timer/examples/workout.html.js +5 -0
- package/dist/timer/timer.events.d.ts +2 -3
- package/dist/timer/timer.machine.d.ts +2 -3
- package/dist/timer/timer.machine.js +1 -1
- package/dist/timer/timer.presentation.d.ts +7 -8
- package/dist/timer/timer.presentation.js +1 -1
- package/dist/timer/timer.state.d.ts +1 -2
- package/dist/timer/timer.state.js +1 -1
- package/dist/timer/timer.transitions.d.ts +2 -3
- package/dist/toast/examples/action.html +3 -3
- package/dist/toast/examples/action.html.js +5 -0
- package/dist/toast/examples/basic.html +3 -3
- package/dist/toast/examples/basic.html.js +5 -0
- package/dist/toast/examples/bottomcenter.html +3 -3
- package/dist/toast/examples/bottomcenter.html.js +5 -0
- package/dist/toast/examples/bottomleft.html +3 -3
- package/dist/toast/examples/bottomleft.html.js +5 -0
- package/dist/toast/examples/bottomright.html +3 -3
- package/dist/toast/examples/bottomright.html.js +5 -0
- package/dist/toast/examples/duration.html +3 -3
- package/dist/toast/examples/duration.html.js +5 -0
- package/dist/toast/examples/promise.html +6 -6
- package/dist/toast/examples/promise.html.js +5 -0
- package/dist/toast/examples/topcenter.html +3 -3
- package/dist/toast/examples/topcenter.html.js +5 -0
- package/dist/toast/examples/topleft.html +3 -3
- package/dist/toast/examples/topleft.html.js +5 -0
- package/dist/toast/examples/topright.html +3 -3
- package/dist/toast/examples/topright.html.js +5 -0
- package/dist/toast/examples/types.html +3 -3
- package/dist/toast/examples/types.html.js +5 -0
- package/dist/toast/examples/updatable.html.js +5 -0
- package/dist/toast/toast.events.d.ts +2 -3
- package/dist/toast/toast.machine.d.ts +4 -4
- package/dist/toast/toast.machine.js +1 -1
- package/dist/toast/toast.presentation.d.ts +5 -6
- package/dist/toast/toast.presentation.js +1 -1
- package/dist/toast/toast.state.d.ts +1 -2
- package/dist/toast/toast.state.js +3 -3
- package/dist/toast/toast.transitions.d.ts +3 -4
- package/dist/toc/examples/basic.html +31 -0
- package/dist/toc/examples/basic.html.js +5 -0
- package/dist/toc/toc.events.d.ts +19 -0
- package/dist/toc/toc.events.js +1 -0
- package/dist/toc/toc.machine.d.ts +5 -0
- package/dist/toc/toc.machine.js +59 -0
- package/dist/toc/toc.presentation.d.ts +127 -0
- package/dist/toc/toc.presentation.js +117 -0
- package/dist/toc/toc.state.d.ts +41 -0
- package/dist/toc/toc.state.js +64 -0
- package/dist/toc/toc.transitions.d.ts +8 -0
- package/dist/toc/toc.transitions.js +27 -0
- package/dist/toggle-group/examples/basic.html +2 -2
- package/dist/toggle-group/examples/basic.html.js +5 -0
- package/dist/toggle-group/examples/ghost.html +1 -1
- package/dist/toggle-group/examples/ghost.html.js +5 -0
- package/dist/toggle-group/examples/icons.html +3 -3
- package/dist/toggle-group/examples/icons.html.js +5 -0
- package/dist/toggle-group/examples/multiple.html.js +5 -0
- package/dist/toggle-group/examples/outline.html +2 -2
- package/dist/toggle-group/examples/outline.html.js +5 -0
- package/dist/toggle-group/examples/toolbar.html +3 -3
- package/dist/toggle-group/examples/toolbar.html.js +5 -0
- package/dist/toggle-group/toggle-group.events.d.ts +2 -3
- package/dist/toggle-group/toggle-group.machine.d.ts +3 -3
- package/dist/toggle-group/toggle-group.machine.js +1 -1
- package/dist/toggle-group/toggle-group.presentation.d.ts +6 -7
- package/dist/toggle-group/toggle-group.presentation.js +2 -2
- package/dist/toggle-group/toggle-group.state.d.ts +1 -2
- package/dist/toggle-group/toggle-group.state.js +1 -1
- package/dist/toggle-group/toggle-group.transitions.d.ts +3 -4
- package/dist/tooltip/examples/basic.html.js +5 -0
- package/dist/tooltip/examples/metrics.html +9 -9
- package/dist/tooltip/examples/metrics.html.js +5 -0
- package/dist/tooltip/examples/positioning.html +4 -4
- package/dist/tooltip/examples/positioning.html.js +5 -0
- package/dist/tooltip/examples/status.html +10 -10
- package/dist/tooltip/examples/status.html.js +5 -0
- package/dist/tooltip/examples/video.html +6 -6
- package/dist/tooltip/examples/video.html.js +5 -0
- package/dist/tooltip/examples/with-arrow.html +1 -1
- package/dist/tooltip/examples/with-arrow.html.js +5 -0
- package/dist/tooltip/tooltip.controller-def.d.ts +3 -5
- package/dist/tooltip/tooltip.controller-def.js +1 -1
- package/dist/tour/examples/basic.html +5 -5
- package/dist/tour/examples/basic.html.js +5 -0
- package/dist/tour/tour.events.d.ts +2 -3
- package/dist/tour/tour.machine.d.ts +7 -3
- package/dist/tour/tour.machine.js +1 -1
- package/dist/tour/tour.presentation.d.ts +6 -7
- package/dist/tour/tour.presentation.js +1 -1
- package/dist/tour/tour.state.d.ts +1 -2
- package/dist/tour/tour.state.js +1 -1
- package/dist/tour/tour.transitions.d.ts +3 -4
- package/dist/tree-view/examples/basic.html +10 -10
- package/dist/tree-view/examples/basic.html.js +5 -0
- package/dist/tree-view/examples/loading.html +11 -11
- package/dist/tree-view/examples/loading.html.js +5 -0
- package/dist/tree-view/tree-view.events.d.ts +2 -3
- package/dist/tree-view/tree-view.machine.d.ts +2 -3
- package/dist/tree-view/tree-view.machine.js +1 -1
- package/dist/tree-view/tree-view.presentation.d.ts +7 -8
- package/dist/tree-view/tree-view.presentation.js +2 -2
- package/dist/tree-view/tree-view.state.d.ts +1 -2
- package/dist/tree-view/tree-view.state.js +1 -1
- package/dist/tree-view/tree-view.transitions.d.ts +3 -4
- package/package.json +43 -8
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createAction } from "./action.js";
|
|
2
|
+
// src/runtime/actions/hover-delay.ts
|
|
3
|
+
/** Listen with automatic removal on destroy. Shared with the index's own actions. */
|
|
4
|
+
function listen(node, type, handler) {
|
|
5
|
+
const listener = (event) => handler(event);
|
|
6
|
+
node.addEventListener(type, listener);
|
|
7
|
+
return () => node.removeEventListener(type, listener);
|
|
8
|
+
}
|
|
9
|
+
const hoverDelay = createAction((node, param) => {
|
|
10
|
+
let openTimer;
|
|
11
|
+
let closeTimer;
|
|
12
|
+
const clearOpen = () => {
|
|
13
|
+
clearTimeout(openTimer);
|
|
14
|
+
openTimer = void 0;
|
|
15
|
+
};
|
|
16
|
+
const clearClose = () => {
|
|
17
|
+
clearTimeout(closeTimer);
|
|
18
|
+
closeTimer = void 0;
|
|
19
|
+
};
|
|
20
|
+
const enter = (event) => {
|
|
21
|
+
if (event.pointerType === "touch") return;
|
|
22
|
+
clearClose();
|
|
23
|
+
if (openTimer !== void 0 || param?.onOpen === void 0) return;
|
|
24
|
+
const delay = param?.openDelay ?? 150;
|
|
25
|
+
if (delay <= 0) {
|
|
26
|
+
param?.onOpen?.();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
openTimer = setTimeout(() => {
|
|
30
|
+
openTimer = void 0;
|
|
31
|
+
param?.onOpen?.();
|
|
32
|
+
}, delay);
|
|
33
|
+
};
|
|
34
|
+
const leave = () => {
|
|
35
|
+
clearOpen();
|
|
36
|
+
if (closeTimer !== void 0 || param?.onClose === void 0) return;
|
|
37
|
+
const delay = param?.closeDelay ?? 100;
|
|
38
|
+
if (delay <= 0) {
|
|
39
|
+
param?.onClose?.();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
closeTimer = setTimeout(() => {
|
|
43
|
+
closeTimer = void 0;
|
|
44
|
+
param?.onClose?.();
|
|
45
|
+
}, delay);
|
|
46
|
+
};
|
|
47
|
+
const stops = [listen(node, "pointerenter", enter), listen(node, "pointerleave", leave)];
|
|
48
|
+
return {
|
|
49
|
+
update: (next) => {
|
|
50
|
+
param = next;
|
|
51
|
+
},
|
|
52
|
+
destroy: () => {
|
|
53
|
+
clearOpen();
|
|
54
|
+
clearClose();
|
|
55
|
+
for (const stop of stops) stop();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
export { hoverDelay };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=hover-delay.js.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The actions Sail ships with the component library: one behavior per
|
|
3
|
+
* action, like uno utilities for behavior.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately NOT here: anything that is a component rather than a
|
|
6
|
+
* behavior. A resizable pane is a component, not an action — but the
|
|
7
|
+
* REFLEXES inside one (listen for pointerdown on a handle, report deltas)
|
|
8
|
+
* are these.
|
|
9
|
+
*
|
|
10
|
+
* Shared house rules, enforced per action:
|
|
11
|
+
* - Mutate only the node: attributes, focus, scroll, class.
|
|
12
|
+
* - Write no styles. Visual state goes out as attributes; utilities paint.
|
|
13
|
+
* - Cross no element boundary. `send` (via param) is the only outward path.
|
|
14
|
+
* - Everything acquired is released in `destroy`.
|
|
15
|
+
*/
|
|
16
|
+
import { AnchorGeometry, AnchorParam, AnchorPlacement } from "./anchor.js";
|
|
17
|
+
import { DragDelta, DragParam, DragPress } from "./drag.js";
|
|
18
|
+
import { HoverDelayParam } from "./hover-delay.js";
|
|
19
|
+
import { FormControlParam } from "./form-control.js";
|
|
20
|
+
import { ObserveParam } from "./observe.js";
|
|
21
|
+
import { ScrollIntoViewAction } from "./scroll-into-view.js";
|
|
22
|
+
import { InteractOutsideDetail, InteractOutsideEvent, InteractOutsideParam } from "./interact-outside.js";
|
|
23
|
+
import { SelectOptionsParam, SelectOptionsRow } from "./select-options.js";
|
|
24
|
+
import { SelectFocusParam } from "./select-focus.js";
|
|
25
|
+
import { DatePickerFocusParam } from "./date-picker-focus.js";
|
|
26
|
+
import { InfiniteScrollParam } from "./infinite-scroll.js";
|
|
27
|
+
import { ToastRegionParam, ToastRowParam, ToastTimerParam } from "./toast-actions.js";
|
|
28
|
+
import { ElementAction, createAction, runAction } from "./action.js";
|
|
29
|
+
export interface DismissableParam {
|
|
30
|
+
onOutside?: (event: PointerEvent) => void;
|
|
31
|
+
onEscape?: () => void;
|
|
32
|
+
/** Defer the outside listener a frame so the opening press doesn't dismiss. */
|
|
33
|
+
armedByFrame?: boolean;
|
|
34
|
+
/** An id whose element counts as inside: presses on it are the trigger's
|
|
35
|
+
* business, not a dismissal. Resolved by id so defs never query. */
|
|
36
|
+
excludeId?: string;
|
|
37
|
+
/** Treat the host's parent element as inside (submenu levels dismiss
|
|
38
|
+
* through their parent, not past it). */
|
|
39
|
+
excludeParent?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const dismissable: ElementAction<DismissableParam | undefined>;
|
|
42
|
+
export interface AutoplayParam {
|
|
43
|
+
/** Ticks are how the machine advances; the action owns only the clock. */
|
|
44
|
+
onTick?: () => void;
|
|
45
|
+
interval?: number;
|
|
46
|
+
enabled?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare const autoplay: ElementAction<AutoplayParam | undefined>;
|
|
49
|
+
export interface HoverIntentParam {
|
|
50
|
+
/** Fired once the pointer has rested on the node for `delay`. */
|
|
51
|
+
onOpen?: () => void;
|
|
52
|
+
/** Fired when the pointer leaves the node after an open fired. */
|
|
53
|
+
onClose?: () => void;
|
|
54
|
+
/** Dwell before opening. */
|
|
55
|
+
delay?: number;
|
|
56
|
+
}
|
|
57
|
+
export declare const hoverIntent: ElementAction<HoverIntentParam | undefined>;
|
|
58
|
+
export interface LongPressParam {
|
|
59
|
+
onPress?: (point: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
}) => void;
|
|
63
|
+
onCancel?: () => void;
|
|
64
|
+
/** Dwell before firing. */
|
|
65
|
+
delay?: number;
|
|
66
|
+
}
|
|
67
|
+
export declare const longPress: ElementAction<LongPressParam | undefined>;
|
|
68
|
+
export interface DragScrollParam {
|
|
69
|
+
onDragStart?: () => void;
|
|
70
|
+
onDragEnd?: (velocity: number) => void;
|
|
71
|
+
}
|
|
72
|
+
export declare const dragScroll: ElementAction<DragScrollParam | undefined>;
|
|
73
|
+
export interface IntersectParam {
|
|
74
|
+
onVisibility?: (visible: boolean) => void;
|
|
75
|
+
threshold?: number;
|
|
76
|
+
}
|
|
77
|
+
export declare const intersect: ElementAction<IntersectParam | undefined>;
|
|
78
|
+
export interface ResizeObserverParam {
|
|
79
|
+
onResize?: (size: {
|
|
80
|
+
width: number;
|
|
81
|
+
height: number;
|
|
82
|
+
}) => void;
|
|
83
|
+
}
|
|
84
|
+
export declare const resizeObserver: ElementAction<ResizeObserverParam | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* The registry: the `use:` vocabulary. Machines and markup reference
|
|
87
|
+
* actions BY NAME from this table; nothing else resolves.
|
|
88
|
+
*/
|
|
89
|
+
export declare const ACTIONS: {
|
|
90
|
+
readonly anchor: ElementAction<AnchorParam | undefined>;
|
|
91
|
+
readonly drag: ElementAction<DragParam | undefined>;
|
|
92
|
+
readonly "hover-delay": ElementAction<HoverDelayParam | undefined>;
|
|
93
|
+
readonly dismissable: ElementAction<DismissableParam | undefined>;
|
|
94
|
+
readonly autoplay: ElementAction<AutoplayParam | undefined>;
|
|
95
|
+
readonly "hover-intent": ElementAction<HoverIntentParam | undefined>;
|
|
96
|
+
readonly "long-press": ElementAction<LongPressParam | undefined>;
|
|
97
|
+
readonly "drag-scroll": ElementAction<DragScrollParam | undefined>;
|
|
98
|
+
readonly intersect: ElementAction<IntersectParam | undefined>;
|
|
99
|
+
readonly "resize-observer": ElementAction<ResizeObserverParam | undefined>;
|
|
100
|
+
readonly "form-control": ElementAction<FormControlParam | undefined>;
|
|
101
|
+
readonly observe: ElementAction<ObserveParam | undefined>;
|
|
102
|
+
readonly "scroll-into-view": ScrollIntoViewAction;
|
|
103
|
+
readonly "interact-outside": ElementAction<InteractOutsideParam | undefined>;
|
|
104
|
+
readonly "select-options": ElementAction<SelectOptionsParam | undefined>;
|
|
105
|
+
readonly "select-focus": ElementAction<SelectFocusParam | undefined>;
|
|
106
|
+
readonly "date-picker-focus": ElementAction<DatePickerFocusParam | undefined>;
|
|
107
|
+
readonly "infinite-scroll": ElementAction<InfiniteScrollParam | undefined>;
|
|
108
|
+
readonly "toast-timer": ElementAction<ToastTimerParam>;
|
|
109
|
+
readonly "toast-row": ElementAction<ToastRowParam>;
|
|
110
|
+
readonly "toast-region": ElementAction<ToastRegionParam>;
|
|
111
|
+
};
|
|
112
|
+
export type ActionName = keyof typeof ACTIONS;
|
|
113
|
+
export { type AnchorGeometry, type AnchorParam, type AnchorPlacement, type DatePickerFocusParam, type DragDelta, type DragParam, type DragPress, type ElementAction, type HoverDelayParam, type InteractOutsideDetail, type InteractOutsideEvent, type InteractOutsideParam, type ObserveParam, type SelectFocusParam, type SelectOptionsParam, type SelectOptionsRow, type ToastRegionParam, type ToastRowParam, type ToastTimerParam, createAction, runAction };
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { createAction, runAction } from "./action.js";
|
|
2
|
+
import { formControl } from "./form-control.js";
|
|
3
|
+
import { anchor } from "./anchor.js";
|
|
4
|
+
import { drag } from "./drag.js";
|
|
5
|
+
import { hoverDelay } from "./hover-delay.js";
|
|
6
|
+
import { observe } from "./observe.js";
|
|
7
|
+
import { scrollIntoView } from "./scroll-into-view.js";
|
|
8
|
+
import { interactOutside } from "./interact-outside.js";
|
|
9
|
+
import { selectOptions } from "./select-options.js";
|
|
10
|
+
import { selectFocus } from "./select-focus.js";
|
|
11
|
+
import { datePickerFocus } from "./date-picker-focus.js";
|
|
12
|
+
import { infiniteScroll } from "./infinite-scroll.js";
|
|
13
|
+
import { toastRegion, toastRow, toastTimer } from "./toast-actions.js";
|
|
14
|
+
// src/runtime/actions/index.ts
|
|
15
|
+
/**
|
|
16
|
+
* The actions Sail ships with the component library: one behavior per
|
|
17
|
+
* action, like uno utilities for behavior.
|
|
18
|
+
*
|
|
19
|
+
* Deliberately NOT here: anything that is a component rather than a
|
|
20
|
+
* behavior. A resizable pane is a component, not an action — but the
|
|
21
|
+
* REFLEXES inside one (listen for pointerdown on a handle, report deltas)
|
|
22
|
+
* are these.
|
|
23
|
+
*
|
|
24
|
+
* Shared house rules, enforced per action:
|
|
25
|
+
* - Mutate only the node: attributes, focus, scroll, class.
|
|
26
|
+
* - Write no styles. Visual state goes out as attributes; utilities paint.
|
|
27
|
+
* - Cross no element boundary. `send` (via param) is the only outward path.
|
|
28
|
+
* - Everything acquired is released in `destroy`.
|
|
29
|
+
*/
|
|
30
|
+
function listen(target, type, handler, capture = false) {
|
|
31
|
+
target.addEventListener(type, handler, { capture });
|
|
32
|
+
return () => target.removeEventListener(type, handler, { capture });
|
|
33
|
+
}
|
|
34
|
+
const dismissable = createAction((node, param) => {
|
|
35
|
+
const outside = (event) => {
|
|
36
|
+
const target = event.target;
|
|
37
|
+
if (target && node.contains(target)) return;
|
|
38
|
+
if (param?.excludeId !== void 0 && target instanceof Element) {
|
|
39
|
+
const excluded = node.ownerDocument.getElementById(param.excludeId);
|
|
40
|
+
if (excluded !== null && excluded.contains(target)) return;
|
|
41
|
+
}
|
|
42
|
+
if (param?.excludeParent === true) {
|
|
43
|
+
const parent = node.parentElement;
|
|
44
|
+
if (parent !== null && target instanceof Element && parent.contains(target)) return;
|
|
45
|
+
}
|
|
46
|
+
param?.onOutside?.(event);
|
|
47
|
+
};
|
|
48
|
+
const escape = (event) => {
|
|
49
|
+
if (event.key === "Escape") param?.onEscape?.();
|
|
50
|
+
};
|
|
51
|
+
let cancelArm = () => {};
|
|
52
|
+
let stopDoc;
|
|
53
|
+
if (param?.armedByFrame === false) stopDoc = listen(document, "pointerdown", outside, true);
|
|
54
|
+
else {
|
|
55
|
+
const raf = requestAnimationFrame(() => {
|
|
56
|
+
stopDoc = listen(document, "pointerdown", outside, true);
|
|
57
|
+
});
|
|
58
|
+
cancelArm = () => cancelAnimationFrame(raf);
|
|
59
|
+
}
|
|
60
|
+
const stopKey = listen(document, "keydown", escape);
|
|
61
|
+
return { destroy: () => {
|
|
62
|
+
cancelArm();
|
|
63
|
+
stopDoc?.();
|
|
64
|
+
stopKey();
|
|
65
|
+
} };
|
|
66
|
+
});
|
|
67
|
+
const autoplay = createAction((_node, param) => {
|
|
68
|
+
let timer;
|
|
69
|
+
const clear = () => {
|
|
70
|
+
if (timer !== void 0) clearInterval(timer);
|
|
71
|
+
timer = void 0;
|
|
72
|
+
};
|
|
73
|
+
const start = (interval) => {
|
|
74
|
+
clear();
|
|
75
|
+
if (interval > 0) timer = setInterval(() => param?.onTick?.(), interval);
|
|
76
|
+
};
|
|
77
|
+
if (param?.enabled !== false) start(param?.interval ?? 3e3);
|
|
78
|
+
return {
|
|
79
|
+
update: (next) => {
|
|
80
|
+
if (next?.enabled === false) clear();
|
|
81
|
+
else start(next?.interval ?? 3e3);
|
|
82
|
+
},
|
|
83
|
+
destroy: clear
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const hoverIntent = createAction((node, param) => {
|
|
87
|
+
let timer;
|
|
88
|
+
let opened = false;
|
|
89
|
+
const clear = () => {
|
|
90
|
+
clearTimeout(timer);
|
|
91
|
+
timer = void 0;
|
|
92
|
+
};
|
|
93
|
+
const enter = (event) => {
|
|
94
|
+
if (event.pointerType !== "mouse") return;
|
|
95
|
+
const delay = param?.delay ?? 200;
|
|
96
|
+
if (delay <= 0 || param?.onOpen === void 0) return;
|
|
97
|
+
clear();
|
|
98
|
+
timer = setTimeout(() => {
|
|
99
|
+
timer = void 0;
|
|
100
|
+
opened = true;
|
|
101
|
+
param?.onOpen?.();
|
|
102
|
+
}, delay);
|
|
103
|
+
};
|
|
104
|
+
const leave = () => {
|
|
105
|
+
clear();
|
|
106
|
+
if (!opened) return;
|
|
107
|
+
opened = false;
|
|
108
|
+
param?.onClose?.();
|
|
109
|
+
};
|
|
110
|
+
const stops = [listen(node, "pointerenter", enter), listen(node, "pointerleave", leave)];
|
|
111
|
+
return {
|
|
112
|
+
update: (next) => {
|
|
113
|
+
param = next;
|
|
114
|
+
},
|
|
115
|
+
destroy: () => {
|
|
116
|
+
clear();
|
|
117
|
+
for (const stop of stops) stop();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
const longPress = createAction((node, param) => {
|
|
122
|
+
let timer;
|
|
123
|
+
const clear = () => {
|
|
124
|
+
clearTimeout(timer);
|
|
125
|
+
timer = void 0;
|
|
126
|
+
};
|
|
127
|
+
const arm = (event) => {
|
|
128
|
+
if (event.pointerType === "mouse") return;
|
|
129
|
+
const delay = param?.delay ?? 700;
|
|
130
|
+
if (delay <= 0 || param?.onPress === void 0) return;
|
|
131
|
+
clear();
|
|
132
|
+
const point = {
|
|
133
|
+
x: event.clientX,
|
|
134
|
+
y: event.clientY
|
|
135
|
+
};
|
|
136
|
+
timer = setTimeout(() => {
|
|
137
|
+
timer = void 0;
|
|
138
|
+
param?.onPress?.(point);
|
|
139
|
+
}, delay);
|
|
140
|
+
};
|
|
141
|
+
const cancel = () => {
|
|
142
|
+
if (timer === void 0) return;
|
|
143
|
+
clear();
|
|
144
|
+
param?.onCancel?.();
|
|
145
|
+
};
|
|
146
|
+
const stops = [
|
|
147
|
+
listen(node, "pointerdown", arm),
|
|
148
|
+
listen(node, "pointerup", cancel),
|
|
149
|
+
listen(node, "pointermove", cancel),
|
|
150
|
+
listen(node, "pointercancel", cancel)
|
|
151
|
+
];
|
|
152
|
+
return {
|
|
153
|
+
update: (next) => {
|
|
154
|
+
param = next;
|
|
155
|
+
},
|
|
156
|
+
destroy: () => {
|
|
157
|
+
clear();
|
|
158
|
+
for (const stop of stops) stop();
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
});
|
|
162
|
+
const dragScroll = createAction((node, param) => {
|
|
163
|
+
let startX = 0;
|
|
164
|
+
let startScroll = 0;
|
|
165
|
+
let lastX = 0;
|
|
166
|
+
let lastAt = 0;
|
|
167
|
+
let dragging = false;
|
|
168
|
+
const down = (event) => {
|
|
169
|
+
dragging = true;
|
|
170
|
+
startX = lastX = event.clientX;
|
|
171
|
+
startScroll = node.scrollLeft;
|
|
172
|
+
lastAt = performance.now();
|
|
173
|
+
param?.onDragStart?.();
|
|
174
|
+
};
|
|
175
|
+
const move = (event) => {
|
|
176
|
+
if (!dragging) return;
|
|
177
|
+
node.scrollLeft = startScroll - (event.clientX - startX);
|
|
178
|
+
lastX = event.clientX;
|
|
179
|
+
lastAt = performance.now();
|
|
180
|
+
};
|
|
181
|
+
const up = () => {
|
|
182
|
+
if (!dragging) return;
|
|
183
|
+
dragging = false;
|
|
184
|
+
const dt = performance.now() - lastAt;
|
|
185
|
+
param?.onDragEnd?.(dt > 0 ? (lastX - startX) / dt : 0);
|
|
186
|
+
};
|
|
187
|
+
const stops = [
|
|
188
|
+
listen(node, "pointerdown", down),
|
|
189
|
+
listen(document, "pointermove", move),
|
|
190
|
+
listen(document, "pointerup", () => up())
|
|
191
|
+
];
|
|
192
|
+
return { destroy: () => stops.forEach((s) => s()) };
|
|
193
|
+
});
|
|
194
|
+
const intersect = createAction((node, param) => {
|
|
195
|
+
if (typeof IntersectionObserver !== "function") return;
|
|
196
|
+
const observer = new IntersectionObserver((entries) => {
|
|
197
|
+
param?.onVisibility?.(entries.some((entry) => entry.isIntersecting));
|
|
198
|
+
}, { threshold: param?.threshold ?? .5 });
|
|
199
|
+
observer.observe(node);
|
|
200
|
+
return { destroy: () => observer.disconnect() };
|
|
201
|
+
});
|
|
202
|
+
const resizeObserver = createAction((node, param) => {
|
|
203
|
+
if (typeof ResizeObserver !== "function") return;
|
|
204
|
+
const observer = new ResizeObserver((entries) => {
|
|
205
|
+
const box = entries[0]?.contentRect;
|
|
206
|
+
if (box) param?.onResize?.(box);
|
|
207
|
+
});
|
|
208
|
+
observer.observe(node);
|
|
209
|
+
return { destroy: () => observer.disconnect() };
|
|
210
|
+
});
|
|
211
|
+
/**
|
|
212
|
+
* The registry: the `use:` vocabulary. Machines and markup reference
|
|
213
|
+
* actions BY NAME from this table; nothing else resolves.
|
|
214
|
+
*/
|
|
215
|
+
const ACTIONS = {
|
|
216
|
+
anchor,
|
|
217
|
+
drag,
|
|
218
|
+
"hover-delay": hoverDelay,
|
|
219
|
+
dismissable,
|
|
220
|
+
autoplay,
|
|
221
|
+
"hover-intent": hoverIntent,
|
|
222
|
+
"long-press": longPress,
|
|
223
|
+
"drag-scroll": dragScroll,
|
|
224
|
+
intersect,
|
|
225
|
+
"resize-observer": resizeObserver,
|
|
226
|
+
"form-control": formControl,
|
|
227
|
+
observe,
|
|
228
|
+
"scroll-into-view": scrollIntoView,
|
|
229
|
+
"interact-outside": interactOutside,
|
|
230
|
+
"select-options": selectOptions,
|
|
231
|
+
"select-focus": selectFocus,
|
|
232
|
+
"date-picker-focus": datePickerFocus,
|
|
233
|
+
"infinite-scroll": infiniteScroll,
|
|
234
|
+
"toast-timer": toastTimer,
|
|
235
|
+
"toast-row": toastRow,
|
|
236
|
+
"toast-region": toastRegion
|
|
237
|
+
};
|
|
238
|
+
export { ACTIONS, autoplay, createAction, dismissable, dragScroll, hoverIntent, intersect, longPress, resizeObserver, runAction };
|
|
239
|
+
|
|
240
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ElementAction } from "./action.js";
|
|
2
|
+
/**
|
|
3
|
+
* infinite-scroll — report when a sentinel at the end of a list scrolls into
|
|
4
|
+
* view, INCLUDING when the content around it grows.
|
|
5
|
+
*
|
|
6
|
+
* A plain IntersectionObserver reports a change of visibility and nothing
|
|
7
|
+
* else, which is exactly the case an async list keeps producing: a page is
|
|
8
|
+
* appended, the sentinel is still in view, and no notification ever comes,
|
|
9
|
+
* so the list loads one page and stops. The observer's last known state is
|
|
10
|
+
* therefore re-reported whenever the element that grows with the content
|
|
11
|
+
* changes size, which is what makes a paged list drain without a scroll.
|
|
12
|
+
*
|
|
13
|
+
* The action mutates only the nodes it is given and holds no state that
|
|
14
|
+
* outlives them; the only outward path is `onLoadMore`.
|
|
15
|
+
*/
|
|
16
|
+
export interface InfiniteScrollParam {
|
|
17
|
+
/** Fired when the sentinel is in view and loading is not switched off. */
|
|
18
|
+
onLoadMore?: () => void;
|
|
19
|
+
/** True while there is anything left to load. */
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const infiniteScroll: ElementAction<InfiniteScrollParam | undefined>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createAction } from "./action.js";
|
|
2
|
+
// src/runtime/actions/infinite-scroll.ts
|
|
3
|
+
const infiniteScroll = createAction((node, param) => {
|
|
4
|
+
let intersecting = false;
|
|
5
|
+
let enabled = param?.enabled !== false;
|
|
6
|
+
const report = () => {
|
|
7
|
+
if (!enabled || !intersecting) return;
|
|
8
|
+
param?.onLoadMore?.();
|
|
9
|
+
};
|
|
10
|
+
let stops = [];
|
|
11
|
+
const visibility = typeof IntersectionObserver === "function" ? new IntersectionObserver((entries) => {
|
|
12
|
+
intersecting = entries.some((entry) => entry.isIntersecting);
|
|
13
|
+
report();
|
|
14
|
+
}, { threshold: 0 }) : void 0;
|
|
15
|
+
visibility?.observe(node);
|
|
16
|
+
const content = node.parentElement;
|
|
17
|
+
const sizing = typeof ResizeObserver === "function" && content !== null ? new ResizeObserver(() => report()) : void 0;
|
|
18
|
+
if (content !== null) sizing?.observe(content);
|
|
19
|
+
stops = [() => visibility?.disconnect(), () => sizing?.disconnect()];
|
|
20
|
+
return {
|
|
21
|
+
update: (next) => {
|
|
22
|
+
param = next;
|
|
23
|
+
enabled = next?.enabled !== false;
|
|
24
|
+
report();
|
|
25
|
+
},
|
|
26
|
+
destroy: () => {
|
|
27
|
+
for (const stop of stops) stop();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
export { infiniteScroll };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=infinite-scroll.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ElementAction } from "./action.js";
|
|
2
|
+
/**
|
|
3
|
+
* interact-outside — report focus and pointer movement outside the node.
|
|
4
|
+
*
|
|
5
|
+
* The port of `trackInteractOutside`, which the editable uses to submit (or
|
|
6
|
+
* cancel) a field the user walks away from. A cancelable custom event fires
|
|
7
|
+
* on the node and `onInteractOutside` vetoes by calling `preventDefault`;
|
|
8
|
+
* this action hands the same event object to the same three callbacks, with
|
|
9
|
+
* the same veto.
|
|
10
|
+
*
|
|
11
|
+
* Two faithful details worth keeping:
|
|
12
|
+
*
|
|
13
|
+
* - The document listeners arm on the next frame. The press that OPENED the
|
|
14
|
+
* surface is a pointerdown outside it, and arming immediately would make
|
|
15
|
+
* that press close what it opened.
|
|
16
|
+
* - A focusin is ignored while a pointerdown is in flight: the pointerdown
|
|
17
|
+
* has already reported, and the click's own focus move would report the
|
|
18
|
+
* same interaction twice.
|
|
19
|
+
*
|
|
20
|
+
* The excluded set is a thunk so the caller resolves the parts it owns at
|
|
21
|
+
* event time; the node's own `aria-controls` targets count as inside, which
|
|
22
|
+
* is the `isControlledElement` rule.
|
|
23
|
+
*/
|
|
24
|
+
export interface InteractOutsideDetail {
|
|
25
|
+
readonly originalEvent: Event;
|
|
26
|
+
readonly contextmenu: boolean;
|
|
27
|
+
readonly focusable: boolean;
|
|
28
|
+
readonly target: EventTarget | null;
|
|
29
|
+
}
|
|
30
|
+
export interface InteractOutsideEvent {
|
|
31
|
+
readonly type: "pointerdown" | "focus";
|
|
32
|
+
readonly detail: InteractOutsideDetail;
|
|
33
|
+
defaultPrevented: boolean;
|
|
34
|
+
preventDefault(): void;
|
|
35
|
+
}
|
|
36
|
+
export interface InteractOutsideParam {
|
|
37
|
+
onPointerDownOutside?: (event: InteractOutsideEvent) => void;
|
|
38
|
+
onFocusOutside?: (event: InteractOutsideEvent) => void;
|
|
39
|
+
onInteractOutside?: (event: InteractOutsideEvent) => void;
|
|
40
|
+
/** Elements the report ignores — the caller's own controls. */
|
|
41
|
+
exclude?: () => readonly (Element | null)[];
|
|
42
|
+
}
|
|
43
|
+
export declare const interactOutside: ElementAction<InteractOutsideParam | undefined>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createAction } from "./action.js";
|
|
2
|
+
// src/runtime/actions/interact-outside.ts
|
|
3
|
+
const FOCUSABLE = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),details,[tabindex]:not([tabindex=\"-1\"])";
|
|
4
|
+
const makeEvent = (type, originalEvent, target) => {
|
|
5
|
+
const event = {
|
|
6
|
+
type,
|
|
7
|
+
detail: {
|
|
8
|
+
originalEvent,
|
|
9
|
+
contextmenu: originalEvent.type === "contextmenu" || originalEvent.button === 2,
|
|
10
|
+
focusable: target instanceof Element && target.matches(FOCUSABLE),
|
|
11
|
+
target
|
|
12
|
+
},
|
|
13
|
+
defaultPrevented: false
|
|
14
|
+
};
|
|
15
|
+
event.preventDefault = () => {
|
|
16
|
+
event.defaultPrevented = true;
|
|
17
|
+
};
|
|
18
|
+
return event;
|
|
19
|
+
};
|
|
20
|
+
const interactOutside = createAction((node, param) => {
|
|
21
|
+
const excluded = (target) => {
|
|
22
|
+
if (!(target instanceof Element)) return false;
|
|
23
|
+
if (target.getAttribute("aria-controls") === node.id) return true;
|
|
24
|
+
return (param?.exclude?.() ?? []).some((el) => el !== null && (el === target || el.contains(target)));
|
|
25
|
+
};
|
|
26
|
+
const isOutside = (target) => {
|
|
27
|
+
if (!(target instanceof Element)) return false;
|
|
28
|
+
if (!target.isConnected) return false;
|
|
29
|
+
if (node.contains(target)) return false;
|
|
30
|
+
return !excluded(target);
|
|
31
|
+
};
|
|
32
|
+
const report = (type, originalEvent, target) => {
|
|
33
|
+
const event = makeEvent(type, originalEvent, target);
|
|
34
|
+
if (type === "pointerdown") param?.onPointerDownOutside?.(event);
|
|
35
|
+
else param?.onFocusOutside?.(event);
|
|
36
|
+
param?.onInteractOutside?.(event);
|
|
37
|
+
};
|
|
38
|
+
let pointerInFlight = false;
|
|
39
|
+
const onPointerDown = (event) => {
|
|
40
|
+
pointerInFlight = true;
|
|
41
|
+
const release = () => {
|
|
42
|
+
pointerInFlight = false;
|
|
43
|
+
};
|
|
44
|
+
document.addEventListener("pointerup", release, { once: true });
|
|
45
|
+
if (isOutside(event.target)) report("pointerdown", event, event.target);
|
|
46
|
+
};
|
|
47
|
+
const onFocusIn = (event) => {
|
|
48
|
+
if (pointerInFlight) return;
|
|
49
|
+
if (isOutside(event.target)) report("focus", event, event.target);
|
|
50
|
+
};
|
|
51
|
+
const stops = [];
|
|
52
|
+
const arm = () => {
|
|
53
|
+
document.addEventListener("pointerdown", onPointerDown, true);
|
|
54
|
+
document.addEventListener("focusin", onFocusIn, true);
|
|
55
|
+
stops.push(() => document.removeEventListener("pointerdown", onPointerDown, true));
|
|
56
|
+
stops.push(() => document.removeEventListener("focusin", onFocusIn, true));
|
|
57
|
+
};
|
|
58
|
+
const frame = typeof requestAnimationFrame === "function" ? requestAnimationFrame(() => arm()) : null;
|
|
59
|
+
if (frame === null) arm();
|
|
60
|
+
return {
|
|
61
|
+
update: (next) => {
|
|
62
|
+
param = next;
|
|
63
|
+
},
|
|
64
|
+
destroy: () => {
|
|
65
|
+
if (frame !== null) cancelAnimationFrame(frame);
|
|
66
|
+
for (const stop of stops) stop();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
export { interactOutside };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=interact-outside.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ElementAction } from "./action.js";
|
|
2
|
+
/**
|
|
3
|
+
* A MutationObserver on the node. Attribute changes on the node itself,
|
|
4
|
+
* element children removed from it, and one report when observation starts,
|
|
5
|
+
* for a state that already settled before the observer existed (an <img> out
|
|
6
|
+
* of a warm cache never fires load/error again). The machine decides what
|
|
7
|
+
* any of it means.
|
|
8
|
+
*
|
|
9
|
+
* Same shape and rules as the catalog's other observers: it observes, never
|
|
10
|
+
* reaches across element boundaries, holds nothing that outlives the node,
|
|
11
|
+
* and releases the observer in `destroy`.
|
|
12
|
+
*
|
|
13
|
+
* Added for the avatar port: image sources swap under a rendered node and
|
|
14
|
+
* images get removed while rendered, and nothing in the catalog watches
|
|
15
|
+
* either.
|
|
16
|
+
*/
|
|
17
|
+
export interface ObserveParam {
|
|
18
|
+
/** Attributes on the node itself to watch. */
|
|
19
|
+
attributes?: readonly string[];
|
|
20
|
+
/** An attribute in `attributes` changed. */
|
|
21
|
+
onAttributes?: (node: Element) => void;
|
|
22
|
+
/** An element child was removed from the node. */
|
|
23
|
+
onRemove?: (removed: Element) => void;
|
|
24
|
+
/** Observation started; the node's current state is readable now. */
|
|
25
|
+
onAttach?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const observe: ElementAction<ObserveParam | undefined>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createAction } from "./action.js";
|
|
2
|
+
// src/runtime/actions/observe.ts
|
|
3
|
+
const observe = createAction((node, param) => {
|
|
4
|
+
if (typeof MutationObserver !== "function") return;
|
|
5
|
+
const filter = param?.attributes ?? [];
|
|
6
|
+
const observer = new MutationObserver((records) => {
|
|
7
|
+
for (const record of records) {
|
|
8
|
+
if (record.type === "attributes") {
|
|
9
|
+
param?.onAttributes?.(node);
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
for (const removed of record.removedNodes) if (removed instanceof Element) param?.onRemove?.(removed);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
observer.observe(node, {
|
|
16
|
+
childList: true,
|
|
17
|
+
attributes: true,
|
|
18
|
+
attributeFilter: [...filter]
|
|
19
|
+
});
|
|
20
|
+
param?.onAttach?.();
|
|
21
|
+
return { destroy: () => observer.disconnect() };
|
|
22
|
+
});
|
|
23
|
+
export { observe };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=observe.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scroll-into-view — bring the active descendant into view when it moves, and
|
|
3
|
+
* scroll the lists home when it goes away.
|
|
4
|
+
*
|
|
5
|
+
* The reflex behind `aria-activedescendant` navigation: a listbox that
|
|
6
|
+
* highlights by moving an id rather than focus gets no browser scrolling for
|
|
7
|
+
* free, so the highlighted row would sit outside a scrolled list. The active
|
|
8
|
+
* id is read through a thunk and the action's `update` runs on every machine
|
|
9
|
+
* move, so a host's `setHighlightValue` scrolls exactly like a keypress does.
|
|
10
|
+
*
|
|
11
|
+
* The two directions are one reflex: a new active id reveals that element
|
|
12
|
+
* (`scrollIntoView` with `block: "nearest"` — the browser's own scroll, no
|
|
13
|
+
* offset arithmetic, and the nearest scrollable ancestor is the one that
|
|
14
|
+
* moves), and the active id going away scrolls the lists back to the top,
|
|
15
|
+
* which is what a panel should show on its next open. A host that scrolls its
|
|
16
|
+
* own content supplies `reveal` and owns the how; the reflex still owns the
|
|
17
|
+
* when.
|
|
18
|
+
*/
|
|
19
|
+
export interface ScrollIntoViewParam {
|
|
20
|
+
/** The id of the element to reveal; empty when nothing is active. */
|
|
21
|
+
readonly activeId: () => string;
|
|
22
|
+
/** The host's own reveal, replacing the built-in scrollIntoView. */
|
|
23
|
+
readonly reveal?: () => void;
|
|
24
|
+
/** Reveal the item flush with the container's edge instead of nearest. */
|
|
25
|
+
readonly edge?: "start" | "end";
|
|
26
|
+
}
|
|
27
|
+
export interface ScrollIntoViewResult {
|
|
28
|
+
update?(param: ScrollIntoViewParam | undefined): void;
|
|
29
|
+
destroy?(): void;
|
|
30
|
+
}
|
|
31
|
+
export type ScrollIntoViewAction = (node: Element, param: ScrollIntoViewParam | undefined) => ScrollIntoViewResult | void;
|
|
32
|
+
export declare const scrollIntoView: ScrollIntoViewAction;
|