iking-web-ui-pro 0.0.13 → 0.0.15

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.
@@ -0,0 +1,234 @@
1
+ import { defineComponent as h, computed as k, resolveComponent as p, openBlock as s, createElementBlock as i, normalizeClass as a, normalizeStyle as r, createElementVNode as u, createCommentVNode as v, createBlock as m, withCtx as c, unref as b, mergeModels as z, useModel as I, ref as $, mergeProps as B, createSlots as C, renderSlot as g, createTextVNode as S, toDisplayString as V } from "vue";
2
+ import { ikColor as j } from "iking-utils-pro";
3
+ const y = (n, l) => {
4
+ if (n.install = (o) => {
5
+ for (const t of [n, ...Object.values(l ?? {})])
6
+ o.component(t.name, t);
7
+ }, l)
8
+ for (const [o, t] of Object.entries(l))
9
+ n[o] = t;
10
+ return n;
11
+ }, O = (n, l) => {
12
+ const o = n.__vccOpts || n;
13
+ for (const [t, e] of l)
14
+ o[t] = e;
15
+ return o;
16
+ }, T = { class: "inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center" }, D = {
17
+ key: 1,
18
+ class: "h-[1em] w-[1em]",
19
+ "aria-hidden": "true"
20
+ }, M = ["xlink:href"], N = ["src"], q = {
21
+ key: 1,
22
+ class: "h-[1em] w-[1em]",
23
+ "aria-hidden": "true"
24
+ }, E = ["xlink:href"], F = ["src"], X = /* @__PURE__ */ h({
25
+ name: "IkSvgIcon",
26
+ __name: "index",
27
+ props: {
28
+ name: {},
29
+ flip: {},
30
+ rotate: {},
31
+ color: {},
32
+ opacity: { default: 0.5 },
33
+ size: { default: "" },
34
+ bg: { type: Boolean, default: !1 },
35
+ showBg: { type: Boolean, default: !1 },
36
+ padding: { default: "0" },
37
+ warning: { type: Boolean },
38
+ notip: { type: Boolean, default: !1 },
39
+ title: {}
40
+ },
41
+ setup(n) {
42
+ const l = n, o = k(() => {
43
+ var e;
44
+ return /^http?:\/\//.test(l.name) ? "img" : /i-[^:]+:[^:]+/.test(l.name) ? "unocss" : l.name.startsWith("iksig") ? "iksig" : (e = l.name) != null && e.includes(":") ? "iconify" : "svg";
45
+ }), t = k(() => {
46
+ const e = [];
47
+ if (l.flip)
48
+ switch (l.flip) {
49
+ case "horizontal":
50
+ e.push("rotateY(180deg)");
51
+ break;
52
+ case "vertical":
53
+ e.push("rotateX(180deg)");
54
+ break;
55
+ case "both":
56
+ e.push("rotateX(180deg)"), e.push("rotateY(180deg)");
57
+ break;
58
+ }
59
+ return l.rotate && e.push(`rotate(${l.rotate % 360}deg)`), {
60
+ ...l.color && { color: l.color },
61
+ ...l.size && { fontSize: typeof l.size == "number" ? `${l.size}px` : l.size },
62
+ ...e.length && { transform: e.join(" ") },
63
+ padding: l.padding,
64
+ ...l.color && o.value !== "iksig" ? {
65
+ "--ik-color-icon-dark": l.color,
66
+ "--ik-color-icon-light": j.setOpacity(l.color, l.opacity || 0.4)
67
+ } : {}
68
+ };
69
+ });
70
+ return (e, d) => {
71
+ const f = p("el-tooltip");
72
+ return s(), i("span", T, [
73
+ e.notip || !e.title ? (s(), i(
74
+ "i",
75
+ {
76
+ key: 0,
77
+ class: a(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
78
+ [e.name]: o.value === "unocss",
79
+ "show-bg": e.showBg || e.bg,
80
+ default: e.size === "default",
81
+ small: e.size === "small",
82
+ big: e.size === "big",
83
+ warning: e.warning
84
+ }]),
85
+ style: r(t.value)
86
+ },
87
+ [
88
+ o.value === "iksig" ? (s(), i(
89
+ "i",
90
+ {
91
+ key: 0,
92
+ class: a(`iksig ${e.name}`),
93
+ style: r(t.value)
94
+ },
95
+ null,
96
+ 6
97
+ /* CLASS, STYLE */
98
+ )) : o.value === "svg" ? (s(), i("svg", D, [
99
+ u("use", {
100
+ "xlink:href": `#${e.name}`
101
+ }, null, 8, M)
102
+ ])) : o.value === "img" ? (s(), i("img", {
103
+ key: 2,
104
+ src: e.name,
105
+ class: "h-[1em] w-[1em]"
106
+ }, null, 8, N)) : v("v-if", !0)
107
+ ],
108
+ 6
109
+ /* CLASS, STYLE */
110
+ )) : (s(), m(f, {
111
+ key: 1,
112
+ content: e.title
113
+ }, {
114
+ default: c(() => [
115
+ u(
116
+ "i",
117
+ {
118
+ class: a(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition", {
119
+ [e.name]: o.value === "unocss",
120
+ "show-bg": e.showBg || e.bg,
121
+ default: e.size === "default",
122
+ small: e.size === "small",
123
+ big: e.size === "big",
124
+ warning: e.warning
125
+ }]),
126
+ style: r(t.value)
127
+ },
128
+ [
129
+ o.value === "iksig" ? (s(), i(
130
+ "i",
131
+ {
132
+ key: 0,
133
+ class: a(`iksig ${e.name}`),
134
+ style: r(t.value)
135
+ },
136
+ null,
137
+ 6
138
+ /* CLASS, STYLE */
139
+ )) : o.value === "svg" ? (s(), i("svg", q, [
140
+ u("use", {
141
+ "xlink:href": `#${e.name}`
142
+ }, null, 8, E)
143
+ ])) : o.value === "img" ? (s(), i("img", {
144
+ key: 2,
145
+ src: e.name,
146
+ class: "h-[1em] w-[1em]"
147
+ }, null, 8, F)) : v("v-if", !0)
148
+ ],
149
+ 6
150
+ /* CLASS, STYLE */
151
+ )
152
+ ]),
153
+ _: 1
154
+ /* STABLE */
155
+ }, 8, ["content"]))
156
+ ]);
157
+ };
158
+ }
159
+ }), Y = y(X), P = /* @__PURE__ */ h({
160
+ __name: "CloseIcon",
161
+ setup(n) {
162
+ return (l, o) => (s(), m(b(Y), {
163
+ name: "iksvg_guanbidanchuang",
164
+ warning: "",
165
+ title: "关闭"
166
+ }));
167
+ }
168
+ });
169
+ const U = /* @__PURE__ */ O(P, [["__scopeId", "data-v-c39a4108"]]), W = /* @__PURE__ */ h({
170
+ __name: "IkBaseDialog",
171
+ props: /* @__PURE__ */ z({
172
+ title: { default: "" },
173
+ cancelText: { default: "取消" },
174
+ confirmText: { default: "确认" }
175
+ }, {
176
+ modelValue: {
177
+ type: Boolean,
178
+ default: !1
179
+ },
180
+ modelModifiers: {}
181
+ }),
182
+ emits: ["update:modelValue"],
183
+ setup(n) {
184
+ const l = I(n, "modelValue"), o = $(!1), t = () => {
185
+ o.value = !o.value;
186
+ };
187
+ return (e, d) => {
188
+ const f = p("IkSvgIcon"), _ = p("el-dialog");
189
+ return s(), m(_, B({
190
+ modelValue: l.value,
191
+ "onUpdate:modelValue": d[0] || (d[0] = (w) => l.value = w)
192
+ }, e.$attrs, {
193
+ "close-icon": U,
194
+ fullscreen: o.value
195
+ }), C({
196
+ header: c(() => [
197
+ u("div", null, [
198
+ g(e.$slots, "header", {}, () => [
199
+ S(
200
+ V(e.title),
201
+ 1
202
+ /* TEXT */
203
+ )
204
+ ])
205
+ ]),
206
+ e.$attrs.showClose ? (s(), m(f, {
207
+ key: 0,
208
+ onClick: t,
209
+ name: o.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
210
+ class: "absolute! top-[18px] right-[50px] icon-dialog-full",
211
+ title: o.value ? "退出全屏" : "全屏"
212
+ }, null, 8, ["name", "title"])) : v("v-if", !0)
213
+ ]),
214
+ default: c(() => [
215
+ g(e.$slots, "default")
216
+ ]),
217
+ _: 2
218
+ /* DYNAMIC */
219
+ }, [
220
+ e.$slots.footer ? {
221
+ name: "footer",
222
+ fn: c(() => [
223
+ g(e.$slots, "footer")
224
+ ]),
225
+ key: "0"
226
+ } : void 0
227
+ ]), 1040, ["modelValue", "fullscreen"]);
228
+ };
229
+ }
230
+ }), H = y(W);
231
+ export {
232
+ H as IkBaseDialog,
233
+ H as default
234
+ };
@@ -0,0 +1 @@
1
+ (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.index={},i.Vue,i["iking-utils-pro"]))})(this,function(i,e,d){"use strict";const c=(s,l)=>{if(s.install=n=>{for(const t of[s,...Object.values(l??{})])n.component(t.name,t)},l)for(const[n,t]of Object.entries(l))s[n]=t;return s},f=(s,l)=>{const n=s.__vccOpts||s;for(const[t,o]of l)n[t]=o;return n},p={class:"inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center"},g={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},k=["xlink:href"],u=["src"],h={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},y=["xlink:href"],_=["src"],B=c(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{}},setup(s){const l=s,n=e.computed(()=>{var o;return/^http?:\/\//.test(l.name)?"img":/i-[^:]+:[^:]+/.test(l.name)?"unocss":l.name.startsWith("iksig")?"iksig":(o=l.name)!=null&&o.includes(":")?"iconify":"svg"}),t=e.computed(()=>{const o=[];if(l.flip)switch(l.flip){case"horizontal":o.push("rotateY(180deg)");break;case"vertical":o.push("rotateX(180deg)");break;case"both":o.push("rotateX(180deg)"),o.push("rotateY(180deg)");break}return l.rotate&&o.push(`rotate(${l.rotate%360}deg)`),{...l.color&&{color:l.color},...l.size&&{fontSize:typeof l.size=="number"?`${l.size}px`:l.size},...o.length&&{transform:o.join(" ")},padding:l.padding,...l.color&&n.value!=="iksig"?{"--ik-color-icon-dark":l.color,"--ik-color-icon-light":d.ikColor.setOpacity(l.color,l.opacity||.4)}:{}}});return(o,a)=>{const r=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",p,[o.notip||!o.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[o.name]:n.value==="unocss","show-bg":o.showBg||o.bg,default:o.size==="default",small:o.size==="small",big:o.size==="big",warning:o.warning}]),style:e.normalizeStyle(t.value)},[n.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${o.name}`),style:e.normalizeStyle(t.value)},null,6)):n.value==="svg"?(e.openBlock(),e.createElementBlock("svg",g,[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,k)])):n.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:o.name,class:"h-[1em] w-[1em]"},null,8,u)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(r,{key:1,content:o.title},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[o.name]:n.value==="unocss","show-bg":o.showBg||o.bg,default:o.size==="default",small:o.size==="small",big:o.size==="big",warning:o.warning}]),style:e.normalizeStyle(t.value)},[n.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${o.name}`),style:e.normalizeStyle(t.value)},null,6)):n.value==="svg"?(e.openBlock(),e.createElementBlock("svg",h,[e.createElementVNode("use",{"xlink:href":`#${o.name}`},null,8,y)])):n.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:o.name,class:"h-[1em] w-[1em]"},null,8,_)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),w=e.defineComponent({__name:"CloseIcon",setup(s){return(l,n)=>(e.openBlock(),e.createBlock(e.unref(B),{name:"iksvg_guanbidanchuang",warning:"",title:"关闭"}))}}),S="",C=f(w,[["__scopeId","data-v-c39a4108"]]),m=c(e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const l=e.useModel(s,"modelValue"),n=e.ref(!1),t=()=>{n.value=!n.value};return(o,a)=>{const r=e.resolveComponent("IkSvgIcon"),z=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(z,e.mergeProps({modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=b=>l.value=b)},o.$attrs,{"close-icon":C,fullscreen:n.value}),e.createSlots({header:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])]),o.$attrs.showClose?(e.openBlock(),e.createBlock(r,{key:0,onClick:t,name:n.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:n.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:2},[o.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","fullscreen"])}}}));i.IkBaseDialog=m,i.default=m,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1 @@
1
+ .ik-svg-icon.ik-icon[data-v-c39a4108]{--ik-color-icon-dark: var(--ik-color-bgicon-dark);--ik-color-icon-light: var(--ik-color-bgicon-light)}