@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.
Files changed (245) hide show
  1. package/es/action-sheet/ActionSheet.js +29 -27
  2. package/es/app-bar/AppBar.js +32 -27
  3. package/es/back-top/BackTop.js +9 -2
  4. package/es/badge/Badge.js +22 -14
  5. package/es/bottom-navigation/BottomNavigation.js +167 -0
  6. package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
  7. package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
  8. package/es/bottom-navigation/bottomNavigation.css +1 -0
  9. package/es/bottom-navigation/bottomNavigation.less +49 -0
  10. package/es/bottom-navigation/index.js +8 -0
  11. package/es/bottom-navigation/props.js +40 -0
  12. package/es/bottom-navigation/provide.js +17 -0
  13. package/es/bottom-navigation/style/index.js +4 -0
  14. package/es/bottom-navigation/style/less.js +4 -0
  15. package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
  16. package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
  17. package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  18. package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
  19. package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
  20. package/es/bottom-navigation-item/index.js +8 -0
  21. package/es/bottom-navigation-item/props.js +22 -0
  22. package/es/bottom-navigation-item/provide.js +21 -0
  23. package/es/bottom-navigation-item/style/index.js +6 -0
  24. package/es/bottom-navigation-item/style/less.js +6 -0
  25. package/es/button/Button.js +12 -5
  26. package/es/card/Card.js +33 -28
  27. package/es/cell/Cell.js +26 -15
  28. package/es/checkbox/Checkbox.js +28 -26
  29. package/es/checkbox-group/CheckboxGroup.js +21 -25
  30. package/es/chip/Chip.js +16 -7
  31. package/es/chip/chip.css +1 -1
  32. package/es/chip/chip.less +11 -11
  33. package/es/col/Col.js +12 -5
  34. package/es/collapse/Collapse.js +15 -12
  35. package/es/collapse-item/CollapseItem.js +31 -30
  36. package/es/collapse-item/collapseItem.css +1 -1
  37. package/es/collapse-item/collapseItem.less +16 -16
  38. package/es/countdown/Countdown.js +14 -11
  39. package/es/counter/Counter.js +30 -27
  40. package/es/date-picker/DatePicker.js +28 -23
  41. package/es/date-picker/date-picker.css +1 -1
  42. package/es/date-picker/date-picker.less +22 -20
  43. package/es/date-picker/src/day-picker-panel.js +41 -34
  44. package/es/date-picker/src/month-picker-panel.js +27 -21
  45. package/es/date-picker/src/panel-header.js +16 -11
  46. package/es/date-picker/src/year-picker-panel.js +17 -9
  47. package/es/dialog/Dialog.js +36 -40
  48. package/es/divider/Divider.js +16 -12
  49. package/es/form/Form.js +11 -8
  50. package/es/form-details/FormDetails.js +27 -22
  51. package/es/icon/Icon.js +8 -1
  52. package/es/icon/icon.css +1 -1
  53. package/es/image/Image.js +19 -12
  54. package/es/image-preview/ImagePreview.js +35 -34
  55. package/es/index-anchor/IndexAnchor.js +8 -1
  56. package/es/index-bar/IndexBar.js +22 -20
  57. package/es/index.js +10 -0
  58. package/es/input/Input.js +45 -44
  59. package/es/lazy/index.js +2 -1
  60. package/es/less.js +2 -0
  61. package/es/list/List.js +39 -38
  62. package/es/loading/Loading.js +31 -23
  63. package/es/loading/loading.css +1 -1
  64. package/es/loading/loading.less +32 -32
  65. package/es/menu/Menu.js +12 -10
  66. package/es/option/Option.js +16 -11
  67. package/es/pagination/Pagination.js +34 -44
  68. package/es/pagination/pagination.css +1 -1
  69. package/es/pagination/pagination.less +8 -8
  70. package/es/picker/Picker.js +51 -47
  71. package/es/popup/Popup.js +9 -5
  72. package/es/progress/Progress.js +44 -35
  73. package/es/progress/progress.css +1 -1
  74. package/es/progress/progress.less +12 -12
  75. package/es/pull-refresh/PullRefresh.js +13 -10
  76. package/es/radio/Radio.js +25 -25
  77. package/es/radio-group/RadioGroup.js +19 -19
  78. package/es/rate/Rate.js +27 -25
  79. package/es/ripple/index.js +6 -2
  80. package/es/row/Row.js +11 -4
  81. package/es/select/Select.js +53 -54
  82. package/es/skeleton/Skeleton.js +70 -81
  83. package/es/slider/Slider.js +44 -40
  84. package/es/slider/slider.css +1 -1
  85. package/es/slider/slider.less +5 -5
  86. package/es/snackbar/Snackbar.js +9 -5
  87. package/es/snackbar/core.js +20 -26
  88. package/es/snackbar/snackbar.css +1 -1
  89. package/es/snackbar/snackbar.less +66 -68
  90. package/es/space/Space.js +8 -3
  91. package/es/step/Step.js +25 -23
  92. package/es/step/step.css +1 -1
  93. package/es/step/step.less +10 -10
  94. package/es/steps/Steps.js +12 -5
  95. package/es/sticky/Sticky.js +14 -7
  96. package/es/style-provider/StyleProvider.js +6 -2
  97. package/es/style.css +1 -1
  98. package/es/style.js +2 -0
  99. package/es/swipe/Swipe.js +22 -16
  100. package/es/swipe-item/SwipeItem.js +9 -4
  101. package/es/switch/Switch.js +25 -23
  102. package/es/switch/switch.css +1 -1
  103. package/es/switch/switch.less +2 -2
  104. package/es/tab/Tab.js +8 -1
  105. package/es/tab-item/TabItem.js +8 -1
  106. package/es/table/Table.js +27 -20
  107. package/es/tabs/Tabs.js +16 -11
  108. package/es/tabs-items/TabsItems.js +10 -5
  109. package/es/themes/dark/bottomNavigation.js +4 -0
  110. package/es/themes/dark/bottomNavigationItem.js +3 -0
  111. package/es/themes/dark/index.js +3 -1
  112. package/es/time-picker/TimePicker.js +47 -38
  113. package/es/time-picker/clock.js +26 -22
  114. package/es/time-picker/timePicker.css +1 -1
  115. package/es/time-picker/timePicker.less +11 -11
  116. package/es/umdIndex.js +10 -0
  117. package/es/uploader/Uploader.js +62 -57
  118. package/es/utils/components.js +35 -0
  119. package/es/varlet.esm.js +2082 -1527
  120. package/highlight/attributes.json +48 -0
  121. package/highlight/tags.json +20 -0
  122. package/highlight/web-types.json +155 -1
  123. package/lib/action-sheet/ActionSheet.js +30 -26
  124. package/lib/app-bar/AppBar.js +31 -24
  125. package/lib/back-top/BackTop.js +11 -2
  126. package/lib/badge/Badge.js +23 -13
  127. package/lib/bottom-navigation/BottomNavigation.js +183 -0
  128. package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
  129. package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
  130. package/lib/bottom-navigation/bottomNavigation.css +1 -0
  131. package/lib/bottom-navigation/bottomNavigation.less +49 -0
  132. package/lib/bottom-navigation/index.js +17 -0
  133. package/lib/bottom-navigation/props.js +45 -0
  134. package/lib/bottom-navigation/provide.js +27 -0
  135. package/lib/bottom-navigation/style/index.js +4 -0
  136. package/lib/bottom-navigation/style/less.js +4 -0
  137. package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
  138. package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
  139. package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  140. package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
  141. package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
  142. package/lib/bottom-navigation-item/index.js +17 -0
  143. package/lib/bottom-navigation-item/props.js +27 -0
  144. package/lib/bottom-navigation-item/provide.js +28 -0
  145. package/lib/bottom-navigation-item/style/index.js +6 -0
  146. package/lib/bottom-navigation-item/style/less.js +6 -0
  147. package/lib/button/Button.js +13 -4
  148. package/lib/card/Card.js +34 -27
  149. package/lib/cell/Cell.js +26 -13
  150. package/lib/checkbox/Checkbox.js +26 -23
  151. package/lib/checkbox-group/CheckboxGroup.js +19 -22
  152. package/lib/chip/Chip.js +18 -7
  153. package/lib/chip/chip.css +1 -1
  154. package/lib/chip/chip.less +11 -11
  155. package/lib/col/Col.js +14 -5
  156. package/lib/collapse/Collapse.js +15 -10
  157. package/lib/collapse-item/CollapseItem.js +31 -28
  158. package/lib/collapse-item/collapseItem.css +1 -1
  159. package/lib/collapse-item/collapseItem.less +16 -16
  160. package/lib/countdown/Countdown.js +14 -10
  161. package/lib/counter/Counter.js +29 -26
  162. package/lib/date-picker/DatePicker.js +30 -23
  163. package/lib/date-picker/date-picker.css +1 -1
  164. package/lib/date-picker/date-picker.less +22 -20
  165. package/lib/date-picker/src/day-picker-panel.js +41 -32
  166. package/lib/date-picker/src/month-picker-panel.js +27 -19
  167. package/lib/date-picker/src/panel-header.js +16 -9
  168. package/lib/date-picker/src/year-picker-panel.js +19 -9
  169. package/lib/dialog/Dialog.js +36 -38
  170. package/lib/divider/Divider.js +16 -10
  171. package/lib/form/Form.js +11 -6
  172. package/lib/form-details/FormDetails.js +27 -20
  173. package/lib/icon/Icon.js +10 -1
  174. package/lib/icon/icon.css +1 -1
  175. package/lib/image/Image.js +20 -11
  176. package/lib/image-preview/ImagePreview.js +35 -33
  177. package/lib/index-anchor/IndexAnchor.js +10 -1
  178. package/lib/index-bar/IndexBar.js +24 -20
  179. package/lib/index.js +6 -0
  180. package/lib/input/Input.js +45 -43
  181. package/lib/lazy/index.js +3 -1
  182. package/lib/less.js +2 -0
  183. package/lib/list/List.js +39 -36
  184. package/lib/loading/Loading.js +33 -23
  185. package/lib/loading/loading.css +1 -1
  186. package/lib/loading/loading.less +32 -32
  187. package/lib/menu/Menu.js +12 -9
  188. package/lib/option/Option.js +16 -9
  189. package/lib/pagination/Pagination.js +36 -44
  190. package/lib/pagination/pagination.css +1 -1
  191. package/lib/pagination/pagination.less +8 -8
  192. package/lib/picker/Picker.js +51 -46
  193. package/lib/popup/Popup.js +9 -4
  194. package/lib/progress/Progress.js +45 -34
  195. package/lib/progress/progress.css +1 -1
  196. package/lib/progress/progress.less +12 -12
  197. package/lib/pull-refresh/PullRefresh.js +14 -10
  198. package/lib/radio/Radio.js +23 -22
  199. package/lib/radio-group/RadioGroup.js +17 -16
  200. package/lib/rate/Rate.js +27 -24
  201. package/lib/ripple/index.js +7 -2
  202. package/lib/row/Row.js +12 -3
  203. package/lib/select/Select.js +53 -53
  204. package/lib/skeleton/Skeleton.js +69 -78
  205. package/lib/slider/Slider.js +42 -38
  206. package/lib/slider/slider.css +1 -1
  207. package/lib/slider/slider.less +5 -5
  208. package/lib/snackbar/Snackbar.js +9 -4
  209. package/lib/snackbar/core.js +20 -25
  210. package/lib/snackbar/snackbar.css +1 -1
  211. package/lib/snackbar/snackbar.less +66 -68
  212. package/lib/space/Space.js +9 -3
  213. package/lib/step/Step.js +26 -22
  214. package/lib/step/step.css +1 -1
  215. package/lib/step/step.less +10 -10
  216. package/lib/steps/Steps.js +13 -4
  217. package/lib/sticky/Sticky.js +15 -6
  218. package/lib/style-provider/StyleProvider.js +8 -2
  219. package/lib/style.css +1 -1
  220. package/lib/style.js +2 -0
  221. package/lib/swipe/Swipe.js +23 -16
  222. package/lib/swipe-item/SwipeItem.js +10 -3
  223. package/lib/switch/Switch.js +23 -20
  224. package/lib/switch/switch.css +1 -1
  225. package/lib/switch/switch.less +2 -2
  226. package/lib/tab/Tab.js +10 -1
  227. package/lib/tab-item/TabItem.js +10 -1
  228. package/lib/table/Table.js +27 -18
  229. package/lib/tabs/Tabs.js +18 -11
  230. package/lib/tabs-items/TabsItems.js +11 -4
  231. package/lib/themes/dark/bottomNavigation.js +9 -0
  232. package/lib/themes/dark/bottomNavigationItem.js +8 -0
  233. package/lib/themes/dark/index.js +5 -1
  234. package/lib/time-picker/TimePicker.js +49 -38
  235. package/lib/time-picker/clock.js +26 -20
  236. package/lib/time-picker/timePicker.css +1 -1
  237. package/lib/time-picker/timePicker.less +11 -11
  238. package/lib/uploader/Uploader.js +60 -55
  239. package/lib/utils/components.js +39 -0
  240. package/package.json +4 -4
  241. package/types/bottomNavigation.d.ts +19 -0
  242. package/types/bottomNavigationItem.d.ts +16 -0
  243. package/types/global.d.ts +2 -0
  244. package/types/index.d.ts +2 -0
  245. package/umd/varlet.js +4 -4
