vue-devui 1.5.12 → 1.5.13-hotfix.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auto-complete/index.es.js +139 -61
- package/auto-complete/index.umd.js +16 -16
- package/auto-complete/style.css +1 -1
- package/checkbox/index.es.js +115 -61
- package/checkbox/index.umd.js +15 -15
- package/checkbox/style.css +1 -1
- package/code-editor/index.es.js +5 -2
- package/code-editor/index.umd.js +6 -6
- package/code-review/index.es.js +12 -1
- package/code-review/index.umd.js +18 -18
- package/code-review/style.css +1 -1
- package/date-picker-pro/index.es.js +213 -109
- package/date-picker-pro/index.umd.js +19 -19
- package/date-picker-pro/style.css +1 -1
- package/editor-md/index.es.js +1 -1
- package/editor-md/index.umd.js +1 -1
- package/form/index.es.js +142 -64
- package/form/index.umd.js +14 -14
- package/form/style.css +1 -1
- package/image-preview/index.es.js +2 -6
- package/image-preview/index.umd.js +2 -2
- package/image-preview/style.css +1 -1
- package/input/index.es.js +207 -79
- package/input/index.umd.js +18 -18
- package/input/style.css +1 -1
- package/input-number/index.es.js +123 -46
- package/input-number/index.umd.js +20 -20
- package/input-number/style.css +1 -1
- package/mention/index.es.js +138 -60
- package/mention/index.umd.js +16 -16
- package/mention/style.css +1 -1
- package/nuxt/components/STYLE_TOKEN.js +3 -0
- package/nuxt/components/formControlProps.js +3 -0
- package/package.json +1 -1
- package/pagination/index.es.js +155 -89
- package/pagination/index.umd.js +13 -13
- package/pagination/style.css +1 -1
- package/progress/index.es.js +6 -6
- package/progress/index.umd.js +1 -1
- package/radio/index.es.js +115 -61
- package/radio/index.umd.js +16 -16
- package/radio/style.css +1 -1
- package/search/index.es.js +211 -83
- package/search/index.umd.js +19 -19
- package/search/style.css +1 -1
- package/select/index.es.js +148 -82
- package/select/index.umd.js +11 -11
- package/select/style.css +1 -1
- package/skeleton/index.es.js +1 -0
- package/skeleton/index.umd.js +2 -2
- package/steps/index.es.js +35 -11
- package/steps/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +115 -61
- package/switch/index.umd.js +14 -14
- package/switch/style.css +1 -1
- package/table/index.es.js +88 -34
- package/table/index.umd.js +15 -15
- package/table/style.css +1 -1
- package/textarea/index.es.js +141 -63
- package/textarea/index.umd.js +17 -17
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +159 -55
- package/time-picker/index.umd.js +11 -11
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +148 -82
- package/time-select/index.umd.js +17 -17
- package/time-select/style.css +1 -1
- package/tree/index.es.js +86 -32
- package/tree/index.umd.js +11 -11
- package/tree/style.css +1 -1
- package/types/auto-focus/index.d.ts +9 -0
- package/types/auto-focus/src/auto-focus-directive.d.ts +4 -0
- package/types/code-review/src/code-review-types.d.ts +6 -0
- package/types/code-review/src/code-review.d.ts +9 -0
- package/types/form/index.d.ts +1 -0
- package/types/form/src/components/form-control/use-form-control.d.ts +11 -2
- package/types/form/src/components/form-item/form-item-types.d.ts +10 -2
- package/types/form/src/components/form-item/form-item.d.ts +3 -3
- package/types/form/src/components/form-label/form-label.d.ts +1 -13
- package/types/form/src/components/form-label/use-form-label.d.ts +14 -2
- package/types/form/src/form-types.d.ts +11 -0
- package/types/form/src/form.d.ts +18 -0
- package/types/input/src/composables/use-input-event.d.ts +12 -2
- package/types/input/src/input-types.d.ts +8 -0
- package/types/input/src/input.d.ts +18 -0
- package/types/input-icon/src/input-icon.d.ts +18 -0
- package/types/list/index.d.ts +0 -1
- package/types/select/src/composables/use-select-menu-size.d.ts +5 -0
- package/types/vue-devui.d.ts +2 -1
- package/vue-devui.es.js +202 -70
- package/vue-devui.umd.js +78 -78
package/input/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--no-slots i,.devui-icon--no-slots img{display:block}.devui-icon--disabled{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #cfd0d3)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 2px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .24));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}.devui-popover__icon-wrap{width:16px;height:16px;margin-right:8px}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>path{fill:var(--devui-success, #50d4ab)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>circle,.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>path{fill:var(--devui-warning, #fac20a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>g{fill:var(--devui-info, #5e7ce0)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>path{fill:var(--devui-danger, #f66f6a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__content.devui-flexible-overlay{display:flex;flex-wrap:wrap;align-items:center;white-space:nowrap;padding:4px 12px;line-height:1.5;border-radius:var(--devui-border-radius-feedback, 4px);color:var(--devui-feedback-overlay-text, #dfe1e6);background-color:var(--devui-feedback-overlay-bg, #464d6e);font-size:var(--devui-font-size-sm, 12px)}.devui-popover__content.devui-flexible-overlay.is-icon{flex-wrap:nowrap}.devui-popover--fade-bottom-enter-from,.devui-popover--fade-bottom-leave-to,.devui-popover--fade-top-enter-from,.devui-popover--fade-top-leave-to{opacity:.8;transform:scaleY(.8)}.devui-popover--fade-bottom-enter-to,.devui-popover--fade-bottom-leave-from,.devui-popover--fade-top-enter-to,.devui-popover--fade-top-leave-from{opacity:1;transform:scaleY(1)}.devui-popover--fade-bottom-enter-active,.devui-popover--fade-top-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-bottom-leave-active,.devui-popover--fade-top-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-popover--fade-left-enter-from,.devui-popover--fade-left-leave-to,.devui-popover--fade-right-enter-from,.devui-popover--fade-right-leave-to{opacity:.8;transform:scaleX(.8)}.devui-popover--fade-left-enter-to,.devui-popover--fade-left-leave-from,.devui-popover--fade-right-enter-to,.devui-popover--fade-right-leave-from{opacity:1;transform:scaleX(1)}.devui-popover--fade-left-enter-active,.devui-popover--fade-right-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-left-leave-active,.devui-popover--fade-right-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-form__label{align-self:flex-start}.devui-form__label--vertical{padding-bottom:8px}.devui-form__label--sm{flex:0 0 80px}.devui-form__label--md{flex:0 0 100px}.devui-form__label--lg{flex:0 0 150px}.devui-form__label--start{text-align:left}.devui-form__label--center{text-align:center}.devui-form__label--end{text-align:end}.devui-form__label-span{display:inline-block;vertical-align:middle;color:var(--devui-text, #252b3a)}.devui-form__label--required:before{content:"*";color:red;display:inline-block;margin-right:8px;margin-left:-12px}.devui-form__label--required-hide:before{display:none}.devui-form__label-help{position:relative;top:-.1em;display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-form__control{flex:1 1 auto;position:relative;width:100%}.devui-form__control--horizontal{margin-left:16px}.devui-form__control .devui-star{color:red}.devui-form__control .devui-form__control-container{position:relative}.devui-form__control .devui-form__control-container--horizontal{display:flex;width:100%}.devui-form__control .devui-form__control-container--horizontal .devui-validate-tip{margin:0}.devui-form__control .devui-form__control-container .devui-form__feedback-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:16px;text-align:center;visibility:visible;pointer-events:none;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg circle{fill:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg circle{fill:var(--devui-success, #50d4ab)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg{animation:loading-keyframes 1s infinite linear}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg path{fill:var(--devui-brand, #5e7ce0)}.devui-form__control .devui-form__control-container--has-feedback{display:flex;align-items:center}.devui-form__control .devui-form__control-container--has-feedback input{padding-right:28px}.devui-form__control .devui-form__control-container--feedback-error{border:1px solid #f66f6a;border-radius:2px}.devui-form__control .devui-form__control-container--feedback-error input{background-color:#ffeeed;border-color:transparent}.devui-form__control .devui-form__control-container--feedback-error input:hover{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error input:focus{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error .devui-select-arrow{right:24px!important}.devui-form__control .devui-form__control-info{line-height:1}.devui-form__control .devui-form__control-info .error-message{display:inline-block;min-height:20px;line-height:1.5;font-size:var(--devui-font-size, 12px);color:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-info .devui-form__control-extra{font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f);min-height:20px;line-height:1.5;text-align:justify}@keyframes loading-keyframes{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.devui-form__item--horizontal{display:flex;align-items:center;margin-bottom:20px}.devui-form__item--vertical{display:flex;flex-direction:column;margin-bottom:20px}.devui-form__item--error{margin-bottom:0}.devui-form-operation .star{color:red}.devui-input{width:100%;height:32px;font-size:var(--devui-font-size, 12px)}.devui-input__wrapper{display:inline-flex;align-items:center;justify-content:center;width:100%;padding:0 8px;box-sizing:border-box;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-form-control-bg, #ffffff);transition:border-color .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1));height:100%}.devui-input__wrapper:not(.devui-input--error):not(.devui-input--disabled):not(.devui-input--focus):hover{border-color:var(--devui-form-control-line-hover, #9b9fa8)}.devui-input--focus:not(.devui-input--error){border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-input--disabled{color:var(--devui-disabled-text, #cfd0d3);border-color:var(--devui-disabled-line, #dfe1e6);background-color:var(--devui-disabled-bg, #f5f5f5);cursor:not-allowed}.devui-input--disabled:hover{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-input--disabled .devui-input__inner{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-input--error{border-color:var(--devui-danger-line, #f66f6a);background-color:var(--devui-danger-bg, #ffd5d4)}.devui-input--sm{height:24px;font-size:var(--devui-font-size-sm, 12px)}.devui-input--lg{height:40px;font-size:var(--devui-font-size-lg, 14px)}.devui-input--feedback{padding-right:28px}.devui-input__inner{width:100%;height:100%;color:var(--devui-text, #252b3a);font-size:inherit;padding:4px 0;border:none;background:none;outline:none;box-sizing:border-box}.devui-input--prepend .devui-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.devui-input--append .devui-input__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.devui-input-slot{display:inline-flex;width:100%;align-items:stretch}.devui-input-slot__prepend,.devui-input-slot__append{color:var(--devui-text);position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:100%;padding:0 20px;white-space:nowrap;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-form-control-bg, #ffffff)}.devui-input-slot__prepend .devui-button,.devui-input-slot__prepend .devui-select .devui-select__selection,.devui-input-slot__append .devui-button,.devui-input-slot__append .devui-select .devui-select__selection{border:none!important;background-color:transparent!important;color:inherit}.devui-input-slot__prepend .devui-button,.devui-input-slot__prepend .devui-select__selection,.devui-input-slot__append .devui-button,.devui-input-slot__append .devui-select__selection{margin:0 -20px}.devui-input-slot__prepend{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.devui-input-slot__append{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.devui-input-slot__prefix,.devui-input-slot__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;align-items:center}.devui-input-slot__prefix>*{margin-right:8px}.devui-input-slot__suffix>*{margin-left:8px}.devui-input__clear--icon,.devui-input__password--icon{cursor:pointer}
|
|
1
|
+
.devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--no-slots i,.devui-icon--no-slots img{display:block}.devui-icon--disabled{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #cfd0d3)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 2px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .24));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}.devui-popover__icon-wrap{width:16px;height:16px;margin-right:8px}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>path{fill:var(--devui-success, #50d4ab)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>circle,.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--success>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>path{fill:var(--devui-warning, #fac20a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--warning>g>polygon{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>g{fill:var(--devui-info, #5e7ce0)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--info>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>path{fill:var(--devui-danger, #f66f6a)}.devui-popover__icon-wrap .devui-popover__icon.devui-popover__icon--error>g>circle{fill:var(--devui-light-text, #ffffff)}.devui-popover__content.devui-flexible-overlay{display:flex;flex-wrap:wrap;align-items:center;white-space:nowrap;padding:4px 12px;line-height:1.5;border-radius:var(--devui-border-radius-feedback, 4px);color:var(--devui-feedback-overlay-text, #dfe1e6);background-color:var(--devui-feedback-overlay-bg, #464d6e);font-size:var(--devui-font-size-sm, 12px)}.devui-popover__content.devui-flexible-overlay.is-icon{flex-wrap:nowrap}.devui-popover--fade-bottom-enter-from,.devui-popover--fade-bottom-leave-to,.devui-popover--fade-top-enter-from,.devui-popover--fade-top-leave-to{opacity:.8;transform:scaleY(.8)}.devui-popover--fade-bottom-enter-to,.devui-popover--fade-bottom-leave-from,.devui-popover--fade-top-enter-to,.devui-popover--fade-top-leave-from{opacity:1;transform:scaleY(1)}.devui-popover--fade-bottom-enter-active,.devui-popover--fade-top-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-bottom-leave-active,.devui-popover--fade-top-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-popover--fade-left-enter-from,.devui-popover--fade-left-leave-to,.devui-popover--fade-right-enter-from,.devui-popover--fade-right-leave-to{opacity:.8;transform:scaleX(.8)}.devui-popover--fade-left-enter-to,.devui-popover--fade-left-leave-from,.devui-popover--fade-right-enter-to,.devui-popover--fade-right-leave-from{opacity:1;transform:scaleX(1)}.devui-popover--fade-left-enter-active,.devui-popover--fade-right-enter-active{transition:transform .1s cubic-bezier(.16,.75,.5,1),opacity .1s cubic-bezier(.16,.75,.5,1)}.devui-popover--fade-left-leave-active,.devui-popover--fade-right-leave-active{transition:transform .1s cubic-bezier(.5,0,.84,.25),opacity .1s cubic-bezier(.5,0,.84,.25)}.devui-form__label{align-self:flex-start}.devui-form__label--vertical{padding-bottom:8px}.devui-form__label--sm{flex:0 0 80px}.devui-form__label--md{flex:0 0 100px}.devui-form__label--lg{flex:0 0 150px}.devui-form__label--start{text-align:left}.devui-form__label--center{text-align:center}.devui-form__label--end{text-align:end}.devui-form__label-span{display:inline-block;vertical-align:middle;font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f)}.devui-form__label--required:before{content:"*";color:red;display:inline-block;margin-right:8px;margin-left:-12px}.devui-form__label--required-hide:before{display:none}.devui-form__label-help{position:relative;top:-.1em;display:inline-block;vertical-align:middle;margin-left:4px;cursor:pointer}.devui-form__label-tips-popover .dv-popover__icon-wrap+span{flex:1}.devui-form__control{flex:1 1 auto;position:relative;width:100%}.devui-form__control--horizontal{margin-left:16px}.devui-form__control .devui-star{color:red}.devui-form__control .devui-form__control-container{position:relative}.devui-form__control .devui-form__control-container--horizontal{display:flex;width:100%}.devui-form__control .devui-form__control-container--horizontal .devui-validate-tip{margin:0}.devui-form__control .devui-form__control-container .devui-form__feedback-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:16px;text-align:center;visibility:visible;pointer-events:none;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg circle{fill:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--error svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg circle{fill:var(--devui-success, #50d4ab)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--success svg polygon{fill:var(--devui-base-bg, #ffffff)}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg{animation:loading-keyframes 1s infinite linear}.devui-form__control .devui-form__control-container .devui-form__feedback-icon--pending svg path{fill:var(--devui-brand, #5e7ce0)}.devui-form__control .devui-form__control-container--has-feedback{display:flex;align-items:center}.devui-form__control .devui-form__control-container--has-feedback input{padding-right:28px}.devui-form__control .devui-form__control-container--feedback-error{border:1px solid #f66f6a;border-radius:2px}.devui-form__control .devui-form__control-container--feedback-error input{background-color:#ffeeed;border-color:transparent}.devui-form__control .devui-form__control-container--feedback-error input:hover{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error input:focus{border-color:transparent!important}.devui-form__control .devui-form__control-container--feedback-error .devui-select-arrow{right:24px!important}.devui-form__control .devui-form__control-info{line-height:1}.devui-form__control .devui-form__control-info .error-message{display:inline-block;min-height:20px;line-height:1.5;font-size:var(--devui-font-size, 12px);color:var(--devui-danger, #f66f6a)}.devui-form__control .devui-form__control-info .devui-form__control-extra{font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f);min-height:20px;line-height:1.5;text-align:justify}@keyframes loading-keyframes{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.devui-form__item--horizontal{display:flex;align-items:center;margin-bottom:20px}.devui-form__item--vertical{display:flex;flex-direction:column;margin-bottom:20px}.devui-form__item--error{margin-bottom:0}.devui-form-operation .star{color:red}.devui-input{width:100%;height:32px;font-size:var(--devui-font-size, 12px)}.devui-input__wrapper{display:inline-flex;align-items:center;justify-content:center;width:100%;padding:0 8px;box-sizing:border-box;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-form-control-bg, #ffffff);transition:border-color .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1));height:100%}.devui-input__wrapper:not(.devui-input--error):not(.devui-input--disabled):not(.devui-input--focus):hover{border-color:var(--devui-form-control-line-hover, #9b9fa8)}.devui-input--focus:not(.devui-input--error){border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-input--disabled{color:var(--devui-disabled-text, #cfd0d3);border-color:var(--devui-disabled-line, #dfe1e6);background-color:var(--devui-disabled-bg, #f5f5f5);cursor:not-allowed}.devui-input--disabled:hover{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-input--disabled .devui-input__inner{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-input--error{border-color:var(--devui-danger-line, #f66f6a);background-color:var(--devui-danger-bg, #ffd5d4)}.devui-input--sm{height:24px;font-size:var(--devui-font-size-sm, 12px)}.devui-input--lg{height:40px;font-size:var(--devui-font-size-lg, 14px)}.devui-input--feedback{padding-right:28px}.devui-input__inner{width:100%;height:100%;color:var(--devui-text, #252b3a);font-size:inherit;padding:4px 0;border:none;background:none;outline:none;box-sizing:border-box}.devui-input__inner::placeholder{color:var(--devui-placeholder, #babbc0)}.devui-input--prepend .devui-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.devui-input--append .devui-input__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.devui-input-slot{display:inline-flex;width:100%;align-items:stretch}.devui-input-slot__prepend,.devui-input-slot__append{color:var(--devui-text);position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:100%;padding:0 20px;white-space:nowrap;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-form-control-bg, #ffffff)}.devui-input-slot__prepend .devui-button,.devui-input-slot__prepend .devui-select .devui-select__selection,.devui-input-slot__append .devui-button,.devui-input-slot__append .devui-select .devui-select__selection{border:none!important;background-color:transparent!important;color:inherit}.devui-input-slot__prepend .devui-button,.devui-input-slot__prepend .devui-select__selection,.devui-input-slot__append .devui-button,.devui-input-slot__append .devui-select__selection{margin:0 -20px}.devui-input-slot__prepend{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.devui-input-slot__append{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.devui-input-slot__prefix,.devui-input-slot__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;align-items:center}.devui-input-slot__prefix>*{margin-right:8px}.devui-input-slot__suffix>*{margin-left:8px}.devui-input__clear--icon,.devui-input__password--icon{cursor:pointer}.devui-input--gray-style:not(.devui-input--disabled) .devui-input__wrapper:not(.devui-input--error){background:#f5f5f5;border-color:#f5f5f5}.devui-input--gray-style:not(.devui-input--disabled) .devui-input__wrapper:not(.devui-input--error):hover{background:#ebebeb;border-color:#ebebeb}body[ui-theme=galaxy-theme] .devui-input__inner:-webkit-autofill,body[ui-theme=galaxy-theme] .devui-input__inner:-webkit-autofill:hover,body[ui-theme=galaxy-theme] .devui-input__inner:-webkit-autofill:focus,body[ui-theme=galaxy-theme] .devui-input__inner:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px transparent inset!important;box-shadow:0 0 0 1000px transparent inset!important;caret-color:#fff}body[ui-theme=galaxy-theme] .devui-input__inner:-internal-autofill-previewed,body[ui-theme=galaxy-theme] .devui-input__inner:-internal-autofill-selected{-webkit-text-fill-color:var(--devui-text, #252b3a);transition:background-color 99999s ease-out .5s}
|
package/input-number/index.es.js
CHANGED
|
@@ -66,7 +66,7 @@ const inputNumberProps = {
|
|
|
66
66
|
default: ""
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
function createBem(namespace, element, modifier) {
|
|
69
|
+
function createBem$1(namespace, element, modifier) {
|
|
70
70
|
let cls = namespace;
|
|
71
71
|
if (element) {
|
|
72
72
|
cls += `__${element}`;
|
|
@@ -76,12 +76,12 @@ function createBem(namespace, element, modifier) {
|
|
|
76
76
|
}
|
|
77
77
|
return cls;
|
|
78
78
|
}
|
|
79
|
-
function useNamespace(block, needDot = false) {
|
|
79
|
+
function useNamespace$1(block, needDot = false) {
|
|
80
80
|
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
81
|
-
const b = () => createBem(namespace);
|
|
82
|
-
const e = (element) => element ? createBem(namespace, element) : "";
|
|
83
|
-
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
84
|
-
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
81
|
+
const b = () => createBem$1(namespace);
|
|
82
|
+
const e = (element) => element ? createBem$1(namespace, element) : "";
|
|
83
|
+
const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
|
|
84
|
+
const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
|
|
85
85
|
return {
|
|
86
86
|
b,
|
|
87
87
|
e,
|
|
@@ -89,7 +89,7 @@ function useNamespace(block, needDot = false) {
|
|
|
89
89
|
em
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
const ns$3 = useNamespace("input-number");
|
|
92
|
+
const ns$3 = useNamespace$1("input-number");
|
|
93
93
|
function IncIcon() {
|
|
94
94
|
return createVNode("svg", {
|
|
95
95
|
"class": ns$3.e("icon-arrow"),
|
|
@@ -153,6 +153,29 @@ function lockScroll() {
|
|
|
153
153
|
}
|
|
154
154
|
const isNumber = (value) => typeof value === "number";
|
|
155
155
|
const isUndefined = (value) => value === void 0;
|
|
156
|
+
function createBem(namespace, element, modifier) {
|
|
157
|
+
let cls = namespace;
|
|
158
|
+
if (element) {
|
|
159
|
+
cls += `__${element}`;
|
|
160
|
+
}
|
|
161
|
+
if (modifier) {
|
|
162
|
+
cls += `--${modifier}`;
|
|
163
|
+
}
|
|
164
|
+
return cls;
|
|
165
|
+
}
|
|
166
|
+
function useNamespace(block, needDot = false) {
|
|
167
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
168
|
+
const b = () => createBem(namespace);
|
|
169
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
170
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
171
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
172
|
+
return {
|
|
173
|
+
b,
|
|
174
|
+
e,
|
|
175
|
+
m,
|
|
176
|
+
em
|
|
177
|
+
};
|
|
178
|
+
}
|
|
156
179
|
const formProps = {
|
|
157
180
|
data: {
|
|
158
181
|
type: Object,
|
|
@@ -199,9 +222,18 @@ const formProps = {
|
|
|
199
222
|
hideRequiredMark: {
|
|
200
223
|
type: Boolean,
|
|
201
224
|
default: false
|
|
225
|
+
},
|
|
226
|
+
styleType: {
|
|
227
|
+
type: String,
|
|
228
|
+
default: "default"
|
|
229
|
+
},
|
|
230
|
+
appendToBodyScrollStrategy: {
|
|
231
|
+
type: String,
|
|
232
|
+
default: "reposition"
|
|
202
233
|
}
|
|
203
234
|
};
|
|
204
235
|
const FORM_TOKEN = Symbol("dForm");
|
|
236
|
+
const STYLE_TOKEN = Symbol("dForm");
|
|
205
237
|
function useFieldCollection() {
|
|
206
238
|
const itemContexts = [];
|
|
207
239
|
const addItemContext = (field) => {
|
|
@@ -1392,7 +1424,7 @@ var lodash = { exports: {} };
|
|
|
1392
1424
|
if (typeof func != "function") {
|
|
1393
1425
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
1394
1426
|
}
|
|
1395
|
-
return
|
|
1427
|
+
return setTimeout2(function() {
|
|
1396
1428
|
func.apply(undefined$1, args);
|
|
1397
1429
|
}, wait);
|
|
1398
1430
|
}
|
|
@@ -3201,7 +3233,7 @@ var lodash = { exports: {} };
|
|
|
3201
3233
|
return object4[key];
|
|
3202
3234
|
}
|
|
3203
3235
|
var setData = shortOut(baseSetData);
|
|
3204
|
-
var
|
|
3236
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3205
3237
|
return root.setTimeout(func, wait);
|
|
3206
3238
|
};
|
|
3207
3239
|
var setToString = shortOut(baseSetToString);
|
|
@@ -3993,7 +4025,7 @@ var lodash = { exports: {} };
|
|
|
3993
4025
|
}
|
|
3994
4026
|
function leadingEdge(time) {
|
|
3995
4027
|
lastInvokeTime = time;
|
|
3996
|
-
timerId =
|
|
4028
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3997
4029
|
return leading ? invokeFunc(time) : result2;
|
|
3998
4030
|
}
|
|
3999
4031
|
function remainingWait(time) {
|
|
@@ -4009,7 +4041,7 @@ var lodash = { exports: {} };
|
|
|
4009
4041
|
if (shouldInvoke(time)) {
|
|
4010
4042
|
return trailingEdge(time);
|
|
4011
4043
|
}
|
|
4012
|
-
timerId =
|
|
4044
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
4013
4045
|
}
|
|
4014
4046
|
function trailingEdge(time) {
|
|
4015
4047
|
timerId = undefined$1;
|
|
@@ -4040,12 +4072,12 @@ var lodash = { exports: {} };
|
|
|
4040
4072
|
}
|
|
4041
4073
|
if (maxing) {
|
|
4042
4074
|
clearTimeout(timerId);
|
|
4043
|
-
timerId =
|
|
4075
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4044
4076
|
return invokeFunc(lastCallTime);
|
|
4045
4077
|
}
|
|
4046
4078
|
}
|
|
4047
4079
|
if (timerId === undefined$1) {
|
|
4048
|
-
timerId =
|
|
4080
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4049
4081
|
}
|
|
4050
4082
|
return result2;
|
|
4051
4083
|
}
|
|
@@ -5708,6 +5740,7 @@ defineComponent({
|
|
|
5708
5740
|
addItemContext,
|
|
5709
5741
|
removeItemContext
|
|
5710
5742
|
})));
|
|
5743
|
+
provide(STYLE_TOKEN, props.styleType);
|
|
5711
5744
|
ctx.expose({
|
|
5712
5745
|
validate,
|
|
5713
5746
|
validateFields,
|
|
@@ -5749,7 +5782,7 @@ const formItemProps = {
|
|
|
5749
5782
|
default: void 0
|
|
5750
5783
|
},
|
|
5751
5784
|
helpTips: {
|
|
5752
|
-
type: String,
|
|
5785
|
+
type: [String, Object],
|
|
5753
5786
|
default: ""
|
|
5754
5787
|
},
|
|
5755
5788
|
feedbackStatus: {
|
|
@@ -5762,12 +5795,6 @@ const formItemProps = {
|
|
|
5762
5795
|
};
|
|
5763
5796
|
const FORM_ITEM_TOKEN = Symbol("dFormItem");
|
|
5764
5797
|
const LABEL_DATA = Symbol("labelData");
|
|
5765
|
-
const formLabelProps = {
|
|
5766
|
-
helpTips: {
|
|
5767
|
-
type: String,
|
|
5768
|
-
default: ""
|
|
5769
|
-
}
|
|
5770
|
-
};
|
|
5771
5798
|
const fixedOverlayProps = {
|
|
5772
5799
|
modelValue: {
|
|
5773
5800
|
type: Boolean,
|
|
@@ -5814,7 +5841,7 @@ defineComponent({
|
|
|
5814
5841
|
const {
|
|
5815
5842
|
modelValue
|
|
5816
5843
|
} = toRefs(props);
|
|
5817
|
-
const ns2 = useNamespace("fixed-overlay");
|
|
5844
|
+
const ns2 = useNamespace$1("fixed-overlay");
|
|
5818
5845
|
const {
|
|
5819
5846
|
onClick
|
|
5820
5847
|
} = useFixedOverlay(props, ctx);
|
|
@@ -5980,7 +6007,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
5980
6007
|
emit,
|
|
5981
6008
|
expose
|
|
5982
6009
|
}) {
|
|
5983
|
-
const ns2 = useNamespace("flexible-overlay");
|
|
6010
|
+
const ns2 = useNamespace$1("flexible-overlay");
|
|
5984
6011
|
const {
|
|
5985
6012
|
clickEventBubble
|
|
5986
6013
|
} = toRefs(props);
|
|
@@ -6009,7 +6036,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
6009
6036
|
});
|
|
6010
6037
|
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
6011
6038
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
6012
|
-
const ns$2 = useNamespace("popper-trigger");
|
|
6039
|
+
const ns$2 = useNamespace$1("popper-trigger");
|
|
6013
6040
|
function wrapContent(content) {
|
|
6014
6041
|
return h("span", { class: ns$2.b() }, content);
|
|
6015
6042
|
}
|
|
@@ -6196,7 +6223,7 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
6196
6223
|
});
|
|
6197
6224
|
return { placement, handlePositionChange, onMouseenter, onMouseleave };
|
|
6198
6225
|
}
|
|
6199
|
-
const ns$1 = useNamespace("popover");
|
|
6226
|
+
const ns$1 = useNamespace$1("popover");
|
|
6200
6227
|
function SuccessIcon$1() {
|
|
6201
6228
|
return createVNode("svg", {
|
|
6202
6229
|
"class": [ns$1.e("icon"), ns$1.em("icon", "success")],
|
|
@@ -6298,7 +6325,7 @@ var PopoverIcon = defineComponent({
|
|
|
6298
6325
|
}
|
|
6299
6326
|
},
|
|
6300
6327
|
setup(props) {
|
|
6301
|
-
const ns2 = useNamespace("popover");
|
|
6328
|
+
const ns2 = useNamespace$1("popover");
|
|
6302
6329
|
return () => props.type && props.type !== "default" && createVNode("span", {
|
|
6303
6330
|
"class": ns2.e("icon-wrap")
|
|
6304
6331
|
}, [props.type === "success" && createVNode(SuccessIcon$1, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon$1, null, null)]);
|
|
@@ -6335,7 +6362,7 @@ var Popover = defineComponent({
|
|
|
6335
6362
|
const {
|
|
6336
6363
|
overlayStyles
|
|
6337
6364
|
} = usePopover(props, visible, placement, origin, popoverRef);
|
|
6338
|
-
const ns2 = useNamespace("popover");
|
|
6365
|
+
const ns2 = useNamespace$1("popover");
|
|
6339
6366
|
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
6340
6367
|
watch(visible, (newVal) => {
|
|
6341
6368
|
if (newVal) {
|
|
@@ -6469,6 +6496,12 @@ function useFormLabel() {
|
|
|
6469
6496
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
6470
6497
|
const labelData = inject(LABEL_DATA);
|
|
6471
6498
|
const ns2 = useNamespace("form");
|
|
6499
|
+
const defaultTipsPopover = {
|
|
6500
|
+
content: "",
|
|
6501
|
+
position: ["top"],
|
|
6502
|
+
trigger: "hover",
|
|
6503
|
+
popType: "info"
|
|
6504
|
+
};
|
|
6472
6505
|
const labelClasses = computed(() => ({
|
|
6473
6506
|
[`${ns2.e("label")}`]: true,
|
|
6474
6507
|
[`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
|
|
@@ -6480,17 +6513,24 @@ function useFormLabel() {
|
|
|
6480
6513
|
[`${ns2.em("label", "required")}`]: formItemContext.isRequired,
|
|
6481
6514
|
[`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
|
|
6482
6515
|
}));
|
|
6483
|
-
|
|
6516
|
+
const tipsPopover = computed(() => {
|
|
6517
|
+
if (typeof labelData.value.helpTips === "string") {
|
|
6518
|
+
return __spreadProps(__spreadValues({}, defaultTipsPopover), { content: labelData.value.helpTips });
|
|
6519
|
+
} else {
|
|
6520
|
+
return __spreadValues(__spreadValues({}, defaultTipsPopover), labelData.value.helpTips);
|
|
6521
|
+
}
|
|
6522
|
+
});
|
|
6523
|
+
return { labelClasses, labelInnerClasses, tipsPopover };
|
|
6484
6524
|
}
|
|
6485
6525
|
var formLabel = "";
|
|
6486
6526
|
var FormLabel = defineComponent({
|
|
6487
6527
|
name: "DFormLabel",
|
|
6488
|
-
|
|
6489
|
-
setup(props, ctx) {
|
|
6528
|
+
setup(_, ctx) {
|
|
6490
6529
|
const ns2 = useNamespace("form");
|
|
6491
6530
|
const {
|
|
6492
6531
|
labelClasses,
|
|
6493
|
-
labelInnerClasses
|
|
6532
|
+
labelInnerClasses,
|
|
6533
|
+
tipsPopover
|
|
6494
6534
|
} = useFormLabel();
|
|
6495
6535
|
return () => {
|
|
6496
6536
|
var _a, _b;
|
|
@@ -6498,12 +6538,9 @@ var FormLabel = defineComponent({
|
|
|
6498
6538
|
"class": labelClasses.value
|
|
6499
6539
|
}, [createVNode("span", {
|
|
6500
6540
|
"class": labelInnerClasses.value
|
|
6501
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]),
|
|
6502
|
-
"
|
|
6503
|
-
|
|
6504
|
-
"trigger": "hover",
|
|
6505
|
-
"pop-type": "info"
|
|
6506
|
-
}, {
|
|
6541
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), tipsPopover.value.content && createVNode(Popover, mergeProps({
|
|
6542
|
+
"class": ns2.e("label-tips-popover")
|
|
6543
|
+
}, tipsPopover.value), {
|
|
6507
6544
|
default: () => [createVNode(HelpTipsIcon, {
|
|
6508
6545
|
"class": ns2.e("label-help")
|
|
6509
6546
|
}, null), createTextVNode(",")]
|
|
@@ -6534,7 +6571,7 @@ function useFormControl(props) {
|
|
|
6534
6571
|
[ns2.em("control-container", "has-feedback")]: Boolean(feedbackStatus == null ? void 0 : feedbackStatus.value),
|
|
6535
6572
|
[ns2.em("control-container", "feedback-error")]: Boolean((feedbackStatus == null ? void 0 : feedbackStatus.value) === "error")
|
|
6536
6573
|
}));
|
|
6537
|
-
return { controlClasses, controlContainerClasses };
|
|
6574
|
+
return { controlClasses, controlContainerClasses, labelData };
|
|
6538
6575
|
}
|
|
6539
6576
|
function useFormControlValidate() {
|
|
6540
6577
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
@@ -6551,11 +6588,15 @@ var FormControl = defineComponent({
|
|
|
6551
6588
|
name: "DFormControl",
|
|
6552
6589
|
props: formControlProps,
|
|
6553
6590
|
setup(props, ctx) {
|
|
6591
|
+
const formContext = inject(FORM_TOKEN);
|
|
6554
6592
|
const formControl2 = ref();
|
|
6593
|
+
const popoverRef = ref();
|
|
6555
6594
|
const ns2 = useNamespace("form");
|
|
6595
|
+
const showPopoverClick = ref(true);
|
|
6556
6596
|
const {
|
|
6557
6597
|
controlClasses,
|
|
6558
|
-
controlContainerClasses
|
|
6598
|
+
controlContainerClasses,
|
|
6599
|
+
labelData
|
|
6559
6600
|
} = useFormControl(props);
|
|
6560
6601
|
const {
|
|
6561
6602
|
feedbackStatus,
|
|
@@ -6565,17 +6606,52 @@ var FormControl = defineComponent({
|
|
|
6565
6606
|
errorMessage,
|
|
6566
6607
|
popPosition
|
|
6567
6608
|
} = useFormControlValidate();
|
|
6609
|
+
const align = computed(() => {
|
|
6610
|
+
var _a, _b;
|
|
6611
|
+
if ((_a = popPosition.value) == null ? void 0 : _a.some((item) => item.includes("start"))) {
|
|
6612
|
+
return "start";
|
|
6613
|
+
}
|
|
6614
|
+
if ((_b = popPosition.value) == null ? void 0 : _b.some((item) => item.includes("end"))) {
|
|
6615
|
+
return "end";
|
|
6616
|
+
}
|
|
6617
|
+
return void 0;
|
|
6618
|
+
});
|
|
6619
|
+
const onDocumentClick = (e) => {
|
|
6620
|
+
const composedPath = e.composedPath();
|
|
6621
|
+
if (composedPath.includes(popoverRef.value.triggerEl)) {
|
|
6622
|
+
showPopoverClick.value = true;
|
|
6623
|
+
} else {
|
|
6624
|
+
showPopoverClick.value = false;
|
|
6625
|
+
}
|
|
6626
|
+
};
|
|
6627
|
+
watch(showPopover, (val) => {
|
|
6628
|
+
if (val) {
|
|
6629
|
+
setTimeout(() => {
|
|
6630
|
+
document.addEventListener("click", onDocumentClick);
|
|
6631
|
+
});
|
|
6632
|
+
} else {
|
|
6633
|
+
showPopoverClick.value = true;
|
|
6634
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6635
|
+
}
|
|
6636
|
+
});
|
|
6637
|
+
onUnmounted(() => {
|
|
6638
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6639
|
+
});
|
|
6568
6640
|
return () => createVNode("div", {
|
|
6569
6641
|
"class": controlClasses.value,
|
|
6570
6642
|
"ref": formControl2
|
|
6571
6643
|
}, [createVNode("div", {
|
|
6572
6644
|
"class": controlContainerClasses.value
|
|
6573
6645
|
}, [createVNode(Popover, {
|
|
6574
|
-
"
|
|
6646
|
+
"ref": popoverRef,
|
|
6647
|
+
"is-open": showPopover.value && showPopoverClick.value,
|
|
6575
6648
|
"trigger": "manually",
|
|
6576
6649
|
"content": errorMessage.value,
|
|
6577
6650
|
"pop-type": "error",
|
|
6578
|
-
"position": popPosition.value
|
|
6651
|
+
"position": popPosition.value,
|
|
6652
|
+
"align": align.value,
|
|
6653
|
+
"scroll-element": "auto",
|
|
6654
|
+
"append-to-body-scroll-strategy": formContext.appendToBodyScrollStrategy
|
|
6579
6655
|
}, {
|
|
6580
6656
|
default: () => {
|
|
6581
6657
|
var _a, _b;
|
|
@@ -6587,7 +6663,7 @@ var FormControl = defineComponent({
|
|
|
6587
6663
|
"class": ns2.e("control-info")
|
|
6588
6664
|
}, [showMessage.value && createVNode("div", {
|
|
6589
6665
|
"class": "error-message"
|
|
6590
|
-
}, [errorMessage.value]), props.extraInfo && createVNode("div", {
|
|
6666
|
+
}, [errorMessage.value]), labelData.value.formItemCtx.slots.extraInfo ? labelData.value.formItemCtx.slots.extraInfo() : props.extraInfo && createVNode("div", {
|
|
6591
6667
|
"class": ns2.e("control-extra")
|
|
6592
6668
|
}, [props.extraInfo])])]);
|
|
6593
6669
|
}
|
|
@@ -7770,7 +7846,9 @@ defineComponent({
|
|
|
7770
7846
|
const labelData = computed(() => ({
|
|
7771
7847
|
layout: formContext.layout,
|
|
7772
7848
|
labelSize: formContext.labelSize,
|
|
7773
|
-
labelAlign: formContext.labelAlign
|
|
7849
|
+
labelAlign: formContext.labelAlign,
|
|
7850
|
+
helpTips: helpTips.value,
|
|
7851
|
+
formItemCtx: ctx
|
|
7774
7852
|
}));
|
|
7775
7853
|
provide(LABEL_DATA, labelData);
|
|
7776
7854
|
const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
|
|
@@ -7786,6 +7864,7 @@ defineComponent({
|
|
|
7786
7864
|
}));
|
|
7787
7865
|
provide(FORM_ITEM_TOKEN, context);
|
|
7788
7866
|
ctx.expose({
|
|
7867
|
+
validate,
|
|
7789
7868
|
resetField,
|
|
7790
7869
|
clearValidate
|
|
7791
7870
|
});
|
|
@@ -7799,9 +7878,7 @@ defineComponent({
|
|
|
7799
7878
|
});
|
|
7800
7879
|
return () => createVNode("div", {
|
|
7801
7880
|
"class": itemClasses.value
|
|
7802
|
-
}, [createVNode(FormLabel, {
|
|
7803
|
-
"help-tips": helpTips.value
|
|
7804
|
-
}, {
|
|
7881
|
+
}, [createVNode(FormLabel, null, {
|
|
7805
7882
|
default: () => [ctx.slots.label ? ctx.slots.label() : label == null ? void 0 : label.value]
|
|
7806
7883
|
}), createVNode(FormControl, {
|
|
7807
7884
|
"feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
|
|
@@ -7836,7 +7913,7 @@ defineComponent({
|
|
|
7836
7913
|
};
|
|
7837
7914
|
}
|
|
7838
7915
|
});
|
|
7839
|
-
const ns = useNamespace("input-number");
|
|
7916
|
+
const ns = useNamespace$1("input-number");
|
|
7840
7917
|
function useRender(props, ctx) {
|
|
7841
7918
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
7842
7919
|
const _a = ctx.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
|