@solar-taro/ui-sun 2.8.11 → 3.0.0
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/CHANGELOG.md +21 -0
- package/empty/index.d.ts +1 -0
- package/empty/index.scss +23 -0
- package/empty/index.vue.d.ts +18 -0
- package/fab/index.scss +4 -0
- package/index.d.ts +4 -0
- package/index.js +50 -42
- package/index10.js +29 -17
- package/index11.js +19 -25
- package/index12.js +81 -34
- package/index13.js +24 -75
- package/index14.js +34 -20
- package/index15.js +72 -46
- package/index16.js +19 -144
- package/index17.js +48 -28
- package/index18.js +144 -21
- package/index19.js +28 -42
- package/index20.js +18 -21
- package/index21.js +42 -11
- package/index22.js +21 -26
- package/index23.js +12 -18
- package/index24.js +27 -117
- package/index25.js +17 -9
- package/index26.js +34 -11
- package/index27.js +123 -11
- package/index28.js +14 -8
- package/index29.js +10 -9
- package/index30.js +8 -7
- package/index31.js +11 -2
- package/index32.js +8 -2
- package/index33.js +10 -2
- package/index34.js +10 -2
- package/index36.js +1 -1
- package/index38.js +2 -7
- package/index39.js +1 -1
- package/index4.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +7 -2
- package/index43.js +1 -1
- package/index44.js +1 -1
- package/index45.js +1 -1
- package/index46.js +1 -1
- package/index47.js +1 -1
- package/index48.js +1 -1
- package/index49.js +1 -1
- package/index50.js +1 -1
- package/index51.js +1 -1
- package/index52.js +1 -1
- package/index53.js +526 -2
- package/index55.js +2 -66
- package/index56.js +2 -12
- package/index57.js +2 -25
- package/index58.js +2 -14
- package/index59.js +1 -1
- package/index60.js +2 -526
- package/index61.js +2 -26
- package/index62.js +2 -2
- package/index63.js +2 -506
- package/index64.js +65 -78
- package/index65.js +12 -70
- package/index66.js +25 -69
- package/index67.js +14 -543
- package/index68.js +26 -2
- package/index7.js +18 -17
- package/index70.js +506 -2
- package/index71.js +78 -3
- package/index72.js +70 -2
- package/index73.js +69 -4
- package/index74.js +543 -2
- package/index77.js +2 -48
- package/index78.js +3 -81
- package/index8.js +13 -14
- package/index80.js +4 -2
- package/index81.js +2 -2
- package/index82.js +2 -2
- package/index83.js +4 -0
- package/index84.js +50 -0
- package/index85.js +84 -0
- package/index86.js +4 -0
- package/index87.js +4 -0
- package/index88.js +4 -0
- package/index89.js +4 -0
- package/index9.js +16 -30
- package/item-divider/index.d.ts +1 -0
- package/item-divider/index.scss +9 -0
- package/item-divider/index.vue.d.ts +18 -0
- package/list/index.d.ts +1 -0
- package/list/index.vue.d.ts +90 -0
- package/package.json +1 -1
- package/toggle/index.d.ts +1 -0
- package/toggle/index.scss +95 -0
- package/toggle/index.vue.d.ts +16 -0
package/index78.js
CHANGED
|
@@ -1,84 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { __require as K } from "./index63.js";
|
|
4
|
-
var f;
|
|
5
|
-
function y() {
|
|
6
|
-
return f ? s.exports : (f = 1, function(u, z) {
|
|
7
|
-
(function(n, i) {
|
|
8
|
-
u.exports = i(K());
|
|
9
|
-
})(B, function(n) {
|
|
10
|
-
(function() {
|
|
11
|
-
var i = n, l = i.lib, v = l.Base, _ = i.enc, m = _.Utf8, p = i.algo;
|
|
12
|
-
p.HMAC = v.extend({
|
|
13
|
-
/**
|
|
14
|
-
* Initializes a newly created HMAC.
|
|
15
|
-
*
|
|
16
|
-
* @param {Hasher} hasher The hash algorithm to use.
|
|
17
|
-
* @param {WordArray|string} key The secret key.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
*
|
|
21
|
-
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
|
22
|
-
*/
|
|
23
|
-
init: function(e, r) {
|
|
24
|
-
e = this._hasher = new e.init(), typeof r == "string" && (r = m.parse(r));
|
|
25
|
-
var t = e.blockSize, a = t * 4;
|
|
26
|
-
r.sigBytes > a && (r = e.finalize(r)), r.clamp();
|
|
27
|
-
for (var c = this._oKey = r.clone(), h = this._iKey = r.clone(), d = c.words, x = h.words, o = 0; o < t; o++)
|
|
28
|
-
d[o] ^= 1549556828, x[o] ^= 909522486;
|
|
29
|
-
c.sigBytes = h.sigBytes = a, this.reset();
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
32
|
-
* Resets this HMAC to its initial state.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
*
|
|
36
|
-
* hmacHasher.reset();
|
|
37
|
-
*/
|
|
38
|
-
reset: function() {
|
|
39
|
-
var e = this._hasher;
|
|
40
|
-
e.reset(), e.update(this._iKey);
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* Updates this HMAC with a message.
|
|
44
|
-
*
|
|
45
|
-
* @param {WordArray|string} messageUpdate The message to append.
|
|
46
|
-
*
|
|
47
|
-
* @return {HMAC} This HMAC instance.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
*
|
|
51
|
-
* hmacHasher.update('message');
|
|
52
|
-
* hmacHasher.update(wordArray);
|
|
53
|
-
*/
|
|
54
|
-
update: function(e) {
|
|
55
|
-
return this._hasher.update(e), this;
|
|
56
|
-
},
|
|
57
|
-
/**
|
|
58
|
-
* Finalizes the HMAC computation.
|
|
59
|
-
* Note that the finalize operation is effectively a destructive, read-once operation.
|
|
60
|
-
*
|
|
61
|
-
* @param {WordArray|string} messageUpdate (Optional) A final message update.
|
|
62
|
-
*
|
|
63
|
-
* @return {WordArray} The HMAC.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
*
|
|
67
|
-
* var hmac = hmacHasher.finalize();
|
|
68
|
-
* var hmac = hmacHasher.finalize('message');
|
|
69
|
-
* var hmac = hmacHasher.finalize(wordArray);
|
|
70
|
-
*/
|
|
71
|
-
finalize: function(e) {
|
|
72
|
-
var r = this._hasher, t = r.finalize(e);
|
|
73
|
-
r.reset();
|
|
74
|
-
var a = r.finalize(this._oKey.clone().concat(t));
|
|
75
|
-
return a;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
})();
|
|
79
|
-
});
|
|
80
|
-
}(s), s.exports);
|
|
1
|
+
function r(o) {
|
|
2
|
+
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
81
3
|
}
|
|
82
4
|
export {
|
|
83
|
-
|
|
5
|
+
r as commonjsRequire
|
|
84
6
|
};
|
package/index8.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
__name: "fab",
|
|
1
|
+
import { defineComponent as o, renderSlot as r, mergeProps as s, openBlock as n, createElementBlock as a } from "vue";
|
|
2
|
+
const l = r, p = s, c = n, f = a, _ = /* @__PURE__ */ o({
|
|
3
|
+
__name: "fab-group",
|
|
4
4
|
props: {
|
|
5
|
-
|
|
5
|
+
offsetY: {
|
|
6
|
+
type: [Number, String],
|
|
7
|
+
default: 0
|
|
8
|
+
}
|
|
6
9
|
},
|
|
7
|
-
setup(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return (e, d) => (f(), _("view", u(e.$attrs, {
|
|
12
|
-
class: ["sun-fab", s.value],
|
|
13
|
-
"hover-class": "hover",
|
|
14
|
-
"hover-stay-time": "200"
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (e, m) => (c(), f("view", p(e.$attrs, {
|
|
12
|
+
class: "sun-fab-group",
|
|
13
|
+
style: { bottom: `calc(${15 + +t.offsetY}px + var(--safe-bottom))` }
|
|
15
14
|
}), [
|
|
16
|
-
|
|
15
|
+
l(e.$slots, "default")
|
|
17
16
|
], 16));
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
_ as default
|
|
22
21
|
};
|
package/index80.js
CHANGED
package/index81.js
CHANGED
package/index82.js
CHANGED
package/index83.js
ADDED
package/index84.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { commonjsGlobal as B } from "./index68.js";
|
|
2
|
+
import { __module as d } from "./index87.js";
|
|
3
|
+
import { __require as S } from "./index70.js";
|
|
4
|
+
var m;
|
|
5
|
+
function w() {
|
|
6
|
+
return m ? d.exports : (m = 1, function(p, g) {
|
|
7
|
+
(function(v, c) {
|
|
8
|
+
p.exports = c(S());
|
|
9
|
+
})(B, function(v) {
|
|
10
|
+
return function() {
|
|
11
|
+
var c = v, u = c.lib, b = u.WordArray, f = u.Hasher, A = c.algo, i = [], x = A.SHA1 = f.extend({
|
|
12
|
+
_doReset: function() {
|
|
13
|
+
this._hash = new b.init([
|
|
14
|
+
1732584193,
|
|
15
|
+
4023233417,
|
|
16
|
+
2562383102,
|
|
17
|
+
271733878,
|
|
18
|
+
3285377520
|
|
19
|
+
]);
|
|
20
|
+
},
|
|
21
|
+
_doProcessBlock: function(s, h) {
|
|
22
|
+
for (var r = this._hash.words, a = r[0], o = r[1], t = r[2], n = r[3], _ = r[4], e = 0; e < 80; e++) {
|
|
23
|
+
if (e < 16)
|
|
24
|
+
i[e] = s[h + e] | 0;
|
|
25
|
+
else {
|
|
26
|
+
var H = i[e - 3] ^ i[e - 8] ^ i[e - 14] ^ i[e - 16];
|
|
27
|
+
i[e] = H << 1 | H >>> 31;
|
|
28
|
+
}
|
|
29
|
+
var l = (a << 5 | a >>> 27) + _ + i[e];
|
|
30
|
+
e < 20 ? l += (o & t | ~o & n) + 1518500249 : e < 40 ? l += (o ^ t ^ n) + 1859775393 : e < 60 ? l += (o & t | o & n | t & n) - 1894007588 : l += (o ^ t ^ n) - 899497514, _ = n, n = t, t = o << 30 | o >>> 2, o = a, a = l;
|
|
31
|
+
}
|
|
32
|
+
r[0] = r[0] + a | 0, r[1] = r[1] + o | 0, r[2] = r[2] + t | 0, r[3] = r[3] + n | 0, r[4] = r[4] + _ | 0;
|
|
33
|
+
},
|
|
34
|
+
_doFinalize: function() {
|
|
35
|
+
var s = this._data, h = s.words, r = this._nDataBytes * 8, a = s.sigBytes * 8;
|
|
36
|
+
return h[a >>> 5] |= 128 << 24 - a % 32, h[(a + 64 >>> 9 << 4) + 14] = Math.floor(r / 4294967296), h[(a + 64 >>> 9 << 4) + 15] = r, s.sigBytes = h.length * 4, this._process(), this._hash;
|
|
37
|
+
},
|
|
38
|
+
clone: function() {
|
|
39
|
+
var s = f.clone.call(this);
|
|
40
|
+
return s._hash = this._hash.clone(), s;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
c.SHA1 = f._createHelper(x), c.HmacSHA1 = f._createHmacHelper(x);
|
|
44
|
+
}(), v.SHA1;
|
|
45
|
+
});
|
|
46
|
+
}(d), d.exports);
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
w as __require
|
|
50
|
+
};
|
package/index85.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { commonjsGlobal as B } from "./index68.js";
|
|
2
|
+
import { __module as s } from "./index88.js";
|
|
3
|
+
import { __require as K } from "./index70.js";
|
|
4
|
+
var f;
|
|
5
|
+
function y() {
|
|
6
|
+
return f ? s.exports : (f = 1, function(u, z) {
|
|
7
|
+
(function(n, i) {
|
|
8
|
+
u.exports = i(K());
|
|
9
|
+
})(B, function(n) {
|
|
10
|
+
(function() {
|
|
11
|
+
var i = n, l = i.lib, v = l.Base, _ = i.enc, m = _.Utf8, p = i.algo;
|
|
12
|
+
p.HMAC = v.extend({
|
|
13
|
+
/**
|
|
14
|
+
* Initializes a newly created HMAC.
|
|
15
|
+
*
|
|
16
|
+
* @param {Hasher} hasher The hash algorithm to use.
|
|
17
|
+
* @param {WordArray|string} key The secret key.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
|
22
|
+
*/
|
|
23
|
+
init: function(e, r) {
|
|
24
|
+
e = this._hasher = new e.init(), typeof r == "string" && (r = m.parse(r));
|
|
25
|
+
var t = e.blockSize, a = t * 4;
|
|
26
|
+
r.sigBytes > a && (r = e.finalize(r)), r.clamp();
|
|
27
|
+
for (var c = this._oKey = r.clone(), h = this._iKey = r.clone(), d = c.words, x = h.words, o = 0; o < t; o++)
|
|
28
|
+
d[o] ^= 1549556828, x[o] ^= 909522486;
|
|
29
|
+
c.sigBytes = h.sigBytes = a, this.reset();
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Resets this HMAC to its initial state.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
*
|
|
36
|
+
* hmacHasher.reset();
|
|
37
|
+
*/
|
|
38
|
+
reset: function() {
|
|
39
|
+
var e = this._hasher;
|
|
40
|
+
e.reset(), e.update(this._iKey);
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Updates this HMAC with a message.
|
|
44
|
+
*
|
|
45
|
+
* @param {WordArray|string} messageUpdate The message to append.
|
|
46
|
+
*
|
|
47
|
+
* @return {HMAC} This HMAC instance.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
*
|
|
51
|
+
* hmacHasher.update('message');
|
|
52
|
+
* hmacHasher.update(wordArray);
|
|
53
|
+
*/
|
|
54
|
+
update: function(e) {
|
|
55
|
+
return this._hasher.update(e), this;
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Finalizes the HMAC computation.
|
|
59
|
+
* Note that the finalize operation is effectively a destructive, read-once operation.
|
|
60
|
+
*
|
|
61
|
+
* @param {WordArray|string} messageUpdate (Optional) A final message update.
|
|
62
|
+
*
|
|
63
|
+
* @return {WordArray} The HMAC.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
*
|
|
67
|
+
* var hmac = hmacHasher.finalize();
|
|
68
|
+
* var hmac = hmacHasher.finalize('message');
|
|
69
|
+
* var hmac = hmacHasher.finalize(wordArray);
|
|
70
|
+
*/
|
|
71
|
+
finalize: function(e) {
|
|
72
|
+
var r = this._hasher, t = r.finalize(e);
|
|
73
|
+
r.reset();
|
|
74
|
+
var a = r.finalize(this._oKey.clone().concat(t));
|
|
75
|
+
return a;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
})();
|
|
79
|
+
});
|
|
80
|
+
}(s), s.exports);
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
y as __require
|
|
84
|
+
};
|
package/index86.js
ADDED
package/index87.js
ADDED
package/index88.js
ADDED
package/index89.js
ADDED
package/index9.js
CHANGED
|
@@ -1,36 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__name: "index",
|
|
1
|
+
import { defineComponent as t, computed as n, renderSlot as c, mergeProps as a, openBlock as l, createElementBlock as p } from "vue";
|
|
2
|
+
const m = c, u = a, f = l, _ = p, v = /* @__PURE__ */ t({
|
|
3
|
+
__name: "fab",
|
|
5
4
|
props: {
|
|
6
|
-
|
|
7
|
-
lines: { type: Boolean, default: !0 },
|
|
8
|
-
clickable: { type: Boolean }
|
|
5
|
+
color: {}
|
|
9
6
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class:
|
|
17
|
-
"hover-
|
|
18
|
-
}, [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
o("view", N, [
|
|
22
|
-
n(e.$slots, "default")
|
|
23
|
-
]),
|
|
24
|
-
n(e.$slots, "end"),
|
|
25
|
-
e.detail ? (s(), h(v(B), {
|
|
26
|
-
key: 0,
|
|
27
|
-
class: "sun-item-detail-icon",
|
|
28
|
-
name: "chevron-forward"
|
|
29
|
-
})) : w("", !0)
|
|
30
|
-
])
|
|
31
|
-
], 2));
|
|
7
|
+
setup(o) {
|
|
8
|
+
const r = o, s = n(() => [
|
|
9
|
+
`sun-fab-${r.color}`
|
|
10
|
+
]);
|
|
11
|
+
return (e, d) => (f(), _("view", u(e.$attrs, {
|
|
12
|
+
class: ["sun-fab", s.value],
|
|
13
|
+
"hover-class": "hover",
|
|
14
|
+
"hover-stay-time": "200"
|
|
15
|
+
}), [
|
|
16
|
+
m(e.$slots, "default")
|
|
17
|
+
], 16));
|
|
32
18
|
}
|
|
33
19
|
});
|
|
34
20
|
export {
|
|
35
|
-
|
|
21
|
+
v as default
|
|
36
22
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SunItemDivider } from './index.vue';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
end?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: SVGViewElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGViewElement>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
package/list/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SunList } from './index.vue';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
empty?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
|
+
refreshing: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
flex: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
loading: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
loadingText: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
data: {
|
|
29
|
+
type: ArrayConstructor;
|
|
30
|
+
default: never[];
|
|
31
|
+
};
|
|
32
|
+
refresher: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
refresherBg: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
41
|
+
refresh: () => any;
|
|
42
|
+
lower: () => any;
|
|
43
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
44
|
+
refreshing: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
flex: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
loading: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
loadingText: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
data: {
|
|
61
|
+
type: ArrayConstructor;
|
|
62
|
+
default: never[];
|
|
63
|
+
};
|
|
64
|
+
refresher: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
refresherBg: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
}>> & Readonly<{
|
|
73
|
+
onRefresh?: (() => any) | undefined;
|
|
74
|
+
onLower?: (() => any) | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
data: unknown[];
|
|
77
|
+
loading: boolean;
|
|
78
|
+
refreshing: boolean;
|
|
79
|
+
flex: boolean;
|
|
80
|
+
loadingText: string;
|
|
81
|
+
refresher: boolean;
|
|
82
|
+
refresherBg: string;
|
|
83
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
84
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
85
|
+
export default _default;
|
|
86
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
87
|
+
new (): {
|
|
88
|
+
$slots: S;
|
|
89
|
+
};
|
|
90
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SunToggle } from './index.vue';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.sun-toggle {
|
|
2
|
+
--width: 50px;
|
|
3
|
+
--height: 30px;
|
|
4
|
+
width: var(--width);
|
|
5
|
+
height: var(--height);
|
|
6
|
+
border-radius: 999px;
|
|
7
|
+
background-color: var(--color-light-shade);
|
|
8
|
+
transition:
|
|
9
|
+
background-color 300ms,
|
|
10
|
+
justify-content 300ms;
|
|
11
|
+
|
|
12
|
+
&-primary {
|
|
13
|
+
--color: var(--color-primary);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-secondary {
|
|
17
|
+
--color: var(--color-secondary);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-danger {
|
|
21
|
+
--color: var(--color-danger);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-success {
|
|
25
|
+
--color: var(--color-success);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-warning {
|
|
29
|
+
--color: var(--color-warning);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-info {
|
|
33
|
+
--color: var(--color-info);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-light {
|
|
37
|
+
--color: var(--color-light);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-dark {
|
|
41
|
+
--color: var(--color-dark);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-medium {
|
|
45
|
+
--color: var(--color-medium);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&-disabled {
|
|
49
|
+
opacity: 0.4;
|
|
50
|
+
pointer-events: not-allowed;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-checked {
|
|
54
|
+
background-color: var(--color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&-toggle-icon-wrapper {
|
|
58
|
+
position: relative;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
transition: transform 300ms;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-toggle-icon {
|
|
65
|
+
--margin: 2px;
|
|
66
|
+
--size: calc(var(--height) - var(--margin) * 2);
|
|
67
|
+
position: absolute;
|
|
68
|
+
width: var(--size);
|
|
69
|
+
height: var(--size);
|
|
70
|
+
margin: var(--margin);
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
background-color: #fff;
|
|
73
|
+
box-shadow:
|
|
74
|
+
0 3px 4px rgba(0, 0, 0, 0.06),
|
|
75
|
+
0 3px 8px rgba(0, 0, 0, 0.06);
|
|
76
|
+
transition:
|
|
77
|
+
left 300ms,
|
|
78
|
+
right 300ms,
|
|
79
|
+
width 120ms ease-in-out 80ms;
|
|
80
|
+
left: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.hover &-toggle-icon {
|
|
84
|
+
width: calc(var(--size) * 1.2);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&-checked &-toggle-icon-wrapper {
|
|
88
|
+
transform: translateX(calc(var(--width) - var(--height)));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-checked &-toggle-icon {
|
|
92
|
+
left: unset;
|
|
93
|
+
right: calc(var(--width) - var(--height));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Color } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
color?: Color;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_PublicProps = {
|
|
7
|
+
modelValue?: boolean;
|
|
8
|
+
} & __VLS_Props;
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
color: Color;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGViewElement>;
|
|
16
|
+
export default _default;
|