abl-ui 0.5.63 → 0.5.64
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/lib/abl-ui.es.js +69 -74
- package/lib/abl-ui.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/abl-ui.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed as M, openBlock as a, createElementBlock as l, normalizeClass as r, Fragment as
|
|
2
|
-
const
|
|
1
|
+
import { computed as M, openBlock as a, createElementBlock as l, normalizeClass as r, Fragment as m, createCommentVNode as h, createElementVNode as f, toDisplayString as b, renderSlot as g, ref as $, watch as V, normalizeStyle as i, renderList as S, withModifiers as x, createTextVNode as z } from "vue";
|
|
2
|
+
const N = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "iconfont-abl icon-abl-loading2 abl-icon-loading"
|
|
5
|
-
},
|
|
5
|
+
}, p = { class: "abl-button__text" }, E = {
|
|
6
6
|
name: "AblButton"
|
|
7
|
-
},
|
|
7
|
+
}, H = /* @__PURE__ */ Object.assign(E, {
|
|
8
8
|
props: {
|
|
9
9
|
type: {
|
|
10
10
|
type: String,
|
|
@@ -44,27 +44,27 @@ const H = {
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
setup(e) {
|
|
47
|
-
const c = e,
|
|
47
|
+
const c = e, s = M(() => ({
|
|
48
48
|
[`abl-button-${c.type}`]: c.type,
|
|
49
49
|
"is-dashed": c.dashed,
|
|
50
50
|
"is-round": c.round,
|
|
51
51
|
"is-circle": c.circle,
|
|
52
52
|
"is-disabled": c.disabled
|
|
53
53
|
}));
|
|
54
|
-
return (n,
|
|
55
|
-
class: r(["abl-button",
|
|
54
|
+
return (n, d) => (a(), l("button", {
|
|
55
|
+
class: r(["abl-button", s.value])
|
|
56
56
|
}, [
|
|
57
|
-
e.loading ? (a(), l(
|
|
58
|
-
e.loading ? (a(), l("i",
|
|
59
|
-
f("span", null,
|
|
60
|
-
], 64)) : (a(), l(
|
|
57
|
+
e.loading ? (a(), l(m, { key: 0 }, [
|
|
58
|
+
e.loading ? (a(), l("i", N)) : h("", !0),
|
|
59
|
+
f("span", null, b(e.loadingText), 1)
|
|
60
|
+
], 64)) : (a(), l(m, { key: 1 }, [
|
|
61
61
|
e.iconPosition === "left" ? g(n.$slots, "icon", { key: 0 }, () => [
|
|
62
62
|
e.icon ? (a(), l("i", {
|
|
63
63
|
key: 0,
|
|
64
64
|
class: r(["iconfont-abl slot-icon-left", e.icon])
|
|
65
65
|
}, null, 2)) : h("", !0)
|
|
66
66
|
]) : h("", !0),
|
|
67
|
-
f("span",
|
|
67
|
+
f("span", p, [
|
|
68
68
|
g(n.$slots, "default")
|
|
69
69
|
]),
|
|
70
70
|
e.iconPosition === "right" ? g(n.$slots, "icon", { key: 1 }, () => [
|
|
@@ -77,20 +77,15 @@ const H = {
|
|
|
77
77
|
], 2));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
const D = (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
o[n] = i;
|
|
84
|
-
return o;
|
|
85
|
-
}, v = (e) => (N("data-v-60739909"), e = e(), E(), e), F = ["onClick"], O = ["onClick", "onMouseenter"], j = /* @__PURE__ */ v(() => /* @__PURE__ */ f("path", { d: "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" }, null, -1)), R = [
|
|
80
|
+
const P = ["onClick"], T = ["onClick", "onMouseenter"], D = /* @__PURE__ */ f("path", { d: "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" }, null, -1), F = [
|
|
81
|
+
D
|
|
82
|
+
], j = /* @__PURE__ */ f("path", { d: "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z" }, null, -1), O = [
|
|
86
83
|
j
|
|
87
|
-
],
|
|
84
|
+
], R = ["onClick", "onMouseenter"], q = /* @__PURE__ */ f("path", { d: "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z" }, null, -1), A = [
|
|
88
85
|
q
|
|
89
|
-
], G =
|
|
90
|
-
|
|
91
|
-
],
|
|
92
|
-
Q
|
|
93
|
-
], W = {
|
|
86
|
+
], G = /* @__PURE__ */ f("path", { d: "M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z" }, null, -1), I = [
|
|
87
|
+
G
|
|
88
|
+
], J = {
|
|
94
89
|
__name: "index",
|
|
95
90
|
props: {
|
|
96
91
|
modelValue: {
|
|
@@ -132,115 +127,115 @@ const D = (e, c) => {
|
|
|
132
127
|
},
|
|
133
128
|
emits: ["update:modelValue", "change", "hoverChange"],
|
|
134
129
|
setup(e, { emit: c }) {
|
|
135
|
-
const
|
|
130
|
+
const s = e, n = $(s.modelValue), d = $();
|
|
136
131
|
V(
|
|
137
|
-
() =>
|
|
132
|
+
() => s.modelValue,
|
|
138
133
|
(t) => {
|
|
139
134
|
n.value = t;
|
|
140
135
|
}
|
|
141
136
|
);
|
|
142
|
-
const u = c,
|
|
143
|
-
|
|
137
|
+
const u = c, v = (t) => {
|
|
138
|
+
d.value = null, t !== s.modelValue ? (u("change", t), u("update:modelValue", t)) : s.allowClear ? (d.value = t, u("change", 0), u("update:modelValue", 0)) : u("change", t);
|
|
144
139
|
}, L = (t) => {
|
|
145
140
|
n.value = t, u("hoverChange", t);
|
|
146
|
-
},
|
|
141
|
+
}, w = (t) => {
|
|
147
142
|
n.value = t, u("hoverChange", t);
|
|
148
|
-
},
|
|
149
|
-
|
|
143
|
+
}, k = () => {
|
|
144
|
+
d.value = null;
|
|
150
145
|
}, B = () => {
|
|
151
|
-
n.value =
|
|
146
|
+
n.value = s.modelValue;
|
|
152
147
|
}, C = (t) => {
|
|
153
148
|
t.preventDefault();
|
|
154
149
|
};
|
|
155
|
-
return (t,
|
|
150
|
+
return (t, U) => (a(), l("div", {
|
|
156
151
|
class: r(["abl-rate", { disabled: e.readonly }]),
|
|
157
|
-
style:
|
|
152
|
+
style: i(`--color: ${e.color};`),
|
|
158
153
|
onMouseleave: B
|
|
159
154
|
}, [
|
|
160
|
-
(a(!0), l(
|
|
161
|
-
class: r(["abl-rate-star", { "abl-rate-star-half": e.allowHalf && n.value >=
|
|
162
|
-
style:
|
|
163
|
-
onClick: (y) => e.allowHalf ? C(y) :
|
|
164
|
-
key:
|
|
155
|
+
(a(!0), l(m, null, S(e.count, (o) => (a(), l("div", {
|
|
156
|
+
class: r(["abl-rate-star", { "abl-rate-star-half": e.allowHalf && n.value >= o - 0.5 && n.value < o, "abl-rate-star-full": n.value >= o, "temp-gray": !e.allowHalf && d.value === o }]),
|
|
157
|
+
style: i(`margin-right: ${o !== e.count ? e.gap : 0}px;`),
|
|
158
|
+
onClick: (y) => e.allowHalf ? C(y) : v(o),
|
|
159
|
+
key: o
|
|
165
160
|
}, [
|
|
166
161
|
e.allowHalf ? (a(), l("div", {
|
|
167
162
|
key: 0,
|
|
168
|
-
class: r(["abl-rate-star-first", { "temp-gray-first":
|
|
169
|
-
onClick:
|
|
170
|
-
onMouseenter: (y) => L(
|
|
171
|
-
onMouseleave:
|
|
163
|
+
class: r(["abl-rate-star-first", { "temp-gray-first": d.value === o - 0.5 }]),
|
|
164
|
+
onClick: x((y) => v(o - 0.5), ["stop"]),
|
|
165
|
+
onMouseenter: (y) => L(o - 0.5),
|
|
166
|
+
onMouseleave: k
|
|
172
167
|
}, [
|
|
173
168
|
e.character === "star-filled" ? (a(), l("svg", {
|
|
174
169
|
key: 0,
|
|
175
170
|
class: "action-star",
|
|
176
|
-
style:
|
|
171
|
+
style: i(`width: ${e.size}px;`),
|
|
177
172
|
focusable: "false",
|
|
178
173
|
"data-icon": "star",
|
|
179
174
|
"aria-hidden": "true",
|
|
180
175
|
viewBox: "64 64 896 896"
|
|
181
|
-
},
|
|
176
|
+
}, F, 4)) : e.character === "star-outlined" ? (a(), l("svg", {
|
|
182
177
|
key: 1,
|
|
183
178
|
class: "action-star",
|
|
184
|
-
style:
|
|
179
|
+
style: i(`width: ${e.size}px;`),
|
|
185
180
|
focusable: "false",
|
|
186
181
|
"data-icon": "star",
|
|
187
182
|
"aria-hidden": "true",
|
|
188
183
|
viewBox: "64 64 896 896"
|
|
189
|
-
},
|
|
184
|
+
}, O, 4)) : (a(), l("span", {
|
|
190
185
|
key: 2,
|
|
191
186
|
class: "action-star",
|
|
192
|
-
style:
|
|
187
|
+
style: i(`font-size: ${0.66 * e.size}px; height: ${e.size}px;`)
|
|
193
188
|
}, [
|
|
194
189
|
g(t.$slots, "character", {}, () => [
|
|
195
|
-
|
|
196
|
-
]
|
|
190
|
+
z(b(e.character), 1)
|
|
191
|
+
])
|
|
197
192
|
], 4))
|
|
198
|
-
], 42,
|
|
193
|
+
], 42, T)) : h("", !0),
|
|
199
194
|
f("div", {
|
|
200
|
-
class: r(["abl-rate-star-second", { "temp-gray-second":
|
|
201
|
-
onClick:
|
|
202
|
-
onMouseenter: (y) =>
|
|
203
|
-
onMouseleave:
|
|
195
|
+
class: r(["abl-rate-star-second", { "temp-gray-second": d.value === o }]),
|
|
196
|
+
onClick: x((y) => v(o), ["stop"]),
|
|
197
|
+
onMouseenter: (y) => w(o),
|
|
198
|
+
onMouseleave: k
|
|
204
199
|
}, [
|
|
205
200
|
e.character === "star-filled" ? (a(), l("svg", {
|
|
206
201
|
key: 0,
|
|
207
202
|
class: "action-star",
|
|
208
|
-
style:
|
|
203
|
+
style: i(`width: ${e.size}px;`),
|
|
209
204
|
focusable: "false",
|
|
210
205
|
"data-icon": "star",
|
|
211
206
|
"aria-hidden": "true",
|
|
212
207
|
viewBox: "64 64 896 896"
|
|
213
|
-
},
|
|
208
|
+
}, A, 4)) : e.character === "star-outlined" ? (a(), l("svg", {
|
|
214
209
|
key: 1,
|
|
215
210
|
class: "action-star",
|
|
216
|
-
style:
|
|
211
|
+
style: i(`width: ${e.size}px;`),
|
|
217
212
|
focusable: "false",
|
|
218
213
|
"data-icon": "star",
|
|
219
214
|
"aria-hidden": "true",
|
|
220
215
|
viewBox: "64 64 896 896"
|
|
221
|
-
},
|
|
216
|
+
}, I, 4)) : (a(), l("span", {
|
|
222
217
|
key: 2,
|
|
223
218
|
class: "action-star",
|
|
224
|
-
style:
|
|
219
|
+
style: i(`font-size: ${0.66 * e.size}px; height: ${e.size}px;`)
|
|
225
220
|
}, [
|
|
226
221
|
g(t.$slots, "character", {}, () => [
|
|
227
|
-
|
|
228
|
-
]
|
|
222
|
+
z(b(e.character), 1)
|
|
223
|
+
])
|
|
229
224
|
], 4))
|
|
230
|
-
], 42,
|
|
231
|
-
], 14,
|
|
225
|
+
], 42, R)
|
|
226
|
+
], 14, P))), 128))
|
|
232
227
|
], 38));
|
|
233
228
|
}
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
],
|
|
238
|
-
|
|
239
|
-
e.component(
|
|
229
|
+
}, K = [
|
|
230
|
+
H,
|
|
231
|
+
J
|
|
232
|
+
], Q = function(e, c) {
|
|
233
|
+
K.forEach((s) => {
|
|
234
|
+
e.component(s.name, s);
|
|
240
235
|
}), e.config.globalProperties.$lockCount = 0;
|
|
241
|
-
},
|
|
236
|
+
}, X = { install: Q };
|
|
242
237
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
238
|
+
H as ablButton,
|
|
239
|
+
J as ablRate,
|
|
240
|
+
X as default
|
|
246
241
|
};
|
package/lib/abl-ui.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c["abl-ui"]={},c.Vue))})(this,function(c,e){"use strict";const L="",k={key:0,class:"iconfont-abl icon-abl-loading2 abl-icon-loading"},u={class:"abl-button__text"},m=Object.assign({name:"AblButton"},{props:{type:{type:String,default:"default"},dashed:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},round:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconPosition:{type:String,default:"left"},loading:{type:Boolean,default:!1},loadingText:{type:String,default:"loading..."}},setup(t){const s=t,n=e.computed(()=>({[`abl-button-${s.type}`]:s.type,"is-dashed":s.dashed,"is-round":s.round,"is-circle":s.circle,"is-disabled":s.disabled}));return(o,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["abl-button",n.value])},[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.loading?(e.openBlock(),e.createElementBlock("i",k)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.loadingText),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.iconPosition==="left"?e.renderSlot(o.$slots,"icon",{key:0},()=>[t.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["iconfont-abl slot-icon-left",t.icon])},null,2)):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.createElementVNode("span",u,[e.renderSlot(o.$slots,"default")]),t.iconPosition==="right"?e.renderSlot(o.$slots,"icon",{key:1},()=>[t.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["iconfont-abl slot-icon-right",t.icon])},null,2)):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0)],64))],2))}}),T="",g=["onClick"],B=["onClick","onMouseenter"],b=[e.createElementVNode("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"},null,-1)],z=[e.createElementVNode("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"},null,-1)],V=["onClick","onMouseenter"],p=[e.createElementVNode("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"},null,-1)],C=[e.createElementVNode("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"},null,-1)],h={__name:"index",props:{modelValue:{type:Number,default:0},allowClear:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},character:{type:String,default:"star-filled"},size:{type:Number,default:18},color:{type:String,default:"#ffb400"},gap:{type:Number,default:4},readonly:{type:Boolean,default:!1},count:{type:Number,default:5}},emits:["update:modelValue","change","hoverChange"],setup(t,{emit:s}){const n=t,o=e.ref(n.modelValue),i=e.ref();e.watch(()=>n.modelValue,l=>{o.value=l});const r=s,f=l=>{i.value=null,l!==n.modelValue?(r("change",l),r("update:modelValue",l)):n.allowClear?(i.value=l,r("change",0),r("update:modelValue",0)):r("change",l)},$=l=>{o.value=l,r("hoverChange",l)},x=l=>{o.value=l,r("hoverChange",l)},y=()=>{i.value=null},N=()=>{o.value=n.modelValue},w=l=>{l.preventDefault()};return(l,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["abl-rate",{disabled:t.readonly}]),style:e.normalizeStyle(`--color: ${t.color};`),onMouseleave:N},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.count,a=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["abl-rate-star",{"abl-rate-star-half":t.allowHalf&&o.value>=a-.5&&o.value<a,"abl-rate-star-full":o.value>=a,"temp-gray":!t.allowHalf&&i.value===a}]),style:e.normalizeStyle(`margin-right: ${a!==t.count?t.gap:0}px;`),onClick:d=>t.allowHalf?w(d):f(a),key:a},[t.allowHalf?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["abl-rate-star-first",{"temp-gray-first":i.value===a-.5}]),onClick:e.withModifiers(d=>f(a-.5),["stop"]),onMouseenter:d=>$(a-.5),onMouseleave:y},[t.character==="star-filled"?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"action-star",style:e.normalizeStyle(`width: ${t.size}px;`),focusable:"false","data-icon":"star","aria-hidden":"true",viewBox:"64 64 896 896"},b,4)):t.character==="star-outlined"?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"action-star",style:e.normalizeStyle(`width: ${t.size}px;`),focusable:"false","data-icon":"star","aria-hidden":"true",viewBox:"64 64 896 896"},z,4)):(e.openBlock(),e.createElementBlock("span",{key:2,class:"action-star",style:e.normalizeStyle(`font-size: ${.66*t.size}px; height: ${t.size}px;`)},[e.renderSlot(l.$slots,"character",{},()=>[e.createTextVNode(e.toDisplayString(t.character),1)])],4))],42,B)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["abl-rate-star-second",{"temp-gray-second":i.value===a}]),onClick:e.withModifiers(d=>f(a),["stop"]),onMouseenter:d=>x(a),onMouseleave:y},[t.character==="star-filled"?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"action-star",style:e.normalizeStyle(`width: ${t.size}px;`),focusable:"false","data-icon":"star","aria-hidden":"true",viewBox:"64 64 896 896"},p,4)):t.character==="star-outlined"?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"action-star",style:e.normalizeStyle(`width: ${t.size}px;`),focusable:"false","data-icon":"star","aria-hidden":"true",viewBox:"64 64 896 896"},C,4)):(e.openBlock(),e.createElementBlock("span",{key:2,class:"action-star",style:e.normalizeStyle(`font-size: ${.66*t.size}px; height: ${t.size}px;`)},[e.renderSlot(l.$slots,"character",{},()=>[e.createTextVNode(e.toDisplayString(t.character),1)])],4))],42,V)],14,g))),128))],38))}},E=[m,h],S={install:function(t,s){E.forEach(n=>{t.component(n.name,n)}),t.config.globalProperties.$lockCount=0}};c.ablButton=m,c.ablRate=h,c.default=S,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.abl-button{box-sizing:border-box;font-size:14px;background-color:#fff;padding:0 15px;height:40px;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;border-radius:4px;transition:all .25s;color:#111;border:1px solid #d9d9d9;-webkit-user-select:none;user-select:none}.abl-button:focus{outline:none}.abl-button::-moz-focus-inner{border:0}.abl-button.is-circle{border-radius:100%;width:40px}.abl-button.is-round{border-radius:20px}.abl-button.abl-button-default:hover{color:#111;border-color:#111}.abl-button.abl-button-default:active{opacity:1}.abl-button.abl-button-default.is-dashed{border-style:dashed}.abl-button.abl-button-primary{background-color:#111;border-color:#111;color:#fff}.abl-button.abl-button-primary:hover{opacity:.9}.abl-button.abl-button-primary:active{opacity:1}.abl-button.abl-button-primary.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-primary.is-disabled:hover{opacity:.5}.abl-button.abl-button-primary.is-dashed{border-style:dashed;background-color:#fff!important;color:#111}.abl-button.abl-button-info{background-color:#909399;border-color:#909399;color:#fff}.abl-button.abl-button-info:hover{opacity:.9}.abl-button.abl-button-info:active{opacity:1}.abl-button.abl-button-info.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-info.is-disabled:hover{opacity:.5}.abl-button.abl-button-info.is-dashed{border-style:dashed;background-color:#fff!important;color:#909399}.abl-button.abl-button-success{background-color:#67c23a;border-color:#67c23a;color:#fff}.abl-button.abl-button-success:hover{opacity:.8}.abl-button.abl-button-success:active{opacity:1}.abl-button.abl-button-success.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-success.is-disabled:hover{opacity:.5}.abl-button.abl-button-success.is-dashed{border-style:dashed;background-color:#fff!important;color:#67c23a}.abl-button.abl-button-warning{background-color:#e6a23c;border-color:#e6a23c;color:#fff}.abl-button.abl-button-warning:hover{opacity:.8}.abl-button.abl-button-warning:active{opacity:1}.abl-button.abl-button-warning.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-warning.is-disabled:hover{opacity:.5}.abl-button.abl-button-warning.is-dashed{border-style:dashed;background-color:#fff!important;color:#e6a23c}.abl-button.abl-button-danger{background-color:#f56c6c;border-color:#f56c6c;color:#fff}.abl-button.abl-button-danger:hover{opacity:.8}.abl-button.abl-button-danger:active{opacity:1}.abl-button.abl-button-danger.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-danger.is-disabled:hover{opacity:.5}.abl-button.abl-button-danger.is-dashed{border-style:dashed;background-color:#fff!important;color:#f56c6c}.abl-button>.abl-icon-loading{margin-right:4px;animation:abl-spin 1s infinite linear}.abl-button>.slot-icon-left{margin-right:5px}.abl-button>.slot-icon-right{margin-left:5px}@keyframes abl-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.abl-rate
|
|
1
|
+
.abl-button{box-sizing:border-box;font-size:14px;background-color:#fff;padding:0 15px;height:40px;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;border-radius:4px;transition:all .25s;color:#111;border:1px solid #d9d9d9;-webkit-user-select:none;user-select:none}.abl-button:focus{outline:none}.abl-button::-moz-focus-inner{border:0}.abl-button.is-circle{border-radius:100%;width:40px}.abl-button.is-round{border-radius:20px}.abl-button.abl-button-default:hover{color:#111;border-color:#111}.abl-button.abl-button-default:active{opacity:1}.abl-button.abl-button-default.is-dashed{border-style:dashed}.abl-button.abl-button-primary{background-color:#111;border-color:#111;color:#fff}.abl-button.abl-button-primary:hover{opacity:.9}.abl-button.abl-button-primary:active{opacity:1}.abl-button.abl-button-primary.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-primary.is-disabled:hover{opacity:.5}.abl-button.abl-button-primary.is-dashed{border-style:dashed;background-color:#fff!important;color:#111}.abl-button.abl-button-info{background-color:#909399;border-color:#909399;color:#fff}.abl-button.abl-button-info:hover{opacity:.9}.abl-button.abl-button-info:active{opacity:1}.abl-button.abl-button-info.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-info.is-disabled:hover{opacity:.5}.abl-button.abl-button-info.is-dashed{border-style:dashed;background-color:#fff!important;color:#909399}.abl-button.abl-button-success{background-color:#67c23a;border-color:#67c23a;color:#fff}.abl-button.abl-button-success:hover{opacity:.8}.abl-button.abl-button-success:active{opacity:1}.abl-button.abl-button-success.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-success.is-disabled:hover{opacity:.5}.abl-button.abl-button-success.is-dashed{border-style:dashed;background-color:#fff!important;color:#67c23a}.abl-button.abl-button-warning{background-color:#e6a23c;border-color:#e6a23c;color:#fff}.abl-button.abl-button-warning:hover{opacity:.8}.abl-button.abl-button-warning:active{opacity:1}.abl-button.abl-button-warning.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-warning.is-disabled:hover{opacity:.5}.abl-button.abl-button-warning.is-dashed{border-style:dashed;background-color:#fff!important;color:#e6a23c}.abl-button.abl-button-danger{background-color:#f56c6c;border-color:#f56c6c;color:#fff}.abl-button.abl-button-danger:hover{opacity:.8}.abl-button.abl-button-danger:active{opacity:1}.abl-button.abl-button-danger.is-disabled{cursor:not-allowed;opacity:.5}.abl-button.abl-button-danger.is-disabled:hover{opacity:.5}.abl-button.abl-button-danger.is-dashed{border-style:dashed;background-color:#fff!important;color:#f56c6c}.abl-button>.abl-icon-loading{margin-right:4px;animation:abl-spin 1s infinite linear}.abl-button>.slot-icon-left{margin-right:5px}.abl-button>.slot-icon-right{margin-left:5px}@keyframes abl-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.abl-rate{display:inline-block}.abl-rate .abl-rate-star{position:relative;display:inline-block;cursor:pointer;transition:transform .3s ease-in-out}.abl-rate .abl-rate-star:hover{transform:scale(1.1)}.abl-rate .abl-rate-star .action-star{display:inline-flex;align-items:center;text-align:center;vertical-align:middle;fill:#0000000f;color:#0000000f;transition:all .3s}.abl-rate .abl-rate-star .abl-rate-star-first{position:absolute;top:0;width:50%;height:100%;opacity:0;overflow:hidden;transition:all .3s}.abl-rate .abl-rate-star .abl-rate-star-first:hover{opacity:1}.abl-rate .abl-rate-star .abl-rate-star-first:hover .action-star{fill:var(--color);color:var(--color)}.abl-rate .abl-rate-star .abl-rate-star-second{display:inline-block}.abl-rate .abl-rate-star .abl-rate-star-second:hover .action-star{fill:var(--color);color:var(--color)}.abl-rate .abl-rate-star .temp-gray-first:hover{opacity:0}.abl-rate .abl-rate-star .temp-gray-first:hover .action-star,.abl-rate .abl-rate-star .temp-gray-second:hover .action-star{fill:#0000000f;color:#0000000f}.abl-rate .abl-rate-star-half .abl-rate-star-first{opacity:1}.abl-rate .abl-rate-star-half .abl-rate-star-first .action-star,.abl-rate .abl-rate-star-full .abl-rate-star-second .action-star{fill:var(--color);color:var(--color)}.disabled{pointer-events:none}
|