vue-devui 1.0.0-rc.5 → 1.0.0-rc.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/README.md +22 -8
- package/alert/index.es.js +37 -11
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +72 -26
- package/auto-complete/index.umd.js +5 -5
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +32 -6
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +29 -4
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5548 -76
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +56 -29
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +48 -30
- package/checkbox/index.umd.js +1 -1
- package/checkbox/style.css +1 -1
- package/date-picker/index.es.js +91 -145
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +28 -3
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +39 -13
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +14 -14
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +958 -1200
- package/form/index.umd.js +18 -18
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +29 -5
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +68 -49
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/image-preview/index.es.js +34 -11
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +91 -145
- package/input/index.umd.js +1 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +27 -5
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +34 -6
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +34 -10
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +41 -15
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +40 -13
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Tree.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/formControlProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/overlay/index.es.js +31 -9
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +135 -124
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/popover/index.es.js +53 -24
- package/popover/index.umd.js +13 -13
- package/popover/style.css +1 -1
- package/progress/index.es.js +76 -20
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +32 -7
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +34 -10
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/search/index.es.js +103 -153
- package/search/index.umd.js +14 -14
- package/search/style.css +1 -1
- package/select/index.es.js +74 -51
- package/select/index.umd.js +1 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +37 -12
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +52 -16
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +52 -24
- package/splitter/index.umd.js +15 -15
- package/splitter/style.css +1 -1
- package/status/index.es.js +26 -2
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +30 -6
- package/switch/index.umd.js +1 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +6267 -536
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +32 -8
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +27 -2
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +93 -76
- package/textarea/index.umd.js +1 -1
- package/textarea/style.css +1 -1
- package/tooltip/index.es.js +42 -15
- package/tooltip/index.umd.js +12 -12
- package/tooltip/style.css +1 -1
- package/{comment → tree}/index.d.ts +0 -0
- package/tree/index.es.js +1030 -0
- package/tree/index.umd.js +1 -0
- package/{comment → tree}/package.json +1 -1
- package/tree/style.css +1 -0
- package/upload/index.es.js +53 -22
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +5296 -4916
- package/vue-devui.umd.js +22 -22
- package/comment/index.es.js +0 -84
- package/comment/index.umd.js +0 -1
- package/comment/style.css +0 -1
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/commentProps.js +0 -3
- package/nuxt/components/readTipProps.js +0 -3
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -261
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
package/switch/index.es.js
CHANGED
|
@@ -29,6 +29,29 @@ const switchProps = {
|
|
|
29
29
|
default: void 0
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
function createBem(namespace, element, modifier) {
|
|
33
|
+
let cls = namespace;
|
|
34
|
+
if (element) {
|
|
35
|
+
cls += `__${element}`;
|
|
36
|
+
}
|
|
37
|
+
if (modifier) {
|
|
38
|
+
cls += `--${modifier}`;
|
|
39
|
+
}
|
|
40
|
+
return cls;
|
|
41
|
+
}
|
|
42
|
+
function useNamespace(block) {
|
|
43
|
+
const namespace = `devui-${block}`;
|
|
44
|
+
const b = () => createBem(namespace);
|
|
45
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
46
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
47
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
48
|
+
return {
|
|
49
|
+
b,
|
|
50
|
+
e,
|
|
51
|
+
m,
|
|
52
|
+
em
|
|
53
|
+
};
|
|
54
|
+
}
|
|
32
55
|
var _switch = "";
|
|
33
56
|
var Switch = defineComponent({
|
|
34
57
|
name: "DSwitch",
|
|
@@ -66,11 +89,12 @@ var Switch = defineComponent({
|
|
|
66
89
|
color,
|
|
67
90
|
toggle
|
|
68
91
|
} = this;
|
|
92
|
+
const ns = useNamespace("switch");
|
|
69
93
|
const outerCls = {
|
|
70
|
-
|
|
71
|
-
[
|
|
72
|
-
"
|
|
73
|
-
"
|
|
94
|
+
[ns.b()]: true,
|
|
95
|
+
[ns.m(size)]: size !== "",
|
|
96
|
+
[ns.m("checked")]: checked,
|
|
97
|
+
[ns.m("disabled")]: disabled
|
|
74
98
|
};
|
|
75
99
|
const outerStyle = [`background: ${checked && !disabled ? color : ""}`, `border-color: ${checked && !disabled ? color : ""}`];
|
|
76
100
|
const checkedContent = renderSlot(useSlots(), "checkedContent");
|
|
@@ -80,9 +104,9 @@ var Switch = defineComponent({
|
|
|
80
104
|
"style": outerStyle,
|
|
81
105
|
"onClick": toggle
|
|
82
106
|
}, [createVNode("span", {
|
|
83
|
-
"class": "
|
|
107
|
+
"class": ns.e("inner-wrapper")
|
|
84
108
|
}, [createVNode("div", {
|
|
85
|
-
"class": "
|
|
109
|
+
"class": ns.e("inner")
|
|
86
110
|
}, [checked ? checkedContent : uncheckedContent])]), createVNode("small", null, null)]);
|
|
87
111
|
}
|
|
88
112
|
});
|
package/switch/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n
|
|
1
|
+
(function(c,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(c=typeof globalThis!="undefined"?globalThis:c||self,n(c.index={},c.Vue))})(this,function(c,n){"use strict";const h={size:{type:String,default:"md"},color:{type:String,default:void 0},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},beforeChange:{type:Function,default:void 0},change:{type:Function,default:void 0},"onUpdate:checked":{type:Function,default:void 0}};function a(e,t,s){let d=e;return t&&(d+=`__${t}`),s&&(d+=`--${s}`),d}function f(e){const t=`devui-${e}`;return{b:()=>a(t),e:o=>o?a(t,o):"",m:o=>o?a(t,"",o):"",em:(o,u)=>o&&u?a(t,o,u):""}}var b="",l=n.defineComponent({name:"DSwitch",props:h,emits:["change","update:checked"],setup(e,t){const s=()=>{if(e.disabled)return Promise.resolve(!1);if(e.beforeChange){const i=e.beforeChange(!e.checked);return typeof i=="boolean"?Promise.resolve(i):i}return Promise.resolve(!0)};return{toggle:()=>{s().then(i=>{!i||(t.emit("update:checked",!e.checked),t.emit("change",!e.checked))})}}},render(){const{size:e,checked:t,disabled:s,color:d,toggle:i}=this,r=f("switch"),o={[r.b()]:!0,[r.m(e)]:e!=="",[r.m("checked")]:t,[r.m("disabled")]:s},u=[`background: ${t&&!s?d:""}`,`border-color: ${t&&!s?d:""}`],g=n.renderSlot(n.useSlots(),"checkedContent"),p=n.renderSlot(n.useSlots(),"uncheckedContent");return n.createVNode("span",{class:o,style:u,onClick:i},[n.createVNode("span",{class:r.e("inner-wrapper")},[n.createVNode("div",{class:r.e("inner")},[t?g:p])]),n.createVNode("small",null,null)])}}),m={title:"Switch \u5F00\u5173",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.component(l.name,l)}};c.Switch=l,c.default=m,c.switchProps=h,Object.defineProperty(c,"__esModule",{value:!0}),c[Symbol.toStringTag]="Module"});
|
package/switch/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:inline-block;font-size:0;vertical-align:middle}.devui-switch{width:36px;height:18px;border-radius:10px;background:var(--devui-line, #adb0b8);border:1px solid var(--devui-line, #adb0b8);position:relative;display:inline-block;box-sizing:content-box;overflow:visible;padding:0;margin:0 5px 0 0;cursor:pointer;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch:not(.devui-checked):hover{border-color:var(--devui-line, #adb0b8)}.devui-switch:active{border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-checked:hover{border-color:var(--devui-brand-active, #526ecc)}.devui-switch .devui-
|
|
1
|
+
:host{display:inline-block;font-size:0;vertical-align:middle}.devui-switch{width:36px;height:18px;border-radius:10px;background:var(--devui-line, #adb0b8);border:1px solid var(--devui-line, #adb0b8);position:relative;display:inline-block;box-sizing:content-box;overflow:visible;padding:0;margin:0 5px 0 0;cursor:pointer;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch:not(.devui-switch--checked):hover{border-color:var(--devui-line, #adb0b8)}.devui-switch:active{border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-switch--checked:hover{border-color:var(--devui-brand-active, #526ecc)}.devui-switch .devui-switch__inner-wrapper{display:inline-block;width:100%;height:100%;padding-left:16px;font-size:var(--devui-font-size, 12px);color:var(--devui-global-bg, #f3f6f8)}.devui-switch .devui-switch__inner-wrapper .devui-switch__inner{color:#fff;font-weight:700;display:flex;width:100%;height:100%;align-items:center;justify-content:center;float:right}.devui-switch.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:16px}.devui-switch small{width:16px;height:16px;background:var(--devui-light-text, #ffffff);border-radius:100%;position:absolute;top:1px;left:1px;transition:var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) all}.devui-switch.devui-switch--checked small{left:19px}.devui-switch.devui-switch--lg{width:58px;height:30px;border-radius:16px}.devui-switch.devui-switch--lg .devui-switch__inner-wrapper{padding-left:28px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-switch.devui-switch--lg.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:28px}.devui-switch.devui-switch--lg small{width:28px;height:28px;top:1px;left:1px}.devui-switch.devui-switch--lg.devui-switch--checked small{background:var(--devui-light-text, #ffffff);left:29px}.devui-switch.devui-switch--sm{width:30px;height:14px;border-radius:8px}.devui-switch.devui-switch--sm .devui-switch__inner-wrapper{padding-left:12px;font-size:var(--devui-font-size, 12px)}.devui-switch.devui-switch--sm.devui-switch--checked .devui-switch__inner-wrapper{padding-left:unset;padding-right:12px}.devui-switch.devui-switch--sm small{width:12px;height:12px;position:absolute}.devui-switch.devui-switch--sm.devui-switch--checked small{left:17px}.devui-switch.devui-switch--checked{background:var(--devui-brand, #5e7ce0);border-color:var(--devui-brand, #5e7ce0)}.devui-switch.devui-switch--checked:hover{background:var(--devui-brand-active, #526ecc);border-color:var(--devui-brand-active, #526ecc)}.devui-switch.devui-switch--checked:active{background:var(--devui-brand-active-focus, #344899);border-color:var(--devui-brand-active-focus, #344899)}.devui-switch.devui-switch--disabled,.devui-switch.devui-switch--disabled:hover,.devui-switch.devui-switch--disabled:active,.devui-switch.devui-switch--disabled.devui-switch--checked{cursor:not-allowed}.devui-switch.devui-switch--disabled,.devui-switch.devui-switch--disabled:hover,.devui-switch.devui-switch--disabled:active{background-color:var(--devui-disabled-line, #dfe1e6);border-color:var(--devui-disabled-line, #dfe1e6)}.devui-switch.devui-switch--disabled small,.devui-switch.devui-switch--disabled:hover small,.devui-switch.devui-switch--disabled:active small{background-color:var(--devui-unavailable, #f5f5f6)}.devui-switch.devui-switch--disabled.devui-switch--checked{background-color:var(--devui-icon-fill-active-disabled, #beccfa);border-color:var(--devui-icon-fill-active-disabled, #beccfa)}.devui-switch.devui-switch--disabled.devui-switch--checked small{background-color:var(--devui-light-text, #ffffff)}
|