tdesign-web-components 0.0.1-alpha.2 → 0.0.2

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 (1278) hide show
  1. package/CHANGELOG.md +205 -0
  2. package/README.md +14 -10
  3. package/cjs/_chunks/{dep-9ace0844.js → dep-022950c0.js} +4 -4
  4. package/cjs/_chunks/{dep-9ace0844.js.map → dep-022950c0.js.map} +1 -1
  5. package/cjs/_chunks/{dep-dd1b179a.js → dep-084ec1b5.js} +5 -5
  6. package/cjs/_chunks/{dep-dd1b179a.js.map → dep-084ec1b5.js.map} +1 -1
  7. package/cjs/_chunks/{dep-9b223b06.js → dep-09593354.js} +3 -3
  8. package/cjs/_chunks/{dep-9b223b06.js.map → dep-09593354.js.map} +1 -1
  9. package/cjs/_chunks/{dep-2dc2e216.js → dep-0af15e8b.js} +3 -3
  10. package/cjs/_chunks/{dep-2dc2e216.js.map → dep-0af15e8b.js.map} +1 -1
  11. package/cjs/_chunks/{dep-bd057d45.js → dep-1092cda9.js} +3 -3
  12. package/cjs/_chunks/{dep-bd057d45.js.map → dep-1092cda9.js.map} +1 -1
  13. package/cjs/_chunks/{dep-d11b8b8e.js → dep-11706410.js} +2 -2
  14. package/cjs/_chunks/{dep-d11b8b8e.js.map → dep-11706410.js.map} +1 -1
  15. package/cjs/_chunks/{dep-452a7ce5.js → dep-11b3e5b0.js} +3 -3
  16. package/cjs/_chunks/{dep-452a7ce5.js.map → dep-11b3e5b0.js.map} +1 -1
  17. package/cjs/_chunks/{dep-71176a9b.js → dep-160cce48.js} +3 -3
  18. package/cjs/_chunks/{dep-71176a9b.js.map → dep-160cce48.js.map} +1 -1
  19. package/cjs/_chunks/{dep-48c01e4b.js → dep-1dfa0454.js} +2 -2
  20. package/cjs/_chunks/dep-1dfa0454.js.map +1 -0
  21. package/cjs/_chunks/{dep-b7340456.js → dep-1ebd2e81.js} +5 -5
  22. package/cjs/_chunks/{dep-b7340456.js.map → dep-1ebd2e81.js.map} +1 -1
  23. package/cjs/_chunks/{dep-1e2e3478.js → dep-1f280a01.js} +5 -5
  24. package/cjs/_chunks/{dep-1e2e3478.js.map → dep-1f280a01.js.map} +1 -1
  25. package/cjs/_chunks/{dep-93eac8c6.js → dep-2d0365c2.js} +3 -3
  26. package/cjs/_chunks/{dep-93eac8c6.js.map → dep-2d0365c2.js.map} +1 -1
  27. package/cjs/_chunks/{dep-30ed77db.js → dep-2f9b749f.js} +16 -16
  28. package/cjs/_chunks/{dep-30ed77db.js.map → dep-2f9b749f.js.map} +1 -1
  29. package/cjs/_chunks/{dep-2659345d.js → dep-33cede93.js} +3 -3
  30. package/cjs/_chunks/{dep-2659345d.js.map → dep-33cede93.js.map} +1 -1
  31. package/cjs/_chunks/{dep-046ab195.js → dep-3573ae50.js} +2 -2
  32. package/cjs/_chunks/{dep-046ab195.js.map → dep-3573ae50.js.map} +1 -1
  33. package/cjs/_chunks/{dep-86f9d4a4.js → dep-3db51734.js} +5 -5
  34. package/cjs/_chunks/{dep-86f9d4a4.js.map → dep-3db51734.js.map} +1 -1
  35. package/cjs/_chunks/{dep-9eb74b14.js → dep-44335357.js} +5 -5
  36. package/cjs/_chunks/{dep-9eb74b14.js.map → dep-44335357.js.map} +1 -1
  37. package/cjs/_chunks/{dep-7815f2ad.js → dep-458151bd.js} +3 -3
  38. package/cjs/_chunks/{dep-7815f2ad.js.map → dep-458151bd.js.map} +1 -1
  39. package/cjs/_chunks/{dep-db56323d.js → dep-501abc27.js} +2 -2
  40. package/cjs/_chunks/{dep-db56323d.js.map → dep-501abc27.js.map} +1 -1
  41. package/cjs/_chunks/{dep-515728cf.js → dep-52fcfb97.js} +3 -3
  42. package/cjs/_chunks/{dep-515728cf.js.map → dep-52fcfb97.js.map} +1 -1
  43. package/cjs/_chunks/{dep-b97b68ef.js → dep-56fde828.js} +6 -6
  44. package/cjs/_chunks/{dep-b97b68ef.js.map → dep-56fde828.js.map} +1 -1
  45. package/cjs/_chunks/{dep-ae27bd95.js → dep-5bd98486.js} +3 -3
  46. package/cjs/_chunks/{dep-ae27bd95.js.map → dep-5bd98486.js.map} +1 -1
  47. package/cjs/_chunks/{dep-f86db896.js → dep-62506e34.js} +3 -3
  48. package/cjs/_chunks/{dep-f86db896.js.map → dep-62506e34.js.map} +1 -1
  49. package/cjs/_chunks/{dep-2a194c3e.js → dep-634918b5.js} +4 -4
  50. package/cjs/_chunks/{dep-2a194c3e.js.map → dep-634918b5.js.map} +1 -1
  51. package/cjs/_chunks/{dep-708aaa31.js → dep-67d24e43.js} +5 -5
  52. package/cjs/_chunks/{dep-708aaa31.js.map → dep-67d24e43.js.map} +1 -1
  53. package/cjs/_chunks/{dep-12ef4afa.js → dep-69a77d83.js} +4 -4
  54. package/cjs/_chunks/{dep-12ef4afa.js.map → dep-69a77d83.js.map} +1 -1
  55. package/cjs/_chunks/{dep-2649ea1f.js → dep-6c6101bc.js} +2 -2
  56. package/cjs/_chunks/{dep-2649ea1f.js.map → dep-6c6101bc.js.map} +1 -1
  57. package/cjs/_chunks/{dep-f4db4e4c.js → dep-74b90935.js} +10 -10
  58. package/cjs/_chunks/{dep-f4db4e4c.js.map → dep-74b90935.js.map} +1 -1
  59. package/cjs/_chunks/{dep-7e3f31d3.js → dep-770ca03d.js} +4 -4
  60. package/cjs/_chunks/{dep-7e3f31d3.js.map → dep-770ca03d.js.map} +1 -1
  61. package/cjs/_chunks/{dep-d2356724.js → dep-81ea0ec4.js} +13 -13
  62. package/cjs/_chunks/{dep-d2356724.js.map → dep-81ea0ec4.js.map} +1 -1
  63. package/cjs/_chunks/{dep-e8f0257c.js → dep-869bd01a.js} +4 -4
  64. package/cjs/_chunks/{dep-e8f0257c.js.map → dep-869bd01a.js.map} +1 -1
  65. package/cjs/_chunks/{dep-9ce05123.js → dep-8a37c468.js} +4 -4
  66. package/cjs/_chunks/{dep-9ce05123.js.map → dep-8a37c468.js.map} +1 -1
  67. package/cjs/_chunks/{dep-4718f742.js → dep-8be766d2.js} +3 -3
  68. package/cjs/_chunks/{dep-4718f742.js.map → dep-8be766d2.js.map} +1 -1
  69. package/cjs/_chunks/{dep-010ce694.js → dep-8c91f1cd.js} +6 -6
  70. package/cjs/_chunks/{dep-010ce694.js.map → dep-8c91f1cd.js.map} +1 -1
  71. package/cjs/_chunks/{dep-2c23eaa2.js → dep-8ed2993d.js} +5 -5
  72. package/cjs/_chunks/{dep-2c23eaa2.js.map → dep-8ed2993d.js.map} +1 -1
  73. package/cjs/_chunks/{dep-38eebe1a.js → dep-926b985d.js} +3 -3
  74. package/cjs/_chunks/{dep-38eebe1a.js.map → dep-926b985d.js.map} +1 -1
  75. package/cjs/_chunks/{dep-96a5dcff.js → dep-a48c00a6.js} +3 -3
  76. package/cjs/_chunks/{dep-96a5dcff.js.map → dep-a48c00a6.js.map} +1 -1
  77. package/cjs/_chunks/{dep-500f5451.js → dep-a9ba6ee2.js} +3 -3
  78. package/cjs/_chunks/{dep-500f5451.js.map → dep-a9ba6ee2.js.map} +1 -1
  79. package/cjs/_chunks/{dep-4cf46878.js → dep-aa0f78d0.js} +2 -2
  80. package/cjs/_chunks/{dep-4cf46878.js.map → dep-aa0f78d0.js.map} +1 -1
  81. package/cjs/_chunks/{dep-51e580c9.js → dep-adfdd89d.js} +5 -5
  82. package/cjs/_chunks/{dep-51e580c9.js.map → dep-adfdd89d.js.map} +1 -1
  83. package/cjs/_chunks/{dep-bf29bebe.js → dep-b0bee6d4.js} +4 -4
  84. package/cjs/_chunks/{dep-bf29bebe.js.map → dep-b0bee6d4.js.map} +1 -1
  85. package/cjs/_chunks/{dep-0f5d89d2.js → dep-b15f7f6a.js} +5 -5
  86. package/cjs/_chunks/{dep-0f5d89d2.js.map → dep-b15f7f6a.js.map} +1 -1
  87. package/cjs/_chunks/{dep-dbaea9b7.js → dep-b6de471c.js} +2 -2
  88. package/cjs/_chunks/{dep-dbaea9b7.js.map → dep-b6de471c.js.map} +1 -1
  89. package/cjs/_chunks/{dep-f6de8ec3.js → dep-ba7c2808.js} +3 -3
  90. package/cjs/_chunks/{dep-f6de8ec3.js.map → dep-ba7c2808.js.map} +1 -1
  91. package/cjs/_chunks/{dep-a6c781d4.js → dep-bc54361d.js} +4 -4
  92. package/cjs/_chunks/{dep-a6c781d4.js.map → dep-bc54361d.js.map} +1 -1
  93. package/cjs/_chunks/{dep-b0b4c917.js → dep-c6f42896.js} +3 -3
  94. package/cjs/_chunks/{dep-b0b4c917.js.map → dep-c6f42896.js.map} +1 -1
  95. package/cjs/_chunks/{dep-e545652c.js → dep-cb80f34b.js} +4 -4
  96. package/cjs/_chunks/{dep-e545652c.js.map → dep-cb80f34b.js.map} +1 -1
  97. package/cjs/_chunks/{dep-f6b18f82.js → dep-d22a32fc.js} +3 -3
  98. package/cjs/_chunks/{dep-f6b18f82.js.map → dep-d22a32fc.js.map} +1 -1
  99. package/cjs/_chunks/{dep-91d051a7.js → dep-d55fdad5.js} +5 -5
  100. package/cjs/_chunks/{dep-91d051a7.js.map → dep-d55fdad5.js.map} +1 -1
  101. package/cjs/_chunks/{dep-b7e12004.js → dep-dba988a1.js} +4 -4
  102. package/cjs/_chunks/{dep-b7e12004.js.map → dep-dba988a1.js.map} +1 -1
  103. package/cjs/_chunks/{dep-c3249709.js → dep-dd0a1539.js} +6 -6
  104. package/cjs/_chunks/{dep-c3249709.js.map → dep-dd0a1539.js.map} +1 -1
  105. package/cjs/_chunks/{dep-b3713752.js → dep-e059eec1.js} +3 -3
  106. package/cjs/_chunks/{dep-b3713752.js.map → dep-e059eec1.js.map} +1 -1
  107. package/cjs/_chunks/{dep-eacb5b08.js → dep-e1192bf6.js} +2 -2
  108. package/cjs/_chunks/dep-e1192bf6.js.map +1 -0
  109. package/cjs/_chunks/{dep-a197bad1.js → dep-e2e3b6e6.js} +8 -8
  110. package/cjs/_chunks/{dep-a197bad1.js.map → dep-e2e3b6e6.js.map} +1 -1
  111. package/cjs/_chunks/{dep-bfb2acef.js → dep-ed7e28e8.js} +3 -3
  112. package/cjs/_chunks/{dep-bfb2acef.js.map → dep-ed7e28e8.js.map} +1 -1
  113. package/cjs/_chunks/{dep-5c340183.js → dep-effc4320.js} +5 -5
  114. package/cjs/_chunks/{dep-5c340183.js.map → dep-effc4320.js.map} +1 -1
  115. package/cjs/_chunks/{dep-8c0da64a.js → dep-f0a0dfb2.js} +4 -4
  116. package/cjs/_chunks/{dep-8c0da64a.js.map → dep-f0a0dfb2.js.map} +1 -1
  117. package/cjs/_chunks/{dep-772e0332.js → dep-f17490a2.js} +5 -5
  118. package/cjs/_chunks/{dep-772e0332.js.map → dep-f17490a2.js.map} +1 -1
  119. package/cjs/_chunks/{dep-59f248de.js → dep-f71714e3.js} +5 -5
  120. package/cjs/_chunks/{dep-59f248de.js.map → dep-f71714e3.js.map} +1 -1
  121. package/cjs/_chunks/{dep-21ceed06.js → dep-fd69a1c1.js} +3 -3
  122. package/cjs/_chunks/{dep-21ceed06.js.map → dep-fd69a1c1.js.map} +1 -1
  123. package/cjs/_chunks/{dep-336a6e56.js → dep-fd8d83aa.js} +5 -5
  124. package/cjs/_chunks/{dep-336a6e56.js.map → dep-fd8d83aa.js.map} +1 -1
  125. package/cjs/_common/js/avatar/utils.js +1 -1
  126. package/cjs/_common/js/color-picker/cmyk.js +1 -1
  127. package/cjs/_common/js/color-picker/color.js +14 -14
  128. package/cjs/_common/js/color-picker/constants.js +1 -1
  129. package/cjs/_common/js/color-picker/draggable.js +5 -5
  130. package/cjs/_common/js/color-picker/gradient.js +9 -9
  131. package/cjs/_common/js/color-picker/index.js +14 -14
  132. package/cjs/_common/js/common.js +1 -1
  133. package/cjs/_common/js/date-picker/format.js +22 -22
  134. package/cjs/_common/js/date-picker/utils.js +22 -22
  135. package/cjs/_common/js/drawer/utils.js +1 -1
  136. package/cjs/_common/js/global-config/default-config.js +1 -1
  137. package/cjs/_common/js/global-config/locale/ar_KW.js +5 -5
  138. package/cjs/_common/js/global-config/locale/en_US.js +3 -3
  139. package/cjs/_common/js/global-config/locale/it_IT.js +5 -5
  140. package/cjs/_common/js/global-config/locale/ja_JP.js +5 -5
  141. package/cjs/_common/js/global-config/locale/ko_KR.js +5 -5
  142. package/cjs/_common/js/global-config/locale/ru_RU.js +5 -5
  143. package/cjs/_common/js/global-config/locale/zh_CN.js +5 -5
  144. package/cjs/_common/js/global-config/locale/zh_TW.js +5 -5
  145. package/cjs/_common/js/global-config/mobile/default-config.js +1 -1
  146. package/cjs/_common/js/global-config/mobile/locale/ar_KW.js +5 -5
  147. package/cjs/_common/js/global-config/mobile/locale/en_US.js +3 -3
  148. package/cjs/_common/js/global-config/mobile/locale/it_IT.js +5 -5
  149. package/cjs/_common/js/global-config/mobile/locale/ja_JP.js +5 -5
  150. package/cjs/_common/js/global-config/mobile/locale/ko_KR.js +5 -5
  151. package/cjs/_common/js/global-config/mobile/locale/ru_RU.js +5 -5
  152. package/cjs/_common/js/global-config/mobile/locale/zh_CN.js +5 -5
  153. package/cjs/_common/js/global-config/mobile/locale/zh_TW.js +5 -5
  154. package/cjs/_common/js/input-number/large-number.js +11 -11
  155. package/cjs/_common/js/input-number/number.js +12 -12
  156. package/cjs/_common/js/loading/circle-adapter.js +16 -16
  157. package/cjs/_common/js/log/index.js +1 -1
  158. package/cjs/_common/js/log/log.js +1 -1
  159. package/cjs/_common/js/log/types.js +1 -1
  160. package/cjs/_common/js/progress/const.js +1 -1
  161. package/cjs/_common/js/slider/utils.js +7 -7
  162. package/cjs/_common/js/statistic/tween.js +17 -17
  163. package/cjs/_common/js/statistic/utils.js +1 -1
  164. package/cjs/_common/js/table/tree-store.js +23 -23
  165. package/cjs/_common/js/table/types.js +1 -1
  166. package/cjs/_common/js/table/utils.js +14 -14
  167. package/cjs/_common/js/tabs/base.js +1 -1
  168. package/cjs/_common/js/time-picker/const.js +1 -1
  169. package/cjs/_common/js/time-picker/utils.js +5 -5
  170. package/cjs/_common/js/tree/tree-node-model.js +22 -22
  171. package/cjs/_common/js/tree/tree-node.js +29 -29
  172. package/cjs/_common/js/tree/tree-store.js +33 -33
  173. package/cjs/_common/js/tree/types.js +1 -1
  174. package/cjs/_common/js/tree-v1/tree-node-model.js +22 -22
  175. package/cjs/_common/js/tree-v1/tree-node.js +30 -30
  176. package/cjs/_common/js/tree-v1/tree-store.js +34 -34
  177. package/cjs/_common/js/tree-v1/types.js +1 -1
  178. package/cjs/_common/js/upload/main.js +13 -13
  179. package/cjs/_common/js/upload/types.js +1 -1
  180. package/cjs/_common/js/upload/utils.js +1 -1
  181. package/cjs/_common/js/upload/xhr.js +10 -10
  182. package/cjs/_common/js/utils/calcTextareaHeight.js +16 -16
  183. package/cjs/_common/js/utils/getPosition.js +1 -1
  184. package/cjs/_common/js/utils/getScrollbarWidth.js +16 -16
  185. package/cjs/_common/js/utils/helper.js +16 -16
  186. package/cjs/_common/js/utils/injectStyle.js +1 -1
  187. package/cjs/_common/js/utils/observe.js +1 -1
  188. package/cjs/_common/js/utils/set-style.js +1 -1
  189. package/cjs/_common/js/utils/swapDragArrayElement.js +3 -3
  190. package/cjs/_common/js/watermark/generateBase64Url.js +4 -4
  191. package/cjs/_common/js/watermark/randomMovingStyle.js +1 -1
  192. package/cjs/_common/js/watermark/type.js +1 -1
  193. package/cjs/_util/classname.js +1 -1
  194. package/cjs/_util/component.js +2 -2
  195. package/cjs/_util/dom.js +7 -7
  196. package/cjs/_util/easing.js +1 -1
  197. package/cjs/_util/eventDispose.js +1 -1
  198. package/cjs/_util/helper.js +16 -16
  199. package/cjs/_util/icon.js +1 -1
  200. package/cjs/_util/lightDom.js +12 -12
  201. package/cjs/_util/linearGradient.js +2 -2
  202. package/cjs/_util/noop.js +1 -1
  203. package/cjs/_util/parseTNode.js +8 -8
  204. package/cjs/_util/useControlled.js +10 -10
  205. package/cjs/_util/useDragSorter.js +5 -5
  206. package/cjs/affix/affix.js +11 -11
  207. package/cjs/affix/index.js +12 -12
  208. package/cjs/affix/type.js +1 -1
  209. package/cjs/alert/alert.js +10 -10
  210. package/cjs/alert/index.js +11 -11
  211. package/cjs/alert/type.js +1 -1
  212. package/cjs/avatar/avatar-group.js +13 -13
  213. package/cjs/avatar/avatar.js +7 -7
  214. package/cjs/avatar/index.js +14 -14
  215. package/cjs/avatar/style/index.js +7 -4
  216. package/cjs/avatar/style/index.js.map +1 -1
  217. package/cjs/avatar/type.js +1 -1
  218. package/cjs/back-top/back-top.js +11 -11
  219. package/cjs/back-top/index.js +12 -12
  220. package/cjs/back-top/type.js +1 -1
  221. package/cjs/badge/badge.js +7 -7
  222. package/cjs/badge/index.js +8 -8
  223. package/cjs/badge/type.js +1 -1
  224. package/cjs/breadcrumb/breadcrumb-item.js +25 -25
  225. package/cjs/breadcrumb/breadcrumb.js +25 -25
  226. package/cjs/breadcrumb/index.js +25 -25
  227. package/cjs/breadcrumb/type.js +1 -1
  228. package/cjs/button/button.js +13 -13
  229. package/cjs/button/index.js +15 -15
  230. package/cjs/button/type.js +1 -1
  231. package/cjs/card/card.js +20 -20
  232. package/cjs/card/index.js +20 -20
  233. package/cjs/card/type.js +1 -1
  234. package/cjs/checkbox/checkbox-group.js +13 -13
  235. package/cjs/checkbox/checkbox.js +6 -6
  236. package/cjs/checkbox/index.js +14 -14
  237. package/cjs/checkbox/style/index.js +2 -2
  238. package/cjs/checkbox/type.js +1 -1
  239. package/cjs/collapse/collapse-animation.js +1 -1
  240. package/cjs/collapse/collapse-panel.js +6 -6
  241. package/cjs/collapse/collapse.js +8 -8
  242. package/cjs/collapse/index.js +9 -9
  243. package/cjs/collapse/type.js +1 -1
  244. package/cjs/comment/index.js +6 -6
  245. package/cjs/common/check/index.js +7 -7
  246. package/cjs/common/check/types.js +1 -1
  247. package/cjs/common/fake-arrow.js +6 -6
  248. package/cjs/common/index.js +12 -12
  249. package/cjs/common/portal.js +11 -11
  250. package/cjs/common.js +1 -1
  251. package/cjs/common.js.map +1 -1
  252. package/cjs/dialog/dialog.js +11 -11
  253. package/cjs/dialog/index.js +19 -16
  254. package/cjs/dialog/index.js.map +1 -1
  255. package/cjs/dialog/plugin.js +11 -11
  256. package/cjs/dialog/stack.js +1 -1
  257. package/cjs/dialog/type.js +1 -1
  258. package/cjs/divider/divider.js +6 -6
  259. package/cjs/divider/index.js +7 -7
  260. package/cjs/divider/style/index.js +2 -2
  261. package/cjs/divider/type.js +1 -1
  262. package/cjs/dropdown/defaultProps.js +1 -1
  263. package/cjs/dropdown/dropdown.js +35 -35
  264. package/cjs/dropdown/dropdownItem.js +18 -18
  265. package/cjs/dropdown/dropdownMenu.js +24 -24
  266. package/cjs/dropdown/getDropdownOptions.js +24 -24
  267. package/cjs/dropdown/index.js +35 -35
  268. package/cjs/dropdown/type.js +1 -1
  269. package/cjs/grid/col.js +12 -12
  270. package/cjs/grid/defaultProps.js +1 -1
  271. package/cjs/grid/index.js +17 -17
  272. package/cjs/grid/row.js +16 -16
  273. package/cjs/grid/type.js +1 -1
  274. package/cjs/icon/utils.js +1 -1
  275. package/cjs/image/image.js +11 -11
  276. package/cjs/image/index.js +11 -11
  277. package/cjs/image/style/index.js +2 -2
  278. package/cjs/image/type.js +1 -1
  279. package/cjs/index-lib.js +52 -53
  280. package/cjs/index-lib.js.map +1 -1
  281. package/cjs/index.js +52 -53
  282. package/cjs/index.js.map +1 -1
  283. package/cjs/input/index.js +23 -23
  284. package/cjs/input/input-group.js +7 -7
  285. package/cjs/input/input.js +20 -20
  286. package/cjs/input/type.js +1 -1
  287. package/cjs/input/useLengthLimit.js +16 -16
  288. package/cjs/input-number/index.js +24 -24
  289. package/cjs/input-number/input-number.js +24 -24
  290. package/cjs/input-number/style/index.js +2 -2
  291. package/cjs/input-number/type.js +1 -1
  292. package/cjs/jsx.js +30 -0
  293. package/cjs/jsx.js.map +1 -0
  294. package/cjs/link/index.js +12 -12
  295. package/cjs/link/link.js +11 -11
  296. package/cjs/link/type.js +1 -1
  297. package/cjs/list/index.js +21 -21
  298. package/cjs/list/list-item-meta.js +6 -6
  299. package/cjs/list/list-item.js +18 -18
  300. package/cjs/list/list.js +19 -19
  301. package/cjs/list/types.js +1 -1
  302. package/cjs/loading/gradient.js +18 -18
  303. package/cjs/loading/index.js +20 -20
  304. package/cjs/loading/loading.js +18 -18
  305. package/cjs/loading/plugin.js +18 -18
  306. package/cjs/loading/type.js +1 -1
  307. package/cjs/menu/Menu.js +12 -12
  308. package/cjs/menu/MenuItem.js +38 -13
  309. package/cjs/menu/MenuItem.js.map +1 -1
  310. package/cjs/menu/_util/constant.js +1 -1
  311. package/cjs/menu/index.js +37 -14
  312. package/cjs/menu/index.js.map +1 -1
  313. package/cjs/menu/type.js +1 -1
  314. package/cjs/message/config.js +4 -4
  315. package/cjs/message/const.js +5 -3
  316. package/cjs/message/const.js.map +1 -1
  317. package/cjs/message/defaultProps.js +1 -1
  318. package/cjs/message/index.js +36 -16
  319. package/cjs/message/index.js.map +1 -1
  320. package/cjs/message/message.js +37 -16
  321. package/cjs/message/message.js.map +1 -1
  322. package/cjs/message/messageClose.js +17 -9
  323. package/cjs/message/messageClose.js.map +1 -1
  324. package/cjs/message/messageComponent.js +38 -16
  325. package/cjs/message/messageComponent.js.map +1 -1
  326. package/cjs/message/messageIcon.js +32 -3
  327. package/cjs/message/messageIcon.js.map +1 -1
  328. package/cjs/message/type.js +1 -1
  329. package/cjs/notification/Notification.js +12 -12
  330. package/cjs/notification/NotificationList.js +12 -12
  331. package/cjs/notification/NotificationPlugin.js +12 -12
  332. package/cjs/notification/config.js +4 -4
  333. package/cjs/notification/defaultProps.js +1 -1
  334. package/cjs/notification/index.js +13 -13
  335. package/cjs/notification/type.js +1 -1
  336. package/cjs/popconfirm/index.js +25 -25
  337. package/cjs/popconfirm/popconfirm.js +25 -25
  338. package/cjs/popconfirm/popcontent.js +15 -15
  339. package/cjs/popconfirm/type.js +1 -1
  340. package/cjs/popup/index.js +24 -24
  341. package/cjs/popup/popup.js +22 -23
  342. package/cjs/popup/popup.js.map +1 -1
  343. package/cjs/popup/popupTrigger.js +6 -6
  344. package/cjs/popup/type.js +1 -1
  345. package/cjs/popup/utils.js +1 -1
  346. package/cjs/progress/index.js +8 -8
  347. package/cjs/progress/progress.js +7 -7
  348. package/cjs/progress/type.js +1 -1
  349. package/cjs/radio/index.js +14 -14
  350. package/cjs/radio/radio.js +7 -7
  351. package/cjs/radio/radioButton.js +7 -7
  352. package/cjs/radio/radioGroup.js +13 -13
  353. package/cjs/radio/type.js +1 -1
  354. package/cjs/range-input/RangeInput.js +31 -10
  355. package/cjs/range-input/RangeInput.js.map +1 -1
  356. package/cjs/range-input/RangeInputInner.js +36 -9
  357. package/cjs/range-input/RangeInputInner.js.map +1 -1
  358. package/cjs/range-input/index.js +32 -12
  359. package/cjs/range-input/index.js.map +1 -1
  360. package/cjs/range-input/type.js +1 -1
  361. package/cjs/react.js +68 -0
  362. package/cjs/react.js.map +1 -0
  363. package/cjs/select/defaultProps.js +1 -1
  364. package/cjs/select/index.js +1 -1
  365. package/cjs/select/option.js +1 -1
  366. package/cjs/select/type.js +1 -1
  367. package/cjs/select-input/SelectInput.js +34 -34
  368. package/cjs/select-input/SelectInputMultiple.js +26 -26
  369. package/cjs/select-input/SelectInputSingle.js +24 -24
  370. package/cjs/select-input/defaultProps.js +1 -1
  371. package/cjs/select-input/index.js +34 -34
  372. package/cjs/select-input/interface.js +1 -1
  373. package/cjs/select-input/type.js +1 -1
  374. package/cjs/select-input/useOverlayInnerStyle.js +16 -16
  375. package/cjs/skeleton/index.js +21 -21
  376. package/cjs/skeleton/skeleton.js +20 -20
  377. package/cjs/skeleton/type.js +1 -1
  378. package/cjs/slider/index.js +34 -31
  379. package/cjs/slider/index.js.map +1 -1
  380. package/cjs/slider/slider-button.js +25 -25
  381. package/cjs/slider/slider-mark.js +5 -5
  382. package/cjs/slider/slider.js +29 -29
  383. package/cjs/slider/type.js +1 -1
  384. package/cjs/space/index.js +8 -8
  385. package/cjs/space/space.js +6 -6
  386. package/cjs/space/type.js +1 -1
  387. package/cjs/swiper/index.js +7 -7
  388. package/cjs/swiper/swiper-item.js +6 -6
  389. package/cjs/swiper/swiper.js +6 -6
  390. package/cjs/swiper/type.js +1 -1
  391. package/cjs/switch/index.js +13 -13
  392. package/cjs/switch/switch.js +12 -12
  393. package/cjs/switch/type.js +1 -1
  394. package/cjs/tabs/TabBar.js +6 -6
  395. package/cjs/tabs/TabNav.js +21 -21
  396. package/cjs/tabs/TabNavItem.js +6 -6
  397. package/cjs/tabs/index.js +22 -22
  398. package/cjs/tabs/tabPanel.js +5 -5
  399. package/cjs/tabs/tabs.js +21 -21
  400. package/cjs/tabs/type.js +1 -1
  401. package/cjs/tabs/useTabClass.js +1 -1
  402. package/cjs/tag/index.js +14 -14
  403. package/cjs/tag/tag.js +12 -12
  404. package/cjs/tag/type.js +1 -1
  405. package/cjs/tag-input/index.js +25 -25
  406. package/cjs/tag-input/tag-input.js +24 -24
  407. package/cjs/tag-input/type.js +1 -1
  408. package/cjs/textarea/index.js +19 -19
  409. package/cjs/textarea/textarea.js +18 -18
  410. package/cjs/textarea/type.js +1 -1
  411. package/cjs/tooltip/index.js +25 -25
  412. package/cjs/tooltip/tooltip.js +24 -24
  413. package/cjs/tooltip/type.js +1 -1
  414. package/cjs/upload/CustomFile.js +1 -1
  415. package/cjs/upload/ImageCard.js +25 -25
  416. package/cjs/upload/NormalFile.js +22 -22
  417. package/cjs/upload/hooks/useUpload.js +16 -16
  418. package/cjs/upload/index.js +28 -28
  419. package/cjs/upload/interface.js +1 -1
  420. package/cjs/upload/type.js +1 -1
  421. package/cjs/upload/upload.js +27 -27
  422. package/cjs/upload/utils/index.js +1 -1
  423. package/cjs/vue.js +66 -0
  424. package/cjs/vue.js.map +1 -0
  425. package/cjs/watermark/index.js +18 -18
  426. package/cjs/watermark/type.js +1 -1
  427. package/cjs/watermark/utils.js +9 -9
  428. package/cjs/watermark/watermark.js +17 -17
  429. package/dist/{Tdesign Web Components.js → TDesign Web Components.js } +530 -385
  430. package/dist/TDesign Web Components.js.map +1 -0
  431. package/dist/TDesign Web Components.min.js +9 -0
  432. package/dist/TDesign Web Components.min.js.map +1 -0
  433. package/dist/style/index.js +1 -1
  434. package/{lib/_chunks/dep-ec45833d.js → esm/_chunks/dep-0035b1d8.js} +5 -5
  435. package/{lib/_chunks/dep-ec45833d.js.map → esm/_chunks/dep-0035b1d8.js.map} +1 -1
  436. package/{lib/_chunks/dep-1ba9def4.js → esm/_chunks/dep-0127b722.js} +2 -2
  437. package/esm/_chunks/{dep-1ba9def4.js.map → dep-0127b722.js.map} +1 -1
  438. package/{lib/_chunks/dep-8562fd08.js → esm/_chunks/dep-06a4c568.js} +3 -3
  439. package/esm/_chunks/{dep-8562fd08.js.map → dep-06a4c568.js.map} +1 -1
  440. package/{lib/_chunks/dep-0dda128f.js → esm/_chunks/dep-1374507c.js} +3 -3
  441. package/esm/_chunks/{dep-0dda128f.js.map → dep-1374507c.js.map} +1 -1
  442. package/{lib/_chunks/dep-4d8f6442.js → esm/_chunks/dep-1aae581e.js} +5 -5
  443. package/esm/_chunks/{dep-4d8f6442.js.map → dep-1aae581e.js.map} +1 -1
  444. package/{lib/_chunks/dep-a8959243.js → esm/_chunks/dep-1d52b1ca.js} +3 -3
  445. package/esm/_chunks/{dep-a8959243.js.map → dep-1d52b1ca.js.map} +1 -1
  446. package/{lib/_chunks/dep-baf89e46.js → esm/_chunks/dep-2444cd85.js} +5 -5
  447. package/esm/_chunks/{dep-baf89e46.js.map → dep-2444cd85.js.map} +1 -1
  448. package/esm/_chunks/{dep-381e1c08.js → dep-281111aa.js} +5 -5
  449. package/{lib/_chunks/dep-381e1c08.js.map → esm/_chunks/dep-281111aa.js.map} +1 -1
  450. package/{lib/_chunks/dep-c34f1dc2.js → esm/_chunks/dep-2e22db97.js} +3 -3
  451. package/esm/_chunks/{dep-c34f1dc2.js.map → dep-2e22db97.js.map} +1 -1
  452. package/esm/_chunks/{dep-38c97b2a.js → dep-30600028.js} +2 -2
  453. package/esm/_chunks/{dep-38c97b2a.js.map → dep-30600028.js.map} +1 -1
  454. package/{lib/_chunks/dep-99a596b7.js → esm/_chunks/dep-36cc7415.js} +3 -3
  455. package/{lib/_chunks/dep-99a596b7.js.map → esm/_chunks/dep-36cc7415.js.map} +1 -1
  456. package/{lib/_chunks/dep-05782538.js → esm/_chunks/dep-3be3def3.js} +3 -3
  457. package/esm/_chunks/{dep-05782538.js.map → dep-3be3def3.js.map} +1 -1
  458. package/{lib/_chunks/dep-be11274b.js → esm/_chunks/dep-3ea841a9.js} +3 -3
  459. package/esm/_chunks/{dep-be11274b.js.map → dep-3ea841a9.js.map} +1 -1
  460. package/esm/_chunks/{dep-1c8ee912.js → dep-4df84cf0.js} +5 -5
  461. package/{lib/_chunks/dep-1c8ee912.js.map → esm/_chunks/dep-4df84cf0.js.map} +1 -1
  462. package/{lib/_chunks/dep-ef1567ad.js → esm/_chunks/dep-52750ef2.js} +6 -6
  463. package/{lib/_chunks/dep-ef1567ad.js.map → esm/_chunks/dep-52750ef2.js.map} +1 -1
  464. package/esm/_chunks/{dep-6ead5d56.js → dep-54a6574b.js} +5 -5
  465. package/esm/_chunks/{dep-6ead5d56.js.map → dep-54a6574b.js.map} +1 -1
  466. package/esm/_chunks/{dep-11dd112e.js → dep-56b15a97.js} +4 -4
  467. package/esm/_chunks/{dep-11dd112e.js.map → dep-56b15a97.js.map} +1 -1
  468. package/{lib/_chunks/dep-925c40dd.js → esm/_chunks/dep-58a19489.js} +5 -5
  469. package/esm/_chunks/{dep-925c40dd.js.map → dep-58a19489.js.map} +1 -1
  470. package/esm/_chunks/{dep-aaf2a63c.js → dep-5bbae9bf.js} +6 -6
  471. package/{lib/_chunks/dep-aaf2a63c.js.map → esm/_chunks/dep-5bbae9bf.js.map} +1 -1
  472. package/{lib/_chunks/dep-84f0ebdd.js → esm/_chunks/dep-65fb89ee.js} +8 -8
  473. package/{lib/_chunks/dep-84f0ebdd.js.map → esm/_chunks/dep-65fb89ee.js.map} +1 -1
  474. package/esm/_chunks/{dep-41d14c19.js → dep-6745cbfe.js} +10 -10
  475. package/{lib/_chunks/dep-41d14c19.js.map → esm/_chunks/dep-6745cbfe.js.map} +1 -1
  476. package/esm/_chunks/{dep-80653a03.js → dep-675b140a.js} +4 -4
  477. package/{lib/_chunks/dep-80653a03.js.map → esm/_chunks/dep-675b140a.js.map} +1 -1
  478. package/{lib/_chunks/dep-25830c97.js → esm/_chunks/dep-6e878e69.js} +4 -4
  479. package/{lib/_chunks/dep-25830c97.js.map → esm/_chunks/dep-6e878e69.js.map} +1 -1
  480. package/{lib/_chunks/dep-54525a11.js → esm/_chunks/dep-72f7728b.js} +5 -5
  481. package/{lib/_chunks/dep-54525a11.js.map → esm/_chunks/dep-72f7728b.js.map} +1 -1
  482. package/{lib/_chunks/dep-0ddaf65c.js → esm/_chunks/dep-7bbe6e06.js} +4 -4
  483. package/esm/_chunks/{dep-0ddaf65c.js.map → dep-7bbe6e06.js.map} +1 -1
  484. package/esm/_chunks/{dep-53bf1c29.js → dep-7c97da8d.js} +5 -5
  485. package/{lib/_chunks/dep-53bf1c29.js.map → esm/_chunks/dep-7c97da8d.js.map} +1 -1
  486. package/esm/_chunks/{dep-a3686c78.js → dep-8185fdbc.js} +2 -2
  487. package/esm/_chunks/{dep-a3686c78.js.map → dep-8185fdbc.js.map} +1 -1
  488. package/{lib/_chunks/dep-6888d2ee.js → esm/_chunks/dep-82df3fb7.js} +5 -5
  489. package/{lib/_chunks/dep-6888d2ee.js.map → esm/_chunks/dep-82df3fb7.js.map} +1 -1
  490. package/esm/_chunks/{dep-9547d922.js → dep-8b10daa4.js} +5 -5
  491. package/esm/_chunks/{dep-9547d922.js.map → dep-8b10daa4.js.map} +1 -1
  492. package/esm/_chunks/{dep-109d6386.js → dep-8b13bea3.js} +3 -3
  493. package/esm/_chunks/{dep-109d6386.js.map → dep-8b13bea3.js.map} +1 -1
  494. package/{lib/_chunks/dep-908cc0dc.js → esm/_chunks/dep-8d12f25c.js} +3 -3
  495. package/esm/_chunks/{dep-908cc0dc.js.map → dep-8d12f25c.js.map} +1 -1
  496. package/{lib/_chunks/dep-d946ac25.js → esm/_chunks/dep-935259c3.js} +5 -5
  497. package/{lib/_chunks/dep-d946ac25.js.map → esm/_chunks/dep-935259c3.js.map} +1 -1
  498. package/esm/_chunks/{dep-f4d2474c.js → dep-9e7be8fe.js} +2 -2
  499. package/esm/_chunks/dep-9e7be8fe.js.map +1 -0
  500. package/{lib/_chunks/dep-3203793c.js → esm/_chunks/dep-9f55c618.js} +13 -13
  501. package/esm/_chunks/{dep-3203793c.js.map → dep-9f55c618.js.map} +1 -1
  502. package/esm/_chunks/{dep-374a954f.js → dep-a2ed30b7.js} +16 -16
  503. package/{lib/_chunks/dep-374a954f.js.map → esm/_chunks/dep-a2ed30b7.js.map} +1 -1
  504. package/{lib/_chunks/dep-0f3b3524.js → esm/_chunks/dep-b1ef5816.js} +2 -2
  505. package/{lib/_chunks/dep-0f3b3524.js.map → esm/_chunks/dep-b1ef5816.js.map} +1 -1
  506. package/esm/_chunks/{dep-9eb8951d.js → dep-b8bd80bb.js} +3 -3
  507. package/{lib/_chunks/dep-9eb8951d.js.map → esm/_chunks/dep-b8bd80bb.js.map} +1 -1
  508. package/esm/_chunks/{dep-33c7d91d.js → dep-b964e274.js} +4 -4
  509. package/esm/_chunks/{dep-33c7d91d.js.map → dep-b964e274.js.map} +1 -1
  510. package/{lib/_chunks/dep-3943414d.js → esm/_chunks/dep-bcdf180e.js} +3 -3
  511. package/esm/_chunks/{dep-3943414d.js.map → dep-bcdf180e.js.map} +1 -1
  512. package/esm/_chunks/{dep-5539815f.js → dep-bde75ce6.js} +3 -3
  513. package/esm/_chunks/{dep-5539815f.js.map → dep-bde75ce6.js.map} +1 -1
  514. package/{lib/_chunks/dep-db7e258b.js → esm/_chunks/dep-bfcdde2a.js} +4 -4
  515. package/{lib/_chunks/dep-db7e258b.js.map → esm/_chunks/dep-bfcdde2a.js.map} +1 -1
  516. package/esm/_chunks/{dep-14dd2727.js → dep-c4a888b8.js} +4 -4
  517. package/{lib/_chunks/dep-14dd2727.js.map → esm/_chunks/dep-c4a888b8.js.map} +1 -1
  518. package/{lib/_chunks/dep-dda335c5.js → esm/_chunks/dep-c52dea9f.js} +2 -2
  519. package/esm/_chunks/{dep-dda335c5.js.map → dep-c52dea9f.js.map} +1 -1
  520. package/esm/_chunks/{dep-08ba0c65.js → dep-c8a63125.js} +5 -5
  521. package/{lib/_chunks/dep-08ba0c65.js.map → esm/_chunks/dep-c8a63125.js.map} +1 -1
  522. package/{lib/_chunks/dep-4429f427.js → esm/_chunks/dep-cc4bc276.js} +4 -4
  523. package/esm/_chunks/{dep-4429f427.js.map → dep-cc4bc276.js.map} +1 -1
  524. package/{lib/_chunks/dep-caa15d01.js → esm/_chunks/dep-d0d79ac1.js} +4 -4
  525. package/{lib/_chunks/dep-caa15d01.js.map → esm/_chunks/dep-d0d79ac1.js.map} +1 -1
  526. package/{lib/_chunks/dep-0731654d.js → esm/_chunks/dep-d2609e75.js} +4 -4
  527. package/esm/_chunks/{dep-0731654d.js.map → dep-d2609e75.js.map} +1 -1
  528. package/esm/_chunks/{dep-3cee19ed.js → dep-d959f790.js} +2 -2
  529. package/esm/_chunks/{dep-3cee19ed.js.map → dep-d959f790.js.map} +1 -1
  530. package/{lib/_chunks/dep-8fe87161.js → esm/_chunks/dep-dcaa1c82.js} +5 -5
  531. package/{lib/_chunks/dep-8fe87161.js.map → esm/_chunks/dep-dcaa1c82.js.map} +1 -1
  532. package/{lib/_chunks/dep-28c3b974.js → esm/_chunks/dep-dff46f81.js} +3 -3
  533. package/esm/_chunks/{dep-28c3b974.js.map → dep-dff46f81.js.map} +1 -1
  534. package/esm/_chunks/{dep-0acd840e.js → dep-f4fd9de2.js} +3 -3
  535. package/esm/_chunks/{dep-0acd840e.js.map → dep-f4fd9de2.js.map} +1 -1
  536. package/{lib/_chunks/dep-6dad7e1f.js → esm/_chunks/dep-fec511f3.js} +6 -6
  537. package/esm/_chunks/{dep-6dad7e1f.js.map → dep-fec511f3.js.map} +1 -1
  538. package/esm/_common/js/avatar/utils.js +1 -1
  539. package/esm/_common/js/color-picker/cmyk.js +1 -1
  540. package/esm/_common/js/color-picker/color.js +14 -14
  541. package/esm/_common/js/color-picker/constants.js +1 -1
  542. package/esm/_common/js/color-picker/draggable.js +5 -5
  543. package/esm/_common/js/color-picker/gradient.js +9 -9
  544. package/esm/_common/js/color-picker/index.js +14 -14
  545. package/esm/_common/js/common.js +1 -1
  546. package/esm/_common/js/date-picker/format.js +22 -22
  547. package/esm/_common/js/date-picker/utils.js +22 -22
  548. package/esm/_common/js/drawer/utils.js +1 -1
  549. package/esm/_common/js/global-config/default-config.js +1 -1
  550. package/esm/_common/js/global-config/locale/ar_KW.js +5 -5
  551. package/esm/_common/js/global-config/locale/en_US.js +3 -3
  552. package/esm/_common/js/global-config/locale/it_IT.js +5 -5
  553. package/esm/_common/js/global-config/locale/ja_JP.js +5 -5
  554. package/esm/_common/js/global-config/locale/ko_KR.js +5 -5
  555. package/esm/_common/js/global-config/locale/ru_RU.js +5 -5
  556. package/esm/_common/js/global-config/locale/zh_CN.js +5 -5
  557. package/esm/_common/js/global-config/locale/zh_TW.js +5 -5
  558. package/esm/_common/js/global-config/mobile/default-config.js +1 -1
  559. package/esm/_common/js/global-config/mobile/locale/ar_KW.js +5 -5
  560. package/esm/_common/js/global-config/mobile/locale/en_US.js +3 -3
  561. package/esm/_common/js/global-config/mobile/locale/it_IT.js +5 -5
  562. package/esm/_common/js/global-config/mobile/locale/ja_JP.js +5 -5
  563. package/esm/_common/js/global-config/mobile/locale/ko_KR.js +5 -5
  564. package/esm/_common/js/global-config/mobile/locale/ru_RU.js +5 -5
  565. package/esm/_common/js/global-config/mobile/locale/zh_CN.js +5 -5
  566. package/esm/_common/js/global-config/mobile/locale/zh_TW.js +5 -5
  567. package/esm/_common/js/input-number/large-number.js +11 -11
  568. package/esm/_common/js/input-number/number.js +12 -12
  569. package/esm/_common/js/loading/circle-adapter.js +16 -16
  570. package/esm/_common/js/log/index.js +1 -1
  571. package/esm/_common/js/log/log.js +1 -1
  572. package/esm/_common/js/log/types.js +1 -1
  573. package/esm/_common/js/progress/const.js +1 -1
  574. package/esm/_common/js/slider/utils.js +7 -7
  575. package/esm/_common/js/statistic/tween.js +17 -17
  576. package/esm/_common/js/statistic/utils.js +1 -1
  577. package/esm/_common/js/table/tree-store.js +23 -23
  578. package/esm/_common/js/table/types.js +1 -1
  579. package/esm/_common/js/table/utils.js +14 -14
  580. package/esm/_common/js/tabs/base.js +1 -1
  581. package/esm/_common/js/time-picker/const.js +1 -1
  582. package/esm/_common/js/time-picker/utils.js +5 -5
  583. package/esm/_common/js/tree/tree-node-model.js +22 -22
  584. package/esm/_common/js/tree/tree-node.js +29 -29
  585. package/esm/_common/js/tree/tree-store.js +33 -33
  586. package/esm/_common/js/tree/types.js +1 -1
  587. package/esm/_common/js/tree-v1/tree-node-model.js +22 -22
  588. package/esm/_common/js/tree-v1/tree-node.js +30 -30
  589. package/esm/_common/js/tree-v1/tree-store.js +34 -34
  590. package/esm/_common/js/tree-v1/types.js +1 -1
  591. package/esm/_common/js/upload/main.js +13 -13
  592. package/esm/_common/js/upload/types.js +1 -1
  593. package/esm/_common/js/upload/utils.js +1 -1
  594. package/esm/_common/js/upload/xhr.js +10 -10
  595. package/esm/_common/js/utils/calcTextareaHeight.js +16 -16
  596. package/esm/_common/js/utils/getPosition.js +1 -1
  597. package/esm/_common/js/utils/getScrollbarWidth.js +16 -16
  598. package/esm/_common/js/utils/helper.js +16 -16
  599. package/esm/_common/js/utils/injectStyle.js +1 -1
  600. package/esm/_common/js/utils/observe.js +1 -1
  601. package/esm/_common/js/utils/set-style.js +1 -1
  602. package/esm/_common/js/utils/swapDragArrayElement.js +3 -3
  603. package/esm/_common/js/watermark/generateBase64Url.js +4 -4
  604. package/esm/_common/js/watermark/randomMovingStyle.js +1 -1
  605. package/esm/_common/js/watermark/type.js +1 -1
  606. package/esm/_util/classname.js +1 -1
  607. package/esm/_util/component.js +2 -2
  608. package/esm/_util/dom.js +7 -7
  609. package/esm/_util/easing.js +1 -1
  610. package/esm/_util/eventDispose.js +1 -1
  611. package/esm/_util/helper.js +16 -16
  612. package/esm/_util/icon.js +1 -1
  613. package/esm/_util/lightDom.js +12 -12
  614. package/esm/_util/linearGradient.js +2 -2
  615. package/esm/_util/noop.js +1 -1
  616. package/esm/_util/parseTNode.js +8 -8
  617. package/esm/_util/useControlled.js +10 -10
  618. package/esm/_util/useDragSorter.js +5 -5
  619. package/esm/affix/affix.js +11 -11
  620. package/esm/affix/index.js +11 -11
  621. package/esm/affix/type.js +1 -1
  622. package/esm/alert/alert.js +10 -10
  623. package/esm/alert/index.js +10 -10
  624. package/esm/alert/type.js +1 -1
  625. package/esm/avatar/avatar-group.js +13 -13
  626. package/esm/avatar/avatar.js +7 -7
  627. package/esm/avatar/index.js +13 -13
  628. package/esm/avatar/style/index.js +1 -1
  629. package/esm/avatar/style/wc.less +26 -0
  630. package/esm/avatar/type.js +1 -1
  631. package/esm/back-top/back-top.js +11 -11
  632. package/esm/back-top/index.js +11 -11
  633. package/esm/back-top/type.js +1 -1
  634. package/esm/badge/badge.js +7 -7
  635. package/esm/badge/index.js +7 -7
  636. package/esm/badge/type.js +1 -1
  637. package/esm/breadcrumb/breadcrumb-item.js +22 -22
  638. package/esm/breadcrumb/breadcrumb.js +22 -22
  639. package/esm/breadcrumb/index.js +22 -22
  640. package/esm/breadcrumb/type.js +1 -1
  641. package/esm/button/button.js +13 -13
  642. package/esm/button/index.js +13 -13
  643. package/esm/button/type.js +1 -1
  644. package/esm/card/card.js +18 -18
  645. package/esm/card/index.js +18 -18
  646. package/esm/card/type.js +1 -1
  647. package/esm/checkbox/checkbox-group.js +13 -13
  648. package/esm/checkbox/checkbox.js +6 -6
  649. package/esm/checkbox/index.js +13 -13
  650. package/esm/checkbox/style/index.js +1 -1
  651. package/esm/checkbox/type.js +1 -1
  652. package/esm/collapse/collapse-animation.js +1 -1
  653. package/esm/collapse/collapse-panel.js +6 -6
  654. package/esm/collapse/collapse.js +8 -8
  655. package/esm/collapse/index.js +8 -8
  656. package/esm/collapse/type.js +1 -1
  657. package/esm/comment/index.js +6 -6
  658. package/esm/common/check/index.js +7 -7
  659. package/esm/common/check/types.js +1 -1
  660. package/esm/common/fake-arrow.js +6 -6
  661. package/esm/common/index.js +12 -12
  662. package/esm/common/portal.js +11 -11
  663. package/esm/common.js +1 -1
  664. package/esm/common.js.map +1 -1
  665. package/esm/dialog/dialog.js +11 -11
  666. package/esm/dialog/index.js +11 -11
  667. package/esm/dialog/plugin.js +11 -11
  668. package/esm/dialog/stack.js +1 -1
  669. package/esm/dialog/style/index.js +2 -0
  670. package/esm/dialog/style/wc.less +41 -0
  671. package/esm/dialog/type.js +1 -1
  672. package/esm/divider/divider.js +6 -6
  673. package/esm/divider/index.js +6 -6
  674. package/esm/divider/style/index.js +1 -1
  675. package/esm/divider/type.js +1 -1
  676. package/esm/dropdown/defaultProps.js +1 -1
  677. package/esm/dropdown/dropdown.js +34 -34
  678. package/esm/dropdown/dropdownItem.js +18 -18
  679. package/esm/dropdown/dropdownMenu.js +23 -23
  680. package/esm/dropdown/getDropdownOptions.js +23 -23
  681. package/esm/dropdown/index.js +34 -34
  682. package/esm/dropdown/type.js +1 -1
  683. package/esm/grid/col.js +12 -12
  684. package/esm/grid/defaultProps.js +1 -1
  685. package/esm/grid/index.js +16 -16
  686. package/esm/grid/row.js +16 -16
  687. package/esm/grid/type.js +1 -1
  688. package/esm/icon/utils.js +1 -1
  689. package/esm/image/image.js +9 -9
  690. package/esm/image/index.js +9 -9
  691. package/esm/image/style/index.js +1 -1
  692. package/esm/image/type.js +1 -1
  693. package/esm/index.js +41 -44
  694. package/esm/index.js.map +1 -1
  695. package/esm/input/index.js +20 -20
  696. package/esm/input/input-group.js +7 -7
  697. package/esm/input/input.js +20 -20
  698. package/esm/input/type.js +1 -1
  699. package/esm/input/useLengthLimit.js +16 -16
  700. package/esm/input-number/index.js +20 -20
  701. package/esm/input-number/input-number.js +20 -20
  702. package/esm/input-number/style/index.js +1 -1
  703. package/esm/input-number/type.js +1 -1
  704. package/esm/jsx.js +19 -0
  705. package/esm/jsx.js.map +1 -0
  706. package/esm/link/index.js +11 -11
  707. package/esm/link/link.js +11 -11
  708. package/esm/link/type.js +1 -1
  709. package/esm/list/index.js +19 -19
  710. package/esm/list/list-item-meta.js +6 -6
  711. package/esm/list/list-item.js +18 -18
  712. package/esm/list/list.js +19 -19
  713. package/esm/list/style/wc.less +0 -1
  714. package/esm/list/types.js +1 -1
  715. package/esm/loading/gradient.js +18 -18
  716. package/esm/loading/index.js +18 -18
  717. package/esm/loading/loading.js +18 -18
  718. package/esm/loading/plugin.js +18 -18
  719. package/esm/loading/type.js +1 -1
  720. package/esm/menu/Menu.js +12 -12
  721. package/esm/menu/MenuItem.js +36 -13
  722. package/esm/menu/MenuItem.js.map +1 -1
  723. package/esm/menu/_util/constant.js +1 -1
  724. package/esm/menu/index.js +34 -13
  725. package/esm/menu/index.js.map +1 -1
  726. package/esm/menu/type.js +1 -1
  727. package/esm/message/config.js +4 -4
  728. package/esm/message/const.js +4 -2
  729. package/esm/message/const.js.map +1 -1
  730. package/esm/message/defaultProps.js +1 -1
  731. package/esm/message/index.js +34 -15
  732. package/esm/message/index.js.map +1 -1
  733. package/esm/message/message.js +35 -15
  734. package/esm/message/message.js.map +1 -1
  735. package/esm/message/messageClose.js +15 -7
  736. package/esm/message/messageClose.js.map +1 -1
  737. package/esm/message/messageComponent.js +36 -11
  738. package/esm/message/messageComponent.js.map +1 -1
  739. package/esm/message/messageIcon.js +31 -3
  740. package/esm/message/messageIcon.js.map +1 -1
  741. package/esm/message/type.js +1 -1
  742. package/esm/notification/Notification.js +12 -12
  743. package/esm/notification/NotificationList.js +12 -12
  744. package/esm/notification/NotificationPlugin.js +12 -12
  745. package/esm/notification/config.js +4 -4
  746. package/esm/notification/defaultProps.js +1 -1
  747. package/esm/notification/index.js +12 -12
  748. package/esm/notification/type.js +1 -1
  749. package/esm/popconfirm/index.js +23 -23
  750. package/esm/popconfirm/popconfirm.js +23 -23
  751. package/esm/popconfirm/popcontent.js +15 -15
  752. package/esm/popconfirm/type.js +1 -1
  753. package/esm/popup/index.js +22 -22
  754. package/esm/popup/popup.js +22 -23
  755. package/esm/popup/popup.js.map +1 -1
  756. package/esm/popup/popupTrigger.js +6 -6
  757. package/esm/popup/type.js +1 -1
  758. package/esm/popup/utils.js +1 -1
  759. package/esm/progress/index.js +7 -7
  760. package/esm/progress/progress.js +7 -7
  761. package/esm/progress/type.js +1 -1
  762. package/esm/radio/index.js +13 -13
  763. package/esm/radio/radio.js +7 -7
  764. package/esm/radio/radioButton.js +7 -7
  765. package/esm/radio/radioGroup.js +13 -13
  766. package/esm/radio/type.js +1 -1
  767. package/esm/range-input/RangeInput.js +29 -10
  768. package/esm/range-input/RangeInput.js.map +1 -1
  769. package/esm/range-input/RangeInputInner.js +32 -7
  770. package/esm/range-input/RangeInputInner.js.map +1 -1
  771. package/esm/range-input/index.js +29 -11
  772. package/esm/range-input/index.js.map +1 -1
  773. package/esm/range-input/type.js +1 -1
  774. package/esm/react.js +63 -0
  775. package/esm/react.js.map +1 -0
  776. package/esm/select/defaultProps.js +1 -1
  777. package/esm/select/index.js +1 -1
  778. package/esm/select/option.js +1 -1
  779. package/esm/select/type.js +1 -1
  780. package/esm/select-input/SelectInput.js +27 -27
  781. package/esm/select-input/SelectInputMultiple.js +21 -21
  782. package/esm/select-input/SelectInputSingle.js +21 -21
  783. package/esm/select-input/defaultProps.js +1 -1
  784. package/esm/select-input/index.js +27 -27
  785. package/esm/select-input/interface.js +1 -1
  786. package/esm/select-input/type.js +1 -1
  787. package/esm/select-input/useOverlayInnerStyle.js +16 -16
  788. package/esm/skeleton/index.js +20 -20
  789. package/esm/skeleton/skeleton.js +20 -20
  790. package/esm/skeleton/type.js +1 -1
  791. package/esm/slider/index.js +23 -23
  792. package/esm/slider/slider-button.js +22 -22
  793. package/esm/slider/slider-mark.js +5 -5
  794. package/esm/slider/slider.js +23 -23
  795. package/esm/slider/style/index.js +2 -0
  796. package/esm/slider/style/wc.less +19 -0
  797. package/esm/slider/type.js +1 -1
  798. package/esm/space/index.js +6 -6
  799. package/esm/space/space.js +6 -6
  800. package/esm/space/type.js +1 -1
  801. package/esm/swiper/index.js +6 -6
  802. package/esm/swiper/swiper-item.js +6 -6
  803. package/esm/swiper/swiper.js +6 -6
  804. package/esm/swiper/type.js +1 -1
  805. package/esm/switch/index.js +12 -12
  806. package/esm/switch/switch.js +12 -12
  807. package/esm/switch/type.js +1 -1
  808. package/esm/tabs/TabBar.js +6 -6
  809. package/esm/tabs/TabNav.js +21 -21
  810. package/esm/tabs/TabNavItem.js +6 -6
  811. package/esm/tabs/index.js +21 -21
  812. package/esm/tabs/tabPanel.js +5 -5
  813. package/esm/tabs/tabs.js +21 -21
  814. package/esm/tabs/type.js +1 -1
  815. package/esm/tabs/useTabClass.js +1 -1
  816. package/esm/tag/index.js +12 -12
  817. package/esm/tag/tag.js +12 -12
  818. package/esm/tag/type.js +1 -1
  819. package/esm/tag-input/index.js +20 -20
  820. package/esm/tag-input/tag-input.js +20 -20
  821. package/esm/tag-input/type.js +1 -1
  822. package/esm/textarea/index.js +18 -18
  823. package/esm/textarea/textarea.js +18 -18
  824. package/esm/textarea/type.js +1 -1
  825. package/esm/tooltip/index.js +22 -22
  826. package/esm/tooltip/tooltip.js +22 -22
  827. package/esm/tooltip/type.js +1 -1
  828. package/esm/upload/CustomFile.js +1 -1
  829. package/esm/upload/ImageCard.js +22 -22
  830. package/esm/upload/NormalFile.js +20 -20
  831. package/esm/upload/hooks/useUpload.js +16 -16
  832. package/esm/upload/index.js +24 -24
  833. package/esm/upload/interface.js +1 -1
  834. package/esm/upload/type.js +1 -1
  835. package/esm/upload/upload.js +24 -24
  836. package/esm/upload/utils/index.js +1 -1
  837. package/esm/vue.js +61 -0
  838. package/esm/vue.js.map +1 -0
  839. package/esm/watermark/index.js +17 -17
  840. package/esm/watermark/type.js +1 -1
  841. package/esm/watermark/utils.js +9 -9
  842. package/esm/watermark/watermark.js +17 -17
  843. package/{esm/_chunks/dep-ec45833d.js → lib/_chunks/dep-0035b1d8.js} +5 -5
  844. package/{esm/_chunks/dep-ec45833d.js.map → lib/_chunks/dep-0035b1d8.js.map} +1 -1
  845. package/{esm/_chunks/dep-1ba9def4.js → lib/_chunks/dep-0127b722.js} +2 -2
  846. package/lib/_chunks/{dep-1ba9def4.js.map → dep-0127b722.js.map} +1 -1
  847. package/{esm/_chunks/dep-8562fd08.js → lib/_chunks/dep-06a4c568.js} +3 -3
  848. package/lib/_chunks/{dep-8562fd08.js.map → dep-06a4c568.js.map} +1 -1
  849. package/{esm/_chunks/dep-0dda128f.js → lib/_chunks/dep-1374507c.js} +3 -3
  850. package/lib/_chunks/{dep-0dda128f.js.map → dep-1374507c.js.map} +1 -1
  851. package/{esm/_chunks/dep-4d8f6442.js → lib/_chunks/dep-1aae581e.js} +5 -5
  852. package/lib/_chunks/{dep-4d8f6442.js.map → dep-1aae581e.js.map} +1 -1
  853. package/{esm/_chunks/dep-a8959243.js → lib/_chunks/dep-1d52b1ca.js} +3 -3
  854. package/lib/_chunks/{dep-a8959243.js.map → dep-1d52b1ca.js.map} +1 -1
  855. package/{esm/_chunks/dep-baf89e46.js → lib/_chunks/dep-2444cd85.js} +5 -5
  856. package/lib/_chunks/{dep-baf89e46.js.map → dep-2444cd85.js.map} +1 -1
  857. package/lib/_chunks/{dep-381e1c08.js → dep-281111aa.js} +5 -5
  858. package/{esm/_chunks/dep-381e1c08.js.map → lib/_chunks/dep-281111aa.js.map} +1 -1
  859. package/lib/_chunks/{dep-24947915.js → dep-2ce5b650.js} +3 -3
  860. package/lib/_chunks/{dep-24947915.js.map → dep-2ce5b650.js.map} +1 -1
  861. package/{esm/_chunks/dep-c34f1dc2.js → lib/_chunks/dep-2e22db97.js} +3 -3
  862. package/lib/_chunks/{dep-c34f1dc2.js.map → dep-2e22db97.js.map} +1 -1
  863. package/lib/_chunks/{dep-38c97b2a.js → dep-30600028.js} +2 -2
  864. package/lib/_chunks/{dep-38c97b2a.js.map → dep-30600028.js.map} +1 -1
  865. package/{esm/_chunks/dep-99a596b7.js → lib/_chunks/dep-36cc7415.js} +3 -3
  866. package/{esm/_chunks/dep-99a596b7.js.map → lib/_chunks/dep-36cc7415.js.map} +1 -1
  867. package/{esm/_chunks/dep-05782538.js → lib/_chunks/dep-3be3def3.js} +3 -3
  868. package/lib/_chunks/{dep-05782538.js.map → dep-3be3def3.js.map} +1 -1
  869. package/{esm/_chunks/dep-be11274b.js → lib/_chunks/dep-3ea841a9.js} +3 -3
  870. package/lib/_chunks/{dep-be11274b.js.map → dep-3ea841a9.js.map} +1 -1
  871. package/lib/_chunks/{dep-a528ed12.js → dep-416d1ada.js} +2 -2
  872. package/lib/_chunks/dep-416d1ada.js.map +1 -0
  873. package/lib/_chunks/{dep-1c8ee912.js → dep-4df84cf0.js} +5 -5
  874. package/{esm/_chunks/dep-1c8ee912.js.map → lib/_chunks/dep-4df84cf0.js.map} +1 -1
  875. package/lib/_chunks/{dep-5f49c036.js → dep-51821886.js} +3 -3
  876. package/lib/_chunks/{dep-5f49c036.js.map → dep-51821886.js.map} +1 -1
  877. package/{esm/_chunks/dep-ef1567ad.js → lib/_chunks/dep-52750ef2.js} +6 -6
  878. package/{esm/_chunks/dep-ef1567ad.js.map → lib/_chunks/dep-52750ef2.js.map} +1 -1
  879. package/lib/_chunks/{dep-6ead5d56.js → dep-54a6574b.js} +5 -5
  880. package/lib/_chunks/{dep-6ead5d56.js.map → dep-54a6574b.js.map} +1 -1
  881. package/lib/_chunks/{dep-11dd112e.js → dep-56b15a97.js} +4 -4
  882. package/lib/_chunks/{dep-11dd112e.js.map → dep-56b15a97.js.map} +1 -1
  883. package/lib/_chunks/{dep-67234607.js → dep-58748f4e.js} +3 -3
  884. package/lib/_chunks/{dep-67234607.js.map → dep-58748f4e.js.map} +1 -1
  885. package/{esm/_chunks/dep-925c40dd.js → lib/_chunks/dep-58a19489.js} +5 -5
  886. package/lib/_chunks/{dep-925c40dd.js.map → dep-58a19489.js.map} +1 -1
  887. package/lib/_chunks/{dep-aaf2a63c.js → dep-5bbae9bf.js} +6 -6
  888. package/{esm/_chunks/dep-aaf2a63c.js.map → lib/_chunks/dep-5bbae9bf.js.map} +1 -1
  889. package/lib/_chunks/{dep-516a2eb2.js → dep-63f70fab.js} +4 -4
  890. package/lib/_chunks/{dep-516a2eb2.js.map → dep-63f70fab.js.map} +1 -1
  891. package/{esm/_chunks/dep-84f0ebdd.js → lib/_chunks/dep-65fb89ee.js} +8 -8
  892. package/{esm/_chunks/dep-84f0ebdd.js.map → lib/_chunks/dep-65fb89ee.js.map} +1 -1
  893. package/lib/_chunks/{dep-41d14c19.js → dep-6745cbfe.js} +10 -10
  894. package/{esm/_chunks/dep-41d14c19.js.map → lib/_chunks/dep-6745cbfe.js.map} +1 -1
  895. package/lib/_chunks/{dep-80653a03.js → dep-675b140a.js} +4 -4
  896. package/{esm/_chunks/dep-80653a03.js.map → lib/_chunks/dep-675b140a.js.map} +1 -1
  897. package/{esm/_chunks/dep-25830c97.js → lib/_chunks/dep-6e878e69.js} +4 -4
  898. package/{esm/_chunks/dep-25830c97.js.map → lib/_chunks/dep-6e878e69.js.map} +1 -1
  899. package/{esm/_chunks/dep-54525a11.js → lib/_chunks/dep-72f7728b.js} +5 -5
  900. package/{esm/_chunks/dep-54525a11.js.map → lib/_chunks/dep-72f7728b.js.map} +1 -1
  901. package/{esm/_chunks/dep-0ddaf65c.js → lib/_chunks/dep-7bbe6e06.js} +4 -4
  902. package/lib/_chunks/{dep-0ddaf65c.js.map → dep-7bbe6e06.js.map} +1 -1
  903. package/lib/_chunks/{dep-53bf1c29.js → dep-7c97da8d.js} +5 -5
  904. package/{esm/_chunks/dep-53bf1c29.js.map → lib/_chunks/dep-7c97da8d.js.map} +1 -1
  905. package/lib/_chunks/{dep-dc4fe500.js → dep-81744dc0.js} +3 -3
  906. package/lib/_chunks/{dep-dc4fe500.js.map → dep-81744dc0.js.map} +1 -1
  907. package/lib/_chunks/{dep-a3686c78.js → dep-8185fdbc.js} +2 -2
  908. package/lib/_chunks/{dep-a3686c78.js.map → dep-8185fdbc.js.map} +1 -1
  909. package/{esm/_chunks/dep-6888d2ee.js → lib/_chunks/dep-82df3fb7.js} +5 -5
  910. package/{esm/_chunks/dep-6888d2ee.js.map → lib/_chunks/dep-82df3fb7.js.map} +1 -1
  911. package/lib/_chunks/{dep-9547d922.js → dep-8b10daa4.js} +5 -5
  912. package/lib/_chunks/{dep-9547d922.js.map → dep-8b10daa4.js.map} +1 -1
  913. package/lib/_chunks/{dep-109d6386.js → dep-8b13bea3.js} +3 -3
  914. package/lib/_chunks/{dep-109d6386.js.map → dep-8b13bea3.js.map} +1 -1
  915. package/{esm/_chunks/dep-908cc0dc.js → lib/_chunks/dep-8d12f25c.js} +3 -3
  916. package/lib/_chunks/{dep-908cc0dc.js.map → dep-8d12f25c.js.map} +1 -1
  917. package/{esm/_chunks/dep-d946ac25.js → lib/_chunks/dep-935259c3.js} +5 -5
  918. package/{esm/_chunks/dep-d946ac25.js.map → lib/_chunks/dep-935259c3.js.map} +1 -1
  919. package/lib/_chunks/{dep-f4d2474c.js → dep-9e7be8fe.js} +2 -2
  920. package/lib/_chunks/dep-9e7be8fe.js.map +1 -0
  921. package/{esm/_chunks/dep-3203793c.js → lib/_chunks/dep-9f55c618.js} +13 -13
  922. package/lib/_chunks/{dep-3203793c.js.map → dep-9f55c618.js.map} +1 -1
  923. package/lib/_chunks/{dep-71f1cfd5.js → dep-a259f9ec.js} +3 -3
  924. package/lib/_chunks/{dep-71f1cfd5.js.map → dep-a259f9ec.js.map} +1 -1
  925. package/lib/_chunks/{dep-374a954f.js → dep-a2ed30b7.js} +16 -16
  926. package/{esm/_chunks/dep-374a954f.js.map → lib/_chunks/dep-a2ed30b7.js.map} +1 -1
  927. package/{esm/_chunks/dep-0f3b3524.js → lib/_chunks/dep-b1ef5816.js} +2 -2
  928. package/{esm/_chunks/dep-0f3b3524.js.map → lib/_chunks/dep-b1ef5816.js.map} +1 -1
  929. package/lib/_chunks/{dep-9eb8951d.js → dep-b8bd80bb.js} +3 -3
  930. package/{esm/_chunks/dep-9eb8951d.js.map → lib/_chunks/dep-b8bd80bb.js.map} +1 -1
  931. package/lib/_chunks/{dep-33c7d91d.js → dep-b964e274.js} +4 -4
  932. package/lib/_chunks/{dep-33c7d91d.js.map → dep-b964e274.js.map} +1 -1
  933. package/{esm/_chunks/dep-3943414d.js → lib/_chunks/dep-bcdf180e.js} +3 -3
  934. package/lib/_chunks/{dep-3943414d.js.map → dep-bcdf180e.js.map} +1 -1
  935. package/lib/_chunks/{dep-5539815f.js → dep-bde75ce6.js} +3 -3
  936. package/lib/_chunks/{dep-5539815f.js.map → dep-bde75ce6.js.map} +1 -1
  937. package/{esm/_chunks/dep-db7e258b.js → lib/_chunks/dep-bfcdde2a.js} +4 -4
  938. package/{esm/_chunks/dep-db7e258b.js.map → lib/_chunks/dep-bfcdde2a.js.map} +1 -1
  939. package/lib/_chunks/{dep-14dd2727.js → dep-c4a888b8.js} +4 -4
  940. package/{esm/_chunks/dep-14dd2727.js.map → lib/_chunks/dep-c4a888b8.js.map} +1 -1
  941. package/{esm/_chunks/dep-dda335c5.js → lib/_chunks/dep-c52dea9f.js} +2 -2
  942. package/lib/_chunks/{dep-dda335c5.js.map → dep-c52dea9f.js.map} +1 -1
  943. package/lib/_chunks/{dep-08ba0c65.js → dep-c8a63125.js} +5 -5
  944. package/{esm/_chunks/dep-08ba0c65.js.map → lib/_chunks/dep-c8a63125.js.map} +1 -1
  945. package/{esm/_chunks/dep-4429f427.js → lib/_chunks/dep-cc4bc276.js} +4 -4
  946. package/lib/_chunks/{dep-4429f427.js.map → dep-cc4bc276.js.map} +1 -1
  947. package/{esm/_chunks/dep-caa15d01.js → lib/_chunks/dep-d0d79ac1.js} +4 -4
  948. package/{esm/_chunks/dep-caa15d01.js.map → lib/_chunks/dep-d0d79ac1.js.map} +1 -1
  949. package/{esm/_chunks/dep-0731654d.js → lib/_chunks/dep-d2609e75.js} +4 -4
  950. package/lib/_chunks/{dep-0731654d.js.map → dep-d2609e75.js.map} +1 -1
  951. package/lib/_chunks/{dep-1d823d3e.js → dep-d27925e3.js} +3 -3
  952. package/lib/_chunks/{dep-1d823d3e.js.map → dep-d27925e3.js.map} +1 -1
  953. package/lib/_chunks/{dep-3cee19ed.js → dep-d959f790.js} +2 -2
  954. package/lib/_chunks/{dep-3cee19ed.js.map → dep-d959f790.js.map} +1 -1
  955. package/{esm/_chunks/dep-8fe87161.js → lib/_chunks/dep-dcaa1c82.js} +5 -5
  956. package/{esm/_chunks/dep-8fe87161.js.map → lib/_chunks/dep-dcaa1c82.js.map} +1 -1
  957. package/{esm/_chunks/dep-28c3b974.js → lib/_chunks/dep-dff46f81.js} +3 -3
  958. package/lib/_chunks/{dep-28c3b974.js.map → dep-dff46f81.js.map} +1 -1
  959. package/lib/_chunks/{dep-e859c138.js → dep-e24aea07.js} +3 -3
  960. package/lib/_chunks/{dep-e859c138.js.map → dep-e24aea07.js.map} +1 -1
  961. package/lib/_chunks/{dep-0acd840e.js → dep-f4fd9de2.js} +3 -3
  962. package/lib/_chunks/{dep-0acd840e.js.map → dep-f4fd9de2.js.map} +1 -1
  963. package/{esm/_chunks/dep-6dad7e1f.js → lib/_chunks/dep-fec511f3.js} +6 -6
  964. package/lib/_chunks/{dep-6dad7e1f.js.map → dep-fec511f3.js.map} +1 -1
  965. package/lib/_common/js/avatar/utils.js +1 -1
  966. package/lib/_common/js/color-picker/cmyk.js +1 -1
  967. package/lib/_common/js/color-picker/color.js +14 -14
  968. package/lib/_common/js/color-picker/constants.js +1 -1
  969. package/lib/_common/js/color-picker/draggable.js +5 -5
  970. package/lib/_common/js/color-picker/gradient.js +9 -9
  971. package/lib/_common/js/color-picker/index.js +14 -14
  972. package/lib/_common/js/common.js +1 -1
  973. package/lib/_common/js/date-picker/format.js +22 -22
  974. package/lib/_common/js/date-picker/utils.js +22 -22
  975. package/lib/_common/js/drawer/utils.js +1 -1
  976. package/lib/_common/js/global-config/default-config.js +1 -1
  977. package/lib/_common/js/global-config/locale/ar_KW.js +5 -5
  978. package/lib/_common/js/global-config/locale/en_US.js +3 -3
  979. package/lib/_common/js/global-config/locale/it_IT.js +5 -5
  980. package/lib/_common/js/global-config/locale/ja_JP.js +5 -5
  981. package/lib/_common/js/global-config/locale/ko_KR.js +5 -5
  982. package/lib/_common/js/global-config/locale/ru_RU.js +5 -5
  983. package/lib/_common/js/global-config/locale/zh_CN.js +5 -5
  984. package/lib/_common/js/global-config/locale/zh_TW.js +5 -5
  985. package/lib/_common/js/global-config/mobile/default-config.js +1 -1
  986. package/lib/_common/js/global-config/mobile/locale/ar_KW.js +5 -5
  987. package/lib/_common/js/global-config/mobile/locale/en_US.js +3 -3
  988. package/lib/_common/js/global-config/mobile/locale/it_IT.js +5 -5
  989. package/lib/_common/js/global-config/mobile/locale/ja_JP.js +5 -5
  990. package/lib/_common/js/global-config/mobile/locale/ko_KR.js +5 -5
  991. package/lib/_common/js/global-config/mobile/locale/ru_RU.js +5 -5
  992. package/lib/_common/js/global-config/mobile/locale/zh_CN.js +5 -5
  993. package/lib/_common/js/global-config/mobile/locale/zh_TW.js +5 -5
  994. package/lib/_common/js/input-number/large-number.js +11 -11
  995. package/lib/_common/js/input-number/number.js +12 -12
  996. package/lib/_common/js/loading/circle-adapter.js +16 -16
  997. package/lib/_common/js/log/index.js +1 -1
  998. package/lib/_common/js/log/log.js +1 -1
  999. package/lib/_common/js/log/types.js +1 -1
  1000. package/lib/_common/js/progress/const.js +1 -1
  1001. package/lib/_common/js/slider/utils.js +7 -7
  1002. package/lib/_common/js/statistic/tween.js +17 -17
  1003. package/lib/_common/js/statistic/utils.js +1 -1
  1004. package/lib/_common/js/table/tree-store.js +23 -23
  1005. package/lib/_common/js/table/types.js +1 -1
  1006. package/lib/_common/js/table/utils.js +14 -14
  1007. package/lib/_common/js/tabs/base.js +1 -1
  1008. package/lib/_common/js/time-picker/const.js +1 -1
  1009. package/lib/_common/js/time-picker/utils.js +5 -5
  1010. package/lib/_common/js/tree/tree-node-model.js +22 -22
  1011. package/lib/_common/js/tree/tree-node.js +29 -29
  1012. package/lib/_common/js/tree/tree-store.js +33 -33
  1013. package/lib/_common/js/tree/types.js +1 -1
  1014. package/lib/_common/js/tree-v1/tree-node-model.js +22 -22
  1015. package/lib/_common/js/tree-v1/tree-node.js +30 -30
  1016. package/lib/_common/js/tree-v1/tree-store.js +34 -34
  1017. package/lib/_common/js/tree-v1/types.js +1 -1
  1018. package/lib/_common/js/upload/main.js +13 -13
  1019. package/lib/_common/js/upload/types.js +1 -1
  1020. package/lib/_common/js/upload/utils.js +1 -1
  1021. package/lib/_common/js/upload/xhr.js +10 -10
  1022. package/lib/_common/js/utils/calcTextareaHeight.js +16 -16
  1023. package/lib/_common/js/utils/getPosition.js +1 -1
  1024. package/lib/_common/js/utils/getScrollbarWidth.js +16 -16
  1025. package/lib/_common/js/utils/helper.js +16 -16
  1026. package/lib/_common/js/utils/injectStyle.js +1 -1
  1027. package/lib/_common/js/utils/observe.js +1 -1
  1028. package/lib/_common/js/utils/set-style.js +1 -1
  1029. package/lib/_common/js/utils/swapDragArrayElement.js +3 -3
  1030. package/lib/_common/js/watermark/generateBase64Url.js +4 -4
  1031. package/lib/_common/js/watermark/randomMovingStyle.js +1 -1
  1032. package/lib/_common/js/watermark/type.js +1 -1
  1033. package/lib/_util/classname.js +1 -1
  1034. package/lib/_util/component.js +2 -2
  1035. package/lib/_util/dom.js +7 -7
  1036. package/lib/_util/easing.js +1 -1
  1037. package/lib/_util/eventDispose.js +1 -1
  1038. package/lib/_util/helper.js +16 -16
  1039. package/lib/_util/icon.js +1 -1
  1040. package/lib/_util/lightDom.js +12 -12
  1041. package/lib/_util/linearGradient.js +2 -2
  1042. package/lib/_util/noop.js +1 -1
  1043. package/lib/_util/parseTNode.js +8 -8
  1044. package/lib/_util/useControlled.js +10 -10
  1045. package/lib/_util/useDragSorter.js +5 -5
  1046. package/lib/affix/affix.js +11 -11
  1047. package/lib/affix/index.js +12 -12
  1048. package/lib/affix/type.js +1 -1
  1049. package/lib/alert/alert.js +10 -10
  1050. package/lib/alert/index.js +11 -11
  1051. package/lib/alert/type.js +1 -1
  1052. package/lib/avatar/avatar-group.js +13 -13
  1053. package/lib/avatar/avatar.js +7 -7
  1054. package/lib/avatar/index.js +14 -14
  1055. package/lib/avatar/style/index.js +7 -4
  1056. package/lib/avatar/style/index.js.map +1 -1
  1057. package/lib/avatar/type.js +1 -1
  1058. package/lib/back-top/back-top.js +11 -11
  1059. package/lib/back-top/index.js +12 -12
  1060. package/lib/back-top/type.js +1 -1
  1061. package/lib/badge/badge.js +7 -7
  1062. package/lib/badge/index.js +8 -8
  1063. package/lib/badge/type.js +1 -1
  1064. package/lib/breadcrumb/breadcrumb-item.js +25 -25
  1065. package/lib/breadcrumb/breadcrumb.js +25 -25
  1066. package/lib/breadcrumb/index.js +25 -25
  1067. package/lib/breadcrumb/type.js +1 -1
  1068. package/lib/button/button.js +13 -13
  1069. package/lib/button/index.js +15 -15
  1070. package/lib/button/type.js +1 -1
  1071. package/lib/card/card.js +20 -20
  1072. package/lib/card/index.js +20 -20
  1073. package/lib/card/type.js +1 -1
  1074. package/lib/checkbox/checkbox-group.js +13 -13
  1075. package/lib/checkbox/checkbox.js +6 -6
  1076. package/lib/checkbox/index.js +14 -14
  1077. package/lib/checkbox/style/index.js +2 -2
  1078. package/lib/checkbox/type.js +1 -1
  1079. package/lib/collapse/collapse-animation.js +1 -1
  1080. package/lib/collapse/collapse-panel.js +6 -6
  1081. package/lib/collapse/collapse.js +8 -8
  1082. package/lib/collapse/index.js +9 -9
  1083. package/lib/collapse/type.js +1 -1
  1084. package/lib/comment/index.js +6 -6
  1085. package/lib/common/check/index.js +7 -7
  1086. package/lib/common/check/types.js +1 -1
  1087. package/lib/common/fake-arrow.js +6 -6
  1088. package/lib/common/index.js +12 -12
  1089. package/lib/common/portal.js +11 -11
  1090. package/lib/common.js +1 -1
  1091. package/lib/common.js.map +1 -1
  1092. package/lib/dialog/dialog.js +11 -11
  1093. package/lib/dialog/index.js +19 -16
  1094. package/lib/dialog/index.js.map +1 -1
  1095. package/lib/dialog/plugin.js +11 -11
  1096. package/lib/dialog/stack.js +1 -1
  1097. package/lib/dialog/type.js +1 -1
  1098. package/lib/divider/divider.js +6 -6
  1099. package/lib/divider/index.js +7 -7
  1100. package/lib/divider/style/index.js +2 -2
  1101. package/lib/divider/type.js +1 -1
  1102. package/lib/dropdown/defaultProps.js +1 -1
  1103. package/lib/dropdown/dropdown.js +35 -35
  1104. package/lib/dropdown/dropdownItem.js +18 -18
  1105. package/lib/dropdown/dropdownMenu.js +24 -24
  1106. package/lib/dropdown/getDropdownOptions.js +24 -24
  1107. package/lib/dropdown/index.js +35 -35
  1108. package/lib/dropdown/type.js +1 -1
  1109. package/lib/grid/col.js +12 -12
  1110. package/lib/grid/defaultProps.js +1 -1
  1111. package/lib/grid/index.js +17 -17
  1112. package/lib/grid/row.js +16 -16
  1113. package/lib/grid/type.js +1 -1
  1114. package/lib/icon/utils.js +1 -1
  1115. package/lib/image/image.js +11 -11
  1116. package/lib/image/index.js +11 -11
  1117. package/lib/image/style/index.js +2 -2
  1118. package/lib/image/type.js +1 -1
  1119. package/lib/index.js +50 -53
  1120. package/lib/index.js.map +1 -1
  1121. package/lib/input/index.js +23 -23
  1122. package/lib/input/input-group.js +7 -7
  1123. package/lib/input/input.js +20 -20
  1124. package/lib/input/type.js +1 -1
  1125. package/lib/input/useLengthLimit.js +16 -16
  1126. package/lib/input-number/index.js +24 -24
  1127. package/lib/input-number/input-number.js +24 -24
  1128. package/lib/input-number/style/index.js +2 -2
  1129. package/lib/input-number/type.js +1 -1
  1130. package/lib/jsx.js +19 -0
  1131. package/lib/jsx.js.map +1 -0
  1132. package/lib/link/index.js +12 -12
  1133. package/lib/link/link.js +11 -11
  1134. package/lib/link/type.js +1 -1
  1135. package/lib/list/index.js +21 -21
  1136. package/lib/list/list-item-meta.js +6 -6
  1137. package/lib/list/list-item.js +18 -18
  1138. package/lib/list/list.js +19 -19
  1139. package/lib/list/types.js +1 -1
  1140. package/lib/loading/gradient.js +18 -18
  1141. package/lib/loading/index.js +20 -20
  1142. package/lib/loading/loading.js +18 -18
  1143. package/lib/loading/plugin.js +18 -18
  1144. package/lib/loading/type.js +1 -1
  1145. package/lib/menu/Menu.js +12 -12
  1146. package/lib/menu/MenuItem.js +38 -13
  1147. package/lib/menu/MenuItem.js.map +1 -1
  1148. package/lib/menu/_util/constant.js +1 -1
  1149. package/lib/menu/index.js +37 -14
  1150. package/lib/menu/index.js.map +1 -1
  1151. package/lib/menu/type.js +1 -1
  1152. package/lib/message/config.js +4 -4
  1153. package/lib/message/const.js +4 -2
  1154. package/lib/message/const.js.map +1 -1
  1155. package/lib/message/defaultProps.js +1 -1
  1156. package/lib/message/index.js +36 -16
  1157. package/lib/message/index.js.map +1 -1
  1158. package/lib/message/message.js +36 -15
  1159. package/lib/message/message.js.map +1 -1
  1160. package/lib/message/messageClose.js +15 -7
  1161. package/lib/message/messageClose.js.map +1 -1
  1162. package/lib/message/messageComponent.js +37 -11
  1163. package/lib/message/messageComponent.js.map +1 -1
  1164. package/lib/message/messageIcon.js +32 -3
  1165. package/lib/message/messageIcon.js.map +1 -1
  1166. package/lib/message/type.js +1 -1
  1167. package/lib/notification/Notification.js +12 -12
  1168. package/lib/notification/NotificationList.js +12 -12
  1169. package/lib/notification/NotificationPlugin.js +12 -12
  1170. package/lib/notification/config.js +4 -4
  1171. package/lib/notification/defaultProps.js +1 -1
  1172. package/lib/notification/index.js +13 -13
  1173. package/lib/notification/type.js +1 -1
  1174. package/lib/popconfirm/index.js +25 -25
  1175. package/lib/popconfirm/popconfirm.js +25 -25
  1176. package/lib/popconfirm/popcontent.js +15 -15
  1177. package/lib/popconfirm/type.js +1 -1
  1178. package/lib/popup/index.js +24 -24
  1179. package/lib/popup/popup.js +22 -23
  1180. package/lib/popup/popup.js.map +1 -1
  1181. package/lib/popup/popupTrigger.js +6 -6
  1182. package/lib/popup/type.js +1 -1
  1183. package/lib/popup/utils.js +1 -1
  1184. package/lib/progress/index.js +8 -8
  1185. package/lib/progress/progress.js +7 -7
  1186. package/lib/progress/type.js +1 -1
  1187. package/lib/radio/index.js +14 -14
  1188. package/lib/radio/radio.js +7 -7
  1189. package/lib/radio/radioButton.js +7 -7
  1190. package/lib/radio/radioGroup.js +13 -13
  1191. package/lib/radio/type.js +1 -1
  1192. package/lib/range-input/RangeInput.js +31 -10
  1193. package/lib/range-input/RangeInput.js.map +1 -1
  1194. package/lib/range-input/RangeInputInner.js +34 -7
  1195. package/lib/range-input/RangeInputInner.js.map +1 -1
  1196. package/lib/range-input/index.js +32 -12
  1197. package/lib/range-input/index.js.map +1 -1
  1198. package/lib/range-input/type.js +1 -1
  1199. package/lib/react.js +63 -0
  1200. package/lib/react.js.map +1 -0
  1201. package/lib/select/defaultProps.js +1 -1
  1202. package/lib/select/index.js +1 -1
  1203. package/lib/select/option.js +1 -1
  1204. package/lib/select/type.js +1 -1
  1205. package/lib/select-input/SelectInput.js +34 -34
  1206. package/lib/select-input/SelectInputMultiple.js +26 -26
  1207. package/lib/select-input/SelectInputSingle.js +24 -24
  1208. package/lib/select-input/defaultProps.js +1 -1
  1209. package/lib/select-input/index.js +34 -34
  1210. package/lib/select-input/interface.js +1 -1
  1211. package/lib/select-input/type.js +1 -1
  1212. package/lib/select-input/useOverlayInnerStyle.js +16 -16
  1213. package/lib/skeleton/index.js +21 -21
  1214. package/lib/skeleton/skeleton.js +20 -20
  1215. package/lib/skeleton/type.js +1 -1
  1216. package/lib/slider/index.js +34 -31
  1217. package/lib/slider/index.js.map +1 -1
  1218. package/lib/slider/slider-button.js +25 -25
  1219. package/lib/slider/slider-mark.js +5 -5
  1220. package/lib/slider/slider.js +29 -29
  1221. package/lib/slider/type.js +1 -1
  1222. package/lib/space/index.js +8 -8
  1223. package/lib/space/space.js +6 -6
  1224. package/lib/space/type.js +1 -1
  1225. package/lib/style/index.js +1 -1
  1226. package/lib/swiper/index.js +7 -7
  1227. package/lib/swiper/swiper-item.js +6 -6
  1228. package/lib/swiper/swiper.js +6 -6
  1229. package/lib/swiper/type.js +1 -1
  1230. package/lib/switch/index.js +13 -13
  1231. package/lib/switch/switch.js +12 -12
  1232. package/lib/switch/type.js +1 -1
  1233. package/lib/tabs/TabBar.js +6 -6
  1234. package/lib/tabs/TabNav.js +21 -21
  1235. package/lib/tabs/TabNavItem.js +6 -6
  1236. package/lib/tabs/index.js +22 -22
  1237. package/lib/tabs/tabPanel.js +5 -5
  1238. package/lib/tabs/tabs.js +21 -21
  1239. package/lib/tabs/type.js +1 -1
  1240. package/lib/tabs/useTabClass.js +1 -1
  1241. package/lib/tag/index.js +14 -14
  1242. package/lib/tag/tag.js +12 -12
  1243. package/lib/tag/type.js +1 -1
  1244. package/lib/tag-input/index.js +25 -25
  1245. package/lib/tag-input/tag-input.js +24 -24
  1246. package/lib/tag-input/type.js +1 -1
  1247. package/lib/textarea/index.js +19 -19
  1248. package/lib/textarea/textarea.js +18 -18
  1249. package/lib/textarea/type.js +1 -1
  1250. package/lib/tooltip/index.js +25 -25
  1251. package/lib/tooltip/tooltip.js +24 -24
  1252. package/lib/tooltip/type.js +1 -1
  1253. package/lib/upload/CustomFile.js +1 -1
  1254. package/lib/upload/ImageCard.js +25 -25
  1255. package/lib/upload/NormalFile.js +22 -22
  1256. package/lib/upload/hooks/useUpload.js +16 -16
  1257. package/lib/upload/index.js +28 -28
  1258. package/lib/upload/interface.js +1 -1
  1259. package/lib/upload/type.js +1 -1
  1260. package/lib/upload/upload.js +27 -27
  1261. package/lib/upload/utils/index.js +1 -1
  1262. package/lib/vue.js +61 -0
  1263. package/lib/vue.js.map +1 -0
  1264. package/lib/watermark/index.js +18 -18
  1265. package/lib/watermark/type.js +1 -1
  1266. package/lib/watermark/utils.js +9 -9
  1267. package/lib/watermark/watermark.js +17 -17
  1268. package/package.json +5 -3
  1269. package/plugins/vite-plugin-less-compiler.js +1114 -0
  1270. package/plugins/vite-plugin-less-compiler.ts +56 -0
  1271. package/cjs/_chunks/dep-48c01e4b.js.map +0 -1
  1272. package/cjs/_chunks/dep-eacb5b08.js.map +0 -1
  1273. package/dist/Tdesign Web Components.js.map +0 -1
  1274. package/dist/Tdesign Web Components.min.js +0 -9
  1275. package/dist/Tdesign Web Components.min.js.map +0 -1
  1276. package/esm/_chunks/dep-f4d2474c.js.map +0 -1
  1277. package/lib/_chunks/dep-a528ed12.js.map +0 -1
  1278. package/lib/_chunks/dep-f4d2474c.js.map +0 -1
