@vunk/form 2.18.2 → 2.19.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 (320) hide show
  1. package/components/_plugin-vue_export-helper.cjs +1 -11
  2. package/components/api-tables-select/index.cjs +1 -467
  3. package/components/api-tables-select/index.mjs +56 -413
  4. package/components/api-tables-select/src/ctx.d.ts +147 -173
  5. package/components/api-tables-select/src/index.vue.d.ts +390 -983
  6. package/components/button/index.cjs +1 -112
  7. package/components/button/index.mjs +56 -85
  8. package/components/button/src/ctx.d.ts +28 -113
  9. package/components/button/src/index.vue.d.ts +314 -621
  10. package/components/card-input-collection/index.cjs +1 -370
  11. package/components/card-input-collection/index.mjs +175 -277
  12. package/components/card-input-collection/src/core.vue.d.ts +57 -950
  13. package/components/card-input-collection/src/ctx.d.ts +19 -49
  14. package/components/card-input-collection/src/index.vue.d.ts +49 -112
  15. package/components/cascader/index.cjs +1 -150
  16. package/components/cascader/index.mjs +88 -116
  17. package/components/cascader/src/ctx.d.ts +148 -207
  18. package/components/cascader/src/index.vue.d.ts +335 -525
  19. package/components/cascader/src/use.d.ts +1 -1
  20. package/components/checkbox/index.cjs +1 -152
  21. package/components/checkbox/index.mjs +75 -119
  22. package/components/checkbox/src/ctx.d.ts +46 -69
  23. package/components/checkbox/src/index.vue.d.ts +445 -1012
  24. package/components/cloneDeep.cjs +1 -2106
  25. package/components/color-picker/index.cjs +1 -80
  26. package/components/color-picker/index.mjs +46 -69
  27. package/components/color-picker/src/ctx.d.ts +138 -107
  28. package/components/color-picker/src/index.vue.d.ts +305 -255
  29. package/components/date-picker/index.cjs +1 -119
  30. package/components/date-picker/index.mjs +63 -97
  31. package/components/date-picker/src/ctx.d.ts +131 -206
  32. package/components/date-picker/src/index.vue.d.ts +287 -1359
  33. package/components/date-picker/src/types.d.ts +7 -7
  34. package/components/date-picker-range/index.cjs +1 -177
  35. package/components/date-picker-range/index.mjs +62 -113
  36. package/components/date-picker-range/src/ctx.d.ts +139 -207
  37. package/components/date-picker-range/src/index.vue.d.ts +896 -450
  38. package/components/debounce.cjs +1 -0
  39. package/components/dialog/index.cjs +1 -126
  40. package/components/dialog/index.mjs +65 -99
  41. package/components/dialog/src/ctx.d.ts +17 -108
  42. package/components/dialog/src/index.vue.d.ts +77 -1070
  43. package/components/dialog-input-collection/index.cjs +1 -624
  44. package/components/dialog-input-collection/index.mjs +276 -498
  45. package/components/dialog-input-collection/src/ctx.d.ts +20 -50
  46. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +28 -6366
  47. package/components/dialog-input-collection/src/index.vue.d.ts +66 -7629
  48. package/components/dialog-input-collection/src/layout.vue.d.ts +16 -72
  49. package/components/download-plus/index.cjs +1 -456
  50. package/components/download-plus/index.mjs +214 -358
  51. package/components/download-plus/src/ctx.d.ts +20 -50
  52. package/components/download-plus/src/index.vue.d.ts +434 -1171
  53. package/components/editable-text/index.cjs +1 -295
  54. package/components/editable-text/index.mjs +113 -239
  55. package/components/editable-text/src/ctx.d.ts +20 -50
  56. package/components/editable-text/src/index.vue.d.ts +62 -3257
  57. package/components/el-slider/index.cjs +1 -0
  58. package/components/el-slider/index.d.ts +5 -0
  59. package/components/el-slider/index.mjs +475 -0
  60. package/components/el-slider/src/button.d.ts +36 -0
  61. package/components/el-slider/src/button.vue.d.ts +42 -0
  62. package/components/el-slider/src/composables/index.cjs +1 -0
  63. package/components/el-slider/src/composables/index.d.ts +6 -0
  64. package/components/el-slider/src/composables/index.mjs +9 -0
  65. package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
  66. package/components/el-slider/src/composables/use-marks.d.ts +7 -0
  67. package/components/el-slider/src/composables/use-slide.d.ts +23 -0
  68. package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
  69. package/components/el-slider/src/composables/use-stops.d.ts +8 -0
  70. package/components/el-slider/src/composables/use-watch.d.ts +4 -0
  71. package/components/el-slider/src/constants.d.ts +14 -0
  72. package/components/el-slider/src/marker.d.ts +37 -0
  73. package/components/el-slider/src/slider-core.vue.d.ts +219 -0
  74. package/components/el-slider/src/slider.d.ts +175 -0
  75. package/components/esri-input-geojson/index.cjs +2 -1604
  76. package/components/esri-input-geojson/index.mjs +666 -1289
  77. package/components/esri-input-geojson/src/append.vue.d.ts +225 -1084
  78. package/components/esri-input-geojson/src/const.d.ts +1 -1
  79. package/components/esri-input-geojson/src/ctx.d.ts +62 -158
  80. package/components/esri-input-geojson/src/default-view.vue.d.ts +12 -132
  81. package/components/esri-input-geojson/src/index.vue.d.ts +1470 -789
  82. package/components/esri-input-geojson/src/viewer.vue.d.ts +424 -287
  83. package/components/fieldset/index.cjs +1 -110
  84. package/components/fieldset/index.mjs +62 -77
  85. package/components/fieldset/src/ctx.d.ts +4 -4
  86. package/components/fieldset/src/index.vue.d.ts +10 -9
  87. package/components/form/index.cjs +1 -248
  88. package/components/form/index.mjs +107 -161
  89. package/components/form/src/ctx.d.ts +15 -64
  90. package/components/form/src/index.vue.d.ts +360 -2416
  91. package/components/form-item/index.cjs +1 -294
  92. package/components/form-item/index.mjs +139 -229
  93. package/components/form-item/src/core.vue.d.ts +33 -1853
  94. package/components/form-item/src/ctx.d.ts +17 -47
  95. package/components/form-item/src/index.vue.d.ts +41 -103
  96. package/components/form-item-renderer/index.cjs +1 -193
  97. package/components/form-item-renderer/index.mjs +102 -162
  98. package/components/form-item-renderer/src/core.vue.d.ts +12 -11
  99. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  100. package/components/form-item-renderer/src/index.vue.d.ts +25 -73
  101. package/components/form-item-renderer-template/index.cjs +1 -47
  102. package/components/form-item-renderer-template/index.mjs +19 -33
  103. package/components/form-item-renderer-template/src/index.vue.d.ts +4 -3
  104. package/components/forms-provider/index.cjs +1 -99
  105. package/components/forms-provider/index.mjs +44 -73
  106. package/components/forms-provider/src/core.d.ts +3 -2
  107. package/components/forms-provider/src/index.vue.d.ts +5 -2
  108. package/components/forms-provider/src/segment.vue.d.ts +12 -8
  109. package/components/forms-provider/src/view.vue.d.ts +17 -3
  110. package/components/index.cjs +1 -399
  111. package/components/index2.cjs +1 -17
  112. package/components/information/index.cjs +1 -65
  113. package/components/information/index.mjs +28 -38
  114. package/components/information/src/ctx.d.ts +2 -2
  115. package/components/information/src/index.vue.d.ts +7 -6
  116. package/components/information-collection/index.cjs +1 -81
  117. package/components/information-collection/index.mjs +44 -48
  118. package/components/information-collection/src/ctx.d.ts +20 -50
  119. package/components/information-collection/src/index.vue.d.ts +49 -112
  120. package/components/information-renderer/index.cjs +1 -16
  121. package/components/information-renderer/index.mjs +9 -10
  122. package/components/information-tag/index.cjs +1 -101
  123. package/components/information-tag/index.mjs +44 -54
  124. package/components/information-tag/src/ctx.d.ts +5 -19
  125. package/components/information-tag/src/index.vue.d.ts +24 -51
  126. package/components/information-templates-default/index.cjs +1 -101
  127. package/components/information-templates-default/index.mjs +63 -73
  128. package/components/information-templates-default/src/index.vue.d.ts +2 -1
  129. package/components/input/index.cjs +1 -115
  130. package/components/input/index.mjs +60 -83
  131. package/components/input/src/ctx.d.ts +50 -151
  132. package/components/input/src/index.vue.d.ts +389 -947
  133. package/components/input-array/index.cjs +1 -310
  134. package/components/input-array/index.mjs +114 -244
  135. package/components/input-array/src/ctx.d.ts +19 -49
  136. package/components/input-array/src/form-template.vue.d.ts +2 -901
  137. package/components/input-array/src/index.vue.d.ts +45 -731
  138. package/components/input-collection/index.cjs +1 -452
  139. package/components/input-collection/index.mjs +195 -355
  140. package/components/input-collection/src/core.vue.d.ts +59 -1019
  141. package/components/input-collection/src/ctx.d.ts +19 -49
  142. package/components/input-collection/src/index.vue.d.ts +47 -110
  143. package/components/input-file/index.cjs +1 -142
  144. package/components/input-file/index.mjs +68 -100
  145. package/components/input-file/src/ctx.d.ts +8 -29
  146. package/components/input-file/src/index.vue.d.ts +447 -76
  147. package/components/input-file/src/template.vue.d.ts +2 -124
  148. package/components/input-link/index.cjs +1 -167
  149. package/components/input-link/index.mjs +60 -83
  150. package/components/input-link/src/ctx.d.ts +48 -135
  151. package/components/input-link/src/index.vue.d.ts +835 -312
  152. package/components/input-number/index.cjs +1 -119
  153. package/components/input-number/index.mjs +73 -87
  154. package/components/input-number/src/ctx.d.ts +38 -131
  155. package/components/input-number/src/index.vue.d.ts +321 -682
  156. package/components/input-tag/index.cjs +1 -100
  157. package/components/input-tag/index.mjs +51 -78
  158. package/components/input-tag/src/ctx.d.ts +41 -143
  159. package/components/input-tag/src/index.vue.d.ts +322 -775
  160. package/components/isObject.cjs +1 -165
  161. package/components/monaco-editor/index.cjs +1 -83
  162. package/components/monaco-editor/index.mjs +40 -59
  163. package/components/monaco-editor/src/ctx.d.ts +19 -44
  164. package/components/monaco-editor/src/index.vue.d.ts +212 -111
  165. package/components/radio/index.cjs +1 -267
  166. package/components/radio/index.mjs +110 -209
  167. package/components/radio/src/ctx.d.ts +27 -91
  168. package/components/radio/src/index.vue.d.ts +299 -1279
  169. package/components/radio/src/option.vue.d.ts +28 -878
  170. package/components/radio/src/wraper.vue.d.ts +67 -198
  171. package/components/renderer-data/index.cjs +1 -41
  172. package/components/renderer-data/index.mjs +19 -26
  173. package/components/renderer-data/src/ctx.d.ts +1 -1
  174. package/components/renderer-data/src/index.vue.d.ts +5 -4
  175. package/components/select/index.cjs +1 -311
  176. package/components/select/index.mjs +156 -214
  177. package/components/select/src/core.vue.d.ts +446 -1028
  178. package/components/select/src/ctx.d.ts +60 -215
  179. package/components/select/src/index.vue.d.ts +318 -593
  180. package/components/select/src/options.vue.d.ts +4 -3
  181. package/components/slider/index.cjs +1 -88
  182. package/components/slider/index.mjs +41 -70
  183. package/components/slider/src/ctx.d.ts +63 -174
  184. package/components/slider/src/index.vue.d.ts +154 -419
  185. package/components/style.css +1 -0
  186. package/components/switch/index.cjs +1 -88
  187. package/components/switch/index.mjs +37 -69
  188. package/components/switch/src/ctx.d.ts +30 -109
  189. package/components/switch/src/index.vue.d.ts +90 -697
  190. package/components/switch/src/types.d.ts +2 -2
  191. package/components/tables-select/index.cjs +1 -263
  192. package/components/tables-select/index.mjs +101 -172
  193. package/components/tables-select/src/ctx.d.ts +68 -99
  194. package/components/tables-select/src/index.vue.d.ts +233 -4988
  195. package/components/template-instances-provider/index.cjs +1 -31
  196. package/components/template-instances-provider/index.mjs +18 -22
  197. package/components/template-instances-provider/src/index.vue.d.ts +5 -4
  198. package/components/templates-default/index.cjs +1 -235
  199. package/components/templates-default/index.mjs +152 -211
  200. package/components/templates-default/src/ctx.d.ts +2 -2
  201. package/components/templates-default/src/index.vue.d.ts +7337 -145
  202. package/components/templates-element-plus/index.cjs +1 -112
  203. package/components/templates-element-plus/index.mjs +49 -91
  204. package/components/templates-element-plus/src/ctx.d.ts +1 -1
  205. package/components/templates-element-plus/src/index.vue.d.ts +59 -251
  206. package/components/templates-esri/index.cjs +1 -65
  207. package/components/templates-esri/index.mjs +29 -39
  208. package/components/templates-esri/src/ctx.d.ts +1 -1
  209. package/components/templates-esri/src/index.vue.d.ts +2184 -25
  210. package/components/templates-layout/index.cjs +1 -137
  211. package/components/templates-layout/index.mjs +78 -116
  212. package/components/templates-layout/src/ctx.d.ts +1 -1
  213. package/components/templates-layout/src/index.vue.d.ts +73 -404
  214. package/components/templates-variant/index.cjs +1 -70
  215. package/components/templates-variant/index.mjs +33 -43
  216. package/components/templates-variant/src/ctx.d.ts +1 -1
  217. package/components/templates-variant/src/index.vue.d.ts +1272 -25
  218. package/components/time-picker/index.cjs +1 -104
  219. package/components/time-picker/index.mjs +57 -87
  220. package/components/time-picker/src/ctx.d.ts +130 -212
  221. package/components/time-picker/src/index.vue.d.ts +283 -1371
  222. package/components/upload/index.cjs +1 -663
  223. package/components/upload/index.mjs +343 -537
  224. package/components/upload/src/ctx.d.ts +106 -191
  225. package/components/upload/src/file.vue.d.ts +168 -745
  226. package/components/upload/src/index.vue.d.ts +647 -1888
  227. package/components/upload/src/types.d.ts +1 -1
  228. package/components/upload/src/wraper.vue.d.ts +233 -407
  229. package/components/upload-plus/index.cjs +21 -18673
  230. package/components/upload-plus/index.mjs +4566 -18366
  231. package/components/upload-plus/src/api.d.ts +1 -1
  232. package/components/upload-plus/src/ctx.d.ts +21 -51
  233. package/components/upload-plus/src/index.vue.d.ts +53 -1657
  234. package/components/use-watch.cjs +1 -0
  235. package/components/van-cascader/index.cjs +1 -125
  236. package/components/van-cascader/index.mjs +51 -96
  237. package/components/van-cascader/src/ctx.d.ts +143 -203
  238. package/components/van-cascader/src/index.vue.d.ts +332 -988
  239. package/components/var-datetime-picker/index.cjs +1 -333
  240. package/components/var-datetime-picker/index.mjs +173 -254
  241. package/components/var-datetime-picker/src/ctx.d.ts +18 -48
  242. package/components/var-datetime-picker/src/index.vue.d.ts +628 -1090
  243. package/components/vditor/index.cjs +1 -86
  244. package/components/vditor/index.mjs +40 -66
  245. package/components/vditor/src/ctx.d.ts +15 -45
  246. package/components/vditor/src/index.vue.d.ts +195 -120
  247. package/composables/element-plus/index.cjs +1 -23
  248. package/composables/element-plus/index.mjs +14 -18
  249. package/composables/index.cjs +1 -161
  250. package/composables/index.d.ts +1 -0
  251. package/composables/index.mjs +100 -135
  252. package/composables/useForm.d.ts +2 -2
  253. package/composables/useRtl.d.ts +18 -0
  254. package/composables/useTemplateInstances.d.ts +3 -3
  255. package/index.css +1 -562
  256. package/index.d.ts +0 -3
  257. package/index.esm.js +23 -48
  258. package/locale/index.cjs +1 -102
  259. package/locale/index.mjs +34 -34
  260. package/locale/lang/index.cjs +1 -2
  261. package/locale/lang/index.d.ts +1 -0
  262. package/package.json +14 -85
  263. package/shared/const/index.cjs +1 -59
  264. package/shared/const/index.d.ts +1 -1
  265. package/shared/const/index.mjs +18 -20
  266. package/shared/element-plus/ctx.d.ts +40 -37
  267. package/shared/element-plus/index.cjs +1 -211
  268. package/shared/element-plus/index.mjs +93 -161
  269. package/shared/element-plus/instances.d.ts +224 -321
  270. package/shared/form/index.cjs +1 -33
  271. package/shared/form/index.mjs +23 -25
  272. package/shared/helper/index.cjs +1 -11
  273. package/shared/helper/index.mjs +7 -8
  274. package/shared/index.cjs +1 -8
  275. package/shared/index.mjs +5 -1
  276. package/shared/infer-prop/index.cjs +1 -36
  277. package/shared/infer-prop/index.mjs +22 -28
  278. package/shared/progress-it/index.cjs +1 -42
  279. package/shared/progress-it/index.mjs +15 -31
  280. package/shared/rules/index.cjs +1 -56
  281. package/shared/rules/index.mjs +19 -18
  282. package/shared/types/form/index.cjs +1 -2
  283. package/shared/types/index.cjs +1 -2
  284. package/shared/types/source/index.cjs +1 -2
  285. package/shared/types/source-manager/index.cjs +1 -2
  286. package/shared/upload/index.cjs +1 -774
  287. package/shared/upload/index.mjs +180 -764
  288. package/component.d.ts +0 -3
  289. package/components/_plugin-vue_export-helper.mjs +0 -9
  290. package/components/card-input-collection/index.css +0 -21
  291. package/components/cascader/index.css +0 -9
  292. package/components/checkbox/index.css +0 -30
  293. package/components/cloneDeep.mjs +0 -2104
  294. package/components/date-picker-range/index.css +0 -18
  295. package/components/dialog-input-collection/index.css +0 -21
  296. package/components/download-plus/index.css +0 -68
  297. package/components/editable-text/index.css +0 -9
  298. package/components/esri-input-geojson/index.css +0 -32
  299. package/components/fieldset/index.css +0 -5
  300. package/components/form-item/index.css +0 -35
  301. package/components/index.mjs +0 -378
  302. package/components/index2.mjs +0 -14
  303. package/components/information-tag/index.css +0 -6
  304. package/components/information-templates-default/index.css +0 -16
  305. package/components/input-array/index.css +0 -14
  306. package/components/input-collection/index.css +0 -20
  307. package/components/input-link/index.css +0 -4
  308. package/components/input-number/index.css +0 -13
  309. package/components/isObject.mjs +0 -158
  310. package/components/monaco-editor/index.css +0 -4
  311. package/components/radio/index.css +0 -40
  312. package/components/select/index.css +0 -15
  313. package/components/switch/index.css +0 -10
  314. package/components/tables-select/index.css +0 -3
  315. package/components/templates-layout/index.css +0 -3
  316. package/components/upload/index.css +0 -34
  317. package/components/upload-plus/index.css +0 -84
  318. package/components/van-cascader/index.css +0 -6
  319. package/components/var-datetime-picker/index.css +0 -17
  320. package/defaults.d.ts +0 -5
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../use-watch.cjs"),s=require("element-plus");require("@vunk/shared/function");const H={modelValue:{type:[Number,Array],default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:{type:String,default:""},inputSize:{type:String,default:""},showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Function,default:void 0},disabled:{type:Boolean,default:void 0},range:Boolean,vertical:Boolean,height:String,rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Function,default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,default:"top"},marks:{type:Object},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},ariaLabel:String},O=r=>typeof r=="number"||Array.isArray(r)&&r.every(i=>typeof i=="number"),J={[s.UPDATE_MODEL_EVENT]:O,[s.INPUT_EVENT]:O,[s.CHANGE_EVENT]:O};var ie="top",ue="bottom",de="right",pe="left",me="auto",ce=[ie,ue,de,pe],fe="start",ve="end",ye=[].concat(ce,[me]).reduce(function(r,i){return r.concat([i,i+"-"+fe,i+"-"+ve])},[]);const be={modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:ye,default:"top"}},ge={[s.UPDATE_MODEL_EVENT]:r=>typeof r=="number"},ke=["tabindex"],G=e.defineComponent({name:"ElSliderButton",__name:"button",props:be,emits:ge,setup(r,{expose:i,emit:V}){const t=r,L=V,l=s.useNamespace("slider"),E=e.computed(()=>t.placement||"top"),C=e.reactive({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:t.modelValue}),p=e.computed(()=>T.value?U.value:!1),{disabled:f,button:v,tooltip:R,showTooltip:T,persistent:U,tooltipVisible:c,wrapperStyle:M,formatValue:I,handleMouseEnter:y,handleMouseLeave:b,onButtonDown:g,onKeyDown:k,setPosition:P}=d.useSliderButton(t,C,L),{hovering:w,dragging:m}=e.toRefs(C);return i({onButtonDown:g,onKeyDown:k,setPosition:P,hovering:w,dragging:m}),(A,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"button",ref:v,class:e.normalizeClass([e.unref(l).e("button-wrapper"),{hover:e.unref(w),dragging:e.unref(m)}]),style:e.normalizeStyle(e.unref(M)),tabindex:e.unref(f)?void 0:0,onMouseenter:n[0]||(n[0]=(...o)=>e.unref(y)&&e.unref(y)(...o)),onMouseleave:n[1]||(n[1]=(...o)=>e.unref(b)&&e.unref(b)(...o)),onMousedown:n[2]||(n[2]=(...o)=>e.unref(g)&&e.unref(g)(...o)),onFocus:n[3]||(n[3]=(...o)=>e.unref(y)&&e.unref(y)(...o)),onBlur:n[4]||(n[4]=(...o)=>e.unref(b)&&e.unref(b)(...o)),onKeydown:n[5]||(n[5]=(...o)=>e.unref(k)&&e.unref(k)(...o))},[e.createVNode(e.unref(s.ElTooltip),{ref_key:"tooltip",ref:R,visible:e.unref(c),placement:E.value,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":A.tooltipClass,disabled:!e.unref(T),persistent:p.value},{content:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(I)),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("button"),{hover:e.unref(w),dragging:e.unref(m)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,ke))}}),Se={mark:{type:[String,Object],default:void 0}},Be=e.defineComponent({name:"ElSliderMarker",props:Se,setup(r){const i=s.useNamespace("slider"),V=e.computed(()=>typeof r.mark=="string"?r.mark:r.mark.label),t=e.computed(()=>typeof r.mark=="string"?void 0:r.mark.style);return()=>e.h("div",{class:i.e("marks-text"),style:t.value},V.value)}}),Ve=["id","role","aria-label","aria-labelledby"],Ee={key:1},Q=e.defineComponent({name:"VkfSliderCore",__name:"slider-core",props:{...H,isRtl:{type:Boolean,default:!1}},emits:J,setup(r,{expose:i,emit:V}){const t=r,L=V,l=s.useNamespace("slider"),{t:E}=s.useLocale(),C=a=>typeof a=="number",p=e.reactive({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),f=e.computed(()=>t.isRtl),{elFormItem:v,slider:R,firstButton:T,secondButton:U,sliderDisabled:c,minValue:M,maxValue:I,runwayStyle:y,barStyle:b,resetSize:g,emitChange:k,onSliderWrapperPrevent:P,onSliderClick:w,onSliderDown:m,onSliderMarkerDown:A,setFirstValue:n,setSecondValue:o}=d.useSlide(t,p,L,f),{stops:Z,getStopStyle:K}=d.useStops(t,p,M,I,f),{inputId:q,isLabeledByFormItem:x}=s.useFormItemInputId(t,{formItemContext:v}),j=s.useFormSize(),_=e.computed(()=>t.inputSize||j.value),W=e.computed(()=>t.showInput&&!t.range&&t.step!=="mark"),X=e.computed(()=>t.ariaLabel||E("el.slider.defaultLabel",{min:t.min,max:t.max})),ee=e.computed(()=>t.range?t.rangeStartLabel||E("el.slider.defaultRangeStartLabel"):X.value),te=e.computed(()=>t.formatValueText?t.formatValueText(S.value):`${S.value}`),ae=e.computed(()=>t.rangeEndLabel||E("el.slider.defaultRangeEndLabel")),re=e.computed(()=>t.formatValueText?t.formatValueText(h.value):`${h.value}`),le=e.computed(()=>[l.b(),l.m(j.value),l.is("vertical",t.vertical),l.is("rtl",f.value),{[l.m("with-input")]:W.value}]),D=d.useMarks(t);d.useWatch(t,p,M,I,L,v);const ne=e.computed(()=>C(t.step)?t.step:1),Y=e.computed(()=>{const a=C(t.step)?t.step:1,B=[t.min,t.max,a].map(F=>{const z=`${F}`.split(".")[1];return z?z.length:0});return Math.max.apply(null,B)}),{sliderWrapper:$}=d.useLifecycle(t,p,g),{firstValue:S,secondValue:h,sliderSize:oe}=e.toRefs(p),se=a=>{p.dragging=a};return d.useEventListener($,"touchstart",P,{passive:!1}),d.useEventListener($,"touchmove",P,{passive:!1}),e.provide(d.sliderContextKey,{...e.toRefs(t),sliderSize:oe,disabled:c,precision:Y,markList:D,emitChange:k,resetSize:g,updateDragging:se,isRtl:f}),i({onSliderClick:w}),(a,B)=>{var F,z;return e.openBlock(),e.createElementBlock("div",{id:a.range?e.unref(q):void 0,ref_key:"sliderWrapper",ref:$,class:e.normalizeClass(le.value),role:a.range?"group":void 0,"aria-label":a.range&&!e.unref(x)?X.value:void 0,"aria-labelledby":a.range&&e.unref(x)?(F=e.unref(v))==null?void 0:F.labelId:void 0},[e.createElementVNode("div",{ref_key:"slider",ref:R,class:e.normalizeClass([e.unref(l).e("runway"),{"show-input":W.value},e.unref(l).is("disabled",e.unref(c))]),style:e.normalizeStyle(e.unref(y)),onMousedown:B[0]||(B[0]=(...u)=>e.unref(m)&&e.unref(m)(...u)),onTouchstartPassive:B[1]||(B[1]=(...u)=>e.unref(m)&&e.unref(m)(...u))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("bar")),style:e.normalizeStyle(e.unref(b))},null,6),e.createVNode(G,{id:a.range?void 0:e.unref(q),ref_key:"firstButton",ref:T,"model-value":e.unref(S),vertical:a.vertical,"tooltip-class":a.tooltipClass,placement:a.placement,role:"slider","aria-label":a.range||!e.unref(x)?ee.value:void 0,"aria-labelledby":!a.range&&e.unref(x)?(z=e.unref(v))==null?void 0:z.labelId:void 0,"aria-valuemin":a.min,"aria-valuemax":a.range?e.unref(h):a.max,"aria-valuenow":e.unref(S),"aria-valuetext":te.value,"aria-orientation":a.vertical?"vertical":"horizontal","aria-disabled":e.unref(c),"onUpdate:modelValue":e.unref(n)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),a.range?(e.openBlock(),e.createBlock(G,{key:0,ref_key:"secondButton",ref:U,"model-value":e.unref(h),vertical:a.vertical,"tooltip-class":a.tooltipClass,placement:a.placement,role:"slider","aria-label":ae.value,"aria-valuemin":e.unref(S),"aria-valuemax":a.max,"aria-valuenow":e.unref(h),"aria-valuetext":re.value,"aria-orientation":a.vertical?"vertical":"horizontal","aria-disabled":e.unref(c),"onUpdate:modelValue":e.unref(o)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):e.createCommentVNode("",!0),a.showStops?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Z),(u,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:e.normalizeClass(e.unref(l).e("stop")),style:e.normalizeStyle(e.unref(K)(u))},null,6))),128))])):e.createCommentVNode("",!0),e.unref(D).length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(D),(u,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,style:e.normalizeStyle(e.unref(K)(u.position)),class:e.normalizeClass([e.unref(l).e("stop"),e.unref(l).e("marks-stop")])},null,6))),128))]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("marks"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(D),(u,N)=>(e.openBlock(),e.createBlock(e.unref(Be),{key:N,mark:u.mark,style:e.normalizeStyle(e.unref(K)(u.position)),onMousedown:e.withModifiers(Ce=>e.unref(A)(u.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):e.createCommentVNode("",!0)],38),W.value?(e.openBlock(),e.createBlock(e.unref(s.ElInputNumber),{key:0,ref:"input","model-value":e.unref(S),class:e.normalizeClass(e.unref(l).e("input")),step:ne.value,disabled:e.unref(c),controls:a.showInputControls,min:a.min,max:a.max,precision:Y.value,size:_.value,"onUpdate:modelValue":e.unref(n),onChange:e.unref(k)},null,8,["model-value","class","step","disabled","controls","min","max","precision","size","onUpdate:modelValue","onChange"])):e.createCommentVNode("",!0)],10,Ve)}}});exports.sliderContextKey=d.sliderContextKey;exports.SliderCore=Q;exports.default=Q;exports.sliderEmits=J;exports.sliderProps=H;
@@ -0,0 +1,5 @@
1
+ import SliderCore from './src/slider-core.vue';
2
+ export { SliderCore };
3
+ export default SliderCore;
4
+ export * from './src/slider';
5
+ export * from './src/constants';
@@ -0,0 +1,475 @@
1
+ import { defineComponent as _, computed as n, reactive as ie, toRefs as Z, openBlock as i, createElementBlock as p, unref as e, normalizeStyle as h, normalizeClass as m, createVNode as ue, withCtx as oe, createElementVNode as E, toDisplayString as ke, h as we, provide as Be, createBlock as q, createCommentVNode as W, Fragment as K, renderList as J, withModifiers as he } from "vue";
2
+ import { c as Ee, b as Ce, d as Le, a as Ie, e as Te, u as Me, f as ne, s as Ne } from "../use-watch.cjs";
3
+ import { CHANGE_EVENT as ze, INPUT_EVENT as Pe, UPDATE_MODEL_EVENT as de, useNamespace as ee, ElTooltip as xe, useLocale as De, useFormItemInputId as Fe, useFormSize as Ue, ElInputNumber as Re } from "element-plus";
4
+ import "@vunk/shared/function";
5
+ const $e = {
6
+ /**
7
+ * @description binding value
8
+ */
9
+ modelValue: {
10
+ type: [Number, Array],
11
+ default: 0
12
+ },
13
+ id: {
14
+ type: String,
15
+ default: void 0
16
+ },
17
+ /**
18
+ * @description minimum value
19
+ */
20
+ min: {
21
+ type: Number,
22
+ default: 0
23
+ },
24
+ /**
25
+ * @description maximum value
26
+ */
27
+ max: {
28
+ type: Number,
29
+ default: 100
30
+ },
31
+ /**
32
+ * @description step size, can be a number or `'mark'` to restrict values to marks. When set to `'mark'`, the `marks` attribute must be set
33
+ */
34
+ step: {
35
+ type: [Number, String],
36
+ default: 1
37
+ },
38
+ /**
39
+ * @description whether to display an input box, works when `range` is false and `step` is not `'mark'`
40
+ */
41
+ showInput: Boolean,
42
+ /**
43
+ * @description whether to display control buttons when `show-input` is true
44
+ */
45
+ showInputControls: {
46
+ type: Boolean,
47
+ default: !0
48
+ },
49
+ /**
50
+ * @description size of the slider wrapper, will not work in vertical mode
51
+ */
52
+ size: {
53
+ type: String,
54
+ default: ""
55
+ },
56
+ /**
57
+ * @description size of the input box, when set `size`, the default is the value of `size`
58
+ */
59
+ inputSize: {
60
+ type: String,
61
+ default: ""
62
+ },
63
+ /**
64
+ * @description whether to display breakpoints
65
+ */
66
+ showStops: Boolean,
67
+ /**
68
+ * @description whether to display tooltip value
69
+ */
70
+ showTooltip: {
71
+ type: Boolean,
72
+ default: !0
73
+ },
74
+ /**
75
+ * @description format to display tooltip value
76
+ */
77
+ formatTooltip: {
78
+ type: Function,
79
+ default: void 0
80
+ },
81
+ /**
82
+ * @description whether Slider is disabled
83
+ */
84
+ disabled: {
85
+ type: Boolean,
86
+ default: void 0
87
+ },
88
+ /**
89
+ * @description whether to select a range
90
+ */
91
+ range: Boolean,
92
+ /**
93
+ * @description vertical mode
94
+ */
95
+ vertical: Boolean,
96
+ /**
97
+ * @description slider height, required in vertical mode
98
+ */
99
+ height: String,
100
+ /**
101
+ * @description when `range` is true, screen reader label for the start of the range
102
+ */
103
+ rangeStartLabel: {
104
+ type: String,
105
+ default: void 0
106
+ },
107
+ /**
108
+ * @description when `range` is true, screen reader label for the end of the range
109
+ */
110
+ rangeEndLabel: {
111
+ type: String,
112
+ default: void 0
113
+ },
114
+ /**
115
+ * @description format to display the `aria-valuenow` attribute for screen readers
116
+ */
117
+ formatValueText: {
118
+ type: Function,
119
+ default: void 0
120
+ },
121
+ /**
122
+ * @description custom class name for the tooltip
123
+ */
124
+ tooltipClass: {
125
+ type: String,
126
+ default: void 0
127
+ },
128
+ /**
129
+ * @description position of Tooltip
130
+ */
131
+ placement: {
132
+ type: String,
133
+ default: "top"
134
+ },
135
+ /**
136
+ * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style
137
+ */
138
+ marks: {
139
+ type: Object
140
+ },
141
+ /**
142
+ * @description whether to trigger form validation
143
+ */
144
+ validateEvent: {
145
+ type: Boolean,
146
+ default: !0
147
+ },
148
+ /**
149
+ * @description when slider tooltip inactive and `persistent` is `false` , popconfirm will be destroyed. `persistent` always be `false` when `show-tooltip ` is `false`
150
+ */
151
+ persistent: {
152
+ type: Boolean,
153
+ default: !0
154
+ },
155
+ ariaLabel: String
156
+ }, Q = (l) => typeof l == "number" || Array.isArray(l) && l.every((u) => typeof u == "number"), Ae = {
157
+ [de]: Q,
158
+ [Pe]: Q,
159
+ [ze]: Q
160
+ };
161
+ var We = "top", Ke = "bottom", Oe = "right", je = "left", Xe = "auto", Ye = [We, Ke, Oe, je], Ge = "start", He = "end", qe = /* @__PURE__ */ [].concat(Ye, [Xe]).reduce(function(l, u) {
162
+ return l.concat([u, u + "-" + Ge, u + "-" + He]);
163
+ }, []);
164
+ const Je = {
165
+ modelValue: {
166
+ type: Number,
167
+ default: 0
168
+ },
169
+ vertical: Boolean,
170
+ tooltipClass: String,
171
+ placement: {
172
+ type: String,
173
+ values: qe,
174
+ default: "top"
175
+ }
176
+ }, Qe = {
177
+ [de]: (l) => typeof l == "number"
178
+ }, Ze = ["tabindex"], se = /* @__PURE__ */ _({
179
+ name: "ElSliderButton",
180
+ __name: "button",
181
+ props: Je,
182
+ emits: Qe,
183
+ setup(l, { expose: u, emit: C }) {
184
+ const t = l, P = C, r = ee("slider"), L = n(() => t.placement || "top"), I = ie({
185
+ hovering: !1,
186
+ dragging: !1,
187
+ isClick: !1,
188
+ startX: 0,
189
+ currentX: 0,
190
+ startY: 0,
191
+ currentY: 0,
192
+ startPosition: 0,
193
+ newPosition: 0,
194
+ oldValue: t.modelValue
195
+ }), v = n(
196
+ () => x.value ? j.value : !1
197
+ ), {
198
+ disabled: b,
199
+ button: y,
200
+ tooltip: O,
201
+ showTooltip: x,
202
+ persistent: j,
203
+ tooltipVisible: f,
204
+ wrapperStyle: D,
205
+ formatValue: F,
206
+ handleMouseEnter: g,
207
+ handleMouseLeave: S,
208
+ onButtonDown: V,
209
+ onKeyDown: k,
210
+ setPosition: U
211
+ } = Ee(t, I, P), { hovering: T, dragging: c } = Z(I);
212
+ return u({
213
+ onButtonDown: V,
214
+ onKeyDown: k,
215
+ setPosition: U,
216
+ hovering: T,
217
+ dragging: c
218
+ }), (X, o) => (i(), p("div", {
219
+ ref_key: "button",
220
+ ref: y,
221
+ class: m([e(r).e("button-wrapper"), { hover: e(T), dragging: e(c) }]),
222
+ style: h(e(D)),
223
+ tabindex: e(b) ? void 0 : 0,
224
+ onMouseenter: o[0] || (o[0] = //@ts-ignore
225
+ (...s) => e(g) && e(g)(...s)),
226
+ onMouseleave: o[1] || (o[1] = //@ts-ignore
227
+ (...s) => e(S) && e(S)(...s)),
228
+ onMousedown: o[2] || (o[2] = //@ts-ignore
229
+ (...s) => e(V) && e(V)(...s)),
230
+ onFocus: o[3] || (o[3] = //@ts-ignore
231
+ (...s) => e(g) && e(g)(...s)),
232
+ onBlur: o[4] || (o[4] = //@ts-ignore
233
+ (...s) => e(S) && e(S)(...s)),
234
+ onKeydown: o[5] || (o[5] = //@ts-ignore
235
+ (...s) => e(k) && e(k)(...s))
236
+ }, [
237
+ ue(e(xe), {
238
+ ref_key: "tooltip",
239
+ ref: O,
240
+ visible: e(f),
241
+ placement: L.value,
242
+ "fallback-placements": ["top", "bottom", "right", "left"],
243
+ "stop-popper-mouse-event": !1,
244
+ "popper-class": X.tooltipClass,
245
+ disabled: !e(x),
246
+ persistent: v.value
247
+ }, {
248
+ content: oe(() => [
249
+ E("span", null, ke(e(F)), 1)
250
+ ]),
251
+ default: oe(() => [
252
+ E("div", {
253
+ class: m([e(r).e("button"), { hover: e(T), dragging: e(c) }])
254
+ }, null, 2)
255
+ ]),
256
+ _: 1
257
+ }, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
258
+ ], 46, Ze));
259
+ }
260
+ }), _e = {
261
+ mark: {
262
+ type: [String, Object],
263
+ default: void 0
264
+ }
265
+ }, et = _({
266
+ name: "ElSliderMarker",
267
+ props: _e,
268
+ setup(l) {
269
+ const u = ee("slider"), C = n(() => typeof l.mark == "string" ? l.mark : l.mark.label), t = n(
270
+ () => typeof l.mark == "string" ? void 0 : l.mark.style
271
+ );
272
+ return () => we(
273
+ "div",
274
+ {
275
+ class: u.e("marks-text"),
276
+ style: t.value
277
+ },
278
+ C.value
279
+ );
280
+ }
281
+ }), tt = ["id", "role", "aria-label", "aria-labelledby"], at = { key: 1 }, it = /* @__PURE__ */ _({
282
+ name: "VkfSliderCore",
283
+ __name: "slider-core",
284
+ props: {
285
+ ...$e,
286
+ isRtl: {
287
+ type: Boolean,
288
+ default: !1
289
+ }
290
+ },
291
+ emits: Ae,
292
+ setup(l, { expose: u, emit: C }) {
293
+ const t = l, P = C, r = ee("slider"), { t: L } = De(), I = (a) => typeof a == "number", v = ie({
294
+ firstValue: 0,
295
+ secondValue: 0,
296
+ oldValue: 0,
297
+ dragging: !1,
298
+ sliderSize: 1
299
+ }), b = n(() => t.isRtl), {
300
+ elFormItem: y,
301
+ slider: O,
302
+ firstButton: x,
303
+ secondButton: j,
304
+ sliderDisabled: f,
305
+ minValue: D,
306
+ maxValue: F,
307
+ runwayStyle: g,
308
+ barStyle: S,
309
+ resetSize: V,
310
+ emitChange: k,
311
+ onSliderWrapperPrevent: U,
312
+ onSliderClick: T,
313
+ onSliderDown: c,
314
+ onSliderMarkerDown: X,
315
+ setFirstValue: o,
316
+ setSecondValue: s
317
+ } = Ce(t, v, P, b), { stops: pe, getStopStyle: Y } = Le(t, v, D, F, b), { inputId: te, isLabeledByFormItem: R } = Fe(t, {
318
+ formItemContext: y
319
+ }), ae = Ue(), me = n(
320
+ () => t.inputSize || ae.value
321
+ ), G = n(() => t.showInput && !t.range && t.step !== "mark"), le = n(() => t.ariaLabel || L("el.slider.defaultLabel", {
322
+ min: t.min,
323
+ max: t.max
324
+ })), ve = n(() => t.range ? t.rangeStartLabel || L("el.slider.defaultRangeStartLabel") : le.value), ce = n(() => t.formatValueText ? t.formatValueText(w.value) : `${w.value}`), fe = n(() => t.rangeEndLabel || L("el.slider.defaultRangeEndLabel")), be = n(() => t.formatValueText ? t.formatValueText(M.value) : `${M.value}`), ye = n(() => [
325
+ r.b(),
326
+ r.m(ae.value),
327
+ r.is("vertical", t.vertical),
328
+ r.is("rtl", b.value),
329
+ { [r.m("with-input")]: G.value }
330
+ ]), $ = Ie(t);
331
+ Te(t, v, D, F, P, y);
332
+ const ge = n(() => I(t.step) ? t.step : 1), re = n(() => {
333
+ const a = I(t.step) ? t.step : 1, B = [t.min, t.max, a].map((A) => {
334
+ const N = `${A}`.split(".")[1];
335
+ return N ? N.length : 0;
336
+ });
337
+ return Math.max.apply(null, B);
338
+ }), { sliderWrapper: H } = Me(t, v, V), { firstValue: w, secondValue: M, sliderSize: Se } = Z(v), Ve = (a) => {
339
+ v.dragging = a;
340
+ };
341
+ return ne(H, "touchstart", U, {
342
+ passive: !1
343
+ }), ne(H, "touchmove", U, {
344
+ passive: !1
345
+ }), Be(Ne, {
346
+ ...Z(t),
347
+ sliderSize: Se,
348
+ disabled: f,
349
+ precision: re,
350
+ markList: $,
351
+ emitChange: k,
352
+ resetSize: V,
353
+ updateDragging: Ve,
354
+ isRtl: b
355
+ }), u({
356
+ onSliderClick: T
357
+ }), (a, B) => {
358
+ var A, N;
359
+ return i(), p("div", {
360
+ id: a.range ? e(te) : void 0,
361
+ ref_key: "sliderWrapper",
362
+ ref: H,
363
+ class: m(ye.value),
364
+ role: a.range ? "group" : void 0,
365
+ "aria-label": a.range && !e(R) ? le.value : void 0,
366
+ "aria-labelledby": a.range && e(R) ? (A = e(y)) == null ? void 0 : A.labelId : void 0
367
+ }, [
368
+ E("div", {
369
+ ref_key: "slider",
370
+ ref: O,
371
+ class: m([
372
+ e(r).e("runway"),
373
+ { "show-input": G.value },
374
+ e(r).is("disabled", e(f))
375
+ ]),
376
+ style: h(e(g)),
377
+ onMousedown: B[0] || (B[0] = //@ts-ignore
378
+ (...d) => e(c) && e(c)(...d)),
379
+ onTouchstartPassive: B[1] || (B[1] = //@ts-ignore
380
+ (...d) => e(c) && e(c)(...d))
381
+ }, [
382
+ E("div", {
383
+ class: m(e(r).e("bar")),
384
+ style: h(e(S))
385
+ }, null, 6),
386
+ ue(se, {
387
+ id: a.range ? void 0 : e(te),
388
+ ref_key: "firstButton",
389
+ ref: x,
390
+ "model-value": e(w),
391
+ vertical: a.vertical,
392
+ "tooltip-class": a.tooltipClass,
393
+ placement: a.placement,
394
+ role: "slider",
395
+ "aria-label": a.range || !e(R) ? ve.value : void 0,
396
+ "aria-labelledby": !a.range && e(R) ? (N = e(y)) == null ? void 0 : N.labelId : void 0,
397
+ "aria-valuemin": a.min,
398
+ "aria-valuemax": a.range ? e(M) : a.max,
399
+ "aria-valuenow": e(w),
400
+ "aria-valuetext": ce.value,
401
+ "aria-orientation": a.vertical ? "vertical" : "horizontal",
402
+ "aria-disabled": e(f),
403
+ "onUpdate:modelValue": e(o)
404
+ }, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
405
+ a.range ? (i(), q(se, {
406
+ key: 0,
407
+ ref_key: "secondButton",
408
+ ref: j,
409
+ "model-value": e(M),
410
+ vertical: a.vertical,
411
+ "tooltip-class": a.tooltipClass,
412
+ placement: a.placement,
413
+ role: "slider",
414
+ "aria-label": fe.value,
415
+ "aria-valuemin": e(w),
416
+ "aria-valuemax": a.max,
417
+ "aria-valuenow": e(M),
418
+ "aria-valuetext": be.value,
419
+ "aria-orientation": a.vertical ? "vertical" : "horizontal",
420
+ "aria-disabled": e(f),
421
+ "onUpdate:modelValue": e(s)
422
+ }, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : W("", !0),
423
+ a.showStops ? (i(), p("div", at, [
424
+ (i(!0), p(K, null, J(e(pe), (d, z) => (i(), p("div", {
425
+ key: z,
426
+ class: m(e(r).e("stop")),
427
+ style: h(e(Y)(d))
428
+ }, null, 6))), 128))
429
+ ])) : W("", !0),
430
+ e($).length > 0 ? (i(), p(K, { key: 2 }, [
431
+ E("div", null, [
432
+ (i(!0), p(K, null, J(e($), (d, z) => (i(), p("div", {
433
+ key: z,
434
+ style: h(e(Y)(d.position)),
435
+ class: m([e(r).e("stop"), e(r).e("marks-stop")])
436
+ }, null, 6))), 128))
437
+ ]),
438
+ E("div", {
439
+ class: m(e(r).e("marks"))
440
+ }, [
441
+ (i(!0), p(K, null, J(e($), (d, z) => (i(), q(e(et), {
442
+ key: z,
443
+ mark: d.mark,
444
+ style: h(e(Y)(d.position)),
445
+ onMousedown: he((lt) => e(X)(d.position), ["stop"])
446
+ }, null, 8, ["mark", "style", "onMousedown"]))), 128))
447
+ ], 2)
448
+ ], 64)) : W("", !0)
449
+ ], 38),
450
+ G.value ? (i(), q(e(Re), {
451
+ key: 0,
452
+ ref: "input",
453
+ "model-value": e(w),
454
+ class: m(e(r).e("input")),
455
+ step: ge.value,
456
+ disabled: e(f),
457
+ controls: a.showInputControls,
458
+ min: a.min,
459
+ max: a.max,
460
+ precision: re.value,
461
+ size: me.value,
462
+ "onUpdate:modelValue": e(o),
463
+ onChange: e(k)
464
+ }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "size", "onUpdate:modelValue", "onChange"])) : W("", !0)
465
+ ], 10, tt);
466
+ };
467
+ }
468
+ });
469
+ export {
470
+ it as SliderCore,
471
+ it as default,
472
+ Ne as sliderContextKey,
473
+ Ae as sliderEmits,
474
+ $e as sliderProps
475
+ };
@@ -0,0 +1,36 @@
1
+ import type { Placement } from 'element-plus';
2
+ import type { ComponentPublicInstance, ExtractPropTypes, ExtractPublicPropTypes, Ref, PropType } from 'vue';
3
+ import type Button from './button.vue';
4
+ export declare const sliderButtonProps: {
5
+ readonly modelValue: {
6
+ readonly type: NumberConstructor;
7
+ readonly default: 0;
8
+ };
9
+ readonly vertical: BooleanConstructor;
10
+ readonly tooltipClass: StringConstructor;
11
+ readonly placement: {
12
+ readonly type: PropType<Placement>;
13
+ readonly values: import("@popperjs/core/index").Placement[];
14
+ readonly default: "top";
15
+ };
16
+ };
17
+ export type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>;
18
+ export type SliderButtonPropsPublic = ExtractPublicPropTypes<typeof sliderButtonProps>;
19
+ export declare const sliderButtonEmits: {
20
+ "update:modelValue": (value: number) => boolean;
21
+ };
22
+ export type SliderButtonEmits = typeof sliderButtonEmits;
23
+ export type SliderButtonInstance = ComponentPublicInstance<typeof Button>;
24
+ export type ButtonRefs = Record<'firstButton' | 'secondButton', Ref<SliderButtonInstance | undefined>>;
25
+ export interface SliderButtonInitData {
26
+ hovering: boolean;
27
+ dragging: boolean;
28
+ isClick: boolean;
29
+ startX: number;
30
+ currentX: number;
31
+ startY: number;
32
+ currentY: number;
33
+ startPosition: number;
34
+ newPosition: number;
35
+ oldValue: number;
36
+ }
@@ -0,0 +1,42 @@
1
+ import type { Placement } from 'element-plus';
2
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ readonly modelValue: {
4
+ readonly type: NumberConstructor;
5
+ readonly default: 0;
6
+ };
7
+ readonly vertical: BooleanConstructor;
8
+ readonly tooltipClass: StringConstructor;
9
+ readonly placement: {
10
+ readonly type: import("vue").PropType<Placement>;
11
+ readonly values: import("@popperjs/core").Placement[];
12
+ readonly default: "top";
13
+ };
14
+ }>, {
15
+ onButtonDown: (event: MouseEvent | TouchEvent) => void;
16
+ onKeyDown: (event: KeyboardEvent) => void;
17
+ setPosition: (newPosition: number) => Promise<void>;
18
+ hovering: import("vue").Ref<boolean, boolean>;
19
+ dragging: import("vue").Ref<boolean, boolean>;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "update:modelValue": (value: number) => void;
22
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ readonly modelValue: {
24
+ readonly type: NumberConstructor;
25
+ readonly default: 0;
26
+ };
27
+ readonly vertical: BooleanConstructor;
28
+ readonly tooltipClass: StringConstructor;
29
+ readonly placement: {
30
+ readonly type: import("vue").PropType<Placement>;
31
+ readonly values: import("@popperjs/core").Placement[];
32
+ readonly default: "top";
33
+ };
34
+ }>> & Readonly<{
35
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
36
+ }>, {
37
+ readonly placement: Placement;
38
+ readonly vertical: boolean;
39
+ readonly modelValue: number;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../use-watch.cjs");exports.useLifecycle=e.useLifecycle;exports.useMarks=e.useMarks;exports.useSlide=e.useSlide;exports.useSliderButton=e.useSliderButton;exports.useStops=e.useStops;exports.useWatch=e.useWatch;
@@ -0,0 +1,6 @@
1
+ export * from './use-lifecycle';
2
+ export * from './use-marks';
3
+ export * from './use-slide';
4
+ export * from './use-slider-button';
5
+ export * from './use-stops';
6
+ export * from './use-watch';
@@ -0,0 +1,9 @@
1
+ import { u as a, a as u, b as t, c, d as o, e as r } from "../../../use-watch.cjs";
2
+ export {
3
+ a as useLifecycle,
4
+ u as useMarks,
5
+ t as useSlide,
6
+ c as useSliderButton,
7
+ o as useStops,
8
+ r as useWatch
9
+ };
@@ -0,0 +1,4 @@
1
+ import type { SliderInitData, SliderProps } from '../slider';
2
+ export declare const useLifecycle: (props: SliderProps, initData: SliderInitData, resetSize: () => void) => {
3
+ sliderWrapper: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
4
+ };
@@ -0,0 +1,7 @@
1
+ import type { SliderProps } from '../slider';
2
+ import type { SliderMarkerProps } from '../marker';
3
+ export interface Mark extends SliderMarkerProps {
4
+ point: number;
5
+ position: number;
6
+ }
7
+ export declare const useMarks: (props: SliderProps) => import("vue").ComputedRef<Mark[]>;
@@ -0,0 +1,23 @@
1
+ import type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue';
2
+ import type { SliderEmits, SliderInitData, SliderProps } from '../slider';
3
+ import type { SliderButtonInstance } from '../button';
4
+ export declare const useSlide: (props: SliderProps, initData: SliderInitData, emit: SetupContext<SliderEmits>["emit"], isRtl: ComputedRef<boolean>) => {
5
+ elFormItem: import("element-plus").FormItemContext | undefined;
6
+ slider: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
7
+ firstButton: Ref<SliderButtonInstance | undefined, SliderButtonInstance | undefined>;
8
+ secondButton: Ref<SliderButtonInstance | undefined, SliderButtonInstance | undefined>;
9
+ sliderDisabled: ComputedRef<boolean>;
10
+ minValue: ComputedRef<number>;
11
+ maxValue: ComputedRef<number>;
12
+ runwayStyle: ComputedRef<CSSProperties>;
13
+ barStyle: ComputedRef<CSSProperties>;
14
+ resetSize: () => void;
15
+ setPosition: (percent: number) => Ref<SliderButtonInstance | undefined>;
16
+ emitChange: () => Promise<void>;
17
+ onSliderWrapperPrevent: (event: TouchEvent) => void;
18
+ onSliderClick: (event: MouseEvent | TouchEvent) => void;
19
+ onSliderDown: (event: MouseEvent | TouchEvent) => Promise<void>;
20
+ onSliderMarkerDown: (position: number) => void;
21
+ setFirstValue: (firstValue: number | undefined) => void;
22
+ setSecondValue: (secondValue: number) => void;
23
+ };
@@ -0,0 +1,18 @@
1
+ import type { CSSProperties, ComputedRef, Ref, SetupContext } from 'vue';
2
+ import type { SliderButtonEmits, SliderButtonInitData, SliderButtonProps } from '../button';
3
+ import type { TooltipInstance } from 'element-plus';
4
+ export declare const useSliderButton: (props: SliderButtonProps, initData: SliderButtonInitData, emit: SetupContext<SliderButtonEmits>["emit"]) => {
5
+ disabled: ComputedRef<boolean>;
6
+ button: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
7
+ tooltip: Ref<TooltipInstance | undefined, TooltipInstance | undefined>;
8
+ tooltipVisible: Ref<boolean, boolean>;
9
+ showTooltip: Ref<boolean, boolean>;
10
+ persistent: Ref<boolean, boolean>;
11
+ wrapperStyle: ComputedRef<CSSProperties>;
12
+ formatValue: ComputedRef<string | number>;
13
+ handleMouseEnter: () => void;
14
+ handleMouseLeave: () => void;
15
+ onButtonDown: (event: MouseEvent | TouchEvent) => void;
16
+ onKeyDown: (event: KeyboardEvent) => void;
17
+ setPosition: (newPosition: number) => Promise<void>;
18
+ };
@@ -0,0 +1,8 @@
1
+ import type { CSSProperties, ComputedRef } from 'vue';
2
+ import type { SliderInitData, SliderProps } from '../slider';
3
+ type Stops = {
4
+ stops: ComputedRef<number[]>;
5
+ getStopStyle: (position: number) => CSSProperties;
6
+ };
7
+ export declare const useStops: (props: SliderProps, initData: SliderInitData, minValue: ComputedRef<number>, maxValue: ComputedRef<number>, isRtl: ComputedRef<boolean>) => Stops;
8
+ export {};