litos-ui 0.21.0 → 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 (381) 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 +10 -10
  45. package/lib/{dialog_container_style-C1s0aBf7.js → dialog/dialog_container.css_inline.js} +2 -3
  46. package/lib/dialog/dialog_container.js +2 -2
  47. package/lib/dialog/dialog_container_style.js +6 -2
  48. package/lib/dialog/index.js +1 -1
  49. package/lib/entries/base.d.ts +2 -0
  50. package/lib/entries/base.js +2 -0
  51. package/lib/entries/button.d.ts +2 -0
  52. package/lib/entries/button.js +6 -0
  53. package/lib/entries/calendar.d.ts +2 -0
  54. package/lib/entries/calendar.js +6 -0
  55. package/lib/entries/card.d.ts +2 -0
  56. package/lib/entries/card.js +6 -0
  57. package/lib/entries/carousel-item.d.ts +2 -0
  58. package/lib/entries/carousel-item.js +6 -0
  59. package/lib/entries/carousel.d.ts +5 -0
  60. package/lib/entries/carousel.js +6 -0
  61. package/lib/entries/checkbox-group.d.ts +3 -0
  62. package/lib/entries/checkbox-group.js +6 -0
  63. package/lib/entries/checkbox.d.ts +2 -0
  64. package/lib/entries/checkbox.js +6 -0
  65. package/lib/entries/collapse-item.d.ts +3 -0
  66. package/lib/entries/collapse-item.js +6 -0
  67. package/lib/entries/collapse.d.ts +3 -0
  68. package/lib/entries/collapse.js +6 -0
  69. package/lib/entries/color-picker.d.ts +3 -0
  70. package/lib/entries/color-picker.js +6 -0
  71. package/lib/entries/date-picker-ori.d.ts +2 -0
  72. package/lib/entries/date-picker-ori.js +6 -0
  73. package/lib/entries/date-picker.d.ts +9 -0
  74. package/lib/entries/date-picker.js +6 -0
  75. package/lib/entries/description-panel.d.ts +4 -0
  76. package/lib/entries/description-panel.js +6 -0
  77. package/lib/entries/dialog-box.d.ts +6 -0
  78. package/lib/entries/dialog-box.js +2 -0
  79. package/lib/entries/dialog-container.d.ts +4 -0
  80. package/lib/entries/dialog-container.js +6 -0
  81. package/lib/entries/dialog.d.ts +3 -0
  82. package/lib/entries/dialog.js +2 -0
  83. package/lib/entries/form-item.d.ts +2 -0
  84. package/lib/entries/form-item.js +6 -0
  85. package/lib/entries/form.d.ts +3 -0
  86. package/lib/entries/form.js +6 -0
  87. package/lib/entries/icon-arrow-down.d.ts +2 -0
  88. package/lib/entries/icon-arrow-down.js +6 -0
  89. package/lib/entries/icon-arrow-left.d.ts +2 -0
  90. package/lib/entries/icon-arrow-left.js +6 -0
  91. package/lib/entries/icon-arrow-right.d.ts +2 -0
  92. package/lib/entries/icon-arrow-right.js +6 -0
  93. package/lib/entries/icon-arrow-up.d.ts +2 -0
  94. package/lib/entries/icon-arrow-up.js +6 -0
  95. package/lib/entries/icon-base.d.ts +2 -0
  96. package/lib/entries/icon-base.js +6 -0
  97. package/lib/entries/icon-calendar.d.ts +2 -0
  98. package/lib/entries/icon-calendar.js +6 -0
  99. package/lib/entries/icon-caret-bottom.d.ts +2 -0
  100. package/lib/entries/icon-caret-bottom.js +6 -0
  101. package/lib/entries/icon-caret-top.d.ts +2 -0
  102. package/lib/entries/icon-caret-top.js +6 -0
  103. package/lib/entries/icon-close-filled.d.ts +2 -0
  104. package/lib/entries/icon-close-filled.js +6 -0
  105. package/lib/entries/icon-close.d.ts +2 -0
  106. package/lib/entries/icon-close.js +6 -0
  107. package/lib/entries/icon-copy.d.ts +2 -0
  108. package/lib/entries/icon-copy.js +6 -0
  109. package/lib/entries/icon-d-arrow-left.d.ts +2 -0
  110. package/lib/entries/icon-d-arrow-left.js +6 -0
  111. package/lib/entries/icon-d-arrow-right.d.ts +2 -0
  112. package/lib/entries/icon-d-arrow-right.js +6 -0
  113. package/lib/entries/icon-delete.d.ts +2 -0
  114. package/lib/entries/icon-delete.js +6 -0
  115. package/lib/entries/icon-eye-outline.d.ts +2 -0
  116. package/lib/entries/icon-eye-outline.js +6 -0
  117. package/lib/entries/icon-font-icon.d.ts +2 -0
  118. package/lib/entries/icon-font-icon.js +6 -0
  119. package/lib/entries/icon-info.d.ts +2 -0
  120. package/lib/entries/icon-info.js +6 -0
  121. package/lib/entries/icon-loading.d.ts +2 -0
  122. package/lib/entries/icon-loading.js +6 -0
  123. package/lib/entries/icon-minus.d.ts +2 -0
  124. package/lib/entries/icon-minus.js +6 -0
  125. package/lib/entries/icon-moon.d.ts +2 -0
  126. package/lib/entries/icon-moon.js +6 -0
  127. package/lib/entries/icon-more.d.ts +2 -0
  128. package/lib/entries/icon-more.js +6 -0
  129. package/lib/entries/icon-picture.d.ts +2 -0
  130. package/lib/entries/icon-picture.js +6 -0
  131. package/lib/entries/icon-plus.d.ts +2 -0
  132. package/lib/entries/icon-plus.js +6 -0
  133. package/lib/entries/icon-reduction.d.ts +2 -0
  134. package/lib/entries/icon-reduction.js +6 -0
  135. package/lib/entries/icon-refresh-left.d.ts +2 -0
  136. package/lib/entries/icon-refresh-left.js +6 -0
  137. package/lib/entries/icon-refresh-right.d.ts +2 -0
  138. package/lib/entries/icon-refresh-right.js +6 -0
  139. package/lib/entries/icon-refresh.d.ts +2 -0
  140. package/lib/entries/icon-refresh.js +6 -0
  141. package/lib/entries/icon-search.d.ts +2 -0
  142. package/lib/entries/icon-search.js +6 -0
  143. package/lib/entries/icon-select.d.ts +2 -0
  144. package/lib/entries/icon-select.js +6 -0
  145. package/lib/entries/icon-sort.d.ts +2 -0
  146. package/lib/entries/icon-sort.js +6 -0
  147. package/lib/entries/icon-success.d.ts +2 -0
  148. package/lib/entries/icon-success.js +6 -0
  149. package/lib/entries/icon-sun.d.ts +2 -0
  150. package/lib/entries/icon-sun.js +6 -0
  151. package/lib/entries/icon-theme-default.d.ts +2 -0
  152. package/lib/entries/icon-theme-default.js +6 -0
  153. package/lib/entries/icon-warn.d.ts +2 -0
  154. package/lib/entries/icon-warn.js +6 -0
  155. package/lib/entries/icon-zoom-in.d.ts +2 -0
  156. package/lib/entries/icon-zoom-in.js +6 -0
  157. package/lib/entries/icon-zoom-out.d.ts +2 -0
  158. package/lib/entries/icon-zoom-out.js +6 -0
  159. package/lib/entries/image-preview.d.ts +10 -0
  160. package/lib/entries/image-preview.js +6 -0
  161. package/lib/entries/image.d.ts +2 -0
  162. package/lib/entries/image.js +6 -0
  163. package/lib/entries/input-number.d.ts +2 -0
  164. package/lib/entries/input-number.js +6 -0
  165. package/lib/entries/input.d.ts +2 -0
  166. package/lib/entries/input.js +6 -0
  167. package/lib/entries/list.d.ts +3 -0
  168. package/lib/entries/list.js +6 -0
  169. package/lib/entries/loading.d.ts +2 -0
  170. package/lib/entries/loading.js +2 -0
  171. package/lib/entries/mask.d.ts +2 -0
  172. package/lib/entries/mask.js +6 -0
  173. package/lib/entries/md-input.d.ts +2 -0
  174. package/lib/entries/md-input.js +6 -0
  175. package/lib/entries/menu.d.ts +3 -0
  176. package/lib/entries/menu.js +6 -0
  177. package/lib/entries/message.d.ts +6 -0
  178. package/lib/entries/message.js +2 -0
  179. package/lib/entries/modal-box.d.ts +6 -0
  180. package/lib/entries/modal-box.js +2 -0
  181. package/lib/entries/modal.d.ts +4 -0
  182. package/lib/entries/modal.js +6 -0
  183. package/lib/entries/notification.d.ts +7 -0
  184. package/lib/entries/notification.js +6 -0
  185. package/lib/entries/page-header.d.ts +4 -0
  186. package/lib/entries/page-header.js +6 -0
  187. package/lib/entries/pagination.d.ts +9 -0
  188. package/lib/entries/pagination.js +6 -0
  189. package/lib/entries/polygon.d.ts +2 -0
  190. package/lib/entries/polygon.js +6 -0
  191. package/lib/entries/popconfirm.d.ts +3 -0
  192. package/lib/entries/popconfirm.js +2 -0
  193. package/lib/entries/popover.d.ts +1 -0
  194. package/lib/entries/popover.js +2 -0
  195. package/lib/entries/qrcode.d.ts +2 -0
  196. package/lib/entries/qrcode.js +6 -0
  197. package/lib/entries/radio-group.d.ts +3 -0
  198. package/lib/entries/radio-group.js +6 -0
  199. package/lib/entries/radio.d.ts +2 -0
  200. package/lib/entries/radio.js +6 -0
  201. package/lib/entries/select-ori.d.ts +2 -0
  202. package/lib/entries/select-ori.js +6 -0
  203. package/lib/entries/select.d.ts +4 -0
  204. package/lib/entries/select.js +6 -0
  205. package/lib/entries/space.d.ts +2 -0
  206. package/lib/entries/space.js +6 -0
  207. package/lib/entries/switch.d.ts +2 -0
  208. package/lib/entries/switch.js +6 -0
  209. package/lib/entries/tabbar-item.d.ts +2 -0
  210. package/lib/entries/tabbar-item.js +6 -0
  211. package/lib/entries/tabbar.d.ts +3 -0
  212. package/lib/entries/tabbar.js +6 -0
  213. package/lib/entries/table.d.ts +3 -0
  214. package/lib/entries/table.js +6 -0
  215. package/lib/entries/tabs.d.ts +3 -0
  216. package/lib/entries/tabs.js +2 -0
  217. package/lib/entries/tag.d.ts +2 -0
  218. package/lib/entries/tag.js +6 -0
  219. package/lib/entries/theme-color.d.ts +3 -0
  220. package/lib/entries/theme-color.js +6 -0
  221. package/lib/entries/theme.d.ts +9 -0
  222. package/lib/entries/theme.js +6 -0
  223. package/lib/entries/transition.d.ts +1 -0
  224. package/lib/entries/transition.js +2 -0
  225. package/lib/entries/upload.d.ts +3 -0
  226. package/lib/entries/upload.js +6 -0
  227. package/lib/entries/utils.d.ts +1 -0
  228. package/lib/entries/utils.js +2 -0
  229. package/lib/form/form_inner.d.ts +1 -0
  230. package/lib/{form_inner-Cnwb6f_Q.js → form/form_inner.js} +9 -9
  231. package/lib/form/form_item.d.ts +2 -1
  232. package/lib/form/form_item.js +148 -2
  233. package/lib/form/form_item.less_inline.js +4 -0
  234. package/lib/form/index.d.ts +3 -2
  235. package/lib/form/index.js +191 -2
  236. package/lib/form/index.less_inline.js +4 -0
  237. package/lib/icon/base.js +1 -1
  238. package/lib/icon/delete.d.ts +5 -0
  239. package/lib/icon/delete.js +10 -0
  240. package/lib/icon/eye_outline.d.ts +6 -0
  241. package/lib/icon/eye_outline.js +13 -0
  242. package/lib/icon/icon_style.js +6 -2
  243. package/lib/{icon_style-J7iiDS_a.js → icon/index.less_inline.js} +2 -3
  244. package/lib/icon/minus.d.ts +5 -0
  245. package/lib/icon/minus.js +10 -0
  246. package/lib/icon/picture.d.ts +5 -0
  247. package/lib/icon/picture.js +10 -0
  248. package/lib/icon/plus.d.ts +5 -0
  249. package/lib/icon/plus.js +10 -0
  250. package/lib/image/image_preview.js +91 -2
  251. package/lib/image/image_preview.less_inline.js +4 -0
  252. package/lib/image/index.js +163 -2
  253. package/lib/image/index.less_inline.js +4 -0
  254. package/lib/index.d.ts +11 -0
  255. package/lib/index.js +47 -40
  256. package/lib/input/index.js +4 -4
  257. package/lib/{input-DUBlLEXS.js → input/index.less_inline.js} +1 -1
  258. package/lib/{input_inner-x4GfLGjj.js → input/input_inner.less_inline.js} +1 -1
  259. package/lib/input_number/index.js +3 -3
  260. package/lib/{style-C5wUmE2b.js → input_number/index.less_inline.js} +2 -3
  261. package/lib/input_number/style.js +6 -2
  262. package/lib/list/index.js +52 -2
  263. package/lib/list/index.less_inline.js +4 -0
  264. package/lib/loading/index.js +1 -1
  265. package/lib/mask/index.d.ts +1 -1
  266. package/lib/mask/index.js +109 -2
  267. package/lib/mask/index.less_inline.js +4 -0
  268. package/lib/md_input/index.js +59 -2
  269. package/lib/md_input/index.less_inline.js +4 -0
  270. package/lib/menu/index.js +275 -2
  271. package/lib/menu/index.less_inline.js +4 -0
  272. package/lib/message/index.js +1 -1
  273. package/lib/modal/index.js +199 -2
  274. package/lib/modal/index.less_inline.js +4 -0
  275. package/lib/modal/modal_box.js +21 -22
  276. package/lib/notification/index.d.ts +212 -0
  277. package/lib/notification/index.js +380 -0
  278. package/lib/notification/index.less_inline.js +4 -0
  279. package/lib/notification/placement.d.ts +49 -0
  280. package/lib/notification/placement.js +48 -0
  281. package/lib/notification/style.d.ts +2 -0
  282. package/lib/notification/style.js +6 -0
  283. package/lib/page_header/index.js +100 -2
  284. package/lib/page_header/index.less_inline.js +4 -0
  285. package/lib/pagination/index.js +214 -2
  286. package/lib/pagination/index.less_inline.js +4 -0
  287. package/lib/polygon/index.js +21 -2
  288. package/lib/{polygon-DhhovlrG.js → polygon/index.less_inline.js} +2 -18
  289. package/lib/qrcode/index.js +65 -2
  290. package/lib/qrcode/index.less_inline.js +4 -0
  291. package/lib/select/index.js +355 -3
  292. package/lib/select/index.less_inline.js +4 -0
  293. package/lib/select_ori/index.js +58 -2
  294. package/lib/select_ori/index.less_inline.js +4 -0
  295. package/lib/space/index.js +40 -2
  296. package/lib/space/index.less_inline.js +4 -0
  297. package/lib/{animation-Bo4jbSGK.js → styles/animation/index.css_inline.js} +2 -3
  298. package/lib/styles/animation/index.js +6 -2
  299. package/lib/{mask-Ox6CoyFB.js → styles/mask/index.css_inline.js} +2 -3
  300. package/lib/styles/mask/index.js +6 -2
  301. package/lib/switch/index.js +51 -2
  302. package/lib/switch/index.less_inline.js +4 -0
  303. package/lib/tabbar/index.js +97 -2
  304. package/lib/tabbar/index.less_inline.js +4 -0
  305. package/lib/tabbar/item.js +61 -2
  306. package/lib/tabbar/item.less_inline.js +4 -0
  307. package/lib/table/index.js +234 -2
  308. package/lib/table/index.less_inline.js +4 -0
  309. package/lib/tabs/index.js +1 -1
  310. package/lib/tag/index.js +75 -2
  311. package/lib/tag/index.less_inline.js +4 -0
  312. package/lib/theme/index.js +86 -2
  313. package/lib/theme/index.less_inline.js +4 -0
  314. package/lib/theme/theme_color.js +1 -1
  315. package/lib/upload/index.d.ts +170 -0
  316. package/lib/upload/index.js +848 -0
  317. package/lib/upload/index.less_inline.js +4 -0
  318. package/lib/upload/style.d.ts +2 -0
  319. package/lib/upload/style.js +6 -0
  320. package/lib/utils/context_provide.d.ts +1 -0
  321. package/lib/utils/context_provide.js +1 -1
  322. package/lib/utils/event.d.ts +30 -0
  323. package/lib/utils/index.d.ts +3 -0
  324. package/lib/utils/index.js +1 -1
  325. package/lib/utils/popover.js +1 -1
  326. package/lib/utils/signal_types.d.ts +5 -0
  327. package/lib/utils/transition.d.ts +28 -0
  328. package/lib/utils/transition.js +1 -1
  329. package/package.json +39 -18
  330. package/styles/animation.css +2 -2
  331. package/styles/container.css +8 -8
  332. package/styles/datepicker.css +9 -9
  333. package/styles/dialog.css +7 -7
  334. package/styles/loading.css +17 -17
  335. package/styles/message.css +9 -9
  336. package/styles/modal_box.css +3 -3
  337. package/styles/notification.css +17 -0
  338. package/styles/popover.css +11 -14
  339. package/styles/reset.css +13 -15
  340. package/styles/scrollbar.css +5 -5
  341. package/styles/select.css +6 -6
  342. package/styles/tabs.css +3 -3
  343. package/styles/theme-coral.css +35 -0
  344. package/styles/theme-jade.css +35 -0
  345. package/styles/theme-tangerine.css +35 -0
  346. package/styles/transition.css +1 -1
  347. package/styles/vars.css +41 -7
  348. package/lib/calendar-CvlUsN6w.js +0 -146
  349. package/lib/card-3DM-lJQV.js +0 -63
  350. package/lib/carousel-DvkZ1YXq.js +0 -276
  351. package/lib/check-doQ2ZpQj.js +0 -117
  352. package/lib/collapse-B6-Rn05A.js +0 -102
  353. package/lib/color_picker-0a-IGZY9.js +0 -41
  354. package/lib/date_picker-BDN2PAz5.js +0 -99
  355. package/lib/date_picker_ori-BXFs1eET.js +0 -120
  356. package/lib/description_panel--AKXBzLL.js +0 -53
  357. package/lib/esm-DAha108i.js +0 -270
  358. package/lib/form-DJxvBiLy.js +0 -190
  359. package/lib/form_item-BqPMRABd.js +0 -147
  360. package/lib/image-CVQai6NX.js +0 -162
  361. package/lib/image_preview-DfQAKSJH.js +0 -90
  362. package/lib/item-CQ2Sknbz.js +0 -14
  363. package/lib/item-DI6mQXtB.js +0 -117
  364. package/lib/item-D_ZOPXuE.js +0 -60
  365. package/lib/list-MG8PRzos.js +0 -51
  366. package/lib/mask-Bx-yNIJv.js +0 -108
  367. package/lib/md_input-BX3bujz8.js +0 -58
  368. package/lib/menu-DKscK5mw.js +0 -274
  369. package/lib/modal-Cwi3qlEf.js +0 -198
  370. package/lib/page_header-ujV3pncE.js +0 -99
  371. package/lib/pagination-aRbGd3Rf.js +0 -213
  372. package/lib/qrcode-Dip8uLSA.js +0 -64
  373. package/lib/select-BZMDj5VE.js +0 -354
  374. package/lib/select_ori-C7sUZxen.js +0 -57
  375. package/lib/space-CKuTk0YB.js +0 -39
  376. package/lib/switch-wh2-ivty.js +0 -50
  377. package/lib/tabbar-CBXK-_AV.js +0 -96
  378. package/lib/table-BQxMD2Ae.js +0 -233
  379. package/lib/tag-Di1z9PoZ.js +0 -74
  380. package/lib/theme-CLbBS-in.js +0 -85
  381. package/styles/dark.css +0 -13
