react-kui 3.1.1 → 3.2.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 (396) hide show
  1. package/README.zh-CN.md +3 -1
  2. package/ai/kui-components.json +912 -318
  3. package/es/_virtual/_rolldown/runtime.js +1 -1
  4. package/es/affix/index.js +1 -1
  5. package/es/alert/index.js +11 -4
  6. package/es/anchor/anchor-context.js +1 -1
  7. package/es/anchor/anchor-link.js +1 -1
  8. package/es/anchor/anchor.js +1 -1
  9. package/es/auto-complete/index.js +371 -347
  10. package/es/avatar/avatar-group-context.js +1 -1
  11. package/es/avatar/avatar-group.js +1 -1
  12. package/es/avatar/avatar.js +1 -1
  13. package/es/back-top/index.js +1 -1
  14. package/es/badge/index.js +10 -8
  15. package/es/base/teleport.js +1 -1
  16. package/es/base/transition-props.js +1 -1
  17. package/es/base/transition.js +1 -1
  18. package/es/breadcrumb/breadcrumb-context.js +1 -1
  19. package/es/breadcrumb/breadcrumb-item.js +1 -1
  20. package/es/breadcrumb/breadcrumb.js +1 -1
  21. package/es/button/button-group-context.js +1 -1
  22. package/es/button/button-group.js +1 -1
  23. package/es/button/button.js +13 -6
  24. package/es/calendar/index.js +20 -6
  25. package/es/card/index.js +11 -4
  26. package/es/carousel/carousel-context.js +1 -1
  27. package/es/carousel/carousel-item.js +1 -1
  28. package/es/carousel/carousel.js +1 -1
  29. package/es/carousel/drag.js +1 -1
  30. package/es/cascader/index.js +13 -10
  31. package/es/check-card/check-card-group.js +3 -3
  32. package/es/check-card/check-card.js +155 -141
  33. package/es/check-card/context.js +1 -1
  34. package/es/checkbox/checkbox-group-context.js +1 -1
  35. package/es/checkbox/checkbox-group.js +3 -3
  36. package/es/checkbox/checkbox.js +64 -244
  37. package/es/checkbox/index.js +1 -1
  38. package/es/collapse/collapse-panel.js +1 -1
  39. package/es/collapse/collapse.js +96 -82
  40. package/es/color-picker/alpha.js +1 -1
  41. package/es/color-picker/hue.js +1 -1
  42. package/es/color-picker/index.js +7 -7
  43. package/es/color-picker/mode.js +2 -2
  44. package/es/color-picker/paint.js +1 -1
  45. package/es/color-picker/presets.js +1 -1
  46. package/es/components.js +4 -4
  47. package/es/config/config-context.js +16 -3
  48. package/es/config/context.js +29 -2
  49. package/es/config/index.js +31 -12
  50. package/es/config/popup-host.js +106 -0
  51. package/es/config/size-context.js +1 -1
  52. package/es/config/use-config-appearance.js +62 -2
  53. package/es/const/var.js +6 -2
  54. package/es/date-picker/index.js +404 -885
  55. package/es/descriptions/descriptions-item.js +1 -1
  56. package/es/descriptions/descriptions.js +1 -1
  57. package/es/divider/index.js +1 -1
  58. package/es/drawer/index.js +328 -240
  59. package/es/dropdown/dropdown-button.js +69 -51
  60. package/es/dropdown/dropdown-context.js +1 -1
  61. package/es/dropdown/dropdown.js +137 -93
  62. package/es/dropdown/trigger.js +85 -33
  63. package/es/empty/index.js +3 -4
  64. package/es/feature-card/index.js +15 -4
  65. package/es/feedback-panel/index.js +95 -81
  66. package/es/flame-wrap/index.js +116 -109
  67. package/es/flame-wrap/types.js +54 -6
  68. package/es/flex/index.js +1 -1
  69. package/es/form/field-context.js +16 -2
  70. package/es/form/form-context.js +1 -1
  71. package/es/form/form-item.js +7 -6
  72. package/es/form/form.js +1 -1
  73. package/es/form/utils.js +1 -1
  74. package/es/grid/grid-item.js +1 -1
  75. package/es/grid/grid.js +1 -1
  76. package/es/grid/useBreakpoint.js +1 -1
  77. package/es/icon/index.js +1 -1
  78. package/es/image/group.js +1 -1
  79. package/es/image/image-group-context.js +1 -1
  80. package/es/image/image.js +137 -123
  81. package/es/image/instance.js +1 -1
  82. package/es/image/preview.js +1 -1
  83. package/es/image/utils.js +1 -1
  84. package/es/index.js +3 -3
  85. package/es/input/index.js +3 -3
  86. package/es/input/input-base.js +7 -7
  87. package/es/input/input-box.js +2 -2
  88. package/es/input/input-group.js +43 -127
  89. package/es/input/input.js +1 -1
  90. package/es/input/textarea.js +28 -114
  91. package/es/input-number/index.js +7 -5
  92. package/es/input-otp/index.js +5 -5
  93. package/es/input-tag/index.js +5 -5
  94. package/es/kanban/index.js +79 -63
  95. package/es/layout/index.js +1 -1
  96. package/es/layout/layout-context.js +1 -1
  97. package/es/list-panel/index.js +96 -83
  98. package/es/loading/index.js +1 -1
  99. package/es/loading/loading-bar.js +1 -1
  100. package/es/locale/de.js +10 -2
  101. package/es/locale/el.js +10 -2
  102. package/es/locale/en.js +10 -2
  103. package/es/locale/fr.js +10 -2
  104. package/es/locale/it.js +10 -2
  105. package/es/locale/ja.js +10 -2
  106. package/es/locale/ko.js +10 -2
  107. package/es/locale/ru.js +10 -2
  108. package/es/locale/th.js +10 -2
  109. package/es/locale/uk.js +10 -2
  110. package/es/locale/vi.js +10 -2
  111. package/es/locale/zh-CN.js +10 -2
  112. package/es/locale/zh-TW.js +10 -2
  113. package/es/mentions/index.js +291 -286
  114. package/es/menu/menu-context.js +1 -1
  115. package/es/menu/menu-divider.js +1 -1
  116. package/es/menu/menu-group.js +1 -1
  117. package/es/menu/menu-item.js +1 -1
  118. package/es/menu/menu-keyboard.js +41 -2
  119. package/es/menu/menu.js +268 -222
  120. package/es/menu/recursive-menu.js +1 -1
  121. package/es/menu/sub-menu.js +81 -23
  122. package/es/message/index.js +1 -1
  123. package/es/modal/api.js +46 -12
  124. package/es/modal/modal.js +441 -345
  125. package/es/modal/toast.js +177 -64
  126. package/es/node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js +1 -1
  127. package/es/notice/container.js +1 -1
  128. package/es/notice/content.js +1 -1
  129. package/es/notice/index.js +1 -1
  130. package/es/notice/instance.js +1 -1
  131. package/es/page/index.js +13 -8
  132. package/es/page/responsive.js +1 -1
  133. package/es/page-header/index.js +1 -1
  134. package/es/popconfirm/index.js +36 -35
  135. package/es/poptip/index.js +47 -45
  136. package/es/popup/index.js +5 -2
  137. package/es/popup/layers.js +11 -2
  138. package/es/progress/index.js +1 -1
  139. package/es/qrcode/index.js +13 -7
  140. package/es/radio/radio-button.js +51 -44
  141. package/es/radio/radio-group-context.js +1 -1
  142. package/es/radio/radio-group.js +49 -52
  143. package/es/radio/radio.js +46 -197
  144. package/es/rate/index.js +1 -1
  145. package/es/rate/star.js +1 -1
  146. package/es/result/index.js +1 -1
  147. package/es/ripple/index.js +104 -97
  148. package/es/ripple/types.js +71 -18
  149. package/es/row-col/col.js +1 -1
  150. package/es/row-col/row.js +1 -1
  151. package/es/segmented/index.js +3 -3
  152. package/es/select/option.js +1 -1
  153. package/es/select/select.js +33 -36
  154. package/es/skeleton/skeleton-avatar.js +1 -1
  155. package/es/skeleton/skeleton-button.js +1 -1
  156. package/es/skeleton/skeleton-image.js +1 -1
  157. package/es/skeleton/skeleton-text.js +1 -1
  158. package/es/skeleton/skeleton.js +1 -1
  159. package/es/skeleton/use-skeleton-loading.js +1 -1
  160. package/es/slider/index.js +1 -1
  161. package/es/slider/thumb.js +1 -1
  162. package/es/space/index.js +1 -1
  163. package/es/spin/index.js +1 -1
  164. package/es/splitter/splitter-panel.js +1 -1
  165. package/es/splitter/splitter.js +1 -1
  166. package/es/stat-card/countup.js +2 -2
  167. package/es/stat-card/rollup.js +1 -1
  168. package/es/stat-card/stat-card.js +16 -7
  169. package/es/stat-card/stat-number.js +4 -3
  170. package/es/stat-card/utils/countup.js +1 -1
  171. package/es/stat-card/utils/odometer.js +1 -1
  172. package/es/stat-card/utils/stat-item-key.js +22 -0
  173. package/es/steps/index.js +1 -1
  174. package/es/switch/index.js +3 -3
  175. package/es/table/column-setting.js +104 -115
  176. package/es/table/index.js +544 -206
  177. package/es/table/utils.js +141 -3
  178. package/es/tabs/tab-panel.js +1 -1
  179. package/es/tabs/tabs.js +1 -1
  180. package/es/tag/index.js +12 -5
  181. package/es/time-line/timeline-item.js +1 -1
  182. package/es/time-line/timeline.js +1 -1
  183. package/es/tooltip/index.js +114 -94
  184. package/es/tour/index.js +1 -1
  185. package/es/transfer/index.js +190 -172
  186. package/es/tree/index.js +55 -44
  187. package/es/tree/utils.js +1 -1
  188. package/es/tree-select/index.js +259 -781
  189. package/es/typography/index.js +1 -1
  190. package/es/upload/file-list.js +1 -1
  191. package/es/upload/index.js +5 -6
  192. package/es/upload/picture-sort.js +1 -1
  193. package/es/upload/selector.js +1 -1
  194. package/es/utils/checked.js +1 -1
  195. package/es/utils/color.js +25 -2
  196. package/es/utils/css.js +19 -0
  197. package/es/utils/focus.js +63 -0
  198. package/es/utils/number.js +1 -1
  199. package/es/utils/overlay-order.js +18 -0
  200. package/es/utils/overlay-stack.js +33 -0
  201. package/es/utils/placement.js +1 -1
  202. package/es/utils/popup.js +1 -1
  203. package/es/utils/promise.js +18 -0
  204. package/es/utils/react-node.js +55 -30
  205. package/es/utils/selection-tags.js +6 -4
  206. package/es/utils/share.js +5 -2
  207. package/es/utils/theme.js +1 -1
  208. package/es/utils/transition.js +1 -1
  209. package/es/utils/use-value.js +1 -1
  210. package/es/virtual-list/index.js +1 -1
  211. package/es/virtual-list/range.js +3 -2
  212. package/es/watermark/index.js +1 -1
  213. package/lib/index.cjs +2 -2
  214. package/lib/locale/de.cjs +2 -2
  215. package/lib/locale/el.cjs +2 -2
  216. package/lib/locale/en.cjs +2 -2
  217. package/lib/locale/fr.cjs +2 -2
  218. package/lib/locale/it.cjs +2 -2
  219. package/lib/locale/ja.cjs +2 -2
  220. package/lib/locale/ko.cjs +2 -2
  221. package/lib/locale/ru.cjs +2 -2
  222. package/lib/locale/th.cjs +2 -2
  223. package/lib/locale/uk.cjs +2 -2
  224. package/lib/locale/vi.cjs +2 -2
  225. package/lib/locale/zh-CN.cjs +2 -2
  226. package/lib/locale/zh-TW.cjs +2 -2
  227. package/package.json +4 -3
  228. package/readme.md +3 -1
  229. package/style/base.css +2 -2
  230. package/style/components.css +2 -2
  231. package/style/index.css +2 -2
  232. package/style/theme.css +2 -2
  233. package/types/alert/index.d.cts +2 -2
  234. package/types/alert/index.d.ts +2 -2
  235. package/types/auto-complete/index.d.cts +7 -1
  236. package/types/auto-complete/index.d.ts +7 -1
  237. package/types/badge/index.d.cts +2 -1
  238. package/types/badge/index.d.ts +2 -1
  239. package/types/button/button.d.cts +2 -2
  240. package/types/button/button.d.ts +2 -2
  241. package/types/card/index.d.cts +3 -3
  242. package/types/card/index.d.ts +3 -3
  243. package/types/cascader/index.d.cts +1 -1
  244. package/types/cascader/index.d.ts +1 -1
  245. package/types/cascader/types.d.cts +2 -0
  246. package/types/cascader/types.d.ts +2 -0
  247. package/types/check-card/context.d.cts +4 -3
  248. package/types/check-card/context.d.ts +4 -3
  249. package/types/check-card/index.d.cts +1 -1
  250. package/types/check-card/index.d.ts +1 -1
  251. package/types/check-card/types.d.cts +3 -4
  252. package/types/check-card/types.d.ts +3 -4
  253. package/types/checkbox/checkbox-group.d.cts +2 -2
  254. package/types/checkbox/checkbox-group.d.ts +2 -2
  255. package/types/checkbox/checkbox.d.cts +2 -2
  256. package/types/checkbox/checkbox.d.ts +2 -2
  257. package/types/collapse/collapse.d.cts +3 -3
  258. package/types/collapse/collapse.d.ts +3 -3
  259. package/types/color-picker/index.d.cts +3 -1
  260. package/types/color-picker/index.d.ts +3 -1
  261. package/types/components.d.cts +2 -2
  262. package/types/components.d.ts +2 -2
  263. package/types/config/config-context.d.cts +15 -2
  264. package/types/config/config-context.d.ts +15 -2
  265. package/types/config/context.d.cts +6 -0
  266. package/types/config/context.d.ts +6 -0
  267. package/types/config/popup-host.d.cts +16 -0
  268. package/types/config/popup-host.d.ts +16 -0
  269. package/types/config/use-config-appearance.d.cts +41 -2
  270. package/types/config/use-config-appearance.d.ts +41 -2
  271. package/types/const/types.d.cts +30 -1
  272. package/types/const/types.d.ts +30 -1
  273. package/types/const/var.d.cts +6 -1
  274. package/types/const/var.d.ts +6 -1
  275. package/types/date-picker/index.d.cts +3 -1
  276. package/types/date-picker/index.d.ts +3 -1
  277. package/types/descriptions/descriptions.d.cts +2 -2
  278. package/types/descriptions/descriptions.d.ts +2 -2
  279. package/types/drawer/index.d.cts +1 -0
  280. package/types/drawer/index.d.ts +1 -0
  281. package/types/dropdown/dropdown-button.d.cts +5 -2
  282. package/types/dropdown/dropdown-button.d.ts +5 -2
  283. package/types/dropdown/dropdown-context.d.cts +6 -0
  284. package/types/dropdown/dropdown-context.d.ts +6 -0
  285. package/types/dropdown/dropdown.d.cts +2 -0
  286. package/types/dropdown/dropdown.d.ts +2 -0
  287. package/types/feature-card/index.d.cts +3 -3
  288. package/types/feature-card/index.d.ts +3 -3
  289. package/types/feedback-panel/index.d.cts +3 -3
  290. package/types/feedback-panel/index.d.ts +3 -3
  291. package/types/flame-wrap/types.d.cts +18 -0
  292. package/types/flame-wrap/types.d.ts +18 -0
  293. package/types/form/field-context.d.cts +2 -0
  294. package/types/form/field-context.d.ts +2 -0
  295. package/types/image/image.d.cts +2 -2
  296. package/types/image/image.d.ts +2 -2
  297. package/types/input/input-group.d.cts +2 -2
  298. package/types/input/input-group.d.ts +2 -2
  299. package/types/input-number/index.d.cts +2 -0
  300. package/types/input-number/index.d.ts +2 -0
  301. package/types/kanban/index.d.cts +3 -2
  302. package/types/kanban/index.d.ts +3 -2
  303. package/types/list-panel/index.d.cts +3 -3
  304. package/types/list-panel/index.d.ts +3 -3
  305. package/types/locale/de.d.cts +6 -0
  306. package/types/locale/de.d.ts +6 -0
  307. package/types/locale/el.d.cts +6 -0
  308. package/types/locale/el.d.ts +6 -0
  309. package/types/locale/en.d.cts +6 -0
  310. package/types/locale/en.d.ts +6 -0
  311. package/types/locale/fr.d.cts +6 -0
  312. package/types/locale/fr.d.ts +6 -0
  313. package/types/locale/it.d.cts +6 -0
  314. package/types/locale/it.d.ts +6 -0
  315. package/types/locale/ja.d.cts +6 -0
  316. package/types/locale/ja.d.ts +6 -0
  317. package/types/locale/ko.d.cts +6 -0
  318. package/types/locale/ko.d.ts +6 -0
  319. package/types/locale/ru.d.cts +6 -0
  320. package/types/locale/ru.d.ts +6 -0
  321. package/types/locale/th.d.cts +6 -0
  322. package/types/locale/th.d.ts +6 -0
  323. package/types/locale/uk.d.cts +6 -0
  324. package/types/locale/uk.d.ts +6 -0
  325. package/types/locale/vi.d.cts +6 -0
  326. package/types/locale/vi.d.ts +6 -0
  327. package/types/locale/zh-CN.d.cts +6 -0
  328. package/types/locale/zh-CN.d.ts +6 -0
  329. package/types/locale/zh-TW.d.cts +6 -0
  330. package/types/locale/zh-TW.d.ts +6 -0
  331. package/types/mentions/index.d.cts +2 -0
  332. package/types/mentions/index.d.ts +2 -0
  333. package/types/menu/menu-keyboard.d.cts +23 -0
  334. package/types/menu/menu-keyboard.d.ts +23 -0
  335. package/types/modal/api.d.cts +6 -1
  336. package/types/modal/api.d.ts +6 -1
  337. package/types/modal/modal.d.cts +1 -0
  338. package/types/modal/modal.d.ts +1 -0
  339. package/types/modal/toast.d.cts +8 -2
  340. package/types/modal/toast.d.ts +8 -2
  341. package/types/page/index.d.cts +2 -2
  342. package/types/page/index.d.ts +2 -2
  343. package/types/popconfirm/index.d.cts +2 -0
  344. package/types/popconfirm/index.d.ts +2 -0
  345. package/types/poptip/index.d.cts +2 -0
  346. package/types/poptip/index.d.ts +2 -0
  347. package/types/popup/layers.d.cts +2 -0
  348. package/types/popup/layers.d.ts +2 -0
  349. package/types/qrcode/index.d.cts +2 -2
  350. package/types/qrcode/index.d.ts +2 -2
  351. package/types/radio/radio-button.d.cts +2 -2
  352. package/types/radio/radio-button.d.ts +2 -2
  353. package/types/radio/radio-group.d.cts +2 -2
  354. package/types/radio/radio-group.d.ts +2 -2
  355. package/types/radio/radio.d.cts +2 -2
  356. package/types/radio/radio.d.ts +2 -2
  357. package/types/ripple/types.d.cts +18 -0
  358. package/types/ripple/types.d.ts +18 -0
  359. package/types/select/select.d.cts +2 -0
  360. package/types/select/select.d.ts +2 -0
  361. package/types/stat-card/stat-card.d.cts +3 -3
  362. package/types/stat-card/stat-card.d.ts +3 -3
  363. package/types/stat-card/utils/stat-item-key.d.cts +11 -0
  364. package/types/stat-card/utils/stat-item-key.d.ts +11 -0
  365. package/types/table/column-setting.d.cts +4 -4
  366. package/types/table/column-setting.d.ts +4 -4
  367. package/types/table/index.d.cts +2 -2
  368. package/types/table/index.d.ts +2 -2
  369. package/types/table/types.d.cts +21 -2
  370. package/types/table/types.d.ts +21 -2
  371. package/types/table/utils.d.cts +75 -0
  372. package/types/table/utils.d.ts +75 -0
  373. package/types/tag/index.d.cts +2 -2
  374. package/types/tag/index.d.ts +2 -2
  375. package/types/tooltip/index.d.cts +2 -0
  376. package/types/tooltip/index.d.ts +2 -0
  377. package/types/transfer/index.d.cts +3 -2
  378. package/types/transfer/index.d.ts +3 -2
  379. package/types/tree-select/index.d.cts +3 -1
  380. package/types/tree-select/index.d.ts +3 -1
  381. package/types/utils/checked.d.cts +1 -1
  382. package/types/utils/checked.d.ts +1 -1
  383. package/types/utils/color.d.cts +13 -0
  384. package/types/utils/color.d.ts +13 -0
  385. package/types/utils/css.d.cts +2 -0
  386. package/types/utils/css.d.ts +2 -0
  387. package/types/utils/focus.d.cts +5 -0
  388. package/types/utils/focus.d.ts +5 -0
  389. package/types/utils/overlay-order.d.cts +6 -0
  390. package/types/utils/overlay-order.d.ts +6 -0
  391. package/types/utils/overlay-stack.d.cts +13 -0
  392. package/types/utils/overlay-stack.d.ts +13 -0
  393. package/types/utils/promise.d.cts +5 -0
  394. package/types/utils/promise.d.ts +5 -0
  395. package/types/utils/react-node.d.cts +10 -0
  396. package/types/utils/react-node.d.ts +10 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -21,6 +21,27 @@ var DEFAULTS = {
21
21
  };
