vue-devui 1.0.0-alpha.4 → 1.0.0-beta.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 (346) hide show
  1. package/accordion/index.d.ts +7 -0
  2. package/accordion/index.es.js +237 -1
  3. package/accordion/index.umd.js +1 -1
  4. package/accordion/style.css +1 -1
  5. package/alert/index.d.ts +7 -0
  6. package/alert/index.es.js +175 -1
  7. package/alert/index.umd.js +1 -1
  8. package/alert/style.css +1 -1
  9. package/anchor/index.d.ts +7 -0
  10. package/anchor/index.es.js +263 -1
  11. package/anchor/index.umd.js +1 -1
  12. package/avatar/index.d.ts +7 -0
  13. package/avatar/index.es.js +301 -1
  14. package/avatar/index.umd.js +1 -1
  15. package/back-top/index.d.ts +7 -0
  16. package/back-top/index.es.js +128 -0
  17. package/back-top/index.umd.js +1 -0
  18. package/back-top/package.json +7 -0
  19. package/back-top/style.css +1 -0
  20. package/badge/index.d.ts +7 -0
  21. package/badge/index.es.js +95 -1
  22. package/badge/index.umd.js +1 -1
  23. package/breadcrumb/index.d.ts +7 -0
  24. package/breadcrumb/index.es.js +127 -1
  25. package/breadcrumb/index.umd.js +1 -1
  26. package/breadcrumb/style.css +1 -1
  27. package/button/index.d.ts +7 -0
  28. package/button/index.es.js +190 -1
  29. package/button/index.umd.js +1 -1
  30. package/card/index.d.ts +7 -0
  31. package/card/index.es.js +61 -1
  32. package/card/index.umd.js +1 -1
  33. package/carousel/index.d.ts +7 -0
  34. package/carousel/index.es.js +329 -1
  35. package/carousel/index.umd.js +1 -1
  36. package/cascader/index.d.ts +7 -0
  37. package/cascader/index.es.js +1343 -1
  38. package/cascader/index.umd.js +1 -1
  39. package/cascader/style.css +1 -1
  40. package/checkbox/index.d.ts +7 -0
  41. package/checkbox/index.es.js +377 -1
  42. package/checkbox/index.umd.js +1 -1
  43. package/comment/index.d.ts +7 -0
  44. package/comment/index.es.js +85 -0
  45. package/comment/index.umd.js +1 -0
  46. package/comment/package.json +7 -0
  47. package/comment/style.css +1 -0
  48. package/countdown/index.d.ts +7 -0
  49. package/countdown/index.es.js +176 -0
  50. package/countdown/index.umd.js +1 -0
  51. package/countdown/package.json +7 -0
  52. package/countdown/style.css +1 -0
  53. package/date-picker/index.d.ts +7 -0
  54. package/date-picker/index.es.js +1172 -1
  55. package/date-picker/index.umd.js +1 -1
  56. package/date-picker/style.css +1 -1
  57. package/dragdrop/index.d.ts +7 -0
  58. package/dragdrop/index.es.js +32 -0
  59. package/dragdrop/index.umd.js +1 -0
  60. package/dragdrop/package.json +7 -0
  61. package/drawer/index.d.ts +7 -0
  62. package/drawer/index.es.js +288 -0
  63. package/drawer/index.umd.js +1 -0
  64. package/drawer/package.json +7 -0
  65. package/drawer/style.css +1 -0
  66. package/dropdown/index.d.ts +7 -0
  67. package/dropdown/index.es.js +527 -0
  68. package/dropdown/index.umd.js +1 -0
  69. package/dropdown/package.json +7 -0
  70. package/dropdown/style.css +1 -0
  71. package/editable-select/index.d.ts +7 -0
  72. package/editable-select/index.es.js +5793 -1
  73. package/editable-select/index.umd.js +27 -1
  74. package/editable-select/style.css +1 -1
  75. package/form/index.d.ts +7 -0
  76. package/form/index.es.js +2244 -0
  77. package/form/index.umd.js +1 -0
  78. package/form/package.json +7 -0
  79. package/form/style.css +1 -0
  80. package/fullscreen/index.d.ts +7 -0
  81. package/fullscreen/index.es.js +163 -1
  82. package/fullscreen/index.umd.js +1 -1
  83. package/gantt/index.d.ts +7 -0
  84. package/gantt/index.es.js +535 -0
  85. package/gantt/index.umd.js +1 -0
  86. package/gantt/package.json +7 -0
  87. package/gantt/style.css +1 -0
  88. package/grid/index.d.ts +7 -0
  89. package/grid/index.es.js +269 -0
  90. package/grid/index.umd.js +1 -0
  91. package/grid/package.json +7 -0
  92. package/grid/style.css +1 -0
  93. package/icon/index.d.ts +7 -0
  94. package/icon/index.es.js +75 -1
  95. package/icon/index.umd.js +1 -1
  96. package/image-preview/index.d.ts +7 -0
  97. package/image-preview/index.es.js +480 -1
  98. package/image-preview/index.umd.js +1 -1
  99. package/image-preview/style.css +1 -1
  100. package/index.d.ts +7 -0
  101. package/input/index.d.ts +7 -0
  102. package/input/index.es.js +190 -1
  103. package/input/index.umd.js +1 -1
  104. package/input-icon/index.d.ts +7 -0
  105. package/input-icon/index.es.js +332 -0
  106. package/input-icon/index.umd.js +1 -0
  107. package/input-icon/package.json +7 -0
  108. package/input-icon/style.css +1 -0
  109. package/input-number/index.d.ts +7 -0
  110. package/input-number/index.es.js +240 -1
  111. package/input-number/index.umd.js +1 -1
  112. package/input-number/style.css +1 -1
  113. package/layout/index.d.ts +7 -0
  114. package/layout/index.es.js +100 -0
  115. package/layout/index.umd.js +1 -0
  116. package/layout/package.json +7 -0
  117. package/layout/style.css +1 -0
  118. package/loading/index.d.ts +7 -0
  119. package/loading/index.es.js +256 -1
  120. package/loading/index.umd.js +1 -1
  121. package/modal/index.d.ts +7 -0
  122. package/modal/index.es.js +1027 -1
  123. package/modal/index.umd.js +1 -1
  124. package/modal/style.css +1 -1
  125. package/nav-sprite/index.d.ts +7 -0
  126. package/nav-sprite/index.es.js +742 -0
  127. package/nav-sprite/index.umd.js +1 -0
  128. package/nav-sprite/package.json +7 -0
  129. package/nuxt/components/Accordion.js +3 -0
  130. package/nuxt/components/Alert.js +3 -0
  131. package/nuxt/components/Anchor.js +3 -0
  132. package/nuxt/components/Aside.js +3 -0
  133. package/nuxt/components/Avatar.js +3 -0
  134. package/nuxt/components/BackTop.js +3 -0
  135. package/nuxt/components/Badge.js +3 -0
  136. package/nuxt/components/Breadcrumb.js +3 -0
  137. package/nuxt/components/Button.js +3 -0
  138. package/nuxt/components/Card.js +3 -0
  139. package/nuxt/components/Carousel.js +3 -0
  140. package/nuxt/components/Cascader.js +3 -0
  141. package/nuxt/components/Checkbox.js +3 -0
  142. package/nuxt/components/Col.js +3 -0
  143. package/nuxt/components/Column.js +3 -0
  144. package/nuxt/components/Comment.js +3 -0
  145. package/nuxt/components/Content.js +3 -0
  146. package/nuxt/components/Countdown.js +3 -0
  147. package/nuxt/components/DatePicker.js +3 -0
  148. package/nuxt/components/Drawer.js +3 -0
  149. package/nuxt/components/Dropdown.js +3 -0
  150. package/nuxt/components/EditableSelect.js +3 -0
  151. package/nuxt/components/FixedOverlay.js +3 -0
  152. package/nuxt/components/FlexibleOverlay.js +3 -0
  153. package/nuxt/components/Footer.js +3 -0
  154. package/nuxt/components/Form.js +3 -0
  155. package/nuxt/components/FormControl.js +3 -0
  156. package/nuxt/components/FormItem.js +3 -0
  157. package/nuxt/components/FormLabel.js +3 -0
  158. package/nuxt/components/FormOperation.js +3 -0
  159. package/nuxt/components/Fullscreen.js +3 -0
  160. package/nuxt/components/Gantt.js +3 -0
  161. package/nuxt/components/Header.js +3 -0
  162. package/nuxt/components/Icon.js +2 -0
  163. package/nuxt/components/ImagePreviewService.js +3 -0
  164. package/nuxt/components/Input.js +3 -0
  165. package/nuxt/components/InputIcon.js +3 -0
  166. package/nuxt/components/InputNumber.js +3 -0
  167. package/nuxt/components/Layout.js +3 -0
  168. package/nuxt/components/Loading.js +3 -0
  169. package/nuxt/components/LoadingService.js +3 -0
  170. package/nuxt/components/Modal.js +3 -0
  171. package/nuxt/components/MultiUpload.js +3 -0
  172. package/nuxt/components/NavSprite.js +2 -0
  173. package/nuxt/components/Pagination.js +3 -0
  174. package/nuxt/components/Panel.js +3 -0
  175. package/nuxt/components/Popover.js +3 -0
  176. package/nuxt/components/Progress.js +3 -0
  177. package/nuxt/components/QuadrantDiagram.js +3 -0
  178. package/nuxt/components/Radio.js +3 -0
  179. package/nuxt/components/RadioGroup.js +3 -0
  180. package/nuxt/components/Rate.js +3 -0
  181. package/nuxt/components/ReadTip.js +3 -0
  182. package/nuxt/components/Result.js +3 -0
  183. package/nuxt/components/Row.js +3 -0
  184. package/nuxt/components/Search.js +3 -0
  185. package/nuxt/components/Select.js +3 -0
  186. package/nuxt/components/Skeleton.js +3 -0
  187. package/nuxt/components/SkeletonItem.js +3 -0
  188. package/nuxt/components/Slider.js +3 -0
  189. package/nuxt/components/Splitter.js +3 -0
  190. package/nuxt/components/Statistic.js +3 -0
  191. package/nuxt/components/Status.js +3 -0
  192. package/nuxt/components/StepsGuide.js +3 -0
  193. package/nuxt/components/StickSlider.js +3 -0
  194. package/nuxt/components/Sticky.js +2 -0
  195. package/nuxt/components/Switch.js +3 -0
  196. package/nuxt/components/Table.js +3 -0
  197. package/nuxt/components/Tabs.js +3 -0
  198. package/nuxt/components/Tag.js +3 -0
  199. package/nuxt/components/TagInput.js +3 -0
  200. package/nuxt/components/Textarea.js +3 -0
  201. package/nuxt/components/TimeAxis.js +3 -0
  202. package/nuxt/components/TimeAxisItem.js +3 -0
  203. package/nuxt/components/TimePicker.js +3 -0
  204. package/nuxt/components/Toast.js +3 -0
  205. package/nuxt/components/ToastService.js +3 -0
  206. package/nuxt/components/Tooltip.js +3 -0
  207. package/nuxt/components/Transfer.js +3 -0
  208. package/nuxt/components/Tree.js +3 -0
  209. package/nuxt/components/TreeSelect.js +3 -0
  210. package/nuxt/components/Upload.js +3 -0
  211. package/nuxt/components/buttonProps.js +3 -0
  212. package/nuxt/index.js +13 -0
  213. package/overlay/index.d.ts +7 -0
  214. package/overlay/index.es.js +368 -1
  215. package/overlay/index.umd.js +1 -1
  216. package/overlay/style.css +1 -1
  217. package/package.json +8 -33
  218. package/pagination/index.d.ts +7 -0
  219. package/pagination/index.es.js +642 -1
  220. package/pagination/index.umd.js +1 -1
  221. package/panel/index.d.ts +7 -0
  222. package/panel/index.es.js +205 -1
  223. package/panel/index.umd.js +1 -1
  224. package/panel/style.css +1 -1
  225. package/popover/index.d.ts +7 -0
  226. package/popover/index.es.js +236 -1
  227. package/popover/index.umd.js +1 -1
  228. package/popover/style.css +1 -1
  229. package/progress/index.d.ts +7 -0
  230. package/progress/index.es.js +153 -1
  231. package/progress/index.umd.js +3 -1
  232. package/quadrant-diagram/index.d.ts +7 -0
  233. package/quadrant-diagram/index.es.js +489 -1
  234. package/quadrant-diagram/index.umd.js +1 -1
  235. package/radio/index.d.ts +7 -0
  236. package/radio/index.es.js +225 -1
  237. package/radio/index.umd.js +1 -1
  238. package/rate/index.d.ts +7 -0
  239. package/rate/index.es.js +220 -1
  240. package/rate/index.umd.js +1 -1
  241. package/read-tip/index.d.ts +7 -0
  242. package/read-tip/index.es.js +258 -0
  243. package/read-tip/index.umd.js +1 -0
  244. package/read-tip/package.json +7 -0
  245. package/read-tip/style.css +1 -0
  246. package/result/index.d.ts +7 -0
  247. package/result/index.es.js +119 -0
  248. package/result/index.umd.js +1 -0
  249. package/result/package.json +7 -0
  250. package/result/style.css +1 -0
  251. package/ripple/index.d.ts +7 -0
  252. package/ripple/index.es.js +181 -1
  253. package/ripple/index.umd.js +1 -1
  254. package/search/index.d.ts +7 -0
  255. package/search/index.es.js +543 -1
  256. package/search/index.umd.js +1 -1
  257. package/select/index.d.ts +7 -0
  258. package/select/index.es.js +706 -1
  259. package/select/index.umd.js +1 -1
  260. package/skeleton/index.d.ts +7 -0
  261. package/skeleton/index.es.js +297 -1
  262. package/skeleton/index.umd.js +1 -1
  263. package/skeleton/style.css +1 -1
  264. package/slider/index.d.ts +7 -0
  265. package/slider/index.es.js +199 -1
  266. package/slider/index.umd.js +1 -1
  267. package/slider/style.css +1 -1
  268. package/splitter/index.d.ts +7 -0
  269. package/splitter/index.es.js +636 -1
  270. package/splitter/index.umd.js +1 -1
  271. package/statistic/index.d.ts +7 -0
  272. package/statistic/index.es.js +280 -0
  273. package/statistic/index.umd.js +1 -0
  274. package/statistic/package.json +7 -0
  275. package/statistic/style.css +1 -0
  276. package/status/index.d.ts +7 -0
  277. package/status/index.es.js +42 -1
  278. package/status/index.umd.js +1 -1
  279. package/steps-guide/index.d.ts +7 -0
  280. package/steps-guide/index.es.js +239 -1
  281. package/steps-guide/index.umd.js +1 -1
  282. package/steps-guide/style.css +1 -1
  283. package/sticky/index.d.ts +7 -0
  284. package/sticky/index.es.js +197 -1
  285. package/sticky/index.umd.js +1 -1
  286. package/style.css +1 -1
  287. package/switch/index.d.ts +7 -0
  288. package/switch/index.es.js +100 -1
  289. package/switch/index.umd.js +1 -1
  290. package/switch/style.css +1 -1
  291. package/table/index.d.ts +7 -0
  292. package/table/index.es.js +1626 -1
  293. package/table/index.umd.js +1 -1
  294. package/table/style.css +1 -1
  295. package/tabs/index.d.ts +7 -0
  296. package/tabs/index.es.js +195 -1
  297. package/tabs/index.umd.js +1 -1
  298. package/tabs/style.css +1 -1
  299. package/tag/index.d.ts +7 -0
  300. package/tag/index.es.js +131 -0
  301. package/tag/index.umd.js +1 -0
  302. package/tag/package.json +7 -0
  303. package/tag/style.css +1 -0
  304. package/tag-input/index.d.ts +7 -0
  305. package/tag-input/index.es.js +329 -1
  306. package/tag-input/index.umd.js +1 -1
  307. package/textarea/index.d.ts +7 -0
  308. package/textarea/index.es.js +132 -0
  309. package/textarea/index.umd.js +1 -0
  310. package/textarea/package.json +7 -0
  311. package/textarea/style.css +1 -0
  312. package/time-axis/index.d.ts +7 -0
  313. package/time-axis/index.es.js +299 -0
  314. package/time-axis/index.umd.js +1 -0
  315. package/time-axis/package.json +7 -0
  316. package/time-axis/style.css +1 -0
  317. package/time-picker/index.d.ts +7 -0
  318. package/time-picker/index.es.js +1053 -1
  319. package/time-picker/index.umd.js +1 -1
  320. package/time-picker/style.css +1 -1
  321. package/toast/index.d.ts +7 -0
  322. package/toast/index.es.js +2060 -1
  323. package/toast/index.umd.js +1 -1
  324. package/toast/style.css +1 -1
  325. package/tooltip/index.d.ts +7 -0
  326. package/tooltip/index.es.js +171 -1
  327. package/tooltip/index.umd.js +1 -1
  328. package/transfer/index.d.ts +7 -0
  329. package/transfer/index.es.js +1725 -1
  330. package/transfer/index.umd.js +1 -1
  331. package/transfer/style.css +1 -1
  332. package/tree/index.d.ts +7 -0
  333. package/tree/index.es.js +907 -1
  334. package/tree/index.umd.js +1 -1
  335. package/tree/style.css +1 -1
  336. package/tree-select/index.d.ts +7 -0
  337. package/tree-select/index.es.js +528 -0
  338. package/tree-select/index.umd.js +1 -0
  339. package/tree-select/package.json +7 -0
  340. package/tree-select/style.css +1 -0
  341. package/upload/index.d.ts +7 -0
  342. package/upload/index.es.js +3179 -1
  343. package/upload/index.umd.js +1 -1
  344. package/upload/style.css +1 -1
  345. package/vue-devui.es.js +27755 -1
  346. package/vue-devui.umd.js +29 -1
