@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
@@ -14,72 +14,79 @@ var _props = require("./props");
14
14
 
15
15
  var _shared = require("../utils/shared");
16
16
 
17
+ var _components = require("../utils/components");
18
+
17
19
  var _utils = require("./utils");
18
20
 
19
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
22
 
21
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
23
+ var {
24
+ n,
25
+ classes
26
+ } = (0, _components.createNamespace)('time-picker');
22
27
 
23
- var _hoisted_1 = {
24
- class: "var-time-picker-title__time"
25
- };
28
+ var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
26
29
 
27
- var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("span", null, ":", -1
30
+ var _hoisted_1 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0, _vue.createElementVNode)("span", null, ":", -1
28
31
  /* HOISTED */
29
32
  ));
30
33
 
31
- var _hoisted_3 = {
34
+ var _hoisted_2 = {
32
35
  key: 0
33
36
  };
34
- var _hoisted_4 = {
35
- key: 0,
36
- class: "var-time-picker-title__ampm"
37
- };
38
- var _hoisted_5 = {
39
- class: "var-time-picker-body"
40
- };
41
37
 
42
38
  function render(_ctx, _cache) {
43
39
  var _component_clock = (0, _vue.resolveComponent)("clock");
44
40
 
45
41
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
46
- class: (0, _vue.normalizeClass)(["var-time-picker", [_ctx.shadow ? 'var-elevation--2' : null]]),
42
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.shadow, 'var-elevation--2'])),
47
43
  ref: "picker"
48
44
  }, [(0, _vue.createElementVNode)("div", {
49
- class: "var-time-picker-title",
45
+ class: (0, _vue.normalizeClass)(_ctx.n('title')),
50
46
  style: (0, _vue.normalizeStyle)({
51
47
  background: _ctx.headerColor || _ctx.color
52
48
  })
53
- }, [(0, _vue.createElementVNode)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", {
54
- class: (0, _vue.normalizeClass)(["var-time-picker-title__btn", _ctx.type === 'hour' ? 'var-time-picker-title__btn--active' : null]),
49
+ }, [(0, _vue.createElementVNode)("div", {
50
+ class: (0, _vue.normalizeClass)(_ctx.n('title-time'))
51
+ }, [(0, _vue.createElementVNode)("div", {
52
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-btn'), [_ctx.type === 'hour', _ctx.n('title-btn--active')])),
55
53
  onClick: _cache[0] || (_cache[0] = $event => _ctx.checkPanel('hour'))
56
54
  }, (0, _vue.toDisplayString)(_ctx.time.hour), 3
57
55
  /* TEXT, CLASS */
58
- ), _hoisted_2, (0, _vue.createElementVNode)("div", {
59
- class: (0, _vue.normalizeClass)(["var-time-picker-title__btn", _ctx.type === 'minute' ? 'var-time-picker-title__btn--active' : null]),
56
+ ), _hoisted_1, (0, _vue.createElementVNode)("div", {
57
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-btn'), [_ctx.type === 'minute', _ctx.n('title-btn--active')])),
60
58
  onClick: _cache[1] || (_cache[1] = $event => _ctx.checkPanel('minute'))
61
59
  }, (0, _vue.toDisplayString)(_ctx.time.minute), 3
62
60
  /* TEXT, CLASS */
63
- ), _ctx.useSeconds ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_3, ":")) : (0, _vue.createCommentVNode)("v-if", true), _ctx.useSeconds ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
61
+ ), _ctx.useSeconds ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_2, ":")) : (0, _vue.createCommentVNode)("v-if", true), _ctx.useSeconds ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
64
62
  key: 1,
65
- class: (0, _vue.normalizeClass)(["var-time-picker-title__btn", _ctx.type === 'second' ? 'var-time-picker-title__btn--active' : null]),
63
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-btn'), [_ctx.type === 'second', _ctx.n('title-btn--active')])),
66
64
  onClick: _cache[2] || (_cache[2] = $event => _ctx.checkPanel('second'))
67
65
  }, (0, _vue.toDisplayString)(_ctx.time.second), 3
68
66
  /* TEXT, CLASS */
