react-kui 3.2.1 → 3.3.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 (352) hide show
  1. package/ai/kui-components.json +819 -162
  2. package/es/_virtual/_rolldown/runtime.js +2 -3
  3. package/es/affix/index.js +73 -185
  4. package/es/alert/index.js +3 -4
  5. package/es/anchor/anchor-context.js +2 -3
  6. package/es/anchor/anchor-link.js +3 -4
  7. package/es/anchor/anchor.js +195 -398
  8. package/es/auto-complete/index.js +160 -561
  9. package/es/avatar/avatar-group-context.js +2 -3
  10. package/es/avatar/avatar-group.js +32 -124
  11. package/es/avatar/avatar.js +58 -159
  12. package/es/back-top/index.js +66 -201
  13. package/es/badge/index.js +4 -5
  14. package/es/base/teleport.js +22 -54
  15. package/es/base/transition-props.js +2 -3
  16. package/es/base/transition.js +2 -3
  17. package/es/breadcrumb/breadcrumb-context.js +2 -3
  18. package/es/breadcrumb/breadcrumb-item.js +19 -102
  19. package/es/breadcrumb/breadcrumb.js +10 -59
  20. package/es/button/button-group-context.js +2 -3
  21. package/es/button/button-group.js +15 -75
  22. package/es/button/button.js +4 -5
  23. package/es/calendar/index.js +4 -5
  24. package/es/card/index.js +4 -5
  25. package/es/carousel/carousel-context.js +2 -3
  26. package/es/carousel/carousel-item.js +3 -4
  27. package/es/carousel/carousel.js +281 -628
  28. package/es/carousel/drag.js +2 -3
  29. package/es/cascader/index.js +7 -8
  30. package/es/check-card/check-card-group.js +53 -179
  31. package/es/check-card/check-card.js +100 -293
  32. package/es/check-card/context.js +2 -3
  33. package/es/checkbox/checkbox-group-context.js +2 -3
  34. package/es/checkbox/checkbox-group.js +34 -138
  35. package/es/checkbox/checkbox.js +4 -5
  36. package/es/checkbox/index.js +2 -3
  37. package/es/collapse/collapse-panel.js +84 -206
  38. package/es/collapse/collapse.js +38 -170
  39. package/es/color-picker/alpha.js +44 -125
  40. package/es/color-picker/hue.js +39 -108
  41. package/es/color-picker/index.js +7 -6
  42. package/es/color-picker/mode.js +76 -159
  43. package/es/color-picker/paint.js +66 -163
  44. package/es/color-picker/presets.js +12 -44
  45. package/es/components.js +37 -32
  46. package/es/config/config-context.js +2 -3
  47. package/es/config/context.js +2 -3
  48. package/es/config/index.js +3 -4
  49. package/es/config/popup-host.js +3 -4
  50. package/es/config/size-context.js +2 -3
  51. package/es/config/use-config-appearance.js +3 -4
  52. package/es/const/var.js +2 -3
  53. package/es/date-picker/index.js +8 -9
  54. package/es/descriptions/descriptions-item.js +3 -4
  55. package/es/descriptions/descriptions.js +53 -144
  56. package/es/divider/index.js +2 -3
  57. package/es/drawer/index.js +171 -465
  58. package/es/dropdown/dropdown-button.js +25 -128
  59. package/es/dropdown/dropdown-context.js +2 -3
  60. package/es/dropdown/dropdown.js +56 -207
  61. package/es/dropdown/trigger.js +37 -125
  62. package/es/empty/index.js +34 -111
  63. package/es/feature-card/index.js +2 -3
  64. package/es/feedback-panel/index.js +30 -155
  65. package/es/flame-wrap/index.js +3 -4
  66. package/es/flame-wrap/types.js +2 -3
  67. package/es/flex/index.js +2 -3
  68. package/es/form/field-context.js +3 -4
  69. package/es/form/form-context.js +2 -3
  70. package/es/form/form-item.js +4 -5
  71. package/es/form/form.js +108 -279
  72. package/es/form/utils.js +2 -3
  73. package/es/gradient-picker/corners.js +55 -0
  74. package/es/gradient-picker/index.js +191 -0
  75. package/es/gradient-picker/stops.js +219 -0
  76. package/es/gradient-picker/types.js +147 -0
  77. package/es/grid/grid-item.js +25 -116
  78. package/es/grid/grid.js +40 -151
  79. package/es/grid/useBreakpoint.js +3 -4
  80. package/es/icon/index.js +24 -126
  81. package/es/image/group.js +3 -4
  82. package/es/image/image-group-context.js +2 -3
  83. package/es/image/image.js +5 -6
  84. package/es/image/instance.js +2 -3
  85. package/es/image/preview.js +4 -5
  86. package/es/image/utils.js +2 -3
  87. package/es/index.js +5 -4
  88. package/es/input/index.js +2 -3
  89. package/es/input/input-base.js +4 -5
  90. package/es/input/input-box.js +2 -3
  91. package/es/input/input-group.js +4 -5
  92. package/es/input/input.js +3 -4
  93. package/es/input/textarea.js +3 -4
  94. package/es/input-number/drag.js +63 -0
  95. package/es/input-number/index.js +41 -11
  96. package/es/input-otp/index.js +3 -4
  97. package/es/input-tag/index.js +5 -6
  98. package/es/kanban/index.js +31 -168
  99. package/es/layout/index.js +43 -215
  100. package/es/layout/layout-context.js +2 -3
  101. package/es/list-panel/index.js +47 -185
  102. package/es/loading/index.js +2 -3
  103. package/es/loading/loading-bar.js +54 -114
  104. package/es/locale/de.js +2 -3
  105. package/es/locale/el.js +2 -3
  106. package/es/locale/en.js +2 -3
  107. package/es/locale/fr.js +2 -3
  108. package/es/locale/it.js +2 -3
  109. package/es/locale/ja.js +2 -3
  110. package/es/locale/ko.js +2 -3
  111. package/es/locale/ru.js +2 -3
  112. package/es/locale/th.js +2 -3
  113. package/es/locale/uk.js +2 -3
  114. package/es/locale/vi.js +2 -3
  115. package/es/locale/zh-CN.js +2 -3
  116. package/es/locale/zh-TW.js +2 -3
  117. package/es/mentions/index.js +214 -581
  118. package/es/menu/menu-context.js +2 -3
  119. package/es/menu/menu-divider.js +3 -4
  120. package/es/menu/menu-group.js +3 -4
  121. package/es/menu/menu-item.js +2 -3
  122. package/es/menu/menu-keyboard.js +2 -3
  123. package/es/menu/menu.js +184 -442
  124. package/es/menu/recursive-menu.js +3 -4
  125. package/es/menu/sub-menu.js +5 -6
  126. package/es/message/index.js +2 -3
  127. package/es/modal/api.js +2 -3
  128. package/es/modal/modal.js +263 -599
  129. package/es/modal/toast.js +63 -179
  130. package/es/node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js +2 -3
  131. package/es/notice/container.js +2 -3
  132. package/es/notice/content.js +4 -5
  133. package/es/notice/index.js +2 -3
  134. package/es/notice/instance.js +2 -3
  135. package/es/page/index.js +4 -5
  136. package/es/page/responsive.js +2 -3
  137. package/es/page-header/index.js +3 -4
  138. package/es/popconfirm/index.js +24 -70
  139. package/es/poptip/index.js +29 -88
  140. package/es/popup/index.js +8 -6
  141. package/es/popup/layers.js +2 -3
  142. package/es/progress/index.js +95 -229
  143. package/es/qrcode/index.js +3 -4
  144. package/es/radio/radio-button.js +37 -131
  145. package/es/radio/radio-group-context.js +2 -3
  146. package/es/radio/radio-group.js +69 -223
  147. package/es/radio/radio.js +3 -4
  148. package/es/rate/index.js +68 -226
  149. package/es/rate/star.js +38 -129
  150. package/es/result/index.js +35 -127
  151. package/es/ripple/index.js +3 -4
  152. package/es/ripple/types.js +2 -3
  153. package/es/row-col/col.js +59 -149
  154. package/es/row-col/row.js +2 -3
  155. package/es/segmented/index.js +66 -210
  156. package/es/select/option.js +23 -116
  157. package/es/select/select.js +9 -10
  158. package/es/skeleton/skeleton-avatar.js +2 -3
  159. package/es/skeleton/skeleton-button.js +2 -3
  160. package/es/skeleton/skeleton-image.js +28 -108
  161. package/es/skeleton/skeleton-text.js +17 -93
  162. package/es/skeleton/skeleton.js +46 -133
  163. package/es/skeleton/use-skeleton-loading.js +3 -4
  164. package/es/slider/index.js +92 -286
  165. package/es/slider/thumb.js +43 -133
  166. package/es/space/index.js +3 -4
  167. package/es/spin/index.js +2 -3
  168. package/es/splitter/splitter-panel.js +3 -4
  169. package/es/splitter/splitter.js +77 -219
  170. package/es/stat-card/countup.js +46 -141
  171. package/es/stat-card/rollup.js +27 -105
  172. package/es/stat-card/stat-card.js +3 -4
  173. package/es/stat-card/stat-number.js +26 -113
  174. package/es/stat-card/utils/countup.js +2 -3
  175. package/es/stat-card/utils/odometer.js +2 -3
  176. package/es/stat-card/utils/stat-item-key.js +2 -3
  177. package/es/steps/index.js +45 -123
  178. package/es/switch/index.js +4 -5
  179. package/es/table/column-setting.js +43 -139
  180. package/es/table/index.js +8 -9
  181. package/es/table/utils.js +2 -3
  182. package/es/tabs/tab-panel.js +19 -71
  183. package/es/tabs/tabs.js +6 -7
  184. package/es/tag/index.js +4 -5
  185. package/es/time-line/timeline-item.js +3 -4
  186. package/es/time-line/timeline.js +8 -44
  187. package/es/tooltip/index.js +41 -142
  188. package/es/tour/index.js +138 -356
  189. package/es/transfer/index.js +184 -487
  190. package/es/tree/index.js +8 -9
  191. package/es/tree/utils.js +2 -3
  192. package/es/tree-select/index.js +8 -9
  193. package/es/typography/index.js +75 -306
  194. package/es/upload/file-list.js +95 -119
  195. package/es/upload/index.js +8 -9
  196. package/es/upload/picture-sort.js +2 -3
  197. package/es/upload/selector.js +63 -193
  198. package/es/utils/checked.js +2 -3
  199. package/es/utils/color.js +2 -3
  200. package/es/utils/css.js +2 -3
  201. package/es/utils/focus.js +2 -3
  202. package/es/utils/number.js +2 -3
  203. package/es/utils/overlay-order.js +2 -3
  204. package/es/utils/overlay-stack.js +3 -4
  205. package/es/utils/placement.js +16 -4
  206. package/es/utils/popup-arrow.js +45 -0
  207. package/es/utils/popup.js +2 -3
  208. package/es/utils/promise.js +2 -3
  209. package/es/utils/react-node.js +2 -3
  210. package/es/utils/selection-tags.js +2 -3
  211. package/es/utils/share.js +2 -3
  212. package/es/utils/theme.js +2 -3
  213. package/es/utils/transition.js +2 -3
  214. package/es/utils/use-value.js +3 -4
  215. package/es/virtual-list/index.js +49 -187
  216. package/es/virtual-list/range.js +2 -3
  217. package/es/watermark/index.js +149 -289
  218. package/lib/index.cjs +2 -2
  219. package/lib/locale/de.cjs +1 -1
  220. package/lib/locale/el.cjs +1 -1
  221. package/lib/locale/en.cjs +1 -1
  222. package/lib/locale/fr.cjs +1 -1
  223. package/lib/locale/it.cjs +1 -1
  224. package/lib/locale/ja.cjs +1 -1
  225. package/lib/locale/ko.cjs +1 -1
  226. package/lib/locale/ru.cjs +1 -1
  227. package/lib/locale/th.cjs +1 -1
  228. package/lib/locale/uk.cjs +1 -1
  229. package/lib/locale/vi.cjs +1 -1
  230. package/lib/locale/zh-CN.cjs +1 -1
  231. package/lib/locale/zh-TW.cjs +1 -1
  232. package/package.json +24 -24
  233. package/style/base.css +1 -1
  234. package/style/components.css +2 -2
  235. package/style/index.css +2 -2
  236. package/style/theme.css +1 -1
  237. package/types/affix/index.d.cts +1 -1
  238. package/types/affix/index.d.ts +1 -1
  239. package/types/anchor/anchor-link.d.cts +1 -1
  240. package/types/anchor/anchor-link.d.ts +1 -1
  241. package/types/anchor/anchor.d.cts +1 -1
  242. package/types/anchor/anchor.d.ts +1 -1
  243. package/types/back-top/index.d.cts +1 -1
  244. package/types/back-top/index.d.ts +1 -1
  245. package/types/carousel/carousel-item.d.cts +1 -1
  246. package/types/carousel/carousel-item.d.ts +1 -1
  247. package/types/cascader/index.d.cts +1 -1
  248. package/types/cascader/index.d.ts +1 -1
  249. package/types/color-picker/alpha.d.cts +1 -1
  250. package/types/color-picker/alpha.d.ts +1 -1
  251. package/types/color-picker/hue.d.cts +1 -1
  252. package/types/color-picker/hue.d.ts +1 -1
  253. package/types/color-picker/index.d.cts +3 -2
  254. package/types/color-picker/index.d.ts +3 -2
  255. package/types/color-picker/mode.d.cts +1 -1
  256. package/types/color-picker/mode.d.ts +1 -1
  257. package/types/color-picker/paint.d.cts +1 -1
  258. package/types/color-picker/paint.d.ts +1 -1
  259. package/types/color-picker/presets.d.cts +1 -1
  260. package/types/color-picker/presets.d.ts +1 -1
  261. package/types/components.d.cts +3 -0
  262. package/types/components.d.ts +3 -0
  263. package/types/date-picker/index.d.cts +2 -2
  264. package/types/date-picker/index.d.ts +2 -2
  265. package/types/feature-card/index.d.cts +1 -1
  266. package/types/feature-card/index.d.ts +1 -1
  267. package/types/feedback-panel/index.d.cts +1 -1
  268. package/types/feedback-panel/index.d.ts +1 -1
  269. package/types/flame-wrap/index.d.cts +1 -1
  270. package/types/flame-wrap/index.d.ts +1 -1
  271. package/types/form/form-item.d.cts +1 -1
  272. package/types/form/form-item.d.ts +1 -1
  273. package/types/gradient-picker/corners.d.cts +8 -0
  274. package/types/gradient-picker/corners.d.ts +8 -0
  275. package/types/gradient-picker/index.d.cts +25 -0
  276. package/types/gradient-picker/index.d.ts +25 -0
  277. package/types/gradient-picker/stops.d.cts +12 -0
  278. package/types/gradient-picker/stops.d.ts +12 -0
  279. package/types/gradient-picker/types.d.cts +34 -0
  280. package/types/gradient-picker/types.d.ts +34 -0
  281. package/types/grid/grid-item.d.cts +1 -1
  282. package/types/grid/grid-item.d.ts +1 -1
  283. package/types/grid/grid.d.cts +1 -1
  284. package/types/grid/grid.d.ts +1 -1
  285. package/types/image/group.d.cts +1 -1
  286. package/types/image/group.d.ts +1 -1
  287. package/types/input-number/drag.d.cts +9 -0
  288. package/types/input-number/drag.d.ts +9 -0
  289. package/types/input-number/index.d.cts +1 -0
  290. package/types/input-number/index.d.ts +1 -0
  291. package/types/kanban/index.d.cts +1 -1
  292. package/types/kanban/index.d.ts +1 -1
  293. package/types/list-panel/index.d.cts +1 -1
  294. package/types/list-panel/index.d.ts +1 -1
  295. package/types/loading/loading-bar.d.cts +1 -1
  296. package/types/loading/loading-bar.d.ts +1 -1
  297. package/types/modal/toast.d.cts +1 -1
  298. package/types/modal/toast.d.ts +1 -1
  299. package/types/notice/content.d.cts +2 -2
  300. package/types/notice/content.d.ts +2 -2
  301. package/types/page-header/index.d.cts +1 -1
  302. package/types/page-header/index.d.ts +1 -1
  303. package/types/popconfirm/index.d.cts +1 -0
  304. package/types/popconfirm/index.d.ts +1 -0
  305. package/types/poptip/index.d.cts +1 -0
  306. package/types/poptip/index.d.ts +1 -0
  307. package/types/popup/index.d.cts +1 -0
  308. package/types/popup/index.d.ts +1 -0
  309. package/types/result/index.d.cts +1 -1
  310. package/types/result/index.d.ts +1 -1
  311. package/types/ripple/index.d.cts +1 -1
  312. package/types/ripple/index.d.ts +1 -1
  313. package/types/slider/index.d.cts +1 -1
  314. package/types/slider/index.d.ts +1 -1
  315. package/types/splitter/splitter-panel.d.cts +1 -1
  316. package/types/splitter/splitter-panel.d.ts +1 -1
  317. package/types/splitter/splitter.d.cts +1 -1
  318. package/types/splitter/splitter.d.ts +1 -1
  319. package/types/stat-card/countup.d.cts +1 -1
  320. package/types/stat-card/countup.d.ts +1 -1
  321. package/types/stat-card/rollup.d.cts +1 -1
  322. package/types/stat-card/rollup.d.ts +1 -1
  323. package/types/stat-card/stat-card.d.cts +1 -1
  324. package/types/stat-card/stat-card.d.ts +1 -1
  325. package/types/stat-card/stat-number.d.cts +1 -1
  326. package/types/stat-card/stat-number.d.ts +1 -1
  327. package/types/table/column-setting.d.cts +1 -1
  328. package/types/table/column-setting.d.ts +1 -1
  329. package/types/table/index.d.cts +1 -1
  330. package/types/table/index.d.ts +1 -1
  331. package/types/time-line/timeline-item.d.cts +1 -1
  332. package/types/time-line/timeline-item.d.ts +1 -1
  333. package/types/time-line/timeline.d.cts +1 -1
  334. package/types/time-line/timeline.d.ts +1 -1
  335. package/types/tooltip/index.d.cts +1 -0
  336. package/types/tooltip/index.d.ts +1 -0
  337. package/types/transfer/index.d.cts +1 -1
  338. package/types/transfer/index.d.ts +1 -1
  339. package/types/tree-select/index.d.cts +1 -1
  340. package/types/tree-select/index.d.ts +1 -1
  341. package/types/upload/file-list.d.cts +1 -1
  342. package/types/upload/file-list.d.ts +1 -1
  343. package/types/upload/selector.d.cts +1 -1
  344. package/types/upload/selector.d.ts +1 -1
  345. package/types/utils/placement.d.cts +2 -1
  346. package/types/utils/placement.d.ts +2 -1
  347. package/types/utils/popup-arrow.d.cts +5 -0
  348. package/types/utils/popup-arrow.d.ts +5 -0
  349. package/types/utils/selection-tags.d.cts +1 -1
  350. package/types/utils/selection-tags.d.ts +1 -1
  351. package/types/watermark/index.d.cts +1 -1
  352. package/types/watermark/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -7,187 +7,90 @@
