straw-ui-vue 0.1.6 → 0.1.8
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/dist/components/st-button/st-button.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-button/st-button.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/components/st-button/types.d.ts +6 -6
- package/dist/components/st-cascade/index.d.ts +38 -38
- package/dist/components/st-cascade/st-cascade-panel.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-cascade/st-cascade-panel.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/st-cascade/st-cascade.vue.d.ts +13 -13
- package/dist/components/st-cascade/st-cascade.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-cascade/st-cascade.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/components/st-cascade/types.d.ts +12 -12
- package/dist/components/st-checkbox/index.d.ts +65 -11
- package/dist/components/{st-checkbox-group → st-checkbox}/st-checkbox-group.vue.d.ts +4 -9
- package/dist/components/{st-checkbox-group → st-checkbox}/st-checkbox-group.vue.js +1 -1
- package/dist/components/st-checkbox/st-checkbox-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-checkbox/st-checkbox-group.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/components/st-checkbox/st-checkbox.vue.d.ts +5 -5
- package/dist/components/st-checkbox/st-checkbox.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-checkbox/st-checkbox.vue_vue_type_script_setup_true_lang.js +73 -58
- package/dist/components/st-checkbox/types.d.ts +78 -13
- package/dist/components/st-checkbox.cjs +1 -1
- package/dist/components/st-checkbox.js +3 -2
- package/dist/components/st-color-picker/index.d.ts +13 -13
- package/dist/components/st-color-picker/st-color-picker-panel.vue.cjs +1 -1
- package/dist/components/st-color-picker/st-color-picker-panel.vue.d.ts +5 -5
- package/dist/components/st-color-picker/st-color-picker-panel.vue.js +1 -1
- package/dist/components/st-color-picker/st-color-picker-panel.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-color-picker/st-color-picker-panel.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/components/st-color-picker/st-color-picker.vue.cjs +1 -1
- package/dist/components/st-color-picker/st-color-picker.vue.d.ts +9 -9
- package/dist/components/st-color-picker/st-color-picker.vue.js +1 -1
- package/dist/components/st-color-picker/st-color-picker.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-color-picker/st-color-picker.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/st-color-picker/types.d.ts +8 -8
- package/dist/components/st-date-picker/index.d.ts +24 -24
- package/dist/components/st-date-picker/st-date-picker-panel.vue.cjs +1 -1
- package/dist/components/st-date-picker/st-date-picker-panel.vue.d.ts +4 -4
- package/dist/components/st-date-picker/st-date-picker-panel.vue.js +1 -1
- package/dist/components/st-date-picker/st-date-picker-panel.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-date-picker/st-date-picker-panel.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/st-date-picker/st-date-picker.vue.cjs +1 -1
- package/dist/components/st-date-picker/st-date-picker.vue.d.ts +9 -9
- package/dist/components/st-date-picker/st-date-picker.vue.js +1 -1
- package/dist/components/st-date-picker/st-date-picker.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-date-picker/st-date-picker.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/components/st-date-picker/types.d.ts +6 -6
- package/dist/components/st-datetime-picker/index.d.ts +23 -23
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.vue.cjs +1 -1
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.vue.d.ts +4 -4
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.vue.js +1 -1
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-datetime-picker/st-datetime-picker-panel.vue_vue_type_script_setup_true_lang.js +24 -24
- package/dist/components/st-datetime-picker/st-datetime-picker.vue.cjs +1 -1
- package/dist/components/st-datetime-picker/st-datetime-picker.vue.d.ts +9 -9
- package/dist/components/st-datetime-picker/st-datetime-picker.vue.js +1 -1
- package/dist/components/st-datetime-picker/st-datetime-picker.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-datetime-picker/st-datetime-picker.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/st-datetime-picker/types.d.ts +6 -6
- package/dist/components/st-dialog/index.d.ts +45 -45
- package/dist/components/st-dialog/st-dialog-body.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog-close.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog-close.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-dialog/st-dialog-close.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/st-dialog/st-dialog-container.vue.d.ts +2 -2
- package/dist/components/st-dialog/st-dialog-container.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-dialog/st-dialog-container.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/st-dialog/st-dialog-footer.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog-fullscreen.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog-fullscreen.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-dialog/st-dialog-fullscreen.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/st-dialog/st-dialog-header.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog-overlay.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog-title.vue.d.ts +1 -1
- package/dist/components/st-dialog/st-dialog.vue.d.ts +8 -8
- package/dist/components/st-dialog/types.d.ts +15 -17
- package/dist/components/st-divider/index.d.ts +1 -3
- package/dist/components/st-divider/st-divider.vue.d.ts +4 -7
- package/dist/components/st-divider/st-divider.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-divider/st-divider.vue_vue_type_script_setup_true_lang.js +59 -56
- package/dist/components/st-divider/types.d.ts +8 -4
- package/dist/components/st-drawer/index.d.ts +29 -29
- package/dist/components/st-drawer/st-drawer.vue.d.ts +11 -11
- package/dist/components/st-drawer/st-drawer.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-drawer/st-drawer.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/st-drawer/types.d.ts +14 -14
- package/dist/components/st-empty/index.d.ts +1 -7
- package/dist/components/st-empty/st-empty.vue.d.ts +2 -9
- package/dist/components/st-empty/st-empty.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-empty/st-empty.vue_vue_type_script_setup_true_lang.js +30 -20
- package/dist/components/st-empty/types.d.ts +9 -3
- package/dist/components/st-form-control/st-form-control.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-form-control/st-form-control.vue_vue_type_script_setup_true_lang.js +1 -7
- package/dist/components/st-form-control/types.d.ts +1 -1
- package/dist/components/st-form-description/st-form-description.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-form-description/st-form-description.vue_vue_type_script_setup_true_lang.js +2 -14
- package/dist/components/st-form-description/types.d.ts +1 -3
- package/dist/components/st-form-field/index.d.ts +6 -6
- package/dist/components/st-form-field/st-form-field.vue.d.ts +1 -2
- package/dist/components/st-form-field/st-form-field.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-form-field/st-form-field.vue_vue_type_script_setup_true_lang.js +2 -20
- package/dist/components/st-form-field/types.d.ts +1 -3
- package/dist/components/st-form-item/types.d.ts +2 -2
- package/dist/components/st-form-label/st-form-label.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-form-label/st-form-label.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/st-form-message/st-form-message.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-form-message/st-form-message.vue_vue_type_script_setup_true_lang.js +3 -15
- package/dist/components/st-form-message/types.d.ts +1 -3
- package/dist/components/st-image/index.d.ts +15 -15
- package/dist/components/st-image/st-image-preview.vue.cjs +1 -1
- package/dist/components/st-image/st-image-preview.vue.js +1 -1
- package/dist/components/st-image/st-image-preview.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-image/st-image-preview.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/st-image/st-image.vue.d.ts +5 -5
- package/dist/components/st-image/st-image.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-image/st-image.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/st-image/types.d.ts +4 -4
- package/dist/components/st-input/index.d.ts +564 -65
- package/dist/components/{st-input-group-addon → st-input}/st-input-group-addon.vue.d.ts +7 -6
- package/dist/components/{st-input-group-addon → st-input}/st-input-group-addon.vue.js +1 -1
- package/dist/components/st-input/st-input-group-addon.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-group-addon.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/st-input/st-input-group-button.vue.d.ts +15 -0
- package/dist/components/{st-input-group-button → st-input}/st-input-group-button.vue.js +1 -1
- package/dist/components/st-input/st-input-group-button.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-group-button.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/{st-input-group-input → st-input}/st-input-group-input.vue.cjs +1 -1
- package/dist/components/{st-input-group-input → st-input}/st-input-group-input.vue.d.ts +3 -3
- package/dist/components/{st-input-group-input → st-input}/st-input-group-input.vue.js +2 -2
- package/dist/components/st-input/st-input-group-input.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-group-input.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/st-input/st-input-group-text.vue.d.ts +17 -0
- package/dist/components/{st-input-group-text → st-input}/st-input-group-text.vue.js +1 -1
- package/dist/components/st-input/st-input-group-text.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-group-text.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/{st-input-group-textarea → st-input}/st-input-group-textarea.vue.d.ts +4 -9
- package/dist/components/{st-input-group-textarea → st-input}/st-input-group-textarea.vue.js +1 -1
- package/dist/components/st-input/st-input-group-textarea.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-group-textarea.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/components/{st-input-group → st-input}/st-input-group.vue.d.ts +2 -5
- package/dist/components/{st-input-group → st-input}/st-input-group.vue.js +1 -1
- package/dist/components/st-input/st-input-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-group.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/components/st-input/st-input-number.vue.cjs +1 -0
- package/dist/components/{st-input-number → st-input}/st-input-number.vue.d.ts +2 -5
- package/dist/components/st-input/st-input-number.vue.js +7 -0
- package/dist/components/st-input/st-input-number.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-input-number.vue_vue_type_script_setup_true_lang.js +156 -0
- package/dist/components/st-input/st-input.vue.d.ts +37 -30
- package/dist/components/st-input/st-input.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-input/st-input.vue_vue_type_script_setup_true_lang.js +129 -165
- package/dist/components/st-input/st-textarea.vue.cjs +1 -0
- package/dist/components/st-input/st-textarea.vue.d.ts +132 -0
- package/dist/components/st-input/st-textarea.vue.js +5 -0
- package/dist/components/st-input/st-textarea.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-input/st-textarea.vue_vue_type_script_setup_true_lang.js +177 -0
- package/dist/components/st-input/types.d.ts +305 -55
- package/dist/components/st-input.cjs +1 -1
- package/dist/components/st-input.js +11 -3
- package/dist/components/st-label/st-label.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-label/st-label.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/st-menu/st-menu-item.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-menu/st-menu-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/st-menu/st-menu-node.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-menu/st-menu-node.vue_vue_type_script_setup_true_lang.js +29 -29
- package/dist/components/st-menu/st-menu.vue.d.ts +2 -2
- package/dist/components/st-menu/st-menu.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-menu/st-menu.vue_vue_type_script_setup_true_lang.js +32 -32
- package/dist/components/st-menu/types.d.ts +23 -23
- package/dist/components/st-pagination/st-pagination.vue.d.ts +2 -2
- package/dist/components/st-pagination/st-pagination.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-pagination/st-pagination.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/st-pagination/types.d.ts +6 -6
- package/dist/components/st-popover/index.d.ts +18 -18
- package/dist/components/st-popover/st-popover-content.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-popover/st-popover-content.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/st-popover/st-popover.vue.d.ts +6 -6
- package/dist/components/st-popover/st-popover.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-popover/st-popover.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/st-popover/types.d.ts +6 -6
- package/dist/components/st-progress/st-progress.vue.d.ts +2 -2
- package/dist/components/st-progress/st-progress.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-progress/st-progress.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/st-radio/index.d.ts +74 -20
- package/dist/components/{st-radio-group → st-radio}/st-radio-group.vue.d.ts +6 -16
- package/dist/components/{st-radio-group → st-radio}/st-radio-group.vue.js +1 -1
- package/dist/components/st-radio/st-radio-group.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/st-radio/st-radio-group.vue_vue_type_script_setup_true_lang.js +101 -0
- package/dist/components/st-radio/st-radio.vue.d.ts +8 -14
- package/dist/components/st-radio/st-radio.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-radio/st-radio.vue_vue_type_script_setup_true_lang.js +100 -57
- package/dist/components/st-radio/types.d.ts +101 -30
- package/dist/components/st-radio.cjs +1 -1
- package/dist/components/st-radio.js +3 -2
- package/dist/components/st-scrollbar/st-scrollbar.vue.cjs +1 -1
- package/dist/components/st-scrollbar/st-scrollbar.vue.js +1 -1
- package/dist/components/st-scrollbar/st-scrollbar.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-scrollbar/st-scrollbar.vue_vue_type_script_setup_true_lang.js +2 -14
- package/dist/components/st-scrollbar/types.d.ts +1 -3
- package/dist/components/st-segmented/index.d.ts +2 -5
- package/dist/components/st-segmented/st-segmented.vue.d.ts +2 -5
- package/dist/components/st-segmented/st-segmented.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-segmented/st-segmented.vue_vue_type_script_setup_true_lang.js +53 -54
- package/dist/components/st-segmented/types.d.ts +14 -42
- package/dist/components/st-select/index.d.ts +76 -100
- package/dist/components/st-select/st-select-container.vue.d.ts +2 -2
- package/dist/components/st-select/st-select-trigger.vue.d.ts +6 -14
- package/dist/components/st-select/st-select-trigger.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-select/st-select-trigger.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/st-select/st-select.vue.d.ts +19 -19
- package/dist/components/st-select/st-select.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-select/st-select.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/st-select/types.d.ts +14 -14
- package/dist/components/st-sidebar/types.d.ts +9 -9
- package/dist/components/st-sidebar-item/types.d.ts +6 -6
- package/dist/components/st-skeleton/st-skeleton.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-skeleton/st-skeleton.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/st-skeleton/types.d.ts +2 -2
- package/dist/components/st-slider/index.d.ts +14 -14
- package/dist/components/st-slider/st-slider.vue.d.ts +5 -5
- package/dist/components/st-slider/st-slider.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-slider/st-slider.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/st-slider/types.d.ts +2 -2
- package/dist/components/st-splitter/types.d.ts +10 -10
- package/dist/components/st-splitter-panel/st-splitter-panel.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-splitter-panel/st-splitter-panel.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/st-splitter-panel/types.d.ts +2 -2
- package/dist/components/st-switch/index.d.ts +17 -39
- package/dist/components/st-switch/st-switch.vue.d.ts +8 -19
- package/dist/components/st-switch/st-switch.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-switch/st-switch.vue_vue_type_script_setup_true_lang.js +67 -42
- package/dist/components/st-switch/types.d.ts +21 -17
- package/dist/components/st-tabs/index.d.ts +30 -30
- package/dist/components/st-tabs/st-tabs-pane.vue.d.ts +2 -2
- package/dist/components/st-tabs/st-tabs.vue.d.ts +9 -9
- package/dist/components/st-tabs/st-tabs.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-tabs/st-tabs.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/st-tabs/types.d.ts +10 -10
- package/dist/components/st-tag/index.d.ts +6 -6
- package/dist/components/st-tag/st-tag.vue.d.ts +2 -2
- package/dist/components/st-tag/types.d.ts +2 -2
- package/dist/components/st-time-picker/index.d.ts +13 -13
- package/dist/components/st-time-picker/st-time-picker-panel.vue.d.ts +3 -3
- package/dist/components/st-time-picker/st-time-picker.vue.cjs +1 -1
- package/dist/components/st-time-picker/st-time-picker.vue.d.ts +9 -9
- package/dist/components/st-time-picker/st-time-picker.vue.js +1 -1
- package/dist/components/st-time-picker/st-time-picker.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-time-picker/st-time-picker.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/components/st-time-picker/types.d.ts +6 -6
- package/dist/components/st-toggle/index.d.ts +24 -24
- package/dist/components/st-toggle/st-toggle.vue.d.ts +8 -8
- package/dist/components/st-toggle/st-toggle.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-toggle/st-toggle.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/st-toggle/types.d.ts +8 -8
- package/dist/components/st-tooltip/index.d.ts +6 -6
- package/dist/components/st-tooltip/st-tooltip-trigger.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-tooltip/st-tooltip-trigger.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/st-tooltip/st-tooltip.vue.d.ts +2 -2
- package/dist/components/st-tooltip/st-tooltip.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-tooltip/st-tooltip.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/st-tree/index.d.ts +18 -18
- package/dist/components/st-tree/st-tree-node.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-tree/st-tree-node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/st-tree/st-tree.vue.d.ts +9 -9
- package/dist/components/st-tree/st-tree.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/st-tree/st-tree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/st-tree/types.d.ts +16 -16
- package/dist/components/types.d.ts +1 -1
- package/dist/components.d.ts +89 -97
- package/dist/generated-safelist.cjs +1 -1
- package/dist/generated-safelist.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +11 -26
- package/dist/index.js +68 -76
- package/dist/unocss-preset.d.ts +5 -1
- package/dist/unocssPreset.cjs +1 -1
- package/dist/unocssPreset.js +149 -29
- package/dist/utils/cn.cjs +1 -1
- package/dist/utils/cn.js +27 -4
- package/dist/utils/utils/id.cjs +1 -0
- package/dist/utils/utils/id.d.ts +4 -0
- package/dist/utils/utils/id.js +6 -0
- package/dist/utils/with-install.d.ts +1 -1
- package/dist/variables.css +17 -6
- package/package.json +7 -8
- package/dist/components/st-checkbox-group/index.d.ts +0 -65
- package/dist/components/st-checkbox-group/st-checkbox-group.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-checkbox-group/st-checkbox-group.vue_vue_type_script_setup_true_lang.js +0 -74
- package/dist/components/st-checkbox-group/types.d.ts +0 -77
- package/dist/components/st-checkbox-group.cjs +0 -1
- package/dist/components/st-checkbox-group.js +0 -6
- package/dist/components/st-input-group/index.d.ts +0 -25
- package/dist/components/st-input-group/st-input-group.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-group/st-input-group.vue_vue_type_script_setup_true_lang.js +0 -36
- package/dist/components/st-input-group/types.d.ts +0 -23
- package/dist/components/st-input-group-addon/index.d.ts +0 -25
- package/dist/components/st-input-group-addon/st-input-group-addon.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-group-addon/st-input-group-addon.vue_vue_type_script_setup_true_lang.js +0 -39
- package/dist/components/st-input-group-addon/types.d.ts +0 -28
- package/dist/components/st-input-group-addon.cjs +0 -1
- package/dist/components/st-input-group-addon.js +0 -6
- package/dist/components/st-input-group-button/index.d.ts +0 -41
- package/dist/components/st-input-group-button/st-input-group-button.vue.d.ts +0 -22
- package/dist/components/st-input-group-button/st-input-group-button.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-group-button/st-input-group-button.vue_vue_type_script_setup_true_lang.js +0 -61
- package/dist/components/st-input-group-button/types.d.ts +0 -40
- package/dist/components/st-input-group-button.cjs +0 -1
- package/dist/components/st-input-group-button.js +0 -6
- package/dist/components/st-input-group-input/index.d.ts +0 -24
- package/dist/components/st-input-group-input/st-input-group-input.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-group-input/st-input-group-input.vue_vue_type_script_setup_true_lang.js +0 -85
- package/dist/components/st-input-group-input/types.d.ts +0 -64
- package/dist/components/st-input-group-input.cjs +0 -1
- package/dist/components/st-input-group-input.js +0 -6
- package/dist/components/st-input-group-text/index.d.ts +0 -19
- package/dist/components/st-input-group-text/st-input-group-text.vue.d.ts +0 -14
- package/dist/components/st-input-group-text/st-input-group-text.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-group-text/st-input-group-text.vue_vue_type_script_setup_true_lang.js +0 -32
- package/dist/components/st-input-group-text/types.d.ts +0 -21
- package/dist/components/st-input-group-text.cjs +0 -1
- package/dist/components/st-input-group-text.js +0 -6
- package/dist/components/st-input-group-textarea/index.d.ts +0 -29
- package/dist/components/st-input-group-textarea/st-input-group-textarea.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-group-textarea/st-input-group-textarea.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/st-input-group-textarea/types.d.ts +0 -69
- package/dist/components/st-input-group-textarea.cjs +0 -1
- package/dist/components/st-input-group-textarea.js +0 -6
- package/dist/components/st-input-group.cjs +0 -1
- package/dist/components/st-input-group.js +0 -6
- package/dist/components/st-input-number/index.d.ts +0 -30
- package/dist/components/st-input-number/st-input-number.vue.cjs +0 -1
- package/dist/components/st-input-number/st-input-number.vue.js +0 -5
- package/dist/components/st-input-number/st-input-number.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-input-number/st-input-number.vue_vue_type_script_setup_true_lang.js +0 -229
- package/dist/components/st-input-number/types.d.ts +0 -82
- package/dist/components/st-input-number.cjs +0 -1
- package/dist/components/st-input-number.js +0 -6
- package/dist/components/st-radio-group/index.d.ts +0 -68
- package/dist/components/st-radio-group/st-radio-group.vue_vue_type_script_setup_true_lang.cjs +0 -1
- package/dist/components/st-radio-group/st-radio-group.vue_vue_type_script_setup_true_lang.js +0 -75
- package/dist/components/st-radio-group/types.d.ts +0 -77
- package/dist/components/st-radio-group.cjs +0 -1
- package/dist/components/st-radio-group.js +0 -6
- package/dist/utils/index.d.ts +0 -2
- /package/dist/components/{st-checkbox-group → st-checkbox}/st-checkbox-group.vue.cjs +0 -0
- /package/dist/components/{st-input-group-addon → st-input}/st-input-group-addon.vue.cjs +0 -0
- /package/dist/components/{st-input-group-button → st-input}/st-input-group-button.vue.cjs +0 -0
- /package/dist/components/{st-input-group-text → st-input}/st-input-group-text.vue.cjs +0 -0
- /package/dist/components/{st-input-group-textarea → st-input}/st-input-group-textarea.vue.cjs +0 -0
- /package/dist/components/{st-input-group → st-input}/st-input-group.vue.cjs +0 -0
- /package/dist/components/{st-radio-group → st-radio}/st-radio-group.vue.cjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../utils/cn.cjs"),t=require("../../utils/cva/index.cjs");let n=require("vue");var r=[`disabled`],i=(0,n.defineComponent)({name:`StButton`,inheritAttrs:!1,__name:`st-button`,props:{variant:{default:`default`},type:{default:`default`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},prefixIcon:{},suffixIcon:{},prefixIconClass:{},prefixIconStyle:{},suffixIconClass:{},suffixIconStyle:{},loadingIconClass:{},loadingIconStyle:{}},emits:[`click`],setup(i,{emit:a}){let o=(0,n.useAttrs)(),s=(0,n.useSlots)(),c=a,l=i,u={default:`h-default px-xl text-
|
|
1
|
+
const e=require("../../utils/cn.cjs"),t=require("../../utils/cva/index.cjs");let n=require("vue");var r=[`disabled`],i=(0,n.defineComponent)({name:`StButton`,inheritAttrs:!1,__name:`st-button`,props:{variant:{default:`default`},type:{default:`default`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},prefixIcon:{},suffixIcon:{},prefixIconClass:{},prefixIconStyle:{},suffixIconClass:{},suffixIconStyle:{},loadingIconClass:{},loadingIconStyle:{}},emits:[`click`],setup(i,{emit:a}){let o=(0,n.useAttrs)(),s=(0,n.useSlots)(),c=a,l=i,u={default:`h-default px-xl text-sm gap-sm`,icon:`w-default h-default`},d={primary:`bg-primary text-primary-foreground`,default:`bg-secondary text-secondary-foreground`,ghost:`bg-transparent text-foreground`},f={primary:`hover:bg-primary/90`,default:`hover:bg-secondary/80`,ghost:`hover:bg-accent`},p=t.cva({base:`inline-flex items-center justify-center rounded transition-all duration-150 ease-in-out border-none outline-none select-none`,variants:{variant:{primary:d.primary,default:d.default,ghost:d.ghost},type:{default:u.default,icon:u.icon},disabled:{true:`opacity-50 cursor-not-allowed`},loading:{true:`cursor-not-allowed`}},defaultVariants:{variant:`default`,type:`default`}}),m=(0,n.computed)(()=>e.cn(p({variant:l.variant,type:l.type,disabled:l.disabled,loading:l.loading}),g.value?``:f[l.variant],o.class)),h=(0,n.computed)(()=>l.type===`icon`),g=(0,n.computed)(()=>l.disabled||l.loading),_=(0,n.computed)(()=>l.prefixIcon||s.prefixIcon),v=(0,n.computed)(()=>l.suffixIcon||s.suffixIcon);function y(e){g.value||c(`click`,e)}return(t,i)=>((0,n.openBlock)(),(0,n.createElementBlock)(`button`,{class:(0,n.normalizeClass)([m.value,`st-button`]),disabled:g.value,style:(0,n.normalizeStyle)((0,n.unref)(o).style),onClick:y},[l.loading?((0,n.openBlock)(),(0,n.createElementBlock)(`i`,{key:0,class:(0,n.normalizeClass)((0,n.unref)(e.cn)(`i-lucide-loader-2 animate-spin`,l.loadingIconClass)),style:(0,n.normalizeStyle)(l.loadingIconStyle)},null,6)):(0,n.createCommentVNode)(``,!0),h.value?(0,n.renderSlot)(t.$slots,`default`,{key:1}):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[_.value?(0,n.renderSlot)(t.$slots,`prefixIcon`,{key:0},()=>[(0,n.createElementVNode)(`i`,{class:(0,n.normalizeClass)((0,n.unref)(e.cn)(l.prefixIcon,l.prefixIconClass)),style:(0,n.normalizeStyle)(l.prefixIconStyle)},null,6)]):(0,n.createCommentVNode)(``,!0),(0,n.renderSlot)(t.$slots,`default`),v.value?(0,n.renderSlot)(t.$slots,`suffixIcon`,{key:1},()=>[(0,n.createElementVNode)(`i`,{class:(0,n.normalizeClass)((0,n.unref)(e.cn)(l.suffixIcon,l.suffixIconClass)),style:(0,n.normalizeStyle)(l.suffixIconStyle)},null,6)]):(0,n.createCommentVNode)(``,!0)],64))],14,r))}});exports.default=i;
|
|
@@ -29,7 +29,7 @@ var h = ["disabled"], g = /*@__PURE__*/ s({
|
|
|
29
29
|
emits: ["click"],
|
|
30
30
|
setup(s, { emit: g }) {
|
|
31
31
|
let _ = p(), v = m(), y = g, b = s, x = {
|
|
32
|
-
default: "h-default px-xl text-
|
|
32
|
+
default: "h-default px-xl text-sm gap-sm",
|
|
33
33
|
icon: "w-default h-default"
|
|
34
34
|
}, S = {
|
|
35
35
|
primary: "bg-primary text-primary-foreground",
|
|
@@ -63,11 +63,12 @@ var h = ["disabled"], g = /*@__PURE__*/ s({
|
|
|
63
63
|
type: b.type,
|
|
64
64
|
disabled: b.disabled,
|
|
65
65
|
loading: b.loading
|
|
66
|
-
}),
|
|
66
|
+
}), D.value ? "" : C[b.variant], _.class)), E = r(() => b.type === "icon"), D = r(() => b.disabled || b.loading), O = r(() => b.prefixIcon || v.prefixIcon), k = r(() => b.suffixIcon || v.suffixIcon);
|
|
67
|
+
function A(e) {
|
|
67
68
|
D.value || y("click", e);
|
|
68
|
-
}
|
|
69
|
+
}
|
|
69
70
|
return (t, r) => (u(), a("button", {
|
|
70
|
-
class: c(T.value),
|
|
71
|
+
class: c([T.value, "st-button"]),
|
|
71
72
|
disabled: D.value,
|
|
72
73
|
style: l(f(_).style),
|
|
73
74
|
onClick: A
|
|
@@ -25,17 +25,17 @@ export interface ButtonProps {
|
|
|
25
25
|
/** 后缀图标名称 */
|
|
26
26
|
suffixIcon?: string;
|
|
27
27
|
/** 前缀图标类名 */
|
|
28
|
-
prefixIconClass?:
|
|
28
|
+
prefixIconClass?: ClassValue;
|
|
29
29
|
/** 前缀图标样式 */
|
|
30
|
-
prefixIconStyle?:
|
|
30
|
+
prefixIconStyle?: StyleValue;
|
|
31
31
|
/** 后缀图标类名 */
|
|
32
|
-
suffixIconClass?:
|
|
32
|
+
suffixIconClass?: ClassValue;
|
|
33
33
|
/** 后缀图标样式 */
|
|
34
|
-
suffixIconStyle?:
|
|
34
|
+
suffixIconStyle?: StyleValue;
|
|
35
35
|
/** loading图标类名 */
|
|
36
|
-
loadingIconClass?:
|
|
36
|
+
loadingIconClass?: ClassValue;
|
|
37
37
|
/** loading图标样式 */
|
|
38
|
-
loadingIconStyle?:
|
|
38
|
+
loadingIconStyle?: StyleValue;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -4,36 +4,36 @@ export declare const StCascade: import("@/utils/with-install.ts").SFCWithInstall
|
|
|
4
4
|
multipleValue?: (string | number)[][];
|
|
5
5
|
}> & Readonly<{
|
|
6
6
|
onClear?: () => any;
|
|
7
|
-
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
8
7
|
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
8
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
9
9
|
onVisibleChange?: (visible: boolean) => any;
|
|
10
10
|
onRemoveTag?: (value: (string | number)[]) => any;
|
|
11
11
|
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
12
12
|
}>, import("./types.d.ts").StCascadeExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
13
|
clear: () => any;
|
|
14
|
-
"update:modelValue": (...args: unknown[]) => any;
|
|
15
14
|
change: (value: (string | number)[] | (string | number)[][]) => any;
|
|
15
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
16
16
|
visibleChange: (visible: boolean) => any;
|
|
17
17
|
removeTag: (value: (string | number)[]) => any;
|
|
18
18
|
"update:multipleValue": (value: (string | number)[][]) => any;
|
|
19
19
|
}, import("vue").PublicProps, {
|
|
20
20
|
options: import("./types.d.ts").CascadeOption[];
|
|
21
21
|
disabled: boolean;
|
|
22
|
+
placeholder: string;
|
|
22
23
|
labelKey: string;
|
|
23
24
|
valueKey: string;
|
|
24
|
-
separator: string;
|
|
25
|
-
multiple: boolean;
|
|
26
|
-
placeholder: string;
|
|
27
25
|
clearable: boolean;
|
|
28
26
|
childrenKey: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
separator: string;
|
|
28
|
+
multiple: boolean;
|
|
29
|
+
triggerClass: ClassValue;
|
|
30
|
+
triggerStyle: StyleValue;
|
|
31
|
+
popoverClass: ClassValue;
|
|
32
|
+
popoverStyle: StyleValue;
|
|
33
|
+
panelClass: ClassValue;
|
|
34
|
+
panelStyle: StyleValue;
|
|
35
|
+
menuItemClass: ClassValue;
|
|
36
|
+
menuItemStyle: StyleValue;
|
|
37
37
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
38
38
|
P: {};
|
|
39
39
|
B: {};
|
|
@@ -46,29 +46,29 @@ export declare const StCascade: import("@/utils/with-install.ts").SFCWithInstall
|
|
|
46
46
|
multipleValue?: (string | number)[][];
|
|
47
47
|
}> & Readonly<{
|
|
48
48
|
onClear?: () => any;
|
|
49
|
-
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
50
49
|
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
50
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
51
51
|
onVisibleChange?: (visible: boolean) => any;
|
|
52
52
|
onRemoveTag?: (value: (string | number)[]) => any;
|
|
53
53
|
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
54
54
|
}>, import("./types.d.ts").StCascadeExpose, {}, {}, {}, {
|
|
55
55
|
options: import("./types.d.ts").CascadeOption[];
|
|
56
56
|
disabled: boolean;
|
|
57
|
+
placeholder: string;
|
|
57
58
|
labelKey: string;
|
|
58
59
|
valueKey: string;
|
|
59
|
-
separator: string;
|
|
60
|
-
multiple: boolean;
|
|
61
|
-
placeholder: string;
|
|
62
60
|
clearable: boolean;
|
|
63
61
|
childrenKey: string;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
separator: string;
|
|
63
|
+
multiple: boolean;
|
|
64
|
+
triggerClass: ClassValue;
|
|
65
|
+
triggerStyle: StyleValue;
|
|
66
|
+
popoverClass: ClassValue;
|
|
67
|
+
popoverStyle: StyleValue;
|
|
68
|
+
panelClass: ClassValue;
|
|
69
|
+
panelStyle: StyleValue;
|
|
70
|
+
menuItemClass: ClassValue;
|
|
71
|
+
menuItemStyle: StyleValue;
|
|
72
72
|
}>;
|
|
73
73
|
__isFragment?: never;
|
|
74
74
|
__isTeleport?: never;
|
|
@@ -78,36 +78,36 @@ export declare const StCascade: import("@/utils/with-install.ts").SFCWithInstall
|
|
|
78
78
|
multipleValue?: (string | number)[][];
|
|
79
79
|
}> & Readonly<{
|
|
80
80
|
onClear?: () => any;
|
|
81
|
-
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
82
81
|
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
82
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
83
83
|
onVisibleChange?: (visible: boolean) => any;
|
|
84
84
|
onRemoveTag?: (value: (string | number)[]) => any;
|
|
85
85
|
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
86
86
|
}>, import("./types.d.ts").StCascadeExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
87
87
|
clear: () => any;
|
|
88
|
-
"update:modelValue": (...args: unknown[]) => any;
|
|
89
88
|
change: (value: (string | number)[] | (string | number)[][]) => any;
|
|
89
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
90
90
|
visibleChange: (visible: boolean) => any;
|
|
91
91
|
removeTag: (value: (string | number)[]) => any;
|
|
92
92
|
"update:multipleValue": (value: (string | number)[][]) => any;
|
|
93
93
|
}, string, {
|
|
94
94
|
options: import("./types.d.ts").CascadeOption[];
|
|
95
95
|
disabled: boolean;
|
|
96
|
+
placeholder: string;
|
|
96
97
|
labelKey: string;
|
|
97
98
|
valueKey: string;
|
|
98
|
-
separator: string;
|
|
99
|
-
multiple: boolean;
|
|
100
|
-
placeholder: string;
|
|
101
99
|
clearable: boolean;
|
|
102
100
|
childrenKey: string;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
separator: string;
|
|
102
|
+
multiple: boolean;
|
|
103
|
+
triggerClass: ClassValue;
|
|
104
|
+
triggerStyle: StyleValue;
|
|
105
|
+
popoverClass: ClassValue;
|
|
106
|
+
popoverStyle: StyleValue;
|
|
107
|
+
panelClass: ClassValue;
|
|
108
|
+
panelStyle: StyleValue;
|
|
109
|
+
menuItemClass: ClassValue;
|
|
110
|
+
menuItemStyle: StyleValue;
|
|
111
111
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
112
112
|
$slots: {
|
|
113
113
|
prefix?: (props: {}) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../utils/cn.cjs"),t=require("../st-tree/st-tree.vue.cjs");let n=require("vue");var r={key:1,class:`st-cascade-panel__empty p-4 text-center text-muted-foreground text-
|
|
1
|
+
const e=require("../../utils/cn.cjs"),t=require("../st-tree/st-tree.vue.cjs");let n=require("vue");var r={key:1,class:`st-cascade-panel__empty p-4 text-center text-muted-foreground text-sm`},i=(0,n.defineComponent)({name:`StCascadePanel`,inheritAttrs:!1,__name:`st-cascade-panel`,props:{options:{default:()=>[]},modelValue:{default:()=>[]},labelKey:{default:`label`},valueKey:{default:`value`},childrenKey:{default:`children`},disabled:{type:Boolean,default:!1},panelClass:{},panelStyle:{},menuItemClass:{},menuItemStyle:{}},emits:[`update:modelValue`,`select`,`expand`],setup(i,{emit:a}){let o=i,s=a,c=(0,n.ref)([]),l=(0,n.ref)(void 0),u=(0,n.ref)([]),d=e=>e[o.valueKey],f=e=>e[o.childrenKey],p=e=>{let t=f(e);return t&&t.length>0},m=(e,t)=>{for(let n of e){if(d(n)===t)return n;if(p(n)){let e=m(f(n),t);if(e)return e}}},h=(e,t,n=[])=>{for(let r of e){let e=d(r),i=[...n,e];if(e===t)return i;if(p(r)){let e=h(f(r),t,i);if(e)return e}}return null},g=e=>e.length<=1?[]:e.slice(0,-1),_=e=>{if(o.disabled)return;let t=m(o.options,e);if(!t||t.disabled)return;let n=h(o.options,e);if(n)if(!p(t))c.value=n,s(`update:modelValue`,n),s(`select`,n,t);else{let r=d(t);u.value.indexOf(r)>-1?u.value=u.value.filter(e=>e!==r):u.value=[...u.value,r],c.value=n,s(`update:modelValue`,n),s(`expand`,n.length-1,e)}};return(0,n.watch)(c,e=>{e&&e.length>0?(u.value=g(e),l.value=e[e.length-1]):(u.value=[],l.value=void 0)},{deep:!0}),(0,n.watch)(u,e=>{if(e.length>0){let t=e[e.length-1];if(t!==c.value[c.value.length-1]){let e=h(o.options,t);e&&(c.value=e)}}},{deep:!0}),(0,n.watch)(()=>o.modelValue,e=>{e&&e.length>0?c.value=[...e]:c.value=[]},{immediate:!0,deep:!0}),(i,a)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)((0,n.unref)(e.cn)(`st-cascade-panel`,o.panelClass)),style:(0,n.normalizeStyle)(o.panelStyle)},[o.options.length>0?((0,n.openBlock)(),(0,n.createBlock)(t.default,{key:0,modelValue:l.value,"onUpdate:modelValue":a[0]||=e=>l.value=e,"expanded-keys":u.value,"onUpdate:expandedKeys":a[1]||=e=>u.value=e,"children-key":o.childrenKey,"label-key":o.labelKey,list:o.options,"node-class":o.menuItemClass,"node-content-style":o.menuItemStyle,"value-key":o.valueKey,onSelect:_},null,8,[`modelValue`,`expanded-keys`,`children-key`,`label-key`,`list`,`node-class`,`node-content-style`,`value-key`])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,r,[(0,n.renderSlot)(i.$slots,`empty`,{},()=>[a[2]||=(0,n.createTextVNode)(`暂无数据`,-1)])]))],6))}});exports.default=i;
|
|
@@ -4,7 +4,7 @@ import { createBlock as n, createElementBlock as r, createTextVNode as i, define
|
|
|
4
4
|
//#region src/components/st-cascade/st-cascade-panel.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var p = {
|
|
6
6
|
key: 1,
|
|
7
|
-
class: "st-cascade-panel__empty p-4 text-center text-muted-foreground text-
|
|
7
|
+
class: "st-cascade-panel__empty p-4 text-center text-muted-foreground text-sm"
|
|
8
8
|
}, m = /*@__PURE__*/ a({
|
|
9
9
|
name: "StCascadePanel",
|
|
10
10
|
inheritAttrs: !1,
|
|
@@ -82,26 +82,26 @@ var p = {
|
|
|
82
82
|
style: s(h.panelStyle)
|
|
83
83
|
}, [h.options.length > 0 ? (c(), n(t, {
|
|
84
84
|
key: 0,
|
|
85
|
-
list: h.options,
|
|
86
|
-
"label-key": h.labelKey,
|
|
87
|
-
"value-key": h.valueKey,
|
|
88
|
-
"children-key": h.childrenKey,
|
|
89
|
-
"node-class": h.menuItemClass,
|
|
90
|
-
"node-content-style": h.menuItemStyle,
|
|
91
85
|
modelValue: v.value,
|
|
92
86
|
"onUpdate:modelValue": l[0] ||= (e) => v.value = e,
|
|
93
87
|
"expanded-keys": y.value,
|
|
94
88
|
"onUpdate:expandedKeys": l[1] ||= (e) => y.value = e,
|
|
89
|
+
"children-key": h.childrenKey,
|
|
90
|
+
"label-key": h.labelKey,
|
|
91
|
+
list: h.options,
|
|
92
|
+
"node-class": h.menuItemClass,
|
|
93
|
+
"node-content-style": h.menuItemStyle,
|
|
94
|
+
"value-key": h.valueKey,
|
|
95
95
|
onSelect: E
|
|
96
96
|
}, null, 8, [
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"value-key",
|
|
97
|
+
"modelValue",
|
|
98
|
+
"expanded-keys",
|
|
100
99
|
"children-key",
|
|
100
|
+
"label-key",
|
|
101
|
+
"list",
|
|
101
102
|
"node-class",
|
|
102
103
|
"node-content-style",
|
|
103
|
-
"
|
|
104
|
-
"expanded-keys"
|
|
104
|
+
"value-key"
|
|
105
105
|
])) : (c(), r("div", p, [u(a.$slots, "empty", {}, () => [l[2] ||= i("暂无数据", -1)])]))], 6));
|
|
106
106
|
}
|
|
107
107
|
});
|
|
@@ -19,36 +19,36 @@ type __VLS_Slots = {} & {
|
|
|
19
19
|
};
|
|
20
20
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, StCascadeExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
21
|
clear: () => any;
|
|
22
|
-
"update:modelValue": (...args: unknown[]) => any;
|
|
23
22
|
change: (value: (string | number)[] | (string | number)[][]) => any;
|
|
23
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
24
24
|
visibleChange: (visible: boolean) => any;
|
|
25
25
|
removeTag: (value: (string | number)[]) => any;
|
|
26
26
|
"update:multipleValue": (value: (string | number)[][]) => any;
|
|
27
27
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
28
|
onClear?: () => any;
|
|
29
|
-
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
30
29
|
onChange?: (value: (string | number)[] | (string | number)[][]) => any;
|
|
30
|
+
"onUpdate:modelValue"?: (...args: unknown[]) => any;
|
|
31
31
|
onVisibleChange?: (visible: boolean) => any;
|
|
32
32
|
onRemoveTag?: (value: (string | number)[]) => any;
|
|
33
33
|
"onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
|
|
34
34
|
}>, {
|
|
35
35
|
options: CascadeOption[];
|
|
36
36
|
disabled: boolean;
|
|
37
|
+
placeholder: string;
|
|
37
38
|
labelKey: string;
|
|
38
39
|
valueKey: string;
|
|
39
|
-
separator: string;
|
|
40
|
-
multiple: boolean;
|
|
41
|
-
placeholder: string;
|
|
42
40
|
clearable: boolean;
|
|
43
41
|
childrenKey: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
separator: string;
|
|
43
|
+
multiple: boolean;
|
|
44
|
+
triggerClass: ClassValue;
|
|
45
|
+
triggerStyle: StyleValue;
|
|
46
|
+
popoverClass: ClassValue;
|
|
47
|
+
popoverStyle: StyleValue;
|
|
48
|
+
panelClass: ClassValue;
|
|
49
|
+
panelStyle: StyleValue;
|
|
50
|
+
menuItemClass: ClassValue;
|
|
51
|
+
menuItemStyle: StyleValue;
|
|
52
52
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
53
53
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../utils/cn.cjs"),t=require("../st-input/st-input.vue.cjs"),n=require("../st-popover/st-popover.vue.cjs"),r=require("../../utils/mergeStyles.cjs"),i=require("./st-cascade-panel.vue.cjs");let a=require("vue");var o=(0,a.defineComponent)({name:`StCascade`,inheritAttrs:!1,__name:`st-cascade`,props:(0,a.mergeModels)({options:{default:()=>[]},placeholder:{default:``},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},labelKey:{default:`label`},valueKey:{default:`value`},childrenKey:{default:`children`},separator:{default:`/`},popoverClass:{default:``},popoverStyle:{default:``},triggerClass:{default:``},triggerStyle:{default:``},panelClass:{default:``},panelStyle:{default:``},menuItemClass:{default:``},menuItemStyle:{default:``}},{modelValue:{default:()=>[]},modelModifiers:{},multipleValue:{default:()=>[]},multipleValueModifiers:{}}),emits:(0,a.mergeModels)([`update:modelValue`,`change`,`clear`,`visibleChange`,`removeTag`],[`update:modelValue`,`update:multipleValue`]),setup(o,{expose:s,emit:c}){(0,a.useSlots)();let l=(0,a.useAttrs)(),u=o,d=c,f=(0,a.useModel)(o,`modelValue`),p=(0,a.useModel)(o,`multipleValue`),m=(0,a.ref)(null),h=(0,a.ref)(null),g=(0,a.ref)(null),_=(0,a.ref)(!1),v=(0,a.ref)(!1),y=(0,a.ref)(0),b=(0,a.ref)([]),x=e=>e[u.labelKey],S=e=>e[u.valueKey],C=e=>e[u.childrenKey],w=e=>{let t=[],n=u.options;for(let r of e){let e=n.find(e=>S(e)===r);if(e)t.push(e),n=C(e)||[];else break}return t},T=e=>w(e).map(e=>x(e)).join(u.separator),E=e=>{let t=C(e);return!t||t.length===0},D=(0,a.computed)(()=>u.multiple?p.value.length===0?``:p.value.map(e=>T(e)).join(`, `):f.value.length===0?``:T(f.value)),O=(0,a.computed)(()=>(u.multiple?p.value.length>0:f.value.length>0)?``:u.placeholder||`请选择`),k=(0,a.computed)(()=>e.cn(`st-cascade`,{"st-cascade--focused":_.value})),A=(0,a.computed)(()=>e.cn(`st-cascade__arrow`,`inline-flex items-center transition-transform duration-200`,{"rotate-180":_.value})),j=(0,a.computed)(()=>!u.clearable||u.disabled?!1:u.multiple?p.value.length>0&&v.value:f.value.length>0&&v.value),M=(0,a.computed)(()=>u.popoverStyle?u.popoverStyle:y.value>0?{minWidth:`${y.value}px`}:{}),N=e=>{_.value=e,d(`visibleChange`,e),e?(h.value&&(y.value=h.value.$el.getBoundingClientRect().width),!u.multiple&&f.value.length>0?b.value=[...f.value]:b.value=[]):b.value=[]},P=e=>{b.value=e},F=(e,t)=>{E(t)&&(u.multiple?p.value.findIndex(t=>JSON.stringify(t)===JSON.stringify(e))===-1&&(p.value=[...p.value,e],d(`update:modelValue`,p.value),d(`change`,p.value)):(f.value=e,d(`update:modelValue`,e),d(`change`,e),_.value=!1))},I=()=>{u.multiple?(p.value=[],d(`update:modelValue`,[]),d(`change`,[])):(f.value=[],d(`update:modelValue`,[]),d(`change`,[])),d(`clear`)},L=()=>{v.value=!0},R=()=>{v.value=!1};return s({focus:()=>{h.value?.focus()},blur:()=>{h.value?.blur()},clear:()=>{I()}}),(o,s)=>((0,a.openBlock)(),(0,a.createBlock)(n.default,{ref_key:`popoverRef`,ref:m,visible:_.value,"onUpdate:visible":s[0]||=e=>_.value=e,
|
|
1
|
+
const e=require("../../utils/cn.cjs"),t=require("../st-input/st-input.vue.cjs"),n=require("../st-popover/st-popover.vue.cjs"),r=require("../../utils/mergeStyles.cjs"),i=require("./st-cascade-panel.vue.cjs");let a=require("vue");var o=(0,a.defineComponent)({name:`StCascade`,inheritAttrs:!1,__name:`st-cascade`,props:(0,a.mergeModels)({options:{default:()=>[]},placeholder:{default:``},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},labelKey:{default:`label`},valueKey:{default:`value`},childrenKey:{default:`children`},separator:{default:`/`},popoverClass:{default:``},popoverStyle:{default:``},triggerClass:{default:``},triggerStyle:{default:``},panelClass:{default:``},panelStyle:{default:``},menuItemClass:{default:``},menuItemStyle:{default:``}},{modelValue:{default:()=>[]},modelModifiers:{},multipleValue:{default:()=>[]},multipleValueModifiers:{}}),emits:(0,a.mergeModels)([`update:modelValue`,`change`,`clear`,`visibleChange`,`removeTag`],[`update:modelValue`,`update:multipleValue`]),setup(o,{expose:s,emit:c}){(0,a.useSlots)();let l=(0,a.useAttrs)(),u=o,d=c,f=(0,a.useModel)(o,`modelValue`),p=(0,a.useModel)(o,`multipleValue`),m=(0,a.ref)(null),h=(0,a.ref)(null),g=(0,a.ref)(null),_=(0,a.ref)(!1),v=(0,a.ref)(!1),y=(0,a.ref)(0),b=(0,a.ref)([]),x=e=>e[u.labelKey],S=e=>e[u.valueKey],C=e=>e[u.childrenKey],w=e=>{let t=[],n=u.options;for(let r of e){let e=n.find(e=>S(e)===r);if(e)t.push(e),n=C(e)||[];else break}return t},T=e=>w(e).map(e=>x(e)).join(u.separator),E=e=>{let t=C(e);return!t||t.length===0},D=(0,a.computed)(()=>u.multiple?p.value.length===0?``:p.value.map(e=>T(e)).join(`, `):f.value.length===0?``:T(f.value)),O=(0,a.computed)(()=>(u.multiple?p.value.length>0:f.value.length>0)?``:u.placeholder||`请选择`),k=(0,a.computed)(()=>e.cn(`st-cascade`,{"st-cascade--focused":_.value})),A=(0,a.computed)(()=>e.cn(`st-cascade__arrow`,`inline-flex items-center transition-transform duration-200`,{"rotate-180":_.value})),j=(0,a.computed)(()=>!u.clearable||u.disabled?!1:u.multiple?p.value.length>0&&v.value:f.value.length>0&&v.value),M=(0,a.computed)(()=>u.popoverStyle?u.popoverStyle:y.value>0?{minWidth:`${y.value}px`}:{}),N=e=>{_.value=e,d(`visibleChange`,e),e?(h.value&&(y.value=h.value.$el.getBoundingClientRect().width),!u.multiple&&f.value.length>0?b.value=[...f.value]:b.value=[]):b.value=[]},P=e=>{b.value=e},F=(e,t)=>{E(t)&&(u.multiple?p.value.findIndex(t=>JSON.stringify(t)===JSON.stringify(e))===-1&&(p.value=[...p.value,e],d(`update:modelValue`,p.value),d(`change`,p.value)):(f.value=e,d(`update:modelValue`,e),d(`change`,e),_.value=!1))},I=()=>{u.multiple?(p.value=[],d(`update:modelValue`,[]),d(`change`,[])):(f.value=[],d(`update:modelValue`,[]),d(`change`,[])),d(`clear`)},L=()=>{v.value=!0},R=()=>{v.value=!1};return s({focus:()=>{h.value?.focus()},blur:()=>{h.value?.blur()},clear:()=>{I()}}),(o,s)=>((0,a.openBlock)(),(0,a.createBlock)(n.default,{ref_key:`popoverRef`,ref:m,visible:_.value,"onUpdate:visible":s[0]||=e=>_.value=e,"content-class":u.popoverClass,"content-style":M.value,disabled:u.disabled,"show-arrow":!1,"trigger-class":(0,a.unref)(e.cn)((0,a.unref)(l).class,u.triggerClass),placement:`bottom-left`,trigger:`click`,onVisibleChange:N},{trigger:(0,a.withCtx)(()=>[(0,a.createVNode)(t.default,{ref_key:`inputRef`,ref:h,class:(0,a.normalizeClass)(k.value),clearable:j.value,disabled:u.disabled,"model-value":D.value,placeholder:O.value,style:(0,a.normalizeStyle)((0,a.unref)(r.mergeStyles)((0,a.unref)(l).style,u.triggerStyle)),readonly:``,onClear:I,onMouseenter:L,onMouseleave:R},(0,a.createSlots)({suffix:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)(A.value)},[...s[1]||=[(0,a.createElementVNode)(`i`,{class:`i-lucide-chevron-down`},null,-1)]],2)]),_:2},[o.$slots.prefix?{name:`prefix`,fn:(0,a.withCtx)(()=>[(0,a.renderSlot)(o.$slots,`prefix`)]),key:`0`}:void 0]),1032,[`class`,`clearable`,`disabled`,`model-value`,`placeholder`,`style`])]),content:(0,a.withCtx)(()=>[(0,a.createVNode)(i.default,{ref_key:`panelRef`,ref:g,"children-key":u.childrenKey,disabled:u.disabled,"label-key":u.labelKey,"menu-item-class":u.menuItemClass,"menu-item-style":u.menuItemStyle,"model-value":b.value,options:u.options,"panel-class":u.panelClass,"panel-style":u.panelStyle,"value-key":u.valueKey,onSelect:F,"onUpdate:modelValue":P},(0,a.createSlots)({_:2},[o.$slots.empty?{name:`empty`,fn:(0,a.withCtx)(()=>[(0,a.renderSlot)(o.$slots,`empty`)]),key:`0`}:void 0]),1032,[`children-key`,`disabled`,`label-key`,`menu-item-class`,`menu-item-style`,`model-value`,`options`,`panel-class`,`panel-style`,`value-key`])]),_:3},8,[`visible`,`content-class`,`content-style`,`disabled`,`trigger-class`]))}});exports.default=o;
|
|
@@ -90,25 +90,25 @@ var S = /*@__PURE__*/ u({
|
|
|
90
90
|
ref: O,
|
|
91
91
|
visible: j.value,
|
|
92
92
|
"onUpdate:visible": u[0] ||= (e) => j.value = e,
|
|
93
|
-
disabled: w.disabled,
|
|
94
|
-
"show-arrow": !1,
|
|
95
93
|
"content-class": w.popoverClass,
|
|
96
94
|
"content-style": K.value,
|
|
95
|
+
disabled: w.disabled,
|
|
96
|
+
"show-arrow": !1,
|
|
97
|
+
"trigger-class": _(e)(_(C).class, w.triggerClass),
|
|
97
98
|
placement: "bottom-left",
|
|
98
99
|
trigger: "click",
|
|
99
|
-
"trigger-class": _(e)(_(C).class, w.triggerClass),
|
|
100
100
|
onVisibleChange: q
|
|
101
101
|
}, {
|
|
102
102
|
trigger: x(() => [l(t, {
|
|
103
103
|
ref_key: "inputRef",
|
|
104
104
|
ref: k,
|
|
105
105
|
class: f(U.value),
|
|
106
|
-
style: p(_(r)(_(C).style, w.triggerStyle)),
|
|
107
106
|
clearable: G.value,
|
|
108
107
|
disabled: w.disabled,
|
|
108
|
+
"model-value": V.value,
|
|
109
109
|
placeholder: H.value,
|
|
110
|
+
style: p(_(r)(_(C).style, w.triggerStyle)),
|
|
110
111
|
readonly: "",
|
|
111
|
-
"model-value": V.value,
|
|
112
112
|
onClear: X,
|
|
113
113
|
onMouseenter: Z,
|
|
114
114
|
onMouseleave: Q
|
|
@@ -121,49 +121,49 @@ var S = /*@__PURE__*/ u({
|
|
|
121
121
|
key: "0"
|
|
122
122
|
} : void 0]), 1032, [
|
|
123
123
|
"class",
|
|
124
|
-
"style",
|
|
125
124
|
"clearable",
|
|
126
125
|
"disabled",
|
|
126
|
+
"model-value",
|
|
127
127
|
"placeholder",
|
|
128
|
-
"
|
|
128
|
+
"style"
|
|
129
129
|
])]),
|
|
130
130
|
content: x(() => [l(i, {
|
|
131
131
|
ref_key: "panelRef",
|
|
132
132
|
ref: A,
|
|
133
|
-
options: w.options,
|
|
134
|
-
"model-value": P.value,
|
|
135
|
-
"label-key": w.labelKey,
|
|
136
|
-
"value-key": w.valueKey,
|
|
137
133
|
"children-key": w.childrenKey,
|
|
138
134
|
disabled: w.disabled,
|
|
139
|
-
"
|
|
140
|
-
"panel-style": w.panelStyle,
|
|
135
|
+
"label-key": w.labelKey,
|
|
141
136
|
"menu-item-class": w.menuItemClass,
|
|
142
137
|
"menu-item-style": w.menuItemStyle,
|
|
143
|
-
"
|
|
144
|
-
|
|
138
|
+
"model-value": P.value,
|
|
139
|
+
options: w.options,
|
|
140
|
+
"panel-class": w.panelClass,
|
|
141
|
+
"panel-style": w.panelStyle,
|
|
142
|
+
"value-key": w.valueKey,
|
|
143
|
+
onSelect: Y,
|
|
144
|
+
"onUpdate:modelValue": J
|
|
145
145
|
}, c({ _: 2 }, [a.$slots.empty ? {
|
|
146
146
|
name: "empty",
|
|
147
147
|
fn: x(() => [g(a.$slots, "empty")]),
|
|
148
148
|
key: "0"
|
|
149
149
|
} : void 0]), 1032, [
|
|
150
|
-
"options",
|
|
151
|
-
"model-value",
|
|
152
|
-
"label-key",
|
|
153
|
-
"value-key",
|
|
154
150
|
"children-key",
|
|
155
151
|
"disabled",
|
|
152
|
+
"label-key",
|
|
153
|
+
"menu-item-class",
|
|
154
|
+
"menu-item-style",
|
|
155
|
+
"model-value",
|
|
156
|
+
"options",
|
|
156
157
|
"panel-class",
|
|
157
158
|
"panel-style",
|
|
158
|
-
"
|
|
159
|
-
"menu-item-style"
|
|
159
|
+
"value-key"
|
|
160
160
|
])]),
|
|
161
161
|
_: 3
|
|
162
162
|
}, 8, [
|
|
163
163
|
"visible",
|
|
164
|
-
"disabled",
|
|
165
164
|
"content-class",
|
|
166
165
|
"content-style",
|
|
166
|
+
"disabled",
|
|
167
167
|
"trigger-class"
|
|
168
168
|
]));
|
|
169
169
|
}
|
|
@@ -31,13 +31,13 @@ export interface CascadePanelProps {
|
|
|
31
31
|
/** 是否禁用 */
|
|
32
32
|
disabled?: boolean;
|
|
33
33
|
/** 下拉面板的类名 */
|
|
34
|
-
panelClass?:
|
|
34
|
+
panelClass?: ClassValue;
|
|
35
35
|
/** 下拉面板的样式 */
|
|
36
|
-
panelStyle?:
|
|
36
|
+
panelStyle?: StyleValue;
|
|
37
37
|
/** 菜单项的类名 */
|
|
38
|
-
menuItemClass?:
|
|
38
|
+
menuItemClass?: ClassValue;
|
|
39
39
|
/** 菜单项的样式 */
|
|
40
|
-
menuItemStyle?:
|
|
40
|
+
menuItemStyle?: StyleValue;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -75,21 +75,21 @@ export interface StCascadeProps {
|
|
|
75
75
|
/** 分隔符 */
|
|
76
76
|
separator?: string;
|
|
77
77
|
/** popover 下拉菜单的类名 */
|
|
78
|
-
popoverClass?:
|
|
78
|
+
popoverClass?: ClassValue;
|
|
79
79
|
/** popover 下拉菜单的样式 */
|
|
80
|
-
popoverStyle?:
|
|
80
|
+
popoverStyle?: StyleValue;
|
|
81
81
|
/** 触发元素的类名 */
|
|
82
|
-
triggerClass?:
|
|
82
|
+
triggerClass?: ClassValue;
|
|
83
83
|
/** 触发元素的样式 */
|
|
84
|
-
triggerStyle?:
|
|
84
|
+
triggerStyle?: StyleValue;
|
|
85
85
|
/** 下拉面板的类名 */
|
|
86
|
-
panelClass?:
|
|
86
|
+
panelClass?: ClassValue;
|
|
87
87
|
/** 下拉面板的样式 */
|
|
88
|
-
panelStyle?:
|
|
88
|
+
panelStyle?: StyleValue;
|
|
89
89
|
/** 菜单项的类名 */
|
|
90
|
-
menuItemClass?:
|
|
90
|
+
menuItemClass?: ClassValue;
|
|
91
91
|
/** 菜单项的样式 */
|
|
92
|
-
menuItemStyle?:
|
|
92
|
+
menuItemStyle?: StyleValue;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -2,11 +2,11 @@ export declare const StCheckbox: import("@/utils/with-install.ts").SFCWithInstal
|
|
|
2
2
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxProps & {
|
|
3
3
|
modelValue?: boolean | string | number;
|
|
4
4
|
}> & Readonly<{
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
onChange?: (event: MouseEvent) => any;
|
|
6
|
+
"onUpdate:modelValue"?: (value: string | number | boolean) => any;
|
|
7
7
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
change: (event: MouseEvent) => any;
|
|
9
|
+
"update:modelValue": (value: string | number | boolean) => any;
|
|
10
10
|
}, import("vue").PublicProps, {
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
trueValue: boolean | string | number;
|
|
@@ -21,8 +21,8 @@ export declare const StCheckbox: import("@/utils/with-install.ts").SFCWithInstal
|
|
|
21
21
|
}, Readonly<import("./types.d.ts").CheckboxProps & {
|
|
22
22
|
modelValue?: boolean | string | number;
|
|
23
23
|
}> & Readonly<{
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
onChange?: (event: MouseEvent) => any;
|
|
25
|
+
"onUpdate:modelValue"?: (value: string | number | boolean) => any;
|
|
26
26
|
}>, {}, {}, {}, {}, {
|
|
27
27
|
disabled: boolean;
|
|
28
28
|
trueValue: boolean | string | number;
|
|
@@ -34,11 +34,11 @@ export declare const StCheckbox: import("@/utils/with-install.ts").SFCWithInstal
|
|
|
34
34
|
} & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxProps & {
|
|
35
35
|
modelValue?: boolean | string | number;
|
|
36
36
|
}> & Readonly<{
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
onChange?: (event: MouseEvent) => any;
|
|
38
|
+
"onUpdate:modelValue"?: (value: string | number | boolean) => any;
|
|
39
39
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
change: (event: MouseEvent) => any;
|
|
41
|
+
"update:modelValue": (value: string | number | boolean) => any;
|
|
42
42
|
}, string, {
|
|
43
43
|
disabled: boolean;
|
|
44
44
|
trueValue: boolean | string | number;
|
|
@@ -46,5 +46,59 @@ export declare const StCheckbox: import("@/utils/with-install.ts").SFCWithInstal
|
|
|
46
46
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
47
47
|
$slots: import("./types.d.ts").CheckboxSlots;
|
|
48
48
|
})>;
|
|
49
|
+
export declare const StCheckboxGroup: import("@/utils/with-install.ts").SFCWithInstall<{
|
|
50
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types.d.ts").CheckboxGroupProps & {
|
|
51
|
+
modelValue?: (string | number | boolean)[];
|
|
52
|
+
}> & Readonly<{
|
|
53
|
+
onChange?: (event: MouseEvent) => any;
|
|
54
|
+
"onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
|
|
55
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
+
change: (event: MouseEvent) => any;
|
|
57
|
+
"update:modelValue": (value: (string | number | boolean)[]) => any;
|
|
58
|
+
}, import("vue").PublicProps, {
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
list: import("./types.d.ts").CheckboxGroupItem[];
|
|
61
|
+
labelKey: string;
|
|
62
|
+
valueKey: string;
|
|
63
|
+
direction: import("./types.d.ts").CheckboxGroupDirection;
|
|
64
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
65
|
+
P: {};
|
|
66
|
+
B: {};
|
|
67
|
+
D: {};
|
|
68
|
+
C: {};
|
|
69
|
+
M: {};
|
|
70
|
+
Defaults: {};
|
|
71
|
+
}, Readonly<import("./types.d.ts").CheckboxGroupProps & {
|
|
72
|
+
modelValue?: (string | number | boolean)[];
|
|
73
|
+
}> & Readonly<{
|
|
74
|
+
onChange?: (event: MouseEvent) => any;
|
|
75
|
+
"onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
|
|
76
|
+
}>, {}, {}, {}, {}, {
|
|
77
|
+
disabled: boolean;
|
|
78
|
+
list: import("./types.d.ts").CheckboxGroupItem[];
|
|
79
|
+
labelKey: string;
|
|
80
|
+
valueKey: string;
|
|
81
|
+
direction: import("./types.d.ts").CheckboxGroupDirection;
|
|
82
|
+
}>;
|
|
83
|
+
__isFragment?: never;
|
|
84
|
+
__isTeleport?: never;
|
|
85
|
+
__isSuspense?: never;
|
|
86
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./types.d.ts").CheckboxGroupProps & {
|
|
87
|
+
modelValue?: (string | number | boolean)[];
|
|
88
|
+
}> & Readonly<{
|
|
89
|
+
onChange?: (event: MouseEvent) => any;
|
|
90
|
+
"onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
|
|
91
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
92
|
+
change: (event: MouseEvent) => any;
|
|
93
|
+
"update:modelValue": (value: (string | number | boolean)[]) => any;
|
|
94
|
+
}, string, {
|
|
95
|
+
disabled: boolean;
|
|
96
|
+
list: import("./types.d.ts").CheckboxGroupItem[];
|
|
97
|
+
labelKey: string;
|
|
98
|
+
valueKey: string;
|
|
99
|
+
direction: import("./types.d.ts").CheckboxGroupDirection;
|
|
100
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
101
|
+
$slots: import("./types.d.ts").CheckboxGroupSlots;
|
|
102
|
+
})>;
|
|
49
103
|
export default StCheckbox;
|
|
50
|
-
export type { CheckboxProps, CheckboxSlots, CheckboxEmits } from './types.d.ts';
|
|
104
|
+
export type { CheckboxProps, CheckboxSlots, CheckboxEmits, CheckboxGroupProps, CheckboxGroupSlots, CheckboxGroupEmits, } from './types.d.ts';
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import type { CheckboxGroupItem, CheckboxGroupProps } from './types.d.ts';
|
|
1
|
+
import type { CheckboxGroupItem, CheckboxGroupProps, CheckboxGroupSlots } from './types.d.ts';
|
|
2
|
+
type __VLS_Slots = CheckboxGroupSlots;
|
|
2
3
|
type __VLS_Props = CheckboxGroupProps;
|
|
3
4
|
type __VLS_ModelProps = {
|
|
4
5
|
modelValue?: (string | number | boolean)[];
|
|
5
6
|
};
|
|
6
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
7
|
-
declare var __VLS_7: {};
|
|
8
|
-
type __VLS_Slots = {} & {
|
|
9
|
-
default?: (props: typeof __VLS_7) => any;
|
|
10
|
-
};
|
|
11
8
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
change: (event: MouseEvent) => any;
|
|
12
10
|
"update:modelValue": (value: (string | number | boolean)[]) => any;
|
|
13
11
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
onChange?: (event: MouseEvent) => any;
|
|
14
13
|
"onUpdate:modelValue"?: (value: (string | number | boolean)[]) => any;
|
|
15
14
|
}>, {
|
|
16
15
|
disabled: boolean;
|
|
17
|
-
labelClass: commonClass;
|
|
18
16
|
list: CheckboxGroupItem[];
|
|
19
17
|
labelKey: string;
|
|
20
18
|
valueKey: string;
|
|
21
19
|
direction: import("./types.d.ts").CheckboxGroupDirection;
|
|
22
|
-
wrapperClass: commonClass;
|
|
23
|
-
wrapperStyle: commonStyle;
|
|
24
|
-
itemClass: commonClass;
|
|
25
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
26
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../utils/cn.cjs"),t=require("../../utils/cva/index.cjs"),n=require("./st-checkbox.vue.cjs");let r=require("vue");var i=(0,r.defineComponent)({name:`StCheckboxGroup`,inheritAttrs:!1,__name:`st-checkbox-group`,props:(0,r.mergeModels)({list:{default:void 0},labelKey:{default:`label`},valueKey:{default:`value`},disabled:{type:Boolean,default:!1},direction:{default:`horizontal`},itemClass:{},itemStyle:{},labelClass:{},labelStyle:{},boxClass:{},boxStyle:{},iconClass:{},iconStyle:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:(0,r.mergeModels)([`change`],[`update:modelValue`]),setup(i,{emit:a}){let o=(0,r.useModel)(i,`modelValue`),s=(0,r.useAttrs)();(0,r.useSlots)();let c=a,l=i,u=(0,r.computed)(()=>l.list?.length>0),d=t.cva({base:`flex`,variants:{direction:{horizontal:`flex-row flex-wrap gap-lg`,vertical:`flex-col gap-default`}}}),f=(0,r.computed)(()=>e.cn(d({direction:l.direction}),s.class));function p(e){let t=e[l.valueKey];return typeof t==`boolean`?String(t):t}function m(e){return e[l.labelKey]}function h(e){c(`change`,e)}return(0,r.provide)(`checkboxGroup`,{disabled:(0,r.computed)(()=>l.disabled),modelValue:o,updateValue:(e,t)=>{let n=[...o.value];if(t)n.includes(e)||n.push(e);else{let t=n.indexOf(e);t>-1&&n.splice(t,1)}o.value=n}}),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([f.value,`st-checkbox-group`]),style:(0,r.normalizeStyle)((0,r.unref)(s).style)},[u.value?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(l.list,e=>((0,r.openBlock)(),(0,r.createBlock)(n.default,{key:p(e),"box-class":l.boxClass,"box-style":l.boxStyle,class:(0,r.normalizeClass)(l.itemClass),disabled:l.disabled,"icon-class":l.iconClass,"icon-style":l.iconStyle,"label-class":l.labelClass,"label-style":l.labelStyle,style:(0,r.normalizeStyle)(l.itemStyle),"true-value":p(e),onChange:h},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(m(e)),1)]),_:2},1032,[`box-class`,`box-style`,`class`,`disabled`,`icon-class`,`icon-style`,`label-class`,`label-style`,`style`,`true-value`]))),128)):(0,r.renderSlot)(e.$slots,`default`,{key:1})],6))}});exports.default=i;
|