@@ -0,0 +1,299 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ 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]);
14
+ }
15
+ return a;
16
+ };
17
+ import { defineComponent, createVNode, inject, createTextVNode, provide, ref, reactive, onMounted, watch, toRef, nextTick, Fragment } from "vue";
18
+ const timeAxisProps = {
19
+ direction: {
20
+ type: String,
21
+ default: "vertical"
22
+ },
23
+ center: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ mode: {
28
+ type: String,
29
+ default: "normal"
30
+ },
31
+ timePosition: {
32
+ type: String,
33
+ default: "left"
34
+ }
35
+ };
36
+ var DIcon = defineComponent({
37
+ name: "DIcon",
38
+ props: {
39
+ name: {
40
+ type: String,
41
+ required: true
42
+ },
43
+ size: {
44
+ type: String,
45
+ default: "inherit"
46
+ },
47
+ color: {
48
+ type: String,
49
+ default: "inherit"
50
+ },
51
+ classPrefix: {
52
+ type: String,
53
+ default: "icon"
54
+ }
55
+ },
56
+ setup(props) {
57
+ return __spreadValues({}, props);
58
+ },
59
+ render() {
60
+ const {
61
+ name,
62
+ size,
63
+ color,
64
+ classPrefix
65
+ } = this;
66
+ return /^((https?):)?\/\//.test(name) ? createVNode("img", {
67
+ "src": name,
68
+ "alt": name.split("/")[name.split("/").length - 1],
69
+ "style": {
70
+ width: size,
71
+ verticalAlign: "text-bottom"
72
+ }
73
+ }, null) : createVNode("i", {
74
+ "class": `${classPrefix} ${classPrefix}-${name}`,
75
+ "style": {
76
+ fontSize: size,
77
+ color
78
+ }
79
+ }, null);
80
+ }
81
+ });
82
+ const timeAxisItemProps = {
83
+ time: {
84
+ type: String
85
+ },
86
+ dotColor: {
87
+ type: String
88
+ },
89
+ lineStyle: {
90
+ type: String,
91
+ default: "solid"
92
+ },
93
+ lineColor: {
94
+ type: String
95
+ },
96
+ position: {
97
+ type: String
98
+ },
99
+ timePosition: {
100
+ type: String,
101
+ default: "left"
102
+ },
103
+ type: {
104
+ type: String,
105
+ default: "primary"
106
+ }
107
+ };
108
+ var TimeAxisItem = defineComponent({
109
+ name: "DTimeAxisItem",
110
+ components: {
111
+ DIcon
112
+ },
113
+ props: timeAxisItemProps,
114
+ emits: [],
115
+ setup(props, ctx) {
116
+ const timeAxis2 = inject("timeAxis");
117
+ const itemClass = "devui-time-axis-item";
118
+ const renderTime = () => {
119
+ var _a, _b;
120
+ return createVNode("div", {
121
+ "class": `${itemClass}-time`
122
+ }, [ctx.slots.time ? (_b = (_a = ctx.slots).time) == null ? void 0 : _b.call(_a) : props.time]);
123
+ };
124
+ const renderContent = () => {
125
+ var _a, _b;
126
+ return createVNode("div", {
127
+ "class": `${itemClass}-content`
128
+ }, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a, props)]);
129
+ };
130
+ const renderPosition = (types) => {
131
+ if (types.includes(props.position)) {
132
+ return renderContent();
133
+ } else {
134
+ if (timeAxis2.props.direction === "horizontal") {
135
+ return renderTime();
136
+ } else {
137
+ return props.timePosition === "left" ? renderTime() : "";
138
+ }
139
+ }
140
+ };
141
+ const setTypeIcon = (type) => {
142
+ if (type === "primary") {
143
+ return "";
144
+ }
145
+ return createVNode("i", {
146
+ "class": `icon-${type === "success" ? "right" : type}-o`
147
+ }, null);
148
+ };
149
+ const renderDot = () => {
150
+ var _a, _b;
151
+ if (ctx.slots.dot) {
152
+ return createVNode("div", {
153
+ "style": {
154
+ color: props.dotColor
155
+ },
156
+ "class": `${itemClass}-dot`
157
+ }, [createTextVNode(" "), (_b = (_a = ctx.slots).dot) == null ? void 0 : _b.call(_a)]);
158
+ } else {
159
+ return createVNode("div", {
160
+ "class": `${itemClass}-dot ${itemClass}-type-${props.type}`,
161
+ "style": {
162
+ borderColor: props.dotColor
163
+ }
164
+ }, [setTypeIcon(props.type)]);
165
+ }
166
+ };
167
+ return () => {
168
+ return createVNode("div", {
169
+ "class": itemClass
170
+ }, [createVNode("div", {
171
+ "class": `${itemClass}-data-left ${itemClass}-data-top`
172
+ }, [renderPosition(["top", "left"])]), createVNode("div", {
173
+ "class": `${itemClass}-axis`
174
+ }, [renderDot(), timeAxis2.props.direction === "vertical" && props.timePosition === "bottom" ? renderTime() : "", createVNode("div", {
175
+ "class": `${itemClass}-line ${itemClass}-line-style-${props.lineStyle}`,
176
+ "style": {
177
+ borderColor: props.lineColor
178
+ }
179
+ }, [ctx.slots.extra ? createVNode("div", {
180
+ "class": `${itemClass}-line-extra`
181
+ }, [ctx.slots.extra()]) : ""])]), createVNode("div", {
182
+ "class": `${itemClass}-data-right ${itemClass}-data-bottom`
183
+ }, [renderPosition(["right", "bottom"])])]);
184
+ };
185
+ }
186
+ });
187
+ var timeAxis = "";
188
+ var TimeAxis = defineComponent({
189
+ name: "DTimeAxis",
190
+ components: {
191
+ TimeAxisItem
192
+ },
193
+ props: timeAxisProps,
194
+ emits: [],
195
+ setup(props, ctx) {
196
+ provide("timeAxis", {
197
+ ctx,
198
+ props
199
+ });
200
+ const timeAxis2 = ref();
201
+ const style = reactive({
202
+ marginLeft: "0px",
203
+ height: "auto"
204
+ });
205
+ const setStyle = () => {
206
+ style.height = "auto";
207
+ style.marginLeft = "0px";
208
+ if (props.direction === "horizontal") {
209
+ nextTick(() => {
210
+ var _a;
211
+ const el = timeAxis2.value;
212
+ if (props.center) {
213
+ style.marginLeft = (((_a = el == null ? void 0 : el.firstElementChild) == null ? void 0 : _a.clientWidth) || 0) / 2 + "px";
214
+ }
215
+ style.height = Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-top")).map((el2) => el2.clientHeight), ...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-data-bottom")).map((el2) => el2.clientHeight)) * 2 + Math.max(...Array.from(el == null ? void 0 : el.querySelectorAll(".devui-time-axis-item-axis")).map((el2) => el2.clientHeight)) + "px";
216
+ });
217
+ }
218
+ };
219
+ onMounted(() => {
220
+ setStyle();
221
+ });
222
+ watch(toRef(props, "direction"), () => {
223
+ setStyle();
224
+ });
225
+ return () => {
226
+ const renderItemPosition = (item, position) => {
227
+ return position ? createVNode(item, {
228
+ "position": position
229
+ }, null) : createVNode(item, null, null);
230
+ };
231
+ const renderItem = () => {
232
+ var _a, _b, _c;
233
+ const slots = (_c = (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : [];
234
+ let children;
235
+ if (slots.length === 1 && slots[0].type === Fragment) {
236
+ children = slots[0].children || [];
237
+ } else {
238
+ children = slots;
239
+ }
240
+ return children.map((item, index2) => {
241
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h;
242
+ if (index2 + 1 === children.length) {
243
+ if (!((_a2 = item.props) == null ? void 0 : _a2.lineStyle) && !((_b2 = item.props) == null ? void 0 : _b2["line-style"])) {
244
+ item = createVNode(item, {
245
+ "line-style": "none"
246
+ }, null);
247
+ }
248
+ }
249
+ if (!((_c2 = item.props) == null ? void 0 : _c2.timePosition) && !((_d = item.props) == null ? void 0 : _d["time-position"])) {
250
+ item = createVNode(item, {
251
+ "time-position": props.timePosition ? props.timePosition : "left"
252
+ }, null);
253
+ }
254
+ if (props.direction === "horizontal") {
255
+ if (((_e = item.props) == null ? void 0 : _e.position) === "top" || ((_f = item.props) == null ? void 0 : _f.position) === "bottom")
256
+ return item;
257
+ if (props.mode === "alternative") {
258
+ return renderItemPosition(item, index2 % 2 == 0 ? "bottom" : "top");
259
+ } else {
260
+ return renderItemPosition(item, "bottom");
261
+ }
262
+ } else {
263
+ if (((_g = item.props) == null ? void 0 : _g.position) === "left" || ((_h = item.props) == null ? void 0 : _h.position) === "right")
264
+ return item;
265
+ if (props.mode === "alternative") {
266
+ return renderItemPosition(item, index2 % 2 == 0 ? "left" : "right");
267
+ } else {
268
+ return renderItemPosition(item, "right");
269
+ }
270
+ }
271
+ });
272
+ };
273
+ const getDirection = () => {
274
+ return props.direction === "horizontal" ? "horizontal" : "vertical";
275
+ };
276
+ return createVNode("div", {
277
+ "class": `devui-time-axis devui-time-axis-${getDirection()} ${props.center ? "devui-time-axis-" + getDirection() + "-center" : ""} `,
278
+ "ref": timeAxis2,
279
+ "style": style
280
+ }, [renderItem()]);
281
+ };
282
+ }
283
+ });
284
+ TimeAxis.install = function(app) {
285
+ app.component(TimeAxis.name, TimeAxis);
286
+ };
287
+ TimeAxisItem.install = function(app) {
288
+ app.component(TimeAxisItem.name, TimeAxisItem);
289
+ };
290
+ var index = {
291
+ title: "TimeAxis \u65F6\u95F4\u8F74",
292
+ category: "\u6570\u636E\u5C55\u793A",
293
+ status: "100%",
294
+ install(app) {
295
+ app.use(TimeAxis);
296
+ app.use(TimeAxisItem);
297
+ }
298
+ };
299
+ export { TimeAxis, TimeAxisItem, index as default };
@@ -0,0 +1 @@
1
+ var F=Object.defineProperty;var I=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var z=(r,t,a)=>t in r?F(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,D=(r,t)=>{for(var a in t||(t={}))j.call(t,a)&&z(r,a,t[a]);if(I)for(var a of I(t))H.call(t,a)&&z(r,a,t[a]);return r};(function(r,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(r=typeof globalThis!="undefined"?globalThis:r||self,t(r.index={},r.Vue))})(this,function(r,t){"use strict";const a={direction:{type:String,default:"vertical"},center:{type:Boolean,default:!1},mode:{type:String,default:"normal"},timePosition:{type:String,default:"left"}};var q=t.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(e){return D({},e)},render(){const{name:e,size:l,color:f,classPrefix:i}=this;return/^((https?):)?\/\//.test(e)?t.createVNode("img",{src:e,alt:e.split("/")[e.split("/").length-1],style:{width:l,verticalAlign:"text-bottom"}},null):t.createVNode("i",{class:`${i} ${i}-${e}`,style:{fontSize:l,color:f}},null)}});const v={time:{type:String},dotColor:{type:String},lineStyle:{type:String,default:"solid"},lineColor:{type:String},position:{type:String},timePosition:{type:String,default:"left"},type:{type:String,default:"primary"}};var p=t.defineComponent({name:"DTimeAxisItem",components:{DIcon:q},props:v,emits:[],setup(e,l){const f=t.inject("timeAxis"),i="devui-time-axis-item",y=()=>{var o,d;return t.createVNode("div",{class:`${i}-time`},[l.slots.time?(d=(o=l.slots).time)==null?void 0:d.call(o):e.time])},n=()=>{var o,d;return t.createVNode("div",{class:`${i}-content`},[(d=(o=l.slots).default)==null?void 0:d.call(o,e)])},u=o=>o.includes(e.position)?n():f.props.direction==="horizontal"||e.timePosition==="left"?y():"",c=o=>o==="primary"?"":t.createVNode("i",{class:`icon-${o==="success"?"right":o}-o`},null),m=()=>{var o,d;return l.slots.dot?t.createVNode("div",{style:{color:e.dotColor},class:`${i}-dot`},[t.createTextVNode(" "),(d=(o=l.slots).dot)==null?void 0:d.call(o)]):t.createVNode("div",{class:`${i}-dot ${i}-type-${e.type}`,style:{borderColor:e.dotColor}},[c(e.type)])};return()=>t.createVNode("div",{class:i},[t.createVNode("div",{class:`${i}-data-left ${i}-data-top`},[u(["top","left"])]),t.createVNode("div",{class:`${i}-axis`},[m(),f.props.direction==="vertical"&&e.timePosition==="bottom"?y():"",t.createVNode("div",{class:`${i}-line ${i}-line-style-${e.lineStyle}`,style:{borderColor:e.lineColor}},[l.slots.extra?t.createVNode("div",{class:`${i}-line-extra`},[l.slots.extra()]):""])]),t.createVNode("div",{class:`${i}-data-right ${i}-data-bottom`},[u(["right","bottom"])])])}}),L="",g=t.defineComponent({name:"DTimeAxis",components:{TimeAxisItem:p},props:a,emits:[],setup(e,l){t.provide("timeAxis",{ctx:l,props:e});const f=t.ref(),i=t.reactive({marginLeft:"0px",height:"auto"}),y=()=>{i.height="auto",i.marginLeft="0px",e.direction==="horizontal"&&t.nextTick(()=>{var u;const n=f.value;e.center&&(i.marginLeft=(((u=n==null?void 0:n.firstElementChild)==null?void 0:u.clientWidth)||0)/2+"px"),i.height=Math.max(...Array.from(n==null?void 0:n.querySelectorAll(".devui-time-axis-item-data-top")).map(c=>c.clientHeight),...Array.from(n==null?void 0:n.querySelectorAll(".devui-time-axis-item-data-bottom")).map(c=>c.clientHeight))*2+Math.max(...Array.from(n==null?void 0:n.querySelectorAll(".devui-time-axis-item-axis")).map(c=>c.clientHeight))+"px"})};return t.onMounted(()=>{y()}),t.watch(t.toRef(e,"direction"),()=>{y()}),()=>{const n=(m,o)=>o?t.createVNode(m,{position:o},null):t.createVNode(m,null,null),u=()=>{var d,x,S;const m=(S=(x=(d=l.slots).default)==null?void 0:x.call(d))!=null?S:[];let o;return m.length===1&&m[0].type===t.Fragment?o=m[0].children||[]:o=m,o.map((s,h)=>{var A,$,V,N,C,P,T,b;return h+1===o.length&&!((A=s.props)==null?void 0:A.lineStyle)&&!(($=s.props)==null?void 0:$["line-style"])&&(s=t.createVNode(s,{"line-style":"none"},null)),!((V=s.props)==null?void 0:V.timePosition)&&!((N=s.props)==null?void 0:N["time-position"])&&(s=t.createVNode(s,{"time-position":e.timePosition?e.timePosition:"left"},null)),e.direction==="horizontal"?((C=s.props)==null?void 0:C.position)==="top"||((P=s.props)==null?void 0:P.position)==="bottom"?s:e.mode==="alternative"?n(s,h%2==0?"bottom":"top"):n(s,"bottom"):((T=s.props)==null?void 0:T.position)==="left"||((b=s.props)==null?void 0:b.position)==="right"?s:e.mode==="alternative"?n(s,h%2==0?"left":"right"):n(s,"right")})},c=()=>e.direction==="horizontal"?"horizontal":"vertical";return t.createVNode("div",{class:`devui-time-axis devui-time-axis-${c()} ${e.center?"devui-time-axis-"+c()+"-center":""} `,ref:f,style:i},[u()])}}});g.install=function(e){e.component(g.name,g)},p.install=function(e){e.component(p.name,p)};var M={title:"TimeAxis \u65F6\u95F4\u8F74",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(e){e.use(g),e.use(p)}};r.TimeAxis=g,r.TimeAxisItem=p,r.default=M,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"});
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "time-axis",
3
+ "version": "0.0.0",
4
+ "main": "index.umd.js",
5
+ "module": "index.es.js",
6
+ "style": "style.css"
7
+ }
@@ -0,0 +1 @@
1
+ .devui-time-axis-vertical{display:flex;flex-direction:column;align-items:center;position:relative}.devui-time-axis-vertical .devui-time-axis-item{display:flex;flex-direction:row;width:100%}.devui-time-axis-vertical .devui-time-axis-item-axis{display:flex;flex-direction:column;align-items:center;padding:0 12px}.devui-time-axis-vertical .devui-time-axis-item-line{position:relative;height:calc(100% - 18px);min-height:20px;border-left-width:2px;border-left-color:var(--devui-dividing-line, #dfe1e6)}.devui-time-axis-vertical .devui-time-axis-item-line-extra{position:absolute;top:50%;transform:translate(-50%,-50%)}.devui-time-axis-vertical .devui-time-axis-item-line:first-child{display:none}.devui-time-axis-vertical .devui-time-axis-item-data-left{text-align:end}.devui-time-axis-vertical .devui-time-axis-item-data-left,.devui-time-axis-vertical .devui-time-axis-item-data-right{margin-bottom:24px;margin-top:-2px;flex:1}.devui-time-axis-vertical .devui-time-axis-item-line-style-dashed{border-left-style:dashed}.devui-time-axis-vertical .devui-time-axis-item-line-style-solid{border-left-style:solid}.devui-time-axis-vertical .devui-time-axis-item-line-style-dotted{border-left-style:dotted}.devui-time-axis-vertical .devui-time-axis-item-line-style-none{border-left-style:none}.devui-time-axis-vertical .devui-time-axis-item .devui-time-axis-middle-zone{position:absolute;top:50%;transform:translate(-50%,-50%)}.devui-time-axis-horizontal{display:flex;flex-direction:row;align-items:center;position:relative}.devui-time-axis-horizontal-center .devui-time-axis-item-data-top,.devui-time-axis-horizontal-center .devui-time-axis-item-data-bottom{text-align:center;padding:0 6px}.devui-time-axis-horizontal-center .devui-time-axis-item-data-top>div,.devui-time-axis-horizontal-center .devui-time-axis-item-data-bottom>div{transform:translate(-50%)}.devui-time-axis-horizontal .devui-time-axis-item{display:flex;flex-direction:column;height:100%}.devui-time-axis-horizontal .devui-time-axis-item-axis{display:flex;flex-direction:row;align-items:center;padding:12px 0}.devui-time-axis-horizontal .devui-time-axis-item-line{position:relative;min-width:60px;width:calc(100% - 18px);border-bottom-width:2px;border-bottom-color:var(--devui-dividing-line, #dfe1e6)}.devui-time-axis-horizontal .devui-time-axis-item-line-extra{position:absolute;left:50%;transform:translate(-50%,-50%)}.devui-time-axis-horizontal .devui-time-axis-item:first-child .devui-time-axis-item-line:first-child{opacity:0}.devui-time-axis-horizontal .devui-time-axis-item-data-top,.devui-time-axis-horizontal .devui-time-axis-item-data-bottom{padding-right:12px;flex:1}.devui-time-axis-horizontal .devui-time-axis-item-line-style-dashed{border-bottom-style:dashed}.devui-time-axis-horizontal .devui-time-axis-item-line-style-solid{border-bottom-style:solid}.devui-time-axis-horizontal .devui-time-axis-item-line-style-dotted{border-bottom-style:dotted}.devui-time-axis-horizontal .devui-time-axis-item-line-style-none{border-bottom-style:none}.devui-time-axis-horizontal .devui-time-axis-item .devui-time-axis-middle-zone{position:absolute;left:50%;transform:translate(-50%,-50%)}.devui-time-axis-item-dot,.devui-time-axis-item-dot>svg{width:18px;height:18px;flex-shrink:0}.devui-time-axis-item-dot>i{font-size:18px;vertical-align:0}.devui-time-axis-item-type-primary{border:2px solid var(--devui-placeholder, #8a8e99);border-radius:50%}.devui-time-axis-item-type-success i{color:var(--devui-success, #50d4ab)}.devui-time-axis-item-type-error i{color:var(--devui-danger, #f66f6a)}.devui-time-axis-item-type-warning i{color:var(--devui-warning, #fac20a)}.devui-time-axis-item-type-running{line-height:16px;text-align:center;animation:devui-time-axis-running 1.5s linear infinite;border:2px solid var(--devui-success, #50d4ab);border-radius:50%}@keyframes devui-time-axis-running{0%{transform:rotate(0);color:var(--devui-success, #50d4ab);border-color:var(--devui-success, #50d4ab)}50%{transform:rotate(180deg);color:var(--devui-success, #50d4ab);border-color:var(--devui-success, #50d4ab)}to{transform:rotate(360deg);color:var(--devui-success, #50d4ab);border-color:var(--devui-success, #50d4ab)}}
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ declare function install(app: App): void
3
+ declare const _default: {
4
+ install: typeof install;
5
+ version: string;
6
+ };
7
+ export default _default;