@varlet/ui 2.16.7 → 2.16.8-alpha.1695118057982

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 (348) hide show
  1. package/es/action-sheet/ActionSheet.mjs +97 -67
  2. package/es/action-sheet/index.mjs +43 -28
  3. package/es/action-sheet/props.mjs +39 -8
  4. package/es/app-bar/AppBar.mjs +129 -56
  5. package/es/app-bar/index.mjs +10 -5
  6. package/es/app-bar/props.mjs +6 -3
  7. package/es/avatar/Avatar.mjs +97 -87
  8. package/es/avatar/index.mjs +10 -5
  9. package/es/avatar/props.mjs +8 -5
  10. package/es/avatar-group/AvatarGroup.mjs +26 -20
  11. package/es/avatar-group/index.mjs +10 -5
  12. package/es/avatar-group/props.mjs +5 -2
  13. package/es/back-top/BackTop.mjs +71 -53
  14. package/es/back-top/index.mjs +10 -5
  15. package/es/back-top/props.mjs +6 -3
  16. package/es/badge/Badge.mjs +74 -46
  17. package/es/badge/index.mjs +10 -5
  18. package/es/badge/props.mjs +7 -4
  19. package/es/bottom-navigation/BottomNavigation.mjs +100 -97
  20. package/es/bottom-navigation/index.mjs +10 -5
  21. package/es/bottom-navigation/props.mjs +7 -4
  22. package/es/bottom-navigation/provide.mjs +13 -9
  23. package/es/bottom-navigation-item/BottomNavigationItem.mjs +93 -74
  24. package/es/bottom-navigation-item/index.mjs +10 -5
  25. package/es/bottom-navigation-item/props.mjs +7 -4
  26. package/es/bottom-navigation-item/provide.mjs +14 -11
  27. package/es/breadcrumb/Breadcrumb.mjs +51 -36
  28. package/es/breadcrumb/index.mjs +10 -5
  29. package/es/breadcrumb/props.mjs +6 -3
  30. package/es/breadcrumb/provide.mjs +12 -11
  31. package/es/breadcrumbs/Breadcrumbs.mjs +26 -24
  32. package/es/breadcrumbs/index.mjs +10 -5
  33. package/es/breadcrumbs/props.mjs +6 -3
  34. package/es/breadcrumbs/provide.mjs +11 -9
  35. package/es/button/Button.mjs +88 -90
  36. package/es/button/index.mjs +10 -5
  37. package/es/button/props.mjs +31 -10
  38. package/es/button/provide.mjs +8 -9
  39. package/es/button-group/ButtonGroup.mjs +38 -26
  40. package/es/button-group/index.mjs +8 -4
  41. package/es/button-group/props.mjs +8 -5
  42. package/es/button-group/provide.mjs +9 -9
  43. package/es/card/Card.mjs +292 -189
  44. package/es/card/index.mjs +10 -5
  45. package/es/card/props.mjs +9 -6
  46. package/es/cell/Cell.mjs +96 -52
  47. package/es/cell/index.mjs +10 -5
  48. package/es/cell/props.mjs +6 -3
  49. package/es/checkbox/Checkbox.mjs +136 -130
  50. package/es/checkbox/index.mjs +10 -5
  51. package/es/checkbox/props.mjs +9 -6
  52. package/es/checkbox/provide.mjs +10 -9
  53. package/es/checkbox-group/CheckboxGroup.mjs +63 -96
  54. package/es/checkbox-group/index.mjs +10 -5
  55. package/es/checkbox-group/props.mjs +9 -6
  56. package/es/checkbox-group/provide.mjs +11 -9
  57. package/es/chip/Chip.mjs +66 -50
  58. package/es/chip/index.mjs +10 -5
  59. package/es/chip/props.mjs +10 -7
  60. package/es/col/Col.mjs +60 -55
  61. package/es/col/index.mjs +10 -5
  62. package/es/col/props.mjs +7 -4
  63. package/es/col/provide.mjs +8 -9
  64. package/es/collapse/Collapse.mjs +70 -73
  65. package/es/collapse/index.mjs +10 -5
  66. package/es/collapse/props.mjs +7 -4
  67. package/es/collapse/provide.mjs +11 -9
  68. package/es/collapse-item/CollapseItem.mjs +156 -93
  69. package/es/collapse-item/index.mjs +10 -5
  70. package/es/collapse-item/props.mjs +6 -3
  71. package/es/collapse-item/provide.mjs +12 -11
  72. package/es/context/index.mjs +9 -5
  73. package/es/context/lock.mjs +18 -22
  74. package/es/context/zIndex.mjs +19 -16
  75. package/es/countdown/Countdown.mjs +73 -70
  76. package/es/countdown/index.mjs +10 -5
  77. package/es/countdown/props.mjs +7 -4
  78. package/es/counter/Counter.mjs +169 -173
  79. package/es/counter/index.mjs +10 -5
  80. package/es/counter/props.mjs +8 -5
  81. package/es/counter/provide.ts +3 -0
  82. package/es/date-picker/DatePicker.mjs +411 -304
  83. package/es/date-picker/index.mjs +10 -5
  84. package/es/date-picker/props.mjs +71 -45
  85. package/es/date-picker/src/day-picker-panel.mjs +270 -208
  86. package/es/date-picker/src/month-picker-panel.mjs +205 -175
  87. package/es/date-picker/src/panel-header.mjs +101 -83
  88. package/es/date-picker/src/year-picker-panel.mjs +64 -54
  89. package/es/dialog/Dialog.mjs +171 -106
  90. package/es/dialog/index.mjs +49 -33
  91. package/es/dialog/props.mjs +39 -9
  92. package/es/divider/Divider.mjs +56 -51
  93. package/es/divider/index.mjs +10 -5
  94. package/es/divider/props.mjs +5 -2
  95. package/es/drag/Drag.mjs +126 -144
  96. package/es/drag/index.mjs +10 -5
  97. package/es/drag/props.mjs +8 -5
  98. package/es/ellipsis/Ellipsis.mjs +81 -50
  99. package/es/ellipsis/index.mjs +8 -4
  100. package/es/ellipsis/props.mjs +5 -2
  101. package/es/fab/Fab.mjs +73 -75
  102. package/es/fab/index.mjs +8 -4
  103. package/es/fab/props.mjs +14 -11
  104. package/es/field-decorator/FieldDecorator.mjs +215 -110
  105. package/es/field-decorator/props.mjs +9 -6
  106. package/es/form/Form.mjs +69 -79
  107. package/es/form/index.mjs +11 -6
  108. package/es/form/props.mjs +6 -3
  109. package/es/form/provide.mjs +35 -22
  110. package/es/form-details/FormDetails.mjs +81 -39
  111. package/es/form-details/index.mjs +10 -5
  112. package/es/form-details/props.mjs +7 -4
  113. package/es/hover/index.mjs +37 -40
  114. package/es/hover-overlay/HoverOverlay.mjs +18 -14
  115. package/es/hover-overlay/index.mjs +13 -8
  116. package/es/hover-overlay/props.mjs +5 -2
  117. package/es/icon/Icon.mjs +50 -33
  118. package/es/icon/index.mjs +10 -5
  119. package/es/icon/props.mjs +7 -4
  120. package/es/image/Image.mjs +76 -82
  121. package/es/image/index.mjs +10 -5
  122. package/es/image/props.mjs +7 -4
  123. package/es/image-preview/ImagePreview.mjs +176 -193
  124. package/es/image-preview/index.mjs +44 -30
  125. package/es/image-preview/props.mjs +34 -9
  126. package/es/index-anchor/IndexAnchor.mjs +45 -42
  127. package/es/index-anchor/index.mjs +10 -5
  128. package/es/index-anchor/props.mjs +5 -2
  129. package/es/index-anchor/provide.mjs +12 -11
  130. package/es/index-bar/IndexBar.mjs +130 -131
  131. package/es/index-bar/index.mjs +10 -5
  132. package/es/index-bar/props.mjs +6 -3
  133. package/es/index-bar/provide.mjs +11 -9
  134. package/es/index.bundle.mjs +1 -1
  135. package/es/index.mjs +1 -1
  136. package/es/input/Input.mjs +231 -247
  137. package/es/input/index.mjs +10 -5
  138. package/es/input/props.mjs +38 -8
  139. package/es/input/provide.ts +3 -0
  140. package/es/lazy/index.mjs +94 -87
  141. package/es/link/Link.mjs +39 -45
  142. package/es/link/index.mjs +10 -5
  143. package/es/link/props.mjs +8 -5
  144. package/es/list/List.mjs +144 -97
  145. package/es/list/index.mjs +10 -5
  146. package/es/list/props.mjs +8 -5
  147. package/es/list/provide.mjs +8 -9
  148. package/es/loading/Loading.mjs +165 -72
  149. package/es/loading/index.mjs +10 -5
  150. package/es/loading/props.mjs +7 -4
  151. package/es/loading-bar/LoadingBar.mjs +19 -16
  152. package/es/loading-bar/index.mjs +37 -30
  153. package/es/loading-bar/props.mjs +5 -2
  154. package/es/locale/en-US.mjs +76 -73
  155. package/es/locale/index.mjs +52 -41
  156. package/es/locale/zh-CN.mjs +76 -73
  157. package/es/menu/Menu.mjs +76 -57
  158. package/es/menu/index.mjs +10 -5
  159. package/es/menu/props.mjs +11 -8
  160. package/es/menu/usePopover.mjs +214 -207
  161. package/es/option/Option.mjs +86 -70
  162. package/es/option/index.mjs +10 -5
  163. package/es/option/props.mjs +5 -2
  164. package/es/option/provide.mjs +10 -11
  165. package/es/overlay/Overlay.mjs +29 -31
  166. package/es/overlay/index.mjs +10 -5
  167. package/es/overlay/props.mjs +7 -4
  168. package/es/pagination/Pagination.mjs +334 -202
  169. package/es/pagination/index.mjs +10 -5
  170. package/es/pagination/props.mjs +8 -5
  171. package/es/paper/Paper.mjs +43 -31
  172. package/es/paper/index.mjs +10 -5
  173. package/es/paper/props.mjs +6 -3
  174. package/es/picker/Picker.mjs +288 -224
  175. package/es/picker/index.mjs +24 -23
  176. package/es/picker/props.mjs +37 -7
  177. package/es/popup/Popup.mjs +68 -58
  178. package/es/popup/index.mjs +10 -5
  179. package/es/popup/props.mjs +9 -6
  180. package/es/popup/provide.mjs +12 -15
  181. package/es/progress/Progress.mjs +186 -114
  182. package/es/progress/index.mjs +10 -5
  183. package/es/progress/props.mjs +7 -4
  184. package/es/pull-refresh/PullRefresh.mjs +136 -116
  185. package/es/pull-refresh/index.mjs +10 -5
  186. package/es/pull-refresh/props.mjs +8 -5
  187. package/es/radio/Radio.mjs +122 -118
  188. package/es/radio/index.mjs +10 -5
  189. package/es/radio/props.mjs +8 -5
  190. package/es/radio/provide.mjs +8 -9
  191. package/es/radio-group/RadioGroup.mjs +50 -58
  192. package/es/radio-group/index.mjs +10 -5
  193. package/es/radio-group/props.mjs +10 -7
  194. package/es/radio-group/provide.mjs +11 -9
  195. package/es/rate/Rate.mjs +103 -132
  196. package/es/rate/index.mjs +10 -5
  197. package/es/rate/props.mjs +10 -7
  198. package/es/rate/provide.ts +3 -0
  199. package/es/result/Empty.mjs +21 -12
  200. package/es/result/Error.mjs +18 -9
  201. package/es/result/Info.mjs +18 -9
  202. package/es/result/Question.mjs +18 -9
  203. package/es/result/Result.mjs +102 -55
  204. package/es/result/Success.mjs +84 -40
  205. package/es/result/Warning.mjs +18 -9
  206. package/es/result/index.mjs +10 -5
  207. package/es/result/props.mjs +6 -3
  208. package/es/ripple/index.mjs +89 -101
  209. package/es/row/Row.mjs +40 -45
  210. package/es/row/index.mjs +10 -5
  211. package/es/row/props.mjs +8 -5
  212. package/es/row/provide.mjs +9 -9
  213. package/es/select/Select.mjs +308 -298
  214. package/es/select/index.mjs +10 -5
  215. package/es/select/props.mjs +40 -10
  216. package/es/select/provide.mjs +9 -9
  217. package/es/skeleton/Skeleton.mjs +182 -71
  218. package/es/skeleton/index.mjs +10 -5
  219. package/es/skeleton/props.mjs +5 -2
  220. package/es/slider/Slider.mjs +310 -260
  221. package/es/slider/index.mjs +10 -5
  222. package/es/slider/props.mjs +15 -11
  223. package/es/slider/provide.ts +3 -0
  224. package/es/snackbar/Snackbar.mjs +47 -34
  225. package/es/snackbar/core.mjs +140 -77
  226. package/es/snackbar/index.mjs +111 -97
  227. package/es/snackbar/props.mjs +35 -14
  228. package/es/space/Space.mjs +30 -28
  229. package/es/space/index.mjs +10 -5
  230. package/es/space/margin.mjs +22 -23
  231. package/es/space/props.mjs +8 -5
  232. package/es/step/Step.mjs +96 -74
  233. package/es/step/index.mjs +10 -5
  234. package/es/step/props.mjs +6 -3
  235. package/es/step/provide.mjs +10 -11
  236. package/es/steps/Steps.mjs +31 -30
  237. package/es/steps/index.mjs +10 -5
  238. package/es/steps/props.mjs +7 -4
  239. package/es/steps/provide.mjs +9 -8
  240. package/es/sticky/Sticky.mjs +104 -92
  241. package/es/sticky/index.mjs +10 -5
  242. package/es/sticky/props.mjs +6 -3
  243. package/es/style-provider/StyleProvider.mjs +19 -18
  244. package/es/style-provider/index.mjs +15 -11
  245. package/es/style-provider/props.mjs +6 -3
  246. package/es/swipe/Swipe.mjs +281 -268
  247. package/es/swipe/index.mjs +10 -5
  248. package/es/swipe/props.mjs +6 -3
  249. package/es/swipe/provide.mjs +11 -9
  250. package/es/swipe-item/SwipeItem.mjs +29 -29
  251. package/es/swipe-item/index.mjs +8 -4
  252. package/es/swipe-item/provide.mjs +10 -11
  253. package/es/switch/Switch.mjs +143 -103
  254. package/es/switch/index.mjs +10 -5
  255. package/es/switch/props.mjs +7 -4
  256. package/es/switch/provide.ts +3 -0
  257. package/es/tab/Tab.mjs +48 -61
  258. package/es/tab/index.mjs +10 -5
  259. package/es/tab/props.mjs +6 -3
  260. package/es/tab/provide.mjs +10 -11
  261. package/es/tab-item/TabItem.mjs +27 -32
  262. package/es/tab-item/index.mjs +10 -5
  263. package/es/tab-item/props.mjs +5 -2
  264. package/es/tab-item/provide.mjs +17 -18
  265. package/es/table/Table.mjs +54 -25
  266. package/es/table/index.mjs +10 -5
  267. package/es/table/props.mjs +6 -3
  268. package/es/tabs/Tabs.mjs +162 -134
  269. package/es/tabs/index.mjs +10 -5
  270. package/es/tabs/props.mjs +15 -12
  271. package/es/tabs/provide.mjs +9 -9
  272. package/es/tabs-items/TabsItems.mjs +61 -65
  273. package/es/tabs-items/index.mjs +10 -5
  274. package/es/tabs-items/props.mjs +7 -4
  275. package/es/tabs-items/provide.mjs +11 -9
  276. package/es/themes/dark/actionSheet.mjs +8 -5
  277. package/es/themes/dark/appBar.mjs +6 -3
  278. package/es/themes/dark/avatar.mjs +7 -4
  279. package/es/themes/dark/badge.mjs +6 -3
  280. package/es/themes/dark/bottomNavigation.mjs +7 -4
  281. package/es/themes/dark/bottomNavigationItem.mjs +6 -3
  282. package/es/themes/dark/breadcrumb.mjs +6 -3
  283. package/es/themes/dark/button.mjs +7 -4
  284. package/es/themes/dark/card.mjs +10 -7
  285. package/es/themes/dark/cell.mjs +7 -4
  286. package/es/themes/dark/checkbox.mjs +7 -4
  287. package/es/themes/dark/chip.mjs +7 -4
  288. package/es/themes/dark/collapse.mjs +8 -5
  289. package/es/themes/dark/countdown.mjs +6 -3
  290. package/es/themes/dark/datePicker.mjs +10 -7
  291. package/es/themes/dark/dialog.mjs +8 -5
  292. package/es/themes/dark/divider.mjs +7 -4
  293. package/es/themes/dark/fieldDecorator.mjs +7 -4
  294. package/es/themes/dark/index.mjs +69 -51
  295. package/es/themes/dark/link.mjs +6 -3
  296. package/es/themes/dark/menu.mjs +6 -3
  297. package/es/themes/dark/option.mjs +6 -3
  298. package/es/themes/dark/pagination.mjs +11 -8
  299. package/es/themes/dark/paper.mjs +6 -3
  300. package/es/themes/dark/picker.mjs +11 -8
  301. package/es/themes/dark/popup.mjs +6 -3
  302. package/es/themes/dark/progress.mjs +6 -3
  303. package/es/themes/dark/pullRefresh.mjs +6 -3
  304. package/es/themes/dark/radio.mjs +7 -4
  305. package/es/themes/dark/result.mjs +12 -9
  306. package/es/themes/dark/select.mjs +6 -3
  307. package/es/themes/dark/skeleton.mjs +11 -6
  308. package/es/themes/dark/steps.mjs +8 -5
  309. package/es/themes/dark/switch.mjs +7 -4
  310. package/es/themes/dark/tab.mjs +6 -3
  311. package/es/themes/dark/table.mjs +12 -9
  312. package/es/themes/dark/tabs.mjs +6 -3
  313. package/es/themes/dark/timePicker.mjs +9 -6
  314. package/es/themes/dark/uploader.mjs +10 -7
  315. package/es/themes/dark/watermark.mjs +6 -3
  316. package/es/themes/index.mjs +7 -5
  317. package/es/time-picker/TimePicker.mjs +297 -232
  318. package/es/time-picker/clock.mjs +222 -172
  319. package/es/time-picker/index.mjs +10 -5
  320. package/es/time-picker/props.mjs +14 -8
  321. package/es/time-picker/utils.mjs +46 -86
  322. package/es/tooltip/Tooltip.mjs +82 -62
  323. package/es/tooltip/index.mjs +10 -5
  324. package/es/tooltip/props.mjs +12 -9
  325. package/es/uploader/Uploader.mjs +315 -308
  326. package/es/uploader/index.mjs +10 -5
  327. package/es/uploader/props.mjs +10 -7
  328. package/es/uploader/provide.ts +3 -0
  329. package/es/utils/components.mjs +158 -127
  330. package/es/utils/elements.mjs +106 -123
  331. package/es/utils/logger.mjs +9 -5
  332. package/es/utils/shared.mjs +25 -23
  333. package/es/utils/test.mjs +105 -93
  334. package/es/varlet.esm.js +12464 -13425
  335. package/es/watermark/Watermark.mjs +191 -109
  336. package/es/watermark/index.mjs +8 -4
  337. package/es/watermark/props.mjs +8 -5
  338. package/highlight/web-types.en-US.json +3 -3
  339. package/highlight/web-types.zh-CN.json +2 -2
  340. package/lib/varlet.cjs.js +9187 -10199
  341. package/package.json +7 -7
  342. package/umd/varlet.js +4 -4
  343. package/es/counter/provide.mjs +0 -1
  344. package/es/input/provide.mjs +0 -1
  345. package/es/rate/provide.mjs +0 -1
  346. package/es/slider/provide.mjs +0 -1
  347. package/es/switch/provide.mjs +0 -1
  348. package/es/uploader/provide.mjs +0 -1
