vft 0.0.313 → 0.0.314
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/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/icon-text/icon-text.vue2.js +21 -15
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/web-types.json +1 -1
|
@@ -3,15 +3,15 @@ import "@vueuse/core";
|
|
|
3
3
|
import { debugWarn as v } from "../../../utils/error.js";
|
|
4
4
|
import "../../../utils/ns-cover.js";
|
|
5
5
|
import "lodash-es";
|
|
6
|
-
import {
|
|
6
|
+
import { ref as g, getCurrentInstance as l, inject as C, computed as i, unref as p, provide as x } from "vue";
|
|
7
7
|
import { namespaceContextKey as I, useNamespace as b, defaultNamespace as y } from "../../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import { zIndexContextKey as G, useZIndex as z, defaultInitialZIndex as K } from "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { configProviderContextKey as m } from "../constants.js";
|
|
12
|
-
const a =
|
|
12
|
+
const a = g();
|
|
13
13
|
function d(o, e = void 0) {
|
|
14
|
-
const n = l() ?
|
|
14
|
+
const n = l() ? C(m, a) : a;
|
|
15
15
|
return o ? i(() => n.value?.[o] ?? e) : n;
|
|
16
16
|
}
|
|
17
17
|
function B(o) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as C, computed as t, createElementBlock as
|
|
1
|
+
import { defineComponent as C, computed as t, createElementBlock as d, openBlock as r, normalizeStyle as T, normalizeClass as k, unref as l, createBlock as s, createCommentVNode as y, mergeProps as u, normalizeProps as S, toDisplayString as w } from "vue";
|
|
2
2
|
import { VftClampTooltip as L } from "../clamp-tooltip/index.js";
|
|
3
|
-
import { VftIcon as
|
|
3
|
+
import { VftIcon as g } from "../icon/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { singleAttrToObj as O, removeUnit as V } from "@vft/utils";
|
|
6
|
-
import { addUnit as
|
|
6
|
+
import { addUnit as h } from "../../utils/helper.js";
|
|
7
7
|
import { generateCssVars as j } from "../../utils/ns-cover.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import { useNamespace as b } from "../../hooks/use-namespace/index.js";
|
|
@@ -31,21 +31,21 @@ const N = { key: 2 }, P = C({
|
|
|
31
31
|
useClamp: { type: Boolean }
|
|
32
32
|
},
|
|
33
33
|
setup(e) {
|
|
34
|
-
const
|
|
35
|
-
const o =
|
|
36
|
-
return
|
|
37
|
-
}),
|
|
34
|
+
const m = b("icon-text"), i = t(() => e.hoverColor ? e.hoverColor : e.color), n = t(() => O(e.icon, "icon", { size: e.size, color: e.color })), v = t(() => e.direction === "col"), f = t(() => {
|
|
35
|
+
const o = h(e.distance);
|
|
36
|
+
return v.value ? e.reverse ? { marginTop: o } : { marginBottom: o } : e.reverse ? { marginLeft: o } : { marginRight: o };
|
|
37
|
+
}), a = t(() => V(e.size)), c = t(() => a.value < 12), p = t(() => a.value && c.value ? { transform: `scale(${a.value / 12})` } : {}), x = t(() => {
|
|
38
38
|
const o = j(
|
|
39
39
|
{
|
|
40
40
|
cursor: e.pointer ? "pointer" : void 0,
|
|
41
41
|
color: e.color,
|
|
42
|
-
"hover-color":
|
|
43
|
-
fontSize:
|
|
42
|
+
"hover-color": i.value,
|
|
43
|
+
fontSize: c.value ? "12px" : h(e.size)
|
|
44
44
|
},
|
|
45
45
|
"icon-text"
|
|
46
46
|
);
|
|
47
47
|
return {
|
|
48
|
-
...
|
|
48
|
+
...c.value && e.adjustOrigin ? { transformOrigin: "left top" } : {},
|
|
49
49
|
...o,
|
|
50
50
|
...p.value
|
|
51
51
|
};
|
|
@@ -55,13 +55,19 @@ const N = { key: 2 }, P = C({
|
|
|
55
55
|
showTooltip: e.showTooltip,
|
|
56
56
|
...e.clampTooltipCfg
|
|
57
57
|
}));
|
|
58
|
-
return (o, B) => (
|
|
59
|
-
class: k([
|
|
58
|
+
return (o, B) => (r(), d("span", {
|
|
59
|
+
class: k([l(m).b(), l(m).is("col", v.value)]),
|
|
60
60
|
style: T(x.value)
|
|
61
61
|
}, [
|
|
62
|
-
!o.reverse &&
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
!o.reverse && n.value?.icon ? (r(), s(l(g), u({ key: 0 }, n.value, {
|
|
63
|
+
"hover-color": i.value,
|
|
64
|
+
style: f.value
|
|
65
|
+
}), null, 16, ["hover-color", "style"])) : y("", !0),
|
|
66
|
+
o.useClamp ? (r(), s(l(L), S(u({ key: 1 }, z.value)), null, 16)) : (r(), d("span", N, w(o.text), 1)),
|
|
67
|
+
o.reverse && n.value?.icon ? (r(), s(l(g), u({ key: 3 }, n.value, {
|
|
68
|
+
style: f.value,
|
|
69
|
+
"hover-color": i.value
|
|
70
|
+
}), null, 16, ["style", "hover-color"])) : y("", !0)
|
|
65
71
|
], 6));
|
|
66
72
|
}
|
|
67
73
|
});
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../clamp-tooltip/index.cjs"),s=require("../icon/index.cjs");require("@vueuse/core");const m=require("@vft/utils"),v=require("../../utils/helper.cjs"),C=require("../../utils/ns-cover.cjs");require("lodash-es");const p=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const B={key:2},k=e.defineComponent({name:"vft-icon-text"}),q=e.defineComponent({...k,props:{text:{},icon:{},color:{},hoverColor:{},distance:{default:3},reverse:{type:Boolean},size:{},direction:{default:"row"},pointer:{type:Boolean},adjustOrigin:{type:Boolean,default:!0},maxLines:{},showTooltip:{type:Boolean},clampTooltipCfg:{},useClamp:{type:Boolean}},setup(o){const c=p.useNamespace("icon-text"),n=e.computed(()=>o.hoverColor?o.hoverColor:o.color),r=e.computed(()=>m.singleAttrToObj(o.icon,"icon",{size:o.size,color:o.color})),u=e.computed(()=>o.direction==="col"),a=e.computed(()=>{const t=v.addUnit(o.distance);return u.value?o.reverse?{marginTop:t}:{marginBottom:t}:o.reverse?{marginLeft:t}:{marginRight:t}}),l=e.computed(()=>m.removeUnit(o.size)),i=e.computed(()=>l.value<12),d=e.computed(()=>l.value&&i.value?{transform:`scale(${l.value/12})`}:{}),f=e.computed(()=>{const t=C.generateCssVars({cursor:o.pointer?"pointer":void 0,color:o.color,"hover-color":n.value,fontSize:i.value?"12px":v.addUnit(o.size)},"icon-text");return{...i.value&&o.adjustOrigin?{transformOrigin:"left top"}:{},...t,...d.value}}),g=e.computed(()=>({text:o.text,maxLines:o.maxLines,showTooltip:o.showTooltip,...o.clampTooltipCfg}));return(t,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass([e.unref(c).b(),e.unref(c).is("col",u.value)]),style:e.normalizeStyle(f.value)},[!t.reverse&&r.value?.icon?(e.openBlock(),e.createBlock(e.unref(s.VftIcon),e.mergeProps({key:0},r.value,{"hover-color":n.value,style:a.value}),null,16,["hover-color","style"])):e.createCommentVNode("",!0),t.useClamp?(e.openBlock(),e.createBlock(e.unref(h.VftClampTooltip),e.normalizeProps(e.mergeProps({key:1},g.value)),null,16)):(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(t.text),1)),t.reverse&&r.value?.icon?(e.openBlock(),e.createBlock(e.unref(s.VftIcon),e.mergeProps({key:3},r.value,{style:a.value,"hover-color":n.value}),null,16,["style","hover-color"])):e.createCommentVNode("",!0)],6))}});exports.default=q;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.314";exports.version=e;
|
package/lib/package.json.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.314",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"sortablejs": "1.15.0",
|
|
57
57
|
"photoswipe": "5.4.4",
|
|
58
58
|
"@vft/store": "0.0.54",
|
|
59
|
-
"@vft/utils": "0.0.127",
|
|
60
|
-
"@vft/use": "0.0.76",
|
|
61
59
|
"@vft/constants": "0.0.72",
|
|
60
|
+
"@vft/router": "0.0.65",
|
|
61
|
+
"@vft/utils": "0.0.127",
|
|
62
62
|
"@vft/directives": "0.0.33",
|
|
63
|
-
"@vft/
|
|
63
|
+
"@vft/use": "0.0.76"
|
|
64
64
|
},
|
|
65
65
|
"vetur": {
|
|
66
66
|
"tags": "tags.json",
|
package/web-types.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"http://json.schemastore.org/web-types","framework":"vue","name":"vft","version":"0.0.
|
|
1
|
+
{"$schema":"http://json.schemastore.org/web-types","framework":"vue","name":"vft","version":"0.0.314","js-types-syntax":"typescript","description-markup":"markdown","contributions":{"html":{}}}
|