@varlet/ui 1.26.9 → 1.27.0-alpha.1649265140569

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 (247) hide show
  1. package/README.en-US.md +1 -1
  2. package/README.md +1 -1
  3. package/es/action-sheet/ActionSheet.js +29 -27
  4. package/es/app-bar/AppBar.js +32 -27
  5. package/es/back-top/BackTop.js +9 -2
  6. package/es/badge/Badge.js +22 -14
  7. package/es/bottom-navigation/BottomNavigation.js +204 -0
  8. package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
  9. package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
  10. package/es/bottom-navigation/bottomNavigation.css +1 -0
  11. package/es/bottom-navigation/bottomNavigation.less +51 -0
  12. package/es/bottom-navigation/index.js +8 -0
  13. package/es/bottom-navigation/props.js +40 -0
  14. package/es/bottom-navigation/provide.js +17 -0
  15. package/es/bottom-navigation/style/index.js +4 -0
  16. package/es/bottom-navigation/style/less.js +4 -0
  17. package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
  18. package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
  19. package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  20. package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
  21. package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
  22. package/es/bottom-navigation-item/index.js +8 -0
  23. package/es/bottom-navigation-item/props.js +22 -0
  24. package/es/bottom-navigation-item/provide.js +21 -0
  25. package/es/bottom-navigation-item/style/index.js +6 -0
  26. package/es/bottom-navigation-item/style/less.js +6 -0
  27. package/es/button/Button.js +12 -5
  28. package/es/card/Card.js +33 -28
  29. package/es/cell/Cell.js +26 -15
  30. package/es/checkbox/Checkbox.js +28 -26
  31. package/es/checkbox-group/CheckboxGroup.js +21 -25
  32. package/es/chip/Chip.js +16 -7
  33. package/es/chip/chip.css +1 -1
  34. package/es/chip/chip.less +11 -11
  35. package/es/col/Col.js +12 -5
  36. package/es/collapse/Collapse.js +15 -12
  37. package/es/collapse-item/CollapseItem.js +31 -30
  38. package/es/collapse-item/collapseItem.css +1 -1
  39. package/es/collapse-item/collapseItem.less +16 -16
  40. package/es/countdown/Countdown.js +14 -11
  41. package/es/counter/Counter.js +30 -27
  42. package/es/date-picker/DatePicker.js +28 -23
  43. package/es/date-picker/date-picker.css +1 -1
  44. package/es/date-picker/date-picker.less +22 -20
  45. package/es/date-picker/src/day-picker-panel.js +41 -34
  46. package/es/date-picker/src/month-picker-panel.js +27 -21
  47. package/es/date-picker/src/panel-header.js +16 -11
  48. package/es/date-picker/src/year-picker-panel.js +17 -9
  49. package/es/dialog/Dialog.js +36 -40
  50. package/es/divider/Divider.js +16 -12
  51. package/es/form/Form.js +11 -8
  52. package/es/form-details/FormDetails.js +27 -22
  53. package/es/icon/Icon.js +8 -1
  54. package/es/image/Image.js +19 -12
  55. package/es/image-preview/ImagePreview.js +35 -34
  56. package/es/index-anchor/IndexAnchor.js +8 -1
  57. package/es/index-bar/IndexBar.js +22 -20
  58. package/es/index.js +10 -0
  59. package/es/input/Input.js +45 -44
  60. package/es/lazy/index.js +2 -1
  61. package/es/less.js +2 -0
  62. package/es/list/List.js +39 -38
  63. package/es/loading/Loading.js +31 -23
  64. package/es/loading/loading.css +1 -1
  65. package/es/loading/loading.less +32 -32
  66. package/es/menu/Menu.js +12 -10
  67. package/es/option/Option.js +16 -11
  68. package/es/pagination/Pagination.js +34 -44
  69. package/es/pagination/pagination.css +1 -1
  70. package/es/pagination/pagination.less +8 -8
  71. package/es/picker/Picker.js +51 -47
  72. package/es/popup/Popup.js +9 -5
  73. package/es/progress/Progress.js +44 -35
  74. package/es/progress/progress.css +1 -1
  75. package/es/progress/progress.less +12 -12
  76. package/es/pull-refresh/PullRefresh.js +13 -10
  77. package/es/radio/Radio.js +25 -25
  78. package/es/radio-group/RadioGroup.js +19 -19
  79. package/es/rate/Rate.js +27 -25
  80. package/es/ripple/index.js +6 -2
  81. package/es/row/Row.js +11 -4
  82. package/es/select/Select.js +53 -54
  83. package/es/skeleton/Skeleton.js +70 -81
  84. package/es/slider/Slider.js +44 -40
  85. package/es/slider/slider.css +1 -1
  86. package/es/slider/slider.less +5 -5
  87. package/es/snackbar/Snackbar.js +9 -5
  88. package/es/snackbar/core.js +20 -26
  89. package/es/snackbar/snackbar.css +1 -1
  90. package/es/snackbar/snackbar.less +66 -68
  91. package/es/snackbar/style/index.js +1 -1
  92. package/es/snackbar/style/less.js +1 -1
  93. package/es/space/Space.js +8 -3
  94. package/es/step/Step.js +25 -23
  95. package/es/step/step.css +1 -1
  96. package/es/step/step.less +10 -10
  97. package/es/steps/Steps.js +12 -5
  98. package/es/sticky/Sticky.js +14 -7
  99. package/es/style-provider/StyleProvider.js +6 -2
  100. package/es/style.css +1 -1
  101. package/es/style.js +2 -0
  102. package/es/swipe/Swipe.js +22 -16
  103. package/es/swipe-item/SwipeItem.js +9 -4
  104. package/es/switch/Switch.js +25 -23
  105. package/es/switch/switch.css +1 -1
  106. package/es/switch/switch.less +2 -2
  107. package/es/tab/Tab.js +8 -1
  108. package/es/tab-item/TabItem.js +8 -1
  109. package/es/table/Table.js +27 -20
  110. package/es/tabs/Tabs.js +23 -14
  111. package/es/tabs-items/TabsItems.js +10 -5
  112. package/es/themes/dark/bottomNavigation.js +4 -0
  113. package/es/themes/dark/bottomNavigationItem.js +3 -0
  114. package/es/themes/dark/index.js +3 -1
  115. package/es/time-picker/TimePicker.js +47 -38
  116. package/es/time-picker/clock.js +26 -22
  117. package/es/time-picker/timePicker.css +1 -1
  118. package/es/time-picker/timePicker.less +11 -11
  119. package/es/umdIndex.js +10 -0
  120. package/es/uploader/Uploader.js +62 -57
  121. package/es/utils/components.js +35 -0
  122. package/es/varlet.esm.js +2093 -1504
  123. package/highlight/attributes.json +48 -0
  124. package/highlight/tags.json +20 -0
  125. package/highlight/web-types.json +155 -1
  126. package/lib/action-sheet/ActionSheet.js +30 -26
  127. package/lib/app-bar/AppBar.js +31 -24
  128. package/lib/back-top/BackTop.js +11 -2
  129. package/lib/badge/Badge.js +23 -13
  130. package/lib/bottom-navigation/BottomNavigation.js +221 -0
  131. package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
  132. package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
  133. package/lib/bottom-navigation/bottomNavigation.css +1 -0
  134. package/lib/bottom-navigation/bottomNavigation.less +51 -0
  135. package/lib/bottom-navigation/index.js +17 -0
  136. package/lib/bottom-navigation/props.js +45 -0
  137. package/lib/bottom-navigation/provide.js +27 -0
  138. package/lib/bottom-navigation/style/index.js +4 -0
  139. package/lib/bottom-navigation/style/less.js +4 -0
  140. package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
  141. package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
  142. package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
  143. package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
  144. package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
  145. package/lib/bottom-navigation-item/index.js +17 -0
  146. package/lib/bottom-navigation-item/props.js +27 -0
  147. package/lib/bottom-navigation-item/provide.js +28 -0
  148. package/lib/bottom-navigation-item/style/index.js +6 -0
  149. package/lib/bottom-navigation-item/style/less.js +6 -0
  150. package/lib/button/Button.js +13 -4
  151. package/lib/card/Card.js +34 -27
  152. package/lib/cell/Cell.js +26 -13
  153. package/lib/checkbox/Checkbox.js +26 -23
  154. package/lib/checkbox-group/CheckboxGroup.js +19 -22
  155. package/lib/chip/Chip.js +18 -7
  156. package/lib/chip/chip.css +1 -1
  157. package/lib/chip/chip.less +11 -11
  158. package/lib/col/Col.js +14 -5
  159. package/lib/collapse/Collapse.js +15 -10
  160. package/lib/collapse-item/CollapseItem.js +31 -28
  161. package/lib/collapse-item/collapseItem.css +1 -1
  162. package/lib/collapse-item/collapseItem.less +16 -16
  163. package/lib/countdown/Countdown.js +14 -10
  164. package/lib/counter/Counter.js +29 -26
  165. package/lib/date-picker/DatePicker.js +30 -23
  166. package/lib/date-picker/date-picker.css +1 -1
  167. package/lib/date-picker/date-picker.less +22 -20
  168. package/lib/date-picker/src/day-picker-panel.js +41 -32
  169. package/lib/date-picker/src/month-picker-panel.js +27 -19
  170. package/lib/date-picker/src/panel-header.js +16 -9
  171. package/lib/date-picker/src/year-picker-panel.js +19 -9
  172. package/lib/dialog/Dialog.js +36 -38
  173. package/lib/divider/Divider.js +16 -10
  174. package/lib/form/Form.js +11 -6
  175. package/lib/form-details/FormDetails.js +27 -20
  176. package/lib/icon/Icon.js +10 -1
  177. package/lib/image/Image.js +20 -11
  178. package/lib/image-preview/ImagePreview.js +35 -33
  179. package/lib/index-anchor/IndexAnchor.js +10 -1
  180. package/lib/index-bar/IndexBar.js +24 -20
  181. package/lib/index.js +6 -0
  182. package/lib/input/Input.js +45 -43
  183. package/lib/lazy/index.js +3 -1
  184. package/lib/less.js +2 -0
  185. package/lib/list/List.js +39 -36
  186. package/lib/loading/Loading.js +33 -23
  187. package/lib/loading/loading.css +1 -1
  188. package/lib/loading/loading.less +32 -32
  189. package/lib/menu/Menu.js +12 -9
  190. package/lib/option/Option.js +16 -9
  191. package/lib/pagination/Pagination.js +36 -44
  192. package/lib/pagination/pagination.css +1 -1
  193. package/lib/pagination/pagination.less +8 -8
  194. package/lib/picker/Picker.js +51 -46
  195. package/lib/popup/Popup.js +9 -4
  196. package/lib/progress/Progress.js +45 -34
  197. package/lib/progress/progress.css +1 -1
  198. package/lib/progress/progress.less +12 -12
  199. package/lib/pull-refresh/PullRefresh.js +14 -10
  200. package/lib/radio/Radio.js +23 -22
  201. package/lib/radio-group/RadioGroup.js +17 -16
  202. package/lib/rate/Rate.js +27 -24
  203. package/lib/ripple/index.js +7 -2
  204. package/lib/row/Row.js +12 -3
  205. package/lib/select/Select.js +53 -53
  206. package/lib/skeleton/Skeleton.js +69 -78
  207. package/lib/slider/Slider.js +42 -38
  208. package/lib/slider/slider.css +1 -1
  209. package/lib/slider/slider.less +5 -5
  210. package/lib/snackbar/Snackbar.js +9 -4
  211. package/lib/snackbar/core.js +20 -25
  212. package/lib/snackbar/snackbar.css +1 -1
  213. package/lib/snackbar/snackbar.less +66 -68
  214. package/lib/space/Space.js +9 -3
  215. package/lib/step/Step.js +26 -22
  216. package/lib/step/step.css +1 -1
  217. package/lib/step/step.less +10 -10
  218. package/lib/steps/Steps.js +13 -4
  219. package/lib/sticky/Sticky.js +15 -6
  220. package/lib/style-provider/StyleProvider.js +8 -2
  221. package/lib/style.css +1 -1
  222. package/lib/style.js +2 -0
  223. package/lib/swipe/Swipe.js +23 -16
  224. package/lib/swipe-item/SwipeItem.js +10 -3
  225. package/lib/switch/Switch.js +23 -20
  226. package/lib/switch/switch.css +1 -1
  227. package/lib/switch/switch.less +2 -2
  228. package/lib/tab/Tab.js +10 -1
  229. package/lib/tab-item/TabItem.js +10 -1
  230. package/lib/table/Table.js +27 -18
  231. package/lib/tabs/Tabs.js +25 -14
  232. package/lib/tabs-items/TabsItems.js +11 -4
  233. package/lib/themes/dark/bottomNavigation.js +9 -0
  234. package/lib/themes/dark/bottomNavigationItem.js +8 -0
  235. package/lib/themes/dark/index.js +5 -1
  236. package/lib/time-picker/TimePicker.js +49 -38
  237. package/lib/time-picker/clock.js +26 -20
  238. package/lib/time-picker/timePicker.css +1 -1
  239. package/lib/time-picker/timePicker.less +11 -11
  240. package/lib/uploader/Uploader.js +60 -55
  241. package/lib/utils/components.js +39 -0
  242. package/package.json +5 -5
  243. package/types/bottomNavigation.d.ts +19 -0
  244. package/types/bottomNavigationItem.d.ts +16 -0
  245. package/types/global.d.ts +2 -0
  246. package/types/index.d.ts +2 -0
  247. package/umd/varlet.js +4 -4