@@ -1,139 +1,228 @@
1
- import VarIcon from '../icon/index.mjs';
2
- import VarMenu from '../menu/index.mjs';
3
- import VarChip from '../chip/index.mjs';
4
- import VarFieldDecorator from '../field-decorator/FieldDecorator.mjs';
5
- import VarFormDetails from '../form-details/index.mjs';
6
- import { computed, defineComponent, ref, watch, nextTick } from 'vue';
7
- import { isArray, isEmpty } from '@varlet/shared';
8
- import { props } from './props.mjs';
9
- import { useValidation, createNamespace, call } from '../utils/components.mjs';
10
- import { useOptions } from './provide.mjs';
11
- import { useForm } from '../form/provide.mjs';
12
- import { toPxNum } from '../utils/elements.mjs';
13
- import { error } from '../utils/logger.mjs';
14
- var {
15
- name,
16
- n,
17
- classes
18
- } = createNamespace('select');
1
+ import VarIcon from "../icon/index.mjs";
2
+ import VarMenu from "../menu/index.mjs";
3
+ import VarChip from "../chip/index.mjs";
4
+ import VarFieldDecorator from "../field-decorator/FieldDecorator.mjs";
5
+ import VarFormDetails from "../form-details/index.mjs";
6
+ import { computed, defineComponent, ref, watch, nextTick } from "vue";
7
+ import { isArray, isEmpty } from "@varlet/shared";
8
+ import { props } from "./props.mjs";
9
+ import { useValidation, createNamespace, call } from "../utils/components.mjs";
10
+ import { useOptions } from "./provide.mjs";
11
+ import { useForm } from "../form/provide.mjs";
12
+ import { toPxNum } from "../utils/elements.mjs";
13
+ import { error } from "../utils/logger.mjs";
14
+ const { name, n, classes } = createNamespace("select");
19
15
  import { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, normalizeClass as _normalizeClass, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, createVNode as _createVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, createSlots as _createSlots, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
20
- var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
21
- var _hoisted_1 = {
22
- key: 1
23
- };
16
+ const _withScopeId = (n2) => (_pushScopeId(""), n2 = n2(), _popScopeId(), n2);
17
+ const _hoisted_1 = { key: 1 };
24
18
  function __render__(_ctx, _cache) {
25
- var _component_var_chip = _resolveComponent("var-chip");
26
- var _component_var_icon = _resolveComponent("var-icon");
27
- var _component_var_field_decorator = _resolveComponent("var-field-decorator");
28
- var _component_var_menu = _resolveComponent("var-menu");
29
- var _component_var_form_details = _resolveComponent("var-form-details");
30
- return _openBlock(), _createElementBlock("div", {
31
- class: _normalizeClass(_ctx.n()),
32
- onClick: _cache[3] || (_cache[3] = function () {
33
- return _ctx.handleFocus && _ctx.handleFocus(...arguments);
34
- })
35
- }, [_createVNode(_component_var_menu, {
36
- "var-select-cover": "",
37
- "same-width": "",
38
- "close-on-click-reference": "",
39
- show: _ctx.showMenu,
40
- "onUpdate:show": _cache[1] || (_cache[1] = $event => _ctx.showMenu = $event),
41
- class: _normalizeClass(_ctx.n('menu')),
42
- "popover-class": _ctx.variant === 'standard' && _ctx.hint ? _ctx.n('--standard-menu-margin') : undefined,
43
- "offset-y": _ctx.offsetY,
44
- disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled,
45
- placement: _ctx.placement,
46
- "default-style": false,
47
- onClickOutside: _ctx.handleBlur
48
- }, {
49
- menu: _withCtx(() => [_createElementVNode("div", {
50
- ref: "menuEl",
51
- class: _normalizeClass(_ctx.classes(_ctx.n('scroller'), _ctx.n('$-elevation--3')))
52
- }, [_renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)]),
53
-
54
- default: _withCtx(() => [_createVNode(_component_var_field_decorator, _normalizeProps(_guardReactiveProps({
55
- value: _ctx.modelValue,
56
- size: _ctx.size,
57
- variant: _ctx.variant,
58
- placeholder: _ctx.placeholder,
59
- line: _ctx.line,
60
- hint: _ctx.hint,
61
- textColor: _ctx.textColor,
62
- focusColor: _ctx.focusColor,
63
- blurColor: _ctx.blurColor,
64
- isFocus: _ctx.isFocus,
65
- errorMessage: _ctx.errorMessage,
66
- formDisabled: _ctx.formDisabled,
67
- disabled: _ctx.disabled,
68
- clearable: _ctx.clearable,
69
- cursor: _ctx.cursor,
70
- onClick: _ctx.handleClick,
71
- onClear: _ctx.handleClear
72
- })), _createSlots({
73
- "append-icon": _withCtx(() => [_renderSlot(_ctx.$slots, "append-icon")]),
74
- default: _withCtx(() => [_createElementVNode("div", {
75
- class: _normalizeClass(_ctx.classes(_ctx.n('select'), [_ctx.errorMessage, _ctx.n('--error')], [_ctx.formDisabled || _ctx.disabled, _ctx.n('--disabled')])),
76
- style: _normalizeStyle({
77
- textAlign: _ctx.textAlign,
78
- color: _ctx.textColor
79
- })
80
- }, [_createElementVNode("div", {
81
- class: _normalizeClass(_ctx.n('label'))
82
- }, [!_ctx.isEmptyModelValue ? _renderSlot(_ctx.$slots, "selected", {
83
- key: 0
84
- }, () => [_ctx.multiple ? (_openBlock(), _createElementBlock(_Fragment, {
85
- key: 0
86
- }, [_ctx.chip ? (_openBlock(), _createElementBlock("div", {
87
- key: 0,
88
- class: _normalizeClass(_ctx.n('chips'))
89
- }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.labels, l => {
90
- return _openBlock(), _createBlock(_component_var_chip, {
91
- class: _normalizeClass(_ctx.n('chip')),
92
- "var-select-cover": "",
93
- closable: "",
94
- size: "small",
95
- type: _ctx.errorMessage ? 'danger' : undefined,
96
- key: l,
97
- onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, ["stop"])),
98
- onClose: () => _ctx.handleClose(l)
99
- }, {
100
- default: _withCtx(() => [_createTextVNode(_toDisplayString(l), 1 /* TEXT */)]),
101
-
102
- _: 2 /* DYNAMIC */
103
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "type", "onClose"]);
104
- }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)) : (_openBlock(), _createElementBlock("div", {
105
- key: 1,
106
- class: _normalizeClass(_ctx.n('values'))
107
- }, _toDisplayString(_ctx.labels.join(_ctx.separator)), 3 /* TEXT, CLASS */))], 64 /* STABLE_FRAGMENT */)) : (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(_ctx.label), 1 /* TEXT */))]) : _createCommentVNode("v-if", true)], 2 /* CLASS */), _ctx.enableCustomPlaceholder ? (_openBlock(), _createElementBlock("span", {
108
- key: 0,
109
- class: _normalizeClass(_ctx.classes(_ctx.n('placeholder'), _ctx.n('$--ellipsis'))),
110
- style: _normalizeStyle({
111
- color: _ctx.placeholderColor
112
- })
113
- }, _toDisplayString(_ctx.placeholder), 7 /* TEXT, CLASS, STYLE */)) : _createCommentVNode("v-if", true), _renderSlot(_ctx.$slots, "arrow-icon", {
114
- focus: _ctx.showMenu
115
- }, () => [_createVNode(_component_var_icon, {
116
- class: _normalizeClass(_ctx.classes(_ctx.n('arrow'), [_ctx.showMenu, _ctx.n('--arrow-rotate')])),
19
+ const _component_var_chip = _resolveComponent("var-chip");
20
+ const _component_var_icon = _resolveComponent("var-icon");
21
+ const _component_var_field_decorator = _resolveComponent("var-field-decorator");
22
+ const _component_var_menu = _resolveComponent("var-menu");
23
+ const _component_var_form_details = _resolveComponent("var-form-details");
24
+ return _openBlock(), _createElementBlock(
25
+ "div",
26
+ {
27
+ class: _normalizeClass(_ctx.n()),
28
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args))
29
+ },
30
+ [
31
+ _createVNode(_component_var_menu, {
117
32
  "var-select-cover": "",
118
- name: "menu-down",
119
- transition: 300
120
- }, null, 8 /* PROPS */, ["class"])])], 6 /* CLASS, STYLE */)]),
121
-
122
- _: 2 /* DYNAMIC */
123
- }, [_ctx.$slots['prepend-icon'] ? {
124
- name: "prepend-icon",
125
- fn: _withCtx(() => [_renderSlot(_ctx.$slots, "prepend-icon")]),
126
- key: "0"
127
- } : undefined]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */)]),
128
-
129
- _: 3 /* FORWARDED */
130
- }, 8 /* PROPS */, ["show", "class", "popover-class", "offset-y", "disabled", "placement", "onClickOutside"]), _createVNode(_component_var_form_details, {
131
- "error-message": _ctx.errorMessage,
132
- onClick: _cache[2] || (_cache[2] = _withModifiers(() => {}, ["stop"]))
133
- }, null, 8 /* PROPS */, ["error-message"])], 2 /* CLASS */);
33
+ "same-width": "",
34
+ "close-on-click-reference": "",
35
+ show: _ctx.showMenu,
36
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => _ctx.showMenu = $event),
37
+ class: _normalizeClass(_ctx.n("menu")),
38
+ "popover-class": _ctx.variant === "standard" && _ctx.hint ? _ctx.n("--standard-menu-margin") : void 0,
39
+ "offset-y": _ctx.offsetY,
40
+ disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled,
41
+ placement: _ctx.placement,
42
+ "default-style": false,
43
+ onClickOutside: _ctx.handleBlur
44
+ }, {
45
+ menu: _withCtx(() => [
46
+ _createElementVNode(
47
+ "div",
48
+ {
49
+ ref: "menuEl",
50
+ class: _normalizeClass(_ctx.classes(_ctx.n("scroller"), _ctx.n("$-elevation--3")))
51
+ },
52
+ [
53
+ _renderSlot(_ctx.$slots, "default")
54
+ ],
55
+ 2
56
+ /* CLASS */
57
+ )
58
+ ]),
59
+ default: _withCtx(() => [
60
+ _createVNode(
61
+ _component_var_field_decorator,
62
+ _normalizeProps(_guardReactiveProps({
63
+ value: _ctx.modelValue,
64
+ size: _ctx.size,
65
+ variant: _ctx.variant,
66
+ placeholder: _ctx.placeholder,
67
+ line: _ctx.line,
68
+ hint: _ctx.hint,
69
+ textColor: _ctx.textColor,
70
+ focusColor: _ctx.focusColor,
71
+ blurColor: _ctx.blurColor,
72
+ isFocus: _ctx.isFocus,
73
+ errorMessage: _ctx.errorMessage,
74
+ formDisabled: _ctx.formDisabled,
75
+ disabled: _ctx.disabled,
76
+ clearable: _ctx.clearable,
77
+ cursor: _ctx.cursor,
78
+ onClick: _ctx.handleClick,
79
+ onClear: _ctx.handleClear
80
+ })),
81
+ _createSlots({
82
+ "append-icon": _withCtx(() => [
83
+ _renderSlot(_ctx.$slots, "append-icon")
84
+ ]),
85
+ default: _withCtx(() => [
86
+ _createElementVNode(
87
+ "div",
88
+ {
89
+ class: _normalizeClass(_ctx.classes(_ctx.n("select"), [_ctx.errorMessage, _ctx.n("--error")], [_ctx.formDisabled || _ctx.disabled, _ctx.n("--disabled")])),
90
+ style: _normalizeStyle({
91
+ textAlign: _ctx.textAlign,
92
+ color: _ctx.textColor
93
+ })
94
+ },
95
+ [
96
+ _createElementVNode(
97
+ "div",
98
+ {
99
+ class: _normalizeClass(_ctx.n("label"))
100
+ },
101
+ [
102
+ !_ctx.isEmptyModelValue ? _renderSlot(_ctx.$slots, "selected", { key: 0 }, () => [
103
+ _ctx.multiple ? (_openBlock(), _createElementBlock(
104
+ _Fragment,
105
+ { key: 0 },
106
+ [
107
+ _ctx.chip ? (_openBlock(), _createElementBlock(
108
+ "div",
109
+ {
110
+ key: 0,
111
+ class: _normalizeClass(_ctx.n("chips"))
112
+ },
113
+ [
114
+ (_openBlock(true), _createElementBlock(
115
+ _Fragment,
116
+ null,
117
+ _renderList(_ctx.labels, (l) => {
118
+ return _openBlock(), _createBlock(_component_var_chip, {
119
+ class: _normalizeClass(_ctx.n("chip")),
120
+ "var-select-cover": "",
121
+ closable: "",
122
+ size: "small",
123
+ type: _ctx.errorMessage ? "danger" : void 0,
124
+ key: l,
125
+ onClick: _cache[0] || (_cache[0] = _withModifiers(() => {
126
+ }, ["stop"])),
127
+ onClose: () => _ctx.handleClose(l)
128
+ }, {
129
+ default: _withCtx(() => [
130
+ _createTextVNode(
131
+ _toDisplayString(l),
132
+ 1
133
+ /* TEXT */
134
+ )
135
+ ]),
136
+ _: 2
137
+ /* DYNAMIC */
138
+ }, 1032, ["class", "type", "onClose"]);
139
+ }),
140
+ 128
141
+ /* KEYED_FRAGMENT */
142
+ ))
143
+ ],
144
+ 2
145
+ /* CLASS */
146
+ )) : (_openBlock(), _createElementBlock(
147
+ "div",
148
+ {
149
+ key: 1,
150
+ class: _normalizeClass(_ctx.n("values"))
151
+ },
152
+ _toDisplayString(_ctx.labels.join(_ctx.separator)),
153
+ 3
154
+ /* TEXT, CLASS */
155
+ ))
156
+ ],
157
+ 64
158
+ /* STABLE_FRAGMENT */
159
+ )) : (_openBlock(), _createElementBlock(
160
+ "span",
161
+ _hoisted_1,
162
+ _toDisplayString(_ctx.label),
163
+ 1
164
+ /* TEXT */
165
+ ))
166
+ ]) : _createCommentVNode("v-if", true)
167
+ ],
168
+ 2
169
+ /* CLASS */
170
+ ),
171
+ _ctx.enableCustomPlaceholder ? (_openBlock(), _createElementBlock(
172
+ "span",
173
+ {
174
+ key: 0,
175
+ class: _normalizeClass(_ctx.classes(_ctx.n("placeholder"), _ctx.n("$--ellipsis"))),
176
+ style: _normalizeStyle({
177
+ color: _ctx.placeholderColor
178
+ })
179
+ },
180
+ _toDisplayString(_ctx.placeholder),
181
+ 7
182
+ /* TEXT, CLASS, STYLE */
183
+ )) : _createCommentVNode("v-if", true),
184
+ _renderSlot(_ctx.$slots, "arrow-icon", { focus: _ctx.showMenu }, () => [
185
+ _createVNode(_component_var_icon, {
186
+ class: _normalizeClass(_ctx.classes(_ctx.n("arrow"), [_ctx.showMenu, _ctx.n("--arrow-rotate")])),
187
+ "var-select-cover": "",
188
+ name: "menu-down",
189
+ transition: 300
190
+ }, null, 8, ["class"])
191
+ ])
192
+ ],
193
+ 6
194
+ /* CLASS, STYLE */
195
+ )
196
+ ]),
197
+ _: 2
198
+ /* DYNAMIC */
199
+ }, [
200
+ _ctx.$slots["prepend-icon"] ? {
201
+ name: "prepend-icon",
202
+ fn: _withCtx(() => [
203
+ _renderSlot(_ctx.$slots, "prepend-icon")
204
+ ]),
205
+ key: "0"
206
+ } : void 0
207
+ ]),
208
+ 1040
209
+ /* FULL_PROPS, DYNAMIC_SLOTS */
210
+ )
211
+ ]),
212
+ _: 3
213
+ /* FORWARDED */
214
+ }, 8, ["show", "class", "popover-class", "offset-y", "disabled", "placement", "onClickOutside"]),
215
+ _createVNode(_component_var_form_details, {
216
+ "error-message": _ctx.errorMessage,
217
+ onClick: _cache[2] || (_cache[2] = _withModifiers(() => {
218
+ }, ["stop"]))
219
+ }, null, 8, ["error-message"])
220
+ ],
221
+ 2
222
+ /* CLASS */
223
+ );
134
224
  }
