@spinjs/components 0.1.0-preview.1 → 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 +11 -12
- 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 +20 -21
- 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 +7 -8
- 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 +9 -10
- 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
package/README.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
# @spinjs/components
|
|
2
2
|
|
|
3
|
-
Thirty-
|
|
3
|
+
Thirty-eight headless statechart machines and the platform controllers —
|
|
4
4
|
comboboxes, date pickers, carousels, menus, dialogs, and the rest — each with
|
|
5
|
-
copyable `.html` templates you own and restyle through
|
|
5
|
+
copyable `.html` templates you own and restyle through your brand. The client
|
|
6
|
+
runtime (signals, elements, directives, machines) ships in this package too,
|
|
7
|
+
under `@spinjs/components/runtime`.
|
|
6
8
|
|
|
7
9
|
```sh
|
|
8
|
-
npm install @spinjs/components
|
|
10
|
+
npm install @spinjs/components
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
```sh
|
|
12
14
|
npx spin component copy select basic
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
The copy lands at `lib/components/select.html`. The Spin plugin compiles it
|
|
17
|
+
The copy lands at `src/lib/components/select.html`. The Spin plugin compiles it
|
|
16
18
|
into a standard custom element (`<app-select>`) with zero framework lock-in;
|
|
17
19
|
`import "spin/components"` registers every project component, and the plugin
|
|
18
20
|
generates `src/spin-components.d.ts` for DOM and JSX typechecking.
|
|
@@ -54,9 +56,17 @@ import { spinComponentCtl } from "@spinjs/components/controller";
|
|
|
54
56
|
|
|
55
57
|
One subpath per component (`@spinjs/components/select`,
|
|
56
58
|
`@spinjs/components/combobox`, `@spinjs/components/date-picker`, and the other
|
|
57
|
-
thirty-
|
|
59
|
+
thirty-five), plus:
|
|
58
60
|
|
|
59
61
|
- `@spinjs/components/react` — `useSpinComponent`.
|
|
60
62
|
- `@spinjs/components/solid` — `createSpinComponent`.
|
|
61
63
|
- `@spinjs/components/controller` — `spinComponentCtl`.
|
|
62
64
|
- `@spinjs/components/spin-element` — the custom-element base.
|
|
65
|
+
- `@spinjs/components/runtime` — signals, elements, directives, machines.
|
|
66
|
+
- `@spinjs/components/fsm` — the statechart core.
|
|
67
|
+
- `@spinjs/components/props` — prop parsing.
|
|
68
|
+
- `@spinjs/components/load` — the load directive.
|
|
69
|
+
- `@spinjs/components/actions` — gesture and overlay actions.
|
|
70
|
+
- `@spinjs/components/testing` — `parseHTML` and test helpers.
|
|
71
|
+
- `@spinjs/components/compiler` — the `.html` transform.
|
|
72
|
+
- `@spinjs/components/examples` — example sources and machines.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventUnion } from "@spinjs/
|
|
1
|
+
import { EventUnion } from "@spinjs/components/fsm";
|
|
2
2
|
export interface AngleSliderEvents {
|
|
3
3
|
"VALUE.SET": {
|
|
4
4
|
value: number;
|
|
@@ -26,5 +26,4 @@ export type AngleSliderEvent = EventUnion<AngleSliderEvents>;
|
|
|
26
26
|
export type AngleSliderValueChange = {
|
|
27
27
|
readonly value: number;
|
|
28
28
|
readonly valueAsDegree: string;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=angle-slider.events.d.ts.map
|
|
29
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AngleSliderEvents, AngleSliderValueChange } from "./angle-slider.events.js";
|
|
2
1
|
import { AngleSliderArgs, AngleSliderContext, AngleSliderState, clampAngle, constrainAngle, displayAngle, initial, isInteractive, pointAngle, pointerAngle, resolveValue, snapAngle, valueAsDegree } from "./angle-slider.state.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { AngleSliderEvents, AngleSliderValueChange } from "./angle-slider.events.js";
|
|
3
|
+
import { Machine } from "@spinjs/components/fsm";
|
|
4
|
+
import { defaultTwin } from "@spinjs/components/runtime";
|
|
5
5
|
export declare const MIN_VALUE = 0;
|
|
6
6
|
export declare const MAX_VALUE = 359;
|
|
7
7
|
export declare function angleSlider(args?: AngleSliderArgs, authored?: (name: string) => boolean): Machine<AngleSliderContext, AngleSliderEvents, AngleSliderState>;
|
|
8
|
-
export { AngleSliderArgs, AngleSliderContext, AngleSliderState, type AngleSliderValueChange, clampAngle, constrainAngle, defaultTwin, displayAngle, initial, isInteractive, pointAngle, pointerAngle, resolveValue, snapAngle, valueAsDegree };
|
|
9
|
-
//# sourceMappingURL=angle-slider.machine.d.ts.map
|
|
8
|
+
export { AngleSliderArgs, AngleSliderContext, AngleSliderState, type AngleSliderValueChange, clampAngle, constrainAngle, defaultTwin, displayAngle, initial, isInteractive, pointAngle, pointerAngle, resolveValue, snapAngle, valueAsDegree };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clampAngle, constrainAngle, displayAngle, initial, isInteractive, pointAngle, pointerAngle, resolveValue, snapAngle, valueAsDegree } from "./angle-slider.state.js";
|
|
2
2
|
import { arrowDec, arrowInc, setDragOffset, setPointerValue, setValue } from "./angle-slider.transitions.js";
|
|
3
|
-
import { createMachine } from "@spinjs/
|
|
4
|
-
import { defaultTwin } from "@spinjs/runtime";
|
|
3
|
+
import { createMachine } from "@spinjs/components/fsm";
|
|
4
|
+
import { defaultTwin } from "@spinjs/components/runtime";
|
|
5
5
|
// src/angle-slider/angle-slider.machine.ts
|
|
6
6
|
const MIN_VALUE = 0;
|
|
7
7
|
const MAX_VALUE = 359;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AngleSliderEvents } from "./angle-slider.events.js";
|
|
2
1
|
import { AngleSliderArgs, AngleSliderContext, AngleSliderState } from "./angle-slider.state.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { AngleSliderEvents } from "./angle-slider.events.js";
|
|
3
|
+
import { ApiOf, SlotViewFor, ViewFor } from "@spinjs/components/runtime";
|
|
4
|
+
import { DragDelta, DragPress } from "@spinjs/components/actions";
|
|
5
5
|
/**
|
|
6
6
|
* Angle-slider definition: the DOM contract as data.
|
|
7
7
|
*
|
|
@@ -42,12 +42,12 @@ type SlotLike<R> = SlotViewFor<R, AngleSliderContext, AngleSliderEvents, AngleSl
|
|
|
42
42
|
* thumb. */
|
|
43
43
|
declare const def: {
|
|
44
44
|
name: string;
|
|
45
|
-
machine: (props: AngleSliderArgs, authored: (name: string) => boolean) => import("@spinjs/runtime").Machine<AngleSliderContext, AngleSliderEvents, AngleSliderState>;
|
|
46
|
-
commitEvents: ("VALUE.SET" | "
|
|
45
|
+
machine: (props: AngleSliderArgs, authored: (name: string) => boolean) => import("@spinjs/components/runtime").Machine<AngleSliderContext, AngleSliderEvents, AngleSliderState>;
|
|
46
|
+
commitEvents: ("VALUE.SET" | "THUMB.ARROW_DEC" | "THUMB.ARROW_INC" | "DOC.POINTER_UP" | "THUMB.HOME" | "THUMB.END")[];
|
|
47
47
|
parts: {
|
|
48
48
|
root: {};
|
|
49
49
|
label: {
|
|
50
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>) => {
|
|
50
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>) => {
|
|
51
51
|
id: string;
|
|
52
52
|
for: string;
|
|
53
53
|
onClick: (event: MouseEvent) => void;
|
|
@@ -55,7 +55,7 @@ declare const def: {
|
|
|
55
55
|
};
|
|
56
56
|
hiddenInput: {
|
|
57
57
|
id: string;
|
|
58
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>) => {
|
|
58
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>) => {
|
|
59
59
|
id: string;
|
|
60
60
|
type: string;
|
|
61
61
|
name: string | undefined;
|
|
@@ -63,7 +63,7 @@ declare const def: {
|
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
control: {
|
|
66
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>) => {
|
|
66
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>) => {
|
|
67
67
|
id: string;
|
|
68
68
|
role: string;
|
|
69
69
|
style: {
|
|
@@ -102,7 +102,7 @@ declare const def: {
|
|
|
102
102
|
};
|
|
103
103
|
valueText: {
|
|
104
104
|
id: string;
|
|
105
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>, arg: unknown) => {
|
|
105
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AngleSliderContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AngleSliderEvents>, AngleSliderState>, arg: unknown) => {
|
|
106
106
|
id: string;
|
|
107
107
|
};
|
|
108
108
|
};
|
|
@@ -189,6 +189,5 @@ declare const def: {
|
|
|
189
189
|
};
|
|
190
190
|
};
|
|
191
191
|
export type AngleSliderApi = ApiOf<typeof def>;
|
|
192
|
-
export declare const angleSlider: import("@spinjs/runtime").DefinedComponent<AngleSliderApi, AngleSliderArgs>;
|
|
193
|
-
export {};
|
|
194
|
-
//# sourceMappingURL=angle-slider.presentation.d.ts.map
|
|
192
|
+
export declare const angleSlider: import("@spinjs/components/runtime").DefinedComponent<AngleSliderApi, AngleSliderArgs>;
|
|
193
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { displayAngle, isInteractive as isInteractive$1, valueAsDegree } from "./angle-slider.state.js";
|
|
2
1
|
import { angleSlider as angleSlider$1 } from "./angle-slider.machine.js";
|
|
3
|
-
import {
|
|
2
|
+
import { displayAngle, isInteractive as isInteractive$1, valueAsDegree } from "./angle-slider.state.js";
|
|
3
|
+
import { ariaLabelledBy, defineComponent, focuser, isComposing, sliderThumb } from "@spinjs/components/runtime";
|
|
4
4
|
// src/angle-slider/angle-slider.presentation.ts
|
|
5
5
|
const MARKERS = [
|
|
6
6
|
0,
|
|
@@ -34,5 +34,4 @@ export declare function displayAngle(value: number, dir: "ltr" | "rtl"): number;
|
|
|
34
34
|
export declare function clampAngle(degree: number): number;
|
|
35
35
|
export declare function constrainAngle(degree: number, step: number): number;
|
|
36
36
|
export declare function snapAngle(value: number, step: number): number;
|
|
37
|
-
export declare function valueAsDegree(value: number): string;
|
|
38
|
-
//# sourceMappingURL=angle-slider.state.d.ts.map
|
|
37
|
+
export declare function valueAsDegree(value: number): string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AngleSliderEvents } from "./angle-slider.events.js";
|
|
2
2
|
import { AngleSliderContext } from "./angle-slider.state.js";
|
|
3
|
-
import { AssignFor } from "@spinjs/
|
|
3
|
+
import { AssignFor } from "@spinjs/components/fsm";
|
|
4
4
|
type AngleAssign<K extends keyof AngleSliderEvents = keyof AngleSliderEvents> = AssignFor<AngleSliderContext, AngleSliderEvents, K>;
|
|
5
5
|
export declare const setDragOffset: AngleAssign<"CONTROL.POINTER_DOWN">;
|
|
6
6
|
export declare const setPointerValue: AngleAssign<"CONTROL.POINTER_DOWN" | "DOC.POINTER_MOVE">;
|
|
7
7
|
export declare const setValue: AngleAssign<"VALUE.SET">;
|
|
8
8
|
export declare const arrowDec: AngleAssign<"THUMB.ARROW_DEC">;
|
|
9
9
|
export declare const arrowInc: AngleAssign<"THUMB.ARROW_INC">;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=angle-slider.transitions.d.ts.map
|
|
10
|
+
export {};
|
|
@@ -7,7 +7,7 @@ const machine = angleSlider({ value: "45", ariaLabel: "Angle" });
|
|
|
7
7
|
<div class="mx-auto flex w-full max-w-[20rem] items-center justify-center"
|
|
8
8
|
{...machine.getRootProps()}>
|
|
9
9
|
<div
|
|
10
|
-
class="relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border
|
|
10
|
+
class="relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border bg-surface-raised"
|
|
11
11
|
{...machine.getControlProps()}
|
|
12
12
|
>
|
|
13
13
|
<span
|
|
@@ -35,7 +35,7 @@ const machine = angleSlider({ value: "45", ariaLabel: "Angle" });
|
|
|
35
35
|
{...machine.getValueTextProps()}>
|
|
36
36
|
<span
|
|
37
37
|
class="stat-value tabular-nums">{machine.value}°</span>
|
|
38
|
-
<span class="
|
|
38
|
+
<span class="type-caption text-muted">degrees</span>
|
|
39
39
|
</span>
|
|
40
40
|
</div>
|
|
41
41
|
<input {...machine.getHiddenInputProps()} />
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/angle-slider/examples/basic.html
|
|
2
|
+
var basic_default = "<script lang=\"ts\">\nimport { angleSlider } from \"../angle-slider.presentation.ts\";\n\nconst machine = angleSlider({ value: \"45\", ariaLabel: \"Angle\" });\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-[20rem] items-center justify-center\"\n {...machine.getRootProps()}>\n <div\n class=\"relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border bg-surface-raised\"\n {...machine.getControlProps()}\n >\n <span\n class=\"pointer-events-none absolute inset-y-0 left-1/2 w-[2px]\"\n {...machine.getThumbProps({ needle: true })}\n >\n <span\n class=\"absolute inset-x-0 top-0 block h-[17%] rounded-full bg-primary\"\n aria-hidden=\"true\"></span>\n </span>\n <div class=\"pointer-events-none absolute inset-[1px]\"\n {...machine.getMarkerGroupProps()}>\n <template for={machine.getMarkers()} as={row} key={row}>\n <span\n class=\"absolute inset-y-0 left-1/2 w-[2px]\"\n {...machine.getMarkerProps({ value: row, diameter: true })}\n >\n <span\n class={[\"absolute inset-x-0 top-[6%] block h-[11%] rounded-full\", { \"bg-border-strong\": machine.getMarkerState(row) !== \"at-value\", \"bg-primary\": machine.getMarkerState(row) === \"at-value\" }]}\n aria-hidden=\"true\"></span>\n </span>\n </template>\n </div>\n <span class=\"flex flex-col items-center\"\n {...machine.getValueTextProps()}>\n <span\n class=\"stat-value tabular-nums\">{machine.value}°</span>\n <span class=\"type-caption text-muted\">degrees</span>\n </span>\n </div>\n <input {...machine.getHiddenInputProps()} />\n</div>\n";
|
|
3
|
+
export { basic_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=basic.html.js.map
|
|
@@ -27,7 +27,7 @@ const machine = angleSlider({ value: "121", ariaLabel: "Angle" });
|
|
|
27
27
|
{...machine.getValueTextProps()}>
|
|
28
28
|
<span
|
|
29
29
|
class="stat-value tabular-nums">{machine.value}°</span>
|
|
30
|
-
<span class="
|
|
30
|
+
<span class="type-caption text-muted">degrees</span>
|
|
31
31
|
</span>
|
|
32
32
|
</div>
|
|
33
33
|
<input {...machine.getHiddenInputProps()} />
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/angle-slider/examples/knob.html
|
|
2
|
+
var knob_default = "<script lang=\"ts\">\nimport { angleSlider } from \"../angle-slider.presentation.ts\";\n\nconst machine = angleSlider({ value: \"121\", ariaLabel: \"Angle\" });\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-[20rem] flex-col items-center gap-4\"\n {...machine.getRootProps()}>\n <div\n class=\"relative flex h-[15rem] w-[15rem] items-center justify-center\"\n {...machine.getControlProps()}\n >\n <svg class=\"absolute inset-0 h-full w-full -rotate-90\" viewBox=\"0 0 200 200\"\n aria-hidden=\"true\">\n <circle cx=\"100\" cy=\"100\" r=\"80\" class=\"fill-none stroke-surface-sunken\"\n stroke-width=\"20\" />\n <circle cx=\"100\" cy=\"100\" r=\"80\" class=\"fill-none stroke-primary\"\n stroke-width=\"20\" stroke-linecap=\"round\"\n stroke-dasharray={502.65}\n stroke-dashoffset={502.65 * (1 - machine.value / 360)} />\n </svg>\n <span\n class={[\"absolute h-[1.75rem] w-[1.75rem] -translate-1/2 rounded-full border-2 border-solid border-primary bg-surface\", { \"opacity-50\": machine.disabled }]}\n {...machine.getThumbProps()}\n ></span>\n <span class=\"flex flex-col items-center\"\n {...machine.getValueTextProps()}>\n <span\n class=\"stat-value tabular-nums\">{machine.value}°</span>\n <span class=\"type-caption text-muted\">degrees</span>\n </span>\n </div>\n <input {...machine.getHiddenInputProps()} />\n</div>\n";
|
|
3
|
+
export { knob_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=knob.html.js.map
|
|
@@ -6,28 +6,28 @@ const machine = angleSlider({ value: "121" });
|
|
|
6
6
|
|
|
7
7
|
<div class="mx-auto flex w-full max-w-[20rem] flex-col items-center justify-center"
|
|
8
8
|
{...machine.getRootProps()}>
|
|
9
|
-
<label class="mb-2
|
|
9
|
+
<label class="mb-2" {...machine.getLabelProps()}>Angle</label>
|
|
10
10
|
<div class="relative p-8">
|
|
11
11
|
<div class="pointer-events-none absolute inset-0" aria-hidden="true">
|
|
12
12
|
<span
|
|
13
|
-
class="absolute -translate-1/2
|
|
13
|
+
class="absolute -translate-1/2 type-code text-muted left-[50%] top-[5.3%]">0°</span>
|
|
14
14
|
<span
|
|
15
|
-
class="absolute -translate-1/2
|
|
15
|
+
class="absolute -translate-1/2 type-code text-muted left-[81.6%] top-[18.4%]">45°</span>
|
|
16
16
|
<span
|
|
17
|
-
class="absolute -translate-1/2
|
|
17
|
+
class="absolute -translate-1/2 type-code text-muted left-[94.7%] top-[50%]">90°</span>
|
|
18
18
|
<span
|
|
19
|
-
class="absolute -translate-1/2
|
|
19
|
+
class="absolute -translate-1/2 type-code text-muted left-[81.6%] top-[81.6%]">135°</span>
|
|
20
20
|
<span
|
|
21
|
-
class="absolute -translate-1/2
|
|
21
|
+
class="absolute -translate-1/2 type-code text-muted left-[50%] top-[94.7%]">180°</span>
|
|
22
22
|
<span
|
|
23
|
-
class="absolute -translate-1/2
|
|
23
|
+
class="absolute -translate-1/2 type-code text-muted left-[18.4%] top-[81.6%]">225°</span>
|
|
24
24
|
<span
|
|
25
|
-
class="absolute -translate-1/2
|
|
25
|
+
class="absolute -translate-1/2 type-code text-muted left-[5.3%] top-[50%]">270°</span>
|
|
26
26
|
<span
|
|
27
|
-
class="absolute -translate-1/2
|
|
27
|
+
class="absolute -translate-1/2 type-code text-muted left-[18.4%] top-[18.4%]">315°</span>
|
|
28
28
|
</div>
|
|
29
29
|
<div
|
|
30
|
-
class="relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border
|
|
30
|
+
class="relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border bg-surface-raised"
|
|
31
31
|
{...machine.getControlProps()}
|
|
32
32
|
>
|
|
33
33
|
<span
|
|
@@ -55,7 +55,7 @@ const machine = angleSlider({ value: "121" });
|
|
|
55
55
|
{...machine.getValueTextProps()}>
|
|
56
56
|
<span
|
|
57
57
|
class="stat-value tabular-nums">{machine.value}°</span>
|
|
58
|
-
<span class="
|
|
58
|
+
<span class="type-caption text-muted">degrees</span>
|
|
59
59
|
</span>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/angle-slider/examples/labeled.html
|
|
2
|
+
var labeled_default = "<script lang=\"ts\">\nimport { angleSlider } from \"../angle-slider.presentation.ts\";\n\nconst machine = angleSlider({ value: \"121\" });\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-[20rem] flex-col items-center justify-center\"\n {...machine.getRootProps()}>\n <label class=\"mb-2\" {...machine.getLabelProps()}>Angle</label>\n <div class=\"relative p-8\">\n <div class=\"pointer-events-none absolute inset-0\" aria-hidden=\"true\">\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[50%] top-[5.3%]\">0°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[81.6%] top-[18.4%]\">45°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[94.7%] top-[50%]\">90°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[81.6%] top-[81.6%]\">135°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[50%] top-[94.7%]\">180°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[18.4%] top-[81.6%]\">225°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[5.3%] top-[50%]\">270°</span>\n <span\n class=\"absolute -translate-1/2 type-code text-muted left-[18.4%] top-[18.4%]\">315°</span>\n </div>\n <div\n class=\"relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border bg-surface-raised\"\n {...machine.getControlProps()}\n >\n <span\n class=\"pointer-events-none absolute inset-y-0 left-1/2 w-[2px]\"\n {...machine.getThumbProps({ needle: true })}\n >\n <span\n class=\"absolute inset-x-0 top-0 block h-[17%] rounded-full bg-primary\"\n aria-hidden=\"true\"></span>\n </span>\n <div class=\"pointer-events-none absolute inset-[1px]\"\n {...machine.getMarkerGroupProps()}>\n <template for={machine.getMarkers()} as={row} key={row}>\n <span\n class=\"absolute inset-y-0 left-1/2 w-[2px]\"\n {...machine.getMarkerProps({ value: row, diameter: true })}\n >\n <span\n class={[\"absolute inset-x-0 top-[6%] block h-[11%] rounded-full\", { \"bg-border-strong\": machine.getMarkerState(row) === \"over-value\", \"bg-semantic-success\": machine.getMarkerState(row) === \"under-value\", \"bg-primary\": machine.getMarkerState(row) === \"at-value\" }]}\n aria-hidden=\"true\"></span>\n </span>\n </template>\n </div>\n <span class=\"flex flex-col items-center\"\n {...machine.getValueTextProps()}>\n <span\n class=\"stat-value tabular-nums\">{machine.value}°</span>\n <span class=\"type-caption text-muted\">degrees</span>\n </span>\n </div>\n </div>\n <input {...machine.getHiddenInputProps()} />\n</div>\n";
|
|
3
|
+
export { labeled_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=labeled.html.js.map
|
|
@@ -7,7 +7,7 @@ const machine = angleSlider({ value: "45", step: "10", ariaLabel: "Angle" });
|
|
|
7
7
|
<div class="mx-auto flex w-full max-w-[20rem] items-center justify-center"
|
|
8
8
|
{...machine.getRootProps()}>
|
|
9
9
|
<div
|
|
10
|
-
class="relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border
|
|
10
|
+
class="relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border bg-surface-raised"
|
|
11
11
|
{...machine.getControlProps()}
|
|
12
12
|
>
|
|
13
13
|
<span
|
|
@@ -35,7 +35,7 @@ const machine = angleSlider({ value: "45", step: "10", ariaLabel: "Angle" });
|
|
|
35
35
|
{...machine.getValueTextProps()}>
|
|
36
36
|
<span
|
|
37
37
|
class="stat-value tabular-nums">{machine.value}°</span>
|
|
38
|
-
<span class="
|
|
38
|
+
<span class="type-caption text-muted">degrees</span>
|
|
39
39
|
</span>
|
|
40
40
|
</div>
|
|
41
41
|
<input {...machine.getHiddenInputProps()} />
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/angle-slider/examples/marks.html
|
|
2
|
+
var marks_default = "<script lang=\"ts\">\nimport { angleSlider } from \"../angle-slider.presentation.ts\";\n\nconst machine = angleSlider({ value: \"45\", step: \"10\", ariaLabel: \"Angle\" });\n<\/script>\n\n<div class=\"mx-auto flex w-full max-w-[20rem] items-center justify-center\"\n {...machine.getRootProps()}>\n <div\n class=\"relative flex h-[15rem] w-[15rem] items-center justify-center rounded-full border bg-surface-raised\"\n {...machine.getControlProps()}\n >\n <span\n class=\"pointer-events-none absolute inset-y-0 left-1/2 w-[2px]\"\n {...machine.getThumbProps({ needle: true })}\n >\n <span\n class=\"absolute inset-x-0 top-0 block h-[17%] rounded-full bg-primary\"\n aria-hidden=\"true\"></span>\n </span>\n <div class=\"pointer-events-none absolute inset-[1px]\"\n {...machine.getMarkerGroupProps()}>\n <template for={machine.getMarkers()} as={row} key={row}>\n <span\n class=\"absolute inset-y-0 left-1/2 w-[2px]\"\n {...machine.getMarkerProps({ value: row, diameter: true })}\n >\n <span\n class={[\"absolute inset-x-0 top-[6%] block h-[11%] rounded-full\", { \"bg-border-strong\": machine.getMarkerState(row) === \"over-value\", \"bg-semantic-success\": machine.getMarkerState(row) === \"under-value\", \"bg-primary\": machine.getMarkerState(row) === \"at-value\" }]}\n aria-hidden=\"true\"></span>\n </span>\n </template>\n </div>\n <span class=\"flex flex-col items-center\"\n {...machine.getValueTextProps()}>\n <span\n class=\"stat-value tabular-nums\">{machine.value}°</span>\n <span class=\"type-caption text-muted\">degrees</span>\n </span>\n </div>\n <input {...machine.getHiddenInputProps()} />\n</div>\n";
|
|
3
|
+
export { marks_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=marks.html.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SortDescriptor } from "./async-list.state.js";
|
|
2
|
-
import { EventUnion } from "@spinjs/
|
|
2
|
+
import { EventUnion } from "@spinjs/components/fsm";
|
|
3
3
|
export interface AsyncListEvents {
|
|
4
4
|
"RELOAD": {};
|
|
5
5
|
"LOAD_MORE": {};
|
|
@@ -19,5 +19,4 @@ export interface AsyncListEvents {
|
|
|
19
19
|
};
|
|
20
20
|
"ABORT": {};
|
|
21
21
|
}
|
|
22
|
-
export type AsyncListEvent = EventUnion<AsyncListEvents>;
|
|
23
|
-
//# sourceMappingURL=async-list.events.d.ts.map
|
|
22
|
+
export type AsyncListEvent = EventUnion<AsyncListEvents>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AsyncListArgs, AsyncListContext, AsyncListState } from "./async-list.state.js";
|
|
2
2
|
import { AsyncListEvents } from "./async-list.events.js";
|
|
3
|
-
import { Machine } from "@spinjs/
|
|
4
|
-
export declare function asyncList(args?: AsyncListArgs, authored?: (name: string) => boolean): Machine<AsyncListContext, AsyncListEvents, AsyncListState>;
|
|
5
|
-
//# sourceMappingURL=async-list.machine.d.ts.map
|
|
3
|
+
import { Machine } from "@spinjs/components/fsm";
|
|
4
|
+
export declare function asyncList(args?: AsyncListArgs, authored?: (name: string) => boolean): Machine<AsyncListContext, AsyncListEvents, AsyncListState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initial } from "./async-list.state.js";
|
|
2
2
|
import { clearCursor, clearError, clearItems, hasCursor, hasSortFn, setCursor, setError, setFilterText, setItems, setSortDescriptor } from "./async-list.transitions.js";
|
|
3
|
-
import { createMachine } from "@spinjs/
|
|
3
|
+
import { createMachine } from "@spinjs/components/fsm";
|
|
4
4
|
// src/async-list/async-list.machine.ts
|
|
5
5
|
function asyncList(args = {}, authored = () => false) {
|
|
6
6
|
return createMachine({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsyncListArgs, AsyncListContext, AsyncListState, SortDescriptor } from "./async-list.state.js";
|
|
2
2
|
import { AsyncListEvents } from "./async-list.events.js";
|
|
3
|
-
import { ApiOf, SlotViewFor, ViewFor } from "@spinjs/runtime";
|
|
3
|
+
import { ApiOf, SlotViewFor, ViewFor } from "@spinjs/components/runtime";
|
|
4
4
|
/**
|
|
5
5
|
* Async-list definition: the DOM contract as data.
|
|
6
6
|
*
|
|
@@ -49,13 +49,13 @@ type ScopeLike = ViewFor<AsyncListContext, AsyncListEvents, AsyncListState>;
|
|
|
49
49
|
type SlotLike<R> = SlotViewFor<R, AsyncListContext, AsyncListEvents, AsyncListState>;
|
|
50
50
|
declare const def: {
|
|
51
51
|
name: string;
|
|
52
|
-
machine: (args: AsyncListArgs, authored: (name: string) => boolean) => import("@spinjs/runtime").Machine<AsyncListContext, AsyncListEvents, AsyncListState>;
|
|
52
|
+
machine: (args: AsyncListArgs, authored: (name: string) => boolean) => import("@spinjs/components/runtime").Machine<AsyncListContext, AsyncListEvents, AsyncListState>;
|
|
53
53
|
start: "idle";
|
|
54
54
|
establish: (raw: Record<string, unknown>) => {
|
|
55
55
|
type: string;
|
|
56
56
|
}[];
|
|
57
57
|
settled: ({ event, before, after, root, send }: {
|
|
58
|
-
readonly event: import("@spinjs/runtime").AnyEvent;
|
|
58
|
+
readonly event: import("@spinjs/components/runtime").AnyEvent;
|
|
59
59
|
readonly before: {
|
|
60
60
|
readonly context: AsyncListContext;
|
|
61
61
|
readonly state: AsyncListState;
|
|
@@ -69,7 +69,7 @@ declare const def: {
|
|
|
69
69
|
readonly id: (part: string, slot?: unknown) => string;
|
|
70
70
|
readonly focus: (part: string, slot?: unknown) => void;
|
|
71
71
|
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
72
|
-
readonly send: (event: import("@spinjs/runtime").AnyEvent) => void;
|
|
72
|
+
readonly send: (event: import("@spinjs/components/runtime").AnyEvent) => void;
|
|
73
73
|
}) => void;
|
|
74
74
|
scalarsOf: (parsed: Record<string, unknown>) => {
|
|
75
75
|
hasSortFn: boolean;
|
|
@@ -99,7 +99,7 @@ declare const def: {
|
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
list: {
|
|
102
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
102
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
103
103
|
"data-state": AsyncListState;
|
|
104
104
|
"data-count": number;
|
|
105
105
|
"data-empty": string | undefined;
|
|
@@ -107,19 +107,19 @@ declare const def: {
|
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
empty: {
|
|
110
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
110
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
111
111
|
"data-empty": string | undefined;
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
error: {
|
|
115
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
115
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
116
116
|
role: string;
|
|
117
117
|
"data-state": string;
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
120
|
filterInput: {
|
|
121
121
|
id: string;
|
|
122
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
122
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
123
123
|
type: string;
|
|
124
124
|
value: string;
|
|
125
125
|
placeholder: string;
|
|
@@ -130,7 +130,7 @@ declare const def: {
|
|
|
130
130
|
};
|
|
131
131
|
clearFilter: {
|
|
132
132
|
id: string;
|
|
133
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
133
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
134
134
|
type: string;
|
|
135
135
|
"aria-label": string;
|
|
136
136
|
"data-filled": string | undefined;
|
|
@@ -147,7 +147,7 @@ declare const def: {
|
|
|
147
147
|
};
|
|
148
148
|
loadMore: {
|
|
149
149
|
id: string;
|
|
150
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
150
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
151
151
|
type: string;
|
|
152
152
|
"data-state": AsyncListState;
|
|
153
153
|
"data-more": string | undefined;
|
|
@@ -157,7 +157,7 @@ declare const def: {
|
|
|
157
157
|
};
|
|
158
158
|
};
|
|
159
159
|
sentinel: {
|
|
160
|
-
attrs: (scope: import("@spinjs/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
160
|
+
attrs: (scope: import("@spinjs/components/runtime").PartView<unknown, AsyncListContext, Record<string, unknown>, import("@spinjs/components/runtime").EventUnion<AsyncListEvents>, AsyncListState>) => {
|
|
161
161
|
"data-state": AsyncListState;
|
|
162
162
|
hidden: boolean;
|
|
163
163
|
"data-more": string | undefined;
|
|
@@ -289,6 +289,5 @@ declare const def: {
|
|
|
289
289
|
};
|
|
290
290
|
};
|
|
291
291
|
export type AsyncListApi = ApiOf<typeof def>;
|
|
292
|
-
export declare const asyncList: import("@spinjs/runtime").DefinedComponent<AsyncListApi, AsyncListArgs>;
|
|
293
|
-
export {};
|
|
294
|
-
//# sourceMappingURL=async-list.presentation.d.ts.map
|
|
292
|
+
export declare const asyncList: import("@spinjs/components/runtime").DefinedComponent<AsyncListApi, AsyncListArgs>;
|
|
293
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isSortDescriptor, itemsOf } from "./async-list.state.js";
|
|
2
1
|
import { asyncList as asyncList$1 } from "./async-list.machine.js";
|
|
3
|
-
import {
|
|
2
|
+
import { isSortDescriptor, itemsOf } from "./async-list.state.js";
|
|
3
|
+
import { ariaBusy, ariaHidden, ariaPressed, dataAttr, defineComponent, isRecord } from "@spinjs/components/runtime";
|
|
4
4
|
// src/async-list/async-list.presentation.ts
|
|
5
5
|
/** A host function is not something the scope grammar can type, so it
|
|
6
6
|
* rides the prop channel as a property write: declared, read live,
|
|
@@ -23,5 +23,4 @@ export interface AsyncListContext {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const isSortDescriptor: (value: unknown) => value is SortDescriptor;
|
|
25
25
|
export declare function itemsOf(raw: unknown): readonly unknown[];
|
|
26
|
-
export declare function initial(args?: AsyncListArgs, authored?: (name: string) => boolean): AsyncListContext;
|
|
27
|
-
//# sourceMappingURL=async-list.state.d.ts.map
|
|
26
|
+
export declare function initial(args?: AsyncListArgs, authored?: (name: string) => boolean): AsyncListContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AsyncListContext } from "./async-list.state.js";
|
|
2
1
|
import { AsyncListEvents } from "./async-list.events.js";
|
|
3
|
-
import {
|
|
2
|
+
import { AsyncListContext } from "./async-list.state.js";
|
|
3
|
+
import { AssignFor, GuardFor } from "@spinjs/components/fsm";
|
|
4
4
|
type AsyncListAssign<K extends keyof AsyncListEvents = keyof AsyncListEvents> = AssignFor<AsyncListContext, AsyncListEvents, K>;
|
|
5
5
|
export declare const clearItems: AsyncListAssign;
|
|
6
6
|
export declare const setItems: AsyncListAssign<"SUCCESS">;
|
|
@@ -12,5 +12,4 @@ export declare const setSortDescriptor: AsyncListAssign<"SORT">;
|
|
|
12
12
|
export declare const clearCursor: AsyncListAssign;
|
|
13
13
|
export declare const hasSortFn: GuardFor<AsyncListContext, AsyncListEvents>;
|
|
14
14
|
export declare const hasCursor: GuardFor<AsyncListContext, AsyncListEvents>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=async-list.transitions.d.ts.map
|
|
15
|
+
export {};
|
|
@@ -25,12 +25,12 @@ const machine = asyncList({
|
|
|
25
25
|
class="secondary s-sm"
|
|
26
26
|
aria-label="Sort ascending"
|
|
27
27
|
{...machine.getSortTriggerProps({ column: "name", direction: "ascending" })}
|
|
28
|
-
><span aria-hidden="true">A</span><span class="i-lucide-arrow-right
|
|
28
|
+
><span aria-hidden="true">A</span><span class="i-lucide-arrow-right type-caption" aria-hidden="true"></span><span aria-hidden="true">Z</span></button>
|
|
29
29
|
<button
|
|
30
30
|
class="secondary s-sm"
|
|
31
31
|
aria-label="Sort descending"
|
|
32
32
|
{...machine.getSortTriggerProps({ column: "name", direction: "descending" })}
|
|
33
|
-
><span aria-hidden="true">Z</span><span class="i-lucide-arrow-right
|
|
33
|
+
><span aria-hidden="true">Z</span><span class="i-lucide-arrow-right type-caption" aria-hidden="true"></span><span aria-hidden="true">A</span></button>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="flex items-center gap-2">
|
|
36
36
|
<input
|
|
@@ -50,7 +50,7 @@ const machine = asyncList({
|
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<div
|
|
53
|
-
class="relative max-h-60 overflow-y-auto rounded-lg border
|
|
53
|
+
class="relative max-h-60 overflow-y-auto rounded-lg border bg-surface-raised shadow-sm transition-shadow duration-fast ease-decelerate"
|
|
54
54
|
{...machine.getListProps()}
|
|
55
55
|
>
|
|
56
56
|
<div class="relative p-1">
|
|
@@ -60,15 +60,15 @@ const machine = asyncList({
|
|
|
60
60
|
></div>
|
|
61
61
|
<template for={machine.getRows()} as={row} key={row.value}>
|
|
62
62
|
<div
|
|
63
|
-
class="flex items-center gap-2 rounded-md px-2 py-1
|
|
63
|
+
class="flex items-center gap-2 rounded-md px-2 py-1 type-body transition-colors duration-fast ease-decelerate"
|
|
64
64
|
{...machine.getItemProps(row)}
|
|
65
65
|
>
|
|
66
66
|
<span class="min-w-0 flex-1 truncate">{row.label}</span>
|
|
67
|
-
<span class="
|
|
67
|
+
<span class="type-caption text-muted tabular-nums">{row.value}</span>
|
|
68
68
|
</div>
|
|
69
69
|
</template>
|
|
70
70
|
<span
|
|
71
|
-
class={["px-2 py-6 text-center
|
|
71
|
+
class={["px-2 py-6 text-center type-body text-muted transition-colors duration-fast ease-decelerate", { "block": machine.empty, "hidden": !machine.empty }]}
|
|
72
72
|
{...machine.getEmptyProps()}>Nothing loaded yet</span>
|
|
73
73
|
<div class="h-[1px]" {...machine.getSentinelProps()}></div>
|
|
74
74
|
</div>
|
|
@@ -82,7 +82,7 @@ const machine = asyncList({
|
|
|
82
82
|
</div>
|
|
83
83
|
|
|
84
84
|
<div
|
|
85
|
-
class={["mt-2 rounded-md border
|
|
85
|
+
class={["mt-2 rounded-md border bg-surface px-3 py-2 type-body transition-colors duration-fast ease-decelerate", { "block": machine.error !== undefined, "hidden": machine.error === undefined }]}
|
|
86
86
|
{...machine.getErrorProps()}
|
|
87
87
|
>Something went wrong.</div>
|
|
88
88
|
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/async-list/examples/basic.html
|
|
2
|
+
var basic_default = "<script lang=\"ts\">\nimport { asyncList } from \"../async-list.presentation.ts\";\n\nconst machine = asyncList({\n initialItems: [{ \"value\": \"ada\", \"label\": \"Ada Lovelace\" }, {\n \"value\": \"grace\",\n \"label\": \"Grace Hopper\",\n }, { \"value\": \"margaret\", \"label\": \"Margaret Hamilton\" }],\n sortFn: ({ items, descriptor }) => {\n const label = (item) => String(item.label);\n const sorted = [...items].sort((a, b) =>\n label(a).localeCompare(label(b))\n );\n if (descriptor !== undefined && descriptor.direction === \"descending\") {\n sorted.reverse();\n }\n return { items: sorted };\n },\n});\n<\/script>\n<div class=\"w-64 max-w-full\" {...machine.getRootProps()}>\n <div class=\"mb-2 flex flex-wrap items-center justify-between gap-2\">\n <div class=\"flex items-center gap-1\">\n <button\n class=\"secondary s-sm\"\n aria-label=\"Sort ascending\"\n {...machine.getSortTriggerProps({ column: \"name\", direction: \"ascending\" })}\n ><span aria-hidden=\"true\">A</span><span class=\"i-lucide-arrow-right type-caption\" aria-hidden=\"true\"></span><span aria-hidden=\"true\">Z</span></button>\n <button\n class=\"secondary s-sm\"\n aria-label=\"Sort descending\"\n {...machine.getSortTriggerProps({ column: \"name\", direction: \"descending\" })}\n ><span aria-hidden=\"true\">Z</span><span class=\"i-lucide-arrow-right type-caption\" aria-hidden=\"true\"></span><span aria-hidden=\"true\">A</span></button>\n </div>\n <div class=\"flex items-center gap-2\">\n <input\n class=\"w-36 transition-colors duration-fast ease-decelerate\"\n aria-label=\"Filter\"\n {...machine.getFilterInputProps()}\n />\n <button\n class={[\"secondary s-sm\", { \"inline-flex\": machine.filterText.length > 0, \"hidden\": machine.filterText.length === 0 }]}\n {...machine.getClearFilterProps()}\n >Clear</button>\n <button\n class={[\"secondary s-sm\", { \"text-primary\": machine.state === \"loading\" }]}\n {...machine.getReloadProps()}\n >Reload</button>\n </div>\n </div>\n\n <div\n class=\"relative max-h-60 overflow-y-auto rounded-lg border bg-surface-raised shadow-sm transition-shadow duration-fast ease-decelerate\"\n {...machine.getListProps()}\n >\n <div class=\"relative p-1\">\n <div\n class={[\"pointer-events-none absolute inset-x-0 top-0 h-1 origin-left scale-x-0 rounded-full bg-primary transition-transform duration-fast ease-decelerate\", { \"scale-x-100\": machine.state === \"loading\" || machine.state === \"sorting\" }]}\n {...machine.getProgressProps()}\n ></div>\n <template for={machine.getRows()} as={row} key={row.value}>\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1 type-body transition-colors duration-fast ease-decelerate\"\n {...machine.getItemProps(row)}\n >\n <span class=\"min-w-0 flex-1 truncate\">{row.label}</span>\n <span class=\"type-caption text-muted tabular-nums\">{row.value}</span>\n </div>\n </template>\n <span\n class={[\"px-2 py-6 text-center type-body text-muted transition-colors duration-fast ease-decelerate\", { \"block\": machine.empty, \"hidden\": !machine.empty }]}\n {...machine.getEmptyProps()}>Nothing loaded yet</span>\n <div class=\"h-[1px]\" {...machine.getSentinelProps()}></div>\n </div>\n </div>\n\n <div class=\"mt-2 flex justify-center\">\n <button\n class={[\"secondary s-sm\", { \"inline-flex\": machine.hasMore, \"hidden\": !machine.hasMore }]}\n {...machine.getLoadMoreProps()}\n >Load more</button>\n </div>\n\n <div\n class={[\"mt-2 rounded-md border bg-surface px-3 py-2 type-body transition-colors duration-fast ease-decelerate\", { \"block\": machine.error !== undefined, \"hidden\": machine.error === undefined }]}\n {...machine.getErrorProps()}\n >Something went wrong.</div>\n</div>\n";
|
|
3
|
+
export { basic_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=basic.html.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventUnion } from "@spinjs/
|
|
1
|
+
import { EventUnion } from "@spinjs/components/fsm";
|
|
2
2
|
export interface AvatarEvents {
|
|
3
3
|
"IMG.LOADED": {};
|
|
4
4
|
"IMG.ERROR": {};
|
|
@@ -14,5 +14,4 @@ export type AvatarEvent = EventUnion<AvatarEvents>;
|
|
|
14
14
|
export type AvatarStatus = "loading" | "error" | "loaded";
|
|
15
15
|
export type AvatarStatusChange = {
|
|
16
16
|
readonly status: AvatarStatus;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=avatar.events.d.ts.map
|
|
17
|
+
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Avatar machine: loading/error/loaded over three states.
|
|
3
|
+
*
|
|
4
|
+
* Load and error signals arrive as events from the image node; the
|
|
5
|
+
* machine owns which face shows.
|
|
6
|
+
*
|
|
7
|
+
* Context stays serializable for the scope channel: the src and nothing
|
|
8
|
+
* else. There is no guard: the last signal wins.
|
|
9
|
+
*/
|
|
2
10
|
import { AvatarArgs, AvatarContext, AvatarState } from "./avatar.state.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
11
|
+
import { AvatarEvents } from "./avatar.events.js";
|
|
12
|
+
import { Machine } from "@spinjs/components/fsm";
|
|
13
|
+
export declare function avatar(args?: AvatarArgs, authored?: (name: string) => boolean): Machine<AvatarContext, AvatarEvents, AvatarState>;
|