@@ -1 +1 @@
1
- :root { --slider-error-color: var(--color-danger); --slider-track-background: #bdbdbd; --slider-track-fill-background: var(--color-primary); --slider-thumb-block-background: var(--color-primary); --slider-thumb-ripple-background: var(--color-primary); --slider-thumb-label-background: var(--color-primary); --slider-thumb-label-font-size: var(--font-size-sm);}.var-slider { -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-slider-block { display: flex; align-items: center; position: relative; flex: 1; user-select: none; height: 36px; margin: 0 6px;}.var-slider__disable { filter: opacity(0.6);}.var-slider__track { width: 100%; align-items: center; position: relative;}.var-slider__track-background { width: 100%; height: 2px; background: var(--slider-track-background);}.var-slider__track-fill { position: absolute; height: 100%; left: 0; top: 0; background-color: var(--slider-track-fill-background);}.var-slider__thumb { position: absolute;}.var-slider__thumb-block { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); background-color: var(--slider-thumb-block-background);}.var-slider__thumb-ripple { position: absolute; width: 0; z-index: -1; height: 0; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0.3; background: var(--slider-thumb-ripple-background); transition: 0.3s var(--cubic-bezier);}.var-slider__thumb-ripple-active { width: 36px; height: 36px;}.var-slider__thumb-label { height: 24px; width: 24px; background-color: var(--slider-thumb-label-background); display: flex; align-items: center; border: none; justify-content: center; color: #fff; border-radius: 50% 50% 0; bottom: 60%; user-select: none; position: absolute; left: 45%; transition: 0.3s var(--cubic-bezier); font-size: var(--slider-thumb-label-font-size); overflow: hidden; transform: translateY(0) translateY(0) translateX(-50%) rotate(45deg) scale(0);}.var-slider__thumb-label span { transform: rotate(-45deg);}.var-slider__thumb-label-active { transform: translateY(-50%) translateX(-50%) rotate(45deg) scale(1);}.var-slider__error .var-slider__track-background { background-color: var(--slider-error-color) !important; filter: opacity(0.5);}.var-slider__error .var-slider__track-fill { background-color: var(--slider-error-color) !important;}.var-slider__error .var-slider__thumb-block { background-color: var(--slider-error-color) !important;}.var-slider__error .var-slider__thumb-ripple { background-color: var(--slider-error-color) !important;}.var-slider__error .var-slider__thumb-label { background-color: var(--slider-error-color) !important;}.var-slider__form[var-slider-cover] { margin: 0;}
1
+ :root { --slider-error-color: var(--color-danger); --slider-track-background: #bdbdbd; --slider-track-fill-background: var(--color-primary); --slider-thumb-block-background: var(--color-primary); --slider-thumb-ripple-background: var(--color-primary); --slider-thumb-label-background: var(--color-primary); --slider-thumb-label-font-size: var(--font-size-sm);}.var-slider { -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-slider__block { display: flex; align-items: center; position: relative; flex: 1; user-select: none; height: 36px; margin: 0 6px;}.var-slider--disabled { filter: opacity(0.6);}.var-slider__track { width: 100%; align-items: center; position: relative;}.var-slider__track-background { width: 100%; height: 2px; background: var(--slider-track-background);}.var-slider__track-fill { position: absolute; height: 100%; left: 0; top: 0; background-color: var(--slider-track-fill-background);}.var-slider__thumb { position: absolute;}.var-slider__thumb-block { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); background-color: var(--slider-thumb-block-background);}.var-slider__thumb-ripple { position: absolute; width: 0; z-index: -1; height: 0; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0.3; background: var(--slider-thumb-ripple-background); transition: 0.3s var(--cubic-bezier);}.var-slider__thumb-ripple--active { width: 36px; height: 36px;}.var-slider__thumb-label { height: 24px; width: 24px; background-color: var(--slider-thumb-label-background); display: flex; align-items: center; border: none; justify-content: center; color: #fff; border-radius: 50% 50% 0; bottom: 60%; user-select: none; position: absolute; left: 45%; transition: 0.3s var(--cubic-bezier); font-size: var(--slider-thumb-label-font-size); overflow: hidden; transform: translateY(0) translateY(0) translateX(-50%) rotate(45deg) scale(0);}.var-slider__thumb-label span { transform: rotate(-45deg);}.var-slider__thumb-label--active { transform: translateY(-50%) translateX(-50%) rotate(45deg) scale(1);}.var-slider--error .var-slider__track-background { background-color: var(--slider-error-color) !important; filter: opacity(0.5);}.var-slider--error .var-slider__track-fill { background-color: var(--slider-error-color) !important;}.var-slider--error .var-slider__thumb-block { background-color: var(--slider-error-color) !important;}.var-slider--error .var-slider__thumb-ripple { background-color: var(--slider-error-color) !important;}.var-slider--error .var-slider__thumb-label { background-color: var(--slider-error-color) !important;}.var-slider__form[var-slider-cover] { margin: 0;}
@@ -19,7 +19,7 @@
19
19
  .var-slider {
20
20
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
21
21
 
22
- &-block {
22
+ &__block {
23
23
  display: flex;
24
24
  align-items: center;
25
25
  position: relative;
@@ -29,7 +29,7 @@
29
29
  margin: 0 6px;
30
30
  }
31
31
 
32
- &__disable {
32
+ &--disabled {
33
33
  filter: opacity(0.6);
34
34
  }
35
35
 
@@ -78,7 +78,7 @@
78
78
  background: var(--slider-thumb-ripple-background);
79
79
  transition: 0.3s var(--cubic-bezier);
80
80
 
81
- &-active {
81
+ &--active {
82
82
  width: 36px;
83
83
  height: 36px;
84
84
  }
@@ -107,13 +107,13 @@
107
107
  transform: rotate(-45deg);
108
108
  }
109
109
 
110
- &-active {
110
+ &--active {
111
111
  transform: translateY(-50%) translateX(-50%) rotate(45deg) scale(1);
112
112
  }
113
113
  }
114
114
  }
115
115
 
116
- &__error {
116
+ &--error {
117
117
  .var-slider__track {
118
118
  &-background {
119
119
  background-color: var(--slider-error-color) !important;
@@ -14,6 +14,10 @@ var _props = require("./props");
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
 
17
+ var {
18
+ n
19
+ } = (0, _components.createNamespace)('snackbar');
20
+
17
21
  function render(_ctx, _cache) {
18
22
  var _component_var_snackbar_core = (0, _vue.resolveComponent)("var-snackbar-core");
19
23
 
@@ -21,12 +25,12 @@ function render(_ctx, _cache) {
21
25
  to: _ctx.teleport,
22
26
  disabled: _ctx.disabled
23
27
  }, [(0, _vue.createVNode)(_vue.Transition, {
24
- name: "var-snackbar-fade",
28
+ name: _ctx.n() + "-fade",
25
29
  onAfterEnter: _ctx.onOpened,
26
30
  onAfterLeave: _ctx.onClosed
27
31
  }, {
28
32
  default: (0, _vue.withCtx)(() => [(0, _vue.createVNode)(_component_var_snackbar_core, (0, _vue.mergeProps)(_ctx.$props, {
29
- class: "var-snackbar-transition"
33
+ class: _ctx.n('transition')
30
34
  }), {
31
35
  action: (0, _vue.withCtx)(() => [(0, _vue.renderSlot)(_ctx.$slots, "action")]),
32
36
  default: (0, _vue.withCtx)(() => [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.content), 1
@@ -37,13 +41,13 @@ function render(_ctx, _cache) {
37
41
 
38
42
  }, 16
39
43
  /* FULL_PROPS */
40
- )]),
44
+ , ["class"])]),
41
45
  _: 3
42
46
  /* FORWARDED */
43
47
 
44
48
  }, 8
45
49
  /* PROPS */
46
- , ["onAfterEnter", "onAfterLeave"])], 8
50
+ , ["name", "onAfterEnter", "onAfterLeave"])], 8
47
51
  /* PROPS */
48
52
  , ["to", "disabled"]);
49
53
  }
@@ -61,6 +65,7 @@ var _default = (0, _vue.defineComponent)({
61
65
  disabled
62
66
  } = (0, _components.useTeleport)();
63
67
  return {
68
+ n,
64
69
  disabled
65
70
  };
66
71
  }
@@ -18,8 +18,14 @@ var _lock = require("../context/lock");
18
18
 
19
19
  var _index = require("./index");
20
20
 
21
+ var _components = require("../utils/components");
22
+
21
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
24
 
25
+ var {
26
+ n,
27
+ classes
28
+ } = (0, _components.createNamespace)('snackbar');
23
29
  var ICON_TYPE_DICT = {
24
30
  success: 'checkbox-marked-circle',
25
31
  warning: 'warning',
@@ -28,35 +34,31 @@ var ICON_TYPE_DICT = {
28
34
  loading: ''
29
35
  };
30
36
 
31
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
32
-
33
- var _hoisted_1 = {
34
- class: "var-snackbar__action"
35
- };
36
-
37
37
  function render(_ctx, _cache) {
38
38
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
39
39
 
40
40
  var _component_var_loading = (0, _vue.resolveComponent)("var-loading");
41
41
 
42
42
  return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
43
- class: "var-snackbar",
43
+ class: (0, _vue.normalizeClass)(_ctx.n()),
44
44
  style: (0, _vue.normalizeStyle)({
45
45
  pointerEvents: _ctx.isForbidClick ? 'auto' : 'none',
46
46
  zIndex: _ctx.zIndex
47
47
  })
48
48
  }, [(0, _vue.createElementVNode)("div", {
49
- class: (0, _vue.normalizeClass)(_ctx.snackbarClass),
49
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('wrapper'), _ctx.n("wrapper-" + _ctx.position), 'var-elevation--4', [_ctx.vertical, _ctx.n('vertical')], [_ctx.type && _ctx.SNACKBAR_TYPE.includes(_ctx.type), _ctx.n("wrapper-" + _ctx.type)])),
50
50
  style: (0, _vue.normalizeStyle)({
51
51
  zIndex: _ctx.zIndex
52
52
  })
53
53
  }, [(0, _vue.createElementVNode)("div", {
54
- class: (0, _vue.normalizeClass)(["var-snackbar__content", [_ctx.contentClass]])
54
+ class: (0, _vue.normalizeClass)([_ctx.n('content'), _ctx.contentClass])
55
55
  }, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.content), 1
56
56
  /* TEXT */
57
57
  )])], 2
58
58
  /* CLASS */
59
- ), (0, _vue.createElementVNode)("div", _hoisted_1, [_ctx.iconName ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
59
+ ), (0, _vue.createElementVNode)("div", {
60
+ class: (0, _vue.normalizeClass)(_ctx.n('action'))
61
+ }, [_ctx.iconName ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
60
62
  key: 0,
61
63
  name: _ctx.iconName
62
64
  }, null, 8
@@ -67,10 +69,12 @@ function render(_ctx, _cache) {
67
69
  size: _ctx.loadingSize
68
70
  }, null, 8
69
71
  /* PROPS */
70
- , ["type", "size"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.renderSlot)(_ctx.$slots, "action")])], 6
72
+ , ["type", "size"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.renderSlot)(_ctx.$slots, "action")], 2
73
+ /* CLASS */
74
+ )], 6
75
+ /* CLASS, STYLE */
76
+ )], 6
71
77
  /* CLASS, STYLE */
