yc-design-vue 1.0.2 → 1.0.4

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 (577) hide show
  1. package/es/Affix/index.vue.js +1 -1
  2. package/es/Affix/type.d.ts +3 -2
  3. package/es/Alert/index.vue2.js +1 -1
  4. package/es/Alert/type.d.ts +6 -5
  5. package/es/Anchor/Anchor.vue2.js +1 -1
  6. package/es/Anchor/AnchorLink.vue2.js +1 -1
  7. package/es/Anchor/hooks/useContext.js +1 -1
  8. package/es/Anchor/type.d.ts +4 -3
  9. package/es/AutoComplete/index.d.ts +65 -2
  10. package/es/AutoComplete/index.vue.d.ts +130 -4
  11. package/es/AutoComplete/index.vue.js +1 -1
  12. package/es/AutoComplete/type.d.ts +5 -4
  13. package/es/Avatar/Avatar.vue2.js +1 -1
  14. package/es/Avatar/AvatarGroup.vue.js +1 -1
  15. package/es/Avatar/AvatarGroup.vue2.js +3 -3
  16. package/es/Avatar/type.d.ts +4 -4
  17. package/es/BackTop/index.vue2.js +1 -1
  18. package/es/BackTop/type.d.ts +2 -1
  19. package/es/Badge/index.vue.js +1 -1
  20. package/es/Badge/index.vue2.js +3 -3
  21. package/es/Badge/type.d.ts +3 -3
  22. package/es/Breadcrumb/Breadcrumb.vue2.js +1 -1
  23. package/es/Breadcrumb/BreadcrumbItem.vue2.js +1 -1
  24. package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  25. package/es/Breadcrumb/BreadcrumbSeparator.vue2.js +1 -1
  26. package/es/Breadcrumb/type.d.ts +9 -8
  27. package/es/Button/Button.vue.js +1 -1
  28. package/es/Button/Button.vue2.js +2 -2
  29. package/es/Button/type.d.ts +4 -3
  30. package/es/Calendar/Calendar.vue2.js +1 -1
  31. package/es/Calendar/CalendarMonth.vue2.js +1 -1
  32. package/es/Calendar/CalendarYear.vue2.js +1 -1
  33. package/es/Calendar/type.d.ts +5 -4
  34. package/es/Card/CardMeta.vue2.js +1 -1
  35. package/es/Card/type.d.ts +10 -10
  36. package/es/Carousel/Carousel.vue2.js +1 -1
  37. package/es/Carousel/CarouselArrow.vue2.js +1 -1
  38. package/es/Carousel/CarouselIndicator.vue2.js +1 -1
  39. package/es/Carousel/hooks/useContext.js +1 -1
  40. package/es/Carousel/type.d.ts +3 -2
  41. package/es/Cascader/Cascader.vue2.js +1 -1
  42. package/es/Cascader/CascaderIcon.vue2.js +1 -1
  43. package/es/Cascader/CascaderOption.vue2.js +1 -1
  44. package/es/Cascader/hooks/useContext.js +1 -1
  45. package/es/Cascader/type.d.ts +10 -10
  46. package/es/Checkbox/Checkbox.vue2.js +1 -1
  47. package/es/Checkbox/hooks/useContext.d.ts +2 -5
  48. package/es/Checkbox/hooks/useContext.js +1 -1
  49. package/es/Checkbox/type.d.ts +9 -8
  50. package/es/Collapse/CollapseItem.vue2.js +1 -1
  51. package/es/Collapse/hooks/useContext.js +1 -1
  52. package/es/Collapse/type.d.ts +9 -8
  53. package/es/ColorPicker/ColorControl.vue2.js +1 -1
  54. package/es/ColorPicker/ColorInput.vue2.js +1 -1
  55. package/es/ColorPicker/ColorPalette.vue2.js +1 -1
  56. package/es/Comment/index.vue2.js +1 -1
  57. package/es/Comment/type.d.ts +7 -6
  58. package/es/ConfigProvider/index.vue.js +2 -2
  59. package/es/ConfigProvider/type.d.ts +5 -4
  60. package/es/Descriptions/ReuseItem.vue2.js +1 -1
  61. package/es/Descriptions/ReuseTd.vue2.js +1 -1
  62. package/es/Descriptions/type.d.ts +9 -9
  63. package/es/Divider/index.vue2.js +1 -1
  64. package/es/Divider/type.d.ts +2 -1
  65. package/es/Drawer/Drawer.vue2.js +1 -0
  66. package/es/Drawer/DrawerService.vue.js +1 -1
  67. package/es/Drawer/type.d.ts +5 -5
  68. package/es/Dropdown/Dropdown.vue.js +1 -1
  69. package/es/Dropdown/DropdownButton.vue.js +1 -1
  70. package/es/Dropdown/Dsubmenu.vue.d.ts +130 -4
  71. package/es/Dropdown/Dsubmenu.vue2.js +1 -1
  72. package/es/Dropdown/hooks/useContext.js +1 -1
  73. package/es/Dropdown/index.d.ts +65 -2
  74. package/es/Dropdown/type.d.ts +15 -14
  75. package/es/Empty/index.vue2.js +1 -1
  76. package/es/Empty/type.d.ts +2 -1
  77. package/es/Grid/Grid.vue2.js +1 -1
  78. package/es/Grid/GridCol.vue.js +1 -1
  79. package/es/Grid/GridItem.vue.js +1 -1
  80. package/es/Grid/GridRow.vue2.js +1 -1
  81. package/es/Grid/hooks/useContext.js +1 -1
  82. package/es/Grid/type.d.ts +6 -5
  83. package/es/Icon/index.js +1 -1
  84. package/es/Icon/index.vue2.js +1 -1
  85. package/es/Icon/type.d.ts +2 -1
  86. package/es/Image/Image.vue2.js +1 -1
  87. package/es/Image/ImagePreview.vue2.js +1 -1
  88. package/es/Image/ImagePreviewArrow.vue2.js +1 -1
  89. package/es/Image/ImagePreviewToolbar.vue2.js +1 -1
  90. package/es/Image/hooks/useContext.js +1 -1
  91. package/es/Image/type.d.ts +11 -10
  92. package/es/Input/Input.vue2.js +1 -0
  93. package/es/Input/InputSuffix.vue2.js +1 -1
  94. package/es/Input/hooks/useCursor.d.ts +2 -1
  95. package/es/Input/hooks/useCursor.js +2 -2
  96. package/es/Input/hooks/useLimitedInput.js +1 -1
  97. package/es/Input/type.d.ts +6 -5
  98. package/es/InputNumber/InputNumber.vue2.js +1 -1
  99. package/es/InputNumber/InputOperaBtn.vue2.js +1 -1
  100. package/es/InputNumber/type.d.ts +8 -8
  101. package/es/InputTag/index.vue2.js +1 -0
  102. package/es/InputTag/type.d.ts +5 -4
  103. package/es/Layout/Layout.vue.js +1 -1
  104. package/es/Layout/Layout.vue2.js +3 -3
  105. package/es/Layout/LayoutSider.vue2.js +1 -1
  106. package/es/Layout/type.d.ts +8 -7
  107. package/es/Link/index.vue2.js +1 -1
  108. package/es/Link/type.d.ts +3 -2
  109. package/es/List/hooks/useScrollReach.js +1 -1
  110. package/es/List/type.d.ts +15 -14
  111. package/es/Mention/index.d.ts +65 -2
  112. package/es/Mention/index.vue.d.ts +130 -4
  113. package/es/Mention/index.vue.js +1 -1
  114. package/es/Mention/type.d.ts +3 -2
  115. package/es/Menu/Menu.vue2.js +1 -1
  116. package/es/Menu/MenuEllipsis.vue2.js +1 -1
  117. package/es/Menu/MenuItem.vue2.js +1 -1
  118. package/es/Menu/MenuItemGroup.vue2.js +1 -1
  119. package/es/Menu/SubMenu.vue2.js +1 -1
  120. package/es/Menu/hooks/useContext.js +1 -1
  121. package/es/Menu/type.d.ts +11 -10
  122. package/es/Message/Message.vue2.js +1 -1
  123. package/es/Message/index.js +1 -1
  124. package/es/Message/type.d.ts +1 -1
  125. package/es/Modal/Modal.vue2.js +1 -0
  126. package/es/Modal/ModalService.vue.js +1 -1
  127. package/es/Modal/hooks/useModalClose.js +1 -1
  128. package/es/Modal/hooks/useModalDraggable.js +1 -1
  129. package/es/Modal/hooks/useOnBeforeClose.js +1 -1
  130. package/es/Modal/type.d.ts +5 -5
  131. package/es/Notification/Notification.vue2.js +1 -1
  132. package/es/Notification/index.js +1 -1
  133. package/es/Notification/type.d.ts +1 -1
  134. package/es/OverflowList/index.vue.js +1 -1
  135. package/es/OverflowList/index.vue2.js +3 -3
  136. package/es/OverflowList/type.d.ts +3 -2
  137. package/es/PageHeader/index.vue2.js +1 -1
  138. package/es/PageHeader/type.d.ts +7 -6
  139. package/es/Pagination/Pagination.vue2.js +1 -1
  140. package/es/Pagination/PaginationItem.vue2.js +1 -1
  141. package/es/Pagination/type.d.ts +8 -8
  142. package/es/Popconfirm/index.d.ts +65 -2
  143. package/es/Popconfirm/index.vue.d.ts +130 -4
  144. package/es/Popconfirm/index.vue.js +1 -1
  145. package/es/Popconfirm/type.d.ts +4 -4
  146. package/es/Popover/index.vue.js +1 -1
  147. package/es/Popover/type.d.ts +4 -4
  148. package/es/Progress/ProgressCircle.vue2.js +2 -2
  149. package/es/Progress/ProgressLine.vue2.js +1 -1
  150. package/es/Progress/ProgressSteps.vue.js +1 -1
  151. package/es/Radio/Radio.vue2.js +1 -1
  152. package/es/Radio/hooks/useContext.d.ts +3 -6
  153. package/es/Radio/type.d.ts +9 -8
  154. package/es/Rate/index.vue2.js +1 -1
  155. package/es/Rate/type.d.ts +3 -2
  156. package/es/ResizeBox/index.vue2.js +1 -1
  157. package/es/ResizeBox/type.d.ts +6 -5
  158. package/es/Result/type.d.ts +6 -5
  159. package/es/Scrollbar/ScrollbarTrack.vue2.js +1 -1
  160. package/es/Scrollbar/type.d.ts +2 -2
  161. package/es/Select/Option.vue2.js +1 -1
  162. package/es/Select/Select.vue.d.ts +130 -4
  163. package/es/Select/Select.vue2.js +1 -1
  164. package/es/Select/SelectIcon.vue2.js +1 -1
  165. package/es/Select/SelectRealList.vue2.js +1 -1
  166. package/es/Select/SelectVirtualList.vue2.js +1 -1
  167. package/es/Select/hooks/useContext.js +1 -1
  168. package/es/Select/hooks/useSelectOptions.js +1 -1
  169. package/es/Select/index.d.ts +65 -2
  170. package/es/Select/type.d.ts +19 -18
  171. package/es/Skeleton/SkeletonLine.vue2.js +1 -1
  172. package/es/Skeleton/type.d.ts +3 -2
  173. package/es/Slider/SliderBtn.vue2.js +1 -1
  174. package/es/Slider/hooks/useContext.js +1 -1
  175. package/es/Slider/hooks/useSliderDraggable.js +1 -1
  176. package/es/Space/index.vue.js +1 -1
  177. package/es/Space/index.vue2.js +3 -3
  178. package/es/Space/type.d.ts +3 -2
  179. package/es/Spin/type.d.ts +4 -3
  180. package/es/Split/index.vue2.js +1 -1
  181. package/es/Split/type.d.ts +5 -4
  182. package/es/Statistic/Countdown.vue.js +1 -1
  183. package/es/Statistic/Statistic.vue2.js +1 -1
  184. package/es/Statistic/type.d.ts +7 -7
  185. package/es/Steps/Step.vue2.js +1 -1
  186. package/es/Steps/hooks/useContext.js +1 -1
  187. package/es/Steps/type.d.ts +8 -7
  188. package/es/Switch/index.vue.js +1 -1
  189. package/es/Switch/index.vue2.js +3 -3
  190. package/es/Switch/type.d.ts +5 -4
  191. package/es/Tabs/TabButton.vue2.js +1 -1
  192. package/es/Tabs/TabPane.vue.js +1 -1
  193. package/es/Tabs/Tabs.vue.js +1 -1
  194. package/es/Tabs/Tabs.vue2.js +3 -3
  195. package/es/Tabs/TabsNavInk.vue2.js +1 -1
  196. package/es/Tabs/TabsTab.vue2.js +1 -1
  197. package/es/Tabs/hooks/useTabsScroll.js +1 -1
  198. package/es/Tabs/type.d.ts +5 -4
  199. package/es/Tag/index.vue2.js +1 -0
  200. package/es/Tag/type.d.ts +4 -3
  201. package/es/Textarea/hooks/useTextareaHeight.js +1 -1
  202. package/es/Textarea/index.vue2.js +1 -1
  203. package/es/TimePicker/TimePicker.vue2.js +1 -1
  204. package/es/TimePicker/TimePickerPanel.vue2.js +1 -1
  205. package/es/TimePicker/hooks/useContext.js +1 -1
  206. package/es/TimePicker/type.d.ts +4 -3
  207. package/es/Timeline/Timeline.vue2.js +1 -1
  208. package/es/Timeline/hooks/useContext.js +1 -1
  209. package/es/Timeline/type.d.ts +6 -5
  210. package/es/Tooltip/index.vue.js +1 -1
  211. package/es/Tooltip/type.d.ts +3 -3
  212. package/es/Transfer/Transfer.vue2.js +1 -1
  213. package/es/Transfer/TransferPanel.vue2.js +3 -3
  214. package/es/Transfer/hooks/useContext.js +1 -1
  215. package/es/Transfer/type.d.ts +13 -12
  216. package/es/Trigger/hooks/useContext.js +1 -1
  217. package/es/Trigger/hooks/useTriggerPosition.d.ts +2 -2
  218. package/es/Trigger/hooks/useTriggerPosition.js +11 -20
  219. package/es/Trigger/index.d.ts +63 -2
  220. package/es/Trigger/index.vue.d.ts +130 -3
  221. package/es/Trigger/index.vue.js +1 -1
  222. package/es/Trigger/index.vue2.js +3 -3
  223. package/es/Trigger/type.d.ts +3 -3
  224. package/es/Typography/TypographyBase.vue2.js +3 -3
  225. package/es/Typography/type.d.ts +8 -7
  226. package/es/Watermark/index.vue2.js +1 -1
  227. package/es/Watermark/type.d.ts +2 -1
  228. package/es/_shared/components/ExpandTransition.vue3.js +1 -1
  229. package/es/_shared/{icons/_Icon.vue2.js → components/Icon.vue2.js} +3 -3
  230. package/es/_shared/{icons/_Icon.vue3.js → components/Icon.vue3.js} +2 -2
  231. package/es/_shared/components/IconButton.vue3.js +1 -1
  232. package/es/_shared/components/index.d.ts +1 -0
  233. package/es/_shared/constants/index.js +1 -1
  234. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  235. package/es/_shared/icons/IconArrowRight.vue.js +1 -1
  236. package/es/_shared/icons/IconCheck.vue.js +1 -1
  237. package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  238. package/es/_shared/icons/IconClose.vue.js +1 -1
  239. package/es/_shared/icons/IconCopy.vue.js +16 -1
  240. package/es/_shared/icons/IconCopy.vue2.js +1 -16
  241. package/es/_shared/icons/IconDelete.vue.js +1 -16
  242. package/es/_shared/icons/IconDelete.vue2.js +16 -1
  243. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  244. package/es/_shared/icons/IconEdit.vue.js +16 -1
  245. package/es/_shared/icons/IconEdit.vue2.js +1 -16
  246. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  247. package/es/_shared/icons/IconError.vue.js +1 -1
  248. package/es/_shared/icons/IconExclamation.vue.js +27 -1
  249. package/es/_shared/icons/IconExclamation.vue2.js +1 -27
  250. package/es/_shared/icons/IconEyeClose.vue2.js +1 -1
  251. package/es/_shared/icons/IconEyeOpen.vue2.js +1 -1
  252. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  253. package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
  254. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  255. package/es/_shared/icons/IconInfo.vue.js +1 -1
  256. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  257. package/es/_shared/icons/IconLink.vue.js +1 -1
  258. package/es/_shared/icons/IconLoading.vue.js +1 -1
  259. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  260. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  261. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  262. package/es/_shared/icons/IconMore.vue.js +1 -1
  263. package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
  264. package/es/_shared/icons/IconPlus.vue.js +1 -1
  265. package/es/_shared/icons/IconRight.vue.js +1 -1
  266. package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
  267. package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
  268. package/es/_shared/icons/IconSearch.vue.js +1 -16
  269. package/es/_shared/icons/IconSearch.vue2.js +16 -1
  270. package/es/_shared/icons/IconSeparator.vue2.js +1 -1
  271. package/es/_shared/icons/IconStar.vue.js +1 -1
  272. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  273. package/es/_shared/icons/IconTime.vue.js +1 -1
  274. package/es/_shared/icons/IconToTop.vue.js +1 -1
  275. package/es/_shared/icons/IconWarning.vue.js +1 -1
  276. package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
  277. package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
  278. package/es/_shared/utils/control.js +1 -1
  279. package/es/_shared/utils/dom.d.ts +4 -4
  280. package/es/_shared/utils/dom.js +6 -6
  281. package/es/_shared/utils/fn.d.ts +3 -3
  282. package/es/_shared/utils/fn.js +6 -6
  283. package/es/_shared/utils/global-config.d.ts +4 -2
  284. package/es/_shared/utils/global-config.js +1 -1
  285. package/es/index.d.ts +65 -2
  286. package/es/style.css +1 -1
  287. package/lib/Affix/index.vue.js +1 -1
  288. package/lib/Affix/type.d.ts +3 -2
  289. package/lib/Alert/index.vue2.js +1 -1
  290. package/lib/Alert/type.d.ts +6 -5
  291. package/lib/Anchor/Anchor.vue2.js +1 -1
  292. package/lib/Anchor/AnchorLink.vue2.js +1 -1
  293. package/lib/Anchor/hooks/useContext.js +1 -1
  294. package/lib/Anchor/type.d.ts +4 -3
  295. package/lib/AutoComplete/index.d.ts +65 -2
  296. package/lib/AutoComplete/index.vue.d.ts +130 -4
  297. package/lib/AutoComplete/index.vue.js +1 -1
  298. package/lib/AutoComplete/type.d.ts +5 -4
  299. package/lib/Avatar/Avatar.vue2.js +1 -1
  300. package/lib/Avatar/AvatarGroup.vue.js +1 -1
  301. package/lib/Avatar/AvatarGroup.vue2.js +1 -1
  302. package/lib/Avatar/type.d.ts +4 -4
  303. package/lib/BackTop/index.vue2.js +1 -1
  304. package/lib/BackTop/type.d.ts +2 -1
  305. package/lib/Badge/index.vue.js +1 -1
  306. package/lib/Badge/index.vue2.js +1 -1
  307. package/lib/Badge/type.d.ts +3 -3
  308. package/lib/Breadcrumb/Breadcrumb.vue2.js +1 -1
  309. package/lib/Breadcrumb/BreadcrumbItem.vue2.js +1 -1
  310. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  311. package/lib/Breadcrumb/BreadcrumbSeparator.vue2.js +1 -1
  312. package/lib/Breadcrumb/type.d.ts +9 -8
  313. package/lib/Button/Button.vue.js +1 -1
  314. package/lib/Button/Button.vue2.js +1 -1
  315. package/lib/Button/type.d.ts +4 -3
  316. package/lib/Calendar/Calendar.vue2.js +1 -1
  317. package/lib/Calendar/CalendarMonth.vue2.js +1 -1
  318. package/lib/Calendar/CalendarYear.vue2.js +1 -1
  319. package/lib/Calendar/type.d.ts +5 -4
  320. package/lib/Card/CardMeta.vue2.js +1 -1
  321. package/lib/Card/type.d.ts +10 -10
  322. package/lib/Carousel/Carousel.vue2.js +1 -1
  323. package/lib/Carousel/CarouselArrow.vue2.js +1 -1
  324. package/lib/Carousel/CarouselIndicator.vue2.js +1 -1
  325. package/lib/Carousel/hooks/useContext.js +1 -1
  326. package/lib/Carousel/type.d.ts +3 -2
  327. package/lib/Cascader/Cascader.vue2.js +1 -1
  328. package/lib/Cascader/CascaderIcon.vue2.js +1 -1
  329. package/lib/Cascader/CascaderOption.vue2.js +1 -1
  330. package/lib/Cascader/hooks/useContext.js +1 -1
  331. package/lib/Cascader/type.d.ts +10 -10
  332. package/lib/Checkbox/Checkbox.vue2.js +1 -1
  333. package/lib/Checkbox/hooks/useContext.d.ts +2 -5
  334. package/lib/Checkbox/hooks/useContext.js +1 -1
  335. package/lib/Checkbox/type.d.ts +9 -8
  336. package/lib/Collapse/CollapseItem.vue2.js +1 -1
  337. package/lib/Collapse/hooks/useContext.js +1 -1
  338. package/lib/Collapse/type.d.ts +9 -8
  339. package/lib/ColorPicker/ColorControl.vue2.js +1 -1
  340. package/lib/ColorPicker/ColorInput.vue2.js +1 -1
  341. package/lib/ColorPicker/ColorPalette.vue2.js +1 -1
  342. package/lib/Comment/index.vue2.js +1 -1
  343. package/lib/Comment/type.d.ts +7 -6
  344. package/lib/ConfigProvider/index.vue.js +1 -1
  345. package/lib/ConfigProvider/type.d.ts +5 -4
  346. package/lib/Descriptions/ReuseItem.vue2.js +1 -1
  347. package/lib/Descriptions/ReuseTd.vue2.js +1 -1
  348. package/lib/Descriptions/type.d.ts +9 -9
  349. package/lib/Divider/index.vue2.js +1 -1
  350. package/lib/Divider/type.d.ts +2 -1
  351. package/lib/Drawer/Drawer.vue2.js +1 -1
  352. package/lib/Drawer/DrawerService.vue.js +1 -1
  353. package/lib/Drawer/type.d.ts +5 -5
  354. package/lib/Dropdown/Dropdown.vue.js +1 -1
  355. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  356. package/lib/Dropdown/Dsubmenu.vue.d.ts +130 -4
  357. package/lib/Dropdown/Dsubmenu.vue2.js +1 -1
  358. package/lib/Dropdown/hooks/useContext.js +1 -1
  359. package/lib/Dropdown/index.d.ts +65 -2
  360. package/lib/Dropdown/type.d.ts +15 -14
  361. package/lib/Empty/index.vue2.js +1 -1
  362. package/lib/Empty/type.d.ts +2 -1
  363. package/lib/Grid/Grid.vue2.js +1 -1
  364. package/lib/Grid/GridCol.vue.js +1 -1
  365. package/lib/Grid/GridItem.vue.js +1 -1
  366. package/lib/Grid/GridRow.vue2.js +1 -1
  367. package/lib/Grid/hooks/useContext.js +1 -1
  368. package/lib/Grid/type.d.ts +6 -5
  369. package/lib/Icon/index.js +1 -1
  370. package/lib/Icon/index.vue2.js +1 -1
  371. package/lib/Icon/type.d.ts +2 -1
  372. package/lib/Image/Image.vue2.js +1 -1
  373. package/lib/Image/ImagePreview.vue2.js +1 -1
  374. package/lib/Image/ImagePreviewArrow.vue2.js +1 -1
  375. package/lib/Image/ImagePreviewToolbar.vue2.js +1 -1
  376. package/lib/Image/hooks/useContext.js +1 -1
  377. package/lib/Image/type.d.ts +11 -10
  378. package/lib/Input/Input.vue2.js +1 -1
  379. package/lib/Input/InputSuffix.vue2.js +1 -1
  380. package/lib/Input/hooks/useCursor.d.ts +2 -1
  381. package/lib/Input/hooks/useCursor.js +1 -1
  382. package/lib/Input/hooks/useLimitedInput.js +1 -1
  383. package/lib/Input/type.d.ts +6 -5
  384. package/lib/InputNumber/InputNumber.vue2.js +1 -1
  385. package/lib/InputNumber/InputOperaBtn.vue2.js +1 -1
  386. package/lib/InputNumber/type.d.ts +8 -8
  387. package/lib/InputTag/index.vue2.js +1 -1
  388. package/lib/InputTag/type.d.ts +5 -4
  389. package/lib/Layout/Layout.vue.js +1 -1
  390. package/lib/Layout/Layout.vue2.js +1 -1
  391. package/lib/Layout/LayoutSider.vue2.js +1 -1
  392. package/lib/Layout/type.d.ts +8 -7
  393. package/lib/Link/index.vue2.js +1 -1
  394. package/lib/Link/type.d.ts +3 -2
  395. package/lib/List/hooks/useScrollReach.js +1 -1
  396. package/lib/List/type.d.ts +15 -14
  397. package/lib/Mention/index.d.ts +65 -2
  398. package/lib/Mention/index.vue.d.ts +130 -4
  399. package/lib/Mention/index.vue.js +1 -1
  400. package/lib/Mention/type.d.ts +3 -2
  401. package/lib/Menu/Menu.vue2.js +1 -1
  402. package/lib/Menu/MenuEllipsis.vue2.js +1 -1
  403. package/lib/Menu/MenuItem.vue2.js +1 -1
  404. package/lib/Menu/MenuItemGroup.vue2.js +1 -1
  405. package/lib/Menu/SubMenu.vue2.js +1 -1
  406. package/lib/Menu/hooks/useContext.js +1 -1
  407. package/lib/Menu/type.d.ts +11 -10
  408. package/lib/Message/Message.vue2.js +1 -1
  409. package/lib/Message/index.js +1 -1
  410. package/lib/Message/type.d.ts +1 -1
  411. package/lib/Modal/Modal.vue2.js +1 -1
  412. package/lib/Modal/ModalService.vue.js +1 -1
  413. package/lib/Modal/hooks/useModalClose.js +1 -1
  414. package/lib/Modal/hooks/useModalDraggable.js +1 -1
  415. package/lib/Modal/hooks/useOnBeforeClose.js +1 -1
  416. package/lib/Modal/type.d.ts +5 -5
  417. package/lib/Notification/Notification.vue2.js +1 -1
  418. package/lib/Notification/index.js +1 -1
  419. package/lib/Notification/type.d.ts +1 -1
  420. package/lib/OverflowList/index.vue.js +1 -1
  421. package/lib/OverflowList/index.vue2.js +1 -1
  422. package/lib/OverflowList/type.d.ts +3 -2
  423. package/lib/PageHeader/index.vue2.js +1 -1
  424. package/lib/PageHeader/type.d.ts +7 -6
  425. package/lib/Pagination/Pagination.vue2.js +1 -1
  426. package/lib/Pagination/PaginationItem.vue2.js +1 -1
  427. package/lib/Pagination/type.d.ts +8 -8
  428. package/lib/Popconfirm/index.d.ts +65 -2
  429. package/lib/Popconfirm/index.vue.d.ts +130 -4
  430. package/lib/Popconfirm/index.vue.js +1 -1
  431. package/lib/Popconfirm/type.d.ts +4 -4
  432. package/lib/Popover/index.vue.js +1 -1
  433. package/lib/Popover/type.d.ts +4 -4
  434. package/lib/Progress/ProgressCircle.vue2.js +1 -1
  435. package/lib/Progress/ProgressLine.vue2.js +1 -1
  436. package/lib/Progress/ProgressSteps.vue.js +1 -1
  437. package/lib/Radio/Radio.vue2.js +1 -1
  438. package/lib/Radio/hooks/useContext.d.ts +3 -6
  439. package/lib/Radio/type.d.ts +9 -8
  440. package/lib/Rate/index.vue2.js +1 -1
  441. package/lib/Rate/type.d.ts +3 -2
  442. package/lib/ResizeBox/index.vue2.js +1 -1
  443. package/lib/ResizeBox/type.d.ts +6 -5
  444. package/lib/Result/type.d.ts +6 -5
  445. package/lib/Scrollbar/ScrollbarTrack.vue2.js +1 -1
  446. package/lib/Scrollbar/type.d.ts +2 -2
  447. package/lib/Select/Option.vue2.js +1 -1
  448. package/lib/Select/Select.vue.d.ts +130 -4
  449. package/lib/Select/Select.vue2.js +1 -1
  450. package/lib/Select/SelectIcon.vue2.js +1 -1
  451. package/lib/Select/SelectRealList.vue2.js +1 -1
  452. package/lib/Select/SelectVirtualList.vue2.js +1 -1
  453. package/lib/Select/hooks/useContext.js +1 -1
  454. package/lib/Select/hooks/useSelectOptions.js +1 -1
  455. package/lib/Select/index.d.ts +65 -2
  456. package/lib/Select/type.d.ts +19 -18
  457. package/lib/Skeleton/SkeletonLine.vue2.js +1 -1
  458. package/lib/Skeleton/type.d.ts +3 -2
  459. package/lib/Slider/SliderBtn.vue2.js +1 -1
  460. package/lib/Slider/hooks/useContext.js +1 -1
  461. package/lib/Slider/hooks/useSliderDraggable.js +1 -1
  462. package/lib/Space/index.vue.js +1 -1
  463. package/lib/Space/index.vue2.js +1 -1
  464. package/lib/Space/type.d.ts +3 -2
  465. package/lib/Spin/type.d.ts +4 -3
  466. package/lib/Split/index.vue2.js +1 -1
  467. package/lib/Split/type.d.ts +5 -4
  468. package/lib/Statistic/Countdown.vue.js +1 -1
  469. package/lib/Statistic/Statistic.vue2.js +1 -1
  470. package/lib/Statistic/type.d.ts +7 -7
  471. package/lib/Steps/Step.vue2.js +1 -1
  472. package/lib/Steps/hooks/useContext.js +1 -1
  473. package/lib/Steps/type.d.ts +8 -7
  474. package/lib/Switch/index.vue.js +1 -1
  475. package/lib/Switch/index.vue2.js +1 -1
  476. package/lib/Switch/type.d.ts +5 -4
  477. package/lib/Tabs/TabButton.vue2.js +1 -1
  478. package/lib/Tabs/TabPane.vue.js +1 -1
  479. package/lib/Tabs/Tabs.vue.js +1 -1
  480. package/lib/Tabs/Tabs.vue2.js +1 -1
  481. package/lib/Tabs/TabsNavInk.vue2.js +1 -1
  482. package/lib/Tabs/TabsTab.vue2.js +1 -1
  483. package/lib/Tabs/hooks/useTabsScroll.js +1 -1
  484. package/lib/Tabs/type.d.ts +5 -4
  485. package/lib/Tag/index.vue2.js +1 -1
  486. package/lib/Tag/type.d.ts +4 -3
  487. package/lib/Textarea/hooks/useTextareaHeight.js +1 -1
  488. package/lib/Textarea/index.vue2.js +1 -1
  489. package/lib/TimePicker/TimePicker.vue2.js +1 -1
  490. package/lib/TimePicker/TimePickerPanel.vue2.js +1 -1
  491. package/lib/TimePicker/hooks/useContext.js +1 -1
  492. package/lib/TimePicker/type.d.ts +4 -3
  493. package/lib/Timeline/Timeline.vue2.js +1 -1
  494. package/lib/Timeline/hooks/useContext.js +1 -1
  495. package/lib/Timeline/type.d.ts +6 -5
  496. package/lib/Tooltip/index.vue.js +1 -1
  497. package/lib/Tooltip/type.d.ts +3 -3
  498. package/lib/Transfer/Transfer.vue2.js +1 -1
  499. package/lib/Transfer/TransferPanel.vue2.js +1 -1
  500. package/lib/Transfer/hooks/useContext.js +1 -1
  501. package/lib/Transfer/type.d.ts +13 -12
  502. package/lib/Trigger/hooks/useContext.js +1 -1
  503. package/lib/Trigger/hooks/useTriggerPosition.d.ts +2 -2
  504. package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
  505. package/lib/Trigger/index.d.ts +63 -2
  506. package/lib/Trigger/index.vue.d.ts +130 -3
  507. package/lib/Trigger/index.vue.js +1 -1
  508. package/lib/Trigger/index.vue2.js +1 -1
  509. package/lib/Trigger/type.d.ts +3 -3
  510. package/lib/Typography/TypographyBase.vue2.js +1 -1
  511. package/lib/Typography/type.d.ts +8 -7
  512. package/lib/Watermark/index.vue2.js +1 -1
  513. package/lib/Watermark/type.d.ts +2 -1
  514. package/lib/_shared/components/ExpandTransition.vue3.js +1 -1
  515. package/lib/_shared/components/Icon.vue2.js +1 -0
  516. package/lib/_shared/components/Icon.vue3.js +1 -0
  517. package/lib/_shared/components/IconButton.vue3.js +1 -1
  518. package/lib/_shared/components/index.d.ts +1 -0
  519. package/lib/_shared/constants/index.js +1 -1
  520. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  521. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  522. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  523. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  524. package/lib/_shared/icons/IconClose.vue.js +1 -1
  525. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  526. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  527. package/lib/_shared/icons/IconDelete.vue.js +1 -1
  528. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  529. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  530. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  531. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  532. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  533. package/lib/_shared/icons/IconError.vue.js +1 -1
  534. package/lib/_shared/icons/IconExclamation.vue.js +1 -1
  535. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  536. package/lib/_shared/icons/IconEyeClose.vue2.js +1 -1
  537. package/lib/_shared/icons/IconEyeOpen.vue2.js +1 -1
  538. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  539. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  540. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  541. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  542. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  543. package/lib/_shared/icons/IconLink.vue.js +1 -1
  544. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  545. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  546. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  547. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  548. package/lib/_shared/icons/IconMore.vue.js +1 -1
  549. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  550. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  551. package/lib/_shared/icons/IconRight.vue.js +1 -1
  552. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  553. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  554. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  555. package/lib/_shared/icons/IconSearch.vue2.js +1 -1
  556. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  557. package/lib/_shared/icons/IconStar.vue.js +1 -1
  558. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  559. package/lib/_shared/icons/IconTime.vue.js +1 -1
  560. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  561. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  562. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  563. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  564. package/lib/_shared/utils/control.js +1 -1
  565. package/lib/_shared/utils/dom.d.ts +4 -4
  566. package/lib/_shared/utils/dom.js +1 -1
  567. package/lib/_shared/utils/fn.d.ts +3 -3
  568. package/lib/_shared/utils/fn.js +1 -1
  569. package/lib/_shared/utils/global-config.d.ts +4 -2
  570. package/lib/_shared/utils/global-config.js +1 -1
  571. package/lib/index.d.ts +65 -2
  572. package/lib/style.css +1 -1
  573. package/package.json +2 -2
  574. package/lib/_shared/icons/_Icon.vue2.js +0 -1
  575. package/lib/_shared/icons/_Icon.vue3.js +0 -1
  576. /package/es/_shared/{icons/_Icon.vue.d.ts → components/Icon.vue.d.ts} +0 -0
  577. /package/lib/_shared/{icons/_Icon.vue.d.ts → components/Icon.vue.d.ts} +0 -0
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const t=require("../_shared/utils/control.js"),o=require("../Trigger/index.js"),r={key:0,class:"yc-popover-title"},s={class:"yc-popover-content"},l=e.defineComponent({name:"Popover",__name:"index",props:{popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},title:{default:""},content:{default:""},trigger:{default:"hover"},position:{default:"bottom"},contentClass:{default:""},contentStyle:{default:()=>({})},arrowClass:{default:""},arrowStyle:{default:()=>({})},popupContainer:{default:void 0},triggerProps:{default:()=>({})}},emits:["update:popupVisible","popup-visible-change"],setup(l,{expose:i,emit:p}){const n=l,a=p,{popupVisible:u,defaultPopupVisible:c}=e.toRefs(n),d=t(u,c.value,e=>{a("update:popupVisible",e),a("popup-visible-change",e)});return i({show(){d.value=!0},hide(){d.value=!1}}),(t,l)=>(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({"popup-visible":e.unref(d),"onUpdate:popupVisible":l[0]||(l[0]=t=>e.isRef(d)?d.value=t:null),trigger:t.trigger,position:t.position,"popup-container":t.popupContainer,"arrow-class":["yc-popover-popup-arrow ",t.arrowClass],"arrow-style":t.arrowStyle,"content-class":["yc-popover-popup-content",t.contentClass],"content-style":t.contentStyle,"popup-offset":10,class:["yc-popover",t.$attrs.class],style:t.$attrs.style,"animation-name":"zoom-in-fade-out","need-transform-origin":"","show-arrow":""},t.triggerProps),{content:e.withCtx(()=>[t.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",s,[e.renderSlot(t.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)])])]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["popup-visible","trigger","position","popup-container","arrow-class","arrow-style","content-class","content-style","class","style"]))}});module.exports=l;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const t=require("../_shared/utils/control.js"),o=require("../Trigger/index.js"),r={key:0,class:"yc-popover-title"},s={class:"yc-popover-content"},l=e.defineComponent({name:"Popover",__name:"index",props:{popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},title:{default:""},content:{default:""},trigger:{default:"hover"},position:{default:"bottom"},contentClass:{default:""},contentStyle:{default:()=>({})},arrowClass:{default:""},arrowStyle:{default:()=>({})},popupContainer:{default:void 0},triggerProps:{default:()=>({})}},emits:["update:popupVisible","popup-visible-change"],setup(l,{expose:p,emit:i}){const n=l,a=i,{popupVisible:u,defaultPopupVisible:c}=e.toRefs(n),d=t(u,c.value,e=>{a("update:popupVisible",e),a("popup-visible-change",e)});return p({show(){d.value=!0},hide(){d.value=!1}}),(t,l)=>(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({"popup-visible":e.unref(d),"onUpdate:popupVisible":l[0]||(l[0]=t=>e.isRef(d)?d.value=t:null),trigger:t.trigger,position:t.position,"popup-container":t.popupContainer,"arrow-class":["yc-popover-popup-arrow ",t.arrowClass],"arrow-style":t.arrowStyle,"content-class":["yc-popover-popup-content",t.contentClass],"content-style":t.contentStyle,"popup-offset":10,class:["yc-popover",t.$attrs.class],style:t.$attrs.style,"animation-name":"zoom-in-fade-out","need-transform-origin":"","show-arrow":""},t.triggerProps),{content:e.withCtx(()=>[t.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",s,[e.renderSlot(t.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)])])]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["popup-visible","trigger","position","popup-container","arrow-class","arrow-style","content-class","content-style","class","style"]))}});module.exports=l;
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  import { ClassName, PopupContainer } from '../_shared/type';
3
3
  import { TriggerPostion, TriggerProps, TriggerType } from '../Trigger';
