@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
@@ -107,6 +107,54 @@
107
107
  "type": "string",
108
108
  "description": "自定义徽标中图标的内容(优先级高于 `value`) 默认值:-"
109
109
  },
110
+ "var-bottom-navigation/v-model": {
111
+ "type": "number | string",
112
+ "description": "选中标签的名称或者索引值 默认值:0"
113
+ },
114
+ "var-bottom-navigation/fixed": {
115
+ "type": "boolean",
116
+ "description": "是否固定在底部 默认值:false"
117
+ },
118
+ "var-bottom-navigation/border": {
119
+ "type": "boolean",
120
+ "description": "是否显示外边框 默认值:false"
121
+ },
122
+ "var-bottom-navigation/z-index": {
123
+ "type": "number | string",
124
+ "description": "元素 z-index 默认值:1"
125
+ },
126
+ "var-bottom-navigation/active-color": {
127
+ "type": "string",
128
+ "description": "选中标签的颜色 默认值:-"
129
+ },
130
+ "var-bottom-navigation/inactive-color": {
131
+ "type": "string",
132
+ "description": "未选中标签的颜色 默认值:-"
133
+ },
134
+ "var-bottom-navigation/fab-props": {
135
+ "type": "ButtonProps",
136
+ "description": "悬浮按钮属性 默认值:{type: \"primary\"}"
137
+ },
138
+ "var-bottom-navigation-item/name": {
139
+ "type": "string",
140
+ "description": "标签名称,作为匹配的标识符 默认值:-"
141
+ },
142
+ "var-bottom-navigation-item/icon": {
143
+ "type": "string",
144
+ "description": "图标名称,等同于 Icon 组件的 [name 属性](/#/zh-CN/icon) 默认值:-"
145
+ },
146
+ "var-bottom-navigation-item/label": {
147
+ "type": "string",
148
+ "description": "标签文字内容 默认值:-"
149
+ },
150
+ "var-bottom-navigation-item/namespace": {
151
+ "type": "string",
152
+ "description": "图标的命名空间, 可扩展自定义图标库,等同于 Icon 组件的 [namespace 属性](/#/zh-CN/icon) 默认值:var-icon"
153
+ },
154
+ "var-bottom-navigation-item/badge": {
155
+ "type": "boolean | BadgeProps",
156
+ "description": "图标右上角徽标 默认值:false"
157
+ },
110
158
  "var-button/type": {
111
159
  "type": "string",
112
160
  "description": "类型,可选值为 `default` `primary` `info` `success` `warning` `danger` 默认值:default"
@@ -42,6 +42,26 @@
42
42
  "icon"
43
43
  ]
44
44
  },
45
+ "var-bottom-navigation": {
46
+ "attributes": [
47
+ "v-model",
48
+ "fixed",
49
+ "border",
50
+ "z-index",
51
+ "active-color",
52
+ "inactive-color",
53
+ "fab-props"
54
+ ]
55
+ },
56
+ "var-bottom-navigation-item": {
57
+ "attributes": [
58
+ "name",
59
+ "icon",
60
+ "label",
61
+ "namespace",
62
+ "badge"
63
+ ]
64
+ },
45
65
  "var-button": {
46
66
  "attributes": [
47
67
  "type",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "1.26.7",
4
+ "version": "1.26.9",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -339,6 +339,160 @@
339
339
  }
340
340
  ]
341
341
  },
