vue-devui 1.0.0-pre.0 → 1.0.0-rc.10

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 (347) hide show
  1. package/README.md +149 -187
  2. package/alert/index.es.js +74 -45
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8182 -296
  6. package/auto-complete/index.umd.js +29 -1
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +153 -146
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +30 -5
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5741 -127
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +59 -35
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +8060 -255
  21. package/checkbox/index.umd.js +27 -1
  22. package/checkbox/style.css +1 -1
  23. package/{accordion → collapse}/index.d.ts +0 -0
  24. package/collapse/index.es.js +379 -0
  25. package/collapse/index.umd.js +1 -0
  26. package/{anchor → collapse}/package.json +1 -1
  27. package/collapse/style.css +1 -0
  28. package/countdown/index.es.js +5 -7
  29. package/countdown/index.umd.js +1 -1
  30. package/date-picker/index.es.js +8159 -288
  31. package/date-picker/index.umd.js +27 -1
  32. package/date-picker/style.css +1 -1
  33. package/drawer/index.es.js +31 -4
  34. package/drawer/index.umd.js +1 -1
  35. package/drawer/style.css +1 -1
  36. package/dropdown/index.es.js +297 -181
  37. package/dropdown/index.umd.js +1 -1
  38. package/dropdown/style.css +1 -1
  39. package/editable-select/index.es.js +525 -154
  40. package/editable-select/index.umd.js +1 -1
  41. package/editable-select/style.css +1 -1
  42. package/form/index.es.js +1039 -1175
  43. package/form/index.umd.js +15 -15
  44. package/form/style.css +1 -1
  45. package/fullscreen/index.es.js +42 -21
  46. package/fullscreen/index.umd.js +1 -1
  47. package/fullscreen/style.css +1 -1
  48. package/grid/index.es.js +101 -86
  49. package/grid/index.umd.js +1 -1
  50. package/grid/style.css +1 -1
  51. package/icon/index.es.js +197 -56
  52. package/icon/index.umd.js +1 -1
  53. package/icon/style.css +1 -0
  54. package/image-preview/index.es.js +55 -31
  55. package/image-preview/index.umd.js +1 -1
  56. package/image-preview/style.css +1 -1
  57. package/input/index.es.js +8066 -144
  58. package/input/index.umd.js +27 -1
  59. package/input/style.css +1 -1
  60. package/input-number/index.es.js +269 -183
  61. package/input-number/index.umd.js +1 -1
  62. package/input-number/style.css +1 -1
  63. package/layout/index.es.js +40 -25
  64. package/layout/index.umd.js +1 -1
  65. package/layout/style.css +1 -1
  66. package/loading/index.es.js +74 -35
  67. package/loading/index.umd.js +1 -1
  68. package/loading/style.css +1 -1
  69. package/modal/index.es.js +412 -204
  70. package/modal/index.umd.js +1 -1
  71. package/modal/style.css +1 -1
  72. package/notification/index.es.js +307 -57
  73. package/notification/index.umd.js +1 -1
  74. package/notification/style.css +1 -1
  75. package/nuxt/components/ButtonGroup.js +3 -0
  76. package/nuxt/components/CheckboxButton.js +3 -0
  77. package/nuxt/components/CheckboxGroup.js +3 -0
  78. package/nuxt/components/Collapse.js +3 -0
  79. package/nuxt/components/CollapseItem.js +3 -0
  80. package/nuxt/components/DropdownPropsKey.js +3 -0
  81. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  82. package/nuxt/components/FORM_TOKEN.js +3 -0
  83. package/nuxt/components/Icon.js +1 -0
  84. package/nuxt/components/IconGroup.js +3 -0
  85. package/nuxt/components/LABEL_DATA.js +3 -0
  86. package/nuxt/components/LoadingOptions.js +3 -0
  87. package/nuxt/components/Option.js +3 -0
  88. package/nuxt/components/PanelBody.js +3 -0
  89. package/nuxt/components/PanelFooter.js +3 -0
  90. package/nuxt/components/PanelHeader.js +3 -0
  91. package/nuxt/components/RadioButton.js +3 -0
  92. package/nuxt/components/Tab.js +3 -0
  93. package/nuxt/components/Timeline.js +3 -0
  94. package/nuxt/components/TimelineItem.js +3 -0
  95. package/nuxt/components/alertProps.js +3 -0
  96. package/nuxt/components/autoCompleteProps.js +3 -0
  97. package/nuxt/components/avatarProps.js +3 -0
  98. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  99. package/nuxt/components/buttonGroupProps.js +3 -0
  100. package/nuxt/components/cardProps.js +3 -0
  101. package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
  102. package/nuxt/components/checkboxGroupProps.js +3 -0
  103. package/nuxt/components/checkboxProps.js +3 -0
  104. package/nuxt/components/colProps.js +3 -0
  105. package/nuxt/components/colPropsBaseClass.js +3 -0
  106. package/nuxt/components/colPropsBaseStyle.js +3 -0
  107. package/nuxt/components/collapseItemProps.js +3 -0
  108. package/nuxt/components/collapseProps.js +3 -0
  109. package/nuxt/components/countdownProps.js +3 -0
  110. package/nuxt/components/editableSelectProps.js +3 -0
  111. package/nuxt/components/formItemProps.js +3 -0
  112. package/nuxt/components/formProps.js +3 -0
  113. package/nuxt/components/fullscreenProps.js +3 -0
  114. package/nuxt/components/iconProps.js +3 -0
  115. package/nuxt/components/imagePreviewProps.js +3 -0
  116. package/nuxt/components/inputProps.js +3 -0
  117. package/nuxt/components/loadingProps.js +3 -0
  118. package/nuxt/components/modalProps.js +3 -0
  119. package/nuxt/components/paginationProps.js +3 -0
  120. package/nuxt/components/panelProps.js +3 -0
  121. package/nuxt/components/progressProps.js +3 -0
  122. package/nuxt/components/rateProps.js +3 -0
  123. package/nuxt/components/resultProps.js +3 -0
  124. package/nuxt/components/rowProps.js +3 -0
  125. package/nuxt/components/screenSizes.js +3 -0
  126. package/nuxt/components/searchProps.js +3 -0
  127. package/nuxt/components/skeletonProps.js +3 -0
  128. package/nuxt/components/sliderProps.js +3 -0
  129. package/nuxt/components/splitterProps.js +3 -0
  130. package/nuxt/components/statisticProps.js +3 -0
  131. package/nuxt/components/svgIconProps.js +3 -0
  132. package/nuxt/components/switchProps.js +3 -0
  133. package/nuxt/components/tabsProps.js +3 -0
  134. package/nuxt/components/tagProps.js +3 -0
  135. package/nuxt/components/textareaProps.js +3 -0
  136. package/nuxt/components/timeAxisProps.js +3 -0
  137. package/nuxt/components/treeProps.js +3 -0
  138. package/overlay/index.es.js +127 -149
  139. package/overlay/index.umd.js +1 -1
  140. package/overlay/style.css +1 -1
  141. package/package.json +10 -44
  142. package/pagination/index.es.js +158 -148
  143. package/pagination/index.umd.js +1 -1
  144. package/pagination/style.css +1 -1
  145. package/panel/index.es.js +45 -32
  146. package/panel/index.umd.js +1 -1
  147. package/panel/style.css +1 -1
  148. package/popover/index.es.js +317 -246
  149. package/popover/index.umd.js +15 -15
  150. package/popover/style.css +1 -1
  151. package/progress/index.es.js +110 -56
  152. package/progress/index.umd.js +3 -3
  153. package/progress/style.css +1 -1
  154. package/radio/index.es.js +7964 -157
  155. package/radio/index.umd.js +27 -1
  156. package/radio/style.css +1 -1
  157. package/rate/index.es.js +77 -55
  158. package/rate/index.umd.js +1 -1
  159. package/rate/style.css +1 -1
  160. package/result/index.es.js +184 -57
  161. package/result/index.umd.js +1 -1
  162. package/result/style.css +1 -1
  163. package/ripple/index.es.js +47 -42
  164. package/ripple/index.umd.js +1 -1
  165. package/search/index.es.js +3644 -1122
  166. package/search/index.umd.js +18 -18
  167. package/search/style.css +1 -1
  168. package/select/index.es.js +9144 -597
  169. package/select/index.umd.js +27 -1
  170. package/select/style.css +1 -1
  171. package/skeleton/index.es.js +63 -41
  172. package/skeleton/index.umd.js +1 -1
  173. package/skeleton/style.css +1 -1
  174. package/slider/index.es.js +109 -75
  175. package/slider/index.umd.js +1 -1
  176. package/slider/style.css +1 -1
  177. package/splitter/index.es.js +469 -349
  178. package/splitter/index.umd.js +15 -15
  179. package/splitter/style.css +1 -1
  180. package/statistic/index.es.js +7 -18
  181. package/statistic/index.umd.js +1 -1
  182. package/status/index.es.js +27 -6
  183. package/status/index.umd.js +1 -1
  184. package/status/style.css +1 -1
  185. package/style.css +1 -1
  186. package/switch/index.es.js +7794 -64
  187. package/switch/index.umd.js +27 -1
  188. package/switch/style.css +1 -1
  189. package/table/index.es.js +10119 -1206
  190. package/table/index.umd.js +27 -1
  191. package/table/style.css +1 -1
  192. package/tabs/index.es.js +342 -141
  193. package/tabs/index.umd.js +1 -1
  194. package/tabs/style.css +1 -1
  195. package/tag/index.es.js +49 -24
  196. package/tag/index.umd.js +1 -1
  197. package/tag/style.css +1 -1
  198. package/textarea/index.es.js +7913 -83
  199. package/textarea/index.umd.js +35 -1
  200. package/textarea/style.css +1 -1
  201. package/{anchor → timeline}/index.d.ts +0 -0
  202. package/timeline/index.es.js +425 -0
  203. package/timeline/index.umd.js +1 -0
  204. package/{back-top → timeline}/package.json +1 -1
  205. package/timeline/style.css +1 -0
  206. package/tooltip/index.es.js +308 -236
  207. package/tooltip/index.umd.js +15 -15
  208. package/tooltip/style.css +1 -1
  209. package/tree/index.es.js +4189 -1851
  210. package/tree/index.umd.js +18 -18
  211. package/tree/style.css +1 -1
  212. package/upload/index.es.js +380 -123
  213. package/upload/index.umd.js +1 -1
  214. package/upload/style.css +1 -1
  215. package/vue-devui.es.js +18121 -23161
  216. package/vue-devui.umd.js +25 -15
  217. package/accordion/index.es.js +0 -720
  218. package/accordion/index.umd.js +0 -1
  219. package/accordion/package.json +0 -7
  220. package/accordion/style.css +0 -1
  221. package/anchor/index.es.js +0 -263
  222. package/anchor/index.umd.js +0 -1
  223. package/anchor/style.css +0 -1
  224. package/back-top/index.d.ts +0 -7
  225. package/back-top/index.es.js +0 -128
  226. package/back-top/index.umd.js +0 -1
  227. package/back-top/style.css +0 -1
  228. package/breadcrumb/index.d.ts +0 -7
  229. package/breadcrumb/index.es.js +0 -127
  230. package/breadcrumb/index.umd.js +0 -1
  231. package/breadcrumb/package.json +0 -7
  232. package/breadcrumb/style.css +0 -1
  233. package/carousel/index.d.ts +0 -7
  234. package/carousel/index.es.js +0 -329
  235. package/carousel/index.umd.js +0 -1
  236. package/carousel/package.json +0 -7
  237. package/carousel/style.css +0 -1
  238. package/cascader/index.d.ts +0 -7
  239. package/cascader/index.es.js +0 -5963
  240. package/cascader/index.umd.js +0 -27
  241. package/cascader/package.json +0 -7
  242. package/cascader/style.css +0 -1
  243. package/color-picker/index.d.ts +0 -7
  244. package/color-picker/index.es.js +0 -8187
  245. package/color-picker/index.umd.js +0 -27
  246. package/color-picker/package.json +0 -7
  247. package/color-picker/style.css +0 -1
  248. package/comment/index.d.ts +0 -7
  249. package/comment/index.es.js +0 -86
  250. package/comment/index.umd.js +0 -1
  251. package/comment/package.json +0 -7
  252. package/comment/style.css +0 -1
  253. package/dragdrop/index.d.ts +0 -7
  254. package/dragdrop/index.es.js +0 -157
  255. package/dragdrop/index.umd.js +0 -1
  256. package/dragdrop/package.json +0 -7
  257. package/gantt/index.d.ts +0 -7
  258. package/gantt/index.es.js +0 -523
  259. package/gantt/index.umd.js +0 -1
  260. package/gantt/package.json +0 -7
  261. package/gantt/style.css +0 -1
  262. package/input-icon/index.d.ts +0 -7
  263. package/input-icon/index.es.js +0 -331
  264. package/input-icon/index.umd.js +0 -1
  265. package/input-icon/package.json +0 -7
  266. package/input-icon/style.css +0 -1
  267. package/list/index.d.ts +0 -7
  268. package/list/index.es.js +0 -39
  269. package/list/index.umd.js +0 -1
  270. package/list/package.json +0 -7
  271. package/list/style.css +0 -1
  272. package/nav-sprite/index.d.ts +0 -7
  273. package/nav-sprite/index.es.js +0 -68
  274. package/nav-sprite/index.umd.js +0 -1
  275. package/nav-sprite/package.json +0 -7
  276. package/nuxt/components/Accordion.js +0 -3
  277. package/nuxt/components/Anchor.js +0 -3
  278. package/nuxt/components/BackTop.js +0 -3
  279. package/nuxt/components/Breadcrumb.js +0 -3
  280. package/nuxt/components/Carousel.js +0 -3
  281. package/nuxt/components/CarouselItem.js +0 -3
  282. package/nuxt/components/Cascader.js +0 -3
  283. package/nuxt/components/ColorPicker.js +0 -3
  284. package/nuxt/components/Comment.js +0 -3
  285. package/nuxt/components/FormControl.js +0 -3
  286. package/nuxt/components/FormLabel.js +0 -3
  287. package/nuxt/components/Gantt.js +0 -3
  288. package/nuxt/components/InputIcon.js +0 -3
  289. package/nuxt/components/List.js +0 -3
  290. package/nuxt/components/ListItem.js +0 -3
  291. package/nuxt/components/NavSprite.js +0 -2
  292. package/nuxt/components/QuadrantDiagram.js +0 -3
  293. package/nuxt/components/ReadTip.js +0 -3
  294. package/nuxt/components/StepsGuide.js +0 -3
  295. package/nuxt/components/Sticky.js +0 -2
  296. package/nuxt/components/TagInput.js +0 -3
  297. package/nuxt/components/TimeAxis.js +0 -3
  298. package/nuxt/components/TimeAxisItem.js +0 -3
  299. package/nuxt/components/TimePicker.js +0 -3
  300. package/nuxt/components/Transfer.js +0 -3
  301. package/nuxt/components/TreeSelect.js +0 -3
  302. package/nuxt/components/overlayEmits.js +0 -3
  303. package/nuxt/components/overlayProps.js +0 -3
  304. package/quadrant-diagram/index.d.ts +0 -7
  305. package/quadrant-diagram/index.es.js +0 -5728
  306. package/quadrant-diagram/index.umd.js +0 -27
  307. package/quadrant-diagram/package.json +0 -7
  308. package/quadrant-diagram/style.css +0 -1
  309. package/read-tip/index.d.ts +0 -7
  310. package/read-tip/index.es.js +0 -258
  311. package/read-tip/index.umd.js +0 -1
  312. package/read-tip/package.json +0 -7
  313. package/read-tip/style.css +0 -1
  314. package/steps-guide/index.d.ts +0 -7
  315. package/steps-guide/index.es.js +0 -239
  316. package/steps-guide/index.umd.js +0 -1
  317. package/steps-guide/package.json +0 -7
  318. package/steps-guide/style.css +0 -1
  319. package/sticky/index.d.ts +0 -7
  320. package/sticky/index.es.js +0 -197
  321. package/sticky/index.umd.js +0 -1
  322. package/sticky/package.json +0 -7
  323. package/tag-input/index.d.ts +0 -7
  324. package/tag-input/index.es.js +0 -329
  325. package/tag-input/index.umd.js +0 -1
  326. package/tag-input/package.json +0 -7
  327. package/tag-input/style.css +0 -1
  328. package/time-axis/index.d.ts +0 -7
  329. package/time-axis/index.es.js +0 -299
  330. package/time-axis/index.umd.js +0 -1
  331. package/time-axis/package.json +0 -7
  332. package/time-axis/style.css +0 -1
  333. package/time-picker/index.d.ts +0 -7
  334. package/time-picker/index.es.js +0 -1237
  335. package/time-picker/index.umd.js +0 -1
  336. package/time-picker/package.json +0 -7
  337. package/time-picker/style.css +0 -1
  338. package/transfer/index.d.ts +0 -7
  339. package/transfer/index.es.js +0 -7608
  340. package/transfer/index.umd.js +0 -27
  341. package/transfer/package.json +0 -7
  342. package/transfer/style.css +0 -1
  343. package/tree-select/index.d.ts +0 -7
  344. package/tree-select/index.es.js +0 -623
  345. package/tree-select/index.umd.js +0 -1
  346. package/tree-select/package.json +0 -7
  347. package/tree-select/style.css +0 -1