4
4
  export interface PopoverProps {
@@ -20,9 +20,9 @@ export interface PopoverEmits {
20
20
  (e: 'popup-visible-change', value: boolean): void;
21
21
  }
22
22
  export interface PopoverSlots {
23
- default(): void;
24
- content(): void;
25
- title(): void;
23
+ default?: () => VNode[];
24
+ content?: () => VNode[];
25
+ title?: () => VNode[];
26
26
  }
27
27
  export interface PopoverExpose {
28
28
  hide(): void;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const r=require("../_shared/utils/fn.js"),l=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("../_shared/icons/IconCheck.vue.js"),t=require("../_shared/icons/IconExclamation.vue2.js"),s=require("../_shared/constants/index.js"),c=["aria-valuenow"],a=["viewBox"],n={key:0},u=["id"],i=["offset","stop-color"],m=["cx","cy","r","stroke-width"],d=["cx","cy","r","stroke-width"],p={key:2,class:e.normalizeClass("yc-progress-circle-text")},k=e.defineComponent({__name:"ProgressCircle",props:{type:{},percent:{},status:{},size:{},text:{},showText:{type:Boolean},width:{},strokeWidth:{},pathStrokeWidth:{},color:{},trackColor:{}},setup(k){const v=k,{size:y,width:f,color:h,strokeWidth:x,pathStrokeWidth:B}=e.toRefs(v);let _=0;const g=e.computed(()=>l.isObject(h.value)),C=e.computed(()=>x.value??("mini"===y.value?f.value/2:{mini:4,small:3,medium:4,large:4}[y.value])),E=e.computed(()=>B.value?B.value:"mini"===y.value?C.value:Math.max(2,C.value-2)),w=e.computed(()=>(f.value-C.value)/2),j=e.computed(()=>2*Math.PI*w.value),z=e.computed(()=>f.value/2),O=e.computed(()=>(_+=1,`yc-progress-circle-linear-gradient-${_}`));return(k,v)=>(e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":k.percent,class:e.normalizeClass("yc-progress-circle-wrapper"),style:e.normalizeStyle({width:e.unref(r.valueToPx)(e.unref(f)),height:e.unref(r.valueToPx)(e.unref(f))})},["circle"===k.type&&"mini"===e.unref(y)&&"success"===k.status?(e.openBlock(),e.createBlock(e.unref(o),{key:0,style:e.normalizeStyle({fontSize:e.unref(f)-2,color:e.unref(h)??e.unref(s.TYPE_ICON_COLOR_MAP).success})},null,8,["style"])):(e.openBlock(),e.createElementBlock("svg",{key:1,viewBox:`0 0 ${e.unref(f)} ${e.unref(f)}`,class:e.normalizeClass("yc-progress-circle-svg")},[e.unref(l.isObject)(e.unref(h))?(e.openBlock(),e.createElementBlock("defs",n,[e.createElementVNode("linearGradient",{id:O.value,x1:"0",y1:"1",x2:"0",y2:"0"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(e.unref(h)),r=>(e.openBlock(),e.createElementBlock("stop",{key:r,offset:r,"stop-color":e.unref(h)[r]},null,8,i))),128))],8,u)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{class:e.normalizeClass("yc-progress-circle-bg"),fill:"none",cx:z.value,cy:z.value,r:w.value,"stroke-width":E.value,style:e.normalizeStyle({stroke:k.trackColor})},null,12,m),e.createElementVNode("circle",{class:e.normalizeClass("yc-progress-circle-bar"),fill:"none",cx:z.value,cy:z.value,r:w.value,"stroke-width":C.value,style:e.normalizeStyle({stroke:g.value?`url(#${O.value})`:e.unref(h),strokeDasharray:j.value,strokeDashoffset:(k.percent>=1?0:1-k.percent)*j.value})},null,12,d)],8,a)),k.showText&&"mini"!==e.unref(y)?(e.openBlock(),e.createElementBlock("div",p,[e.renderSlot(k.$slots,"text",{percent:k.percent},()=>["danger"===k.status?(e.openBlock(),e.createBlock(e.unref(t),{key:0,color:e.unref(s.TYPE_ICON_COLOR_MAP).error},null,8,["color"])):"success"===k.status?(e.openBlock(),e.createBlock(e.unref(o),{key:1,color:e.unref(s.TYPE_ICON_COLOR_MAP).success},null,8,["color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(k.text),1)],64))],!0)])):e.createCommentVNode("",!0)],12,c))}});module.exports=k;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const r=require("../_shared/utils/fn.js"),l=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("../_shared/icons/IconCheck.vue.js"),t=require("../_shared/icons/IconExclamation.vue.js"),s=require("../_shared/constants/index.js"),c=["aria-valuenow"],a=["viewBox"],n={key:0},u=["id"],i=["offset","stop-color"],m=["cx","cy","r","stroke-width"],d=["cx","cy","r","stroke-width"],p={key:2,class:e.normalizeClass("yc-progress-circle-text")},k=e.defineComponent({__name:"ProgressCircle",props:{type:{},percent:{},status:{},size:{},text:{},showText:{type:Boolean},width:{},strokeWidth:{},pathStrokeWidth:{},color:{},trackColor:{}},setup(k){const v=k,{size:y,width:f,color:h,strokeWidth:x,pathStrokeWidth:B}=e.toRefs(v);let _=0;const g=e.computed(()=>l.isObject(h.value)),C=e.computed(()=>x.value??("mini"===y.value?f.value/2:{mini:4,small:3,medium:4,large:4}[y.value])),E=e.computed(()=>B.value?B.value:"mini"===y.value?C.value:Math.max(2,C.value-2)),w=e.computed(()=>(f.value-C.value)/2),j=e.computed(()=>2*Math.PI*w.value),z=e.computed(()=>f.value/2),O=e.computed(()=>(_+=1,`yc-progress-circle-linear-gradient-${_}`));return(k,v)=>(e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":k.percent,class:e.normalizeClass("yc-progress-circle-wrapper"),style:e.normalizeStyle({width:e.unref(r.valueToPx)(e.unref(f)),height:e.unref(r.valueToPx)(e.unref(f))})},["circle"===k.type&&"mini"===e.unref(y)&&"success"===k.status?(e.openBlock(),e.createBlock(e.unref(o),{key:0,style:e.normalizeStyle({fontSize:e.unref(f)-2,color:e.unref(h)??e.unref(s.TYPE_ICON_COLOR_MAP).success})},null,8,["style"])):(e.openBlock(),e.createElementBlock("svg",{key:1,viewBox:`0 0 ${e.unref(f)} ${e.unref(f)}`,class:e.normalizeClass("yc-progress-circle-svg")},[e.unref(l.isObject)(e.unref(h))?(e.openBlock(),e.createElementBlock("defs",n,[e.createElementVNode("linearGradient",{id:O.value,x1:"0",y1:"1",x2:"0",y2:"0"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(e.unref(h)),r=>(e.openBlock(),e.createElementBlock("stop",{key:r,offset:r,"stop-color":e.unref(h)[r]},null,8,i))),128))],8,u)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{class:e.normalizeClass("yc-progress-circle-bg"),fill:"none",cx:z.value,cy:z.value,r:w.value,"stroke-width":E.value,style:e.normalizeStyle({stroke:k.trackColor})},null,12,m),e.createElementVNode("circle",{class:e.normalizeClass("yc-progress-circle-bar"),fill:"none",cx:z.value,cy:z.value,r:w.value,"stroke-width":C.value,style:e.normalizeStyle({stroke:g.value?`url(#${O.value})`:e.unref(h),strokeDasharray:j.value,strokeDashoffset:(k.percent>=1?0:1-k.percent)*j.value})},null,12,d)],8,a)),k.showText&&"mini"!==e.unref(y)?(e.openBlock(),e.createElementBlock("div",p,[e.renderSlot(k.$slots,"text",{percent:k.percent},()=>["danger"===k.status?(e.openBlock(),e.createBlock(e.unref(t),{key:0,color:e.unref(s.TYPE_ICON_COLOR_MAP).error},null,8,["color"])):"success"===k.status?(e.openBlock(),e.createBlock(e.unref(o),{key:1,color:e.unref(s.TYPE_ICON_COLOR_MAP).success},null,8,["color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(k.text),1)],64))],!0)])):e.createCommentVNode("",!0)],12,c))}});module.exports=k;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),r=require("../_shared/constants/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const o=require("../_shared/utils/fn.js"),t=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const s=["aria-valuenow"],l={key:0,class:"yc-progress-line-text"},a=e.defineComponent({__name:"ProgressLine",props:{size:{},percent:{},status:{},showText:{type:Boolean},text:{},width:{},strokeWidth:{},color:{},trackColor:{}},setup(a){const n=a,{width:i,trackColor:u,color:c,percent:d,size:m,strokeWidth:p}=e.toRefs(n),v=e.computed(()=>p.value??{small:3,medium:4,large:8}[m.value]),g=e.computed(()=>({width:o.valueToPx(i.value),height:o.valueToPx(v.value),backgroundColor:u.value})),h=e.computed(()=>({width:100*d.value+"%",...y(c.value)})),y=e=>{if(t.isObject(e)){return{backgroundImage:`linear-gradient(to right, ${Object.keys(e).map(r=>`${e[r]} ${r}`).join(",")})`}}return{backgroundColor:e}};return(o,t)=>(e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.unref(d),class:"yc-progress-line-wrapper"},[e.createElementVNode("div",{class:"yc-progress-line",style:e.normalizeStyle(g.value)},[e.createElementVNode("div",{class:"yc-progress-line-bar",style:e.normalizeStyle(h.value)},null,4)],4),o.showText?(e.openBlock(),e.createElementBlock("div",l,[e.renderSlot(o.$slots,"text",{percent:e.unref(d)},()=>[e.createElementVNode("span",null,e.toDisplayString(o.text),1),"danger"===o.status?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r.TYPE_ICON_MAP).warning),{key:0,color:e.unref(r.TYPE_ICON_COLOR_MAP).error},null,8,["color"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],8,s))}});module.exports=a;
1
+ "use strict";const e=require("vue"),r=require("../_shared/constants/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const o=require("../_shared/utils/fn.js"),t=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const s=["aria-valuenow"],l={key:0,class:"yc-progress-line-text"},a=e.defineComponent({__name:"ProgressLine",props:{size:{},percent:{},status:{},showText:{type:Boolean},text:{},width:{},strokeWidth:{},color:{},trackColor:{}},setup(a){const n=a,{width:i,trackColor:u,color:c,percent:d,size:m,strokeWidth:p}=e.toRefs(n),v=e.computed(()=>p.value??{small:3,medium:4,large:8}[m.value]),g=e.computed(()=>({width:o.valueToPx(i.value),height:o.valueToPx(v.value),backgroundColor:u.value})),h=e.computed(()=>({width:100*d.value+"%",...y(c.value)})),y=e=>{if(t.isObject(e)){return{backgroundImage:`linear-gradient(to right, ${Object.keys(e).map(r=>`${e[r]} ${r}`).join(",")})`}}return{backgroundColor:e}};return(o,t)=>(e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.unref(d),class:"yc-progress-line-wrapper"},[e.createElementVNode("div",{class:"yc-progress-line",style:e.normalizeStyle(g.value)},[e.createElementVNode("div",{class:"yc-progress-line-bar",style:e.normalizeStyle(h.value)},null,4)],4),o.showText?(e.openBlock(),e.createElementBlock("div",l,[e.renderSlot(o.$slots,"text",{percent:e.unref(d)},()=>[e.createElementVNode("span",null,e.toDisplayString(o.text),1),"danger"===o.status?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r.TYPE_ICON_MAP).warning),{key:0,color:e.unref(r.TYPE_ICON_COLOR_MAP).error},null,8,["color"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],8,s))}});module.exports=a;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),r=require("../_shared/constants/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const s=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const t=["aria-valuenow"],o={key:0,class:"yc-progress-steps-text"},l=e.defineComponent({__name:"ProgressSteps",props:{steps:{},percent:{},size:{},text:{},showText:{type:Boolean},color:{},trackColor:{},strokeWidth:{},status:{}},setup(l){const a=l,{steps:n,percent:c,size:i,strokeWidth:u}=e.toRefs(a),p=e.computed(()=>u.value??("small"==i.value?8:4)),m=e.computed(()=>Array(n.value).fill(0).map((e,r)=>c.value>0&&c.value>1/n.value*r));return(l,a)=>(e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.unref(c),class:"yc-progress-steps-wrapper"},[e.createElementVNode("div",{class:"yc-progress-steps",style:e.normalizeStyle({height:e.unref(s.valueToPx)(p.value)})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(r,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:e.normalizeClass(["yc-progress-steps-item",{"yc-progress-steps-item-active":r}]),style:e.normalizeStyle({backgroundColor:r?l.color:l.trackColor})},null,6))),128))],4),l.showText?(e.openBlock(),e.createElementBlock("div",o,[e.renderSlot(l.$slots,"text",{percent:e.unref(c)},()=>[e.createTextVNode(e.toDisplayString(l.text)+" ",1),"danger"===l.status?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r.TYPE_ICON_MAP).danger),{key:0,color:e.unref(r.TYPE_ICON_COLOR_MAP).danger},null,8,["color"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],8,t))}});module.exports=l;
1
+ "use strict";const e=require("vue"),r=require("../_shared/constants/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const s=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const t=["aria-valuenow"],o={key:0,class:"yc-progress-steps-text"},l=e.defineComponent({__name:"ProgressSteps",props:{steps:{},percent:{},size:{},text:{},showText:{type:Boolean},color:{},trackColor:{},strokeWidth:{},status:{}},setup(l){const a=l,{steps:n,percent:c,size:u,strokeWidth:i}=e.toRefs(a),p=e.computed(()=>i.value??("small"==u.value?8:4)),m=e.computed(()=>Array(n.value).fill(0).map((e,r)=>c.value>0&&c.value>1/n.value*r));return(l,a)=>(e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.unref(c),class:"yc-progress-steps-wrapper"},[e.createElementVNode("div",{class:"yc-progress-steps",style:e.normalizeStyle({height:e.unref(s.valueToPx)(p.value)})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(r,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:e.normalizeClass(["yc-progress-steps-item",{"yc-progress-steps-item-active":r}]),style:e.normalizeStyle({backgroundColor:r?l.color:l.trackColor})},null,6))),128))],4),l.showText?(e.openBlock(),e.createElementBlock("div",o,[e.renderSlot(l.$slots,"text",{percent:e.unref(c)},()=>[e.createTextVNode(e.toDisplayString(l.text)+" ",1),"danger"===l.status?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r.TYPE_ICON_MAP).danger),{key:0,color:e.unref(r.TYPE_ICON_COLOR_MAP).danger},null,8,["color"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],8,t))}});module.exports=l;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const a=require("../_shared/utils/control.js"),l=require("./hooks/useContext.js"),o=require("../_shared/components/IconButton.vue.js");;/* empty css */const t=["value","checked","disabled"],u={key:0,class:"yc-radio-label text-ellipsis"},d={key:1,class:"yc-radio-button-content"},r=e.defineComponent({name:"Radio",__name:"Radio",props:{modelValue:{type:[String,Number,Boolean],default:void 0},defaultChecked:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:!0},type:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(r,{emit:s}){const n=r,c=s,{modelValue:i,defaultChecked:v,value:m,disabled:p,type:y}=e.toRefs(n),{computedValue:h,disabled:k,type:b,size:f,hasGroup:B,emits:_}=l().inject(),j=a(i,v.value,e=>{c("update:modelValue",e)}),q=e.computed(()=>B.value?h.value==m.value:j.value),V=e.computed(()=>k.value||p.value),C=e.computed(()=>y.value??b.value),E=e=>{V.value||(B.value?h.value=m.value:(j.value=m.value,c("change",m.value,e)))};return(a,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass([`yc-radio-button-size-${e.unref(f)}`,"yc-radio"+("radio"==C.value?"":"-button"),"yc-radio-"+(q.value?"checked":"unchecked"),{"yc-radio-disabled":V.value}]),onClick:E},[e.createElementVNode("input",{type:"radio",class:"yc-radio-target",value:a.value,checked:q.value,disabled:V.value},null,8,t),e.renderSlot(a.$slots,"radio",{checked:q.value,disabled:V.value},()=>["radio"==C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(o),{"hover-size":24,"hover-color":q.value||V.value?"transparent":"rgb(242, 243, 245)"},{default:e.withCtx(()=>l[0]||(l[0]=[e.createElementVNode("span",{class:"yc-radio-icon"},null,-1)])),_:1,__:[0]},8,["hover-color"]),a.$slots.default?(e.openBlock(),e.createElementBlock("span",u,[e.renderSlot(a.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("span",d,[e.renderSlot(a.$slots,"default",{},void 0,!0)]))],!0)],2))}});module.exports=r;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const a=require("../_shared/utils/control.js"),l=require("./hooks/useContext.js"),o=require("../_shared/components/IconButton.vue.js");;/* empty css */const t=["value","checked","disabled"],u={key:0,class:"yc-radio-label text-ellipsis"},d={key:1,class:"yc-radio-button-content"},r=e.defineComponent({name:"Radio",__name:"Radio",props:{modelValue:{type:[String,Number,Boolean],default:void 0},defaultChecked:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:!0},type:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(r,{emit:s}){const n=r,c=s,{modelValue:i,defaultChecked:v,value:m,disabled:p,type:y}=e.toRefs(n),{computedValue:h,disabled:k,type:b,size:f,hasGroup:B,emits:_}=l().inject(),j=a(i,v.value,e=>{c("update:modelValue",e)}),q=e.computed(()=>B.value?h.value==m.value:j.value),V=e.computed(()=>k.value||p.value),C=e.computed(()=>y.value??b.value),E=e=>{V.value||(B.value?h.value=m.value:(j.value=m.value,c("change",m.value,e)))};return(a,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass([`yc-radio-button-size-${e.unref(f)}`,"yc-radio"+("radio"==C.value?"":"-button"),"yc-radio-"+(q.value?"checked":"unchecked"),{"yc-radio-disabled":V.value}]),onClick:E},[e.createElementVNode("input",{type:"radio",class:"yc-radio-target",value:a.value,checked:q.value,disabled:V.value},null,8,t),e.renderSlot(a.$slots,"radio",{checked:q.value,disabled:V.value},()=>["radio"==C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(o),{"hover-size":24,"hover-color":q.value||V.value?"transparent":"rgb(242, 243, 245)"},{default:e.withCtx(()=>l[0]||(l[0]=[e.createElementVNode("span",{class:"yc-radio-icon"},null,-1)])),_:1,__:[0]},8,["hover-color"]),a.$slots.default?(e.openBlock(),e.createElementBlock("span",u,[e.renderSlot(a.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("span",d,[e.renderSlot(a.$slots,"default",{},void 0,!0)]))],!0)],2))}});module.exports=r;
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
- import { RadioType, RadioGroupEmits, RadioValue, RadioOption } from '../type';
3
- import { Size, Props } from '../../_shared/type';
2
+ import { RadioType, RadioGroupEmits, RadioValue } from '../type';
3
+ import { Size, Props, ObjectData } from '../../_shared/type';
4
4
  interface RadioContext {
5
5
  computedValue: Ref<RadioValue | undefined>;
6
6
  type: Ref<RadioType>;
@@ -11,10 +11,7 @@ interface RadioContext {
11
11
  }
12
12
  declare const _default: () => {
13
13
  provide: (props: Props, emits: RadioGroupEmits) => {
14
- options: import('vue').ComputedRef<((RadioOption & Record<string, unknown>) | {
15
- label: RadioOption;
16
- value: RadioOption;
17
- })[]>;
14
+ options: import('vue').ComputedRef<ObjectData[]>;
18
15
  };
19
16
  inject: () => RadioContext;
20
17
  };
@@ -1,4 +1,5 @@
1
1
  import { Direction, Size, ObjectData } from '../_shared/type';
2
+ import { VNode } from 'vue';
2
3
  export interface RadioProps {
3
4
  modelValue?: RadioValue;
4
5
  defaultChecked?: boolean;
@@ -11,11 +12,11 @@ export interface RadioEmits {
11
12
  (e: 'change', value: RadioValue, ev: Event): void;
12
13
  }
13
14
  export interface RadioSlots {
14
- default(): void;
15
- radio(scope: {
15
+ default?: () => VNode[];
16
+ radio?: (scope: {
16
17
  checked: boolean;
17
18
  disabled: boolean;
18
- }): void;
19
+ }) => VNode[];
19
20
  }
20
21
  export interface RadioGroupProps {
21
22
  modelValue?: RadioValue;
@@ -31,14 +32,14 @@ export interface RadioGroupEmits {
31
32
  (e: 'change', value: RadioValue): void;
32
33
  }
33
34
  export interface RadioGroupSlots {
34
- default(): void;
35
- radio(scope: {
35
+ default?: () => VNode[];
36
+ radio?: (scope: {
36
37
  checked: boolean;
37
38
  disabled: boolean;
38
- }): void;
39
- label(scope: {
39
+ }) => VNode[];
40
+ label?: (scope: {
40
41
  data: ObjectData;
41
- }): void;
42
+ }) => VNode[];
42
43
  }
43
44
  export type RadioOption = (RadioValue | {
44
45
  label?: string;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const l=require("../_shared/utils/fn.js"),a=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const r=require("../_shared/icons/IconFaceSmile.vue.js"),o=require("../_shared/icons/IconStar.vue.js"),t=require("../_shared/utils/control.js"),n=["onClick","onMouseenter"],u=["onClick","onMouseenter"],c=e.defineComponent({name:"Rate",__name:"index",props:{count:{default:5},modelValue:{default:void 0},defaultValue:{default:0},allowHalf:{type:Boolean,default:!1},allowClear:{type:Boolean},grading:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},color:{default:"rgb(247, 186, 30)"}},emits:["update:modelValue","change","hover-change"],setup(c,{emit:s}){const i=c,d=s,{modelValue:v,defaultValue:f,readonly:m,disabled:y,count:k,allowClear:p,color:h}=e.toRefs(i),B=e.ref([]);let g=!1;const _=e.ref(0),j=t(v,f.value,e=>{d("update:modelValue",e)}),q=e.computed(()=>{var e;return a.isObject(h.value)?(null==(e=Object.entries(h.value).find(([e])=>_.value<=+e))?void 0:e[1])??"rgb(247, 186, 30)":h.value??"rgb(247, 186, 30)"}),C=async e=>{if(!(m.value||y.value||g)){j.value=p.value&&j.value==e?0:e,d("change",j.value),g=!0;for(let e=1;e<=k.value;e++){if(e>j.value)continue;const a=B.value[e];a.classList.add("yc-rate-character-scale"),await l.sleep(50),setTimeout(()=>{a.classList.remove("yc-rate-character-scale")},150)}g=!1}};let b;const V=e=>{m.value||y.value||(b&&clearTimeout(b),_.value=e,d("hover-change",e))},M=()=>{m.value||y.value||(b&&clearTimeout(b),b=setTimeout(()=>{_.value=0},100))};return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-rate",{"yc-rate-disabled":e.unref(y),"yc-rate-readonly":e.unref(m)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),a=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"yc-rate-character",ref_for:!0,ref:e=>B.value[a]=e},[l.allowHalf?(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-rate-character-left",style:e.normalizeStyle({color:a-.5<=e.unref(j)&&!_.value||a-.5<=_.value?q.value:""}),onClick:e.withModifiers(e=>C(a-.5),["stop"]),onMouseenter:e=>V(a-.5),onMouseleave:M},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(o),{key:1}))],!0)],44,n)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"yc-rate-character-right",style:e.normalizeStyle({color:a<=e.unref(j)&&!_.value||a<=_.value?q.value:""}),onClick:e=>C(a),onMouseenter:e=>V(a),onMouseleave:M},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(o),{key:1}))],!0)],44,u)]))),128))],2))}});module.exports=c;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const l=require("../_shared/utils/fn.js"),a=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const r=require("../_shared/icons/IconFaceSmile.vue.js"),o=require("../_shared/icons/IconStar.vue.js"),t=require("../_shared/utils/control.js"),n=["onClick","onMouseenter"],u=["onClick","onMouseenter"],c=e.defineComponent({name:"Rate",__name:"index",props:{count:{default:5},modelValue:{default:void 0},defaultValue:{default:0},allowHalf:{type:Boolean,default:!1},allowClear:{type:Boolean},grading:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},color:{default:"rgb(247, 186, 30)"}},emits:["update:modelValue","change","hover-change"],setup(c,{emit:s}){const i=c,d=s,{modelValue:v,defaultValue:f,readonly:m,disabled:y,count:k,allowClear:p,color:h}=e.toRefs(i),B=e.ref([]);let g=!1;const j=e.ref(0),_=t(v,f.value,e=>{d("update:modelValue",e)}),q=e.computed(()=>{var e;return a.isObject(h.value)?(null==(e=Object.entries(h.value).find(([e])=>j.value<=+e))?void 0:e[1])??"rgb(247, 186, 30)":h.value??"rgb(247, 186, 30)"}),C=async e=>{if(!(m.value||y.value||g)){_.value=p.value&&_.value==e?0:e,d("change",_.value),g=!0;for(let e=1;e<=k.value;e++){if(e>_.value)continue;const a=B.value[e];a.classList.add("yc-rate-character-scale"),await l.sleep(50),setTimeout(()=>{a.classList.remove("yc-rate-character-scale")},150)}g=!1}};let b;const V=e=>{m.value||y.value||(b&&clearTimeout(b),j.value=e,d("hover-change",e))},M=()=>{m.value||y.value||(b&&clearTimeout(b),b=setTimeout(()=>{j.value=0},100))};return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-rate",{"yc-rate-disabled":e.unref(y),"yc-rate-readonly":e.unref(m)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),a=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"yc-rate-character",ref_for:!0,ref:e=>B.value[a]=e},[l.allowHalf?(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-rate-character-left",style:e.normalizeStyle({color:a-.5<=e.unref(_)&&!j.value||a-.5<=j.value?q.value:""}),onClick:e.withModifiers(e=>C(a-.5),["stop"]),onMouseenter:e=>V(a-.5),onMouseleave:M},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(o),{key:1}))],!0)],44,n)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"yc-rate-character-right",style:e.normalizeStyle({color:a<=e.unref(_)&&!j.value||a<=j.value?q.value:""}),onClick:e=>C(a),onMouseenter:e=>V(a),onMouseleave:M},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(o),{key:1}))],!0)],44,u)]))),128))],2))}});module.exports=c;
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface RateProps {
2
3
  count?: number;
3
4
  modelValue?: number;
@@ -15,7 +16,7 @@ export interface RateEmits {
15
16
  (e: 'hover-change', value: number): void;
16
17
  }
17
18
  export interface RateSlots {
18
- character(scope: {
19
+ character?: (scope: {
19
20
  index: number;
20
- }): void;
21
+ }) => VNode[];
21
22
  }
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const r=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");const o=require("../_shared/utils/control.js");;/* empty css */const i=require("../_shared/icons/IconDragDot.vue.js"),l=["dir","onMousedown"],u={class:"yc-resizebox-trigger-icon-wrapper"},n=e.defineComponent({name:"ResizeBox",__name:"index",props:{width:{default:void 0},height:{default:void 0},component:{default:"div"},directions:{default:()=>["right"]}},emits:["update:width","update:height","moving-start","moving","moving-end"],setup(n,{emit:s}){e.useSlots();const a=n,d=s,{width:c,height:v}=e.toRefs(a),h=o(c,0,e=>{d("update:width",e)}),g=o(v,0,e=>{d("update:height",e)}),m=e.reactive([]),f=e.reactive({left:0,right:0,bottom:0,top:0}),p=e.ref(),y=e.ref(null),b=e.ref(0),x=e.ref(0);let w;return t.useEventListener("mousemove",async e=>{if(!y.value||!p.value)return;const{clientX:t,clientY:o}=e,i="left"==y.value?b.value-t:t-b.value,l="top"==y.value?x.value-o:o-x.value,u=f.left+f.right,n=f.top+f.bottom;b.value=t,x.value=o,["left","right"].includes(y.value)?(h.value+=i,h.value<=u&&(h.value=u),p.value.style.width=r.valueToPx(h.value)):(g.value+=l,g.value<=n&&(g.value=n),p.value.style.height=r.valueToPx(g.value));const{width:s,height:a}=p.value.getBoundingClientRect();h.value!=s&&(h.value=s),a!=g.value&&(g.value=a),d("moving",{width:s,height:a},e)}),t.useEventListener("mouseup",e=>{y.value&&(y.value=null,document.body.style.cursor=w,d("moving-end",e))}),t.useResizeObserver(()=>m,e=>{e.forEach(e=>{const t=e.target.getAttribute("dir"),{contentRect:{width:r,height:o}}=e;f[t]=["right","left"].includes(t)?r:o})},{box:"border-box"}),(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),{class:"yc-resizebox",ref_key:"boxRef",ref:p},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.directions,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:e.normalizeClass(["yc-resizebox-trigger",`yc-resizebox-direction-${r}`,"yc-resizebox-trigger-"+(["left","right"].includes(r)?"vertical":"horizontal")]),dir:r,ref_for:!0,ref:e=>m[o]=e,onMousedown:e=>((e,t)=>{t.preventDefault(),y.value=e;const{width:r,height:o}=p.value.getBoundingClientRect(),{clientX:i,clientY:l}=t;h.value=r,g.value=o,b.value=i,x.value=l,w=getComputedStyle(document.body).cursor,document.body.style.cursor=["left","right"].includes(e)?"col-resize":"row-resize",d("moving-start",t)})(r,e)},[e.renderSlot(t.$slots,"resize-trigger",{direction:r},()=>[e.createElementVNode("div",u,[e.renderSlot(t.$slots,"resize-trigger-icon",{direction:r},()=>[e.createVNode(e.unref(i),{rotate:["left","right"].includes(r)?90:0},null,8,["rotate"])],!0)])],!0)],42,l))),128))]),_:3},512))}});module.exports=n;
1
+ "use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const r=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");const o=require("../_shared/utils/control.js");;/* empty css */const i=require("../_shared/icons/IconDragDot.vue.js"),l=["dir","onMousedown"],u={class:"yc-resizebox-trigger-icon-wrapper"},n=e.defineComponent({name:"ResizeBox",__name:"index",props:{width:{default:void 0},height:{default:void 0},component:{default:"div"},directions:{default:()=>["right"]}},emits:["update:width","update:height","moving-start","moving","moving-end"],setup(n,{emit:s}){e.useSlots();const a=n,d=s,{width:c,height:v}=e.toRefs(a),h=o(c,0,e=>{d("update:width",e)}),g=o(v,0,e=>{d("update:height",e)}),m=e.reactive([]),f=e.reactive({left:0,right:0,bottom:0,top:0}),p=e.ref(),y=e.ref(null),b=e.ref(0),x=e.ref(0);let w;return t.useEventListener("mousemove",async e=>{if(!y.value||!p.value)return;const{clientX:t,clientY:o}=e,i="left"==y.value?b.value-t:t-b.value,l="top"==y.value?x.value-o:o-x.value,u=f.left+f.right,n=f.top+f.bottom;b.value=t,x.value=o,["left","right"].includes(y.value)?(h.value+=i,h.value<=u&&(h.value=u),p.value.style.width=r.valueToPx(h.value)):(g.value+=l,g.value<=n&&(g.value=n),p.value.style.height=r.valueToPx(g.value));const{width:s,height:a}=p.value.getBoundingClientRect();h.value!=s&&(h.value=s),a!=g.value&&(g.value=a),d("moving",{width:s,height:a},e)}),t.useEventListener("mouseup",e=>{y.value&&(y.value=null,document.body.style.cursor=w,d("moving-end",e))}),t.useResizeObserver(()=>m,e=>{e.forEach(e=>{const t=e.target.getAttribute("dir"),{contentRect:{width:r,height:o}}=e;f[t]=["right","left"].includes(t)?r:o})},{box:"border-box"}),(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),{class:"yc-resizebox",ref_key:"boxRef",ref:p},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.directions,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:e.normalizeClass(["yc-resizebox-trigger",`yc-resizebox-direction-${r}`,"yc-resizebox-trigger-"+(["left","right"].includes(r)?"vertical":"horizontal")]),dir:r,ref_for:!0,ref:e=>m[o]=e,onMousedown:e=>((e,t)=>{t.preventDefault(),y.value=e;const{width:r,height:o}=p.value.getBoundingClientRect(),{clientX:i,clientY:l}=t;h.value=r,g.value=o,b.value=i,x.value=l,w=getComputedStyle(document.body).cursor,document.body.style.cursor=["left","right"].includes(e)?"col-resize":"row-resize",d("moving-start",t)})(r,e)},[e.renderSlot(t.$slots,"resize-trigger",{direction:r},()=>[e.createElementVNode("div",u,[e.renderSlot(t.$slots,"resize-trigger-icon",{direction:r},()=>[e.createVNode(e.unref(i),{rotate:["left","right"].includes(r)?90:0},null,8,["rotate"])],!0)])],!0)],42,l))),128))]),_:3},512))}});module.exports=n;
@@ -1,3 +1,4 @@
1
+ import { VNode } from 'vue';
1
2
  export interface ResizeBoxProps {
2
3
  width?: number;
3
4
  height?: number;
@@ -15,12 +16,12 @@ export interface ResizeBoxEmits {
15
16
  (e: 'moving-end', ev: MouseEvent): void;
16
17
  }
17
18
  export interface ResizeBoxSlots {
18
- default(): void;
19
- ['resize-trigger'](scope: {
19
+ default?: () => VNode[];
20
+ 'resize-trigger'?: (scope: {
20
21
  direction: ResizeBoxDirection;
21
- }): void;
22
- ['resize-trigger-icon'](scope: {
22
+ }) => VNode[];
23
+ 'resize-trigger-icon'?: (scope: {
23
24
  direction: ResizeBoxDirection;
24
- }): void;
25
+ }) => VNode[];
25
26
  }
26
27
  export type ResizeBoxDirection = 'left' | 'right' | 'top' | 'bottom';
@@ -1,13 +1,14 @@
1
+ import { VNode } from 'vue';
1
2
  export interface ResultProps {
2
3
  status?: ResultStatus;
3
4
  title?: string;
4
5
  subtitle?: string;
5
6
  }
6
7
  export interface ResultSlots {
7
- icon(): void;
8
- title(): void;
9
- subtitle(): void;
10
- default(): void;
11
- extra(): void;
8
+ icon?: () => VNode[];
9
+ title?: () => VNode[];
10
+ subtitle?: () => VNode[];
11
+ default?: () => VNode[];
12
+ extra?: () => VNode[];
12
13
  }
13
14
  export type ResultStatus = 'info' | 'success' | 'warning' | 'error' | '403' | '404' | '500' | null;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),l=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const a=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const r=require("./hooks/useContext.js"),u=e.defineComponent({__name:"ScrollbarTrack",props:{direction:{default:"vertical"}},emits:["drag","resize"],setup(u,{emit:t}){const s=u,o=t,{direction:i}=e.toRefs(s),{scrollRef:c,thumbHeight:n,thumbWidth:v,movableLeft:d,movableTop:f,curTop:m,curLeft:g,isDragging:h}=r().inject(),b=e.computed(()=>"vertical"==i.value),y=e.computed(()=>b.value?{height:a.valueToPx(n.value),transform:`translateY(${a.valueToPx(m.value)})`}:{width:a.valueToPx(v.value),transform:`translateX(${a.valueToPx(g.value)})`}),p=e.ref();l.useResizeObserver(p,()=>{const{width:e,height:l}=p.value.getBoundingClientRect();o("resize",b.value?e:l)});const _=e.ref(),{x:k,y:j,isDragging:q}=l.useDraggable(_,{onMove(){const{left:e,top:l}=c.value.getBoundingClientRect(),a=l,r=f.value+a,u=e,t=d.value+u;b.value?(j.value=j.value<=a?a:j.value,j.value=j.value>=r?r:j.value,o("drag",!0,j.value-a)):(k.value=k.value<=u?u:k.value,k.value=k.value>=t?t:k.value,o("drag",!1,k.value-u))}});e.watchEffect(()=>{h.value=q.value});const x=e=>{const{offsetX:l,offsetY:a}=e;if(b.value){const e=m.value<a?f.value/9:-f.value/9;let l=m.value+e;l=l<=0?0:l,l=l>f.value?f.value:l,o("drag",!0,l)}else{const e=g.value<l?d.value/9:-d.value/9;let a=g.value+e;a=a<=0?0:a,a=a>d.value?d.value:a,o("drag",!1,a)}};return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-scrollbar-track",`yc-scrollbar-track-direction-${e.unref(i)}`]),ref_key:"trackRef",ref:p,onClick:e.withModifiers(x,["self"])},[e.createElementVNode("div",{class:e.normalizeClass(["yc-scrollbar-thumb",`yc-scrollbar-thumb-direction-${e.unref(i)}`]),style:e.normalizeStyle(y.value),ref_key:"dragRef",ref:_},[e.createElementVNode("div",{class:e.normalizeClass(["yc-scrollbar-thumb-bar",{"yc-scrollbar-thumb-bar-dragging":e.unref(q),"yc-scrollbar-thumb-bar-hover":!e.unref(q)&&e.unref(h)}])},null,2)],6)],2))}});module.exports=u;
1
+ "use strict";const e=require("vue"),l=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const a=require("../_shared/utils/fn.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const r=require("./hooks/useContext.js"),u=e.defineComponent({__name:"ScrollbarTrack",props:{direction:{default:"vertical"}},emits:["drag","resize"],setup(u,{emit:t}){const s=u,o=t,{direction:i}=e.toRefs(s),{scrollRef:c,thumbHeight:n,thumbWidth:v,movableLeft:d,movableTop:f,curTop:m,curLeft:g,isDragging:h}=r().inject(),b=e.computed(()=>"vertical"==i.value),y=e.computed(()=>b.value?{height:a.valueToPx(n.value),transform:`translateY(${a.valueToPx(m.value)})`}:{width:a.valueToPx(v.value),transform:`translateX(${a.valueToPx(g.value)})`}),p=e.ref();l.useResizeObserver(p,()=>{const{width:e,height:l}=p.value.getBoundingClientRect();o("resize",b.value?e:l)});const k=e.ref(),{x:_,y:j,isDragging:q}=l.useDraggable(k,{onMove(){const{left:e,top:l}=c.value.getBoundingClientRect(),a=l,r=f.value+a,u=e,t=d.value+u;b.value?(j.value=j.value<=a?a:j.value,j.value=j.value>=r?r:j.value,o("drag",!0,j.value-a)):(_.value=_.value<=u?u:_.value,_.value=_.value>=t?t:_.value,o("drag",!1,_.value-u))}});e.watchEffect(()=>{h.value=q.value});const x=e=>{const{offsetX:l,offsetY:a}=e;if(b.value){const e=m.value<a?f.value/9:-f.value/9;let l=m.value+e;l=l<=0?0:l,l=l>f.value?f.value:l,o("drag",!0,l)}else{const e=g.value<l?d.value/9:-d.value/9;let a=g.value+e;a=a<=0?0:a,a=a>d.value?d.value:a,o("drag",!1,a)}};return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-scrollbar-track",`yc-scrollbar-track-direction-${e.unref(i)}`]),ref_key:"trackRef",ref:p,onClick:e.withModifiers(x,["self"])},[e.createElementVNode("div",{class:e.normalizeClass(["yc-scrollbar-thumb",`yc-scrollbar-thumb-direction-${e.unref(i)}`]),style:e.normalizeStyle(y.value),ref_key:"dragRef",ref:k},[e.createElementVNode("div",{class:e.normalizeClass(["yc-scrollbar-thumb-bar",{"yc-scrollbar-thumb-bar-dragging":e.unref(q),"yc-scrollbar-thumb-bar-hover":!e.unref(q)&&e.unref(h)}])},null,2)],6)],2))}});module.exports=u;
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'vue';
1
+ import { CSSProperties, VNode } from 'vue';
2
2
  import { ClassName } from '../_shared/type';