@@ -1,2 +1,163 @@
1
- import { t as e } from "../image-CVQai6NX.js";
2
- export { e as default };
1
+ import e from "../base.js";
2
+ import { kebabToCamel as t, parseAttrValue as n } from "../utils/index.js";
3
+ import r from "./index.less_inline.js";
4
+ import { $$ as i, $one as a, addClass as o, formatClass as s, off as c, on as l, removeClass as u, shouldEventNext as d } from "utilane/browser";
5
+ //#region src/components/image/index.ts
6
+ var f = class extends e {
7
+ static baseName = "image";
8
+ alt;
9
+ _src = "";
10
+ _loading = "eager";
11
+ fit;
12
+ width;
13
+ height;
14
+ fallback;
15
+ customFallback = !1;
16
+ isError = !1;
17
+ previewDisabled = !1;
18
+ _previewEl;
19
+ _previewImageList;
20
+ _previewIndex = 0;
21
+ _placeholder;
22
+ _imageInner;
23
+ get src() {
24
+ return this._src;
25
+ }
26
+ set src(e) {
27
+ this._src = e, this._loadActualImage();
28
+ }
29
+ get loading() {
30
+ return this._loading;
31
+ }
32
+ set loading(e) {
33
+ this._loading = e;
34
+ }
35
+ get placeholder() {
36
+ return this._placeholder;
37
+ }
38
+ set placeholder(e) {
39
+ this._placeholder = e;
40
+ }
41
+ get previewImageList() {
42
+ return this._previewImageList;
43
+ }
44
+ set previewImageList(e) {
45
+ this.setPreviewImageList(e);
46
+ }
47
+ get previewIndex() {
48
+ return this._previewIndex;
49
+ }
50
+ set previewIndex(e) {
51
+ this.setPreviewIndex(e);
52
+ }
53
+ setPreviewImageList(e) {
54
+ this._previewImageList = e;
55
+ }
56
+ setPreviewIndex(e) {
57
+ this._previewIndex = e;
58
+ }
59
+ connectedCallback() {
60
+ this.loadStyleText(r), super.connectedCallback();
61
+ }
62
+ static get observedAttributes() {
63
+ return [
64
+ "src",
65
+ "loading",
66
+ "fit",
67
+ "width",
68
+ "height",
69
+ "placeholder",
70
+ "preview-disabled",
71
+ "preview-image-list",
72
+ "preview-index",
73
+ "fallback",
74
+ "custom-fallback"
75
+ ];
76
+ }
77
+ attributeChangedCallback(e, r, i) {
78
+ e = t(e);
79
+ let a = n(i, this[e], e);
80
+ switch (a !== this[e] && (e === "previewImageList" ? this.setPreviewImageList(a ? a.split(",") : void 0) : this[e] = a), e) {
81
+ case "width":
82
+ case "height": this.rendered && this._updateSize();
83
+ }
84
+ }
85
+ render() {
86
+ let e = this.alt || this.getAttribute("alt"), t = this.placeholder || this.src;
87
+ return i("img", {
88
+ class: s(["l-image-inner", this.previewDisabled ? void 0 : "l-image-inner--preview"]),
89
+ alt: e,
90
+ loading: this.loading,
91
+ src: t,
92
+ part: "inner",
93
+ "l-action": "inner"
94
+ });
95
+ }
96
+ _updateSize() {
97
+ this.width ? this.style.setProperty("width", this.width) : this.style.removeProperty("width"), this.height ? this.style.setProperty("height", this.height) : this.style.removeProperty("height");
98
+ }
99
+ afterInit() {
100
+ this.fit && this.fit !== "fill" && this.style.setProperty("--l-image-fit", this.fit), this._updateSize(), this._imageInner = a(".l-image-inner", this.root), l(this._imageInner, "click", this._onTap), l(this._imageInner, "error", this._onError), l(this._imageInner, "load", this._onLoad), this._loadActualImage();
101
+ }
102
+ beforeDestroy() {
103
+ this._imageInner && (c(this._imageInner, "click", this._onTap), c(this._imageInner, "error", this._onError), c(this._imageInner, "load", this._onLoad));
104
+ }
105
+ setIsError(e = !1) {
106
+ if (this.isError !== e) {
107
+ if (this.isError = e, e) {
108
+ if (!this.customFallback) {
109
+ this.fallback && this._imageInner && (this._imageInner.src = this.fallback);
110
+ return;
111
+ }
112
+ this._imageInner && o(this._imageInner, "l-image-hide");
113
+ let e = a(".l-image-fallback", this.root);
114
+ this.fallback || (e = i("div", {
115
+ class: "l-image-fallback",
116
+ part: "fallback",
117
+ innerHTML: "<slot name='fallback'></slot>"
118
+ }), this.root.appendChild(e));
119
+ } else {
120
+ this._imageInner && u(this._imageInner, "l-image-hide");
121
+ let e = a(".l-image-fallback", this.root);
122
+ e && e.remove();
123
+ }
124
+ }
125
+ }
126
+ openPreview() {
127
+ if (!this._previewEl) {
128
+ let e = i("l-image-preview");
129
+ e.setImages(this.previewImageList || [this.src]), e.setCurrentIndex(this.previewIndex || 0), e.setAttribute("open", "on"), this._previewEl = e, document.body.appendChild(e), l(this._previewEl, "closed", this._onPreviewClosed);
130
+ }
131
+ }
132
+ closePreview() {
133
+ this._previewEl &&= (c(this._previewEl, "closed", this._onPreviewClosed), this._previewEl.remove(), void 0);
134
+ }
135
+ _onError = () => {
136
+ this.setIsError(!0);
137
+ };
138
+ _onLoad = () => {
139
+ this.setIsError(!1);
140
+ };
141
+ _onPreviewClosed = () => {
142
+ this.closePreview();
143
+ };
144
+ _onTap = (e) => {
145
+ let [t, n] = d(e, "l-action", this.root);
146
+ t && n === "inner" && !this.previewDisabled && !this.isError && this.openPreview();
147
+ };
148
+ _clearTmpImg(e) {
149
+ e &&= (e.onload = null, e.onerror = null, void 0);
150
+ }
151
+ _loadActualImage() {
152
+ if (this.placeholder && this.rendered) {
153
+ let e = new Image();
154
+ e.src = this.src, e.onload = () => {
155
+ this._imageInner && (this._imageInner.src = this.src), this._clearTmpImg(e);
156
+ }, e.onerror = () => {
157
+ this.setIsError(!0), this._clearTmpImg(e);
158
+ };
159
+ }
160
+ }
161
+ };
162
+ //#endregion
163
+ export { f as default };
@@ -0,0 +1,4 @@
1
+ //#region src/components/image/index.less?inline
2
+ var e = ":host{vertical-align:middle;box-sizing:border-box;width:auto;height:auto;display:inline-flex}.l-image-inner{vertical-align:middle;object-fit:var(--l-image-fit,fill);width:100%;height:100%}.l-image-inner--preview{cursor:pointer}.l-image-hide{display:none}.l-image-fallback{background-color:#0000001a;justify-content:center;align-items:center;width:100%;height:100%;display:inline-flex}";
3
+ //#endregion
4
+ export { e as default };
package/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./utils";
2
+ export type { Signal, SignalStop } from "./utils/signal_types";
2
3
  export { set as addClickOutside, remove as removeClickOutside } from "./utils/clickoutside";
