@fibrae/semi-foundation 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1321) hide show
  1. package/LICENSE +0 -62
  2. package/README.md +37 -35
  3. package/README.zh-CN.md +79 -0
  4. package/dist/base/auto-close-foundation.d.ts +21 -6
  5. package/dist/base/auto-close-foundation.js +28 -9
  6. package/dist/base/focus-handle.d.ts +42 -0
  7. package/dist/base/focus-handle.js +89 -0
  8. package/dist/base/focus-scope.js +75 -0
  9. package/dist/base/foundation.d.ts +57 -26
  10. package/dist/base/foundation.js +59 -26
  11. package/dist/base/list-store.js +15 -2
  12. package/dist/base/modal-resources.d.ts +35 -0
  13. package/dist/base/modal-resources.js +57 -0
  14. package/dist/base/popup-lifecycle.d.ts +13 -0
  15. package/dist/base/popup-lifecycle.js +30 -0
  16. package/dist/base/release-holder.js +18 -0
  17. package/dist/base/reset-timer.d.ts +9 -0
  18. package/dist/base/reset-timer.js +29 -0
  19. package/dist/base/static-list-wrapper.d.ts +15 -0
  20. package/dist/base/static-list-wrapper.js +47 -0
  21. package/dist/base/tokens.css +36 -36
  22. package/dist/components/anchor/constants.d.ts +11 -0
  23. package/dist/components/anchor/constants.js +18 -0
  24. package/dist/components/anchor/foundation.d.ts +49 -0
  25. package/dist/components/anchor/foundation.js +162 -0
  26. package/dist/components/anchor/utils.js +16 -0
  27. package/dist/components/anchor/variables.scss +34 -0
  28. package/dist/components/audio-player/audio-player.css +226 -0
  29. package/dist/components/audio-player/audio-player.scss +278 -0
  30. package/dist/components/audio-player/constants.js +27 -0
  31. package/dist/components/audio-player/foundation.d.ts +44 -0
  32. package/dist/components/audio-player/foundation.js +126 -0
  33. package/dist/components/audio-player/utils.js +6 -0
  34. package/dist/components/audio-player/variables.scss +53 -0
  35. package/dist/components/auto-complete/constants.js +7 -0
  36. package/dist/components/auto-complete/foundation.d.ts +67 -0
  37. package/dist/components/auto-complete/foundation.js +217 -0
  38. package/dist/components/auto-complete/option.css +62 -0
  39. package/dist/components/avatar/constants.js +13 -0
  40. package/dist/components/avatar/foundation.d.ts +31 -0
  41. package/dist/components/avatar/foundation.js +43 -0
  42. package/dist/components/avatar/variables.scss +112 -0
  43. package/dist/components/backtop/constants.js +35 -0
  44. package/dist/components/backtop/foundation.d.ts +26 -0
  45. package/dist/components/backtop/foundation.js +94 -0
  46. package/dist/components/badge/constants.js +4 -0
  47. package/dist/components/banner/constants.js +4 -0
  48. package/dist/components/banner/foundation.d.ts +12 -0
  49. package/dist/components/banner/foundation.js +12 -0
  50. package/dist/components/breadcrumb/breadcrumb.scss +116 -0
  51. package/dist/components/breadcrumb/constants.js +8 -0
  52. package/dist/components/breadcrumb/foundation.d.ts +47 -0
  53. package/dist/components/breadcrumb/foundation.js +64 -0
  54. package/dist/components/breadcrumb/item-foundation.d.ts +45 -0
  55. package/dist/components/breadcrumb/item-foundation.js +36 -0
  56. package/dist/components/button/constants.js +5 -0
  57. package/dist/components/button/split-button-group.css +19 -0
  58. package/dist/components/button/utils.d.ts +27 -0
  59. package/dist/components/button/utils.js +89 -0
  60. package/dist/components/button/variables.scss +169 -0
  61. package/dist/components/calendar/calendar.css +485 -0
  62. package/dist/components/calendar/calendar.scss +515 -0
  63. package/dist/components/calendar/constants.js +14 -0
  64. package/dist/components/calendar/event-util.js +193 -0
  65. package/dist/components/calendar/foundation.d.ts +75 -0
  66. package/dist/components/calendar/foundation.js +196 -0
  67. package/dist/components/calendar/month-foundation.d.ts +22 -0
  68. package/dist/components/calendar/month-foundation.js +32 -0
  69. package/dist/components/card/constants.js +4 -0
  70. package/dist/components/carousel/carousel.css +345 -0
  71. package/dist/components/carousel/carousel.scss +451 -0
  72. package/dist/components/carousel/constants.js +42 -0
  73. package/dist/components/carousel/foundation.d.ts +64 -0
  74. package/dist/components/carousel/foundation.js +217 -0
  75. package/dist/components/carousel/variables.scss +49 -0
  76. package/dist/components/cascader/cascader.scss +586 -0
  77. package/dist/components/cascader/constants.js +20 -0
  78. package/dist/components/cascader/foundation.d.ts +295 -0
  79. package/dist/components/cascader/foundation.js +884 -0
  80. package/dist/components/cascader/util.js +148 -0
  81. package/dist/components/checkbox/checkbox-foundation.d.ts +100 -0
  82. package/dist/components/checkbox/checkbox-foundation.js +74 -0
  83. package/dist/components/checkbox/checkbox-group-foundation.d.ts +25 -0
  84. package/dist/components/checkbox/checkbox-group-foundation.js +34 -0
  85. package/dist/components/checkbox/constants.js +15 -0
  86. package/dist/components/checkbox/variables.scss +72 -0
  87. package/dist/components/code-highlight/constants.js +4 -0
  88. package/dist/components/code-highlight/highlighter.js +56 -0
  89. package/dist/components/code-highlight/index.d.ts +26 -0
  90. package/dist/components/code-highlight/index.js +43 -0
  91. package/dist/components/code-highlight/registry.js +33 -0
  92. package/dist/components/collapse/collapse.scss +112 -0
  93. package/dist/components/collapse/constants.js +4 -0
  94. package/dist/components/collapse/foundation.d.ts +51 -0
  95. package/dist/components/collapse/foundation.js +56 -0
  96. package/dist/components/collapsible/constants.js +4 -0
  97. package/dist/components/collapsible/foundation.d.ts +69 -0
  98. package/dist/components/collapsible/foundation.js +132 -0
  99. package/dist/components/color-picker/color-choose-area-foundation.d.ts +33 -0
  100. package/dist/components/color-picker/color-choose-area-foundation.js +57 -0
  101. package/dist/components/color-picker/color-picker.scss +129 -0
  102. package/dist/components/color-picker/color-slider-foundation.d.ts +28 -0
  103. package/dist/components/color-picker/color-slider-foundation.js +45 -0
  104. package/dist/components/color-picker/constants.js +4 -0
  105. package/dist/components/color-picker/data-part-foundation.d.ts +35 -0
  106. package/dist/components/color-picker/data-part-foundation.js +86 -0
  107. package/dist/components/color-picker/foundation.d.ts +53 -0
  108. package/dist/components/color-picker/foundation.js +150 -0
  109. package/dist/components/color-picker/utils/convert.d.ts +14 -0
  110. package/dist/components/color-picker/utils/convert.js +148 -0
  111. package/dist/components/color-picker/utils/round.js +5 -0
  112. package/dist/components/color-picker/utils/split.js +26 -0
  113. package/dist/components/config-provider/breakpoint-observer.js +139 -0
  114. package/dist/components/config-provider/inherit-config.d.ts +24 -0
  115. package/dist/components/config-provider/inherit-config.js +24 -0
  116. package/dist/components/cropper/constants.js +37 -0
  117. package/dist/components/cropper/cropper.scss +129 -0
  118. package/dist/components/cropper/foundation.d.ts +94 -0
  119. package/dist/components/cropper/foundation.js +851 -0
  120. package/dist/components/cropper/utils.js +23 -0
  121. package/dist/components/date-picker/_utils/formatter.js +21 -0
  122. package/dist/components/date-picker/_utils/get-day-of-week.js +14 -0
  123. package/dist/components/date-picker/_utils/get-default-format-token.js +18 -0
  124. package/dist/components/date-picker/_utils/get-default-picker-date.js +35 -0
  125. package/dist/components/date-picker/_utils/get-full-date-offset.js +11 -0
  126. package/dist/components/date-picker/_utils/get-inset-input-format-token.js +33 -0
  127. package/dist/components/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +57 -0
  128. package/dist/components/date-picker/_utils/get-month-table.js +33 -0
  129. package/dist/components/date-picker/_utils/get-year-and-month.js +18 -0
  130. package/dist/components/date-picker/_utils/get-year-month-from-value.js +18 -0
  131. package/dist/components/date-picker/_utils/get-years.js +9 -0
  132. package/dist/components/date-picker/_utils/index.d.ts +9 -0
  133. package/dist/components/date-picker/_utils/index.js +9 -0
  134. package/dist/components/date-picker/_utils/is-after.js +7 -0
  135. package/dist/components/date-picker/_utils/is-before.js +7 -0
  136. package/dist/components/date-picker/_utils/is-between.js +11 -0
  137. package/dist/components/date-picker/_utils/is-same-day.js +7 -0
  138. package/dist/components/date-picker/_utils/is-timestamp.js +6 -0
  139. package/dist/components/date-picker/_utils/is-valid-date.js +5 -0
  140. package/dist/components/date-picker/_utils/parser.js +17 -0
  141. package/dist/components/date-picker/_utils/picker-type.js +28 -0
  142. package/dist/components/date-picker/_utils/to-callback-args.js +46 -0
  143. package/dist/components/date-picker/_utils/to-date-arg.js +13 -0
  144. package/dist/components/date-picker/constants.js +78 -0
  145. package/dist/components/date-picker/date-picker.scss +1762 -0
  146. package/dist/components/date-picker/foundation.d.ts +299 -0
  147. package/dist/components/date-picker/foundation.js +707 -0
  148. package/dist/components/date-picker/input-foundation.d.ts +134 -0
  149. package/dist/components/date-picker/input-foundation.js +212 -0
  150. package/dist/components/date-picker/month-foundation.d.ts +163 -0
  151. package/dist/components/date-picker/month-foundation.js +196 -0
  152. package/dist/components/date-picker/months-grid-foundation.d.ts +163 -0
  153. package/dist/components/date-picker/months-grid-foundation.js +614 -0
  154. package/dist/components/date-picker/year-and-month-foundation.d.ts +75 -0
  155. package/dist/components/date-picker/year-and-month-foundation.js +115 -0
  156. package/dist/components/descriptions/constants.js +4 -0
  157. package/dist/components/descriptions/foundation.d.ts +9 -0
  158. package/dist/components/descriptions/foundation.js +33 -0
  159. package/dist/components/divider/constants.js +4 -0
  160. package/dist/components/drag-move/foundation.d.ts +31 -0
  161. package/dist/components/drag-move/foundation.js +203 -0
  162. package/dist/components/dropdown/constants.js +12 -0
  163. package/dist/components/dropdown/foundation.d.ts +37 -0
  164. package/dist/components/dropdown/foundation.js +124 -0
  165. package/dist/components/dropdown/menu-foundation.d.ts +35 -0
  166. package/dist/components/dropdown/menu-foundation.js +83 -0
  167. package/dist/components/empty/constants.js +5 -0
  168. package/dist/components/feedback/constants.js +19 -0
  169. package/dist/components/feedback/feedback.scss +153 -0
  170. package/dist/components/feedback/foundation.d.ts +42 -0
  171. package/dist/components/feedback/foundation.js +70 -0
  172. package/dist/components/float-button/constants.js +13 -0
  173. package/dist/components/float-button/float-button.scss +201 -0
  174. package/dist/components/form/array-field-rows.d.ts +23 -0
  175. package/dist/components/form/array-field-rows.js +60 -0
  176. package/dist/components/form/constants.d.ts +15 -0
  177. package/dist/components/form/constants.js +47 -0
  178. package/dist/components/form/errors.d.ts +15 -0
  179. package/dist/components/form/errors.js +50 -0
  180. package/dist/components/form/field-store.js +28 -0
  181. package/dist/components/form/form-api-proxy.d.ts +14 -0
  182. package/dist/components/form/form-api-proxy.js +48 -0
  183. package/dist/components/form/form.css +250 -0
  184. package/dist/components/form/form.scss +319 -0
  185. package/dist/components/form/foundation.d.ts +71 -0
  186. package/dist/components/form/foundation.js +1100 -0
  187. package/dist/components/form/interface.d.ts +247 -0
  188. package/dist/components/form/json-schema.d.ts +42 -0
  189. package/dist/components/form/json-schema.js +208 -0
  190. package/dist/components/form/rtl.scss +13 -0
  191. package/dist/components/form/rules.d.ts +37 -0
  192. package/dist/components/form/rules.js +97 -0
  193. package/dist/components/form/utils.d.ts +119 -0
  194. package/dist/components/form/utils.js +154 -0
  195. package/dist/components/form/variables.scss +52 -0
  196. package/dist/components/grid/constants.js +12 -0
  197. package/dist/components/grid/gutter.js +39 -0
  198. package/dist/components/grid/utils.js +39 -0
  199. package/dist/components/highlight/constants.js +4 -0
  200. package/dist/components/highlight/foundation.js +108 -0
  201. package/dist/components/hot-keys/constants.js +207 -0
  202. package/dist/components/hot-keys/foundation.d.ts +22 -0
  203. package/dist/components/hot-keys/foundation.js +96 -0
  204. package/dist/components/image/constants.js +5 -0
  205. package/dist/components/image/image-foundation.d.ts +39 -0
  206. package/dist/components/image/image-foundation.js +60 -0
  207. package/dist/components/image/image.scss +272 -0
  208. package/dist/components/image/preview-footer-foundation.d.ts +25 -0
  209. package/dist/components/image/preview-footer-foundation.js +30 -0
  210. package/dist/components/image/preview-foundation.d.ts +54 -0
  211. package/dist/components/image/preview-foundation.js +79 -0
  212. package/dist/components/image/preview-image-foundation.d.ts +63 -0
  213. package/dist/components/image/preview-image-foundation.js +238 -0
  214. package/dist/components/image/preview-inner-foundation.d.ts +92 -0
  215. package/dist/components/image/preview-inner-foundation.js +290 -0
  216. package/dist/components/image/utils.js +66 -0
  217. package/dist/components/input/constants.d.ts +8 -0
  218. package/dist/components/input/constants.js +13 -0
  219. package/dist/components/input/foundation.d.ts +51 -0
  220. package/dist/components/input/foundation.js +81 -0
  221. package/dist/components/input/input.css +619 -0
  222. package/dist/components/input/input.scss +746 -0
  223. package/dist/components/input/text-entry-foundation.d.ts +60 -0
  224. package/dist/components/input/text-entry-foundation.js +105 -0
  225. package/dist/components/input/textarea-foundation.d.ts +63 -0
  226. package/dist/components/input/textarea-foundation.js +138 -0
  227. package/dist/components/input/textarea.css +260 -0
  228. package/dist/components/input/textarea.scss +320 -0
  229. package/dist/components/input/util/line-number.js +42 -0
  230. package/dist/components/input/util/truncate-value.js +14 -0
  231. package/dist/components/input/variables.scss +107 -0
  232. package/dist/components/input-number/caret.js +20 -0
  233. package/dist/components/input-number/constants.d.ts +14 -0
  234. package/dist/components/input-number/constants.js +13 -0
  235. package/dist/components/input-number/foundation.d.ts +104 -0
  236. package/dist/components/input-number/foundation.js +555 -0
  237. package/dist/components/json-viewer/constants.js +4 -0
  238. package/dist/components/json-viewer/foundation.d.ts +53 -0
  239. package/dist/components/json-viewer/foundation.js +161 -0
  240. package/dist/components/json-viewer/json-viewer.scss +224 -0
  241. package/dist/components/layout/constants.js +4 -0
  242. package/dist/components/list/constants.js +4 -0
  243. package/dist/components/list/list.scss +162 -0
  244. package/dist/components/lottie/constants.js +4 -0
  245. package/dist/components/lottie/foundation.d.ts +31 -0
  246. package/dist/components/lottie/foundation.js +65 -0
  247. package/dist/components/markdown-render/constants.js +4 -0
  248. package/dist/components/markdown-render/foundation.d.ts +54 -0
  249. package/dist/components/markdown-render/foundation.js +118 -0
  250. package/dist/components/modal/confirm-registry.d.ts +10 -0
  251. package/dist/components/modal/confirm-registry.js +21 -0
  252. package/dist/components/modal/confirm.js +34 -0
  253. package/dist/components/modal/constants.js +4 -0
  254. package/dist/components/modal/modal-content-foundation.d.ts +38 -0
  255. package/dist/components/modal/modal-content-foundation.js +73 -0
  256. package/dist/components/modal/modal-foundation.d.ts +92 -0
  257. package/dist/components/modal/modal-foundation.js +115 -0
  258. package/dist/components/navigation/constants.js +20 -0
  259. package/dist/components/navigation/foundation.d.ts +81 -0
  260. package/dist/components/navigation/foundation.js +180 -0
  261. package/dist/components/navigation/item-foundation.d.ts +44 -0
  262. package/dist/components/navigation/item-foundation.js +42 -0
  263. package/dist/components/navigation/navigation.scss +764 -0
  264. package/dist/components/navigation/sub-nav-foundation.d.ts +30 -0
  265. package/dist/components/navigation/sub-nav-foundation.js +54 -0
  266. package/dist/components/navigation/variables.scss +120 -0
  267. package/dist/components/notification/constants.js +32 -0
  268. package/dist/components/notification/notification-api-foundation.d.ts +29 -0
  269. package/dist/components/notification/notification-api-foundation.js +58 -0
  270. package/dist/components/notification/notification-foundation.d.ts +40 -0
  271. package/dist/components/notification/notification-foundation.js +12 -0
  272. package/dist/components/notification/notification-list-foundation.d.ts +73 -0
  273. package/dist/components/notification/notification-list-foundation.js +94 -0
  274. package/dist/components/overflow-list/constants.d.ts +21 -0
  275. package/dist/components/overflow-list/constants.js +22 -0
  276. package/dist/components/overflow-list/foundation.d.ts +78 -0
  277. package/dist/components/overflow-list/foundation.js +195 -0
  278. package/dist/components/pagination/constants.js +14 -0
  279. package/dist/components/pagination/foundation.d.ts +54 -0
  280. package/dist/components/pagination/foundation.js +185 -0
  281. package/dist/components/pagination/pagination.scss +189 -0
  282. package/dist/components/pincode/constants.js +4 -0
  283. package/dist/components/pincode/foundation.d.ts +38 -0
  284. package/dist/components/pincode/foundation.js +92 -0
  285. package/dist/components/popconfirm/constants.d.ts +4 -0
  286. package/dist/components/popconfirm/constants.js +7 -0
  287. package/dist/components/popconfirm/popconfirm-foundation.d.ts +47 -0
  288. package/dist/components/popconfirm/popconfirm-foundation.js +85 -0
  289. package/dist/components/popover/constants.js +47 -0
  290. package/dist/components/progress/constants.js +8 -0
  291. package/dist/components/progress/generates.js +24 -0
  292. package/dist/components/progress/utils.js +45 -0
  293. package/dist/components/radio/constants.js +19 -0
  294. package/dist/components/radio/radio-foundation.d.ts +76 -0
  295. package/dist/components/radio/radio-foundation.js +92 -0
  296. package/dist/components/radio/radio-group-foundation.d.ts +19 -0
  297. package/dist/components/radio/radio-group-foundation.js +31 -0
  298. package/dist/components/radio/variables.scss +107 -0
  299. package/dist/components/rating/constants.js +5 -0
  300. package/dist/components/rating/foundation.d.ts +101 -0
  301. package/dist/components/rating/foundation.js +166 -0
  302. package/dist/components/rating/variables.scss +19 -0
  303. package/dist/components/resizable/constants.js +4 -0
  304. package/dist/components/resizable/foundation.d.ts +3 -0
  305. package/dist/components/resizable/group/index.d.ts +60 -0
  306. package/dist/components/resizable/group/index.js +351 -0
  307. package/dist/components/resizable/resizable.scss +146 -0
  308. package/dist/components/resizable/single/index.d.ts +86 -0
  309. package/dist/components/resizable/single/index.js +444 -0
  310. package/dist/components/resizable/types.js +18 -0
  311. package/dist/components/resizable/utils.js +53 -0
  312. package/dist/components/scroll-list/constants.js +11 -0
  313. package/dist/components/scroll-list/item-foundation.d.ts +57 -0
  314. package/dist/components/scroll-list/item-foundation.js +331 -0
  315. package/dist/components/scroll-list/scroll-list.scss +198 -0
  316. package/dist/components/scroll-list/scroll-to.js +15 -0
  317. package/dist/components/select/combobox-name.js +21 -0
  318. package/dist/components/select/constants.js +22 -0
  319. package/dist/components/select/foundation.d.ts +135 -0
  320. package/dist/components/select/foundation.js +752 -0
  321. package/dist/components/select/option-foundation.js +35 -0
  322. package/dist/components/select/option.css +67 -0
  323. package/dist/components/select/select.scss +554 -0
  324. package/dist/components/side-sheet/constants.js +5 -0
  325. package/dist/components/side-sheet/side-sheet-foundation.d.ts +80 -0
  326. package/dist/components/side-sheet/side-sheet-foundation.js +109 -0
  327. package/dist/components/skeleton/constants.js +4 -0
  328. package/dist/components/slider/constants.js +12 -0
  329. package/dist/components/slider/foundation.d.ts +163 -0
  330. package/dist/components/slider/foundation.js +444 -0
  331. package/dist/components/slider/variables.scss +63 -0
  332. package/dist/components/sortable/accessibility.d.ts +14 -0
  333. package/dist/components/sortable/accessibility.js +49 -0
  334. package/dist/components/space/constants.js +9 -0
  335. package/dist/components/spin/constants.js +3 -0
  336. package/dist/components/spin/foundation.d.ts +22 -0
  337. package/dist/components/spin/foundation.js +46 -0
  338. package/dist/components/spin/spin.scss +111 -0
  339. package/dist/components/steps/bacis-steps.css +234 -0
  340. package/dist/components/steps/constants.js +8 -0
  341. package/dist/components/steps/fill-steps.css +141 -0
  342. package/dist/components/steps/nav-steps.css +48 -0
  343. package/dist/components/steps/steps.scss +17 -0
  344. package/dist/components/steps/utils.js +15 -0
  345. package/dist/components/switch/constants.js +16 -0
  346. package/dist/components/switch/foundation.d.ts +23 -0
  347. package/dist/components/switch/foundation.js +20 -0
  348. package/dist/components/switch/variables.scss +71 -0
  349. package/dist/components/table/constants.d.ts +76 -0
  350. package/dist/components/table/constants.js +111 -0
  351. package/dist/components/table/foundation.d.ts +356 -0
  352. package/dist/components/table/foundation.js +1001 -0
  353. package/dist/components/table/operation-panel.css +29 -0
  354. package/dist/components/table/table.css +636 -0
  355. package/dist/components/table/table.scss +788 -0
  356. package/dist/components/table/utils.d.ts +216 -0
  357. package/dist/components/table/utils.js +516 -0
  358. package/dist/components/table/variables.scss +81 -0
  359. package/dist/components/tabs/constants.d.ts +32 -0
  360. package/dist/components/tabs/constants.js +39 -0
  361. package/dist/components/tabs/foundation.d.ts +87 -0
  362. package/dist/components/tabs/foundation.js +190 -0
  363. package/dist/components/tabs/tabs.scss +933 -0
  364. package/dist/components/tabs/variables.scss +155 -0
  365. package/dist/components/tag/constants.js +35 -0
  366. package/dist/components/tag/focus.js +22 -0
  367. package/dist/components/tag/mixin.scss +19 -0
  368. package/dist/components/tag/tag-key.js +18 -0
  369. package/dist/components/tag/tag.css +537 -0
  370. package/dist/components/tag/variables.scss +85 -0
  371. package/dist/components/tag-input/constants.js +9 -0
  372. package/dist/components/tag-input/foundation.d.ts +94 -0
  373. package/dist/components/tag-input/foundation.js +247 -0
  374. package/dist/components/tag-input/tag-input.scss +357 -0
  375. package/dist/components/tag-input/utils/get-splited-array.js +16 -0
  376. package/dist/components/tag-input/utils/tag-focus.js +14 -0
  377. package/dist/components/time-picker/combox-foundation.d.ts +64 -0
  378. package/dist/components/time-picker/combox-foundation.js +96 -0
  379. package/dist/components/time-picker/constants.js +23 -0
  380. package/dist/components/time-picker/foundation.d.ts +91 -0
  381. package/dist/components/time-picker/foundation.js +272 -0
  382. package/dist/components/time-picker/input-foundation.d.ts +18 -0
  383. package/dist/components/time-picker/input-foundation.js +35 -0
  384. package/dist/components/time-picker/utils/index.js +57 -0
  385. package/dist/components/timeline/constants.js +7 -0
  386. package/dist/components/timeline/timeline.scss +190 -0
  387. package/dist/components/timeline/utils.js +10 -0
  388. package/dist/components/toast/constants.js +34 -0
  389. package/dist/components/toast/toast-api-foundation.d.ts +26 -0
  390. package/dist/components/toast/toast-api-foundation.js +49 -0
  391. package/dist/components/toast/toast-foundation.d.ts +37 -0
  392. package/dist/components/toast/toast-foundation.js +5 -0
  393. package/dist/components/toast/toast-list-foundation.d.ts +31 -0
  394. package/dist/components/toast/toast-list-foundation.js +76 -0
  395. package/dist/components/tooltip/adjust-position.js +202 -0
  396. package/dist/components/tooltip/arrow.css +1 -0
  397. package/dist/components/tooltip/constants.d.ts +53 -0
  398. package/dist/components/tooltip/constants.js +99 -0
  399. package/dist/components/tooltip/foundation.d.ts +116 -0
  400. package/dist/components/tooltip/foundation.js +750 -0
  401. package/dist/components/tooltip/position.css +10 -0
  402. package/dist/components/tooltip/tooltip.scss +72 -0
  403. package/dist/components/transfer/constants.js +10 -0
  404. package/dist/components/transfer/foundation.d.ts +130 -0
  405. package/dist/components/transfer/foundation.js +241 -0
  406. package/dist/components/transfer/transfer-utils.js +45 -0
  407. package/dist/components/transfer/transfer.scss +260 -0
  408. package/dist/components/tree/constants.js +8 -0
  409. package/dist/components/tree/foundation.d.ts +283 -0
  410. package/dist/components/tree/foundation.js +341 -0
  411. package/dist/components/tree/shared.d.ts +208 -0
  412. package/dist/components/tree/shared.js +564 -0
  413. package/dist/components/tree/tree-util.d.ts +100 -0
  414. package/dist/components/tree/tree-util.js +447 -0
  415. package/dist/components/tree/tree.scss +439 -0
  416. package/dist/components/tree-select/constants.js +19 -0
  417. package/dist/components/tree-select/foundation.d.ts +161 -0
  418. package/dist/components/tree-select/foundation.js +427 -0
  419. package/dist/components/tree-select/tree-select.scss +467 -0
  420. package/dist/components/typography/constants.js +50 -0
  421. package/dist/components/typography/ellipsis.js +154 -0
  422. package/dist/components/typography/format-numeral.js +99 -0
  423. package/dist/components/typography/typography.scss +383 -0
  424. package/dist/components/upload/constants.d.ts +24 -0
  425. package/dist/components/upload/constants.js +39 -0
  426. package/dist/components/upload/foundation.d.ts +180 -0
  427. package/dist/components/upload/foundation.js +763 -0
  428. package/dist/components/upload/upload.scss +640 -0
  429. package/dist/components/upload/utils.d.ts +25 -0
  430. package/dist/components/upload/utils.js +102 -0
  431. package/dist/components/user-guide/constants.js +12 -0
  432. package/dist/components/user-guide/foundation.d.ts +72 -0
  433. package/dist/components/user-guide/foundation.js +121 -0
  434. package/dist/components/video-player/constants.js +48 -0
  435. package/dist/components/video-player/foundation.d.ts +89 -0
  436. package/dist/components/video-player/foundation.js +316 -0
  437. package/dist/components/video-player/progress-foundation.d.ts +48 -0
  438. package/dist/components/video-player/progress-foundation.js +91 -0
  439. package/dist/components/video-player/seek-foundation.d.ts +49 -0
  440. package/dist/components/video-player/seek-foundation.js +52 -0
  441. package/dist/components/video-player/utils.js +58 -0
  442. package/dist/components/video-player/video-player.scss +344 -0
  443. package/dist/locale/format.d.ts +5 -0
  444. package/dist/locale/format.js +9 -0
  445. package/dist/locale/interface.d.ts +18 -0
  446. package/dist/locale/source/ar.js +19 -1
  447. package/dist/locale/source/az.js +19 -1
  448. package/dist/locale/source/bg.js +19 -1
  449. package/dist/locale/source/bn_IN.js +19 -1
  450. package/dist/locale/source/ca.js +19 -1
  451. package/dist/locale/source/ceb_PH.js +19 -1
  452. package/dist/locale/source/cs_CZ.js +19 -1
  453. package/dist/locale/source/da.js +19 -1
  454. package/dist/locale/source/de.js +19 -1
  455. package/dist/locale/source/el_GR.js +19 -1
  456. package/dist/locale/source/en_GB.js +19 -1
  457. package/dist/locale/source/en_US.js +19 -1
  458. package/dist/locale/source/es.js +19 -1
  459. package/dist/locale/source/es_419.js +19 -1
  460. package/dist/locale/source/et.js +19 -1
  461. package/dist/locale/source/fa_IR.js +19 -1
  462. package/dist/locale/source/fi_FI.js +19 -1
  463. package/dist/locale/source/fil_PH.js +19 -1
  464. package/dist/locale/source/fr.js +19 -1
  465. package/dist/locale/source/fr_CA.js +19 -1
  466. package/dist/locale/source/ga.js +19 -1
  467. package/dist/locale/source/he_IL.js +19 -1
  468. package/dist/locale/source/hi_IN.js +19 -1
  469. package/dist/locale/source/hr.js +19 -1
  470. package/dist/locale/source/hu_HU.js +19 -1
  471. package/dist/locale/source/id_ID.js +19 -1
  472. package/dist/locale/source/is.js +19 -1
  473. package/dist/locale/source/it.js +19 -1
  474. package/dist/locale/source/ja_JP.js +19 -1
  475. package/dist/locale/source/jv_ID.js +19 -1
  476. package/dist/locale/source/kk.js +19 -1
  477. package/dist/locale/source/km_KH.js +19 -1
  478. package/dist/locale/source/ko_KR.js +19 -1
  479. package/dist/locale/source/lt.js +19 -1
  480. package/dist/locale/source/lv.js +19 -1
  481. package/dist/locale/source/ms_MY.js +19 -1
  482. package/dist/locale/source/my_MM.js +19 -1
  483. package/dist/locale/source/nb.js +19 -1
  484. package/dist/locale/source/nl_NL.js +19 -1
  485. package/dist/locale/source/pl_PL.js +19 -1
  486. package/dist/locale/source/pt.js +19 -1
  487. package/dist/locale/source/pt_BR.js +19 -1
  488. package/dist/locale/source/ro.js +19 -1
  489. package/dist/locale/source/ru_RU.js +19 -1
  490. package/dist/locale/source/sk.js +19 -1
  491. package/dist/locale/source/sl.js +19 -1
  492. package/dist/locale/source/sq.js +19 -1
  493. package/dist/locale/source/sv_SE.js +19 -1
  494. package/dist/locale/source/sw.js +19 -1
  495. package/dist/locale/source/th_TH.js +19 -1
  496. package/dist/locale/source/tr_TR.js +19 -1
  497. package/dist/locale/source/uk_UA.js +19 -1
  498. package/dist/locale/source/ur.js +19 -1
  499. package/dist/locale/source/uz.js +19 -1
  500. package/dist/locale/source/vi_VN.js +19 -1
  501. package/dist/locale/source/zh_CN.js +19 -1
  502. package/dist/locale/source/zh_TW.js +19 -1
  503. package/dist/theme/global.scss +36 -36
  504. package/dist/utils/a11y.d.ts +11 -3
  505. package/dist/utils/a11y.js +25 -5
  506. package/dist/utils/date-fns-extra.d.ts +3 -1
  507. package/dist/utils/date-fns-extra.js +8 -3
  508. package/dist/utils/dom.d.ts +0 -2
  509. package/dist/utils/dom.js +1 -4
  510. package/dist/utils/focus-handover.js +1 -1
  511. package/package.json +2 -3
  512. package/dist/anchor/constants.d.ts +0 -9
  513. package/dist/anchor/constants.js +0 -14
  514. package/dist/anchor/foundation.d.ts +0 -46
  515. package/dist/anchor/foundation.js +0 -142
  516. package/dist/anchor/utils.js +0 -16
  517. package/dist/anchor/variables.scss +0 -34
  518. package/dist/audio-player/audio-player.css +0 -226
  519. package/dist/audio-player/audio-player.scss +0 -278
  520. package/dist/audio-player/constants.js +0 -27
  521. package/dist/audio-player/foundation.d.ts +0 -43
  522. package/dist/audio-player/foundation.js +0 -115
  523. package/dist/audio-player/utils.js +0 -6
  524. package/dist/audio-player/variables.scss +0 -53
  525. package/dist/auto-complete/constants.js +0 -7
  526. package/dist/auto-complete/foundation.d.ts +0 -75
  527. package/dist/auto-complete/foundation.js +0 -218
  528. package/dist/avatar/constants.js +0 -13
  529. package/dist/avatar/foundation.d.ts +0 -28
  530. package/dist/avatar/foundation.js +0 -31
  531. package/dist/avatar/variables.scss +0 -112
  532. package/dist/backtop/constants.js +0 -35
  533. package/dist/backtop/foundation.d.ts +0 -23
  534. package/dist/backtop/foundation.js +0 -68
  535. package/dist/badge/constants.js +0 -4
  536. package/dist/banner/constants.js +0 -4
  537. package/dist/banner/foundation.d.ts +0 -9
  538. package/dist/banner/foundation.js +0 -9
  539. package/dist/breadcrumb/breadcrumb.scss +0 -116
  540. package/dist/breadcrumb/constants.js +0 -8
  541. package/dist/breadcrumb/foundation.d.ts +0 -37
  542. package/dist/breadcrumb/foundation.js +0 -60
  543. package/dist/breadcrumb/item-foundation.d.ts +0 -45
  544. package/dist/breadcrumb/item-foundation.js +0 -36
  545. package/dist/button/constants.js +0 -5
  546. package/dist/button/utils.d.ts +0 -27
  547. package/dist/button/utils.js +0 -89
  548. package/dist/button/variables.scss +0 -169
  549. package/dist/calendar/calendar.css +0 -486
  550. package/dist/calendar/calendar.scss +0 -518
  551. package/dist/calendar/constants.js +0 -14
  552. package/dist/calendar/event-util.js +0 -193
  553. package/dist/calendar/foundation.d.ts +0 -75
  554. package/dist/calendar/foundation.js +0 -194
  555. package/dist/calendar/month-foundation.d.ts +0 -10
  556. package/dist/calendar/month-foundation.js +0 -12
  557. package/dist/card/constants.js +0 -4
  558. package/dist/carousel/carousel.css +0 -345
  559. package/dist/carousel/carousel.scss +0 -451
  560. package/dist/carousel/constants.js +0 -42
  561. package/dist/carousel/foundation.d.ts +0 -59
  562. package/dist/carousel/foundation.js +0 -204
  563. package/dist/carousel/variables.scss +0 -49
  564. package/dist/cascader/cascader.scss +0 -586
  565. package/dist/cascader/constants.js +0 -20
  566. package/dist/cascader/foundation.d.ts +0 -304
  567. package/dist/cascader/foundation.js +0 -906
  568. package/dist/cascader/util.js +0 -148
  569. package/dist/checkbox/checkbox-foundation.d.ts +0 -93
  570. package/dist/checkbox/checkbox-foundation.js +0 -63
  571. package/dist/checkbox/checkbox-group-foundation.d.ts +0 -20
  572. package/dist/checkbox/checkbox-group-foundation.js +0 -28
  573. package/dist/checkbox/constants.js +0 -15
  574. package/dist/checkbox/variables.scss +0 -72
  575. package/dist/code-highlight/constants.js +0 -4
  576. package/dist/code-highlight/highlighter.js +0 -56
  577. package/dist/code-highlight/index.d.ts +0 -24
  578. package/dist/code-highlight/index.js +0 -19
  579. package/dist/code-highlight/registry.js +0 -33
  580. package/dist/collapse/collapse.scss +0 -112
  581. package/dist/collapse/constants.js +0 -4
  582. package/dist/collapse/foundation.d.ts +0 -47
  583. package/dist/collapse/foundation.js +0 -44
  584. package/dist/collapsible/constants.js +0 -4
  585. package/dist/collapsible/foundation.d.ts +0 -68
  586. package/dist/collapsible/foundation.js +0 -123
  587. package/dist/color-picker/alpha-slider-foundation.d.ts +0 -27
  588. package/dist/color-picker/alpha-slider-foundation.js +0 -41
  589. package/dist/color-picker/color-choose-area-foundation.d.ts +0 -33
  590. package/dist/color-picker/color-choose-area-foundation.js +0 -57
  591. package/dist/color-picker/color-picker.scss +0 -129
  592. package/dist/color-picker/color-slider-foundation.d.ts +0 -27
  593. package/dist/color-picker/color-slider-foundation.js +0 -41
  594. package/dist/color-picker/constants.js +0 -4
  595. package/dist/color-picker/data-part-foundation.d.ts +0 -28
  596. package/dist/color-picker/data-part-foundation.js +0 -76
  597. package/dist/color-picker/foundation.d.ts +0 -56
  598. package/dist/color-picker/foundation.js +0 -149
  599. package/dist/color-picker/utils/convert.d.ts +0 -16
  600. package/dist/color-picker/utils/convert.js +0 -150
  601. package/dist/color-picker/utils/round.js +0 -5
  602. package/dist/color-picker/utils/split.js +0 -26
  603. package/dist/config-provider/breakpoint-observer.js +0 -139
  604. package/dist/config-provider/inherit-config.d.ts +0 -24
  605. package/dist/config-provider/inherit-config.js +0 -24
  606. package/dist/cropper/constants.js +0 -37
  607. package/dist/cropper/cropper.scss +0 -129
  608. package/dist/cropper/foundation.d.ts +0 -90
  609. package/dist/cropper/foundation.js +0 -806
  610. package/dist/cropper/utils.js +0 -23
  611. package/dist/date-picker/_utils/formatter.js +0 -21
  612. package/dist/date-picker/_utils/get-day-of-week.js +0 -14
  613. package/dist/date-picker/_utils/get-default-format-token.js +0 -18
  614. package/dist/date-picker/_utils/get-default-picker-date.js +0 -35
  615. package/dist/date-picker/_utils/get-full-date-offset.js +0 -11
  616. package/dist/date-picker/_utils/get-inset-input-format-token.js +0 -33
  617. package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +0 -57
  618. package/dist/date-picker/_utils/get-month-table.js +0 -33
  619. package/dist/date-picker/_utils/get-year-and-month.js +0 -18
  620. package/dist/date-picker/_utils/get-year-month-from-value.js +0 -18
  621. package/dist/date-picker/_utils/get-years.js +0 -9
  622. package/dist/date-picker/_utils/index.d.ts +0 -11
  623. package/dist/date-picker/_utils/index.js +0 -11
  624. package/dist/date-picker/_utils/is-after.js +0 -7
  625. package/dist/date-picker/_utils/is-before.js +0 -7
  626. package/dist/date-picker/_utils/is-between.js +0 -11
  627. package/dist/date-picker/_utils/is-same-day.js +0 -7
  628. package/dist/date-picker/_utils/is-timestamp.js +0 -6
  629. package/dist/date-picker/_utils/is-valid-date.js +0 -5
  630. package/dist/date-picker/_utils/parser.js +0 -17
  631. package/dist/date-picker/_utils/picker-type.js +0 -28
  632. package/dist/date-picker/_utils/to-callback-args.js +0 -46
  633. package/dist/date-picker/_utils/to-date-arg.js +0 -13
  634. package/dist/date-picker/constants.js +0 -78
  635. package/dist/date-picker/date-picker.scss +0 -1762
  636. package/dist/date-picker/foundation.d.ts +0 -317
  637. package/dist/date-picker/foundation.js +0 -709
  638. package/dist/date-picker/input-foundation.d.ts +0 -138
  639. package/dist/date-picker/input-foundation.js +0 -212
  640. package/dist/date-picker/month-foundation.d.ts +0 -154
  641. package/dist/date-picker/month-foundation.js +0 -186
  642. package/dist/date-picker/months-grid-foundation.d.ts +0 -171
  643. package/dist/date-picker/months-grid-foundation.js +0 -547
  644. package/dist/date-picker/year-and-month-foundation.d.ts +0 -75
  645. package/dist/date-picker/year-and-month-foundation.js +0 -115
  646. package/dist/descriptions/constants.js +0 -4
  647. package/dist/descriptions/foundation.d.ts +0 -12
  648. package/dist/descriptions/foundation.js +0 -36
  649. package/dist/divider/constants.js +0 -4
  650. package/dist/drag-move/foundation.d.ts +0 -30
  651. package/dist/drag-move/foundation.js +0 -180
  652. package/dist/dropdown/constants.js +0 -12
  653. package/dist/dropdown/foundation.d.ts +0 -38
  654. package/dist/dropdown/foundation.js +0 -124
  655. package/dist/dropdown/menu-foundation.d.ts +0 -35
  656. package/dist/dropdown/menu-foundation.js +0 -82
  657. package/dist/empty/constants.js +0 -5
  658. package/dist/feedback/constants.js +0 -19
  659. package/dist/feedback/feedback.scss +0 -153
  660. package/dist/feedback/foundation.d.ts +0 -42
  661. package/dist/feedback/foundation.js +0 -72
  662. package/dist/float-button/constants.js +0 -13
  663. package/dist/float-button/float-button.scss +0 -201
  664. package/dist/form/constants.d.ts +0 -7
  665. package/dist/form/constants.js +0 -8
  666. package/dist/form/field-store.js +0 -28
  667. package/dist/form/form-api-proxy.d.ts +0 -14
  668. package/dist/form/form-api-proxy.js +0 -48
  669. package/dist/form/form.css +0 -229
  670. package/dist/form/form.scss +0 -295
  671. package/dist/form/foundation.d.ts +0 -65
  672. package/dist/form/foundation.js +0 -820
  673. package/dist/form/interface.d.ts +0 -158
  674. package/dist/form/rtl.scss +0 -13
  675. package/dist/form/utils.d.ts +0 -81
  676. package/dist/form/utils.js +0 -108
  677. package/dist/form/variables.scss +0 -50
  678. package/dist/grid/constants.js +0 -12
  679. package/dist/grid/gutter.js +0 -39
  680. package/dist/grid/utils.js +0 -39
  681. package/dist/highlight/constants.js +0 -4
  682. package/dist/highlight/foundation.js +0 -108
  683. package/dist/hot-keys/constants.js +0 -207
  684. package/dist/hot-keys/foundation.d.ts +0 -18
  685. package/dist/hot-keys/foundation.js +0 -92
  686. package/dist/image/constants.js +0 -5
  687. package/dist/image/image-foundation.d.ts +0 -28
  688. package/dist/image/image-foundation.js +0 -40
  689. package/dist/image/image.scss +0 -272
  690. package/dist/image/preview-footer-foundation.d.ts +0 -25
  691. package/dist/image/preview-footer-foundation.js +0 -30
  692. package/dist/image/preview-foundation.d.ts +0 -48
  693. package/dist/image/preview-foundation.js +0 -71
  694. package/dist/image/preview-image-foundation.d.ts +0 -67
  695. package/dist/image/preview-image-foundation.js +0 -226
  696. package/dist/image/preview-inner-foundation.d.ts +0 -86
  697. package/dist/image/preview-inner-foundation.js +0 -238
  698. package/dist/image/utils.js +0 -66
  699. package/dist/input/constants.d.ts +0 -9
  700. package/dist/input/constants.js +0 -14
  701. package/dist/input/foundation.d.ts +0 -50
  702. package/dist/input/foundation.js +0 -77
  703. package/dist/input/input.css +0 -616
  704. package/dist/input/input.scss +0 -738
  705. package/dist/input/text-entry-foundation.d.ts +0 -53
  706. package/dist/input/text-entry-foundation.js +0 -92
  707. package/dist/input/textarea-foundation.d.ts +0 -60
  708. package/dist/input/textarea-foundation.js +0 -130
  709. package/dist/input/textarea.css +0 -257
  710. package/dist/input/textarea.scss +0 -313
  711. package/dist/input/util/line-number.js +0 -42
  712. package/dist/input/util/truncate-value.js +0 -14
  713. package/dist/input/variables.scss +0 -107
  714. package/dist/input-number/caret.js +0 -20
  715. package/dist/input-number/constants.d.ts +0 -15
  716. package/dist/input-number/constants.js +0 -13
  717. package/dist/input-number/foundation.d.ts +0 -107
  718. package/dist/input-number/foundation.js +0 -553
  719. package/dist/json-viewer/constants.js +0 -4
  720. package/dist/json-viewer/foundation.d.ts +0 -40
  721. package/dist/json-viewer/foundation.js +0 -123
  722. package/dist/json-viewer/json-viewer.scss +0 -224
  723. package/dist/layout/constants.js +0 -4
  724. package/dist/list/constants.js +0 -4
  725. package/dist/list/list.scss +0 -162
  726. package/dist/lottie/constants.js +0 -4
  727. package/dist/lottie/foundation.d.ts +0 -24
  728. package/dist/lottie/foundation.js +0 -62
  729. package/dist/markdown-render/constants.js +0 -4
  730. package/dist/markdown-render/foundation.d.ts +0 -45
  731. package/dist/markdown-render/foundation.js +0 -97
  732. package/dist/modal/confirm.js +0 -34
  733. package/dist/modal/constants.js +0 -4
  734. package/dist/modal/modal-content-foundation.d.ts +0 -40
  735. package/dist/modal/modal-content-foundation.js +0 -48
  736. package/dist/modal/modal-foundation.d.ts +0 -85
  737. package/dist/modal/modal-foundation.js +0 -74
  738. package/dist/navigation/constants.js +0 -20
  739. package/dist/navigation/foundation.d.ts +0 -68
  740. package/dist/navigation/foundation.js +0 -152
  741. package/dist/navigation/item-foundation.d.ts +0 -44
  742. package/dist/navigation/item-foundation.js +0 -42
  743. package/dist/navigation/navigation.scss +0 -764
  744. package/dist/navigation/sub-nav-foundation.d.ts +0 -30
  745. package/dist/navigation/sub-nav-foundation.js +0 -54
  746. package/dist/navigation/variables.scss +0 -120
  747. package/dist/notification/constants.js +0 -32
  748. package/dist/notification/notification-foundation.d.ts +0 -33
  749. package/dist/notification/notification-foundation.js +0 -5
  750. package/dist/notification/notification-list-foundation.d.ts +0 -55
  751. package/dist/notification/notification-list-foundation.js +0 -48
  752. package/dist/overflow-list/constants.d.ts +0 -17
  753. package/dist/overflow-list/constants.js +0 -16
  754. package/dist/overflow-list/foundation.d.ts +0 -76
  755. package/dist/overflow-list/foundation.js +0 -188
  756. package/dist/pagination/constants.js +0 -14
  757. package/dist/pagination/foundation.d.ts +0 -59
  758. package/dist/pagination/foundation.js +0 -175
  759. package/dist/pagination/pagination.scss +0 -189
  760. package/dist/pincode/constants.js +0 -4
  761. package/dist/pincode/foundation.d.ts +0 -36
  762. package/dist/pincode/foundation.js +0 -83
  763. package/dist/popconfirm/constants.d.ts +0 -7
  764. package/dist/popconfirm/constants.js +0 -8
  765. package/dist/popconfirm/popconfirm-foundation.d.ts +0 -36
  766. package/dist/popconfirm/popconfirm-foundation.js +0 -57
  767. package/dist/popover/constants.js +0 -47
  768. package/dist/progress/constants.js +0 -8
  769. package/dist/progress/generates.js +0 -24
  770. package/dist/progress/utils.js +0 -45
  771. package/dist/radio/constants.js +0 -19
  772. package/dist/radio/radio-foundation.d.ts +0 -74
  773. package/dist/radio/radio-foundation.js +0 -93
  774. package/dist/radio/radio-group-foundation.d.ts +0 -17
  775. package/dist/radio/radio-group-foundation.js +0 -27
  776. package/dist/radio/variables.scss +0 -107
  777. package/dist/rating/constants.js +0 -5
  778. package/dist/rating/foundation.d.ts +0 -104
  779. package/dist/rating/foundation.js +0 -164
  780. package/dist/rating/variables.scss +0 -19
  781. package/dist/resizable/constants.js +0 -4
  782. package/dist/resizable/foundation.d.ts +0 -3
  783. package/dist/resizable/group/index.d.ts +0 -51
  784. package/dist/resizable/group/index.js +0 -309
  785. package/dist/resizable/resizable.scss +0 -146
  786. package/dist/resizable/single/index.d.ts +0 -86
  787. package/dist/resizable/single/index.js +0 -426
  788. package/dist/resizable/types.js +0 -18
  789. package/dist/resizable/utils.js +0 -53
  790. package/dist/scroll-list/constants.js +0 -11
  791. package/dist/scroll-list/item-foundation.d.ts +0 -54
  792. package/dist/scroll-list/item-foundation.js +0 -335
  793. package/dist/scroll-list/scroll-list.scss +0 -198
  794. package/dist/scroll-list/scroll-to.js +0 -15
  795. package/dist/select/combobox-name.js +0 -21
  796. package/dist/select/constants.js +0 -22
  797. package/dist/select/foundation.d.ts +0 -125
  798. package/dist/select/foundation.js +0 -710
  799. package/dist/select/option-foundation.js +0 -35
  800. package/dist/select/select.scss +0 -554
  801. package/dist/side-sheet/constants.js +0 -5
  802. package/dist/side-sheet/side-sheet-foundation.d.ts +0 -64
  803. package/dist/side-sheet/side-sheet-foundation.js +0 -50
  804. package/dist/skeleton/constants.js +0 -4
  805. package/dist/slider/constants.js +0 -12
  806. package/dist/slider/foundation.d.ts +0 -156
  807. package/dist/slider/foundation.js +0 -429
  808. package/dist/slider/variables.scss +0 -63
  809. package/dist/sortable/accessibility.d.ts +0 -14
  810. package/dist/sortable/accessibility.js +0 -45
  811. package/dist/space/constants.js +0 -9
  812. package/dist/spin/constants.js +0 -3
  813. package/dist/spin/foundation.d.ts +0 -18
  814. package/dist/spin/foundation.js +0 -42
  815. package/dist/spin/spin.scss +0 -111
  816. package/dist/steps/constants.js +0 -8
  817. package/dist/steps/steps.scss +0 -17
  818. package/dist/steps/utils.js +0 -15
  819. package/dist/switch/constants.js +0 -16
  820. package/dist/switch/foundation.d.ts +0 -23
  821. package/dist/switch/foundation.js +0 -19
  822. package/dist/switch/variables.scss +0 -71
  823. package/dist/table/constants.d.ts +0 -62
  824. package/dist/table/constants.js +0 -97
  825. package/dist/table/foundation.d.ts +0 -345
  826. package/dist/table/foundation.js +0 -906
  827. package/dist/table/table.css +0 -636
  828. package/dist/table/table.scss +0 -788
  829. package/dist/table/utils.d.ts +0 -179
  830. package/dist/table/utils.js +0 -469
  831. package/dist/table/variables.scss +0 -81
  832. package/dist/tabs/constants.d.ts +0 -28
  833. package/dist/tabs/constants.js +0 -37
  834. package/dist/tabs/foundation.d.ts +0 -82
  835. package/dist/tabs/foundation.js +0 -185
  836. package/dist/tabs/tabs.scss +0 -933
  837. package/dist/tabs/variables.scss +0 -155
  838. package/dist/tag/constants.js +0 -35
  839. package/dist/tag/focus.js +0 -22
  840. package/dist/tag/mixin.scss +0 -18
  841. package/dist/tag/tag-key.js +0 -18
  842. package/dist/tag/tag.css +0 -537
  843. package/dist/tag/variables.scss +0 -85
  844. package/dist/tag-input/constants.js +0 -9
  845. package/dist/tag-input/foundation.d.ts +0 -89
  846. package/dist/tag-input/foundation.js +0 -221
  847. package/dist/tag-input/tag-input.scss +0 -357
  848. package/dist/tag-input/utils/get-splited-array.js +0 -16
  849. package/dist/tag-input/utils/tag-focus.js +0 -14
  850. package/dist/time-picker/combox-foundation.d.ts +0 -71
  851. package/dist/time-picker/combox-foundation.js +0 -96
  852. package/dist/time-picker/constants.js +0 -23
  853. package/dist/time-picker/foundation.d.ts +0 -98
  854. package/dist/time-picker/foundation.js +0 -245
  855. package/dist/time-picker/input-foundation.d.ts +0 -15
  856. package/dist/time-picker/input-foundation.js +0 -33
  857. package/dist/time-picker/utils/index.js +0 -57
  858. package/dist/timeline/constants.js +0 -7
  859. package/dist/timeline/timeline.scss +0 -190
  860. package/dist/timeline/utils.js +0 -10
  861. package/dist/toast/constants.js +0 -34
  862. package/dist/toast/toast-foundation.d.ts +0 -37
  863. package/dist/toast/toast-foundation.js +0 -5
  864. package/dist/toast/toast-list-foundation.d.ts +0 -25
  865. package/dist/toast/toast-list-foundation.js +0 -54
  866. package/dist/tooltip/adjust-position.js +0 -202
  867. package/dist/tooltip/constants.d.ts +0 -47
  868. package/dist/tooltip/constants.js +0 -93
  869. package/dist/tooltip/foundation.d.ts +0 -102
  870. package/dist/tooltip/foundation.js +0 -654
  871. package/dist/tooltip/tooltip.scss +0 -72
  872. package/dist/transfer/constants.js +0 -10
  873. package/dist/transfer/foundation.d.ts +0 -121
  874. package/dist/transfer/foundation.js +0 -193
  875. package/dist/transfer/transfer-utils.js +0 -45
  876. package/dist/transfer/transfer.scss +0 -260
  877. package/dist/tree/constants.js +0 -8
  878. package/dist/tree/foundation.d.ts +0 -294
  879. package/dist/tree/foundation.js +0 -538
  880. package/dist/tree/shared.d.ts +0 -126
  881. package/dist/tree/shared.js +0 -306
  882. package/dist/tree/tree-util.d.ts +0 -100
  883. package/dist/tree/tree-util.js +0 -450
  884. package/dist/tree/tree.scss +0 -439
  885. package/dist/tree-select/constants.js +0 -19
  886. package/dist/tree-select/foundation.d.ts +0 -180
  887. package/dist/tree-select/foundation.js +0 -615
  888. package/dist/tree-select/tree-select.scss +0 -467
  889. package/dist/typography/constants.js +0 -50
  890. package/dist/typography/ellipsis.js +0 -154
  891. package/dist/typography/format-numeral.js +0 -99
  892. package/dist/typography/typography.scss +0 -383
  893. package/dist/upload/constants.d.ts +0 -24
  894. package/dist/upload/constants.js +0 -39
  895. package/dist/upload/foundation.d.ts +0 -181
  896. package/dist/upload/foundation.js +0 -752
  897. package/dist/upload/upload.scss +0 -640
  898. package/dist/upload/utils.d.ts +0 -20
  899. package/dist/upload/utils.js +0 -93
  900. package/dist/user-guide/constants.js +0 -12
  901. package/dist/user-guide/foundation.d.ts +0 -45
  902. package/dist/user-guide/foundation.js +0 -73
  903. package/dist/utils/focus-handle.d.ts +0 -43
  904. package/dist/utils/focus-handle.js +0 -91
  905. package/dist/utils/focus-scope.js +0 -77
  906. package/dist/utils/release-holder.js +0 -18
  907. package/dist/video-player/constants.js +0 -48
  908. package/dist/video-player/foundation.d.ts +0 -94
  909. package/dist/video-player/foundation.js +0 -287
  910. package/dist/video-player/progress-foundation.d.ts +0 -79
  911. package/dist/video-player/progress-foundation.js +0 -116
  912. package/dist/video-player/utils.js +0 -50
  913. package/dist/video-player/video-player.scss +0 -344
  914. /package/dist/{utils → base}/focus-scope.d.ts +0 -0
  915. /package/dist/{utils → base}/release-holder.d.ts +0 -0
  916. /package/dist/{anchor → components/anchor}/anchor.css +0 -0
  917. /package/dist/{anchor → components/anchor}/anchor.scss +0 -0
  918. /package/dist/{anchor → components/anchor}/animation.scss +0 -0
  919. /package/dist/{anchor → components/anchor}/rtl.scss +0 -0
  920. /package/dist/{anchor → components/anchor}/utils.d.ts +0 -0
  921. /package/dist/{audio-player → components/audio-player}/constants.d.ts +0 -0
  922. /package/dist/{audio-player → components/audio-player}/utils.d.ts +0 -0
  923. /package/dist/{auto-complete → components/auto-complete}/animation.scss +0 -0
  924. /package/dist/{auto-complete → components/auto-complete}/auto-complete.css +0 -0
  925. /package/dist/{auto-complete → components/auto-complete}/auto-complete.scss +0 -0
  926. /package/dist/{auto-complete → components/auto-complete}/constants.d.ts +0 -0
  927. /package/dist/{auto-complete → components/auto-complete}/option.scss +0 -0
  928. /package/dist/{auto-complete → components/auto-complete}/rtl.scss +0 -0
  929. /package/dist/{auto-complete → components/auto-complete}/variables.scss +0 -0
  930. /package/dist/{avatar → components/avatar}/animation.scss +0 -0
  931. /package/dist/{avatar → components/avatar}/avatar.css +0 -0
  932. /package/dist/{avatar → components/avatar}/avatar.scss +0 -0
  933. /package/dist/{avatar → components/avatar}/constants.d.ts +0 -0
  934. /package/dist/{avatar → components/avatar}/mixin.scss +0 -0
  935. /package/dist/{avatar → components/avatar}/rtl.scss +0 -0
  936. /package/dist/{backtop → components/backtop}/backtop.css +0 -0
  937. /package/dist/{backtop → components/backtop}/backtop.scss +0 -0
  938. /package/dist/{backtop → components/backtop}/constants.d.ts +0 -0
  939. /package/dist/{backtop → components/backtop}/rtl.scss +0 -0
  940. /package/dist/{backtop → components/backtop}/variables.scss +0 -0
  941. /package/dist/{badge → components/badge}/badge.css +0 -0
  942. /package/dist/{badge → components/badge}/badge.scss +0 -0
  943. /package/dist/{badge → components/badge}/constants.d.ts +0 -0
  944. /package/dist/{badge → components/badge}/rtl.scss +0 -0
  945. /package/dist/{badge → components/badge}/variables.scss +0 -0
  946. /package/dist/{banner → components/banner}/banner.css +0 -0
  947. /package/dist/{banner → components/banner}/banner.scss +0 -0
  948. /package/dist/{banner → components/banner}/constants.d.ts +0 -0
  949. /package/dist/{banner → components/banner}/rtl.scss +0 -0
  950. /package/dist/{banner → components/banner}/variables.scss +0 -0
  951. /package/dist/{breadcrumb → components/breadcrumb}/animation.scss +0 -0
  952. /package/dist/{breadcrumb → components/breadcrumb}/breadcrumb.css +0 -0
  953. /package/dist/{breadcrumb → components/breadcrumb}/constants.d.ts +0 -0
  954. /package/dist/{breadcrumb → components/breadcrumb}/rtl.scss +0 -0
  955. /package/dist/{breadcrumb → components/breadcrumb}/variables.scss +0 -0
  956. /package/dist/{button → components/button}/animation.scss +0 -0
  957. /package/dist/{button → components/button}/button.css +0 -0
  958. /package/dist/{button → components/button}/button.scss +0 -0
  959. /package/dist/{button → components/button}/constants.d.ts +0 -0
  960. /package/dist/{button → components/button}/icon-button.css +0 -0
  961. /package/dist/{button → components/button}/icon-button.scss +0 -0
  962. /package/dist/{button → components/button}/rtl.scss +0 -0
  963. /package/dist/{button → components/button}/split-button-group.scss +0 -0
  964. /package/dist/{calendar → components/calendar}/constants.d.ts +0 -0
  965. /package/dist/{calendar → components/calendar}/event-util.d.ts +0 -0
  966. /package/dist/{calendar → components/calendar}/rtl.scss +0 -0
  967. /package/dist/{calendar → components/calendar}/variables.scss +0 -0
  968. /package/dist/{card → components/card}/card.css +0 -0
  969. /package/dist/{card → components/card}/card.scss +0 -0
  970. /package/dist/{card → components/card}/constants.d.ts +0 -0
  971. /package/dist/{card → components/card}/rtl.scss +0 -0
  972. /package/dist/{card → components/card}/variables.scss +0 -0
  973. /package/dist/{carousel → components/carousel}/animation.scss +0 -0
  974. /package/dist/{carousel → components/carousel}/constants.d.ts +0 -0
  975. /package/dist/{carousel → components/carousel}/rtl.scss +0 -0
  976. /package/dist/{cascader → components/cascader}/animation.scss +0 -0
  977. /package/dist/{cascader → components/cascader}/cascader.css +0 -0
  978. /package/dist/{cascader → components/cascader}/constants.d.ts +0 -0
  979. /package/dist/{cascader → components/cascader}/rtl.scss +0 -0
  980. /package/dist/{cascader → components/cascader}/util.d.ts +0 -0
  981. /package/dist/{cascader → components/cascader}/variables.scss +0 -0
  982. /package/dist/{checkbox → components/checkbox}/animation.scss +0 -0
  983. /package/dist/{checkbox → components/checkbox}/checkbox.css +0 -0
  984. /package/dist/{checkbox → components/checkbox}/checkbox.scss +0 -0
  985. /package/dist/{checkbox → components/checkbox}/constants.d.ts +0 -0
  986. /package/dist/{checkbox → components/checkbox}/mixin.scss +0 -0
  987. /package/dist/{checkbox → components/checkbox}/rtl.scss +0 -0
  988. /package/dist/{code-highlight → components/code-highlight}/code-highlight.css +0 -0
  989. /package/dist/{code-highlight → components/code-highlight}/code-highlight.scss +0 -0
  990. /package/dist/{code-highlight → components/code-highlight}/constants.d.ts +0 -0
  991. /package/dist/{code-highlight → components/code-highlight}/highlighter.d.ts +0 -0
  992. /package/dist/{code-highlight → components/code-highlight}/registry.d.ts +0 -0
  993. /package/dist/{code-highlight → components/code-highlight}/variables.scss +0 -0
  994. /package/dist/{collapse → components/collapse}/collapse.css +0 -0
  995. /package/dist/{collapse → components/collapse}/constants.d.ts +0 -0
  996. /package/dist/{collapse → components/collapse}/rtl.scss +0 -0
  997. /package/dist/{collapse → components/collapse}/variables.scss +0 -0
  998. /package/dist/{collapsible → components/collapsible}/animation.scss +0 -0
  999. /package/dist/{collapsible → components/collapsible}/collapsible.css +0 -0
  1000. /package/dist/{collapsible → components/collapsible}/collapsible.scss +0 -0
  1001. /package/dist/{collapsible → components/collapsible}/constants.d.ts +0 -0
  1002. /package/dist/{collapsible → components/collapsible}/variables.scss +0 -0
  1003. /package/dist/{color-picker → components/color-picker}/color-picker.css +0 -0
  1004. /package/dist/{color-picker → components/color-picker}/constants.d.ts +0 -0
  1005. /package/dist/{color-picker → components/color-picker}/interface.d.ts +0 -0
  1006. /package/dist/{color-picker → components/color-picker}/interface.js +0 -0
  1007. /package/dist/{color-picker → components/color-picker}/utils/round.d.ts +0 -0
  1008. /package/dist/{color-picker → components/color-picker}/utils/split.d.ts +0 -0
  1009. /package/dist/{color-picker → components/color-picker}/variables.scss +0 -0
  1010. /package/dist/{config-provider → components/config-provider}/breakpoint-observer.d.ts +0 -0
  1011. /package/dist/{config-provider → components/config-provider}/responsive-types.d.ts +0 -0
  1012. /package/dist/{config-provider → components/config-provider}/responsive-types.js +0 -0
  1013. /package/dist/{cropper → components/cropper}/constants.d.ts +0 -0
  1014. /package/dist/{cropper → components/cropper}/cropper.css +0 -0
  1015. /package/dist/{cropper → components/cropper}/utils.d.ts +0 -0
  1016. /package/dist/{cropper → components/cropper}/variables.scss +0 -0
  1017. /package/dist/{date-picker → components/date-picker}/_utils/formatter.d.ts +0 -0
  1018. /package/dist/{date-picker → components/date-picker}/_utils/get-day-of-week.d.ts +0 -0
  1019. /package/dist/{date-picker → components/date-picker}/_utils/get-default-format-token.d.ts +0 -0
  1020. /package/dist/{date-picker → components/date-picker}/_utils/get-default-picker-date.d.ts +0 -0
  1021. /package/dist/{date-picker → components/date-picker}/_utils/get-full-date-offset.d.ts +0 -0
  1022. /package/dist/{date-picker → components/date-picker}/_utils/get-inset-input-format-token.d.ts +0 -0
  1023. /package/dist/{date-picker → components/date-picker}/_utils/get-inset-input-value-from-inset-input-str.d.ts +0 -0
  1024. /package/dist/{date-picker → components/date-picker}/_utils/get-month-table.d.ts +0 -0
  1025. /package/dist/{date-picker → components/date-picker}/_utils/get-year-and-month.d.ts +0 -0
  1026. /package/dist/{date-picker → components/date-picker}/_utils/get-year-month-from-value.d.ts +0 -0
  1027. /package/dist/{date-picker → components/date-picker}/_utils/get-years.d.ts +0 -0
  1028. /package/dist/{date-picker → components/date-picker}/_utils/is-after.d.ts +0 -0
  1029. /package/dist/{date-picker → components/date-picker}/_utils/is-before.d.ts +0 -0
  1030. /package/dist/{date-picker → components/date-picker}/_utils/is-between.d.ts +0 -0
  1031. /package/dist/{date-picker → components/date-picker}/_utils/is-same-day.d.ts +0 -0
  1032. /package/dist/{date-picker → components/date-picker}/_utils/is-timestamp.d.ts +0 -0
  1033. /package/dist/{date-picker → components/date-picker}/_utils/is-valid-date.d.ts +0 -0
  1034. /package/dist/{date-picker → components/date-picker}/_utils/parser.d.ts +0 -0
  1035. /package/dist/{date-picker → components/date-picker}/_utils/picker-type.d.ts +0 -0
  1036. /package/dist/{date-picker → components/date-picker}/_utils/to-callback-args.d.ts +0 -0
  1037. /package/dist/{date-picker → components/date-picker}/_utils/to-date-arg.d.ts +0 -0
  1038. /package/dist/{date-picker → components/date-picker}/animation.scss +0 -0
  1039. /package/dist/{date-picker → components/date-picker}/constants.d.ts +0 -0
  1040. /package/dist/{date-picker → components/date-picker}/date-picker.css +0 -0
  1041. /package/dist/{date-picker → components/date-picker}/rtl.scss +0 -0
  1042. /package/dist/{date-picker → components/date-picker}/variables.scss +0 -0
  1043. /package/dist/{descriptions → components/descriptions}/constants.d.ts +0 -0
  1044. /package/dist/{descriptions → components/descriptions}/descriptions.css +0 -0
  1045. /package/dist/{descriptions → components/descriptions}/descriptions.scss +0 -0
  1046. /package/dist/{descriptions → components/descriptions}/rtl.scss +0 -0
  1047. /package/dist/{descriptions → components/descriptions}/variables.scss +0 -0
  1048. /package/dist/{divider → components/divider}/constants.d.ts +0 -0
  1049. /package/dist/{divider → components/divider}/divider.css +0 -0
  1050. /package/dist/{divider → components/divider}/divider.scss +0 -0
  1051. /package/dist/{divider → components/divider}/variables.scss +0 -0
  1052. /package/dist/{dropdown → components/dropdown}/animation.scss +0 -0
  1053. /package/dist/{dropdown → components/dropdown}/constants.d.ts +0 -0
  1054. /package/dist/{dropdown → components/dropdown}/dropdown.css +0 -0
  1055. /package/dist/{dropdown → components/dropdown}/dropdown.scss +0 -0
  1056. /package/dist/{dropdown → components/dropdown}/rtl.scss +0 -0
  1057. /package/dist/{dropdown → components/dropdown}/variables.scss +0 -0
  1058. /package/dist/{empty → components/empty}/constants.d.ts +0 -0
  1059. /package/dist/{empty → components/empty}/empty.css +0 -0
  1060. /package/dist/{empty → components/empty}/empty.scss +0 -0
  1061. /package/dist/{empty → components/empty}/rtl.scss +0 -0
  1062. /package/dist/{empty → components/empty}/variables.scss +0 -0
  1063. /package/dist/{feedback → components/feedback}/constants.d.ts +0 -0
  1064. /package/dist/{feedback → components/feedback}/feedback.css +0 -0
  1065. /package/dist/{feedback → components/feedback}/variables.scss +0 -0
  1066. /package/dist/{float-button → components/float-button}/constants.d.ts +0 -0
  1067. /package/dist/{float-button → components/float-button}/float-button.css +0 -0
  1068. /package/dist/{float-button → components/float-button}/rtl.scss +0 -0
  1069. /package/dist/{float-button → components/float-button}/variables.scss +0 -0
  1070. /package/dist/{form → components/form}/field-store.d.ts +0 -0
  1071. /package/dist/{form → components/form}/interface.js +0 -0
  1072. /package/dist/{grid → components/grid}/constants.d.ts +0 -0
  1073. /package/dist/{grid → components/grid}/grid.css +0 -0
  1074. /package/dist/{grid → components/grid}/grid.scss +0 -0
  1075. /package/dist/{grid → components/grid}/gutter.d.ts +0 -0
  1076. /package/dist/{grid → components/grid}/mixin.scss +0 -0
  1077. /package/dist/{grid → components/grid}/rtl.scss +0 -0
  1078. /package/dist/{grid → components/grid}/utils.d.ts +0 -0
  1079. /package/dist/{grid → components/grid}/variables.scss +0 -0
  1080. /package/dist/{highlight → components/highlight}/constants.d.ts +0 -0
  1081. /package/dist/{highlight → components/highlight}/foundation.d.ts +0 -0
  1082. /package/dist/{highlight → components/highlight}/highlight.css +0 -0
  1083. /package/dist/{highlight → components/highlight}/highlight.scss +0 -0
  1084. /package/dist/{highlight → components/highlight}/variables.scss +0 -0
  1085. /package/dist/{hot-keys → components/hot-keys}/constants.d.ts +0 -0
  1086. /package/dist/{hot-keys → components/hot-keys}/hot-keys.css +0 -0
  1087. /package/dist/{hot-keys → components/hot-keys}/hot-keys.scss +0 -0
  1088. /package/dist/{hot-keys → components/hot-keys}/variables.scss +0 -0
  1089. /package/dist/{image → components/image}/animation.scss +0 -0
  1090. /package/dist/{image → components/image}/constants.d.ts +0 -0
  1091. /package/dist/{image → components/image}/image.css +0 -0
  1092. /package/dist/{image → components/image}/rtl.scss +0 -0
  1093. /package/dist/{image → components/image}/utils.d.ts +0 -0
  1094. /package/dist/{image → components/image}/variables.scss +0 -0
  1095. /package/dist/{input → components/input}/animation.scss +0 -0
  1096. /package/dist/{input → components/input}/rtl.scss +0 -0
  1097. /package/dist/{input → components/input}/util/line-number.d.ts +0 -0
  1098. /package/dist/{input → components/input}/util/truncate-value.d.ts +0 -0
  1099. /package/dist/{input-number → components/input-number}/animation.scss +0 -0
  1100. /package/dist/{input-number → components/input-number}/caret.d.ts +0 -0
  1101. /package/dist/{input-number → components/input-number}/input-number.css +0 -0
  1102. /package/dist/{input-number → components/input-number}/input-number.scss +0 -0
  1103. /package/dist/{input-number → components/input-number}/rtl.scss +0 -0
  1104. /package/dist/{input-number → components/input-number}/variables.scss +0 -0
  1105. /package/dist/{json-viewer → components/json-viewer}/constants.d.ts +0 -0
  1106. /package/dist/{json-viewer → components/json-viewer}/json-viewer.css +0 -0
  1107. /package/dist/{json-viewer → components/json-viewer}/variables.scss +0 -0
  1108. /package/dist/{layout → components/layout}/constants.d.ts +0 -0
  1109. /package/dist/{layout → components/layout}/layout.css +0 -0
  1110. /package/dist/{layout → components/layout}/layout.scss +0 -0
  1111. /package/dist/{layout → components/layout}/rtl.scss +0 -0
  1112. /package/dist/{list → components/list}/constants.d.ts +0 -0
  1113. /package/dist/{list → components/list}/list.css +0 -0
  1114. /package/dist/{list → components/list}/rtl.scss +0 -0
  1115. /package/dist/{list → components/list}/variables.scss +0 -0
  1116. /package/dist/{lottie → components/lottie}/constants.d.ts +0 -0
  1117. /package/dist/{markdown-render → components/markdown-render}/constants.d.ts +0 -0
  1118. /package/dist/{markdown-render → components/markdown-render}/markdown-render.css +0 -0
  1119. /package/dist/{markdown-render → components/markdown-render}/markdown-render.scss +0 -0
  1120. /package/dist/{markdown-render → components/markdown-render}/variables.scss +0 -0
  1121. /package/dist/{modal → components/modal}/animation.scss +0 -0
  1122. /package/dist/{modal → components/modal}/confirm.d.ts +0 -0
  1123. /package/dist/{modal → components/modal}/constants.d.ts +0 -0
  1124. /package/dist/{modal → components/modal}/modal.css +0 -0
  1125. /package/dist/{modal → components/modal}/modal.scss +0 -0
  1126. /package/dist/{modal → components/modal}/rtl.scss +0 -0
  1127. /package/dist/{modal → components/modal}/variables.scss +0 -0
  1128. /package/dist/{navigation → components/navigation}/animation.scss +0 -0
  1129. /package/dist/{navigation → components/navigation}/constants.d.ts +0 -0
  1130. /package/dist/{navigation → components/navigation}/mixin.scss +0 -0
  1131. /package/dist/{navigation → components/navigation}/navigation.css +0 -0
  1132. /package/dist/{navigation → components/navigation}/rtl.scss +0 -0
  1133. /package/dist/{notification → components/notification}/animation.scss +0 -0
  1134. /package/dist/{notification → components/notification}/constants.d.ts +0 -0
  1135. /package/dist/{notification → components/notification}/notification.css +0 -0
  1136. /package/dist/{notification → components/notification}/notification.scss +0 -0
  1137. /package/dist/{notification → components/notification}/rtl.scss +0 -0
  1138. /package/dist/{notification → components/notification}/variables.scss +0 -0
  1139. /package/dist/{overflow-list → components/overflow-list}/overflow-list.css +0 -0
  1140. /package/dist/{overflow-list → components/overflow-list}/overflow-list.scss +0 -0
  1141. /package/dist/{overflow-list → components/overflow-list}/rtl.scss +0 -0
  1142. /package/dist/{pagination → components/pagination}/animation.scss +0 -0
  1143. /package/dist/{pagination → components/pagination}/constants.d.ts +0 -0
  1144. /package/dist/{pagination → components/pagination}/pagination.css +0 -0
  1145. /package/dist/{pagination → components/pagination}/rtl.scss +0 -0
  1146. /package/dist/{pagination → components/pagination}/variables.scss +0 -0
  1147. /package/dist/{pincode → components/pincode}/constants.d.ts +0 -0
  1148. /package/dist/{pincode → components/pincode}/pincode.css +0 -0
  1149. /package/dist/{pincode → components/pincode}/pincode.scss +0 -0
  1150. /package/dist/{pincode → components/pincode}/variables.scss +0 -0
  1151. /package/dist/{popconfirm → components/popconfirm}/popconfirm.css +0 -0
  1152. /package/dist/{popconfirm → components/popconfirm}/popconfirm.scss +0 -0
  1153. /package/dist/{popconfirm → components/popconfirm}/rtl.scss +0 -0
  1154. /package/dist/{popconfirm → components/popconfirm}/variables.scss +0 -0
  1155. /package/dist/{popover → components/popover}/animation.scss +0 -0
  1156. /package/dist/{popover → components/popover}/constants.d.ts +0 -0
  1157. /package/dist/{popover → components/popover}/popover.css +0 -0
  1158. /package/dist/{popover → components/popover}/popover.scss +0 -0
  1159. /package/dist/{popover → components/popover}/rtl.scss +0 -0
  1160. /package/dist/{popover → components/popover}/variables.scss +0 -0
  1161. /package/dist/{_portal → components/portal}/portal.css +0 -0
  1162. /package/dist/{_portal → components/portal}/portal.scss +0 -0
  1163. /package/dist/{progress → components/progress}/constants.d.ts +0 -0
  1164. /package/dist/{progress → components/progress}/generates.d.ts +0 -0
  1165. /package/dist/{progress → components/progress}/progress.css +0 -0
  1166. /package/dist/{progress → components/progress}/progress.scss +0 -0
  1167. /package/dist/{progress → components/progress}/rtl.scss +0 -0
  1168. /package/dist/{progress → components/progress}/utils.d.ts +0 -0
  1169. /package/dist/{progress → components/progress}/variables.scss +0 -0
  1170. /package/dist/{radio → components/radio}/animation.scss +0 -0
  1171. /package/dist/{radio → components/radio}/constants.d.ts +0 -0
  1172. /package/dist/{radio → components/radio}/mixin.scss +0 -0
  1173. /package/dist/{radio → components/radio}/radio.css +0 -0
  1174. /package/dist/{radio → components/radio}/radio.scss +0 -0
  1175. /package/dist/{radio → components/radio}/rtl.scss +0 -0
  1176. /package/dist/{rating → components/rating}/animation.scss +0 -0
  1177. /package/dist/{rating → components/rating}/constants.d.ts +0 -0
  1178. /package/dist/{rating → components/rating}/rating.css +0 -0
  1179. /package/dist/{rating → components/rating}/rating.scss +0 -0
  1180. /package/dist/{rating → components/rating}/rtl.scss +0 -0
  1181. /package/dist/{resizable → components/resizable}/constants.d.ts +0 -0
  1182. /package/dist/{resizable → components/resizable}/foundation.js +0 -0
  1183. /package/dist/{resizable → components/resizable}/resizable.css +0 -0
  1184. /package/dist/{resizable → components/resizable}/types.d.ts +0 -0
  1185. /package/dist/{resizable → components/resizable}/utils.d.ts +0 -0
  1186. /package/dist/{resizable → components/resizable}/variables.scss +0 -0
  1187. /package/dist/{scroll-list → components/scroll-list}/animation.scss +0 -0
  1188. /package/dist/{scroll-list → components/scroll-list}/constants.d.ts +0 -0
  1189. /package/dist/{scroll-list → components/scroll-list}/rtl.scss +0 -0
  1190. /package/dist/{scroll-list → components/scroll-list}/scroll-list.css +0 -0
  1191. /package/dist/{scroll-list → components/scroll-list}/scroll-to.d.ts +0 -0
  1192. /package/dist/{scroll-list → components/scroll-list}/variables.scss +0 -0
  1193. /package/dist/{select → components/select}/animation.scss +0 -0
  1194. /package/dist/{select → components/select}/combobox-name.d.ts +0 -0
  1195. /package/dist/{select → components/select}/constants.d.ts +0 -0
  1196. /package/dist/{select → components/select}/mixin.scss +0 -0
  1197. /package/dist/{select → components/select}/option-foundation.d.ts +0 -0
  1198. /package/dist/{select → components/select}/option.scss +0 -0
  1199. /package/dist/{select → components/select}/rtl.scss +0 -0
  1200. /package/dist/{select → components/select}/select.css +0 -0
  1201. /package/dist/{select → components/select}/variables.scss +0 -0
  1202. /package/dist/{side-sheet → components/side-sheet}/animation.scss +0 -0
  1203. /package/dist/{side-sheet → components/side-sheet}/constants.d.ts +0 -0
  1204. /package/dist/{side-sheet → components/side-sheet}/rtl.scss +0 -0
  1205. /package/dist/{side-sheet → components/side-sheet}/side-sheet.css +0 -0
  1206. /package/dist/{side-sheet → components/side-sheet}/side-sheet.scss +0 -0
  1207. /package/dist/{side-sheet → components/side-sheet}/variables.scss +0 -0
  1208. /package/dist/{skeleton → components/skeleton}/animation.scss +0 -0
  1209. /package/dist/{skeleton → components/skeleton}/constants.d.ts +0 -0
  1210. /package/dist/{skeleton → components/skeleton}/rtl.scss +0 -0
  1211. /package/dist/{skeleton → components/skeleton}/skeleton.css +0 -0
  1212. /package/dist/{skeleton → components/skeleton}/skeleton.scss +0 -0
  1213. /package/dist/{skeleton → components/skeleton}/variables.scss +0 -0
  1214. /package/dist/{slider → components/slider}/animation.scss +0 -0
  1215. /package/dist/{slider → components/slider}/constants.d.ts +0 -0
  1216. /package/dist/{slider → components/slider}/rtl.scss +0 -0
  1217. /package/dist/{slider → components/slider}/slider.css +0 -0
  1218. /package/dist/{slider → components/slider}/slider.scss +0 -0
  1219. /package/dist/{space → components/space}/constants.d.ts +0 -0
  1220. /package/dist/{space → components/space}/rtl.scss +0 -0
  1221. /package/dist/{space → components/space}/space.css +0 -0
  1222. /package/dist/{space → components/space}/space.scss +0 -0
  1223. /package/dist/{space → components/space}/variables.scss +0 -0
  1224. /package/dist/{spin → components/spin}/animation.scss +0 -0
  1225. /package/dist/{spin → components/spin}/constants.d.ts +0 -0
  1226. /package/dist/{spin → components/spin}/mixin.scss +0 -0
  1227. /package/dist/{spin → components/spin}/rtl.scss +0 -0
  1228. /package/dist/{spin → components/spin}/spin.css +0 -0
  1229. /package/dist/{spin → components/spin}/variables.scss +0 -0
  1230. /package/dist/{steps → components/steps}/animation.scss +0 -0
  1231. /package/dist/{steps → components/steps}/bacis-steps.scss +0 -0
  1232. /package/dist/{steps → components/steps}/constants.d.ts +0 -0
  1233. /package/dist/{steps → components/steps}/fill-steps.scss +0 -0
  1234. /package/dist/{steps → components/steps}/mixin.scss +0 -0
  1235. /package/dist/{steps → components/steps}/nav-steps.scss +0 -0
  1236. /package/dist/{steps → components/steps}/rtl.scss +0 -0
  1237. /package/dist/{steps → components/steps}/steps.css +0 -0
  1238. /package/dist/{steps → components/steps}/utils.d.ts +0 -0
  1239. /package/dist/{steps → components/steps}/variables.scss +0 -0
  1240. /package/dist/{switch → components/switch}/animation.scss +0 -0
  1241. /package/dist/{switch → components/switch}/constants.d.ts +0 -0
  1242. /package/dist/{switch → components/switch}/rtl.scss +0 -0
  1243. /package/dist/{switch → components/switch}/switch.css +0 -0
  1244. /package/dist/{switch → components/switch}/switch.scss +0 -0
  1245. /package/dist/{table → components/table}/animation.scss +0 -0
  1246. /package/dist/{table → components/table}/mixin.scss +0 -0
  1247. /package/dist/{table → components/table}/operation-panel.scss +0 -0
  1248. /package/dist/{table → components/table}/rtl.scss +0 -0
  1249. /package/dist/{tabs → components/tabs}/animation.scss +0 -0
  1250. /package/dist/{tabs → components/tabs}/rtl.scss +0 -0
  1251. /package/dist/{tabs → components/tabs}/tabs.css +0 -0
  1252. /package/dist/{tag → components/tag}/constants.d.ts +0 -0
  1253. /package/dist/{tag → components/tag}/focus.d.ts +0 -0
  1254. /package/dist/{tag → components/tag}/rtl.scss +0 -0
  1255. /package/dist/{tag → components/tag}/tag-key.d.ts +0 -0
  1256. /package/dist/{tag → components/tag}/tag.scss +0 -0
  1257. /package/dist/{tag-input → components/tag-input}/animation.scss +0 -0
  1258. /package/dist/{tag-input → components/tag-input}/constants.d.ts +0 -0
  1259. /package/dist/{tag-input → components/tag-input}/rtl.scss +0 -0
  1260. /package/dist/{tag-input → components/tag-input}/tag-input.css +0 -0
  1261. /package/dist/{tag-input → components/tag-input}/utils/get-splited-array.d.ts +0 -0
  1262. /package/dist/{tag-input → components/tag-input}/utils/tag-focus.d.ts +0 -0
  1263. /package/dist/{tag-input → components/tag-input}/variables.scss +0 -0
  1264. /package/dist/{time-picker → components/time-picker}/constants.d.ts +0 -0
  1265. /package/dist/{time-picker → components/time-picker}/rtl.scss +0 -0
  1266. /package/dist/{time-picker → components/time-picker}/time-picker.css +0 -0
  1267. /package/dist/{time-picker → components/time-picker}/time-picker.scss +0 -0
  1268. /package/dist/{time-picker → components/time-picker}/utils/index.d.ts +0 -0
  1269. /package/dist/{time-picker → components/time-picker}/variables.scss +0 -0
  1270. /package/dist/{timeline → components/timeline}/constants.d.ts +0 -0
  1271. /package/dist/{timeline → components/timeline}/rtl.scss +0 -0
  1272. /package/dist/{timeline → components/timeline}/timeline.css +0 -0
  1273. /package/dist/{timeline → components/timeline}/utils.d.ts +0 -0
  1274. /package/dist/{timeline → components/timeline}/variables.scss +0 -0
  1275. /package/dist/{toast → components/toast}/animation.scss +0 -0
  1276. /package/dist/{toast → components/toast}/constants.d.ts +0 -0
  1277. /package/dist/{toast → components/toast}/rtl.scss +0 -0
  1278. /package/dist/{toast → components/toast}/toast.css +0 -0
  1279. /package/dist/{toast → components/toast}/toast.scss +0 -0
  1280. /package/dist/{toast → components/toast}/variables.scss +0 -0
  1281. /package/dist/{tooltip → components/tooltip}/adjust-position.d.ts +0 -0
  1282. /package/dist/{tooltip → components/tooltip}/animation.scss +0 -0
  1283. /package/dist/{tooltip → components/tooltip}/arrow.scss +0 -0
  1284. /package/dist/{tooltip → components/tooltip}/position.scss +0 -0
  1285. /package/dist/{tooltip → components/tooltip}/rtl.scss +0 -0
  1286. /package/dist/{tooltip → components/tooltip}/tooltip.css +0 -0
  1287. /package/dist/{tooltip → components/tooltip}/variables.scss +0 -0
  1288. /package/dist/{transfer → components/transfer}/animation.scss +0 -0
  1289. /package/dist/{transfer → components/transfer}/constants.d.ts +0 -0
  1290. /package/dist/{transfer → components/transfer}/rtl.scss +0 -0
  1291. /package/dist/{transfer → components/transfer}/transfer-utils.d.ts +0 -0
  1292. /package/dist/{transfer → components/transfer}/transfer.css +0 -0
  1293. /package/dist/{transfer → components/transfer}/variables.scss +0 -0
  1294. /package/dist/{tree → components/tree}/animation.scss +0 -0
  1295. /package/dist/{tree → components/tree}/constants.d.ts +0 -0
  1296. /package/dist/{tree → components/tree}/rtl.scss +0 -0
  1297. /package/dist/{tree → components/tree}/tree.css +0 -0
  1298. /package/dist/{tree → components/tree}/variables.scss +0 -0
  1299. /package/dist/{tree-select → components/tree-select}/constants.d.ts +0 -0
  1300. /package/dist/{tree-select → components/tree-select}/rtl.scss +0 -0
  1301. /package/dist/{tree-select → components/tree-select}/tree-select.css +0 -0
  1302. /package/dist/{tree-select → components/tree-select}/variables.scss +0 -0
  1303. /package/dist/{typography → components/typography}/constants.d.ts +0 -0
  1304. /package/dist/{typography → components/typography}/ellipsis.d.ts +0 -0
  1305. /package/dist/{typography → components/typography}/format-numeral.d.ts +0 -0
  1306. /package/dist/{typography → components/typography}/rtl.scss +0 -0
  1307. /package/dist/{typography → components/typography}/typography.css +0 -0
  1308. /package/dist/{typography → components/typography}/variables.scss +0 -0
  1309. /package/dist/{upload → components/upload}/rtl.scss +0 -0
  1310. /package/dist/{upload → components/upload}/upload.css +0 -0
  1311. /package/dist/{upload → components/upload}/variables.scss +0 -0
  1312. /package/dist/{user-guide → components/user-guide}/animation.scss +0 -0
  1313. /package/dist/{user-guide → components/user-guide}/constants.d.ts +0 -0
  1314. /package/dist/{user-guide → components/user-guide}/user-guide.css +0 -0
  1315. /package/dist/{user-guide → components/user-guide}/user-guide.scss +0 -0
  1316. /package/dist/{user-guide → components/user-guide}/variables.scss +0 -0
  1317. /package/dist/{video-player → components/video-player}/animation.scss +0 -0
  1318. /package/dist/{video-player → components/video-player}/constants.d.ts +0 -0
  1319. /package/dist/{video-player → components/video-player}/utils.d.ts +0 -0
  1320. /package/dist/{video-player → components/video-player}/variables.scss +0 -0
  1321. /package/dist/{video-player → components/video-player}/video-player.css +0 -0