3
3
  export interface ScrollbarProps {
4
4
  type?: TackType;
@@ -10,7 +10,7 @@ export interface ScrollbarEmits {
10
10
  (e: 'scroll', left: number, top: number, ev: Event): void;
11
11
  }
12
12
  export interface ScrollbarSlots {
13
- default(): void;
13
+ default?: () => VNode[];
14
14
  }
15
15
  export interface ScrollbarExpose {
16
16
  scrollTo(options: ScrollOptions): void;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js"),l=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),n=require("../Checkbox/index.js"),s={key:0,class:"yc-select-option-icon"},r={key:3,class:"yc-select-option-suffix"},i=e.defineComponent({name:"Option",__name:"Option",props:{label:{default:""},value:{type:[String,Number,Boolean,Object,Array],default:""},disabled:{type:Boolean,default:!1},tagProps:{},id:{},isFallbackOption:{type:Boolean,default:!1}},setup(i){const a=i,{label:u,disabled:c}=e.toRefs(a),{computedValue:d,multiple:p,limit:f,curIndex:v,options:m,blur:y,filterOption:k,getValue:x,emits:b,collectOption:B}=o().inject(),_=e.ref(),h=e.computed(()=>`${a.value}`?a.value:t.getDomText(_)),j=e.computed(()=>a.label?a.label:t.getDomText(_)),q=e.computed(()=>{if(!p.value)return!1;return-1!=d.value.findIndex(e=>x(e)===x(h.value))}),g=()=>{c.value||l.isUndefined(d.value)||(d.value=h.value,b("select",h.value),y())},C=e=>{const t=d.value,{value:l}=h;if(e){if(f.value>0&&t.length==f.value)return b("exceedLimit",l);b("select",h.value),d.value=[...t,l]}else d.value=t.filter(e=>e!=l)};return B(a,j),(t,l)=>{var o;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-select-option",{"yc-select-option-active":(null==(o=e.unref(m)[e.unref(v)])?void 0:o.value)==h.value,"yc-select-option-disabled":e.unref(c)}])},[t.$slots.icon?(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.unref(n.default),{key:1,"model-value":q.value,disabled:e.unref(c),"onUpdate:modelValue":C,class:"yc-select-option-content"},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"contentRef",ref:_},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)],!0)],512)]),_:3},8,["model-value","disabled"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"yc-select-option-content text-ellipsis",ref_key:"contentRef",ref:_,onClick:g},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)],!0)],512)),t.$slots.suffix?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(t.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),[[e.vShow,e.unref(k)({...t.$props,label:j.value})]])}}});module.exports=i;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js"),l=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),n=require("../Checkbox/index.js"),s={key:0,class:"yc-select-option-icon"},r={key:3,class:"yc-select-option-suffix"},i=e.defineComponent({name:"Option",__name:"Option",props:{label:{default:""},value:{type:[String,Number,Boolean,Object,Array],default:""},disabled:{type:Boolean,default:!1},tagProps:{},id:{},isFallbackOption:{type:Boolean,default:!1}},setup(i){const a=i,{label:u,disabled:c}=e.toRefs(a),{computedValue:d,multiple:p,limit:f,curIndex:v,options:m,blur:y,filterOption:k,getValue:x,emits:b,collectOption:B}=o().inject(),h=e.ref(),j=e.computed(()=>`${a.value}`?a.value:t.getDomText(h)),_=e.computed(()=>a.label?a.label:t.getDomText(h)),q=e.computed(()=>{if(!p.value)return!1;return-1!=d.value.findIndex(e=>x(e)===x(j.value))}),g=()=>{c.value||l.isUndefined(d.value)||(d.value=j.value,b("select",j.value),y())},C=e=>{const t=d.value,{value:l}=j;if(e){if(f.value>0&&t.length==f.value)return b("exceedLimit",l);b("select",j.value),d.value=[...t,l]}else d.value=t.filter(e=>e!=l)};return B(a,_),(t,l)=>{var o;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-select-option",{"yc-select-option-active":(null==(o=e.unref(m)[e.unref(v)])?void 0:o.value)==j.value,"yc-select-option-disabled":e.unref(c)}])},[t.$slots.icon?(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.unref(n.default),{key:1,"model-value":q.value,disabled:e.unref(c),"onUpdate:modelValue":C,class:"yc-select-option-content"},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"contentRef",ref:h},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)],!0)],512)]),_:3},8,["model-value","disabled"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"yc-select-option-content text-ellipsis",ref_key:"contentRef",ref:h,onClick:g},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)],!0)],512)),t.$slots.suffix?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(t.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),[[e.vShow,e.unref(k)({...t.$props,label:_.value})]])}}});module.exports=i;