72
- )], 4
73
- /* STYLE */
74
78
  )), [[_vue.vShow, _ctx.show]]);
75
79
  }
76
80
 
@@ -89,17 +93,6 @@ var _default = (0, _vue.defineComponent)({
89
93
  zIndex
90
94
  } = (0, _zIndex.useZIndex)(() => props.show, 1);
91
95
  (0, _lock.useLock)(props, 'show', 'lockScroll');
92
- var snackbarClass = (0, _vue.computed)(() => {
93
- var {
94
- position,
95
- vertical,
96
- type
97
- } = props;
98
- var baseClass = "var-snackbar__wrapper var-snackbar__wrapper-" + position + " var-elevation--4";
99
- var verticalClass = vertical ? ' var-snackbar__vertical' : '';
100
- var typeClass = type && _index.SNACKBAR_TYPE.includes(type) ? " var-snackbar__wrapper-" + type : '';
101
- return "" + baseClass + verticalClass + typeClass;
102
- });
103
96
  var isForbidClick = (0, _vue.computed)(() => props.type === 'loading' || props.forbidClick);
104
97
  var iconName = (0, _vue.computed)(() => {
105
98
  if (!props.type) return '';
@@ -134,8 +127,10 @@ var _default = (0, _vue.defineComponent)({
134
127
  }
135
128
  });
136
129
  return {
130
+ SNACKBAR_TYPE: _index.SNACKBAR_TYPE,
131
+ n,
132
+ classes,
137
133
  zIndex,
138
- snackbarClass,
139
134
  iconName,
140
135
  isForbidClick
141
136
  };
@@ -1 +1 @@
1
- :root { --snackbar-width: 256px; --snackbar-color: rgba(255, 255, 255, 0.87); --snackbar-border-radius: 4px; --snackbar-background: #333; --snackbar-font-size: var(--font-size-md); --snackbar-margin: 6px 24px; --snackbar-border-color: currentColor; --snackbar-success-background: var(--color-success); --snackbar-info-background: var(--color-info); --snackbar-error-background: var(--color-danger); --snackbar-warning-background: var(--color-warning); --snackbar-content-padding: 14px 16px; --snackbar-action-margin: 0 16px 0 0;}.var-transition-group { position: fixed; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;}.var-pointer-auto { pointer-events: auto;}.var-snackbar { display: flex; justify-content: center; align-items: baseline; left: 0; right: 0; bottom: 0; transition: all 0.15s var(--cubic-bezier);}.var-snackbar__wrapper { width: var(--snackbar-width); display: flex; border-radius: var(--snackbar-border-radius); color: var(--snackbar-color); background: var(--snackbar-background); font-size: var(--snackbar-font-size); margin: var(--snackbar-margin); align-items: center; border-color: var(--snackbar-border-color); pointer-events: auto; transition: 0.3s var(--cubic-bezier);}.var-snackbar__wrapper-success { background: var(--snackbar-success-background);}.var-snackbar__wrapper-info { background: var(--snackbar-info-background);}.var-snackbar__wrapper-warning { background: var(--snackbar-warning-background);}.var-snackbar__wrapper-error { background: var(--snackbar-error-background);}.var-snackbar__content { flex-grow: 1; padding: var(--snackbar-content-padding);}.var-snackbar__action { margin: var(--snackbar-action-margin); display: flex;}.var-snackbar__vertical { flex-direction: column; align-items: flex-start;}.var-snackbar__vertical .var-snackbar__action { align-self: flex-end; margin-bottom: 8px;}.var-snackbar-fade-leave-active { position: absolute;}.var-snackbar-fade-enter-from,.var-snackbar-fade-leave-to { opacity: 0; transform: translateY(-30px);}.var-snackbar-transition { top: 0; position: fixed;}.var-snackbar-transition .var-snackbar__wrapper { position: absolute;}.var-snackbar-transition .var-snackbar__wrapper-top { top: 5%;}.var-snackbar-transition .var-snackbar__wrapper-center { top: 45%;}.var-snackbar-transition .var-snackbar__wrapper-bottom { bottom: 5%;}
1
+ :root { --snackbar-width: 256px; --snackbar-color: rgba(255, 255, 255, 0.87); --snackbar-border-radius: 4px; --snackbar-background: #333; --snackbar-font-size: var(--font-size-md); --snackbar-margin: 6px 24px; --snackbar-border-color: currentColor; --snackbar-success-background: var(--color-success); --snackbar-info-background: var(--color-info); --snackbar-error-background: var(--color-danger); --snackbar-warning-background: var(--color-warning); --snackbar-content-padding: 14px 16px; --snackbar-action-margin: 0 16px 0 0;}.var-transition-group { position: fixed; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none;}.var-pointer-auto { pointer-events: auto;}.var-snackbar { display: flex; justify-content: center; align-items: baseline; left: 0; right: 0; bottom: 0; transition: all 0.15s var(--cubic-bezier);}.var-snackbar__transition { top: 0; position: fixed;}.var-snackbar__transition .var-snackbar__wrapper { position: absolute;}.var-snackbar__transition .var-snackbar__wrapper-top { top: 5%;}.var-snackbar__transition .var-snackbar__wrapper-center { top: 45%;}.var-snackbar__transition .var-snackbar__wrapper-bottom { bottom: 5%;}.var-snackbar__wrapper { width: var(--snackbar-width); display: flex; border-radius: var(--snackbar-border-radius); color: var(--snackbar-color); background: var(--snackbar-background); font-size: var(--snackbar-font-size); margin: var(--snackbar-margin); align-items: center; border-color: var(--snackbar-border-color); pointer-events: auto; transition: 0.3s var(--cubic-bezier);}.var-snackbar__wrapper-success { background: var(--snackbar-success-background);}.var-snackbar__wrapper-info { background: var(--snackbar-info-background);}.var-snackbar__wrapper-warning { background: var(--snackbar-warning-background);}.var-snackbar__wrapper-error { background: var(--snackbar-error-background);}.var-snackbar__content { flex-grow: 1; padding: var(--snackbar-content-padding);}.var-snackbar__action { margin: var(--snackbar-action-margin); display: flex;}.var-snackbar__vertical { flex-direction: column; align-items: flex-start;}.var-snackbar__vertical .var-snackbar__action { align-self: flex-end; margin-bottom: 8px;}.var-snackbar-fade-leave-active { position: absolute;}.var-snackbar-fade-enter-from,.var-snackbar-fade-leave-to { opacity: 0; transform: translateY(-30px);}
@@ -41,95 +41,93 @@
41
41
  pointer-events: auto;
42
42
  }
43
43
 
44
- .var {
45
- &-snackbar {
46
- display: flex;
47
- justify-content: center;
48
- align-items: baseline;
49
- left: 0;
50
- right: 0;
51
- bottom: 0;
52
- transition: all 0.15s var(--cubic-bezier);
53
-
54
- &__wrapper {
55
- width: var(--snackbar-width);
56
- display: flex;
57
- border-radius: var(--snackbar-border-radius);
58
- color: var(--snackbar-color);
59
- background: var(--snackbar-background);
60
- font-size: var(--snackbar-font-size);
61
- margin: var(--snackbar-margin);
62
- align-items: center;
63
- border-color: var(--snackbar-border-color);
64
- pointer-events: auto;
65
- transition: 0.3s var(--cubic-bezier);
66
-
67
- &-success {
68
- background: var(--snackbar-success-background);
69
- }
44
+ .var-snackbar {
45
+ display: flex;
46
+ justify-content: center;
47
+ align-items: baseline;
48
+ left: 0;
49
+ right: 0;
50
+ bottom: 0;
51
+ transition: all 0.15s var(--cubic-bezier);
52
+
53
+ &__transition {
54
+ top: 0;
55
+ position: fixed;
56
+
57
+ .var-snackbar__wrapper {
58
+ position: absolute;
70
59
 
71
- &-info {
72
- background: var(--snackbar-info-background);
60
+ &-top {
61
+ top: 5%;
73
62
  }
74
63
 
75
- &-warning {
76
- background: var(--snackbar-warning-background);
64
+ &-center {
65
+ top: 45%;
77
66
  }
78
67
 
79
- &-error {
80
- background: var(--snackbar-error-background);
68
+ &-bottom {
69
+ bottom: 5%;
81
70
  }
82
71
  }
72
+ }
83
73
 
84
- &__content {
85
- flex-grow: 1;
86
- padding: var(--snackbar-content-padding);
74
+ &__wrapper {
75
+ width: var(--snackbar-width);
76
+ display: flex;
77
+ border-radius: var(--snackbar-border-radius);
78
+ color: var(--snackbar-color);
79
+ background: var(--snackbar-background);
80
+ font-size: var(--snackbar-font-size);
81
+ margin: var(--snackbar-margin);
82
+ align-items: center;
83
+ border-color: var(--snackbar-border-color);
84
+ pointer-events: auto;
85
+ transition: 0.3s var(--cubic-bezier);
86
+
87
+ &-success {
88
+ background: var(--snackbar-success-background);
87
89
  }
88
90
 
89
- &__action {
90
- margin: var(--snackbar-action-margin);
91
- display: flex;
91
+ &-info {
92
+ background: var(--snackbar-info-background);
92
93
  }
93
94
 
94
- &__vertical {
95
- flex-direction: column;
96
- align-items: flex-start;
97
-
98
- .var-snackbar__action {
99
- align-self: flex-end;
100
- margin-bottom: 8px;
101
- }
95
+ &-warning {
96
+ background: var(--snackbar-warning-background);
102
97
  }
103
98
 
104
- &-fade-leave-active {
105
- position: absolute;
99
+ &-error {
100
+ background: var(--snackbar-error-background);
106
101
  }
102
+ }
107
103
 
108
- &-fade-enter-from,
109
- &-fade-leave-to {
110
- opacity: 0;
111
- transform: translateY(-30px);
112
- }
104
+ &__content {
105
+ flex-grow: 1;
106
+ padding: var(--snackbar-content-padding);
113
107
  }
114
108
 
115
- &-snackbar-transition {
116
- top: 0;
117
- position: fixed;
109
+ &__action {
110
+ margin: var(--snackbar-action-margin);
111
+ display: flex;
112
+ }
118
113
 
119
- .var-snackbar__wrapper {
120
- position: absolute;
114
+ &__vertical {
115
+ flex-direction: column;
116
+ align-items: flex-start;
121
117
 
122
- &-top {
123
- top: 5%;
124
- }
118
+ .var-snackbar__action {
119
+ align-self: flex-end;
120
+ margin-bottom: 8px;
121
+ }
122
+ }
125
123
 
126
- &-center {
127
- top: 45%;
128
- }
124
+ &-fade-leave-active {
125
+ position: absolute;
126
+ }
129
127
 
130
- &-bottom {
131
- bottom: 5%;
132
- }
133
- }
128
+ &-fade-enter-from,
129
+ &-fade-leave-to {
130
+ opacity: 0;
131
+ transform: translateY(-30px);
134
132
  }
135
133
  }
@@ -15,6 +15,12 @@ var _shared = require("../utils/shared");
15
15
 
16
16
 
17
17
 
18
+ var _components = require("../utils/components");
19
+
20
+ var {
21
+ n,
22
+ classes
23
+ } = (0, _components.createNamespace)('space');
18
24
  var internalSizes = {
19
25
  mini: [4, 4],
20
26
  small: [6, 6],
@@ -36,7 +42,7 @@ var _default = (0, _vue.defineComponent)({
36
42
  };
37
43
 
38
44
  return () => {
39
- var _slots$default;
45
+ var _call;
40
46
 
41
47
  var {
42
48
  inline,
@@ -46,7 +52,7 @@ var _default = (0, _vue.defineComponent)({
46
52
  direction,
47
53
  size
48
54
  } = props;
49
- var children = (_slots$default = slots.default == null ? void 0 : slots.default()) != null ? _slots$default : [];
55
+ var children = (_call = (0, _components.call)(slots.default)) != null ? _call : [];
50
56
  var isInternalSize = (0, _props.internalSizeValidator)(size);
51
57
  var [y, x] = getSize(size, isInternalSize);
52
58
 
@@ -103,7 +109,7 @@ var _default = (0, _vue.defineComponent)({
103
109
  }, [child]);
104
110
  });
105
111
  return (0, _vue.createVNode)("div", {
106
- "class": ['var-space', 'var--box', inline ? 'var-space--inline' : null],
112
+ "class": classes(n(), 'var--box', [inline, n('--inline')]),
107
113
  "style": {
108
114
  flexDirection: direction,
109
115
  justifyContent: justify,
package/lib/step/Step.js CHANGED
@@ -12,30 +12,33 @@ var _provide = require("./provide");
12
12
 
13
13
  var _icon = _interopRequireDefault(require("../icon"));
14
14
 
15
+ var _components = require("../utils/components");
16
+
15
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
18
 
19
+ var {
20
+ n,
21
+ classes
22
+ } = (0, _components.createNamespace)('step');
23
+
17
24
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
18
25
 
19
26
  var _hoisted_1 = {
20
- class: "var-step"
21
- };
22
- var _hoisted_2 = {
23
27
  key: 3
24
28
  };
25
29
 
26
30
  function render(_ctx, _cache) {
27
31
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
28
32
 
29
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", {
30
- class: (0, _vue.normalizeClass)("var-step-" + _ctx.direction)
33
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
34
+ class: (0, _vue.normalizeClass)(_ctx.n())
35
+ }, [(0, _vue.createElementVNode)("div", {
36
+ class: (0, _vue.normalizeClass)(_ctx.n(_ctx.direction))
31
37
  }, [(0, _vue.createElementVNode)("div", {
32
- class: (0, _vue.normalizeClass)("var-step-" + _ctx.direction + "__main"),
38
+ class: (0, _vue.normalizeClass)(_ctx.n(_ctx.direction + "-main")),
33
39
  ref: _ctx.getRef
34
40
  }, [(0, _vue.createElementVNode)("div", {
35
- class: (0, _vue.normalizeClass)({
36
- ["var-step-" + _ctx.direction + "__tag"]: true,
37
- ["var-step-" + _ctx.direction + "__tag--active"]: _ctx.isActive || _ctx.isCurrent
38
- }),
41
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(_ctx.direction + "-tag"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-tag--active")])),
39
42
  style: (0, _vue.normalizeStyle)({
40
43
  backgroundColor: _ctx.isActive || _ctx.isCurrent ? _ctx.activeColor : _ctx.inactiveColor
41
44
  }),
@@ -44,34 +47,31 @@ function render(_ctx, _cache) {
44
47
  })
45
48
  }, [_ctx.isActive ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
46
49
  key: 0,
47
- class: "var-step__icon",
50
+ class: (0, _vue.normalizeClass)(_ctx.n('icon')),
48
51
  "var-step-cover": "",
49
52
  name: _ctx.activeIcon
50
53
  }, null, 8
51
54
  /* PROPS */
52
- , ["name"])) : _ctx.isCurrent && _ctx.currentIcon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
55
+ , ["class", "name"])) : _ctx.isCurrent && _ctx.currentIcon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
53
56
  key: 1,
54
- class: "var-step__icon",
57
+ class: (0, _vue.normalizeClass)(_ctx.n('icon')),
55
58
  "var-step-cover": "",
56
59
  name: _ctx.currentIcon
57
60
  }, null, 8
58
61
  /* PROPS */
59
- , ["name"])) : _ctx.inactiveIcon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
62
+ , ["class", "name"])) : _ctx.inactiveIcon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
60
63
  key: 2,
61
- class: "var-step__icon",
64
+ class: (0, _vue.normalizeClass)(_ctx.n('icon')),
62
65
  "var-step-cover": "",
63
66
  name: _ctx.inactiveIcon
64
67
  }, null, 8
65
68
  /* PROPS */
66
- , ["name"])) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_2, (0, _vue.toDisplayString)(_ctx.index + 1), 1
69
+ , ["class", "name"])) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_1, (0, _vue.toDisplayString)(_ctx.index + 1), 1
67
70
  /* TEXT */
68
71
  ))], 6
69
72
  /* CLASS, STYLE */
70
73
  ), (0, _vue.createElementVNode)("div", {
71
- class: (0, _vue.normalizeClass)({
72
- ["var-step-" + _ctx.direction + "__content"]: true,
73
- ["var-step-" + _ctx.direction + "__content--active"]: _ctx.isActive || _ctx.isCurrent
74
- }),
74
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(_ctx.direction + "-content"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-content--active")])),
75
75
  onClick: _cache[1] || (_cache[1] = function () {
76
76
  return _ctx.click && _ctx.click(...arguments);
77
77
  })
@@ -81,7 +81,7 @@ function render(_ctx, _cache) {
81
81
  /* CLASS */
82
82
  ), !_ctx.isLastChild ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
83
83
  key: 0,
84
- class: (0, _vue.normalizeClass)("var-step-" + _ctx.direction + "__line"),
84
+ class: (0, _vue.normalizeClass)(_ctx.n(_ctx.direction + "-line")),
85
85
  style: (0, _vue.normalizeStyle)({
86
86
  margin: _ctx.lineMargin
87
87
  })
@@ -89,7 +89,9 @@ function render(_ctx, _cache) {
89
89
  /* CLASS, STYLE */
90
90
  )) : (0, _vue.createCommentVNode)("v-if", true)], 2
91
91
  /* CLASS */
92
- )]);
92
+ )], 2
93
+ /* CLASS */
94
+ );
93
95
  }
94
96
 
95
97
  var _default = (0, _vue.defineComponent)({
@@ -141,6 +143,8 @@ var _default = (0, _vue.defineComponent)({
141
143
  }
142
144
  });
143
145
  return {
146
+ n,
147
+ classes,
144
148
  main,
145
149
  index,
146
150
  isActive,
package/lib/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-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);}
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);}
@@ -63,18 +63,18 @@
63
63
  flex: 1;
