@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
@@ -92,7 +92,7 @@
92
92
  padding: 0;
93
93
  }
94
94
 
95
- &-title {
95
+ &__title {
96
96
  padding: var(--date-picker-title-padding);
97
97
  color: var(--date-picker-title-color);
98
98
  background: var(--date-picker-title-background);
@@ -101,7 +101,7 @@
101
101
  flex-direction: column;
102
102
  flex-wrap: wrap;
103
103
 
104
- &__year {
104
+ &-year {
105
105
  opacity: 0.6;
106
106
  cursor: pointer;
107
107
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
@@ -117,7 +117,7 @@
117
117
  }
118
118
  }
119
119
 
120
- &__date {
120
+ &-date {
121
121
  height: var(--date-picker-title-date-height);
122
122
  overflow: hidden;
123
123
  font-size: var(--date-picker-title-date-font-size);
@@ -141,7 +141,7 @@
141
141
  }
142
142
  }
143
143
 
144
- &-body {
144
+ &__body {
145
145
  flex: 1;
146
146
  position: relative;
147
147
  overflow: auto;
@@ -198,28 +198,26 @@
198
198
  color: var(--date-picker-main-color);
199
199
  }
200
200
 
201
- &__button-disabled {
201
+ &__button--disabled {
202
202
  color: var(--color-text-disabled) !important;
203
203
  cursor: not-allowed;
204
204
  }
205
205
  }
206
206
 
207
207
  .var-year-picker {
208
- &__panel {
209
- width: 100%;
210
- height: 100%;
211
- font-weight: var(--year-picker-font-weight);
212
- padding: 0;
213
- margin: 0;
214
- list-style-type: none;
215
- overflow: auto;
216
- text-align: center;
208
+ width: 100%;
209
+ height: 100%;
210
+ font-weight: var(--year-picker-font-weight);
211
+ padding: 0;
212
+ margin: 0;
213
+ list-style-type: none;
214
+ overflow: auto;
215
+ text-align: center;
217
216
 
218
- li {
219
- padding: var(--year-picker-item-padding);
220
- cursor: pointer;
221
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
222
- }
217
+ &__item {
218
+ padding: var(--year-picker-item-padding);
219
+ cursor: pointer;
220
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
223
221
 
224
222
  &--active {
225
223
  font-size: var(--year-picker-item-active-font-size);
@@ -261,11 +259,15 @@
261
259
  font-size: var(--day-picker-content-item-button-font-size);
262
260
  }
263
261
 
262
+ &__button:not(.var-day-picker__button--usable) {
263
+ cursor: unset;
264
+ }
265
+
264
266
  &__button[var-date-picker-color-cover='true'] {
265
267
  color: var(--date-picker-main-color);
266
268
  }
267
269
 
268
- &__button-disabled {
270
+ &__button--disabled {
269
271
  color: var(--color-text-disabled) !important;
270
272
  cursor: not-allowed;
271
273
  }
@@ -20,6 +20,8 @@ var _props = require("../props");
20
20
 
21
21
  var _shared = require("../../utils/shared");
22
22
 
23
+ var _components = require("../../utils/components");
24
+
23
25
  var _locale = require("../../locale");
24
26
 
25
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -30,27 +32,24 @@ _dayjs.default.extend(_isSameOrBefore.default);
30
32
 
31
33
  _dayjs.default.extend(_isSameOrAfter.default);
32
34
 
33
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
34
-
35
- var _hoisted_1 = {
36
- class: "var-day-picker__panel"
37
- };
38
- var _hoisted_2 = {
39
- class: "var-day-picker__content"
40
- };
41
- var _hoisted_3 = {
42
- class: "var-day-picker__head"
43
- };
44
- var _hoisted_4 = {
45
- class: "var-day-picker__body"
46
- };
35
+ var {
36
+ n,
37
+ classes
38
+ } = (0, _components.createNamespace)('day-picker');
39
+ var {
40
+ n: nDate
41
+ } = (0, _components.createNamespace)('date-picker');
47
42
 
48
43
  function render(_ctx, _cache) {
49
44
  var _component_panel_header = (0, _vue.resolveComponent)("panel-header");
50
45
 
51
46
  var _component_var_button = (0, _vue.resolveComponent)("var-button");
52
47
 
53
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", _hoisted_2, [(0, _vue.createVNode)(_component_panel_header, {
48
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
49
+ class: (0, _vue.normalizeClass)(_ctx.n())
50
+ }, [(0, _vue.createElementVNode)("div", {
51
+ class: (0, _vue.normalizeClass)(_ctx.n('content'))
52
+ }, [(0, _vue.createVNode)(_component_panel_header, {
54
53
  ref: "headerEl",
55
54
  type: "day",
56
55
  date: _ctx.preview,
@@ -60,11 +59,13 @@ function render(_ctx, _cache) {
60
59
  }, null, 8
61
60
  /* PROPS */
62
61
  , ["date", "disabled", "onCheckPanel", "onCheckDate"]), (0, _vue.createVNode)(_vue.Transition, {
63
- name: "var-date-picker" + (_ctx.reverse ? '-reverse' : '') + "-translatex"
62
+ name: "" + _ctx.nDate() + (_ctx.reverse ? '-reverse' : '') + "-translatex"
64
63
  }, {
65
64
  default: (0, _vue.withCtx)(() => [((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
66
65
  key: _ctx.panelKey
67
- }, [(0, _vue.createElementVNode)("ul", _hoisted_3, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.sortWeekList, week => {
66
+ }, [(0, _vue.createElementVNode)("ul", {
67
+ class: (0, _vue.normalizeClass)(_ctx.n('head'))
68
+ }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.sortWeekList, week => {
68
69
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("li", {
69
70
  key: week.index
70
71
  }, (0, _vue.toDisplayString)(_ctx.getDayAbbr(week.index)), 1
@@ -72,14 +73,15 @@ function render(_ctx, _cache) {
72
73
  );
73
74
  }), 128
74
75
  /* KEYED_FRAGMENT */
75
- ))]), (0, _vue.createElementVNode)("ul", _hoisted_4, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.days, (day, index) => {
76
+ ))], 2
77
+ /* CLASS */
78
+ ), (0, _vue.createElementVNode)("ul", {
79
+ class: (0, _vue.normalizeClass)(_ctx.n('body'))
80
+ }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.days, (day, index) => {
76
81
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("li", {
77
82
  key: index
78
83
  }, [(0, _vue.createVNode)(_component_var_button, (0, _vue.mergeProps)({
79
84
  type: "primary",
80
- class: ["var-day-picker__button", {
81
- 'var-day-picker__button--usable': day > 0
82
- }],
83
85
  "var-day-picker-cover": "",
84
86
  round: "",
85
87
  ripple: false
@@ -94,16 +96,22 @@ function render(_ctx, _cache) {
94
96
 
95
97
  }, 1040
96
98
  /* FULL_PROPS, DYNAMIC_SLOTS */
97
- , ["class", "onClick"])]);
99
+ , ["onClick"])]);
98
100
  }), 128
99
101
  /* KEYED_FRAGMENT */
100
- ))])]))]),
102
+ ))], 2
103
+ /* CLASS */
104
+ )]))]),
101
105
  _: 1