3
4
  export { default as BaseComponent } from "./base";
4
5
  export { default as Message } from "./message";
@@ -40,6 +41,11 @@ export { default as SelectIcon } from "./icon/select";
40
41
  export { default as CalendarIcon } from "./icon/calendar";
41
42
  export { default as RefreshIcon } from "./icon/refresh";
42
43
  export { default as CopyIcon } from "./icon/copy";
44
+ export { default as PlusIcon } from "./icon/plus";
45
+ export { default as MinusIcon } from "./icon/minus";
46
+ export { default as EyeOutlineIcon } from "./icon/eye_outline";
47
+ export { default as DeleteIcon } from "./icon/delete";
48
+ export { default as PictureIcon } from "./icon/picture";
43
49
  export { default as Form } from "./form";
44
50
  export { default as FormItem } from "./form/form_item";
45
51
  export { default as RadioGroup } from "./check/radio_group";
@@ -81,3 +87,8 @@ export type { Column } from "./table/types";
81
87
  export { default as Space } from "./space";
82
88
  export { default as Card } from "./card";
83
89
  export { default as Calendar } from "./calendar";
90
+ export { default as Upload } from "./upload";
91
+ export { defaultUploadResponseParser } from "./upload";
92
+ export type { UploadFile, UploadResponseContext, UploadResponseParser, UploadRequestOptions, UploadRequestResult, UploadRequestHandler, } from "./upload";
93
+ export { default as Notification } from "./notification";
94
+ export type { NotificationOptions, NotificationType, NotificationPlacement } from "./notification";
package/lib/index.js CHANGED
@@ -11,12 +11,12 @@ import y from "./dialog/index.js";
11
11
  import b from "./dialog/dialog_container.js";