69
- )) : (0, _vue.createCommentVNode)("v-if", true)]), _ctx.format === 'ampm' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_4, [(0, _vue.createElementVNode)("div", {
70
- class: (0, _vue.normalizeClass)(["var-time-picker-title__btn", _ctx.ampm === 'am' ? 'var-time-picker-title__btn--active' : null]),
67
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
68
+ /* CLASS */
69
+ ), _ctx.format === 'ampm' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
70
+ key: 0,
71
+ class: (0, _vue.normalizeClass)(_ctx.n('title-ampm'))
72
+ }, [(0, _vue.createElementVNode)("div", {
73
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-btn'), [_ctx.ampm === 'am', _ctx.n('title-btn--active')])),
71
74
  onClick: _cache[3] || (_cache[3] = $event => _ctx.checkAmpm('am'))
72
- }, " AM ", 2
75
+ }, "AM", 2
73
76
  /* CLASS */
74
77
  ), (0, _vue.createElementVNode)("div", {
75
- class: (0, _vue.normalizeClass)(["var-time-picker-title__btn", _ctx.ampm === 'pm' ? 'var-time-picker-title__btn--active' : null]),
78
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-btn'), [_ctx.ampm === 'pm', _ctx.n('title-btn--active')])),
76
79
  onClick: _cache[4] || (_cache[4] = $event => _ctx.checkAmpm('pm'))
77
- }, " PM ", 2
80
+ }, "PM", 2
78
81
  /* CLASS */
79
- )])) : (0, _vue.createCommentVNode)("v-if", true)], 4
80
- /* STYLE */
81
- ), (0, _vue.createElementVNode)("div", _hoisted_5, [(0, _vue.createElementVNode)("div", {
82
- class: "var-time-picker-clock__container",
82
+ )], 2
83
+ /* CLASS */
84
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 6
85
+ /* CLASS, STYLE */
86
+ ), (0, _vue.createElementVNode)("div", {
87
+ class: (0, _vue.normalizeClass)(_ctx.n('body'))
88
+ }, [(0, _vue.createElementVNode)("div", {
89
+ class: (0, _vue.normalizeClass)(_ctx.n('clock-container')),
83
90
  onTouchstart: _cache[5] || (_cache[5] = function () {
84
91
  return _ctx.moveHand && _ctx.moveHand(...arguments);
85
92
  }),
@@ -91,7 +98,7 @@ function render(_ctx, _cache) {
91
98
  }),
92
99
  ref: "container"
93
100
  }, [(0, _vue.createVNode)(_vue.Transition, {
94
- name: "var-time-picker-panel-fade"
101
+ name: _ctx.n() + "-panel-fade"
95
102
  }, {
96
103
  default: (0, _vue.withCtx)(() => [((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_clock, {
97
104
  key: _ctx.type,
@@ -116,9 +123,13 @@ function render(_ctx, _cache) {
116
123
  _: 1
117
124
  /* STABLE */
118
125
 
119
- })], 544
120
- /* HYDRATE_EVENTS, NEED_PATCH */
121
- )])], 2
126
+ }, 8
127
+ /* PROPS */
128
+ , ["name"])], 34
129
+ /* CLASS, HYDRATE_EVENTS */
130
+ )], 2
131
+ /* CLASS */
132
+ )], 2
122
133
  /* CLASS */
123
134
  );
124
135
  }
@@ -167,10 +178,8 @@ var _default = (0, _vue.defineComponent)({
167
178
  });
168
179
 
169
180
  var update = newTime => {
170
- var _props$onUpdateModel;
171
-
172
- (_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, newTime);
173
- props.onChange == null ? void 0 : props.onChange(newTime);
181
+ (0, _components.call)(props['onUpdate:modelValue'], newTime);
182
+ (0, _components.call)(props.onChange, newTime);
174
183
  };
175
184
 
176
185
  var rad2deg = rad => {
@@ -392,6 +401,8 @@ var _default = (0, _vue.defineComponent)({
392
401
  immediate: true
393
402
  });
394
403
  return {
404
+ n,
405
+ classes,
395
406
  getRad,
396
407
  time,
397
408
  container,
@@ -14,28 +14,26 @@ var _utils = require("./utils");
14
14
 
15
15
  var _shared = require("../utils/shared");
16
16
 
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ var _components = require("../utils/components");
18
18
 
19
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
 
21
- var _hoisted_1 = {
22
- class: "var-time-picker-clock"
23
- };
24
- var _hoisted_2 = {
25
- key: 0,
26
- class: "var-time-picker-clock__inner",
27
- ref: "inner"
28
- };
21
+ var {
22
+ n,
23
+ classes
24
+ } = (0, _components.createNamespace)('time-picker');
29
25
 
30
26
  function render(_ctx, _cache) {
31
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", {
32
- class: "var-time-picker-clock__hand",
27
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
28
+ class: (0, _vue.normalizeClass)(_ctx.n('clock'))
29
+ }, [(0, _vue.createElementVNode)("div", {
30
+ class: (0, _vue.normalizeClass)(_ctx.n('clock-hand')),
33
31
  style: (0, _vue.normalizeStyle)(_ctx.handStyle)
34
- }, null, 4
35
- /* STYLE */
32
+ }, null, 6
33
+ /* CLASS, STYLE */
36
34
  ), ((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.timeScales, (timeScale, index) => {
37
35
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
38
- class: (0, _vue.normalizeClass)(["var-time-picker-clock__item", [_ctx.isActive(index, false) ? 'var-time-picker-clock__item--active' : null, _ctx.isDisable(timeScale) ? 'var-time-picker-clock__item--disable' : null]]),
36
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('clock-item'), [_ctx.isActive(index, false), _ctx.n('clock-item--active')], [_ctx.isDisable(timeScale), _ctx.n('clock-item--disable')])),
39
37
  key: timeScale,
40
38
  style: (0, _vue.normalizeStyle)(_ctx.getStyle(index, timeScale, false))
41
39
  }, (0, _vue.toDisplayString)(timeScale), 7
@@ -43,9 +41,13 @@ function render(_ctx, _cache) {
43
41
  );
44
42
  }), 128
