@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
@@ -18,25 +18,22 @@ var _elements = require("../utils/elements");
18
18
 
19
19
  var _locale = require("../locale");
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)('picker');
23
29
  var MOMENTUM_RECORD_TIME = 300;
24
30
  var MOMENTUM_ALLOW_DISTANCE = 15;
25
31
  var sid = 0;
26
32
 
27
33
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
28
34
 
29
- var _hoisted_1 = {
30
- class: "var-picker__toolbar"
31
- };
32
- var _hoisted_2 = {
33
- class: "var-picker__title"
34
- };
35
- var _hoisted_3 = ["onTouchstart", "onTouchmove", "onTouchend"];
36
- var _hoisted_4 = ["onTransitionend"];
37
- var _hoisted_5 = {
38
- class: "var-picker__text"
39
- };
35
+ var _hoisted_1 = ["onTouchstart", "onTouchmove", "onTouchend"];
36
+ var _hoisted_2 = ["onTransitionend"];
40
37
 
41
38
  function render(_ctx, _cache) {
42
39
  var _component_var_button = (0, _vue.resolveComponent)("var-button");
@@ -53,14 +50,16 @@ function render(_ctx, _cache) {
53
50
  show: _ctx.show,
54
51
  'onUpdate:show': _ctx.handlePopupUpdateShow,
55
52
  position: 'bottom',
56
- class: 'var-picker__popup'
53
+ class: _ctx.n('popup')
57
54
  } : null, {
58
55
  "var-picker-cover": ""
59
56
  }), {
60
57
  default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
61
- class: "var-picker"
62
- }, _ctx.$attrs), [(0, _vue.createElementVNode)("div", _hoisted_1, [(0, _vue.renderSlot)(_ctx.$slots, "cancel", {}, () => [(0, _vue.createVNode)(_component_var_button, {
63
- class: "var-picker__cancel-button",
58
+ class: _ctx.n()
59
+ }, _ctx.$attrs), [(0, _vue.createElementVNode)("div", {
60
+ class: (0, _vue.normalizeClass)(_ctx.n('toolbar'))
61
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "cancel", {}, () => [(0, _vue.createVNode)(_component_var_button, {
62
+ class: (0, _vue.normalizeClass)(_ctx.n('cancel-button')),
64
63
  "var-picker-cover": "",
65
64
  text: "",
66
65
  "text-color": _ctx.cancelButtonTextColor,
@@ -74,10 +73,12 @@ function render(_ctx, _cache) {
74
73
 
75
74
  }, 8
76
75
  /* PROPS */
77
- , ["text-color", "onClick"])]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", _hoisted_2, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.pickerTitle)), 1
78
- /* TEXT */
76
+ , ["class", "text-color", "onClick"])]), (0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", {
77
+ class: (0, _vue.normalizeClass)(_ctx.n('title'))
78
+ }, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.pickerTitle)), 3
79
+ /* TEXT, CLASS */
79
80
  )]), (0, _vue.renderSlot)(_ctx.$slots, "confirm", {}, () => [(0, _vue.createVNode)(_component_var_button, {
80
- class: "var-picker__confirm-button",
81
+ class: (0, _vue.normalizeClass)(_ctx.n('confirm-button')),
81
82
  text: "",
82
83
  "var-picker-cover": "",
83
84
  "text-color": _ctx.confirmButtonTextColor,
@@ -91,20 +92,22 @@ function render(_ctx, _cache) {
91
92
 
92
93
  }, 8
93
94
  /* PROPS */
94
- , ["text-color", "onClick"])])]), (0, _vue.createElementVNode)("div", {
95
- class: "var-picker__columns",
95
+ , ["class", "text-color", "onClick"])])], 2
96
+ /* CLASS */
97
+ ), (0, _vue.createElementVNode)("div", {
98
+ class: (0, _vue.normalizeClass)(_ctx.n('columns')),
96
99
  style: (0, _vue.normalizeStyle)({
97
100
  height: _ctx.columnHeight + "px"
98
101
  })
99
102
  }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.scrollColumns, c => {
100
103
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
101
- class: "var-picker__column",
104
+ class: (0, _vue.normalizeClass)(_ctx.n('column')),
102
105
  key: c.id,
103
106
  onTouchstart: $event => _ctx.handleTouchstart($event, c),
104
107
  onTouchmove: (0, _vue.withModifiers)($event => _ctx.handleTouchmove($event, c), ["prevent"]),
105
108
  onTouchend: $event => _ctx.handleTouchend($event, c)
106
109
  }, [(0, _vue.createElementVNode)("div", {
107
- class: "var-picker__scroller",
110
+ class: (0, _vue.normalizeClass)(_ctx.n('scroller')),
108
111
  ref_for: true,
109
112
  ref: el => _ctx.getScrollEl(el, c),
110
113
  style: (0, _vue.normalizeStyle)({
@@ -115,42 +118,44 @@ function render(_ctx, _cache) {
115
118
  onTransitionend: $event => _ctx.handleTransitionend(c)
116
119
  }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(c.column.texts, t => {
117
120
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
118
- class: "var-picker__option",
121
+ class: (0, _vue.normalizeClass)(_ctx.n('option')),
119
122
  style: (0, _vue.normalizeStyle)({
120
123
  height: _ctx.optionHeight + "px"
121
124
  }),
122
125
  key: t
123
- }, [(0, _vue.createElementVNode)("div", _hoisted_5, (0, _vue.toDisplayString)(t), 1
124
- /* TEXT */
125
- )], 4
126
- /* STYLE */
126
+ }, [(0, _vue.createElementVNode)("div", {
127
+ class: (0, _vue.normalizeClass)(_ctx.n('text'))
128
+ }, (0, _vue.toDisplayString)(t), 3
129
+ /* TEXT, CLASS */
130
+ )], 6
131
+ /* CLASS, STYLE */
127
132
  );
128
133
  }), 128
129
134
  /* KEYED_FRAGMENT */
130
- ))], 44
131
- /* STYLE, PROPS, HYDRATE_EVENTS */
132
- , _hoisted_4)], 40
133
- /* PROPS, HYDRATE_EVENTS */
134
- , _hoisted_3);
135
+ ))], 46
136
+ /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
137
+ , _hoisted_2)], 42
138
+ /* CLASS, PROPS, HYDRATE_EVENTS */
139
+ , _hoisted_1);
135
140
  }), 128