12
12
  import x from "./button/index.js";
13
13
  import S from "./icon/close.js";
14
- import { t as C } from "./form_item-BqPMRABd.js";
14
+ import C from "./form/form_item.js";
15
15
  import w from "./input/index.js";
16
16
  import T from "./dialog/dialog_box.js";
17
17
  import E from "./loading/index.js";
18
18
  import D from "./tabs/index.js";
19
- import { t as O } from "./modal-Cwi3qlEf.js";
19
+ import O from "./modal/index.js";
20
20
  import k from "./modal/modal_box.js";
21
21
  import A from "./icon/arrow_down.js";
22
22
  import j from "./icon/arrow_left.js";
@@ -43,41 +43,48 @@ import Z from "./icon/select.js";
43
43
  import Q from "./icon/calendar.js";
44
44
  import $ from "./icon/refresh.js";
45
45
  import ee from "./icon/copy.js";
46
- import { t as te } from "./form-DJxvBiLy.js";
47
- import ne from "./check/radio_group.js";
48
- import { t as re } from "./radio-C9NPQWGI.js";
49
- import { t as ie } from "./checkbox-DhGHJXwI.js";
50
- import ae from "./check/checkbox_group.js";
51
- import oe from "./input_number/index.js";
52
- import { t as se } from "./select_ori-C7sUZxen.js";
53
- import { t as ce } from "./switch-wh2-ivty.js";
54
- import { t as le } from "./md_input-BX3bujz8.js";
55
- import { t as ue } from "./select-BZMDj5VE.js";
56
- import { Popover as de, autoUpdate as fe, createPopoverObserver as pe, getOverflowAncestors as me, popconfirmProps as he, updatePosition as ge } from "./utils/popover.js";
57
- import { t as _e } from "./date_picker-BDN2PAz5.js";
58
- import { t as ve } from "./date_picker_ori-BXFs1eET.js";
59
- import { t as ye } from "./color_picker-0a-IGZY9.js";
60
- import { t as be } from "./list-MG8PRzos.js";
61
- import { t as xe } from "./polygon-DhhovlrG.js";
62
- import { t as Se } from "./tabbar-CBXK-_AV.js";
63
- import { t as Ce } from "./item-D_ZOPXuE.js";
64
- import { t as we } from "./theme-CLbBS-in.js";
65
- import Te from "./theme/theme_color.js";
66
- import { t as Ee } from "./menu-DKscK5mw.js";
67
- import { t as De } from "./carousel-DvkZ1YXq.js";
68
- import { t as Oe } from "./item-CQ2Sknbz.js";
69
- import { t as ke } from "./qrcode-Dip8uLSA.js";
70
- import { t as Ae } from "./description_panel--AKXBzLL.js";
71
- import { t as je } from "./pagination-aRbGd3Rf.js";
72
- import { t as Me } from "./mask-Bx-yNIJv.js";
73
- import { t as Ne } from "./page_header-ujV3pncE.js";
74
- import { t as Pe } from "./tag-Di1z9PoZ.js";
75
- import { t as Fe } from "./collapse-B6-Rn05A.js";
76
- import { t as Ie } from "./item-DI6mQXtB.js";
77
- import { t as Le } from "./image-CVQai6NX.js";
78
- import { t as Re } from "./image_preview-DfQAKSJH.js";
79
- import { t as ze } from "./table-BQxMD2Ae.js";
80
- import { t as Be } from "./space-CKuTk0YB.js";
81
- import { t as Ve } from "./card-3DM-lJQV.js";
82
- import { t as He } from "./calendar-CvlUsN6w.js";
83
- export { A as ArrowDownIcon, j as ArrowLeftIcon, M as ArrowRightIcon, N as ArrowUpIcon, e as BaseComponent, p as BaseIcon, x as Button, He as Calendar, Q as CalendarIcon, Ve as Card, F as CaretBottomIcon, P as CaretTopIcon, De as Carousel, Oe as CarouselItem, ie as Checkbox, ae as CheckboxGroup, m as CloseFilledIcon, S as CloseIcon, Fe as Collapse, Ie as CollapseItem, ye as ColorPicker, ee as CopyIcon, q as DArrowLeftIcon, J as DArrowRightIcon, _e as DatePicker, ve as DatePickerOri, Ae as DescriptionPanel, y as Dialog, T as DialogBox, b as DialogContainer, I as FontIcon, te as Form, C as FormItem, Le as Image, Re as ImagePreview, _ as InfoIcon, w as Input, oe as InputNumber, be as List, E as Loading, L as LoadingIcon, Me as Mask, le as MdInput, Ee as Menu, v as Message, O as Modal, k as ModalBox, B as MoonIcon, K as MoreIcon, Ne as PageHeader, je as Pagination, xe as Polygon, de as Popover, ke as Qrcode, re as Radio, ne as RadioGroup, V as ReductionIcon, $ as RefreshIcon, H as RefreshLeftIcon, U as RefreshRightIcon, R as SearchIcon, ue as Select, Z as SelectIcon, se as SelectOri, W as SortIcon, Be as Space, h as SuccessIcon, z as SunIcon, ce as Switch, Se as Tabbar, Ce as TabbarItem, ze as Table, D as Tabs, Pe as Tag, we as Theme, Te as ThemeColor, G as ThemeDefaultIcon, g as WarnIcon, Y as ZoomInIcon, X as ZoomOutIcon, f as addClickOutside, fe as autoUpdate, pe as createPopoverObserver, me as getOverflowAncestors, t as initAttr, n as kebabToCamel, r as parseAttrValue, he as popconfirmProps, i as regist, d as removeClickOutside, a as setAttrs, o as stopSignal, s as tagAttr, c as tagAttrs, l as unitNumberStr, ge as updatePosition, u as useId };
46
+ import te from "./icon/plus.js";
47
+ import ne from "./icon/minus.js";
48
+ import re from "./icon/eye_outline.js";
49
+ import ie from "./icon/delete.js";
50
+ import ae from "./icon/picture.js";
51
+ import oe from "./form/index.js";
52
+ import se from "./check/radio_group.js";
53
+ import ce from "./check/radio.js";
54
+ import le from "./check/checkbox.js";
55
+ import ue from "./check/checkbox_group.js";
56
+ import de from "./input_number/index.js";
57
+ import fe from "./select_ori/index.js";
58
+ import pe from "./switch/index.js";
59
+ import me from "./md_input/index.js";
60
+ import { Popover as he, autoUpdate as ge, createPopoverObserver as _e, getOverflowAncestors as ve, popconfirmProps as ye, updatePosition as be } from "./utils/popover.js";
61
+ import xe from "./select/index.js";
62
+ import Se from "./date_picker/index.js";
63
+ import Ce from "./date_picker_ori/index.js";
64
+ import we from "./color_picker/index.js";
65
+ import Te from "./list/index.js";
66
+ import Ee from "./polygon/index.js";
67
+ import De from "./tabbar/index.js";
68
+ import Oe from "./tabbar/item.js";
69
+ import ke from "./theme/index.js";
70
+ import Ae from "./theme/theme_color.js";
71
+ import je from "./menu/index.js";
72
+ import Me from "./carousel/index.js";
73
+ import Ne from "./carousel/item.js";
74
+ import Pe from "./qrcode/index.js";
75
+ import Fe from "./description_panel/index.js";
76
+ import Ie from "./pagination/index.js";
77
+ import Le from "./mask/index.js";
78
+ import Re from "./page_header/index.js";
79
+ import ze from "./tag/index.js";
80
+ import Be from "./collapse/index.js";
81
+ import Ve from "./collapse/item.js";
82
+ import He from "./image/index.js";
83
+ import Ue from "./image/image_preview.js";
84
+ import We from "./table/index.js";
85
+ import Ge from "./space/index.js";
86
+ import Ke from "./card/index.js";
87
+ import qe from "./calendar/index.js";
88
+ import Je, { defaultUploadResponseParser as Ye } from "./upload/index.js";
89
+ import Xe from "./notification/index.js";
90
+ export { A as ArrowDownIcon, j as ArrowLeftIcon, M as ArrowRightIcon, N as ArrowUpIcon, e as BaseComponent, p as BaseIcon, x as Button, qe as Calendar, Q as CalendarIcon, Ke as Card, F as CaretBottomIcon, P as CaretTopIcon, Me as Carousel, Ne as CarouselItem, le as Checkbox, ue as CheckboxGroup, m as CloseFilledIcon, S as CloseIcon, Be as Collapse, Ve as CollapseItem, we as ColorPicker, ee as CopyIcon, q as DArrowLeftIcon, J as DArrowRightIcon, Se as DatePicker, Ce as DatePickerOri, ie as DeleteIcon, Fe as DescriptionPanel, y as Dialog, T as DialogBox, b as DialogContainer, re as EyeOutlineIcon, I as FontIcon, oe as Form, C as FormItem, He as Image, Ue as ImagePreview, _ as InfoIcon, w as Input, de as InputNumber, Te as List, E as Loading, L as LoadingIcon, Le as Mask, me as MdInput, je as Menu, v as Message, ne as MinusIcon, O as Modal, k as ModalBox, B as MoonIcon, K as MoreIcon, Xe as Notification, Re as PageHeader, Ie as Pagination, ae as PictureIcon, te as PlusIcon, Ee as Polygon, he as Popover, Pe as Qrcode, ce as Radio, se as RadioGroup, V as ReductionIcon, $ as RefreshIcon, H as RefreshLeftIcon, U as RefreshRightIcon, R as SearchIcon, xe as Select, Z as SelectIcon, fe as SelectOri, W as SortIcon, Ge as Space, h as SuccessIcon, z as SunIcon, pe as Switch, De as Tabbar, Oe as TabbarItem, We as Table, D as Tabs, ze as Tag, ke as Theme, Ae as ThemeColor, G as ThemeDefaultIcon, Je as Upload, g as WarnIcon, Y as ZoomInIcon, X as ZoomOutIcon, f as addClickOutside, ge as autoUpdate, _e as createPopoverObserver, Ye as defaultUploadResponseParser, ve as getOverflowAncestors, t as initAttr, n as kebabToCamel, r as parseAttrValue, ye as popconfirmProps, i as regist, d as removeClickOutside, a as setAttrs, o as stopSignal, s as tagAttr, c as tagAttrs, l as unitNumberStr, be as updatePosition, u as useId };
@@ -1,8 +1,8 @@
1
1
  import { parseAttrValue as e, unitNumberStr 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 { t as i } from "../input_inner-x4GfLGjj.js";
5
- import { $ as a, $$ as o, $one as s, addClass as c, formatStyle as l, off as u, on as d, removeClass as f } from "ph-utils/browser";
2
+ import n from "../form/form_inner.js";
3
+ import r from "./index.less_inline.js";
4
+ import i from "./input_inner.less_inline.js";
5
+ import { $ as a, $$ as o, $one as s, addClass as c, formatStyle as l, off as u, on as d, removeClass as f } from "utilane/browser";
6
6
  //#region src/components/input/index.ts
7
7
  var p = class extends n {
8
8
  static baseName = "input";
@@ -1,4 +1,4 @@
1
1
  //#region src/components/input/index.less?inline
2
2
  var e = ":host{--l-input-border-color:var(--l-border-color,#dedede);width:var(--l-input-width,170px);height:var(--l-form-control-height,32px);border:1px solid var(--l-input-border-color,#dedede);border-radius:var(--l-border-radius,3px);vertical-align:middle;box-sizing:border-box;background-color:#0000;align-items:center;padding:0 7px;transition:border-color .3s,box-shadow .3s;display:inline-flex}:host(:focus){--l-input-border-color:var(--l-primary-color,#722ed1);box-shadow:0 0 0 3px var(--l-primary-color-light5)}:host(.is-block){width:100%}:host(.is-disabled){background-color:var(--l-disabled-color,#f5f7fa)}:host(.is-error){--l-input-border-color:var(--l-error-color)}:host(.is-error:focus){box-shadow:0 0 0 3px var(--l-error-color-light5)}.l-input__prefix,.l-input__suffix{color:#a8abb2;flex-shrink:0;font-size:14px;display:inline-flex}.l-input__prefix{margin-right:5px}.l-input__suffix{margin-left:5px}.l-clearable{cursor:pointer}.l-clearable:hover{color:#999}";
3
3
  //#endregion
4
- export { e as t };
4
+ export { e as default };
@@ -1,4 +1,4 @@
1
1
  //#region src/components/input/input_inner.less?inline
2
2
  var e = ".l-input__inner{box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:inherit;font-size:inherit;background-color:#0000;border:none;outline:none;flex-grow:1}.l-input__inner:disabled{background-color:#0000}";
3
3
  //#endregion
4
- export { e as t };
4
+ export { e as default };
@@ -1,7 +1,7 @@
1
1
  import { parseAttrValue as e, unitNumberStr as t } from "../utils/index.js";
2
- import { t as n } from "../form_inner-Cnwb6f_Q.js";
3
- import { t as r } from "../style-C5wUmE2b.js";
4
- import { $$ as i, $one as a, addClass as o, off as s, on as c, removeClass as l } from "ph-utils/browser";
2
+ import n from "../form/form_inner.js";
3
+ import r from "./style.js";
4
+ import { $$ as i, $one as a, addClass as o, off as s, on as c, removeClass as l } from "utilane/browser";
5
5
  //#region src/components/input_number/index.ts
6
6
  var u = class extends n {
7
7
  static baseName = "input-number";
@@ -1,5 +1,4 @@
1
1
  //#region src/components/input_number/index.less?inline
2
- var e = ":host{--l-input-number-border-color:var(--l-border-color,#d9d9d9);--l-input-number-btn-color:#606266;--l-input-number-btn-hover-color:var(--l-primary-color,#722ed1);--l-input-number-btn-disabled-color:#c0c4cc;--l-input-number-bg:#fff;--l-input-number-btn-bg:#f5f7fa;--l-input-number-btn-hover-bg:var(--l-primary-color-light5,#f3e8ff);--l-input-number-width:170px;width:var(--l-input-number-width);height:var(--l-form-control-height,32px);border:1px solid var(--l-input-number-border-color);border-radius:var(--l-border-radius,3px);box-sizing:border-box;vertical-align:middle;background-color:var(--l-input-number-bg);align-items:center;transition:border-color .3s,box-shadow .3s;display:inline-flex;overflow:hidden}:host(:focus-within){--l-input-number-border-color:var(--l-primary-color,#722ed1);box-shadow:0 0 0 3px var(--l-primary-color-light5)}:host(.is-block){width:100%}:host(.is-disabled){background-color:var(--l-disabled-color,#f5f7fa);cursor:not-allowed}:host(.is-disabled) .l-input-number__btn{color:var(--l-input-number-btn-disabled-color);cursor:not-allowed}:host(.is-disabled) .l-input-number__btn:hover{background-color:var(--l-input-number-btn-bg)}:host(.is-error){--l-input-number-border-color:var(--l-error-color)}:host(.is-error:focus-within){box-shadow:0 0 0 3px var(--l-error-color-light5)}:host(.l-input-number--small){--l-form-control-height:24px;font-size:12px}:host(.l-input-number--large){--l-form-control-height:40px;--l-border-radius:6px;font-size:16px}.l-input-number__btn{background:var(--l-input-number-btn-bg);width:32px;height:100%;color:var(--l-input-number-btn-color);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:inherit;border:none;outline:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:background-color .25s,color .25s;display:inline-flex}.l-input-number__btn:hover:not(:disabled){background:var(--l-input-number-btn-hover-bg);color:var(--l-input-number-btn-hover-color)}.l-input-number__btn:active:not(:disabled){background:var(--l-primary-color-light4,#e2d3fa);color:var(--l-primary-color-dark1,#531dab)}.l-input-number__btn:disabled{color:var(--l-input-number-btn-disabled-color);cursor:not-allowed}:host(.l-input-number--no-controls) .l-input-number__inner{text-align:left}.l-input-number__inner{text-align:center;width:100%;height:100%;font-size:inherit;color:var(--l-input-number-btn-color);box-sizing:border-box;-moz-appearance:textfield;background:0 0;border:none;outline:none;flex:1;padding:0 8px}.l-input-number__inner::-webkit-outer-spin-button,.l-input-number__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.l-input-number__inner::placeholder{color:#c0c4cc}html.dark :host{--l-input-number-bg:#ffffff0f;--l-input-number-btn-bg:#ffffff14;--l-input-number-btn-color:#ffffffa6;--l-input-number-btn-hover-bg:var(--l-primary-color-light5);--l-input-number-btn-disabled-color:#ffffff40}html.dark :host(.is-disabled){background-color:#ffffff14}html.dark .l-input-number__inner::placeholder{color:#ffffff4d}", t = new CSSStyleSheet();
3
- t.replaceSync(e);
2
+ var e = ":host{--l-input-number-border-color:var(--l-border-color,#d9d9d9);--l-input-number-btn-color:#606266;--l-input-number-btn-hover-color:var(--l-primary-color,#722ed1);--l-input-number-btn-disabled-color:#c0c4cc;--l-input-number-bg:#fff;--l-input-number-btn-bg:#f5f7fa;--l-input-number-btn-hover-bg:var(--l-primary-color-light5,#f3e8ff);--l-input-number-width:170px;width:var(--l-input-number-width);height:var(--l-form-control-height,32px);border:1px solid var(--l-input-number-border-color);border-radius:var(--l-border-radius,3px);box-sizing:border-box;vertical-align:middle;background-color:var(--l-input-number-bg);align-items:center;transition:border-color .3s,box-shadow .3s;display:inline-flex;overflow:hidden}:host(:focus-within){--l-input-number-border-color:var(--l-primary-color,#722ed1);box-shadow:0 0 0 3px var(--l-primary-color-light5)}:host(.is-block){width:100%}:host(.is-disabled){background-color:var(--l-disabled-color,#f5f7fa);cursor:not-allowed}:host(.is-disabled) .l-input-number__btn{color:var(--l-input-number-btn-disabled-color);cursor:not-allowed}:host(.is-disabled) .l-input-number__btn:hover{background-color:var(--l-input-number-btn-bg)}:host(.is-error){--l-input-number-border-color:var(--l-error-color)}:host(.is-error:focus-within){box-shadow:0 0 0 3px var(--l-error-color-light5)}:host(.l-input-number--small){--l-form-control-height:24px;font-size:12px}:host(.l-input-number--large){--l-form-control-height:40px;--l-border-radius:6px;font-size:16px}.l-input-number__btn{background:var(--l-input-number-btn-bg);width:32px;height:100%;color:var(--l-input-number-btn-color);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:inherit;border:none;outline:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:background-color .25s,color .25s;display:inline-flex}.l-input-number__btn:hover:not(:disabled){background:var(--l-input-number-btn-hover-bg);color:var(--l-input-number-btn-hover-color)}.l-input-number__btn:active:not(:disabled){background:var(--l-primary-color-light4,#e2d3fa);color:var(--l-primary-color-dark1,#531dab)}.l-input-number__btn:disabled{color:var(--l-input-number-btn-disabled-color);cursor:not-allowed}:host(.l-input-number--no-controls) .l-input-number__inner{text-align:left}.l-input-number__inner{text-align:center;width:100%;height:100%;font-size:inherit;color:var(--l-input-number-btn-color);box-sizing:border-box;-moz-appearance:textfield;background:0 0;border:none;outline:none;flex:1;padding:0 8px}.l-input-number__inner::-webkit-outer-spin-button,.l-input-number__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.l-input-number__inner::placeholder{color:#c0c4cc}html.dark :host{--l-input-number-bg:#ffffff0f;--l-input-number-btn-bg:#ffffff14;--l-input-number-btn-color:#ffffffa6;--l-input-number-btn-hover-bg:var(--l-primary-color-light5);--l-input-number-btn-disabled-color:#ffffff40}html.dark :host(.is-disabled){background-color:#ffffff14}html.dark .l-input-number__inner::placeholder{color:#ffffff4d}";
4
3
  //#endregion
5
- export { t };
4
+ export { e as default };
@@ -1,2 +1,6 @@
1
- import { t as e } from "../style-C5wUmE2b.js";
2
- export { e as default };
1
+ import e from "./index.less_inline.js";
2
+ //#region src/components/input_number/style.ts
3
+ var t = new CSSStyleSheet();
4
+ t.replaceSync(e);
5
+ //#endregion
6
+ export { t as default };
package/lib/list/index.js CHANGED
@@ -1,2 +1,52 @@
1
- import { t as e } from "../list-MG8PRzos.js";
2
- export { e as default };
1
+ import e from "../base.js";
2
+ import { parseAttrValue as t } from "../utils/index.js";
3
+ import n from "../styles/animation/index.js";
4
+ import r from "./index.less_inline.js";
5
+ import { $one as i } from "utilane/browser";
6
+ //#region src/components/list/index.ts
7
+ var a = class extends e {
8
+ static baseName = "list";
9
+ finish = !1;
10
+ infinite = !0;
11
+ observer;
12
+ $more;
13
+ _page = 0;
14
+ static get observedAttributes() {
15
+ return ["finish", "infinite"];
16
+ }
17
+ attributeChangedCallback(e, n, r) {
18
+ if (e === "finish") {
19
+ let n = t(r, !1, e);
20
+ this.finish !== n && (this.finish = n, this._finishChange());
21
+ } else if (e === "infinite") {
22
+ let n = t(r, !0, e);
23
+ this.infinite !== n && (this.infinite = n);
24
+ }
25
+ }
26
+ connectedCallback() {
27
+ this.loadStyleText([r]), this.root.adoptedStyleSheets = [n], super.connectedCallback(), this.infinite && (this.observer = new IntersectionObserver((e) => {
28
+ e[0].isIntersecting && !this.finish && (this._page++, this.setAttribute("loading", ""), this.emit("load", { detail: { page: this._page } }));
29
+ }), this.$more = i(".l-list-loadmore", this.root), !this.finish && this.$more && this.observer.observe(this.$more));
30
+ }
31
+ disconnectedCallback() {
32
+ super.disconnectedCallback(), this.observer &&= (this.$more &&= (this.observer.unobserve(this.$more), void 0), this.observer.disconnect(), void 0);
33
+ }
34
+ render() {
35
+ let e = ["<slot></slot>"];
36
+ return this.infinite && (e.push("<div class=\"l-list-loadmore\">"), this.finish || e.push("<l-loading-icon class=\"l-list-icon l-rotate-anim\"></l-loading-icon>"), e.push(`<span class="l-list-loadmore-text">${this._loadingText()}</span></div>`)), e.join("");
37
+ }
38
+ _loadingText() {
39
+ return this.finish ? "已经到底啦!" : "加载中……";
40
+ }
41
+ _finishChange() {
42
+ if (this.$more) {
43
+ this.observer && (this.finish ? this.observer.unobserve(this.$more) : this.observer.observe(this.$more));
44
+ let e = i(".l-list-loadmore-text", this.$more);
45
+ e && (e.textContent = this._loadingText());
46
+ let t = i(".l-list-icon", this.$more);
47
+ this.finish ? t && t.remove() : t ?? (t = document.createElement("l-loading-icon"), t.className = "l-list-icon l-rotate-anim", this.$more.prepend(t));
48
+ }
49
+ }
50
+ };
51
+ //#endregion
52
+ export { a as default };
@@ -0,0 +1,4 @@
1
+ //#region src/components/list/index.less?inline
2
+ var e = ":host{-webkit-overflow-scrolling:touch;height:100%;display:block;position:relative;overflow:auto}.l-list-loadmore{color:#999;justify-content:center;align-items:center;padding:10px;display:flex}.l-list-icon{margin-right:10px;font-size:24px;transform:rotate(80deg)}";
3
+ //#endregion
4
+ export { e as default };
@@ -1,4 +1,4 @@
1
- import { $ as e, $$ as t, $one as n, addClass as r, hasClass as i, iterate as a } from "ph-utils/browser";
1
+ import { $ as e, $$ as t, $one as n, addClass as r, hasClass as i, iterate as a } from "utilane/browser";
2
2
  //#region src/components/loading/index.ts
3
3
  function o(e, a) {
4
4
  if (i(e, "l-loading")) return;
@@ -19,5 +19,5 @@ export default class Mask extends BaseComponent {
19
19
  beforeDestroy(): void;
20
20
  afterOpened(): void;
21
21
  afterClosed(): void;
22
- onAction(action: string): boolean;
22
+ onAction(_action: string): boolean;
23
23
  }
package/lib/mask/index.js CHANGED
@@ -1,2 +1,109 @@
1
- import { t as e } from "../mask-Bx-yNIJv.js";
2
- export { e as default };
1
+ import e from "../base.js";
2
+ import { kebabToCamel as t, parseAttrValue as n } from "../utils/index.js";
3
+ import r from "./index.less_inline.js";
4
+ import { $$ as i, $one as a, addClass as o, hasClass as s, off as c, on as l, removeClass as u, shouldEventNext as d, transition as f } from "utilane/browser";
5
+ //#region src/components/mask/index.ts
6
+ var p = class extends e {
7
+ static baseName = "mask";
8
+ #e = !1;
9
+ zIndex = 100;
10
+ maskClosable = !0;
11
+ lockScroll = !0;
12
+ #t = "";
13
+ get open() {
14
+ return this.#e;
15
+ }
16
+ set open(e) {
17
+ this.#e = e, this.rendered && this.#n();
18
+ }
19
+ static customAttributes = [];
20
+ static get observedAttributes() {
21
+ return [
22
+ "open",
23
+ "z-index",
24
+ "mask-closable",
25
+ "lock-scroll",
26
+ ...this.customAttributes
27
+ ];
28
+ }
29
+ connectedCallback() {
30
+ this.loadStyleText(r), super.connectedCallback();
31
+ }
32
+ attributeChangedCallback(e, r, i) {
33
+ e = t(e);
34
+ let a = n(i, this[e], e);
35
+ a !== this[e] && (this[e] = a, e === "zIndex") && (a === 100 ? this.style.removeProperty("--l-mask-zindex") : this.style.setProperty("--l-mask-zindex", a));
36
+ }
37
+ render() {
38
+ let e = document.createDocumentFragment(), t = i("div", {
39
+ class: "l-mask",
40
+ part: "mask"
41
+ });
42
+ e.appendChild(t);
43
+ let n = i("div", {
44
+ class: "l-panel",
45
+ part: "panel"
46
+ }), r = this.contentRender();
47
+ return typeof r == "string" ? n.innerHTML = r : n.appendChild(r), e.appendChild(n), e;
48
+ }
49
+ contentRender() {
50
+ return "<slot></slot>";
51
+ }
52
+ #n() {
53
+ if (this.open) {
54
+ this.lockScroll && (this.#t = getComputedStyle(document.body).overflow, document.body.style.overflow = "hidden"), o(this, "open");
55
+ let e = a(".l-mask", this.root);
56
+ e && f(e, [[
57
+ "opacity",
58
+ "0",
59
+ "0.3s"
60
+ ]], "enter");
61
+ let t = a(".l-panel", this.root);
62
+ t && f(t, [[
63
+ "opacity",
64
+ "0",
65
+ "0.3s"
66
+ ]], "enter"), this.afterOpened();
67
+ } else if (s(this, "open")) {
68
+ this.emit("close");
69
+ let e = a(".l-panel", this.root);
70
+ e && f(e, [[
71
+ "opacity",
72
+ "0",
73
+ "0.3s"
74
+ ]], "leave");
75
+ let t = a(".l-mask", this.root);
76
+ t && f(t, [[
77
+ "opacity",
78
+ "0",
79
+ "0.3s"
80
+ ]], "leave", () => {
81
+ u(this, "open"), this.emit("closed");
82
+ }), this.lockScroll && (document.body.style.overflow = this.#t), this.afterClosed();
83
+ }
84
+ }
85
+ afterInit() {
86
+ this.#n();
87
+ let e = a(".l-panel", this.root);
88
+ e && l(e, "click", this.#r);
89
+ }
90
+ beforeDestroy() {
91
+ let e = a(".l-panel", this.root);
92
+ e && c(e, "click", this.#r);
93
+ }
94
+ #r = (e) => {
95
+ let [t, n] = d(e, "data-action", e.currentTarget);
96
+ if (!t) {
97
+ this.maskClosable && (this.open = !1);
98
+ return;
99
+ }
100
+ this.onAction(n) || this.emit("action", { detail: n });
101
+ };
102
+ afterOpened() {}
103
+ afterClosed() {}
104
+ onAction(e) {
105
+ return !1;
106
+ }
107
+ };
108
+ //#endregion
109
+ export { p as default };
@@ -0,0 +1,4 @@
1
+ //#region src/components/mask/index.less?inline
2
+ var e = ":host{display:none;position:relative}:host(.open){display:block}.l-mask,.l-panel{opacity:1;position:fixed;inset:0}.l-mask{z-index:var(--l-mask-zindex,100);background-color:#00000080}.l-panel{z-index:calc(var(--l-mask-zindex,100) + 1);color:#fff}";
3
+ //#endregion
4
+ export { e as default };
@@ -1,2 +1,59 @@
1
- import { t as e } from "../md_input-BX3bujz8.js";
2
- export { e as default };
1
+ import { initAttr as e } from "../utils/index.js";
2
+ import t from "../form/form_inner.js";
3
+ import n from "./index.less_inline.js";
4
+ import { $$ as r, $one as i, addClass as a, off as o, on as s, removeClass as c } from "utilane/browser";
5
+ import { isBlank as l, random as u } from "utilane";
6
+ //#region src/components/md_input/index.ts
7
+ var d = class extends t {
8
+ static baseName = "md-input";
9
+ outline = !1;
10
+ htmlType = "text";
11
+ inputmode;
12
+ label;
13
+ static get observedAttributes() {
14
+ return ["disabled"];
15
+ }
16
+ connectedCallback() {
17
+ e(this), this.loadStyleText(n), super.connectedCallback(), this.#e();
18
+ }
19
+ disconnectedCallback() {
20
+ super.disconnectedCallback(), this.#t();
21
+ }
22
+ render() {
23
+ l(this.value) || a(this, "l-has-value"), this.outline && a(this, "l-md-input-outline");
24
+ let e = document.createDocumentFragment(), t = `l-md-input-${u(8)}`, n = r("input", {
25
+ class: "l-md-input__inner",
26
+ type: this.htmlType,
27
+ name: this.getName(),
28
+ inputmode: this.inputmode,
29
+ id: t
30
+ });
31
+ if (e.appendChild(n), this.label) {
32
+ let n = r("label", {
33
+ class: "l-md-input__label",
34
+ for: t
35
+ });
36
+ n.textContent = this.label, e.appendChild(n);
37
+ }
38
+ return e;
39
+ }
40
+ setValue(e) {
41
+ super.setValue(e);
42
+ let t = i("input", this.root);
43
+ t && (t.value = e);
44
+ }
45
+ #e() {
46
+ let e = i("input", this.root);
47
+ e && s(e, "input", this.#n);
48
+ }
49
+ #t() {
50
+ let e = i("input", this.root);
51
+ e && o(e, "input", this.#n);
52
+ }
53
+ #n = (e) => {
54
+ let t = e.target.value;
55
+ this.setValue(t), l(t) ? c(this, "l-has-value") : a(this, "l-has-value");
56
+ };
57
+ };
58
+ //#endregion
59
+ export { d as default };
@@ -0,0 +1,4 @@
1
+ //#region src/components/md_input/index.less?inline
2
+ var e = ":host{--l-input-width:180px;width:var(--l-input-width,180px);height:var(--l-form-control-height,32px);display:inline-block;position:relative}.l-md-input__inner{box-sizing:border-box;background:0 0;border:0 solid silver;border-bottom-width:1px;outline:none;width:100%;height:100%;transition:border-color .3s}.l-md-input__inner:focus{border-color:var(--l-primary-color,#722ed1)}:host(.l-has-value) .l-md-input__label,.l-md-input__inner:focus+.l-md-input__label{font-size:12px;transform:translateY(-150%)}.l-md-input__inner:focus+.l-md-input__label{color:var(--nt-primary-color,#722ed1)}.l-md-input__label{color:#8c8c8c;cursor:text;align-items:center;font-size:13px;line-height:1;transition:color .3s,transform .3s;display:flex;position:absolute;top:50%;bottom:0;left:0;transform:translateY(-50%)}:host(.l-md-input-outline){--l-input-label-background:#fff}:host(.l-md-input-outline) .l-md-input__inner{border-width:1px;border-radius:4px;padding:0 10px}:host(.l-md-input-outline) .l-md-input__label{left:10px}:host(.l-md-input-outline) .l-md-input__inner:focus{border-width:2px}:host(.l-md-input-outline) .l-md-input__inner:focus+.l-md-input__label,:host(.l-md-input-outline.l-has-value) .l-md-input__label{background-color:#fff;padding-left:4px;padding-right:4px}";
3
+ //#endregion
4
+ export { e as default };