@@ -1,24 +1,22 @@
1
- var __defProp = Object.defineProperty;
2
1
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
2
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
3
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
4
+ var __objRest = (source, exclude) => {
5
+ var target = {};
6
+ for (var prop in source)
7
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
8
+ target[prop] = source[prop];
9
+ if (source != null && __getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(source)) {
11
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
12
+ target[prop] = source[prop];
14
13
  }
15
- return a;
14
+ return target;
16
15
  };
17
- import { defineComponent, createVNode, ref, computed } from "vue";
16
+ import { createVNode, computed, ref, toRefs, reactive, watch, defineComponent, mergeProps } from "vue";
18
17
  const inputNumberProps = {
19
18
  placeholder: {
20
- type: String,
21
- default: void 0
19
+ type: String
22
20
  },
23
21
  disabled: {
24
22
  type: Boolean,
@@ -26,7 +24,7 @@ const inputNumberProps = {
26
24
  },
27
25
  step: {
28
26
  type: Number,
29
- default: 0
27
+ default: 1
30
28
  },
31
29
  max: {
32
30
  type: Number,
@@ -41,189 +39,277 @@ const inputNumberProps = {
41
39
  default: ""
42
40
  },
43
41
  modelValue: {
44
- type: Number,
45
- default: 0
46
- },
47
- "onUpdate:modelValue": {
48
- type: Function,
49
- default: void 0
50
- },
51
- "onChange": {
52
- type: Function,
53
- default: void 0
54
- },
55
- "onKeydown": {
56
- type: Function,
57
- default: void 0
42
+ type: Number
58
43
  },
59
- "onFocus": {
60
- type: Function,
61
- default: void 0
62
- },
63
- "onBlur": {
64
- type: Function,
65
- default: void 0
44
+ precision: {
45
+ type: Number
66
46
  }
67
47
  };
68
- var inputNumber = "";
69
- var Icon = defineComponent({
70
- name: "DIcon",
71
- props: {
72
- name: {
73
- type: String,
74
- required: true
75
- },
76
- size: {
77
- type: String,
78
- default: "inherit"
79
- },
80
- color: {
81
- type: String,
82
- default: "inherit"
48
+ function createBem(namespace, element, modifier) {
49
+ let cls = namespace;
50
+ if (element) {
51
+ cls += `__${element}`;
52
+ }
53
+ if (modifier) {
54
+ cls += `--${modifier}`;
55
+ }
56
+ return cls;
57
+ }
58
+ function useNamespace(block, needDot = false) {
59
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
60
+ const b = () => createBem(namespace);
61
+ const e = (element) => element ? createBem(namespace, element) : "";
62
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
63
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
64
+ return {
65
+ b,
66
+ e,
67
+ m,
68
+ em
69
+ };
70
+ }
71
+ const ns$1 = useNamespace("input-number");
72
+ function IncIcon() {
73
+ return createVNode("svg", {
74
+ "class": ns$1.e("icon-arrow"),
75
+ "width": "1em",
76
+ "height": "1em",
77
+ "viewBox": "0 0 16 16",
78
+ "version": "1.1",
79
+ "xmlns": "http://www.w3.org/2000/svg"
80
+ }, [createVNode("g", {
81
+ "stroke": "none",
82
+ "stroke-width": "1",
83
+ "fill": "none",
84
+ "fill-rule": "evenodd"
85
+ }, [createVNode("path", {
86
+ "d": "M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z",
87
+ "fill-rule": "nonzero"
88
+ }, null)])]);
89
+ }
90
+ function DecIcon() {
91
+ return createVNode("svg", {
92
+ "class": ns$1.e("icon-arrow"),
93
+ "width": "1em",
94
+ "height": "1em",
95
+ "viewBox": "0 0 16 16",
96
+ "version": "1.1",
97
+ "xmlns": "http://www.w3.org/2000/svg"
98
+ }, [createVNode("g", {
99
+ "stroke": "none",
100
+ "stroke-width": "1",
101
+ "fill": "none",
102
+ "fill-rule": "evenodd"
103
+ }, [createVNode("path", {
104
+ "d": "M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z",
105
+ "fill-rule": "nonzero"
106
+ }, null)])]);
107
+ }
108
+ const isNumber = (value) => typeof value === "number";
109
+ const isUndefined = (value) => value === void 0;
110
+ const isNull = (value) => value === null;
111
+ const ns = useNamespace("input-number");
112
+ function useRender(props, ctx) {
113
+ const _a = ctx.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
114
+ const customStyle = { style };
115
+ const wrapClass = computed(() => [
116
+ {
117
+ [ns.b()]: true
83
118
  },
84
- classPrefix: {
85
- type: String,
86
- default: "icon"
87
- }
88
- },
89
- setup(props) {
90
- return __spreadValues({}, props);
91
- },
92
- render() {
93
- const {
94
- name,
95
- size,
96
- color,
97
- classPrefix
98
- } = this;
99
- return /^((https?):)?\/\//.test(name) ? createVNode("img", {
100
- "src": name,
101
- "alt": name.split("/")[name.split("/").length - 1],
102
- "style": {
103
- width: size,
104
- verticalAlign: "text-bottom"
105
- }
106
- }, null) : createVNode("i", {
107
- "class": `${classPrefix} ${classPrefix}-${name}`,
108
- "style": {
109
- fontSize: size,
110
- color
111
- }
112
- }, null);
119
+ customClass
120
+ ]);
121
+ const controlButtonsClass = computed(() => ({
122
+ [ns.e("control-buttons")]: true,
123
+ disabled: props.disabled,
124
+ [ns.m(props.size)]: true
125
+ }));
126
+ const inputWrapClass = computed(() => ({
127
+ [ns.e("input-wrap")]: true,
128
+ [ns.m(props.size)]: true
129
+ }));
130
+ const inputInnerClass = computed(() => ({
131
+ [ns.e("input-box")]: true,
132
+ disabled: props.disabled
133
+ }));
134
+ return { wrapClass, customStyle, otherAttrs, controlButtonsClass, inputWrapClass, inputInnerClass };
135
+ }
136
+ function useExpose(ctx) {
137
+ const inputRef = ref();
138
+ const focus = () => {
139
+ inputRef.value.focus();
140
+ };
141
+ const blur = () => {
142
+ inputRef.value.blur();
143
+ };
144
+ const select = () => {
145
+ inputRef.value.select();
146
+ };
147
+ ctx.expose({ focus, blur, select });
148
+ return { inputRef };
149
+ }
150
+ function getPrecision(pre) {
151
+ let precision = 0;
152
+ if (isUndefined(pre)) {
153
+ return precision;
113
154
  }
114
- });
155
+ const preString = pre.toString();
156
+ const dotIndex = preString.indexOf(".");
157
+ if (dotIndex !== -1) {
158
+ precision = preString.length - dotIndex - 1;
159
+ }
160
+ return precision;
161
+ }
162
+ function useEvent(props, ctx, inputRef) {
163
+ const { min, max, step, disabled } = toRefs(props);
164
+ const state = reactive({
165
+ currentValue: props.modelValue || "",
166
+ userInputValue: void 0
167
+ });
168
+ const numPrecision = computed(() => {
169
+ if (!isUndefined(props.precision)) {
170
+ return props.precision;
171
+ } else {
172
+ return Math.max(getPrecision(props.modelValue), getPrecision(step.value));
173
+ }
174
+ });
175
+ const inputVal = computed(() => {
176
+ if (!isUndefined(state.userInputValue)) {
177
+ return state.userInputValue;
178
+ }
179
+ let currentValue = state.currentValue;
180
+ if (currentValue === "" || isUndefined(currentValue) || Number.isNaN(currentValue)) {
181
+ return "";
182
+ }
183
+ if (isNumber(currentValue)) {
184
+ currentValue = currentValue.toFixed(numPrecision.value);
185
+ }
186
+ return currentValue;
187
+ });
188
+ const toPrecision = (num) => {
189
+ return Number.parseFloat(num.toFixed(numPrecision.value));
190
+ };
191
+ const computeByStep = (val, addOrNot = 1) => {
192
+ if (!isNumber(val)) {
193
+ return state.currentValue;
194
+ }
195
+ return toPrecision(val + step.value * addOrNot);
196
+ };
197
+ const correctValue = (value, shouldUpdate) => {
198
+ if (value === "" || isUndefined(value) || isNull(value) || Number.isNaN(value)) {
199
+ return void 0;
200
+ }
201
+ let newVal = Number(value);
202
+ newVal = toPrecision(newVal);
203
+ if (newVal > max.value || newVal < min.value) {
204
+ newVal = newVal > max.value ? max.value : min.value;
205
+ shouldUpdate && ctx.emit("update:modelValue", newVal);
206
+ }
207
+ return newVal;
208
+ };
209
+ const setCurrentValue = (value) => {
210
+ const oldVal = state.currentValue;
211
+ const newVal = correctValue(value);
212
+ if (oldVal === newVal) {
213
+ return;
214
+ }
215
+ state.userInputValue = void 0;
216
+ ctx.emit("update:modelValue", newVal);
217
+ ctx.emit("input", newVal);
218
+ ctx.emit("change", newVal, oldVal);
219
+ state.currentValue = newVal;
220
+ };
221
+ const minDisabled = computed(() => isNumber(state.currentValue) && computeByStep(state.currentValue, -1) < props.min);
222
+ const maxDisabled = computed(() => isNumber(state.currentValue) && computeByStep(state.currentValue) > props.max);
223
+ const onAdd = () => {
224
+ if (disabled.value || maxDisabled.value) {
225
+ return;
226
+ }
227
+ inputRef.value.focus();
228
+ const newVal = computeByStep(state.currentValue || 0);
229
+ setCurrentValue(newVal);
230
+ };
231
+ const onSubtract = () => {
232
+ if (disabled.value || minDisabled.value) {
233
+ return;
234
+ }
235
+ inputRef.value.focus();
236
+ const newVal = computeByStep(state.currentValue || 0, -1);
237
+ setCurrentValue(newVal);
238
+ };
239
+ watch(() => props.modelValue, (val) => {
240
+ state.currentValue = correctValue(val, true);
241
+ state.userInputValue = void 0;
242
+ }, { immediate: true });
243
+ const onInput = (event) => {
244
+ const value = event.target.value;
245
+ state.userInputValue = value;
246
+ };
247
+ const onChange = (event) => {
248
+ const value = event.target.value;
249
+ const newVal = value !== "" ? Number(value) : "";
250
+ if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") {
251
+ setCurrentValue(newVal);
252
+ }
253
+ state.userInputValue = void 0;
254
+ };
255
+ return { inputVal, minDisabled, maxDisabled, onAdd, onSubtract, onInput, onChange };
256
+ }
257
+ var inputNumber = "";
115
258
  var InputNumber = defineComponent({
116
259
  name: "DInputNumber",
117
260
  props: inputNumberProps,
118
- emits: ["update:modelValue", "change", "input", "focus", "blur", "keydown"],
261
+ emits: ["update:modelValue", "change", "input"],
119
262
  setup(props, ctx) {
120
- const inputVal = ref(props.modelValue);
121
- const focusVal = ref("");
122
- const isSize = computed(() => {
123
- return `devui-input-number-${props.size}`;
124
- });
125
- const isDisabled = computed(() => {
126
- return props.disabled;
127
- });
128
- const add = () => {
129
- if (props.disabled)
130
- return;
131
- if (inputVal.value >= props.max)
132
- return;
133
- inputVal.value += props.step != 0 ? props.step : 1;
134
- focusVal.value = "active";
135
- ctx.emit("change", inputVal.value);
136
- ctx.emit("update:modelValue", inputVal.value);
137
- };
138
- const subtract = () => {
139
- if (props.disabled)
140
- return;
141
- if (inputVal.value <= props.min)
142
- return;
143
- inputVal.value -= props.step != 0 ? props.step : 1;
144
- focusVal.value = "active";
145
- ctx.emit("change", inputVal.value);
146
- ctx.emit("update:modelValue", inputVal.value);
147
- };
148
- const onInput = (val) => {
149
- inputVal.value = parseInt(val.data);
150
- ctx.emit("input", val.data);
151
- ctx.emit("update:modelValue", val.data);
152
- };
153
- const onFocus = ($event) => {
154
- focusVal.value = "active";
155
- ctx.emit("focus", $event);
156
- };
157
- const onBlur = ($event) => {
158
- focusVal.value = "";
159
- ctx.emit("blur", $event);
160
- };
161
- const onChange = ($event) => {
162
- ctx.emit("change", $event.target.value);
163
- };
164
- const onKeydown = ($event) => {
165
- ctx.emit("keydown", $event);
166
- };
167
- return {
168
- inputVal,
169
- focusVal,
170
- isDisabled,
171
- isSize,
172
- add,
173
- subtract,
174
- onInput,
175
- onChange,
176
- onKeydown,
177
- onBlur,
178
- onFocus
179
- };
180
- },
181
- render() {
182
263
  const {
183
- focusVal,
184
- placeholder,
185
- add,
264
+ disabled
265
+ } = toRefs(props);
266
+ const {
267
+ wrapClass,
268
+ customStyle,
269
+ otherAttrs,
270
+ controlButtonsClass,
271
+ inputWrapClass,
272
+ inputInnerClass
273
+ } = useRender(props, ctx);
274
+ const {
275
+ inputRef
276
+ } = useExpose(ctx);
277
+ const {
186
278
  inputVal,
187
- isDisabled,
188
- isSize,
189
- subtract,
279
+ minDisabled,
280
+ maxDisabled,
281
+ onAdd,
282
+ onSubtract,
190
283
  onInput,
191
- onChange,
192
- onKeydown,
193
- onBlur,
194
- onFocus
195
- } = this;
196
- const dInputNum = ["devui-input-number", isDisabled ? "devui-input-disabled" : "", isSize];
197
- return createVNode("div", {
198
- "class": dInputNum
199
- }, [createVNode("div", {
200
- "onBlur": onBlur,
201
- "tabindex": "1",
202
- "class": ["devui-control-buttons", focusVal.value]
284
+ onChange
285
+ } = useEvent(props, ctx, inputRef);
286
+ return () => createVNode("div", mergeProps({
287
+ "class": wrapClass.value
288
+ }, customStyle), [createVNode("div", {
289
+ "class": controlButtonsClass.value
203
290
  }, [createVNode("span", {
204
- "onClick": add
205
- }, [createVNode(Icon, {
206
- "size": "12px",
207
- "name": "chevron-up"
208
- }, null)]), createVNode("span", {
209
- "onClick": subtract
210
- }, [createVNode(Icon, {
211
- "size": "12px",
212
- "name": "chevron-down"
213
- }, null)])]), createVNode("div", {
214
- "class": "devui-input-item"
215
- }, [createVNode("input", {
291
+ "class": ["control-button control-inc", {
292
+ disabled: maxDisabled.value
293
+ }],
294
+ "onClick": onAdd
295
+ }, [createVNode(IncIcon, null, null)]), createVNode("span", {
296
+ "class": ["control-button control-dec", {
297
+ disabled: minDisabled.value
298
+ }],
299
+ "onClick": onSubtract
300
+ }, [createVNode(DecIcon, null, null)])]), createVNode("div", {
301
+ "class": inputWrapClass.value
302
+ }, [createVNode("input", mergeProps({
216
303
  "type": "number",
217
- "value": inputVal,
218
- "placeholder": placeholder,
219
- "disabled": isDisabled,
220
- "class": ["devui-input-style devui-input-box", focusVal.value],
304
+ "ref": inputRef,
305
+ "value": inputVal.value,
306
+ "placeholder": props.placeholder,
307
+ "disabled": disabled.value,
308
+ "class": inputInnerClass.value
309
+ }, otherAttrs, {
221
310
  "onInput": onInput,
222
- "onChange": onChange,
223
- "onFocus": onFocus,
224
- "onBlur": onBlur,
225
- "onKeydown": onKeydown
226
- }, null)])]);
311
+ "onChange": onChange
312
+ }), null)])]);
227
313
  }
228
314
  });