45
43
  /* KEYED_FRAGMENT */
46
- )), _ctx.format === '24hr' && _ctx.type === 'hour' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_2, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.hours24, (hour, index) => {
44
+ )), _ctx.format === '24hr' && _ctx.type === 'hour' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
45
+ key: 0,
46
+ class: (0, _vue.normalizeClass)(_ctx.n('clock-inner')),
47
+ ref: "inner"
48
+ }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.hours24, (hour, index) => {
47
49
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
48
- class: (0, _vue.normalizeClass)(["var-time-picker-clock__item", [_ctx.isActive(index, true) ? 'var-time-picker-clock__item--active' : null, _ctx.isDisable(hour) ? 'var-time-picker-clock__item--disable' : null]]),
50
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('clock-item'), [_ctx.isActive(index, true), _ctx.n('clock-item--active')], [_ctx.isDisable(hour), _ctx.n('clock-item--disable')])),
49
51
  key: hour,
50
52
  style: (0, _vue.normalizeStyle)(_ctx.getStyle(index, hour, true))
51
53
  }, (0, _vue.toDisplayString)(hour), 7
@@ -53,9 +55,11 @@ function render(_ctx, _cache) {
53
55
  );
54
56
  }), 128
55
57
  /* KEYED_FRAGMENT */
56
- ))], 512
57
- /* NEED_PATCH */
58
- )) : (0, _vue.createCommentVNode)("v-if", true)]);
58
+ ))], 2
59
+ /* CLASS */
60
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
61
+ /* CLASS */
62
+ );
59
63
  }
60
64
 
