yc-design-vue 1.9.9 → 2.0.1

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 (244) hide show
  1. package/es/Alert/index.vue.js +2 -2
  2. package/es/AutoComplete/index.d.ts +19 -19
  3. package/es/AutoComplete/index.vue.d.ts +34 -34
  4. package/es/AutoComplete/type.d.ts +2 -2
  5. package/es/Avatar/Avatar.vue.js +1 -1
  6. package/es/BackTop/index.vue.js +1 -1
  7. package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  8. package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  9. package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  10. package/es/Button/index.css +1 -1
  11. package/es/Calendar/Calendar.vue.js +2 -2
  12. package/es/Carousel/CarouselArrow.vue.js +1 -1
  13. package/es/Cascader/CascaderIcon.vue.js +2 -2
  14. package/es/Cascader/CascaderOption.vue.js +1 -1
  15. package/es/Checkbox/Checkbox.vue.js +2 -2
  16. package/es/Collapse/CollapseItem.vue.js +2 -2
  17. package/es/Drawer/Drawer.vue.js +2 -2
  18. package/es/Dropdown/DropdownButton.vue.js +1 -1
  19. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  20. package/es/Empty/index.vue.js +1 -1
  21. package/es/Image/Image.vue.js +1 -1
  22. package/es/Image/ImagePreview.vue.js +1 -1
  23. package/es/Image/ImagePreviewArrow.vue.js +1 -1
  24. package/es/Image/ImagePreviewToolbar.vue.js +7 -7
  25. package/es/Input/Input.vue.js +2 -2
  26. package/es/Input/InputSuffix.vue.js +2 -2
  27. package/es/InputNumber/InputOperaBtn.vue.js +1 -1
  28. package/es/InputTag/index.vue.js +2 -2
  29. package/es/Layout/LayoutSider.vue.js +1 -1
  30. package/es/Layout/index.css +1 -1
  31. package/es/Link/index.vue.js +1 -1
  32. package/es/Mention/index.d.ts +27 -27
  33. package/es/Mention/index.vue.d.ts +70 -70
  34. package/es/Mention/type.d.ts +3 -3
  35. package/es/Menu/Menu.vue.js +1 -1
  36. package/es/Menu/MenuEllipsis.vue.js +1 -1
  37. package/es/Menu/SubMenu.vue.js +1 -1
  38. package/es/Message/Message.vue.js +2 -2
  39. package/es/Modal/Modal.vue.js +2 -2
  40. package/es/Notification/Notification.vue.js +2 -2
  41. package/es/PageHeader/index.vue.js +2 -2
  42. package/es/Pagination/PaginationItem.vue.js +1 -1
  43. package/es/Progress/ProgressCircle.vue.js +1 -1
  44. package/es/Radio/Radio.vue.js +2 -2
  45. package/es/Rate/index.vue.js +1 -1
  46. package/es/ResizeBox/index.vue.js +45 -33
  47. package/es/Select/Option.vue.d.ts +1 -1
  48. package/es/Select/Option.vue.js +1 -1
  49. package/es/Select/Select.vue.d.ts +14 -14
  50. package/es/Select/SelectIcon.vue.js +2 -2
  51. package/es/Select/hooks/useContext.d.ts +7 -7
  52. package/es/Select/hooks/useSelectOptions.d.ts +8 -8
  53. package/es/Select/index.d.ts +21 -21
  54. package/es/Select/type.d.ts +9 -8
  55. package/es/Spin/index.vue.js +1 -1
  56. package/es/Split/index.vue.js +1 -1
  57. package/es/Steps/Step.vue.js +1 -1
  58. package/es/Tabs/TabButton.vue.js +2 -2
  59. package/es/Tabs/Tabs.vue.js +1 -1
  60. package/es/Tag/index.vue.js +2 -2
  61. package/es/Textarea/index.vue.js +2 -2
  62. package/es/TimePicker/TimePicker.vue.js +2 -2
  63. package/es/Transfer/Transfer.vue.js +1 -1
  64. package/es/Transfer/TransferPanel.vue.js +2 -2
  65. package/es/Trigger/index.vue.js +1 -1
  66. package/es/Typography/TypographyBase.vue.d.ts +0 -4
  67. package/es/Typography/TypographyBase.vue.js +4 -4
  68. package/es/Typography/type.d.ts +0 -5
  69. package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
  70. package/es/_shared/components/IconButton/index.vue3.js +2 -2
  71. package/es/_shared/constants/index.d.ts +2 -2
  72. package/es/_shared/constants/index.js +1 -1
  73. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  74. package/es/_shared/icons/IconArrowRight.vue.js +1 -1
  75. package/es/_shared/icons/IconCheck.vue.js +1 -1
  76. package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  77. package/es/_shared/icons/IconClose.vue.js +1 -1
  78. package/es/_shared/icons/IconCopy.vue.js +1 -23
  79. package/es/_shared/icons/IconCopy.vue2.js +23 -1
  80. package/es/_shared/icons/IconDelete.vue2.js +1 -1
  81. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  82. package/es/_shared/icons/IconEdit.vue.js +1 -23
  83. package/es/_shared/icons/IconEdit.vue2.js +23 -1
  84. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  85. package/es/_shared/icons/IconError.vue.js +1 -1
  86. package/es/_shared/icons/IconExclamation.vue2.js +1 -1
  87. package/es/_shared/icons/IconEyeClose.vue2.js +1 -1
  88. package/es/_shared/icons/IconEyeOpen.vue2.js +1 -1
  89. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  90. package/es/_shared/icons/IconFullScreen.vue.js +1 -23
  91. package/es/_shared/icons/IconFullScreen.vue2.js +23 -1
  92. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  93. package/es/_shared/icons/IconInfo.vue.js +1 -1
  94. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  95. package/es/_shared/icons/IconLink.vue.js +1 -1
  96. package/es/_shared/icons/IconLoading.vue.js +1 -1
  97. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  98. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  99. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  100. package/es/_shared/icons/IconMore.vue.js +1 -1
  101. package/es/_shared/icons/IconOriginSize.vue.js +1 -29
  102. package/es/_shared/icons/IconOriginSize.vue2.js +29 -1
  103. package/es/_shared/icons/IconPlus.vue.js +1 -1
  104. package/es/_shared/icons/IconRight.vue.js +1 -1
  105. package/es/_shared/icons/IconRotateLeft.vue.js +1 -23
  106. package/es/_shared/icons/IconRotateLeft.vue2.js +23 -1
  107. package/es/_shared/icons/IconRotateRight.vue.js +1 -23
  108. package/es/_shared/icons/IconRotateRight.vue2.js +23 -1
  109. package/es/_shared/icons/IconSearch.vue2.js +1 -1
  110. package/es/_shared/icons/IconSeparator.vue2.js +1 -1
  111. package/es/_shared/icons/IconStar.vue.js +1 -1
  112. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  113. package/es/_shared/icons/IconTime.vue.js +1 -1
  114. package/es/_shared/icons/IconToTop.vue.js +1 -1
  115. package/es/_shared/icons/IconWarning.vue.js +1 -1
  116. package/es/_shared/icons/IconZoomIn.vue.js +1 -23
  117. package/es/_shared/icons/IconZoomIn.vue2.js +23 -1
  118. package/es/_shared/icons/IconZoomOut.vue.js +1 -23
  119. package/es/_shared/icons/IconZoomOut.vue2.js +23 -1
  120. package/es/index.d.ts +3 -3
  121. package/es/style.css +1 -1
  122. package/lib/Alert/index.vue.js +1 -1
  123. package/lib/AutoComplete/index.d.ts +19 -19
  124. package/lib/AutoComplete/index.vue.d.ts +34 -34
  125. package/lib/AutoComplete/type.d.ts +2 -2
  126. package/lib/Avatar/Avatar.vue.js +1 -1
  127. package/lib/BackTop/index.vue.js +1 -1
  128. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  129. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  130. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  131. package/lib/Button/index.css +1 -1
  132. package/lib/Calendar/Calendar.vue.js +1 -1
  133. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  134. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  135. package/lib/Cascader/CascaderOption.vue.js +1 -1
  136. package/lib/Checkbox/Checkbox.vue.js +1 -1
  137. package/lib/Collapse/CollapseItem.vue.js +1 -1
  138. package/lib/Drawer/Drawer.vue.js +1 -1
  139. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  140. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  141. package/lib/Empty/index.vue.js +1 -1
  142. package/lib/Image/Image.vue.js +1 -1
  143. package/lib/Image/ImagePreview.vue.js +1 -1
  144. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  145. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  146. package/lib/Input/Input.vue.js +1 -1
  147. package/lib/Input/InputSuffix.vue.js +1 -1
  148. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  149. package/lib/InputTag/index.vue.js +1 -1
  150. package/lib/Layout/LayoutSider.vue.js +1 -1
  151. package/lib/Layout/index.css +1 -1
  152. package/lib/Link/index.vue.js +1 -1
  153. package/lib/Mention/index.d.ts +27 -27
  154. package/lib/Mention/index.vue.d.ts +70 -70
  155. package/lib/Mention/type.d.ts +3 -3
  156. package/lib/Menu/Menu.vue.js +1 -1
  157. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  158. package/lib/Menu/SubMenu.vue.js +1 -1
  159. package/lib/Message/Message.vue.js +1 -1
  160. package/lib/Modal/Modal.vue.js +1 -1
  161. package/lib/Notification/Notification.vue.js +1 -1
  162. package/lib/PageHeader/index.vue.js +1 -1
  163. package/lib/Pagination/PaginationItem.vue.js +1 -1
  164. package/lib/Progress/ProgressCircle.vue.js +1 -1
  165. package/lib/Radio/Radio.vue.js +1 -1
  166. package/lib/Rate/index.vue.js +1 -1
  167. package/lib/ResizeBox/index.vue.js +1 -1
  168. package/lib/Select/Option.vue.d.ts +1 -1
  169. package/lib/Select/Option.vue.js +1 -1
  170. package/lib/Select/Select.vue.d.ts +14 -14
  171. package/lib/Select/SelectIcon.vue.js +1 -1
  172. package/lib/Select/hooks/useContext.d.ts +7 -7
  173. package/lib/Select/hooks/useSelectOptions.d.ts +8 -8
  174. package/lib/Select/index.d.ts +21 -21
  175. package/lib/Select/type.d.ts +9 -8
  176. package/lib/Spin/index.vue.js +1 -1
  177. package/lib/Split/index.vue.js +1 -1
  178. package/lib/Steps/Step.vue.js +1 -1
  179. package/lib/Tabs/TabButton.vue.js +1 -1
  180. package/lib/Tabs/Tabs.vue.js +1 -1
  181. package/lib/Tag/index.vue.js +1 -1
  182. package/lib/Textarea/index.vue.js +1 -1
  183. package/lib/TimePicker/TimePicker.vue.js +1 -1
  184. package/lib/Transfer/Transfer.vue.js +1 -1
  185. package/lib/Transfer/TransferPanel.vue.js +1 -1
  186. package/lib/Trigger/index.vue.js +1 -1
  187. package/lib/Typography/TypographyBase.vue.d.ts +0 -4
  188. package/lib/Typography/TypographyBase.vue.js +1 -1
  189. package/lib/Typography/type.d.ts +0 -5
  190. package/lib/_shared/components/IconButton/index.vue.js +1 -0
  191. package/lib/_shared/components/IconButton/index.vue3.js +1 -1
  192. package/lib/_shared/constants/index.d.ts +2 -2
  193. package/lib/_shared/constants/index.js +1 -1
  194. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  195. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  196. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  197. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  198. package/lib/_shared/icons/IconClose.vue.js +1 -1
  199. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  200. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  201. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  202. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  203. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  204. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  205. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  206. package/lib/_shared/icons/IconError.vue.js +1 -1
  207. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  208. package/lib/_shared/icons/IconEyeClose.vue2.js +1 -1
  209. package/lib/_shared/icons/IconEyeOpen.vue2.js +1 -1
  210. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  211. package/lib/_shared/icons/IconFullScreen.vue.js +1 -1
  212. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  213. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  214. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  215. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  216. package/lib/_shared/icons/IconLink.vue.js +1 -1
  217. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  218. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  219. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  220. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  221. package/lib/_shared/icons/IconMore.vue.js +1 -1
  222. package/lib/_shared/icons/IconOriginSize.vue.js +1 -1
  223. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  224. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  225. package/lib/_shared/icons/IconRight.vue.js +1 -1
  226. package/lib/_shared/icons/IconRotateLeft.vue.js +1 -1
  227. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  228. package/lib/_shared/icons/IconRotateRight.vue.js +1 -1
  229. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  230. package/lib/_shared/icons/IconSearch.vue2.js +1 -1
  231. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  232. package/lib/_shared/icons/IconStar.vue.js +1 -1
  233. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  234. package/lib/_shared/icons/IconTime.vue.js +1 -1
  235. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  236. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  237. package/lib/_shared/icons/IconZoomIn.vue.js +1 -1
  238. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  239. package/lib/_shared/icons/IconZoomOut.vue.js +1 -1
  240. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  241. package/lib/index.d.ts +3 -3
  242. package/lib/style.css +1 -1
  243. package/package.json +1 -1
  244. package/lib/_shared/components/IconButton/index.vue2.js +0 -1
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js"),a=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../_shared/utils/locale.js");const o=require("../_shared/utils/control.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconFaceSmile.vue.js"),t=require("../_shared/icons/IconStar.vue.js"),n=["onClick","onMouseenter"],c=["onClick","onMouseenter"],u=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(u,{emit:s}){const i=u,d=s,{modelValue:v,defaultValue:m,readonly:f,disabled:y,count:p,allowClear:k,color:h}=e.toRefs(i),B=e.ref([]);let g=!1;const _=e.ref(0),j=o(v,m.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(!(f.value||y.value||g)){j.value=k.value&&j.value==e?0:e,d("change",j.value),g=!0;for(let e=1;e<=p.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 x=e=>{f.value||y.value||(b&&clearTimeout(b),_.value=e,d("hover-change",e))},V=()=>{f.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(f)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),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=>x(a-.5),onMouseleave:V},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(t),{key:1}))])],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=>x(a),onMouseleave:V},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(t),{key:1}))])],44,c)]))),128))],2))}});module.exports=u;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js"),a=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../_shared/utils/locale.js");const o=require("../_shared/utils/control.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconFaceSmile.vue.js"),t=require("../_shared/icons/IconStar.vue.js"),n=["onClick","onMouseenter"],c=["onClick","onMouseenter"],u=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(u,{emit:s}){const i=u,d=s,{modelValue:v,defaultValue:m,readonly:f,disabled:y,count:p,allowClear:k,color:h}=e.toRefs(i),B=e.ref([]);let g=!1;const _=e.ref(0),j=o(v,m.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(!(f.value||y.value||g)){j.value=k.value&&j.value==e?0:e,d("change",j.value),g=!0;for(let e=1;e<=p.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 x=e=>{f.value||y.value||(b&&clearTimeout(b),_.value=e,d("hover-change",e))},V=()=>{f.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(f)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),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=>x(a-.5),onMouseleave:V},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(t),{key:1}))])],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=>x(a),onMouseleave:V},[e.renderSlot(l.$slots,"character",{index:a},()=>[l.grading?(e.openBlock(),e.createBlock(e.unref(r),{key:0})):(e.openBlock(),e.createBlock(e.unref(t),{key:1}))])],44,c)]))),128))],2))}});module.exports=u;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../_shared/utils/locale.js");const r=require("../_shared/utils/control.js");,/* empty css */,/* empty css */;/* empty css */const i=require("../_shared/icons/IconDragDot.vue.js"),l=["dir","onMousedown"],n={class:"yc-resizebox-trigger-icon-wrapper"},u=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(u,{emit:s}){e.useSlots();const a=u,d=s,{width:c,height:v}=e.toRefs(a),h=r(c,0,e=>{d("update:width",e)}),g=r(v,0,e=>{d("update:height",e)}),m=e.reactive([]),f=e.reactive({left:0,right:0,bottom:0,top:0}),p=e.ref(),x=e.ref(null),y=e.ref(0),b=e.ref(0);let _;return t.useEventListener("mousemove",async e=>{if(!x.value||!p.value)return;const{clientX:t,clientY:r}=e,i="left"==x.value?y.value-t:t-y.value,l="top"==x.value?b.value-r:r-b.value,n=f.left+f.right,u=f.top+f.bottom;y.value=t,b.value=r,["left","right"].includes(x.value)?(h.value+=i,h.value<=n&&(h.value=n),p.value.style.width=o.valueToPx(h.value)):(g.value+=l,g.value<=u&&(g.value=u),p.value.style.height=o.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=>{x.value&&(x.value=null,document.body.style.cursor=_,d("moving-end",e))}),t.useResizeObserver(()=>m,e=>{e.forEach(e=>{const t=e.target.getAttribute("dir"),{contentRect:{width:o,height:r}}=e;f[t]=["right","left"].includes(t)?o:r})},{box:"border-box"}),(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),{class:"yc-resizebox",ref_key:"boxRef",ref:p},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.directions,(o,r)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["yc-resizebox-trigger",`yc-resizebox-direction-${o}`,"yc-resizebox-trigger-"+(["left","right"].includes(o)?"vertical":"horizontal")]),dir:o,ref_for:!0,ref:e=>m[r]=e,onMousedown:e=>((e,t)=>{t.preventDefault(),x.value=e;const{width:o,height:r}=p.value.getBoundingClientRect(),{clientX:i,clientY:l}=t;h.value=o,g.value=r,y.value=i,b.value=l,_=getComputedStyle(document.body).cursor,document.body.style.cursor=["left","right"].includes(e)?"col-resize":"row-resize",d("moving-start",t)})(o,e)},[e.renderSlot(t.$slots,"resize-trigger",{direction:o},()=>[e.createElementVNode("div",n,[e.renderSlot(t.$slots,"resize-trigger-icon",{direction:o},()=>[e.createVNode(e.unref(i),{rotate:["left","right"].includes(o)?90:0},null,8,["rotate"])])])])],42,l))),128))]),_:3},512))}});module.exports=u;
1
+ "use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../_shared/utils/locale.js");const i=require("../_shared/utils/control.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconDragDot.vue.js"),n=["dir","onMousedown"],l={class:"yc-resizebox-trigger-icon-wrapper"},s=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(s,{emit:u}){e.useSlots();const a=s,c=u,{width:d,height:v}=e.toRefs(a),h=i(d,0,e=>{c("update:width",e)}),g=i(v,0,e=>{c("update:height",e)}),m=e.reactive([]),f=e.reactive({left:0,right:0,bottom:0,top:0}),p=e.ref(),y=e.ref(null);let x,w=0,b=0;return t.useEventListener("mousemove",async e=>{if(!y.value||!p.value)return;const{clientX:t,clientY:i}=e,r="left"==y.value?w-t:t-w,n="top"==y.value?b-i:i-b;w=t,b=i,["left","right"].includes(y.value)?(h.value+=r,p.value.style.width=`${o.valueToPx(h.value)}`):(g.value+=n,p.value.style.height=`${o.valueToPx(g.value)}`);const{width:l,height:s}=p.value.getBoundingClientRect();l!=h.value&&(h.value=l),s!=g.value&&(g.value=l),c("moving",{width:l,height:s},e)}),t.useEventListener("mouseup",e=>{y.value&&(y.value=null,document.body.style.cursor=x,c("moving-end",e))}),t.useResizeObserver(()=>m,e=>{e.forEach(e=>{const t=e.target.getAttribute("dir"),{contentRect:{width:o,height:i}}=e;f[t]=["right","left"].includes(t)?o:i})},{box:"border-box"}),e.watch([h,g],async()=>{y.value||(await e.nextTick(),p.value.style.width=`${o.valueToPx(h.value)}`,p.value.style.height=`${o.valueToPx(g.value)}`)},{immediate:!0}),(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),{style:e.normalizeStyle({minWidth:e.unref(o.valueToPx)(f.left+f.right),minHeight:e.unref(o.valueToPx)(f.top+f.bottom)}),class:"yc-resizebox",ref_key:"boxRef",ref:p},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.directions,(o,i)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["yc-resizebox-trigger",`yc-resizebox-direction-${o}`,"yc-resizebox-trigger-"+(["left","right"].includes(o)?"vertical":"horizontal")]),dir:o,ref_for:!0,ref:e=>m[i]=e,onMousedown:e=>(async(e,t)=>{t.preventDefault(),y.value=e;const{width:o,height:i}=p.value.getBoundingClientRect();h.value=o,g.value=i;const{clientX:r,clientY:n}=t;w=r,b=n,x=getComputedStyle(document.body).cursor,document.body.style.cursor=["left","right"].includes(e)?"col-resize":"row-resize",c("moving-start",t)})(o,e)},[e.renderSlot(t.$slots,"resize-trigger",{direction:o},()=>[e.createElementVNode("div",l,[e.renderSlot(t.$slots,"resize-trigger-icon",{direction:o},()=>[e.createVNode(e.unref(r),{rotate:["left","right"].includes(o)?90:0},null,8,["rotate"])])])])],42,n))),128))]),_:3},8,["style"]))}});module.exports=s;
@@ -10,7 +10,7 @@ declare function __VLS_template(): {
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<OptionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OptionProps> & Readonly<{}>, {
12
12
  disabled: boolean;
13
- value: import('./type').SelectValue;
13
+ value: import('./type').OptionValue;
14
14
  label: string;
15
15
  isFallbackOption: boolean;
16
16
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -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("../_shared/utils/locale.js");const o=require("./hooks/useContext.js"),n=require("../Checkbox/index.js"),s={key:0,class:"yc-select-option-icon"},a={key:3,class:"yc-select-option-suffix"},r=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(r){const i=r,{label:u,disabled:c}=e.toRefs(i),{computedValue:d,multiple:f,limit:p,curIndex:v,options:m,blur:y,filterOption:k,getValue:x,emits:b,collectOption:B}=o().inject(),h=e.ref(),_=e.computed(()=>`${i.value}`?i.value:t.getDomText(h)),j=e.computed(()=>i.label?i.label:t.getDomText(h)),g=e.computed(()=>{if(!f.value)return!1;return-1!=d.value.findIndex(e=>x(e)===x(_.value))}),q=()=>{c.value||l.isUndefined(d.value)||(d.value=_.value,b("select",_.value),y())},C=e=>{const t=d.value,{value:l}=_;if(e){if(p.value>0&&t.length==p.value)return b("exceedLimit",l);b("select",_.value),d.value=[...t,l]}else d.value=t.filter(e=>e!=l)};return B(i,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)==_.value,"yc-select-option-disabled":e.unref(c)}])},[t.$slots.icon?(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"icon")])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(e.unref(n.default),{key:1,"model-value":g.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)])],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:q},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)])],512)),t.$slots.suffix?(e.openBlock(),e.createElementBlock("div",a,[e.renderSlot(t.$slots,"suffix")])):e.createCommentVNode("",!0)],2)),[[e.vShow,e.unref(k)({...t.$props,label:j.value})]])}}});module.exports=r;
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("../_shared/utils/locale.js");const o=require("./hooks/useContext.js"),n=require("../Checkbox/index.js"),s={key:0,class:"yc-select-option-icon"},a={key:3,class:"yc-select-option-suffix"},r=e.defineComponent({name:"Option",__name:"Option",props:{label:{default:""},value:{type:[String,Number,Boolean,Object],default:""},disabled:{type:Boolean,default:!1},tagProps:{},id:{},isFallbackOption:{type:Boolean,default:!1}},setup(r){const i=r,{label:u,disabled:c}=e.toRefs(i),{computedValue:d,multiple:f,limit:p,curIndex:v,options:m,blur:k,filterOption:y,getValue:x,emits:b,collectOption:B}=o().inject(),h=e.ref(),_=e.computed(()=>`${i.value}`?i.value:t.getDomText(h)),j=e.computed(()=>i.label?i.label:t.getDomText(h)),g=e.computed(()=>{if(!f.value)return!1;return-1!=d.value.findIndex(e=>x(e)===x(_.value))}),q=()=>{c.value||l.isUndefined(d.value)||(d.value=_.value,b("select",_.value),k())},C=e=>{const t=d.value,{value:l}=_;if(e){if(p.value>0&&t.length==p.value)return b("exceedLimit",l);b("select",_.value),d.value=[...t,l]}else d.value=t.filter(e=>e!=l)};return B(i,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)==_.value,"yc-select-option-disabled":e.unref(c)}])},[t.$slots.icon?(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"icon")])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(e.unref(n.default),{key:1,"model-value":g.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)])],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:q},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)),1)])],512)),t.$slots.suffix?(e.openBlock(),e.createElementBlock("div",a,[e.renderSlot(t.$slots,"suffix")])):e.createCommentVNode("",!0)],2)),[[e.vShow,e.unref(y)({...t.$props,label:j.value})]])}}});module.exports=r;
@@ -1,4 +1,4 @@
1
- import { SelectProps, SelectSlots, SelectValue } from './type';
1
+ import { SelectProps, SelectSlots, OptionValue } from './type';
2
2
  import { InputTagValue } from '../InputTag';