@@ -57,7 +57,70 @@ declare function __VLS_template(): {
57
57
  $attrs: {
58
58
  [x: string]: unknown;
59
59
  };
60
- $refs: any;
60
+ $refs: {
61
+ [x: string]: unknown;
62
+ } & {
63
+ triggerRef: unknown;
64
+ popupRef: ({
65
+ $: import('vue').ComponentInternalInstance;
66
+ $data: {};
67
+ $props: {
68
+ readonly preventFocus?: boolean | undefined;
69
+ readonly tag?: string | undefined;
70
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
71
+ $attrs: {
72
+ [x: string]: unknown;
73
+ };
74
+ $refs: {
75
+ [x: string]: unknown;
76
+ };
77
+ $slots: Readonly<{
78
+ [name: string]: import('vue').Slot<any> | undefined;
79
+ }>;
80
+ $root: import('vue').ComponentPublicInstance | null;
81
+ $parent: import('vue').ComponentPublicInstance | null;
82
+ $host: Element | null;
83
+ $emit: (event: string, ...args: any[]) => void;
84
+ $el: any;
85
+ $options: import('vue').ComponentOptionsBase<Readonly<{
86
+ preventFocus?: boolean;
87
+ tag?: string;
88
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
89
+ preventFocus: boolean;
90
+ tag: string;
91
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
92
+ beforeCreate?: (() => void) | (() => void)[];
93
+ created?: (() => void) | (() => void)[];
94
+ beforeMount?: (() => void) | (() => void)[];
95
+ mounted?: (() => void) | (() => void)[];
96
+ beforeUpdate?: (() => void) | (() => void)[];
97
+ updated?: (() => void) | (() => void)[];
98
+ activated?: (() => void) | (() => void)[];
99
+ deactivated?: (() => void) | (() => void)[];
100
+ beforeDestroy?: (() => void) | (() => void)[];
101
+ beforeUnmount?: (() => void) | (() => void)[];
102
+ destroyed?: (() => void) | (() => void)[];
103
+ unmounted?: (() => void) | (() => void)[];
104
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
105
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
106
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
107
+ };
108
+ $forceUpdate: () => void;
109
+ $nextTick: typeof import('vue').nextTick;
110
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
111
+ } & Readonly<{
112
+ preventFocus: boolean;
113
+ tag: string;
114
+ }> & Omit<Readonly<{
115
+ preventFocus?: boolean;
116
+ tag?: string;
117
+ }> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
118
+ $slots: {
119
+ default?(_: {}): any;
120
+ };
121
+ }) | null;
122
+ arrowRef: HTMLDivElement;
123
+ };
61
124
  $slots: Readonly<{
62
125
  [name: string]: import('vue').Slot<any> | undefined;
63
126
  }>;
@@ -178,7 +241,7 @@ declare function __VLS_template(): {
178
241
  show(): void;
179
242
  updatePosition(x: number, y: number): void;
180
243
  }> & {} & import('vue').ComponentCustomProperties & {} & {
181
- $slots: any;
244
+ $slots: Readonly<import('../Trigger').TriggerSlots> & import('../Trigger').TriggerSlots;
182
245
  }) | null;