@@ -1,906 +0,0 @@
1
- import BaseFoundation from "../base/foundation.js";
2
- import { Typeahead, getListTargetIndex, isInnerControlActivation, isTextEditor } from "../utils/a11y.js";
3
- import isObject from "../utils/is-object.js";
4
- import "../utils/key-code.js";
5
- import isEnterPress from "../utils/is-enter-press.js";
6
- import { strings } from "./constants.js";
7
- import { calcCheckedKeys, calcCheckedKeysForChecked, calcCheckedKeysForUnchecked, calcDisabledKeys, findAncestorKeys, findDescendantKeys, normalizeKeyList, normalizedArr } from "../tree/tree-util.js";
8
- import { calcMergeType, convertDataToEntities, filter, getColumns, getKeyByPos, getKeyByValuePath, getKeysByValuePath, getValueOrKey } from "./util.js";
9
- import { difference, isEqual } from "es-toolkit";
10
- // src/cascader/foundation.ts
11
- const keyEntitiesCache = /* @__PURE__ */ new WeakMap();
12
- const disabledKeysCache = /* @__PURE__ */ new WeakMap();
13
- const checkedStateCache = /* @__PURE__ */ new WeakMap();
14
- const DERIVED_STATE_KEYS = /* @__PURE__ */ new Set([
15
- "keyEntities",
16
- "checkedKeys",
17
- "halfCheckedKeys",
18
- "resolvedCheckedKeys",
19
- "disabledKeys"
20
- ]);
21
- const DERIVE_PROP_KEYS = [
22
- "treeData",
23
- "keyMaps",
24
- "checkRelation",
25
- "disableStrictly",
26
- "autoMergeValue",
27
- "leafOnly",
28
- "onChangeWithObject",
29
- "value"
30
- ];
31
- var CascaderFoundation = class CascaderFoundation extends BaseFoundation {
32
- static #missingEntities = /* @__PURE__ */ new WeakSet();
33
- #initialized = false;
34
- #blurPending = false;
35
- #typeahead = new Typeahead();
36
- static #getFilteredData({ treeNodeFilterProp, filterSorter, keyMaps }, { filteredKeys, keyEntities, inputValue }) {
37
- const realFilterProp = treeNodeFilterProp !== "label" ? treeNodeFilterProp : keyMaps?.label ?? "label";
38
- const filteredList = [];
39
- filteredKeys.forEach((key) => {
40
- const item = keyEntities[key];
41
- if (!item) return;
42
- const pathData = CascaderFoundation.getItemPropPath(key, [], keyEntities);
43
- const itemSearchPath = pathData.map((pathItem) => pathItem[realFilterProp]);
44
- const isDisabled = findAncestorKeys([key], keyEntities, true).some((ancestorKey) => keyEntities[ancestorKey].data.disabled);
45
- filteredList.push({
46
- data: item.data,
47
- pathData,
48
- key,
49
- disabled: isDisabled,
50
- searchText: itemSearchPath
51
- });
52
- });
53
- return typeof filterSorter === "function" ? filteredList.toSorted((a, b) => filterSorter(a.pathData, b.pathData, inputValue)) : filteredList;
54
- }
55
- /** Each path of a multiple-mode value, with the key it points at (undefined for an empty path) */
56
- static #valuePaths(value, { onChangeWithObject, keyMaps }) {
57
- let normalizedValue = [];
58
- if (Array.isArray(value)) normalizedValue = Array.isArray(value[0]) ? value : [value];
59
- else if (value !== void 0) normalizedValue = [[value]];
60
- return normalizedValue.map((path) => {
61
- const valuePath = onChangeWithObject && isObject(path[0]) ? getValueOrKey(path, keyMaps) : path;
62
- return {
63
- path,
64
- key: valuePath.length > 0 ? getKeyByValuePath(valuePath) : void 0
65
- };
66
- });
67
- }
68
- /**
69
- * The paths of a controlled multiple value that the current treeData lacks (a remote search, unloaded nodes).
70
- * They are the owner's data, so a change keeps them, max counts them, and the clear button removes them.
71
- */
72
- static #missingValuePaths(props, keyEntities) {
73
- if (props.value === void 0) return [];
74
- return CascaderFoundation.#valuePaths(props.value, props).filter(({ key }) => key !== void 0 && !keyEntities[key]).map(({ path }) => path);
75
- }
76
- static #selectionFor(props, state, value, keyEntities) {
77
- const { changeOnSelect, onChangeWithObject, keyMaps, loadData, multiple } = props;
78
- const { activeKeys, loadingKeys, keyEntities: keyEntityState, selectedKeys: selectedKeysState } = state;
79
- const filterable = Boolean(props.filterTreeNode);
80
- const loadingActive = [...activeKeys].filter((i) => loadingKeys.has(i));
81
- const normalizedValue = normalizedArr(value);
82
- const valuePath = onChangeWithObject && isObject(normalizedValue[0]) ? getValueOrKey(normalizedValue, keyMaps) : normalizedValue;
83
- const selectedKeys = getKeysByValuePath(valuePath);
84
- let updateStates = {};
85
- const selectedKey = selectedKeys.length > 0 ? selectedKeys[0] : void 0;
86
- const selectedItem = selectedKey ? keyEntities[selectedKey] : void 0;
87
- if (selectedItem) {
88
- /**
89
- * Selected even when disabled
90
- */
91
- if (changeOnSelect || CascaderFoundation.#isLeafData(selectedItem.data, loadData)) {
92
- updateStates.selectedKeys = /* @__PURE__ */ new Set([selectedKey]);
93
- if (!loadingActive.length) updateStates.activeKeys = new Set(selectedItem.path);
94
- } else if (selectedKeysState.size) updateStates = CascaderFoundation.#clearedSelection(filterable, multiple);
95
- } else if ((Array.isArray(value) || typeof value === "string") && value.length) {
96
- const val = valuePath.at(-1);
97
- const key = `not-exist-${val}`;
98
- const optionNotExist = {
99
- data: {
100
- label: val,
101
- value: val
102
- },
103
- key,
104
- path: valuePath
105
- };
106
- CascaderFoundation.#missingEntities.add(optionNotExist);
107
- updateStates.selectedKeys = /* @__PURE__ */ new Set([key]);
108
- keyEntities = {
109
- ...keyEntities,
110
- [key]: optionNotExist
111
- };
112
- } else if (loadingKeys.size) {
113
- updateStates.keyEntities = {
114
- ...keyEntityState,
115
- ...keyEntities
116
- };
117
- return {
118
- updateStates,
119
- keyEntities
120
- };
121
- } else updateStates = CascaderFoundation.#clearedSelection(filterable, multiple);
122
- updateStates.keyEntities = keyEntities;
123
- return {
124
- updateStates,
125
- keyEntities
126
- };
127
- }
128
- static #clearedSelection(filterable, multiple) {
129
- const updateStates = {};
130
- updateStates.selectedKeys = /* @__PURE__ */ new Set([]);
131
- updateStates.activeKeys = /* @__PURE__ */ new Set([]);
132
- updateStates.filteredKeys = /* @__PURE__ */ new Set([]);
133
- if (filterable && !multiple) updateStates.inputValue = "";
134
- return updateStates;
135
- }
136
- static #isLeafData(item, loadData) {
137
- if (loadData) return Boolean(item.isLeaf);
138
- return !item.children || !item.children.length;
139
- }
140
- #isDisabled() {
141
- return this.getProp("disabled");
142
- }
143
- #isFilterable() {
144
- return Boolean(this.getProp("filterTreeNode"));
145
- }
146
- #notifySingleChange(item) {
147
- const valueProp = this.getProp("onChangeWithObject") ? [] : "value";
148
- this.adapter.notifyChange(this.getItemPropPath(item.key, valueProp));
149
- }
150
- #notifyMultipleChange(checkedKeys) {
151
- const valueProp = this.getProp("onChangeWithObject") ? [] : "value";
152
- const keyEntities = this.getState("keyEntities");
153
- const paths = [...checkedKeys].map((checkedKey) => this.getItemPropPath(checkedKey, valueProp, keyEntities));
154
- this.adapter.notifyChange([...CascaderFoundation.#missingValuePaths(this.getProps(), keyEntities), ...paths]);
155
- }
156
- #isLeaf(item) {
157
- return CascaderFoundation.#isLeafData(item, this.getProp("loadData"));
158
- }
159
- #clearInput() {
160
- this.adapter.updateStates({ inputValue: "" });
161
- }
162
- #notifyBlur(e) {
163
- if (!this.#blurPending) return;
164
- this.#blurPending = false;
165
- this.adapter.notifyBlur(e);
166
- }
167
- /** A single pick closes the dropdown and reports the blur at once, so a Form with trigger="blur" validates */
168
- #closeAfterPick(e, key) {
169
- this.#close(key);
170
- this.#notifyBlur(e);
171
- }
172
- #close(key) {
173
- const { multiple } = this.getProps();
174
- this.adapter.updateStates({
175
- isOpen: false,
176
- keyboardKey: null
177
- });
178
- this.adapter.notifyDropdownVisibleChange(false);
179
- if (this.#isFilterable()) {
180
- const { selectedKeys } = this.getStates();
181
- let inputValue = "";
182
- if (key && !multiple) inputValue = this.renderDisplayText(key);
183
- else if (selectedKeys.size && !multiple) inputValue = this.renderDisplayText([...selectedKeys][0]);
184
- this.adapter.updateStates({
185
- inputValue,
186
- isSearching: false
187
- });
188
- if (!multiple) this.#toggle2SearchInput(false);
189
- }
190
- }
191
- #notifyFocus(e) {
192
- if (!this.#blurPending && !this.#isDisabled()) {
193
- this.#blurPending = true;
194
- this.adapter.notifyFocus(e);
195
- }
196
- }
197
- #getCacheValue(keyEntities) {
198
- const { selectedKeys, keyEntities: prevKeyEntities } = this.getStates();
199
- const selectedKey = Array.from(selectedKeys)[0];
200
- const entity = keyEntities[selectedKey] ?? prevKeyEntities[selectedKey];
201
- if (!entity) return;
202
- return CascaderFoundation.#missingEntities.has(entity) ? entity.path : entity.valuePath;
203
- }
204
- #calcFilteredKeys(sugInput, keyEntities) {
205
- if (!sugInput) return [];
206
- const { treeNodeFilterProp, filterTreeNode, filterLeafOnly, remote, keyMaps } = this.getProps();
207
- const realFilterProp = treeNodeFilterProp !== "label" ? treeNodeFilterProp : keyMaps?.label ?? "label";
208
- keyEntities ??= this.getState("keyEntities");
209
- const entities = Object.values(keyEntities).filter((item) => !CascaderFoundation.#missingEntities.has(item));
210
- if (remote) return entities.filter((item) => filterTreeNode && !filterLeafOnly || this.#isLeaf(item.data)).map((item) => item.key);
211
- return entities.filter(({ key, data }) => {
212
- const filteredPath = this.getItemPropPath(key, realFilterProp, keyEntities);
213
- return filter(sugInput, data, filterTreeNode, filteredPath);
214
- }).filter((item) => filterTreeNode && !filterLeafOnly || this.#isLeaf(item.data)).map((item) => item.key);
215
- }
216
- #defaultRenderText(path, displayRender) {
217
- const separator = this.getProp("separator");
218
- if (displayRender && typeof displayRender === "function") return displayRender(path);
219
- return path.every((item) => typeof item === "string" || typeof item === "number") ? path.join(separator) : "";
220
- }
221
- #handleMultipleSelect(item) {
222
- const { checkRelation, searchPosition } = this.getProps();
223
- if (checkRelation === strings.RELATED) this.#handleRelatedMultipleSelect(item);
224
- else if (checkRelation === strings.UN_RELATED) this.#handleUnRelatedMultipleSelect(item);
225
- if (searchPosition === strings.SEARCH_POSITION_TRIGGER && this.getState("inputValue") !== "") this.handleInputChange("");
226
- }
227
- #handleRelatedMultipleSelect({ key }) {
228
- const { checkedKeys, keyEntities, resolvedCheckedKeys } = this.getStates();
229
- const { autoMergeValue, max, disableStrictly, leafOnly } = this.getProps();
230
- const missingCount = CascaderFoundation.#missingValuePaths(this.getProps(), keyEntities).length;
231
- const prevCheckedStatus = checkedKeys.has(key);
232
- const curCheckedStatus = disableStrictly ? this.calcCheckedStatus(!prevCheckedStatus, key) : !prevCheckedStatus;
233
- const { checkedKeys: curCheckedKeys, halfCheckedKeys: curHalfCheckedKeys } = disableStrictly ? this.calcNonDisabledCheckedKeys(key, curCheckedStatus) : this.calcCheckedKeys(key, curCheckedStatus);
234
- const mergeType = calcMergeType(autoMergeValue, leafOnly);
235
- const isLeafOnlyMerge = mergeType === strings.LEAF_ONLY_MERGE_TYPE;
236
- const isNoneMerge = mergeType === strings.NONE_MERGE_TYPE;
237
- const curResolvedCheckedKeys = new Set(normalizeKeyList(curCheckedKeys, keyEntities, isLeafOnlyMerge));
238
- const curRealCheckedKeys = isNoneMerge ? curCheckedKeys : curResolvedCheckedKeys;
239
- if (typeof max === "number") {
240
- if (!isNoneMerge) {
241
- if (resolvedCheckedKeys.size < curResolvedCheckedKeys.size && curResolvedCheckedKeys.size + missingCount > max) {
242
- const checkedEntities = [];
243
- curResolvedCheckedKeys.forEach((itemKey) => {
244
- checkedEntities.push(keyEntities[itemKey]);
245
- });
246
- this.adapter.notifyOnExceed(checkedEntities);
247
- return;
248
- }
249
- } else if (checkedKeys.size < curCheckedKeys.size && curCheckedKeys.size + missingCount > max) {
250
- const checkedEntities = [];
251
- curCheckedKeys.forEach((itemKey) => {
252
- checkedEntities.push(keyEntities[itemKey]);
253
- });
254
- this.adapter.notifyOnExceed(checkedEntities);
255
- return;
256
- }
257
- }
258
- if (!this.isControlledComponent()) this.adapter.updateStates({
259
- checkedKeys: curCheckedKeys,
260
- halfCheckedKeys: curHalfCheckedKeys,
261
- resolvedCheckedKeys: curResolvedCheckedKeys,
262
- checkedEntities: keyEntities
263
- });
264
- this.#notifyMultipleChange(curRealCheckedKeys);
265
- if (curCheckedStatus) this.#notifySelect(curRealCheckedKeys);
266
- }
267
- #handleUnRelatedMultipleSelect({ key }) {
268
- const { checkedKeys, keyEntities } = this.getStates();
269
- const { max } = this.getProps();
270
- const newCheckedKeys = new Set(checkedKeys);
271
- let targetStatus;
272
- if (checkedKeys.has(key)) {
273
- newCheckedKeys.delete(key);
274
- targetStatus = false;
275
- } else {
276
- if (typeof max === "number") {
277
- if (checkedKeys.size + CascaderFoundation.#missingValuePaths(this.getProps(), keyEntities).length >= max) {
278
- const checkedEntities = [];
279
- checkedKeys.forEach((itemKey) => {
280
- checkedEntities.push(keyEntities[itemKey]);
281
- });
282
- this.adapter.notifyOnExceed(checkedEntities);
283
- return;
284
- }
285
- }
286
- newCheckedKeys.add(key);
287
- targetStatus = true;
288
- }
289
- if (!this.isControlledComponent()) this.adapter.updateStates({
290
- checkedKeys: newCheckedKeys,
291
- checkedEntities: keyEntities
292
- });
293
- this.#notifyMultipleChange(newCheckedKeys);
294
- if (targetStatus) this.#notifySelect(newCheckedKeys);
295
- }
296
- #notifySelect(keys) {
297
- const { keyEntities } = this.getStates();
298
- const values = [];
299
- keys.forEach((key) => {
300
- const valueItem = keyEntities[key]?.data?.value;
301
- if (valueItem !== void 0) values.push(valueItem);
302
- });
303
- const formatValue = values.length === 1 ? values[0] : values;
304
- this.adapter.notifySelect(formatValue);
305
- }
306
- #toggle2SearchInput(isShow) {
307
- if (isShow) this.adapter.toggleInputShow(isShow, () => this.focus());
308
- else this.adapter.toggleInputShow(isShow, () => void 0);
309
- }
310
- #handleShowNextByHover(item) {
311
- const { keyEntities } = this.getStates();
312
- const { data, key } = item;
313
- const isLeaf = this.#isLeaf(data);
314
- const activeKeys = keyEntities[key].path;
315
- this.adapter.updateStates({ activeKeys: new Set(activeKeys) });
316
- if (!isLeaf) this.#notifyIfLoadData(item);
317
- }
318
- #handleNodeLoad({ data, key }) {
319
- const newLoadedKeys = new Set(this.getState("loadedKeys")).add(key);
320
- const newLoadingKeys = new Set(this.getState("loadingKeys"));
321
- newLoadingKeys.delete(key);
322
- this.adapter.notifyOnLoad(newLoadedKeys, data);
323
- this.adapter.updateStates({
324
- loadingKeys: newLoadingKeys,
325
- loadedKeys: newLoadedKeys
326
- });
327
- }
328
- #notifyIfLoadData(item) {
329
- const { data, key } = item;
330
- if (!data.isLeaf && !data.children && this.getProp("loadData")) {
331
- const { loadedKeys, loadingKeys, keyEntities } = this.getStates();
332
- if (loadedKeys.has(key) || loadingKeys.has(key)) return;
333
- const optionPath = this.getItemPropPath(key, [], keyEntities);
334
- this.adapter.updateStates({ loadingKeys: new Set(loadingKeys).add(key) });
335
- this.adapter.notifyLoadData(optionPath, this.#handleNodeLoad.bind(this, item), this.#handleNodeLoadReject.bind(this, item));
336
- }
337
- }
338
- #handleNodeLoadReject(item) {
339
- const newLoadingKeys = new Set(this.getState("loadingKeys"));
340
- newLoadingKeys.delete(item.key);
341
- this.adapter.updateStates({ loadingKeys: newLoadingKeys });
342
- }
343
- #handleSingleSelect(e, item) {
344
- const { changeOnSelect: allowChange, filterLeafOnly, multiple, enableLeafClick, clickToSelect } = this.getProps();
345
- const { keyEntities, selectedKeys, isSearching } = this.getStates();
346
- const { data, key } = item;
347
- const isLeaf = this.#isLeaf(data);
348
- const activeKeys = keyEntities[key].path;
349
- const selectedKey = [key];
350
- const hasChanged = key !== [...selectedKeys][0];
351
- if (!isLeaf && !allowChange && !isSearching && !(multiple && clickToSelect)) {
352
- this.adapter.updateStates({ activeKeys: new Set(activeKeys) });
353
- this.#notifyIfLoadData(item);
354
- return;
355
- }
356
- if (multiple) {
357
- this.adapter.updateStates({ activeKeys: new Set(activeKeys) });
358
- if (clickToSelect || isLeaf && enableLeafClick) this.onItemCheckboxClick(item);
359
- } else {
360
- this.adapter.notifySelect(data.value);
361
- if (hasChanged) {
362
- this.#notifySingleChange(item);
363
- this.#notifyIfLoadData(item);
364
- if (this.isControlledComponent()) {
365
- this.adapter.updateStates({ activeKeys: new Set(activeKeys) });
366
- if (isLeaf || !filterLeafOnly && isSearching) this.#closeAfterPick(e);
367
- return;
368
- }
369
- this.adapter.updateStates({
370
- activeKeys: new Set(activeKeys),
371
- selectedKeys: new Set(selectedKey)
372
- });
373
- if (isLeaf || !filterLeafOnly && isSearching) this.#closeAfterPick(e, key);
374
- } else this.#closeAfterPick(e);
375
- }
376
- }
377
- #updateSelectedKey(value, keyEntities) {
378
- const selection = CascaderFoundation.#selectionFor(this.getProps(), this.getStates(), value, keyEntities);
379
- this.adapter.updateStates(selection.updateStates);
380
- return selection.keyEntities;
381
- }
382
- #reCalcActiveKeys() {
383
- const { selectedKeys, activeKeys, keyEntities } = this.getStates();
384
- const selectedItem = keyEntities[[...selectedKeys][0]];
385
- if (!selectedItem) return;
386
- const newActiveKeys = new Set(selectedItem.path);
387
- if (!isEqual(newActiveKeys, activeKeys)) this.adapter.updateStates({ activeKeys: newActiveKeys });
388
- }
389
- /** Right (`into`) and Left on an option of the columns */
390
- #handleColumnKey(option, into) {
391
- const { activeKeys } = this.getStates();
392
- const isOpen = activeKeys.has(option.key) && CascaderFoundation.isBranch(option.data, this.getProp("loadData"));
393
- if (into) {
394
- if (!isOpen) {
395
- if (!this.#isOptionDisabled(option)) this.#handleShowNextByHover(option);
396
- } else if (option.children?.length) this.#moveTo(option.children[0].key, 0);
397
- } else if (isOpen) this.adapter.updateStates({ activeKeys: new Set(option.path.slice(0, -1)) });
398
- else if (option.parent) {
399
- const { parent } = option;
400
- const column = parent.parent ? parent.parent.children : CascaderFoundation.getRenderData(this.getProps(), this.getStates());
401
- this.#moveTo(parent.key, column.findIndex((item) => item.key === parent.key));
402
- }
403
- }
404
- #moveTo(key, index) {
405
- this.adapter.updateStates({ keyboardKey: key });
406
- this.adapter.scrollToOption(key, index);
407
- }
408
- #getShownOptions() {
409
- const { activeKeys } = this.getStates();
410
- const topLevel = CascaderFoundation.getRenderData(this.getProps(), this.getStates());
411
- return getColumns(topLevel, activeKeys).flatMap(({ items }) => items.map((option, index) => ({
412
- option,
413
- index
414
- })));
415
- }
416
- #isOptionDisabled(option) {
417
- return Boolean(option.data.disabled || "disabled" in option && option.disabled);
418
- }
419
- #collectOptions() {
420
- const { treeData, value, keyMaps } = this.getProps();
421
- const { isSearching, inputValue } = this.getStates();
422
- let keyEntities = convertDataToEntities(treeData, keyMaps);
423
- let cacheValue;
424
- if (Object.keys(keyEntities).length > 0) cacheValue = this.#getCacheValue(keyEntities);
425
- const selectedValue = !this.isControlledComponent() ? cacheValue : value === void 0 ? [] : value;
426
- if (selectedValue != null) keyEntities = this.#updateSelectedKey(selectedValue, keyEntities);
427
- else this.adapter.updateStates({ keyEntities });
428
- this.#recalculateFilteredKeys(isSearching ? inputValue : void 0, keyEntities);
429
- }
430
- /**
431
- * Syncs filteredKeys with the latest keyEntities without triggering onSearch.
432
- */
433
- #recalculateFilteredKeys(input, nextKeyEntities) {
434
- if (!this.#isFilterable()) return;
435
- const currentIsSearching = this.getState("isSearching");
436
- if (input === void 0 && !currentIsSearching) return;
437
- const sugInput = input === void 0 ? this.getState("inputValue") : input;
438
- const filteredKeys = this.#calcFilteredKeys(sugInput, nextKeyEntities);
439
- const updateStates = {
440
- isSearching: Boolean(sugInput),
441
- filteredKeys: new Set(filteredKeys)
442
- };
443
- if (nextKeyEntities) updateStates.keyEntities = nextKeyEntities;
444
- this.adapter.updateStates(updateStates);
445
- }
446
- #handleValueChange(value) {
447
- const { keyEntities } = this.getStates();
448
- this.#updateSelectedKey(value, keyEntities);
449
- const { isOpen, selectedKeys } = this.getStates();
450
- if (this.#isFilterable() && !this.getProp("multiple") && !isOpen && selectedKeys.size) this.adapter.updateStates({ inputValue: this.renderDisplayText([...selectedKeys][0]) });
451
- }
452
- getItemPropPath(selectedKey, prop, keyEntities) {
453
- return CascaderFoundation.getItemPropPath(selectedKey, prop, keyEntities || this.getState("keyEntities"));
454
- }
455
- renderDisplayText(targetKey, keyEntities) {
456
- const renderFunc = this.getProp("displayRender");
457
- const displayProp = this.getProp("displayProp");
458
- const displayPath = this.getItemPropPath(targetKey, displayProp, keyEntities);
459
- return this.#defaultRenderText(displayPath, renderFunc);
460
- }
461
- calcNonDisabledCheckedKeys(eventKey, targetStatus) {
462
- const { keyEntities, disabledKeys } = this.getStates();
463
- const checkedKeys = new Set(this.getState("checkedKeys"));
464
- const descendantKeys = normalizeKeyList(findDescendantKeys([eventKey], keyEntities, false), keyEntities, true);
465
- if (!descendantKeys.some((key) => disabledKeys.has(key))) return this.calcCheckedKeys(eventKey, targetStatus);
466
- const nonDisabled = descendantKeys.filter((key) => !disabledKeys.has(key));
467
- const newCheckedKeys = targetStatus ? [...nonDisabled, ...checkedKeys] : difference(normalizeKeyList([...checkedKeys], keyEntities, true), nonDisabled);
468
- return calcCheckedKeys(newCheckedKeys, keyEntities);
469
- }
470
- calcCheckedStatus(targetStatus, eventKey) {
471
- if (!targetStatus) return targetStatus;
472
- const { checkedKeys, keyEntities, disabledKeys } = this.getStates();
473
- const descendantKeys = normalizeKeyList(findDescendantKeys([eventKey], keyEntities, false), keyEntities, true);
474
- if (!descendantKeys.some((key) => disabledKeys.has(key))) return targetStatus;
475
- return !descendantKeys.filter((key) => !disabledKeys.has(key)).every((key) => checkedKeys.has(key));
476
- }
477
- calcCheckedKeys(key, curCheckedStatus) {
478
- const { keyEntities } = this.getStates();
479
- const checkedKeys = new Set(this.getState("checkedKeys"));
480
- const halfCheckedKeys = new Set(this.getState("halfCheckedKeys"));
481
- return curCheckedStatus ? calcCheckedKeysForChecked(key, keyEntities, checkedKeys, halfCheckedKeys) : calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedKeys);
482
- }
483
- /** keyEntities of a treeData, shared while treeData keeps its identity and keyMaps stays equal */
484
- static getKeyEntities(treeData, keyMaps) {
485
- if (!treeData) return convertDataToEntities(treeData, keyMaps);
486
- const cached = keyEntitiesCache.get(treeData);
487
- if (cached && isEqual(cached.keyMaps, keyMaps)) return cached.keyEntities;
488
- const keyEntities = convertDataToEntities(treeData, keyMaps);
489
- keyEntitiesCache.set(treeData, {
490
- keyMaps,
491
- keyEntities
492
- });
493
- return keyEntities;
494
- }
495
- /** Keys of the entities a multiple value points at; paths missing from keyEntities are dropped */
496
- static getRealKeys(value, keyEntities, props) {
497
- return CascaderFoundation.#valuePaths(value, props).map(({ key }) => key).filter((key) => key !== void 0 && keyEntities[key]);
498
- }
499
- /** Whether a multiple value holds anything to clear, counting the controlled paths treeData lacks */
500
- static hasMultipleValue(props, { checkedKeys, keyEntities }) {
501
- return checkedKeys.size > 0 || CascaderFoundation.#missingValuePaths(props, keyEntities).length > 0;
502
- }
503
- static calcCheckedState(keys, keyEntities, { checkRelation, autoMergeValue, leafOnly }) {
504
- if (checkRelation !== strings.RELATED) return {
505
- checkedKeys: new Set(keys),
506
- halfCheckedKeys: /* @__PURE__ */ new Set(),
507
- resolvedCheckedKeys: /* @__PURE__ */ new Set()
508
- };
509
- const calRes = calcCheckedKeys(keys, keyEntities);
510
- const checkedKeys = new Set(calRes.checkedKeys);
511
- const isLeafOnlyMerge = calcMergeType(autoMergeValue, leafOnly) === strings.LEAF_ONLY_MERGE_TYPE;
512
- return {
513
- checkedKeys,
514
- halfCheckedKeys: new Set(calRes.halfCheckedKeys),
515
- resolvedCheckedKeys: new Set(normalizeKeyList(checkedKeys, keyEntities, isLeafOnlyMerge))
516
- };
517
- }
518
- /**
519
- * The multiple-mode values that follow props: keyEntities, disabledKeys under disableStrictly, and the checked
520
- * sets (from `value` when controlled, else the stored ones recomputed when keyEntities changed). Stored keys that
521
- * treeData lacks (removed, or not loaded yet) are left out; the state keeps them until the next change, so
522
- * treeData that brings them first checks them.
523
- */
524
- static deriveMultipleState(props, state) {
525
- const { treeData, keyMaps, checkRelation, disableStrictly, autoMergeValue, leafOnly, onChangeWithObject } = props;
526
- const keyEntities = CascaderFoundation.getKeyEntities(treeData, keyMaps);
527
- let disabledKeys = /* @__PURE__ */ new Set();
528
- if (checkRelation === strings.RELATED && disableStrictly) {
529
- disabledKeys = disabledKeysCache.get(keyEntities);
530
- if (!disabledKeys) {
531
- disabledKeys = calcDisabledKeys(keyEntities, keyMaps);
532
- disabledKeysCache.set(keyEntities, disabledKeys);
533
- }
534
- }
535
- const controlled = props.value !== void 0;
536
- if (!controlled && state.checkedEntities === keyEntities) {
537
- const { checkedKeys, halfCheckedKeys, resolvedCheckedKeys } = state;
538
- return {
539
- keyEntities,
540
- disabledKeys,
541
- checkedKeys,
542
- halfCheckedKeys,
543
- resolvedCheckedKeys
544
- };
545
- }
546
- const inputs = [
547
- controlled,
548
- controlled ? props.value : state.checkedKeys,
549
- checkRelation,
550
- autoMergeValue,
551
- leafOnly,
552
- onChangeWithObject
553
- ];
554
- const cached = checkedStateCache.get(keyEntities);
555
- let checked = cached && isEqual(cached.inputs, inputs) ? cached.result : void 0;
556
- if (!checked) {
557
- const keys = controlled ? CascaderFoundation.getRealKeys(props.value, keyEntities, props) : [...state.checkedKeys].filter((key) => keyEntities[key]);
558
- checked = CascaderFoundation.calcCheckedState(keys, keyEntities, props);
559
- checkedStateCache.set(keyEntities, {
560
- inputs,
561
- result: checked
562
- });
563
- }
564
- return {
565
- keyEntities,
566
- disabledKeys,
567
- ...checked
568
- };
569
- }
570
- static getInitialState(props) {
571
- const state = {
572
- disabledKeys: /* @__PURE__ */ new Set(),
573
- isOpen: false,
574
- keyEntities: {},
575
- selectedKeys: /* @__PURE__ */ new Set([]),
576
- activeKeys: /* @__PURE__ */ new Set([]),
577
- keyboardKey: null,
578
- filteredKeys: /* @__PURE__ */ new Set([]),
579
- inputValue: "",
580
- isSearching: false,
581
- checkedKeys: /* @__PURE__ */ new Set([]),
582
- halfCheckedKeys: /* @__PURE__ */ new Set([]),
583
- resolvedCheckedKeys: /* @__PURE__ */ new Set([]),
584
- loadedKeys: /* @__PURE__ */ new Set(),
585
- loadingKeys: /* @__PURE__ */ new Set(),
586
- showInput: false
587
- };
588
- const keyEntities = convertDataToEntities(props.treeData, props.keyMaps);
589
- const selectedValue = props.value !== void 0 ? props.value : props.defaultValue;
590
- if (selectedValue != null) Object.assign(state, CascaderFoundation.#selectionFor(props, state, selectedValue, keyEntities).updateStates);
591
- else state.keyEntities = keyEntities;
592
- if (props.multiple && props.value === void 0) {
593
- const keys = CascaderFoundation.#valuePaths(props.defaultValue, props).map(({ key }) => key).filter((key) => key !== void 0);
594
- state.checkedKeys = new Set(keys);
595
- }
596
- return state;
597
- }
598
- static getRenderData(props, state) {
599
- const { keyEntities, isSearching } = state;
600
- if (isSearching && Boolean(props.filterTreeNode)) return CascaderFoundation.#getFilteredData(props, state);
601
- return Object.values(keyEntities).filter((item) => item.parentKey === null && !CascaderFoundation.#missingEntities.has(item)).sort((a, b) => a.ind - b.ind);
602
- }
603
- static isBranch(data, loadData) {
604
- return Boolean(data.children?.length) || Boolean(loadData && !data.isLeaf);
605
- }
606
- /**
607
- * An option that is both active and selected shows only as selected, and in multiple mode selection is the
608
- * checkbox's, so the row is never marked selected.
609
- */
610
- static getTreeItemState(key, sets, multiple, expandable) {
611
- const active = sets.activeKeys.has(key);
612
- const selected = sets.selectedKeys.has(key);
613
- const loading = sets.loadingKeys.has(key) && !sets.loadedKeys.has(key);
614
- const checkState = sets.halfCheckedKeys.has(key) ? "mixed" : sets.checkedKeys.has(key);
615
- return {
616
- selected,
617
- loading,
618
- showActive: active && !selected,
619
- showSelected: selected && !multiple,
620
- aria: {
621
- "aria-busy": loading || void 0,
622
- "aria-checked": multiple ? checkState : void 0,
623
- "aria-expanded": expandable ? active : void 0,
624
- "aria-selected": multiple ? void 0 : selected
625
- }
626
- };
627
- }
628
- /** `keyboardKey` while its option is shown; hover or a click elsewhere can close its column */
629
- static getKeyboardKey({ keyboardKey, keyEntities, activeKeys, isSearching, filteredKeys }) {
630
- const entity = keyEntities[keyboardKey];
631
- if (!entity) return null;
632
- return (isSearching ? filteredKeys.has(keyboardKey) : entity.path.slice(0, -1).every((key) => activeKeys.has(key))) ? keyboardKey : null;
633
- }
634
- static getItemPropPath(selectedKey, prop, keyEntities) {
635
- const selectedItem = keyEntities[selectedKey];
636
- let path = [];
637
- if (!selectedItem) {} else if (CascaderFoundation.#missingEntities.has(selectedItem)) path = selectedItem.path;
638
- else {
639
- const keyPath = selectedItem.path;
640
- path = Array.isArray(prop) ? keyPath.map((key) => keyEntities[key].data) : keyPath.map((key) => keyEntities[key].data[prop]);
641
- }
642
- return path;
643
- }
644
- getStates() {
645
- const state = super.getStates();
646
- if (!this.getProp("multiple")) return state;
647
- const props = {};
648
- for (const key of DERIVE_PROP_KEYS) props[key] = this.getProp(key);
649
- return {
650
- ...state,
651
- ...CascaderFoundation.deriveMultipleState(props, state)
652
- };
653
- }
654
- getState(key) {
655
- return DERIVED_STATE_KEYS.has(key) ? this.getStates()[key] : super.getState(key);
656
- }
657
- init() {
658
- if (this.#initialized) return;
659
- this.#initialized = true;
660
- if (this.getProp("defaultOpen") && !this.#isDisabled()) this.open();
661
- }
662
- handleKeyDown = (e) => {
663
- if (e.key === "Escape") {
664
- if (this.getState("isOpen")) {
665
- e.preventDefault();
666
- this.close();
667
- }
668
- }
669
- };
670
- /**
671
- * Keys of the open popup (APG combobox with a tree popup, or a listbox while searching); focus stays on the
672
- * trigger or its search input. Up, Down, Home and End move within the current column or the search results;
673
- * Right opens a branch, then enters it; Left closes an open branch, else moves to the parent (swapped in RTL);
674
- * Enter and Space click the option, or check it in multiple mode; typed characters jump to the next shown option
675
- * starting with them (APG tree typeahead). In a search input Space and typed characters edit the text; while
676
- * searching only Up, Down and Enter navigate. Returns whether the key was used.
677
- */
678
- handleOptionKeyDown = (e, { editing, rtl }) => {
679
- const states = this.getStates();
680
- const { key } = e;
681
- if (!states.isOpen || e.ctrlKey || e.metaKey || e.altKey || editing && key === " ") return false;
682
- if (editing && states.isSearching && ![
683
- "ArrowUp",
684
- "ArrowDown",
685
- "Enter"
686
- ].includes(key)) return false;
687
- if (!editing && !states.isSearching && this.#typeahead.accepts(e)) {
688
- e.preventDefault();
689
- const shown = this.#getShownOptions();
690
- const labels = shown.map(({ option }) => typeof option.data.label === "string" ? option.data.label : "");
691
- const current = shown.findIndex(({ option }) => option.key === CascaderFoundation.getKeyboardKey(states));
692
- const target = shown[this.#typeahead.match(key, labels, current)];
693
- if (target) this.#moveTo(target.option.key, target.index);
694
- return true;
695
- }
696
- const currentKey = CascaderFoundation.getKeyboardKey(states);
697
- const parent = states.isSearching ? void 0 : states.keyEntities[currentKey]?.parent;
698
- const options = parent ? parent.children : CascaderFoundation.getRenderData(this.getProps(), states);
699
- const index = options.findIndex((option) => option.key === currentKey);
700
- const current = options[index];
701
- if (key === "Enter" || key === " ") {
702
- if (!current) return false;
703
- e.preventDefault();
704
- if (!this.#isOptionDisabled(current)) {
705
- if (this.getProp("multiple")) this.onItemCheckboxClick(current);
706
- else this.handleItemClick(e, current);
707
- }
708
- return true;
709
- }
710
- const [into, out] = rtl ? ["ArrowLeft", "ArrowRight"] : ["ArrowRight", "ArrowLeft"];
711
- if (key === into || key === out) {
712
- if (!current || states.isSearching) return false;
713
- e.preventDefault();
714
- this.#handleColumnKey(current, key === into);
715
- return true;
716
- }
717
- const target = getListTargetIndex(key, index, options.length, () => false);
718
- if (target === null) return false;
719
- e.preventDefault();
720
- this.#moveTo(options[target].key, target);
721
- return true;
722
- };
723
- /**
724
- * After an update, the host reports whether the options (treeData or keyMaps) and value changed by its own change
725
- * detection. Re-collecting the options also re-resolves the value.
726
- */
727
- handleInputsChange = ({ optionsChanged, valueChanged }, value) => {
728
- if (this.getProp("multiple")) {
729
- if (optionsChanged) this.#recalculateFilteredKeys();
730
- return;
731
- }
732
- if (optionsChanged) this.#collectOptions();
733
- else if (valueChanged) this.#handleValueChange(value);
734
- };
735
- open = () => {
736
- const filterable = this.#isFilterable();
737
- const { multiple } = this.getProps();
738
- const { isSearching } = this.getStates();
739
- this.adapter.updateStates({ isOpen: true });
740
- if (filterable) {
741
- this.adapter.updateStates({
742
- inputValue: "",
743
- isSearching: false,
744
- filteredKeys: /* @__PURE__ */ new Set()
745
- });
746
- if (isSearching) this.adapter.notifyOnSearch("");
747
- if (!multiple) this.#toggle2SearchInput(true);
748
- }
749
- if (this.isControlledComponent()) this.#reCalcActiveKeys();
750
- this.adapter.notifyDropdownVisibleChange(true);
751
- };
752
- /** Mousedown outside the trigger and dropdown while open */
753
- handleClickOutside = (e) => {
754
- this.#notifyBlur(e);
755
- this.#close();
756
- };
757
- /** Focus entered the trigger (its search input, tags, clear button) or the dropdown from outside, by any means */
758
- handleFocusEnter = (e) => {
759
- this.#notifyFocus(e);
760
- };
761
- /**
762
- * The focus left the trigger and the dropdown (the component checks where it went): reports the blur. An open
763
- * dropdown closes when the focus went to another element (APG combobox); a window blur has no target and keeps
764
- * it, as the native select does.
765
- */
766
- handleFocusLeave = (e) => {
767
- this.#notifyBlur(e);
768
- if (e.relatedTarget && this.getState("isOpen")) this.#close();
769
- };
770
- /** Closes the dropdown; the focus stays in the component, so no blur */
771
- close = () => {
772
- this.#close();
773
- };
774
- /** Closes without a blur; called when Vue KeepAlive deactivates the host */
775
- deactivate = () => {
776
- this.#close();
777
- };
778
- focus = () => {
779
- this.adapter.focusCombobox();
780
- };
781
- blur = () => {
782
- this.adapter.blurCombobox();
783
- };
784
- /** Leaves search mode after the closed dropdown finishes its exit */
785
- endSearching = () => {
786
- this.adapter.updateStates({ isSearching: false });
787
- };
788
- /** A key that opens the dropdown sets the current option before the list mounts; it is scrolled to once shown */
789
- handlePopoverOpen = () => {
790
- const keyboardKey = this.getState("keyboardKey");
791
- if (!keyboardKey) return;
792
- const shown = this.#getShownOptions().find(({ option }) => option.key === keyboardKey);
793
- if (shown) this.adapter.scrollToOption(keyboardKey, shown.index);
794
- };
795
- handleItemClick = (e, item) => {
796
- if (this.#isDisabled()) return;
797
- this.#handleSingleSelect(e, item);
798
- };
799
- handleItemHover = (_e, item) => {
800
- if (this.#isDisabled()) return;
801
- this.#handleShowNextByHover(item);
802
- };
803
- onItemCheckboxClick = (item) => {
804
- if (this.#isDisabled()) return;
805
- this.#handleMultipleSelect(item);
806
- };
807
- handleClick = (e) => {
808
- const isDisabled = this.#isDisabled();
809
- const isFilterable = this.#isFilterable();
810
- const { isOpen } = this.getStates();
811
- if (isDisabled || isInnerControlActivation(e)) return;
812
- this.#notifyFocus(e);
813
- if (!isOpen) this.open();
814
- else if (!isFilterable) this.close();
815
- };
816
- /**
817
- * Enter toggles like a click; Down and Up open a closed popup (APG combobox). Without a search input (select-only
818
- * combobox) Space also opens it, and Home and End open it on the first and last option of the first column.
819
- * While open with no current option (handleOptionKeyDown left the key), Space outside a text field acts like
820
- * Enter, as in Select and TreeSelect. A search input keeps Space, Home and End for its text.
821
- */
822
- handleSelectionKeyDown = (keyboardEvent) => {
823
- const { key } = keyboardEvent;
824
- const isOpen = this.getState("isOpen");
825
- const opensOnArrow = (key === "ArrowDown" || key === "ArrowUp") && !isOpen;
826
- const opensSelectOnly = !isOpen && !this.#isFilterable() && (key === " " || key === "Home" || key === "End");
827
- const spaceWhileOpen = isOpen && key === " " && !isTextEditor(keyboardEvent.target);
828
- if (opensOnArrow || opensSelectOnly || spaceWhileOpen || isEnterPress(keyboardEvent)) {
829
- keyboardEvent.preventDefault();
830
- this.handleClick(keyboardEvent);
831
- }
832
- if (opensSelectOnly && key !== " " && this.getState("isOpen")) {
833
- const column = CascaderFoundation.getRenderData(this.getProps(), this.getStates());
834
- const index = key === "Home" ? 0 : column.length - 1;
835
- if (column[index]) this.#moveTo(column[index].key, index);
836
- }
837
- };
838
- handleInputChange = (sugInput) => {
839
- const filteredKeys = this.#calcFilteredKeys(sugInput);
840
- this.adapter.updateStates({
841
- inputValue: sugInput,
842
- isSearching: Boolean(sugInput),
843
- filteredKeys: new Set(filteredKeys),
844
- keyboardKey: null
845
- });
846
- this.adapter.notifyOnSearch(sugInput);
847
- };
848
- handleClear = () => {
849
- const { isSearching, keyEntities, inputValue } = this.getStates();
850
- const { multiple } = this.getProps();
851
- const isFilterable = this.#isFilterable();
852
- const isControlled = this.isControlledComponent();
853
- const newState = {};
854
- if (multiple) {
855
- const hasValue = CascaderFoundation.hasMultipleValue(this.getProps(), this.getStates());
856
- newState.isSearching = false;
857
- this.#clearInput();
858
- if (inputValue) this.adapter.notifyOnSearch("");
859
- newState.checkedKeys = /* @__PURE__ */ new Set([]);
860
- newState.halfCheckedKeys = /* @__PURE__ */ new Set([]);
861
- newState.selectedKeys = /* @__PURE__ */ new Set([]);
862
- newState.activeKeys = /* @__PURE__ */ new Set([]);
863
- newState.resolvedCheckedKeys = /* @__PURE__ */ new Set([]);
864
- newState.checkedEntities = keyEntities;
865
- if (hasValue) this.adapter.notifyChange([]);
866
- } else if (isFilterable && isSearching) {
867
- newState.isSearching = false;
868
- this.#clearInput();
869
- this.adapter.notifyOnSearch("");
870
- } else {
871
- if (isFilterable) {
872
- newState.inputValue = "";
873
- this.#clearInput();
874
- this.adapter.notifyOnSearch("");
875
- }
876
- if (!isControlled) newState.selectedKeys = /* @__PURE__ */ new Set([]);
877
- newState.activeKeys = /* @__PURE__ */ new Set([]);
878
- newState.filteredKeys = /* @__PURE__ */ new Set([]);
879
- this.adapter.notifyChange([]);
880
- }
881
- this.adapter.updateStates(newState);
882
- this.adapter.notifyClear();
883
- };
884
- handleListScroll = (e, ind) => {
885
- const { activeKeys, keyEntities } = this.getStates();
886
- const lastActiveKey = [...activeKeys].at(-1);
887
- const data = lastActiveKey ? keyEntities?.[lastActiveKey]?.data ?? null : null;
888
- this.adapter.notifyListScroll(e, {
889
- panelIndex: ind,
890
- activeNode: data
891
- });
892
- };
893
- handleTagRemoveByKey = (key) => {
894
- const { keyEntities } = this.getStates();
895
- const { disabled } = this.getProps();
896
- if (disabled) return;
897
- const removedItem = keyEntities[key];
898
- if (removedItem && !removedItem.data?.disabled) this.#handleMultipleSelect(removedItem);
899
- };
900
- handleTagRemoveInTrigger = (pos) => {
901
- const { treeData, keyMaps } = this.getProps();
902
- const key = getKeyByPos(pos, treeData, keyMaps);
903
- this.handleTagRemoveByKey(key);
904
- };
905
- };
906
- export { CascaderFoundation as default };