@@ -0,0 +1,1114 @@
1
+ /**
2
+ * TDesign Web Components v0.0.2
3
+ * (c) 2024 tdesign
4
+ * @license MIT
5
+ */
6
+
7
+ import fs from 'fs';
8
+ import less from 'less';
9
+
10
+ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
11
+ function encode(decoded) {
12
+ var sourceFileIndex = 0; // second field
13
+ var sourceCodeLine = 0; // third field
14
+ var sourceCodeColumn = 0; // fourth field
15
+ var nameIndex = 0; // fifth field
16
+ var mappings = '';
17
+ for (var i = 0; i < decoded.length; i++) {
18
+ var line = decoded[i];
19
+ if (i > 0)
20
+ mappings += ';';
21
+ if (line.length === 0)
22
+ continue;
23
+ var generatedCodeColumn = 0; // first field
24
+ var lineMappings = [];
25
+ for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
26
+ var segment = line_1[_i];
27
+ var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);
28
+ generatedCodeColumn = segment[0];
29
+ if (segment.length > 1) {
30
+ segmentMappings +=
31
+ encodeInteger(segment[1] - sourceFileIndex) +
32
+ encodeInteger(segment[2] - sourceCodeLine) +
33
+ encodeInteger(segment[3] - sourceCodeColumn);
34
+ sourceFileIndex = segment[1];
35
+ sourceCodeLine = segment[2];
36
+ sourceCodeColumn = segment[3];
37
+ }
38
+ if (segment.length === 5) {
39
+ segmentMappings += encodeInteger(segment[4] - nameIndex);
40
+ nameIndex = segment[4];
41
+ }
42
+ lineMappings.push(segmentMappings);
43
+ }
44
+ mappings += lineMappings.join(',');
45
+ }
46
+ return mappings;
47
+ }
48
+ function encodeInteger(num) {
49
+ var result = '';
50
+ num = num < 0 ? (-num << 1) | 1 : num << 1;
51
+ do {
52
+ var clamped = num & 31;
53
+ num >>>= 5;
54
+ if (num > 0) {
55
+ clamped |= 32;
56
+ }
57
+ result += chars[clamped];
58
+ } while (num > 0);
59
+ return result;
60
+ }
61
+
62
+ var BitSet = function BitSet(arg) {
63
+ this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
64
+ };
65
+
66
+ BitSet.prototype.add = function add (n) {
67
+ this.bits[n >> 5] |= 1 << (n & 31);
68
+ };
69
+
70
+ BitSet.prototype.has = function has (n) {
71
+ return !!(this.bits[n >> 5] & (1 << (n & 31)));
72
+ };
73
+
74
+ var Chunk = function Chunk(start, end, content) {
75
+ this.start = start;
76
+ this.end = end;
77
+ this.original = content;
78
+
79
+ this.intro = '';
80
+ this.outro = '';
81
+
82
+ this.content = content;
83
+ this.storeName = false;
84
+ this.edited = false;
85
+
86
+ // we make these non-enumerable, for sanity while debugging
87
+ Object.defineProperties(this, {
88
+ previous: { writable: true, value: null },
89
+ next: { writable: true, value: null },
90
+ });
91
+ };
92
+
93
+ Chunk.prototype.appendLeft = function appendLeft (content) {
94
+ this.outro += content;
95
+ };
96
+
97
+ Chunk.prototype.appendRight = function appendRight (content) {
98
+ this.intro = this.intro + content;
99
+ };
100
+
101
+ Chunk.prototype.clone = function clone () {
102
+ var chunk = new Chunk(this.start, this.end, this.original);
103
+
104
+ chunk.intro = this.intro;
105
+ chunk.outro = this.outro;
106
+ chunk.content = this.content;
107
+ chunk.storeName = this.storeName;
108
+ chunk.edited = this.edited;
109
+
110
+ return chunk;
111
+ };
112
+
113
+ Chunk.prototype.contains = function contains (index) {
114
+ return this.start < index && index < this.end;
115
+ };
116
+
117
+ Chunk.prototype.eachNext = function eachNext (fn) {
118
+ var chunk = this;
119
+ while (chunk) {
120
+ fn(chunk);
121
+ chunk = chunk.next;
122
+ }
123
+ };
124
+
125
+ Chunk.prototype.eachPrevious = function eachPrevious (fn) {
126
+ var chunk = this;
127
+ while (chunk) {
128
+ fn(chunk);
129
+ chunk = chunk.previous;
130
+ }
131
+ };
132
+
133
+ Chunk.prototype.edit = function edit (content, storeName, contentOnly) {
134
+ this.content = content;
135
+ if (!contentOnly) {
136
+ this.intro = '';
137
+ this.outro = '';
138
+ }
139
+ this.storeName = storeName;
140
+
141
+ this.edited = true;
142
+
143
+ return this;
144
+ };
145
+
146
+ Chunk.prototype.prependLeft = function prependLeft (content) {
147
+ this.outro = content + this.outro;
148
+ };
149
+
150
+ Chunk.prototype.prependRight = function prependRight (content) {
151
+ this.intro = content + this.intro;
152
+ };
153
+
154
+ Chunk.prototype.split = function split (index) {
155
+ var sliceIndex = index - this.start;
156
+
157
+ var originalBefore = this.original.slice(0, sliceIndex);
158
+ var originalAfter = this.original.slice(sliceIndex);
159
+
160
+ this.original = originalBefore;
161
+
162
+ var newChunk = new Chunk(index, this.end, originalAfter);
163
+ newChunk.outro = this.outro;
164
+ this.outro = '';
165
+
166
+ this.end = index;
167
+
168
+ if (this.edited) {
169
+ // TODO is this block necessary?...
170
+ newChunk.edit('', false);
171
+ this.content = '';
172
+ } else {
173
+ this.content = originalBefore;
174
+ }
175
+
176
+ newChunk.next = this.next;
177
+ if (newChunk.next) { newChunk.next.previous = newChunk; }
178
+ newChunk.previous = this;
179
+ this.next = newChunk;
180
+
181
+ return newChunk;
182
+ };
183
+
184
+ Chunk.prototype.toString = function toString () {
185
+ return this.intro + this.content + this.outro;
186
+ };
187
+
188
+ Chunk.prototype.trimEnd = function trimEnd (rx) {
189
+ this.outro = this.outro.replace(rx, '');
190
+ if (this.outro.length) { return true; }
191
+
192
+ var trimmed = this.content.replace(rx, '');
193
+
194
+ if (trimmed.length) {
195
+ if (trimmed !== this.content) {
196
+ this.split(this.start + trimmed.length).edit('', undefined, true);
197
+ }
198
+ return true;
199
+ } else {
200
+ this.edit('', undefined, true);
201
+
202
+ this.intro = this.intro.replace(rx, '');
203
+ if (this.intro.length) { return true; }
204
+ }
205
+ };
206
+
207
+ Chunk.prototype.trimStart = function trimStart (rx) {
208
+ this.intro = this.intro.replace(rx, '');
209
+ if (this.intro.length) { return true; }
210
+
211
+ var trimmed = this.content.replace(rx, '');
212
+
213
+ if (trimmed.length) {
214
+ if (trimmed !== this.content) {
215
+ this.split(this.end - trimmed.length);
216
+ this.edit('', undefined, true);
217
+ }
218
+ return true;
219
+ } else {
220
+ this.edit('', undefined, true);
221
+
222
+ this.outro = this.outro.replace(rx, '');
223
+ if (this.outro.length) { return true; }
224
+ }
225
+ };
226
+
227
+ var btoa = function () {
228
+ throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
229
+ };
230
+ if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
231
+ btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); };
232
+ } else if (typeof Buffer === 'function') {
233
+ btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); };
234
+ }
235
+
236
+ var SourceMap = function SourceMap(properties) {
237
+ this.version = 3;
238
+ this.file = properties.file;
239
+ this.sources = properties.sources;
240
+ this.sourcesContent = properties.sourcesContent;
241
+ this.names = properties.names;
242
+ this.mappings = encode(properties.mappings);
243
+ };
244
+
245
+ SourceMap.prototype.toString = function toString () {
246
+ return JSON.stringify(this);
247
+ };
248
+
249
+ SourceMap.prototype.toUrl = function toUrl () {
250
+ return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
251
+ };
252
+
253
+ function guessIndent(code) {
254
+ var lines = code.split('\n');
255
+
256
+ var tabbed = lines.filter(function (line) { return /^\t+/.test(line); });
257
+ var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); });
258
+
259
+ if (tabbed.length === 0 && spaced.length === 0) {
260
+ return null;
261
+ }
262
+
263
+ // More lines tabbed than spaced? Assume tabs, and
264
+ // default to tabs in the case of a tie (or nothing
265
+ // to go on)
266
+ if (tabbed.length >= spaced.length) {
267
+ return '\t';
268
+ }
269
+
270
+ // Otherwise, we need to guess the multiple
271
+ var min = spaced.reduce(function (previous, current) {
272
+ var numSpaces = /^ +/.exec(current)[0].length;
273
+ return Math.min(numSpaces, previous);
274
+ }, Infinity);
275
+
276
+ return new Array(min + 1).join(' ');
277
+ }
278
+
279
+ function getRelativePath(from, to) {
280
+ var fromParts = from.split(/[/\\]/);
281
+ var toParts = to.split(/[/\\]/);
282
+
283
+ fromParts.pop(); // get dirname
284
+
285
+ while (fromParts[0] === toParts[0]) {
286
+ fromParts.shift();
287
+ toParts.shift();
288
+ }
289
+
290
+ if (fromParts.length) {
291
+ var i = fromParts.length;
292
+ while (i--) { fromParts[i] = '..'; }
293
+ }
294
+
295
+ return fromParts.concat(toParts).join('/');
296
+ }
297
+
298
+ var toString = Object.prototype.toString;
299
+
300
+ function isObject(thing) {
301
+ return toString.call(thing) === '[object Object]';
302
+ }
303
+
304
+ function getLocator(source) {
305
+ var originalLines = source.split('\n');
306
+ var lineOffsets = [];
307
+
308
+ for (var i = 0, pos = 0; i < originalLines.length; i++) {
309
+ lineOffsets.push(pos);
310
+ pos += originalLines[i].length + 1;
311
+ }
312
+
313
+ return function locate(index) {
314
+ var i = 0;
315
+ var j = lineOffsets.length;
316
+ while (i < j) {
317
+ var m = (i + j) >> 1;
318
+ if (index < lineOffsets[m]) {
319
+ j = m;
320
+ } else {
321
+ i = m + 1;
322
+ }
323
+ }
324
+ var line = i - 1;
325
+ var column = index - lineOffsets[line];
326
+ return { line: line, column: column };
327
+ };
328
+ }
329
+
330
+ var Mappings = function Mappings(hires) {
331
+ this.hires = hires;
332
+ this.generatedCodeLine = 0;
333
+ this.generatedCodeColumn = 0;
334
+ this.raw = [];
335
+ this.rawSegments = this.raw[this.generatedCodeLine] = [];
336
+ this.pending = null;
337
+ };
338
+
339
+ Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) {
340
+ if (content.length) {
341
+ var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
342
+ if (nameIndex >= 0) {
343
+ segment.push(nameIndex);
344
+ }
345
+ this.rawSegments.push(segment);
346
+ } else if (this.pending) {
347
+ this.rawSegments.push(this.pending);
348
+ }
349
+
350
+ this.advance(content);
351
+ this.pending = null;
352
+ };
353
+
354
+ Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) {
355
+ var originalCharIndex = chunk.start;
356
+ var first = true;
357
+
358
+ while (originalCharIndex < chunk.end) {
359
+ if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
360
+ this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);
361
+ }
362
+
363
+ if (original[originalCharIndex] === '\n') {
364
+ loc.line += 1;
365
+ loc.column = 0;
366
+ this.generatedCodeLine += 1;
367
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
368
+ this.generatedCodeColumn = 0;
369
+ first = true;
370
+ } else {
371
+ loc.column += 1;
372
+ this.generatedCodeColumn += 1;
373
+ first = false;
374
+ }
375
+
376
+ originalCharIndex += 1;
377
+ }
378
+
379
+ this.pending = null;
380
+ };
381
+
382
+ Mappings.prototype.advance = function advance (str) {
383
+ if (!str) { return; }
384
+
385
+ var lines = str.split('\n');
386
+
387
+ if (lines.length > 1) {
388
+ for (var i = 0; i < lines.length - 1; i++) {
389
+ this.generatedCodeLine++;
390
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
391
+ }
392
+ this.generatedCodeColumn = 0;
393
+ }
394
+
395
+ this.generatedCodeColumn += lines[lines.length - 1].length;
396
+ };
397
+
398
+ var n = '\n';
399
+
400
+ var warned = {
401
+ insertLeft: false,
402
+ insertRight: false,
403
+ storeName: false,
404
+ };
405
+
406
+ var MagicString = function MagicString(string, options) {
407
+ if ( options === void 0 ) options = {};
408
+
409
+ var chunk = new Chunk(0, string.length, string);
410
+
411
+ Object.defineProperties(this, {
412
+ original: { writable: true, value: string },
413
+ outro: { writable: true, value: '' },
414
+ intro: { writable: true, value: '' },
415
+ firstChunk: { writable: true, value: chunk },
416
+ lastChunk: { writable: true, value: chunk },
417
+ lastSearchedChunk: { writable: true, value: chunk },
418
+ byStart: { writable: true, value: {} },
419
+ byEnd: { writable: true, value: {} },
420
+ filename: { writable: true, value: options.filename },
421
+ indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
422
+ sourcemapLocations: { writable: true, value: new BitSet() },
423
+ storedNames: { writable: true, value: {} },
424
+ indentStr: { writable: true, value: guessIndent(string) },
425
+ });
426
+
427
+ this.byStart[0] = chunk;
428
+ this.byEnd[string.length] = chunk;
429
+ };
430
+
431
+ MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) {
432
+ this.sourcemapLocations.add(char);
433
+ };
434
+
435
+ MagicString.prototype.append = function append (content) {
436
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
437
+
438
+ this.outro += content;
439
+ return this;
440
+ };
441
+
442
+ MagicString.prototype.appendLeft = function appendLeft (index, content) {
443
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
444
+
445
+ this._split(index);
446
+
447
+ var chunk = this.byEnd[index];
448
+
449
+ if (chunk) {
450
+ chunk.appendLeft(content);
451
+ } else {
452
+ this.intro += content;
453
+ }
454
+ return this;
455
+ };
456
+
457
+ MagicString.prototype.appendRight = function appendRight (index, content) {
458
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
459
+
460
+ this._split(index);
461
+
462
+ var chunk = this.byStart[index];
463
+
464
+ if (chunk) {
465
+ chunk.appendRight(content);
466
+ } else {
467
+ this.outro += content;
468
+ }
469
+ return this;
470
+ };
471
+
472
+ MagicString.prototype.clone = function clone () {
473
+ var cloned = new MagicString(this.original, { filename: this.filename });
474
+
475
+ var originalChunk = this.firstChunk;
476
+ var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
477
+
478
+ while (originalChunk) {
479
+ cloned.byStart[clonedChunk.start] = clonedChunk;
480
+ cloned.byEnd[clonedChunk.end] = clonedChunk;
481
+
482
+ var nextOriginalChunk = originalChunk.next;
483
+ var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
484
+
485
+ if (nextClonedChunk) {
486
+ clonedChunk.next = nextClonedChunk;
487
+ nextClonedChunk.previous = clonedChunk;
488
+
489
+ clonedChunk = nextClonedChunk;
490
+ }
491
+
492
+ originalChunk = nextOriginalChunk;
493
+ }
494
+
495
+ cloned.lastChunk = clonedChunk;
496
+
497
+ if (this.indentExclusionRanges) {
498
+ cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
499
+ }
500
+
501
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
502
+
503
+ cloned.intro = this.intro;
504
+ cloned.outro = this.outro;
505
+
506
+ return cloned;
507
+ };
508
+
509
+ MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) {
510
+ var this$1$1 = this;
511
+
512
+ options = options || {};
513
+
514
+ var sourceIndex = 0;
515
+ var names = Object.keys(this.storedNames);
516
+ var mappings = new Mappings(options.hires);
517
+
518
+ var locate = getLocator(this.original);
519
+
520
+ if (this.intro) {
521
+ mappings.advance(this.intro);
522
+ }
523
+
524
+ this.firstChunk.eachNext(function (chunk) {
525
+ var loc = locate(chunk.start);
526
+
527
+ if (chunk.intro.length) { mappings.advance(chunk.intro); }
528
+
529
+ if (chunk.edited) {
530
+ mappings.addEdit(
531
+ sourceIndex,
532
+ chunk.content,
533
+ loc,
534
+ chunk.storeName ? names.indexOf(chunk.original) : -1
535
+ );
536
+ } else {
537
+ mappings.addUneditedChunk(sourceIndex, chunk, this$1$1.original, loc, this$1$1.sourcemapLocations);
538
+ }
539
+
540
+ if (chunk.outro.length) { mappings.advance(chunk.outro); }
541
+ });
542
+
543
+ return {
544
+ file: options.file ? options.file.split(/[/\\]/).pop() : null,
545
+ sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
546
+ sourcesContent: options.includeContent ? [this.original] : [null],
547
+ names: names,
548
+ mappings: mappings.raw,
549
+ };
550
+ };
551
+
552
+ MagicString.prototype.generateMap = function generateMap (options) {
553
+ return new SourceMap(this.generateDecodedMap(options));
554
+ };
555
+
556
+ MagicString.prototype.getIndentString = function getIndentString () {
557
+ return this.indentStr === null ? '\t' : this.indentStr;
558
+ };
559
+
560
+ MagicString.prototype.indent = function indent (indentStr, options) {
561
+ var pattern = /^[^\r\n]/gm;
562
+
563
+ if (isObject(indentStr)) {
564
+ options = indentStr;
565
+ indentStr = undefined;
566
+ }
567
+
568
+ indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t';
569
+
570
+ if (indentStr === '') { return this; } // noop
571
+
572
+ options = options || {};
573
+
574
+ // Process exclusion ranges
575
+ var isExcluded = {};
576
+
577
+ if (options.exclude) {
578
+ var exclusions =
579
+ typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
580
+ exclusions.forEach(function (exclusion) {
581
+ for (var i = exclusion[0]; i < exclusion[1]; i += 1) {
582
+ isExcluded[i] = true;
583
+ }
584
+ });
585
+ }
586
+
587
+ var shouldIndentNextCharacter = options.indentStart !== false;
588
+ var replacer = function (match) {
589
+ if (shouldIndentNextCharacter) { return ("" + indentStr + match); }
590
+ shouldIndentNextCharacter = true;
591
+ return match;
592
+ };
593
+
594
+ this.intro = this.intro.replace(pattern, replacer);
595
+
596
+ var charIndex = 0;
597
+ var chunk = this.firstChunk;
598
+
599
+ while (chunk) {
600
+ var end = chunk.end;
601
+
602
+ if (chunk.edited) {
603
+ if (!isExcluded[charIndex]) {
604
+ chunk.content = chunk.content.replace(pattern, replacer);
605
+
606
+ if (chunk.content.length) {
607
+ shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
608
+ }
609
+ }
610
+ } else {
611
+ charIndex = chunk.start;
612
+
613
+ while (charIndex < end) {
614
+ if (!isExcluded[charIndex]) {
615
+ var char = this.original[charIndex];
616
+
617
+ if (char === '\n') {
618
+ shouldIndentNextCharacter = true;
619
+ } else if (char !== '\r' && shouldIndentNextCharacter) {
620
+ shouldIndentNextCharacter = false;
621
+
622
+ if (charIndex === chunk.start) {
623
+ chunk.prependRight(indentStr);
624
+ } else {
625
+ this._splitChunk(chunk, charIndex);
626
+ chunk = chunk.next;
627
+ chunk.prependRight(indentStr);
628
+ }
629
+ }
630
+ }
631
+
632
+ charIndex += 1;
633
+ }
634
+ }
635
+
636
+ charIndex = chunk.end;
637
+ chunk = chunk.next;
638
+ }
639
+
640
+ this.outro = this.outro.replace(pattern, replacer);
641
+
642
+ return this;
643
+ };
644
+
645
+ MagicString.prototype.insert = function insert () {
646
+ throw new Error(
647
+ 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'
648
+ );
649
+ };
650
+
651
+ MagicString.prototype.insertLeft = function insertLeft (index, content) {
652
+ if (!warned.insertLeft) {
653
+ console.warn(
654
+ 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'
655
+ ); // eslint-disable-line no-console
656
+ warned.insertLeft = true;
657
+ }
658
+
659
+ return this.appendLeft(index, content);
660
+ };
661
+
662
+ MagicString.prototype.insertRight = function insertRight (index, content) {
663
+ if (!warned.insertRight) {
664
+ console.warn(
665
+ 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'
666
+ ); // eslint-disable-line no-console
667
+ warned.insertRight = true;
668
+ }
669
+
670
+ return this.prependRight(index, content);
671
+ };
672
+
673
+ MagicString.prototype.move = function move (start, end, index) {
674
+ if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); }
675
+
676
+ this._split(start);
677
+ this._split(end);
678
+ this._split(index);
679
+
680
+ var first = this.byStart[start];
681
+ var last = this.byEnd[end];
682
+
683
+ var oldLeft = first.previous;
684
+ var oldRight = last.next;
685
+
686
+ var newRight = this.byStart[index];
687
+ if (!newRight && last === this.lastChunk) { return this; }
688
+ var newLeft = newRight ? newRight.previous : this.lastChunk;
689
+
690
+ if (oldLeft) { oldLeft.next = oldRight; }
691
+ if (oldRight) { oldRight.previous = oldLeft; }
692
+
693
+ if (newLeft) { newLeft.next = first; }
694
+ if (newRight) { newRight.previous = last; }
695
+
696
+ if (!first.previous) { this.firstChunk = last.next; }
697
+ if (!last.next) {
698
+ this.lastChunk = first.previous;
699
+ this.lastChunk.next = null;
700
+ }
701
+
702
+ first.previous = newLeft;
703
+ last.next = newRight || null;
704
+
705
+ if (!newLeft) { this.firstChunk = first; }
706
+ if (!newRight) { this.lastChunk = last; }
707
+ return this;
708
+ };
709
+
710
+ MagicString.prototype.overwrite = function overwrite (start, end, content, options) {
711
+ if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); }
712
+
713
+ while (start < 0) { start += this.original.length; }
714
+ while (end < 0) { end += this.original.length; }
715
+
716
+ if (end > this.original.length) { throw new Error('end is out of bounds'); }
717
+ if (start === end)
718
+ { throw new Error(
719
+ 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead'
720
+ ); }
721
+
722
+ this._split(start);
723
+ this._split(end);
724
+
725
+ if (options === true) {
726
+ if (!warned.storeName) {
727
+ console.warn(
728
+ 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'
729
+ ); // eslint-disable-line no-console
730
+ warned.storeName = true;
731
+ }
732
+
733
+ options = { storeName: true };
734
+ }
735
+ var storeName = options !== undefined ? options.storeName : false;
736
+ var contentOnly = options !== undefined ? options.contentOnly : false;
737
+
738
+ if (storeName) {
739
+ var original = this.original.slice(start, end);
740
+ Object.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true });
741
+ }
742
+
743
+ var first = this.byStart[start];
744
+ var last = this.byEnd[end];
745
+
746
+ if (first) {
747
+ var chunk = first;
748
+ while (chunk !== last) {
749
+ if (chunk.next !== this.byStart[chunk.end]) {
750
+ throw new Error('Cannot overwrite across a split point');
751
+ }
752
+ chunk = chunk.next;
753
+ chunk.edit('', false);
754
+ }
755
+
756
+ first.edit(content, storeName, contentOnly);
757
+ } else {
758
+ // must be inserting at the end
759
+ var newChunk = new Chunk(start, end, '').edit(content, storeName);
760
+
761
+ // TODO last chunk in the array may not be the last chunk, if it's moved...
762
+ last.next = newChunk;
763
+ newChunk.previous = last;
764
+ }
765
+ return this;
766
+ };
767
+
768
+ MagicString.prototype.prepend = function prepend (content) {
769
+ if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); }
770
+
771
+ this.intro = content + this.intro;
772
+ return this;
773
+ };
774
+
775
+ MagicString.prototype.prependLeft = function prependLeft (index, content) {
776
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
777
+
778
+ this._split(index);
779
+
780
+ var chunk = this.byEnd[index];
781
+
782
+ if (chunk) {
783
+ chunk.prependLeft(content);
784
+ } else {
785
+ this.intro = content + this.intro;
786
+ }
787
+ return this;
788
+ };
789
+
790
+ MagicString.prototype.prependRight = function prependRight (index, content) {
791
+ if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); }
792
+
793
+ this._split(index);
794
+
795
+ var chunk = this.byStart[index];
796
+
797
+ if (chunk) {
798
+ chunk.prependRight(content);
799
+ } else {
800
+ this.outro = content + this.outro;
801
+ }
802
+ return this;
803
+ };
804
+
805
+ MagicString.prototype.remove = function remove (start, end) {
806
+ while (start < 0) { start += this.original.length; }
807
+ while (end < 0) { end += this.original.length; }
808
+
809
+ if (start === end) { return this; }
810
+
811
+ if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); }
812
+ if (start > end) { throw new Error('end must be greater than start'); }
813
+
814
+ this._split(start);
815
+ this._split(end);
816
+
817
+ var chunk = this.byStart[start];
818
+
819
+ while (chunk) {
820
+ chunk.intro = '';
821
+ chunk.outro = '';
822
+ chunk.edit('');
823
+
824
+ chunk = end > chunk.end ? this.byStart[chunk.end] : null;
825
+ }
826
+ return this;
827
+ };
828
+
829
+ MagicString.prototype.lastChar = function lastChar () {
830
+ if (this.outro.length) { return this.outro[this.outro.length - 1]; }
831
+ var chunk = this.lastChunk;
832
+ do {
833
+ if (chunk.outro.length) { return chunk.outro[chunk.outro.length - 1]; }
834
+ if (chunk.content.length) { return chunk.content[chunk.content.length - 1]; }
835
+ if (chunk.intro.length) { return chunk.intro[chunk.intro.length - 1]; }
836
+ } while ((chunk = chunk.previous));
837
+ if (this.intro.length) { return this.intro[this.intro.length - 1]; }
838
+ return '';
839
+ };
840
+
841
+ MagicString.prototype.lastLine = function lastLine () {
842
+ var lineIndex = this.outro.lastIndexOf(n);
843
+ if (lineIndex !== -1) { return this.outro.substr(lineIndex + 1); }
844
+ var lineStr = this.outro;
845
+ var chunk = this.lastChunk;
846
+ do {
847
+ if (chunk.outro.length > 0) {
848
+ lineIndex = chunk.outro.lastIndexOf(n);
849
+ if (lineIndex !== -1) { return chunk.outro.substr(lineIndex + 1) + lineStr; }
850
+ lineStr = chunk.outro + lineStr;
851
+ }
852
+
853
+ if (chunk.content.length > 0) {
854
+ lineIndex = chunk.content.lastIndexOf(n);
855
+ if (lineIndex !== -1) { return chunk.content.substr(lineIndex + 1) + lineStr; }
856
+ lineStr = chunk.content + lineStr;
857
+ }
858
+
859
+ if (chunk.intro.length > 0) {
860
+ lineIndex = chunk.intro.lastIndexOf(n);
861
+ if (lineIndex !== -1) { return chunk.intro.substr(lineIndex + 1) + lineStr; }
862
+ lineStr = chunk.intro + lineStr;
863
+ }
864
+ } while ((chunk = chunk.previous));
865
+ lineIndex = this.intro.lastIndexOf(n);
866
+ if (lineIndex !== -1) { return this.intro.substr(lineIndex + 1) + lineStr; }
867
+ return this.intro + lineStr;
868
+ };
869
+
870
+ MagicString.prototype.slice = function slice (start, end) {
871
+ if ( start === void 0 ) start = 0;
872
+ if ( end === void 0 ) end = this.original.length;
873
+
874
+ while (start < 0) { start += this.original.length; }
875
+ while (end < 0) { end += this.original.length; }
876
+
877
+ var result = '';
878
+
879
+ // find start chunk
880
+ var chunk = this.firstChunk;
881
+ while (chunk && (chunk.start > start || chunk.end <= start)) {
882
+ // found end chunk before start
883
+ if (chunk.start < end && chunk.end >= end) {
884
+ return result;
885
+ }
886
+
887
+ chunk = chunk.next;
888
+ }
889
+
890
+ if (chunk && chunk.edited && chunk.start !== start)
891
+ { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); }
892
+
893
+ var startChunk = chunk;
894
+ while (chunk) {
895
+ if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
896
+ result += chunk.intro;
897
+ }
898
+
899
+ var containsEnd = chunk.start < end && chunk.end >= end;
900
+ if (containsEnd && chunk.edited && chunk.end !== end)
901
+ { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); }
902
+
903
+ var sliceStart = startChunk === chunk ? start - chunk.start : 0;
904
+ var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
905
+
906
+ result += chunk.content.slice(sliceStart, sliceEnd);
907
+
908
+ if (chunk.outro && (!containsEnd || chunk.end === end)) {
909
+ result += chunk.outro;
910
+ }
911
+
912
+ if (containsEnd) {
913
+ break;
914
+ }
915
+
916
+ chunk = chunk.next;
917
+ }
918
+
919
+ return result;
920
+ };
921
+
922
+ // TODO deprecate this? not really very useful
923
+ MagicString.prototype.snip = function snip (start, end) {
924
+ var clone = this.clone();
925
+ clone.remove(0, start);
926
+ clone.remove(end, clone.original.length);
927
+
928
+ return clone;
929
+ };
930
+
931
+ MagicString.prototype._split = function _split (index) {
932
+ if (this.byStart[index] || this.byEnd[index]) { return; }
933
+
934
+ var chunk = this.lastSearchedChunk;
935
+ var searchForward = index > chunk.end;
936
+
937
+ while (chunk) {
938
+ if (chunk.contains(index)) { return this._splitChunk(chunk, index); }
939
+
940
+ chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
941
+ }
942
+ };
943
+
944
+ MagicString.prototype._splitChunk = function _splitChunk (chunk, index) {
945
+ if (chunk.edited && chunk.content.length) {
946
+ // zero-length edited chunks are a special case (overlapping replacements)
947
+ var loc = getLocator(this.original)(index);
948
+ throw new Error(
949
+ ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")")
950
+ );
951
+ }
952
+
953
+ var newChunk = chunk.split(index);
954
+
955
+ this.byEnd[index] = chunk;
956
+ this.byStart[index] = newChunk;
957
+ this.byEnd[newChunk.end] = newChunk;
958
+
959
+ if (chunk === this.lastChunk) { this.lastChunk = newChunk; }
960
+
961
+ this.lastSearchedChunk = chunk;
962
+ return true;
963
+ };
964
+
965
+ MagicString.prototype.toString = function toString () {
966
+ var str = this.intro;
967
+
968
+ var chunk = this.firstChunk;
969
+ while (chunk) {
970
+ str += chunk.toString();
971
+ chunk = chunk.next;
972
+ }
973
+
974
+ return str + this.outro;
975
+ };
976
+
977
+ MagicString.prototype.isEmpty = function isEmpty () {
978
+ var chunk = this.firstChunk;
979
+ do {
980
+ if (
981
+ (chunk.intro.length && chunk.intro.trim()) ||
982
+ (chunk.content.length && chunk.content.trim()) ||
983
+ (chunk.outro.length && chunk.outro.trim())
984
+ )
985
+ { return false; }
986
+ } while ((chunk = chunk.next));
987
+ return true;
988
+ };
989
+
990
+ MagicString.prototype.length = function length () {
991
+ var chunk = this.firstChunk;
992
+ var length = 0;
993
+ do {
994
+ length += chunk.intro.length + chunk.content.length + chunk.outro.length;
995
+ } while ((chunk = chunk.next));
996
+ return length;
997
+ };
998
+
999
+ MagicString.prototype.trimLines = function trimLines () {
1000
+ return this.trim('[\\r\\n]');
1001
+ };
1002
+
1003
+ MagicString.prototype.trim = function trim (charType) {
1004
+ return this.trimStart(charType).trimEnd(charType);
1005
+ };
1006
+
1007
+ MagicString.prototype.trimEndAborted = function trimEndAborted (charType) {
1008
+ var rx = new RegExp((charType || '\\s') + '+$');
1009
+
1010
+ this.outro = this.outro.replace(rx, '');
1011
+ if (this.outro.length) { return true; }
1012
+
1013
+ var chunk = this.lastChunk;
1014
+
1015
+ do {
1016
+ var end = chunk.end;
1017
+ var aborted = chunk.trimEnd(rx);
1018
+
1019
+ // if chunk was trimmed, we have a new lastChunk
1020
+ if (chunk.end !== end) {
1021
+ if (this.lastChunk === chunk) {
1022
+ this.lastChunk = chunk.next;
1023
+ }
1024
+
1025
+ this.byEnd[chunk.end] = chunk;
1026
+ this.byStart[chunk.next.start] = chunk.next;
1027
+ this.byEnd[chunk.next.end] = chunk.next;
1028
+ }
1029
+
1030
+ if (aborted) { return true; }
1031
+ chunk = chunk.previous;
1032
+ } while (chunk);
1033
+
1034
+ return false;
1035
+ };
1036
+
1037
+ MagicString.prototype.trimEnd = function trimEnd (charType) {
1038
+ this.trimEndAborted(charType);
1039
+ return this;
1040
+ };
1041
+ MagicString.prototype.trimStartAborted = function trimStartAborted (charType) {
1042
+ var rx = new RegExp('^' + (charType || '\\s') + '+');
1043
+
1044
+ this.intro = this.intro.replace(rx, '');
1045
+ if (this.intro.length) { return true; }
1046
+
1047
+ var chunk = this.firstChunk;
1048
+
1049
+ do {
1050
+ var end = chunk.end;
1051
+ var aborted = chunk.trimStart(rx);
1052
+
1053
+ if (chunk.end !== end) {
1054
+ // special case...
1055
+ if (chunk === this.lastChunk) { this.lastChunk = chunk.next; }
1056
+
1057
+ this.byEnd[chunk.end] = chunk;
1058
+ this.byStart[chunk.next.start] = chunk.next;
1059
+ this.byEnd[chunk.next.end] = chunk.next;
1060
+ }
1061
+
1062
+ if (aborted) { return true; }
1063
+ chunk = chunk.next;
1064
+ } while (chunk);
1065
+
1066
+ return false;
1067
+ };
1068
+
1069
+ MagicString.prototype.trimStart = function trimStart (charType) {
1070
+ this.trimStartAborted(charType);
1071
+ return this;
1072
+ };
1073
+
1074
+ const lessToCss = async (id, lessOptions) => {
1075
+ const source = fs.readFileSync(id, "utf-8");
1076
+ const output = await less.render(source, {
1077
+ ...lessOptions,
1078
+ filename: id
1079
+ });
1080
+ return output.css || "";
1081
+ };
1082
+ function lessCompilerPlugin(options = {}) {
1083
+ const { include = /tdesign-web-components.*\.js/, exclude, lessOptions = {} } = options;
1084
+ return {
1085
+ name: "vite-plugin-less-compiler",
1086
+ async transform(code, id) {
1087
+ if (exclude && exclude.test(id)) {
1088
+ return null;
1089
+ }
1090
+ if (!include.test(id)) {
1091
+ return null;
1092
+ }
1093
+ const magicString = new MagicString(code);
1094
+ const ast = this.parse(code);
1095
+ for (const node of ast.body) {
1096
+ const { type = "", source = {}, specifiers } = node;
1097
+ if (type !== "ImportDeclaration" || !source.value.match(/^.*\.less$/)) {
1098
+ continue;
1099
+ }
1100
+ if (!specifiers && specifiers?.[0]?.type !== "ImportDefaultSpecifier") {
1101
+ continue;
1102
+ }
1103
+ const [{ local = {} }] = specifiers;
1104
+ const css = await lessToCss(source.value, lessOptions);
1105
+ magicString.overwrite(node.start, node.end, `const ${local.name} = \`${css}\``);
1106
+ }
1107
+ return {
1108
+ code: magicString.toString()
1109
+ };
1110
+ }
1111
+ };
1112
+ }
1113
+
1114
+ export { lessCompilerPlugin as default };