@vef-framework/components 2.0.4 → 2.0.5

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 (459) hide show
  1. package/dist/cjs/_base/constants/breakpoints.cjs +1 -16
  2. package/dist/cjs/_base/constants/common.cjs +1 -36
  3. package/dist/cjs/_base/constants/css-vars.cjs +1 -680
  4. package/dist/cjs/_base/constants/index.cjs +1 -21
  5. package/dist/cjs/_base/helpers/breakpoints.cjs +1 -30
  6. package/dist/cjs/_base/helpers/color.cjs +1 -16
  7. package/dist/cjs/_base/helpers/common.cjs +1 -22
  8. package/dist/cjs/_base/helpers/index.cjs +1 -40
  9. package/dist/cjs/_base/helpers/message.cjs +1 -53
  10. package/dist/cjs/_base/helpers/modal.cjs +1 -122
  11. package/dist/cjs/_base/helpers/notification.cjs +1 -72
  12. package/dist/cjs/_base/helpers/props.cjs +1 -19
  13. package/dist/cjs/_base/helpers/react.cjs +1 -12
  14. package/dist/cjs/_base/hooks/index.cjs +1 -10
  15. package/dist/cjs/_base/hooks/use-theme-tokens.cjs +1 -18
  16. package/dist/cjs/_base/index.cjs +1 -9
  17. package/dist/cjs/_base/styles/common.cjs +1 -29
  18. package/dist/cjs/_base/styles/index.cjs +1 -10
  19. package/dist/cjs/_base/types/breakpoints.cjs +1 -3
  20. package/dist/cjs/_base/types/common.cjs +1 -3
  21. package/dist/cjs/_base/types/index.cjs +1 -6
  22. package/dist/cjs/action-button/index.cjs +1 -50
  23. package/dist/cjs/action-button/props.cjs +1 -3
  24. package/dist/cjs/action-button/use-action-button.cjs +1 -58
  25. package/dist/cjs/action-group/index.cjs +1 -28
  26. package/dist/cjs/action-group/props.cjs +1 -3
  27. package/dist/cjs/action-group/use-action-group.cjs +1 -22
  28. package/dist/cjs/action-group/use-computed-action-buttons.cjs +1 -43
  29. package/dist/cjs/affix/index.cjs +1 -13
  30. package/dist/cjs/alert/index.cjs +1 -13
  31. package/dist/cjs/anchor/index.cjs +1 -13
  32. package/dist/cjs/auto-complete/index.cjs +1 -13
  33. package/dist/cjs/avatar/index.cjs +1 -13
  34. package/dist/cjs/badge/index.cjs +1 -13
  35. package/dist/cjs/bool/index.cjs +1 -61
  36. package/dist/cjs/breadcrumb/index.cjs +1 -14
  37. package/dist/cjs/button/index.cjs +1 -13
  38. package/dist/cjs/calendar/index.cjs +1 -13
  39. package/dist/cjs/card/index.cjs +1 -13
  40. package/dist/cjs/carousel/index.cjs +1 -14
  41. package/dist/cjs/cascader/index.cjs +1 -13
  42. package/dist/cjs/center/index.cjs +1 -19
  43. package/dist/cjs/center/props.cjs +1 -3
  44. package/dist/cjs/charts/chart.cjs +1 -30
  45. package/dist/cjs/charts/helpers/group.cjs +1 -35
  46. package/dist/cjs/charts/helpers/index.cjs +1 -11
  47. package/dist/cjs/charts/hooks/index.cjs +1 -10
  48. package/dist/cjs/charts/hooks/use-chart.cjs +1 -176
  49. package/dist/cjs/charts/index.cjs +1 -12
  50. package/dist/cjs/charts/themes/index.cjs +1 -16
  51. package/dist/cjs/charts/themes/walden-dark.cjs +1 -400
  52. package/dist/cjs/charts/themes/walden.cjs +1 -365
  53. package/dist/cjs/charts/themes/wonderland-dark.cjs +1 -400
  54. package/dist/cjs/charts/themes/wonderland.cjs +1 -365
  55. package/dist/cjs/checkbox/index.cjs +1 -13
  56. package/dist/cjs/code-highlighter/index.cjs +1 -46
  57. package/dist/cjs/code-highlighter/props.cjs +1 -3
  58. package/dist/cjs/col/index.cjs +1 -13
  59. package/dist/cjs/collapse/index.cjs +1 -13
  60. package/dist/cjs/color-picker/index.cjs +1 -13
  61. package/dist/cjs/compact/index.cjs +1 -12
  62. package/dist/cjs/config-provider/app.cjs +1 -35
  63. package/dist/cjs/config-provider/context-holder.cjs +1 -29
  64. package/dist/cjs/config-provider/dark-mode-context.cjs +1 -15
  65. package/dist/cjs/config-provider/error-fallback.cjs +1 -19
  66. package/dist/cjs/config-provider/global-style.cjs +1 -14
  67. package/dist/cjs/config-provider/index.cjs +1 -58
  68. package/dist/cjs/config-provider/props.cjs +1 -3
  69. package/dist/cjs/config-provider/use-config-provider.cjs +1 -182
  70. package/dist/cjs/date-picker/index.cjs +1 -14
  71. package/dist/cjs/descriptions/index.cjs +1 -13
  72. package/dist/cjs/divider/index.cjs +1 -13
  73. package/dist/cjs/drawer/index.cjs +1 -13
  74. package/dist/cjs/dropdown/index.cjs +1 -13
  75. package/dist/cjs/dynamic-icon/index.cjs +1 -33
  76. package/dist/cjs/dynamic-icon/placeholder-icon.cjs +1 -17
  77. package/dist/cjs/dynamic-icon/props.cjs +1 -5
  78. package/dist/cjs/dynamic-icon/unknown-icon.cjs +1 -19
  79. package/dist/cjs/empty/empty.cjs +1 -16
  80. package/dist/cjs/empty/index.cjs +1 -10
  81. package/dist/cjs/flex/index.cjs +1 -13
  82. package/dist/cjs/flip-text/index.cjs +1 -63
  83. package/dist/cjs/flip-text/props.cjs +1 -3
  84. package/dist/cjs/float-button/index.cjs +1 -13
  85. package/dist/cjs/form/components/form.cjs +1 -41
  86. package/dist/cjs/form/components/index.cjs +1 -16
  87. package/dist/cjs/form/components/reset-button.cjs +1 -30
  88. package/dist/cjs/form/components/submit-button.cjs +1 -31
  89. package/dist/cjs/form/contexts/form-context.cjs +1 -18
  90. package/dist/cjs/form/contexts/form-layout.cjs +1 -23
  91. package/dist/cjs/form/contexts/index.cjs +1 -17
  92. package/dist/cjs/form/fields/auto-complete/index.cjs +1 -39
  93. package/dist/cjs/form/fields/auto-complete/props.cjs +1 -3
  94. package/dist/cjs/form/fields/bool/index.cjs +1 -31
  95. package/dist/cjs/form/fields/bool/props.cjs +1 -3
  96. package/dist/cjs/form/fields/cascader/index.cjs +1 -34
  97. package/dist/cjs/form/fields/cascader/props.cjs +1 -3
  98. package/dist/cjs/form/fields/checkbox/index.cjs +1 -51
  99. package/dist/cjs/form/fields/checkbox/props.cjs +1 -3
  100. package/dist/cjs/form/fields/color-picker/index.cjs +1 -32
  101. package/dist/cjs/form/fields/color-picker/props.cjs +1 -3
  102. package/dist/cjs/form/fields/date-picker/index.cjs +1 -34
  103. package/dist/cjs/form/fields/date-picker/props.cjs +1 -3
  104. package/dist/cjs/form/fields/date-range-picker/index.cjs +1 -34
  105. package/dist/cjs/form/fields/date-range-picker/props.cjs +1 -3
  106. package/dist/cjs/form/fields/index.cjs +1 -53
  107. package/dist/cjs/form/fields/input/index.cjs +1 -38
  108. package/dist/cjs/form/fields/input/props.cjs +1 -3
  109. package/dist/cjs/form/fields/input-number/index.cjs +1 -35
  110. package/dist/cjs/form/fields/input-number/props.cjs +1 -3
  111. package/dist/cjs/form/fields/mentions/index.cjs +1 -35
  112. package/dist/cjs/form/fields/mentions/props.cjs +1 -3
  113. package/dist/cjs/form/fields/password/index.cjs +1 -38
  114. package/dist/cjs/form/fields/password/props.cjs +1 -3
  115. package/dist/cjs/form/fields/radio/index.cjs +1 -35
  116. package/dist/cjs/form/fields/radio/props.cjs +1 -3
  117. package/dist/cjs/form/fields/rate/index.cjs +1 -33
  118. package/dist/cjs/form/fields/rate/props.cjs +1 -3
  119. package/dist/cjs/form/fields/select/index.cjs +1 -33
  120. package/dist/cjs/form/fields/select/props.cjs +1 -3
  121. package/dist/cjs/form/fields/slider/index.cjs +1 -32
  122. package/dist/cjs/form/fields/slider/props.cjs +1 -3
  123. package/dist/cjs/form/fields/textarea/index.cjs +1 -38
  124. package/dist/cjs/form/fields/textarea/props.cjs +1 -3
  125. package/dist/cjs/form/fields/time-picker/index.cjs +1 -34
  126. package/dist/cjs/form/fields/time-picker/props.cjs +1 -3
  127. package/dist/cjs/form/fields/time-range-picker/index.cjs +1 -34
  128. package/dist/cjs/form/fields/time-range-picker/props.cjs +1 -3
  129. package/dist/cjs/form/fields/transfer/index.cjs +1 -34
  130. package/dist/cjs/form/fields/transfer/props.cjs +1 -3
  131. package/dist/cjs/form/fields/tree-select/index.cjs +1 -32
  132. package/dist/cjs/form/fields/tree-select/props.cjs +1 -3
  133. package/dist/cjs/form/fields/upload/index.cjs +1 -61
  134. package/dist/cjs/form/fields/upload/props.cjs +1 -3
  135. package/dist/cjs/form/form.cjs +1 -35
  136. package/dist/cjs/form/helpers/index.cjs +1 -10
  137. package/dist/cjs/form/helpers/with-form-item.cjs +1 -50
  138. package/dist/cjs/form/hooks/use-form-item-props.cjs +1 -47
  139. package/dist/cjs/form/hooks/use-label-width.cjs +1 -23
  140. package/dist/cjs/form/index.cjs +1 -14
  141. package/dist/cjs/form/use-form.cjs +1 -29
  142. package/dist/cjs/grid/context.cjs +1 -19
  143. package/dist/cjs/grid/grid-item.cjs +1 -43
  144. package/dist/cjs/grid/hooks/index.cjs +1 -21
  145. package/dist/cjs/grid/hooks/use-container-breakpoints.cjs +1 -23
  146. package/dist/cjs/grid/hooks/use-container-width.cjs +1 -48
  147. package/dist/cjs/grid/hooks/use-grid-collapsed.cjs +1 -19
  148. package/dist/cjs/grid/hooks/use-normalized-gap.cjs +1 -47
  149. package/dist/cjs/grid/hooks/use-responsive-breakpoint.cjs +1 -19
  150. package/dist/cjs/grid/hooks/use-responsive-value.cjs +1 -35
  151. package/dist/cjs/grid/index.cjs +1 -140
  152. package/dist/cjs/grid/props.cjs +1 -3
  153. package/dist/cjs/grid/styles.cjs +1 -30
  154. package/dist/cjs/group/index.cjs +1 -20
  155. package/dist/cjs/group/props.cjs +1 -3
  156. package/dist/cjs/icon/index.cjs +1 -30
  157. package/dist/cjs/icon/props.cjs +1 -3
  158. package/dist/cjs/icon-button/index.cjs +1 -40
  159. package/dist/cjs/icon-button/props.cjs +1 -3
  160. package/dist/cjs/image/index.cjs +1 -13
  161. package/dist/cjs/index.cjs +1 -440
  162. package/dist/cjs/input/index.cjs +1 -13
  163. package/dist/cjs/input-number/index.cjs +1 -13
  164. package/dist/cjs/keyboard/index.cjs +1 -48
  165. package/dist/cjs/keyboard/props.cjs +1 -3
  166. package/dist/cjs/list/index.cjs +1 -13
  167. package/dist/cjs/loader/index.cjs +1 -48
  168. package/dist/cjs/loader/props.cjs +1 -3
  169. package/dist/cjs/mentions/index.cjs +1 -13
  170. package/dist/cjs/menu/index.cjs +1 -14
  171. package/dist/cjs/modal/index.cjs +1 -13
  172. package/dist/cjs/operation-button/index.cjs +1 -33
  173. package/dist/cjs/operation-button/props.cjs +1 -3
  174. package/dist/cjs/pagination/index.cjs +1 -13
  175. package/dist/cjs/permission-gate/index.cjs +1 -22
  176. package/dist/cjs/permission-gate/props.cjs +1 -3
  177. package/dist/cjs/popconfirm/index.cjs +1 -13
  178. package/dist/cjs/popover/index.cjs +1 -13
  179. package/dist/cjs/progress/index.cjs +1 -13
  180. package/dist/cjs/qrcode/index.cjs +1 -13
  181. package/dist/cjs/radio/index.cjs +1 -13
  182. package/dist/cjs/rate/index.cjs +1 -13
  183. package/dist/cjs/result/index.cjs +1 -13
  184. package/dist/cjs/row/index.cjs +1 -13
  185. package/dist/cjs/scroll-area/index.cjs +1 -69
  186. package/dist/cjs/scroll-area/props.cjs +1 -3
  187. package/dist/cjs/scroll-area/styles.cjs +1 -47
  188. package/dist/cjs/segmented/index.cjs +1 -13
  189. package/dist/cjs/select/hooks/index.cjs +1 -10
  190. package/dist/cjs/select/hooks/use-data-options-select.cjs +1 -70
  191. package/dist/cjs/select/index.cjs +1 -14
  192. package/dist/cjs/skeleton/index.cjs +1 -13
  193. package/dist/cjs/slider/index.cjs +1 -13
  194. package/dist/cjs/space/index.cjs +1 -10
  195. package/dist/cjs/space/space.cjs +1 -17
  196. package/dist/cjs/sparkles-text/index.cjs +1 -70
  197. package/dist/cjs/sparkles-text/props.cjs +1 -3
  198. package/dist/cjs/sparkles-text/sparkle.cjs +1 -44
  199. package/dist/cjs/spin/index.cjs +1 -13
  200. package/dist/cjs/split-text/index.cjs +1 -212
  201. package/dist/cjs/split-text/props.cjs +1 -3
  202. package/dist/cjs/splitter/index.cjs +1 -13
  203. package/dist/cjs/stack/index.cjs +1 -19
  204. package/dist/cjs/stack/props.cjs +1 -3
  205. package/dist/cjs/statistic/index.cjs +1 -13
  206. package/dist/cjs/steps/index.cjs +1 -13
  207. package/dist/cjs/switch/index.cjs +1 -13
  208. package/dist/cjs/table/index.cjs +1 -59
  209. package/dist/cjs/table/props.cjs +1 -3
  210. package/dist/cjs/table/use-pagination-props.cjs +1 -52
  211. package/dist/cjs/tabs/index.cjs +1 -13
  212. package/dist/cjs/tag/index.cjs +1 -13
  213. package/dist/cjs/time-picker/index.cjs +1 -13
  214. package/dist/cjs/timeline/index.cjs +1 -13
  215. package/dist/cjs/tooltip/index.cjs +1 -13
  216. package/dist/cjs/tour/index.cjs +1 -13
  217. package/dist/cjs/transfer/index.cjs +1 -13
  218. package/dist/cjs/tree/hooks/index.cjs +1 -10
  219. package/dist/cjs/tree/hooks/use-data-options-tree.cjs +1 -76
  220. package/dist/cjs/tree/index.cjs +1 -14
  221. package/dist/cjs/tree-select/hooks/index.cjs +1 -10
  222. package/dist/cjs/tree-select/hooks/use-data-options-tree-select.cjs +1 -70
  223. package/dist/cjs/tree-select/index.cjs +1 -14
  224. package/dist/cjs/typing-animation/index.cjs +1 -61
  225. package/dist/cjs/typing-animation/props.cjs +1 -3
  226. package/dist/cjs/typography/index.cjs +1 -22
  227. package/dist/cjs/upload/index.cjs +1 -83
  228. package/dist/cjs/upload/props.cjs +1 -3
  229. package/dist/cjs/watermark/index.cjs +1 -13
  230. package/dist/es/_base/constants/breakpoints.js +4 -4
  231. package/dist/es/_base/constants/common.js +19 -20
  232. package/dist/es/_base/constants/css-vars.js +4 -4
  233. package/dist/es/_base/constants/index.js +15 -4
  234. package/dist/es/_base/helpers/breakpoints.js +19 -23
  235. package/dist/es/_base/helpers/color.js +9 -9
  236. package/dist/es/_base/helpers/common.js +10 -15
  237. package/dist/es/_base/helpers/index.js +34 -9
  238. package/dist/es/_base/helpers/message.js +32 -29
  239. package/dist/es/_base/helpers/modal.js +82 -87
  240. package/dist/es/_base/helpers/notification.js +46 -44
  241. package/dist/es/_base/helpers/props.js +10 -10
  242. package/dist/es/_base/helpers/react.js +6 -7
  243. package/dist/es/_base/hooks/index.js +4 -2
  244. package/dist/es/_base/hooks/use-theme-tokens.js +10 -11
  245. package/dist/es/_base/index.js +5 -6
  246. package/dist/es/_base/styles/common.js +10 -11
  247. package/dist/es/_base/styles/index.js +4 -3
  248. package/dist/es/_base/types/breakpoints.js +1 -1
  249. package/dist/es/_base/types/common.js +1 -1
  250. package/dist/es/_base/types/index.js +2 -3
  251. package/dist/es/action-button/index.js +32 -38
  252. package/dist/es/action-button/props.js +1 -1
  253. package/dist/es/action-button/use-action-button.js +31 -39
  254. package/dist/es/action-group/index.js +14 -22
  255. package/dist/es/action-group/props.js +1 -1
  256. package/dist/es/action-group/use-action-group.js +10 -14
  257. package/dist/es/action-group/use-computed-action-buttons.js +25 -38
  258. package/dist/es/affix/index.js +4 -2
  259. package/dist/es/alert/index.js +4 -2
  260. package/dist/es/anchor/index.js +4 -2
  261. package/dist/es/auto-complete/index.js +4 -2
  262. package/dist/es/avatar/index.js +4 -2
  263. package/dist/es/badge/index.js +4 -2
  264. package/dist/es/bool/index.js +46 -53
  265. package/dist/es/breadcrumb/index.js +5 -3
  266. package/dist/es/button/index.js +4 -2
  267. package/dist/es/calendar/index.js +4 -2
  268. package/dist/es/card/index.js +4 -2
  269. package/dist/es/carousel/index.js +5 -3
  270. package/dist/es/cascader/index.js +4 -2
  271. package/dist/es/center/index.js +12 -13
  272. package/dist/es/center/props.js +1 -1
  273. package/dist/es/charts/chart.js +18 -25
  274. package/dist/es/charts/helpers/group.js +9 -9
  275. package/dist/es/charts/helpers/index.js +5 -2
  276. package/dist/es/charts/hooks/index.js +4 -2
  277. package/dist/es/charts/hooks/use-chart.js +97 -139
  278. package/dist/es/charts/index.js +6 -4
  279. package/dist/es/charts/themes/index.js +10 -5
  280. package/dist/es/charts/themes/walden-dark.js +29 -30
  281. package/dist/es/charts/themes/walden.js +29 -30
  282. package/dist/es/charts/themes/wonderland-dark.js +29 -30
  283. package/dist/es/charts/themes/wonderland.js +29 -30
  284. package/dist/es/checkbox/index.js +4 -2
  285. package/dist/es/code-highlighter/index.js +30 -34
  286. package/dist/es/code-highlighter/props.js +1 -1
  287. package/dist/es/col/index.js +4 -2
  288. package/dist/es/collapse/index.js +4 -2
  289. package/dist/es/color-picker/index.js +4 -2
  290. package/dist/es/compact/index.js +6 -7
  291. package/dist/es/config-provider/app.js +20 -26
  292. package/dist/es/config-provider/context-holder.js +18 -20
  293. package/dist/es/config-provider/dark-mode-context.js +8 -9
  294. package/dist/es/config-provider/error-fallback.js +10 -11
  295. package/dist/es/config-provider/global-style.js +9 -10
  296. package/dist/es/config-provider/index.js +36 -37
  297. package/dist/es/config-provider/props.js +1 -1
  298. package/dist/es/config-provider/use-config-provider.js +56 -75
  299. package/dist/es/date-picker/index.js +5 -3
  300. package/dist/es/descriptions/index.js +4 -2
  301. package/dist/es/divider/index.js +4 -2
  302. package/dist/es/drawer/index.js +4 -2
  303. package/dist/es/dropdown/index.js +4 -2
  304. package/dist/es/dynamic-icon/index.js +22 -25
  305. package/dist/es/dynamic-icon/placeholder-icon.js +10 -11
  306. package/dist/es/dynamic-icon/props.js +1 -2
  307. package/dist/es/dynamic-icon/unknown-icon.js +11 -12
  308. package/dist/es/empty/empty.js +9 -10
  309. package/dist/es/empty/index.js +4 -2
  310. package/dist/es/flex/index.js +4 -2
  311. package/dist/es/flip-text/index.js +30 -32
  312. package/dist/es/flip-text/props.js +1 -1
  313. package/dist/es/float-button/index.js +4 -2
  314. package/dist/es/form/components/form.js +28 -34
  315. package/dist/es/form/components/index.js +10 -11
  316. package/dist/es/form/components/reset-button.js +18 -23
  317. package/dist/es/form/components/submit-button.js +20 -23
  318. package/dist/es/form/contexts/form-context.js +12 -10
  319. package/dist/es/form/contexts/form-layout.js +12 -12
  320. package/dist/es/form/contexts/index.js +11 -3
  321. package/dist/es/form/fields/auto-complete/index.js +26 -29
  322. package/dist/es/form/fields/auto-complete/props.js +1 -1
  323. package/dist/es/form/fields/bool/index.js +19 -22
  324. package/dist/es/form/fields/bool/props.js +1 -1
  325. package/dist/es/form/fields/cascader/index.js +22 -25
  326. package/dist/es/form/fields/cascader/props.js +1 -1
  327. package/dist/es/form/fields/checkbox/index.js +30 -35
  328. package/dist/es/form/fields/checkbox/props.js +1 -1
  329. package/dist/es/form/fields/color-picker/index.js +20 -23
  330. package/dist/es/form/fields/color-picker/props.js +1 -1
  331. package/dist/es/form/fields/date-picker/index.js +22 -25
  332. package/dist/es/form/fields/date-picker/props.js +1 -1
  333. package/dist/es/form/fields/date-range-picker/index.js +22 -25
  334. package/dist/es/form/fields/date-range-picker/props.js +1 -1
  335. package/dist/es/form/fields/index.js +47 -48
  336. package/dist/es/form/fields/input/index.js +25 -28
  337. package/dist/es/form/fields/input/props.js +1 -1
  338. package/dist/es/form/fields/input-number/index.js +23 -26
  339. package/dist/es/form/fields/input-number/props.js +1 -1
  340. package/dist/es/form/fields/mentions/index.js +23 -26
  341. package/dist/es/form/fields/mentions/props.js +1 -1
  342. package/dist/es/form/fields/password/index.js +25 -28
  343. package/dist/es/form/fields/password/props.js +1 -1
  344. package/dist/es/form/fields/radio/index.js +22 -25
  345. package/dist/es/form/fields/radio/props.js +1 -1
  346. package/dist/es/form/fields/rate/index.js +21 -24
  347. package/dist/es/form/fields/rate/props.js +1 -1
  348. package/dist/es/form/fields/select/index.js +21 -24
  349. package/dist/es/form/fields/select/props.js +1 -1
  350. package/dist/es/form/fields/slider/index.js +20 -23
  351. package/dist/es/form/fields/slider/props.js +1 -1
  352. package/dist/es/form/fields/textarea/index.js +25 -28
  353. package/dist/es/form/fields/textarea/props.js +1 -1
  354. package/dist/es/form/fields/time-picker/index.js +22 -25
  355. package/dist/es/form/fields/time-picker/props.js +1 -1
  356. package/dist/es/form/fields/time-range-picker/index.js +22 -25
  357. package/dist/es/form/fields/time-range-picker/props.js +1 -1
  358. package/dist/es/form/fields/transfer/index.js +21 -24
  359. package/dist/es/form/fields/transfer/props.js +1 -1
  360. package/dist/es/form/fields/tree-select/index.js +20 -23
  361. package/dist/es/form/fields/tree-select/props.js +1 -1
  362. package/dist/es/form/fields/upload/index.js +39 -50
  363. package/dist/es/form/fields/upload/props.js +1 -1
  364. package/dist/es/form/form.js +23 -20
  365. package/dist/es/form/helpers/index.js +4 -2
  366. package/dist/es/form/helpers/with-form-item.js +33 -37
  367. package/dist/es/form/hooks/use-form-item-props.js +32 -39
  368. package/dist/es/form/hooks/use-label-width.js +11 -18
  369. package/dist/es/form/index.js +8 -3
  370. package/dist/es/form/use-form.js +16 -21
  371. package/dist/es/grid/context.js +10 -12
  372. package/dist/es/grid/grid-item.js +29 -32
  373. package/dist/es/grid/hooks/index.js +15 -7
  374. package/dist/es/grid/hooks/use-container-breakpoints.js +14 -18
  375. package/dist/es/grid/hooks/use-container-width.js +22 -38
  376. package/dist/es/grid/hooks/use-grid-collapsed.js +10 -11
  377. package/dist/es/grid/hooks/use-normalized-gap.js +30 -38
  378. package/dist/es/grid/hooks/use-responsive-breakpoint.js +10 -13
  379. package/dist/es/grid/hooks/use-responsive-value.js +22 -25
  380. package/dist/es/grid/index.js +86 -123
  381. package/dist/es/grid/props.js +1 -1
  382. package/dist/es/grid/styles.js +11 -12
  383. package/dist/es/group/index.js +13 -14
  384. package/dist/es/group/props.js +1 -1
  385. package/dist/es/icon/index.js +15 -16
  386. package/dist/es/icon/props.js +1 -1
  387. package/dist/es/icon-button/index.js +25 -26
  388. package/dist/es/icon-button/props.js +1 -1
  389. package/dist/es/image/index.js +4 -2
  390. package/dist/es/index.js +254 -115
  391. package/dist/es/input/index.js +4 -2
  392. package/dist/es/input-number/index.js +4 -2
  393. package/dist/es/keyboard/index.js +26 -29
  394. package/dist/es/keyboard/props.js +1 -1
  395. package/dist/es/list/index.js +4 -2
  396. package/dist/es/loader/index.js +31 -39
  397. package/dist/es/loader/props.js +1 -1
  398. package/dist/es/mentions/index.js +4 -2
  399. package/dist/es/menu/index.js +5 -3
  400. package/dist/es/modal/index.js +4 -2
  401. package/dist/es/operation-button/index.js +19 -23
  402. package/dist/es/operation-button/props.js +1 -1
  403. package/dist/es/pagination/index.js +4 -2
  404. package/dist/es/permission-gate/index.js +12 -16
  405. package/dist/es/permission-gate/props.js +1 -1
  406. package/dist/es/popconfirm/index.js +4 -2
  407. package/dist/es/popover/index.js +4 -2
  408. package/dist/es/progress/index.js +4 -2
  409. package/dist/es/qrcode/index.js +4 -2
  410. package/dist/es/radio/index.js +4 -2
  411. package/dist/es/rate/index.js +4 -2
  412. package/dist/es/result/index.js +4 -2
  413. package/dist/es/row/index.js +4 -2
  414. package/dist/es/scroll-area/index.js +47 -59
  415. package/dist/es/scroll-area/props.js +1 -1
  416. package/dist/es/scroll-area/styles.js +16 -17
  417. package/dist/es/segmented/index.js +4 -2
  418. package/dist/es/select/hooks/index.js +4 -2
  419. package/dist/es/select/hooks/use-data-options-select.js +47 -56
  420. package/dist/es/select/index.js +5 -3
  421. package/dist/es/skeleton/index.js +4 -2
  422. package/dist/es/slider/index.js +4 -2
  423. package/dist/es/space/index.js +4 -2
  424. package/dist/es/space/space.js +10 -11
  425. package/dist/es/sparkles-text/index.js +41 -50
  426. package/dist/es/sparkles-text/props.js +1 -1
  427. package/dist/es/sparkles-text/sparkle.js +23 -24
  428. package/dist/es/spin/index.js +4 -2
  429. package/dist/es/split-text/index.js +114 -158
  430. package/dist/es/split-text/props.js +1 -1
  431. package/dist/es/splitter/index.js +4 -2
  432. package/dist/es/stack/index.js +12 -13
  433. package/dist/es/stack/props.js +1 -1
  434. package/dist/es/statistic/index.js +4 -2
  435. package/dist/es/steps/index.js +4 -2
  436. package/dist/es/switch/index.js +4 -2
  437. package/dist/es/table/index.js +41 -46
  438. package/dist/es/table/props.js +1 -1
  439. package/dist/es/table/use-pagination-props.js +26 -28
  440. package/dist/es/tabs/index.js +4 -2
  441. package/dist/es/tag/index.js +4 -2
  442. package/dist/es/time-picker/index.js +4 -2
  443. package/dist/es/timeline/index.js +4 -2
  444. package/dist/es/tooltip/index.js +4 -2
  445. package/dist/es/tour/index.js +4 -2
  446. package/dist/es/transfer/index.js +4 -2
  447. package/dist/es/tree/hooks/index.js +4 -2
  448. package/dist/es/tree/hooks/use-data-options-tree.js +47 -63
  449. package/dist/es/tree/index.js +5 -3
  450. package/dist/es/tree-select/hooks/index.js +4 -2
  451. package/dist/es/tree-select/hooks/use-data-options-tree-select.js +45 -58
  452. package/dist/es/tree-select/index.js +5 -3
  453. package/dist/es/typing-animation/index.js +35 -48
  454. package/dist/es/typing-animation/props.js +1 -1
  455. package/dist/es/typography/index.js +16 -14
  456. package/dist/es/upload/index.js +44 -69
  457. package/dist/es/upload/props.js +1 -1
  458. package/dist/es/watermark/index.js +4 -2
  459. package/package.json +6 -6