342
+ {
343
+ "name": "var-bottom-navigation",
344
+ "attributes": [
345
+ {
346
+ "name": "v-model",
347
+ "description": "选中标签的名称或者索引值",
348
+ "default": "0",
349
+ "value": {
350
+ "type": "number | string",
351
+ "kind": "expression"
352
+ }
353
+ },
354
+ {
355
+ "name": "fixed",
356
+ "description": "是否固定在底部",
357
+ "default": "false",
358
+ "value": {
359
+ "type": "boolean",
360
+ "kind": "expression"
361
+ }
362
+ },
363
+ {
364
+ "name": "border",
365
+ "description": "是否显示外边框",
366
+ "default": "false",
367
+ "value": {
368
+ "type": "boolean",
369
+ "kind": "expression"
370
+ }
371
+ },
372
+ {
373
+ "name": "z-index",
374
+ "description": "元素 z-index",
375
+ "default": "1",
376
+ "value": {
377
+ "type": "number | string",
378
+ "kind": "expression"
379
+ }
380
+ },
381
+ {
382
+ "name": "active-color",
383
+ "description": "选中标签的颜色",
384
+ "default": "-",
385
+ "value": {
386
+ "type": "string",
387
+ "kind": "expression"
388
+ }
389
+ },
390
+ {
391
+ "name": "inactive-color",
392
+ "description": "未选中标签的颜色",
393
+ "default": "-",
394
+ "value": {
395
+ "type": "string",
396
+ "kind": "expression"
397
+ }
398
+ },
399
+ {
400
+ "name": "fab-props",
401
+ "description": "悬浮按钮属性",
402
+ "default": "{type: \"primary\"}",
403
+ "value": {
404
+ "type": "ButtonProps",
405
+ "kind": "expression"
406
+ }
407
+ }
408
+ ],
409
+ "events": [
410
+ {
411
+ "name": "before-change",
412
+ "description": "切换标签前的回调函数,返回 false 可阻止切换,支持返回 Promise"
413
+ },
414
+ {
415
+ "name": "change",
416
+ "description": "切换标签时触发"
417
+ },
418
+ {
419
+ "name": "fab-click",
420
+ "description": "悬浮按钮点击时触发"
421
+ }
422
+ ],
423
+ "slots": [
424
+ {
425
+ "name": "fab",
426
+ "description": "支持在组件中心插入一个自定义的 fab 按钮"
427
+ }
428
+ ]
429
+ },
430
+ {
431
+ "name": "var-bottom-navigation-item",
432
+ "attributes": [
433
+ {
434
+ "name": "name",
435
+ "description": "标签名称,作为匹配的标识符",
436
+ "default": "-",
437
+ "value": {
438
+ "type": "string",
439
+ "kind": "expression"
440
+ }
441
+ },
442
+ {
443
+ "name": "icon",
444
+ "description": "图标名称,等同于 Icon 组件的 [name 属性](/#/zh-CN/icon)",
445
+ "default": "-",
446
+ "value": {
447
+ "type": "string",
448
+ "kind": "expression"
449
+ }
450
+ },
451
+ {
452
+ "name": "label",
453
+ "description": "标签文字内容",
454
+ "default": "-",
455
+ "value": {
456
+ "type": "string",
457
+ "kind": "expression"
458
+ }
459
+ },
460
+ {
461
+ "name": "namespace",
462
+ "description": "图标的命名空间, 可扩展自定义图标库,等同于 Icon 组件的 [namespace 属性](/#/zh-CN/icon)",
463
+ "default": "var-icon",
464
+ "value": {
465
+ "type": "string",
466
+ "kind": "expression"
467
+ }
468
+ },
469
+ {
470
+ "name": "badge",
471
+ "description": "图标右上角徽标",
472
+ "default": "false",
473
+ "value": {
474
+ "type": "boolean | BadgeProps",
475
+ "kind": "expression"
476
+ }
477
+ }
478
+ ],
479
+ "events": [
480
+ {
481
+ "name": "click",
482
+ "description": "点击时触发"
483
+ }
484
+ ],
485
+ "slots": [
486
+ {
487
+ "name": "default",
488
+ "description": "自定义标签文字内容,会覆盖 `label` 的内容"
489
+ },
490
+ {
491
+ "name": "icon",
492
+ "description": "自定义图标"
493
+ }
494
+ ]
495
+ },
342
496
  {
343
497
  "name": "var-button",
344
498
  "attributes": [
@@ -18,17 +18,18 @@ var _shared = require("../utils/shared");
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)('action-sheet');
29
+
23
30
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
24
31
 
25
- var _hoisted_1 = {
26
- class: "var-action-sheet__title"
27
- };
28
- var _hoisted_2 = ["onClick"];
29
- var _hoisted_3 = {
30
- class: "var-action-sheet__action-name"
31
- };
32
+ var _hoisted_1 = ["onClick"];
32
33
 
33
34
  function render(_ctx, _cache) {
34
35
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
@@ -38,7 +39,7 @@ function render(_ctx, _cache) {
38
39
  var _directive_ripple = (0, _vue.resolveDirective)("ripple");
39
40
 
40
41
  return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_popup, (0, _vue.mergeProps)({
41
- class: "var-action-sheet__popup-radius",
42
+ class: _ctx.n('popup-radius'),
42
43
  position: "bottom",
43
44
  overlay: _ctx.overlay,
44
45
  "overlay-class": _ctx.overlayClass,
@@ -48,11 +49,7 @@ function render(_ctx, _cache) {
48
49
  teleport: _ctx.teleport,
49
50
  show: _ctx.popupShow
50
51
  }, {
51
- 'onUpdate:show': value => {
52
- var _ctx$$props$onUpdate, _ctx$$props;
53
-
54
- return (_ctx$$props$onUpdate = (_ctx$$props = _ctx.$props)['onUpdate:show']) == null ? void 0 : _ctx$$props$onUpdate.call(_ctx$$props, value);
55
- }
52
+ 'onUpdate:show': _ctx.handlePopupUpdateShow
56
53
  }, {
57
54
  onOpen: _ctx.onOpen,
58
55
  onClose: _ctx.onClose,
@@ -61,12 +58,14 @@ function render(_ctx, _cache) {
61
58
  onRouteChange: _ctx.onRouteChange
62
59
  }), {
63
60
  default: (0, _vue.withCtx)(() => [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
64
- class: "var-action-sheet var--box"
65
- }, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", _hoisted_1, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.actionSheetTitle)), 1
66
- /* TEXT */
61
+ class: _ctx.classes(_ctx.n(), 'var--box')
62
+ }, _ctx.$attrs), [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createElementVNode)("div", {
63
+ class: (0, _vue.normalizeClass)(_ctx.n('title'))
64
+ }, (0, _vue.toDisplayString)(_ctx.dt(_ctx.title, _ctx.pack.actionSheetTitle)), 3
65
+ /* TEXT, CLASS */
67
66
  )]), (0, _vue.renderSlot)(_ctx.$slots, "actions", {}, () => [((0, _vue.openBlock)(true), (0, _vue.createElementBlock)(_vue.Fragment, null, (0, _vue.renderList)(_ctx.actions, action => {
68
67
  return (0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
69
- class: (0, _vue.normalizeClass)(["var-action-sheet__action-item", [action.className, action.disabled ? 'var-action-sheet--disabled' : null]]),
68
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('action-item'), action.className, [action.disabled, _ctx.n('--disabled')])),
70
69
  key: action.name,
71
70
  style: (0, _vue.normalizeStyle)({
72
71
  color: action.color
@@ -74,17 +73,19 @@ function render(_ctx, _cache) {
74
73
  onClick: $event => _ctx.handleSelect(action)
75
74
  }, [action.icon ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_icon, {
76
75
  key: 0,
77
- class: "var-action-sheet__action-icon",
76
+ class: (0, _vue.normalizeClass)(_ctx.n('action-icon')),
78
77
  "var-action-sheet-cover": "",
79
78
  name: action.icon,
80
79
  size: action.iconSize
81
80
  }, null, 8
82
81
  /* PROPS */
83
- , ["name", "size"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", _hoisted_3, (0, _vue.toDisplayString)(action.name), 1
84
- /* TEXT */
82
+ , ["class", "name", "size"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
83
+ class: (0, _vue.normalizeClass)(_ctx.n('action-name'))
84
+ }, (0, _vue.toDisplayString)(action.name), 3
85
+ /* TEXT, CLASS */
85
86
  )], 14
86
87
  /* CLASS, STYLE, PROPS */
87
- , _hoisted_2)), [[_directive_ripple, {
88
+ , _hoisted_1)), [[_directive_ripple, {
88
89
  disabled: action.disabled
89
90
  }]]);
90
91
  }), 128
@@ -97,7 +98,7 @@ function render(_ctx, _cache) {
97
98
 
98
99
  }, 16
99
100
  /* FULL_PROPS */
100
- , ["overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "show", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
101
+ , ["class", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "show", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]);
101
102
  }
102
103
 
103
104
  var _default = (0, _vue.defineComponent)({
@@ -117,8 +118,6 @@ var _default = (0, _vue.defineComponent)({
117
118
  var popupShow = (0, _vue.ref)(false);
118
119
 
119
120
  var handleSelect = action => {
120
- var _props$onUpdateShow;
121
-
122
121
  if (action.disabled) {
123
122
  return;
124
123
  }
@@ -127,16 +126,21 @@ var _default = (0, _vue.defineComponent)({
127
126
  closeOnClickAction,
128
127
  onSelect
129
128
  } = props;
130
- onSelect == null ? void 0 : onSelect(action);
131
- closeOnClickAction && ((_props$onUpdateShow = props['onUpdate:show']) == null ? void 0 : _props$onUpdateShow.call(props, false));
129
+ (0, _components.call)(onSelect, action);
130
+ closeOnClickAction && (0, _components.call)(props['onUpdate:show'], false);
132
131
  };
133
132
 
133
+ var handlePopupUpdateShow = value => (0, _components.call)(props['onUpdate:show'], value);
134
+
134
135
  (0, _vue.watch)(() => props.show, newValue => {
135
136
  popupShow.value = newValue;
136
137
  }, {
137
138
  immediate: true
138
139
  });
139
140
  return {
141
+ n,
142
+ classes,
143
+ handlePopupUpdateShow,
140
144
  popupShow,
141
145
  pack: _locale.pack,
142
146
  dt: _shared.dt,
@@ -8,51 +8,56 @@ var _vue = require("vue");
8
8
 
9
9
  var _props = require("./props");
10
10
 
11
- var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
11
+ var _components = require("../utils/components");
12
12
 
13
- var _hoisted_1 = {
14
- class: "var-app-bar__left"
15
- };
16
- var _hoisted_2 = {
17
- key: 0,
18
- class: "var-app-bar__title"
19
- };
20
- var _hoisted_3 = {
21
- class: "var-app-bar__right"
22
- };
13
+ var {
14
+ n,
15
+ classes
16
+ } = (0, _components.createNamespace)('app-bar');
23
17
 
24
18
  function render(_ctx, _cache) {
25
19
  return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
26
- class: (0, _vue.normalizeClass)(["var-app-bar", {
27
- 'var-elevation--3': _ctx.elevation
28
- }]),
20
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.elevation, 'var-elevation--3'])),
29
21
  style: (0, _vue.normalizeStyle)({
30
22
  background: _ctx.color,
31
23
  color: _ctx.textColor
32
24
  })
33
- }, [(0, _vue.createElementVNode)("div", _hoisted_1, [(0, _vue.renderSlot)(_ctx.$slots, "left"), _ctx.titlePosition === 'left' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
25
+ }, [(0, _vue.createElementVNode)("div", {
26
+ class: (0, _vue.normalizeClass)(_ctx.n('left'))
27
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "left"), _ctx.titlePosition === 'left' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
34
28
  key: 0,
35
- class: "var-app-bar__title",
29
+ class: (0, _vue.normalizeClass)(_ctx.n('title')),
36
30
  style: (0, _vue.normalizeStyle)({
37
31
  paddingLeft: _ctx.paddingLeft
38
32
  })
39
33
  }, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
40
34
  /* TEXT */
41
- )])], 4
42
- /* STYLE */
43
- )) : (0, _vue.createCommentVNode)("v-if", true)]), _ctx.titlePosition === 'center' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_2, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
35
+ )])], 6
36
+ /* CLASS, STYLE */
37
+ )) : (0, _vue.createCommentVNode)("v-if", true)], 2
38
+ /* CLASS */
39
+ ), _ctx.titlePosition === 'center' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
40
+ key: 0,
41
+ class: (0, _vue.normalizeClass)(_ctx.n('title'))
42
+ }, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
44
43
  /* TEXT */
