@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseColor } from "./color.js";
|
|
2
2
|
import { colorPicker as colorPicker$1 } from "./color-picker.machine.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isOpenPhase, startOpen, valueAsString } from "./color-picker.state.js";
|
|
4
|
+
import { ariaDisabled, ariaHidden, ariaLabelledBy, ariaOrientation, ariaRoleDescription, dataAttr, defineComponent, disclosureTrigger, isComposing, isRecord, sliderThumb } from "@spinjs/components/runtime";
|
|
5
5
|
// src/color-picker/color-picker.presentation.ts
|
|
6
6
|
const isColorFormat = (raw) => raw === "hex" || raw === "hexa" || raw === "rgb" || raw === "rgba" || raw === "hsl" || raw === "hsla" || raw === "hsb" || raw === "hsba";
|
|
7
7
|
const openOf = (scope) => isOpenPhase(scope.state, scope.context.inline);
|
|
@@ -341,8 +341,7 @@ const def = {
|
|
|
341
341
|
} },
|
|
342
342
|
areaBackground: {
|
|
343
343
|
id: "area-background",
|
|
344
|
-
attrs: (scope
|
|
345
|
-
const { x, y } = areaChannels(arg);
|
|
344
|
+
attrs: (scope) => {
|
|
346
345
|
const area = scope.context.format.startsWith("hsl") ? "hsla" : "hsba";
|
|
347
346
|
let hue = 0;
|
|
348
347
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorChannel, parseColor } from "
|
|
1
|
+
import { ColorChannel, parseColor } from "./color.js";
|
|
2
2
|
export type ColorFormat = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hsb" | "hsba";
|
|
3
3
|
export interface ColorPickerContext {
|
|
4
4
|
value: string;
|
|
@@ -37,5 +37,4 @@ export declare function initial(args: ColorPickerArgs, authored: (name: string)
|
|
|
37
37
|
export declare function startOpen(raw: Record<string, unknown>): boolean;
|
|
38
38
|
/** True when the panel shows; inline is always open. */
|
|
39
39
|
export declare const isOpenPhase: (phase: string, inline: boolean) => boolean;
|
|
40
|
-
export declare const valueAsString: (ctx: ColorPickerContext) => string;
|
|
41
|
-
//# sourceMappingURL=color-picker.state.d.ts.map
|
|
40
|
+
export declare const valueAsString: (ctx: ColorPickerContext) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { parseColor } from "./color.js";
|
|
2
|
+
import { defaultTwin } from "@spinjs/components/runtime";
|
|
3
3
|
// src/color-picker/color-picker.state.ts
|
|
4
4
|
const parse = (value, fallback) => {
|
|
5
5
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ColorPickerContext } from "./color-picker.state.js";
|
|
2
1
|
import { ColorPickerEvents } from "./color-picker.events.js";
|
|
3
|
-
import {
|
|
2
|
+
import { ColorPickerContext } from "./color-picker.state.js";
|
|
3
|
+
import { AssignFor, GuardFor } from "@spinjs/components/fsm";
|
|
4
4
|
type ColorPickerAssign<K extends keyof ColorPickerEvents = keyof ColorPickerEvents> = AssignFor<ColorPickerContext, ColorPickerEvents, K>;
|
|
5
5
|
type ColorPickerGuard<K extends keyof ColorPickerEvents = keyof ColorPickerEvents> = GuardFor<ColorPickerContext, ColorPickerEvents, K>;
|
|
6
6
|
export declare const setValueFromSwatch: ColorPickerAssign<"SWATCH_TRIGGER.CLICK">;
|
|
@@ -17,5 +17,4 @@ export declare const boundAreaValue: ColorPickerAssign<"AREA.HOME_END">;
|
|
|
17
17
|
export declare const stepChannelValue: ColorPickerAssign<"CHANNEL_SLIDER.ARROW">;
|
|
18
18
|
export declare const boundChannelValue: ColorPickerAssign<"CHANNEL_SLIDER.HOME_END">;
|
|
19
19
|
export declare const isOpenControlled: ColorPickerGuard;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=color-picker.transitions.d.ts.map
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The color value: parse, convert, serialize, and step one channel.
|
|
3
|
+
*
|
|
4
|
+
* @zag-js/color-utils, MIT, (c) Zag. The upstream package owns the
|
|
5
|
+
* contract this file keeps: the parse shapes, the conversion formulas,
|
|
6
|
+
* the serialization cases, and the channel ranges. Vendored so the
|
|
7
|
+
* color-picker stands on the runtime's own math instead of the package.
|
|
8
|
+
*/
|
|
9
|
+
/** A channel the picker reads, writes, or steps. */
|
|
10
|
+
export type ColorChannel = "hue" | "saturation" | "brightness" | "lightness" | "red" | "green" | "blue" | "alpha";
|
|
11
|
+
/** The three spaces a color converts between. */
|
|
12
|
+
export type ColorFormat = "rgba" | "hsla" | "hsba";
|
|
13
|
+
/** The serializations `toString` accepts. */
|
|
14
|
+
export type ColorStringFormat = "hex" | "hexa" | "rgb" | "hsl" | "hsb" | ColorFormat | "css";
|
|
15
|
+
/** The stepped range a channel moves within. */
|
|
16
|
+
export interface ColorChannelRange {
|
|
17
|
+
readonly minValue: number;
|
|
18
|
+
readonly maxValue: number;
|
|
19
|
+
readonly step: number;
|
|
20
|
+
readonly pageSize: number;
|
|
21
|
+
}
|
|
22
|
+
/** The color contract: what the picker reads off any parsed value. */
|
|
23
|
+
export interface Color {
|
|
24
|
+
toFormat(format: ColorFormat): Color;
|
|
25
|
+
toString(format?: ColorStringFormat): string;
|
|
26
|
+
getChannelValue(channel: ColorChannel): number;
|
|
27
|
+
withChannelValue(channel: ColorChannel, value: number): Color;
|
|
28
|
+
getChannelRange(channel: ColorChannel): ColorChannelRange;
|
|
29
|
+
getChannelValuePercent(channel: ColorChannel, value?: number): number;
|
|
30
|
+
getChannelPercentValue(channel: ColorChannel, percent: number): number;
|
|
31
|
+
incrementChannel(channel: ColorChannel, stepSize: number): Color;
|
|
32
|
+
decrementChannel(channel: ColorChannel, stepSize: number): Color;
|
|
33
|
+
toJSON(): Record<string, number>;
|
|
34
|
+
clone(): Color;
|
|
35
|
+
getFormat(): ColorFormat;
|
|
36
|
+
isEqual(color: Color): boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Parse any supported color string; named colors resolve to hex first. */
|
|
39
|
+
export declare function parseColor(value: string): Color;
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import { clampValue, getPercentValue, getValuePercent, snapValueToStep } from "@spinjs/components/runtime";
|
|
2
|
+
// src/color-picker/color.ts
|
|
3
|
+
/**
|
|
4
|
+
* The color value: parse, convert, serialize, and step one channel.
|
|
5
|
+
*
|
|
6
|
+
* @zag-js/color-utils, MIT, (c) Zag. The upstream package owns the
|
|
7
|
+
* contract this file keeps: the parse shapes, the conversion formulas,
|
|
8
|
+
* the serialization cases, and the channel ranges. Vendored so the
|
|
9
|
+
* color-picker stands on the runtime's own math instead of the package.
|
|
10
|
+
*/
|
|
11
|
+
const toFixedNumber = (value, digits) => {
|
|
12
|
+
const scale = 10 ** digits;
|
|
13
|
+
return Math.round(value * scale) / scale;
|
|
14
|
+
};
|
|
15
|
+
const mod = (value, m) => (value % m + m) % m;
|
|
16
|
+
const equalsRecord = (a, b) => {
|
|
17
|
+
const keys = Object.keys(a);
|
|
18
|
+
if (keys.length !== Object.keys(b).length) return false;
|
|
19
|
+
for (const key of keys) if (a[key] !== b[key]) return false;
|
|
20
|
+
return true;
|
|
21
|
+
};
|
|
22
|
+
const NATIVE_COLORS = "aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32";
|
|
23
|
+
const nativeColorMap = (() => {
|
|
24
|
+
const map = /* @__PURE__ */ new Map();
|
|
25
|
+
for (const entry of NATIVE_COLORS.split(",")) {
|
|
26
|
+
const [name, hex] = entry.split(":");
|
|
27
|
+
if (name === void 0 || hex === void 0) continue;
|
|
28
|
+
map.set(name, `#${hex}`);
|
|
29
|
+
if (name.includes("gray")) map.set(name.replace("gray", "grey"), `#${hex}`);
|
|
30
|
+
}
|
|
31
|
+
return map;
|
|
32
|
+
})();
|
|
33
|
+
var ColorBase = class {
|
|
34
|
+
getChannelValue(channel) {
|
|
35
|
+
if (channel in this) return this[channel];
|
|
36
|
+
throw new Error(`Unsupported color channel: ${channel}`);
|
|
37
|
+
}
|
|
38
|
+
getChannelValuePercent(channel, value) {
|
|
39
|
+
const current = value ?? this.getChannelValue(channel);
|
|
40
|
+
const { minValue, maxValue } = this.getChannelRange(channel);
|
|
41
|
+
return getValuePercent(current, minValue, maxValue);
|
|
42
|
+
}
|
|
43
|
+
getChannelPercentValue(channel, percent) {
|
|
44
|
+
const { minValue, maxValue, step } = this.getChannelRange(channel);
|
|
45
|
+
return snapValueToStep(getPercentValue(percent, minValue, maxValue, step), minValue, maxValue, step);
|
|
46
|
+
}
|
|
47
|
+
withChannelValue(channel, value) {
|
|
48
|
+
const { minValue, maxValue } = this.getChannelRange(channel);
|
|
49
|
+
if (channel in this) {
|
|
50
|
+
const clone = this.clone();
|
|
51
|
+
clone[channel] = clampValue(value, minValue, maxValue);
|
|
52
|
+
return clone;
|
|
53
|
+
}
|
|
54
|
+
throw new Error(`Unsupported color channel: ${channel}`);
|
|
55
|
+
}
|
|
56
|
+
incrementChannel(channel, stepSize) {
|
|
57
|
+
const { minValue, maxValue, step } = this.getChannelRange(channel);
|
|
58
|
+
const value = snapValueToStep(clampValue(this.getChannelValue(channel) + stepSize, minValue, maxValue), minValue, maxValue, step);
|
|
59
|
+
return this.withChannelValue(channel, value);
|
|
60
|
+
}
|
|
61
|
+
decrementChannel(channel, stepSize) {
|
|
62
|
+
return this.incrementChannel(channel, -stepSize);
|
|
63
|
+
}
|
|
64
|
+
isEqual(color) {
|
|
65
|
+
return equalsRecord(this.toJSON(), color.toJSON()) && this.getChannelValue("alpha") === color.getChannelValue("alpha");
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var RGBColor = class RGBColor extends ColorBase {
|
|
69
|
+
red;
|
|
70
|
+
green;
|
|
71
|
+
blue;
|
|
72
|
+
alpha;
|
|
73
|
+
constructor(red, green, blue, alpha) {
|
|
74
|
+
super();
|
|
75
|
+
this.red = red;
|
|
76
|
+
this.green = green;
|
|
77
|
+
this.blue = blue;
|
|
78
|
+
this.alpha = alpha;
|
|
79
|
+
}
|
|
80
|
+
static parse(value) {
|
|
81
|
+
const colors = [];
|
|
82
|
+
if (HEX_COLOR_REGEX.test(value) && [
|
|
83
|
+
4,
|
|
84
|
+
5,
|
|
85
|
+
7,
|
|
86
|
+
9
|
|
87
|
+
].includes(value.length)) {
|
|
88
|
+
const digits = (value.length < 6 ? value.replace(HEX_STARTING_REGEX, "$&$&") : value).slice(1).split("");
|
|
89
|
+
while (digits.length > 0) colors.push(parseInt(digits.splice(0, 2).join(""), 16));
|
|
90
|
+
colors[3] = colors[3] !== void 0 ? colors[3] / 255 : void 0;
|
|
91
|
+
}
|
|
92
|
+
const match = value.match(RGB_COLOR_REGEX);
|
|
93
|
+
if (match?.[1] !== void 0) {
|
|
94
|
+
const parsed = match[1].split(",").map((part) => Number(part.trim())).map((num, i) => clampValue(num, 0, i < 3 ? 255 : 1));
|
|
95
|
+
colors.length = 0;
|
|
96
|
+
colors.push(...parsed);
|
|
97
|
+
}
|
|
98
|
+
if (colors.length < 3) return void 0;
|
|
99
|
+
return new RGBColor(colors[0], colors[1], colors[2], colors[3] ?? 1);
|
|
100
|
+
}
|
|
101
|
+
toString(format = "css") {
|
|
102
|
+
switch (format) {
|
|
103
|
+
case "hex": return "#" + (this.red.toString(16).padStart(2, "0") + this.green.toString(16).padStart(2, "0") + this.blue.toString(16).padStart(2, "0")).toUpperCase();
|
|
104
|
+
case "hexa": return "#" + (this.red.toString(16).padStart(2, "0") + this.green.toString(16).padStart(2, "0") + this.blue.toString(16).padStart(2, "0") + Math.round(this.alpha * 255).toString(16).padStart(2, "0")).toUpperCase();
|
|
105
|
+
case "rgb": return `rgb(${this.red}, ${this.green}, ${this.blue})`;
|
|
106
|
+
case "css":
|
|
107
|
+
case "rgba": return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;
|
|
108
|
+
case "hsl": return this.toHSL().toString("hsl");
|
|
109
|
+
case "hsb": return this.toHSB().toString("hsb");
|
|
110
|
+
default: return this.toFormat(format).toString(format);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
toFormat(format) {
|
|
114
|
+
switch (format) {
|
|
115
|
+
case "rgba": return this;
|
|
116
|
+
case "hsba": return this.toHSB();
|
|
117
|
+
case "hsla": return this.toHSL();
|
|
118
|
+
default: throw new Error(`Unsupported color conversion: rgb -> ${format}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
toHSB() {
|
|
122
|
+
const red = this.red / 255;
|
|
123
|
+
const green = this.green / 255;
|
|
124
|
+
const blue = this.blue / 255;
|
|
125
|
+
const min = Math.min(red, green, blue);
|
|
126
|
+
const brightness = Math.max(red, green, blue);
|
|
127
|
+
const chroma = brightness - min;
|
|
128
|
+
const saturation = brightness === 0 ? 0 : chroma / brightness;
|
|
129
|
+
let hue = 0;
|
|
130
|
+
if (chroma !== 0) {
|
|
131
|
+
switch (brightness) {
|
|
132
|
+
case red:
|
|
133
|
+
hue = (green - blue) / chroma + (green < blue ? 6 : 0);
|
|
134
|
+
break;
|
|
135
|
+
case green:
|
|
136
|
+
hue = (blue - red) / chroma + 2;
|
|
137
|
+
break;
|
|
138
|
+
case blue: hue = (red - green) / chroma + 4;
|
|
139
|
+
}
|
|
140
|
+
hue /= 6;
|
|
141
|
+
}
|
|
142
|
+
return new HSBColor(toFixedNumber(hue * 360, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(brightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
143
|
+
}
|
|
144
|
+
toHSL() {
|
|
145
|
+
const red = this.red / 255;
|
|
146
|
+
const green = this.green / 255;
|
|
147
|
+
const blue = this.blue / 255;
|
|
148
|
+
const min = Math.min(red, green, blue);
|
|
149
|
+
const max = Math.max(red, green, blue);
|
|
150
|
+
const lightness = (max + min) / 2;
|
|
151
|
+
const chroma = max - min;
|
|
152
|
+
let hue = 0;
|
|
153
|
+
let saturation = 0;
|
|
154
|
+
if (chroma !== 0) {
|
|
155
|
+
saturation = chroma / (lightness < .5 ? max + min : 2 - max - min);
|
|
156
|
+
switch (max) {
|
|
157
|
+
case red:
|
|
158
|
+
hue = (green - blue) / chroma + (green < blue ? 6 : 0);
|
|
159
|
+
break;
|
|
160
|
+
case green:
|
|
161
|
+
hue = (blue - red) / chroma + 2;
|
|
162
|
+
break;
|
|
163
|
+
case blue: hue = (red - green) / chroma + 4;
|
|
164
|
+
}
|
|
165
|
+
hue /= 6;
|
|
166
|
+
}
|
|
167
|
+
return new HSLColor(toFixedNumber(hue * 360, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(lightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
168
|
+
}
|
|
169
|
+
clone() {
|
|
170
|
+
return new RGBColor(this.red, this.green, this.blue, this.alpha);
|
|
171
|
+
}
|
|
172
|
+
getChannelRange(channel) {
|
|
173
|
+
switch (channel) {
|
|
174
|
+
case "red":
|
|
175
|
+
case "green":
|
|
176
|
+
case "blue": return {
|
|
177
|
+
minValue: 0,
|
|
178
|
+
maxValue: 255,
|
|
179
|
+
step: 1,
|
|
180
|
+
pageSize: 17
|
|
181
|
+
};
|
|
182
|
+
case "alpha": return {
|
|
183
|
+
minValue: 0,
|
|
184
|
+
maxValue: 1,
|
|
185
|
+
step: .01,
|
|
186
|
+
pageSize: .1
|
|
187
|
+
};
|
|
188
|
+
default: throw new Error(`Unknown color channel: ${channel}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
toJSON() {
|
|
192
|
+
return {
|
|
193
|
+
r: this.red,
|
|
194
|
+
g: this.green,
|
|
195
|
+
b: this.blue,
|
|
196
|
+
a: this.alpha
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
getFormat() {
|
|
200
|
+
return "rgba";
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const HEX_COLOR_REGEX = /^#[\da-f]+$/i;
|
|
204
|
+
const RGB_COLOR_REGEX = /^rgba?\((.*)\)$/;
|
|
205
|
+
const HEX_STARTING_REGEX = /[^#]/gi;
|
|
206
|
+
var HSLColor = class HSLColor extends ColorBase {
|
|
207
|
+
hue;
|
|
208
|
+
saturation;
|
|
209
|
+
lightness;
|
|
210
|
+
alpha;
|
|
211
|
+
constructor(hue, saturation, lightness, alpha) {
|
|
212
|
+
super();
|
|
213
|
+
this.hue = hue;
|
|
214
|
+
this.saturation = saturation;
|
|
215
|
+
this.lightness = lightness;
|
|
216
|
+
this.alpha = alpha;
|
|
217
|
+
}
|
|
218
|
+
static parse(value) {
|
|
219
|
+
const match = value.match(HSL_REGEX);
|
|
220
|
+
if (match === null) return void 0;
|
|
221
|
+
const [h, s, l, a] = (match[1] ?? match[2] ?? "").split(",").map((n) => Number(n.trim().replace("%", "")));
|
|
222
|
+
return new HSLColor(mod(h ?? 0, 360), clampValue(s ?? 0, 0, 100), clampValue(l ?? 0, 0, 100), clampValue(a ?? 1, 0, 1));
|
|
223
|
+
}
|
|
224
|
+
toString(format = "css") {
|
|
225
|
+
switch (format) {
|
|
226
|
+
case "hex": return this.toRGB().toString("hex");
|
|
227
|
+
case "hexa": return this.toRGB().toString("hexa");
|
|
228
|
+
case "hsl": return `hsl(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%)`;
|
|
229
|
+
case "css":
|
|
230
|
+
case "hsla": return `hsla(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%, ${this.alpha})`;
|
|
231
|
+
case "hsb": return this.toHSB().toString("hsb");
|
|
232
|
+
case "rgb": return this.toRGB().toString("rgb");
|
|
233
|
+
default: return this.toFormat(format).toString(format);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
toFormat(format) {
|
|
237
|
+
switch (format) {
|
|
238
|
+
case "hsla": return this;
|
|
239
|
+
case "hsba": return this.toHSB();
|
|
240
|
+
case "rgba": return this.toRGB();
|
|
241
|
+
default: throw new Error(`Unsupported color conversion: hsl -> ${format}`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
toHSB() {
|
|
245
|
+
const saturation = this.saturation / 100;
|
|
246
|
+
const lightness = this.lightness / 100;
|
|
247
|
+
const brightness = lightness + saturation * Math.min(lightness, 1 - lightness);
|
|
248
|
+
const next = brightness === 0 ? 0 : 2 * (1 - lightness / brightness);
|
|
249
|
+
return new HSBColor(toFixedNumber(this.hue, 2), toFixedNumber(next * 100, 2), toFixedNumber(brightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
250
|
+
}
|
|
251
|
+
toRGB() {
|
|
252
|
+
const hue = this.hue;
|
|
253
|
+
const saturation = this.saturation / 100;
|
|
254
|
+
const lightness = this.lightness / 100;
|
|
255
|
+
const a = saturation * Math.min(lightness, 1 - lightness);
|
|
256
|
+
const fn = (n, k = (n + hue / 30) % 12) => lightness - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
|
257
|
+
return new RGBColor(Math.round(fn(0) * 255), Math.round(fn(8) * 255), Math.round(fn(4) * 255), toFixedNumber(this.alpha, 2));
|
|
258
|
+
}
|
|
259
|
+
clone() {
|
|
260
|
+
return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);
|
|
261
|
+
}
|
|
262
|
+
getChannelRange(channel) {
|
|
263
|
+
switch (channel) {
|
|
264
|
+
case "hue": return {
|
|
265
|
+
minValue: 0,
|
|
266
|
+
maxValue: 360,
|
|
267
|
+
step: 1,
|
|
268
|
+
pageSize: 15
|
|
269
|
+
};
|
|
270
|
+
case "saturation":
|
|
271
|
+
case "lightness": return {
|
|
272
|
+
minValue: 0,
|
|
273
|
+
maxValue: 100,
|
|
274
|
+
step: 1,
|
|
275
|
+
pageSize: 10
|
|
276
|
+
};
|
|
277
|
+
case "alpha": return {
|
|
278
|
+
minValue: 0,
|
|
279
|
+
maxValue: 1,
|
|
280
|
+
step: .01,
|
|
281
|
+
pageSize: .1
|
|
282
|
+
};
|
|
283
|
+
default: throw new Error(`Unknown color channel: ${channel}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
toJSON() {
|
|
287
|
+
return {
|
|
288
|
+
h: this.hue,
|
|
289
|
+
s: this.saturation,
|
|
290
|
+
l: this.lightness,
|
|
291
|
+
a: this.alpha
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
getFormat() {
|
|
295
|
+
return "hsla";
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
const HSL_REGEX = /hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;
|
|
299
|
+
var HSBColor = class HSBColor extends ColorBase {
|
|
300
|
+
hue;
|
|
301
|
+
saturation;
|
|
302
|
+
brightness;
|
|
303
|
+
alpha;
|
|
304
|
+
constructor(hue, saturation, brightness, alpha) {
|
|
305
|
+
super();
|
|
306
|
+
this.hue = hue;
|
|
307
|
+
this.saturation = saturation;
|
|
308
|
+
this.brightness = brightness;
|
|
309
|
+
this.alpha = alpha;
|
|
310
|
+
}
|
|
311
|
+
static parse(value) {
|
|
312
|
+
const match = value.match(HSB_REGEX);
|
|
313
|
+
if (match === null) return void 0;
|
|
314
|
+
const [h, s, b, a] = (match[1] ?? match[2] ?? "").split(",").map((n) => Number(n.trim().replace("%", "")));
|
|
315
|
+
return new HSBColor(mod(h ?? 0, 360), clampValue(s ?? 0, 0, 100), clampValue(b ?? 0, 0, 100), clampValue(a ?? 1, 0, 1));
|
|
316
|
+
}
|
|
317
|
+
toString(format = "css") {
|
|
318
|
+
switch (format) {
|
|
319
|
+
case "css": return this.toHSL().toString("css");
|
|
320
|
+
case "hex": return this.toRGB().toString("hex");
|
|
321
|
+
case "hexa": return this.toRGB().toString("hexa");
|
|
322
|
+
case "hsb": return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;
|
|
323
|
+
case "hsba": return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;
|
|
324
|
+
case "hsl": return this.toHSL().toString("hsl");
|
|
325
|
+
case "rgb": return this.toRGB().toString("rgb");
|
|
326
|
+
default: return this.toFormat(format).toString(format);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
toFormat(format) {
|
|
330
|
+
switch (format) {
|
|
331
|
+
case "hsba": return this;
|
|
332
|
+
case "hsla": return this.toHSL();
|
|
333
|
+
case "rgba": return this.toRGB();
|
|
334
|
+
default: throw new Error(`Unsupported color conversion: hsb -> ${format}`);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
toHSL() {
|
|
338
|
+
const saturation = this.saturation / 100;
|
|
339
|
+
const brightness = this.brightness / 100;
|
|
340
|
+
const lightness = brightness * (1 - saturation / 2);
|
|
341
|
+
const next = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);
|
|
342
|
+
return new HSLColor(toFixedNumber(this.hue, 2), toFixedNumber(next * 100, 2), toFixedNumber(lightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
343
|
+
}
|
|
344
|
+
toRGB() {
|
|
345
|
+
const hue = this.hue;
|
|
346
|
+
const saturation = this.saturation / 100;
|
|
347
|
+
const brightness = this.brightness / 100;
|
|
348
|
+
const fn = (n, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);
|
|
349
|
+
return new RGBColor(Math.round(fn(5) * 255), Math.round(fn(3) * 255), Math.round(fn(1) * 255), toFixedNumber(this.alpha, 2));
|
|
350
|
+
}
|
|
351
|
+
clone() {
|
|
352
|
+
return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);
|
|
353
|
+
}
|
|
354
|
+
getChannelRange(channel) {
|
|
355
|
+
switch (channel) {
|
|
356
|
+
case "hue": return {
|
|
357
|
+
minValue: 0,
|
|
358
|
+
maxValue: 360,
|
|
359
|
+
step: 1,
|
|
360
|
+
pageSize: 15
|
|
361
|
+
};
|
|
362
|
+
case "saturation":
|
|
363
|
+
case "brightness": return {
|
|
364
|
+
minValue: 0,
|
|
365
|
+
maxValue: 100,
|
|
366
|
+
step: 1,
|
|
367
|
+
pageSize: 10
|
|
368
|
+
};
|
|
369
|
+
case "alpha": return {
|
|
370
|
+
minValue: 0,
|
|
371
|
+
maxValue: 1,
|
|
372
|
+
step: .01,
|
|
373
|
+
pageSize: .1
|
|
374
|
+
};
|
|
375
|
+
default: throw new Error(`Unknown color channel: ${channel}`);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
toJSON() {
|
|
379
|
+
return {
|
|
380
|
+
h: this.hue,
|
|
381
|
+
s: this.saturation,
|
|
382
|
+
b: this.brightness,
|
|
383
|
+
a: this.alpha
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
getFormat() {
|
|
387
|
+
return "hsba";
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
const HSB_REGEX = /hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;
|
|
391
|
+
/** Parse any supported color string; named colors resolve to hex first. */
|
|
392
|
+
function parseColor(value) {
|
|
393
|
+
const native = nativeColorMap.get(value);
|
|
394
|
+
if (native !== void 0) return parseColor(native);
|
|
395
|
+
const result = RGBColor.parse(value) ?? HSBColor.parse(value) ?? HSLColor.parse(value);
|
|
396
|
+
if (result === void 0) throw new Error(`Invalid color value: ${value}`);
|
|
397
|
+
return result;
|
|
398
|
+
}
|
|
399
|
+
export { parseColor };
|
|
400
|
+
|
|
401
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -10,7 +10,7 @@ const machine = colorPicker({
|
|
|
10
10
|
</script>
|
|
11
11
|
<div class="w-full" {...machine.getRootProps()}>
|
|
12
12
|
<label
|
|
13
|
-
class={["block
|
|
13
|
+
class={["block transition-colors duration-fast ease-decelerate", { "opacity-50 cursor-not-allowed": machine.disabled }]}
|
|
14
14
|
{...machine.getLabelProps()}
|
|
15
15
|
>Color</label>
|
|
16
16
|
|
|
@@ -18,22 +18,22 @@ const machine = colorPicker({
|
|
|
18
18
|
<button
|
|
19
19
|
class={["secondary s-sm grid h-7 w-10 place-items-center", { "cursor-not-allowed opacity-60": machine.disabled }]}
|
|
20
20
|
{...machine.getTriggerProps()}
|
|
21
|
-
><span aria-hidden="true" class="h-4 w-8 rounded-sm border
|
|
21
|
+
><span aria-hidden="true" class="h-4 w-8 rounded-sm border" {...machine.getSwatchProps({ value: machine.valueAsString })}> </span></button>
|
|
22
22
|
<span
|
|
23
|
-
class="
|
|
23
|
+
class="type-code transition-colors duration-fast ease-decelerate"
|
|
24
24
|
{...machine.getValueTextProps()}
|
|
25
25
|
>{machine.valueAsString}</span>
|
|
26
26
|
<button
|
|
27
27
|
class="ghost icon s-sm grid h-7 w-7 place-items-center"
|
|
28
28
|
{...machine.getEyeDropperTriggerProps()}
|
|
29
|
-
><span class="i-lucide-pipette
|
|
29
|
+
><span class="i-lucide-pipette type-code" aria-hidden="true"></span></button>
|
|
30
30
|
<div
|
|
31
|
-
class={["absolute left-0 top-full z-dropdown mt-1 w-full max-w-[16rem] origin-top rounded-lg border
|
|
31
|
+
class={["absolute left-0 top-full z-dropdown mt-1 w-full max-w-[16rem] origin-top rounded-lg border bg-surface-raised p-3 shadow-lg transition duration-fast ease-decelerate", { "pointer-events-none invisible scale-95 opacity-0": !machine.open }]}
|
|
32
32
|
{...machine.getPositionerProps()}
|
|
33
33
|
>
|
|
34
34
|
<div class="flex flex-col gap-3" {...machine.getContentProps()}>
|
|
35
35
|
<div
|
|
36
|
-
class="relative h-40 w-full rounded-md border
|
|
36
|
+
class="relative h-40 w-full rounded-md border"
|
|
37
37
|
{...machine.getAreaProps()}
|
|
38
38
|
>
|
|
39
39
|
<div class="absolute inset-0 rounded-md"
|
|
@@ -54,10 +54,10 @@ const machine = colorPicker({
|
|
|
54
54
|
</div>
|
|
55
55
|
<div class="flex items-center gap-2"
|
|
56
56
|
{...machine.getChannelSliderProps({ channel: "hue" })}>
|
|
57
|
-
<span class="w-12
|
|
57
|
+
<span class="w-12 type-caption text-muted"
|
|
58
58
|
{...machine.getChannelSliderLabelProps({ channel: "hue" })}>Hue</span>
|
|
59
59
|
<div
|
|
60
|
-
class="relative h-3 flex-1 rounded-full border
|
|
60
|
+
class="relative h-3 flex-1 rounded-full border"
|
|
61
61
|
{...machine.getChannelSliderTrackProps({ channel: "hue" })}
|
|
62
62
|
>
|
|
63
63
|
<div
|
|
@@ -65,15 +65,15 @@ const machine = colorPicker({
|
|
|
65
65
|
{...machine.getChannelSliderThumbProps({ channel: "hue" })}
|
|
66
66
|
></div>
|
|
67
67
|
</div>
|
|
68
|
-
<span class="w-8 text-right
|
|
68
|
+
<span class="w-8 text-right type-code text-muted"
|
|
69
69
|
{...machine.getChannelSliderValueTextProps({ channel: "hue" })}>{machine.getChannelValue("hue")}</span>
|
|
70
70
|
</div>
|
|
71
71
|
<div class="flex items-center gap-2"
|
|
72
72
|
{...machine.getChannelSliderProps({ channel: "alpha" })}>
|
|
73
|
-
<span class="w-12
|
|
73
|
+
<span class="w-12 type-caption text-muted"
|
|
74
74
|
{...machine.getChannelSliderLabelProps({ channel: "alpha" })}>Alpha</span>
|
|
75
75
|
<div
|
|
76
|
-
class="relative h-3 flex-1 rounded-full border
|
|
76
|
+
class="relative h-3 flex-1 rounded-full border"
|
|
77
77
|
{...machine.getChannelSliderTrackProps({ channel: "alpha" })}
|
|
78
78
|
>
|
|
79
79
|
<div
|
|
@@ -81,16 +81,16 @@ const machine = colorPicker({
|
|
|
81
81
|
{...machine.getChannelSliderThumbProps({ channel: "alpha" })}
|
|
82
82
|
></div>
|
|
83
83
|
</div>
|
|
84
|
-
<span class="w-8 text-right
|
|
84
|
+
<span class="w-8 text-right type-code text-muted"
|
|
85
85
|
{...machine.getChannelSliderValueTextProps({ channel: "alpha" })}>{machine.getChannelValue("alpha")}</span>
|
|
86
86
|
</div>
|
|
87
87
|
<div class="flex items-center gap-2">
|
|
88
88
|
<input
|
|
89
|
-
class="w-full
|
|
89
|
+
class="w-full"
|
|
90
90
|
{...machine.getChannelInputProps({ channel: "hex" })}
|
|
91
91
|
/>
|
|
92
92
|
<select
|
|
93
|
-
class="h-7
|
|
93
|
+
class="h-7"
|
|
94
94
|
{...machine.getFormatSelectProps()}
|
|
95
95
|
>
|
|
96
96
|
<option value="hex">hex</option>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// src/color-picker/examples/basic.html
|
|
2
|
+
var basic_default = "<!-- reconstructed from the canonical element -->\n<script lang=\"ts\">\nimport { colorPicker } from \"../color-picker.presentation.ts\";\n\nconst machine = colorPicker({\n value: \"#3b82f6\",\n disabled: false,\n name: \"\",\n});\n<\/script>\n<div class=\"w-full\" {...machine.getRootProps()}>\n <label\n class={[\"block transition-colors duration-fast ease-decelerate\", { \"opacity-50 cursor-not-allowed\": machine.disabled }]}\n {...machine.getLabelProps()}\n >Color</label>\n\n <div class=\"relative flex items-center gap-2\" {...machine.getControlProps()}>\n <button\n class={[\"secondary s-sm grid h-7 w-10 place-items-center\", { \"cursor-not-allowed opacity-60\": machine.disabled }]}\n {...machine.getTriggerProps()}\n ><span aria-hidden=\"true\" class=\"h-4 w-8 rounded-sm border\" {...machine.getSwatchProps({ value: machine.valueAsString })}> </span></button>\n <span\n class=\"type-code transition-colors duration-fast ease-decelerate\"\n {...machine.getValueTextProps()}\n >{machine.valueAsString}</span>\n <button\n class=\"ghost icon s-sm grid h-7 w-7 place-items-center\"\n {...machine.getEyeDropperTriggerProps()}\n ><span class=\"i-lucide-pipette type-code\" aria-hidden=\"true\"></span></button>\n <div\n class={[\"absolute left-0 top-full z-dropdown mt-1 w-full max-w-[16rem] origin-top rounded-lg border bg-surface-raised p-3 shadow-lg transition duration-fast ease-decelerate\", { \"pointer-events-none invisible scale-95 opacity-0\": !machine.open }]}\n {...machine.getPositionerProps()}\n >\n <div class=\"flex flex-col gap-3\" {...machine.getContentProps()}>\n <div\n class=\"relative h-40 w-full rounded-md border\"\n {...machine.getAreaProps()}\n >\n <div class=\"absolute inset-0 rounded-md\"\n {...machine.getAreaBackgroundProps()}>\n <div\n class=\"absolute inset-0 rounded-md\"\n style=\"background-image: linear-gradient(to right, #fff, rgba(255, 255, 255, 0))\"\n ></div>\n <div\n class=\"absolute inset-0 rounded-md\"\n style=\"background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0))\"\n ></div>\n </div>\n <div\n class=\"absolute h-4 w-4 rounded-full border-2 border-solid border-on-primary shadow-lg transition-transform duration-fast ease-decelerate\"\n {...machine.getAreaThumbProps()}\n ></div>\n </div>\n <div class=\"flex items-center gap-2\"\n {...machine.getChannelSliderProps({ channel: \"hue\" })}>\n <span class=\"w-12 type-caption text-muted\"\n {...machine.getChannelSliderLabelProps({ channel: \"hue\" })}>Hue</span>\n <div\n class=\"relative h-3 flex-1 rounded-full border\"\n {...machine.getChannelSliderTrackProps({ channel: \"hue\" })}\n >\n <div\n class=\"absolute h-4 w-4 rounded-full border-2 border-solid border-on-primary shadow-lg\"\n {...machine.getChannelSliderThumbProps({ channel: \"hue\" })}\n ></div>\n </div>\n <span class=\"w-8 text-right type-code text-muted\"\n {...machine.getChannelSliderValueTextProps({ channel: \"hue\" })}>{machine.getChannelValue(\"hue\")}</span>\n </div>\n <div class=\"flex items-center gap-2\"\n {...machine.getChannelSliderProps({ channel: \"alpha\" })}>\n <span class=\"w-12 type-caption text-muted\"\n {...machine.getChannelSliderLabelProps({ channel: \"alpha\" })}>Alpha</span>\n <div\n class=\"relative h-3 flex-1 rounded-full border\"\n {...machine.getChannelSliderTrackProps({ channel: \"alpha\" })}\n >\n <div\n class=\"absolute h-4 w-4 rounded-full border-2 border-solid border-on-primary shadow-lg\"\n {...machine.getChannelSliderThumbProps({ channel: \"alpha\" })}\n ></div>\n </div>\n <span class=\"w-8 text-right type-code text-muted\"\n {...machine.getChannelSliderValueTextProps({ channel: \"alpha\" })}>{machine.getChannelValue(\"alpha\")}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n <input\n class=\"w-full\"\n {...machine.getChannelInputProps({ channel: \"hex\" })}\n />\n <select\n class=\"h-7\"\n {...machine.getFormatSelectProps()}\n >\n <option value=\"hex\">hex</option>\n <option value=\"rgb\">rgb</option>\n <option value=\"hsl\">hsl</option>\n <option value=\"hsb\">hsb</option>\n </select>\n </div>\n <input type=\"hidden\" {...machine.getHiddenInputProps()} />\n </div>\n </div>\n </div>\n</div>\n";
|
|
3
|
+
export { basic_default as default };
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=basic.html.js.map
|
|
@@ -7,17 +7,17 @@ const machine = colorPicker({
|
|
|
7
7
|
});
|
|
8
8
|
</script>
|
|
9
9
|
<div
|
|
10
|
-
class="mx-auto w-full max-w-[16rem] rounded-lg border
|
|
10
|
+
class="mx-auto w-full max-w-[16rem] rounded-lg border bg-surface-raised p-4 shadow-sm"
|
|
11
11
|
{...machine.getRootProps()}>
|
|
12
12
|
<div class="mb-3 flex items-center justify-between">
|
|
13
|
-
<label
|
|
13
|
+
<label
|
|
14
14
|
{...machine.getLabelProps()}>Spectrum</label>
|
|
15
|
-
<span class="
|
|
15
|
+
<span class="type-code text-muted"
|
|
16
16
|
{...machine.getValueTextProps()}>{machine.valueAsString}</span>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="flex flex-col gap-3" {...machine.getContentProps()}>
|
|
19
19
|
<div
|
|
20
|
-
class="relative h-36 w-full rounded-lg border
|
|
20
|
+
class="relative h-36 w-full rounded-lg border"
|
|
21
21
|
{...machine.getAreaProps()}>
|
|
22
22
|
<div class="absolute inset-0 rounded-lg"
|
|
23
23
|
{...machine.getAreaBackgroundProps()}>
|
|
@@ -32,24 +32,24 @@ const machine = colorPicker({
|
|
|
32
32
|
</div>
|
|
33
33
|
<div class="flex items-center gap-2"
|
|
34
34
|
{...machine.getChannelSliderProps({ channel: "hue" })}>
|
|
35
|
-
<span class="w-10
|
|
35
|
+
<span class="w-10 type-caption text-muted"
|
|
36
36
|
{...machine.getChannelSliderLabelProps({ channel: "hue" })}>Hue</span>
|
|
37
37
|
<div
|
|
38
|
-
class="relative h-3 flex-1 rounded-full border
|
|
38
|
+
class="relative h-3 flex-1 rounded-full border"
|
|
39
39
|
{...machine.getChannelSliderTrackProps({ channel: "hue" })}>
|
|
40
40
|
<div
|
|
41
41
|
class="absolute h-4 w-4 rounded-full border-2 border-solid border-on-primary shadow-lg"
|
|
42
42
|
{...machine.getChannelSliderThumbProps({ channel: "hue" })}></div>
|
|
43
43
|
</div>
|
|
44
|
-
<span class="w-8 text-right
|
|
44
|
+
<span class="w-8 text-right type-code text-muted"
|
|
45
45
|
{...machine.getChannelSliderValueTextProps({ channel: "hue" })}>{machine.getChannelValue("hue")}</span>
|
|
46
46
|
</div>
|
|
47
47
|
<div class="flex items-center gap-2">
|
|
48
48
|
<span aria-hidden="true"
|
|
49
|
-
class="h-7 w-7 shrink-0 rounded-md border
|
|
49
|
+
class="h-7 w-7 shrink-0 rounded-md border"
|
|
50
50
|
{...machine.getSwatchProps({ value: machine.valueAsString })}></span>
|
|
51
51
|
<input
|
|
52
|
-
class="w-full
|
|
52
|
+
class="w-full"
|
|
53
53
|
{...machine.getChannelInputProps({ channel: "hex" })} />
|
|
54
54
|
</div>
|
|
55
55
|
<input type="hidden" {...machine.getHiddenInputProps()} />
|