@@ -1,46 +1,42 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { jsx } from '@emotion/react/jsx-runtime';
3
- import { Form } from 'antd';
4
- import '../contexts/index.js';
5
- import { useFormItemProps } from '../hooks/use-form-item-props.js';
6
- import { useFieldContext } from '../contexts/form-context.js';
7
-
8
- function withFormItem(displayName, PureField) {
9
- const FieldComponent = ({
1
+ import { jsx as o } from "@emotion/react/jsx-runtime";
2
+ import { Form as h } from "antd";
3
+ import "../contexts/index.js";
4
+ import { useFormItemProps as I } from "../hooks/use-form-item-props.js";
5
+ import { useFieldContext as v } from "../contexts/form-context.js";
6
+ function j(m, i) {
7
+ const r = ({
10
8
  // form item props
11
- layout,
12
- label,
13
- labelAlign,
14
- labelWidth,
15
- extra,
16
- noWrapper,
17
- required,
9
+ layout: s,
10
+ label: a,
11
+ labelAlign: n,
12
+ labelWidth: l,
13
+ extra: p,
14
+ noWrapper: d,
15
+ required: c,
18
16
  // field props
19
- ...fieldProps
17
+ ...u
20
18
  }) => {
21
- const formItemProps = useFormItemProps({
22
- layout,
23
- label,
24
- labelAlign,
25
- labelWidth,
26
- extra,
27
- required,
28
- noWrapper
29
- });
30
- const {
19
+ const f = I({
20
+ layout: s,
21
+ label: a,
22
+ labelAlign: n,
23
+ labelWidth: l,
24
+ extra: p,
25
+ required: c,
26
+ noWrapper: d
27
+ }), {
31
28
  state: {
32
29
  meta: {
33
- errors,
34
- isValid,
35
- isValidating
30
+ errors: t,
31
+ isValid: F,
32
+ isValidating: e
36
33
  }
37
34
  }
38
- } = useFieldContext();
39
- const errorMessage = errors.length > 0 ? errors[0].message : null;
40
- return /* @__PURE__ */ jsx(Form.Item, { ...formItemProps, hasFeedback: isValidating, help: errorMessage, validateStatus: isValidating ? "validating" : isValid ? void 0 : "error", children: /* @__PURE__ */ jsx(PureField, { ...fieldProps }) });
35
+ } = v(), g = t.length > 0 ? t[0].message : null;
36
+ return /* @__PURE__ */ o(h.Item, { ...f, hasFeedback: e, help: g, validateStatus: e ? "validating" : F ? void 0 : "error", children: /* @__PURE__ */ o(i, { ...u }) });
41
37
  };
42
- FieldComponent.displayName = displayName;
43
- return FieldComponent;
38
+ return r.displayName = m, r;
44
39
  }
45
-
46
- export { withFormItem };
40
+ export {
41
+ j as withFormItem
42
+ };
@@ -1,43 +1,36 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { useMemo } from 'react';
3
- import '../contexts/index.js';
4
- import { useLabelWidth } from './use-label-width.js';
5
- import { useFormLayout } from '../contexts/form-layout.js';
6
-
7
- function useFormItemProps(props) {
1
+ import { useMemo as c } from "react";
2
+ import "../contexts/index.js";
3
+ import { useLabelWidth as y } from "./use-label-width.js";
4
+ import { useFormLayout as d } from "../contexts/form-layout.js";
5
+ function x(t) {
8
6
  const {
9
- layout,
10
- label,
11
- labelAlign,
12
- labelWidth,
13
- extra,
14
- noWrapper,
15
- required
16
- } = props;
17
- const {
18
- layout: formLayout,
19
- labelAlign: formLabelAlign,
20
- labelWidth: formLabelWidth
21
- } = useFormLayout();
22
- const labelWidthToUse = useLabelWidth(layout, labelWidth ?? formLabelWidth);
23
- const layoutToUse = layout ?? formLayout;
24
- const labelCol = useMemo(() => {
25
- if (layoutToUse === "vertical" || !labelWidthToUse) {
26
- return;
27
- }
28
- return {
29
- flex: `0 0 ${labelWidthToUse}px`
30
- };
31
- }, [labelWidthToUse, layoutToUse]);
7
+ layout: e,
8
+ label: r,
9
+ labelAlign: a,
10
+ labelWidth: i,
11
+ extra: n,
12
+ noWrapper: u,
13
+ required: m
14
+ } = t, {
15
+ layout: s,
16
+ labelAlign: b,
17
+ labelWidth: f
18
+ } = d(), o = y(e, i ?? f), l = e ?? s, p = c(() => {
19
+ if (!(l === "vertical" || !o))
20
+ return {
21
+ flex: `0 0 ${o}px`
22
+ };
23
+ }, [o, l]);
32
24
  return {
33
- layout: layoutToUse,
34
- label,
35
- labelAlign: labelAlign ?? formLabelAlign,
36
- labelCol,
37
- extra,
38
- noStyle: noWrapper,
39
- required
25
+ layout: l,
26
+ label: r,
27
+ labelAlign: a ?? b,
28
+ labelCol: p,
29
+ extra: n,
30
+ noStyle: u,
31
+ required: m
40
32
  };
41
33
  }
42
-
43
- export { useFormItemProps };
34
+ export {
35
+ x as useFormItemProps
36
+ };
@@ -1,19 +1,12 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { useMemo } from 'react';
3
- import '../../_base/index.js';
4
- import { showWarningMessage } from '../../_base/helpers/message.js';
5
-
6
- function useLabelWidth(layout, labelWidth) {
7
- const labelWidthToUse = useMemo(() => {
8
- if (layout === "vertical" || !labelWidth) {
9
- return;
10
- }
11
- if (labelWidth < 60 || labelWidth > 120) {
12
- showWarningMessage("The labelWidth of Form component must be between 60 and 120, otherwise it will be 60 or 120.");
13
- }
14
- return Math.min(Math.max(labelWidth, 60), 120);
15
- }, [layout, labelWidth]);
16
- return labelWidthToUse;
1
+ import { useMemo as r } from "react";
2
+ import "../../_base/index.js";
3
+ import { showWarningMessage as t } from "../../_base/helpers/message.js";
4
+ function a(o, e) {
5
+ return r(() => {
6
+ if (!(o === "vertical" || !e))
7
+ return (e < 60 || e > 120) && t("The labelWidth of Form component must be between 60 and 120, otherwise it will be 60 or 120."), Math.min(Math.max(e, 60), 120);
8
+ }, [o, e]);
17
9
  }
18
-
19
- export { useLabelWidth };
10
+ export {
11
+ a as useLabelWidth
12
+ };
@@ -1,3 +1,8 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- export { useFormContext, withFieldGroup, withForm } from './form.js';
3
- export { useForm } from './use-form.js';
1
+ import { useFormContext as e, withFieldGroup as t, withForm as m } from "./form.js";
2
+ import { useForm as i } from "./use-form.js";
3
+ export {
4
+ i as useForm,
5
+ e as useFormContext,
6
+ t as withFieldGroup,
7
+ m as withForm
8
+ };
@@ -1,25 +1,20 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { jsx } from '@emotion/react/jsx-runtime';
3
- import { useMemo } from 'react';
4
- import { useAppForm } from './form.js';
5
-
6
- function useForm(options) {
7
- const formApi = useAppForm(options);
8
- return useMemo(() => {
1
+ import { jsx as t } from "@emotion/react/jsx-runtime";
2
+ import { useMemo as i } from "react";
3
+ import { useAppForm as s } from "./form.js";
4
+ function A(m) {
5
+ const r = s(m);
6
+ return i(() => {
9
7
  const {
10
- AppForm,
11
- Form
12
- } = formApi;
13
- const FormComponent = (props) => /* @__PURE__ */ jsx(AppForm, { children: /* @__PURE__ */ jsx(Form, { ...props }) });
14
- return new Proxy(formApi, {
15
- get(target, prop, receiver) {
16
- if (prop === "Form") {
17
- return FormComponent;
18
- }
19
- return Reflect.get(target, prop, receiver);
8
+ AppForm: n,
9
+ Form: p
10
+ } = r, u = (o) => /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(p, { ...o }) });
11
+ return new Proxy(r, {
12
+ get(o, e, f) {
13
+ return e === "Form" ? u : Reflect.get(o, e, f);
20
14
  }
21
15
  });
22
- }, [formApi]);
16
+ }, [r]);
23
17
  }
24
-
25
- export { useForm };
18
+ export {
19
+ A as useForm
20
+ };
@@ -1,14 +1,12 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { createContext, use } from 'react';
3
-
4
- const Context = createContext(null);
5
- const GridContextProvider = Context.Provider;
6
- function useGridContext() {
7
- const context = use(Context);
8
- if (!context) {
1
+ import { createContext as e, use as o } from "react";
2
+ const r = e(null), i = r.Provider;
3
+ function d() {
4
+ const t = o(r);
5
+ if (!t)
9
6
  throw new Error("GridItem must be used as direct child of Grid");
10
- }
11
- return context;
7
+ return t;
12
8
  }
13
-
14
- export { GridContextProvider, useGridContext };
9
+ export {
10
+ i as GridContextProvider,
11
+ d as useGridContext
12
+ };
@@ -1,37 +1,34 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { jsx } from '@emotion/react/jsx-runtime';
3
- import { useMemo } from 'react';
4
- import { useGridContext } from './context.js';
5
- import { gridItem } from './styles.js';
6
- import './props.js';
7
-
8
- const defaultSpan = 1;
9
- const defaultOffset = 0;
10
- function GridItem({
11
- span = defaultSpan,
12
- offset = defaultOffset,
13
- suffix = false,
14
- style,
15
- ...props
1
+ import { jsx as l } from "@emotion/react/jsx-runtime";
2
+ import { useMemo as d } from "react";
3
+ import { useGridContext as a } from "./context.js";
4
+ import { gridItem as f } from "./styles.js";
5
+ import "./props.js";
6
+ const p = 1, u = 0;
7
+ function h({
8
+ span: o = p,
9
+ offset: r = u,
10
+ suffix: e = !1,
11
+ style: m,
12
+ ...s
16
13
  }) {
17
14
  const {
18
- gridColumns
19
- } = useGridContext();
20
- const itemStyle = useMemo(() => {
21
- const childSpan = span;
22
- const childOffset = offset;
23
- const baseStyle = {
24
- "--vef-grid-item-column": suffix ? `${gridColumns + 1 - childSpan} / span ${childSpan}` : `span ${childSpan}`,
25
- ...childOffset > 0 && !suffix ? {
26
- "--vef-grid-item-margin-left": `calc(100% * ${childOffset} / ${childSpan})`
27
- } : {}
28
- };
15
+ gridColumns: n
16
+ } = a(), c = d(() => {
17
+ const t = o, i = r;
29
18
  return {
30
- ...baseStyle,
31
- ...style
19
+ ...{
20
+ "--vef-grid-item-column": e ? `${n + 1 - t} / span ${t}` : `span ${t}`,
21
+ ...i > 0 && !e ? {
22
+ "--vef-grid-item-margin-left": `calc(100% * ${i} / ${t})`
23
+ } : {}
24
+ },
25
+ ...m
32
26
  };
33
- }, [span, offset, suffix, gridColumns, style]);
34
- return /* @__PURE__ */ jsx("div", { ...props, css: gridItem, style: itemStyle });
27
+ }, [o, r, e, n, m]);
28
+ return /* @__PURE__ */ l("div", { ...s, css: f, style: c });
35
29
  }
36
-
37
- export { GridItem, defaultOffset, defaultSpan };
30
+ export {
31
+ h as GridItem,
32
+ u as defaultOffset,
33
+ p as defaultSpan
34
+ };
@@ -1,7 +1,15 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- export { useContainerBreakpoints } from './use-container-breakpoints.js';
3
- export { useContainerWidth } from './use-container-width.js';
4
- export { useGridCollapsed } from './use-grid-collapsed.js';
5
- export { useNormalizedGap } from './use-normalized-gap.js';
6
- export { useResponsiveBreakpoint } from './use-responsive-breakpoint.js';
7
- export { getResponsiveValue, useResponsiveValue } from './use-responsive-value.js';
1
+ import { useContainerBreakpoints as r } from "./use-container-breakpoints.js";
2
+ import { useContainerWidth as p } from "./use-container-width.js";
3
+ import { useGridCollapsed as i } from "./use-grid-collapsed.js";
4
+ import { useNormalizedGap as n } from "./use-normalized-gap.js";
5
+ import { useResponsiveBreakpoint as m } from "./use-responsive-breakpoint.js";
6
+ import { getResponsiveValue as x, useResponsiveValue as l } from "./use-responsive-value.js";
7
+ export {
8
+ x as getResponsiveValue,
9
+ r as useContainerBreakpoints,
10
+ p as useContainerWidth,
11
+ i as useGridCollapsed,
12
+ n as useNormalizedGap,
13
+ m as useResponsiveBreakpoint,
14
+ l as useResponsiveValue
15
+ };
@@ -1,19 +1,15 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { useMemo } from 'react';
3
-
4
- function useContainerBreakpoints(baseWidth) {
5
- return useMemo(() => {
6
- const breakpoints = {
7
- xxs: baseWidth,
8
- xs: baseWidth * 2,
9
- sm: baseWidth * 3,
10
- md: baseWidth * 4,
11
- lg: baseWidth * 5,
12
- xl: baseWidth * 6,
13
- xxl: baseWidth * 7
14
- };
15
- return breakpoints;
16
- }, [baseWidth]);
1
+ import { useMemo as n } from "react";
2
+ function m(r) {
3
+ return n(() => ({
4
+ xxs: r,
5
+ xs: r * 2,
6
+ sm: r * 3,
7
+ md: r * 4,
8
+ lg: r * 5,
9
+ xl: r * 6,
10
+ xxl: r * 7
11
+ }), [r]);
17
12
  }
18
-
19
- export { useContainerBreakpoints };
13
+ export {
14
+ m as useContainerBreakpoints
15
+ };
@@ -1,44 +1,28 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { useIsomorphicEffect } from '@vef-framework/hooks';
3
- import { useRef, useState, useEffect } from 'react';
4
-
5
- function useContainerWidth() {
6
- const rafIdRef = useRef(0);
7
- const containerRef = useRef(null);
8
- const [containerWidth, setContainerWidth] = useState(0);
9
- useIsomorphicEffect(() => {
10
- if (containerRef.current) {
11
- setContainerWidth(containerRef.current.getBoundingClientRect().width);
12
- }
13
- }, []);
14
- useEffect(() => {
15
- if (containerRef.current) {
16
- const observer = new ResizeObserver(([entry]) => {
17
- if (entry) {
18
- if (rafIdRef.current) {
19
- cancelAnimationFrame(rafIdRef.current);
20
- }
21
- rafIdRef.current = requestAnimationFrame(() => {
22
- const width = entry.contentBoxSize.at(0)?.inlineSize ?? entry.contentRect.width;
23
- setContainerWidth(width);
24
- });
25
- }
1
+ import { useIsomorphicEffect as s } from "@vef-framework/hooks";
2
+ import { useRef as c, useState as f, useEffect as a } from "react";
3
+ function h() {
4
+ const e = c(0), t = c(null), [o, r] = f(0);
5
+ return s(() => {
6
+ t.current && r(t.current.getBoundingClientRect().width);
7
+ }, []), a(() => {
8
+ if (t.current) {
9
+ const i = new ResizeObserver(([n]) => {
10
+ n && (e.current && cancelAnimationFrame(e.current), e.current = requestAnimationFrame(() => {
11
+ const u = n.contentBoxSize.at(0)?.inlineSize ?? n.contentRect.width;
12
+ r(u);
13
+ }));
26
14
  });
27
- observer.observe(containerRef.current, {
15
+ return i.observe(t.current, {
28
16
  box: "content-box"
29
- });
30
- return () => {
31
- observer.disconnect();
32
- if (rafIdRef.current) {
33
- cancelAnimationFrame(rafIdRef.current);
34
- }
17
+ }), () => {
18
+ i.disconnect(), e.current && cancelAnimationFrame(e.current);
35
19
  };
36
20
  }
37
- }, []);
38
- return {
39
- containerWidth,
40
- containerRef
21
+ }, []), {
22
+ containerWidth: o,
23
+ containerRef: t
41
24
  };
42
25
  }
43
-
44
- export { useContainerWidth };
26
+ export {
27
+ h as useContainerWidth
28
+ };
@@ -1,15 +1,14 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { useGridContext } from '../context.js';
3
-
4
- function useGridCollapsed() {
1
+ import { useGridContext as s } from "../context.js";
2
+ function r() {
5
3
  const {
6
- isCollapsed,
7
- setCollapsed
8
- } = useGridContext();
4
+ isCollapsed: e,
5
+ setCollapsed: o
6
+ } = s();
9
7
  return {
10
- isCollapsed,
11
- setCollapsed
8
+ isCollapsed: e,
9
+ setCollapsed: o
12
10
  };
13
11
  }
14
-
15
- export { useGridCollapsed };
12
+ export {
13
+ r as useGridCollapsed
14
+ };
@@ -1,43 +1,35 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { isNumber, isString } from '@vef-framework/shared';
3
- import { useMemo } from 'react';
4
- import '../../_base/index.js';
5
- import { useThemeTokens } from '../../_base/hooks/use-theme-tokens.js';
6
-
7
- function useNormalizedGap([rowGap, columnGap]) {
8
- const tokens = useThemeTokens();
9
- return useMemo(() => [normalizeGap(rowGap, tokens), normalizeGap(columnGap, tokens)], [columnGap, rowGap, tokens]);
1
+ import { isNumber as o, isString as u } from "@vef-framework/shared";
2
+ import { useMemo as a } from "react";
3
+ import "../../_base/index.js";
4
+ import { useThemeTokens as c } from "../../_base/hooks/use-theme-tokens.js";
5
+ function h([r, t]) {
6
+ const e = c();
7
+ return a(() => [n(r, e), n(t, e)], [t, r, e]);
10
8
  }
11
- function normalizeGap(gap, {
12
- margin,
13
- marginSM,
14
- marginXS,
15
- marginMD,
16
- marginLG
9
+ function n(r, {
10
+ margin: t,
11
+ marginSM: e,
12
+ marginXS: s,
13
+ marginMD: i,
14
+ marginLG: m
17
15
  }) {
18
- if (isNumber(gap)) {
19
- return gap;
20
- }
21
- if (isString(gap)) {
22
- switch (gap) {
23
- case "extra-small": {
24
- return marginXS;
25
- }
26
- case "small": {
27
- return marginSM;
28
- }
29
- case "medium": {
30
- return margin;
31
- }
32
- case "large": {
33
- return marginMD;
34
- }
35
- case "extra-large": {
36
- return marginLG;
37
- }
16
+ if (o(r))
17
+ return r;
18
+ if (u(r))
19
+ switch (r) {
20
+ case "extra-small":
21
+ return s;
22
+ case "small":
23
+ return e;
24
+ case "medium":
25
+ return t;
26
+ case "large":
27
+ return i;
28
+ case "extra-large":
29
+ return m;
38
30
  }
39
- }
40
31
  return 0;
41
32
  }
42
-
43
- export { useNormalizedGap };
33
+ export {
34
+ h as useNormalizedGap
35
+ };
@@ -1,15 +1,12 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { useMemo } from 'react';
3
-
4
- function useResponsiveBreakpoint(breakpoints, width) {
5
- return useMemo(() => {
6
- for (const [breakpoint, breakpointWidth] of Object.entries(breakpoints)) {
7
- if (width <= breakpointWidth) {
8
- return breakpoint;
9
- }
10
- }
1
+ import { useMemo as n } from "react";
2
+ function u(e, r) {
3
+ return n(() => {
4
+ for (const [o, t] of Object.entries(e))
5
+ if (r <= t)
6
+ return o;
11
7
  return "xxl";
12
- }, [width, breakpoints]);
8
+ }, [r, e]);
13
9
  }
14
-
15
- export { useResponsiveBreakpoint };
10
+ export {
11
+ u as useResponsiveBreakpoint
12
+ };
@@ -1,30 +1,27 @@
1
- /*! @vef-framework/components v2.0.2 made with ❤️ by Venus | 2025-11-25T15:03:17.303Z */
2
- import { isPlainObject } from '@vef-framework/shared';
3
- import { useMemo } from 'react';
4
- import '../../_base/index.js';
5
- import { breakpoints } from '../../_base/constants/breakpoints.js';
6
-
7
- function useResponsiveValue(value, breakpoint) {
8
- const resolvedValue = useMemo(() => getResponsiveValue(value, breakpoint), [value, breakpoint]);
9
- return resolvedValue;
1
+ import { isPlainObject as s } from "@vef-framework/shared";
2
+ import { useMemo as u } from "react";
3
+ import "../../_base/index.js";
4
+ import { breakpoints as f } from "../../_base/constants/breakpoints.js";
5
+ function V(e, r) {
6
+ return u(() => l(e, r), [e, r]);
10
7
  }
11
- function getResponsiveValue(value, breakpoint) {
12
- if (isPlainObject(value)) {
13
- const resolvedValue = value[breakpoint];
14
- if (resolvedValue) {
15
- return resolvedValue;
16
- }
17
- const breakpointArr = Object.keys(breakpoints);
18
- let breakpointIndex = breakpointArr.indexOf(breakpoint);
19
- while (breakpointIndex--) {
20
- const fallbackValue = value[breakpointArr[breakpointIndex]];
21
- if (fallbackValue) {
22
- return fallbackValue;
23
- }
8
+ function l(e, r) {
9
+ if (s(e)) {
10
+ const o = e[r];
11
+ if (o)
12
+ return o;
13
+ const t = Object.keys(f);
14
+ let n = t.indexOf(r);
15
+ for (; n--; ) {
16
+ const i = e[t[n]];
17
+ if (i)
18
+ return i;
24
19
  }
25
20
  return;
26
21
  }
27
- return value;
22
+ return e;
28
23
  }
29
-
30
- export { getResponsiveValue, useResponsiveValue };
24
+ export {
25
+ l as getResponsiveValue,
26
+ V as useResponsiveValue
27
+ };