y-design-ssr 1.0.0 → 1.1.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/libs/cell/index.css +1 -1
- package/libs/cell/index.umd.js +1 -1
- package/libs/checkbox/index.mjs +1 -1
- package/libs/checkbox/index.umd.js +1 -1
- package/libs/checkboxGroup/index.mjs +2 -2
- package/libs/checkboxGroup/index.umd.js +1 -1
- package/libs/col/index.mjs +3 -3
- package/libs/col/index.umd.js +1 -1
- package/libs/context/relation/inject.d.ts +1 -1
- package/libs/context/relation/provide.d.ts +3 -3
- package/libs/dialog/index.css +1 -1
- package/libs/dialog/index.mjs +321 -287
- package/libs/dialog/index.umd.js +2 -2
- package/libs/dropdown/index.css +1 -0
- package/libs/dropdown/index.d.ts +68 -0
- package/libs/dropdown/index.mjs +215 -0
- package/libs/dropdown/index.umd.js +2 -0
- package/libs/dropdown/package.json +6 -0
- package/libs/dropdown/src/dropdown.d.ts +108 -0
- package/libs/dropdownItem/index.css +1 -0
- package/libs/dropdownItem/index.d.ts +50 -0
- package/libs/dropdownItem/index.mjs +645 -0
- package/libs/dropdownItem/index.umd.js +2 -0
- package/libs/dropdownItem/package.json +6 -0
- package/libs/dropdownItem/src/dropdown-item.d.ts +89 -0
- package/libs/form/index.mjs +3 -3
- package/libs/form/index.umd.js +1 -1
- package/libs/formItem/index.mjs +1 -1
- package/libs/formItem/index.umd.js +1 -1
- package/libs/index.css +1 -1
- package/libs/index.d.ts +3 -1
- package/libs/index.mjs +1919 -1608
- package/libs/index.umd.js +2 -2
- package/libs/layout/index.mjs +4 -4
- package/libs/layout/index.umd.js +1 -1
- package/libs/popup/index.css +1 -1
- package/libs/popup/index.d.ts +18 -0
- package/libs/popup/index.mjs +135 -101
- package/libs/popup/index.umd.js +2 -2
- package/libs/popup/src/popup.d.ts +18 -0
- package/libs/row/index.mjs +3 -3
- package/libs/row/index.umd.js +1 -1
- package/libs/swipe/index.mjs +3 -3
- package/libs/swipe/index.umd.js +1 -1
- package/libs/swipeItem/index.mjs +1 -1
- package/libs/swipeItem/index.umd.js +1 -1
- package/libs/tab/index.mjs +1 -1
- package/libs/tab/index.umd.js +1 -1
- package/libs/tabs/index.mjs +3 -3
- package/libs/tabs/index.umd.js +1 -1
- package/libs/utils/index.mjs +35 -34
- package/libs/utils/index.umd.js +1 -1
- package/libs/utils/types.d.ts +4 -0
- package/package.json +1 -1
package/libs/utils/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ref as m, reactive as g } from "vue";
|
|
2
|
-
const n = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`,
|
|
2
|
+
const n = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, y = n("Arguments"), F = n("Function"), j = n("String"), U = n("Number"), D = n("Date"), G = n("RegExp"), W = n("Error"), I = n("Symbol"), _ = n("Map"), q = n("WeakMap"), w = n("Set"), K = n("WeakSet"), Q = n("Object"), X = n("Promise"), a = (e, t) => t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce((c, r) => c + a(e, r), "") : Object.keys(t).reduce(
|
|
3
3
|
(c, r) => c + (t[r] ? a(e, r) : ""),
|
|
4
4
|
""
|
|
5
|
-
) : "",
|
|
6
|
-
let r = t,
|
|
7
|
-
return r && typeof r != "string" && (
|
|
8
|
-
},
|
|
5
|
+
) : "", d = (e) => (t, c) => {
|
|
6
|
+
let r = t, u = c;
|
|
7
|
+
return r && typeof r != "string" && (u = r, r = ""), r = r ? `${e}__${r}` : e, `${r}${a(r, u)}`;
|
|
8
|
+
}, o = () => (e, t) => t ? `${a(`y-${e}`, t)}` : `y-${e}`, f = {
|
|
9
9
|
"pull-refresh": {
|
|
10
10
|
pulling: "下拉刷新...",
|
|
11
11
|
loosing: "释放刷新...",
|
|
@@ -16,24 +16,24 @@ const n = (e) => (t) => Object.prototype.toString.call(t) === `[object ${e}]`, A
|
|
|
16
16
|
"form-item": {
|
|
17
17
|
validateMessage: "请输入正确内容"
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, s = m("zh-CN"), l = g({
|
|
20
20
|
"zh-CN": f
|
|
21
21
|
}), p = {
|
|
22
22
|
text() {
|
|
23
|
-
return l[
|
|
23
|
+
return l[s.value];
|
|
24
24
|
},
|
|
25
25
|
use(e, t) {
|
|
26
|
-
|
|
26
|
+
s.value = e, this.add({ [e]: t });
|
|
27
27
|
},
|
|
28
28
|
add(e = {}) {
|
|
29
29
|
Object.assign(l, e);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, Y = (e) => {
|
|
32
32
|
const t = `y-${e}`;
|
|
33
|
-
return [t,
|
|
34
|
-
},
|
|
35
|
-
var b = /* @__PURE__ */ ((e) => (e.Mini = "mini", e.Small = "small", e.Middle = "middle", e.Large = "large", e))(b || {}), i = /* @__PURE__ */ ((e) => (e.Left = "left", e.Center = "center", e.Right = "right", e))(i || {}), N = /* @__PURE__ */ ((e) => (e.Top = "top", e.Middle = "middle", e.Bottom = "bottom", e))(N || {}),
|
|
36
|
-
const
|
|
33
|
+
return [t, d(t), o()];
|
|
34
|
+
}, Z = (e) => p.text()[e];
|
|
35
|
+
var b = /* @__PURE__ */ ((e) => (e.Mini = "mini", e.Small = "small", e.Middle = "middle", e.Large = "large", e))(b || {}), i = /* @__PURE__ */ ((e) => (e.Left = "left", e.Center = "center", e.Right = "right", e))(i || {}), N = /* @__PURE__ */ ((e) => (e.Top = "top", e.Middle = "middle", e.Bottom = "bottom", e))(N || {}), v = /* @__PURE__ */ ((e) => (e.Relative = "relative", e.Absolute = "absolute", e.Fixed = "fixed", e))(v || {}), h = /* @__PURE__ */ ((e) => (e.Top = "top", e.Right = "right", e.Bottom = "bottom", e.Left = "left", e.Center = "center", e))(h || {}), E = /* @__PURE__ */ ((e) => (e.clockwise = "clockwise", e.counterclockwise = "counterclockwise", e))(E || {}), x = /* @__PURE__ */ ((e) => (e.simple = "simple", e.multi = "multi", e))(x || {}), $ = /* @__PURE__ */ ((e) => (e.Top = "top", e.TopStart = "top-start", e.TopEnd = "top-end", e.Right = "right", e.RightStart = "right-start", e.RightEnd = "right-end", e.Left = "left", e.LeftStart = "left-start", e.LeftEnd = "left-end", e.Bottom = "bottom", e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e))($ || {}), O = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(O || {}), B = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(B || {}), L = /* @__PURE__ */ ((e) => (e.Flex = "flex", e.Default = "", e))(L || {}), S = /* @__PURE__ */ ((e) => (e.Start = "start", e.Center = "center", e.End = "end", e.SpaceBetween = "space-between", e.SpaceAround = "space-around", e))(S || {}), C = /* @__PURE__ */ ((e) => (e.DEFUALT = "normal", e.PULLING = "pulling", e.LOOSING = "loosing", e.LOADING = "loading", e.SUCCESS = "success", e.FAILED = "failed", e))(C || {}), M = /* @__PURE__ */ ((e) => (e.ONCHANGE = "onChange", e.ONBLUR = "onBlur", e))(M || {}), k = /* @__PURE__ */ ((e) => (e.UP = "up", e.DOWN = "down", e))(k || {});
|
|
36
|
+
const H = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, R = (e, t) => typeof e == "string" && e.includes("%") && e.includes("%") ? t * Number(e.replace(/%/g, "")) / 100 : Number(e), V = (e) => {
|
|
37
37
|
switch (e) {
|
|
38
38
|
case "top":
|
|
39
39
|
return "column-reverse";
|
|
@@ -48,37 +48,38 @@ const Z = (e) => isNaN(Number(e)) && typeof e == "string" ? e : `${e}px`, H = (e
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
B as Align,
|
|
52
52
|
E as Direction,
|
|
53
|
+
k as DropdownDirection,
|
|
53
54
|
i as Horizontal,
|
|
54
|
-
|
|
55
|
+
h as Location,
|
|
55
56
|
x as PaginationMode,
|
|
56
|
-
|
|
57
|
+
v as Position,
|
|
57
58
|
C as RefreshStatus,
|
|
58
59
|
S as RowJustify,
|
|
59
|
-
|
|
60
|
+
L as RowType,
|
|
60
61
|
b as Size,
|
|
61
|
-
|
|
62
|
+
O as SwipePosition,
|
|
62
63
|
$ as TooltipPosition,
|
|
63
64
|
M as TriggerTypes,
|
|
64
65
|
N as Vertical,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
Z as createLocale,
|
|
67
|
+
Y as createNamespace,
|
|
68
|
+
y as isArguments,
|
|
68
69
|
D as isDate,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
W as isError,
|
|
71
|
+
F as isFunction,
|
|
72
|
+
_ as isMap,
|
|
73
|
+
U as isNumber,
|
|
74
|
+
Q as isObject,
|
|
75
|
+
X as isPromise,
|
|
75
76
|
G as isRegExp,
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
w as isSet,
|
|
78
|
+
j as isString,
|
|
78
79
|
I as isSymbol,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
q as isWeakMap,
|
|
81
|
+
K as isWeakSet,
|
|
82
|
+
V as parseFlexDirection,
|
|
83
|
+
R as parsePercent,
|
|
84
|
+
H as parseUnit
|
|
84
85
|
};
|
package/libs/utils/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.utils={},t.Vue))})(this,function(t,a){"use strict";const n=e=>r=>Object.prototype.toString.call(r)===`[object ${e}]
|
|
1
|
+
(function(t,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.utils={},t.Vue))})(this,function(t,a){"use strict";const n=e=>r=>Object.prototype.toString.call(r)===`[object ${e}]`,p=n("Arguments"),k=n("Function"),A=n("String"),B=n("Number"),D=n("Date"),j=n("RegExp"),C=n("Error"),F=n("Symbol"),U=n("Map"),W=n("WeakMap"),G=n("Set"),w=n("WeakSet"),I=n("Object"),_=n("Promise"),i=(e,r)=>r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((u,c)=>u+i(e,c),""):Object.keys(r).reduce((u,c)=>u+(r[c]?i(e,c):""),""):"",R=e=>(r,u)=>{let c=r,$=u;return c&&typeof c!="string"&&($=c,c=""),c=c?`${e}__${c}`:e,`${c}${i(c,$)}`},q=()=>(e,r)=>r?`${i(`y-${e}`,r)}`:`y-${e}`,H={"pull-refresh":{pulling:"下拉刷新...",loosing:"释放刷新...",loading:"数据加载中...",success:"数据已更新",failed:"数据跟新失败,请稍后再试"},"form-item":{validateMessage:"请输入正确内容"}},s=a.ref("zh-CN"),l=a.reactive({"zh-CN":H}),K={text(){return l[s.value]},use(e,r){s.value=e,this.add({[e]:r})},add(e={}){Object.assign(l,e)}},Q=e=>{const r=`y-${e}`;return[r,R(r),q()]},T=e=>K.text()[e];var d=(e=>(e.Mini="mini",e.Small="small",e.Middle="middle",e.Large="large",e))(d||{}),m=(e=>(e.Left="left",e.Center="center",e.Right="right",e))(m||{}),g=(e=>(e.Top="top",e.Middle="middle",e.Bottom="bottom",e))(g||{}),f=(e=>(e.Relative="relative",e.Absolute="absolute",e.Fixed="fixed",e))(f||{}),o=(e=>(e.Top="top",e.Right="right",e.Bottom="bottom",e.Left="left",e.Center="center",e))(o||{}),b=(e=>(e.clockwise="clockwise",e.counterclockwise="counterclockwise",e))(b||{}),N=(e=>(e.simple="simple",e.multi="multi",e))(N||{}),S=(e=>(e.Top="top",e.TopStart="top-start",e.TopEnd="top-end",e.Right="right",e.RightStart="right-start",e.RightEnd="right-end",e.Left="left",e.LeftStart="left-start",e.LeftEnd="left-end",e.Bottom="bottom",e.BottomStart="bottom-start",e.BottomEnd="bottom-end",e))(S||{}),h=(e=>(e.left="left",e.top="top",e.bottom="bottom",e.right="right",e))(h||{}),v=(e=>(e.start="start",e.center="center",e.end="end",e))(v||{}),E=(e=>(e.Flex="flex",e.Default="",e))(E||{}),y=(e=>(e.Start="start",e.Center="center",e.End="end",e.SpaceBetween="space-between",e.SpaceAround="space-around",e))(y||{}),M=(e=>(e.DEFUALT="normal",e.PULLING="pulling",e.LOOSING="loosing",e.LOADING="loading",e.SUCCESS="success",e.FAILED="failed",e))(M||{}),O=(e=>(e.ONCHANGE="onChange",e.ONBLUR="onBlur",e))(O||{}),L=(e=>(e.UP="up",e.DOWN="down",e))(L||{});const V=e=>isNaN(Number(e))&&typeof e=="string"?e:`${e}px`,X=(e,r)=>typeof e=="string"&&e.includes("%")&&e.includes("%")?r*Number(e.replace(/%/g,""))/100:Number(e),Y=e=>{switch(e){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row";default:return"column"}};t.Align=v,t.Direction=b,t.DropdownDirection=L,t.Horizontal=m,t.Location=o,t.PaginationMode=N,t.Position=f,t.RefreshStatus=M,t.RowJustify=y,t.RowType=E,t.Size=d,t.SwipePosition=h,t.TooltipPosition=S,t.TriggerTypes=O,t.Vertical=g,t.createLocale=T,t.createNamespace=Q,t.isArguments=p,t.isDate=D,t.isError=C,t.isFunction=k,t.isMap=U,t.isNumber=B,t.isObject=I,t.isPromise=_,t.isRegExp=j,t.isSet=G,t.isString=A,t.isSymbol=F,t.isWeakMap=W,t.isWeakSet=w,t.parseFlexDirection=Y,t.parsePercent=X,t.parseUnit=V,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
package/libs/utils/types.d.ts
CHANGED