64
64
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
65
65
 
66
- &-horizontal {
66
+ &__horizontal {
67
67
  display: flex;
68
68
  width: 100%;
69
69
 
70
- &__main {
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
- &__tag {
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
- &__content {
86
+ &-content {
87
87
  .content();
88
88
 
89
89
  &--active {
@@ -91,7 +91,7 @@
91
91
  }
92
92
  }
93
93
 
94
- &__line {
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
- &-vertical {
104
+ &__vertical {
105
105
  width: 100%;
106
106
 
107
- &__main {
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
- &__tag {
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
- &__content {
122
+ &-content {
123
123
  .content();
124
124
 
125
125
  &--active {
@@ -127,7 +127,7 @@
127
127
  }
128
128
  }
129
129
 
130
- &__line {
130
+ &-line {
131
131
  position: relative;
132
132
  height: var(--step-vertical-line-height);
133
133
  left: 14px;
@@ -10,14 +10,20 @@ var _provide = require("./provide");
10
10
 
11
11
  var _props = require("./props");
12
12
 
13
+ var _components = require("../utils/components");
14
+
15
+ var {
16
+ n
17
+ } = (0, _components.createNamespace)('steps');
18
+
13
19
  function render(_ctx, _cache) {
14
20
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
15
- class: "var-steps",
21
+ class: (0, _vue.normalizeClass)(_ctx.n()),
16
22
  style: (0, _vue.normalizeStyle)({
17
23
  flexDirection: _ctx.direction === 'horizontal' ? 'row' : 'column'
18
24
  })
19
- }, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 4
20
- /* STYLE */
25
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 6
26
+ /* CLASS, STYLE */
21
27
  );
22
28
  }
23
29
 
@@ -37,7 +43,7 @@ var _default = (0, _vue.defineComponent)({
37
43
  } = (0, _provide.useStep)();
38
44
 
39
45
  var clickStep = index => {
40
- props.onClickStep == null ? void 0 : props.onClickStep(index);
46
+ (0, _components.call)(props.onClickStep, index);
41
47
  };
42
48
 
43
49
  var stepsProvider = {
@@ -49,6 +55,9 @@ var _default = (0, _vue.defineComponent)({
49
55
  clickStep
50
56
  };
51
57
  bindStep(stepsProvider);
58
+ return {
59
+ n
60
+ };
52
61
  }
53
62
 
54
63
  });