102
106
  /* STABLE */
103
107
 
104
108
  }, 8
105
109
  /* PROPS */
106
- , ["name"])])]);
110
+ , ["name"])], 2
111
+ /* CLASS */
112
+ )], 2
113
+ /* CLASS */
114
+ );
107
115
  }
108
116
 
109
117
  var _default = (0, _vue.defineComponent)({
@@ -253,7 +261,8 @@ var _default = (0, _vue.defineComponent)({
253
261
  return {
254
262
  text: true,
255
263
  outline: false,
256
- textColor: ''
264
+ textColor: '',
265
+ class: n('button')
257
266
  };
258
267
  }
259
268
 
@@ -309,18 +318,16 @@ var _default = (0, _vue.defineComponent)({
309
318
  if (disabled) return '';
310
319
  if (computeOutline()) return color != null ? color : '';
311
320
  if (dayExist()) return '';
312
- return 'var-date-picker-color-cover';
321
+ return nDate() + "-color-cover";
313
322
  };
314
323
 
315
- var isCover = textColorOrCover().startsWith('var-date-picker');
324
+ var isCover = textColorOrCover().startsWith(nDate());
316
325
  return {
317
326
  text: computeText(),
318
327
  outline: computeOutline(),
319
328
  textColor: isCover ? '' : textColorOrCover(),
320
- 'var-date-picker-color-cover': isCover,
321
- class: {
322
- 'var-day-picker__button-disabled': disabled
323
- }
329
+ [nDate() + "-color-cover"]: isCover,
330
+ class: classes(n('button'), n('button--usable'), [disabled, n('button--disabled')])
324
331
  };
325
332
  };
326
333
 
@@ -332,7 +339,7 @@ var _default = (0, _vue.defineComponent)({
332
339
 
333
340
  var chooseDay = (day, event) => {
334
341
  var buttonEl = event.currentTarget;
335
- if (buttonEl.classList.contains('var-day-picker__button-disabled')) return;
342
+ if (buttonEl.classList.contains(n('button--disabled'))) return;
336
343
  emit('choose-day', day);
337
344
  }; // expose for internal
338
345
 
@@ -350,6 +357,8 @@ var _default = (0, _vue.defineComponent)({
350
357
  initHeader();
351
358
  });
352
359
  return {
360
+ n,
361
+ nDate,
353
362
  days,
354
363
  reverse,
355
364
  headerEl,
@@ -20,6 +20,8 @@ var _button = _interopRequireDefault(require("../../button"));
20
20
 
21
21
  var _shared = require("../../utils/shared");
22
22
 
23
+ var _components = require("../../utils/components");
24
+
23
25
  var _locale = require("../../locale");
24
26
 
25
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -30,21 +32,24 @@ _dayjs.default.extend(_isSameOrBefore.default);
30
32
 
31
33
  _dayjs.default.extend(_isSameOrAfter.default);
32
34
 
33
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
34
-
35
- var _hoisted_1 = {
36
- class: "var-month-picker__panel"
37
- };
38
- var _hoisted_2 = {
39
- class: "var-month-picker__content"
40
- };
35
+ var {
36
+ n,
37
+ classes
38
+ } = (0, _components.createNamespace)('month-picker');
39
+ var {
40
+ n: nDate
41
+ } = (0, _components.createNamespace)('date-picker');
41
42
 
42
43
  function render(_ctx, _cache) {
43
44
  var _component_panel_header = (0, _vue.resolveComponent)("panel-header");
44
45
 
45
46
  var _component_var_button = (0, _vue.resolveComponent)("var-button");
46
47
 
47
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createElementVNode)("div", _hoisted_2, [(0, _vue.createVNode)(_component_panel_header, {
48
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
49
+ class: (0, _vue.normalizeClass)(_ctx.n())
50
+ }, [(0, _vue.createElementVNode)("div", {
51
+ class: (0, _vue.normalizeClass)(_ctx.n('content'))
52
+ }, [(0, _vue.createVNode)(_component_panel_header, {
48
53
  ref: "headerEl",
49
54
  type: "month",
50
55
  date: _ctx.preview,
@@ -54,7 +59,7 @@ function render(_ctx, _cache) {
54
59
  }, null, 8
55
60
  /* PROPS */
56
61
  , ["date", "disabled", "onCheckPanel", "onCheckDate"]), (0, _vue.createVNode)(_vue.Transition, {
57
- name: "var-date-picker" + (_ctx.reverse ? '-reverse' : '') + "-translatex"
62
+ name: "" + _ctx.nDate() + (_ctx.reverse ? '-reverse' : '') + "-translatex"
58
63
  }, {
59
64
  default: (0, _vue.withCtx)(() => [((0, _vue.openBlock)(), (0, _vue.createElementBlock)("ul", {
60
65
  key: _ctx.panelKey
@@ -63,7 +68,6 @@ function render(_ctx, _cache) {
63
68
  key: month.index
64
69
  }, [(0, _vue.createVNode)(_component_var_button, (0, _vue.mergeProps)({
65
70
  type: "primary",
66
- class: "var-month-picker__button",
67
71
  "var-month-picker-cover": "",
68
72
  ripple: false
69
73
  }, _extends({}, _ctx.buttonProps(month.index)), {
@@ -86,7 +90,11 @@ function render(_ctx, _cache) {
86
90
 
87
91
  }, 8
88
92
  /* PROPS */
89
- , ["name"])])]);
93
+ , ["name"])], 2
94
+ /* CLASS */
95
+ )], 2
96
+ /* CLASS */
97
+ );
90
98
  }
91
99
 
92
100
  var _default = (0, _vue.defineComponent)({
@@ -235,25 +243,23 @@ var _default = (0, _vue.defineComponent)({
235
243
  if (disabled) return '';
236
244
  if (computeOutline()) return color != null ? color : '';
237
245
  if (monthExist()) return '';
238
- return 'var-date-picker-color-cover';
246
+ return nDate() + "-color-cover";
239
247
  };
240
248
 
241
- var isCover = textColorOrCover().startsWith('var-date-picker');
249
+ var isCover = textColorOrCover().startsWith(nDate());
242
250
  return {
243
251
  outline: computeOutline(),
244
252
  text: computeText(),
245
253
  color: !computeText() ? color : '',
246
254
  textColor: isCover ? '' : textColorOrCover(),
247
- 'var-date-picker-color-cover': isCover,
248
- class: {
249
- 'var-month-picker__button-disabled': disabled
250
- }
255
+ [nDate() + "-color-cover"]: isCover,
256
+ class: classes(n('button'), [disabled, n('button--disabled')])
251
257
  };
252
258
  };
253
259
 
254
260
  var chooseMonth = (month, event) => {
255
261
  var buttonEl = event.currentTarget;
256
- if (buttonEl.classList.contains('var-month-picker__button-disabled')) return;
262
+ if (buttonEl.classList.contains(n('button--disabled'))) return;
257
263
  emit('choose-month', month);
258
264
  };
259
265
 
@@ -281,6 +287,8 @@ var _default = (0, _vue.defineComponent)({
281
287
  immediate: true
282
288
  });
283
289
  return {
290
+ n,
291
+ nDate,
284
292
  pack: _locale.pack,
285
293
  MONTH_LIST: _props.MONTH_LIST,
286
294
  headerEl,
@@ -12,22 +12,24 @@ var _vue = require("vue");
12
12
 
13
13
  var _shared = require("../../utils/shared");
14
14
 
15
+ var _components = require("../../utils/components");
16
+
15
17
  var _locale = require("../../locale");
16
18
 
17
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
20
 
19
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
20
-
21
- var _hoisted_1 = {
22
- class: "var-picker-header"
23
- };
21
+ var {
22
+ n
23
+ } = (0, _components.createNamespace)('picker-header');
24
24
 
25
25
  function render(_ctx, _cache) {
26
26
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
27
27
 
28
28
  var _component_var_button = (0, _vue.resolveComponent)("var-button");
29
29
 
30
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createVNode)(_component_var_button, {
30
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
31
+ class: (0, _vue.normalizeClass)(_ctx.n())
32
+ }, [(0, _vue.createVNode)(_component_var_button, {
31
33
  round: "",
32
34
  text: "",
33
35
  style: {
@@ -45,7 +47,7 @@ function render(_ctx, _cache) {
45
47
  }, 8
46
48
  /* PROPS */
47
49
  , ["disabled"]), (0, _vue.createElementVNode)("div", {
48
- class: "var-picker-header__value",
50
+ class: (0, _vue.normalizeClass)(_ctx.n('value')),
49
51
  onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('check-panel'))
50
52
  }, [(0, _vue.createVNode)(_vue.Transition, {
51
53
  name: "var-date-picker" + (_ctx.reverse ? '-reverse' : '') + "-translatex"
@@ -60,7 +62,9 @@ function render(_ctx, _cache) {
60
62
 
61
63
  }, 8
62
64
  /* PROPS */
63
- , ["name"])]), (0, _vue.createVNode)(_component_var_button, {
65
+ , ["name"])], 2
66
+ /* CLASS */
67
+ ), (0, _vue.createVNode)(_component_var_button, {
64
68
  round: "",
65
69
  text: "",
66
70
  style: {
@@ -77,7 +81,9 @@ function render(_ctx, _cache) {
77
81
 
78
82
  }, 8
79
83
  /* PROPS */
80
- , ["disabled"])]);
84
+ , ["disabled"])], 2
85
+ /* CLASS */
86
+ );
81
87
  }
82
88
 
83
89
  var _default = (0, _vue.defineComponent)({
@@ -136,6 +142,7 @@ var _default = (0, _vue.defineComponent)({
136
142
  forwardOrBackNum.value = 0;
137
143
  });
138
144
  return {
145
+ n,
139
146
  reverse,
140
147
  showDate,
141
148
  checkDate
@@ -10,30 +10,38 @@ var _dayjs = _interopRequireDefault(require("dayjs"));
10
10
 
11
11
  var _shared = require("../../utils/shared");
12
12
 
13
+ var _components = require("../../utils/components");
14
+
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
 
17
+ var {
18
+ n,
19
+ classes
20
+ } = (0, _components.createNamespace)('year-picker');
21
+
15
22
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
16
23
 
17
- var _hoisted_1 = {
18
- class: "var-year-picker__panel"
19
- };
20
- var _hoisted_2 = ["onClick"];
24
+ var _hoisted_1 = ["onClick"];
21
25
 
22
26
  function render(_ctx, _cache) {
23
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("ul", _hoisted_1, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.yearList, year => {
27
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("ul", {
28
+ class: (0, _vue.normalizeClass)(_ctx.n())
29
+ }, [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.yearList, year => {
24
30
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("li", {
25
31
  key: year,
26
- class: (0, _vue.normalizeClass)([year === _ctx.toNumber(_ctx.preview) ? 'var-year-picker__panel--active' : null]),
32
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('item'), [year === _ctx.toNumber(_ctx.preview), _ctx.n('item--active')])),
27
33
  style: (0, _vue.normalizeStyle)({
28
34
  color: year === _ctx.toNumber(_ctx.preview) ? _ctx.componentProps.color : ''
29
35
  }),
30
36
  onClick: $event => _ctx.chooseYear(year)
31
37
  }, (0, _vue.toDisplayString)(year), 15
32
38
  /* TEXT, CLASS, STYLE, PROPS */
33
- , _hoisted_2);
39
+ , _hoisted_1);
34
40
  }), 128
35
41
  /* KEYED_FRAGMENT */
36
- ))]);
42
+ ))], 2
43
+ /* CLASS */
44
+ );
37
45
  }
38
46
 
39
47
  var _default = (0, _vue.defineComponent)({
@@ -94,12 +102,14 @@ var _default = (0, _vue.defineComponent)({
94
102
  };
95
103
 
96
104
  (0, _vue.onMounted)(() => {
97
- var activeEl = document.querySelector('.var-year-picker__panel--active');
105
+ var activeEl = document.querySelector("." + n('item--active'));
98
106
  activeEl == null ? void 0 : activeEl.scrollIntoView({
99
107
  block: 'center'
100
108
  });
101
109
  });
102
110
  return {
111
+ n,
112
+ classes,
103
113
  yearList,
104
114
  chooseYear,
105
115
  toNumber: _shared.toNumber
@@ -16,16 +16,14 @@ var _shared = require("../utils/shared");
16
16
 
17
17
  var _locale = require("../locale");
18
18
 
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+ var _components = require("../utils/components");
20
20
 
21
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
22
 
23
- var _hoisted_1 = {
24
- class: "var-dialog__title"
25
- };
26
- var _hoisted_2 = {
27
- class: "var-dialog__actions"
28
- };
23
+ var {
24
+ n,
25
+ classes
26
+ } = (0, _components.createNamespace)('dialog');
29
27
 
30
28
  function render(_ctx, _cache) {
31
29
  var _component_var_button = (0, _vue.resolveComponent)("var-button");
@@ -33,7 +31,7 @@ function render(_ctx, _cache) {
33
31
  var _component_var_popup = (0, _vue.resolveComponent)("var-popup");
34
32
 
35
33
  return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_popup, {
36
- class: "var-dialog__popup",
34
+ class: (0, _vue.normalizeClass)(_ctx.n('popup')),
37
35
  "var-dialog-cover": "",
38
36
  show: _ctx.popupShow,
39
37
  overlay: _ctx.overlay,
@@ -50,22 +48,28 @@ function render(_ctx, _cache) {
50
48
  onClickOverlay: _ctx.handleClickOverlay
51
49
  }, {
52
50
  default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
53
- class: ["var--box var-dialog", _ctx.dialogClass],
51
+ class: _ctx.classes('var--box', _ctx.n(), _ctx.dialogClass),
54
52
  style: _ctx.dialogStyle
55
- }, _ctx.$attrs), [(0, _vue.createElementVNode)("div", _hoisted_1, [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.dialogTitle)), 1
53
+ }, _ctx.$attrs), [(0, _vue.createElementVNode)("div", {
54
+ class: (0, _vue.normalizeClass)(_ctx.n('title'))
55
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.dialogTitle)), 1
56
56
  /* TEXT */
57
- )])]), (0, _vue.createElementVNode)("div", {
58
- class: "var-dialog__message",
57
+ )])], 2
58
+ /* CLASS */
59
+ ), (0, _vue.createElementVNode)("div", {
60
+ class: (0, _vue.normalizeClass)(_ctx.n('message')),
59
61
  style: (0, _vue.normalizeStyle)({
60
62
  textAlign: _ctx.messageAlign
61
63
  })
62
64
  }, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.message), 1
63
65
  /* TEXT */
64
- )])], 4
65
- /* STYLE */
66
- ), (0, _vue.createElementVNode)("div", _hoisted_2, [_ctx.cancelButton ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_button, {
66
+ )])], 6
67
+ /* CLASS, STYLE */
68
+ ), (0, _vue.createElementVNode)("div", {
69
+ class: (0, _vue.normalizeClass)(_ctx.n('actions'))
70
+ }, [_ctx.cancelButton ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_button, {
67
71
  key: 0,
68
- class: "var-dialog__button var-dialog__cancel-button",
72
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('button'), _ctx.n('cancel-button'))),
69
73
  "var-dialog-cover": "",
70
74
  text: "",
71
75
  "text-color": _ctx.cancelButtonTextColor,
@@ -80,9 +84,9 @@ function render(_ctx, _cache) {
80
84
 
81
85
  }, 8
82
86
  /* PROPS */
83
- , ["text-color", "color", "onClick"])) : (0, _vue.createCommentVNode)("v-if", true), _ctx.confirmButton ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_button, {
87
+ , ["class", "text-color", "color", "onClick"])) : (0, _vue.createCommentVNode)("v-if", true), _ctx.confirmButton ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_button, {
84
88
  key: 1,
85
- class: "var-dialog__button var-dialog__confirm-button",
89
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('button'), _ctx.n('confirm-button'))),
86
90
  "var-dialog-cover": "",
