litos-ui 0.20.1 → 0.22.0

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 (421) hide show
  1. package/README.md +119 -15
  2. package/README.zh-CN.md +153 -0
  3. package/lib/base.d.ts +1 -0
  4. package/lib/base.js +1 -1
  5. package/lib/button/index.js +4 -4
  6. package/lib/{style-gKR_qwzm.js → button/index.less_inline.js} +2 -3
  7. package/lib/button/style.js +6 -2
  8. package/lib/calendar/index.js +140 -2
  9. package/lib/calendar/index.less_inline.js +4 -0
  10. package/lib/calendar/langs.js +12 -0
  11. package/lib/card/index.js +64 -2
  12. package/lib/card/index.less_inline.js +4 -0
  13. package/lib/carousel/index.js +257 -2
  14. package/lib/carousel/index.less_inline.js +4 -0
  15. package/lib/carousel/item.js +15 -2
  16. package/lib/carousel/item.less_inline.js +4 -0
  17. package/lib/carousel/timer.js +19 -0
  18. package/lib/check/check.d.ts +1 -0
  19. package/lib/check/check.js +117 -0
  20. package/lib/check/check.less_inline.js +4 -0
  21. package/lib/check/checkbox.js +18 -2
  22. package/lib/{checkbox-DhGHJXwI.js → check/checkbox.less_inline.js} +2 -14
  23. package/lib/check/checkbox_group.js +1 -1
  24. package/lib/check/index.d.ts +1 -0
  25. package/lib/{check-DFlwStH9.js → check/index.js} +10 -9
  26. package/lib/check/index.less_inline.js +4 -0
  27. package/lib/check/radio.js +15 -2
  28. package/lib/{radio-C9NPQWGI.js → check/radio.less_inline.js} +2 -11
  29. package/lib/check/radio_group.js +1 -1
  30. package/lib/collapse/index.js +103 -2
  31. package/lib/collapse/index.less_inline.js +4 -0
  32. package/lib/collapse/item.d.ts +1 -0
  33. package/lib/collapse/item.js +118 -2
  34. package/lib/collapse/item.less_inline.js +4 -0
  35. package/lib/collapse/types.d.ts +1 -0
  36. package/lib/color_picker/index.js +42 -2
  37. package/lib/color_picker/index.less_inline.js +4 -0
  38. package/lib/date_picker/index.js +100 -3
  39. package/lib/date_picker/index.less_inline.js +4 -0
  40. package/lib/date_picker_ori/index.js +121 -2
  41. package/lib/date_picker_ori/index.less_inline.js +4 -0
  42. package/lib/description_panel/index.js +54 -2
  43. package/lib/description_panel/index.less_inline.js +4 -0
  44. package/lib/dialog/dialog_box.js +11 -11
  45. package/lib/dialog/dialog_container.css_inline.js +4 -0
  46. package/lib/dialog/dialog_container.d.ts +1 -1
  47. package/lib/dialog/dialog_container.js +156 -2
  48. package/lib/dialog/dialog_container_style.d.ts +2 -0
  49. package/lib/dialog/dialog_container_style.js +6 -0
  50. package/lib/dialog/index.js +1 -1
  51. package/lib/entries/base.d.ts +2 -0
  52. package/lib/entries/base.js +2 -0
  53. package/lib/entries/button.d.ts +2 -0
  54. package/lib/entries/button.js +6 -0
  55. package/lib/entries/calendar.d.ts +2 -0
  56. package/lib/entries/calendar.js +6 -0
  57. package/lib/entries/card.d.ts +2 -0
  58. package/lib/entries/card.js +6 -0
  59. package/lib/entries/carousel-item.d.ts +2 -0
  60. package/lib/entries/carousel-item.js +6 -0
  61. package/lib/entries/carousel.d.ts +5 -0
  62. package/lib/entries/carousel.js +6 -0
  63. package/lib/entries/checkbox-group.d.ts +3 -0
  64. package/lib/entries/checkbox-group.js +6 -0
  65. package/lib/entries/checkbox.d.ts +2 -0
  66. package/lib/entries/checkbox.js +6 -0
  67. package/lib/entries/collapse-item.d.ts +3 -0
  68. package/lib/entries/collapse-item.js +6 -0
  69. package/lib/entries/collapse.d.ts +3 -0
  70. package/lib/entries/collapse.js +6 -0
  71. package/lib/entries/color-picker.d.ts +3 -0
  72. package/lib/entries/color-picker.js +6 -0
  73. package/lib/entries/date-picker-ori.d.ts +2 -0
  74. package/lib/entries/date-picker-ori.js +6 -0
  75. package/lib/entries/date-picker.d.ts +9 -0
  76. package/lib/entries/date-picker.js +6 -0
  77. package/lib/entries/description-panel.d.ts +4 -0
  78. package/lib/entries/description-panel.js +6 -0
  79. package/lib/entries/dialog-box.d.ts +6 -0
  80. package/lib/entries/dialog-box.js +2 -0
  81. package/lib/entries/dialog-container.d.ts +4 -0
  82. package/lib/entries/dialog-container.js +6 -0
  83. package/lib/entries/dialog.d.ts +3 -0
  84. package/lib/entries/dialog.js +2 -0
  85. package/lib/entries/form-item.d.ts +2 -0
  86. package/lib/entries/form-item.js +6 -0
  87. package/lib/entries/form.d.ts +3 -0
  88. package/lib/entries/form.js +6 -0
  89. package/lib/entries/icon-arrow-down.d.ts +2 -0
  90. package/lib/entries/icon-arrow-down.js +6 -0
  91. package/lib/entries/icon-arrow-left.d.ts +2 -0
  92. package/lib/entries/icon-arrow-left.js +6 -0
  93. package/lib/entries/icon-arrow-right.d.ts +2 -0
  94. package/lib/entries/icon-arrow-right.js +6 -0
  95. package/lib/entries/icon-arrow-up.d.ts +2 -0
  96. package/lib/entries/icon-arrow-up.js +6 -0
  97. package/lib/entries/icon-base.d.ts +2 -0
  98. package/lib/entries/icon-base.js +6 -0
  99. package/lib/entries/icon-calendar.d.ts +2 -0
  100. package/lib/entries/icon-calendar.js +6 -0
  101. package/lib/entries/icon-caret-bottom.d.ts +2 -0
  102. package/lib/entries/icon-caret-bottom.js +6 -0
  103. package/lib/entries/icon-caret-top.d.ts +2 -0
  104. package/lib/entries/icon-caret-top.js +6 -0
  105. package/lib/entries/icon-close-filled.d.ts +2 -0
  106. package/lib/entries/icon-close-filled.js +6 -0
  107. package/lib/entries/icon-close.d.ts +2 -0
  108. package/lib/entries/icon-close.js +6 -0
  109. package/lib/entries/icon-copy.d.ts +2 -0
  110. package/lib/entries/icon-copy.js +6 -0
  111. package/lib/entries/icon-d-arrow-left.d.ts +2 -0
  112. package/lib/entries/icon-d-arrow-left.js +6 -0
  113. package/lib/entries/icon-d-arrow-right.d.ts +2 -0
  114. package/lib/entries/icon-d-arrow-right.js +6 -0
  115. package/lib/entries/icon-delete.d.ts +2 -0
  116. package/lib/entries/icon-delete.js +6 -0
  117. package/lib/entries/icon-eye-outline.d.ts +2 -0
  118. package/lib/entries/icon-eye-outline.js +6 -0
  119. package/lib/entries/icon-font-icon.d.ts +2 -0
  120. package/lib/entries/icon-font-icon.js +6 -0
  121. package/lib/entries/icon-info.d.ts +2 -0
  122. package/lib/entries/icon-info.js +6 -0
  123. package/lib/entries/icon-loading.d.ts +2 -0
  124. package/lib/entries/icon-loading.js +6 -0
  125. package/lib/entries/icon-minus.d.ts +2 -0
  126. package/lib/entries/icon-minus.js +6 -0
  127. package/lib/entries/icon-moon.d.ts +2 -0
  128. package/lib/entries/icon-moon.js +6 -0
  129. package/lib/entries/icon-more.d.ts +2 -0
  130. package/lib/entries/icon-more.js +6 -0
  131. package/lib/entries/icon-picture.d.ts +2 -0
  132. package/lib/entries/icon-picture.js +6 -0
  133. package/lib/entries/icon-plus.d.ts +2 -0
  134. package/lib/entries/icon-plus.js +6 -0
  135. package/lib/entries/icon-reduction.d.ts +2 -0
  136. package/lib/entries/icon-reduction.js +6 -0
  137. package/lib/entries/icon-refresh-left.d.ts +2 -0
  138. package/lib/entries/icon-refresh-left.js +6 -0
  139. package/lib/entries/icon-refresh-right.d.ts +2 -0
  140. package/lib/entries/icon-refresh-right.js +6 -0
  141. package/lib/entries/icon-refresh.d.ts +2 -0
  142. package/lib/entries/icon-refresh.js +6 -0
  143. package/lib/entries/icon-search.d.ts +2 -0
  144. package/lib/entries/icon-search.js +6 -0
  145. package/lib/entries/icon-select.d.ts +2 -0
  146. package/lib/entries/icon-select.js +6 -0
  147. package/lib/entries/icon-sort.d.ts +2 -0
  148. package/lib/entries/icon-sort.js +6 -0
  149. package/lib/entries/icon-success.d.ts +2 -0
  150. package/lib/entries/icon-success.js +6 -0
  151. package/lib/entries/icon-sun.d.ts +2 -0
  152. package/lib/entries/icon-sun.js +6 -0
  153. package/lib/entries/icon-theme-default.d.ts +2 -0
  154. package/lib/entries/icon-theme-default.js +6 -0
  155. package/lib/entries/icon-warn.d.ts +2 -0
  156. package/lib/entries/icon-warn.js +6 -0
  157. package/lib/entries/icon-zoom-in.d.ts +2 -0
  158. package/lib/entries/icon-zoom-in.js +6 -0
  159. package/lib/entries/icon-zoom-out.d.ts +2 -0
  160. package/lib/entries/icon-zoom-out.js +6 -0
  161. package/lib/entries/image-preview.d.ts +10 -0
  162. package/lib/entries/image-preview.js +6 -0
  163. package/lib/entries/image.d.ts +2 -0
  164. package/lib/entries/image.js +6 -0
  165. package/lib/entries/input-number.d.ts +2 -0
  166. package/lib/entries/input-number.js +6 -0
  167. package/lib/entries/input.d.ts +2 -0
  168. package/lib/entries/input.js +6 -0
  169. package/lib/entries/list.d.ts +3 -0
  170. package/lib/entries/list.js +6 -0
  171. package/lib/entries/loading.d.ts +2 -0
  172. package/lib/entries/loading.js +2 -0
  173. package/lib/entries/mask.d.ts +2 -0
  174. package/lib/entries/mask.js +6 -0
  175. package/lib/entries/md-input.d.ts +2 -0
  176. package/lib/entries/md-input.js +6 -0
  177. package/lib/entries/menu.d.ts +3 -0
  178. package/lib/entries/menu.js +6 -0
  179. package/lib/entries/message.d.ts +6 -0
  180. package/lib/entries/message.js +2 -0
  181. package/lib/entries/modal-box.d.ts +6 -0
  182. package/lib/entries/modal-box.js +2 -0
  183. package/lib/entries/modal.d.ts +4 -0
  184. package/lib/entries/modal.js +6 -0
  185. package/lib/entries/notification.d.ts +7 -0
  186. package/lib/entries/notification.js +6 -0
  187. package/lib/entries/page-header.d.ts +4 -0
  188. package/lib/entries/page-header.js +6 -0
  189. package/lib/entries/pagination.d.ts +9 -0
  190. package/lib/entries/pagination.js +6 -0
  191. package/lib/entries/polygon.d.ts +2 -0
  192. package/lib/entries/polygon.js +6 -0
  193. package/lib/entries/popconfirm.d.ts +3 -0
  194. package/lib/entries/popconfirm.js +2 -0
  195. package/lib/entries/popover.d.ts +1 -0
  196. package/lib/entries/popover.js +2 -0
  197. package/lib/entries/qrcode.d.ts +2 -0
  198. package/lib/entries/qrcode.js +6 -0
  199. package/lib/entries/radio-group.d.ts +3 -0
  200. package/lib/entries/radio-group.js +6 -0
  201. package/lib/entries/radio.d.ts +2 -0
  202. package/lib/entries/radio.js +6 -0
  203. package/lib/entries/select-ori.d.ts +2 -0
  204. package/lib/entries/select-ori.js +6 -0
  205. package/lib/entries/select.d.ts +4 -0
  206. package/lib/entries/select.js +6 -0
  207. package/lib/entries/space.d.ts +2 -0
  208. package/lib/entries/space.js +6 -0
  209. package/lib/entries/switch.d.ts +2 -0
  210. package/lib/entries/switch.js +6 -0
  211. package/lib/entries/tabbar-item.d.ts +2 -0
  212. package/lib/entries/tabbar-item.js +6 -0
  213. package/lib/entries/tabbar.d.ts +3 -0
  214. package/lib/entries/tabbar.js +6 -0
  215. package/lib/entries/table.d.ts +3 -0
  216. package/lib/entries/table.js +6 -0
  217. package/lib/entries/tabs.d.ts +3 -0
  218. package/lib/entries/tabs.js +2 -0
  219. package/lib/entries/tag.d.ts +2 -0
  220. package/lib/entries/tag.js +6 -0
  221. package/lib/entries/theme-color.d.ts +3 -0
  222. package/lib/entries/theme-color.js +6 -0
  223. package/lib/entries/theme.d.ts +9 -0
  224. package/lib/entries/theme.js +6 -0
  225. package/lib/entries/transition.d.ts +1 -0
  226. package/lib/entries/transition.js +2 -0
  227. package/lib/entries/upload.d.ts +3 -0
  228. package/lib/entries/upload.js +6 -0
  229. package/lib/entries/utils.d.ts +1 -0
  230. package/lib/entries/utils.js +2 -0
  231. package/lib/form/form_inner.d.ts +1 -0
  232. package/lib/{form_inner-Cnwb6f_Q.js → form/form_inner.js} +9 -9
  233. package/lib/form/form_item.d.ts +2 -1
  234. package/lib/form/form_item.js +148 -2
  235. package/lib/form/form_item.less_inline.js +4 -0
  236. package/lib/form/index.d.ts +3 -2
  237. package/lib/form/index.js +191 -2
  238. package/lib/form/index.less_inline.js +4 -0
  239. package/lib/icon/arrow_down.js +1 -1
  240. package/lib/icon/arrow_left.js +1 -1
  241. package/lib/icon/arrow_right.js +1 -1
  242. package/lib/icon/arrow_up.js +1 -1
  243. package/lib/icon/base.d.ts +2 -1
  244. package/lib/icon/base.js +63 -2
  245. package/lib/icon/calendar.js +1 -1
  246. package/lib/icon/caret_bottom.js +1 -1
  247. package/lib/icon/caret_top.js +1 -1
  248. package/lib/icon/close.js +1 -1
  249. package/lib/icon/close_filled.js +1 -1
  250. package/lib/icon/copy.d.ts +6 -0
  251. package/lib/icon/copy.js +13 -0
  252. package/lib/icon/d_arrow_left.js +1 -1
  253. package/lib/icon/d_arrow_right.js +1 -1
  254. package/lib/icon/delete.d.ts +5 -0
  255. package/lib/icon/delete.js +10 -0
  256. package/lib/icon/eye_outline.d.ts +6 -0
  257. package/lib/icon/eye_outline.js +13 -0
  258. package/lib/icon/font_icon.js +1 -1
  259. package/lib/icon/icon_style.d.ts +2 -0
  260. package/lib/icon/icon_style.js +6 -0
  261. package/lib/icon/index.less_inline.js +4 -0
  262. package/lib/icon/info.js +1 -1
  263. package/lib/icon/loading.js +1 -1
  264. package/lib/icon/minus.d.ts +5 -0
  265. package/lib/icon/minus.js +10 -0
  266. package/lib/icon/moon.js +1 -1
  267. package/lib/icon/more.js +1 -1
  268. package/lib/icon/picture.d.ts +5 -0
  269. package/lib/icon/picture.js +10 -0
  270. package/lib/icon/plus.d.ts +5 -0
  271. package/lib/icon/plus.js +10 -0
  272. package/lib/icon/reduction.js +1 -1
  273. package/lib/icon/refresh.js +1 -1
  274. package/lib/icon/refresh_left.js +1 -1
  275. package/lib/icon/refresh_right.js +1 -1
  276. package/lib/icon/search.js +1 -1
  277. package/lib/icon/select.js +1 -1
  278. package/lib/icon/sort.js +1 -1
  279. package/lib/icon/success.js +1 -1
  280. package/lib/icon/sun.js +1 -1
  281. package/lib/icon/theme_default.js +1 -1
  282. package/lib/icon/warn.js +1 -1
  283. package/lib/icon/zoom_in.js +1 -1
  284. package/lib/icon/zoom_out.js +1 -1
  285. package/lib/image/image_preview.js +91 -2
  286. package/lib/image/image_preview.less_inline.js +4 -0
  287. package/lib/image/index.js +163 -2
  288. package/lib/image/index.less_inline.js +4 -0
  289. package/lib/index.d.ts +14 -0
  290. package/lib/index.js +75 -65
  291. package/lib/input/index.js +4 -4
  292. package/lib/{input-DUBlLEXS.js → input/index.less_inline.js} +1 -1
  293. package/lib/{input_inner-x4GfLGjj.js → input/input_inner.less_inline.js} +1 -1
  294. package/lib/input_number/index.d.ts +59 -0
  295. package/lib/input_number/index.js +203 -0
  296. package/lib/input_number/index.less_inline.js +4 -0
  297. package/lib/input_number/style.d.ts +2 -0
  298. package/lib/input_number/style.js +6 -0
  299. package/lib/list/index.js +52 -2
  300. package/lib/list/index.less_inline.js +4 -0
  301. package/lib/loading/index.js +1 -1
  302. package/lib/mask/index.d.ts +1 -1
  303. package/lib/mask/index.js +109 -2
  304. package/lib/mask/index.less_inline.js +4 -0
  305. package/lib/md_input/index.js +59 -2
  306. package/lib/md_input/index.less_inline.js +4 -0
  307. package/lib/menu/index.js +275 -2
  308. package/lib/menu/index.less_inline.js +4 -0
  309. package/lib/message/index.js +1 -1
  310. package/lib/modal/index.js +199 -2
  311. package/lib/modal/index.less_inline.js +4 -0
  312. package/lib/modal/modal_box.d.ts +22 -0
  313. package/lib/modal/modal_box.js +21 -22
  314. package/lib/notification/index.d.ts +212 -0
  315. package/lib/notification/index.js +380 -0
  316. package/lib/notification/index.less_inline.js +4 -0
  317. package/lib/notification/placement.d.ts +49 -0
  318. package/lib/notification/placement.js +48 -0
  319. package/lib/notification/style.d.ts +2 -0
  320. package/lib/notification/style.js +6 -0
  321. package/lib/page_header/index.js +100 -2
  322. package/lib/page_header/index.less_inline.js +4 -0
  323. package/lib/pagination/index.js +214 -2
  324. package/lib/pagination/index.less_inline.js +4 -0
  325. package/lib/polygon/index.js +21 -2
  326. package/lib/{polygon-DhhovlrG.js → polygon/index.less_inline.js} +2 -18
  327. package/lib/qrcode/index.js +65 -2
  328. package/lib/qrcode/index.less_inline.js +4 -0
  329. package/lib/select/index.js +355 -3
  330. package/lib/select/index.less_inline.js +4 -0
  331. package/lib/select_ori/index.js +58 -2
  332. package/lib/select_ori/index.less_inline.js +4 -0
  333. package/lib/space/index.js +40 -2
  334. package/lib/space/index.less_inline.js +4 -0
  335. package/lib/{animation-Bo4jbSGK.js → styles/animation/index.css_inline.js} +2 -3
  336. package/lib/styles/animation/index.js +6 -2
  337. package/lib/{mask-Ox6CoyFB.js → styles/mask/index.css_inline.js} +2 -3
  338. package/lib/styles/mask/index.js +6 -2
  339. package/lib/switch/index.js +51 -2
  340. package/lib/switch/index.less_inline.js +4 -0
  341. package/lib/tabbar/index.js +97 -2
  342. package/lib/tabbar/index.less_inline.js +4 -0
  343. package/lib/tabbar/item.js +61 -2
  344. package/lib/tabbar/item.less_inline.js +4 -0
  345. package/lib/table/index.js +234 -2
  346. package/lib/table/index.less_inline.js +4 -0
  347. package/lib/tabs/index.js +1 -1
  348. package/lib/tag/index.js +75 -2
  349. package/lib/tag/index.less_inline.js +4 -0
  350. package/lib/theme/index.js +86 -2
  351. package/lib/theme/index.less_inline.js +4 -0
  352. package/lib/theme/theme_color.js +1 -1
  353. package/lib/upload/index.d.ts +170 -0
  354. package/lib/upload/index.js +848 -0
  355. package/lib/upload/index.less_inline.js +4 -0
  356. package/lib/upload/style.d.ts +2 -0
  357. package/lib/upload/style.js +6 -0
  358. package/lib/utils/context_provide.d.ts +1 -0
  359. package/lib/utils/context_provide.js +1 -1
  360. package/lib/utils/event.d.ts +30 -0
  361. package/lib/utils/index.d.ts +3 -0
  362. package/lib/utils/index.js +1 -1
  363. package/lib/utils/popover.js +1 -1
  364. package/lib/utils/signal_types.d.ts +5 -0
  365. package/lib/utils/transition.d.ts +28 -0
  366. package/lib/utils/transition.js +1 -1
  367. package/package.json +39 -18
  368. package/styles/animation.css +2 -2
  369. package/styles/container.css +8 -8
  370. package/styles/datepicker.css +9 -9
  371. package/styles/dialog.css +7 -7
  372. package/styles/loading.css +17 -17
  373. package/styles/message.css +9 -9
  374. package/styles/modal_box.css +3 -3
  375. package/styles/notification.css +17 -0
  376. package/styles/popover.css +11 -14
  377. package/styles/reset.css +13 -15
  378. package/styles/scrollbar.css +5 -5
  379. package/styles/select.css +6 -6
  380. package/styles/tabs.css +3 -3
  381. package/styles/theme-coral.css +35 -0
  382. package/styles/theme-jade.css +35 -0
  383. package/styles/theme-tangerine.css +35 -0
  384. package/styles/transition.css +1 -1
  385. package/styles/vars.css +41 -7
  386. package/lib/base-Dyj1rzaK.js +0 -61
  387. package/lib/calendar-CvlUsN6w.js +0 -146
  388. package/lib/card-3DM-lJQV.js +0 -63
  389. package/lib/carousel-DvkZ1YXq.js +0 -276
  390. package/lib/check-doQ2ZpQj.js +0 -117
  391. package/lib/collapse-B6-Rn05A.js +0 -102
  392. package/lib/color_picker-0a-IGZY9.js +0 -41
  393. package/lib/date_picker-BDN2PAz5.js +0 -99
  394. package/lib/date_picker_ori-BXFs1eET.js +0 -120
  395. package/lib/description_panel--AKXBzLL.js +0 -53
  396. package/lib/dialog_container-BNPQ9n0V.js +0 -145
  397. package/lib/esm-DAha108i.js +0 -270
  398. package/lib/form-DJxvBiLy.js +0 -190
  399. package/lib/form_item-BqPMRABd.js +0 -147
  400. package/lib/image-CVQai6NX.js +0 -162
  401. package/lib/image_preview-DfQAKSJH.js +0 -90
  402. package/lib/item-CQ2Sknbz.js +0 -14
  403. package/lib/item-DI6mQXtB.js +0 -117
  404. package/lib/item-D_ZOPXuE.js +0 -60
  405. package/lib/list-MG8PRzos.js +0 -51
  406. package/lib/mask-Bx-yNIJv.js +0 -108
  407. package/lib/md_input-BX3bujz8.js +0 -58
  408. package/lib/menu-DKscK5mw.js +0 -274
  409. package/lib/modal-Cwi3qlEf.js +0 -198
  410. package/lib/page_header-ujV3pncE.js +0 -99
  411. package/lib/pagination-aRbGd3Rf.js +0 -213
  412. package/lib/qrcode-Dip8uLSA.js +0 -64
  413. package/lib/select-BZMDj5VE.js +0 -354
  414. package/lib/select_ori-C7sUZxen.js +0 -57
  415. package/lib/space-CKuTk0YB.js +0 -39
  416. package/lib/switch-wh2-ivty.js +0 -50
  417. package/lib/tabbar-CBXK-_AV.js +0 -96
  418. package/lib/table-BQxMD2Ae.js +0 -233
  419. package/lib/tag-Di1z9PoZ.js +0 -74
  420. package/lib/theme-CLbBS-in.js +0 -85
  421. package/styles/dark.css +0 -13