229
315
  InputNumber.install = function(app) {
@@ -1 +1 @@
1
- var F=Object.defineProperty;var V=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(n,e,a)=>e in n?F(n,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[e]=a,N=(n,e)=>{for(var a in e||(e={}))S.call(e,a)&&g(n,a,e[a]);if(V)for(var a of V(e))w.call(e,a)&&g(n,a,e[a]);return n};(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.index={},n.Vue))})(this,function(n,e){"use strict";const a={placeholder:{type:String,default:void 0},disabled:{type:Boolean,default:!1},step:{type:Number,default:0},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},size:{type:String,default:""},modelValue:{type:Number,default:0},"onUpdate:modelValue":{type:Function,default:void 0},onChange:{type:Function,default:void 0},onKeydown:{type:Function,default:void 0},onFocus:{type:Function,default:void 0},onBlur:{type:Function,default:void 0}};var z="",p=e.defineComponent({name:"DIcon",props:{name:{type:String,required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}},setup(t){return N({},t)},render(){const{name:t,size:u,color:i,classPrefix:l}=this;return/^((https?):)?\/\//.test(t)?e.createVNode("img",{src:t,alt:t.split("/")[t.split("/").length-1],style:{width:u,verticalAlign:"text-bottom"}},null):e.createVNode("i",{class:`${l} ${l}-${t}`,style:{fontSize:u,color:i}},null)}}),d=e.defineComponent({name:"DInputNumber",props:a,emits:["update:modelValue","change","input","focus","blur","keydown"],setup(t,u){const i=e.ref(t.modelValue),l=e.ref(""),r=e.computed(()=>`devui-input-number-${t.size}`),s=e.computed(()=>t.disabled);return{inputVal:i,focusVal:l,isDisabled:s,isSize:r,add:()=>{t.disabled||i.value>=t.max||(i.value+=t.step!=0?t.step:1,l.value="active",u.emit("change",i.value),u.emit("update:modelValue",i.value))},subtract:()=>{t.disabled||i.value<=t.min||(i.value-=t.step!=0?t.step:1,l.value="active",u.emit("change",i.value),u.emit("update:modelValue",i.value))},onInput:o=>{i.value=parseInt(o.data),u.emit("input",o.data),u.emit("update:modelValue",o.data)},onChange:o=>{u.emit("change",o.target.value)},onKeydown:o=>{u.emit("keydown",o)},onBlur:o=>{l.value="",u.emit("blur",o)},onFocus:o=>{l.value="active",u.emit("focus",o)}}},render(){const{focusVal:t,placeholder:u,add:i,inputVal:l,isDisabled:r,isSize:s,subtract:m,onInput:f,onChange:y,onKeydown:b,onBlur:c,onFocus:v}=this,h=["devui-input-number",r?"devui-input-disabled":"",s];return e.createVNode("div",{class:h},[e.createVNode("div",{onBlur:c,tabindex:"1",class:["devui-control-buttons",t.value]},[e.createVNode("span",{onClick:i},[e.createVNode(p,{size:"12px",name:"chevron-up"},null)]),e.createVNode("span",{onClick:m},[e.createVNode(p,{size:"12px",name:"chevron-down"},null)])]),e.createVNode("div",{class:"devui-input-item"},[e.createVNode("input",{type:"number",value:l,placeholder:u,disabled:r,class:["devui-input-style devui-input-box",t.value],onInput:f,onChange:y,onFocus:v,onBlur:c,onKeydown:b},null)])])}});d.install=function(t){t.component(d.name,d)};var I={title:"InputNumber \u6570\u5B57\u8F93\u5165\u6846",category:"\u6570\u636E\u5F55\u5165",status:"50%",install(t){t.use(d)}};n.InputNumber=d,n.default=I,Object.defineProperty(n,"__esModule",{value:!0}),n[Symbol.toStringTag]="Module"});
1
+ var k=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var z=(s,t)=>{var g={};for(var c in s)j.call(s,c)&&t.indexOf(c)<0&&(g[c]=s[c]);if(s!=null&&k)for(var c of k(s))t.indexOf(c)<0&&O.call(s,c)&&(g[c]=s[c]);return g};(function(s,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(s=typeof globalThis!="undefined"?globalThis:s||self,t(s.index={},s.Vue))})(this,function(s,t){"use strict";const g={placeholder:{type:String},disabled:{type:Boolean,default:!1},step:{type:Number,default:1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},size:{type:String,default:""},modelValue:{type:Number},precision:{type:Number}};function c(e,o,r){let a=e;return o&&(a+=`__${o}`),r&&(a+=`--${r}`),a}function P(e,o=!1){const r=o?`.devui-${e}`:`devui-${e}`;return{b:()=>c(r),e:n=>n?c(r,n):"",m:n=>n?c(r,"",n):"",em:(n,m)=>n&&m?c(r,n,m):""}}const D=P("input-number");function F(){return t.createVNode("svg",{class:D.e("icon-arrow"),width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])}function M(){return t.createVNode("svg",{class:D.e("icon-arrow"),width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{d:"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z","fill-rule":"nonzero"},null)])])}const C=e=>typeof e=="number",v=e=>e===void 0,$=e=>e===null,b=P("input-number");function A(e,o){const V=o.attrs,{style:r,class:a}=V,d=z(V,["style","class"]),p={style:r},f=t.computed(()=>[{[b.b()]:!0},a]),n=t.computed(()=>({[b.e("control-buttons")]:!0,disabled:e.disabled,[b.m(e.size)]:!0})),m=t.computed(()=>({[b.e("input-wrap")]:!0,[b.m(e.size)]:!0})),N=t.computed(()=>({[b.e("input-box")]:!0,disabled:e.disabled}));return{wrapClass:f,customStyle:p,otherAttrs:d,controlButtonsClass:n,inputWrapClass:m,inputInnerClass:N}}function R(e){const o=t.ref(),r=()=>{o.value.focus()},a=()=>{o.value.blur()},d=()=>{o.value.select()};return e.expose({focus:r,blur:a,select:d}),{inputRef:o}}function L(e){let o=0;if(v(e))return o;const r=e.toString(),a=r.indexOf(".");return a!==-1&&(o=r.length-a-1),o}function _(e,o,r){const{min:a,max:d,step:p,disabled:f}=t.toRefs(e),n=t.reactive({currentValue:e.modelValue||"",userInputValue:void 0}),m=t.computed(()=>v(e.precision)?Math.max(L(e.modelValue),L(p.value)):e.precision),N=t.computed(()=>{if(!v(n.userInputValue))return n.userInputValue;let u=n.currentValue;return u===""||v(u)||Number.isNaN(u)?"":(C(u)&&(u=u.toFixed(m.value)),u)}),V=u=>Number.parseFloat(u.toFixed(m.value)),h=(u,i=1)=>C(u)?V(u+p.value*i):n.currentValue,y=(u,i)=>{if(u===""||v(u)||$(u)||Number.isNaN(u))return;let l=Number(u);return l=V(l),(l>d.value||l<a.value)&&(l=l>d.value?d.value:a.value,i&&o.emit("update:modelValue",l)),l},I=u=>{const i=n.currentValue,l=y(u);i!==l&&(n.userInputValue=void 0,o.emit("update:modelValue",l),o.emit("input",l),o.emit("change",l,i),n.currentValue=l)},x=t.computed(()=>C(n.currentValue)&&h(n.currentValue,-1)<e.min),S=t.computed(()=>C(n.currentValue)&&h(n.currentValue)>e.max),B=()=>{if(f.value||S.value)return;r.value.focus();const u=h(n.currentValue||0);I(u)},T=()=>{if(f.value||x.value)return;r.value.focus();const u=h(n.currentValue||0,-1);I(u)};return t.watch(()=>e.modelValue,u=>{n.currentValue=y(u,!0),n.userInputValue=void 0},{immediate:!0}),{inputVal:N,minDisabled:x,maxDisabled:S,onAdd:B,onSubtract:T,onInput:u=>{const i=u.target.value;n.userInputValue=i},onChange:u=>{const i=u.target.value,l=i!==""?Number(i):"";(C(l)&&!Number.isNaN(l)||i==="")&&I(l),n.userInputValue=void 0}}}var W="",w=t.defineComponent({name:"DInputNumber",props:g,emits:["update:modelValue","change","input"],setup(e,o){const{disabled:r}=t.toRefs(e),{wrapClass:a,customStyle:d,otherAttrs:p,controlButtonsClass:f,inputWrapClass:n,inputInnerClass:m}=A(e,o),{inputRef:N}=R(o),{inputVal:V,minDisabled:h,maxDisabled:y,onAdd:I,onSubtract:x,onInput:S,onChange:B}=_(e,o,N);return()=>t.createVNode("div",t.mergeProps({class:a.value},d),[t.createVNode("div",{class:f.value},[t.createVNode("span",{class:["control-button control-inc",{disabled:y.value}],onClick:I},[t.createVNode(F,null,null)]),t.createVNode("span",{class:["control-button control-dec",{disabled:h.value}],onClick:x},[t.createVNode(M,null,null)])]),t.createVNode("div",{class:n.value},[t.createVNode("input",t.mergeProps({type:"number",ref:N,value:V.value,placeholder:e.placeholder,disabled:r.value,class:m.value},p,{onInput:S,onChange:B}),null)])])}});w.install=function(e){e.component(w.name,w)};var E={title:"InputNumber \u6570\u5B57\u8F93\u5165\u6846",category:"\u6570\u636E\u5F55\u5165",status:"50%",install(e){e.use(w)}};s.InputNumber=w,s.default=E,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
@@ -1 +1 @@
1
- .devui-input-number{position:relative;display:inline-block;width:80px;line-height:38px;margin-right:12px}.devui-input-number:hover:not(.devui-input-disabled) .devui-input-box{border-color:var(--devui-form-control-line-hover)}.devui-input-number:hover:not(.devui-input-disabled) .devui-control-buttons:not(.disabled){display:flex;border-color:var(--devui-form-control-line-hover)}.devui-input-number:focus-within .devui-control-buttons{display:flex}.devui-input-number .active{border:1px solid var(--devui-form-control-line-active)!important;display:flex!important}.devui-input-number.devui-input-disabled .devui-subtract,.devui-input-number.devui-input-disabled .devui-add,.devui-input-number.devui-input-disabled .devui-input-style{cursor:not-allowed;border-color:#e4e7ed;color:#e4e7ed}.devui-input-number.devui-input-disabled .devui-input-style{border-color:var(--devui-disabled-line)!important;color:var(--devui-disabled-text)!important;background-color:var(--devui-disabled-bg)!important}.devui-input-number.devui-input-number-sm .devui-subtract,.devui-input-number.devui-input-number-sm .devui-add{width:40px;height:34px;line-height:34px}.devui-input-number.devui-input-number-sm .devui-input-style{height:34px;line-height:34px}.devui-input-number.devui-input-number-lg .devui-subtract,.devui-input-number.devui-input-number-lg .devui-add{width:60px}.devui-input-number .devui-input-item{line-height:100%}.devui-input-number .devui-input-style::-webkit-outer-spin-button,.devui-input-number .devui-input-style::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.devui-input-number .devui-add,.devui-input-number .devui-subtract{display:inline-block;width:50px;height:38px;line-height:38px;text-align:center;font-size:16px;color:#333;background:#f5f7fa;cursor:pointer;border:1px solid #dcdfe6}.devui-input-number .devui-add{float:right;margin-left:-1px;border-radius:0 4px 4px 0}.devui-input-number .devui-subtract{float:left;margin-right:-1px;border-radius:4px 0 0 4px}.devui-input-number .devui-input-style{display:block;-moz-appearance:textfield}.devui-input-number .devui-input-style{outline:none;background-color:var(--devui-base-bg);border:1px solid var(--devui-form-control-line);border-radius:var(--devui-border-radius);padding:4px 8px;line-height:18px;font-size:var(--devui-font-size);color:var(--devui-text);width:100%;display:block;cursor:text;height:28px;transition:border-color .3s var(--devui-animation-ease-in-out-smooth)}.devui-input-number .devui-input-box{box-sizing:border-box;padding:4px 8px;font-size:var(--devui-font-size);vertical-align:middle;border-radius:var(--devui-border-radius);outline:none;width:100%;line-height:20px;height:28px;border-width:1px;border-style:solid}.devui-input-number .devui-input-box:not(.disabled){background-color:var(--devui-base-bg);border-color:var(--devui-line);color:var(--devui-text)}.devui-input-number .disabled{cursor:not-allowed}.devui-input-number .devui-control-buttons{display:none;position:absolute;right:0;width:22px;height:100%;flex-direction:column;justify-content:center;align-items:center;border-left:1px solid var(--devui-line);box-sizing:border-box;line-height:100%;border-radius:0 var(--devui-border-radius) var(--devui-border-radius) 0}.devui-input-number .devui-control-buttons:not(.disabled){cursor:pointer}.devui-input-number .devui-control-buttons>span{display:flex}
1
+ .devui-input-number{position:relative;display:inline-block;width:80px}.devui-input-number:hover .devui-input-number__input-box:not(.disabled){border:1px solid var(--devui-form-control-line-hover, #9b9fa8);padding-right:24px}.devui-input-number:hover .devui-input-number__control-buttons:not(.disabled){display:flex;border-color:var(--devui-form-control-line-hover, #9b9fa8)}.devui-input-number:focus-within .devui-input-number__input-box:not(.disabled){border:1px solid var(--devui-form-control-line-active, #5e7ce0);padding-right:24px}.devui-input-number:focus-within .devui-input-number__control-buttons:not(.disabled){display:flex;border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-input-number.devui-input-number--md{width:80px}.devui-input-number.devui-input-number--md .devui-input-number__input-box{height:32px;line-height:32px}.devui-input-number .devui-input-number__input-box{box-sizing:border-box;padding:4px 8px;font-size:var(--devui-font-size, 14px);border-radius:var(--devui-border-radius, 4px);border:1px solid var(--devui-form-control-line, #d7d8da);outline:none;width:100%;line-height:20px;height:28px;display:block;cursor:text;-moz-appearance:textfield;transition:border-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-input-number .devui-input-number__input-box:not(.disabled){background-color:var(--devui-base-bg, #ffffff);border-color:var(--devui-line, #d7d8da);color:var(--devui-text, #252b3a)}.devui-input-number .devui-input-number__input-box::-webkit-inner-spin-button,.devui-input-number .devui-input-number__input-box::-webkit-outer-spin-button{-webkit-appearance:none}.devui-input-number .devui-input-number__control-buttons{display:none;position:absolute;right:0;width:22px;height:100%;flex-direction:column;justify-content:center;align-items:center;border:1px solid transparent;border-left-color:var(--devui-line, #d7d8da);box-sizing:border-box;line-height:100%;border-radius:0 var(--devui-border-radius, 4px) var(--devui-border-radius, 4px) 0}.devui-input-number .devui-input-number__control-buttons.disabled{border-left-color:var(--devui-disabled-line, #dfe1e6)}.devui-input-number .devui-input-number__control-buttons .control-button{user-select:none;box-sizing:border-box;height:50%;line-height:50%;border-width:0 1px;transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1));display:flex;justify-content:center;align-items:center;background-color:var(--devui-base-bg, #ffffff)}.devui-input-number .devui-input-number__control-buttons .control-button.control-inc svg{position:relative;top:2px;transform:rotate(180deg)}.devui-input-number .devui-input-number__control-buttons .control-button.control-dec svg{position:relative;bottom:2px}.devui-input-number .devui-input-number__control-buttons .control-button svg path{fill:var(--devui-text-weak, #575d6c)}.devui-input-number .devui-input-number__control-buttons .control-button:not(.disabled){cursor:pointer}.devui-input-number .devui-input-number__control-buttons .control-button:not(.disabled):hover>svg path{fill:var(--devui-icon-fill-active-hover, #252b3a)}.devui-input-number .devui-input-number__control-buttons .control-button.disabled>svg path{fill:var(--devui-disabled-text, #cfd0d3)}.devui-input-number .devui-input-number--lg>.devui-input-number__input-box{font-size:var(--devui-font-size-lg, 14px);line-height:24px;height:46px}.devui-input-number .devui-input-number--lg.devui-input-number__control-buttons .control-button .devui-input-number__icon-arrow{width:16px;height:16px}.devui-input-number .devui-input-number--md>.devui-input-number__input-box{font-size:var(--devui-font-size, 14px);line-height:20px;height:28px}.devui-input-number .devui-input-number--sm>.devui-input-number__input-box{font-size:var(--devui-font-size-sm, 12px);line-height:18px;height:26px}.devui-input-number .devui-input-number--sm.devui-input-number__control-buttons .control-button:first-child .devui-input-number__icon-arrow{width:14px;height:14px}.devui-input-number .devui-input-number--sm.devui-input-number__control-buttons .control-button:last-child .devui-input-number__icon-arrow{width:14px;height:14px}.devui-input-number .devui-input-number__input-wrap{line-height:100%}.devui-input-number .disabled{cursor:not-allowed}