136
141
  /* KEYED_FRAGMENT */
137
142
  )), (0, _vue.createElementVNode)("div", {
138
- class: "var-picker__picked",
143
+ class: (0, _vue.normalizeClass)(_ctx.n('picked')),
139
144
  style: (0, _vue.normalizeStyle)({
140
145
  top: _ctx.center + "px",
141
146
  height: _ctx.optionHeight + "px"
142
147
  })
143
- }, null, 4
144
- /* STYLE */
148
+ }, null, 6
149
+ /* CLASS, STYLE */
145
150
  ), (0, _vue.createElementVNode)("div", {
146
- class: "var-picker__mask",
151
+ class: (0, _vue.normalizeClass)(_ctx.n('mask')),
147
152
  style: (0, _vue.normalizeStyle)({
148
153
  backgroundSize: "100% " + (_ctx.columnHeight - _ctx.optionHeight) / 2 + "px"
149
154
  })
150
- }, null, 4
151
- /* STYLE */
152
- )], 4
153
- /* STYLE */
155
+ }, null, 6
156
+ /* CLASS, STYLE */
157
+ )], 6
158
+ /* CLASS, STYLE */
154
159
  )], 16
155
160
  /* FULL_PROPS */
156
161
  )]),
@@ -185,9 +190,7 @@ var _default = (0, _vue.defineComponent)({
185
190
  };
186
191
 
187
192
  var handlePopupUpdateShow = value => {
188
- var _props$onUpdateShow;
189
-
190
- (_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, value);
193
+ (0, _components.call)(props['onUpdate:show'], value);
191
194
  };
192
195
 
193
196
  var limitTranslate = scrollColumn => {
@@ -372,7 +375,7 @@ var _default = (0, _vue.defineComponent)({
372
375
  }
373
376
 
374
377
  prevIndexes = [...indexes];
375
- onChange == null ? void 0 : onChange(texts, indexes);
378
+ (0, _components.call)(onChange, texts, indexes);
376
379
  };
377
380
 
378
381
  var stopScroll = () => {
@@ -403,7 +406,7 @@ var _default = (0, _vue.defineComponent)({
403
406
  indexes
404
407
  } = getPicked();
405
408
  prevIndexes = [...indexes];
406
- props.onConfirm == null ? void 0 : props.onConfirm(texts, indexes);
409
+ (0, _components.call)(props.onConfirm, texts, indexes);
407
410
  }; // expose
408
411
 
409
412
 
@@ -414,7 +417,7 @@ var _default = (0, _vue.defineComponent)({
414
417
  indexes
415
418
  } = getPicked();
416
419
  prevIndexes = [...indexes];
417
- props.onCancel == null ? void 0 : props.onCancel(texts, indexes);
420
+ (0, _components.call)(props.onCancel, texts, indexes);
418
421
  };
419
422
 
420
423
  (0, _vue.watch)(() => props.columns, newValue => {
@@ -427,6 +430,8 @@ var _default = (0, _vue.defineComponent)({
427
430
  immediate: true
428
431
  });
429
432
  return {
433
+ n,
434
+ classes,
430
435
  pack: _locale.pack,
431
436
  optionHeight,
432
437
  optionCount,
@@ -23,6 +23,11 @@ function _isSlot(s) {
23
23
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
24
24
  }
25
25
 
26
+ var {
27
+ n,
28
+ classes
29
+ } = (0, _components.createNamespace)('popup');
30
+
26
31
  var _default = (0, _vue.defineComponent)({
27
32
  name: 'VarPopup',
28
33
  inheritAttrs: false,
@@ -69,11 +74,11 @@ var _default = (0, _vue.defineComponent)({
69
74
 
70
75
  var renderOverlay = () => {
71
76
  var {
72
- overlayClass,
77
+ overlayClass = '',
73
78
  overlayStyle
74
79
  } = props;
75
80
  return (0, _vue.createVNode)("div", {
76
- "class": ['var-popup__overlay', overlayClass],
81
+ "class": classes(n('overlay'), overlayClass),
77
82
  "style": _extends({
78
83
  zIndex: zIndex.value - 1
79
84
  }, overlayStyle),
@@ -83,7 +88,7 @@ var _default = (0, _vue.defineComponent)({
83
88
 
84
89
  var renderContent = () => {
85
90
  return (0, _vue.createVNode)("div", (0, _vue.mergeProps)({
86
- "class": ['var-popup__content', 'var-elevation--3', "var-popup--" + props.position],
91
+ "class": classes(n('content'), 'var-elevation--3', n("--" + props.position)),
87
92
  "style": {
88
93
  zIndex: zIndex.value
89
94
  }
@@ -105,7 +110,7 @@ var _default = (0, _vue.defineComponent)({
105
110
  "onAfterLeave": onClosed
106
111
  }, {
107
112
  default: () => [(0, _vue.withDirectives)((0, _vue.createVNode)("div", {
108
- "class": "var--box var-popup",
113
+ "class": classes('var--box', n()),
109
114
  "style": {
110
115
  zIndex: zIndex.value - 2
111
116
  }
@@ -10,35 +10,40 @@ var _props = require("./props");
10
10
 
11
11
  var _shared = require("../utils/shared");
12
12
 
13
+ var _components = require("../utils/components");
14
+
15
+ var {
16
+ n,
17
+ classes
18
+ } = (0, _components.createNamespace)('progress');
19
+
13
20
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
14
21
 
15
- var _hoisted_1 = {
16
- class: "var-progress"
17
- };
18
- var _hoisted_2 = {
19
- key: 0,
20
- class: "var-progress-linear"
21
- };
22
- var _hoisted_3 = ["viewBox"];
23
- var _hoisted_4 = ["cx", "cy", "r", "stroke-width"];
24
- var _hoisted_5 = ["cx", "cy", "r", "stroke-width"];
22
+ var _hoisted_1 = ["viewBox"];
23
+ var _hoisted_2 = ["cx", "cy", "r", "stroke-width"];
24
+ var _hoisted_3 = ["cx", "cy", "r", "stroke-width"];
25
25
 
26
26
  function render(_ctx, _cache) {
27
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [_ctx.mode === 'linear' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_2, [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
28
- class: "var-progress-linear__block",
27
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
28
+ class: (0, _vue.normalizeClass)(_ctx.n())
29
+ }, [_ctx.mode === 'linear' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
30
+ key: 0,
31
+ class: (0, _vue.normalizeClass)(_ctx.n('linear'))
32
+ }, [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
33
+ class: _ctx.n('linear-block'),
29
34
  style: {
30
35
  height: _ctx.lineWidth + "px"
31
36
  }
32
37
  }, _ctx.$attrs), [_ctx.track ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
33
38
  key: 0,
34
- class: "var-progress-linear__background",
39
+ class: (0, _vue.normalizeClass)(_ctx.n('linear-background')),
35
40
  style: (0, _vue.normalizeStyle)({
36
41
  background: _ctx.trackColor
37
42
  })
38
- }, null, 4
39
- /* STYLE */
43
+ }, null, 6
44
+ /* CLASS, STYLE */
40
45
  )) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
41
- class: (0, _vue.normalizeClass)("var-progress-linear__certain" + (_ctx.ripple ? ' var-progress-linear__ripple' : '')),
46
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('linear-certain'), [_ctx.ripple, _ctx.n('linear-ripple')])),
42
47
  style: (0, _vue.normalizeStyle)({
43
48
  background: _ctx.color,
44
49
  width: _ctx.linearProps.width
@@ -49,27 +54,29 @@ function render(_ctx, _cache) {
49
54
  /* FULL_PROPS */
50
55
  ), _ctx.label ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", (0, _vue.mergeProps)({
51
56
  key: 0,
52
- class: "var-progress-linear__label"
57
+ class: _ctx.n('linear-label')
53
58
  }, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.linearProps.roundValue), 1
54
59
  /* TEXT */
55
60
  )])], 16
56
61
  /* FULL_PROPS */
57
- )) : (0, _vue.createCommentVNode)("v-if", true)])) : (0, _vue.createCommentVNode)("v-if", true), _ctx.mode === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
62
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
63
+ /* CLASS */
64
+ )) : (0, _vue.createCommentVNode)("v-if", true), _ctx.mode === 'circle' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
58
65
  key: 1,
59
- class: "var-progress-circle",
66
+ class: (0, _vue.normalizeClass)(_ctx.n('circle')),
60
67
  style: (0, _vue.normalizeStyle)({
61
68
  width: _ctx.size + "px",
62
69
  height: _ctx.size + "px"
63
70
  })
64
71
  }, [((0, _vue.openBlock)(), (0, _vue.createElementBlock)("svg", {
65
- class: "var-progress-circle__svg",
72
+ class: (0, _vue.normalizeClass)(_ctx.n('circle-svg')),
66
73
  style: (0, _vue.normalizeStyle)({
67
74
  transform: "rotate(" + (_ctx.rotate - 90) + "deg)"
68
75
  }),
69
76
  viewBox: _ctx.circleProps.viewBox
70
77
  }, [_ctx.track ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("circle", {
71
78
  key: 0,
72
- class: "var-progress-circle__background",
79
+ class: (0, _vue.normalizeClass)(_ctx.n('circle-background')),
73
80
  cx: _ctx.size / 2,
74
81
  cy: _ctx.size / 2,
75
82
  r: _ctx.circleProps.radius,
@@ -79,10 +86,10 @@ function render(_ctx, _cache) {
79
86
  strokeDasharray: _ctx.circleProps.perimeter,
80
87
  stroke: _ctx.trackColor
81
88
  })
82
- }, null, 12
83
- /* STYLE, PROPS */
84
- , _hoisted_4)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("circle", {
85
- class: "var-progress-circle__certain",
89
+ }, null, 14
90
+ /* CLASS, STYLE, PROPS */
91
+ , _hoisted_2)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("circle", {
92
+ class: (0, _vue.normalizeClass)(_ctx.n('circle-certain')),
86
93
  cx: _ctx.size / 2,
87
94
  cy: _ctx.size / 2,
88
95
  r: _ctx.circleProps.radius,
@@ -92,20 +99,22 @@ function render(_ctx, _cache) {
92
99
  strokeDasharray: _ctx.circleProps.strokeDasharray,
93
100
  stroke: _ctx.color
94
101
  })
95
- }, null, 12
96
- /* STYLE, PROPS */
97
- , _hoisted_5)], 12
98
- /* STYLE, PROPS */
99
- , _hoisted_3)), _ctx.label ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", (0, _vue.mergeProps)({
102
+ }, null, 14
103
+ /* CLASS, STYLE, PROPS */
104
+ , _hoisted_3)], 14
105
+ /* CLASS, STYLE, PROPS */
106
+ , _hoisted_1)), _ctx.label ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", (0, _vue.mergeProps)({
100
107
  key: 0,
101
- class: "var-progress-circle__label"
108
+ class: _ctx.n('circle-label')
102
109
  }, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.circleProps.roundValue), 1
103
110
  /* TEXT */
104
111
  )])], 16
