@varlet/ui 1.26.8 → 1.27.0-alpha.1649242923701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-sheet/ActionSheet.js +29 -27
- package/es/app-bar/AppBar.js +32 -27
- package/es/back-top/BackTop.js +9 -2
- package/es/badge/Badge.js +22 -14
- package/es/bottom-navigation/BottomNavigation.js +167 -0
- package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/es/bottom-navigation/bottomNavigation.css +1 -0
- package/es/bottom-navigation/bottomNavigation.less +49 -0
- package/es/bottom-navigation/index.js +8 -0
- package/es/bottom-navigation/props.js +40 -0
- package/es/bottom-navigation/provide.js +17 -0
- package/es/bottom-navigation/style/index.js +4 -0
- package/es/bottom-navigation/style/less.js +4 -0
- package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/es/bottom-navigation-item/index.js +8 -0
- package/es/bottom-navigation-item/props.js +22 -0
- package/es/bottom-navigation-item/provide.js +21 -0
- package/es/bottom-navigation-item/style/index.js +6 -0
- package/es/bottom-navigation-item/style/less.js +6 -0
- package/es/button/Button.js +12 -5
- package/es/card/Card.js +33 -28
- package/es/cell/Cell.js +26 -15
- package/es/checkbox/Checkbox.js +28 -26
- package/es/checkbox-group/CheckboxGroup.js +21 -25
- package/es/chip/Chip.js +16 -7
- package/es/chip/chip.css +1 -1
- package/es/chip/chip.less +11 -11
- package/es/col/Col.js +12 -5
- package/es/collapse/Collapse.js +15 -12
- package/es/collapse-item/CollapseItem.js +31 -30
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/collapse-item/collapseItem.less +16 -16
- package/es/countdown/Countdown.js +14 -11
- package/es/counter/Counter.js +30 -27
- package/es/date-picker/DatePicker.js +28 -23
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/date-picker.less +22 -20
- package/es/date-picker/src/day-picker-panel.js +41 -34
- package/es/date-picker/src/month-picker-panel.js +27 -21
- package/es/date-picker/src/panel-header.js +16 -11
- package/es/date-picker/src/year-picker-panel.js +17 -9
- package/es/dialog/Dialog.js +36 -40
- package/es/divider/Divider.js +16 -12
- package/es/form/Form.js +11 -8
- package/es/form-details/FormDetails.js +27 -22
- package/es/icon/Icon.js +8 -1
- package/es/icon/icon.css +1 -1
- package/es/image/Image.js +19 -12
- package/es/image-preview/ImagePreview.js +35 -34
- package/es/index-anchor/IndexAnchor.js +8 -1
- package/es/index-bar/IndexBar.js +22 -20
- package/es/index.js +10 -0
- package/es/input/Input.js +45 -44
- package/es/lazy/index.js +2 -1
- package/es/less.js +2 -0
- package/es/list/List.js +39 -38
- package/es/loading/Loading.js +31 -23
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +32 -32
- package/es/menu/Menu.js +12 -10
- package/es/option/Option.js +16 -11
- package/es/pagination/Pagination.js +34 -44
- package/es/pagination/pagination.css +1 -1
- package/es/pagination/pagination.less +8 -8
- package/es/picker/Picker.js +51 -47
- package/es/popup/Popup.js +9 -5
- package/es/progress/Progress.js +44 -35
- package/es/progress/progress.css +1 -1
- package/es/progress/progress.less +12 -12
- package/es/pull-refresh/PullRefresh.js +13 -10
- package/es/radio/Radio.js +25 -25
- package/es/radio-group/RadioGroup.js +19 -19
- package/es/rate/Rate.js +27 -25
- package/es/ripple/index.js +6 -2
- package/es/row/Row.js +11 -4
- package/es/select/Select.js +53 -54
- package/es/skeleton/Skeleton.js +70 -81
- package/es/slider/Slider.js +44 -40
- package/es/slider/slider.css +1 -1
- package/es/slider/slider.less +5 -5
- package/es/snackbar/Snackbar.js +9 -5
- package/es/snackbar/core.js +20 -26
- package/es/snackbar/snackbar.css +1 -1
- package/es/snackbar/snackbar.less +66 -68
- package/es/space/Space.js +8 -3
- package/es/step/Step.js +25 -23
- package/es/step/step.css +1 -1
- package/es/step/step.less +10 -10
- package/es/steps/Steps.js +12 -5
- package/es/sticky/Sticky.js +14 -7
- package/es/style-provider/StyleProvider.js +6 -2
- package/es/style.css +1 -1
- package/es/style.js +2 -0
- package/es/swipe/Swipe.js +22 -16
- package/es/swipe-item/SwipeItem.js +9 -4
- package/es/switch/Switch.js +25 -23
- package/es/switch/switch.css +1 -1
- package/es/switch/switch.less +2 -2
- package/es/tab/Tab.js +8 -1
- package/es/tab-item/TabItem.js +8 -1
- package/es/table/Table.js +27 -20
- package/es/tabs/Tabs.js +16 -11
- package/es/tabs-items/TabsItems.js +10 -5
- package/es/themes/dark/bottomNavigation.js +4 -0
- package/es/themes/dark/bottomNavigationItem.js +3 -0
- package/es/themes/dark/index.js +3 -1
- package/es/time-picker/TimePicker.js +47 -38
- package/es/time-picker/clock.js +26 -22
- package/es/time-picker/timePicker.css +1 -1
- package/es/time-picker/timePicker.less +11 -11
- package/es/umdIndex.js +10 -0
- package/es/uploader/Uploader.js +62 -57
- package/es/utils/components.js +35 -0
- package/es/varlet.esm.js +2082 -1527
- package/highlight/attributes.json +48 -0
- package/highlight/tags.json +20 -0
- package/highlight/web-types.json +155 -1
- package/lib/action-sheet/ActionSheet.js +30 -26
- package/lib/app-bar/AppBar.js +31 -24
- package/lib/back-top/BackTop.js +11 -2
- package/lib/badge/Badge.js +23 -13
- package/lib/bottom-navigation/BottomNavigation.js +183 -0
- package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/lib/bottom-navigation/bottomNavigation.css +1 -0
- package/lib/bottom-navigation/bottomNavigation.less +49 -0
- package/lib/bottom-navigation/index.js +17 -0
- package/lib/bottom-navigation/props.js +45 -0
- package/lib/bottom-navigation/provide.js +27 -0
- package/lib/bottom-navigation/style/index.js +4 -0
- package/lib/bottom-navigation/style/less.js +4 -0
- package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/lib/bottom-navigation-item/index.js +17 -0
- package/lib/bottom-navigation-item/props.js +27 -0
- package/lib/bottom-navigation-item/provide.js +28 -0
- package/lib/bottom-navigation-item/style/index.js +6 -0
- package/lib/bottom-navigation-item/style/less.js +6 -0
- package/lib/button/Button.js +13 -4
- package/lib/card/Card.js +34 -27
- package/lib/cell/Cell.js +26 -13
- package/lib/checkbox/Checkbox.js +26 -23
- package/lib/checkbox-group/CheckboxGroup.js +19 -22
- package/lib/chip/Chip.js +18 -7
- package/lib/chip/chip.css +1 -1
- package/lib/chip/chip.less +11 -11
- package/lib/col/Col.js +14 -5
- package/lib/collapse/Collapse.js +15 -10
- package/lib/collapse-item/CollapseItem.js +31 -28
- package/lib/collapse-item/collapseItem.css +1 -1
- package/lib/collapse-item/collapseItem.less +16 -16
- package/lib/countdown/Countdown.js +14 -10
- package/lib/counter/Counter.js +29 -26
- package/lib/date-picker/DatePicker.js +30 -23
- package/lib/date-picker/date-picker.css +1 -1
- package/lib/date-picker/date-picker.less +22 -20
- package/lib/date-picker/src/day-picker-panel.js +41 -32
- package/lib/date-picker/src/month-picker-panel.js +27 -19
- package/lib/date-picker/src/panel-header.js +16 -9
- package/lib/date-picker/src/year-picker-panel.js +19 -9
- package/lib/dialog/Dialog.js +36 -38
- package/lib/divider/Divider.js +16 -10
- package/lib/form/Form.js +11 -6
- package/lib/form-details/FormDetails.js +27 -20
- package/lib/icon/Icon.js +10 -1
- package/lib/icon/icon.css +1 -1
- package/lib/image/Image.js +20 -11
- package/lib/image-preview/ImagePreview.js +35 -33
- package/lib/index-anchor/IndexAnchor.js +10 -1
- package/lib/index-bar/IndexBar.js +24 -20
- package/lib/index.js +6 -0
- package/lib/input/Input.js +45 -43
- package/lib/lazy/index.js +3 -1
- package/lib/less.js +2 -0
- package/lib/list/List.js +39 -36
- package/lib/loading/Loading.js +33 -23
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +32 -32
- package/lib/menu/Menu.js +12 -9
- package/lib/option/Option.js +16 -9
- package/lib/pagination/Pagination.js +36 -44
- package/lib/pagination/pagination.css +1 -1
- package/lib/pagination/pagination.less +8 -8
- package/lib/picker/Picker.js +51 -46
- package/lib/popup/Popup.js +9 -4
- package/lib/progress/Progress.js +45 -34
- package/lib/progress/progress.css +1 -1
- package/lib/progress/progress.less +12 -12
- package/lib/pull-refresh/PullRefresh.js +14 -10
- package/lib/radio/Radio.js +23 -22
- package/lib/radio-group/RadioGroup.js +17 -16
- package/lib/rate/Rate.js +27 -24
- package/lib/ripple/index.js +7 -2
- package/lib/row/Row.js +12 -3
- package/lib/select/Select.js +53 -53
- package/lib/skeleton/Skeleton.js +69 -78
- package/lib/slider/Slider.js +42 -38
- package/lib/slider/slider.css +1 -1
- package/lib/slider/slider.less +5 -5
- package/lib/snackbar/Snackbar.js +9 -4
- package/lib/snackbar/core.js +20 -25
- package/lib/snackbar/snackbar.css +1 -1
- package/lib/snackbar/snackbar.less +66 -68
- package/lib/space/Space.js +9 -3
- package/lib/step/Step.js +26 -22
- package/lib/step/step.css +1 -1
- package/lib/step/step.less +10 -10
- package/lib/steps/Steps.js +13 -4
- package/lib/sticky/Sticky.js +15 -6
- package/lib/style-provider/StyleProvider.js +8 -2
- package/lib/style.css +1 -1
- package/lib/style.js +2 -0
- package/lib/swipe/Swipe.js +23 -16
- package/lib/swipe-item/SwipeItem.js +10 -3
- package/lib/switch/Switch.js +23 -20
- package/lib/switch/switch.css +1 -1
- package/lib/switch/switch.less +2 -2
- package/lib/tab/Tab.js +10 -1
- package/lib/tab-item/TabItem.js +10 -1
- package/lib/table/Table.js +27 -18
- package/lib/tabs/Tabs.js +18 -11
- package/lib/tabs-items/TabsItems.js +11 -4
- package/lib/themes/dark/bottomNavigation.js +9 -0
- package/lib/themes/dark/bottomNavigationItem.js +8 -0
- package/lib/themes/dark/index.js +5 -1
- package/lib/time-picker/TimePicker.js +49 -38
- package/lib/time-picker/clock.js +26 -20
- package/lib/time-picker/timePicker.css +1 -1
- package/lib/time-picker/timePicker.less +11 -11
- package/lib/uploader/Uploader.js +60 -55
- package/lib/utils/components.js +39 -0
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +19 -0
- package/types/bottomNavigationItem.d.ts +16 -0
- package/types/global.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/es/step/Step.js
CHANGED
|
@@ -2,29 +2,30 @@ import { computed, defineComponent, ref, watch } from 'vue';
|
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { useSteps } from './provide';
|
|
4
4
|
import VarIcon from '../icon';
|
|
5
|
-
import {
|
|
5
|
+
import { createNamespace } from '../utils/components';
|
|
6
|
+
var {
|
|
7
|
+
n,
|
|
8
|
+
classes
|
|
9
|
+
} = createNamespace('step');
|
|
10
|
+
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderSlot as _renderSlot, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
6
11
|
|
|
7
12
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
8
13
|
|
|
9
14
|
var _hoisted_1 = {
|
|
10
|
-
class: "var-step"
|
|
11
|
-
};
|
|
12
|
-
var _hoisted_2 = {
|
|
13
15
|
key: 3
|
|
14
16
|
};
|
|
15
17
|
export function render(_ctx, _cache) {
|
|
16
18
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
17
19
|
|
|
18
|
-
return _openBlock(), _createElementBlock("div",
|
|
19
|
-
class: _normalizeClass(
|
|
20
|
+
return _openBlock(), _createElementBlock("div", {
|
|
21
|
+
class: _normalizeClass(_ctx.n())
|
|
22
|
+
}, [_createElementVNode("div", {
|
|
23
|
+
class: _normalizeClass(_ctx.n(_ctx.direction))
|
|
20
24
|
}, [_createElementVNode("div", {
|
|
21
|
-
class: _normalizeClass(
|
|
25
|
+
class: _normalizeClass(_ctx.n(_ctx.direction + "-main")),
|
|
22
26
|
ref: _ctx.getRef
|
|
23
27
|
}, [_createElementVNode("div", {
|
|
24
|
-
class: _normalizeClass(
|
|
25
|
-
["var-step-" + _ctx.direction + "__tag"]: true,
|
|
26
|
-
["var-step-" + _ctx.direction + "__tag--active"]: _ctx.isActive || _ctx.isCurrent
|
|
27
|
-
}),
|
|
28
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(_ctx.direction + "-tag"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-tag--active")])),
|
|
28
29
|
style: _normalizeStyle({
|
|
29
30
|
backgroundColor: _ctx.isActive || _ctx.isCurrent ? _ctx.activeColor : _ctx.inactiveColor
|
|
30
31
|
}),
|
|
@@ -33,34 +34,31 @@ export function render(_ctx, _cache) {
|
|
|
33
34
|
})
|
|
34
35
|
}, [_ctx.isActive ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
35
36
|
key: 0,
|
|
36
|
-
class:
|
|
37
|
+
class: _normalizeClass(_ctx.n('icon')),
|
|
37
38
|
"var-step-cover": "",
|
|
38
39
|
name: _ctx.activeIcon
|
|
39
40
|
}, null, 8
|
|
40
41
|
/* PROPS */
|
|
41
|
-
, ["name"])) : _ctx.isCurrent && _ctx.currentIcon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
42
|
+
, ["class", "name"])) : _ctx.isCurrent && _ctx.currentIcon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
42
43
|
key: 1,
|
|
43
|
-
class:
|
|
44
|
+
class: _normalizeClass(_ctx.n('icon')),
|
|
44
45
|
"var-step-cover": "",
|
|
45
46
|
name: _ctx.currentIcon
|
|
46
47
|
}, null, 8
|
|
47
48
|
/* PROPS */
|
|
48
|
-
, ["name"])) : _ctx.inactiveIcon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
49
|
+
, ["class", "name"])) : _ctx.inactiveIcon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
49
50
|
key: 2,
|
|
50
|
-
class:
|
|
51
|
+
class: _normalizeClass(_ctx.n('icon')),
|
|
51
52
|
"var-step-cover": "",
|
|
52
53
|
name: _ctx.inactiveIcon
|
|
53
54
|
}, null, 8
|
|
54
55
|
/* PROPS */
|
|
55
|
-
, ["name"])) : (_openBlock(), _createElementBlock("span",
|
|
56
|
+
, ["class", "name"])) : (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(_ctx.index + 1), 1
|
|
56
57
|
/* TEXT */
|
|
57
58
|
))], 6
|
|
58
59
|
/* CLASS, STYLE */
|
|
59
60
|
), _createElementVNode("div", {
|
|
60
|
-
class: _normalizeClass(
|
|
61
|
-
["var-step-" + _ctx.direction + "__content"]: true,
|
|
62
|
-
["var-step-" + _ctx.direction + "__content--active"]: _ctx.isActive || _ctx.isCurrent
|
|
63
|
-
}),
|
|
61
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(_ctx.direction + "-content"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-content--active")])),
|
|
64
62
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
65
63
|
return _ctx.click && _ctx.click(...arguments);
|
|
66
64
|
})
|
|
@@ -70,7 +68,7 @@ export function render(_ctx, _cache) {
|
|
|
70
68
|
/* CLASS */
|
|
71
69
|
), !_ctx.isLastChild ? (_openBlock(), _createElementBlock("div", {
|
|
72
70
|
key: 0,
|
|
73
|
-
class: _normalizeClass(
|
|
71
|
+
class: _normalizeClass(_ctx.n(_ctx.direction + "-line")),
|
|
74
72
|
style: _normalizeStyle({
|
|
75
73
|
margin: _ctx.lineMargin
|
|
76
74
|
})
|
|
@@ -78,7 +76,9 @@ export function render(_ctx, _cache) {
|
|
|
78
76
|
/* CLASS, STYLE */
|
|
79
77
|
)) : _createCommentVNode("v-if", true)], 2
|
|
80
78
|
/* CLASS */
|
|
81
|
-
)]
|
|
79
|
+
)], 2
|
|
80
|
+
/* CLASS */
|
|
81
|
+
);
|
|
82
82
|
}
|
|
83
83
|
export default defineComponent({
|
|
84
84
|
render,
|
|
@@ -129,6 +129,8 @@ export default defineComponent({
|
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
return {
|
|
132
|
+
n,
|
|
133
|
+
classes,
|
|
132
134
|
main,
|
|
133
135
|
index,
|
|
134
136
|
isActive,
|
package/es/step/step.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --step-tag-size: 20px; --step-tag-background: #9e9e9e; --step-tag-font-size: var(--font-size-md); --step-tag-color: #fff; --step-tag-active-color: var(--color-primary); --step-tag-margin: 4px 0; --step-tag-icon-size: var(--font-size-lg); --step-content-font-size: var(--font-size-md); --step-content-color: rgba(0, 0, 0, 0.38); --step-content-active-color: #000; --step-line-background: #000; --step-vertical-min-height: 30px; --step-vertical-tag-margin: 0 4px; --step-vertical-line-height: calc(100% - 30px); --step-vertical-line-min-height: 20px;}.tag { width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step { display: flex; position: relative; flex: 1; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-
|
|
1
|
+
:root { --step-tag-size: 20px; --step-tag-background: #9e9e9e; --step-tag-font-size: var(--font-size-md); --step-tag-color: #fff; --step-tag-active-color: var(--color-primary); --step-tag-margin: 4px 0; --step-tag-icon-size: var(--font-size-lg); --step-content-font-size: var(--font-size-md); --step-content-color: rgba(0, 0, 0, 0.38); --step-content-active-color: #000; --step-line-background: #000; --step-vertical-min-height: 30px; --step-vertical-tag-margin: 0 4px; --step-vertical-line-height: calc(100% - 30px); --step-vertical-line-min-height: 20px;}.tag { width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step { display: flex; position: relative; flex: 1; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-step__horizontal { display: flex; width: 100%;}.var-step__horizontal-main { display: flex; flex-direction: column; align-items: center; flex-basis: 100%;}.var-step__horizontal-tag { margin: var(--step-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__horizontal-tag--active { background: var(--step-tag-active-color);}.var-step__horizontal-content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__horizontal-content--active { color: var(--step-content-active-color);}.var-step__horizontal-line { position: relative; top: 14px; flex: 1; height: 1px; transform: scaleY(0.5); background: var(--step-line-background);}.var-step__vertical { width: 100%;}.var-step__vertical-main { display: flex; align-items: flex-start; min-height: var(--step-vertical-min-height);}.var-step__vertical-tag { margin: var(--step-vertical-tag-margin); width: var(--step-tag-size); height: var(--step-tag-size); background: var(--step-tag-background); display: flex; font-size: var(--step-tag-font-size); align-items: center; justify-content: center; border-radius: 50%; color: var(--step-tag-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__vertical-tag--active { background: var(--step-tag-active-color);}.var-step__vertical-content { font-size: var(--step-content-font-size); color: var(--step-content-color); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier);}.var-step__vertical-content--active { color: var(--step-content-active-color);}.var-step__vertical-line { position: relative; height: var(--step-vertical-line-height); left: 14px; top: calc(-100% + 45px); min-height: var(--step-vertical-line-min-height); width: 1px; transform: scaleX(0.5); background: var(--step-line-background);}.var-step__icon[var-step-cover] { font-size: var(--step-tag-icon-size);}
|
package/es/step/step.less
CHANGED
|
@@ -63,18 +63,18 @@
|
|
|
63
63
|
flex: 1;
|
|
64
64
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
&__horizontal {
|
|
67
67
|
display: flex;
|
|
68
68
|
width: 100%;
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
&-main {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
align-items: center;
|
|
74
74
|
flex-basis: 100%;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
&-tag {
|
|
78
78
|
margin: var(--step-tag-margin);
|
|
79
79
|
.tag();
|
|
80
80
|
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
&-content {
|
|
87
87
|
.content();
|
|
88
88
|
|
|
89
89
|
&--active {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
&-line {
|
|
95
95
|
position: relative;
|
|
96
96
|
top: 14px;
|
|
97
97
|
flex: 1;
|
|
@@ -101,16 +101,16 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
&__vertical {
|
|
105
105
|
width: 100%;
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
&-main {
|
|
108
108
|
display: flex;
|
|
109
109
|
align-items: flex-start;
|
|
110
110
|
min-height: var(--step-vertical-min-height);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
&-tag {
|
|
114
114
|
margin: var(--step-vertical-tag-margin);
|
|
115
115
|
.tag();
|
|
116
116
|
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
&-content {
|
|
123
123
|
.content();
|
|
124
124
|
|
|
125
125
|
&--active {
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
&-line {
|
|
131
131
|
position: relative;
|
|
132
132
|
height: var(--step-vertical-line-height);
|
|
133
133
|
left: 14px;
|
package/es/steps/Steps.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { computed, defineComponent } from 'vue';
|
|
2
2
|
import { useStep } from './provide';
|
|
3
3
|
import { props } from './props';
|
|
4
|
-
import {
|
|
4
|
+
import { createNamespace, call } from '../utils/components';
|
|
5
|
+
var {
|
|
6
|
+
n
|
|
7
|
+
} = createNamespace('steps');
|
|
8
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
5
9
|
export function render(_ctx, _cache) {
|
|
6
10
|
return _openBlock(), _createElementBlock("div", {
|
|
7
|
-
class:
|
|
11
|
+
class: _normalizeClass(_ctx.n()),
|
|
8
12
|
style: _normalizeStyle({
|
|
9
13
|
flexDirection: _ctx.direction === 'horizontal' ? 'row' : 'column'
|
|
10
14
|
})
|
|
11
|
-
}, [_renderSlot(_ctx.$slots, "default")],
|
|
12
|
-
/* STYLE */
|
|
15
|
+
}, [_renderSlot(_ctx.$slots, "default")], 6
|
|
16
|
+
/* CLASS, STYLE */
|
|
13
17
|
);
|
|
14
18
|
}
|
|
15
19
|
export default defineComponent({
|
|
@@ -28,7 +32,7 @@ export default defineComponent({
|
|
|
28
32
|
} = useStep();
|
|
29
33
|
|
|
30
34
|
var clickStep = index => {
|
|
31
|
-
props.onClickStep
|
|
35
|
+
call(props.onClickStep, index);
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
var stepsProvider = {
|
|
@@ -40,6 +44,9 @@ export default defineComponent({
|
|
|
40
44
|
clickStep
|
|
41
45
|
};
|
|
42
46
|
bindStep(stepsProvider);
|
|
47
|
+
return {
|
|
48
|
+
n
|
|
49
|
+
};
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
});
|
package/es/sticky/Sticky.js
CHANGED
|
@@ -6,10 +6,15 @@ import { defineComponent, ref, onMounted, onUnmounted, onActivated, onDeactivate
|
|
|
6
6
|
import { props } from './props';
|
|
7
7
|
import { doubleRaf, getParentScroller, toPxNum } from '../utils/elements';
|
|
8
8
|
import { toNumber } from '../utils/shared';
|
|
9
|
-
import {
|
|
9
|
+
import { call, createNamespace } from '../utils/components';
|
|
10
|
+
var {
|
|
11
|
+
n,
|
|
12
|
+
classes
|
|
13
|
+
} = createNamespace('sticky');
|
|
14
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
10
15
|
export function render(_ctx, _cache) {
|
|
11
16
|
return _openBlock(), _createElementBlock("div", {
|
|
12
|
-
class: _normalizeClass(
|
|
17
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.enableCSSMode, _ctx.n('--css-mode')])),
|
|
13
18
|
ref: "stickyEl",
|
|
14
19
|
style: _normalizeStyle({
|
|
15
20
|
zIndex: _ctx.toNumber(_ctx.zIndex),
|
|
@@ -18,7 +23,7 @@ export function render(_ctx, _cache) {
|
|
|
18
23
|
height: _ctx.enableFixedMode ? _ctx.fixedHeight : undefined
|
|
19
24
|
})
|
|
20
25
|
}, [_createElementVNode("div", {
|
|
21
|
-
class:
|
|
26
|
+
class: _normalizeClass(_ctx.n('wrapper')),
|
|
22
27
|
ref: "wrapperEl",
|
|
23
28
|
style: _normalizeStyle({
|
|
24
29
|
zIndex: _ctx.toNumber(_ctx.zIndex),
|
|
@@ -28,8 +33,8 @@ export function render(_ctx, _cache) {
|
|
|
28
33
|
left: _ctx.enableFixedMode ? _ctx.fixedLeft : undefined,
|
|
29
34
|
top: _ctx.enableFixedMode ? _ctx.fixedTop : undefined
|
|
30
35
|
})
|
|
31
|
-
}, [_renderSlot(_ctx.$slots, "default")],
|
|
32
|
-
/* STYLE */
|
|
36
|
+
}, [_renderSlot(_ctx.$slots, "default")], 6
|
|
37
|
+
/* CLASS, STYLE */
|
|
33
38
|
)], 6
|
|
34
39
|
/* CLASS, STYLE */
|
|
35
40
|
);
|
|
@@ -93,10 +98,10 @@ export default defineComponent({
|
|
|
93
98
|
isFixed.value = true;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
|
-
onScroll
|
|
101
|
+
call(onScroll, offsetTop.value, true);
|
|
97
102
|
} else {
|
|
98
103
|
isFixed.value = false;
|
|
99
|
-
onScroll
|
|
104
|
+
call(onScroll, currentOffsetTop, false);
|
|
100
105
|
}
|
|
101
106
|
};
|
|
102
107
|
|
|
@@ -125,6 +130,8 @@ export default defineComponent({
|
|
|
125
130
|
onMounted(addScrollListener);
|
|
126
131
|
onUnmounted(removeScrollListener);
|
|
127
132
|
return {
|
|
133
|
+
n,
|
|
134
|
+
classes,
|
|
128
135
|
stickyEl,
|
|
129
136
|
wrapperEl,
|
|
130
137
|
isFixed,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
2
|
import { formatStyleVars } from '../utils/elements';
|
|
3
|
+
import { call, createNamespace } from '../utils/components';
|
|
4
|
+
var {
|
|
5
|
+
n
|
|
6
|
+
} = createNamespace('style-provider');
|
|
3
7
|
export default defineComponent({
|
|
4
8
|
name: 'VarStyleProvider',
|
|
5
9
|
props: {
|
|
@@ -14,9 +18,9 @@ export default defineComponent({
|
|
|
14
18
|
slots
|
|
15
19
|
} = _ref;
|
|
16
20
|
return () => h('div', {
|
|
17
|
-
class:
|
|
21
|
+
class: n(),
|
|
18
22
|
style: formatStyleVars(props.styleVars)
|
|
19
|
-
}, slots.default
|
|
23
|
+
}, call(slots.default));
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
});
|