@soybeanjs/headless 0.14.0 → 0.15.0-beta.2
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 +72 -1
- package/README.zh-CN.md +73 -2
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/defineProperty.js +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/toPrimitive.js +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/toPropertyKey.js +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.126.0/helpers/typeof.js +1 -0
- package/dist/components/accordion/accordion-compact.js +1 -0
- package/dist/components/accordion/accordion-compact.vue.d.ts +21 -0
- package/dist/components/accordion/accordion-content.js +1 -1
- package/dist/components/accordion/accordion-content.vue.d.ts +2 -2
- package/dist/components/accordion/accordion-header.js +1 -1
- package/dist/components/accordion/accordion-item.js +1 -1
- package/dist/components/accordion/accordion-root.js +1 -1
- package/dist/components/accordion/accordion-trigger.js +1 -1
- package/dist/components/accordion/accordion-trigger.vue.d.ts +2 -2
- package/dist/components/accordion/context.js +1 -1
- package/dist/components/accordion/index.d.ts +8 -8
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/types.d.ts +38 -2
- package/dist/components/affix/affix-content.js +1 -0
- package/dist/components/affix/affix-content.vue.d.ts +20 -0
- package/dist/components/affix/affix-placeholder.js +1 -0
- package/dist/components/affix/affix-placeholder.vue.d.ts +8 -0
- package/dist/components/affix/affix-root.js +1 -0
- package/dist/components/affix/affix-root.vue.d.ts +28 -0
- package/dist/components/affix/context.d.ts +8 -0
- package/dist/components/affix/context.js +1 -0
- package/dist/components/affix/index.d.ts +6 -0
- package/dist/components/affix/index.js +1 -0
- package/dist/components/affix/shared.js +1 -0
- package/dist/components/affix/types.d.ts +39 -0
- package/dist/components/alert-dialog/alert-dialog-content.vue.d.ts +2 -2
- package/dist/components/anchor/anchor-link.js +1 -0
- package/dist/components/{toast/toast-close.vue.d.ts → anchor/anchor-link.vue.d.ts} +3 -3
- package/dist/components/anchor/anchor-root.js +1 -0
- package/dist/components/anchor/anchor-root.vue.d.ts +38 -0
- package/dist/components/anchor/context.d.ts +8 -0
- package/dist/components/anchor/context.js +1 -0
- package/dist/components/anchor/index.d.ts +5 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/anchor/shared.js +1 -0
- package/dist/components/anchor/types.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete-anchor.js +1 -0
- package/dist/components/autocomplete/autocomplete-anchor.vue.d.ts +21 -0
- package/dist/components/autocomplete/autocomplete-content.js +1 -0
- package/dist/components/autocomplete/autocomplete-content.vue.d.ts +24 -0
- package/dist/components/autocomplete/autocomplete-group-label.js +1 -0
- package/dist/components/autocomplete/autocomplete-group-label.vue.d.ts +18 -0
- package/dist/components/autocomplete/autocomplete-group.js +1 -0
- package/dist/components/autocomplete/autocomplete-group.vue.d.ts +18 -0
- package/dist/components/autocomplete/autocomplete-input.js +1 -0
- package/dist/components/autocomplete/autocomplete-input.vue.d.ts +28 -0
- package/dist/components/autocomplete/autocomplete-item-indicator.js +1 -0
- package/dist/components/autocomplete/autocomplete-item-indicator.vue.d.ts +18 -0
- package/dist/components/autocomplete/autocomplete-item.js +1 -0
- package/dist/components/autocomplete/autocomplete-item.vue.d.ts +26 -0
- package/dist/components/autocomplete/autocomplete-root.js +1 -0
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +35 -0
- package/dist/components/autocomplete/autocomplete-separator.js +1 -0
- package/dist/components/autocomplete/autocomplete-separator.vue.d.ts +18 -0
- package/dist/components/autocomplete/autocomplete-trigger.js +1 -0
- package/dist/components/autocomplete/autocomplete-trigger.vue.d.ts +21 -0
- package/dist/components/autocomplete/autocomplete-viewport.js +1 -0
- package/dist/components/autocomplete/autocomplete-viewport.vue.d.ts +18 -0
- package/dist/components/autocomplete/context.d.ts +8 -0
- package/dist/components/autocomplete/context.js +1 -0
- package/dist/components/autocomplete/index.d.ts +16 -0
- package/dist/components/autocomplete/index.js +1 -0
- package/dist/components/autocomplete/types.d.ts +57 -0
- package/dist/components/carousel/carousel-content.js +1 -0
- package/dist/components/carousel/carousel-content.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-item.js +1 -0
- package/dist/components/carousel/carousel-item.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-next.js +1 -0
- package/dist/components/carousel/carousel-next.vue.d.ts +28 -0
- package/dist/components/carousel/carousel-previous.js +1 -0
- package/dist/components/carousel/carousel-previous.vue.d.ts +28 -0
- package/dist/components/carousel/carousel-root.js +1 -0
- package/dist/components/carousel/carousel-root.vue.d.ts +15 -0
- package/dist/components/carousel/context.d.ts +8 -0
- package/dist/components/carousel/context.js +1 -0
- package/dist/components/carousel/index.d.ts +8 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/carousel/types.d.ts +26 -0
- package/dist/components/checkbox/checkbox-group-root.js +1 -1
- package/dist/components/checkbox/checkbox-root.vue.d.ts +1 -1
- package/dist/components/collapsible/collapsible-root.vue.d.ts +1 -1
- package/dist/components/color-area/color-area-area.js +1 -0
- package/dist/components/{toast/toast-viewport.vue.d.ts → color-area/color-area-area.vue.d.ts} +3 -5
- package/dist/components/color-area/color-area-root.js +1 -0
- package/dist/components/color-area/color-area-root.vue.d.ts +39 -0
- package/dist/components/color-area/color-area-thumb.js +1 -0
- package/dist/components/color-area/color-area-thumb.vue.d.ts +21 -0
- package/dist/components/color-area/context.d.ts +8 -0
- package/dist/components/color-area/context.js +1 -0
- package/dist/components/color-area/index.d.ts +6 -0
- package/dist/components/color-area/index.js +1 -0
- package/dist/components/color-area/shared.js +1 -0
- package/dist/components/color-area/types.d.ts +31 -0
- package/dist/components/color-field/color-field-input.js +1 -0
- package/dist/components/color-field/color-field-input.vue.d.ts +8 -0
- package/dist/components/color-field/color-field-root.js +1 -0
- package/dist/components/color-field/color-field-root.vue.d.ts +36 -0
- package/dist/components/color-field/context.d.ts +8 -0
- package/dist/components/color-field/context.js +1 -0
- package/dist/components/color-field/index.d.ts +5 -0
- package/dist/components/color-field/index.js +1 -0
- package/dist/components/color-field/types.d.ts +28 -0
- package/dist/components/color-picker/color-picker-root.js +1 -0
- package/dist/components/color-picker/color-picker-root.vue.d.ts +40 -0
- package/dist/components/color-picker/index.d.ts +3 -0
- package/dist/components/color-picker/index.js +1 -0
- package/dist/components/color-picker/types.d.ts +24 -0
- package/dist/components/color-slider/color-slider-root.js +1 -0
- package/dist/components/color-slider/color-slider-root.vue.d.ts +39 -0
- package/dist/components/color-slider/color-slider-thumb.js +1 -0
- package/dist/components/color-slider/color-slider-thumb.vue.d.ts +21 -0
- package/dist/components/color-slider/color-slider-track.js +1 -0
- package/dist/components/color-slider/color-slider-track.vue.d.ts +18 -0
- package/dist/components/color-slider/context.d.ts +8 -0
- package/dist/components/color-slider/context.js +1 -0
- package/dist/components/color-slider/index.d.ts +6 -0
- package/dist/components/color-slider/index.js +1 -0
- package/dist/components/color-slider/types.d.ts +31 -0
- package/dist/components/color-swatch/color-swatch.js +1 -0
- package/dist/components/color-swatch/color-swatch.vue.d.ts +26 -0
- package/dist/components/color-swatch/index.d.ts +3 -0
- package/dist/components/color-swatch/index.js +1 -0
- package/dist/components/color-swatch/types.d.ts +11 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item-indicator.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item-indicator.vue.d.ts +18 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item-swatch.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item-swatch.vue.d.ts +18 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-item.vue.d.ts +23 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-root.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker-root.vue.d.ts +30 -0
- package/dist/components/color-swatch-picker/context.d.ts +8 -0
- package/dist/components/color-swatch-picker/context.js +1 -0
- package/dist/components/color-swatch-picker/index.d.ts +7 -0
- package/dist/components/color-swatch-picker/index.js +1 -0
- package/dist/components/color-swatch-picker/types.d.ts +18 -0
- package/dist/components/combobox/combobox-content.js +1 -0
- package/dist/components/combobox/combobox-content.vue.d.ts +36 -0
- package/dist/components/combobox/combobox-empty.js +1 -0
- package/dist/components/combobox/combobox-empty.vue.d.ts +18 -0
- package/dist/components/combobox/combobox-group-label.js +1 -0
- package/dist/components/combobox/combobox-group-label.vue.d.ts +18 -0
- package/dist/components/combobox/combobox-group.js +1 -0
- package/dist/components/combobox/combobox-group.vue.d.ts +18 -0
- package/dist/components/combobox/combobox-input.js +1 -0
- package/dist/components/combobox/combobox-input.vue.d.ts +28 -0
- package/dist/components/combobox/combobox-item-indicator.js +1 -0
- package/dist/components/combobox/combobox-item-indicator.vue.d.ts +21 -0
- package/dist/components/combobox/combobox-item.js +1 -0
- package/dist/components/combobox/combobox-item.vue.d.ts +23 -0
- package/dist/components/combobox/combobox-root.js +1 -0
- package/dist/components/combobox/combobox-root.vue.d.ts +32 -0
- package/dist/components/combobox/combobox-separator.js +1 -0
- package/dist/components/combobox/combobox-separator.vue.d.ts +18 -0
- package/dist/components/combobox/combobox-trigger.js +1 -0
- package/dist/components/combobox/combobox-trigger.vue.d.ts +24 -0
- package/dist/components/combobox/combobox-viewport.js +9 -0
- package/dist/components/combobox/combobox-viewport.vue.d.ts +18 -0
- package/dist/components/combobox/context.d.ts +8 -0
- package/dist/components/combobox/context.js +1 -0
- package/dist/components/combobox/index.d.ts +16 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/types.d.ts +49 -0
- package/dist/components/config-provider/config-provider.js +1 -1
- package/dist/components/config-provider/types.d.ts +8 -0
- package/dist/components/context-menu/context-menu-checkbox-compact.js +1 -0
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +33 -0
- package/dist/components/context-menu/context-menu-compact.js +1 -0
- package/dist/components/context-menu/context-menu-compact.vue.d.ts +32 -0
- package/dist/components/context-menu/context-menu-content.vue.d.ts +4 -4
- package/dist/components/context-menu/context-menu-radio-compact.js +1 -0
- package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +33 -0
- package/dist/components/context-menu/context-menu-trigger.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.js +1 -0
- package/dist/components/context-menu/context-menu-wrapper-compact.vue.d.ts +41 -0
- package/dist/components/context-menu/index.d.ts +23 -19
- package/dist/components/context-menu/index.js +1 -1
- package/dist/components/context-menu/types.d.ts +30 -2
- package/dist/components/dialog/dialog-content.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +33 -0
- package/dist/components/dropdown-menu/dropdown-menu-compact.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-compact.vue.d.ts +32 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +7 -7
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +33 -0
- package/dist/components/dropdown-menu/dropdown-menu-trigger.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.vue.d.ts +42 -0
- package/dist/components/dropdown-menu/index.d.ts +24 -20
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +33 -2
- package/dist/components/editable/context.d.ts +8 -0
- package/dist/components/editable/context.js +1 -0
- package/dist/components/editable/editable-area.js +1 -0
- package/dist/components/editable/editable-area.vue.d.ts +21 -0
- package/dist/components/editable/editable-cancel-trigger.js +1 -0
- package/dist/components/editable/editable-cancel-trigger.vue.d.ts +21 -0
- package/dist/components/editable/editable-edit-trigger.js +1 -0
- package/dist/components/editable/editable-edit-trigger.vue.d.ts +21 -0
- package/dist/components/editable/editable-input.js +1 -0
- package/dist/components/editable/editable-input.vue.d.ts +18 -0
- package/dist/components/editable/editable-preview.js +1 -0
- package/dist/components/editable/editable-preview.vue.d.ts +21 -0
- package/dist/components/editable/editable-root.js +1 -0
- package/dist/components/editable/editable-root.vue.d.ts +52 -0
- package/dist/components/editable/editable-submit-trigger.js +1 -0
- package/dist/components/editable/editable-submit-trigger.vue.d.ts +21 -0
- package/dist/components/editable/index.d.ts +10 -0
- package/dist/components/editable/index.js +1 -0
- package/dist/components/editable/types.d.ts +59 -0
- package/dist/components/empty/context.d.ts +8 -0
- package/dist/components/empty/context.js +1 -0
- package/dist/components/empty/empty-content.js +1 -0
- package/dist/components/empty/empty-content.vue.d.ts +18 -0
- package/dist/components/empty/empty-description.js +1 -0
- package/dist/components/{toast/toast-description.vue.d.ts → empty/empty-description.vue.d.ts} +3 -3
- package/dist/components/empty/empty-header.js +1 -0
- package/dist/components/empty/empty-header.vue.d.ts +18 -0
- package/dist/components/empty/empty-media.js +1 -0
- package/dist/components/{toast/toast-title.vue.d.ts → empty/empty-media.vue.d.ts} +3 -3
- package/dist/components/empty/empty-root.js +1 -0
- package/dist/components/empty/empty-root.vue.d.ts +18 -0
- package/dist/components/empty/empty-title.js +1 -0
- package/dist/components/empty/empty-title.vue.d.ts +18 -0
- package/dist/components/empty/index.d.ts +9 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/empty/types.d.ts +14 -0
- package/dist/components/form/core/types.d.ts +3 -2
- package/dist/components/hover-card/context.js +1 -0
- package/dist/components/hover-card/hover-card-popup.js +1 -0
- package/dist/components/hover-card/hover-card-popup.vue.d.ts +18 -0
- package/dist/components/hover-card/hover-card-positioner-impl.js +1 -0
- package/dist/components/hover-card/hover-card-positioner.js +1 -0
- package/dist/components/hover-card/hover-card-positioner.vue.d.ts +29 -0
- package/dist/components/hover-card/hover-card-root.js +1 -0
- package/dist/components/hover-card/hover-card-root.vue.d.ts +29 -0
- package/dist/components/hover-card/hover-card-trigger.js +1 -0
- package/dist/components/hover-card/hover-card-trigger.vue.d.ts +21 -0
- package/dist/components/hover-card/index.d.ts +11 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/hover-card/shared.js +1 -0
- package/dist/components/hover-card/types.d.ts +27 -0
- package/dist/components/icon/icon-render.js +1 -0
- package/dist/components/icon/icon-render.vue.d.ts +8 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/icon/types.d.ts +9 -0
- package/dist/components/input/input-control.js +1 -1
- package/dist/components/input-number/input-number-root.vue.d.ts +2 -2
- package/dist/components/kbd/kbd.js +1 -1
- package/dist/components/kbd/kbd.vue.d.ts +3 -1
- package/dist/components/layout/layout-root.vue.d.ts +1 -1
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/link.vue.d.ts +1 -1
- package/dist/components/listbox/listbox-filter.js +1 -1
- package/dist/components/listbox/types.d.ts +1 -1
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/hooks.js +1 -0
- package/dist/components/menu/index.d.ts +20 -16
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/menu-checkbox-options-compact.js +1 -0
- package/dist/components/menu/menu-checkbox-options-compact.vue.d.ts +23 -0
- package/dist/components/menu/menu-content-impl.js +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +4 -4
- package/dist/components/menu/menu-item-slot-compact.js +1 -0
- package/dist/components/menu/menu-option-compact.js +1 -0
- package/dist/components/menu/menu-option-compact.vue.d.ts +31 -0
- package/dist/components/menu/menu-options-compact.js +1 -0
- package/dist/components/menu/menu-options-compact.vue.d.ts +31 -0
- package/dist/components/menu/menu-radio-options-compact.js +1 -0
- package/dist/components/menu/menu-radio-options-compact.vue.d.ts +23 -0
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/menu-sub-content.js +1 -1
- package/dist/components/menu/menu-sub-content.vue.d.ts +4 -4
- package/dist/components/menu/menu-sub-trigger.js +1 -1
- package/dist/components/menu/shared.js +1 -1
- package/dist/components/menu/types.d.ts +119 -4
- package/dist/components/menubar/context.d.ts +8 -0
- package/dist/components/menubar/context.js +1 -0
- package/dist/components/menubar/index.d.ts +22 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar-compact.js +1 -0
- package/dist/components/menubar/menubar-compact.vue.d.ts +33 -0
- package/dist/components/menubar/menubar-content.js +1 -0
- package/dist/components/menubar/menubar-content.vue.d.ts +38 -0
- package/dist/components/menubar/menubar-menu.js +1 -0
- package/dist/components/menubar/menubar-menu.vue.d.ts +22 -0
- package/dist/components/menubar/menubar-root.js +1 -0
- package/dist/components/menubar/menubar-root.vue.d.ts +29 -0
- package/dist/components/menubar/menubar-sub-content.js +1 -0
- package/dist/components/menubar/menubar-sub-content.vue.d.ts +35 -0
- package/dist/components/menubar/menubar-sub-trigger.js +1 -0
- package/dist/components/menubar/menubar-sub-trigger.vue.d.ts +18 -0
- package/dist/components/menubar/menubar-trigger.js +1 -0
- package/dist/components/menubar/menubar-trigger.vue.d.ts +21 -0
- package/dist/components/menubar/shared.js +1 -0
- package/dist/components/menubar/types.d.ts +54 -0
- package/dist/components/page-tabs/page-tabs-item.vue.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/popover-positioner.vue.d.ts +2 -2
- package/dist/components/popper/popper-positioner.vue.d.ts +3 -3
- package/dist/components/progress/context.d.ts +8 -0
- package/dist/components/progress/context.js +1 -0
- package/dist/components/progress/index.d.ts +6 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress-circle.js +1 -0
- package/dist/components/progress/progress-circle.vue.d.ts +25 -0
- package/dist/components/progress/progress-indicator.js +1 -0
- package/dist/components/progress/progress-indicator.vue.d.ts +21 -0
- package/dist/components/progress/progress-root.js +1 -0
- package/dist/components/progress/progress-root.vue.d.ts +33 -0
- package/dist/components/progress/shared.js +1 -0
- package/dist/components/progress/types.d.ts +34 -0
- package/dist/components/radio-group/radio-group-root.js +1 -1
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +1 -1
- package/dist/components/scroll-area/context.d.ts +8 -0
- package/dist/components/scroll-area/context.js +1 -0
- package/dist/components/scroll-area/index.d.ts +8 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area-corner.js +1 -0
- package/dist/components/scroll-area/scroll-area-corner.vue.d.ts +21 -0
- package/dist/components/scroll-area/scroll-area-root.js +1 -0
- package/dist/components/scroll-area/scroll-area-root.vue.d.ts +23 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.js +1 -0
- package/dist/components/scroll-area/scroll-area-scrollbar.vue.d.ts +22 -0
- package/dist/components/scroll-area/scroll-area-thumb.js +1 -0
- package/dist/components/scroll-area/scroll-area-thumb.vue.d.ts +21 -0
- package/dist/components/scroll-area/scroll-area-viewport.js +1 -0
- package/dist/components/scroll-area/scroll-area-viewport.vue.d.ts +21 -0
- package/dist/components/scroll-area/shared.js +1 -0
- package/dist/components/scroll-area/types.d.ts +31 -0
- package/dist/components/select/select-content.vue.d.ts +2 -2
- package/dist/components/select/select-viewport.js +1 -1
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.js +1 -0
- package/dist/components/skeleton/skeleton.vue.d.ts +21 -0
- package/dist/components/skeleton/types.d.ts +7 -0
- package/dist/components/slider/context.d.ts +8 -0
- package/dist/components/slider/context.js +1 -0
- package/dist/components/slider/index.d.ts +7 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/shared.js +1 -0
- package/dist/components/slider/slider-range.js +1 -0
- package/dist/components/slider/slider-range.vue.d.ts +21 -0
- package/dist/components/slider/slider-root.js +1 -0
- package/dist/components/slider/slider-root.vue.d.ts +41 -0
- package/dist/components/slider/slider-thumb.js +1 -0
- package/dist/components/slider/slider-thumb.vue.d.ts +21 -0
- package/dist/components/slider/slider-track.js +1 -0
- package/dist/components/{toast/toast-action.vue.d.ts → slider/slider-track.vue.d.ts} +3 -3
- package/dist/components/slider/types.d.ts +69 -0
- package/dist/components/splitter/context.d.ts +8 -0
- package/dist/components/splitter/context.js +1 -0
- package/dist/components/splitter/index.d.ts +6 -0
- package/dist/components/splitter/index.js +1 -0
- package/dist/components/splitter/shared.js +1 -0
- package/dist/components/splitter/splitter-group.js +1 -0
- package/dist/components/splitter/splitter-group.vue.d.ts +32 -0
- package/dist/components/splitter/splitter-panel.js +1 -0
- package/dist/components/splitter/splitter-panel.vue.d.ts +51 -0
- package/dist/components/splitter/splitter-resize-handle.js +1 -0
- package/dist/components/splitter/splitter-resize-handle.vue.d.ts +30 -0
- package/dist/components/splitter/types.d.ts +127 -0
- package/dist/components/stepper/context.d.ts +8 -0
- package/dist/components/stepper/context.js +1 -0
- package/dist/components/stepper/index.d.ts +10 -0
- package/dist/components/stepper/index.js +1 -0
- package/dist/components/stepper/stepper-description.js +1 -0
- package/dist/components/stepper/stepper-description.vue.d.ts +21 -0
- package/dist/components/stepper/stepper-indicator.js +1 -0
- package/dist/components/stepper/stepper-indicator.vue.d.ts +23 -0
- package/dist/components/stepper/stepper-item.js +1 -0
- package/dist/components/stepper/stepper-item.vue.d.ts +25 -0
- package/dist/components/stepper/stepper-root.js +1 -0
- package/dist/components/stepper/stepper-root.vue.d.ts +56 -0
- package/dist/components/stepper/stepper-separator.js +1 -0
- package/dist/components/stepper/stepper-separator.vue.d.ts +20 -0
- package/dist/components/stepper/stepper-title.js +1 -0
- package/dist/components/stepper/stepper-title.vue.d.ts +21 -0
- package/dist/components/stepper/stepper-trigger.js +1 -0
- package/dist/components/stepper/stepper-trigger.vue.d.ts +21 -0
- package/dist/components/stepper/types.d.ts +55 -0
- package/dist/components/table/context.js +1 -1
- package/dist/components/table/hooks.js +1 -0
- package/dist/components/table/index.d.ts +10 -8
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/shared.d.ts +39 -0
- package/dist/components/table/shared.js +1 -0
- package/dist/components/table/table-compact-cell.js +1 -0
- package/dist/components/table/table-compact-head.js +1 -0
- package/dist/components/table/table-compact-row.js +1 -0
- package/dist/components/table/table-compact.js +1 -0
- package/dist/components/table/table-compact.vue.d.ts +25 -0
- package/dist/components/table/table-content.js +1 -1
- package/dist/components/table/table-root.js +1 -1
- package/dist/components/table/table-virtual-spacer-row.js +1 -0
- package/dist/components/table/types.d.ts +315 -5
- package/dist/components/tags-input/context.d.ts +8 -0
- package/dist/components/tags-input/context.js +1 -0
- package/dist/components/tags-input/index.d.ts +9 -0
- package/dist/components/tags-input/index.js +1 -0
- package/dist/components/tags-input/tags-input-clear.js +1 -0
- package/dist/components/tags-input/tags-input-clear.vue.d.ts +21 -0
- package/dist/components/tags-input/tags-input-input.js +1 -0
- package/dist/components/tags-input/tags-input-input.vue.d.ts +21 -0
- package/dist/components/tags-input/tags-input-item-delete.js +1 -0
- package/dist/components/tags-input/tags-input-item-delete.vue.d.ts +21 -0
- package/dist/components/tags-input/tags-input-item-text.js +1 -0
- package/dist/components/tags-input/tags-input-item-text.vue.d.ts +21 -0
- package/dist/components/tags-input/tags-input-item.js +1 -0
- package/dist/components/tags-input/tags-input-item.vue.d.ts +21 -0
- package/dist/components/tags-input/tags-input-root.js +1 -0
- package/dist/components/tags-input/tags-input-root.vue.d.ts +28 -0
- package/dist/components/tags-input/types.d.ts +63 -0
- package/dist/components/toast/context.d.ts +3 -4
- package/dist/components/toast/context.js +1 -1
- package/dist/components/toast/hooks.js +1 -0
- package/dist/components/toast/index.d.ts +5 -12
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/shared.js +1 -1
- package/dist/components/toast/state.d.ts +27 -0
- package/dist/components/toast/state.js +1 -0
- package/dist/components/toast/toast-render.js +1 -0
- package/dist/components/toast/toast.js +1 -0
- package/dist/components/toast/toaster.js +1 -0
- package/dist/components/toast/toaster.vue.d.ts +26 -0
- package/dist/components/toast/types.d.ts +98 -80
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/toggle.js +1 -0
- package/dist/components/toggle/toggle.vue.d.ts +33 -0
- package/dist/components/toggle/types.d.ts +27 -0
- package/dist/components/toggle-group/context.d.ts +8 -0
- package/dist/components/toggle-group/context.js +1 -0
- package/dist/components/toggle-group/index.d.ts +5 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group-item.js +1 -0
- package/dist/components/toggle-group/toggle-group-item.vue.d.ts +25 -0
- package/dist/components/toggle-group/toggle-group-root.js +1 -0
- package/dist/components/toggle-group/toggle-group-root.vue.d.ts +26 -0
- package/dist/components/toggle-group/types.d.ts +30 -0
- package/dist/components/toolbar/context.d.ts +8 -0
- package/dist/components/toolbar/context.js +1 -0
- package/dist/components/toolbar/index.d.ts +9 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/toolbar/toolbar-button.js +1 -0
- package/dist/components/toolbar/toolbar-button.vue.d.ts +22 -0
- package/dist/components/toolbar/toolbar-link.js +1 -0
- package/dist/components/toolbar/toolbar-link.vue.d.ts +21 -0
- package/dist/components/toolbar/toolbar-root.js +1 -0
- package/dist/components/toolbar/toolbar-root.vue.d.ts +21 -0
- package/dist/components/toolbar/toolbar-separator.js +1 -0
- package/dist/components/toolbar/toolbar-separator.vue.d.ts +18 -0
- package/dist/components/toolbar/toolbar-toggle-group.js +1 -0
- package/dist/components/toolbar/toolbar-toggle-group.vue.d.ts +24 -0
- package/dist/components/toolbar/toolbar-toggle-item.js +1 -0
- package/dist/components/toolbar/toolbar-toggle-item.vue.d.ts +22 -0
- package/dist/components/toolbar/types.d.ts +36 -0
- package/dist/components/tooltip/tooltip-popup.js +1 -1
- package/dist/components/tree-menu/context.js +1 -1
- package/dist/components/tree-menu/tree-menu-collapsible.js +1 -1
- package/dist/components/tree-menu/types.d.ts +1 -1
- package/dist/components/visually-hidden/visually-hidden-input-bubble.js +1 -1
- package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +1 -1
- package/dist/composables/use-dismissable-layer.js +1 -1
- package/dist/composables/use-focus-scope.js +1 -1
- package/dist/constants/components.d.ts +25 -0
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +399 -235
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +732 -460
- package/dist/namespaced/index.js +1 -1
- package/dist/node_modules/.pnpm/@soybeanjs_utils@0.1.0/node_modules/@soybeanjs/utils/dist/index.js +1 -0
- package/dist/shared/color.d.ts +42 -0
- package/dist/shared/color.js +1 -0
- package/dist/shared/index.d.ts +3 -2
- package/dist/shared/index.js +1 -1
- package/dist/shared/value.d.ts +1 -1
- package/dist/shared/vue.d.ts +4 -2
- package/dist/shared/vue.js +1 -1
- package/dist/types/common.d.ts +2 -1
- package/dist/types/event.d.ts +1 -10
- package/dist/types/index.d.ts +2 -2
- package/package.json +11 -9
- package/dist/components/toast/toast-action.js +0 -1
- package/dist/components/toast/toast-announce.js +0 -1
- package/dist/components/toast/toast-close.js +0 -1
- package/dist/components/toast/toast-description.js +0 -1
- package/dist/components/toast/toast-focus-proxy.js +0 -1
- package/dist/components/toast/toast-provider.js +0 -1
- package/dist/components/toast/toast-provider.vue.d.ts +0 -24
- package/dist/components/toast/toast-root.js +0 -1
- package/dist/components/toast/toast-root.vue.d.ts +0 -46
- package/dist/components/toast/toast-title.js +0 -1
- package/dist/components/toast/toast-viewport.js +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DataOrientation, Direction } from "../../types/common.js";
|
|
2
|
+
import { AsTag } from "../primitive/types.js";
|
|
3
|
+
import { ButtonType } from "../button/types.js";
|
|
4
|
+
import { CarouselPreviousProps } from "./types.js";
|
|
5
|
+
import * as _$vue from "vue";
|
|
6
|
+
|
|
7
|
+
//#region src/components/carousel/carousel-previous.vue.d.ts
|
|
8
|
+
declare var __VLS_10: {
|
|
9
|
+
dir: Direction;
|
|
10
|
+
orientation: DataOrientation;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_10) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: _$vue.DefineComponent<CarouselPreviousProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<CarouselPreviousProps> & Readonly<{}>, {
|
|
17
|
+
type: ButtonType;
|
|
18
|
+
as: AsTag | _$vue.Component;
|
|
19
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useOmitProps as e}from"../../composables/use-props.js";import"../../composables/index.js";import{useDirection as t}from"../config-provider/context.js";import{provideCarouselRootContext as n,useCarouselUi as r}from"./context.js";import{computed as i,createElementBlock as a,defineComponent as o,mergeProps as s,openBlock as c,renderSlot as l,shallowRef as u,unref as d,watch as f,watchEffect as p}from"vue";import m from"embla-carousel-vue";const h=[`dir`,`data-orientation`,`aria-label`,`tabindex`],g=o({name:`CarouselRoot`,__name:`carousel-root`,props:{opts:{},plugins:{},orientation:{default:`horizontal`},dir:{}},emits:[`initApi`],setup(o,{expose:g,emit:_}){let v=o,y=_,b=e(v,[`opts`,`plugins`,`orientation`,`dir`]),x=r(`root`),S=t(()=>v.dir),C=i(()=>v.orientation),w=i(()=>v[`aria-labelledby`]?void 0:v[`aria-label`]??`Carousel`),T=i(()=>v.tabindex??0),E=u({}),D=u([]);p(()=>{E.value={...v.opts,axis:v.orientation===`horizontal`?`x`:`y`,direction:S.value}}),p(()=>{D.value=v.plugins??[]});let[O,k]=m(E,D),A=u(``),j=u(!1),M=u(!1),N=u(0),P=u([]);function F(e){j.value=e?.canScrollNext()??!1,M.value=e?.canScrollPrev()??!1,N.value=e?.selectedScrollSnap()??0,P.value=e?.scrollSnapList()??[]}function I(){k.value?.scrollNext()}function L(){k.value?.scrollPrev()}function R(e,t){k.value?.scrollTo(e,t)}function z(e){A.value=e}function B(e){if(e.target!==e.currentTarget)return;let t=v.orientation===`vertical`?`ArrowUp`:S.value===`rtl`?`ArrowRight`:`ArrowLeft`,n=v.orientation===`vertical`?`ArrowDown`:S.value===`rtl`?`ArrowLeft`:`ArrowRight`;if(e.key===t){e.preventDefault(),L();return}e.key===n&&(e.preventDefault(),I())}return f(k,(e,t,n)=>{if(F(e),!e)return;let r=e=>{F(e)},i=e=>{F(e)};e.on(`select`,r),e.on(`reInit`,i),y(`initApi`,e),n(()=>{e.off(`select`,r),e.off(`reInit`,i)})},{immediate:!0}),n({dir:S,orientation:C,carouselRef:O,carouselApi:k,contentId:A,canScrollNext:j,canScrollPrev:M,selectedIndex:N,scrollSnaps:P,scrollNext:I,scrollPrev:L,scrollTo:R,setContentId:z}),g({dir:S,orientation:C,carouselApi:k,carouselRef:O,canScrollNext:j,canScrollPrev:M,selectedIndex:N,scrollSnaps:P,scrollNext:I,scrollPrev:L,scrollTo:R}),(e,t)=>(c(),a(`div`,s(d(b),{class:d(x),dir:d(S),"data-orientation":C.value,"aria-label":w.value,tabindex:T.value,"data-soybean-carousel-root":``,role:`region`,"aria-roledescription":`carousel`,onKeydown:B}),[l(e.$slots,`default`,{carouselApi:d(k),canScrollNext:j.value,canScrollPrev:M.value,selectedIndex:N.value,scrollSnaps:P.value,scrollNext:I,scrollPrev:L,scrollTo:R,orientation:C.value,dir:d(S)})],16,h))}});export{g as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/carousel/carousel-root.vue.d.ts
|
|
2
|
+
declare var __VLS_1: any;
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: any;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { _default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClassValue, UiClass } from "../../types/common.js";
|
|
2
|
+
import { CarouselUiSlot } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/carousel/context.d.ts
|
|
6
|
+
declare const provideCarouselUi: (ui: _$vue.ComputedRef<Partial<UiClass<CarouselUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<CarouselUiSlot>>>, useCarouselUi: <S extends CarouselUiSlot | undefined = undefined>(slot?: S | undefined) => S extends CarouselUiSlot ? _$vue.ComputedRef<ClassValue> : _$vue.ComputedRef<Partial<UiClass<CarouselUiSlot>>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { provideCarouselUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";import"../../composables/index.js";import{computed as n}from"vue";const[r,i]=e(`CarouselRoot`),[a,o]=t(`CarouselUi`,e=>n(()=>e.value??{}));export{r as provideCarouselRootContext,a as provideCarouselUi,i as useCarouselRootContext,o as useCarouselUi};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CarouselApi, CarouselContentProps, CarouselItemProps, CarouselNextProps, CarouselOptions, CarouselPlugins, CarouselPreviousProps, CarouselRootEmits, CarouselRootProps, CarouselUi, CarouselUiSlot } from "./types.js";
|
|
2
|
+
import { _default } from "./carousel-content.vue.js";
|
|
3
|
+
import { _default as _default$1 } from "./carousel-item.vue.js";
|
|
4
|
+
import { _default as _default$2 } from "./carousel-next.vue.js";
|
|
5
|
+
import { _default as _default$3 } from "./carousel-previous.vue.js";
|
|
6
|
+
import { _default as _default$4 } from "./carousel-root.vue.js";
|
|
7
|
+
import { provideCarouselUi } from "./context.js";
|
|
8
|
+
export { type CarouselApi, _default as CarouselContent, type CarouselContentProps, _default$1 as CarouselItem, type CarouselItemProps, _default$2 as CarouselNext, type CarouselNextProps, type CarouselOptions, type CarouselPlugins, _default$3 as CarouselPrevious, type CarouselPreviousProps, _default$4 as CarouselRoot, type CarouselRootEmits, type CarouselRootProps, type CarouselUi, type CarouselUiSlot, provideCarouselUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{provideCarouselUi as e}from"./context.js";import t from"./carousel-content.js";import n from"./carousel-item.js";import r from"./carousel-next.js";import i from"./carousel-previous.js";import a from"./carousel-root.js";export{t as CarouselContent,n as CarouselItem,r as CarouselNext,i as CarouselPrevious,a as CarouselRoot,e as provideCarouselUi};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DataOrientation, Direction, UiClass } from "../../types/common.js";
|
|
2
|
+
import { ButtonProps } from "../button/types.js";
|
|
3
|
+
import { ComputedRef, HTMLAttributes, MaybeRef, Ref, ShallowRef } from "vue";
|
|
4
|
+
import emblaCarouselVue, { EmblaCarouselVueType } from "embla-carousel-vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/carousel/types.d.ts
|
|
7
|
+
type CarouselApi = NonNullable<EmblaCarouselVueType[1]['value']>;
|
|
8
|
+
type CarouselOptions = NonNullable<Parameters<typeof emblaCarouselVue>[0]> extends MaybeRef<infer Value> ? Value : never;
|
|
9
|
+
type CarouselPlugins = NonNullable<Parameters<typeof emblaCarouselVue>[1]> extends MaybeRef<infer Value> ? Value : never;
|
|
10
|
+
interface CarouselRootProps extends /** @vue-ignore */Omit<HTMLAttributes, 'onSelect'> {
|
|
11
|
+
opts?: CarouselOptions;
|
|
12
|
+
plugins?: CarouselPlugins;
|
|
13
|
+
orientation?: DataOrientation;
|
|
14
|
+
dir?: Direction;
|
|
15
|
+
}
|
|
16
|
+
type CarouselRootEmits = {
|
|
17
|
+
initApi: [api: CarouselApi];
|
|
18
|
+
};
|
|
19
|
+
interface CarouselContentProps extends /** @vue-ignore */HTMLAttributes {}
|
|
20
|
+
interface CarouselItemProps extends /** @vue-ignore */HTMLAttributes {}
|
|
21
|
+
interface CarouselPreviousProps extends ButtonProps {}
|
|
22
|
+
interface CarouselNextProps extends ButtonProps {}
|
|
23
|
+
type CarouselUiSlot = 'root' | 'content' | 'container' | 'item' | 'previous' | 'next';
|
|
24
|
+
type CarouselUi = UiClass<CarouselUiSlot>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { CarouselApi, CarouselContentProps, CarouselItemProps, CarouselNextProps, CarouselOptions, CarouselPlugins, CarouselPreviousProps, CarouselRootEmits, CarouselRootProps, CarouselUi, CarouselUiSlot };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import"../../composables/index.js";import i from"../
|
|
1
|
+
import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import"../../composables/index.js";import i from"../visually-hidden/visually-hidden-input.js";import a from"../roving-focus/roving-focus-group.js";import"../roving-focus/index.js";import"../visually-hidden/index.js";import{provideCheckboxGroupRootContext as o}from"./context.js";import{computed as s,createBlock as c,createCommentVNode as l,defineComponent as u,mergeProps as d,openBlock as f,renderSlot as p,resolveDynamicComponent as m,unref as h,withCtx as g}from"vue";const _=u({name:`CheckboxGroupRoot`,__name:`checkbox-group-root`,props:{modelValue:{default:void 0},defaultValue:{},rovingFocus:{type:Boolean,default:!0},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(u,{emit:_}){let v=u,y=_,b=s(()=>{let{rovingFocus:e,loop:t,dir:n,orientation:r}=v;return e?{loop:t,dir:n,orientation:r}:{}}),x=n(()=>v.modelValue,e=>{y(`update:modelValue`,e??[])},v.defaultValue);o({...t(v,[`modelValue`,`defaultValue`,`rovingFocus`,`disabled`]),modelValue:x});let[S,C]=r(),w=s(()=>e(S.value));return(e,t)=>(f(),c(m(u.rovingFocus?h(a):`div`),d(b.value,{ref:h(C),as:`div`}),{default:g(()=>[p(e.$slots,`default`),w.value&&u.name?(f(),c(h(i),{key:0,name:u.name,value:h(x),required:u.required},null,8,[`name`,`value`,`required`])):l(`v-if`,!0)]),_:3},16))}});export{_ as default};
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: _$vue.DefineComponent<CheckboxRootProps, {}, {}, {}, {
|
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<CheckboxRootProps> & Readonly<{
|
|
16
16
|
"onUpdate:modelValue"?: ((value: CheckedState | null) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
value: DefinedValue;
|
|
19
18
|
modelValue: CheckedState | null;
|
|
19
|
+
value: DefinedValue;
|
|
20
20
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: _$vue.DefineComponent<CollapsibleRootProps, {
|
|
|
16
16
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
open: boolean;
|
|
19
|
-
defaultOpen: boolean;
|
|
20
19
|
unmountOnHide: boolean;
|
|
20
|
+
defaultOpen: boolean;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useForwardElement as e}from"../../composables/use-forward-element.js";import"../../composables/index.js";import{Primitive as t}from"../primitive/primitive.js";import"../primitive/index.js";import{useColorAreaRootContext as n,useColorAreaUi as r}from"./context.js";import{createLinearScale as i}from"./shared.js";import{createBlock as a,defineComponent as o,normalizeClass as s,normalizeStyle as c,openBlock as l,renderSlot as u,shallowRef as d,unref as f,withCtx as p}from"vue";const m=o({name:`ColorAreaArea`,__name:`color-area-area`,props:{asChild:{type:Boolean},as:{default:`div`}},setup(o){let[m,h]=e(),g=r(`area`),{xRange:_,yRange:v,xValue:y,yValue:b,areaStyle:x,thumbElement:S,updateValues:C,commitValues:w,disabled:T}=n(`ColorAreaArea`),E=d(!1),D=d({x:0,y:0});function O(e){let t=m.value?.getBoundingClientRect();if(!t)return null;let n=i([0,t.width],[_.value.min,_.value.max]),r=i([0,t.height],[v.value.max,v.value.min]);return{x:n(e.clientX-t.left-D.value.x),y:r(e.clientY-t.top-D.value.y)}}function k(e){let t=S.value?.getBoundingClientRect(),n=e.target;return!t||!(n instanceof Node)||!S.value?.contains(n)?(D.value={x:0,y:0},!1):(D.value={x:e.clientX-(t.left+t.width/2),y:e.clientY-(t.top+t.height/2)},!0)}function A(e){if(T.value)return;if(e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault(),E.value=!0,k(e)){S.value?.focus();return}let t=O(e);t&&(C(t.x,t.y),S.value?.focus())}function j(e){if(!E.value||T.value||!e.currentTarget.hasPointerCapture(e.pointerId))return;let t=O(e);t&&C(t.x,t.y)}function M(e){if(!E.value)return;let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),E.value=!1,D.value={x:0,y:0},w()}function N(e){if(T.value)return;let t=e.shiftKey?10:1,n=_.value.step*t,r=v.value.step*t,i=0,a=0;switch(e.key){case`ArrowLeft`:i=-n;break;case`ArrowRight`:i=n;break;case`ArrowUp`:a=r;break;case`ArrowDown`:a=-r;break;case`PageUp`:a=r*10;break;case`PageDown`:a=-r*10;break;case`Home`:i=-n*10;break;case`End`:i=n*10;break;default:return}e.preventDefault(),C(y.value+i,b.value+a),w()}return(e,n)=>(l(),a(f(t),{ref:f(h),as:o.as,"as-child":o.asChild,class:s(f(g)),role:`application`,"aria-roledescription":`Color picker area`,"aria-disabled":f(T)?`true`:void 0,"data-disabled":f(T)?``:void 0,style:c({...f(x),touchAction:`none`}),onKeydown:N,onPointerdown:A,onPointermove:j,onPointerup:M,onPointercancel:M},{default:p(()=>[u(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`,`aria-disabled`,`data-disabled`,`style`]))}});export{m as default};
|
package/dist/components/{toast/toast-viewport.vue.d.ts → color-area/color-area-area.vue.d.ts}
RENAMED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { AsTag } from "../primitive/types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ColorAreaAreaProps } from "./types.js";
|
|
3
3
|
import * as _$vue from "vue";
|
|
4
4
|
|
|
5
|
-
//#region src/components/
|
|
5
|
+
//#region src/components/color-area/color-area-area.vue.d.ts
|
|
6
6
|
declare var __VLS_14: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
8
|
default?: (props: typeof __VLS_14) => any;
|
|
9
9
|
};
|
|
10
|
-
declare const __VLS_base: _$vue.DefineComponent<
|
|
11
|
-
label: string | ((hotkey: string) => string);
|
|
12
|
-
hotkey: string[];
|
|
10
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorAreaAreaProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ColorAreaAreaProps> & Readonly<{}>, {
|
|
13
11
|
as: AsTag | _$vue.Component;
|
|
14
12
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
15
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatColor as e,getAreaBackgroundStyle as t,getChannelRange as n,getChannelValue as r,hasVisibleChromaticity as i,setChannelValues as a,toColorObject as o}from"../../shared/color.js";import{isFormControl as s,transformPropsToContext as c}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as l}from"../../composables/use-controllable-state.js";import{useForwardElement as u}from"../../composables/use-forward-element.js";import"../../composables/index.js";import{Primitive as d}from"../primitive/primitive.js";import"../primitive/index.js";import f from"../visually-hidden/visually-hidden-input.js";import"../visually-hidden/index.js";import{provideColorAreaRootContext as p,useColorAreaUi as m}from"./context.js";import{computed as h,createBlock as g,createCommentVNode as _,defineComponent as v,normalizeClass as y,openBlock as b,renderSlot as x,shallowRef as S,unref as C,watch as w,withCtx as T}from"vue";const E=v({name:`ColorAreaRoot`,__name:`color-area-root`,props:{modelValue:{default:void 0},defaultValue:{default:`#ff0000`},colorSpace:{default:`hsl`},format:{default:`hex`},xChannel:{default:`saturation`},yChannel:{default:`lightness`},disabled:{type:Boolean,default:!1},xName:{},yName:{},asChild:{type:Boolean},as:{default:`div`},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`,`changeEnd`],setup(v,{emit:E}){let D=v,O=E,[k,A]=u(),j=m(`root`),M=l(()=>D.modelValue,t=>{O(`update:modelValue`,typeof t==`string`?t:e(t,D.format))},D.defaultValue),N=h(()=>o(M.value,D.colorSpace)),P=h(()=>n(D.xChannel)),F=h(()=>n(D.yChannel)),I=S(r(N.value,D.xChannel,D.colorSpace)),L=S(r(N.value,D.yChannel,D.colorSpace)),R=S(r(N.value,`hue`,D.colorSpace)),z=h(()=>s(k.value)),B=h(()=>t(N.value,D.xChannel,D.yChannel,D.colorSpace)),V=S();function H(){I.value=r(N.value,D.xChannel,D.colorSpace),L.value=r(N.value,D.yChannel,D.colorSpace),i(N.value,D.colorSpace)&&(R.value=r(N.value,`hue`,D.colorSpace))}function U(t){let n=e(t,D.format);M.value=n,O(`update:color`,o(t,D.colorSpace)),O(`change`,n)}function W(e,t){let n=Math.min(P.value.max,Math.max(P.value.min,e)),r=Math.min(F.value.max,Math.max(F.value.min,t));I.value=n,L.value=r;let i=[{channel:D.xChannel,value:n},{channel:D.yChannel,value:r}];D.xChannel!==`hue`&&D.yChannel!==`hue`&&i.push({channel:`hue`,value:R.value}),U(a(N.value,i,D.colorSpace))}function G(){O(`changeEnd`,e(N.value,D.format))}return w(N,H,{immediate:!0}),p({color:N,xValue:I,yValue:L,xRange:P,yRange:F,areaStyle:B,thumbElement:V,setThumbElement(e){V.value!==e&&(V.value=e)},updateValues:W,commitValues:G,...c(D,[`colorSpace`,`format`,`xChannel`,`yChannel`,`disabled`])}),(e,t)=>(b(),g(C(d),{ref:C(A),as:v.as,"as-child":v.asChild,class:y(C(j)),role:`group`,"aria-disabled":v.disabled?`true`:void 0,"data-disabled":v.disabled?``:void 0},{default:T(()=>[x(e.$slots,`default`),z.value&&v.xName?(b(),g(C(f),{key:0,type:`text`,value:I.value,name:v.xName,disabled:v.disabled},null,8,[`value`,`name`,`disabled`])):_(`v-if`,!0),z.value&&v.yName?(b(),g(C(f),{key:1,type:`text`,value:L.value,name:v.yName,disabled:v.disabled},null,8,[`value`,`name`,`disabled`])):_(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`class`,`aria-disabled`,`data-disabled`]))}});export{E as default};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { ColorFormat, ColorSpace, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
3
|
+
import { ColorAreaAxisChannel, ColorAreaRootProps } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/color-area/color-area-root.vue.d.ts
|
|
7
|
+
declare var __VLS_8: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_8) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorAreaRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
change: (value: string) => any;
|
|
14
|
+
"update:color": (value: NormalizedColor) => any;
|
|
15
|
+
changeEnd: (value: string) => any;
|
|
16
|
+
}, string, _$vue.PublicProps, Readonly<ColorAreaRootProps> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
+
onChange?: ((value: string) => any) | undefined;
|
|
19
|
+
"onUpdate:color"?: ((value: NormalizedColor) => any) | undefined;
|
|
20
|
+
onChangeEnd?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
format: ColorFormat;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
modelValue: string | ColorValue;
|
|
25
|
+
defaultValue: string | ColorValue;
|
|
26
|
+
as: AsTag | _$vue.Component;
|
|
27
|
+
colorSpace: ColorSpace;
|
|
28
|
+
xChannel: ColorAreaAxisChannel;
|
|
29
|
+
yChannel: ColorAreaAxisChannel;
|
|
30
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatChannelValue as e,getChannelName as t}from"../../shared/color.js";import"../../shared/index.js";import{useForwardElement as n}from"../../composables/use-forward-element.js";import"../../composables/index.js";import{Primitive as r}from"../primitive/primitive.js";import"../primitive/index.js";import{useColorAreaRootContext as i,useColorAreaUi as a}from"./context.js";import{convertValueToPercentage as o}from"./shared.js";import{computed as s,createBlock as c,defineComponent as l,normalizeClass as u,normalizeStyle as d,openBlock as f,renderSlot as p,unref as m,withCtx as h}from"vue";const g=l({name:`ColorAreaThumb`,__name:`color-area-thumb`,props:{asChild:{type:Boolean},as:{default:`span`}},setup(l){let{setThumbElement:g,xChannel:_,yChannel:v,xValue:y,yValue:b,xRange:x,yRange:S,disabled:C}=i(`ColorAreaThumb`),[w,T]=n(e=>{g(e)}),E=a(`thumb`),D=s(()=>_.value??`saturation`),O=s(()=>v.value??`lightness`),k=s(()=>o(y.value,x.value.min,x.value.max)),A=s(()=>o(b.value,S.value.min,S.value.max)),j=s(()=>`${t(D.value)}, ${t(O.value)}`),M=s(()=>`${t(D.value)} ${e(D.value,y.value)}, ${t(O.value)} ${e(O.value,b.value)}`);return(e,t)=>(f(),c(m(r),{ref:m(T),as:l.as,"as-child":l.asChild,class:u(m(E)),role:`slider`,tabindex:m(C)?void 0:0,"aria-label":j.value,"aria-roledescription":`Color thumb`,"aria-valuemin":m(x).min,"aria-valuemax":m(x).max,"aria-valuenow":m(y),"aria-valuetext":M.value,"aria-orientation":`horizontal`,"data-disabled":m(C)?``:void 0,style:d({position:`absolute`,left:`${k.value}%`,top:`${100-A.value}%`,transform:`translate(-50%, -50%)`,touchAction:`none`})},{default:h(()=>[p(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`,`tabindex`,`aria-label`,`aria-valuemin`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`data-disabled`,`style`]))}});export{g as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { ColorAreaThumbProps } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/color-area/color-area-thumb.vue.d.ts
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorAreaThumbProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ColorAreaThumbProps> & Readonly<{}>, {
|
|
11
|
+
as: AsTag | _$vue.Component;
|
|
12
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { _default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClassValue, UiClass } from "../../types/common.js";
|
|
2
|
+
import { ColorAreaUiSlot } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/color-area/context.d.ts
|
|
6
|
+
declare const provideColorAreaUi: (ui: _$vue.ComputedRef<Partial<UiClass<ColorAreaUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<ColorAreaUiSlot>>>, useColorAreaUi: <S extends ColorAreaUiSlot | undefined = undefined>(slot?: S | undefined) => S extends ColorAreaUiSlot ? _$vue.ComputedRef<ClassValue> : _$vue.ComputedRef<Partial<UiClass<ColorAreaUiSlot>>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { provideColorAreaUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";import"../../composables/index.js";const[n,r]=e(`ColorAreaRoot`),[i,a]=t(`ColorAreaUi`);export{n as provideColorAreaRootContext,i as provideColorAreaUi,r as useColorAreaRootContext,a as useColorAreaUi};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ColorAreaAreaProps, ColorAreaAxisChannel, ColorAreaRootEmits, ColorAreaRootProps, ColorAreaThumbProps, ColorAreaUi, ColorAreaUiSlot } from "./types.js";
|
|
2
|
+
import { _default as _default$1 } from "./color-area-root.vue.js";
|
|
3
|
+
import { _default } from "./color-area-area.vue.js";
|
|
4
|
+
import { _default as _default$2 } from "./color-area-thumb.vue.js";
|
|
5
|
+
import { provideColorAreaUi } from "./context.js";
|
|
6
|
+
export { _default as ColorAreaArea, type ColorAreaAreaProps, type ColorAreaAxisChannel, _default$1 as ColorAreaRoot, type ColorAreaRootEmits, type ColorAreaRootProps, _default$2 as ColorAreaThumb, type ColorAreaThumbProps, type ColorAreaUi, type ColorAreaUiSlot, provideColorAreaUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{provideColorAreaUi as e}from"./context.js";import t from"./color-area-root.js";import n from"./color-area-area.js";import r from"./color-area-thumb.js";export{n as ColorAreaArea,t as ColorAreaRoot,r as ColorAreaThumb,e as provideColorAreaUi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){let[n,r]=e,[i,a]=t;if(r===n)return()=>i;let o=(a-i)/(r-n);return e=>i+(e-n)*o}function t(e,t,n){return n===t?0:(e-t)/(n-t)*100}export{t as convertValueToPercentage,e as createLinearScale};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { FormFieldCommonProps } from "../../types/component.js";
|
|
3
|
+
import { PrimitiveProps } from "../primitive/types.js";
|
|
4
|
+
import { ColorChannel, ColorFormat, ColorSpace, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
5
|
+
import { CSSProperties, ComputedRef, HTMLAttributes, ShallowRef } from "vue";
|
|
6
|
+
|
|
7
|
+
//#region src/components/color-area/types.d.ts
|
|
8
|
+
type ColorAreaAxisChannel = Extract<ColorChannel, 'hue' | 'saturation' | 'lightness' | 'brightness' | 'chroma'>;
|
|
9
|
+
interface ColorAreaRootProps extends PrimitiveProps, FormFieldCommonProps, /** @vue-ignore */HTMLAttributes {
|
|
10
|
+
modelValue?: string | ColorValue;
|
|
11
|
+
defaultValue?: string | ColorValue;
|
|
12
|
+
colorSpace?: ColorSpace;
|
|
13
|
+
format?: ColorFormat;
|
|
14
|
+
xChannel?: ColorAreaAxisChannel;
|
|
15
|
+
yChannel?: ColorAreaAxisChannel;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
xName?: string;
|
|
18
|
+
yName?: string;
|
|
19
|
+
}
|
|
20
|
+
type ColorAreaRootEmits = {
|
|
21
|
+
'update:modelValue': [value: string];
|
|
22
|
+
'update:color': [value: NormalizedColor];
|
|
23
|
+
change: [value: string];
|
|
24
|
+
changeEnd: [value: string];
|
|
25
|
+
};
|
|
26
|
+
interface ColorAreaAreaProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
27
|
+
interface ColorAreaThumbProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
|
|
28
|
+
type ColorAreaUiSlot = 'root' | 'area' | 'thumb';
|
|
29
|
+
type ColorAreaUi = UiClass<ColorAreaUiSlot>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ColorAreaAreaProps, ColorAreaAxisChannel, ColorAreaRootEmits, ColorAreaRootProps, ColorAreaThumbProps, ColorAreaUi, ColorAreaUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useColorFieldRootContext as e,useColorFieldUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,shallowRef as o,unref as s}from"vue";const c=[`inputmode`,`value`,`placeholder`,`disabled`,`readonly`,`data-disabled`,`data-readonly`],l=r({name:`ColorFieldInput`,__name:`color-field-input`,setup(r){let l=t(`input`),{updateValue:u,commit:d,handleWheel:f,increment:p,decrement:m,incrementPage:h,decrementPage:g,incrementToMax:_,decrementToMin:v,channel:y,inputValue:b,placeholder:x,disabled:S,readonly:C}=e(`ColorFieldInput`),w=o(!1);function T(e){u(e.target.value)}function E(){w.value=!1,d()}function D(){w.value=!0}function O(e){w.value&&f(e)}function k(e){switch(e.key){case`ArrowUp`:e.preventDefault(),p();break;case`ArrowDown`:e.preventDefault(),m();break;case`PageUp`:e.preventDefault(),h();break;case`PageDown`:e.preventDefault(),g();break;case`Home`:e.preventDefault(),v();break;case`End`:e.preventDefault(),_();break;case`Enter`:e.preventDefault(),d();break}}function A(e){if(!y.value)return;let t=e.data;t&&!/[\d.-]/.test(t)&&e.preventDefault()}return(e,t)=>(a(),n(`input`,{class:i(s(l)),type:`text`,inputmode:s(y)?`decimal`:`text`,value:s(b),placeholder:s(x),disabled:s(S),readonly:s(C),"data-disabled":s(S)?``:void 0,"data-readonly":s(C)?``:void 0,onInput:T,onBlur:E,onFocus:D,onKeydown:k,onWheel:O,onBeforeinput:A},null,42,c))}});export{l as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColorFieldInputProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/color-field/color-field-input.vue.d.ts
|
|
5
|
+
declare const __VLS_export: _$vue.DefineComponent<ColorFieldInputProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ColorFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatChannelValue as e,formatColor as t,getChannelRange as n,getChannelValue as r,isValidColor as i,setChannelValue as a,toColorObject as o}from"../../shared/color.js";import{isFormControl as s,transformPropsToContext as c}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as l}from"../../composables/use-controllable-state.js";import{useForwardElement as u}from"../../composables/use-forward-element.js";import"../../composables/index.js";import{Primitive as d}from"../primitive/primitive.js";import"../primitive/index.js";import f from"../visually-hidden/visually-hidden-input.js";import"../visually-hidden/index.js";import{provideColorFieldRootContext as p,useColorFieldUi as m}from"./context.js";import{computed as h,createBlock as g,createCommentVNode as _,defineComponent as v,normalizeClass as y,openBlock as b,renderSlot as x,shallowRef as S,unref as C,watch as w,withCtx as T}from"vue";const E=v({name:`ColorFieldRoot`,__name:`color-field-root`,props:{modelValue:{default:void 0},defaultValue:{default:`#000000`},colorSpace:{default:`hsl`},channel:{},format:{default:`hex`},placeholder:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disableWheelChange:{type:Boolean,default:!1},step:{default:void 0},asChild:{type:Boolean},as:{default:`div`},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`],setup(v,{emit:E}){let D=v,O=E,[k,A]=u(),j=m(`root`);function M(e){return D.channel?o(e,D.colorSpace):o(e,`rgb`)}let N=l(()=>D.modelValue,e=>{O(`update:modelValue`,typeof e==`string`?e:t(e,D.format))},D.defaultValue),P=S(M(N.value)),F=S(``),I=S(!1),L=h(()=>s(k.value));function R(){if(P.value=M(N.value),!I.value){if(D.channel){F.value=e(D.channel,r(P.value,D.channel,D.colorSpace));return}F.value=t(P.value,D.format)}}function z(e){let n=t(e,D.format);P.value=M(e),N.value=n,O(`update:color`,M(e))}function B(){return D.step==null?D.channel?n(D.channel).step:1:D.step}function V(e){I.value=!0,F.value=e}function H(e){let t=o(P.value,`rgb`),n=Math.round(t.r)<<16|Math.round(t.g)<<8|Math.round(t.b);z(`#${Math.min(16777215,Math.max(0,n+Math.trunc(e))).toString(16).padStart(6,`0`)}`)}function U(){if(I.value=!1,D.channel){let t=Number.parseFloat(F.value);Number.isNaN(t)||z(a(P.value,D.channel,t,D.colorSpace)),F.value=e(D.channel,r(P.value,D.channel,D.colorSpace));return}let n=F.value.trim();i(n)&&z(n),F.value=t(P.value,D.format)}function W(n){if(!(D.disabled||D.readonly)){if(D.channel){let t=r(P.value,D.channel,D.colorSpace);z(a(P.value,D.channel,t+n,D.colorSpace)),F.value=e(D.channel,r(P.value,D.channel,D.colorSpace));return}H(n),F.value=t(P.value,D.format)}}function G(){W(B())}function K(){W(-B())}function q(){W(B()*10)}function J(){W(-B()*10)}function Y(){if(!D.channel){H(16777215),F.value=t(P.value,D.format);return}z(a(P.value,D.channel,n(D.channel).max,D.colorSpace)),F.value=e(D.channel,r(P.value,D.channel,D.colorSpace))}function X(){if(!D.channel){H(-16777215),F.value=t(P.value,D.format);return}z(a(P.value,D.channel,n(D.channel).min,D.colorSpace)),F.value=e(D.channel,r(P.value,D.channel,D.colorSpace))}function Z(e){if(!(D.disableWheelChange||D.disabled||D.readonly)){if(e.preventDefault(),e.deltaY>0){K();return}G()}}return w(()=>[D.modelValue,D.channel,D.colorSpace,D.format],R,{immediate:!0}),p({color:P,inputValue:F,updateValue:V,commit:U,increment:G,decrement:K,incrementPage:q,decrementPage:J,incrementToMax:Y,decrementToMin:X,handleWheel:Z,...c(D,[`channel`,`colorSpace`,`format`,`disabled`,`readonly`,`disableWheelChange`,`placeholder`])}),(e,n)=>(b(),g(C(d),{ref:C(A),as:v.as,"as-child":v.asChild,class:y(C(j)),role:`group`,"data-disabled":v.disabled?``:void 0,"data-readonly":v.readonly?``:void 0},{default:T(()=>[x(e.$slots,`default`),L.value&&v.name?(b(),g(C(f),{key:0,type:`text`,value:C(t)(P.value,v.format),name:v.name,disabled:v.disabled,readonly:v.readonly,required:v.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):_(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`class`,`data-disabled`,`data-readonly`]))}});export{E as default};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { ColorFormat, ColorSpace, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
3
|
+
import { ColorFieldRootProps } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/color-field/color-field-root.vue.d.ts
|
|
7
|
+
declare var __VLS_8: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_8) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorFieldRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
"update:color": (value: NormalizedColor) => any;
|
|
14
|
+
}, string, _$vue.PublicProps, Readonly<ColorFieldRootProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
+
"onUpdate:color"?: ((value: NormalizedColor) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
format: ColorFormat;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
modelValue: string | ColorValue;
|
|
21
|
+
defaultValue: string | ColorValue;
|
|
22
|
+
as: AsTag | _$vue.Component;
|
|
23
|
+
step: number;
|
|
24
|
+
readonly: boolean;
|
|
25
|
+
disableWheelChange: boolean;
|
|
26
|
+
colorSpace: ColorSpace;
|
|
27
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { _default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ClassValue, UiClass } from "../../types/common.js";
|
|
2
|
+
import { ColorFieldUiSlot } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/color-field/context.d.ts
|
|
6
|
+
declare const provideColorFieldUi: (ui: _$vue.ComputedRef<Partial<UiClass<ColorFieldUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<ColorFieldUiSlot>>>, useColorFieldUi: <S extends ColorFieldUiSlot | undefined = undefined>(slot?: S | undefined) => S extends ColorFieldUiSlot ? _$vue.ComputedRef<ClassValue> : _$vue.ComputedRef<Partial<UiClass<ColorFieldUiSlot>>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { provideColorFieldUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";import"../../composables/index.js";const[n,r]=e(`ColorFieldRoot`),[i,a]=t(`ColorFieldUi`);export{n as provideColorFieldRootContext,i as provideColorFieldUi,r as useColorFieldRootContext,a as useColorFieldUi};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ColorFieldInputProps, ColorFieldRootEmits, ColorFieldRootProps, ColorFieldUi, ColorFieldUiSlot } from "./types.js";
|
|
2
|
+
import { _default as _default$1 } from "./color-field-root.vue.js";
|
|
3
|
+
import { _default } from "./color-field-input.vue.js";
|
|
4
|
+
import { provideColorFieldUi } from "./context.js";
|
|
5
|
+
export { _default as ColorFieldInput, type ColorFieldInputProps, _default$1 as ColorFieldRoot, type ColorFieldRootEmits, type ColorFieldRootProps, type ColorFieldUi, type ColorFieldUiSlot, provideColorFieldUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{provideColorFieldUi as e}from"./context.js";import t from"./color-field-root.js";import n from"./color-field-input.js";export{n as ColorFieldInput,t as ColorFieldRoot,e as provideColorFieldUi};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { FormFieldCommonProps } from "../../types/component.js";
|
|
3
|
+
import { PrimitiveProps } from "../primitive/types.js";
|
|
4
|
+
import { ColorChannel, ColorFormat, ColorSpace, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
5
|
+
import { HTMLAttributes, InputHTMLAttributes, ShallowRef } from "vue";
|
|
6
|
+
|
|
7
|
+
//#region src/components/color-field/types.d.ts
|
|
8
|
+
interface ColorFieldRootProps extends PrimitiveProps, FormFieldCommonProps, /** @vue-ignore */HTMLAttributes {
|
|
9
|
+
modelValue?: string | ColorValue;
|
|
10
|
+
defaultValue?: string | ColorValue;
|
|
11
|
+
colorSpace?: ColorSpace;
|
|
12
|
+
channel?: ColorChannel;
|
|
13
|
+
format?: ColorFormat;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
disableWheelChange?: boolean;
|
|
18
|
+
step?: number;
|
|
19
|
+
}
|
|
20
|
+
type ColorFieldRootEmits = {
|
|
21
|
+
'update:modelValue': [value: string];
|
|
22
|
+
'update:color': [value: NormalizedColor];
|
|
23
|
+
};
|
|
24
|
+
interface ColorFieldInputProps extends /** @vue-ignore */InputHTMLAttributes {}
|
|
25
|
+
type ColorFieldUiSlot = 'root' | 'input';
|
|
26
|
+
type ColorFieldUi = UiClass<ColorFieldUiSlot>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ColorFieldInputProps, ColorFieldRootEmits, ColorFieldRootProps, ColorFieldUi, ColorFieldUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatColor as e,toColorObject as t}from"../../shared/color.js";import{isFormControl as n}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as r}from"../../composables/use-controllable-state.js";import{useForwardElement as i}from"../../composables/use-forward-element.js";import"../../composables/index.js";import{Primitive as a}from"../primitive/primitive.js";import"../primitive/index.js";import o from"../visually-hidden/visually-hidden-input.js";import"../visually-hidden/index.js";import{computed as s,createBlock as c,createCommentVNode as l,defineComponent as u,openBlock as d,renderSlot as f,shallowRef as p,unref as m,watch as h,withCtx as g}from"vue";const _=u({name:`ColorPickerRoot`,__name:`color-picker-root`,props:{modelValue:{default:void 0},defaultValue:{default:`#000000`},format:{default:`hex`},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:`div`},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`],setup(u,{emit:_}){let v=u,y=_,[b,x]=i(),S=r(()=>v.modelValue,t=>{y(`update:modelValue`,typeof t==`string`?t:e(t,v.format))},v.defaultValue),C=p(),w=p(v.modelValue??v.defaultValue),T=s(()=>w.value),E=s(()=>e(w.value,v.format)),D=s(()=>n(b.value));h(()=>v.modelValue,e=>{e!=null&&(typeof e==`string`&&e===C.value||(w.value=e))},{immediate:!0});function O(n){let r=e(n,v.format);w.value=n,C.value=r,S.value=r,y(`update:color`,t(n,`rgb`)),y(`change`,r)}return(e,t)=>(d(),c(m(a),{ref:m(x),as:u.as,"as-child":u.asChild,role:`group`,"data-disabled":u.disabled?``:void 0},{default:g(()=>[f(e.$slots,`default`,{color:T.value,formattedValue:E.value,setColor:O}),D.value&&u.name?(d(),c(m(o),{key:0,type:`text`,value:E.value,name:u.name,disabled:u.disabled,required:u.required},null,8,[`value`,`name`,`disabled`,`required`])):l(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`data-disabled`]))}});export{_ as default};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AsTag } from "../primitive/types.js";
|
|
2
|
+
import { ColorFormat, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
3
|
+
import { ColorPickerRootProps } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
import * as _$_soybeanjs_colord0 from "@soybeanjs/colord";
|
|
6
|
+
|
|
7
|
+
//#region src/components/color-picker/color-picker-root.vue.d.ts
|
|
8
|
+
declare function setColor(nextColor: ColorValue): void;
|
|
9
|
+
declare var __VLS_8: {
|
|
10
|
+
color: _$_soybeanjs_colord0.AnyColor;
|
|
11
|
+
formattedValue: string;
|
|
12
|
+
setColor: typeof setColor;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_8) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorPickerRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
|
+
change: (value: string) => any;
|
|
20
|
+
"update:color": (value: NormalizedColor) => any;
|
|
21
|
+
}, string, _$vue.PublicProps, Readonly<ColorPickerRootProps> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
|
+
onChange?: ((value: string) => any) | undefined;
|
|
24
|
+
"onUpdate:color"?: ((value: NormalizedColor) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
format: ColorFormat;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
modelValue: string | ColorValue;
|
|
29
|
+
defaultValue: string | ColorValue;
|
|
30
|
+
as: AsTag | _$vue.Component;
|
|
31
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { _default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ColorPickerRootEmits, ColorPickerRootProps, ColorPickerRootSlotProps } from "./types.js";
|
|
2
|
+
import { _default } from "./color-picker-root.vue.js";
|
|
3
|
+
export { _default as ColorPickerRoot, type ColorPickerRootEmits, type ColorPickerRootProps, type ColorPickerRootSlotProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./color-picker-root.js";export{e as ColorPickerRoot};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FormFieldCommonProps } from "../../types/component.js";
|
|
2
|
+
import { PrimitiveProps } from "../primitive/types.js";
|
|
3
|
+
import { ColorFormat, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
4
|
+
import { ComputedRef, HTMLAttributes } from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/color-picker/types.d.ts
|
|
7
|
+
interface ColorPickerRootProps extends PrimitiveProps, FormFieldCommonProps, /** @vue-ignore */HTMLAttributes {
|
|
8
|
+
modelValue?: string | ColorValue;
|
|
9
|
+
defaultValue?: string | ColorValue;
|
|
10
|
+
format?: ColorFormat;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
type ColorPickerRootEmits = {
|
|
14
|
+
'update:modelValue': [value: string];
|
|
15
|
+
'update:color': [value: NormalizedColor];
|
|
16
|
+
change: [value: string];
|
|
17
|
+
};
|
|
18
|
+
interface ColorPickerRootSlotProps {
|
|
19
|
+
color: ComputedRef<ColorValue>;
|
|
20
|
+
formattedValue: ComputedRef<string>;
|
|
21
|
+
setColor: (color: ColorValue) => void;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ColorPickerRootEmits, ColorPickerRootProps, ColorPickerRootSlotProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{areColorsEqual as e,formatColor as t,getChannelObjectSpace as n,getChannelRange as r,getChannelValue as i,hasVisibleChromaticity as a,setChannelValue as o,toColorObject as s}from"../../shared/color.js";import{snapValueToStep as c}from"../../shared/value.js";import{transformPropsToContext as l}from"../../shared/vue.js";import"../../shared/index.js";import{useControllableState as u}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import{useDirection as d}from"../config-provider/context.js";import f from"../visually-hidden/visually-hidden-input.js";import"../visually-hidden/index.js";import p from"../slider/slider-root.js";import"../slider/index.js";import{provideColorSliderRootContext as m,useColorSliderUi as h}from"./context.js";import{computed as g,createBlock as _,createCommentVNode as v,defineComponent as y,normalizeClass as b,openBlock as x,renderSlot as S,shallowRef as C,unref as w,watch as T,withCtx as E}from"vue";const D=y({name:`ColorSliderRoot`,__name:`color-slider-root`,props:{modelValue:{default:void 0},defaultValue:{default:`#000000`},colorSpace:{default:`hsl`},channel:{},format:{default:`hex`},orientation:{default:`horizontal`},dir:{},inverted:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},step:{default:void 0},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`,`changeEnd`],setup(y,{emit:D}){let O=y,k=D,A=h(`root`),j=u(()=>O.modelValue,e=>{k(`update:modelValue`,typeof e==`string`?e:t(e,O.format))},O.defaultValue),M=d(()=>O.dir),N=g(()=>n(O.channel,O.colorSpace)),P=C(),F=C(O.modelValue??O.defaultValue),I=C(H(F.value)),L=g(()=>r(O.channel)),R=g(()=>O.step??L.value.step),z=g(()=>i(I.value,O.channel,O.colorSpace)),B=g({get:()=>I.value,set:e=>{let n=s(e,N.value),r=t(e,O.format);I.value=n,F.value=e,P.value=r,j.value=r,k(`update:color`,n)}}),V=g({get:()=>[c(z.value,L.value.min,L.value.max,R.value)],set:e=>{let n=o(B.value,O.channel,e[0]??L.value.min,O.colorSpace),r=t(n,O.format);B.value=n,k(`change`,r)}});function H(e){return s(e,N.value)}function U(){let t=H(F.value);if(!e(t,I.value)){if(O.channel===`hue`&&!a(t,O.colorSpace)){I.value=o(t,O.channel,z.value,O.colorSpace);return}I.value=t}}function W(){k(`changeEnd`,t(B.value,O.format))}return T(()=>O.modelValue,e=>{e!=null&&(typeof e==`string`&&e===P.value||(F.value=e,U()))},{immediate:!0}),T(()=>[O.channel,O.colorSpace,O.format],U,{immediate:!0}),m({color:B,channelValue:z,range:L,...l(O,[`channel`,`colorSpace`,`format`,`orientation`,`disabled`,`inverted`])}),(e,n)=>(x(),_(w(p),{modelValue:V.value,"onUpdate:modelValue":n[0]||(n[0]=e=>V.value=e),as:y.as,"as-child":y.asChild,class:b(w(A)),orientation:y.orientation,dir:w(M),disabled:y.disabled,inverted:y.inverted,min:L.value.min,max:L.value.max,step:R.value,onValueCommit:W},{default:E(()=>[S(e.$slots,`default`),y.name?(x(),_(w(f),{key:0,type:`text`,value:w(t)(B.value,y.format),name:y.name,disabled:y.disabled,required:y.required},null,8,[`value`,`name`,`disabled`,`required`])):v(`v-if`,!0)]),_:3},8,[`modelValue`,`as`,`as-child`,`class`,`orientation`,`dir`,`disabled`,`inverted`,`min`,`max`,`step`]))}});export{D as default};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DataOrientation } from "../../types/common.js";
|
|
2
|
+
import { ColorFormat, ColorSpace, ColorValue, NormalizedColor } from "../../shared/color.js";
|
|
3
|
+
import { ColorSliderRootProps } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/color-slider/color-slider-root.vue.d.ts
|
|
7
|
+
declare var __VLS_10: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_10) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorSliderRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
change: (value: string) => any;
|
|
14
|
+
"update:color": (value: NormalizedColor) => any;
|
|
15
|
+
changeEnd: (value: string) => any;
|
|
16
|
+
}, string, _$vue.PublicProps, Readonly<ColorSliderRootProps> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
+
onChange?: ((value: string) => any) | undefined;
|
|
19
|
+
"onUpdate:color"?: ((value: NormalizedColor) => any) | undefined;
|
|
20
|
+
onChangeEnd?: ((value: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
format: ColorFormat;
|
|
23
|
+
orientation: DataOrientation;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
modelValue: string | ColorValue;
|
|
26
|
+
defaultValue: string | ColorValue;
|
|
27
|
+
step: number;
|
|
28
|
+
inverted: boolean;
|
|
29
|
+
colorSpace: ColorSpace;
|
|
30
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatChannelValue as e,getChannelName as t}from"../../shared/color.js";import"../../shared/index.js";import n from"../slider/slider-thumb.js";import"../slider/index.js";import{useColorSliderRootContext as r,useColorSliderUi as i}from"./context.js";import{computed as a,createBlock as o,defineComponent as s,normalizeClass as c,openBlock as l,renderSlot as u,unref as d,withCtx as f}from"vue";const p=s({name:`ColorSliderThumb`,__name:`color-slider-thumb`,props:{asChild:{type:Boolean},as:{}},setup(s){let p=i(`thumb`),{channel:m,channelValue:h}=r(`ColorSliderThumb`),g=a(()=>t(m.value)),_=a(()=>e(m.value,h.value));return(e,t)=>(l(),o(d(n),{as:s.as,"as-child":s.asChild,class:c(d(p)),index:0,"aria-label":g.value,"aria-valuetext":_.value},{default:f(()=>[u(e.$slots,`default`,{channelName:g.value,channelValue:d(h)})]),_:3},8,[`as`,`as-child`,`class`,`aria-label`,`aria-valuetext`]))}});export{p as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ColorSliderThumbProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/color-slider/color-slider-thumb.vue.d.ts
|
|
5
|
+
declare var __VLS_8: {
|
|
6
|
+
channelName: string;
|
|
7
|
+
channelValue: number;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_8) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: _$vue.DefineComponent<ColorSliderThumbProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ColorSliderThumbProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSliderBackgroundStyle as e}from"../../shared/color.js";import"../../shared/index.js";import t from"../slider/slider-track.js";import"../slider/index.js";import{useColorSliderRootContext as n,useColorSliderUi as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,normalizeClass as s,normalizeStyle as c,openBlock as l,renderSlot as u,unref as d,withCtx as f}from"vue";const p=o({name:`ColorSliderTrack`,__name:`color-slider-track`,props:{asChild:{type:Boolean},as:{}},setup(o){let p=r(`track`),{color:m,channel:h,colorSpace:g}=n(`ColorSliderTrack`),_=i(()=>e(m.value,h.value,g.value));return(e,n)=>(l(),a(d(t),{as:o.as,"as-child":o.asChild,class:s(d(p)),style:c(_.value)},{default:f(()=>[u(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`,`style`]))}});export{p as default};
|