135
-
136
- var __sfc__ = defineComponent({
225
+ const __sfc__ = defineComponent({
137
226
  name,
138
227
  components: {
139
228
  VarIcon,
@@ -143,53 +232,42 @@ var __sfc__ = defineComponent({
143
232
  VarFormDetails
144
233
  },
145
234
  props,
146
- setup(props) {
147
- var isFocus = ref(false);
148
- var showMenu = ref(false);
149
- var multiple = computed(() => props.multiple);
150
- var focusColor = computed(() => props.focusColor);
151
- var label = ref('');
152
- var labels = ref([]);
153
- var isEmptyModelValue = computed(() => isEmpty(props.modelValue));
154
- var cursor = computed(() => props.disabled || props.readonly ? '' : 'pointer');
155
- var offsetY = ref(0);
156
- var {
157
- bindForm,
158
- form
159
- } = useForm();
160
- var {
161
- length,
162
- options,
163
- bindOptions
164
- } = useOptions();
165
- var {
235
+ setup(props2) {
236
+ const isFocus = ref(false);
237
+ const showMenu = ref(false);
238
+ const multiple = computed(() => props2.multiple);
239
+ const focusColor = computed(() => props2.focusColor);
240
+ const label = ref("");
241
+ const labels = ref([]);
242
+ const isEmptyModelValue = computed(() => isEmpty(props2.modelValue));
243
+ const cursor = computed(() => props2.disabled || props2.readonly ? "" : "pointer");
244
+ const offsetY = ref(0);
245
+ const { bindForm, form } = useForm();
246
+ const { length, options, bindOptions } = useOptions();
247
+ const {
166
248
  errorMessage,
167
249
  validateWithTrigger: vt,
168
250
  validate: v,
169
251
  // expose
170
252
  resetValidation
171
253
  } = useValidation();
172
- var menuEl = ref(null);
173
- var placement = computed(() => props.variant === 'outlined' ? 'bottom' : 'cover-top');
174
- var placeholderColor = computed(() => {
175
- var {
176
- hint,
177
- blurColor,
178
- focusColor
179
- } = props;
254
+ const menuEl = ref(null);
255
+ const placement = computed(() => props2.variant === "outlined" ? "bottom" : "cover-top");
256
+ const placeholderColor = computed(() => {
257
+ const { hint, blurColor, focusColor: focusColor2 } = props2;
180
258
  if (hint) {
181
- return undefined;
259
+ return void 0;
182
260
  }
183
261
  if (errorMessage.value) {
184
- return 'var(--field-decorator-error-color)';
262
+ return "var(--field-decorator-error-color)";
185
263
  }
186
264
  if (isFocus.value) {
187
- return focusColor || 'var(--field-decorator-focus-color)';
265
+ return focusColor2 || "var(--field-decorator-focus-color)";
188
266
  }
189
- return blurColor || 'var(--field-decorator-blur-color)';
267
+ return blurColor || "var(--field-decorator-blur-color)";
190
268
  });
191
- var enableCustomPlaceholder = computed(() => !props.hint && isEmpty(props.modelValue));
192
- var selectProvider = {
269
+ const enableCustomPlaceholder = computed(() => !props2.hint && isEmpty(props2.modelValue));
270
+ const selectProvider = {
193
271
  multiple,
194
272
  focusColor,
195
273
  computeLabel,
@@ -198,212 +276,141 @@ var __sfc__ = defineComponent({
198
276
  validate,
199
277
  resetValidation
200
278
  };
201
- watch(() => props.multiple, () => {
202
- var {
203
- multiple,
204
- modelValue
205
- } = props;
206
- if (multiple && !isArray(modelValue)) {
207
- error('Select', 'The modelValue must be an array when multiple is true');
279
+ watch(
280
+ () => props2.multiple,
281
+ () => {
282
+ const { multiple: multiple2, modelValue } = props2;
283
+ if (multiple2 && !isArray(modelValue)) {
284
+ error("Select", "The modelValue must be an array when multiple is true");
285
+ }
208
286
  }
209
- });
210
- watch(() => props.modelValue, syncOptions, {
211
- deep: true
212
- });
287
+ );
288
+ watch(() => props2.modelValue, syncOptions, { deep: true });
213
289
  watch(() => length.value, syncOptions);
214
290
  bindOptions(selectProvider);
215
291
  call(bindForm, selectProvider);
216
292
  function computeLabel() {
217
- var {
218
- multiple,
219
- modelValue
220
- } = props;
221
- if (multiple) {
222
- var rawModelValue = modelValue;
293
+ const { multiple: multiple2, modelValue } = props2;
294
+ if (multiple2) {
295
+ const rawModelValue = modelValue;
223
296
  labels.value = rawModelValue.map(findLabel);
224
297
  }
225
- if (!multiple && !isEmpty(modelValue)) {
298
+ if (!multiple2 && !isEmpty(modelValue)) {
226
299
  label.value = findLabel(modelValue);
227
300
  }
228
- if (!multiple && isEmpty(modelValue)) {
229
- label.value = '';
301
+ if (!multiple2 && isEmpty(modelValue)) {
302
+ label.value = "";
230
303
  }
231
304
  }
232
305
  function validateWithTrigger(trigger) {
233
306
  nextTick(() => {
234
- var {
235
- validateTrigger,
236
- rules,
237
- modelValue
238
- } = props;
307
+ const { validateTrigger, rules, modelValue } = props2;
239
308
  vt(validateTrigger, trigger, rules, modelValue);
240
309
  });
241
310
  }
242
- function findValueOrLabel(_ref) {
243
- var {
244
- value,
245
- label
246
- } = _ref;
311
+ function findValueOrLabel({ value, label: label2 }) {
247
312
  if (value.value != null) {
248
313
  return value.value;
249
314
  }
250
- return label.value;
315
+ return label2.value;
251
316
  }
252
317
  function findLabel(modelValue) {
253
- var _option$label$value, _option;
254
- var option = options.find(_ref2 => {
255
- var {
256
- value
257
- } = _ref2;
258
- return value.value === modelValue;
259
- });
318
+ var _a;
319
+ let option = options.find(({ value }) => value.value === modelValue);
260
320
  if (!option) {
261
- option = options.find(_ref3 => {
262
- var {
263
- label
264
- } = _ref3;
265
- return label.value === modelValue;
266
- });
321
+ option = options.find(({ label: label2 }) => label2.value === modelValue);
267
322
  }
268
- return (_option$label$value = (_option = option) == null ? void 0 : _option.label.value) != null ? _option$label$value : '';
323
+ return (_a = option == null ? void 0 : option.label.value) != null ? _a : "";
269
324
  }
270
325
  function handleFocus() {
271
- var {
272
- disabled,
273
- readonly,
274
- onFocus
275
- } = props;
276
- if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly) {
326
+ const { disabled, readonly, onFocus } = props2;
327
+ if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly) {
277
328
  return;
278
329
  }
279
- offsetY.value = toPxNum(props.offsetY);
330
+ offsetY.value = toPxNum(props2.offsetY);
280
331
  isFocus.value = true;
281
332
  call(onFocus);
282
- validateWithTrigger('onFocus');
333
+ validateWithTrigger("onFocus");
283
334
  }
284
335
  function handleBlur() {
285
- var {
286
- disabled,
287
- readonly,
288
- onBlur
289
- } = props;
290
- if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly) {
336
+ const { disabled, readonly, onBlur } = props2;
337
+ if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly) {
291
338
  return;
292
339
  }
293
340
  blur();
294
341
  call(onBlur);
295
- validateWithTrigger('onBlur');
342
+ validateWithTrigger("onBlur");
296
343
  }
297
344
  function onSelect(option) {
298
- var {
299
- disabled,
300
- readonly,
301
- multiple,
302
- onChange
303
- } = props;
304
- if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly) {
345
+ const { disabled, readonly, multiple: multiple2, onChange } = props2;
346
+ if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly) {
305
347
  return;
306
348
  }
307
- var selectedValue = multiple ? options.filter(_ref4 => {
308
- var {
309
- selected
310
- } = _ref4;
311
- return selected.value;
312
- }).map(findValueOrLabel) : findValueOrLabel(option);
313
- call(props['onUpdate:modelValue'], selectedValue);
349
+ const selectedValue = multiple2 ? options.filter(({ selected }) => selected.value).map(findValueOrLabel) : findValueOrLabel(option);
350
+ call(props2["onUpdate:modelValue"], selectedValue);
314
351
  call(onChange, selectedValue);
315
- validateWithTrigger('onChange');
316
- if (!multiple) {
352
+ validateWithTrigger("onChange");
353
+ if (!multiple2) {
317
354
  blur();
318
355
  }
319
356
  }
320
357
  function handleClear() {
321
- var {
322
- disabled,
323
- readonly,
324
- multiple,
325
- clearable,
326
- onClear
327
- } = props;
328
- if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly || !clearable) {
358
+ const { disabled, readonly, multiple: multiple2, clearable, onClear } = props2;
359
+ if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly || !clearable) {
329
360
  return;
330
361
  }
331
- var changedModelValue = multiple ? [] : undefined;
332
- call(props['onUpdate:modelValue'], changedModelValue);
362
+ const changedModelValue = multiple2 ? [] : void 0;
363
+ call(props2["onUpdate:modelValue"], changedModelValue);
333
364
  call(onClear, changedModelValue);
334
- validateWithTrigger('onClear');
365
+ validateWithTrigger("onClear");
335
366
  }
336
367
  function handleClick(e) {
337
- var {
338
- disabled,
339
- onClick
340
- } = props;
341
- if (form != null && form.disabled.value || disabled) {
368
+ const { disabled, onClick } = props2;
369
+ if ((form == null ? void 0 : form.disabled.value) || disabled) {
342
370
  return;
343
371
  }
344
372
  call(onClick, e);
345
- validateWithTrigger('onClick');
373
+ validateWithTrigger("onClick");
346
374
  }
347
375
  function handleClose(text) {
348
- var {
349
- disabled,
350
- readonly,
351
- modelValue,
352
- onClose
353
- } = props;
354
- if (form != null && form.disabled.value || form != null && form.readonly.value || disabled || readonly) {
376
+ const { disabled, readonly, modelValue, onClose } = props2;
377
+ if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly) {
355
378
  return;
356
379
  }
357
- var rawModelValue = modelValue;
358
- var option = options.find(_ref5 => {
359
- var {
360
- label
361
- } = _ref5;
362
- return label.value === text;
363
- });
364
- var currentModelValue = rawModelValue.filter(value => {
365
- var _value$value;
366
- return value !== ((_value$value = option.value.value) != null ? _value$value : option.label.value);
380
+ const rawModelValue = modelValue;
381
+ const option = options.find(({ label: label2 }) => label2.value === text);
382
+ const currentModelValue = rawModelValue.filter((value) => {
383
+ var _a;
384
+ return value !== ((_a = option.value.value) != null ? _a : option.label.value);
367
385
  });
368
- call(props['onUpdate:modelValue'], currentModelValue);
386
+ call(props2["onUpdate:modelValue"], currentModelValue);
369
387
  call(onClose, currentModelValue);
370
- validateWithTrigger('onClose');
388
+ validateWithTrigger("onClose");
371
389
  }
372
390
  function syncOptions() {
373
- var {
374
- multiple,
375
- modelValue
376
- } = props;
377
- if (multiple) {
378
- var rawModelValue = modelValue;
379
- options.forEach(option => option.sync(rawModelValue.includes(findValueOrLabel(option))));
391
+ const { multiple: multiple2, modelValue } = props2;
392
+ if (multiple2) {
393
+ const rawModelValue = modelValue;
394
+ options.forEach((option) => option.sync(rawModelValue.includes(findValueOrLabel(option))));
380
395
  } else {
381
- options.forEach(option => option.sync(modelValue === findValueOrLabel(option)));
396
+ options.forEach((option) => option.sync(modelValue === findValueOrLabel(option)));
382
397
  }
383
398
  computeLabel();
384
399
  }
385
-
386
- // expose
387
400
  function focus() {
388
- offsetY.value = toPxNum(props.offsetY);
401
+ offsetY.value = toPxNum(props2.offsetY);
389
402
  isFocus.value = true;
390
403
  showMenu.value = true;
391
404
  }
392
-
393
- // expose
394
405
  function blur() {
395
406
  isFocus.value = false;
396
407
  showMenu.value = false;
397
408
  }
398
-
399
- // expose
400
409
  function validate() {
401
- return v(props.rules, props.modelValue);
410
+ return v(props2.rules, props2.modelValue);
402
411
  }
403
-
404
- // expose
405
412
  function reset() {
406
- call(props['onUpdate:modelValue'], props.multiple ? [] : undefined);
413
+ call(props2["onUpdate:modelValue"], props2.multiple ? [] : void 0);
407
414
  resetValidation();
408
415
  }
409
416
  return {
@@ -437,4 +444,7 @@ var __sfc__ = defineComponent({
437
444
  }
438
445
  });
439
446
  __sfc__.render = __render__;
440
- export default __sfc__;
447
+ var stdin_default = __sfc__;
448
+ export {
449
+ stdin_default as default
450
+ };