@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,59 @@
|
|
|
1
|
+
import { clampActiveIds, initial, parseItems } from "./toc.state.js";
|
|
2
|
+
import { selectItem, setActiveIds, setItems } from "./toc.transitions.js";
|
|
3
|
+
import { createMachine } from "@spinjs/components/fsm";
|
|
4
|
+
// src/toc/toc.machine.ts
|
|
5
|
+
/** Table of contents machine: active heading tracking and navigation. */
|
|
6
|
+
function toc(args = {}, authored) {
|
|
7
|
+
return createMachine({
|
|
8
|
+
id: "toc",
|
|
9
|
+
initial: "idle",
|
|
10
|
+
context: initial(args, authored),
|
|
11
|
+
fields: {
|
|
12
|
+
items: {
|
|
13
|
+
parse: parseItems,
|
|
14
|
+
event: "ITEMS.SET"
|
|
15
|
+
},
|
|
16
|
+
activeIds: {
|
|
17
|
+
parse: (raw) => clampActiveIds(Array.isArray(raw) ? raw : [], true),
|
|
18
|
+
event: "ACTIVE.SET"
|
|
19
|
+
},
|
|
20
|
+
multiple: {},
|
|
21
|
+
autoScroll: {},
|
|
22
|
+
rootMargin: {},
|
|
23
|
+
scrollBehavior: {}
|
|
24
|
+
},
|
|
25
|
+
states: {
|
|
26
|
+
idle: { on: {
|
|
27
|
+
"ITEMS.SET": {
|
|
28
|
+
target: "idle",
|
|
29
|
+
assign: setItems
|
|
30
|
+
},
|
|
31
|
+
"ACTIVE.SET": {
|
|
32
|
+
target: "idle",
|
|
33
|
+
assign: setActiveIds
|
|
34
|
+
},
|
|
35
|
+
"ITEM.SELECT": {
|
|
36
|
+
target: "idle",
|
|
37
|
+
assign: selectItem
|
|
38
|
+
}
|
|
39
|
+
} },
|
|
40
|
+
focused: { on: {
|
|
41
|
+
"ITEMS.SET": {
|
|
42
|
+
target: "focused",
|
|
43
|
+
assign: setItems
|
|
44
|
+
},
|
|
45
|
+
"ACTIVE.SET": {
|
|
46
|
+
target: "focused",
|
|
47
|
+
assign: setActiveIds
|
|
48
|
+
},
|
|
49
|
+
"ITEM.SELECT": {
|
|
50
|
+
target: "focused",
|
|
51
|
+
assign: selectItem
|
|
52
|
+
}
|
|
53
|
+
} }
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export { toc };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=toc.machine.js.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { TocArgs, TocContext, TocItem, TocItemState, TocRow, TocState } from "./toc.state.js";
|
|
2
|
+
import { TocEvents } from "./toc.events.js";
|
|
3
|
+
import { ApiOf, ViewFor } from "@spinjs/components/runtime";
|
|
4
|
+
export declare const def: {
|
|
5
|
+
name: string;
|
|
6
|
+
machine: (args: TocArgs, authored: (name: string) => boolean) => import("@spinjs/components/runtime").Machine<TocContext, TocEvents, TocState>;
|
|
7
|
+
start: "idle";
|
|
8
|
+
parts: {
|
|
9
|
+
root: {};
|
|
10
|
+
nav: {
|
|
11
|
+
attrs: () => {
|
|
12
|
+
"aria-label": string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
title: {
|
|
16
|
+
attrs: (scope: ViewFor<TocContext, TocEvents, TocState>) => {
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
list: {
|
|
21
|
+
attrs: (scope: ViewFor<TocContext, TocEvents, TocState>) => {
|
|
22
|
+
role: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
indicator: {
|
|
26
|
+
attrs: (scope: ViewFor<TocContext, TocEvents, TocState>) => {
|
|
27
|
+
"aria-hidden": string;
|
|
28
|
+
"data-active": string | undefined;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
item: {
|
|
32
|
+
attrs: (scope: ViewFor<TocContext, TocEvents, TocState> & {
|
|
33
|
+
readonly slot: TocItem;
|
|
34
|
+
}) => {
|
|
35
|
+
"data-value": string;
|
|
36
|
+
"data-depth": string;
|
|
37
|
+
"data-active": string | undefined;
|
|
38
|
+
"data-first": string | undefined;
|
|
39
|
+
"data-last": string | undefined;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
link: {
|
|
43
|
+
attrs: (scope: ViewFor<TocContext, TocEvents, TocState> & {
|
|
44
|
+
readonly slot: TocItem;
|
|
45
|
+
}) => {
|
|
46
|
+
id: string;
|
|
47
|
+
href: string;
|
|
48
|
+
"aria-current": string | undefined;
|
|
49
|
+
"data-value": string;
|
|
50
|
+
"data-depth": string;
|
|
51
|
+
"data-deep": string | undefined;
|
|
52
|
+
"data-active": string | undefined;
|
|
53
|
+
onClick: (event: MouseEvent) => void;
|
|
54
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
commands: {
|
|
59
|
+
scrollTo: {
|
|
60
|
+
event: ([value]: [value: string]) => {
|
|
61
|
+
type: "ITEM.SELECT";
|
|
62
|
+
value: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
setActiveIds: {
|
|
66
|
+
event: ([activeIds]: [activeIds: readonly string[]]) => {
|
|
67
|
+
type: "ACTIVE.SET";
|
|
68
|
+
activeIds: readonly string[];
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
setItems: {
|
|
72
|
+
event: ([items]: [items: readonly TocRow[]]) => {
|
|
73
|
+
type: "ITEMS.SET";
|
|
74
|
+
items: readonly TocRow[];
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readers: {
|
|
79
|
+
items: {
|
|
80
|
+
read: (context: TocContext) => readonly TocItem[];
|
|
81
|
+
};
|
|
82
|
+
activeIds: {
|
|
83
|
+
read: (context: TocContext) => readonly string[];
|
|
84
|
+
};
|
|
85
|
+
activeItems: {
|
|
86
|
+
read: (context: TocContext) => TocItem[];
|
|
87
|
+
};
|
|
88
|
+
value: {
|
|
89
|
+
read: (context: TocContext) => string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
methods: {
|
|
93
|
+
getItemState: {
|
|
94
|
+
call: (context: TocContext, _state: TocState, [row]: [row: TocItem | string]) => TocItemState;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
events: {
|
|
98
|
+
"active-change": {
|
|
99
|
+
prop: string;
|
|
100
|
+
watch: (context: TocContext) => string[];
|
|
101
|
+
detail: (watched: readonly unknown[]) => {
|
|
102
|
+
activeIds: string[];
|
|
103
|
+
value: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
settled: ({ event, focus }: {
|
|
108
|
+
readonly event: import("@spinjs/components/runtime").AnyEvent;
|
|
109
|
+
readonly before: {
|
|
110
|
+
readonly context: TocContext;
|
|
111
|
+
readonly state: TocState;
|
|
112
|
+
};
|
|
113
|
+
readonly after: {
|
|
114
|
+
readonly context: TocContext;
|
|
115
|
+
readonly state: TocState;
|
|
116
|
+
};
|
|
117
|
+
readonly props: Record<string, unknown>;
|
|
118
|
+
readonly root: () => Element;
|
|
119
|
+
readonly id: (part: string, slot?: unknown) => string;
|
|
120
|
+
readonly focus: (part: string, slot?: unknown) => void;
|
|
121
|
+
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
122
|
+
readonly send: (event: import("@spinjs/components/runtime").AnyEvent) => void;
|
|
123
|
+
}) => void;
|
|
124
|
+
};
|
|
125
|
+
export type TocApi = ApiOf<typeof def>;
|
|
126
|
+
export declare const toc: import("@spinjs/components/runtime").DefinedComponent<TocApi, TocArgs>;
|
|
127
|
+
export type { TocArgs, TocItem, TocItemState, TocRow, TocState };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ROVING_KEYS } from "../shared/keyboard.js";
|
|
2
|
+
import { toc as toc$1 } from "./toc.machine.js";
|
|
3
|
+
import { itemState } from "./toc.state.js";
|
|
4
|
+
import { ariaLabelledBy, defineComponent } from "@spinjs/components/runtime";
|
|
5
|
+
// src/toc/toc.presentation.ts
|
|
6
|
+
const neighbor = (context, value, direction) => {
|
|
7
|
+
const items = context.items;
|
|
8
|
+
const idx = items.findIndex((item) => item.value === value);
|
|
9
|
+
if (idx === -1) return null;
|
|
10
|
+
const next = idx + direction;
|
|
11
|
+
if (next < 0 || next >= items.length) return null;
|
|
12
|
+
return items[next]?.value ?? null;
|
|
13
|
+
};
|
|
14
|
+
const def = {
|
|
15
|
+
name: "toc",
|
|
16
|
+
machine: (args, authored) => toc$1(args, authored),
|
|
17
|
+
start: "idle",
|
|
18
|
+
parts: {
|
|
19
|
+
root: {},
|
|
20
|
+
nav: { attrs: () => ({ "aria-label": "On this page" }) },
|
|
21
|
+
title: { attrs: (scope) => ({ id: scope.id("title") }) },
|
|
22
|
+
list: { attrs: (scope) => ({
|
|
23
|
+
role: "list",
|
|
24
|
+
...ariaLabelledBy(scope, { part: "title" })
|
|
25
|
+
}) },
|
|
26
|
+
indicator: { attrs: (scope) => ({
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
"data-active": scope.context.activeIds.length > 0 ? "" : void 0
|
|
29
|
+
}) },
|
|
30
|
+
item: { attrs: (scope) => {
|
|
31
|
+
const row = scope.slot;
|
|
32
|
+
const st = itemState(scope.context, row);
|
|
33
|
+
return {
|
|
34
|
+
"data-value": row.value,
|
|
35
|
+
"data-depth": String(row.depth),
|
|
36
|
+
"data-active": st.active ? "" : void 0,
|
|
37
|
+
"data-first": st.first ? "" : void 0,
|
|
38
|
+
"data-last": st.last ? "" : void 0
|
|
39
|
+
};
|
|
40
|
+
} },
|
|
41
|
+
link: { attrs: (scope) => {
|
|
42
|
+
const row = scope.slot;
|
|
43
|
+
const st = itemState(scope.context, row);
|
|
44
|
+
return {
|
|
45
|
+
id: scope.id("link", row.value),
|
|
46
|
+
href: `#${row.value}`,
|
|
47
|
+
"aria-current": st.active ? "location" : void 0,
|
|
48
|
+
"data-value": row.value,
|
|
49
|
+
"data-depth": String(row.depth),
|
|
50
|
+
"data-deep": st.depth > 2 ? "" : void 0,
|
|
51
|
+
"data-active": st.active ? "" : void 0,
|
|
52
|
+
onClick: (event) => {
|
|
53
|
+
if (event.defaultPrevented) return;
|
|
54
|
+
scope.send({
|
|
55
|
+
type: "ITEM.SELECT",
|
|
56
|
+
value: row.value
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
onKeydown: (event) => {
|
|
60
|
+
if (event.defaultPrevented) return;
|
|
61
|
+
const intent = ROVING_KEYS[event.key];
|
|
62
|
+
if (intent === void 0) return;
|
|
63
|
+
const items = scope.context.items;
|
|
64
|
+
const target = intent.intent === "next" ? neighbor(scope.context, row.value, 1) : intent.intent === "prev" ? neighbor(scope.context, row.value, -1) : intent.intent === "first" ? items[0]?.value ?? null : items[items.length - 1]?.value ?? null;
|
|
65
|
+
if (target === null) return;
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
scope.send({
|
|
68
|
+
type: "ITEM.SELECT",
|
|
69
|
+
value: target
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
} }
|
|
74
|
+
},
|
|
75
|
+
commands: {
|
|
76
|
+
scrollTo: { event: ([value]) => ({
|
|
77
|
+
type: "ITEM.SELECT",
|
|
78
|
+
value
|
|
79
|
+
}) },
|
|
80
|
+
setActiveIds: { event: ([activeIds]) => ({
|
|
81
|
+
type: "ACTIVE.SET",
|
|
82
|
+
activeIds
|
|
83
|
+
}) },
|
|
84
|
+
setItems: { event: ([items]) => ({
|
|
85
|
+
type: "ITEMS.SET",
|
|
86
|
+
items
|
|
87
|
+
}) }
|
|
88
|
+
},
|
|
89
|
+
readers: {
|
|
90
|
+
items: { read: (context) => context.items },
|
|
91
|
+
activeIds: { read: (context) => context.activeIds },
|
|
92
|
+
activeItems: { read: (context) => context.items.filter((item) => context.activeIds.includes(item.value)) },
|
|
93
|
+
value: { read: (context) => context.activeIds[0] ?? "" }
|
|
94
|
+
},
|
|
95
|
+
methods: { getItemState: { call: (context, _state, [row]) => itemState(context, row) } },
|
|
96
|
+
events: { "active-change": {
|
|
97
|
+
prop: "onActiveChange",
|
|
98
|
+
watch: (context) => [context.activeIds.join("\0")],
|
|
99
|
+
detail: (watched) => {
|
|
100
|
+
const joined = typeof watched[0] === "string" ? watched[0] : "";
|
|
101
|
+
const activeIds = joined.length > 0 ? joined.split("\0") : [];
|
|
102
|
+
return {
|
|
103
|
+
activeIds,
|
|
104
|
+
value: activeIds[0] ?? ""
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
} },
|
|
108
|
+
settled: ({ event, focus }) => {
|
|
109
|
+
if (event.type !== "ITEM.SELECT") return;
|
|
110
|
+
const value = event["value"];
|
|
111
|
+
if (typeof value === "string") focus("link", value);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const toc = defineComponent(def);
|
|
115
|
+
export { def, toc };
|
|
116
|
+
|
|
117
|
+
//# sourceMappingURL=toc.presentation.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface TocItem {
|
|
2
|
+
readonly value: string;
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly depth: number;
|
|
5
|
+
}
|
|
6
|
+
export interface TocItemState {
|
|
7
|
+
readonly value: string;
|
|
8
|
+
readonly active: boolean;
|
|
9
|
+
readonly depth: number;
|
|
10
|
+
readonly first: boolean;
|
|
11
|
+
readonly last: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type TocState = "idle" | "focused";
|
|
14
|
+
export interface TocContext {
|
|
15
|
+
items: readonly TocItem[];
|
|
16
|
+
activeIds: readonly string[];
|
|
17
|
+
defaultActiveIds: readonly string[];
|
|
18
|
+
multiple: boolean;
|
|
19
|
+
autoScroll: boolean;
|
|
20
|
+
rootMargin: string;
|
|
21
|
+
scrollBehavior: "smooth" | "instant" | "auto";
|
|
22
|
+
}
|
|
23
|
+
export interface TocRow {
|
|
24
|
+
readonly value?: string;
|
|
25
|
+
readonly label?: string;
|
|
26
|
+
readonly depth?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface TocArgs {
|
|
29
|
+
items?: readonly TocRow[];
|
|
30
|
+
activeIds?: readonly string[];
|
|
31
|
+
defaultActiveIds?: readonly string[];
|
|
32
|
+
multiple?: boolean;
|
|
33
|
+
autoScroll?: boolean;
|
|
34
|
+
rootMargin?: string;
|
|
35
|
+
scrollBehavior?: "smooth" | "instant" | "auto";
|
|
36
|
+
}
|
|
37
|
+
export declare function parseItems(raw: unknown): TocItem[];
|
|
38
|
+
export declare function parseActiveIds(raw: unknown): string[];
|
|
39
|
+
export declare function clampActiveIds(ids: readonly string[], multiple: boolean): readonly string[];
|
|
40
|
+
export declare function itemState(context: TocContext, row: TocItem | string): TocItemState;
|
|
41
|
+
export declare function initial(args: TocArgs | undefined, authored: (name: string) => boolean): TocContext;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defaultTwin } from "@spinjs/components/runtime";
|
|
2
|
+
// src/toc/toc.state.ts
|
|
3
|
+
function parseItems(raw) {
|
|
4
|
+
const items = [];
|
|
5
|
+
const list = Array.isArray(raw) ? raw : [];
|
|
6
|
+
for (const entry of list) {
|
|
7
|
+
if (typeof entry !== "object" || entry === null) continue;
|
|
8
|
+
const row = entry;
|
|
9
|
+
const value = row["value"];
|
|
10
|
+
if (typeof value !== "string" || value.length === 0) continue;
|
|
11
|
+
const label = row["label"];
|
|
12
|
+
const rawDepth = row["depth"];
|
|
13
|
+
const depth = typeof rawDepth === "number" && Number.isFinite(rawDepth) ? Math.max(1, Math.trunc(rawDepth)) : 2;
|
|
14
|
+
items.push({
|
|
15
|
+
value,
|
|
16
|
+
label: typeof label === "string" && label.length > 0 ? label : value,
|
|
17
|
+
depth
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return items;
|
|
21
|
+
}
|
|
22
|
+
function parseActiveIds(raw) {
|
|
23
|
+
if (!Array.isArray(raw)) return [];
|
|
24
|
+
const out = [];
|
|
25
|
+
for (const item of raw) if (typeof item === "string" && item.length > 0 && !out.includes(item)) out.push(item);
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
function clampActiveIds(ids, multiple) {
|
|
29
|
+
const unique = parseActiveIds(ids);
|
|
30
|
+
if (!multiple && unique.length > 1) return [unique[0]];
|
|
31
|
+
return unique;
|
|
32
|
+
}
|
|
33
|
+
function itemState(context, row) {
|
|
34
|
+
const value = typeof row === "string" ? row : row.value;
|
|
35
|
+
const idx = context.items.findIndex((entry) => entry.value === value);
|
|
36
|
+
const depth = (idx >= 0 ? context.items[idx] : void 0)?.depth ?? (typeof row === "object" && row !== null ? row.depth : 2);
|
|
37
|
+
return {
|
|
38
|
+
value,
|
|
39
|
+
active: context.activeIds.includes(value),
|
|
40
|
+
depth,
|
|
41
|
+
first: idx === 0,
|
|
42
|
+
last: idx >= 0 && idx === context.items.length - 1
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function initial(args = {}, authored) {
|
|
46
|
+
const written = (field) => authored(field) || authored(defaultTwin(field)) || args.defaultActiveIds !== void 0;
|
|
47
|
+
const items = parseItems(args.items ?? []);
|
|
48
|
+
const multiple = args.multiple ?? false;
|
|
49
|
+
const hostIds = parseActiveIds(args.activeIds ?? []);
|
|
50
|
+
const defaultActiveIds = parseActiveIds(args.defaultActiveIds ?? []);
|
|
51
|
+
const fallback = items[0] !== void 0 ? [items[0].value] : [];
|
|
52
|
+
return {
|
|
53
|
+
items,
|
|
54
|
+
activeIds: clampActiveIds(written("activeIds") ? hostIds.length > 0 ? hostIds : defaultActiveIds.length > 0 ? defaultActiveIds : fallback : fallback, multiple),
|
|
55
|
+
defaultActiveIds,
|
|
56
|
+
multiple,
|
|
57
|
+
autoScroll: args.autoScroll ?? true,
|
|
58
|
+
rootMargin: args.rootMargin ?? "-20px 0px -40% 0px",
|
|
59
|
+
scrollBehavior: args.scrollBehavior ?? "smooth"
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export { clampActiveIds, initial, itemState, parseActiveIds, parseItems };
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=toc.state.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TocEvents } from "./toc.events.js";
|
|
2
|
+
import { TocContext } from "./toc.state.js";
|
|
3
|
+
import { AssignFor } from "@spinjs/components/fsm";
|
|
4
|
+
type TocAssign<K extends keyof TocEvents = keyof TocEvents> = AssignFor<TocContext, TocEvents, K>;
|
|
5
|
+
export declare const setItems: TocAssign<"ITEMS.SET">;
|
|
6
|
+
export declare const setActiveIds: TocAssign<"ACTIVE.SET">;
|
|
7
|
+
export declare const selectItem: TocAssign<"ITEM.SELECT">;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { clampActiveIds, parseItems } from "./toc.state.js";
|
|
2
|
+
// src/toc/toc.transitions.ts
|
|
3
|
+
function sameIds(a, b) {
|
|
4
|
+
if (a.length !== b.length) return false;
|
|
5
|
+
for (let i = 0; i < a.length; i += 1) if (a[i] !== b[i]) return false;
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
const setItems = (ctx, event) => {
|
|
9
|
+
const items = parseItems(event.items);
|
|
10
|
+
const valid = ctx.activeIds.filter((id) => items.some((item) => item.value === id));
|
|
11
|
+
return {
|
|
12
|
+
items,
|
|
13
|
+
activeIds: valid.length > 0 ? clampActiveIds(valid, ctx.multiple) : items[0] !== void 0 ? [items[0].value] : []
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const setActiveIds = (ctx, event) => {
|
|
17
|
+
const next = clampActiveIds(event.activeIds, ctx.multiple);
|
|
18
|
+
return sameIds(ctx.activeIds, next) ? {} : { activeIds: next };
|
|
19
|
+
};
|
|
20
|
+
const selectItem = (ctx, event) => {
|
|
21
|
+
if (event.value.length === 0) return {};
|
|
22
|
+
const next = [event.value];
|
|
23
|
+
return sameIds(ctx.activeIds, next) ? {} : { activeIds: next };
|
|
24
|
+
};
|
|
25
|
+
export { selectItem, setActiveIds, setItems };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=toc.transitions.js.map
|
|
@@ -12,12 +12,12 @@ const machine = toggleGroup({
|
|
|
12
12
|
|
|
13
13
|
<div class="mx-auto flex w-full max-w-md justify-center">
|
|
14
14
|
<div
|
|
15
|
-
class={["inline-flex items-center gap-1 rounded-lg border
|
|
15
|
+
class={["inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1", { "flex-col": machine.orientation === "vertical" }]}
|
|
16
16
|
{...machine.getRootProps()}
|
|
17
17
|
>
|
|
18
18
|
<template for={machine.getItems()} as={row} key={row.value}>
|
|
19
19
|
<button
|
|
20
|
-
class={["bare rounded-md px-3 py-1
|
|
20
|
+
class={["bare rounded-md px-3 py-1 transition-all hover:bg-surface", { "bg-surface shadow-sm": machine.getItemState(row).pressed, "text-muted": !machine.getItemState(row).pressed, "cursor-not-allowed opacity-50": machine.disabled }]}
|
|
21
21
|
{...machine.getItemProps(row)}
|
|
22
22
|
>{row.label}</button>
|
|
23
23
|
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/toggle-group/examples/basic.html
|
|
2
|
+
var basic_default = "<script lang=\"ts\">\nimport { toggleGroup } from \"../toggle-group.presentation.ts\";\n\nconst machine = toggleGroup({\n items: [{ \"value\": \"left\", \"label\": \"Left\" }, {\n \"value\": \"center\",\n \"label\": \"Center\",\n }, { \"value\": \"right\", \"label\": \"Right\" }],\n defaultValue: [\"left\"],\n});\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-md justify-center\">\n <div\n class={[\"inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1\", { \"flex-col\": machine.orientation === \"vertical\" }]}\n {...machine.getRootProps()}\n >\n <template for={machine.getItems()} as={row} key={row.value}>\n <button\n class={[\"bare rounded-md px-3 py-1 transition-all hover:bg-surface\", { \"bg-surface shadow-sm\": machine.getItemState(row).pressed, \"text-muted\": !machine.getItemState(row).pressed, \"cursor-not-allowed opacity-50\": machine.disabled }]}\n {...machine.getItemProps(row)}\n >{row.label}</button>\n </template>\n </div>\n</div>\n";
|
|
3
|
+
export { basic_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=basic.html.js.map
|
|
@@ -14,7 +14,7 @@ const machine = toggleGroup({
|
|
|
14
14
|
<div class="inline-flex items-center gap-1" {...machine.getRootProps()}>
|
|
15
15
|
<template for={machine.getItems()} as={row} key={row.value}>
|
|
16
16
|
<button
|
|
17
|
-
class={["bare rounded-md px-3 py-2
|
|
17
|
+
class={["bare rounded-md px-3 py-2 transition-all hover:bg-surface", { "bg-surface-raised": machine.getItemState(row).pressed, "text-muted": !machine.getItemState(row).pressed }]}
|
|
18
18
|
{...machine.getItemProps(row)}
|
|
19
19
|
>{row.label}</button>
|
|
20
20
|
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/toggle-group/examples/ghost.html
|
|
2
|
+
var ghost_default = "<script lang=\"ts\">\nimport { toggleGroup } from \"../toggle-group.presentation.ts\";\n\nconst machine = toggleGroup({\n items: [{ \"value\": \"sm\", \"label\": \"S\" }, { \"value\": \"md\", \"label\": \"M\" }, {\n \"value\": \"lg\",\n \"label\": \"L\",\n }, { \"value\": \"xl\", \"label\": \"XL\" }],\n defaultValue: [\"md\"],\n});\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-md justify-center\">\n <div class=\"inline-flex items-center gap-1\" {...machine.getRootProps()}>\n <template for={machine.getItems()} as={row} key={row.value}>\n <button\n class={[\"bare rounded-md px-3 py-2 transition-all hover:bg-surface\", { \"bg-surface-raised\": machine.getItemState(row).pressed, \"text-muted\": !machine.getItemState(row).pressed }]}\n {...machine.getItemProps(row)}\n >{row.label}</button>\n </template>\n </div>\n</div>\n";
|
|
3
|
+
export { ghost_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=ghost.html.js.map
|
|
@@ -12,14 +12,14 @@ const machine = toggleGroup({
|
|
|
12
12
|
|
|
13
13
|
<div class="mx-auto flex w-full max-w-md justify-center">
|
|
14
14
|
<div
|
|
15
|
-
class={["inline-flex items-center gap-1 rounded-lg border
|
|
15
|
+
class={["inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1", { "flex-col": machine.orientation === "vertical" }]}
|
|
16
16
|
{...machine.getRootProps()}
|
|
17
17
|
>
|
|
18
18
|
<template for={machine.getItems()} as={row} key={row.value}>
|
|
19
19
|
<button
|
|
20
|
-
class={["bare flex items-center gap-2 rounded-md px-3 py-1
|
|
20
|
+
class={["bare flex items-center gap-2 rounded-md px-3 py-1 transition-all hover:bg-surface", { "bg-surface shadow-sm": machine.getItemState(row).pressed, "text-muted": !machine.getItemState(row).pressed, "cursor-not-allowed opacity-50": machine.disabled }]}
|
|
21
21
|
{...machine.getItemProps(row)}
|
|
22
|
-
><span
|
|
22
|
+
><span aria-hidden="true"><span show={row.value === "grid"} class="inline-block i-lucide-layout-grid type-body"></span><span show={row.value === "list"} class="inline-block i-lucide-list type-body"></span><span show={row.value === "calendar"} class="inline-block i-lucide-calendar type-body"></span></span>{row.label}</button>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/toggle-group/examples/icons.html
|
|
2
|
+
var icons_default = "<script lang=\"ts\">\nimport { toggleGroup } from \"../toggle-group.presentation.ts\";\n\nconst machine = toggleGroup({\n items: [{ \"value\": \"grid\", \"label\": \"Grid\" }, {\n \"value\": \"list\",\n \"label\": \"List\",\n }, { \"value\": \"calendar\", \"label\": \"Calendar\" }],\n defaultValue: [\"grid\"],\n});\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-md justify-center\">\n <div\n class={[\"inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1\", { \"flex-col\": machine.orientation === \"vertical\" }]}\n {...machine.getRootProps()}\n >\n <template for={machine.getItems()} as={row} key={row.value}>\n <button\n class={[\"bare flex items-center gap-2 rounded-md px-3 py-1 transition-all hover:bg-surface\", { \"bg-surface shadow-sm\": machine.getItemState(row).pressed, \"text-muted\": !machine.getItemState(row).pressed, \"cursor-not-allowed opacity-50\": machine.disabled }]}\n {...machine.getItemProps(row)}\n ><span aria-hidden=\"true\"><span show={row.value === \"grid\"} class=\"inline-block i-lucide-layout-grid type-body\"></span><span show={row.value === \"list\"} class=\"inline-block i-lucide-list type-body\"></span><span show={row.value === \"calendar\"} class=\"inline-block i-lucide-calendar type-body\"></span></span>{row.label}</button>\n </template>\n </div>\n</div>\n";
|
|
3
|
+
export { icons_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=icons.html.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/toggle-group/examples/multiple.html
|
|
2
|
+
var multiple_default = "<script lang=\"ts\">\nimport { toggleGroup } from \"../toggle-group.presentation.ts\";\n\nconst machine = toggleGroup({\n items: [{ \"value\": \"bold\", \"label\": \"Bold\" }, {\n \"value\": \"italic\",\n \"label\": \"Italic\",\n }, { \"value\": \"underline\", \"label\": \"Underline\" }],\n multiple: true,\n defaultValue: [\"bold\"],\n});\n<\/script>\n\n<include file=\"./basic.html\" />\n";
|
|
3
|
+
export { multiple_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=multiple.html.js.map
|
|
@@ -13,11 +13,11 @@ const machine = toggleGroup({
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<div class="mx-auto flex w-full max-w-md justify-center">
|
|
16
|
-
<div class="inline-flex overflow-hidden border
|
|
16
|
+
<div class="inline-flex overflow-hidden border rounded-lg"
|
|
17
17
|
{...machine.getRootProps()}>
|
|
18
18
|
<template for={machine.getItems()} as={row} key={row.value}>
|
|
19
19
|
<button
|
|
20
|
-
class={["bare border-r
|
|
20
|
+
class={["bare border-r px-4 py-2 transition-all last:border-r-0 hover:bg-surface", { "bg-surface-raised": machine.getItemState(row).pressed, "text-muted": !machine.getItemState(row).pressed }]}
|
|
21
21
|
{...machine.getItemProps(row)}
|
|
22
22
|
>{row.label}</button>
|
|
23
23
|
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/toggle-group/examples/outline.html
|
|
2
|
+
var outline_default = "<script lang=\"ts\">\nimport { toggleGroup } from \"../toggle-group.presentation.ts\";\n\nconst machine = toggleGroup({\n items: [\n { \"value\": \"day\", \"label\": \"Day\" },\n { \"value\": \"week\", \"label\": \"Week\" },\n { \"value\": \"month\", \"label\": \"Month\" },\n { \"value\": \"year\", \"label\": \"Year\" },\n ],\n defaultValue: [\"month\"],\n});\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-md justify-center\">\n <div class=\"inline-flex overflow-hidden border rounded-lg\"\n {...machine.getRootProps()}>\n <template for={machine.getItems()} as={row} key={row.value}>\n <button\n class={[\"bare border-r px-4 py-2 transition-all last:border-r-0 hover:bg-surface\", { \"bg-surface-raised\": machine.getItemState(row).pressed, \"text-muted\": !machine.getItemState(row).pressed }]}\n {...machine.getItemProps(row)}\n >{row.label}</button>\n </template>\n </div>\n</div>\n";
|
|
3
|
+
export { outline_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=outline.html.js.map
|
|
@@ -13,13 +13,13 @@ const machine = toggleGroup({
|
|
|
13
13
|
|
|
14
14
|
<div class="mx-auto flex w-full max-w-md justify-center">
|
|
15
15
|
<div
|
|
16
|
-
class="inline-flex items-center gap-1 rounded-lg border
|
|
16
|
+
class="inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-2"
|
|
17
17
|
{...machine.getRootProps()}>
|
|
18
18
|
<template for={machine.getItems()} as={row} key={row.value}>
|
|
19
19
|
<button
|
|
20
|
-
class={["bare rounded-md p-2 transition-all hover:bg-surface
|
|
20
|
+
class={["bare rounded-md p-2 transition-all hover:bg-surface", { "bg-surface shadow-sm": machine.getItemState(row).pressed, "text-muted": !machine.getItemState(row).pressed }]}
|
|
21
21
|
{...machine.getItemProps(row)}
|
|
22
|
-
><span
|
|
22
|
+
><span aria-hidden="true"><span show={row.value === "bold"} class="inline-block i-lucide-bold type-body"></span><span show={row.value === "italic"} class="inline-block i-lucide-italic type-body"></span><span show={row.value === "underline"} class="inline-block i-lucide-underline type-body"></span></span></button>
|
|
23
23
|
</template>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/toggle-group/examples/toolbar.html
|
|
2
|
+
var toolbar_default = "<script lang=\"ts\">\nimport { toggleGroup } from \"../toggle-group.presentation.ts\";\n\nconst machine = toggleGroup({\n items: [{ \"value\": \"bold\", \"label\": \"Bold\" }, {\n \"value\": \"italic\",\n \"label\": \"Italic\",\n }, { \"value\": \"underline\", \"label\": \"Underline\" }],\n multiple: true,\n defaultValue: [\"bold\"],\n});\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-md justify-center\">\n <div\n class=\"inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-2\"\n {...machine.getRootProps()}>\n <template for={machine.getItems()} as={row} key={row.value}>\n <button\n class={[\"bare rounded-md p-2 transition-all hover:bg-surface\", { \"bg-surface shadow-sm\": machine.getItemState(row).pressed, \"text-muted\": !machine.getItemState(row).pressed }]}\n {...machine.getItemProps(row)}\n ><span aria-hidden=\"true\"><span show={row.value === \"bold\"} class=\"inline-block i-lucide-bold type-body\"></span><span show={row.value === \"italic\"} class=\"inline-block i-lucide-italic type-body\"></span><span show={row.value === \"underline\"} class=\"inline-block i-lucide-underline type-body\"></span></span></button>\n </template>\n </div>\n</div>\n";
|
|
3
|
+
export { toolbar_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=toolbar.html.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventUnion } from "@spinjs/
|
|
1
|
+
import { EventUnion } from "@spinjs/components/fsm";
|
|
2
2
|
/**
|
|
3
3
|
* The toggle-group's events, as a MAP: the contract with the outside. The
|
|
4
4
|
* spec's `on` map is typed over it, so a transition's KEY narrows the event
|
|
@@ -41,5 +41,4 @@ export interface ToggleGroupEvents {
|
|
|
41
41
|
export type ToggleGroupEvent = EventUnion<ToggleGroupEvents>;
|
|
42
42
|
export type ToggleGroupValueChange = {
|
|
43
43
|
readonly value: string[];
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=toggle-group.events.d.ts.map
|
|
44
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
/** Toggle-group machine: idle/focused over two states. */
|
|
1
2
|
import { ToggleGroupArgs, ToggleGroupContext, ToggleGroupState } from "./toggle-group.state.js";
|
|
2
3
|
import { ToggleGroupEvents } from "./toggle-group.events.js";
|
|
3
|
-
import { Machine } from "@spinjs/
|
|
4
|
-
export declare function toggleGroup(args?: ToggleGroupArgs, authored?: (name: string) => boolean): Machine<ToggleGroupContext, ToggleGroupEvents, ToggleGroupState>;
|
|
5
|
-
//# sourceMappingURL=toggle-group.machine.d.ts.map
|
|
4
|
+
import { Machine } from "@spinjs/components/fsm";
|
|
5
|
+
export declare function toggleGroup(args?: ToggleGroupArgs, authored?: (name: string) => boolean): Machine<ToggleGroupContext, ToggleGroupEvents, ToggleGroupState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initial } from "./toggle-group.state.js";
|
|
2
2
|
import { clearClickFocus, setFocusedId, setTabbingBackward, setValue } from "./toggle-group.transitions.js";
|
|
3
|
-
import { createMachine } from "@spinjs/
|
|
3
|
+
import { createMachine } from "@spinjs/components/fsm";
|
|
4
4
|
// src/toggle-group/toggle-group.machine.ts
|
|
5
5
|
/** Toggle-group machine: idle/focused over two states. */
|
|
6
6
|
function toggleGroup(args = {}, authored = () => false) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ToggleGroupArgs, ToggleGroupContext, ToggleGroupItem, ToggleGroupState } from "./toggle-group.state.js";
|
|
2
2
|
import { ToggleGroupEvents, ToggleGroupValueChange } from "./toggle-group.events.js";
|
|
3
|
-
import { ApiOf, SlotViewFor, ViewFor } from "@spinjs/runtime";
|
|
3
|
+
import { ApiOf, SlotViewFor, ViewFor } from "@spinjs/components/runtime";
|
|
4
4
|
type Ctx = ToggleGroupContext;
|
|
5
5
|
type ScopeLike = ViewFor<ToggleGroupContext, ToggleGroupEvents, "idle" | "focused">;
|
|
6
6
|
type SlotLike<R> = SlotViewFor<R, ToggleGroupContext, ToggleGroupEvents, "idle" | "focused">;
|
|
7
7
|
export declare const def: {
|
|
8
8
|
name: string;
|
|
9
|
-
machine: (args: ToggleGroupArgs, authored: (name: string) => boolean) => import("@spinjs/runtime").Machine<ToggleGroupContext, ToggleGroupEvents, ToggleGroupState>;
|
|
9
|
+
machine: (args: ToggleGroupArgs, authored: (name: string) => boolean) => import("@spinjs/components/runtime").Machine<ToggleGroupContext, ToggleGroupEvents, ToggleGroupState>;
|
|
10
10
|
start: "idle";
|
|
11
11
|
parts: {
|
|
12
12
|
root: {
|
|
@@ -89,7 +89,7 @@ export declare const def: {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
settled: ({ event, focus }: {
|
|
92
|
-
readonly event: import("@spinjs/runtime").AnyEvent;
|
|
92
|
+
readonly event: import("@spinjs/components/runtime").AnyEvent;
|
|
93
93
|
readonly before: {
|
|
94
94
|
readonly context: ToggleGroupContext;
|
|
95
95
|
readonly state: "idle" | "focused";
|
|
@@ -103,10 +103,9 @@ export declare const def: {
|
|
|
103
103
|
readonly id: (part: string, slot?: unknown) => string;
|
|
104
104
|
readonly focus: (part: string, slot?: unknown) => void;
|
|
105
105
|
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
106
|
-
readonly send: (event: import("@spinjs/runtime").AnyEvent) => void;
|
|
106
|
+
readonly send: (event: import("@spinjs/components/runtime").AnyEvent) => void;
|
|
107
107
|
}) => void;
|
|
108
108
|
};
|
|
109
109
|
export type ToggleGroupApi = ApiOf<typeof def>;
|
|
110
|
-
export declare const toggleGroup: import("@spinjs/runtime").DefinedComponent<ToggleGroupApi, ToggleGroupArgs>;
|
|
111
|
-
export type { ToggleGroupArgs, ToggleGroupItem, ToggleGroupValueChange };
|
|
112
|
-
//# sourceMappingURL=toggle-group.presentation.d.ts.map
|
|
110
|
+
export declare const toggleGroup: import("@spinjs/components/runtime").DefinedComponent<ToggleGroupApi, ToggleGroupArgs>;
|
|
111
|
+
export type { ToggleGroupArgs, ToggleGroupItem, ToggleGroupValueChange };
|