61
65
  var _default = (0, _vue.defineComponent)({
@@ -331,6 +335,8 @@ var _default = (0, _vue.defineComponent)({
331
335
  immediate: true
332
336
  });
333
337
  return {
338
+ n,
339
+ classes,
334
340
  hours24: _props.hours24,
335
341
  timeScales,
336
342
  inner,
@@ -1 +1 @@
1
- :root { --time-picker-border-radius: 4px; --time-picker-font-size: var(--font-size-md); --time-picker-min-width: 290px; --time-picker-height: 385px; --time-picker-title-padding: 16px; --time-picker-title-color: #fff; --time-picker-title-background: var(--color-primary); --time-picker-title-time-font-size: 50px; --time-picker-title-time-margin: 0 5px; --time-picker-title-ampm-margin-left: 5px; --time-picker-clock-left: 27px; --time-picker-clock-right: 27px; --time-picker-clock-top: 27px; --time-picker-clock-bottom: 27px; --time-picker-clock-container-width: 270px; --time-picker-clock-container-height: 270px; --time-picker-clock-container-background: #e0e0e0; --time-picker-clock-hand-height: calc(50% - 4px); --time-picker-clock-hand-width: 2px; --time-picker-clock-hand-bottom: 50%; --time-picker-clock-hand-left: calc(50% - 1px); --time-picker-clock-hand-background: var(--color-primary); --time-picker-clock-hand-border-color: var(--color-primary); --time-picker-clock-hand-before-width: 10px; --time-picker-clock-hand-before-height: 10px; --time-picker-clock-hand-before-border-width: 2px; --time-picker-clock-hand-after-width: 4px; --time-picker-clock-hand-after-height: 4px; --time-picker-clock-item-height: 32px; --time-picker-clock-item-width: 32px; --time-picker-clock-item-active-background: var(--color-primary); --time-picker-clock-item-active-color: #fff; --time-picker-clock-item-disable-color: rgba(0, 0, 0, 0.26); --time-picker-inner-left: 36px; --time-picker-inner-right: 36px; --time-picker-inner-top: 36px; --time-picker-inner-bottom: 36px; --time-picker-body-background: #fff;}.after-before-basic { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%);}.var-time-picker { border-radius: var(--time-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--time-picker-font-size); position: relative; min-width: var(--time-picker-min-width); height: var(--time-picker-height); overflow: hidden; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-time-picker-title { padding: var(--time-picker-title-padding); color: var(--time-picker-title-color); background: var(--time-picker-title-background); display: flex; align-items: flex-end; justify-content: flex-end;}.var-time-picker-title__btn { opacity: 0.6; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier); white-space: nowrap;}.var-time-picker-title__btn--active { opacity: 1;}.var-time-picker-title__time { display: flex; justify-content: flex-end; font-size: var(--time-picker-title-time-font-size);}.var-time-picker-title__time .var-time-picker-title__btn { align-items: center; margin: var(--time-picker-title-time-margin);}.var-time-picker-title__ampm { margin-left: var(--time-picker-title-ampm-margin-left);}.var-time-picker-body { flex: 1; display: flex; align-items: center; justify-content: center; background-color: var(--time-picker-body-background);}.var-time-picker-clock { position: absolute; bottom: var(--time-picker-clock-bottom); left: var(--time-picker-clock-left); right: var(--time-picker-clock-right); top: var(--time-picker-clock-top);}.var-time-picker-clock__container { width: var(--time-picker-clock-container-width); height: var(--time-picker-clock-container-height); background: var(--time-picker-clock-container-background); border-radius: 50%; position: relative;}.var-time-picker-clock__hand { height: var(--time-picker-clock-hand-height); width: var(--time-picker-clock-hand-width); bottom: var(--time-picker-clock-hand-bottom); left: var(--time-picker-clock-hand-left); transform-origin: center bottom; position: absolute; will-change: transform; z-index: 1; background-color: var(--time-picker-clock-hand-background); border-color: var(--time-picker-clock-hand-border-color);}.var-time-picker-clock__hand::before { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%); background: transparent; border: var(--time-picker-clock-hand-before-border-width) solid; width: var(--time-picker-clock-hand-before-width); height: var(--time-picker-clock-hand-before-height); top: -5px; border-color: inherit;}.var-time-picker-clock__hand::after { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%); border-color: inherit; height: var(--time-picker-clock-hand-after-height); width: var(--time-picker-clock-hand-after-width); top: 100%; border-style: solid; background-color: inherit;}.var-time-picker-clock__item { align-items: center; border-radius: 100%; display: flex; justify-content: center; height: var(--time-picker-clock-item-height); position: absolute; width: var(--time-picker-clock-item-width); user-select: none; transform: translate(-50%, -50%);}.var-time-picker-clock__item--active { background: var(--time-picker-clock-item-active-background); z-index: 2; color: var(--time-picker-clock-item-active-color);}.var-time-picker-clock__item--disable { color: var(--time-picker-clock-item-disable-color);}.var-time-picker-clock__inner { position: absolute; bottom: var(--time-picker-inner-bottom); left: var(--time-picker-inner-left); right: var(--time-picker-inner-right); top: var(--time-picker-inner-top);}.var-time-picker-panel-fade-enter-from,.var-time-picker-panel-fade-leave-to { transition: 0.3s var(--cubic-bezier); opacity: 0;}.var-time-picker-panel-fade-leave-active { position: absolute;}
1
+ :root { --time-picker-border-radius: 4px; --time-picker-font-size: var(--font-size-md); --time-picker-min-width: 290px; --time-picker-height: 385px; --time-picker-title-padding: 16px; --time-picker-title-color: #fff; --time-picker-title-background: var(--color-primary); --time-picker-title-time-font-size: 50px; --time-picker-title-time-margin: 0 5px; --time-picker-title-ampm-margin-left: 5px; --time-picker-clock-left: 27px; --time-picker-clock-right: 27px; --time-picker-clock-top: 27px; --time-picker-clock-bottom: 27px; --time-picker-clock-container-width: 270px; --time-picker-clock-container-height: 270px; --time-picker-clock-container-background: #e0e0e0; --time-picker-clock-hand-height: calc(50% - 4px); --time-picker-clock-hand-width: 2px; --time-picker-clock-hand-bottom: 50%; --time-picker-clock-hand-left: calc(50% - 1px); --time-picker-clock-hand-background: var(--color-primary); --time-picker-clock-hand-border-color: var(--color-primary); --time-picker-clock-hand-before-width: 10px; --time-picker-clock-hand-before-height: 10px; --time-picker-clock-hand-before-border-width: 2px; --time-picker-clock-hand-after-width: 4px; --time-picker-clock-hand-after-height: 4px; --time-picker-clock-item-height: 32px; --time-picker-clock-item-width: 32px; --time-picker-clock-item-active-background: var(--color-primary); --time-picker-clock-item-active-color: #fff; --time-picker-clock-item-disable-color: rgba(0, 0, 0, 0.26); --time-picker-inner-left: 36px; --time-picker-inner-right: 36px; --time-picker-inner-top: 36px; --time-picker-inner-bottom: 36px; --time-picker-body-background: #fff;}.after-before-basic { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%);}.var-time-picker { border-radius: var(--time-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--time-picker-font-size); position: relative; min-width: var(--time-picker-min-width); height: var(--time-picker-height); overflow: hidden; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-time-picker__title { padding: var(--time-picker-title-padding); color: var(--time-picker-title-color); background: var(--time-picker-title-background); display: flex; align-items: flex-end; justify-content: flex-end;}.var-time-picker__title-btn { opacity: 0.6; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier); white-space: nowrap;}.var-time-picker__title-btn--active { opacity: 1;}.var-time-picker__title-time { display: flex; justify-content: flex-end; font-size: var(--time-picker-title-time-font-size);}.var-time-picker__title-time .var-time-picker__title-btn { align-items: center; margin: var(--time-picker-title-time-margin);}.var-time-picker__title-ampm { margin-left: var(--time-picker-title-ampm-margin-left);}.var-time-picker__body { flex: 1; display: flex; align-items: center; justify-content: center; background-color: var(--time-picker-body-background);}.var-time-picker__clock { position: absolute; bottom: var(--time-picker-clock-bottom); left: var(--time-picker-clock-left); right: var(--time-picker-clock-right); top: var(--time-picker-clock-top);}.var-time-picker__clock-container { width: var(--time-picker-clock-container-width); height: var(--time-picker-clock-container-height); background: var(--time-picker-clock-container-background); border-radius: 50%; position: relative;}.var-time-picker__clock-hand { height: var(--time-picker-clock-hand-height); width: var(--time-picker-clock-hand-width); bottom: var(--time-picker-clock-hand-bottom); left: var(--time-picker-clock-hand-left); transform-origin: center bottom; position: absolute; will-change: transform; z-index: 1; background-color: var(--time-picker-clock-hand-background); border-color: var(--time-picker-clock-hand-border-color);}.var-time-picker__clock-hand::before { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%); background: transparent; border: var(--time-picker-clock-hand-before-border-width) solid; width: var(--time-picker-clock-hand-before-width); height: var(--time-picker-clock-hand-before-height); top: -5px; border-color: inherit;}.var-time-picker__clock-hand::after { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%); border-color: inherit; height: var(--time-picker-clock-hand-after-height); width: var(--time-picker-clock-hand-after-width); top: 100%; border-style: solid; background-color: inherit;}.var-time-picker__clock-item { align-items: center; border-radius: 100%; display: flex; justify-content: center; height: var(--time-picker-clock-item-height); position: absolute; width: var(--time-picker-clock-item-width); user-select: none; transform: translate(-50%, -50%);}.var-time-picker__clock-item--active { background: var(--time-picker-clock-item-active-background); z-index: 2; color: var(--time-picker-clock-item-active-color);}.var-time-picker__clock-item--disable { color: var(--time-picker-clock-item-disable-color);}.var-time-picker__clock-inner { position: absolute; bottom: var(--time-picker-inner-bottom); left: var(--time-picker-inner-left); right: var(--time-picker-inner-right); top: var(--time-picker-inner-top);}.var-time-picker-panel-fade-enter-from,.var-time-picker-panel-fade-leave-to { transition: 0.3s var(--cubic-bezier); opacity: 0;}.var-time-picker-panel-fade-leave-active { position: absolute;}
@@ -99,7 +99,7 @@
99
99
  overflow: hidden;
100
100
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
101
101
 
102
- &-title {
102
+ &__title {
103
103
  padding: var(--time-picker-title-padding);
104
104
  color: var(--time-picker-title-color);
105
105
  background: var(--time-picker-title-background);
@@ -107,7 +107,7 @@
107
107
  align-items: flex-end;
108
108
  justify-content: flex-end;
109
109
 
110
- &__btn {
110
+ &-btn {
111
111
  opacity: 0.6;
112
112
  cursor: pointer;
113
113
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
@@ -119,23 +119,23 @@
119
119
  }
120
120
  }
121
121
 
122
- &__time {
122
+ &-time {
123
123
  display: flex;
124
124
  justify-content: flex-end;
125
125
  font-size: var(--time-picker-title-time-font-size);
126
126
 
127
- .var-time-picker-title__btn {
127
+ .var-time-picker__title-btn {
128
128
  align-items: center;
129
129
  margin: var(--time-picker-title-time-margin);
130
130
  }
131
131
  }
132
132
 
133
- &__ampm {
133
+ &-ampm {
134
134
  margin-left: var(--time-picker-title-ampm-margin-left);
135
135
  }
136
136
  }
137
137
 
138
- &-body {
138
+ &__body {
139
139
  flex: 1;
140
140
  display: flex;
141
141
  align-items: center;
@@ -143,14 +143,14 @@
143
143
  background-color: var(--time-picker-body-background);
144
144
  }
145
145
 
146
- &-clock {
146
+ &__clock {
147
147
  position: absolute;
148
148
  bottom: var(--time-picker-clock-bottom);
149
149
  left: var(--time-picker-clock-left);
150
150
  right: var(--time-picker-clock-right);
151
151
  top: var(--time-picker-clock-top);
152
152
 
153
- &__container {
153
+ &-container {
154
154
  width: var(--time-picker-clock-container-width);
155
155
  height: var(--time-picker-clock-container-height);
156
156
  background: var(--time-picker-clock-container-background);
@@ -158,7 +158,7 @@
158
158
  position: relative;
159
159
  }
160
160
 
161
- &__hand {
161
+ &-hand {
162
162
  height: var(--time-picker-clock-hand-height);
163
163
  width: var(--time-picker-clock-hand-width);
164
164
  bottom: var(--time-picker-clock-hand-bottom);
@@ -193,7 +193,7 @@
193
193
  }
194
194
  }
195
195
 
196
- &__item {
196
+ &-item {
197
197
  align-items: center;
198
198
  border-radius: 100%;
199
199
  display: flex;
@@ -215,7 +215,7 @@
215
215
  }
216
216
  }
217
217
 
218
- &__inner {
218
+ &-inner {
219
219
  position: absolute;
220
220
  bottom: var(--time-picker-inner-bottom);
221
221
  left: var(--time-picker-inner-left);
@@ -30,24 +30,19 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
30
30
 
31
31
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
32
32
 
33
+ var {
34
+ n,
35
+ classes
36
+ } = (0, _components.createNamespace)('uploader');
33
37
  var fid = 0;
34
38
 
35
39
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
36
40
 
37
- var _hoisted_1 = {
38
- class: "var-uploader var--box"
39
- };
40
- var _hoisted_2 = {
41
- class: "var-uploader__file-list"
42
- };
43
- var _hoisted_3 = ["onClick"];
44
- var _hoisted_4 = {
45
- class: "var-uploader__file-name"
46
- };
47
- var _hoisted_5 = ["onClick"];
48
- var _hoisted_6 = ["src", "alt"];
49
- var _hoisted_7 = ["multiple", "accept", "capture", "disabled"];
50
- var _hoisted_8 = ["src"];
41
+ var _hoisted_1 = ["onClick"];
42
+ var _hoisted_2 = ["onClick"];
43
+ var _hoisted_3 = ["src", "alt"];
44
+ var _hoisted_4 = ["multiple", "accept", "capture", "disabled"];
45
+ var _hoisted_5 = ["src"];
51
46
 
52
47
  function render(_ctx, _cache) {
53
48
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
@@ -58,49 +53,57 @@ function render(_ctx, _cache) {
58
53
 
59
54
  var _directive_ripple = (0, _vue.resolveDirective)("ripple");
60
55
 
61
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", _hoisted_2, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.files, f => {
56
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
57
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box'))
58
+ }, [(0, _vue.createElementVNode)("div", {
59
+ class: (0, _vue.normalizeClass)(_ctx.n('file-list'))
60
+ }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.files, f => {
62
61
  return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
63
- class: (0, _vue.normalizeClass)(["var-uploader__file var-elevation--2", [f.state === 'loading' ? 'var-uploader--loading' : null]]),
62
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('file'), 'var-elevation--2', [f.state === 'loading', _ctx.n('--loading')])),
64
63
  key: f.id,
65
64
  onClick: $event => _ctx.preview(f)
66
- }, [(0, _vue.createElementVNode)("div", _hoisted_4, (0, _vue.toDisplayString)(f.name || f.url), 1
67
- /* TEXT */
65
+ }, [(0, _vue.createElementVNode)("div", {
66
+ class: (0, _vue.normalizeClass)(_ctx.n('file-name'))
67
+ }, (0, _vue.toDisplayString)(f.name || f.url), 3
68
+ /* TEXT, CLASS */
68
69
  ), _ctx.removable ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
69
70
  key: 0,
70
- class: "var-uploader__file-close",
71
+ class: (0, _vue.normalizeClass)(_ctx.n('file-close')),
71
72
  onClick: (0, _vue.withModifiers)($event => _ctx.handleRemove(f), ["stop"])
72
73
  }, [(0, _vue.createVNode)(_component_var_icon, {
73
- class: "var-uploader__file-close-icon",
74
+ class: (0, _vue.normalizeClass)(_ctx.n('file-close-icon')),
74
75
  "var-uploader-cover": "",
75
76
  name: "delete"
76
- })], 8
77
+ }, null, 8
77
78
  /* PROPS */
78
- , _hoisted_5)) : (0, _vue.createCommentVNode)("v-if", true), f.cover ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("img", {
79
+ , ["class"])], 10
80
+ /* CLASS, PROPS */
81
+ , _hoisted_2)) : (0, _vue.createCommentVNode)("v-if", true), f.cover ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("img", {
79
82
  key: 1,
80
- class: "var-uploader__file-cover",
83
+ class: (0, _vue.normalizeClass)(_ctx.n('file-cover')),
81
84
  style: (0, _vue.normalizeStyle)({
82
85
  objectFit: f.fit
83
86
  }),
84
87
  src: f.cover,
85
88
  alt: f.name
86
- }, null, 12
87
- /* STYLE, PROPS */
88
- , _hoisted_6)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
89
- class: (0, _vue.normalizeClass)(["var-uploader__file-indicator", [f.state === 'success' ? 'var-uploader--success' : null, f.state === 'error' ? 'var-uploader--error' : null]])
89
+ }, null, 14
90
+ /* CLASS, STYLE, PROPS */
91
+ , _hoisted_3)) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
92
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('file-indicator'), [f.state === 'success', _ctx.n('--success')], [f.state === 'error', _ctx.n('--error')]))
90
93
  }, null, 2
91
94
  /* CLASS */
92
95
  )], 10
93
96
  /* CLASS, PROPS */
94
- , _hoisted_3)), [[_directive_ripple, {
97
+ , _hoisted_1)), [[_directive_ripple, {
95
98
  disabled: _ctx.disabled || _ctx.formDisabled || _ctx.readonly || _ctx.formReadonly || !_ctx.ripple
96
99
  }]]);
97
100
  }), 128