183
246
  inputRef: ({
184
247
  $: import('vue').ComponentInternalInstance;
@@ -444,7 +507,70 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
444
507
  $attrs: {
445
508
  [x: string]: unknown;
446
509
  };
447
- $refs: any;
510
+ $refs: {
511
+ [x: string]: unknown;
512
+ } & {
513
+ triggerRef: unknown;
514
+ popupRef: ({
515
+ $: import('vue').ComponentInternalInstance;
516
+ $data: {};
517
+ $props: {
518
+ readonly preventFocus?: boolean | undefined;
519
+ readonly tag?: string | undefined;
520
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
521
+ $attrs: {
522
+ [x: string]: unknown;
523
+ };
524
+ $refs: {
525
+ [x: string]: unknown;
526
+ };
527
+ $slots: Readonly<{
528
+ [name: string]: import('vue').Slot<any> | undefined;
529
+ }>;
530
+ $root: import('vue').ComponentPublicInstance | null;
531
+ $parent: import('vue').ComponentPublicInstance | null;
532
+ $host: Element | null;
533
+ $emit: (event: string, ...args: any[]) => void;
534
+ $el: any;
535
+ $options: import('vue').ComponentOptionsBase<Readonly<{
536
+ preventFocus?: boolean;
537
+ tag?: string;
538
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
539
+ preventFocus: boolean;
540
+ tag: string;
541
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
542
+ beforeCreate?: (() => void) | (() => void)[];
543
+ created?: (() => void) | (() => void)[];
544
+ beforeMount?: (() => void) | (() => void)[];
545
+ mounted?: (() => void) | (() => void)[];
546
+ beforeUpdate?: (() => void) | (() => void)[];
547
+ updated?: (() => void) | (() => void)[];
548
+ activated?: (() => void) | (() => void)[];
549
+ deactivated?: (() => void) | (() => void)[];
550
+ beforeDestroy?: (() => void) | (() => void)[];
551
+ beforeUnmount?: (() => void) | (() => void)[];
552
+ destroyed?: (() => void) | (() => void)[];
553
+ unmounted?: (() => void) | (() => void)[];
554
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
555
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
556
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
557
+ };
558
+ $forceUpdate: () => void;
559
+ $nextTick: typeof import('vue').nextTick;
560
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
561
+ } & Readonly<{
562
+ preventFocus: boolean;
563
+ tag: string;
564
+ }> & Omit<Readonly<{
565
+ preventFocus?: boolean;
566
+ tag?: string;
567
+ }> & Readonly<{}>, "preventFocus" | "tag"> & import('vue').ShallowUnwrapRef<{}> & {} & import('vue').ComponentCustomProperties & {} & {
568
+ $slots: {
569
+ default?(_: {}): any;
570
+ };
571
+ }) | null;
572
+ arrowRef: HTMLDivElement;
573
+ };
448
574
  $slots: Readonly<{
449
575
  [name: string]: import('vue').Slot<any> | undefined;
450
576
  }>;
@@ -565,7 +691,7 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
565
691
  show(): void;
566
692
  updatePosition(x: number, y: number): void;
567
693
  }> & {} & import('vue').ComponentCustomProperties & {} & {
568
- $slots: any;
694
+ $slots: Readonly<import('../Trigger').TriggerSlots> & import('../Trigger').TriggerSlots;
569
695
  }) | null;
570
696
  inputRef: ({
571
697
  $: import('vue').ComponentInternalInstance;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const l=require("../_shared/utils/fn.js"),a=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),t=require("./SelectIcon.vue.js"),r=require("./SelectView.vue.js"),u=require("../Input/index.js"),n=require("../InputTag/index.js"),s=require("../Trigger/index.js"),i=e.defineComponent({name:"Select",__name:"Select",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},defaultValue:{type:[String,Number,Boolean,Object,Array],default:e=>e.multiple?[]:""},inputValue:{default:void 0},defaultInputValue:{default:""},size:{default:void 0},placeholder:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!1},allowSearch:{type:Boolean,default:e=>e.multiple},allowCreate:{type:Boolean,default:!1},maxTagCount:{default:0},popupContainer:{default:void 0},bordered:{type:Boolean,default:!0},defaultActivefirstOption:{type:Boolean,default:!1},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},unmountonClose:{type:Boolean},filterOption:{type:[Boolean,Function],default:void 0},options:{default:()=>[]},virtualListProps:{default:void 0},triggerProps:{default:()=>({contentStyle:{}})},formatLabel:{},fallbackOption:{},showExtraOptions:{type:Boolean,default:!0},valueKey:{default:""},searchDelay:{default:500},limit:{default:0},fieldNames:{default:()=>({})},scrollbar:{type:Boolean,default:!0},showHeaderOnEmpty:{type:Boolean,default:!1},showFooterOnEmpty:{type:Boolean,default:!1},tagNowrap:{type:Boolean,default:!1},hotkeys:{type:Boolean},showEmpty:{type:Boolean,default:!0}},emits:["update:modelValue","update:inputValue","update:popupVisible","change","input-value-change","clear","remove","search","exceedLimit","popup-visible-change","dropdown-scroll","dropdown-reach-bottom","select"],setup(i,{expose:p,emit:d}){const c=i,f=d,{allowClear:v,disabled:m,loading:h,searchDelay:y,showFooterOnEmpty:b,showHeaderOnEmpty:w,multiple:g,allowSearch:B,allowCreate:V,virtualListProps:C}=e.toRefs(c),k=e.ref(),x=e.ref(),{computedVisible:j,computedValue:S,computedInputValue:_,selectOptions:q,createOptions:O}=o().provide(c,f,k),E=e.computed(()=>{const e=g.value?S.value.length:String(S.value).length;return v.value&&!m.value&&!h.value&&!!e}),N=e.computed(()=>(!B.value||h.value)&&!V.value&&a.isUndefined(c.filterOption)),z=async(e,a="")=>{var o,t,r;switch(e){case"create":if(!V.value)return;if(O.value.find(e=>e==_.value))return;O.value.push({label:_.value,value:_.value}),B.value&&(null==(o=k.value)||o.blur());break;case"clear":S.value=g.value?[]:"",f("clear");break;case"search":await l.sleep(y.value),f("search",a);break;case"focus":if(m.value)return;if(j.value)return null==(t=k.value)?void 0:t.blur();j.value=!0,await l.sleep(0),null==(r=k.value)||r.focus();break;case"blur":j.value=!1;break;case"updateValue":S.value=a.map(e=>e.value)}};return p({focus(){var e;null==(e=k.value)||e.focus()},blur(){var e;null==(e=k.value)||e.blur()},getPopupRef:()=>x.value}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(s),e.mergeProps({"popup-visible":e.unref(j),"onUpdate:popupVisible":a[14]||(a[14]=l=>e.isRef(j)?j.value=l:null),"unmount-on-close":l.unmountonClose,"popup-container":l.popupContainer,disabled:e.unref(m),"popup-offset":4,trigger:"focus",position:"bl","animation-name":"slide-dynamic-origin","need-transform-origin":"","auto-fit-popup-width":"","prevent-focus":"",ref_key:"popupRef",ref:x},l.triggerProps),{content:e.withCtx(()=>[e.createVNode(r,{loading:e.unref(h),scrollbar:l.scrollbar,"virtual-list-props":e.unref(C),"show-footer-on-empty":e.unref(b),"show-header-on-empty":e.unref(w)},null,8,["loading","scrollbar","virtual-list-props","show-footer-on-empty","show-header-on-empty"])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["yc-select",{"yc-select-allow-search":e.unref(B),"yc-select-allow-clear":E.value,"yc-select-no-border":!l.bordered},l.$attrs.class]),style:e.normalizeStyle(l.$attrs.style)},[e.renderSlot(l.$slots,"trigger",{},()=>{var o;return[e.unref(g)?(e.openBlock(),e.createBlock(e.unref(n),{key:1,"input-value":e.unref(_),"onUpdate:inputValue":a[7]||(a[7]=l=>e.isRef(_)?_.value=l:null),"model-value":e.unref(q),placeholder:l.placeholder,readonly:N.value,disabled:e.unref(m),size:l.size,error:l.error,"max-tag-count":l.maxTagCount,"tag-nowrap":l.tagNowrap,ref_key:"inputRef",ref:k,onFocus:a[8]||(a[8]=e=>z("focus")),onBlur:a[9]||(a[9]=e=>z("blur")),onInput:a[10]||(a[10]=e=>z("search",e)),onRemove:a[11]||(a[11]=(e,a)=>l.$emit("remove",e,a)),onPressEnter:a[12]||(a[12]=e=>z("create")),"onUpdate:modelValue":a[13]||(a[13]=e=>z("updateValue",e))},{tag:e.withCtx(({tag:a})=>[l.$slots.label?e.renderSlot(l.$slots,"label",{key:0,data:a},void 0,!0):e.createCommentVNode("",!0)]),suffix:e.withCtx(()=>[e.createVNode(t,{"popup-visible":e.unref(j),"allow-search":e.unref(B),loading:e.unref(h),"show-clear-btn":E.value,onClear:a[6]||(a[6]=e=>z("clear"))},null,8,["popup-visible","allow-search","loading","show-clear-btn"])]),_:3},8,["input-value","model-value","placeholder","readonly","disabled","size","error","max-tag-count","tag-nowrap"])):(e.openBlock(),e.createBlock(e.unref(u),{key:0,modelValue:e.unref(_),"onUpdate:modelValue":a[1]||(a[1]=l=>e.isRef(_)?_.value=l:null),"show-input":e.unref(j),readonly:N.value,disabled:e.unref(m),size:l.size,error:l.error,placeholder:(null==(o=e.unref(q)[0])?void 0:o.label)||"",ref_key:"inputRef",ref:k,onClick:a[2]||(a[2]=e=>z("focus")),onBlur:a[3]||(a[3]=e=>z("blur")),onInput:a[4]||(a[4]=e=>z("search",e)),onPressEnter:a[5]||(a[5]=e=>z("create"))},{label:e.withCtx(()=>[e.renderSlot(l.$slots,"label",{data:e.unref(q)[0]},()=>{var a;return[e.createElementVNode("span",{class:e.normalizeClass([{"yc-input-placeholder":!e.unref(q).length}])},e.toDisplayString((null==(a=e.unref(q)[0])?void 0:a.label)||l.placeholder),3)]},!0)]),suffix:e.withCtx(()=>[e.createVNode(t,{"popup-visible":e.unref(j),"allow-search":e.unref(B),loading:e.unref(h),"show-clear-btn":E.value,onClear:a[0]||(a[0]=e=>z("clear"))},null,8,["popup-visible","allow-search","loading","show-clear-btn"])]),_:3},8,["modelValue","show-input","readonly","disabled","size","error","placeholder"]))]},!0)],6)]),_:3},16,["popup-visible","unmount-on-close","popup-container","disabled"]))}});module.exports=i;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js");const l=require("../_shared/utils/fn.js"),a=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),t=,/* empty css */r=require("./SelectView.vue.js"),u=require("../Input/index.js"),n=require("../InputTag/index.js"),s=require("../Trigger/index.js"),i=e.defineComponent({name:"Select",__name:"Select",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},defaultValue:{type:[String,Number,Boolean,Object,Array],default:e=>e.multiple?[]:""},inputValue:{default:void 0},defaultInputValue:{default:""},size:{default:void 0},placeholder:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!1},allowSearch:{type:Boolean,default:e=>e.multiple},allowCreate:{type:Boolean,default:!1},maxTagCount:{default:0},popupContainer:{default:void 0},bordered:{type:Boolean,default:!0},defaultActivefirstOption:{type:Boolean,default:!1},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},unmountonClose:{type:Boolean},filterOption:{type:[Boolean,Function],default:void 0},options:{default:()=>[]},virtualListProps:{default:void 0},triggerProps:{default:()=>({contentStyle:{}})},formatLabel:{},fallbackOption:{},showExtraOptions:{type:Boolean,default:!0},valueKey:{default:""},searchDelay:{default:500},limit:{default:0},fieldNames:{default:()=>({})},scrollbar:{type:Boolean,default:!0},showHeaderOnEmpty:{type:Boolean,default:!1},showFooterOnEmpty:{type:Boolean,default:!1},tagNowrap:{type:Boolean,default:!1},hotkeys:{type:Boolean},showEmpty:{type:Boolean,default:!0}},emits:["update:modelValue","update:inputValue","update:popupVisible","change","input-value-change","clear","remove","search","exceedLimit","popup-visible-change","dropdown-scroll","dropdown-reach-bottom","select"],setup(i,{expose:p,emit:d}){const c=i,f=d,{allowClear:v,disabled:m,loading:h,searchDelay:y,showFooterOnEmpty:b,showHeaderOnEmpty:w,multiple:g,allowSearch:B,allowCreate:V,virtualListProps:C}=e.toRefs(c),k=e.ref(),x=e.ref(),{computedVisible:j,computedValue:S,computedInputValue:q,selectOptions:_,createOptions:O}=o().provide(c,f,k),E=e.computed(()=>{const e=g.value?S.value.length:String(S.value).length;return v.value&&!m.value&&!h.value&&!!e}),N=e.computed(()=>(!B.value||h.value)&&!V.value&&a.isUndefined(c.filterOption)),z=async(e,a="")=>{var o,t,r;switch(e){case"create":if(!V.value)return;if(O.value.find(e=>e==q.value))return;O.value.push({label:q.value,value:q.value}),B.value&&(null==(o=k.value)||o.blur());break;case"clear":S.value=g.value?[]:"",f("clear");break;case"search":await l.sleep(y.value),f("search",a);break;case"focus":if(m.value)return;if(j.value)return null==(t=k.value)?void 0:t.blur();j.value=!0,await l.sleep(0),null==(r=k.value)||r.focus();break;case"blur":j.value=!1;break;case"updateValue":S.value=a.map(e=>e.value)}};return p({focus(){var e;null==(e=k.value)||e.focus()},blur(){var e;null==(e=k.value)||e.blur()},getPopupRef:()=>x.value}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(s),e.mergeProps({"popup-visible":e.unref(j),"onUpdate:popupVisible":a[14]||(a[14]=l=>e.isRef(j)?j.value=l:null),"unmount-on-close":l.unmountonClose,"popup-container":l.popupContainer,disabled:e.unref(m),"popup-offset":4,trigger:"focus",position:"bl","animation-name":"slide-dynamic-origin","need-transform-origin":"","auto-fit-popup-width":"","prevent-focus":"",ref_key:"popupRef",ref:x},l.triggerProps),{content:e.withCtx(()=>[e.createVNode(r,{loading:e.unref(h),scrollbar:l.scrollbar,"virtual-list-props":e.unref(C),"show-footer-on-empty":e.unref(b),"show-header-on-empty":e.unref(w)},null,8,["loading","scrollbar","virtual-list-props","show-footer-on-empty","show-header-on-empty"])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["yc-select",{"yc-select-allow-search":e.unref(B),"yc-select-allow-clear":E.value,"yc-select-no-border":!l.bordered},l.$attrs.class]),style:e.normalizeStyle(l.$attrs.style)},[e.renderSlot(l.$slots,"trigger",{},()=>{var o;return[e.unref(g)?(e.openBlock(),e.createBlock(e.unref(n),{key:1,"input-value":e.unref(q),"onUpdate:inputValue":a[7]||(a[7]=l=>e.isRef(q)?q.value=l:null),"model-value":e.unref(_),placeholder:l.placeholder,readonly:N.value,disabled:e.unref(m),size:l.size,error:l.error,"max-tag-count":l.maxTagCount,"tag-nowrap":l.tagNowrap,ref_key:"inputRef",ref:k,onFocus:a[8]||(a[8]=e=>z("focus")),onBlur:a[9]||(a[9]=e=>z("blur")),onInput:a[10]||(a[10]=e=>z("search",e)),onRemove:a[11]||(a[11]=(e,a)=>l.$emit("remove",e,a)),onPressEnter:a[12]||(a[12]=e=>z("create")),"onUpdate:modelValue":a[13]||(a[13]=e=>z("updateValue",e))},{tag:e.withCtx(({tag:a})=>[l.$slots.label?e.renderSlot(l.$slots,"label",{key:0,data:a},void 0,!0):e.createCommentVNode("",!0)]),suffix:e.withCtx(()=>[e.createVNode(t,{"popup-visible":e.unref(j),"allow-search":e.unref(B),loading:e.unref(h),"show-clear-btn":E.value,onClear:a[6]||(a[6]=e=>z("clear"))},null,8,["popup-visible","allow-search","loading","show-clear-btn"])]),_:3},8,["input-value","model-value","placeholder","readonly","disabled","size","error","max-tag-count","tag-nowrap"])):(e.openBlock(),e.createBlock(e.unref(u),{key:0,modelValue:e.unref(q),"onUpdate:modelValue":a[1]||(a[1]=l=>e.isRef(q)?q.value=l:null),"show-input":e.unref(j),readonly:N.value,disabled:e.unref(m),size:l.size,error:l.error,placeholder:(null==(o=e.unref(_)[0])?void 0:o.label)||"",ref_key:"inputRef",ref:k,onClick:a[2]||(a[2]=e=>z("focus")),onBlur:a[3]||(a[3]=e=>z("blur")),onInput:a[4]||(a[4]=e=>z("search",e)),onPressEnter:a[5]||(a[5]=e=>z("create"))},{label:e.withCtx(()=>[e.renderSlot(l.$slots,"label",{data:e.unref(_)[0]},()=>{var a;return[e.createElementVNode("span",{class:e.normalizeClass([{"yc-input-placeholder":!e.unref(_).length}])},e.toDisplayString((null==(a=e.unref(_)[0])?void 0:a.label)||l.placeholder),3)]},!0)]),suffix:e.withCtx(()=>[e.createVNode(t,{"popup-visible":e.unref(j),"allow-search":e.unref(B),loading:e.unref(h),"show-clear-btn":E.value,onClear:a[0]||(a[0]=e=>z("clear"))},null,8,["popup-visible","allow-search","loading","show-clear-btn"])]),_:3},8,["modelValue","show-input","readonly","disabled","size","error","placeholder"]))]},!0)],6)]),_:3},16,["popup-visible","unmount-on-close","popup-container","disabled"]))}});module.exports=i;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("./hooks/useContext.js"),n=require("../_shared/icons/IconArrowDown.vue.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const c=require("../_shared/components/IconButton.vue.js");;/* empty css */const r=require("../Spin/index.js"),t={class:"yc-select-suffix-icon"},s={key:0,class:"yc-select-search-icon"},l=e.defineComponent({__name:"SelectIcon",props:{loading:{type:Boolean},popupVisible:{type:Boolean},showClearBtn:{type:Boolean},allowSearch:{type:Boolean}},emits:["clear"],setup(l){const{slots:i}=o().inject(),a=e=>i[e];return(o,l)=>{const u=e.resolveComponent("icon-search");return o.loading?(e.openBlock(),e.createBlock(e.unref(r),{key:0,size:12,class:"yc-select-loading-icon"},e.createSlots({_:2},[o.$slots["loading-icon"]?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a("loading-icon"))))]),key:"0"}:void 0]),1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",t,[e.unref(i)["arrow-icon"]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a("arrow-icon")),{key:0})):(e.openBlock(),e.createBlock(e.unref(n),{key:1,rotate:o.popupVisible?180:0},null,8,["rotate"]))]),o.allowSearch?(e.openBlock(),e.createElementBlock("div",s,[e.unref(i)["search-icon"]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a("search-icon")),{key:0})):(e.openBlock(),e.createBlock(u,{key:1}))])):e.createCommentVNode("",!0),o.showClearBtn?(e.openBlock(),e.createBlock(e.unref(c),{key:1,class:"yc-select-clear-icon",onClick:l[0]||(l[0]=e.withModifiers(e=>o.$emit("clear"),["stop"]))})):e.createCommentVNode("",!0)],64))}}});module.exports=l;