7
7
  */
8
8
 
9
9
  import { clamp } from "../utils/share.js";
10
- import { c } from "react/compiler-runtime";
11
10
  import { useEffect, useLayoutEffect, useRef, useState } from "react";
12
11
  import { jsx, jsxs } from "react/jsx-runtime";
13
12
  import Color from "color";
14
- //#region components/color-picker/paint.tsx
15
- function Paint(t0) {
16
- const $ = c(29);
17
- const { disabled: t1, hue: t2, value, onUpdateRGB } = t0;
18
- const disabled = t1 === void 0 ? false : t1;
19
- const hue = t2 === void 0 ? 0 : t2;
13
+ // components/color-picker/paint.tsx
14
+ function Paint({ disabled = false, hue = 0, value, onUpdateRGB }) {
20
15
  const canvasRef = useRef(null);
21
- const dragCleanupRef = useRef(_temp);
16
+ const dragCleanupRef = useRef(() => void 0);
22
17
  const draggingRef = useRef(false);
23
- let t3;
24
- if ($[0] !== value) {
25
- t3 = Color(value).hsv().object();
26
- $[0] = value;
27
- $[1] = t3;
28
- } else t3 = $[1];
29
- const hsv = t3;
30
- let t4;
31
- if ($[2] !== hsv.s || $[3] !== hsv.v) {
32
- t4 = () => ({
33
- x: hsv.s / 100 * 234 - 7,
34
- y: (1 - hsv.v / 100) * 136 - 7
18
+ const hsv = Color(value).hsv().object();
19
+ const [dotPosition, setDotPosition] = useState(() => ({
20
+ x: hsv.s / 100 * 234 - 7,
21
+ y: (1 - hsv.v / 100) * 136 - 7
22
+ }));
23
+ useEffect(() => {
24
+ const canvas = canvasRef.current, context = canvas?.getContext("2d");
25
+ if (!canvas || !context) return;
26
+ context.fillStyle = `hsl(${hue},100%,50%)`;
27
+ context.fillRect(0, 0, canvas.width, canvas.height);
28
+ const white = context.createLinearGradient(0, 0, canvas.width, 0);
29
+ white.addColorStop(0, "#fff");
30
+ white.addColorStop(1, "rgba(255,255,255,0)");
31
+ context.fillStyle = white;
32
+ context.fillRect(0, 0, canvas.width, canvas.height);
33
+ const black = context.createLinearGradient(0, 0, 0, canvas.height);
34
+ black.addColorStop(0, "rgba(0,0,0,0)");
35
+ black.addColorStop(1, "#000");
36
+ context.fillStyle = black;
37
+ context.fillRect(0, 0, canvas.width, canvas.height);
38
+ }, [hue]);
39
+ useEffect(() => {
40
+ if (draggingRef.current) return;
41
+ const rect = canvasRef.current?.getBoundingClientRect();
42
+ if (!rect) return;
43
+ setDotPosition({
44
+ x: hsv.s / 100 * rect.width - 7,
45
+ y: (1 - hsv.v / 100) * rect.height - 7
35
46
  });
36
- $[2] = hsv.s;
37
- $[3] = hsv.v;
38
- $[4] = t4;
39
- } else t4 = $[4];
40
- const [dotPosition, setDotPosition] = useState(t4);
41
- let t5;
42
- let t6;
43
- if ($[5] !== hue) {
44
- t5 = () => {
45
- const canvas = canvasRef.current;
46
- const context = canvas?.getContext("2d");
47
- if (!canvas || !context) return;
48
- context.fillStyle = `hsl(${hue},100%,50%)`;
49
- context.fillRect(0, 0, canvas.width, canvas.height);
50
- const white = context.createLinearGradient(0, 0, canvas.width, 0);
51
- white.addColorStop(0, "#fff");
52
- white.addColorStop(1, "rgba(255,255,255,0)");
53
- context.fillStyle = white;
54
- context.fillRect(0, 0, canvas.width, canvas.height);
55
- const black = context.createLinearGradient(0, 0, 0, canvas.height);
56
- black.addColorStop(0, "rgba(0,0,0,0)");
57
- black.addColorStop(1, "#000");
58
- context.fillStyle = black;
59
- context.fillRect(0, 0, canvas.width, canvas.height);
60
- };
61
- t6 = [hue];
62
- $[5] = hue;
63
- $[6] = t5;
64
- $[7] = t6;
65
- } else {
66
- t5 = $[6];
67
- t6 = $[7];
68
- }
69
- useEffect(t5, t6);
70
- let t7;
71
- let t8;
72
- if ($[8] !== hsv.s || $[9] !== hsv.v) {
73
- t7 = () => {
74
- if (draggingRef.current) return;
75
- const rect = canvasRef.current?.getBoundingClientRect();
76
- if (!rect) return;
47
+ }, [hsv.s, hsv.v]);
48
+ useEffect(() => () => dragCleanupRef.current(), []);
49
+ useLayoutEffect(() => {
50
+ if (disabled) dragCleanupRef.current();
51
+ }, [disabled]);
52
+ const start = (event) => {
53
+ if (disabled) return;
54
+ draggingRef.current = true;
55
+ const move = (x, y) => {
56
+ const rect_0 = canvasRef.current.getBoundingClientRect();
57
+ const localX = clamp(x - rect_0.left, 0, rect_0.width);
58
+ const localY = clamp(y - rect_0.top, 0, rect_0.height);
59
+ const saturation = localX / rect_0.width * 100;
60
+ const brightness = (1 - localY / rect_0.height) * 100;
77
61
  setDotPosition({
78
- x: hsv.s / 100 * rect.width - 7,
79
- y: (1 - hsv.v / 100) * rect.height - 7
62
+ x: localX - 7,
63
+ y: localY - 7
80
64
  });
65
+ onUpdateRGB?.(Color().hsv(hue, saturation, brightness).rgb().object());
81
66
  };
82
- t8 = [hsv.s, hsv.v];
83
- $[8] = hsv.s;
84
- $[9] = hsv.v;
85
- $[10] = t7;
86
- $[11] = t8;
87
- } else {
88
- t7 = $[10];
89
- t8 = $[11];
90
- }
91
- useEffect(t7, t8);
92
- let t10;
93
- let t9;
94
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
95
- t9 = () => () => dragCleanupRef.current();
96
- t10 = [];
97
- $[12] = t10;
98
- $[13] = t9;
99
- } else {
100
- t10 = $[12];
101
- t9 = $[13];
102
- }
103
- useEffect(t9, t10);
104
- let t11;
105
- let t12;
106
- if ($[14] !== disabled) {
107
- t11 = () => {
108
- if (disabled) dragCleanupRef.current();
109
- };
110
- t12 = [disabled];
111
- $[14] = disabled;
112
- $[15] = t11;
113
- $[16] = t12;
114
- } else {
115
- t11 = $[15];
116
- t12 = $[16];
117
- }
118
- useLayoutEffect(t11, t12);
119
- let t13;
120
- if ($[17] !== disabled || $[18] !== hue || $[19] !== onUpdateRGB) {
121
- t13 = (event) => {
122
- if (disabled) return;
123
- draggingRef.current = true;
124
- const move = (x, y) => {
125
- const rect_0 = canvasRef.current.getBoundingClientRect();
126
- const localX = clamp(x - rect_0.left, 0, rect_0.width);
127
- const localY = clamp(y - rect_0.top, 0, rect_0.height);
128
- const saturation = localX / rect_0.width * 100;
129
- const brightness = (1 - localY / rect_0.height) * 100;
130
- setDotPosition({
131
- x: localX - 7,
132
- y: localY - 7
133
- });
134
- onUpdateRGB?.(Color().hsv(hue, saturation, brightness).rgb().object());
135
- };
136
- move(event.clientX, event.clientY);
137
- const mousemove = (item) => move(item.clientX, item.clientY);
138
- dragCleanupRef.current();
139
- const up = () => {
140
- draggingRef.current = false;
141
- document.removeEventListener("mousemove", mousemove);
142
- document.removeEventListener("mouseup", up);
143
- };
144
- dragCleanupRef.current = up;
145
- document.addEventListener("mousemove", mousemove);
146
- document.addEventListener("mouseup", up);
67
+ move(event.clientX, event.clientY);
68
+ const mousemove = (item) => move(item.clientX, item.clientY);
69
+ dragCleanupRef.current();
70
+ const up = () => {
71
+ draggingRef.current = false;
72
+ document.removeEventListener("mousemove", mousemove);
73
+ document.removeEventListener("mouseup", up);
147
74
  };
148
- $[17] = disabled;
149
- $[18] = hue;
150
- $[19] = onUpdateRGB;
151
- $[20] = t13;
152
- } else t13 = $[20];
153
- const start = t13;
154
- let t14;
155
- if ($[21] !== start) {
156
- t14 = /* @__PURE__ */ jsx("canvas", {
75
+ dragCleanupRef.current = up;
76
+ document.addEventListener("mousemove", mousemove);
77
+ document.addEventListener("mouseup", up);
78
+ };
79
+ return /* @__PURE__ */ jsxs("div", {
80
+ className: "k-color-picker-paint-container",
81
+ children: [/* @__PURE__ */ jsx("canvas", {
157
82
  className: "k-color-picker-paint",
158
83
  width: 234,
159
84
  height: 136,
160
85
  ref: canvasRef,
161
86
  onMouseDown: start
162
- });
163
- $[21] = start;
164
- $[22] = t14;
165
- } else t14 = $[22];
166
- let t15;
167
- if ($[23] !== dotPosition.x || $[24] !== dotPosition.y) {
168
- t15 = /* @__PURE__ */ jsx("span", {
87
+ }), /* @__PURE__ */ jsx("span", {
169
88
  className: "k-color-picker-paint-dot",
170
89
  style: {
171
90
  left: dotPosition.x,
172
91
  top: dotPosition.y
173
92
  }
174
- });
175
- $[23] = dotPosition.x;
176
- $[24] = dotPosition.y;
177
- $[25] = t15;
178
- } else t15 = $[25];
179
- let t16;
180
- if ($[26] !== t14 || $[27] !== t15) {
181
- t16 = /* @__PURE__ */ jsxs("div", {
182
- className: "k-color-picker-paint-container",
183
- children: [t14, t15]
184
- });
185
- $[26] = t14;
186
- $[27] = t15;
187
- $[28] = t16;
188
- } else t16 = $[28];
189
- return t16;
93
+ })]
94
+ });
190
95
  }
191
- function _temp() {}
192
- //#endregion
193
96
  export { Paint as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -8,10 +8,9 @@
8
8
 
9
9
  import { Check } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
10
10
  import Icon from "../icon/index.js";
11
- import { c } from "react/compiler-runtime";
12
11
  import { jsx } from "react/jsx-runtime";
13
12
  import Color from "color";
14
- //#region components/color-picker/presets.tsx
13
+ // components/color-picker/presets.tsx
15
14
  var defaults = [
16
15
  "#f44336",
17
16
  "#e91e63",
@@ -34,47 +33,16 @@ var defaults = [
34
33
  "#607d8b",
35
34
  "#000"
36
35
  ];
37
- function Presets(t0) {
38
- const $ = c(11);
39
- const { color, presets: t1, onUpdateColor } = t0;
40
- const presets = t1 === void 0 ? defaults : t1;
36
+ function Presets({ color, presets = defaults, onUpdateColor }) {
41
37
  if (!presets.length) return null;
42
- let t2;
43
- if ($[0] !== color) {
44
- t2 = Color(color).hex();
45
- $[0] = color;
46
- $[1] = t2;
47
- } else t2 = $[1];
48
- const active = t2;
49
- let t3;
50
- if ($[2] !== active || $[3] !== onUpdateColor || $[4] !== presets) {
51
- let t4;
52
- if ($[6] !== active || $[7] !== onUpdateColor) {
53
- t4 = (hex) => /* @__PURE__ */ jsx("span", {
54
- style: { backgroundColor: hex },
55
- onClick: () => onUpdateColor?.(Color(hex)),
56
- children: active === Color(hex).hex() && /* @__PURE__ */ jsx(Icon, { type: Check })
57
- }, hex);
58
- $[6] = active;
59
- $[7] = onUpdateColor;
60
- $[8] = t4;
61
- } else t4 = $[8];
62
- t3 = presets.map(t4);
63
- $[2] = active;
64
- $[3] = onUpdateColor;
65
- $[4] = presets;
66
- $[5] = t3;
67
- } else t3 = $[5];
68
- let t4;
69
- if ($[9] !== t3) {
70
- t4 = /* @__PURE__ */ jsx("div", {
71
- className: "k-color-picker-presets",
72
- children: t3
73
- });
74
- $[9] = t3;
75
- $[10] = t4;
76
- } else t4 = $[10];
77
- return t4;
38
+ const active = Color(color).hex();
39
+ return /* @__PURE__ */ jsx("div", {
40
+ className: "k-color-picker-presets",
41
+ children: presets.map((hex) => /* @__PURE__ */ jsx("span", {
42
+ style: { backgroundColor: hex },
43
+ onClick: () => onUpdateColor?.(Color(hex)),
44
+ children: active === Color(hex).hex() && /* @__PURE__ */ jsx(Icon, { type: Check })
45
+ }, hex))
46
+ });
78
47
  }
79
- //#endregion
80
48
  export { Presets as default };
package/es/components.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -9,27 +9,22 @@
9
9
  import { __exportAll } from "./_virtual/_rolldown/runtime.js";
10
10
  import Affix from "./affix/index.js";
11
11
  import Popup from "./popup/index.js";
12
- import Icon from "./icon/index.js";
13
12
  import Alert from "./alert/index.js";
14
- import Button from "./button/button.js";
15
- import ButtonGroup from "./button/button-group.js";
16
13
  import Calendar from "./calendar/index.js";
17
- import Empty from "./empty/index.js";
18
14
  import Kanban from "./kanban/index.js";
19
- import Avatar from "./avatar/avatar.js";
20
- import AvatarGroup from "./avatar/avatar-group.js";
21
- import Card, { CardMeta } from "./card/index.js";
22
15
  import ListPanel from "./list-panel/index.js";
23
- import input_group_default from "./input/input-group.js";
24
- import input_default from "./input/input.js";
25
- import textarea_default from "./input/textarea.js";
26
16
  import auto_complete_default from "./auto-complete/index.js";
27
17
  import Anchor from "./anchor/anchor.js";
28
18
  import AnchorLink from "./anchor/anchor-link.js";
19
+ import Avatar from "./avatar/avatar.js";
20
+ import AvatarGroup from "./avatar/avatar-group.js";
29
21
  import Breadcrumb from "./breadcrumb/breadcrumb.js";
30
22
  import BreadcrumbItem from "./breadcrumb/breadcrumb-item.js";
31
23
  import BackTop from "./back-top/index.js";
32
24
  import Badge from "./badge/index.js";
25
+ import Button from "./button/button.js";
26
+ import ButtonGroup from "./button/button-group.js";
27
+ import Card, { CardMeta } from "./card/index.js";
33
28
  import Carousel from "./carousel/carousel.js";
34
29
  import CarouselItem from "./carousel/carousel-item.js";
35
30
  import checkbox_default from "./checkbox/checkbox.js";
@@ -38,15 +33,9 @@ import check_card_default from "./check-card/check-card.js";
38
33
  import check_card_group_default from "./check-card/check-card-group.js";
39
34
  import Collapse from "./collapse/collapse.js";
40
35
  import CollapsePanel from "./collapse/collapse-panel.js";
41
- import input_number_default from "./input-number/index.js";
42
- import Option from "./select/option.js";
43
- import Space from "./space/index.js";
44
- import Tag from "./tag/index.js";
45
- import Tooltip, { TooltipPanel } from "./tooltip/index.js";
46
- import { getVirtualRange } from "./virtual-list/range.js";
47
- import VirtualList from "./virtual-list/index.js";
48
- import select_default from "./select/select.js";
49
36
  import color_picker_default, { ColorPickerPanel } from "./color-picker/index.js";
37
+ import gradient_picker_default from "./gradient-picker/index.js";
38
+ import { createCornerGradient, createLinearGradient, formatGradient } from "./gradient-picker/types.js";
50
39
  import date_picker_default, { DatePickerPanel } from "./date-picker/index.js";
51
40
  import Descriptions from "./descriptions/descriptions.js";
52
41
  import DescriptionsItem from "./descriptions/descriptions-item.js";
@@ -54,9 +43,8 @@ import Drawer from "./drawer/index.js";
54
43
  import Dropdown from "./dropdown/dropdown.js";
55
44
  import DropdownButton from "./dropdown/dropdown-button.js";
56
45
  import Divider from "./divider/index.js";
46
+ import Empty from "./empty/index.js";
57
47
  import Form from "./form/form.js";
58
- import Col from "./row-col/col.js";
59
- import Row from "./row-col/row.js";
60
48
  import FormItem from "./form/form-item.js";
61
49
  import Flex from "./flex/index.js";
62
50
  import FeatureCard from "./feature-card/index.js";
@@ -64,23 +52,27 @@ import { FlameWrap } from "./flame-wrap/index.js";
64
52
  import FeedbackPanel from "./feedback-panel/index.js";
65
53
  import Grid from "./grid/grid.js";
66
54
  import GridItem from "./grid/grid-item.js";
67
- import slider_default from "./slider/index.js";
68
55
  import ImageGroup from "./image/group.js";
69
56
  import KImage from "./image/image.js";
57
+ import Icon from "./icon/index.js";
58
+ import input_default from "./input/input.js";
59
+ import input_group_default from "./input/input-group.js";
60
+ import textarea_default from "./input/textarea.js";
70
61
  import input_tag_default from "./input-tag/index.js";
62
+ import input_number_default from "./input-number/index.js";
71
63
  import input_otp_default from "./input-otp/index.js";
72
64
  import { Content, Footer, Header, Layout, Sider } from "./layout/index.js";
73
65
  import loading from "./loading/index.js";
74
- import { MenuItem } from "./menu/menu-item.js";
75
- import { SubMenu } from "./menu/sub-menu.js";
76
66
  import { Menu } from "./menu/menu.js";
77
67
  import { MenuDivider } from "./menu/menu-divider.js";
78
68
  import { MenuGroup } from "./menu/menu-group.js";
79
- import { MessagePanel, NoticePanel } from "./notice/content.js";
69
+ import { MenuItem } from "./menu/menu-item.js";
70
+ import { SubMenu } from "./menu/sub-menu.js";
80
71
  import message from "./message/index.js";
81
72
  import mentions_default from "./mentions/index.js";
82
- import Modal, { ModalPanel } from "./modal/modal.js";
73
+ import { MessagePanel, NoticePanel } from "./notice/content.js";
83
74
  import { modal } from "./modal/api.js";
75
+ import Modal, { ModalPanel } from "./modal/modal.js";
84
76
  import notice from "./notice/index.js";
85
77
  import Page from "./page/index.js";
86
78
  import PageHeader from "./page-header/index.js";
@@ -88,7 +80,6 @@ import Poptip, { PoptipPanel } from "./poptip/index.js";
88
80
  import Popconfirm, { PopconfirmPanel } from "./popconfirm/index.js";
89
81
  import Progress from "./progress/index.js";
90
82
  import { Ripple } from "./ripple/index.js";
91
- import Spin from "./spin/index.js";
92
83
  import QRCode from "./qrcode/index.js";
93
84
  import radio_default from "./radio/radio.js";
94
85
  import radio_button_default from "./radio/radio-button.js";
@@ -96,34 +87,45 @@ import radio_group_default from "./radio/radio-group.js";
96
87
  import segmented_default from "./segmented/index.js";
97
88
  import rate_default from "./rate/index.js";
98
89
  import Result from "./result/index.js";
90
+ import Option from "./select/option.js";
91
+ import select_default from "./select/select.js";
99
92
  import ConfigProvider from "./config/index.js";
100
93
  import Skeleton from "./skeleton/skeleton.js";
101
94
  import SkeletonAvatar from "./skeleton/skeleton-avatar.js";
102
95
  import SkeletonButton from "./skeleton/skeleton-button.js";
103
96
  import SkeletonImage from "./skeleton/skeleton-image.js";
104
97
  import SkeletonText from "./skeleton/skeleton-text.js";
105
- import StatNumber from "./stat-card/stat-number.js";
106
98
  import StatCard from "./stat-card/stat-card.js";
99
+ import StatNumber from "./stat-card/stat-number.js";
100
+ import slider_default from "./slider/index.js";
101
+ import Space from "./space/index.js";
102
+ import Spin from "./spin/index.js";
107
103
  import Steps, { Step } from "./steps/index.js";
108
104
  import switch_default from "./switch/index.js";
109
105
  import { Splitter } from "./splitter/splitter.js";
110
106
  import { SplitterPanel } from "./splitter/splitter-panel.js";
111
- import { TableColumnSetting } from "./table/column-setting.js";
112
107
  import Table from "./table/index.js";
108
+ import Tooltip, { TooltipPanel } from "./tooltip/index.js";
113
109
  import Tour from "./tour/index.js";
114
110
  import TabPanel from "./tabs/tab-panel.js";
115
111
  import Tabs from "./tabs/tabs.js";
116
112
  import TimeLine from "./time-line/timeline.js";
113
+ import { TableColumnSetting } from "./table/column-setting.js";
117
114
  import TimeLineItem from "./time-line/timeline-item.js";
118
115
  import Tree from "./tree/index.js";
119
116
  import tree_select_default from "./tree-select/index.js";
120
117
  import cascader_default from "./cascader/index.js";
118
+ import Tag from "./tag/index.js";
119
+ import Col from "./row-col/col.js";
120
+ import Row from "./row-col/row.js";
121
121
  import upload_default from "./upload/index.js";
122
122
  import Watermark from "./watermark/index.js";
123
123
  import Theme from "./utils/theme.js";
124
+ import VirtualList from "./virtual-list/index.js";
125
+ import { getVirtualRange } from "./virtual-list/range.js";
124
126
  import transfer_default from "./transfer/index.js";
125
127
  import Typography, { TypographyParagraph, TypographyText, TypographyTitle } from "./typography/index.js";
126
- //#region components/components.ts
128
+ // components/components.ts
127
129
  var components_exports = /* @__PURE__ */ __exportAll({
128
130
  Affix: () => Affix,
129
131
  Alert: () => Alert,
@@ -171,6 +173,7 @@ var components_exports = /* @__PURE__ */ __exportAll({
171
173
  Footer: () => Footer,
172
174
  Form: () => Form,
173
175
  FormItem: () => FormItem,
176
+ GradientPicker: () => gradient_picker_default,
174
177
  Grid: () => Grid,
175
178
  GridItem: () => GridItem,
176
179
  Header: () => Header,
@@ -251,6 +254,9 @@ var components_exports = /* @__PURE__ */ __exportAll({
251
254
  Upload: () => upload_default,
252
255
  VirtualList: () => VirtualList,
253
256
  Watermark: () => Watermark,
257
+ createCornerGradient: () => createCornerGradient,
258
+ createLinearGradient: () => createLinearGradient,
259
+ formatGradient: () => formatGradient,
254
260
  getVirtualRange: () => getVirtualRange,
255
261
  loading: () => loading,
256
262
  message: () => message,
@@ -258,5 +264,4 @@ var components_exports = /* @__PURE__ */ __exportAll({
258
264
  notice: () => notice,
259
265
  theme: () => Theme
260
266
  });
261
- //#endregion
262
- export { Affix, Alert, Anchor, AnchorLink, auto_complete_default as AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, CardMeta, Carousel, CarouselItem, cascader_default as Cascader, check_card_default as CheckCard, check_card_group_default as CheckCardGroup, checkbox_default as Checkbox, checkbox_group_default as CheckboxGroup, Col, Collapse, CollapsePanel, color_picker_default as ColorPicker, ColorPickerPanel, ConfigProvider, Content, date_picker_default as DatePicker, DatePickerPanel, Descriptions, DescriptionsItem, Divider, Drawer, Dropdown, DropdownButton, Empty, FeatureCard, FeedbackPanel, FlameWrap, Flex, Footer, Form, FormItem, Grid, GridItem, Header, Icon, ImageGroup, input_default as Input, input_group_default as InputGroup, input_number_default as InputNumber, input_otp_default as InputOTP, input_tag_default as InputTag, KImage, Kanban, Layout, ListPanel, mentions_default as Mentions, Menu, MenuDivider, MenuGroup, MenuItem, MessagePanel, Modal, ModalPanel, NoticePanel, Option, Page, PageHeader, Popconfirm, PopconfirmPanel, Poptip, PoptipPanel, Popup, Progress, QRCode, radio_default as Radio, radio_button_default as RadioButton, radio_group_default as RadioGroup, rate_default as Rate, Result, Ripple, Row, segmented_default as Segmented, select_default as Select, Sider, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonText, slider_default as Slider, Space, Spin, Splitter, SplitterPanel, StatCard, StatNumber, Step, Steps, SubMenu, switch_default as Switch, TabPanel, Table, TableColumnSetting, Tabs, Tag, textarea_default as TextArea, TimeLine, TimeLineItem, Tooltip, TooltipPanel, Tour, transfer_default as Transfer, Tree, tree_select_default as TreeSelect, Typography, TypographyParagraph, TypographyText, TypographyTitle, upload_default as Upload, VirtualList, Watermark, components_exports, getVirtualRange, loading, message, modal, notice, Theme as theme };
267
+ export { Affix, Alert, Anchor, AnchorLink, auto_complete_default as AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Calendar, Card, CardMeta, Carousel, CarouselItem, cascader_default as Cascader, check_card_default as CheckCard, check_card_group_default as CheckCardGroup, checkbox_default as Checkbox, checkbox_group_default as CheckboxGroup, Col, Collapse, CollapsePanel, color_picker_default as ColorPicker, ColorPickerPanel, ConfigProvider, Content, date_picker_default as DatePicker, DatePickerPanel, Descriptions, DescriptionsItem, Divider, Drawer, Dropdown, DropdownButton, Empty, FeatureCard, FeedbackPanel, FlameWrap, Flex, Footer, Form, FormItem, gradient_picker_default as GradientPicker, Grid, GridItem, Header, Icon, ImageGroup, input_default as Input, input_group_default as InputGroup, input_number_default as InputNumber, input_otp_default as InputOTP, input_tag_default as InputTag, KImage, Kanban, Layout, ListPanel, mentions_default as Mentions, Menu, MenuDivider, MenuGroup, MenuItem, MessagePanel, Modal, ModalPanel, NoticePanel, Option, Page, PageHeader, Popconfirm, PopconfirmPanel, Poptip, PoptipPanel, Popup, Progress, QRCode, radio_default as Radio, radio_button_default as RadioButton, radio_group_default as RadioGroup, rate_default as Rate, Result, Ripple, Row, segmented_default as Segmented, select_default as Select, Sider, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonText, slider_default as Slider, Space, Spin, Splitter, SplitterPanel, StatCard, StatNumber, Step, Steps, SubMenu, switch_default as Switch, TabPanel, Table, TableColumnSetting, Tabs, Tag, textarea_default as TextArea, TimeLine, TimeLineItem, Tooltip, TooltipPanel, Tour, transfer_default as Transfer, Tree, tree_select_default as TreeSelect, Typography, TypographyParagraph, TypographyText, TypographyTitle, upload_default as Upload, VirtualList, Watermark, components_exports, createCornerGradient, createLinearGradient, formatGradient, getVirtualRange, loading, message, modal, notice, Theme as theme };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -8,7 +8,7 @@
8
8
 
9
9
  import en_default from "../locale/en.js";
10
10
  import { createContext } from "react";
11
- //#region components/config/config-context.ts
11
+ // components/config/config-context.ts
12
12
  /**
13
13
  * 没有 ConfigProvider 兜底时用的语言。
14
14
  * 默认值只有这一个出处,组件里不许再各自写 `|| zhCN` 之类的兜底;要改库级默认就改这里。
@@ -22,5 +22,4 @@ var DEFAULT_LOCALE = en_default;
22
22
  */
23
23
  var EMPTY_CONFIG = { locale: null };
24
24
  var ConfigContext = createContext(EMPTY_CONFIG);
25
- //#endregion
26
25
  export { ConfigContext, DEFAULT_LOCALE, EMPTY_CONFIG };
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.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
- //#region components/config/context.ts
9
+ // components/config/context.ts
10
10
  var __mousePoint = null;
11
11
  var recordMousePoint = () => {
12
12
  if (typeof window !== "undefined") document.addEventListener("mousedown", (e) => {
@@ -49,5 +49,4 @@ var subscribeConfig = (listener) => {
49
49
  listeners.delete(listener);
50
50
  };
51
51
  };
52
- //#endregion
53
52
  export { currentConfig, getMousePoint, pushConfig, recordMousePoint, subscribeConfig };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -8,10 +8,10 @@
8
8
 
9
9
  import { ConfigContext, EMPTY_CONFIG } from "./config-context.js";
10
10
  import { pushConfig } from "./context.js";
11
- import { c } from "react/compiler-runtime";
12
11
  import { useContext, useEffect } from "react";
13
12
  import { jsx } from "react/jsx-runtime";
14
- //#region components/config/index.tsx
13
+ import { c } from "react/compiler-runtime";
14
+ // components/config/index.tsx
15
15
  var ConfigProvider = (t0) => {
16
16
  const $ = c(13);
17
17
  const { locale, getPopupContainer, size, shape, theme, children } = t0;
@@ -67,5 +67,4 @@ var ConfigProvider = (t0) => {
67
67
  } else t9 = $[12];
68
68
  return t9;
69
69
  };
70
- //#endregion
71
70
  export { ConfigProvider as default };
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.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 { c } from "react/compiler-runtime";
10
9
  import { createContext, useContext, useEffect, useRef } from "react";
11
- //#region components/config/popup-host.ts
10
+ import { c } from "react/compiler-runtime";
11
+ // components/config/popup-host.ts
12
12
  /**
13
13
  * Modal / Drawer 用它给自己圈一个浮层作用域:挂在里面的 Popup(下拉、气泡、子菜单……)
14
14
  * 把关闭方法登记进来,宿主窗口关的时候一起关掉——否则窗口都没了,teleported 的下拉还悬在 body 上。
@@ -102,5 +102,4 @@ function usePopupHost(close) {
102
102
  }
103
103
  useEffect(t1, t2);
104
104
  }
105
- //#endregion
106
105
  export { PopupHostContext, usePopupHost, usePopupHostScope };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -7,7 +7,6 @@
7
7
  */
8
8
 
9
9
  import React from "react";
10
- //#region components/config/size-context.ts
10
+ // components/config/size-context.ts
11
11
  var SizeContext = React.createContext(void 0);
12
- //#endregion
13
12
  export { SizeContext };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * react-kui v3.2.1
2
+ * react-kui v3.3.0
3
3
  * Copyright 2017-present, kui-react.
4
4
  * All rights reserved.
5
5
  * Homepage: https://react.k-ui.cn
@@ -8,9 +8,9 @@
8
8
 
9
9
  import { ConfigContext } from "./config-context.js";
10
10
  import { FormContext } from "../form/form-context.js";
11
- import { c } from "react/compiler-runtime";
12
11
  import { useContext } from "react";
13
- //#region components/config/use-config-appearance.ts
12
+ import { c } from "react/compiler-runtime";
13
+ // components/config/use-config-appearance.ts
14
14
  /**
15
15
  * What a `ConfigProvider` says about everything under it. Form is deliberately absent: `Form`'s `size`,
16
16
  * `shape` and `theme` are documented as the appearance of its *child controls*, and a Card, Table or Alert
@@ -95,5 +95,4 @@ var SURFACE_THEMES = [
95
95
  "solid",
96
96
  "dashed"
97
97
  ];
98
- //#endregion
99
98
  export { SURFACE_THEMES, normalizeSurfaceShape, resolvePaintedTheme, resolveTheme, useConfigAppearance, useFormAppearance };