87
91
  text: "",
88
92
  "text-color": _ctx.confirmButtonTextColor,
@@ -97,7 +101,9 @@ function render(_ctx, _cache) {
97
101
 
98
102
  }, 8
99
103
  /* PROPS */
100
- , ["text-color", "color", "onClick"])) : (0, _vue.createCommentVNode)("v-if", true)])], 16
104
+ , ["class", "text-color", "color", "onClick"])) : (0, _vue.createCommentVNode)("v-if", true)], 2
105
+ /* CLASS */
106
+ )], 16
101
107
  /* FULL_PROPS */
102
108
  )]),
103
109
  _: 3
@@ -105,7 +111,7 @@ function render(_ctx, _cache) {
105
111
 
106
112
  }, 8
107
113
  /* PROPS */
108
- , ["show", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange", "onClickOverlay"]);
114
+ , ["class", "show", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange", "onClickOverlay"]);
109
115
  }
110
116
 
111
117
  var _default = (0, _vue.defineComponent)({
@@ -122,21 +128,15 @@ var _default = (0, _vue.defineComponent)({
122
128
  var popupShow = (0, _vue.ref)(false);
123
129
  var popupCloseOnClickOverlay = (0, _vue.ref)(false);
124
130
 
125
- var done = () => {
126
- var _props$onUpdateShow;
127
-
128
- return (_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, false);
129
- };
131
+ var done = () => (0, _components.call)(props['onUpdate:show'], false);
130
132
 
131
133
  var handleClickOverlay = () => {
132
- var _props$onUpdateShow2;
133
-
134
134
  var {
135
135
  closeOnClickOverlay,
136
136
  onClickOverlay,
137
137
  onBeforeClose
138
138
  } = props;
139
- onClickOverlay == null ? void 0 : onClickOverlay();
139
+ (0, _components.call)(onClickOverlay);
140
140
 
141
141
  if (!closeOnClickOverlay) {
142
142
  return;
@@ -147,41 +147,37 @@ var _default = (0, _vue.defineComponent)({
147
147
  return;
148
148
  }
149
149
 
150
- (_props$onUpdateShow2 = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow2.call(props, false);
150
+ (0, _components.call)(props['onUpdate:show'], false);
151
151
  };
152
152
 
153
153
  var confirm = () => {
154
- var _props$onUpdateShow3;
155
-
156
154
  var {
157
155
  onBeforeClose,
158
156
  onConfirm
159
157
  } = props;
160
- onConfirm == null ? void 0 : onConfirm();
158
+ (0, _components.call)(onConfirm);
161
159
 
162
160
  if (onBeforeClose != null) {
163
161
  onBeforeClose('confirm', done);
164
162
  return;
165
163
  }
166
164
 
167
- (_props$onUpdateShow3 = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow3.call(props, false);
165
+ (0, _components.call)(props['onUpdate:show'], false);
168
166
  };
169
167
 
170
168
  var cancel = () => {
171
- var _props$onUpdateShow4;
172
-
173
169
  var {
174
170
  onBeforeClose,
175
171
  onCancel
176
172
  } = props;
177
- onCancel == null ? void 0 : onCancel();
173
+ (0, _components.call)(onCancel);
178
174
 
179
175
  if (onBeforeClose != null) {
180
176
  onBeforeClose('cancel', done);
181
177
  return;
182
178
  }
183
179
 
184
- (_props$onUpdateShow4 = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow4.call(props, false);
180
+ (0, _components.call)(props['onUpdate:show'], false);
185
181
  };
186
182
 
187
183
  (0, _vue.watch)(() => props.show, newValue => {
@@ -200,6 +196,8 @@ var _default = (0, _vue.defineComponent)({
200
196
  immediate: true
201
197
  });
202
198
  return {
199
+ n,
200
+ classes,
203
201
  pack: _locale.pack,
204
202
  dt: _shared.dt,
205
203
  popupShow,