22
22
  var MAX_RIPPLES = 12;
23
23
  var BASE_SPEED = 340;
24
+ /**
25
+ * Chrome 156 renames the experimental boolean `layoutsubtree` to the
26
+ * standardized `content="drawable"`, and the element handed to
27
+ * `drawElementImage()` now declares itself with its own `drawable` attribute
28
+ * (WICG html-in-canvas issue #169). Browsers advertise the new spelling with a
29
+ * reflected `content` IDL attribute, so the shape is read off the prototype
30
+ * rather than sniffed from a version string: every release only ever sees the
31
+ * attribute it understands.
32
+ */
33
+ function htmlInCanvasMarkup() {
34
+ const legacy = {
35
+ canvas: { layoutsubtree: "true" },
36
+ element: {}
37
+ };
38
+ if (typeof document === "undefined") return legacy;
39
+ if (!("content" in HTMLCanvasElement.prototype)) return legacy;
40
+ return {
41
+ canvas: { content: "drawable" },
42
+ element: { drawable: "" }
43
+ };
44
+ }
24
45
  var VERT = `#version 300 es
25
46
  precision highp float;
26
47
  layout(location = 0) in vec2 aPos;
@@ -81,8 +102,15 @@ void main () {
81
102
  float shade = pow(clamp(-g * 1.6, 0.0, 1.0), 2.0) * uShine * 0.3;
82
103
 
83
104
  if (uHasContent < 0.5) {
84
- float a = clamp(glint * 0.9 + shade * 0.5, 0.0, 0.85);
85
- outColor = vec4(vec3(glint * 0.9), a);
105
+ // Degraded overlay: the page behind the canvas cannot be sampled here, so
106
+ // the wave has to paint itself. White on the lit flank alone vanishes over
107
+ // light content and black on the shadow flank alone vanishes over dark
108
+ // content, so each ring half takes the tone its slope points at and the
109
+ // ripple stays legible whatever the host page is coloured like.
110
+ float dark = pow(clamp(-g * 1.6, 0.0, 1.0), 2.0) * uShine;
111
+ float a = clamp((glint + dark) * 0.8, 0.0, 0.5);
112
+ vec3 tone = glint > dark ? vec3(1.0) : vec3(0.0);
113
+ outColor = vec4(tone * a, a);
86
114
  return;
87
115
  }
88
116
 
@@ -141,22 +169,46 @@ function createRipple(elements, options = {}) {
141
169
  let wake = () => {};
142
170
  let appearanceFrame = 0;
143
171
  let appearanceObserver = null;
144
- if (htmlInCanvas) {
145
- paintable.onpaint = () => {
172
+ let usesPaintEvent = false;
173
+ /**
174
+ * Keep the live DOM copy lined up with the pixels drawn from it, so pointer
175
+ * input, focus rings and screen reader bounds land where the user sees them.
176
+ * Which half of that job the browser does changed twice, so the branch keys
177
+ * off what the draw call actually hands back instead of a version number.
178
+ */
179
+ function syncGeometry(transform) {
180
+ if (transform && typeof transform.toString === "function") {
181
+ if (paintable.updateElementGeometry) paintable.updateElementGeometry(content, { canvasTransform: transform });
182
+ else content.style.transform = transform.toString();
183
+ return;
184
+ }
185
+ if (content.style.transform) content.style.transform = "";
186
+ }
187
+ function onPaint() {
188
+ try {
189
+ sourceCtx.reset();
190
+ for (const background of getBackgroundStack(content)) {
191
+ sourceCtx.fillStyle = background;
192
+ sourceCtx.fillRect(0, 0, source.width, source.height);
193
+ }
194
+ const transform = sourceCtx.drawElementImage(content, 0, 0);
195
+ contentDirty = true;
146
196
  try {
147
- sourceCtx.reset();
148
- for (const background of getBackgroundStack(content)) {
149
- sourceCtx.fillStyle = background;
150
- sourceCtx.fillRect(0, 0, source.width, source.height);
151
- }
152
- const transform = sourceCtx.drawElementImage(content, 0, 0);
153
- if (transform) content.style.transform = transform.toString();
154
- contentDirty = true;
155
- wake();
197
+ syncGeometry(transform);
156
198
  } catch (error) {
157
- console.error("Ripple failed to capture its HTML content:", error);
199
+ console.error("Ripple failed to align its HTML content:", error);
158
200
  }
159
- };
201
+ wake();
202
+ } catch (error) {
203
+ console.error("Ripple failed to capture its HTML content:", error);
204
+ }
205
+ }
206
+ if (htmlInCanvas) {
207
+ if ("onpaint" in paintable) paintable.onpaint = onPaint;
208
+ else {
209
+ usesPaintEvent = true;
210
+ source.addEventListener("paint", onPaint);
211
+ }
160
212
  appearanceObserver = new MutationObserver(() => {
161
213
  cancelAnimationFrame(appearanceFrame);
162
214
  appearanceFrame = requestAnimationFrame(() => {
@@ -423,11 +475,12 @@ function createRipple(elements, options = {}) {
423
475
  gl.deleteShader(fragmentShader);
424
476
  gl.deleteBuffer(quad);
425
477
  if (htmlInCanvas) {
426
- paintable.onpaint = null;
478
+ if (usesPaintEvent) source.removeEventListener("paint", onPaint);
479
+ else paintable.onpaint = null;
427
480
  content.style.removeProperty("transform");
428
481
  }
429
482
  }
430
483
  };
431
484
  }
432
485
  //#endregion
433
- export { createRipple, supportsHtmlInCanvas };
486
+ export { createRipple, htmlInCanvasMarkup, supportsHtmlInCanvas };
package/es/row-col/col.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
package/es/row-col/row.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
6
6
  * Author: Qiu / https://chuchur.com
7
7
  */
8
8
 
9
- import { useConfigAppearance } from "../config/use-config-appearance.js";
9
+ import { useFormAppearance } from "../config/use-config-appearance.js";
10
10
  import Icon from "../icon/index.js";
11
11
  import { useValue } from "../utils/use-value.js";
12
12
  import { createFormFieldComponent } from "../form/field-context.js";
@@ -66,7 +66,7 @@ var Segmented = (t0) => {
66
66
  const readOnly = t3 === void 0 ? false : t3;
67
67
  const block = t4 === void 0 ? false : t4;
68
68
  const direction = t5 === void 0 ? "horizontal" : t5;
69
- const inheritedAppearance = useConfigAppearance();
69
+ const inheritedAppearance = useFormAppearance();
70
70
  const size = sizeProp ?? inheritedAppearance.size ?? "medium";
71
71
  const shape = shapeProp ?? inheritedAppearance.shape ?? "round";
72
72
  const rootRef = useRef(null);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,16 +1,15 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
6
6
  * Author: Qiu / https://chuchur.com
7
7
  */
8
8
 
9
- import zh_CN_default from "../locale/zh-CN.js";
10
- import { ConfigContext } from "../config/config-context.js";
9
+ import { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.js";
11
10
  import { getChildren } from "../utils/react-node.js";
12
11
  import Popup from "../popup/index.js";
13
- import { useConfigAppearance } from "../config/use-config-appearance.js";
12
+ import { resolveTheme, useFormAppearance } from "../config/use-config-appearance.js";
14
13
  import { ChevronDown, CircleX, Loading } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
15
14
  import Icon from "../icon/index.js";
16
15
  import { useValue } from "../utils/use-value.js";
@@ -29,12 +28,13 @@ var normalizeValue = (value) => {
29
28
  if (isEmpty(value)) return [];
30
29
  return typeof value === "string" || typeof value === "number" ? [value] : [];
31
30
  };
32
- var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, maxTagCount, value, open: openProp, clearable = true, filterable = false, allowCreate = false, block = false, disabled = false, readOnly = false, multiple = false, loading = false, bordered = true, extendWidth = true, showArrow = true, options, theme: themeProp, emptyText, loadingText, icon, shape: shapeProp, virtual = false, itemHeight = 33, overscan = 5, arrowIcon, onSearch, onChange, onSelect, onClear: onClearCallback, onOpenChange, children, className = "", style, ...rest }) => {
33
- const inheritedAppearance = useConfigAppearance();
31
+ var isSameLabelMap = (next, previous) => next.size === previous.size && [...next].every(([val, label]) => previous.has(val) && Object.is(previous.get(val), label));
32
+ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", destroyOnClose = true, width, maxTagCount, value, open: openProp, clearable = true, filterable = false, allowCreate = false, block = false, disabled = false, readOnly = false, multiple = false, loading = false, bordered = true, extendWidth = true, showArrow = true, options, theme: themeProp, emptyText, loadingText, icon, shape: shapeProp, virtual = false, itemHeight = 33, overscan = 5, arrowIcon, onSearch, onChange, onSelect, onClear: onClearCallback, onOpenChange, children, className = "", style, ...rest }) => {
33
+ const inheritedAppearance = useFormAppearance();
34
34
  const size = sizeProp ?? inheritedAppearance.size;
35
- const theme = themeProp ?? inheritedAppearance.theme ?? "fill";
35
+ const theme = resolveTheme(themeProp ?? inheritedAppearance.theme, "fill");
36
36
  const shape = shapeProp ?? inheritedAppearance.shape;
37
- const locale = useContext(ConfigContext)?.locale || zh_CN_default;
37
+ const locale = useContext(ConfigContext)?.locale || DEFAULT_LOCALE;
38
38
  const [innerVisible, setInnerVisible] = useValue(openProp, (next) => next ?? false);
39
39
  const visible = innerVisible;
40
40
  const setVisible = (next_0) => {
@@ -99,17 +99,14 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
99
99
  const optionHeight = optionEl.offsetHeight;
100
100
  containerEl.scrollTop = optionTop - containerEl.clientHeight / 2 + optionHeight / 2;
101
101
  };
102
- const labelText = useMemo(() => {
103
- if (!optionsData || optionsData.length === 0) return [];
104
- const lookup = /* @__PURE__ */ new Map();
105
- optionsData.forEach((item) => {
106
- lookup.set(item.value, item.label);
107
- });
108
- return currentValue.map((val_0) => lookup.get(val_0) ?? val_0);
109
- }, [optionsData, currentValue]);
110
- const isChecked = (val_1) => {
111
- if (multiple) return currentValue.indexOf(val_1) >= 0;
112
- else return !isEmpty(currentValue) && currentValue[0] === val_1;
102
+ const [selectedLabels, setSelectedLabels] = useState(() => /* @__PURE__ */ new Map());
103
+ const lookup = new Map((loading && options ? options : optionsData).map((item) => [item.value, item.label]));
104
+ const nextLabels = new Map(currentValue.map((val_0) => [val_0, lookup.get(val_0) ?? selectedLabels.get(val_0) ?? val_0]));
105
+ if (!isSameLabelMap(nextLabels, selectedLabels)) setSelectedLabels(nextLabels);
106
+ const labelText = currentValue.map((val_1) => nextLabels.get(val_1));
107
+ const isChecked = (val_2) => {
108
+ if (multiple) return currentValue.indexOf(val_2) >= 0;
109
+ else return !isEmpty(currentValue) && currentValue[0] === val_2;
113
110
  };
114
111
  function clearQuery() {
115
112
  setActiveIndex(-1);
@@ -130,14 +127,14 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
130
127
  };
131
128
  function handleSelect(item_0) {
132
129
  if (disabled || readOnly) return;
133
- const { value: val_2, label: lbl } = item_0;
130
+ const { value: val_3, label: lbl } = item_0;
134
131
  let selected = true;
135
132
  let nextValue = [...currentValue];
136
133
  if (multiple) {
137
- if (nextValue.indexOf(val_2) >= 0) {
134
+ if (nextValue.indexOf(val_3) >= 0) {
138
135
  selected = false;
139
- nextValue = nextValue.filter((v) => v !== val_2);
140
- } else nextValue.push(val_2);
136
+ nextValue = nextValue.filter((v) => v !== val_3);
137
+ } else nextValue.push(val_3);
141
138
  setTimeout(updatePosition, 0);
142
139
  if (searchable) {
143
140
  if (queryInputRef.current) {
@@ -145,11 +142,11 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
145
142
  queryInputRef.current.style.width = "";
146
143
  }
147
144
  setQueryKey("");
148
- setActiveIndex(optionsData.findIndex((option_0) => option_0.value === val_2));
145
+ setActiveIndex(optionsData.findIndex((option_0) => option_0.value === val_3));
149
146
  showQuery();
150
147
  }
151
148
  } else {
152
- nextValue = [val_2];
149
+ nextValue = [val_3];
153
150
  setVisible(false);
154
151
  onOpenChange?.(false);
155
152
  clearQuery();
@@ -159,7 +156,7 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
159
156
  const outputValue = multiple ? nextValue : nextValue[0];
160
157
  onChange?.(outputValue);
161
158
  onSelect?.({
162
- value: val_2,
159
+ value: val_3,
163
160
  label: lbl,
164
161
  selected
165
162
  });
@@ -225,15 +222,15 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
225
222
  return filterable && key.trim() !== "" ? optionsData.filter((item_1) => String(item_1.label).toLowerCase().includes(key.toLowerCase())) : optionsData;
226
223
  }
227
224
  useLayoutEffect(() => {
228
- if (!visible) return;
229
- if (queryInputMirrorRef.current && queryInputRef.current) {
225
+ if (queryInputVisible && queryInputMirrorRef.current && queryInputRef.current) {
230
226
  const availableWidth = Math.max((refSelection.current?.clientWidth || 0) - 40, 7);
231
227
  const contentWidth = Math.max(queryInputMirrorRef.current.offsetWidth + 2, 7);
232
228
  queryInputRef.current.style.width = `${Math.min(contentWidth, availableWidth)}px`;
233
229
  }
234
- updatePosition();
230
+ if (visible) updatePosition();
235
231
  }, [
236
232
  visible,
233
+ queryInputVisible,
237
234
  queryKey,
238
235
  optionsData,
239
236
  loading,
@@ -322,17 +319,17 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
322
319
  } else if (e_1.key === "Tab") closeDropdown();
323
320
  };
324
321
  const renderOption = (item_3, index_3) => {
325
- const { label: label_0, value: val_3, disabled: optionDisabled } = item_3;
322
+ const { label: label_0, value: val_4, disabled: optionDisabled } = item_3;
326
323
  return /* @__PURE__ */ jsx(Option, {
327
324
  onSelect: handleSelect,
328
325
  onMouseEnter: optionDisabled ? void 0 : () => onMouseenter(index_3),
329
326
  active: activeIndex === index_3,
330
- value: val_3,
327
+ value: val_4,
331
328
  label: label_0,
332
329
  disabled: optionDisabled,
333
- checked: isChecked(val_3),
330
+ checked: isChecked(val_4),
334
331
  multiple
335
- }, `${val_3}-${label_0}`);
332
+ }, `${val_4}-${label_0}`);
336
333
  };
337
334
  const queryKeydown = (e_2) => {
338
335
  if (disabled || readOnly) return;
@@ -390,7 +387,7 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
390
387
  prefixCls: "k-select-dropdown",
391
388
  transitionName: "k-select",
392
389
  matchTriggerWidth: extendWidth,
393
- destroyOnClose: true,
390
+ destroyOnClose,
394
391
  onOpenChange: (next_2) => {
395
392
  if (!next_2) closeDropdown();
396
393
  },
@@ -461,10 +458,10 @@ var Select = ({ placeholder, size: sizeProp, placement = "bottom-left", width, m
461
458
  "k-select-readonly": readOnly,
462
459
  "k-select-block": block,
463
460
  "k-select-opened": visible,
464
- "k-select-borderless": bordered === false || theme === "plain",
461
+ "k-select-borderless": bordered === false,
462
+ [`k-select-${theme}`]: true,
465
463
  "k-select-lg": size === "large",
466
464
  "k-select-sm": size === "small",
467
- "k-select-fill": theme === "fill",
468
465
  "k-select-has-icon": icon,
469
466
  "k-select-circle": shape === "circle" && !multiple,
470
467
  "k-select-square": shape === "square",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
package/es/space/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
package/es/spin/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -79,7 +79,7 @@ function CountUpNumber(t0) {
79
79
  t9 = () => {
80
80
  if (!elementRef.current) return;
81
81
  const observeVisibility = autoAnimate && typeof IntersectionObserver !== "undefined";
82
- const safeDuration = Number.isFinite(duration) ? Math.max(0, duration) : 0;
82
+ const safeDuration = typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches || !Number.isFinite(duration) ? 0 : Math.max(0, duration);
83
83
  const options = {
84
84
  duration: type === "rollup" ? 0 : safeDuration,
85
85
  separator,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,19 +1,28 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
6
6
  * Author: Qiu / https://chuchur.com
7
7
  */
8
8
 
9
- import { normalizeSurfaceShape, useConfigAppearance } from "../config/use-config-appearance.js";
9
+ import { hasRenderableContent } from "../utils/react-node.js";
10
+ import { normalizeSurfaceShape, resolvePaintedTheme, useConfigAppearance } from "../config/use-config-appearance.js";
10
11
  import StatNumber from "./stat-number.js";
12
+ import { statItemKey } from "./utils/stat-item-key.js";
11
13
  import clsx from "clsx";
12
14
  import { jsx, jsxs } from "react/jsx-runtime";
13
15
  //#region components/stat-card/stat-card.tsx
16
+ var PAINTED_THEMES = [
17
+ "fill",
18
+ "outline",
19
+ "plain",
20
+ "solid",
21
+ "dashed"
22
+ ];
14
23
  function StatCard({ title, precision = 0, items = [], separator, statNumberType = "countup", reverse = false, bordered = false, theme: themeProp, shape: shapeProp, size: sizeProp, prefix, suffix, className, ...rest }) {
15
24
  const inheritedAppearance = useConfigAppearance();
16
- const theme = themeProp ?? inheritedAppearance.theme ?? "fill";
25
+ const theme = resolvePaintedTheme(themeProp ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "fill";
17
26
  const shape = normalizeSurfaceShape(shapeProp ?? inheritedAppearance.shape ?? "round");
18
27
  const size = sizeProp ?? inheritedAppearance.size ?? "medium";
19
28
  return /* @__PURE__ */ jsxs("div", {
@@ -24,7 +33,7 @@ function StatCard({ title, precision = 0, items = [], separator, statNumberType
24
33
  [`k-stat-card-${shape}`]: shape,
25
34
  [`k-stat-card-${size}`]: size
26
35
  }, className),
27
- children: [title != null && /* @__PURE__ */ jsx("div", {
36
+ children: [hasRenderableContent(title) && /* @__PURE__ */ jsx("div", {
28
37
  className: "k-stat-card-title",
29
38
  children: title
30
39
  }), /* @__PURE__ */ jsx("div", {
@@ -46,16 +55,16 @@ function StatCard({ title, precision = 0, items = [], separator, statNumberType
46
55
  suffix: item.suffix ?? suffix
47
56
  })
48
57
  }),
49
- item.desc != null && /* @__PURE__ */ jsx("div", {
58
+ hasRenderableContent(item.desc) && /* @__PURE__ */ jsx("div", {
50
59
  className: "k-stat-card-item-desc",
51
60
  children: item.desc
52
61
  }),
53
- item.trend != null && item.trend !== false && /* @__PURE__ */ jsx("div", {
62
+ hasRenderableContent(item.trend) && /* @__PURE__ */ jsx("div", {
54
63
  className: clsx("k-stat-card-item-trend", `k-stat-card-item-trend-${item.trendStatus || "default"}`),
55
64
  children: item.trend
56
65
  })
57
66
  ]
58
- }, `${typeof (item.key ?? index)}:${String(item.key ?? index)}`))
67
+ }, statItemKey(item, index)))
59
68
  })]
60
69
  });
61
70
  }
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
6
6
  * Author: Qiu / https://chuchur.com
7
7
  */
8
8
 
9
+ import { hasRenderableContent } from "../utils/react-node.js";
9
10
  import CountUpNumber from "./countup.js";
10
11
  import { c } from "react/compiler-runtime";
11
12
  import clsx from "clsx";
@@ -64,7 +65,7 @@ function StatNumber(t0) {
64
65
  } else t6 = $[13];
65
66
  let t7;
66
67
  if ($[14] !== prefix) {
67
- t7 = prefix != null && /* @__PURE__ */ jsx("span", {
68
+ t7 = hasRenderableContent(prefix) && /* @__PURE__ */ jsx("span", {
68
69
  className: "k-stat-number-prefix",
69
70
  children: prefix
70
71
  });
@@ -94,7 +95,7 @@ function StatNumber(t0) {
94
95
  } else t9 = $[23];
95
96
  let t10;
96
97
  if ($[24] !== suffix) {
97
- t10 = suffix != null && /* @__PURE__ */ jsx("span", {
98
+ t10 = hasRenderableContent(suffix) && /* @__PURE__ */ jsx("span", {
98
99
  className: "k-stat-number-suffix",
99
100
  children: suffix
100
101
  });
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -0,0 +1,22 @@
1
+ /*!
2
+ * react-kui v3.2.0
3
+ * Copyright 2017-present, kui-react.
4
+ * All rights reserved.
5
+ * Homepage: https://react.k-ui.cn
6
+ * Author: Qiu / https://chuchur.com
7
+ */
8
+
9
+ //#region components/stat-card/utils/stat-item-key.ts
10
+ /**
11
+ * Identity of one `items` entry across renders.
12
+ *
13
+ * The `kui-item-` prefix keeps a keyless item's position out of the namespace of
14
+ * caller-supplied keys: without it `[{key: 1}, {}]` hands two different metrics the
15
+ * same key, which lets the diffing move a CountUp instance from one item to the
16
+ * other. This rule and these strings are identical in both builds.
17
+ */
18
+ function statItemKey(item, index) {
19
+ return String(item.key ?? `kui-item-${index}`);
20
+ }
21
+ //#endregion
22
+ export { statItemKey };
package/es/steps/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * react-kui v3.1.1
2
+ * react-kui v3.2.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
6
6
  * Author: Qiu / https://chuchur.com
7
7
  */
8
8
 
9
- import { useConfigAppearance } from "../config/use-config-appearance.js";
9
+ import { useFormAppearance } from "../config/use-config-appearance.js";
10
10
  import { Loading } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
11
11
  import Icon from "../icon/index.js";
12
12
  import { useValue } from "../utils/use-value.js";
@@ -17,7 +17,7 @@ import "react";
17
17
  import { jsx, jsxs } from "react/jsx-runtime";
18
18
  //#region components/switch/index.tsx
19
19
  var Switch = ({ checked, valueType = "boolean", type, color, disabled = false, readOnly = false, loading = false, size: sizeProp, shape: shapeProp, trueText, falseText, checkedChildren, unCheckedChildren, onChange, className = "", style, onClick, ...rest }) => {
20
- const inheritedAppearance = useConfigAppearance();
20
+ const inheritedAppearance = useFormAppearance();
21
21
  const size = sizeProp ?? inheritedAppearance.size;
22
22
  const shape = shapeProp ?? inheritedAppearance.shape ?? "round";
23
23
  const [innerChecked, setInnerChecked] = useValue(checked, (next) => next ?? false);