98
101
  /* KEYED_FRAGMENT */
99
102
  )), !_ctx.maxlength || _ctx.modelValue.length < _ctx.maxlength ? (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
100
103
  key: 0,
101
- class: (0, _vue.normalizeClass)(["var--relative", [!_ctx.$slots.default ? 'var-uploader__action var-elevation--2' : null, _ctx.disabled || _ctx.formDisabled ? 'var-uploader--disabled' : null]])
104
+ class: (0, _vue.normalizeClass)(_ctx.classes('var--relative', [!_ctx.$slots.default, _ctx.n('action') + " var-elevation--2"], [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')]))
102
105
  }, [(0, _vue.createElementVNode)("input", {
103
- class: "var-uploader__action-input",
106
+ class: (0, _vue.normalizeClass)(_ctx.n('action-input')),
104
107
  type: "file",
105
108
  multiple: _ctx.multiple,
106
109
  accept: _ctx.accept,
@@ -109,23 +112,27 @@ function render(_ctx, _cache) {
109
112
  onChange: _cache[0] || (_cache[0] = function () {
110
113
  return _ctx.handleChange && _ctx.handleChange(...arguments);
111
114
  })
112
- }, null, 40
113
- /* PROPS, HYDRATE_EVENTS */
114
- , _hoisted_7), (0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createVNode)(_component_var_icon, {
115
- class: "var-uploader__action-icon",
115
+ }, null, 42
116
+ /* CLASS, PROPS, HYDRATE_EVENTS */
117
+ , _hoisted_4), (0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createVNode)(_component_var_icon, {
118
+ class: (0, _vue.normalizeClass)(_ctx.n('action-icon')),
116
119
  "var-uploader-cover": "",
117
120
  name: "plus"
118
- })])], 2
121
+ }, null, 8
122
+ /* PROPS */
123
+ , ["class"])])], 2
119
124
  /* CLASS */