@@ -3,16 +3,14 @@ import VarFormDetails from '../form-details';
3
3
  import Ripple from '../ripple';
4
4
  import { defineComponent, ref, computed, watch, nextTick } from 'vue';
5
5
  import { props } from './props';
6
- import { useValidation } from '../utils/components';
6
+ import { useValidation, createNamespace, call } from '../utils/components';
7
7
  import { useCheckboxGroup } from './provide';
8
8
  import { useForm } from '../form/provide';
9
- import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
10
-
11
- var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
12
-
13
- var _hoisted_1 = {
14
- class: "var-checkbox"
15
- };
9
+ var {
10
+ n,
11
+ classes
12
+ } = createNamespace('checkbox');
13
+ import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode } from "vue";
16
14
  export function render(_ctx, _cache) {
17
15
  var _component_var_icon = _resolveComponent("var-icon");
18
16
 
@@ -21,19 +19,21 @@ export function render(_ctx, _cache) {
21
19
  var _directive_ripple = _resolveDirective("ripple");
22
20
 
23
21
  return _openBlock(), _createElementBlock("div", {
24
- class: "var-checkbox__wrap",
22
+ class: _normalizeClass(_ctx.n('wrap')),
25
23
  onClick: _cache[0] || (_cache[0] = function () {
26
24
  return _ctx.handleClick && _ctx.handleClick(...arguments);
27
25
  })
28
- }, [_createElementVNode("div", _hoisted_1, [_withDirectives((_openBlock(), _createElementBlock("div", {
29
- class: _normalizeClass(["var-checkbox__action", [_ctx.checked ? 'var-checkbox--checked' : 'var-checkbox--unchecked', _ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? 'var-checkbox--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-checkbox--disabled' : null]]),
26
+ }, [_createElementVNode("div", {
27
+ class: _normalizeClass(_ctx.n())
28
+ }, [_withDirectives((_openBlock(), _createElementBlock("div", {
29
+ class: _normalizeClass(_ctx.classes(_ctx.n('action'), [_ctx.checked, _ctx.n('--checked'), _ctx.n('--unchecked')], [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
30
30
  style: _normalizeStyle({
31
31
  color: _ctx.checked ? _ctx.checkedColor : _ctx.uncheckedColor
32
32
  })
33
33
  }, [_ctx.checked ? _renderSlot(_ctx.$slots, "checked-icon", {
34
34
  key: 0
35
35
  }, () => [_createVNode(_component_var_icon, {
36
- class: _normalizeClass(["var-checkbox__icon", [_ctx.withAnimation ? 'var-checkbox--with-animation' : null]]),
36
+ class: _normalizeClass(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
37
37
  name: "checkbox-marked",
38
38
  size: _ctx.iconSize,
39
39
  "var-checkbox-cover": ""
@@ -42,7 +42,7 @@ export function render(_ctx, _cache) {
42
42
  , ["class", "size"])]) : _renderSlot(_ctx.$slots, "unchecked-icon", {
43
43
  key: 1
44
44
  }, () => [_createVNode(_component_var_icon, {
45
- class: _normalizeClass(["var-checkbox__icon", [_ctx.withAnimation ? 'var-checkbox--with-animation' : null]]),
45
+ class: _normalizeClass(_ctx.classes(_ctx.n('icon'), [_ctx.withAnimation, _ctx.n('--with-animation')])),
46
46
  name: "checkbox-blank-outline",
47
47
  size: _ctx.iconSize,
48
48
  "var-checkbox-cover": ""
@@ -53,14 +53,18 @@ export function render(_ctx, _cache) {
53
53
  )), [[_directive_ripple, {
54
54
  disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
55
55
  }]]), _createElementVNode("div", {
56
- class: _normalizeClass(["var-checkbox__text", [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage ? 'var-checkbox--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-checkbox--disabled' : null]])
56
+ class: _normalizeClass(_ctx.classes(_ctx.n('text'), [_ctx.errorMessage || _ctx.checkboxGroupErrorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')]))
57
57
  }, [_renderSlot(_ctx.$slots, "default")], 2
58
58
  /* CLASS */
59
- )]), _createVNode(_component_var_form_details, {
59
+ )], 2
60
+ /* CLASS */
61
+ ), _createVNode(_component_var_form_details, {
60
62
  "error-message": _ctx.errorMessage
61
63
  }, null, 8
62
64
  /* PROPS */
63
- , ["error-message"])]);
65
+ , ["error-message"])], 2
66
+ /* CLASS */
67
+ );
64
68
  }
65
69
  export default defineComponent({
66
70
  render,
@@ -107,15 +111,13 @@ export default defineComponent({
107
111
  };
108
112
 
109
113
  var change = changedValue => {
110
- var _props$onUpdateModel;
111
-
112
114
  value.value = changedValue;
113
115
  var {
114
116
  checkedValue,
115
117
  onChange
116
118
  } = props;
117
- (_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, value.value);
118
- onChange == null ? void 0 : onChange(value.value);
119
+ call(props['onUpdate:modelValue'], value.value);
120
+ call(onChange, value.value);
119
121
  validateWithTrigger('onChange');
120
122
  changedValue === checkedValue ? checkboxGroup == null ? void 0 : checkboxGroup.onChecked(checkedValue) : checkboxGroup == null ? void 0 : checkboxGroup.onUnchecked(checkedValue);
121
123
  };
@@ -133,7 +135,7 @@ export default defineComponent({
133
135
  return;
134
136
  }
135
137
 
136
- onClick == null ? void 0 : onClick(e);
138
+ call(onClick, e);
137
139
 
138
140
  if (form != null && form.readonly.value || readonly) {
139
141
  return;
@@ -163,9 +165,7 @@ export default defineComponent({
163
165
 
164
166
 
165
167
  var reset = () => {
166
- var _props$onUpdateModel2;
167
-
168
- (_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, props.uncheckedValue);
168
+ call(props['onUpdate:modelValue'], props.uncheckedValue);
169
169
  resetValidation();
170
170
  }; // expose
171
171
 
@@ -201,8 +201,8 @@ export default defineComponent({
201
201
  reset,
202
202
  resetWithAnimation
203
203
  };
204
- bindCheckboxGroup == null ? void 0 : bindCheckboxGroup(checkboxProvider);
205
- bindForm == null ? void 0 : bindForm(checkboxProvider);
204
+ call(bindCheckboxGroup, checkboxProvider);
205
+ call(bindForm, checkboxProvider);
206
206
  return {
207
207
  withAnimation,
208
208
  checked,
@@ -210,6 +210,8 @@ export default defineComponent({
210
210
  checkboxGroupErrorMessage: checkboxGroup == null ? void 0 : checkboxGroup.errorMessage,
211
211
  formDisabled: form == null ? void 0 : form.disabled,
212
212
  formReadonly: form == null ? void 0 : form.readonly,
213
+ n,
214
+ classes,
213
215
  handleClick,
214
216
  toggle,
215
217
  reset,
@@ -1,29 +1,31 @@
1
1
  import VarFormDetails from '../form-details';
2
2
  import { defineComponent, computed, watch, nextTick } from 'vue';
3
3
  import { props } from './props';
4
- import { useValidation } from '../utils/components';
4
+ import { useValidation, createNamespace, call } from '../utils/components';
5
5
  import { useCheckboxes } from './provide';
6
6
  import { useForm } from '../form/provide';
7
7
  import { uniq } from '../utils/shared';
8
- import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
-
10
- var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
11
-
12
- var _hoisted_1 = {
13
- class: "var-checkbox-group__wrap"
14
- };
8
+ var {
9
+ n,
10
+ classes
11
+ } = createNamespace('checkbox-group');
12
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
15
13
  export function render(_ctx, _cache) {
16
14
  var _component_var_form_details = _resolveComponent("var-form-details");
17
15
 
18
- return _openBlock(), _createElementBlock("div", _hoisted_1, [_createElementVNode("div", {
19
- class: _normalizeClass(["var-checkbox-group", ["var-checkbox-group--" + _ctx.direction]])
16
+ return _openBlock(), _createElementBlock("div", {
17
+ class: _normalizeClass(_ctx.n('wrap'))
18
+ }, [_createElementVNode("div", {
19
+ class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("--" + _ctx.direction)))
20
20
  }, [_renderSlot(_ctx.$slots, "default")], 2
21
21
  /* CLASS */
22
22
  ), _createVNode(_component_var_form_details, {
23
23
  "error-message": _ctx.errorMessage
24
24
  }, null, 8
25
25
  /* PROPS */
26
- , ["error-message"])]);
26
+ , ["error-message"])], 2
27
+ /* CLASS */
28
+ );
27
29
  }
28
30
  export default defineComponent({
29
31
  render,
@@ -65,10 +67,8 @@ export default defineComponent({
65
67
  };
66
68
 
67
69
  var change = changedModelValue => {
68
- var _props$onUpdateModel;
69
-
70
- (_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, changedModelValue);
71
- props.onChange == null ? void 0 : props.onChange(changedModelValue);
70
+ call(props['onUpdate:modelValue'], changedModelValue);
71
+ call(props.onChange, changedModelValue);
72
72
  validateWithTrigger('onChange');
73
73
  };
74
74
 
@@ -107,8 +107,6 @@ export default defineComponent({
107
107
 
108
108
 
109
109
  var checkAll = () => {
110
- var _props$onUpdateModel2;
111
-
112
110
  var checkedValues = checkboxes.map(_ref2 => {
113
111
  var {
114
112
  checkedValue
@@ -117,14 +115,12 @@ export default defineComponent({
117
115
  });
118
116
  var changedModelValue = uniq(checkedValues);
119
117
  resetWithAnimation();
120
- (_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, changedModelValue);
118
+ call(props['onUpdate:modelValue'], changedModelValue);
121
119
  return changedModelValue;
122
120
  }; // expose
123
121
 
124
122
 
125
123
  var inverseAll = () => {
126
- var _props$onUpdateModel3;
127
-
128
124
  var checkedValues = checkboxes.filter(_ref3 => {
129
125
  var {
130
126
  checked
@@ -138,15 +134,13 @@ export default defineComponent({
138
134
  });
139
135
  var changedModelValue = uniq(checkedValues);
140
136
  resetWithAnimation();
141
- (_props$onUpdateModel3 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel3.call(props, changedModelValue);
137
+ call(props['onUpdate:modelValue'], changedModelValue);
142
138
  return changedModelValue;
143
139
  }; // expose
144
140
 
145
141
 
146
142
  var reset = () => {
147
- var _props$onUpdateModel4;
148
-
149
- (_props$onUpdateModel4 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel4.call(props, []);
143
+ call(props['onUpdate:modelValue'], []);
150
144
  resetValidation();
151
145
  }; // expose
152
146
 
@@ -168,9 +162,11 @@ export default defineComponent({
168
162
  errorMessage: checkboxGroupErrorMessage
169
163
  };
170
164
  bindCheckboxes(checkboxGroupProvider);
171
- bindForm == null ? void 0 : bindForm(checkboxGroupProvider);
165
+ call(bindForm, checkboxGroupProvider);
172
166
  return {
173
167
  errorMessage,
168
+ n,
169
+ classes,
174
170
  checkAll,
175
171
  inverseAll,
176
172
  reset,
package/es/chip/Chip.js CHANGED
@@ -1,6 +1,11 @@
1
1
  import VarIcon from '../icon';
2
2
  import { defineComponent, computed } from 'vue';
3
3
  import { props } from './props';
4
+ import { createNamespace } from '../utils/components';
5
+ var {
6
+ n,
7
+ classes
8
+ } = createNamespace('chip');
4
9
  import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock } from "vue";
5
10
  export function render(_ctx, _cache) {
6
11
  var _component_var_icon = _resolveComponent("var-icon");
@@ -9,15 +14,15 @@ export function render(_ctx, _cache) {
9
14
  name: "var-fade"
10
15
  }, {
11
16
  default: _withCtx(() => [_createElementVNode("span", _mergeProps({
12
- class: ["var-chip var--box", _ctx.contentClass],
17
+ class: _ctx.classes(_ctx.n(), 'var--box', ..._ctx.contentClass),
13
18
  style: _ctx.chipStyles
14
19
  }, _ctx.$attrs), [_renderSlot(_ctx.$slots, "left"), _createElementVNode("span", {
15
- class: _normalizeClass(["var-chip--text-" + _ctx.size])
20
+ class: _normalizeClass(_ctx.n("text-" + _ctx.size))
16
21
  }, [_renderSlot(_ctx.$slots, "default")], 2
17
22
  /* CLASS */
18
23
  ), _renderSlot(_ctx.$slots, "right"), _ctx.closable ? (_openBlock(), _createElementBlock("span", {
19
24
  key: 0,
20
- class: "var-chip--close",
25
+ class: _normalizeClass(_ctx.n('--close')),
21
26
  onClick: _cache[0] || (_cache[0] = function () {
22
27
  return _ctx.onClose && _ctx.onClose(...arguments);
23
28
  })
@@ -25,7 +30,9 @@ export function render(_ctx, _cache) {
25
30
  name: "" + (_ctx.iconName ? _ctx.iconName : 'close-circle')
26
31
  }, null, 8
27
32
  /* PROPS */
28
- , ["name"])])) : _createCommentVNode("v-if", true)], 16
33
+ , ["name"])], 2
34
+ /* CLASS */
35
+ )) : _createCommentVNode("v-if", true)], 16
29
36
  /* FULL_PROPS */
30
37
  )]),
31
38
  _: 3
@@ -71,11 +78,13 @@ export default defineComponent({
71
78
  round
72
79
  } = props;
73
80
  var blockClass = block ? 'var--flex' : 'var--inline-flex';
74
- var plainTypeClass = plain ? "var-chip--plain var-chip--plain-" + type : "var-chip--" + type;
75
- var roundClass = round && 'var-chip--round';
76
- return ["var-chip--" + size, blockClass, plainTypeClass, roundClass];
81
+ var plainTypeClass = plain ? n('plain') + " " + n("plain-" + type) : n("--" + type);
82
+ var roundClass = round ? n('--round') : null;
83
+ return [n("--" + size), blockClass, plainTypeClass, roundClass];
77
84
  });
78
85
  return {
86
+ n,
87
+ classes,
79
88
  chipStyles,
80
89
  contentClass
81
90
  };
package/es/chip/chip.css CHANGED
@@ -1 +1 @@
1
- :root { --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary); --chip-danger-color: var(--color-danger); --chip-success-color: var(--color-success); --chip-warning-color: var(--color-warning); --chip-info-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0px 10px; --chip-large-padding: 0px 17px; --chip-small-padding: 0px 6px; --chip-mini-padding: 0px 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px;}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; line-height: 1; transition: background-color 0.25s;}.var-chip--default { color: inherit; background: var(--chip-default-color);}.var-chip--primary { color: #fff; background-color: var(--chip-primary-color);}.var-chip--info { color: #fff; background-color: var(--chip-info-color);}.var-chip--success { color: #fff; background-color: var(--chip-success-color);}.var-chip--warning { color: #fff; background-color: var(--chip-warning-color);}.var-chip--danger { color: #fff; background-color: var(--chip-danger-color);}.var-chip--plain { background-color: transparent;}.var-chip--plain:active { box-shadow: none;}.var-chip--plain-default { color: inherit; border-color: currentColor;}.var-chip--plain-primary { color: var(--chip-primary-color); border-color: currentColor;}.var-chip--plain-info { color: var(--chip-info-color); border-color: currentColor;}.var-chip--plain-success { color: var(--chip-success-color); border-color: currentColor;}.var-chip--plain-warning { color: var(--chip-warning-color); border-color: currentColor;}.var-chip--plain-danger { color: var(--chip-danger-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--font-size-md); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--font-size-lg); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--font-size-sm); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--font-size-xs); height: var(--chip-mini-height);}.var-chip--close { cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-chip--text-large { margin: var(--chip-text-large-margin);}.var-chip--text-normal { margin: var(--chip-text-normal-margin);}.var-chip--text-small { margin: var(--chip-text-small-margin);}.var-chip--text-mini { margin: var(--chip-text-mini-margin);}
1
+ :root { --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary); --chip-danger-color: var(--color-danger); --chip-success-color: var(--color-success); --chip-warning-color: var(--color-warning); --chip-info-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0px 10px; --chip-large-padding: 0px 17px; --chip-small-padding: 0px 6px; --chip-mini-padding: 0px 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px;}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; line-height: 1; transition: background-color 0.25s;}.var-chip--default { color: inherit; background: var(--chip-default-color);}.var-chip--primary { color: #fff; background-color: var(--chip-primary-color);}.var-chip--info { color: #fff; background-color: var(--chip-info-color);}.var-chip--success { color: #fff; background-color: var(--chip-success-color);}.var-chip--warning { color: #fff; background-color: var(--chip-warning-color);}.var-chip--danger { color: #fff; background-color: var(--chip-danger-color);}.var-chip__plain { background-color: transparent;}.var-chip__plain:active { box-shadow: none;}.var-chip__plain-default { color: inherit; border-color: currentColor;}.var-chip__plain-primary { color: var(--chip-primary-color); border-color: currentColor;}.var-chip__plain-info { color: var(--chip-info-color); border-color: currentColor;}.var-chip__plain-success { color: var(--chip-success-color); border-color: currentColor;}.var-chip__plain-warning { color: var(--chip-warning-color); border-color: currentColor;}.var-chip__plain-danger { color: var(--chip-danger-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--font-size-md); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--font-size-lg); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--font-size-sm); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--font-size-xs); height: var(--chip-mini-height);}.var-chip--close { cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-chip__text-large { margin: var(--chip-text-large-margin);}.var-chip__text-normal { margin: var(--chip-text-normal-margin);}.var-chip__text-small { margin: var(--chip-text-small-margin);}.var-chip__text-mini { margin: var(--chip-text-mini-margin);}
package/es/chip/chip.less CHANGED
@@ -93,7 +93,7 @@
93
93
  background-color: var(--chip-danger-color);
94
94
  }
95
95
 
96
- &--plain {
96
+ &__plain {
97
97
  background-color: transparent;
98
98
 
99
99
  &:active {
@@ -101,32 +101,32 @@
101
101
  }
102
102
  }
103
103
 
104
- &--plain-default {
104
+ &__plain-default {
105
105
  color: inherit;
106
106
  border-color: currentColor;
107
107
  }
108
108
 
109
- &--plain-primary {
109
+ &__plain-primary {
110
110
  color: var(--chip-primary-color);
111
111
  border-color: currentColor;
112
112
  }
113
113
 
114
- &--plain-info {
114
+ &__plain-info {
115
115
  color: var(--chip-info-color);
116
116
  border-color: currentColor;
117
117
  }
118
118
 
119
- &--plain-success {
119
+ &__plain-success {
120
120
  color: var(--chip-success-color);
121
121
  border-color: currentColor;
122
122
  }
123
123
 
124
- &--plain-warning {
124
+ &__plain-warning {
125
125
  color: var(--chip-warning-color);
126
126
  border-color: currentColor;
127
127
  }
128
128
 
129
- &--plain-danger {
129
+ &__plain-danger {
130
130
  color: var(--chip-danger-color);
131
131
  border-color: currentColor;
132
132
  }
@@ -164,19 +164,19 @@
164
164
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
165
165
  }
166
166
 
167
- &--text-large {
167
+ &__text-large {
168
168
  margin: var(--chip-text-large-margin);
169
169
  }
170
170
 
171
- &--text-normal {
171
+ &__text-normal {
172
172
  margin: var(--chip-text-normal-margin);
173
173
  }
174
174
 
175
- &--text-small {
175
+ &__text-small {
176
176
  margin: var(--chip-text-small-margin);
177
177
  }
178
178
 
179
- &--text-mini {
179
+ &__text-mini {
180
180
  margin: var(--chip-text-mini-margin);
181
181
  }
182
182
  }
package/es/col/Col.js CHANGED
@@ -3,10 +3,15 @@ import { isPlainObject, toNumber } from '../utils/shared';
3
3
  import { props } from './props';
4
4
  import { useRow } from './provide';
5
5
  import { toSizeUnit } from '../utils/elements';
6
+ import { createNamespace, call } from '../utils/components';
7
+ var {
8
+ n,
9
+ classes
10
+ } = createNamespace('col');
6
11
  import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
7
12
  export function render(_ctx, _cache) {
8
13
  return _openBlock(), _createElementBlock("div", {
9
- class: _normalizeClass(["var-col var--box", [_ctx.span ? "var-col--span-" + _ctx.span : null, _ctx.offset ? "var-col--offset-" + _ctx.offset : null, ..._ctx.getSize('xs', _ctx.xs), ..._ctx.getSize('sm', _ctx.sm), ..._ctx.getSize('md', _ctx.md), ..._ctx.getSize('lg', _ctx.lg), ..._ctx.getSize('xl', _ctx.xl)]]),
14
+ class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box', [_ctx.span, _ctx.n("--span-" + _ctx.span)], [_ctx.offset, _ctx.n("--offset-" + _ctx.offset)], ..._ctx.getSize('xs', _ctx.xs), ..._ctx.getSize('sm', _ctx.sm), ..._ctx.getSize('md', _ctx.md), ..._ctx.getSize('lg', _ctx.lg), ..._ctx.getSize('xl', _ctx.xl))),
10
15
  style: _normalizeStyle({
11
16
  paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
12
17
  paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
@@ -53,10 +58,10 @@ export default defineComponent({
53
58
  span: _span,
54
59
  offset: _offset
55
60
  } = size;
56
- _span && classes.push("var-col--span-" + mode + "-" + _span);
57
- _offset && classes.push("var-col--offset-" + mode + "-" + _offset);
61
+ _span && classes.push(n("--span-" + mode + "-" + _span));
62
+ _offset && classes.push(n("--offset-" + mode + "-" + _offset));
58
63
  } else {
59
- classes.push("var-col--span-" + mode + "-" + size);
64
+ classes.push(n("--span-" + mode + "-" + size));
60
65
  }
61
66
 
62
67
  return classes;
@@ -65,8 +70,10 @@ export default defineComponent({
65
70
  watch([() => props.span, () => props.offset], () => {
66
71
  row == null ? void 0 : row.computePadding();
67
72
  });
68
- bindRow == null ? void 0 : bindRow(colProvider);
73
+ call(bindRow, colProvider);
69
74
  return {
75
+ n,
76
+ classes,
70
77
  padding,
71
78
  toNumber,
72
79
  toSizeUnit,
@@ -1,16 +1,18 @@
1
1
  import { computed, defineComponent, nextTick, watch } from 'vue';
2
2
  import { useCollapseItem } from './provide';
3
3
  import { props } from './props';
4
+ import { call, createNamespace } from '../utils/components';
4
5
  import { isArray } from '../utils/shared';
5
- import { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
6
-
7
- var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
8
-
9
- var _hoisted_1 = {
10
- class: "var-collapse"
11
- };
6
+ var {
7
+ n
8
+ } = createNamespace('collapse');
9
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
12
10
  export function render(_ctx, _cache) {
13
- return _openBlock(), _createElementBlock("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default")]);
11
+ return _openBlock(), _createElementBlock("div", {
12
+ class: _normalizeClass(_ctx.n())
13
+ }, [_renderSlot(_ctx.$slots, "default")], 2
14
+ /* CLASS */
15
+ );
14
16
  }
15
17
  export default defineComponent({
16
18
  render,
@@ -47,11 +49,9 @@ export default defineComponent({
47
49
  };
48
50
 
49
51
  var updateItem = (value, isExpand) => {
50
- var _props$onUpdateModel;
51
-
52
52
  var modelValue = getValue(value, isExpand);
53
- (_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, modelValue);
54
- props.onChange == null ? void 0 : props.onChange(modelValue);
53
+ call(props['onUpdate:modelValue'], modelValue);
54
+ call(props.onChange, modelValue);
55
55
  };
56
56
 
57
57
  var matchName = () => {
@@ -119,6 +119,9 @@ export default defineComponent({
119
119
  bindCollapseItem(collapseProvider);
120
120
  watch(() => length.value, () => nextTick().then(resize));
121
121
  watch(() => props.modelValue, () => nextTick().then(resize));
122
+ return {
123
+ n
124
+ };
122
125
  }
123
126
 
124
127
  });
@@ -1,54 +1,53 @@
1
1
  import { defineComponent, ref, nextTick, watch, computed } from 'vue';
2
2
  import { requestAnimationFrame } from '../utils/elements';
3
3
  import { isArray } from '../utils/shared';
4
+ import { createNamespace } from '../utils/components';
4
5
  import { useCollapse } from './provide';
5
6
  import { props } from './props';
6
7
  import VarIcon from '../icon';
7
- import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
8
-
9
- var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
10
-
11
- var _hoisted_1 = {
12
- class: "var-collapse-item-header__title"
13
- };
14
- var _hoisted_2 = {
15
- class: "var-collapse-item-header__icon"
16
- };
17
- var _hoisted_3 = {
18
- class: "var-collapse-item__wrap"
19
- };
8
+ var {
9
+ n,
10
+ classes
11
+ } = createNamespace('collapse-item');
12
+ import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
20
13
  export function render(_ctx, _cache) {
21
14
  var _component_var_icon = _resolveComponent("var-icon");
22
15
 
23
16
  return _openBlock(), _createElementBlock("div", {
24
- class: _normalizeClass({
25
- 'var-collapse-item': true,
26
- 'var-collapse-item__active': _ctx.offset && _ctx.isShow,
27
- 'var-collapse-item__disable': _ctx.disabled
28
- })
17
+ class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.offset && _ctx.isShow, _ctx.n('--active')], [_ctx.disabled, _ctx.n('--disable')]))
29
18
  }, [_createElementVNode("div", {
30
- class: "var-collapse-item-header",
19
+ class: _normalizeClass(_ctx.n('header')),
31
20
  onClick: _cache[0] || (_cache[0] = $event => _ctx.toggle())
32
- }, [_createElementVNode("div", _hoisted_1, [_renderSlot(_ctx.$slots, "title", {}, () => [_createTextVNode(_toDisplayString(_ctx.title), 1
21
+ }, [_createElementVNode("div", {
22
+ class: _normalizeClass(_ctx.n('header-title'))
23
+ }, [_renderSlot(_ctx.$slots, "title", {}, () => [_createTextVNode(_toDisplayString(_ctx.title), 1
33
24
  /* TEXT */
34
- )])]), _createElementVNode("div", _hoisted_2, [_renderSlot(_ctx.$slots, "icon", {}, () => [_createVNode(_component_var_icon, {
25
+ )])], 2
26
+ /* CLASS */
27
+ ), _createElementVNode("div", {
28
+ class: _normalizeClass(_ctx.n('header-icon'))
29
+ }, [_renderSlot(_ctx.$slots, "icon", {}, () => [_createVNode(_component_var_icon, {
35
30
  name: _ctx.icon,
36
31
  transition: 250,
37
- class: _normalizeClass({
38
- 'var-collapse-item-header__icon': true,
39
- 'var-collapse-item-header__open': _ctx.isShow && _ctx.icon === 'chevron-down',
40
- 'var-collapse-item-header__disable': _ctx.disabled
41
- })
32
+ class: _normalizeClass(_ctx.classes(_ctx.n('header-icon'), [_ctx.isShow && _ctx.icon === 'chevron-down', _ctx.n('header-open')], [_ctx.disabled, _ctx.n('header--disable')]))
42
33
  }, null, 8
43
34
  /* PROPS */
44
- , ["name", "class"])])])]), _withDirectives(_createElementVNode("div", {
45
- class: "var-collapse-item-content",
35
+ , ["name", "class"])])], 2
36
+ /* CLASS */
37
+ )], 2
38
+ /* CLASS */
39
+ ), _withDirectives(_createElementVNode("div", {
40
+ class: _normalizeClass(_ctx.n('content')),
46
41
  ref: "contentEl",
47
42
  onTransitionend: _cache[1] || (_cache[1] = function () {
48
43
  return _ctx.transitionend && _ctx.transitionend(...arguments);
49
44
  })
50
- }, [_createElementVNode("div", _hoisted_3, [_renderSlot(_ctx.$slots, "default")])], 544
51
- /* HYDRATE_EVENTS, NEED_PATCH */
45
+ }, [_createElementVNode("div", {
46
+ class: _normalizeClass(_ctx.n('content-wrap'))
47
+ }, [_renderSlot(_ctx.$slots, "default")], 2
48
+ /* CLASS */
49
+ )], 34
50
+ /* CLASS, HYDRATE_EVENTS */
52
51
  ), [[_vShow, _ctx.show]])], 2
53
52
  /* CLASS */
54
53
  );
@@ -129,6 +128,8 @@ export default defineComponent({
129
128
  if (value) openPanel();else closePanel();
130
129
  });
131
130
  return {
131
+ n,
132
+ classes,
132
133
  show,
133
134
  isShow,
134
135
  offset,
@@ -1 +1 @@
1
- :root { --collapse-background: #fff; --collapse-text-color: #232222; --collapse-header-font-size: var(--font-size-lg); --collapse-header-padding: 10px 12px; --collapse-content-font-size: var(--font-size-md); --collapse-content-padding: 0 12px 10px; --collapse-item-margin-top: 16px; --collapse-disable-color: #bdbdbd; --collapse-border-top: thin solid rgba(0, 0, 0, 0.12);}.var-collapse-item { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; position: relative; margin-top: 0; background: var(--collapse-background); color: var(--collapse-text-color); transition: margin-top 0.25s, background-color 0.25s;}.var-collapse-item::before { bottom: 0; content: ''; left: 0; position: absolute; right: 0; top: 0; z-index: -1; box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);}.var-collapse-item:not(:first-child)::after { border-top: var(--collapse-border-top); content: ''; left: 0; position: absolute; right: 0; top: 0;}.var-collapse-item-header { align-items: center; display: flex; font-size: var(--collapse-header-font-size); outline: none; padding: var(--collapse-header-padding); justify-content: space-between; position: relative;}.var-collapse-item-header__title { transition: color 0.25s;}.var-collapse-item-header__icon { transform: rotate(0deg); opacity: 1;}.var-collapse-item-header__disable { opacity: 0;}.var-collapse-item-header__open { transform: rotate(-180deg);}.var-collapse-item-content { display: flex; font-size: var(--collapse-content-font-size); overflow: hidden; transition: all 0.25s;}.var-collapse-item__wrap { padding: var(--collapse-content-padding); word-break: break-all; flex: 1;}.var-collapse-item__active + .var-collapse-item,.var-collapse-item__active:not(:first-child) { margin-top: var(--collapse-item-margin-top);}.var-collapse-item__active + .var-collapse-item::after,.var-collapse-item__active:not(:first-child)::after { border-top: none;}.var-collapse-item__disable { color: var(--collapse-disable-color); cursor: not-allowed;}
1
+ :root { --collapse-background: #fff; --collapse-text-color: #232222; --collapse-header-font-size: var(--font-size-lg); --collapse-header-padding: 10px 12px; --collapse-content-font-size: var(--font-size-md); --collapse-content-padding: 0 12px 10px; --collapse-item-margin-top: 16px; --collapse-disable-color: #bdbdbd; --collapse-border-top: thin solid rgba(0, 0, 0, 0.12);}.var-collapse-item { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; position: relative; margin-top: 0; background: var(--collapse-background); color: var(--collapse-text-color); transition: margin-top 0.25s, background-color 0.25s;}.var-collapse-item::before { bottom: 0; content: ''; left: 0; position: absolute; right: 0; top: 0; z-index: -1; box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);}.var-collapse-item:not(:first-child)::after { border-top: var(--collapse-border-top); content: ''; left: 0; position: absolute; right: 0; top: 0;}.var-collapse-item__header { align-items: center; display: flex; font-size: var(--collapse-header-font-size); outline: none; padding: var(--collapse-header-padding); justify-content: space-between; position: relative;}.var-collapse-item__header-title { transition: color 0.25s;}.var-collapse-item__header-icon { transform: rotate(0deg); opacity: 1;}.var-collapse-item__header-open { transform: rotate(-180deg);}.var-collapse-item__header--disable { opacity: 0;}.var-collapse-item__content { display: flex; font-size: var(--collapse-content-font-size); overflow: hidden; transition: all 0.25s;}.var-collapse-item__content-wrap { padding: var(--collapse-content-padding); word-break: break-all; flex: 1;}.var-collapse-item--active + .var-collapse-item,.var-collapse-item--active:not(:first-child) { margin-top: var(--collapse-item-margin-top);}.var-collapse-item--active + .var-collapse-item::after,.var-collapse-item--active:not(:first-child)::after { border-top: none;}.var-collapse-item--disable { color: var(--collapse-disable-color); cursor: not-allowed;}