3
3
  import { TriggerInstance } from '../Trigger';
4
4
  declare function __VLS_template(): {
@@ -393,31 +393,31 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
393
393
  blur(): void;
394
394
  getPopupRef(): TriggerInstance;
395
395
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
396
- change: (value: SelectValue) => any;
396
+ change: (value: import('./type').SelectValue) => any;
397
397
  "update:popupVisible": (value: boolean) => any;
398
398
  "popup-visible-change": (value: boolean) => any;
399
399
  clear: () => any;
400
- select: (value: SelectValue) => any;
400
+ select: (value: OptionValue) => any;
401
401
  search: (value: string) => any;
402
- "update:modelValue": (value: SelectValue) => any;
403
- "update:inputValue": (value: SelectValue) => any;
402
+ "update:modelValue": (value: import('./type').SelectValue) => any;
403
+ "update:inputValue": (value: string) => any;
404
404
  "input-value-change": (value: string) => any;
405
405
  remove: (index: string | number, ev: Event) => any;
406
- exceedLimit: (value: SelectValue, ev?: MouseEvent | undefined) => any;
406
+ exceedLimit: (value: OptionValue, ev?: MouseEvent | undefined) => any;
407
407
  "dropdown-scroll": (ev: Event) => any;
408
408
  "dropdown-reach-bottom": (ev: Event) => any;
409
409
  }, string, import('vue').PublicProps, Readonly<SelectProps> & Readonly<{
410
- onChange?: ((value: SelectValue) => any) | undefined;
410
+ onChange?: ((value: import('./type').SelectValue) => any) | undefined;
411
411
  "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
412
412
  "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
413
413
  onClear?: (() => any) | undefined;
414
- onSelect?: ((value: SelectValue) => any) | undefined;
414
+ onSelect?: ((value: OptionValue) => any) | undefined;
415
415
  onSearch?: ((value: string) => any) | undefined;
416
- "onUpdate:modelValue"?: ((value: SelectValue) => any) | undefined;
417
- "onUpdate:inputValue"?: ((value: SelectValue) => any) | undefined;
416
+ "onUpdate:modelValue"?: ((value: import('./type').SelectValue) => any) | undefined;
417
+ "onUpdate:inputValue"?: ((value: string) => any) | undefined;
418
418
  "onInput-value-change"?: ((value: string) => any) | undefined;
419
419
  onRemove?: ((index: string | number, ev: Event) => any) | undefined;
420
- onExceedLimit?: ((value: SelectValue, ev?: MouseEvent | undefined) => any) | undefined;
420
+ onExceedLimit?: ((value: OptionValue, ev?: MouseEvent | undefined) => any) | undefined;
421
421
  "onDropdown-scroll"?: ((ev: Event) => any) | undefined;
422
422
  "onDropdown-reach-bottom"?: ((ev: Event) => any) | undefined;
423
423
  }>, {
@@ -432,11 +432,11 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
432
432
  placeholder: string;
433
433
  loading: boolean;
434
434
  bordered: boolean;
435
- modelValue: SelectValue;
436
- defaultValue: SelectValue;
435
+ modelValue: import('./type').SelectValue;
436
+ defaultValue: import('./type').SelectValue;
437
437
  allowClear: boolean;
438
438
  showExtraOptions: boolean;
439
- options: import('./type').SelectOptions;
439
+ options: import('./type').SelectOption[];
440
440
  limit: number;
441
441
  inputValue: string;
442
442
  defaultInputValue: string;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("./hooks/useContext.js"),n=require("../_shared/icons/IconArrowDown.vue.js"),c=;/* empty css */,/* empty css */require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */;/* 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"),c=;/* empty css */,/* empty css */require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */;/* 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,9 +1,9 @@
1
1
  import { Ref, Slots } from 'vue';
2
- import { SelectValue, SelectOptionData, SelectEmits } from '../type';
2
+ import { SelectValue, SelectOptionData, SelectEmits, OptionValue } from '../type';
3
3
  import { InputInstance } from '../../Input';
4
4
  import { ObjectData, Props } from '../../_shared/type';
5
5
  type SelectContext = {
6
- computedValue: Ref<SelectValue | SelectValue[] | undefined>;
6
+ computedValue: Ref<SelectValue | undefined>;
7
7
  computedInputValue: Ref<string>;
8
8
  multiple: Ref<boolean>;
9
9
  limit: Ref<number>;
@@ -15,7 +15,7 @@ type SelectContext = {
15
15
  slots: Slots;
16
16
  blur: () => void;
17
17
  filterOption: (option: SelectOptionData) => boolean;
18
- getValue: (value: SelectValue | ObjectData) => SelectValue;
18
+ getValue: (value: OptionValue | ObjectData) => OptionValue;
19
19
  collectOption: (props: Props, optionLabel: Ref<string>) => void;
20
20
  emits: SelectEmits;
21
21
  };
@@ -26,9 +26,9 @@ declare const _default: () => {
26
26
  computedInputValue: import('vue').WritableComputedRef<string, string>;
27
27
  selectOptions: import('vue').ComputedRef<{
28
28
  id: string;
29
- label: SelectValue | undefined;
29
+ label: OptionValue | undefined;
30
30
  render?: import('../../_shared/type').RenderContent;
31
- value?: SelectValue;
31
+ value?: OptionValue;
32
32
  disabled?: boolean;
33
33
  tagProps?: import('../..').TagProps;
34
34
  isFallbackOption?: boolean;
@@ -36,7 +36,7 @@ declare const _default: () => {
36
36
  createOptions: Ref<{
37
37
  render?: string | import('vue').RenderFunction | ObjectData[] | undefined;
38
38
  label?: string | undefined;
39
- value?: string | number | boolean | ObjectData | (string | number | boolean | ObjectData)[] | undefined;
39
+ value?: OptionValue | undefined;
40
40
  disabled?: boolean | undefined;
41
41
  tagProps?: {
42
42
  color?: string | undefined;
@@ -56,7 +56,7 @@ declare const _default: () => {
56
56
  }[], SelectOptionData[] | {
57
57
  render?: string | import('vue').RenderFunction | ObjectData[] | undefined;
58
58
  label?: string | undefined;
59
- value?: string | number | boolean | ObjectData | (string | number | boolean | ObjectData)[] | undefined;
59
+ value?: OptionValue | undefined;
60
60
  disabled?: boolean | undefined;
61
61
  tagProps?: {
62
62
  color?: string | undefined;
@@ -1,12 +1,12 @@
1
1
  import { Ref } from 'vue';
2
2
  import { ObjectData, Props } from '../../_shared/type';
3
- import { SelectValue, SelectOptions, FallbackOption, FormatLabel, SelectOptionData } from '../index';
3
+ import { SelectValue, SelectOption, FallbackOption, FormatLabel, SelectOptionData, OptionValue } from '../index';
4
4
  declare const _default: (params: {
5
5
  multiple: Ref<boolean>;
6
6
  computedValue: Ref<SelectValue>;
7
- provideOptions: Ref<SelectOptions>;
7
+ provideOptions: Ref<SelectOption[]>;
8
8
  showExtraOptions: Ref<boolean>;
9
- getValue: (value: string | ObjectData) => SelectValue;
9
+ getValue: (value: OptionValue) => OptionValue;
10
10
  fallbackOption?: FallbackOption;
11
11
  formatLabel?: FormatLabel;
12
12
  }) => {
@@ -14,7 +14,7 @@ declare const _default: (params: {
14
14
  createOptions: Ref<{
15
15
  render?: string | import('vue').RenderFunction | ObjectData[] | undefined;
16
16
  label?: string | undefined;
17
- value?: string | number | boolean | ObjectData | (string | number | boolean | ObjectData)[] | undefined;
17
+ value?: OptionValue | undefined;
18
18
  disabled?: boolean | undefined;
19
19
  tagProps?: {
20
20
  color?: string | undefined;
@@ -34,7 +34,7 @@ declare const _default: (params: {
34
34
  }[], SelectOptionData[] | {
35
35
  render?: string | import('vue').RenderFunction | ObjectData[] | undefined;
36
36
  label?: string | undefined;
37
- value?: string | number | boolean | ObjectData | (string | number | boolean | ObjectData)[] | undefined;
37
+ value?: OptionValue | undefined;
38
38
  disabled?: boolean | undefined;
39
39
  tagProps?: {
40
40
  color?: string | undefined;
@@ -52,12 +52,12 @@ declare const _default: (params: {
52
52
  id?: string | undefined;
53
53
  isFallbackOption?: boolean | undefined;
54
54
  }[]>;
55
- renderOptions: import('vue').ComputedRef<SelectOptions>;
55
+ renderOptions: import('vue').ComputedRef<SelectOption[]>;
56
56
  selectOptions: import('vue').ComputedRef<{
57
57
  id: string;
58
- label: SelectValue | undefined;
58
+ label: OptionValue | undefined;
59
59
  render?: import('../../_shared/type').RenderContent;
60
- value?: SelectValue;
60
+ value?: OptionValue;
61
61
  disabled?: boolean;
62
62
  tagProps?: import('../..').TagProps;
63
63
  isFallbackOption?: boolean;
@@ -12,13 +12,13 @@ declare const Select: {
12
12
  "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
13
13
  "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
14
14
  onClear?: (() => any) | undefined;
15
- onSelect?: ((value: import('./type').SelectValue) => any) | undefined;
15
+ onSelect?: ((value: import('./type').OptionValue) => any) | undefined;
16
16
  onSearch?: ((value: string) => any) | undefined;
17
17
  "onUpdate:modelValue"?: ((value: import('./type').SelectValue) => any) | undefined;
18
- "onUpdate:inputValue"?: ((value: import('./type').SelectValue) => any) | undefined;
18
+ "onUpdate:inputValue"?: ((value: string) => any) | undefined;
19
19
  "onInput-value-change"?: ((value: string) => any) | undefined;
20
20
  onRemove?: ((index: string | number, ev: Event) => any) | undefined;
21
- onExceedLimit?: ((value: import('./type').SelectValue, ev?: MouseEvent | undefined) => any) | undefined;
21
+ onExceedLimit?: ((value: import('./type').OptionValue, ev?: MouseEvent | undefined) => any) | undefined;
22
22
  "onDropdown-scroll"?: ((ev: Event) => any) | undefined;
23
23
  "onDropdown-reach-bottom"?: ((ev: Event) => any) | undefined;
24
24
  }>, {
@@ -30,13 +30,13 @@ declare const Select: {
30
30
  "update:popupVisible": (value: boolean) => any;
31
31
  "popup-visible-change": (value: boolean) => any;
32
32
  clear: () => any;
33
- select: (value: import('./type').SelectValue) => any;
33
+ select: (value: import('./type').OptionValue) => any;
34
34
  search: (value: string) => any;
35
35
  "update:modelValue": (value: import('./type').SelectValue) => any;
36
- "update:inputValue": (value: import('./type').SelectValue) => any;
36
+ "update:inputValue": (value: string) => any;
37
37
  "input-value-change": (value: string) => any;
38
38
  remove: (index: string | number, ev: Event) => any;
39
- exceedLimit: (value: import('./type').SelectValue, ev?: MouseEvent | undefined) => any;
39
+ exceedLimit: (value: import('./type').OptionValue, ev?: MouseEvent | undefined) => any;
40
40
  "dropdown-scroll": (ev: Event) => any;
41
41
  "dropdown-reach-bottom": (ev: Event) => any;
42
42
  }, import('vue').PublicProps, {
@@ -55,7 +55,7 @@ declare const Select: {
55
55
  defaultValue: import('./type').SelectValue;
56
56
  allowClear: boolean;
57
57
  showExtraOptions: boolean;
58
- options: import('./type').SelectOptions;
58
+ options: import('./type').SelectOption[];
59
59
  limit: number;
60
60
  inputValue: string;
61
61
  defaultInputValue: string;
@@ -464,13 +464,13 @@ declare const Select: {
464
464
  "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
465
465
  "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
466
466
  onClear?: (() => any) | undefined;
467
- onSelect?: ((value: import('./type').SelectValue) => any) | undefined;
467
+ onSelect?: ((value: import('./type').OptionValue) => any) | undefined;
468
468
  onSearch?: ((value: string) => any) | undefined;
469
469
  "onUpdate:modelValue"?: ((value: import('./type').SelectValue) => any) | undefined;
470
- "onUpdate:inputValue"?: ((value: import('./type').SelectValue) => any) | undefined;
470
+ "onUpdate:inputValue"?: ((value: string) => any) | undefined;
471
471
  "onInput-value-change"?: ((value: string) => any) | undefined;
472
472
  onRemove?: ((index: string | number, ev: Event) => any) | undefined;
473
- onExceedLimit?: ((value: import('./type').SelectValue, ev?: MouseEvent | undefined) => any) | undefined;
473
+ onExceedLimit?: ((value: import('./type').OptionValue, ev?: MouseEvent | undefined) => any) | undefined;
474
474
  "onDropdown-scroll"?: ((ev: Event) => any) | undefined;
475
475
  "onDropdown-reach-bottom"?: ((ev: Event) => any) | undefined;
476
476
  }>, {
@@ -493,7 +493,7 @@ declare const Select: {
493
493
  defaultValue: import('./type').SelectValue;
494
494
  allowClear: boolean;
495
495
  showExtraOptions: boolean;
496
- options: import('./type').SelectOptions;
496
+ options: import('./type').SelectOption[];
497
497
  limit: number;
498
498
  inputValue: string;
499
499
  defaultInputValue: string;
@@ -519,13 +519,13 @@ declare const Select: {
519
519
  "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
520
520
  "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
521
521
  onClear?: (() => any) | undefined;
522
- onSelect?: ((value: import('./type').SelectValue) => any) | undefined;
522
+ onSelect?: ((value: import('./type').OptionValue) => any) | undefined;
523
523
  onSearch?: ((value: string) => any) | undefined;
524
524
  "onUpdate:modelValue"?: ((value: import('./type').SelectValue) => any) | undefined;
525
- "onUpdate:inputValue"?: ((value: import('./type').SelectValue) => any) | undefined;
525
+ "onUpdate:inputValue"?: ((value: string) => any) | undefined;
526
526
  "onInput-value-change"?: ((value: string) => any) | undefined;
527
527
  onRemove?: ((index: string | number, ev: Event) => any) | undefined;
528
- onExceedLimit?: ((value: import('./type').SelectValue, ev?: MouseEvent | undefined) => any) | undefined;
528
+ onExceedLimit?: ((value: import('./type').OptionValue, ev?: MouseEvent | undefined) => any) | undefined;
529
529
  "onDropdown-scroll"?: ((ev: Event) => any) | undefined;
530
530
  "onDropdown-reach-bottom"?: ((ev: Event) => any) | undefined;
531
531
  }>, {
@@ -537,13 +537,13 @@ declare const Select: {
537
537
  "update:popupVisible": (value: boolean) => any;
538
538
  "popup-visible-change": (value: boolean) => any;
539
539
  clear: () => any;
540
- select: (value: import('./type').SelectValue) => any;
540
+ select: (value: import('./type').OptionValue) => any;
541
541
  search: (value: string) => any;
542
542
  "update:modelValue": (value: import('./type').SelectValue) => any;
543
- "update:inputValue": (value: import('./type').SelectValue) => any;
543
+ "update:inputValue": (value: string) => any;
544
544
  "input-value-change": (value: string) => any;
545
545
  remove: (index: string | number, ev: Event) => any;
546
- exceedLimit: (value: import('./type').SelectValue, ev?: MouseEvent | undefined) => any;
546
+ exceedLimit: (value: import('./type').OptionValue, ev?: MouseEvent | undefined) => any;
547
547
  "dropdown-scroll": (ev: Event) => any;
548
548
  "dropdown-reach-bottom": (ev: Event) => any;
549
549
  }, string, {
@@ -562,7 +562,7 @@ declare const Select: {
562
562
  defaultValue: import('./type').SelectValue;
563
563
  allowClear: boolean;
564
564
  showExtraOptions: boolean;
565
- options: import('./type').SelectOptions;
565
+ options: import('./type').SelectOption[];
566
566
  limit: number;
567
567
  inputValue: string;
568
568
  defaultInputValue: string;
@@ -585,7 +585,7 @@ declare const Select: {
585
585
  option: {
586
586
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').OptionProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
587
587
  disabled: boolean;
588
- value: import('./type').SelectValue;
588
+ value: import('./type').OptionValue;
589
589
  label: string;
590
590
  isFallbackOption: boolean;
591
591
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
@@ -599,7 +599,7 @@ declare const Select: {
599
599
  Defaults: {};
600
600
  }, Readonly<import('./type').OptionProps> & Readonly<{}>, {}, {}, {}, {}, {
601
601
  disabled: boolean;
602
- value: import('./type').SelectValue;
602
+ value: import('./type').OptionValue;
603
603
  label: string;
604
604
  isFallbackOption: boolean;
605
605
  }>;
@@ -608,7 +608,7 @@ declare const Select: {
608
608
  __isSuspense?: never;
609
609
  } & import('vue').ComponentOptionsBase<Readonly<import('./type').OptionProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
610
610
  disabled: boolean;
611
- value: import('./type').SelectValue;
611
+ value: import('./type').OptionValue;
612
612
  label: string;
613
613
  isFallbackOption: boolean;
614
614
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
@@ -23,7 +23,7 @@ export interface SelectProps {
23
23
  defaultPopupVisible?: boolean;
24
24
  unmountonClose?: boolean;
25
25
  filterOption?: FilterOption;
26
- options?: SelectOptions;
26
+ options?: SelectOption[];
27
27
  virtualListProps?: VirtualListProps;
28
28
  triggerProps?: TriggerProps;
29
29
  formatLabel?: FormatLabel;
@@ -42,18 +42,18 @@ export interface SelectProps {
42
42
  }
43
43
  export interface SelectEmits {
44
44
  (e: 'update:modelValue', value: SelectValue): void;
45
- (e: 'update:inputValue', value: SelectValue): void;
45
+ (e: 'update:inputValue', value: string): void;
46
46
  (e: 'update:popupVisible', value: boolean): void;
47
47
  (e: 'change', value: SelectValue): void;
48
48
  (e: 'input-value-change', value: string): void;
49
49
  (e: 'clear'): void;
50
50
  (e: 'remove', index: number | string, ev: Event): void;
51
51
  (e: 'search', value: string): void;
52
- (e: 'exceedLimit', value: SelectValue, ev?: MouseEvent): void;
52
+ (e: 'exceedLimit', value: OptionValue, ev?: MouseEvent): void;
53
53
  (e: 'popup-visible-change', value: boolean): void;
54
54
  (e: 'dropdown-scroll', ev: Event): void;
55
55
  (e: 'dropdown-reach-bottom', ev: Event): void;
56
- (e: 'select', value: SelectValue): void;
56
+ (e: 'select', value: OptionValue): void;
57
57
  }
58
58
  export interface SelectSlots {
59
59
  default?: () => VNode[];
@@ -79,7 +79,7 @@ export interface SelectExpose {
79
79
  }
80
80
  export interface OptionProps {
81
81
  label?: string;
82
- value?: SelectValue;
82
+ value?: OptionValue;
83
83
  disabled?: boolean;
84
84
  tagProps?: TagProps;
85
85
  id?: string;
@@ -97,7 +97,8 @@ export interface OptgroupSlots {
97
97
  default?: () => VNode[];
98
98
  label?: () => VNode[];
99
99
  }
100
- export type SelectValue = (string | number | boolean | ObjectData) | (string | number | boolean | ObjectData)[];
100
+ export type OptionValue = string | number | boolean | ObjectData;
101
+ export type SelectValue = OptionValue | OptionValue[];
101
102
  export type SelectOptionData = {
102
103
  render?: RenderContent;
103
104
  } & OptionProps;
@@ -107,9 +108,9 @@ export type SelectOptionGroup = {
107
108
  isGroup?: true;
108
109
  options?: SelectOptionData[];
109
110
  };
110
- export type SelectOptions = (SelectValue | SelectOptionData | SelectOptionGroup | ObjectData)[];
111
+ export type SelectOption = OptionValue | SelectOptionData | SelectOptionGroup | ObjectData;
111
112
  export type FilterOption = boolean | ((inputValue: string, option: SelectOptionData) => boolean);
112
- export type FallbackOption = (value: SelectValue) => SelectOptionData;
113
+ export type FallbackOption = (value: OptionValue) => SelectOptionData;
113
114
  export type FormatLabel = (data: SelectOptionData) => string;
114
115
  export type VirtualListProps = {
115
116
  itemHeight?: number;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */,/* empty css */;/* empty css */const n=require("../_shared/icons/IconLoading.vue.js"),l={class:"yc-spin"},i={key:0,class:"yc-dot-loading"},r={key:1,class:"yc-spin-tip"},s={key:0,class:"yc-spin-mask"},c=e.defineComponent({name:"Spin",__name:"index",props:{size:{default:20},loading:{type:Boolean,default:!1},dot:{type:Boolean,default:!1},tip:{default:""},hideIcon:{type:Boolean,default:!1},isSizeInherit:{type:Boolean,default:!1}},setup(c){const{define:a,reuse:d}=o.createReusableTemplate();return(o,c)=>(e.openBlock(),e.createElementBlock("div",l,[e.createVNode(e.unref(a),null,{default:e.withCtx(()=>[o.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yc-spin-icon",{"yc-spin-icon-loading":!o.dot}]),style:e.normalizeStyle({fontSize:o.isSizeInherit?"inherit":e.unref(t.valueToPx)(o.size)})},[e.renderSlot(o.$slots,"icon",{},()=>[o.dot?(e.openBlock(),e.createElementBlock("div",i,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,o=>e.createElementVNode("div",{key:o,class:"yc-dot-loading-item"})),64))])):(e.openBlock(),e.createBlock(e.unref(n),{key:1}))])],6)),o.tip?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"tip",{},()=>[e.createTextVNode(e.toDisplayString(o.tip),1)])])):e.createCommentVNode("",!0)]),_:3}),o.$slots.default?(e.openBlock(),e.createBlock(e.Transition,{key:1,name:"fade"},{default:e.withCtx(()=>[o.loading?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(e.unref(d))])):e.createCommentVNode("",!0)]),_:1})):(e.openBlock(),e.createBlock(e.unref(d),{key:0})),e.renderSlot(o.$slots,"default")]))}});module.exports=c;
1
+ "use strict";const e=require("vue"),o=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */,/* empty css */;/* empty css */const n=require("../_shared/icons/IconLoading.vue.js"),l={class:"yc-spin"},i={key:0,class:"yc-dot-loading"},r={key:1,class:"yc-spin-tip"},s={key:0,class:"yc-spin-mask"},c=e.defineComponent({name:"Spin",__name:"index",props:{size:{default:20},loading:{type:Boolean,default:!1},dot:{type:Boolean,default:!1},tip:{default:""},hideIcon:{type:Boolean,default:!1},isSizeInherit:{type:Boolean,default:!1}},setup(c){const{define:a,reuse:d}=o.createReusableTemplate();return(o,c)=>(e.openBlock(),e.createElementBlock("div",l,[e.createVNode(e.unref(a),null,{default:e.withCtx(()=>[o.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yc-spin-icon",{"yc-spin-icon-loading":!o.dot}]),style:e.normalizeStyle({fontSize:o.isSizeInherit?"inherit":e.unref(t.valueToPx)(o.size)})},[e.renderSlot(o.$slots,"icon",{},()=>[o.dot?(e.openBlock(),e.createElementBlock("div",i,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,o=>e.createElementVNode("div",{key:o,class:"yc-dot-loading-item"})),64))])):(e.openBlock(),e.createBlock(e.unref(n),{key:1}))])],6)),o.tip?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"tip",{},()=>[e.createTextVNode(e.toDisplayString(o.tip),1)])])):e.createCommentVNode("",!0)]),_:3}),o.$slots.default?(e.openBlock(),e.createBlock(e.Transition,{key:1,name:"fade"},{default:e.withCtx(()=>[o.loading?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(e.unref(d))])):e.createCommentVNode("",!0)]),_:1})):(e.openBlock(),e.createBlock(e.unref(d),{key:0})),e.renderSlot(o.$slots,"default")]))}});module.exports=c;
@@ -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("../_shared/utils/locale.js");const a=require("../_shared/utils/control.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconDragDot.vue.js"),i=require("../node_modules/@vueuse/core/index.js"),o={class:"yc-split-trigger-icon-wrapper"},n={class:"yc-split-trigger-icon"},s={class:"yc-split-pane yc-split-pane-second"},u=e.defineComponent({name:"Split",__name:"index",props:{component:{default:"div"},direction:{default:"horizontal"},size:{default:void 0},defaultSize:{default:.5},min:{default:0},max:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:size","moving-start","moving","moving-end"],setup(u,{emit:d}){const v=u,c=d,{size:m,defaultSize:p,direction:f,min:g,max:h}=e.toRefs(v),y=a(m,p.value,e=>{c("update:size",e)}),z=e.computed(()=>100*(l.isNumber(y.value)?y.value:C(y.value))+"%"),_=e.ref(),x=e.ref(),q=e.computed(()=>{var e,t;return("horizontal"==f.value?null==(e=x.value)?void 0:e.offsetWidth:null==(t=x.value)?void 0:t.offsetHeight)??6}),j=e.computed(()=>{var e;const t=null==(e=_.value)?void 0:e.getBoundingClientRect();return("horizontal"==f.value?null==t?void 0:t.width:null==t?void 0:t.height)??0}),{isDragging:N,x:S,y:b}=i.useDraggable(x,{onMove(){c("moving");const{left:e,top:t}=_.value.getBoundingClientRect(),a="horizontal"==f.value?e:t,r=a+B(g.value),i=a+B(h.value)-q.value;let o="";"horizontal"==f.value?(S.value=S.value<r?r:S.value,S.value=S.value>i?i:S.value,o=S.value-e+"px"):(b.value=b.value<r?r:b.value,b.value=b.value>i?i:b.value,o=b.value-t+"px"),y.value=l.isNumber(y.value)?C(o):o},onStart(){c("moving-start")},onEnd(){c("moving-end")}}),B=e=>l.isNumber(e)?e*j.value:Number.parseFloat(e),C=e=>Number.parseFloat(e)/j.value;return e.watch(()=>y.value,async e=>{if(N.value)return;await t.sleep(0);const{left:l,top:a}=_.value.getBoundingClientRect();S.value=l+B(e),b.value=a+B(e)},{immediate:!0}),(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),{class:e.normalizeClass(["yc-split",`yc-split-direction-${e.unref(f)}`]),ref_key:"splitRef",ref:_},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"yc-split-pane yc-split-pane-first",style:e.normalizeStyle({flex:`0 0 calc(${z.value} - ${e.unref(t.valueToPx)(q.value/2)}`})},[e.renderSlot(l.$slots,"first")],4),e.createElementVNode("div",{class:"yc-split-trigger",ref_key:"triggerRef",ref:x},[e.renderSlot(l.$slots,"resize-trigger",{},()=>[e.createElementVNode("div",o,[e.createElementVNode("div",n,[e.renderSlot(l.$slots,"resize-trigger-icon",{},()=>[e.createVNode(e.unref(r),{rotate:"horizontal"==e.unref(f)?90:0,size:12},null,8,["rotate"])])])])])],512),e.createElementVNode("div",s,[e.renderSlot(l.$slots,"second")])]),_:3},8,["class"]))}});module.exports=u;
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("../_shared/utils/locale.js");const a=require("../_shared/utils/control.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconDragDot.vue.js"),i=require("../node_modules/@vueuse/core/index.js"),o={class:"yc-split-trigger-icon-wrapper"},n={class:"yc-split-trigger-icon"},s={class:"yc-split-pane yc-split-pane-second"},u=e.defineComponent({name:"Split",__name:"index",props:{component:{default:"div"},direction:{default:"horizontal"},size:{default:void 0},defaultSize:{default:.5},min:{default:0},max:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:size","moving-start","moving","moving-end"],setup(u,{emit:d}){const v=u,c=d,{size:m,defaultSize:p,direction:f,min:g,max:h}=e.toRefs(v),y=a(m,p.value,e=>{c("update:size",e)}),z=e.computed(()=>100*(l.isNumber(y.value)?y.value:C(y.value))+"%"),_=e.ref(),x=e.ref(),q=e.computed(()=>{var e,t;return("horizontal"==f.value?null==(e=x.value)?void 0:e.offsetWidth:null==(t=x.value)?void 0:t.offsetHeight)??6}),j=e.computed(()=>{var e;const t=null==(e=_.value)?void 0:e.getBoundingClientRect();return("horizontal"==f.value?null==t?void 0:t.width:null==t?void 0:t.height)??0}),{isDragging:N,x:S,y:b}=i.useDraggable(x,{onMove(){c("moving");const{left:e,top:t}=_.value.getBoundingClientRect(),a="horizontal"==f.value?e:t,r=a+B(g.value),i=a+B(h.value)-q.value;let o="";"horizontal"==f.value?(S.value=S.value<r?r:S.value,S.value=S.value>i?i:S.value,o=S.value-e+"px"):(b.value=b.value<r?r:b.value,b.value=b.value>i?i:b.value,o=b.value-t+"px"),y.value=l.isNumber(y.value)?C(o):o},onStart(){c("moving-start")},onEnd(){c("moving-end")}}),B=e=>l.isNumber(e)?e*j.value:Number.parseFloat(e),C=e=>Number.parseFloat(e)/j.value;return e.watch(()=>y.value,async e=>{if(N.value)return;await t.sleep(0);const{left:l,top:a}=_.value.getBoundingClientRect();S.value=l+B(e),b.value=a+B(e)},{immediate:!0}),(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),{class:e.normalizeClass(["yc-split",`yc-split-direction-${e.unref(f)}`]),ref_key:"splitRef",ref:_},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"yc-split-pane yc-split-pane-first",style:e.normalizeStyle({flex:`0 0 calc(${z.value} - ${e.unref(t.valueToPx)(q.value/2)}`})},[e.renderSlot(l.$slots,"first")],4),e.createElementVNode("div",{class:"yc-split-trigger",ref_key:"triggerRef",ref:x},[e.renderSlot(l.$slots,"resize-trigger",{},()=>[e.createElementVNode("div",o,[e.createElementVNode("div",n,[e.renderSlot(l.$slots,"resize-trigger-icon",{},()=>[e.createVNode(e.unref(r),{rotate:"horizontal"==e.unref(f)?90:0,size:12},null,8,["rotate"])])])])])],512),e.createElementVNode("div",s,[e.renderSlot(l.$slots,"second")])]),_:3},8,["class"]))}});module.exports=u;
@@ -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("../_shared/utils/locale.js"),/* empty css */,/* empty css */;/* empty css */const t=require("../_shared/icons/IconCheck.vue.js"),s=require("../_shared/icons/IconClose.vue.js"),n=require("./hooks/useContext.js"),r={key:0,class:"yc-steps-item-tail"},o={class:"yc-steps-item-node"},i={class:"yc-steps-icon"},l={class:"yc-steps-item-content"},a={class:"yc-steps-item-title"},c={key:0,class:"yc-steps-item-description"},u=e.defineComponent({name:"Step",__name:"Step",props:{title:{default:""},description:{default:""},status:{default:void 0},disabled:{type:Boolean,default:!1}},setup(u){const d=u,{disabled:p}=e.toRefs(d),{curStep:m,stepMap:f,computedCurrent:v,type:y,changeable:k,status:B,nextStatus:h,direction:j,labelPlacement:q,lineLess:x,small:C,emits:N}=n().inject(d),S=e.computed(()=>"dot"!=y.value&&C.value),V=e.computed(()=>x.value||m.value==f.size||["arrow","navigation"].includes(y.value)),_=e=>{k.value&&!p.value&&(v.value=m.value,N("change",m.value,e))};return(n,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-steps-item",`yc-steps-item-${e.unref(j)}`,`yc-steps-item-label-${e.unref(q)}`,`yc-steps-item-${e.unref(B)}`,`yc-steps-item-next-${e.unref(h)}`,{"yc-steps-item-active":e.unref(m)==e.unref(v)&&"navigation"==e.unref(y),"yc-steps-item-line-less":V.value,"yc-steps-item-size-small":S.value}]),onClick:_},["default"==e.unref(y)&&("vertical"==e.unref(j)||"vertical"==e.unref(q))||"dot"==e.unref(y)?(e.openBlock(),e.createElementBlock("div",r)):e.createCommentVNode("",!0),"arrow"!=e.unref(y)?e.renderSlot(n.$slots,"node",{key:1,step:e.unref(m),status:e.unref(B)},()=>[e.createElementVNode("div",o,[e.createElementVNode("div",i,[["default","navigation"].includes(e.unref(y))?e.renderSlot(n.$slots,"icon",{key:0,status:e.unref(B),step:e.unref(m)},()=>["finish"==e.unref(B)?(e.openBlock(),e.createBlock(e.unref(t),{key:0})):"error"==e.unref(B)?(e.openBlock(),e.createBlock(e.unref(s),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(m)),1)],64))]):e.createCommentVNode("",!0)])])]):e.createCommentVNode("",!0),e.createElementVNode("div",l,[e.createElementVNode("div",a,[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)])]),n.$slots.description||n.description?(e.openBlock(),e.createElementBlock("div",c,[e.renderSlot(n.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)])])):e.createCommentVNode("",!0)])],2))}});module.exports=u;
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("../_shared/utils/locale.js"),/* empty css */,/* empty css */;/* empty css */const t=require("../_shared/icons/IconCheck.vue.js"),s=require("../_shared/icons/IconClose.vue.js"),n=require("./hooks/useContext.js"),r={key:0,class:"yc-steps-item-tail"},o={class:"yc-steps-item-node"},i={class:"yc-steps-icon"},l={class:"yc-steps-item-content"},a={class:"yc-steps-item-title"},c={key:0,class:"yc-steps-item-description"},u=e.defineComponent({name:"Step",__name:"Step",props:{title:{default:""},description:{default:""},status:{default:void 0},disabled:{type:Boolean,default:!1}},setup(u){const d=u,{disabled:p}=e.toRefs(d),{curStep:m,stepMap:f,computedCurrent:v,type:y,changeable:k,status:B,nextStatus:h,direction:j,labelPlacement:q,lineLess:x,small:C,emits:N}=n().inject(d),S=e.computed(()=>"dot"!=y.value&&C.value),V=e.computed(()=>x.value||m.value==f.size||["arrow","navigation"].includes(y.value)),_=e=>{k.value&&!p.value&&(v.value=m.value,N("change",m.value,e))};return(n,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-steps-item",`yc-steps-item-${e.unref(j)}`,`yc-steps-item-label-${e.unref(q)}`,`yc-steps-item-${e.unref(B)}`,`yc-steps-item-next-${e.unref(h)}`,{"yc-steps-item-active":e.unref(m)==e.unref(v)&&"navigation"==e.unref(y),"yc-steps-item-line-less":V.value,"yc-steps-item-size-small":S.value}]),onClick:_},["default"==e.unref(y)&&("vertical"==e.unref(j)||"vertical"==e.unref(q))||"dot"==e.unref(y)?(e.openBlock(),e.createElementBlock("div",r)):e.createCommentVNode("",!0),"arrow"!=e.unref(y)?e.renderSlot(n.$slots,"node",{key:1,step:e.unref(m),status:e.unref(B)},()=>[e.createElementVNode("div",o,[e.createElementVNode("div",i,[["default","navigation"].includes(e.unref(y))?e.renderSlot(n.$slots,"icon",{key:0,status:e.unref(B),step:e.unref(m)},()=>["finish"==e.unref(B)?(e.openBlock(),e.createBlock(e.unref(t),{key:0})):"error"==e.unref(B)?(e.openBlock(),e.createBlock(e.unref(s),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(m)),1)],64))]):e.createCommentVNode("",!0)])])]):e.createCommentVNode("",!0),e.createElementVNode("div",l,[e.createElementVNode("div",a,[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)])]),n.$slots.description||n.description?(e.openBlock(),e.createElementBlock("div",c,[e.renderSlot(n.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)])])):e.createCommentVNode("",!0)])],2))}});module.exports=u;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),t=;/* empty css */,/* empty css */require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */;/* empty css */const s=e.defineComponent({__name:"TabButton",props:{className:{type:Boolean,default:!0},type:{},direction:{}},setup:s=>(s,o)=>(e.openBlock(),e.createBlock(e.unref(t),e.mergeProps({size:14,class:[`yc-tabs-nav-${s.type?`${s.type}-`:""}button`,{[`yc-tabs-nav-button-${s.direction}`]:s.direction}]},s.$attrs),{default:e.withCtx(()=>[s.$slots.default?e.renderSlot(s.$slots,"default",{key:0}):e.createCommentVNode("",!0)]),_:3},16,["class"]))});module.exports=s;
1
+ "use strict";const e=require("vue"),t=;/* empty css */,/* empty css */require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */;/* empty css */const s=e.defineComponent({__name:"TabButton",props:{className:{type:Boolean,default:!0},type:{},direction:{}},setup:s=>(s,o)=>(e.openBlock(),e.createBlock(e.unref(t),e.mergeProps({size:14,class:[`yc-tabs-nav-${s.type?`${s.type}-`:""}button`,{[`yc-tabs-nav-button-${s.direction}`]:s.direction}]},s.$attrs),{default:e.withCtx(()=>[s.$slots.default?e.renderSlot(s.$slots,"default",{key:0}):e.createCommentVNode("",!0)]),_:3},16,["class"]))});module.exports=s;
@@ -1 +1 @@
1
- "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js");const n=require("../_shared/utils/vue-utils.js");require("../_shared/utils/locale.js");const a=require("./hooks/useContext.js"),o=require("./hooks/useTabsScroll.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconArrowRight.vue.js"),l=require("../_shared/icons/IconPlus.vue.js"),i=require("./TabPane.vue.js");;/* empty css */const s=require("./TabsTab.vue.js");;/* empty css */const u=require("./TabsNavInk.vue.js");;/* empty css */const c=require("./TabButton.vue.js");;/* empty css */const d={class:"yc-tabs-nav"},f={key:3,class:"yc-tabs-nav-extra"},p=e.defineComponent({name:"Tabs",__name:"Tabs",props:{activeKey:{default:void 0},defaultActiveKey:{default:""},position:{default:void 0},size:{default:void 0},type:{default:"line"},direction:{default:"horizontal"},editable:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},destoryOnHide:{type:Boolean,default:!1},justify:{type:Boolean,default:!1},animation:{type:Boolean,default:!1},headerPadding:{type:Boolean,default:!0},autoSwitch:{type:Boolean,default:!1},hideContent:{type:Boolean,default:!1},trigger:{default:"click"}},emits:["update:activeKey","change","tab-click","add","delete"],setup(p,{emit:m}){const v=e.useSlots(),y=p,h=m,b=e.ref(),{computedActiveKey:k,size:B,direction:j,autoSwitch:x,position:q}=a().provide(y,h,b),z=e.computed(()=>{var e;return n.findComponentsFromVnodes((null==(e=v.default)?void 0:e.call(v))||[],i.name)}),C=e.computed(()=>z.value.map(e=>({title:"",path:"",disabled:!1,...e.props||{},slots:e.children}))),T=e.computed(()=>y.showAddButton&&["line","card","card-gutter"].includes(y.type)),_=e.computed(()=>{const e=C.value.findIndex(e=>e.path==k.value);return e<0?0:e}),{scrollDis:N,isScrollable:g,preDisabled:V,nextDisabled:$,navHeight:w,handleScroll:E}=o({listRef:b,panes:C,direction:j}),S=async()=>{h("add"),x.value&&(await e.nextTick(),k.value=C.value[C.value.length-1].path)};return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-tabs",`yc-tabs-${e.unref(j)}`,`yc-tabs-type-${n.type}`,`yc-tabs-size-${e.unref(B)}`,{"yc-tabs-animation":n.animation,"yc-tabs-justify":"horizontal"==e.unref(j)&&n.justify,"yc-tabs-no-padding":n.headerPadding&&["line","text"].includes(n.type)&&"horizontal"===y.direction,[`yc-tabs-${e.unref(q)}`]:e.unref(q)}])},[e.createElementVNode("div",d,[e.unref(g)?(e.openBlock(),e.createBlock(c,{key:0,disabled:e.unref(V),direction:"horizontal"==e.unref(j)?"left":"up",onClick:a[0]||(a[0]=t=>e.unref(E)("pre"))},{default:e.withCtx(()=>[e.createVNode(e.unref(r),{rotate:"horizontal"==e.unref(j)?180:-90,size:14},null,8,["rotate"])]),_:1},8,["disabled","direction"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["yc-tabs-nav-tab",{"yc-tabs-nav-tab-scroll":e.unref(g)}])},[e.createElementVNode("div",{class:"yc-tabs-nav-tab-list",style:e.normalizeStyle({transform:`translate${"horizontal"==e.unref(j)?"X":"Y"}(${e.unref(t.valueToPx)(e.unref(N))})`}),ref_key:"listRef",ref:b},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(t,n)=>(e.openBlock(),e.createBlock(s,{key:n,index:n,node:t},null,8,["index","node"]))),128)),"line"==n.type?(e.openBlock(),e.createBlock(u,{key:0,"cur-index":_.value,panes:C.value},null,8,["cur-index","panes"])):e.createCommentVNode("",!0)],4)],2),e.unref(g)?(e.openBlock(),e.createBlock(c,{key:1,disabled:e.unref($),direction:"horizontal"==e.unref(j)?"right":"down",onClick:a[1]||(a[1]=t=>e.unref(E)("next"))},{default:e.withCtx(()=>[e.createVNode(e.unref(r),{rotate:"horizontal"==e.unref(j)?0:90,size:14},null,8,["rotate"])]),_:1},8,["disabled","direction"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createBlock(c,{key:2,type:"add",size:"12",onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(l),{size:12})]),_:1})):e.createCommentVNode("",!0),n.$slots.extra?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(n.$slots,"extra")])):e.createCommentVNode("",!0)]),n.hideContent?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-tabs-content",style:e.normalizeStyle({height:"vertical"==e.unref(j)?`${e.unref(t.valueToPx)(e.unref(w))}`:""})},[e.createElementVNode("div",{class:"yc-tabs-content-list",style:e.normalizeStyle({transform:`translate${"horizontal"==e.unref(j)?"X":"Y"}(${100*-_.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(t,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{key:n}))),128))],4)],4))],2))}});module.exports=p;
1
+ "use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js");const n=require("../_shared/utils/vue-utils.js");require("../_shared/utils/locale.js");const a=require("./hooks/useContext.js"),o=require("./hooks/useTabsScroll.js");,/* empty css */,/* empty css */;/* empty css */const r=require("../_shared/icons/IconArrowRight.vue.js"),l=require("../_shared/icons/IconPlus.vue.js"),i=require("./TabPane.vue.js");;/* empty css */const s=require("./TabsTab.vue.js");;/* empty css */const u=require("./TabsNavInk.vue.js");;/* empty css */const c=require("./TabButton.vue.js");;/* empty css */const d={class:"yc-tabs-nav"},f={key:3,class:"yc-tabs-nav-extra"},p=e.defineComponent({name:"Tabs",__name:"Tabs",props:{activeKey:{default:void 0},defaultActiveKey:{default:""},position:{default:void 0},size:{default:void 0},type:{default:"line"},direction:{default:"horizontal"},editable:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},destoryOnHide:{type:Boolean,default:!1},justify:{type:Boolean,default:!1},animation:{type:Boolean,default:!1},headerPadding:{type:Boolean,default:!0},autoSwitch:{type:Boolean,default:!1},hideContent:{type:Boolean,default:!1},trigger:{default:"click"}},emits:["update:activeKey","change","tab-click","add","delete"],setup(p,{emit:m}){const v=e.useSlots(),y=p,h=m,b=e.ref(),{computedActiveKey:k,size:B,direction:j,autoSwitch:x,position:q}=a().provide(y,h,b),z=e.computed(()=>{var e;return n.findComponentsFromVnodes((null==(e=v.default)?void 0:e.call(v))||[],i.name)}),C=e.computed(()=>z.value.map(e=>({title:"",path:"",disabled:!1,...e.props||{},slots:e.children}))),T=e.computed(()=>y.showAddButton&&["line","card","card-gutter"].includes(y.type)),_=e.computed(()=>{const e=C.value.findIndex(e=>e.path==k.value);return e<0?0:e}),{scrollDis:N,isScrollable:g,preDisabled:V,nextDisabled:$,navHeight:w,handleScroll:E}=o({listRef:b,panes:C,direction:j}),S=async()=>{h("add"),x.value&&(await e.nextTick(),k.value=C.value[C.value.length-1].path)};return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-tabs",`yc-tabs-${e.unref(j)}`,`yc-tabs-type-${n.type}`,`yc-tabs-size-${e.unref(B)}`,{"yc-tabs-animation":n.animation,"yc-tabs-justify":"horizontal"==e.unref(j)&&n.justify,"yc-tabs-no-padding":n.headerPadding&&["line","text"].includes(n.type)&&"horizontal"===y.direction,[`yc-tabs-${e.unref(q)}`]:e.unref(q)}])},[e.createElementVNode("div",d,[e.unref(g)?(e.openBlock(),e.createBlock(c,{key:0,disabled:e.unref(V),direction:"horizontal"==e.unref(j)?"left":"up",onClick:a[0]||(a[0]=t=>e.unref(E)("pre"))},{default:e.withCtx(()=>[e.createVNode(e.unref(r),{rotate:"horizontal"==e.unref(j)?180:-90,size:14},null,8,["rotate"])]),_:1},8,["disabled","direction"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["yc-tabs-nav-tab",{"yc-tabs-nav-tab-scroll":e.unref(g)}])},[e.createElementVNode("div",{class:"yc-tabs-nav-tab-list",style:e.normalizeStyle({transform:`translate${"horizontal"==e.unref(j)?"X":"Y"}(${e.unref(t.valueToPx)(e.unref(N))})`}),ref_key:"listRef",ref:b},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(t,n)=>(e.openBlock(),e.createBlock(s,{key:n,index:n,node:t},null,8,["index","node"]))),128)),"line"==n.type?(e.openBlock(),e.createBlock(u,{key:0,"cur-index":_.value,panes:C.value},null,8,["cur-index","panes"])):e.createCommentVNode("",!0)],4)],2),e.unref(g)?(e.openBlock(),e.createBlock(c,{key:1,disabled:e.unref($),direction:"horizontal"==e.unref(j)?"right":"down",onClick:a[1]||(a[1]=t=>e.unref(E)("next"))},{default:e.withCtx(()=>[e.createVNode(e.unref(r),{rotate:"horizontal"==e.unref(j)?0:90,size:14},null,8,["rotate"])]),_:1},8,["disabled","direction"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createBlock(c,{key:2,type:"add",size:"12",onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(l),{size:12})]),_:1})):e.createCommentVNode("",!0),n.$slots.extra?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(n.$slots,"extra")])):e.createCommentVNode("",!0)]),n.hideContent?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-tabs-content",style:e.normalizeStyle({height:"vertical"==e.unref(j)?`${e.unref(t.valueToPx)(e.unref(w))}`:""})},[e.createElementVNode("div",{class:"yc-tabs-content-list",style:e.normalizeStyle({transform:`translate${"horizontal"==e.unref(j)?"X":"Y"}(${100*-_.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(t,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{key:n}))),128))],4)],4))],2))}});module.exports=p;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=require("../_shared/constants/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/global-config.js");require("../_shared/utils/locale.js");const t=require("../_shared/utils/control.js"),a=require("../Spin/index.js"),c=;/* empty css */,/* empty css */,/* empty css */;/* empty css */const n={key:0,class:"yc-tag-icon"},s={class:"yc-tag-label"},r=e.defineComponent({name:"Tag",__name:"index",props:{color:{default:"default"},size:{default:void 0},bordered:{type:Boolean,default:!1},visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},checkable:{type:Boolean,default:!1},checked:{type:Boolean,default:void 0},defaultChecked:{type:Boolean,default:!0},nowrap:{type:Boolean,default:!1}},emits:["update:visible","update:checked","close","check"],setup(r,{emit:d}){const u=r,i=d,{visible:m,defaultVisible:p,checked:y,defaultChecked:f,checkable:k,color:g}=e.toRefs(u),{size:h}=l.getGlobalConfig(u),v=t(m,p.value,e=>i("update:visible",e)),b=t(y,f.value,e=>i("update:checked",e)),B=e.computed(()=>o.TAG_PRESET_COLORS.includes(g.value)?"":g.value),_=(e,o)=>{"close"==e?(v.value=!1,i("close",o)):"check"==e&&k.value&&(b.value=!b.value,i("check",b.value,o))};return(l,t)=>e.unref(v)?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["yc-tag",`yc-tag-color-${e.unref(g)}`,`yc-tag-size-${["small","medium","large"].includes(e.unref(h))?e.unref(h):"medium"}`,e.unref(o.TAG_PRESET_COLORS).includes(e.unref(g))?"yc-tag-preset-color":"yc-tag-custom-color",l.nowrap?"yc-tag-no-wrap":"yc-tag-wrap",{"yc-tag-loading":l.loading,"yc-tag-bordered":l.bordered,"yc-tag-checked":e.unref(b),"yc-tag-checkable":e.unref(k)}]),style:e.normalizeStyle({background:B.value}),onClick:t[1]||(t[1]=e=>_("check",e))},[l.$slots.icon?(e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(l.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("span",s,[e.renderSlot(l.$slots,"default")]),l.closable?(e.openBlock(),e.createBlock(e.unref(c),{key:1,"hover-size":16,"hover-color":"rgba(255, 255, 255, 0.2)",class:"yc-tag-close-button",onClick:t[0]||(t[0]=e=>_("close",e))},{default:e.withCtx(()=>[l.$slots["close-icon"]?e.renderSlot(l.$slots,"close-icon",{key:0}):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createBlock(e.unref(a),{key:2,size:12,class:"yc-tag-loading-icon"})):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}});module.exports=r;
1
+ "use strict";const e=require("vue"),o=require("../_shared/constants/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/global-config.js");require("../_shared/utils/locale.js");const t=require("../_shared/utils/control.js"),a=require("../Spin/index.js"),c=;/* empty css */,/* empty css */,/* empty css */;/* empty css */const n={key:0,class:"yc-tag-icon"},s={class:"yc-tag-label"},r=e.defineComponent({name:"Tag",__name:"index",props:{color:{default:"default"},size:{default:void 0},bordered:{type:Boolean,default:!1},visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},checkable:{type:Boolean,default:!1},checked:{type:Boolean,default:void 0},defaultChecked:{type:Boolean,default:!0},nowrap:{type:Boolean,default:!1}},emits:["update:visible","update:checked","close","check"],setup(r,{emit:d}){const u=r,i=d,{visible:m,defaultVisible:p,checked:y,defaultChecked:f,checkable:k,color:g}=e.toRefs(u),{size:h}=l.getGlobalConfig(u),v=t(m,p.value,e=>i("update:visible",e)),b=t(y,f.value,e=>i("update:checked",e)),B=e.computed(()=>o.TAG_PRESET_COLORS.includes(g.value)?"":g.value),_=(e,o)=>{"close"==e?(v.value=!1,i("close",o)):"check"==e&&k.value&&(b.value=!b.value,i("check",b.value,o))};return(l,t)=>e.unref(v)?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["yc-tag",`yc-tag-color-${e.unref(g)}`,`yc-tag-size-${["small","medium","large"].includes(e.unref(h))?e.unref(h):"medium"}`,e.unref(o.TAG_PRESET_COLORS).includes(e.unref(g))?"yc-tag-preset-color":"yc-tag-custom-color",l.nowrap?"yc-tag-no-wrap":"yc-tag-wrap",{"yc-tag-loading":l.loading,"yc-tag-bordered":l.bordered,"yc-tag-checked":e.unref(b),"yc-tag-checkable":e.unref(k)}]),style:e.normalizeStyle({background:B.value}),onClick:t[1]||(t[1]=e=>_("check",e))},[l.$slots.icon?(e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(l.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("span",s,[e.renderSlot(l.$slots,"default")]),l.closable?(e.openBlock(),e.createBlock(e.unref(c),{key:1,"hover-size":16,"hover-color":"rgba(255, 255, 255, 0.2)",class:"yc-tag-close-button",onClick:t[0]||(t[0]=e=>_("close",e))},{default:e.withCtx(()=>[l.$slots["close-icon"]?e.renderSlot(l.$slots,"close-icon",{key:0}):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createBlock(e.unref(a),{key:2,size:12,class:"yc-tag-loading-icon"})):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}});module.exports=r;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),r=require("./hooks/useTextareaHeight.js"),t=require("../Input/hooks/useLimitedInput.js"),o=;/* empty css */;/* empty css */const a=;/* empty css */require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */;/* empty css */const n=["value","disabled","readonly","placeholder"],l=e.defineComponent({name:"Textarea",__name:"index",props:{modelValue:{default:void 0},defaultValue:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},error:{type:[Boolean,Object],default:void 0},maxLength:{default:void 0},showWordLimit:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},autoSize:{type:[Boolean,Object],default:!1},wordLength:{type:Function,default:e=>e.length},wordSlice:{type:Function,default:(e,r)=>e.slice(0,r)},enterPrevent:{type:Boolean,default:!1},showMirror:{type:Boolean,default:!1}},emits:["update:modelValue","input","change","clear","focus","blur","keydown"],setup(l,{expose:u,emit:s}){const i=l,d=s,{autoSize:c}=e.toRefs(i),p=e.ref(),f=e.ref(),{error:m,computedValue:y,showWordLimit:h,showClearBtn:v,curLength:x,maxLength:k,handleInput:B,handleComposition:b}=t({props:i,emits:d,inputRef:p}),{style:g}=r(f,c.value),w=async(e,r)=>{switch(e){case"input":B(r);break;case"change":d("change",y.value,r);break;case"focus":case"blur":d(e,r);break;case"clear":y.value="",d("clear",r)}};return u({getInputRef:()=>p.value,getMirrorRef:()=>f.value,focus(){var e;null==(e=p.value)||e.focus()},blur(){var e;null==(e=p.value)||e.blur()}}),(r,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-textarea-wrapper",{"yc-textarea-disabled":r.disabled,"yc-textarea-error":e.unref(m),"yc-textarea-auto-size":e.unref(c)}])},[e.unref(c)||r.showMirror?(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-textarea-mirror",ref_key:"mirrorRef",ref:f},e.toDisplayString(e.unref(y)),513)):e.createCommentVNode("",!0),e.createElementVNode("textarea",{value:e.unref(y),disabled:r.disabled,readonly:r.readonly,placeholder:r.placeholder,style:e.normalizeStyle(e.unref(g)),class:"yc-textarea",ref_key:"inputRef",ref:p,onCompositionstart:t[0]||(t[0]=(...r)=>e.unref(b)&&e.unref(b)(...r)),onCompositionupdate:t[1]||(t[1]=(...r)=>e.unref(b)&&e.unref(b)(...r)),onCompositionend:t[2]||(t[2]=(...r)=>e.unref(b)&&e.unref(b)(...r)),onKeydown:t[3]||(t[3]=e=>{"Enter"==e.key&&r.enterPrevent&&e.preventDefault(),r.$emit("keydown",e)}),onInput:t[4]||(t[4]=e=>w("input",e)),onChange:t[5]||(t[5]=e=>w("change",e)),onFocus:t[6]||(t[6]=e=>w("focus",e)),onBlur:t[7]||(t[7]=e=>w("blur",e))},null,44,n),e.unref(h)?(e.openBlock(),e.createBlock(e.unref(a),{key:1,tag:"span",class:"yc-textarea-word-limit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(x))+" / "+e.toDisplayString(e.unref(k)),1)]),_:1})):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(o),{key:2,class:"yc-textarea-clear-button",onClick:t[8]||(t[8]=e=>w("clear",e))})):e.createCommentVNode("",!0)],2))}});module.exports=l;
1
+ "use strict";const e=require("vue"),r=require("./hooks/useTextareaHeight.js"),t=require("../Input/hooks/useLimitedInput.js"),o=;/* empty css */;/* empty css */const a=;/* empty css */require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../_shared/utils/locale.js"),/* empty css */;/* empty css */const n=["value","disabled","readonly","placeholder"],l=e.defineComponent({name:"Textarea",__name:"index",props:{modelValue:{default:void 0},defaultValue:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},error:{type:[Boolean,Object],default:void 0},maxLength:{default:void 0},showWordLimit:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},autoSize:{type:[Boolean,Object],default:!1},wordLength:{type:Function,default:e=>e.length},wordSlice:{type:Function,default:(e,r)=>e.slice(0,r)},enterPrevent:{type:Boolean,default:!1},showMirror:{type:Boolean,default:!1}},emits:["update:modelValue","input","change","clear","focus","blur","keydown"],setup(l,{expose:u,emit:s}){const i=l,d=s,{autoSize:c}=e.toRefs(i),p=e.ref(),f=e.ref(),{error:m,computedValue:y,showWordLimit:h,showClearBtn:v,curLength:x,maxLength:k,handleInput:B,handleComposition:b}=t({props:i,emits:d,inputRef:p}),{style:g}=r(f,c.value),w=async(e,r)=>{switch(e){case"input":B(r);break;case"change":d("change",y.value,r);break;case"focus":case"blur":d(e,r);break;case"clear":y.value="",d("clear",r)}};return u({getInputRef:()=>p.value,getMirrorRef:()=>f.value,focus(){var e;null==(e=p.value)||e.focus()},blur(){var e;null==(e=p.value)||e.blur()}}),(r,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-textarea-wrapper",{"yc-textarea-disabled":r.disabled,"yc-textarea-error":e.unref(m),"yc-textarea-auto-size":e.unref(c)}])},[e.unref(c)||r.showMirror?(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-textarea-mirror",ref_key:"mirrorRef",ref:f},e.toDisplayString(e.unref(y)),513)):e.createCommentVNode("",!0),e.createElementVNode("textarea",{value:e.unref(y),disabled:r.disabled,readonly:r.readonly,placeholder:r.placeholder,style:e.normalizeStyle(e.unref(g)),class:"yc-textarea",ref_key:"inputRef",ref:p,onCompositionstart:t[0]||(t[0]=(...r)=>e.unref(b)&&e.unref(b)(...r)),onCompositionupdate:t[1]||(t[1]=(...r)=>e.unref(b)&&e.unref(b)(...r)),onCompositionend:t[2]||(t[2]=(...r)=>e.unref(b)&&e.unref(b)(...r)),onKeydown:t[3]||(t[3]=e=>{"Enter"==e.key&&r.enterPrevent&&e.preventDefault(),r.$emit("keydown",e)}),onInput:t[4]||(t[4]=e=>w("input",e)),onChange:t[5]||(t[5]=e=>w("change",e)),onFocus:t[6]||(t[6]=e=>w("focus",e)),onBlur:t[7]||(t[7]=e=>w("blur",e))},null,44,n),e.unref(h)?(e.openBlock(),e.createBlock(e.unref(a),{key:1,tag:"span",class:"yc-textarea-word-limit"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(x))+" / "+e.toDisplayString(e.unref(k)),1)]),_:1})):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(o),{key:2,class:"yc-textarea-clear-button",onClick:t[8]||(t[8]=e=>w("clear",e))})):e.createCommentVNode("",!0)],2))}});module.exports=l;