120
125
  )), [[_directive_ripple, {
121
126
  disabled: _ctx.disabled || _ctx.formDisabled || _ctx.readonly || _ctx.formReadonly || !_ctx.ripple || _ctx.$slots.default
122
- }]]) : (0, _vue.createCommentVNode)("v-if", true)]), (0, _vue.createVNode)(_component_var_form_details, {
127
+ }]]) : (0, _vue.createCommentVNode)("v-if", true)], 2
128
+ /* CLASS */
129
+ ), (0, _vue.createVNode)(_component_var_form_details, {
123
130
  "error-message": _ctx.errorMessage,
124
131
  "maxlength-text": _ctx.maxlengthText
125
132
  }, null, 8
126
133
  /* PROPS */
127
134
  , ["error-message", "maxlength-text"]), (0, _vue.createVNode)(_component_var_popup, {
128
- class: "var-uploader__preview",
135
+ class: (0, _vue.normalizeClass)(_ctx.n('preview')),
129
136
  "var-uploader-cover": "",
130
137
  position: "center",
131
138
  show: _ctx.showPreview,
@@ -137,7 +144,7 @@ function render(_ctx, _cache) {
137
144
 
138
145
  return [_ctx.currentPreview && _ctx.isHTMLSupportVideo((_ctx$currentPreview = _ctx.currentPreview) == null ? void 0 : _ctx$currentPreview.url) ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("video", {
139
146
  key: 0,
140
- class: "var-uploader__preview-video",
147
+ class: (0, _vue.normalizeClass)(_ctx.n('preview-video')),
141
148
  playsinline: "true",
142
149
  "webkit-playsinline": "true",
143
150
  "x5-playsinline": "true",
@@ -145,16 +152,18 @@ function render(_ctx, _cache) {
145
152
  "x5-video-player-fullscreen": "false",
146
153
  controls: "",
147
154
  src: (_ctx$currentPreview2 = _ctx.currentPreview) == null ? void 0 : _ctx$currentPreview2.url
148
- }, null, 8
149
- /* PROPS */
150
- , _hoisted_8)) : (0, _vue.createCommentVNode)("v-if", true)];
155
+ }, null, 10
156
+ /* CLASS, PROPS */
157
+ , _hoisted_5)) : (0, _vue.createCommentVNode)("v-if", true)];
151
158
  }),
