vue-devui 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -6
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +27 -16
- package/auto-complete/index.umd.js +11 -11
- package/auto-complete/style.css +1 -1
- package/button/index.es.js +7 -6
- package/button/index.umd.js +5 -5
- package/button/style.css +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +14 -8
- package/checkbox/index.umd.js +8 -8
- package/checkbox/style.css +1 -1
- package/date-picker-pro/index.es.js +135 -133
- package/date-picker-pro/index.umd.js +13 -13
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +22 -5
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +16 -3
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +67 -62
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +14 -8
- package/form/index.umd.js +5 -5
- package/form/style.css +1 -1
- package/icon/index.es.js +2 -1
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +19 -11
- package/input/index.umd.js +4 -4
- package/input/style.css +1 -1
- package/input-number/index.es.js +26 -23
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/loading/index.es.js +51 -51
- package/loading/index.umd.js +1 -1
- package/mention/index.es.js +19 -10
- package/mention/index.umd.js +6 -6
- package/mention/style.css +1 -1
- package/menu/index.es.js +131 -144
- package/menu/index.umd.js +1 -1
- package/menu/style.css +1 -1
- package/message/index.es.js +2 -1
- package/message/index.umd.js +1 -1
- package/message/style.css +1 -1
- package/modal/index.es.js +158 -43
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +7 -9
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/paginationInjectionKey.js +3 -0
- package/overlay/index.es.js +12 -2
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +2 -2
- package/pagination/index.es.js +10161 -278
- package/pagination/index.umd.js +27 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +4 -0
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +13 -5
- package/popover/index.umd.js +9 -9
- package/popover/style.css +1 -1
- package/radio/index.es.js +14 -8
- package/radio/index.umd.js +4 -4
- package/radio/style.css +1 -1
- package/result/index.es.js +2 -1
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +20 -12
- package/search/index.umd.js +4 -4
- package/search/style.css +1 -1
- package/select/index.es.js +126 -104
- package/select/index.umd.js +10 -10
- package/select/style.css +1 -1
- package/skeleton/style.css +1 -1
- package/splitter/index.es.js +30 -7
- package/splitter/index.umd.js +16 -16
- package/splitter/style.css +1 -1
- package/status/index.es.js +4 -0
- package/status/index.umd.js +1 -1
- package/steps/index.es.js +2 -1
- package/steps/index.umd.js +1 -1
- package/steps/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +14 -8
- package/switch/index.umd.js +13 -13
- package/switch/style.css +1 -1
- package/table/index.es.js +154 -60
- package/table/index.umd.js +7 -7
- package/table/style.css +1 -1
- package/tabs/index.es.js +54 -42
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +17 -9
- package/textarea/index.umd.js +13 -13
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +151 -151
- package/time-picker/index.umd.js +14 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +128 -106
- package/time-select/index.umd.js +13 -13
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +2 -1
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +28 -6
- package/tooltip/index.umd.js +7 -7
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +42 -32
- package/tree/index.umd.js +7 -7
- package/tree/style.css +1 -1
- package/upload/index.es.js +9 -10
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +3580 -3269
- package/vue-devui.umd.js +20 -20
- package/nuxt/components/Loading.js +0 -3
package/overlay/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, unref, nextTick } from "vue";
|
|
1
|
+
import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, unref, nextTick, withModifiers } from "vue";
|
|
2
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
3
3
|
const fixedOverlayProps = {
|
|
4
4
|
modelValue: {
|
|
@@ -137,6 +137,10 @@ const flexibleOverlayProps = {
|
|
|
137
137
|
isArrowCenter: {
|
|
138
138
|
type: Boolean,
|
|
139
139
|
default: true
|
|
140
|
+
},
|
|
141
|
+
clickEventBubble: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: false
|
|
140
144
|
}
|
|
141
145
|
};
|
|
142
146
|
function getScrollParent(element) {
|
|
@@ -251,6 +255,9 @@ const FlexibleOverlay = defineComponent({
|
|
|
251
255
|
expose
|
|
252
256
|
}) {
|
|
253
257
|
const ns = useNamespace("flexible-overlay");
|
|
258
|
+
const {
|
|
259
|
+
clickEventBubble
|
|
260
|
+
} = toRefs(props);
|
|
254
261
|
const {
|
|
255
262
|
arrowRef,
|
|
256
263
|
overlayRef,
|
|
@@ -264,7 +271,10 @@ const FlexibleOverlay = defineComponent({
|
|
|
264
271
|
return props.modelValue && createVNode("div", mergeProps({
|
|
265
272
|
"ref": overlayRef,
|
|
266
273
|
"class": ns.b()
|
|
267
|
-
}, attrs
|
|
274
|
+
}, attrs, {
|
|
275
|
+
"onClick": withModifiers(() => ({}), [clickEventBubble.value ? "" : "stop"]),
|
|
276
|
+
"onPointerup": withModifiers(() => ({}), ["stop"])
|
|
277
|
+
}), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
268
278
|
"ref": arrowRef,
|
|
269
279
|
"class": ns.e("arrow")
|
|
270
280
|
}, null)]);
|
package/overlay/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],l):(a=typeof globalThis!="undefined"?globalThis:a||self,l(a.index={},a.Vue,a.dom))})(this,function(a,l,
|
|
1
|
+
(function(a,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],l):(a=typeof globalThis!="undefined"?globalThis:a||self,l(a.index={},a.Vue,a.dom))})(this,function(a,l,m){"use strict";const x={modelValue:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}};function k(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const e=document.documentElement.scrollTop,t=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${e}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{t?document.documentElement.setAttribute("style",t):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=e}}}function P(e,t){let o;const i=s=>{s.preventDefault(),t.emit("click",s),e.closeOnClickOverlay&&t.emit("update:modelValue",!1)},n=()=>{o==null||o()};return l.watch(()=>e.modelValue,s=>{s?e.lockScroll&&(o=k()):n()}),l.onUnmounted(n),{onClick:i}}function y(e,t,o){let i=e;return t&&(i+=`__${t}`),o&&(i+=`--${o}`),i}function g(e,t=!1){const o=t?`.devui-${e}`:`devui-${e}`;return{b:()=>y(o),e:d=>d?y(o,d):"",m:d=>d?y(o,"",d):"",em:(d,c)=>d&&c?y(o,d,c):""}}var T="";const E=l.defineComponent({name:"DFixedOverlay",inheritAttrs:!1,props:x,emits:["update:modelValue","click"],setup(e,t){const{modelValue:o}=l.toRefs(e),i=g("fixed-overlay"),{onClick:n}=P(e,t);return()=>l.createVNode(l.Transition,{name:i.m("fade")},{default:()=>{var s,r;return[o.value&&l.createVNode("div",l.mergeProps({class:i.b()},t.attrs,{onClick:n}),[(r=(s=t.slots).default)==null?void 0:r.call(s)])]}})}}),A={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0},clickEventBubble:{type:Boolean,default:!1}};function L(e){const t=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const i=window.getComputedStyle(o);if(t.test(i.overflow+i.overflowX+i.overflowY))return o}return window}function $(e,t,o,i){let{x:n,y:s}=t;if(!e){const{width:r,height:d}=i;n&&o.includes("start")&&(n=12),n&&o.includes("end")&&(n=Math.round(r-24)),s&&o.includes("start")&&(s=10),s&&o.includes("end")&&(s=d-14)}return{x:n,y:s}}function F(e,t){const o=l.ref(),i=l.ref();let n=null;const s=(d,c,u,f)=>{const{x:w,y:v}=$(e.isArrowCenter,u,c,f.getBoundingClientRect()),h={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(d.style,{left:w?`${w}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[h]:"-4px"})},r=async()=>{const d=e.origin,c=l.unref(o.value),u=l.unref(i.value),f=[m.offset(e.offset),m.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&f.push(m.arrow({element:u})),e.shiftOffset!==void 0&&f.push(m.shift());const{x:w,y:v,placement:h,middlewareData:C}=await m.computePosition(d,c,{strategy:"fixed",middleware:f});let b=w,p=v;if(e.shiftOffset!==void 0){const{x:V,y:B}=C.shift;V<0&&(b-=e.shiftOffset),V>0&&(b+=e.shiftOffset),B<0&&(p-=e.shiftOffset),B>0&&(p+=e.shiftOffset)}t("positionChange",h),Object.assign(c.style,{top:`${p}px`,left:`${b}px`}),e.showArrow&&s(u,h,C.arrow,c)};return l.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(n=L(e.origin),l.nextTick(r),n==null||n.addEventListener("scroll",r),n!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(n==null||n.removeEventListener("scroll",r),n!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),l.onUnmounted(()=>{n==null||n.removeEventListener("scroll",r),n!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:i,overlayRef:o,updatePosition:r}}var j="";const O=l.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:A,emits:["update:modelValue","positionChange"],setup(e,{slots:t,attrs:o,emit:i,expose:n}){const s=g("flexible-overlay"),{clickEventBubble:r}=l.toRefs(e),{arrowRef:d,overlayRef:c,updatePosition:u}=F(e,i);return n({updatePosition:u}),()=>{var f;return e.modelValue&&l.createVNode("div",l.mergeProps({ref:c,class:s.b()},o,{onClick:l.withModifiers(()=>({}),[r.value?"":"stop"]),onPointerup:l.withModifiers(()=>({}),["stop"])}),[(f=t.default)==null?void 0:f.call(t),e.showArrow&&l.createVNode("div",{ref:d,class:s.e("arrow")},null)])}}}),R=typeof window!="undefined";var S={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(e){if(e.component(E.name,E),e.component(O.name,O),R&&!document.getElementById("d-overlay-anchor")){const t=document.createElement("div");t.setAttribute("id","d-overlay-anchor"),t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",document.body.appendChild(t)}}};a.FixedOverlay=E,a.FlexibleOverlay=O,a.default=S,a.fixedOverlayProps=x,a.flexibleOverlayProps=A,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
package/overlay/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));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,
|
|
1
|
+
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));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 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-devui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "DevUI components based on Vite and Vue3",
|
|
6
6
|
"keywords": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/lodash-es": "^4.17.4",
|
|
33
33
|
"@vue/shared": "^3.2.33",
|
|
34
34
|
"@vueuse/core": "8.9.4",
|
|
35
|
-
"async-validator": "^4.0.
|
|
35
|
+
"async-validator": "^4.0.7",
|
|
36
36
|
"dayjs": "^1.11.3",
|
|
37
37
|
"devui-theme": "^0.0.1",
|
|
38
38
|
"fs-extra": "^10.0.0",
|