@tuya-miniapp/smart-ui 2.6.4-beta-11 → 2.7.0-beta-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/dist/loading/index.css +1 -1
- package/dist/loading/index.js +5 -5
- package/dist/loading/index.wxs +5 -5
- package/dist/loading/index.wxss +1 -1
- package/dist/popover/index.js +5 -1
- package/dist/popover/index.wxml +1 -1
- package/dist/switch/index.css +1 -1
- package/dist/switch/index.js +2 -0
- package/dist/switch/index.wxml +14 -2
- package/dist/switch/index.wxss +1 -1
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.js +5 -5
- package/lib/loading/index.wxs +5 -5
- package/lib/loading/index.wxss +1 -1
- package/lib/popover/index.js +5 -1
- package/lib/popover/index.wxml +1 -1
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.js +2 -0
- package/lib/switch/index.wxml +14 -2
- package/lib/switch/index.wxss +1 -1
- package/package.json +1 -1
package/dist/loading/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#1989fa);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;background:var(--loading-spinner-color,#1989fa);box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(8)}.smart-loading__loading{background:var(--loading-spinner-color,#1989fa)}.smart-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.smart-loading__text:empty{display:none}.smart-loading--vertical{flex-direction:column}.smart-loading--vertical .smart-loading__text{margin:var(--padding-xs,8px) 0 0}@keyframes smart-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
package/dist/loading/index.js
CHANGED
|
@@ -3,7 +3,7 @@ SmartComponent({
|
|
|
3
3
|
props: {
|
|
4
4
|
color: {
|
|
5
5
|
type: String,
|
|
6
|
-
value: '#1989FA'
|
|
6
|
+
value: 'var(--loading-text-color, #1989FA)',
|
|
7
7
|
},
|
|
8
8
|
vertical: Boolean,
|
|
9
9
|
type: {
|
|
@@ -18,12 +18,12 @@ SmartComponent({
|
|
|
18
18
|
},
|
|
19
19
|
data: {
|
|
20
20
|
spinner: '',
|
|
21
|
-
circular: ''
|
|
21
|
+
circular: '',
|
|
22
22
|
},
|
|
23
23
|
created() {
|
|
24
24
|
this.setData({
|
|
25
25
|
spinner: this.SpinnerLoading({ color: this.data.color }),
|
|
26
|
-
circular: this.CircularLoading({ color: this.data.color })
|
|
26
|
+
circular: this.CircularLoading({ color: this.data.color }),
|
|
27
27
|
});
|
|
28
28
|
},
|
|
29
29
|
methods: {
|
|
@@ -35,6 +35,6 @@ SmartComponent({
|
|
|
35
35
|
},
|
|
36
36
|
SpinnerLoading({ color = '#3678E3' }) {
|
|
37
37
|
return this.createSvgIcon(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="32" viewBox="0 0 32 32"><defs><clipPath id="master_svg0_1695_29273"><rect x="0" y="0" width="32" height="32" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_1695_29273)"><g><path d="M14.73077392578125,8.807690000000001L14.73077392578125,6.26923C14.73077392578125,5.568254,15.29902692578125,5,16.00000392578125,5C16.70097392578125,5,17.26923392578125,5.568254,17.26923392578125,6.26923L17.26923392578125,8.807690000000001C17.26923392578125,9.50867,16.70097392578125,10.07693,16.00000392578125,10.07693C15.29902692578125,10.07693,14.73077392578125,9.50867,14.73077392578125,8.807690000000001Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(0.7071067690849304,0.7071067690849304,-0.7071067690849304,0.7071067690849304,11.880707750418878,-14.033822285849965)" style="opacity:0.05000000074505806;"><path d="M22.88067626953125,11.132061337890626L22.88067626953125,8.593601337890625C22.88067626953125,7.892624337890625,23.44892926953125,7.324371337890625,24.14990626953125,7.324371337890625C24.85088626953125,7.324371337890625,25.41913626953125,7.892624337890625,25.41913626953125,8.593601337890625L25.41913626953125,11.132061337890626C25.41913626953125,11.833041337890625,24.85088626953125,12.401291337890626,24.14990626953125,12.401291337890626C23.44892926953125,12.401291337890626,22.88067626953125,11.833041337890625,22.88067626953125,11.132061337890626Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(0,1,-1,0,41.73081970214844,-12.269180297851562)" style="opacity:0.10000000149011612;"><path d="M27,18.53850970214844L27,16.000049702148438C27,15.299072702148438,27.568253,14.730819702148438,28.26923,14.730819702148438C28.97021,14.730819702148438,29.53846,15.299072702148438,29.53846,16.000049702148438L29.53846,18.53850970214844C29.53846,19.23948970214844,28.97021,19.80773970214844,28.26923,19.80773970214844C27.568253,19.80773970214844,27,19.23948970214844,27,18.53850970214844Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(-0.7071067690849304,0.7071067690849304,-0.7071067690849304,-0.7071067690849304,58.30294381839121,21.611726407169044)" style="opacity:0.15000000596046448;"><path d="M24.675537109375,26.68848833984375L24.675537109375,24.15002833984375C24.675537109375,23.44905133984375,25.243790109375,22.88079833984375,25.944767109375,22.88079833984375C26.645747109375,22.88079833984375,27.213997109375,23.44905133984375,27.213997109375,24.15002833984375L27.213997109375,26.68848833984375C27.213997109375,27.389468339843752,26.645747109375,27.95771833984375,25.944767109375,27.95771833984375C25.243790109375,27.95771833984375,24.675537109375,27.389468339843752,24.675537109375,26.68848833984375Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(-1,0,0,-1,34.5384521484375,54)" style="opacity:0.30000001192092896;"><path d="M17.26922607421875,30.80769L17.26922607421875,28.26923C17.26922607421875,27.568254,17.83747907421875,27,18.53845607421875,27C19.23942607421875,27,19.80768607421875,27.568254,19.80768607421875,28.26923L19.80768607421875,30.80769C19.80768607421875,31.508670000000002,19.23942607421875,32.07693,18.53845607421875,32.07693C17.83747907421875,32.07693,17.26922607421875,31.508670000000002,17.26922607421875,30.80769Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(-0.7071068286895752,-0.7071067094802856,0.7071067094802856,-0.7071068286895752,-1.8805817391439632,48.572416538932885)" style="opacity:0.550000011920929;"><path d="M9.119384765625,28.483379697265626L9.119384765625,25.944919697265625C9.119384765625,25.243942697265624,9.687637765625,24.675689697265625,10.388614765625,24.675689697265625C11.089594765625,24.675689697265625,11.657844765625,25.243942697265624,11.657844765625,25.944919697265625L11.657844765625,28.483379697265626C11.657844765625,29.184359697265627,11.089594765625,29.752609697265626,10.388614765625,29.752609697265626C9.687637765625,29.752609697265626,9.119384765625,29.184359697265627,9.119384765625,28.483379697265626Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(0,-1,1,0,-12.269241333007812,22.269241333007812)" style="opacity:0.699999988079071;"><path d="M5,21.076931333007813L5,18.538471333007813C5,17.83749433300781,5.568253,17.269241333007812,6.26923,17.269241333007812C6.97021,17.269241333007812,7.538460000000001,17.83749433300781,7.538460000000001,18.538471333007813L7.538460000000001,21.076931333007813C7.538460000000001,21.777911333007815,6.97021,22.346161333007814,6.26923,22.346161333007814C5.568253,22.346161333007814,5,21.777911333007815,5,21.076931333007813Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(0.7071066498756409,-0.70710688829422,0.70710688829422,0.7071066498756409,-4.303046450104375,7.850115344526785)" style="opacity:0.8500000238418579;"><path d="M7.32440185546875,12.926983212890626L7.32440185546875,10.388523212890625C7.32440185546875,9.687546212890625,7.89265485546875,9.119293212890625,8.59363185546875,9.119293212890625C9.29461185546875,9.119293212890625,9.86286185546875,9.687546212890625,9.86286185546875,10.388523212890625L9.86286185546875,12.926983212890626C9.86286185546875,13.627963212890625,9.29461185546875,14.196213212890626,8.59363185546875,14.196213212890626C7.89265485546875,14.196213212890626,7.32440185546875,13.627963212890625,7.32440185546875,12.926983212890626Z" fill="${color}" fill-opacity="1"/></g></g></svg>`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
40
|
});
|
package/dist/loading/index.wxs
CHANGED
|
@@ -12,21 +12,21 @@ function textStyle(data) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function loadingStyle(data) {
|
|
15
|
-
var iconSrc = ''
|
|
15
|
+
var iconSrc = '';
|
|
16
16
|
|
|
17
17
|
if (data.type === 'spinner') {
|
|
18
|
-
iconSrc = data.spinner
|
|
18
|
+
iconSrc = data.spinner;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
if (data.type === 'circular') {
|
|
22
|
-
iconSrc = data.circular
|
|
22
|
+
iconSrc = data.circular;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var ret = style({
|
|
26
|
-
'
|
|
26
|
+
'mask-image': "url('".concat(iconSrc, "')"),
|
|
27
27
|
width: addUnit(data.size),
|
|
28
28
|
height: addUnit(data.size),
|
|
29
|
-
'
|
|
29
|
+
'mask-size': addUnit(data.size),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
return ret;
|
package/dist/loading/index.wxss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#1989fa);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;background:var(--loading-spinner-color,#1989fa);box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(8)}.smart-loading__loading{background:var(--loading-spinner-color,#1989fa)}.smart-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.smart-loading__text:empty{display:none}.smart-loading--vertical{flex-direction:column}.smart-loading--vertical .smart-loading__text{margin:var(--padding-xs,8px) 0 0}@keyframes smart-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
package/dist/popover/index.js
CHANGED
|
@@ -54,7 +54,7 @@ SmartComponent({
|
|
|
54
54
|
},
|
|
55
55
|
duration: {
|
|
56
56
|
type: Number,
|
|
57
|
-
value:
|
|
57
|
+
value: 3000,
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
data: { currentShow: false, showStyle: '', cancel_timer: null },
|
|
@@ -190,6 +190,10 @@ SmartComponent({
|
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
onClose() {
|
|
193
|
+
if (this.data.cancel_timer) {
|
|
194
|
+
clearTimeout(this.data.cancel_timer);
|
|
195
|
+
this.data.cancel_timer = null;
|
|
196
|
+
}
|
|
193
197
|
this.setData({
|
|
194
198
|
showStyle: 'opacity: 0;',
|
|
195
199
|
});
|
package/dist/popover/index.wxml
CHANGED
package/dist/switch/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{display:inline-flex}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);box-sizing:initial;display:inline-block;height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.067em));position:relative;transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch--label{width:var(--switch-label-width,2em)}.smart-switch__center{box-sizing:initial;height:100%;position:relative;width:100%}.smart-switch__label_active{align-items:center;color:var(--switch-label-active-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;left:0;padding-left:var(--switch-border,var(--switch-padding,.067em));position:absolute;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_active .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__label_inactive{align-items:center;color:var(--switch-label-inactive-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;padding-right:var(--switch-border,var(--switch-padding,.067em));position:absolute;right:0;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_inactive .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));left:calc(100% - var(--switch-node-size, .867em))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
package/dist/switch/index.js
CHANGED
package/dist/switch/index.wxml
CHANGED
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
<block wx:if="{{stopClickPropagation}}">
|
|
5
5
|
<view
|
|
6
|
-
class="{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class"
|
|
6
|
+
class="{{ utils.bem('switch', { on: checked === activeValue, disabled, label: activeText || inactiveText }) }} custom-class"
|
|
7
7
|
style="{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}"
|
|
8
8
|
catch:tap="onClick"
|
|
9
9
|
>
|
|
10
10
|
<view class="smart-switch__center">
|
|
11
|
+
<view wx:if="{{ activeText }}" style="opacity: {{checked ? '1' : '0'}}" class="smart-switch__label_active">
|
|
12
|
+
<text class="smart-switch__label_text">{{ activeText }}</text>
|
|
13
|
+
</view>
|
|
14
|
+
<view wx:if="{{ inactiveText }}" style="opacity: {{!checked ? '1' : '0'}}" class="smart-switch__label_inactive">
|
|
15
|
+
<text class="smart-switch__label_text">{{ inactiveText }}</text>
|
|
16
|
+
</view>
|
|
11
17
|
<view class="smart-switch__node node-class">
|
|
12
18
|
<smart-loading
|
|
13
19
|
wx:if="{{ loading }}"
|
|
@@ -20,11 +26,17 @@
|
|
|
20
26
|
</block>
|
|
21
27
|
<block wx:else>
|
|
22
28
|
<view
|
|
23
|
-
class="{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class"
|
|
29
|
+
class="{{ utils.bem('switch', { on: checked === activeValue, disabled, label: activeText || inactiveText }) }} custom-class"
|
|
24
30
|
style="{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}"
|
|
25
31
|
bind:tap="onClick"
|
|
26
32
|
>
|
|
27
33
|
<view class="smart-switch__center">
|
|
34
|
+
<view wx:if="{{ activeText }}" style="opacity: {{checked ? '1' : '0'}}" class="smart-switch__label_active">
|
|
35
|
+
<text class="smart-switch__label_text">{{ activeText }}</text>
|
|
36
|
+
</view>
|
|
37
|
+
<view wx:if="{{ inactiveText }}" style="opacity: {{!checked ? '1' : '0'}}" class="smart-switch__label_inactive">
|
|
38
|
+
<text class="smart-switch__label_text">{{ inactiveText }}</text>
|
|
39
|
+
</view>
|
|
28
40
|
<view class="smart-switch__node node-class">
|
|
29
41
|
<smart-loading
|
|
30
42
|
wx:if="{{ loading }}"
|
package/dist/switch/index.wxss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{display:inline-flex}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);box-sizing:initial;display:inline-block;height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.067em));position:relative;transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch--label{width:var(--switch-label-width,2em)}.smart-switch__center{box-sizing:initial;height:100%;position:relative;width:100%}.smart-switch__label_active{align-items:center;color:var(--switch-label-active-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;left:0;padding-left:var(--switch-border,var(--switch-padding,.067em));position:absolute;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_active .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__label_inactive{align-items:center;color:var(--switch-label-inactive-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;padding-right:var(--switch-border,var(--switch-padding,.067em));position:absolute;right:0;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_inactive .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));left:calc(100% - var(--switch-node-size, .867em))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
package/lib/loading/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#1989fa);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;background:var(--loading-spinner-color,#1989fa);box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(8)}.smart-loading__loading{background:var(--loading-spinner-color,#1989fa)}.smart-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.smart-loading__text:empty{display:none}.smart-loading--vertical{flex-direction:column}.smart-loading--vertical .smart-loading__text{margin:var(--padding-xs,8px) 0 0}@keyframes smart-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
package/lib/loading/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var component_1 = require("../common/component");
|
|
|
5
5
|
props: {
|
|
6
6
|
color: {
|
|
7
7
|
type: String,
|
|
8
|
-
value: '#1989FA'
|
|
8
|
+
value: 'var(--loading-text-color, #1989FA)',
|
|
9
9
|
},
|
|
10
10
|
vertical: Boolean,
|
|
11
11
|
type: {
|
|
@@ -20,12 +20,12 @@ var component_1 = require("../common/component");
|
|
|
20
20
|
},
|
|
21
21
|
data: {
|
|
22
22
|
spinner: '',
|
|
23
|
-
circular: ''
|
|
23
|
+
circular: '',
|
|
24
24
|
},
|
|
25
25
|
created: function () {
|
|
26
26
|
this.setData({
|
|
27
27
|
spinner: this.SpinnerLoading({ color: this.data.color }),
|
|
28
|
-
circular: this.CircularLoading({ color: this.data.color })
|
|
28
|
+
circular: this.CircularLoading({ color: this.data.color }),
|
|
29
29
|
});
|
|
30
30
|
},
|
|
31
31
|
methods: {
|
|
@@ -39,6 +39,6 @@ var component_1 = require("../common/component");
|
|
|
39
39
|
SpinnerLoading: function (_a) {
|
|
40
40
|
var _b = _a.color, color = _b === void 0 ? '#3678E3' : _b;
|
|
41
41
|
return this.createSvgIcon("<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" fill=\"none\" version=\"1.1\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\"><defs><clipPath id=\"master_svg0_1695_29273\"><rect x=\"0\" y=\"0\" width=\"32\" height=\"32\" rx=\"0\"/></clipPath></defs><g clip-path=\"url(#master_svg0_1695_29273)\"><g><path d=\"M14.73077392578125,8.807690000000001L14.73077392578125,6.26923C14.73077392578125,5.568254,15.29902692578125,5,16.00000392578125,5C16.70097392578125,5,17.26923392578125,5.568254,17.26923392578125,6.26923L17.26923392578125,8.807690000000001C17.26923392578125,9.50867,16.70097392578125,10.07693,16.00000392578125,10.07693C15.29902692578125,10.07693,14.73077392578125,9.50867,14.73077392578125,8.807690000000001Z\" fill=\"".concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(0.7071067690849304,0.7071067690849304,-0.7071067690849304,0.7071067690849304,11.880707750418878,-14.033822285849965)\" style=\"opacity:0.05000000074505806;\"><path d=\"M22.88067626953125,11.132061337890626L22.88067626953125,8.593601337890625C22.88067626953125,7.892624337890625,23.44892926953125,7.324371337890625,24.14990626953125,7.324371337890625C24.85088626953125,7.324371337890625,25.41913626953125,7.892624337890625,25.41913626953125,8.593601337890625L25.41913626953125,11.132061337890626C25.41913626953125,11.833041337890625,24.85088626953125,12.401291337890626,24.14990626953125,12.401291337890626C23.44892926953125,12.401291337890626,22.88067626953125,11.833041337890625,22.88067626953125,11.132061337890626Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(0,1,-1,0,41.73081970214844,-12.269180297851562)\" style=\"opacity:0.10000000149011612;\"><path d=\"M27,18.53850970214844L27,16.000049702148438C27,15.299072702148438,27.568253,14.730819702148438,28.26923,14.730819702148438C28.97021,14.730819702148438,29.53846,15.299072702148438,29.53846,16.000049702148438L29.53846,18.53850970214844C29.53846,19.23948970214844,28.97021,19.80773970214844,28.26923,19.80773970214844C27.568253,19.80773970214844,27,19.23948970214844,27,18.53850970214844Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(-0.7071067690849304,0.7071067690849304,-0.7071067690849304,-0.7071067690849304,58.30294381839121,21.611726407169044)\" style=\"opacity:0.15000000596046448;\"><path d=\"M24.675537109375,26.68848833984375L24.675537109375,24.15002833984375C24.675537109375,23.44905133984375,25.243790109375,22.88079833984375,25.944767109375,22.88079833984375C26.645747109375,22.88079833984375,27.213997109375,23.44905133984375,27.213997109375,24.15002833984375L27.213997109375,26.68848833984375C27.213997109375,27.389468339843752,26.645747109375,27.95771833984375,25.944767109375,27.95771833984375C25.243790109375,27.95771833984375,24.675537109375,27.389468339843752,24.675537109375,26.68848833984375Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(-1,0,0,-1,34.5384521484375,54)\" style=\"opacity:0.30000001192092896;\"><path d=\"M17.26922607421875,30.80769L17.26922607421875,28.26923C17.26922607421875,27.568254,17.83747907421875,27,18.53845607421875,27C19.23942607421875,27,19.80768607421875,27.568254,19.80768607421875,28.26923L19.80768607421875,30.80769C19.80768607421875,31.508670000000002,19.23942607421875,32.07693,18.53845607421875,32.07693C17.83747907421875,32.07693,17.26922607421875,31.508670000000002,17.26922607421875,30.80769Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(-0.7071068286895752,-0.7071067094802856,0.7071067094802856,-0.7071068286895752,-1.8805817391439632,48.572416538932885)\" style=\"opacity:0.550000011920929;\"><path d=\"M9.119384765625,28.483379697265626L9.119384765625,25.944919697265625C9.119384765625,25.243942697265624,9.687637765625,24.675689697265625,10.388614765625,24.675689697265625C11.089594765625,24.675689697265625,11.657844765625,25.243942697265624,11.657844765625,25.944919697265625L11.657844765625,28.483379697265626C11.657844765625,29.184359697265627,11.089594765625,29.752609697265626,10.388614765625,29.752609697265626C9.687637765625,29.752609697265626,9.119384765625,29.184359697265627,9.119384765625,28.483379697265626Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(0,-1,1,0,-12.269241333007812,22.269241333007812)\" style=\"opacity:0.699999988079071;\"><path d=\"M5,21.076931333007813L5,18.538471333007813C5,17.83749433300781,5.568253,17.269241333007812,6.26923,17.269241333007812C6.97021,17.269241333007812,7.538460000000001,17.83749433300781,7.538460000000001,18.538471333007813L7.538460000000001,21.076931333007813C7.538460000000001,21.777911333007815,6.97021,22.346161333007814,6.26923,22.346161333007814C5.568253,22.346161333007814,5,21.777911333007815,5,21.076931333007813Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g><g transform=\"matrix(0.7071066498756409,-0.70710688829422,0.70710688829422,0.7071066498756409,-4.303046450104375,7.850115344526785)\" style=\"opacity:0.8500000238418579;\"><path d=\"M7.32440185546875,12.926983212890626L7.32440185546875,10.388523212890625C7.32440185546875,9.687546212890625,7.89265485546875,9.119293212890625,8.59363185546875,9.119293212890625C9.29461185546875,9.119293212890625,9.86286185546875,9.687546212890625,9.86286185546875,10.388523212890625L9.86286185546875,12.926983212890626C9.86286185546875,13.627963212890625,9.29461185546875,14.196213212890626,8.59363185546875,14.196213212890626C7.89265485546875,14.196213212890626,7.32440185546875,13.627963212890625,7.32440185546875,12.926983212890626Z\" fill=\"").concat(color, "\" fill-opacity=\"1\"/></g></g></svg>"));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
44
|
});
|
package/lib/loading/index.wxs
CHANGED
|
@@ -12,21 +12,21 @@ function textStyle(data) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function loadingStyle(data) {
|
|
15
|
-
var iconSrc = ''
|
|
15
|
+
var iconSrc = '';
|
|
16
16
|
|
|
17
17
|
if (data.type === 'spinner') {
|
|
18
|
-
iconSrc = data.spinner
|
|
18
|
+
iconSrc = data.spinner;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
if (data.type === 'circular') {
|
|
22
|
-
iconSrc = data.circular
|
|
22
|
+
iconSrc = data.circular;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var ret = style({
|
|
26
|
-
'
|
|
26
|
+
'mask-image': "url('".concat(iconSrc, "')"),
|
|
27
27
|
width: addUnit(data.size),
|
|
28
28
|
height: addUnit(data.size),
|
|
29
|
-
'
|
|
29
|
+
'mask-size': addUnit(data.size),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
return ret;
|
package/lib/loading/index.wxss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#1989fa);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;background:var(--loading-spinner-color,#1989fa);box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(8)}.smart-loading__loading{background:var(--loading-spinner-color,#1989fa)}.smart-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.smart-loading__text:empty{display:none}.smart-loading--vertical{flex-direction:column}.smart-loading--vertical .smart-loading__text{margin:var(--padding-xs,8px) 0 0}@keyframes smart-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
package/lib/popover/index.js
CHANGED
|
@@ -67,7 +67,7 @@ function createSvgIcon(svg) {
|
|
|
67
67
|
},
|
|
68
68
|
duration: {
|
|
69
69
|
type: Number,
|
|
70
|
-
value:
|
|
70
|
+
value: 3000,
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
data: { currentShow: false, showStyle: '', cancel_timer: null },
|
|
@@ -205,6 +205,10 @@ function createSvgIcon(svg) {
|
|
|
205
205
|
},
|
|
206
206
|
onClose: function () {
|
|
207
207
|
var _this = this;
|
|
208
|
+
if (this.data.cancel_timer) {
|
|
209
|
+
clearTimeout(this.data.cancel_timer);
|
|
210
|
+
this.data.cancel_timer = null;
|
|
211
|
+
}
|
|
208
212
|
this.setData({
|
|
209
213
|
showStyle: 'opacity: 0;',
|
|
210
214
|
});
|
package/lib/popover/index.wxml
CHANGED
package/lib/switch/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.
|
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{display:inline-flex}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);box-sizing:initial;display:inline-block;height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.067em));position:relative;transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch--label{width:var(--switch-label-width,2em)}.smart-switch__center{box-sizing:initial;height:100%;position:relative;width:100%}.smart-switch__label_active{align-items:center;color:var(--switch-label-active-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;left:0;padding-left:var(--switch-border,var(--switch-padding,.067em));position:absolute;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_active .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__label_inactive{align-items:center;color:var(--switch-label-inactive-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;padding-right:var(--switch-border,var(--switch-padding,.067em));position:absolute;right:0;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_inactive .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));left:calc(100% - var(--switch-node-size, .867em))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
package/lib/switch/index.js
CHANGED
package/lib/switch/index.wxml
CHANGED
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
<block wx:if="{{stopClickPropagation}}">
|
|
5
5
|
<view
|
|
6
|
-
class="{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class"
|
|
6
|
+
class="{{ utils.bem('switch', { on: checked === activeValue, disabled, label: activeText || inactiveText }) }} custom-class"
|
|
7
7
|
style="{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}"
|
|
8
8
|
catch:tap="onClick"
|
|
9
9
|
>
|
|
10
10
|
<view class="smart-switch__center">
|
|
11
|
+
<view wx:if="{{ activeText }}" style="opacity: {{checked ? '1' : '0'}}" class="smart-switch__label_active">
|
|
12
|
+
<text class="smart-switch__label_text">{{ activeText }}</text>
|
|
13
|
+
</view>
|
|
14
|
+
<view wx:if="{{ inactiveText }}" style="opacity: {{!checked ? '1' : '0'}}" class="smart-switch__label_inactive">
|
|
15
|
+
<text class="smart-switch__label_text">{{ inactiveText }}</text>
|
|
16
|
+
</view>
|
|
11
17
|
<view class="smart-switch__node node-class">
|
|
12
18
|
<smart-loading
|
|
13
19
|
wx:if="{{ loading }}"
|
|
@@ -20,11 +26,17 @@
|
|
|
20
26
|
</block>
|
|
21
27
|
<block wx:else>
|
|
22
28
|
<view
|
|
23
|
-
class="{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class"
|
|
29
|
+
class="{{ utils.bem('switch', { on: checked === activeValue, disabled, label: activeText || inactiveText }) }} custom-class"
|
|
24
30
|
style="{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}"
|
|
25
31
|
bind:tap="onClick"
|
|
26
32
|
>
|
|
27
33
|
<view class="smart-switch__center">
|
|
34
|
+
<view wx:if="{{ activeText }}" style="opacity: {{checked ? '1' : '0'}}" class="smart-switch__label_active">
|
|
35
|
+
<text class="smart-switch__label_text">{{ activeText }}</text>
|
|
36
|
+
</view>
|
|
37
|
+
<view wx:if="{{ inactiveText }}" style="opacity: {{!checked ? '1' : '0'}}" class="smart-switch__label_inactive">
|
|
38
|
+
<text class="smart-switch__label_text">{{ inactiveText }}</text>
|
|
39
|
+
</view>
|
|
28
40
|
<view class="smart-switch__node node-class">
|
|
29
41
|
<smart-loading
|
|
30
42
|
wx:if="{{ loading }}"
|
package/lib/switch/index.wxss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{display:inline-flex}.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);box-sizing:initial;display:inline-block;height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.067em));position:relative;transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch--label{width:var(--switch-label-width,2em)}.smart-switch__center{box-sizing:initial;height:100%;position:relative;width:100%}.smart-switch__label_active{align-items:center;color:var(--switch-label-active-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;left:0;padding-left:var(--switch-border,var(--switch-padding,.067em));position:absolute;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_active .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__label_inactive{align-items:center;color:var(--switch-label-inactive-color,var(--app-B3,#fff));display:flex;height:100%;justify-content:center;padding-right:var(--switch-border,var(--switch-padding,.067em));position:absolute;right:0;text-align:center;top:0;width:calc(100% - var(--switch-node-size, .867em))}.smart-switch__label_inactive .smart-switch__label_text{font-size:var(--switch-label-font-size,13px)}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));left:calc(100% - var(--switch-node-size, .867em))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|