1
+ "use strict";const e=require("vue"),o=require("./hooks/useContext.js"),n=require("../_shared/icons/IconArrowDown.vue.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const c=require("../_shared/components/IconButton.vue.js");;/* empty css */const r=require("../Spin/index.js"),t={class:"yc-select-suffix-icon"},s={key:0,class:"yc-select-search-icon"},l=e.defineComponent({__name:"SelectIcon",props:{loading:{type:Boolean},popupVisible:{type:Boolean},showClearBtn:{type:Boolean},allowSearch:{type:Boolean}},emits:["clear"],setup(l){const{slots:i}=o().inject(),a=e=>i[e];return(o,l)=>{const p=e.resolveComponent("icon-search");return o.loading?(e.openBlock(),e.createBlock(e.unref(r),{key:0,size:12,class:"yc-select-loading-icon"},e.createSlots({_:2},[o.$slots["loading-icon"]?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a("loading-icon"))))]),key:"0"}:void 0]),1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",t,[e.unref(i)["arrow-icon"]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a("arrow-icon")),{key:0})):(e.openBlock(),e.createBlock(e.unref(n),{key:1,rotate:o.popupVisible?180:0},null,8,["rotate"]))]),o.allowSearch?(e.openBlock(),e.createElementBlock("div",s,[e.unref(i)["search-icon"]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a("search-icon")),{key:0})):(e.openBlock(),e.createBlock(p,{key:1}))])):e.createCommentVNode("",!0),o.showClearBtn?(e.openBlock(),e.createBlock(e.unref(c),{key:1,class:"yc-select-clear-icon",onClick:l[0]||(l[0]=e.withModifiers(e=>o.$emit("clear"),["stop"]))})):e.createCommentVNode("",!0)],64))}}});module.exports=l;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),r=require("./Option.vue.js"),t=require("./Optgroup.vue.js"),n=require("../Scrollbar/index.js"),a={class:"yc-select-dropdown-list"},s=e.defineComponent({__name:"SelectRealList",props:{scrollbar:{type:Boolean}},setup(s,{expose:i}){const{fieldKey:c,renderOptions:u,slots:p,emits:d}=o().inject(),k=e.ref(),f=e=>{if(p.option)return()=>{var l;return(null==(l=p.option)?void 0:l.call(p,{data:e}))||[]};const{render:o,label:r}=c.value;return l.getSlotFunction(e[o]?e[o]:e[r])};return i({getScrollRef(){var e;return null==(e=k.value)?void 0:e.getScrollRef()}}),(l,o)=>(e.openBlock(),e.createBlock(e.unref(n),{scrollbar:l.scrollbar,class:"yc-select-dropdown-list-wrapper"},{default:e.withCtx(()=>[e.createElementVNode("div",a,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(p).default))),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id},[l.isGroup?(e.openBlock(),e.createBlock(t,{key:0,label:l.label},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,l=>(e.openBlock(),e.createBlock(r,{key:l[e.unref(c).value],value:l[e.unref(c).value],disabled:l[e.unref(c).disabled],"tag-props":l[e.unref(c).tagProps],"is-fallback-option":l[e.unref(c).isFallbackOption]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(l))))]),_:2},1032,["value","disabled","tag-props","is-fallback-option"]))),128))]),_:2},1032,["label"])):(e.openBlock(),e.createBlock(r,{key:1,value:l[e.unref(c).value],disabled:l[e.unref(c).disabled],"tag-props":l[e.unref(c).tagProps],"is-fallback-option":l[e.unref(c).isFallbackOption]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(l))))]),_:2},1032,["value","disabled","tag-props","is-fallback-option"]))],64))),128))])]),_:1},8,["scrollbar"]))}});module.exports=s;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),r=require("./Option.vue.js"),t=require("./Optgroup.vue.js"),n=require("../Scrollbar/index.js"),a={class:"yc-select-dropdown-list"},s=e.defineComponent({__name:"SelectRealList",props:{scrollbar:{type:Boolean}},setup(s,{expose:c}){const{fieldKey:i,renderOptions:u,slots:p,emits:d}=o().inject(),k=e.ref(),f=e=>{if(p.option)return()=>{var l;return(null==(l=p.option)?void 0:l.call(p,{data:e}))||[]};const{render:o,label:r}=i.value;return l.getSlotFunction(e[o]?e[o]:e[r])};return c({getScrollRef(){var e;return null==(e=k.value)?void 0:e.getScrollRef()}}),(l,o)=>(e.openBlock(),e.createBlock(e.unref(n),{scrollbar:l.scrollbar,class:"yc-select-dropdown-list-wrapper"},{default:e.withCtx(()=>[e.createElementVNode("div",a,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(p).default))),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id},[l.isGroup?(e.openBlock(),e.createBlock(t,{key:0,label:l.label},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,l=>(e.openBlock(),e.createBlock(r,{key:l[e.unref(i).value],value:l[e.unref(i).value],disabled:l[e.unref(i).disabled],"tag-props":l[e.unref(i).tagProps],"is-fallback-option":l[e.unref(i).isFallbackOption]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(l))))]),_:2},1032,["value","disabled","tag-props","is-fallback-option"]))),128))]),_:2},1032,["label"])):(e.openBlock(),e.createBlock(r,{key:1,value:l[e.unref(i).value],disabled:l[e.unref(i).disabled],"tag-props":l[e.unref(i).tagProps],"is-fallback-option":l[e.unref(i).isFallbackOption]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f(l))))]),_:2},1032,["value","disabled","tag-props","is-fallback-option"]))],64))),128))])]),_:1},8,["scrollbar"]))}});module.exports=s;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),r=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const t=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js");require("./index.js");const s=require("./Option.vue.js"),i=e.defineComponent({__name:"SelectVirtualList",props:{virtualListProps:{}},setup(i){var l,n;const u=i,{virtualListProps:a}=e.toRefs(u),{fieldKey:c,renderOptions:d,slots:p,emits:v}=o().inject(),{list:m,wrapperProps:f,containerProps:k}=r.useVirtualList(d,{overscan:(null==(l=a.value)?void 0:l.buffer)??10,itemHeight:(null==(n=a.value)?void 0:n.itemHeight)||36}),j=e=>{if(p.option)return()=>{var r;return(null==(r=p.option)?void 0:r.call(p,{data:e}))||[]};const{render:r,label:o}=c.value;return e[r]?t.getSlotFunction(e[r]):t.getSlotFunction(e[o])};return(r,t)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"yc-select-dropdown-virtual-list"},e.unref(k)),[e.createElementVNode("div",e.mergeProps({class:"yc-select-dropdown-list"},e.unref(f)),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),({data:r})=>(e.openBlock(),e.createBlock(e.unref(s),{key:r[e.unref(c).value],value:r[e.unref(c).value],disabled:r[e.unref(c).disabled],"is-fallback-option":r[e.unref(c).isFallbackOption]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(r))))]),_:2},1032,["value","disabled","is-fallback-option"]))),128))],16)],16))}});module.exports=i;
1
+ "use strict";const e=require("vue"),r=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const t=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js");require("./index.js");const s=require("./Option.vue.js"),n=e.defineComponent({__name:"SelectVirtualList",props:{virtualListProps:{}},setup(n){var i,l;const u=n,{virtualListProps:a}=e.toRefs(u),{fieldKey:c,renderOptions:d,slots:p,emits:v}=o().inject(),{list:m,wrapperProps:f,containerProps:k}=r.useVirtualList(d,{overscan:(null==(i=a.value)?void 0:i.buffer)??10,itemHeight:(null==(l=a.value)?void 0:l.itemHeight)||36}),j=e=>{if(p.option)return()=>{var r;return(null==(r=p.option)?void 0:r.call(p,{data:e}))||[]};const{render:r,label:o}=c.value;return e[r]?t.getSlotFunction(e[r]):t.getSlotFunction(e[o])};return(r,t)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"yc-select-dropdown-virtual-list"},e.unref(k)),[e.createElementVNode("div",e.mergeProps({class:"yc-select-dropdown-list"},e.unref(f)),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),({data:r})=>(e.openBlock(),e.createBlock(e.unref(s),{key:r[e.unref(c).value],value:r[e.unref(c).value],disabled:r[e.unref(c).disabled],"is-fallback-option":r[e.unref(c).isFallbackOption]},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(r))))]),_:2},1032,["value","disabled","is-fallback-option"]))),128))],16)],16))}});module.exports=n;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../_shared/utils/dom.js");const t=require("../../_shared/utils/is.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */const l=require("../../_shared/utils/control.js"),u=require("./useSelectOptions.js"),i=require("./useSelectHotkeys.js"),o="select-context";module.exports=()=>({provide:(s,r,a)=>{const{popupVisible:n,defaultPopupVisible:p,modelValue:c,defaultValue:d,inputValue:m,defaultInputValue:v,multiple:f,fieldNames:V,limit:O,allowSearch:b,showExtraOptions:y,valueKey:h,hotkeys:j,options:q,showEmpty:x}=e.toRefs(s),{formatLabel:I,fallbackOption:g,filterOption:E}=s,_=l(n,p.value,e=>{r("update:popupVisible",e),r("popup-visible-change",e)}),k=l(c,d.value?d.value:f.value?[]:"",e=>{r("change",e),r("update:modelValue",e)},e=>f.value?Array.isArray(e)?e:[e]:e),w=l(m,v.value,e=>{r("update:inputValue",e)}),L=e.computed(()=>Object.fromEntries(["id","label","value","disabled","tagProps","render","isFallbackOption"].map(e=>[e,V.value[e]??e]))),S=e=>{var t;const l=null==e?void 0:e.label,u=null==(t=w.value.toLowerCase())?void 0:t.toLowerCase();return!!(null==l?void 0:l.includes(u))},F=e=>b.value?t.isFunction(E)?E(w.value,e):S(e):!(!t.isBoolean(E)||E)||(t.isFunction(E)?E(w.value,e):S(e)),{options:K,renderOptions:A,createOptions:B,selectOptions:C,collectOption:P}=u({computedValue:k,multiple:f,showExtraOptions:y,provideOptions:q,getValue:R,fallbackOption:g,formatLabel:I}),H=e.computed(()=>x.value?!b.value||t.isBoolean(E)&&!F?!K.value.length:K.value.every(e=>!F(e)):x.value),{curIndex:N}=i({computedValue:k,computedVisible:_,hotkeys:j,limit:O,multiple:f,options:K,blur:z,emits:r});function R(e){return(null==e?void 0:e[h.value])??e}function z(){var e;null==(e=a.value)||e.blur()}return e.provide(o,{computedValue:k,computedInputValue:w,limit:O,multiple:f,curIndex:N,options:K,isEmpty:H,fieldKey:L,renderOptions:A,slots:e.useSlots(),filterOption:F,blur:z,getValue:R,emits:r,collectOption:P}),{computedVisible:_,computedValue:k,computedInputValue:w,selectOptions:C,createOptions:B,options:K}},inject:()=>e.inject(o,{computedValue:e.ref(void 0),computedInputValue:e.ref(""),multiple:e.ref(!1),limit:e.ref(0),curIndex:e.ref(-1),options:e.ref([]),renderOptions:e.ref([]),isEmpty:e.ref(!1),fieldKey:e.ref({}),slots:{},emits:()=>{},blur:()=>{},filterOption:()=>!0,getValue:()=>"",collectOption:()=>{}})});
1
+ "use strict";const e=require("vue");require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../_shared/utils/dom.js");const t=require("../../_shared/utils/is.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */const l=require("../../_shared/utils/control.js"),u=require("./useSelectOptions.js"),i=require("./useSelectHotkeys.js"),o="select-context";module.exports=()=>({provide:(s,r,a)=>{const{popupVisible:n,defaultPopupVisible:p,modelValue:c,defaultValue:d,inputValue:m,defaultInputValue:v,multiple:f,fieldNames:V,limit:O,allowSearch:b,showExtraOptions:y,valueKey:h,hotkeys:j,options:q,showEmpty:x}=e.toRefs(s),{formatLabel:I,fallbackOption:g,filterOption:E}=s,k=l(n,p.value,e=>{r("update:popupVisible",e),r("popup-visible-change",e)}),w=l(c,d.value?d.value:f.value?[]:"",e=>{r("change",e),r("update:modelValue",e)},e=>f.value?Array.isArray(e)?e:[e]:e),_=l(m,v.value,e=>{r("update:inputValue",e)}),L=e.computed(()=>Object.fromEntries(["id","label","value","disabled","tagProps","render","isFallbackOption"].map(e=>[e,V.value[e]??e]))),S=e=>{var t;const l=null==e?void 0:e.label,u=null==(t=_.value.toLowerCase())?void 0:t.toLowerCase();return!!(null==l?void 0:l.includes(u))},F=e=>b.value?t.isFunction(E)?E(_.value,e):S(e):!(!t.isBoolean(E)||E)||(t.isFunction(E)?E(_.value,e):S(e)),{options:K,renderOptions:A,createOptions:B,selectOptions:C,collectOption:P}=u({computedValue:w,multiple:f,showExtraOptions:y,provideOptions:q,getValue:R,fallbackOption:g,formatLabel:I}),H=e.computed(()=>x.value?!b.value||t.isBoolean(E)&&!F?!K.value.length:K.value.every(e=>!F(e)):x.value),{curIndex:N}=i({computedValue:w,computedVisible:k,hotkeys:j,limit:O,multiple:f,options:K,blur:z,emits:r});function R(e){return(null==e?void 0:e[h.value])??e}function z(){var e;null==(e=a.value)||e.blur()}return e.provide(o,{computedValue:w,computedInputValue:_,limit:O,multiple:f,curIndex:N,options:K,isEmpty:H,fieldKey:L,renderOptions:A,slots:e.useSlots(),filterOption:F,blur:z,getValue:R,emits:r,collectOption:P}),{computedVisible:k,computedValue:w,computedInputValue:_,selectOptions:C,createOptions:B,options:K}},inject:()=>e.inject(o,{computedValue:e.ref(void 0),computedInputValue:e.ref(""),multiple:e.ref(!1),limit:e.ref(0),curIndex:e.ref(-1),options:e.ref([]),renderOptions:e.ref([]),isEmpty:e.ref(!1),fieldKey:e.ref({}),slots:{},emits:()=>{},blur:()=>{},filterOption:()=>!0,getValue:()=>"",collectOption:()=>{}})});
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),l=require("../../node_modules/nanoid/index.browser.js");require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../_shared/utils/dom.js");const u=require("../../_shared/utils/is.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */module.exports=t=>{const{computedValue:i,multiple:a,provideOptions:o,showExtraOptions:n,getValue:r,fallbackOption:s,formatLabel:d}=t,c=e.reactive(new Map),v=e.computed(()=>[...c.values()]),p=e.ref([]),m=e.computed(()=>s?O.value.filter(e=>!v.value.find(l=>r(l.value)==e)).map(e=>({...s(e)||{},isFallbackOption:!0})):[]),b=e.computed(()=>[...o.value,...p.value,...n.value?m.value:[]].map(e=>{let t=e;return u.isObject(e)||(t={label:e,value:e}),{id:l.nanoid(),...t}})),O=e.computed(()=>(a.value?i.value:[i.value]).map(e=>r(e)).filter(e=>!j(e))),f=e.computed(()=>{const e=[...v.value,...m.value];return O.value.map(l=>{const u=e.find(e=>r(e.value)==l)||{};return{...u,id:`${l}`,label:u?(null==d?void 0:d(u))??(null==u?void 0:u.label):l}})}),j=e=>u.isUndefined(e)||u.isNull(e)||u.isString(e)&&!e.length;return{options:v,createOptions:p,renderOptions:b,selectOptions:f,collectOption:(u,t)=>{if(u.isFallbackOption)return;const i=l.nanoid();e.onMounted(()=>{const e=`${r(u.value)}`;c.set(i,{...u,label:t.value,value:e?u.value:t.value})})}}};
1
+ "use strict";const e=require("vue"),l=require("../../node_modules/nanoid/index.browser.js");require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../_shared/utils/dom.js");const u=require("../../_shared/utils/is.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */module.exports=t=>{const{computedValue:i,multiple:a,provideOptions:o,showExtraOptions:n,getValue:r,fallbackOption:s,formatLabel:d}=t,c=e.reactive(new Map),v=e.computed(()=>[...c.values()]),p=e.ref([]),m=e.computed(()=>s?O.value.filter(e=>!v.value.find(l=>r(l.value)==e)).map(e=>({...s(e)||{},isFallbackOption:!0})):[]),b=e.computed(()=>[...o.value,...p.value,...n.value?m.value:[]].map(e=>{let t=e;return u.isObject(e)||(t={label:e,value:e}),{id:l.nanoid(),...t}})),O=e.computed(()=>(a.value?i.value:[i.value]).map(e=>r(e)).filter(e=>!j(e))),f=e.computed(()=>{const e=[...v.value,...m.value];return O.value.map(l=>{const u=e.find(e=>r(e.value)==l)||{};return{...u,id:`${l}`,label:u?(null==d?void 0:d(u))??(null==u?void 0:u.label):l}})}),j=e=>u.isUndefined(e)||u.isNull(e)||u.isString(e)&&!e.length;return{options:v,createOptions:p,renderOptions:b,selectOptions:f,collectOption:(u,t)=>{if(u.isFallbackOption)return;const i=l.nanoid();e.onMounted(()=>{const e=`${r(u.value)}`;c.set(i,{...u,label:t.value,value:e?u.value:t.value})})}}};