105
112
  /* FULL_PROPS */
106
- )) : (0, _vue.createCommentVNode)("v-if", true)], 4
107
- /* STYLE */
108
- )) : (0, _vue.createCommentVNode)("v-if", true)]);
113
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 6
114
+ /* CLASS, STYLE */
115
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
116
+ /* CLASS */
117
+ );
109
118
  }
110
119
 
111
120
  var _default = (0, _vue.defineComponent)({
@@ -144,6 +153,8 @@ var _default = (0, _vue.defineComponent)({
144
153
  };
145
154
  });
146
155
  return {
156
+ n,
157
+ classes,
147
158
  linearProps,
148
159
  circleProps
149
160
  };
@@ -1 +1 @@
1
- :root { --progress-font-size: var(--font-size-sm); --progress-ripple-color: #fff; --progress-track-color: #d8d8d8; --progress-background: var(--color-primary);}.var-progress { position: relative; font-size: var(--progress-font-size);}.var-progress-linear { display: flex; align-items: center;}.var-progress-linear__block { flex: 1; position: relative; overflow: hidden;}.var-progress-linear__background,.var-progress-linear__certain { width: 100%; height: 100%;}.var-progress-linear__ripple::after { position: absolute; width: 0; background-color: var(--progress-ripple-color); height: 100%; opacity: 0; animation: ripple 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; content: '';}.var-progress-linear__background { background-color: var(--progress-track-color);}.var-progress-linear__certain { position: absolute; background-color: var(--progress-background); top: 0; left: 0; transition: all 0.2s, background-color 0.8s;}.var-progress-linear__label { margin-left: 8px; flex: 0;}@keyframes ripple { 0% { width: 0; opacity: 0.1; } 20% { width: 0; opacity: 0.5; } 80% { width: 100%; opacity: 0; }}.var-progress-circle { position: relative;}.var-progress-circle__background { stroke: var(--progress-track-color);}.var-progress-circle__certain { transition: all 0.2s; stroke: var(--progress-background); position: absolute;}.var-progress-circle__label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);}
1
+ :root { --progress-font-size: var(--font-size-sm); --progress-ripple-color: #fff; --progress-track-color: #d8d8d8; --progress-background: var(--color-primary);}.var-progress { position: relative; font-size: var(--progress-font-size);}.var-progress__linear { display: flex; align-items: center;}.var-progress__linear-block { flex: 1; position: relative; overflow: hidden;}.var-progress__linear-background,.var-progress__linear-certain { width: 100%; height: 100%;}.var-progress__linear-ripple::after { position: absolute; width: 0; background-color: var(--progress-ripple-color); height: 100%; opacity: 0; animation: ripple 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; content: '';}.var-progress__linear-background { background-color: var(--progress-track-color);}.var-progress__linear-certain { position: absolute; background-color: var(--progress-background); top: 0; left: 0; transition: all 0.2s, background-color 0.8s;}.var-progress__linear-label { margin-left: 8px; flex: 0;}@keyframes ripple { 0% { width: 0; opacity: 0.1; } 20% { width: 0; opacity: 0.5; } 80% { width: 100%; opacity: 0; }}.var-progress__circle { position: relative;}.var-progress__circle-background { stroke: var(--progress-track-color);}.var-progress__circle-certain { transition: all 0.2s; stroke: var(--progress-background); position: absolute;}.var-progress__circle-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);}
@@ -14,23 +14,23 @@
14
14
  position: relative;
15
15
  font-size: var(--progress-font-size);
16
16
 
17
- &-linear {
17
+ &__linear {
18
18
  display: flex;
19
19
  align-items: center;
20
20
 
21
- &__block {
21
+ &-block {
22
22
  flex: 1;
23
23
  position: relative;
24
24
  overflow: hidden;
25
25
  }
26
26
 
27
- &__background,
28
- &__certain {
27
+ &-background,
28
+ &-certain {
29
29
  width: 100%;
30
30
  height: 100%;
31
31
  }
32
32
 
33
- &__ripple {
33
+ &-ripple {
34
34
  &::after {
35
35
  position: absolute;
36
36
  width: 0;
@@ -42,11 +42,11 @@
42
42
  }
43
43
  }
44
44
 
45
- &__background {
45
+ &-background {
46
46
  background-color: var(--progress-track-color);
47
47
  }
48
48
 
49
- &__certain {
49
+ &-certain {
50
50
  position: absolute;
51
51
  background-color: var(--progress-background);
52
52
  top: 0;
@@ -54,7 +54,7 @@
54
54
  transition: all 0.2s, background-color 0.8s;
55
55
  }
56
56
 
57
- &__label {
57
+ &-label {
58
58
  margin-left: 8px;
59
59
  flex: 0;
60
60
  }
@@ -75,20 +75,20 @@
75
75
  }
76
76
  }
77
77
 
78
- &-circle {
78
+ &__circle {
79
79
  position: relative;
80
80
 
81
- &__background {
81
+ &-background {
82
82
  stroke: var(--progress-track-color);
83
83
  }
84
84
 
85
- &__certain {
85
+ &-certain {
86
86
  transition: all 0.2s;
87
87
  stroke: var(--progress-background);
88
88
  position: absolute;
89
89
  }
90
90
 
91
- &__label {
91
+ &-label {
92
92
  position: absolute;
93
93
  left: 50%;
94
94
  top: 50%;
@@ -14,8 +14,14 @@ var _props = require("./props");
14
14
 
15
15
  var _shared = require("../utils/shared");
16
16
 
17
+ var _components = require("../utils/components");
18
+
17
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
20
 
21
+ var {
22
+ n,
23
+ classes
24
+ } = (0, _components.createNamespace)('pull-refresh');
19
25
  var MAX_DISTANCE = 100;
20
26
  var CONTROL_POSITION = -50;
21
27
  var scroller;
@@ -25,7 +31,7 @@ function render(_ctx, _cache) {
25
31
 
26
32
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
27
33
  ref: "freshNode",
28
- class: "var-pull-refresh",
34
+ class: (0, _vue.normalizeClass)(_ctx.n()),
29
35
  onTouchstart: _cache[0] || (_cache[0] = function () {
30
36
  return _ctx.touchStart && _ctx.touchStart(...arguments);
31
37
  }),
@@ -39,19 +45,19 @@ function render(_ctx, _cache) {
39
45
  return _ctx.touchEnd && _ctx.touchEnd(...arguments);
40
46
  })
41
47
  }, [(0, _vue.createElementVNode)("div", {
42
- class: (0, _vue.normalizeClass)(["var-pull-refresh__control var-elevation--2", [_ctx.isSuccess ? 'var-pull-refresh__control-success' : null]]),
48
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('control'), 'var-elevation--2', [_ctx.isSuccess, _ctx.n('control-success')])),
43
49
  style: (0, _vue.normalizeStyle)(_ctx.controlStyle)
44
50
  }, [(0, _vue.createVNode)(_component_var_icon, {
45
51
  name: _ctx.iconName,
46
52
  transition: 200,
47
- class: (0, _vue.normalizeClass)(_ctx.iconClass),
53
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('icon'), [_ctx.refreshStatus === 'loading', _ctx.n('animation')])),
48
54
  "var-pull-refresh-cover": ""
49
55
  }, null, 8
50
56
  /* PROPS */
51
57
  , ["name", "class"])], 6
52
58
  /* CLASS, STYLE */
53
- ), (0, _vue.renderSlot)(_ctx.$slots, "default")], 544
54
- /* HYDRATE_EVENTS, NEED_PATCH */
59
+ ), (0, _vue.renderSlot)(_ctx.$slots, "default")], 34
60
+ /* CLASS, HYDRATE_EVENTS */
55
61
  );
56
62
  }
57
63
 
@@ -71,10 +77,6 @@ var _default = (0, _vue.defineComponent)({
71
77
  var refreshStatus = (0, _vue.ref)('default');
72
78
  var isEnd = (0, _vue.ref)(false);
73
79
  var isTouchable = (0, _vue.computed)(() => refreshStatus.value !== 'loading' && refreshStatus.value !== 'success' && !props.disabled);
74
- var iconClass = (0, _vue.computed)(() => ({
75
- 'var-pull-refresh__icon': true,
76
- 'var-pull-refresh__animation': refreshStatus.value === 'loading'
77
- }));
78
80
  var controlStyle = (0, _vue.computed)(() => ({
79
81
  transform: "translate3d(0px, " + distance.value + "px, 0px) translate(-50%, 0)",
80
82
  transition: isEnd.value ? "transform " + props.animationDuration + "ms" : undefined,
@@ -142,12 +144,14 @@ var _default = (0, _vue.defineComponent)({
142
144
  scroller = (0, _elements.getParentScroller)(freshNode.value);
143
145
  });
144
146
  return {
147
+ n,
148
+ classes,
149
+ refreshStatus,
145
150
  freshNode,
146
151
  touchStart,
147
152
  touchMove,
148
153
  touchEnd,
149
154
  iconName,
150
- iconClass,
151
155
  controlStyle,
152
156
  isSuccess
153
157
  };