45
- )])])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", _hoisted_3, [_ctx.titlePosition === 'right' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
44
+ )])], 2
45
+ /* CLASS */
46
+ )) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
47
+ class: (0, _vue.normalizeClass)(_ctx.n('right'))
48
+ }, [_ctx.titlePosition === 'right' ? ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
46
49
  key: 0,
47
- class: "var-app-bar__title",
50
+ class: (0, _vue.normalizeClass)(_ctx.n('title')),
48
51
  style: (0, _vue.normalizeStyle)({
49
52
  paddingRight: _ctx.paddingRight
50
53
  })
51
54
  }, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
52
55
  /* TEXT */
53
- )])], 4
54
- /* STYLE */
55
- )) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.renderSlot)(_ctx.$slots, "right")])], 6
56
+ )])], 6
57
+ /* CLASS, STYLE */
58
+ )) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.renderSlot)(_ctx.$slots, "right")], 2
59
+ /* CLASS */
60
+ )], 6
56
61
  /* CLASS, STYLE */
57
62
  );
58
63
  }
@@ -77,6 +82,8 @@ var _default = (0, _vue.defineComponent)({
77
82
  (0, _vue.onMounted)(computePadding);
78
83
  (0, _vue.onUpdated)(computePadding);
79
84
  return {
85
+ n,
86
+ classes,
80
87
  paddingLeft,
81
88
  paddingRight
82
89
  };
@@ -16,8 +16,15 @@ var _shared = require("../utils/shared");
16
16
 
17
17
  var _elements = require("../utils/elements");
18
18
 
19
+ var _components = require("../utils/components");
20
+
19
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
22
 
23
+ var {
24
+ n,
25
+ classes
26
+ } = (0, _components.createNamespace)('back-top');
27
+
21
28
  function render(_ctx, _cache) {
22
29
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
23
30
 
@@ -27,7 +34,7 @@ function render(_ctx, _cache) {
27
34
  to: "body",
28
35
  disabled: _ctx.disabled
29
36
  }, [(0, _vue.createElementVNode)("div", {
30
- class: (0, _vue.normalizeClass)(["var-back-top", [_ctx.show ? 'var-back-top--active' : null]]),
37
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.show, _ctx.n('--active')])),
31
38
  ref: "backTopEl",
32
39
  style: (0, _vue.normalizeStyle)({
33
40
  right: _ctx.toSizeUnit(_ctx.right),
@@ -70,7 +77,7 @@ var _default = (0, _vue.defineComponent)({
70
77
  var target;
71
78
 
72
79
  var click = event => {
73
- props.onClick == null ? void 0 : props.onClick(event);
80
+ (0, _components.call)(props.onClick, event);
74
81
  var left = (0, _elements.getScrollLeft)(target);
75
82
  (0, _elements.scrollTo)(target, {
76
83
  left,
@@ -117,6 +124,8 @@ var _default = (0, _vue.defineComponent)({
117
124
  show,
118
125
  backTopEl,
119
126
  toSizeUnit: _elements.toSizeUnit,
127
+ n,
128
+ classes,
120
129
  click
121
130
  };
122
131
  }
@@ -12,25 +12,31 @@ var _props = require("./props");
12
12
 
13
13
  var _shared = require("../utils/shared");
14
14
 
15
+ var _components = require("../utils/components");
16
+
15
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
18
 
19
+ var {
20
+ n,
21
+ classes
22
+ } = (0, _components.createNamespace)('badge');
23
+
17
24
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
18
25
 
19
26
  var _hoisted_1 = {
20
- class: "var-badge var--box"
21
- };
22
- var _hoisted_2 = {
23
27
  key: 1
24
28
  };
25
29
 
26
30
  function render(_ctx, _cache) {
27
31
  var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
28
32
 
29
- return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", _hoisted_1, [(0, _vue.createVNode)(_vue.Transition, {
33
+ return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
34
+ class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box'))
35
+ }, [(0, _vue.createVNode)(_vue.Transition, {
30
36
  name: "var-badge-fade"
31
37
  }, {
32
38
  default: (0, _vue.withCtx)(() => [(0, _vue.withDirectives)((0, _vue.createElementVNode)("span", (0, _vue.mergeProps)(_ctx.$attrs, {
33
- class: ["var-badge__content", _ctx.contentClass],
39
+ class: _ctx.classes(_ctx.n('content'), ..._ctx.contentClass),
34
40
  style: {
35
41
  background: _ctx.color
36
42
  }
@@ -40,7 +46,7 @@ function render(_ctx, _cache) {
40
46
  size: "10px"
41
47
  }, null, 8
42
48
  /* PROPS */
43
- , ["name"])) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_2, (0, _vue.toDisplayString)(_ctx.values), 1
49
+ , ["name"])) : ((0, _vue.openBlock)(), (0, _vue.createElementBlock)("span", _hoisted_1, (0, _vue.toDisplayString)(_ctx.values), 1
44
50
  /* TEXT */
45
51
  ))], 16
46
52
  /* FULL_PROPS */
@@ -48,7 +54,9 @@ function render(_ctx, _cache) {
48
54
  _: 1
49
55
  /* STABLE */
50
56
 
51
- }), (0, _vue.renderSlot)(_ctx.$slots, "default")]);
57
+ }), (0, _vue.renderSlot)(_ctx.$slots, "default")], 2
58
+ /* CLASS */
59
+ );
52
60
  }
53
61
 
54
62
  var _default = (0, _vue.defineComponent)({
@@ -71,11 +79,11 @@ var _default = (0, _vue.defineComponent)({
71
79
  dot,
72
80
  icon
73
81
  } = props;
74
- var positionBasic = slots.default && "var-badge__position var-badge--" + position;
75
- var dotClass = dot && 'var-badge__dot';
82
+ var positionBasic = slots.default && n('position') + " " + n("--" + position);
83
+ var dotClass = dot && n('dot');
76
84
  var positionClass = getPositionClass();
77
- var iconClass = icon && 'var-badge__icon';
78
- return ["var-badge--" + type, positionBasic, dotClass, positionClass, iconClass];
85
+ var iconClass = icon ? n('icon') : null;
86
+ return [n("--" + type), positionBasic, dotClass, positionClass, iconClass];
79
87
  });
80
88
  var values = (0, _vue.computed)(() => {
81
89
  var {
@@ -93,11 +101,13 @@ var _default = (0, _vue.defineComponent)({
93
101
  position,
94
102
  dot
95
103
  } = props;
96
- if (dot && position.includes('right')) return 'var-badge__dot--right';
97
- if (dot && position.includes('left')) return 'var-badge__dot--left';
104
+ if (dot && position.includes('right')) return n('dot--right');
105
+ if (dot && position.includes('left')) return n('dot--left');
98
106
  };
99
107
 
100
108
  return {
109
+ n,
110
+ classes,
101
111
  values,
102
112
  contentClass
103
113
  };