152
159
  _: 1
153
160
  /* STABLE */
154
161
 
155
162
  }, 8
156
163
  /* PROPS */
157
- , ["show"])]);
164
+ , ["class", "show"])], 2
165
+ /* CLASS */
166
+ );
158
167
  }
159
168
 
160
169
  var _default = (0, _vue.defineComponent)({
@@ -284,8 +293,6 @@ var _default = (0, _vue.defineComponent)({
284
293
 
285
294
  var handleChange = /*#__PURE__*/function () {
286
295
  var _ref = _asyncToGenerator(function* (event) {
287
- var _props$onUpdateModel;
288
-
289
296
  var {
290
297
  maxsize,
291
298
  maxlength,
@@ -303,7 +310,7 @@ var _default = (0, _vue.defineComponent)({
303
310
  var getValidSizeVarFile = varFiles => {
304
311
  return varFiles.filter(varFile => {
305
312
  if (varFile.file.size > (0, _shared.toNumber)(maxsize)) {
306
- onOversize == null ? void 0 : onOversize((0, _vue.reactive)(varFile));
313
+ (0, _components.call)(onOversize, (0, _vue.reactive)(varFile));
307
314
  return false;
308
315
  }
309
316
 
@@ -335,9 +342,9 @@ var _default = (0, _vue.defineComponent)({
335
342
  } = _ref3;
336
343
  return varFile;
337
344
  });
338
- (_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, [...modelValue, ...validVarFiles]);
345
+ (0, _components.call)(props['onUpdate:modelValue'], [...modelValue, ...validVarFiles]);
339
346
  event.target.value = '';
340
- validVarFiles.forEach(varFile => onAfterRead == null ? void 0 : onAfterRead((0, _vue.reactive)(varFile)));
347
+ validVarFiles.forEach(varFile => (0, _components.call)(onAfterRead, (0, _vue.reactive)(varFile)));
341
348
  });
342
349
 
343
350
  return function handleChange(_x) {
@@ -347,8 +354,6 @@ var _default = (0, _vue.defineComponent)({
347
354
 
348
355
  var handleRemove = /*#__PURE__*/function () {
349
356
  var _ref4 = _asyncToGenerator(function* (removedVarFile) {
350
- var _props$onUpdateModel2;
351
-
352
357
  var {
353
358
  disabled,
354
359
  readonly,
@@ -366,9 +371,9 @@ var _default = (0, _vue.defineComponent)({
366
371
  }
367
372
 
368
373
  var expectedFiles = modelValue.filter(varFile => varFile !== removedVarFile);
369
- onRemove == null ? void 0 : onRemove(removedVarFile);
374
+ (0, _components.call)(onRemove, removedVarFile);
370
375
  validateWithTrigger('onRemove');
371
- (_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, expectedFiles);
376
+ (0, _components.call)(props['onUpdate:modelValue'], expectedFiles);
372
377
  });
373
378
 
374
379
  return function handleRemove(_x2) {
@@ -408,10 +413,8 @@ var _default = (0, _vue.defineComponent)({
408
413
 
409
414
 
410
415
  var reset = () => {
411
- var _props$onUpdateModel3;
412
-
413
416
  callReset = true;
414
- (_props$onUpdateModel3 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel3.call(props, []);
417
+ (0, _components.call)(props['onUpdate:modelValue'], []);
415
418
  resetValidation();
416
419
  };
417
420
 
@@ -420,7 +423,7 @@ var _default = (0, _vue.defineComponent)({
420
423
  resetValidation,
421
424
  reset
422
425
  };
423
- bindForm == null ? void 0 : bindForm(uploaderProvider);
426
+ (0, _components.call)(bindForm, uploaderProvider);
424
427
  (0, _vue.watch)(() => props.modelValue, () => {
425
428
  !callReset && validateWithTrigger('onChange');
426
429
  callReset = false;
@@ -428,6 +431,8 @@ var _default = (0, _vue.defineComponent)({
428
431
  deep: true
429
432
  });
430
433
  return {
434
+ n,
435
+ classes,
431
436
  files,
432
437
  showPreview,
433
438
  currentPreview,
@@ -2,6 +2,8 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.addRouteListener = addRouteListener;
5
+ exports.call = call;
6
+ exports.createNamespace = createNamespace;
5
7
  exports.exposeApis = exposeApis;
6
8
  exports.flatVNodes = flatVNodes;
7
9
  exports.keyInProvides = keyInProvides;
@@ -290,4 +292,41 @@ function exposeApis(apis) {
290
292
  if (instance) {
291
293
  Object.assign(instance.proxy, apis);
292
294
  }
295
+ }
296
+
297
+ function createNamespace(name) {
298
+ var namespace = "var-" + name;
299
+
300
+ var createBEM = suffix => {
301
+ if (!suffix) return namespace;
302
+ return suffix.startsWith('--') ? "" + namespace + suffix : namespace + "__" + suffix;
303
+ };
304
+
305
+ var classes = function () {
306
+ for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
307
+ classes[_key] = arguments[_key];
308
+ }
309
+
310
+ return classes.map(className => {
311
+ if ((0, _shared.isArray)(className)) {
312
+ var [condition, truthy, falsy = null] = className;
313
+ return condition ? truthy : falsy;
314
+ }
315
+
316
+ return className;
317
+ });
318
+ };
319
+
320
+ return {
321
+ n: createBEM,
322
+ classes
323
+ };
324
+ }
325
+
326
+ function call(fn) {
327
+ for (var _len2 = arguments.length, arg = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
328
+ arg[_key2 - 1] = arguments[_key2];
329
+ }
330
+
331
+ if (fn) return fn(...arg);
293
332
  }