@@ -1,276 +0,0 @@
1
- import e from "./base.js";
2
- import { parseAttrValue as t } from "./utils/index.js";
3
- import { $ as n, $$ as r, $one as i, debounce as a, getAttr as o, iterate as s, off as c, on as l, shouldEventNext as u } from "ph-utils/browser";
4
- //#region src/components/carousel/index.less?inline
5
- var d = ":host{box-sizing:border-box;width:100%;height:180px;margin:0 auto;display:block;position:relative;overflow:hidden}.container{box-sizing:border-box;min-width:900%;height:100%;display:flex;position:relative}.nav-button{cursor:pointer;z-index:20;color:#fff;background-color:#292d3d4d;border:none;border-radius:50%;outline:none;justify-content:center;align-items:center;width:30px;height:30px;margin:0;padding:0;font-size:16px;transition:background-color .3s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.nav-button:hover{background-color:#292d3d66}.nav-button:active{background-color:#292d3d80}.nav-prev{left:20px}.nav-next{right:20px}.pagination{z-index:2;justify-content:center;align-items:center;gap:8px;width:100%;display:flex;position:absolute;bottom:10px;left:0}.bullet{cursor:pointer;background-color:#0000004d;border-radius:50%;width:8px;height:8px;transition:background-color .3s;display:inline-block}.bullet.active{background-color:var(--l-primary-color,#722ed1)}";
6
- //#endregion
7
- //#region src/components/carousel/timer.ts
8
- function f(e, t = 3e3) {
9
- let n = 0, r = !1, i = null;
10
- function a() {
11
- r || (r = !0, n = 0, i = requestAnimationFrame(s));
12
- }
13
- function o() {
14
- r = !1, i &&= (cancelAnimationFrame(i), null);
15
- }
16
- function s(a) {
17
- r && (n ||= a, a - n >= t && (e(), n = a), i = requestAnimationFrame(s));
18
- }
19
- return {
20
- start: a,
21
- stop: o
22
- };
23
- }
24
- //#endregion
25
- //#region src/components/carousel/index.ts
26
- var p = class extends e {
27
- static baseName = "carousel";
28
- arrows = "hover";
29
- currentIndex = 0;
30
- allIndex = -1;
31
- #e = 0;
32
- loop = !0;
33
- observer;
34
- autoplay = !1;
35
- #t = void 0;
36
- #n = 0;
37
- #r = !1;
38
- #i = 0;
39
- #a = 0;
40
- #o;
41
- static get observedAttributes() {
42
- return [
43
- "arrows",
44
- "loop",
45
- "current-index",
46
- "autoplay"
47
- ];
48
- }
49
- attributeChangedCallback(e, n, r) {
50
- switch (e) {
51
- case "arrows":
52
- let e = t(r, "hover");
53
- if (e !== this.arrows) {
54
- this.arrows = e;
55
- let t = document.createDocumentFragment();
56
- this.renderArrows(t), this.root.appendChild(t);
57
- }
58
- break;
59
- case "loop":
60
- this.loop = t(r, !1, "loop");
61
- break;
62
- case "current-index":
63
- let n = t(r, 0);
64
- n !== this.currentIndex && this.#h(this.loop ? n + 1 : n);
65
- break;
66
- case "autoplay":
67
- let i = t(r, !1, "autoplay");
68
- i !== this.autoplay && (this.autoplay = i, this.#t && (i ? this.#t.start() : this.#t.stop()));
69
- }
70
- }
71
- connectedCallback() {
72
- this.loadStyleText(d), this.style.setProperty("--carousel-width", `${Math.floor(this.clientWidth)}px`);
73
- let e = o(this, "height");
74
- e && this.style.setProperty("height", `${e}px`), this.#d(), super.connectedCallback();
75
- }
76
- afterInit() {
77
- this.setAttribute("data-page", "__stop__"), l(this.root, "click", this.#p), this.#c(), this.#t = f(() => {
78
- this.#m("next");
79
- }), this.autoplay && this.#t.start(), this.#o = i(".container", this.root), l(this.#o, "pointerdown", this.#b), l(this.#o, "pointerup", this.#S), l(this.#o, "pointermove", this.#x), l(this.#o, "pointercancel", this.#w), l(this.#o, "pointerleave", this.#w);
80
- }
81
- beforeDestroy() {
82
- c(this, "mouseenter", this.#g), c(this, "mouseleave", this.#_), c(this.root, "click", this.#p), c(this.#o, "pointerdown", this.#b), c(this.#o, "pointerup", this.#S), c(this.#o, "pointermove", this.#x), c(this.#o, "pointercancel", this.#w), c(this.#o, "pointerleave", this.#w), this.#o = void 0, this.#l(!0), this.#t.stop(), this.#t = void 0;
83
- }
84
- render() {
85
- let e = document.createDocumentFragment(), t = "";
86
- if (this.allIndex > 0) {
87
- let e = this.loop ? this.currentIndex + 1 : this.currentIndex, n = Math.floor(e * this.clientWidth * -1);
88
- t = `transform:translateX(${n}px);`;
89
- let r = Math.floor(this.clientWidth * (this.allIndex + 3));
90
- t += `min-width:${r}px;`, this.#e = n;
91
- }
92
- let n = r("div", {
93
- class: "container",
94
- style: t,
95
- "data-container": "1"
96
- });
97
- n.appendChild(r("slot")), e.appendChild(n), this.renderArrows(e);
98
- let i = r("div", {
99
- class: "pagination",
100
- part: "pagination"
101
- });
102
- return this.allIndex >= 0 && i.replaceChildren(this.#s()), e.appendChild(i), e;
103
- }
104
- renderArrows(e) {
105
- if (this.arrows !== "never") this.renderNavigationButton("prev", e), this.renderNavigationButton("next", e), this.arrows === "hover" && (l(this, "mouseenter", this.#g), l(this, "mouseleave", this.#_));
106
- else {
107
- c(this, "mouseenter", this.#g), c(this, "mouseleave", this.#_);
108
- let e = n(".nav-button", this.root);
109
- e.length && s(e, (e) => {
110
- e.remove();
111
- });
112
- }
113
- }
114
- #s() {
115
- let e = document.createDocumentFragment();
116
- for (let t = 0; t <= this.allIndex; t++) e.appendChild(r("div", {
117
- class: ["bullet", t === this.currentIndex ? "active" : ""],
118
- "aria-label": `第 ${t + 1} 页`,
119
- "data-page": `${t}`,
120
- id: `bullet-${t}`
121
- }));
122
- return e;
123
- }
124
- renderNavigationButton(e = "prev", t) {
125
- let n = i(`.nav-${e}`, this.root);
126
- if (n == null) {
127
- let i = e === "prev" ? "left" : "right";
128
- n = r("button", {
129
- class: `nav-button nav-${e}`,
130
- type: "button",
131
- innerHTML: `<l-arrow-${i}-icon></l-arrow-${i}-icon>`,
132
- "aria-label": e,
133
- "data-page": e
134
- }), t.appendChild(n);
135
- }
136
- this.arrows === "always" ? n.style.display = "flex" : n.style.display = "none";
137
- }
138
- #c() {
139
- this.observer ??= new MutationObserver(this.#f), this.observer.observe(this, { childList: !0 });
140
- }
141
- #l(e = !1) {
142
- this.observer && (this.observer.disconnect(), e && (this.observer = void 0));
143
- }
144
- #u = a(() => {
145
- let e = i("#cloneFirst", this);
146
- e && e.remove();
147
- let t = i("#cloneLast", this);
148
- if (t && t.remove(), this.#d(), this.#o) {
149
- if (this.allIndex > 0) {
150
- let e = Math.floor(this.clientWidth * (this.allIndex + 3));
151
- this.#o.style.minWidth = `${e}px`;
152
- } else this.#o.style.minWidth = "900%";
153
- let e = this.loop ? this.currentIndex + 1 : this.currentIndex, t = Math.floor(e * this.clientWidth * -1);
154
- this.#o.style.transform = `translateX(${t}px)`, this.#e = t;
155
- }
156
- let n = i(".pagination", this.root);
157
- n && n.replaceChildren(this.#s()), this.#c();
158
- }, 300);
159
- #d() {
160
- let e = this.children, t = e.length;
161
- if (t > 0 && this.loop) {
162
- let n = e[0].cloneNode(!0);
163
- n.id = "cloneFirst";
164
- let r = e[t - 1].cloneNode(!0);
165
- r.id = "cloneLast", this.children[t - 1].insertAdjacentElement("afterend", n), this.children[0].insertAdjacentElement("beforebegin", r);
166
- }
167
- this.allIndex = this.children.length - (this.loop ? 3 : 1);
168
- }
169
- #f = (e) => {
170
- for (let t of e) t.type === "childList" && (this.#l(), this.#u());
171
- };
172
- #p = (e) => {
173
- let [t, n] = u(e, "data-page", this.root);
174
- t && this.#m(n);
175
- };
176
- #m(e) {
177
- this.#t.stop();
178
- let t = this.loop ? this.currentIndex + 1 : this.currentIndex, n = t;
179
- if (e === "prev") n = this.loop && this.currentIndex === 0 ? 0 : t - 1, n < 0 && (n = 0);
180
- else if (e === "next") n = this.loop && this.currentIndex === this.allIndex ? this.allIndex + 2 : t + 1, !this.loop && n > this.allIndex && (n = this.allIndex);
181
- else {
182
- let t = Number(e);
183
- t !== this.currentIndex && (n = this.loop ? t + 1 : t);
184
- }
185
- n !== t && this.#h(n), requestAnimationFrame(() => {
186
- this.#C();
187
- });
188
- }
189
- #h(e) {
190
- if (this.#o) {
191
- let t = Math.floor(e * this.clientWidth * -1), n = this.#o.style.transform;
192
- this.#o.animate([{ transform: n }, { transform: `translateX(${t}px)` }], { duration: 300 }).addEventListener("finish", () => {
193
- let n = t;
194
- this.loop && e === this.allIndex + 2 ? n = Math.floor(this.clientWidth * -1) : this.loop && e === 0 && (n = Math.floor(this.clientWidth * (this.allIndex + 1) * -1)), this.#o.style.transform = `translateX(${n}px)`, this.#e = n;
195
- }, { once: !0 });
196
- }
197
- this.currentIndex = this.loop && this.allIndex > 0 && e === this.allIndex + 2 ? 0 : this.loop && this.allIndex > 0 && e === 0 ? this.allIndex : this.loop ? e - 1 : e;
198
- let t = i(".bullet.active", this.root);
199
- t && t.classList.remove("active");
200
- let n = i(`#bullet-${this.currentIndex}`, this.root);
201
- n && n.classList.add("active");
202
- }
203
- #g = () => {
204
- if (this.arrows === "hover") {
205
- let e = n(".nav-button", this.root);
206
- s(e, (e) => {
207
- e.style.display = "flex", this.#v(e, !0);
208
- });
209
- }
210
- };
211
- #_ = () => {
212
- if (this.arrows === "hover") {
213
- let e = n(".nav-button", this.root);
214
- s(e, (e) => {
215
- this.#v(e, !1);
216
- });
217
- }
218
- };
219
- #v(e, t = !0) {
220
- let n = e.getAttribute("data-page") === "prev" ? -10 : 10, r = [];
221
- t ? r.push({
222
- opacity: 0,
223
- transform: `translate3d(${n}px, -50%, 0)`
224
- }, {
225
- opacity: 1,
226
- transform: "translate3d(0px, -50%, 0)"
227
- }) : r.push({
228
- opacity: 1,
229
- transform: "translate3d(0px, -50%, 0)"
230
- }, {
231
- opacity: 0,
232
- transform: `translate3d(${n}px, -50%, 0)`
233
- });
234
- let i = e.animate(r, {
235
- duration: 300,
236
- fill: "both"
237
- });
238
- t || i.addEventListener("finish", () => {
239
- e.style.display = "none";
240
- }, { once: !0 });
241
- }
242
- #y = () => {
243
- let e = i(".container", this.root);
244
- e.style.transition = "transform 0.3s", requestAnimationFrame(() => {
245
- e.style.transform = `translateX(${this.#e}px)`;
246
- }), e.addEventListener("transitionend", () => {
247
- e.style.transition = "";
248
- }, { once: !0 });
249
- };
250
- #b = (e) => {
251
- this.#n = e.clientX, this.#r = !0, this.#i = Date.now(), this.#t.stop();
252
- };
253
- #x = (e) => {
254
- this.#r && (this.#a && cancelAnimationFrame(this.#a), this.#a = requestAnimationFrame(() => {
255
- let t = Math.floor(e.clientX - this.#n);
256
- if (!this.loop && (t < 0 && this.currentIndex === this.allIndex || t > 0 && this.currentIndex === 0)) return;
257
- let n = this.#e + t;
258
- this.#o.style.transform = `translateX(${n}px)`;
259
- }), e.preventDefault());
260
- };
261
- #S = (e) => {
262
- if (!this.#r) return;
263
- let t = Date.now() - this.#i, n = e.clientX - this.#n;
264
- if (this.#r = !1, n === 0) return;
265
- let r = "cancel";
266
- t <= 200 ? n >= 20 ? r = "prev" : n <= -20 && (r = "next") : n >= this.clientWidth / 2 ? r = "prev" : n <= -this.clientWidth / 2 && (r = "next"), r === "cancel" ? this.#y() : this.#m(r), this.#C();
267
- };
268
- #C = () => {
269
- this.autoplay && this.#t.start();
270
- };
271
- #w = () => {
272
- this.#r && (this.#r = !1, this.#y(), this.#C());
273
- };
274
- };
275
- //#endregion
276
- export { p as t };
@@ -1,117 +0,0 @@
1
- import { parseAttrValue as e, stopSignal as t } from "./utils/index.js";
2
- import { t as n } from "./esm-DAha108i.js";
3
- import { t as r } from "./form_inner-Cnwb6f_Q.js";
4
- import { $$ as i, addClass as a, off as o, on as s, removeClass as c, toggleClass as l } from "ph-utils/browser";
5
- //#region src/components/check/check.ts
6
- var u = class extends r {
7
- _checked;
8
- _inputType;
9
- $input;
10
- _groupCtx;
11
- _groupCtxStop;
12
- setChecked(e) {
13
- this._checked = e, this.checkedChange();
14
- }
15
- getChecked() {
16
- return this._checked;
17
- }
18
- constructor() {
19
- super(), this._checked = !1, this._inputType = "radio", Object.defineProperty(this, "checked", {
20
- configurable: !0,
21
- enumerable: !0,
22
- get: this.getChecked,
23
- set: this.setChecked
24
- });
25
- }
26
- static get observedAttributes() {
27
- return [
28
- "checked",
29
- "label",
30
- "button",
31
- "indeterminate",
32
- ...r.observedAttributes
33
- ];
34
- }
35
- connectedCallback() {
36
- super.connectedCallback(), this.getChecked() && this.setChecked(!0), this.isDisabled() && a(this, "is-disabled"), this._updateIndeterminate(), this.emitInject("check-context-request", (e) => {
37
- this._groupCtx = e;
38
- }), this._groupCtxStop = n(() => {
39
- if (this.value == null) return;
40
- let e = this._groupCtx ? this._groupCtx() : [];
41
- this.setChecked(e.includes(this.value));
42
- });
43
- }
44
- afterInit() {
45
- s(this, "click", this.#e);
46
- }
47
- beforeDestroy() {
48
- o(this, "click", this.#e), this._groupCtxStop = t(this._groupCtxStop);
49
- }
50
- render() {
51
- let e = document.createDocumentFragment(), t = i("input", {
52
- type: this._inputType,
53
- class: "l-check__input",
54
- name: this.getName(),
55
- value: this.value,
56
- checked: this.getChecked(),
57
- disabled: this.isDisabled() ? "disabled" : void 0
58
- });
59
- if (this.$input = t, e.appendChild(t), !this._state.button) {
60
- let t = i("span", { class: "l-check__inner" });
61
- e.appendChild(t);
62
- }
63
- let n = i("label", {
64
- class: "l-check__label",
65
- part: "label"
66
- }), r = i("slot", { textContent: this._state.label });
67
- return n.appendChild(r), e.appendChild(n), e;
68
- }
69
- attributeChange(t, n, r) {
70
- switch (t) {
71
- case "checked":
72
- let n = e(r, !1, "checked");
73
- this.setChecked(n);
74
- break;
75
- case "button":
76
- this._state[t] = e(r, !1, t);
77
- break;
78
- case "indeterminate":
79
- let i = e(r, !1, t);
80
- this._state.indeterminate = i, this._updateIndeterminate();
81
- break;
82
- case "label": this._state.label = r;
83
- }
84
- }
85
- checkedChange() {
86
- this.getChecked() ? a(this, "is-checked") : c(this, "is-checked"), this.$input && (this.$input.checked = this.getChecked());
87
- }
88
- disabledChange() {
89
- l(this, "is-disabled"), this.$input && (this.$input.disabled = this.isDisabled());
90
- }
91
- _updateIndeterminate() {
92
- this._state.indeterminate ? a(this, "is-indeterminate") : c(this, "is-indeterminate");
93
- }
94
- #e = () => {
95
- if (!this.isDisabled()) {
96
- if (this.value && this._groupCtx) this.emitChange();
97
- else {
98
- let e = this._inputType === "radio" || !this.getChecked();
99
- this.setChecked(e), this.emitChange();
100
- }
101
- }
102
- };
103
- emitChange() {
104
- this.emit("change", {
105
- detail: {
106
- value: this.value,
107
- name: this.getName(),
108
- checked: this.getChecked()
109
- },
110
- composed: !0,
111
- bubbles: !0
112
- });
113
- }
114
- _doChangeAction() {}
115
- }, d = ":host{cursor:pointer;outline:none;align-items:center;width:auto;transition:color .3s,border-color .3s,background-color .3s;display:inline-flex;position:relative}.l-check__input{z-index:-1;opacity:0;width:0;height:0;margin:0;position:absolute}.l-check__inner{width:var(--l-check-size,14px);height:var(--l-check-size,14px);border-radius:var(--l-check-border-radius,var(--l-border-radius,13px));box-sizing:border-box;border:1px solid #dcddd9;flex-shrink:0;justify-content:center;align-items:center;margin-right:5px;transition:border-color .3s ease-in-out;display:flex;position:relative}.l-check__label{cursor:inherit;line-height:1;transition:color .3s}:host(.is-checked) .l-check__inner{border-color:var(--l-primary-color,#722ed1)}:host(.is-disabled){cursor:not-allowed}:host(.is-disabled) .l-check__label{color:var(--l-disabled-color,#e6e6e6)}:host([button]){height:var(--l-form-control-height,32px);border-radius:inherit;border:1px solid #c0c4cc;border-left-width:0;justify-content:center;margin-left:0;padding:0 15px}:host([button]:first-child){border-top-left-radius:var(--l-check-border-radius,var(--l-border-radius,13px));border-bottom-left-radius:var(--l-check-border-radius,var(--l-border-radius,13px));border-left-width:1px}:host([button]:last-child){border-top-right-radius:var(--l-check-border-radius,var(--l-border-radius,13px));border-bottom-right-radius:var(--l-check-border-radius,var(--l-border-radius,13px))}:host([button].is-checked){background-color:var(--l-primary-color,#722ed1);color:#fff;border-color:var(--l-primary-color,#722ed1);border-right-color:#fff}:host([button].is-checked:last-child){border-right-color:var(--l-primary-color,#722ed1)}";
116
- //#endregion
117
- export { u as n, d as t };
@@ -1,102 +0,0 @@
1
- import e from "./base.js";
2
- import { kebabToCamel as t, parseAttrValue as n, unitNumberStr as r } from "./utils/index.js";
3
- import { n as i } from "./esm-DAha108i.js";
4
- import { $$ as a, off as o, on as s } from "ph-utils/browser";
5
- //#region src/components/collapse/index.less?inline
6
- var c = ":host{--l-collapse-border-color:var(--l-border-color,#dedede);--l-collapse-border-radius:0px;gap:var(--l-collapse-gap,0px);box-sizing:border-box;grid-template-columns:1fr;display:grid}:host(.l-collapse-grid){grid-template-columns:repeat(auto-fill,minmax(200px,1fr));align-items:start}", l = class extends e {
7
- static baseName = "collapse";
8
- context;
9
- expands;
10
- constructor() {
11
- super(), this.version = 2, this.context = i({
12
- arrowPlacement: "left",
13
- headerJustify: "flex-start",
14
- background: !1
15
- }), this.expands = i([]), this._state = {
16
- grid: !1,
17
- accordion: !1
18
- };
19
- }
20
- static get observedAttributes() {
21
- return [
22
- "arrow-placement",
23
- "header-justify",
24
- "background",
25
- "gap",
26
- "border-radius",
27
- "grid",
28
- "accordion",
29
- "prop"
30
- ];
31
- }
32
- attributeChanged(e, i, a) {
33
- switch (e) {
34
- case "arrow-placement":
35
- case "header-justify":
36
- let i = { ...this.context() };
37
- i[t(e)] = a, this.context(i);
38
- break;
39
- case "gap":
40
- this.context({
41
- ...this.context(),
42
- gap: r(a)
43
- });
44
- break;
45
- case "border-radius":
46
- this._state.borderRadius = r(a);
47
- break;
48
- case "background":
49
- this.context({
50
- ...this.context(),
51
- background: n(a, !1, e)
52
- });
53
- break;
54
- case "accordion":
55
- case "grid":
56
- this._state[e] = n(a, !1, e);
57
- break;
58
- case "prop": if (a !== this._state.prop) {
59
- this._state.prop = a;
60
- let e = [], t = a.split("&");
61
- for (let n = 0, r = t.length; n < r; n++) e.push(t[n]);
62
- this.expands(e);
63
- }
64
- }
65
- }
66
- updateDOM(e) {
67
- (e.has("gap") || e.has("borderRadius") || e.has("grid")) && this._setStyleAndClass();
68
- }
69
- render_v2() {
70
- return {
71
- template: a("slot"),
72
- style: c
73
- };
74
- }
75
- _setStyleAndClass() {
76
- this.context().gap ? this.style.setProperty("--l-collapse-gap", this.context().gap) : this.style.removeProperty("--l-collapse-gap"), this._state.borderRadius ? this.style.setProperty("--l-collapse-border-radius", this._state.borderRadius) : this.style.removeProperty("--l-collapse-border-radius"), this._state.grid ? this.classList.add("l-collapse-grid") : this.classList.remove("l-collapse-grid");
77
- }
78
- afterInit() {
79
- this._setStyleAndClass(), s(this, "collapse-context-request", this._provide), s(this, "expand-change", this._onChange);
80
- }
81
- _provide(e) {
82
- let { context: t, callback: n } = e.detail;
83
- t === "collapse-context-request" && n(this.context, this.expands);
84
- }
85
- beforeDestroy() {
86
- o(this, "collapse-context-request", this._provide), o(this, "expand-change", this._onChange);
87
- }
88
- _onChange = (e) => {
89
- let t = e.detail, n = this.expands();
90
- if (t.expand) this._state.accordion ? n = [t.prop] : n.includes(t.prop) || n.push(t.prop);
91
- else {
92
- let e = n.indexOf(t.prop);
93
- e !== -1 && n.splice(e, 1);
94
- }
95
- this.expands([...n]), this._state.prop = n.join("&"), this.emit("change", { detail: {
96
- expands: n,
97
- value: this._state.prop
98
- } });
99
- };
100
- };
101
- //#endregion
102
- export { l as t };
@@ -1,41 +0,0 @@
1
- import { initAttr as e, setAttrs as t } from "./utils/index.js";
2
- import { t as n } from "./form_inner-Cnwb6f_Q.js";
3
- import { t as r } from "./input-DUBlLEXS.js";
4
- import { $one as i, off as a, on as o } from "ph-utils/browser";
5
- //#region src/components/color_picker/index.less?inline
6
- var s = ":host{--l-input-width:60px}", c = class extends n {
7
- static baseName = "color-picker";
8
- $picker;
9
- _value = "#000000";
10
- constructor() {
11
- super(), e(this);
12
- }
13
- setValue(e) {
14
- super.setValue(e), this.$picker && (this.$picker.value = e);
15
- }
16
- connectedCallback() {
17
- this.loadStyleText([r, s]), super.connectedCallback(), this.$picker = i("input", this.root), o(this.$picker, "change", this._handleChange);
18
- }
19
- disconnectedCallback() {
20
- super.disconnectedCallback(), this.$picker &&= (a(this.$picker, "change", this._handleChange), void 0);
21
- }
22
- render() {
23
- let e = document.createElement("input");
24
- return t(e, [
25
- ["value", this.value],
26
- ["disabled", this.isDisabled()],
27
- ["name", this.getName()],
28
- ["type", "color"],
29
- ["class", "l-input l-color-picker"]
30
- ]), e;
31
- }
32
- disabledChange() {
33
- this.$picker && (this.$picker.disabled = this.isDisabled());
34
- }
35
- _handleChange = (e) => {
36
- let t = e.target.value;
37
- super.setValue(t), this.emit("change", { detail: t });
38
- };
39
- };
40
- //#endregion
41
- export { c as t };
@@ -1,99 +0,0 @@
1
- import { unitNumberStr as e } from "./utils/index.js";
2
- import { t } from "./form_inner-Cnwb6f_Q.js";
3
- import { t as n } from "./input_inner-x4GfLGjj.js";
4
- import { Popover as r } from "./utils/popover.js";
5
- import { $$ as i, on as a } from "ph-utils/browser";
6
- //#region src/components/date_picker/index.less?inline
7
- var o = ":host{height:var(--l-form-control-height,32px);border:1px solid var(--l-border-color,#dedede);border-radius:var(--l-border-radius,3px);width:var(--l-date-picker-width,140px);align-items:center;gap:8px;padding:0 8px;transition:border-color .3s;display:inline-flex}:host(:hover){border-color:var(--l-primary-color-light2,#66b3ff)}.icon{color:#00000059;flex-shrink:0;min-width:0}", s = class extends t {
8
- static baseName = "date-picker";
9
- _popover;
10
- constructor() {
11
- super(), this.version = 2, this._state = {}, this._popover = new r({
12
- trigger: "manual",
13
- reference: this,
14
- placement: "bottom-start",
15
- arrow: !1,
16
- offset: 5,
17
- theme: "date-picker",
18
- contentRender: this._popoverContentRender,
19
- onOutsideTap: this._onOuterTap
20
- });
21
- }
22
- afterInit() {
23
- this._updateWidth(), a(this, "click", this._handleTap);
24
- }
25
- beforeDestroy() {
26
- this._popover.destroy(), a(this, "off", this._handleTap), this._popover = void 0;
27
- }
28
- static get observedAttributes() {
29
- return ["width"];
30
- }
31
- attributeChange(t, n, r) {
32
- t === "width" && (this._state.width = e(r));
33
- }
34
- updateDOM(e) {
35
- e.has("width") && this._updateWidth();
36
- }
37
- render_v2() {
38
- let e = document.createDocumentFragment(), t = i("input", {
39
- class: "l-input__inner",
40
- placeholder: "请选择日期"
41
- });
42
- e.appendChild(t);
43
- let r = i("l-calendar-icon", { class: "icon" });
44
- return e.appendChild(r), {
45
- style: [o, n],
46
- template: e
47
- };
48
- }
49
- _popoverContentRender() {
50
- let e = i("div", { class: "l-date-picker-panel" }), t = i("div", { class: "l-date-picker--header" }), n = i("button", {
51
- type: "button",
52
- "aria-label": "上一年",
53
- class: "l-date-picker-header-btn",
54
- innerHTML: "<l-d-arrow-left-icon></l-d-arrow-left-icon>"
55
- });
56
- t.appendChild(n);
57
- let r = i("button", {
58
- type: "button",
59
- "aria-label": "上一月",
60
- class: "l-date-picker-header-btn",
61
- innerHTML: "<l-arrow-left-icon></l-arrow-left-icon>"
62
- });
63
- t.appendChild(r);
64
- let a = i("button", {
65
- class: "l-date-picker-header-btn l-date-picker-year-month",
66
- textContent: "2026-04"
67
- });
68
- t.appendChild(a);
69
- let o = i("button", {
70
- type: "button",
71
- "aria-label": "下一年",
72
- class: "l-date-picker-header-btn",
73
- innerHTML: "<l-arrow-right-icon></l-arrow-right-icon>"
74
- });
75
- t.appendChild(o);
76
- let s = i("button", {
77
- type: "button",
78
- "aria-label": "下一月",
79
- class: "l-date-picker-header-btn",
80
- innerHTML: "<l-d-arrow-right-icon></l-d-arrow-right-icon>"
81
- });
82
- t.appendChild(s), e.appendChild(t);
83
- let c = i("l-calendar", { class: "l-date-picker--calendar" }), l = i("div", { class: "l-date-picker--body" });
84
- l.appendChild(c), e.appendChild(l);
85
- let u = i("div", { class: "l-date-picker--footer" }), d = i("l-button", { textContent: "此刻" });
86
- return u.appendChild(d), e.appendChild(u), e;
87
- }
88
- _updateWidth() {
89
- this._state.width ? this.style.setProperty("--l-date-picker-width", this._state.width) : this.style.removeProperty("--l-date-picker-width");
90
- }
91
- _handleTap = () => {
92
- this._popover.isShow() || this._popover.show(this);
93
- };
94
- _onOuterTap = (e, t, n) => {
95
- t || n || this._popover.hide();
96
- };
97
- };
98
- //#endregion
99
- export { s as t };