@vef-framework/components 1.0.7 → 1.0.9

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 (349) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +15 -2
  3. package/dist/index.js +2 -2
  4. package/dist/internal/index.js +1 -1
  5. package/dist/internal/utils.js +1 -1
  6. package/dist/vef-access-denied/access-denied-icon.d.ts +1 -1
  7. package/dist/vef-access-denied/access-denied-icon.js +1 -1
  8. package/dist/vef-access-denied/index.js +1 -1
  9. package/dist/vef-action-buttons/index.js +1 -1
  10. package/dist/vef-app/helper.d.ts +10 -0
  11. package/dist/vef-app/helper.js +3 -0
  12. package/dist/vef-app/index.d.ts +5 -0
  13. package/dist/vef-app/index.js +3 -0
  14. package/dist/vef-app/props.d.ts +7 -0
  15. package/dist/vef-auto-sizer/index.d.ts +5 -0
  16. package/dist/vef-auto-sizer/index.js +3 -0
  17. package/dist/vef-auto-sizer/props.d.ts +5 -0
  18. package/dist/vef-avatar/index.d.ts +5 -0
  19. package/dist/vef-avatar/index.js +3 -0
  20. package/dist/vef-avatar/props.d.ts +11 -0
  21. package/dist/vef-avatar-group/index.d.ts +5 -0
  22. package/dist/vef-avatar-group/index.js +3 -0
  23. package/dist/vef-avatar-group/props.d.ts +15 -0
  24. package/dist/vef-badge/index.js +1 -1
  25. package/dist/vef-bool/hooks/use-bool-instance.js +1 -1
  26. package/dist/vef-bool/index.js +1 -1
  27. package/dist/vef-button/components/base-button.js +1 -1
  28. package/dist/vef-button/index.js +1 -1
  29. package/dist/vef-card/index.js +1 -1
  30. package/dist/vef-card-meta/index.js +1 -1
  31. package/dist/vef-checkbox/hooks/use-checkbox-instance.js +1 -1
  32. package/dist/vef-checkbox/hooks/use-data-options.d.ts +1 -1
  33. package/dist/vef-checkbox/hooks/use-data-options.js +1 -1
  34. package/dist/vef-checkbox/index.js +1 -1
  35. package/dist/vef-col/index.js +1 -1
  36. package/dist/vef-color-picker/index.js +1 -1
  37. package/dist/vef-compact/index.js +1 -1
  38. package/dist/vef-config-provider/hooks/use-ui-config.d.ts +3 -5
  39. package/dist/vef-config-provider/hooks/use-ui-config.js +2 -2
  40. package/dist/vef-config-provider/index.js +15 -23
  41. package/dist/vef-config-provider/reset-style.js +1 -1
  42. package/dist/vef-config-provider/store.d.ts +14 -9
  43. package/dist/vef-config-provider/store.js +2 -2
  44. package/dist/vef-container/index.js +1 -1
  45. package/dist/vef-crud-page/components/crud-actions.js +1 -1
  46. package/dist/vef-crud-page/components/crud-filter.js +1 -1
  47. package/dist/vef-crud-page/components/crud-footer.js +4 -4
  48. package/dist/vef-crud-page/components/crud-form-modal.js +1 -1
  49. package/dist/vef-crud-page/components/crud-header.js +1 -1
  50. package/dist/vef-crud-page/components/crud-table.d.ts +2 -2
  51. package/dist/vef-crud-page/components/crud-table.js +2 -2
  52. package/dist/vef-crud-page/hooks/use-action-buttons.js +2 -2
  53. package/dist/vef-crud-page/hooks/use-crud-context.js +1 -1
  54. package/dist/vef-crud-page/hooks/use-crud-schema.d.ts +2 -2
  55. package/dist/vef-crud-page/hooks/use-crud-schema.js +1 -1
  56. package/dist/vef-crud-page/hooks/use-operation-buttons.js +2 -2
  57. package/dist/vef-crud-page/index.d.ts +3 -3
  58. package/dist/vef-crud-page/index.js +1 -1
  59. package/dist/vef-crud-page/props.d.ts +1 -1
  60. package/dist/vef-crud-page/store.js +1 -1
  61. package/dist/vef-divider/index.js +2 -2
  62. package/dist/vef-divider/props.d.ts +3 -3
  63. package/dist/vef-drawer/components/action-button-wrapper.d.ts +1 -2
  64. package/dist/vef-drawer/components/action-button-wrapper.js +1 -1
  65. package/dist/vef-drawer/components/button-props.js +1 -1
  66. package/dist/vef-drawer/components/cancel-action-button.js +1 -1
  67. package/dist/vef-drawer/components/ok-action-button.js +2 -2
  68. package/dist/vef-drawer/context.js +1 -1
  69. package/dist/vef-drawer/index.js +1 -1
  70. package/dist/vef-dropdown/index.d.ts +4 -1
  71. package/dist/vef-dropdown/index.js +2 -2
  72. package/dist/vef-dropdown/props.d.ts +28 -35
  73. package/dist/vef-dynamic-icon/index.d.ts +5 -0
  74. package/dist/vef-dynamic-icon/index.js +3 -0
  75. package/dist/vef-dynamic-icon/props.d.ts +20 -0
  76. package/dist/vef-dynamic-icon/props.js +3 -0
  77. package/dist/vef-empty/index.d.ts +1 -1
  78. package/dist/vef-empty/index.js +2 -2
  79. package/dist/vef-empty/props.d.ts +16 -1
  80. package/dist/vef-empty-placeholder/index.js +5 -5
  81. package/dist/vef-error/error-icon.d.ts +1 -1
  82. package/dist/vef-error/error-icon.js +1 -1
  83. package/dist/vef-error/index.js +1 -1
  84. package/dist/vef-filter/components/action-buttons.js +7 -7
  85. package/dist/vef-filter/components/advanced-filter.js +4 -4
  86. package/dist/vef-filter/components/basic-filter.js +1 -1
  87. package/dist/vef-filter/components/fields/index.js +1 -1
  88. package/dist/vef-filter/components/fields/input-number.js +1 -1
  89. package/dist/vef-filter/components/fields/input.js +1 -1
  90. package/dist/vef-filter/components/filter-field.js +1 -1
  91. package/dist/vef-filter/components/filter-item.d.ts +1 -1
  92. package/dist/vef-filter/components/filter-item.js +1 -1
  93. package/dist/vef-filter/event.js +1 -1
  94. package/dist/vef-filter/helper.js +1 -1
  95. package/dist/vef-filter/hooks/use-action-handlers.js +1 -1
  96. package/dist/vef-filter/hooks/use-computed-values.js +1 -1
  97. package/dist/vef-filter/hooks/use-filter-context.js +1 -1
  98. package/dist/vef-filter/hooks/use-filter-initialization.d.ts +1 -1
  99. package/dist/vef-filter/hooks/use-filter-initialization.js +1 -1
  100. package/dist/vef-filter/hooks/use-filter-instance.js +1 -1
  101. package/dist/vef-filter/hooks/use-filter-items.js +1 -1
  102. package/dist/vef-filter/hooks/use-filter-values-change.d.ts +1 -1
  103. package/dist/vef-filter/hooks/use-filter-values-change.js +1 -1
  104. package/dist/vef-filter/hooks/use-label-config.js +1 -1
  105. package/dist/vef-filter/index.d.ts +3 -4
  106. package/dist/vef-filter/index.js +1 -1
  107. package/dist/vef-filter/props.d.ts +2 -3
  108. package/dist/vef-filter/store.d.ts +1 -1
  109. package/dist/vef-filter/store.js +1 -1
  110. package/dist/vef-flex/index.js +1 -1
  111. package/dist/vef-float-button/index.js +1 -1
  112. package/dist/vef-float-button-group/index.js +1 -1
  113. package/dist/vef-form/components/fields/index.js +1 -1
  114. package/dist/vef-form/components/fields/input-number.js +1 -1
  115. package/dist/vef-form/components/fields/input.js +1 -1
  116. package/dist/vef-form/components/form-actions.js +1 -1
  117. package/dist/vef-form/components/form-content.d.ts +6 -1
  118. package/dist/vef-form/components/form-content.js +4 -4
  119. package/dist/vef-form/components/form-field.js +1 -1
  120. package/dist/vef-form/components/form-group.d.ts +3 -3
  121. package/dist/vef-form/components/form-group.js +1 -1
  122. package/dist/vef-form/components/form-hidden-item.js +1 -1
  123. package/dist/vef-form/components/form-item.d.ts +1 -1
  124. package/dist/vef-form/components/form-item.js +1 -1
  125. package/dist/vef-form/components/form-row.d.ts +2 -2
  126. package/dist/vef-form/components/form-row.js +1 -1
  127. package/dist/vef-form/event.js +1 -1
  128. package/dist/vef-form/helper.js +1 -1
  129. package/dist/vef-form/hooks/use-action-handlers.js +1 -1
  130. package/dist/vef-form/hooks/use-columns-layout.d.ts +2 -2
  131. package/dist/vef-form/hooks/use-columns-layout.js +1 -1
  132. package/dist/vef-form/hooks/use-computed-values.js +1 -1
  133. package/dist/vef-form/hooks/use-form-context.js +1 -1
  134. package/dist/vef-form/hooks/use-form-initialization.d.ts +1 -1
  135. package/dist/vef-form/hooks/use-form-initialization.js +1 -1
  136. package/dist/vef-form/hooks/use-form-instance.js +1 -1
  137. package/dist/vef-form/hooks/use-form-values-change.d.ts +1 -1
  138. package/dist/vef-form/hooks/use-form-values-change.js +1 -1
  139. package/dist/vef-form/hooks/use-label-width.js +1 -1
  140. package/dist/vef-form/index.d.ts +3 -4
  141. package/dist/vef-form/index.js +4 -4
  142. package/dist/vef-form/props.d.ts +3 -4
  143. package/dist/vef-form/store.js +1 -1
  144. package/dist/vef-form/types.d.ts +10 -10
  145. package/dist/vef-form/validation-rules.d.ts +1 -1
  146. package/dist/vef-form/validation-rules.js +1 -1
  147. package/dist/vef-form-drawer/index.d.ts +2 -2
  148. package/dist/vef-form-drawer/index.js +1 -1
  149. package/dist/vef-form-modal/index.d.ts +2 -2
  150. package/dist/vef-form-modal/index.js +1 -1
  151. package/dist/vef-generic-select/index.d.ts +4 -0
  152. package/dist/vef-generic-select/index.js +3 -0
  153. package/dist/vef-generic-select/props.d.ts +60 -0
  154. package/dist/vef-grid/index.js +1 -1
  155. package/dist/vef-grid/props.js +1 -1
  156. package/dist/vef-grid-item/index.js +1 -1
  157. package/dist/vef-icon/index.js +2 -2
  158. package/dist/vef-icon/props.d.ts +6 -2
  159. package/dist/vef-icon-select/index.d.ts +5 -0
  160. package/dist/vef-icon-select/index.js +42 -0
  161. package/dist/vef-icon-select/props.d.ts +43 -0
  162. package/dist/vef-input/hooks/use-input-instance.js +2 -2
  163. package/dist/vef-input/index.js +1 -1
  164. package/dist/vef-input/props.d.ts +8 -0
  165. package/dist/vef-input-number/hooks/use-input-number-instance.js +1 -1
  166. package/dist/vef-input-number/index.js +1 -1
  167. package/dist/vef-layout/components/content.d.ts +3 -0
  168. package/dist/vef-layout/components/content.js +3 -0
  169. package/dist/vef-layout/components/font-size.d.ts +3 -0
  170. package/dist/vef-layout/components/font-size.js +6 -0
  171. package/dist/vef-layout/components/fullscreen.d.ts +3 -0
  172. package/dist/vef-layout/components/fullscreen.js +6 -0
  173. package/dist/vef-layout/components/header-action-icons.d.ts +3 -0
  174. package/dist/vef-layout/components/header-action-icons.js +17 -0
  175. package/dist/vef-layout/components/header-content.d.ts +3 -0
  176. package/dist/vef-layout/components/header-content.js +8 -0
  177. package/dist/vef-layout/components/header.d.ts +2 -0
  178. package/dist/vef-layout/components/header.js +14 -0
  179. package/dist/vef-layout/components/sider.d.ts +13 -0
  180. package/dist/vef-layout/components/sider.js +51 -0
  181. package/dist/vef-layout/components/title.d.ts +16 -0
  182. package/dist/vef-layout/components/title.js +38 -0
  183. package/dist/vef-layout/components/user-avatar.d.ts +3 -0
  184. package/dist/vef-layout/components/user-avatar.js +20 -0
  185. package/dist/vef-layout/index.d.ts +4 -0
  186. package/dist/vef-layout/index.js +7 -0
  187. package/dist/vef-layout/logo.svg.js +3 -0
  188. package/dist/vef-layout/props.d.ts +19 -0
  189. package/dist/vef-layout/store.d.ts +16 -0
  190. package/dist/vef-layout/store.js +3 -0
  191. package/dist/vef-loading-placeholder/index.js +1 -1
  192. package/dist/vef-login/index.js +11 -8
  193. package/dist/vef-login/login-icon.d.ts +1 -1
  194. package/dist/vef-login/login-icon.js +1 -1
  195. package/dist/vef-menu/index.d.ts +5 -0
  196. package/dist/vef-menu/index.js +3 -0
  197. package/dist/vef-menu/props.d.ts +74 -0
  198. package/dist/vef-modal/components/action-button-wrapper.d.ts +1 -2
  199. package/dist/vef-modal/components/action-button-wrapper.js +1 -1
  200. package/dist/vef-modal/components/button-props.js +1 -1
  201. package/dist/vef-modal/components/cancel-action-button.js +1 -1
  202. package/dist/vef-modal/components/ok-action-button.js +2 -2
  203. package/dist/vef-modal/context.js +1 -1
  204. package/dist/vef-modal/index.js +3 -3
  205. package/dist/vef-not-found/index.js +1 -1
  206. package/dist/vef-not-found/not-found-icon.d.ts +1 -1
  207. package/dist/vef-not-found/not-found-icon.js +1 -1
  208. package/dist/vef-page/index.js +3 -3
  209. package/dist/vef-pagination/index.js +1 -1
  210. package/dist/vef-pagination/props.js +1 -1
  211. package/dist/vef-paragraph/index.js +1 -1
  212. package/dist/vef-password/hooks/use-password-instance.js +1 -1
  213. package/dist/vef-password/index.js +1 -1
  214. package/dist/vef-popconfirm/index.d.ts +1 -2
  215. package/dist/vef-popconfirm/index.js +2 -2
  216. package/dist/vef-popconfirm/props.d.ts +12 -4
  217. package/dist/vef-popover/index.d.ts +1 -2
  218. package/dist/vef-popover/index.js +2 -2
  219. package/dist/vef-popover/props.d.ts +14 -1
  220. package/dist/vef-radio/hooks/use-data-options.d.ts +1 -1
  221. package/dist/vef-radio/hooks/use-data-options.js +1 -1
  222. package/dist/vef-radio/hooks/use-radio-instance.js +1 -1
  223. package/dist/vef-radio/index.js +1 -1
  224. package/dist/vef-rate/hooks/use-rate-instance.js +1 -1
  225. package/dist/vef-rate/index.js +1 -1
  226. package/dist/vef-responsive-container/index.d.ts +1 -1
  227. package/dist/vef-responsive-container/index.js +1 -1
  228. package/dist/vef-responsive-item/index.d.ts +1 -1
  229. package/dist/vef-responsive-item/index.js +1 -1
  230. package/dist/vef-ribbon/index.js +1 -1
  231. package/dist/vef-row/index.js +1 -1
  232. package/dist/vef-scroll-area/components/scrollbar.js +1 -1
  233. package/dist/vef-scroll-area/index.js +7 -4
  234. package/dist/vef-scroll-area/props.d.ts +26 -2
  235. package/dist/vef-select/components/option.js +1 -1
  236. package/dist/vef-select/hooks/use-data-options.d.ts +2 -2
  237. package/dist/vef-select/hooks/use-data-options.js +1 -1
  238. package/dist/vef-select/hooks/use-field-names.js +1 -1
  239. package/dist/vef-select/hooks/{use-label-render.d.ts → use-render-label.d.ts} +3 -3
  240. package/dist/vef-select/hooks/{use-label-render.js → use-render-label.js} +2 -2
  241. package/dist/vef-select/hooks/use-render-option.d.ts +11 -0
  242. package/dist/vef-select/hooks/{use-option-render.js → use-render-option.js} +2 -2
  243. package/dist/vef-select/hooks/use-select-instance.js +1 -1
  244. package/dist/vef-select/index.js +2 -2
  245. package/dist/vef-select/props.d.ts +4 -3
  246. package/dist/vef-slider/hooks/use-slider-instance.js +1 -1
  247. package/dist/vef-slider/index.js +1 -1
  248. package/dist/vef-sortable-list/components/overlay-item.js +1 -1
  249. package/dist/vef-sortable-list/components/sortable-item.js +1 -1
  250. package/dist/vef-sortable-list/hooks/use-merged-items.d.ts +1 -1
  251. package/dist/vef-sortable-list/hooks/use-merged-items.js +1 -1
  252. package/dist/vef-sortable-list/index.d.ts +2 -2
  253. package/dist/vef-sortable-list/index.js +2 -2
  254. package/dist/vef-sortable-list/props.d.ts +3 -3
  255. package/dist/vef-space/index.js +1 -1
  256. package/dist/vef-spin/index.js +1 -1
  257. package/dist/vef-splitter/index.js +2 -2
  258. package/dist/vef-splitter/props.d.ts +3 -3
  259. package/dist/vef-splitter-panel/index.js +1 -1
  260. package/dist/vef-status/index.js +1 -1
  261. package/dist/vef-table/components/columns/bool.js +2 -2
  262. package/dist/vef-table/components/columns/code.js +1 -1
  263. package/dist/vef-table/components/columns/data-dictionary.js +2 -2
  264. package/dist/vef-table/components/columns/enum.js +2 -2
  265. package/dist/vef-table/components/columns/file.js +1 -1
  266. package/dist/vef-table/components/columns/icon.js +1 -1
  267. package/dist/vef-table/components/columns/id.js +1 -1
  268. package/dist/vef-table/components/columns/image.js +1 -1
  269. package/dist/vef-table/components/columns/index.js +1 -1
  270. package/dist/vef-table/components/columns/markdown.js +1 -1
  271. package/dist/vef-table/components/columns/number.js +1 -1
  272. package/dist/vef-table/components/columns/render.js +1 -1
  273. package/dist/vef-table/components/columns/rich-text.js +1 -1
  274. package/dist/vef-table/components/columns/text.js +1 -1
  275. package/dist/vef-table/components/columns-settings.js +2 -2
  276. package/dist/vef-table/components/operation-buttons.js +2 -2
  277. package/dist/vef-table/components/settings-icon.js +4 -4
  278. package/dist/vef-table/components/table-footer.js +1 -1
  279. package/dist/vef-table/helper.js +1 -1
  280. package/dist/vef-table/hooks/use-computed-batch-buttons.js +1 -1
  281. package/dist/vef-table/hooks/use-computed-columns.js +1 -1
  282. package/dist/vef-table/hooks/use-computed-values.js +1 -1
  283. package/dist/vef-table/hooks/use-data.d.ts +1 -1
  284. package/dist/vef-table/hooks/use-data.js +2 -2
  285. package/dist/vef-table/hooks/use-default-column-configs.js +1 -1
  286. package/dist/vef-table/hooks/use-display-value.js +1 -1
  287. package/dist/vef-table/hooks/use-helper-columns.d.ts +1 -1
  288. package/dist/vef-table/hooks/use-helper-columns.js +1 -1
  289. package/dist/vef-table/hooks/use-operation-column-width.d.ts +1 -1
  290. package/dist/vef-table/hooks/use-operation-column-width.js +1 -1
  291. package/dist/vef-table/hooks/use-pagination-props.js +1 -1
  292. package/dist/vef-table/hooks/use-row-props.js +2 -2
  293. package/dist/vef-table/hooks/use-row-selection-config.d.ts +3 -3
  294. package/dist/vef-table/hooks/use-row-selection-config.js +2 -2
  295. package/dist/vef-table/hooks/use-selected-rows.d.ts +10 -0
  296. package/dist/vef-table/hooks/use-selected-rows.js +3 -0
  297. package/dist/vef-table/hooks/use-table-columns.d.ts +1 -1
  298. package/dist/vef-table/hooks/use-table-columns.js +1 -1
  299. package/dist/vef-table/hooks/use-table-context.d.ts +1 -1
  300. package/dist/vef-table/hooks/use-table-context.js +1 -1
  301. package/dist/vef-table/hooks/use-table-instance.js +1 -1
  302. package/dist/vef-table/hooks/use-table-summary.d.ts +1 -1
  303. package/dist/vef-table/hooks/use-table-summary.js +1 -1
  304. package/dist/vef-table/hooks/use-table-width.js +1 -1
  305. package/dist/vef-table/index.d.ts +2 -2
  306. package/dist/vef-table/index.js +3 -3
  307. package/dist/vef-table/props.d.ts +15 -193
  308. package/dist/vef-table/store.d.ts +2 -2
  309. package/dist/vef-table/store.js +2 -2
  310. package/dist/vef-tabs/index.js +1 -1
  311. package/dist/vef-tag/index.js +1 -1
  312. package/dist/vef-temporal-picker/helper.js +1 -1
  313. package/dist/vef-temporal-picker/hooks/use-dayjs-value.d.ts +1 -1
  314. package/dist/vef-temporal-picker/hooks/use-dayjs-value.js +1 -1
  315. package/dist/vef-temporal-picker/hooks/use-temporal-limit.js +1 -1
  316. package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.js +1 -1
  317. package/dist/vef-temporal-picker/index.js +1 -1
  318. package/dist/vef-temporal-range-picker/helper.js +1 -1
  319. package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.d.ts +1 -1
  320. package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.js +1 -1
  321. package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.js +1 -1
  322. package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.js +1 -1
  323. package/dist/vef-temporal-range-picker/index.js +1 -1
  324. package/dist/vef-temporal-range-picker/props.js +1 -1
  325. package/dist/vef-text/index.js +1 -1
  326. package/dist/vef-textarea/hooks/use-textarea-instance.js +1 -1
  327. package/dist/vef-textarea/index.js +1 -1
  328. package/dist/vef-title/index.js +2 -2
  329. package/dist/vef-tooltip/index.d.ts +1 -2
  330. package/dist/vef-tooltip/index.js +2 -2
  331. package/dist/vef-tooltip/props.d.ts +14 -1
  332. package/dist/vef-tree-select/hooks/use-change-handler.d.ts +1 -1
  333. package/dist/vef-tree-select/hooks/use-change-handler.js +1 -1
  334. package/dist/vef-tree-select/hooks/use-data-options.d.ts +1 -1
  335. package/dist/vef-tree-select/hooks/use-data-options.js +1 -1
  336. package/dist/vef-tree-select/hooks/use-tree-select-instance.js +1 -1
  337. package/dist/vef-tree-select/index.js +1 -1
  338. package/dist/vef-virtual-grid/index.d.ts +6 -0
  339. package/dist/vef-virtual-grid/index.js +14 -0
  340. package/dist/vef-virtual-grid/props.d.ts +83 -0
  341. package/dist/vef-virtual-list/index.d.ts +6 -0
  342. package/dist/vef-virtual-list/index.js +20 -0
  343. package/dist/vef-virtual-list/props.d.ts +111 -0
  344. package/package.json +19 -20
  345. package/dist/vef-config-provider/fonts/din/bold.woff2.js +0 -3
  346. package/dist/vef-config-provider/fonts/din/regular.woff2.js +0 -3
  347. package/dist/vef-select/hooks/use-option-render.d.ts +0 -11
  348. package/dist/vef-table/hooks/use-merged-value.d.ts +0 -10
  349. package/dist/vef-table/hooks/use-merged-value.js +0 -3
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{unique as e,VefError as n}from"@vef-framework/shared";import{useMemo as s}from"react";const o=24,t=[{breakpoint:"xs",base:o,spans:1},{breakpoint:"sm",base:12,spans:2},{breakpoint:"md",base:8,spans:3},{breakpoint:"lg",base:6,spans:4},{breakpoint:"xl",base:6,spans:4},{breakpoint:"xxl",base:4,spans:6}],a=e(t.map((e=>e.spans)));function r(e,r,p,l){return s((()=>0===r.length?{}:"responsive"===p?function(e,s,o){const r=s.reduce(((e,n)=>e+(n.span??1)),0);if(!a.includes(r))throw new n(-3,`The total spans of the columns of the row [${e}] must be one of the following: ${a.join(", ")}.`);const p=24/r,l={};for(const{breakpoint:e,base:n,spans:a}of t)if(p>=n)l[e]=s.reduce(((e,n)=>(e[n.key]=(n.span??1)*p,e)),{});else{const t={};let r=a,p=null;for(const e of s){const s=e.span??1;r>=s?(t[e.key]=s*n,r-=s,p=e.key):(p&&(o&&(t[p]+=r*n),r=a,p=null),s>a?t[e.key]=24:(t[e.key]=s*n,r-=s,p=e.key)),0===r&&(r=a,p=null)}r>0&&(o&&(t[p]+=r*n),p=null),l[e]=t}return l}(e,r,l):function(e,s){const t=s.reduce(((e,n)=>e+(n.span??1)),0);if(t>o||o%t!=0)throw new n(-3,`The total spans of the columns of the row [${e}] must be less than or equal to 24 and a divisor of 24.`);const a=o/t;return s.reduce(((e,n)=>(e[n.key]=(n.span??1)*a,e)),{})}(e,r)),[])}export{r as useColumnsLayout};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{useUpdate as e,useDeepCompareMemo as r,useDeepCompareLayoutEffect as o}from"@vef-framework/hooks";import{isFunctionOrExpression as t,isEqual as a}from"@vef-framework/shared";import{computeValue as f}from"../helper.js";import{useFormStore as n}from"../store.js";function u(u,s=!1){const[l,m,c]=n((e=>[e.scene,e.eventBus,e.getValues])),i=e(),k=c(),p=r((()=>u.reduce(((e,r)=>{const{key:o,rawValue:t,defaultValue:a}=r,n=f(t,k,l,a);return e[o]=n,e}),{})),[k,l,u]);return o((()=>{const e=u.filter((({rawValue:e})=>t(e)));if(e.length>0){const r=r=>{for(const o of e){const{key:e,rawValue:t,defaultValue:n}=o,u=p[e],s=f(t,r,l,n);if(!a(s,u)){i();break}}};return m.onChange(r),()=>{m.offChange(r)}}}),[p,m,i,l,u]),s?u.reduce(((e,{key:r})=>(e[r]=p[r],e)),{}):u.map((({key:e})=>p[e]))}export{u as useComputedValues};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{createSelectableContext as o}from"@vef-framework/shared";const{useContextSelector:e,useContext:t,ContextProvider:r}=o({autoExpand:!0,labelPosition:"top",layoutMode:"responsive"});export{r as FormContextProvider,t as useFormContext,e as useFormContextSelector};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,4 +1,4 @@
1
- import type { BiConsumer, MaybeNull, ObjectType, StringKey } from "@vef-framework/shared";
1
+ import { type BiConsumer, type MaybeNull, type ObjectType, type StringKey } from "@vef-framework/shared";
2
2
  import type { FormContext, FormScene, FormSchema } from "../types";
3
3
  /**
4
4
  * Initialize the form values.
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{isNullish as o,isFunction as e}from"@vef-framework/shared";import{useMemo as n}from"react";function r(r,t){return n((()=>{const n={...t},s={},a=[];for(const t of r){const{rows:r}=t;for(const t of r){const{columns:r}=t;for(const t of r){const{items:r}=t;for(const t of r){const{name:r,defaultValue:f,virtual:c}=t;!o(f)&&o(n[r])&&(n[r]=f),"Hidden"!==t.type&&e(t.onChange)&&(s[r]=t.onChange),!0===c&&a.push(r)}}}}return{mergedInitialValues:n,valueChangeHandlers:s,virtualFieldNames:a}}),[])}export{r as useFormInitialization};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{useImperativeHandle as t}from"react";import{useFormStore as e}from"../store.js";function s(s,o){const[u,m,r,i]=e((t=>[t.form,t.eventBus,t.getValues,t.setValues]));t(s,(()=>({submit:()=>new Promise(((t,e)=>{const s=o=>{m.offSubmitResult(s),o?t():e(o)};m.onSubmitResult(s),u.submit()})),reset:o,getValues:r,setValues:i})))}export{s as useFormInstance};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,4 +1,4 @@
1
- import type { BiConsumer, ObjectType } from "@vef-framework/shared";
1
+ import { type BiConsumer, type ObjectType } from "@vef-framework/shared";
2
2
  import type { FormScene, FormValues } from "../types";
3
3
  /**
4
4
  * Use the form values change
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{isFunction as e}from"@vef-framework/shared";import{useMemo as n,useEffect as r,useLayoutEffect as o}from"react";import{useFormStore as t}from"../store.js";function a(a){const[f,s,m]=t((e=>[e.scene,e.eventBus,e.invokeValueChangeHandlers])),h=n((()=>(e,n)=>{s.emitChange(n)}),[s]);return r((()=>{if(e(a)){const e=e=>{a(e,f)};return s.onChange(e),()=>{s.offChange(e)}}}),[s,a,f]),o((()=>{m()}),[]),{handleValuesChange:h}}export{a as useFormValuesChange};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{showWarningMessage as e}from"@vef-framework/shared";import{useMemo as r}from"react";function t(t,o){return r((()=>{if("top"!==t&&o)return(o<60||o>120)&&e("The labelWidth of VefForm component must be between 60 and 120, otherwise it will be 60 or 120."),Math.min(Math.max(o,60),120)}),[t,o])}export{t as useLabelWidth};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,8 +1,7 @@
1
- import type { AnyValue, ObjectType, ObjectValue } from "@vef-framework/shared";
1
+ import { type AnyValue, type ObjectType, type ObjectValue } from "@vef-framework/shared";
2
2
  import { type FC, type ReactNode, type RefAttributes } from "react";
3
3
  import type { VefFormInstance, VefFormProps } from "./props";
4
- import type { FormScene, FormSchema, FormVirtualKeys } from "./types";
4
+ import type { FormActionButtonConfig, FormColumn, FormContext, FormGroup, FormItem, FormLabelAlign, FormLabelPosition, FormLayoutMode, FormRow, FormScene, FormSchema, FormTabsUse, FormValidationRule, FormVirtualKeys } from "./types";
5
5
  declare const VefForm: (<Values extends ObjectType = ObjectValue, Result = AnyValue, Scene extends FormScene = FormScene, Schema extends FormSchema<Values, Scene> = FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema> = FormVirtualKeys<Schema>>(props: VefFormProps<Values, Result, Scene, Schema, VirtualKeys> & RefAttributes<VefFormInstance<Values>>) => ReactNode) & Pick<FC, "displayName">;
6
- export type { FormActionButtonConfig, FormColumn, FormContext, FormGroup, FormItem, FormLabelAlign, FormLabelPosition, FormLayoutMode, FormRow, FormScene, FormSchema, FormTabsUse, FormValidationRule } from "./types";
7
- export type { VefFormInstance, VefFormProps };
6
+ export type { FormActionButtonConfig, FormColumn, FormContext, FormGroup, FormItem, FormLabelAlign, FormLabelPosition, FormLayoutMode, FormRow, FormScene, FormSchema, FormTabsUse, FormValidationRule, VefFormInstance, VefFormProps };
8
7
  export default VefForm;
@@ -1,5 +1,5 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
2
- import{jsxs as o,jsx as e}from"@emotion/react/jsx-runtime";import{css as i}from"@emotion/react";import{useContextDisabled as t,useSingleton as s,useUnmount as a}from"@vef-framework/hooks";import{isNumber as n,isEqual as r,omit as l}from"@vef-framework/shared";import{Form as m}from"antd";import{useMemo as u,forwardRef as h,memo as c}from"react";import"../internal/index.js";import f from"./components/form-actions.js";import d from"./components/form-content.js";import{FormEventBus as p}from"./event.js";import{useActionHandlers as b}from"./hooks/use-action-handlers.js";import{useFormContextSelector as v,FormContextProvider as g}from"./hooks/use-form-context.js";import{useFormInitialization as j}from"./hooks/use-form-initialization.js";import{useFormInstance as F}from"./hooks/use-form-instance.js";import{useFormValuesChange as S}from"./hooks/use-form-values-change.js";import{useLabelWidth as V}from"./hooks/use-label-width.js";import{useFormStore as k,FormStoreProvider as x}from"./store.js";import{convertBasicSizeToUiSize as B}from"../internal/utils.js";const{useForm:w}=m,C={scrollMode:"if-needed",behavior:"smooth"};const y=h((function({schema:s,labelAlign:a="right",variant:r,showTabs:l=!1,height:h="auto",size:c,disabled:p=!1,onChange:g,submissionButton:j,resetButton:V,submitApi:x,submitTip:w,onBeforeSubmit:y,onSubmit:T,onSubmitSuccess:z,onSubmitFailure:A,onReset:N},R){const[W,E]=v((o=>[o.labelPosition,o.labelWidth])),[M,P,$]=k((o=>[o.form,o.initialValues,o.isLoading])),{handleValuesChange:H}=S(g),{handleReset:I,handleSubmit:L,handleSubmitFailed:q}=b({submitApi:x,submitTip:w,onBeforeSubmit:y,onSubmit:T,onSubmitSuccess:z,onSubmitFailure:A,onReset:N});F(R,I);const D=u((()=>{if(E)return{flex:`0 0 ${E}px`}}),[E]),G=u((()=>{let o=h;return"auto"===h?o="100%":n(h)&&(o=`${h}px`),i`
3
- height: ${o};
4
- `}),[h]),J=t();return o(m,{labelWrap:!0,colon:!1,css:G,disabled:J||p||$,form:M,initialValues:P,labelAlign:a,labelCol:D,layout:"top"===W?"vertical":"horizontal",scrollToFirstError:C,size:B(c),variant:r,onFinish:L,onFinishFailed:q,onValuesChange:H,children:[e(d,{schema:s,showTabs:!0===l?"switch":l}),e(f,{handleReset:I,resetButton:V,submissionButton:j})]})}));y.displayName="VefFormBase";const T=c(h((function({initialValues:o,scene:i,layoutMode:t="responsive",autoExpand:n=!1,labelPosition:r="top",labelWidth:l,...m},h){const{schema:c}=m,[f]=w(),d=s((()=>new p));a((()=>{d.clear()}));const b=V(r,l),v=u((()=>({labelPosition:r,labelWidth:b,autoExpand:n,layoutMode:t})),[t,n,r,b]),{mergedInitialValues:F,valueChangeHandlers:S,virtualFieldNames:k}=j(c,o);return e(x,{eventBus:d,form:f,initialValues:F,scene:i,valueChangeHandlers:S,virtualFieldNames:k,children:e(g,{value:v,children:e(y,{ref:h,...m})})})})),((o,e)=>r(l(o,["initialValues","schema"]),l(e,["initialValues","schema"]))));T.displayName="VefForm";export{T as default};
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsxs as e,jsx as o}from"@emotion/react/jsx-runtime";import{css as i}from"@emotion/react";import{useContextDisabled as t,useSingleton as s,useUnmount as n}from"@vef-framework/hooks";import{isNumber as a,isEqual as r,omit as l}from"@vef-framework/shared";import{Form as m}from"antd";import{useMemo as u,forwardRef as h,memo as f}from"react";import"../internal/index.js";import c from"./components/form-actions.js";import d from"./components/form-content.js";import{FormEventBus as p}from"./event.js";import{useActionHandlers as b}from"./hooks/use-action-handlers.js";import{useFormContextSelector as v,FormContextProvider as g}from"./hooks/use-form-context.js";import{useFormInitialization as j}from"./hooks/use-form-initialization.js";import{useFormInstance as F}from"./hooks/use-form-instance.js";import{useFormValuesChange as S}from"./hooks/use-form-values-change.js";import{useLabelWidth as V}from"./hooks/use-label-width.js";import{useFormStore as k,FormStoreProvider as x}from"./store.js";import{convertBasicSizeToUiSize as B}from"../internal/utils.js";const{useForm:w}=m,C={scrollMode:"if-needed",behavior:"smooth"};const y=h((function({schema:s,labelAlign:n="right",variant:r,showTabs:l=!1,height:h="auto",size:f,disabled:p=!1,onChange:g,submissionButton:j,resetButton:V,submitApi:x,submitTip:w,onBeforeSubmit:y,onSubmit:T,onSubmitSuccess:z,onSubmitFailure:A,onReset:N},R){const[W,E]=v((e=>[e.labelPosition,e.labelWidth])),[M,P,$]=k((e=>[e.form,e.initialValues,e.isLoading])),{handleValuesChange:H}=S(g),{handleReset:I,handleSubmit:L,handleSubmitFailed:q}=b({submitApi:x,submitTip:w,onBeforeSubmit:y,onSubmit:T,onSubmitSuccess:z,onSubmitFailure:A,onReset:N});F(R,I);const D=u((()=>{if(E)return{flex:`0 0 ${E}px`}}),[E]),G=u((()=>{let e=h;return"full"===h?e="100%":a(h)&&(e=`${h}px`),i`
3
+ height: ${e};
4
+ `}),[h]),J=t();return e(m,{labelWrap:!0,colon:!1,css:G,disabled:J||p||$,form:M,initialValues:P,labelAlign:n,labelCol:D,layout:"top"===W?"vertical":"horizontal",scrollToFirstError:C,size:B(f),variant:r,onFinish:L,onFinishFailed:q,onValuesChange:H,children:[o(d,{height:h,schema:s,showTabs:!0===l?"switch":l}),o(c,{handleReset:I,resetButton:V,submissionButton:j})]})}));y.displayName="VefFormBase";const T=f(h((function({initialValues:e,scene:i,layoutMode:t="responsive",autoExpand:a=!1,labelPosition:r="top",labelWidth:l,...m},h){const{schema:f}=m,[c]=w(),d=s((()=>new p));n((()=>{d.clear()}));const b=V(r,l),v=u((()=>({labelPosition:r,labelWidth:b,autoExpand:a,layoutMode:t})),[t,a,r,b]),{mergedInitialValues:F,valueChangeHandlers:S,virtualFieldNames:k}=j(f,e);return o(x,{eventBus:d,form:c,initialValues:F,scene:i,valueChangeHandlers:S,virtualFieldNames:k,children:o(g,{value:v,children:o(y,{ref:h,...m})})})})),((e,o)=>r(l(e,["initialValues","schema"]),l(o,["initialValues","schema"]))));T.displayName="VefForm";export{T as default};
5
5
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,5 +1,4 @@
1
- import type { AnyValue, ApiResponse, BasicSize, BiConsumer, BiMapper, Consumer, Except, Handler, LengthValue, LiteralUnion, MaybePromise, MutationApi, ObjectType, ObjectValue, Provider, TriConsumer, VefError } from "@vef-framework/shared";
2
- import type { Variant } from "antd/es/config-provider";
1
+ import type { AnyValue, ApiResponse, BasicSize, BiConsumer, BiMapper, Consumer, Except, FormItemVariant, Handler, LengthValue, LiteralUnion, MaybePromise, MutationApi, ObjectType, ObjectValue, Provider, TriConsumer, VefError } from "@vef-framework/shared";
3
2
  import type { ReactNode } from "react";
4
3
  import type { FormActionButtonConfig, FormLabelAlign, FormLabelPosition, FormLayoutMode, FormScene, FormSchema, FormTabsUse, FormValues, FormVirtualKeys } from "./types";
5
4
  /**
@@ -73,7 +72,7 @@ export interface VefFormProps<Values extends ObjectType = ObjectValue, Result =
73
72
  /**
74
73
  * The variant of the form.
75
74
  */
76
- variant?: Variant;
75
+ variant?: FormItemVariant;
77
76
  /**
78
77
  * Whether to show tabs.
79
78
  * When set to true, the form will be displayed in tabs, default use is 'switch'.
@@ -84,7 +83,7 @@ export interface VefFormProps<Values extends ObjectType = ObjectValue, Result =
84
83
  /**
85
84
  * The height of the form.
86
85
  */
87
- height?: LiteralUnion<"auto", LengthValue>;
86
+ height?: LiteralUnion<"auto" | "full", LengthValue>;
88
87
  /**
89
88
  * The size of the form.
90
89
  */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{useSingleton as e,useUpdateEffect as t}from"@vef-framework/hooks";import{isEqual as n,VefError as o}from"@vef-framework/shared";import{createContext as s,createElement as r,useContext as i}from"react";import{createStore as a}from"zustand";import{useStoreWithEqualityFn as l}from"zustand/traditional";const u=s(null);function c({children:o,...s}){const i=e((()=>{return e=s,a(((t,o)=>({...e,invokeValueChangeHandlers(e,t){const{scene:n,valueChangeHandlers:s,initialValues:r,setValues:i}=o(),a=e??r,l=t?new Set(t):null;for(const[e,t]of Object.entries(s))l&&!l.has(e)||t(a[e]??null,{values:a,scene:n,setValues:i})},getValues(){const{form:e,initialValues:t}=o();return e.isFieldsTouched(!0)?t:e.getFieldsValue()},setValues(e){const{form:t,eventBus:s,invokeValueChangeHandlers:r}=o(),i=t.getFieldsValue(),a=Object.keys(e).filter((t=>!n(e[t],i[t])));t.setFieldsValue(e);const l=t.getFieldsValue();s.emitChange(l),r(l,a)},isLoading:!1,setIsLoading(e){t({isLoading:e})},showActionButtons:!0,setShowActionButtons(e){t({showActionButtons:e})}})));var e})),{scene:l}=s;return t((()=>{i.setState({scene:l})}),[l]),r(u.Provider,{value:i},o)}function d(){const e=i(u);if(!e)throw new o(-2,"FormStore can be used only inside FormStoreProvider");return e}function f(e){return l(d(),e,n)}export{c as FormStoreProvider,f as useFormStore,d as useFormStoreApi};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -106,19 +106,19 @@ export interface InternalFormContext {
106
106
  /**
107
107
  * The virtual keys of the form.
108
108
  */
109
- export type FormVirtualKeys<S extends ReadonlyArray<FormGroup<any, any>>> = FormVirtualItems<FlattenFormItem<S>>[number];
110
- type FormVirtualItems<T extends ReadonlyArray<FormItem<any>>> = {
109
+ export type FormVirtualKeys<S extends ReadonlyArray<FormGroup<any, any, any>>> = FormVirtualItems<FlattenFormItem<S>>[number];
110
+ type FormVirtualItems<T extends ReadonlyArray<FormItem<any, any, any>>> = {
111
111
  [K in keyof T]: T[K]["virtual"] extends true ? T[K]["name"] : never;
112
112
  };
113
- type FlattenFormItem<T extends readonly any[]> = T extends readonly [infer Head, ...infer Tail] ? Head extends FormGroup<any> ? [...FlattenFormItem<Head["rows"]>, ...FlattenFormItem<Tail>] : Head extends FormRow<any> ? [...FlattenFormItem<Head["columns"]>, ...FlattenFormItem<Tail>] : Head extends FormColumn<any> ? [...FlattenFormItem<Head["items"]>, ...FlattenFormItem<Tail>] : Head extends FormItem<any> ? [Head, ...FlattenFormItem<Tail>] : FlattenFormItem<Tail> : [];
113
+ type FlattenFormItem<T extends readonly any[]> = T extends readonly [infer Head, ...infer Tail] ? Head extends FormGroup<any, any, any> ? [...FlattenFormItem<Head["rows"]>, ...FlattenFormItem<Tail>] : Head extends FormRow<any, any, any> ? [...FlattenFormItem<Head["columns"]>, ...FlattenFormItem<Tail>] : Head extends FormColumn<any, any, any> ? [...FlattenFormItem<Head["items"]>, ...FlattenFormItem<Tail>] : Head extends FormItem<any, any, any> ? [Head, ...FlattenFormItem<Tail>] : FlattenFormItem<Tail> : [];
114
114
  /**
115
115
  * The form schema.
116
116
  */
117
- export type FormSchema<Values extends ObjectType, Scene extends FormScene = FormScene> = NonEmptyTuple<FormGroup<Values, Scene>>;
117
+ export type FormSchema<Values extends ObjectType, Scene extends FormScene = FormScene> = NonEmptyTuple<FormGroup<Values, StringKey<Values>, Scene>>;
118
118
  /**
119
119
  * The form group of the form.
120
120
  */
121
- export interface FormGroup<Values extends ObjectType = ObjectValue, Scene extends FormScene = FormScene> extends ControlOptions<Values, Scene> {
121
+ export interface FormGroup<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene> extends ControlOptions<Values, Scene> {
122
122
  /**
123
123
  * The key of the form group.
124
124
  */
@@ -130,12 +130,12 @@ export interface FormGroup<Values extends ObjectType = ObjectValue, Scene extend
130
130
  /**
131
131
  * The rows of the form group.
132
132
  */
133
- rows: ReadonlyArray<FormRow<Values, Scene>>;
133
+ rows: ReadonlyArray<FormRow<Values, Key, Scene>>;
134
134
  }
135
135
  /**
136
136
  * The row of the form group.
137
137
  */
138
- export interface FormRow<Values extends ObjectType = ObjectValue, Scene extends FormScene = FormScene> extends ControlOptions<Values, Scene> {
138
+ export interface FormRow<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene> extends ControlOptions<Values, Scene> {
139
139
  /**
140
140
  * The key of the form row.
141
141
  */
@@ -147,12 +147,12 @@ export interface FormRow<Values extends ObjectType = ObjectValue, Scene extends
147
147
  /**
148
148
  * The columns of the form row.
149
149
  */
150
- columns: ReadonlyArray<FormColumn<Values, Scene>>;
150
+ columns: ReadonlyArray<FormColumn<Values, Key, Scene>>;
151
151
  }
152
152
  /**
153
153
  * The column of the form row.
154
154
  */
155
- export interface FormColumn<Values extends ObjectType = ObjectValue, Scene extends FormScene = FormScene> extends ControlOptions<Values, Scene> {
155
+ export interface FormColumn<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene> extends ControlOptions<Values, Scene> {
156
156
  /**
157
157
  * The key of the form column.
158
158
  */
@@ -164,7 +164,7 @@ export interface FormColumn<Values extends ObjectType = ObjectValue, Scene exten
164
164
  /**
165
165
  * The items of the form column.
166
166
  */
167
- items: ReadonlyArray<FormItem<Values, StringKey<Values>, Scene>>;
167
+ items: ReadonlyArray<FormItem<Values, Key, Scene>>;
168
168
  }
169
169
  /**
170
170
  * The form item.
@@ -1,5 +1,5 @@
1
- import type { AnyValue, ObjectType, ObjectValue, StringKey } from "@vef-framework/shared";
2
1
  import type { ReactElement } from "react";
2
+ import { type AnyValue, type ObjectType, type ObjectValue, type StringKey } from "@vef-framework/shared";
3
3
  import type { FormScene, FormValidationRule } from "./types";
4
4
  type MessageType = string | ReactElement;
5
5
  /**
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{isEqual as e,VefError as r,validator as o,getNowDateString as i}from"@vef-framework/shared";function n(e){return()=>[{required:!0,message:e}]}function t(o,i){return({label:n})=>[{validator:(t,s)=>e(s,o)?Promise.resolve():Promise.reject(new r(-2,i??`${n?`${n}的值`:"值"}必须是${o}`))}]}function s(o,i){return({label:n})=>[{validator:(t,s)=>e(s,o)?Promise.reject(new r(-2,i??`${n?`${n}的值`:"值"}不能是${o}`)):Promise.resolve()}]}function l(e,r){return()=>[{type:"enum",enum:e,message:r}]}function a(e,r){return()=>[{min:e,message:r}]}function m(e,r){return()=>[{max:e,message:r}]}function u(e,r,o){return()=>[{min:e,max:r,message:o}]}function c(e){return({label:i})=>[{validator:(n,t)=>o.isAlpha(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是字母`))}]}function P(e){return({label:i})=>[{validator:(n,t)=>o.isAlphanumeric(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是字母或数字`))}]}function v(e){return({label:i})=>[{validator:(n,t)=>o.isAscii(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是ASCII字符`))}]}function f(e){return({label:i})=>[{validator:(n,t)=>o.isNumeric(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是数字`))}]}function $(e){return({label:i})=>[{validator:(n,t)=>o.isEmail(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的邮箱`))}]}function d(e){return({label:i})=>[{validator:(n,t)=>o.isHexColor(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是十六进制颜色`))}]}function w(e){return({label:i})=>[{validator:(n,t)=>o.isIdentityCard(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的身份证`))}]}function b(e){return({label:i})=>[{validator:(n,t)=>o.isIp(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的IP地址`))}]}function j(e){return({label:i})=>[{validator:(n,t)=>o.isPort(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的端口`))}]}function p(e){return({label:i})=>[{validator:(n,t)=>o.isJson(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的JSON`))}]}function I(e){return({label:i})=>[{validator:(n,t)=>o.isUrl(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的URL`))}]}function g(e){return({label:i})=>[{validator:(n,t)=>o.isUri(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的URI`))}]}function A(e){return({label:i})=>[{validator:(n,t)=>o.isPostalCode(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是合法的邮政编码`))}]}function C(e,n){return({label:t})=>[{validator:(s,l)=>o.isBefore(l,e??i())?Promise.resolve():Promise.reject(new r(-2,n??`${t??"值"}必须在${e}之前`))}]}function h(e,n){return({label:t})=>[{validator:(s,l)=>o.isAfter(l,e??i())?Promise.resolve():Promise.reject(new r(-2,n??`${t??"值"}必须在${e}之后`))}]}function x(e){return({label:i})=>[{validator:(n,t)=>o.isChineseName(t)?Promise.resolve():Promise.reject(new r(-2,e??`${i??"值"}必须是中文名称`))}]}export{c as isAlpha,P as isAlphanumeric,v as isAscii,x as isChineseName,h as isDateAfter,C as isDateBefore,$ as isEmail,t as isEqualsTo,d as isHexColor,w as isIdentityCard,l as isIn,b as isIp,p as isJson,m as isMeetsMaxSize,a as isMeetsMinSize,u as isMeetsRangeSize,s as isNotEqualsTo,f as isNumeric,j as isPort,A as isPostalCode,n as isRequired,g as isUri,I as isUrl};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,8 +1,8 @@
1
- import type { AnyValue, ObjectType, ObjectValue } from "@vef-framework/shared";
1
+ import { type AnyValue, type ObjectType, type ObjectValue } from "@vef-framework/shared";
2
2
  import { type FC } from "react";
3
- import type { FormScene, FormSchema } from "../vef-form";
4
3
  import type { FormVirtualKeys } from "../vef-form/types";
5
4
  import type { VefFormDrawerProps } from "./props";
5
+ import { type FormScene, type FormSchema } from "../vef-form";
6
6
  declare function VefFormDrawerBase<Values extends ObjectType = ObjectValue, Result = AnyValue, Scene extends FormScene = FormScene, Schema extends FormSchema<Values, Scene> = FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema> = FormVirtualKeys<Schema>>({ title, open, closable, closeOnMaskClick, closeOnEscPress, destroyOnClose, cancelOnClose, placement, expansionSize, loading, extra, cancelButtonText, actions, onClose, onCancel, onAfterClose, onAfterOpen, submissionButtonText, disabled, ...formProps }: VefFormDrawerProps<Values, Result, Scene, Schema, VirtualKeys>): import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  declare const VefFormDrawer: typeof VefFormDrawerBase & Pick<FC, "displayName">;
8
8
  export type { VefFormDrawerProps };
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{jsx as e,jsxs as o,Fragment as n}from"@emotion/react/jsx-runtime";import{useContextDisabled as t,DisabledContextProvider as r}from"@vef-framework/hooks";import{isFunction as s}from"@vef-framework/shared";import{useRef as i,useCallback as l,memo as a}from"react";import c from"../vef-button/index.js";import m from"../vef-drawer/index.js";import f from"../vef-form/index.js";import d from"../vef-drawer/components/action-button-wrapper.js";const u=a((function({title:a,open:u,closable:p,closeOnMaskClick:C,closeOnEscPress:x,destroyOnClose:O=!0,cancelOnClose:k,placement:b,expansionSize:v="medium",loading:h,extra:w,cancelButtonText:B,actions:j,onClose:A,onCancel:y,onAfterClose:T,onAfterOpen:g,submissionButtonText:z,disabled:E=!1,...M}){const P=i(null),S=l((async()=>{await(P.current?.submit())}),[]),D=t()||E,F=l((()=>{P.current?.reset()}),[]),N=l((([t,r])=>{const i=e(d,{children:e(c,{color:"default",disabled:D,variant:"filled",onClick:F,children:"重置"})},"resetActionButton");return s(j)?j([t,i,r]):o(n,{children:[t,i,r]})}),[j,D,F]);return e(r,{value:D,children:e(m,{actions:N,cancelOnClose:k,closable:p,closeOnEscPress:x,closeOnMaskClick:C,destroyOnClose:O,expansionSize:v,extra:w,loading:h,okButtonText:z,open:u,placement:b,title:a,onAfterClose:T,onAfterOpen:g,onCancel:y,onClose:A,onOk:S,children:e(f,{ref:P,resetButton:!1,submissionButton:!1,...M})})})}));u.displayName="VefFormDrawer";export{u as default};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,8 +1,8 @@
1
- import type { AnyValue, ObjectType, ObjectValue } from "@vef-framework/shared";
1
+ import { type AnyValue, type ObjectType, type ObjectValue } from "@vef-framework/shared";
2
2
  import { type FC } from "react";
3
- import type { FormScene, FormSchema } from "../vef-form";
4
3
  import type { FormVirtualKeys } from "../vef-form/types";
5
4
  import type { VefFormModalProps } from "./props";
5
+ import { type FormScene, type FormSchema } from "../vef-form";
6
6
  declare function VefFormModalBase<Values extends ObjectType = ObjectValue, Result = AnyValue, Scene extends FormScene = FormScene, Schema extends FormSchema<Values, Scene> = FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema> = FormVirtualKeys<Schema>>({ submissionButtonText, actions, title, open, closable, closeOnMaskClick, closeOnEscPress, destroyOnClose, cancelOnClose, width, loading, cancelButtonText, onClose, onCancel, onAfterOpen, onAfterClose, disabled, ...formProps }: VefFormModalProps<Values, Result, Scene, Schema, VirtualKeys>): import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  declare const VefFormModal: typeof VefFormModalBase & Pick<FC, "displayName">;
8
8
  export type { VefFormModalProps };
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{jsx as e,jsxs as o,Fragment as n}from"@emotion/react/jsx-runtime";import{useContextDisabled as t,DisabledContextProvider as r}from"@vef-framework/hooks";import{isFunction as s}from"@vef-framework/shared";import{useRef as l,useCallback as i,memo as c}from"react";import a from"../vef-button/index.js";import m from"../vef-form/index.js";import d from"../vef-modal/index.js";import f from"../vef-modal/components/action-button-wrapper.js";const u=c((function({submissionButtonText:c="提交",actions:u,title:p,open:C,closable:O,closeOnMaskClick:k,closeOnEscPress:b,destroyOnClose:h=!0,cancelOnClose:x,width:v="medium",loading:B,cancelButtonText:w,onClose:j,onCancel:A,onAfterOpen:y,onAfterClose:T,disabled:M=!1,...g}){const E=l(null),P=i((async()=>{await(E.current?.submit())}),[]),F=t()||M,N=i((()=>{E.current?.reset()}),[]),V=i((([t,r])=>{const l=e(f,{children:e(a,{color:"default",variant:"filled",onClick:N,children:"重置"})},"resetActionButton");return s(u)?u([t,l,r]):o(n,{children:[t,l,r]})}),[u,N]);return e(r,{value:F,children:e(d,{actions:V,cancelButtonText:w,cancelOnClose:x,closable:O,closeOnEscPress:b,closeOnMaskClick:k,destroyOnClose:h,loading:B,okButtonText:c,open:C,title:p,width:v,onAfterClose:T,onAfterOpen:y,onCancel:A,onClose:j,onOk:P,children:e(m,{ref:E,disabled:F,resetButton:!1,submissionButton:!1,...g})})})}));u.displayName="VefFormModal";export{u as default};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,4 @@
1
+ import type { VefGenericSelectContentProps, VefGenericSelectProps } from "./props";
2
+ declare function VefGenericSelect<T, P extends VefGenericSelectContentProps>({ value, size, renderLabel, placeholder, disabled, clearable, loading, variant, children, onClear, }: VefGenericSelectProps<T, P>): import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export type { VefGenericSelectContentProps, VefGenericSelectProps };
4
+ export default VefGenericSelect;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import{SearchOutlined as o}from"@ant-design/icons";import{isFunction as r,styles as n}from"@vef-framework/shared";import{Select as i}from"antd";import{LeafIcon as a}from"lucide-react";import{useState as t,useDeferredValue as l,useCallback as d,useMemo as c,cloneElement as s}from"react";import"../internal/index.js";import m from"../vef-icon/index.js";import{convertBasicSizeToUiSize as p}from"../internal/utils.js";const f={"--vef-select-option-padding":0};function u({value:u,size:h,renderLabel:v,placeholder:b,disabled:w,clearable:C,loading:g,variant:x,children:j,onClear:S}){const[k,y]=t(!1),[z,F]=t(!1),[V,W]=t(),B=l(V),D=d((()=>{F(!1)}),[]),I=d((()=>{F(!0)}),[]),L=d((()=>{y(!1)}),[]),M=c((()=>{if(r(v))return({value:e})=>v?.(e)}),[v]),R=z&&k?e(o,{}):e(m,{children:e(a,{})}),q=s(j,{keyword:B,onConfirm:L});return e(i,{showSearch:!0,allowClear:C,css:n.fullWidth,disabled:w,dropdownStyle:f,labelRender:M,loading:g,notFoundContent:q,open:k,placeholder:b,popupMatchSelectWidth:!1,searchValue:V,size:p(h),suffixIcon:R,value:u,variant:x,onBlur:D,onClear:S,onDropdownVisibleChange:y,onFocus:I,onSearch:W})}export{u as default};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,60 @@
1
+ import type { BasicSize, FormItemVariant, Handler, Mapper, MaybeNull } from "@vef-framework/shared";
2
+ import type { ReactElement, ReactNode } from "react";
3
+ /**
4
+ * The partial props for the VefGenericSelectContent component.
5
+ */
6
+ export interface VefGenericSelectContentProps {
7
+ /**
8
+ * The keyword to filter the content to be selected.
9
+ */
10
+ keyword?: string;
11
+ /**
12
+ * The handler to confirm the selection.
13
+ */
14
+ onConfirm?: Handler;
15
+ }
16
+ /**
17
+ * The props for the VefGenericSelect component.
18
+ */
19
+ export interface VefGenericSelectProps<T, P extends VefGenericSelectContentProps> {
20
+ /**
21
+ * The value of the generic select.
22
+ */
23
+ value: MaybeNull<T>;
24
+ /**
25
+ * The mapper to render the label.
26
+ */
27
+ renderLabel?: Mapper<T, ReactNode>;
28
+ /**
29
+ * The size of the generic select.
30
+ */
31
+ size?: BasicSize;
32
+ /**
33
+ * The placeholder of the generic select.
34
+ */
35
+ placeholder?: string;
36
+ /**
37
+ * Whether the generic select is disabled.
38
+ */
39
+ disabled?: boolean;
40
+ /**
41
+ * Whether the generic select is clearable.
42
+ */
43
+ clearable?: boolean;
44
+ /**
45
+ * Whether the generic select is loading.
46
+ */
47
+ loading?: boolean;
48
+ /**
49
+ * The variant of the generic select.
50
+ */
51
+ variant?: FormItemVariant;
52
+ /**
53
+ * The children of the generic select.
54
+ */
55
+ children: ReactElement<P>;
56
+ /**
57
+ * The handler to clear the generic select.
58
+ */
59
+ onClear?: Handler;
60
+ }
@@ -1,4 +1,4 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{jsx as r}from"@emotion/react/jsx-runtime";import{css as n}from"@emotion/react";import{useGapSizeNormalizer as t,useSize as i}from"@vef-framework/hooks";import{breakpoints as e,isArray as o}from"@vef-framework/shared";import m from"clsx";import{useMemo as a,useRef as f,useEffect as c}from"react";import{useContainerQuery as d}from"react-container-query";const p=24,s=n`
3
3
  display: grid;
4
4
  grid: auto-flow / repeat(${p}, minmax(0, 1fr));
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  const x=["xs","sm","md","lg","xl","xxl"];export{x as BREAKPOINTS};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{jsx as e}from"@emotion/react/jsx-runtime";import r from"clsx";import{useMemo as i}from"react";const t=({span:t,xs:m,sm:s,md:d,lg:o,xl:p,xxl:f,children:l})=>{const u=i((()=>{const e=[];return t&&e.push(`vef-grid-item-${t}`),m&&e.push(`vef-grid-item-xs-${m}`),s&&e.push(`vef-grid-item-sm-${s}`),d&&e.push(`vef-grid-item-md-${d}`),o&&e.push(`vef-grid-item-lg-${o}`),p&&e.push(`vef-grid-item-xl-${p}`),f&&e.push(`vef-grid-item-xxl-${f}`),e}),[t,m,s,d,o,p,f]);return e("div",{className:r(u),children:l})};export{t as default};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
2
- import{jsx as o}from"@emotion/react/jsx-runtime";import r from"@ant-design/icons";import{omit as e}from"@vef-framework/shared";import{forwardRef as m,cloneElement as t,memo as i}from"react";const f=i(m((({children:m,...i},f)=>o(r,{ref:f,component:o=>t(m,e(o,["fill"])),...i}))));f.displayName="VefIcon";export{f as default};
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import r from"@ant-design/icons";import{themeVariables as o,omit as t}from"@vef-framework/shared";import{forwardRef as i,useMemo as n,Suspense as f,cloneElement as m,memo as l}from"react";const s=l(i((({size:i,children:l,...s},c)=>{const a=n((()=>{const e="small"===i?o.fontSizeSm:"medium"===i?o.fontSize:"large"===i?o.fontSizeLg:"huge"===i?o.fontSizeXl:void 0;if(e)return{fontSize:e}}),[i]);return e(r,{ref:c,style:a,component:e=>{if(l.type===f){const{children:r}=l.props;return m(l,{children:m(r,t(e,["fill"]))})}return m(l,t(e,["fill"]))},...s})})));s.displayName="VefIcon";export{s as default};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,10 +1,14 @@
1
1
  import type { IconComponentProps } from "@ant-design/icons/lib/components/Icon";
2
- import type { Except } from "@vef-framework/shared";
2
+ import type { Except, Size } from "@vef-framework/shared";
3
3
  import type { ReactElement } from "react";
4
4
  /**
5
5
  * The props of VefIcon component.
6
6
  */
7
- export interface VefIconProps extends Except<IconComponentProps, "component" | "children"> {
7
+ export interface VefIconProps extends Except<IconComponentProps, "component" | "size" | "children"> {
8
+ /**
9
+ * The size of the icon.
10
+ */
11
+ size?: Exclude<Size, "tiny">;
8
12
  /**
9
13
  * The icon component.
10
14
  */
@@ -0,0 +1,5 @@
1
+ import { type FC } from "react";
2
+ import type { VefIconSelectProps } from "./props";
3
+ declare const VefIconSelect: FC<VefIconSelectProps>;
4
+ export type { VefIconSelectProps };
5
+ export default VefIconSelect;
@@ -0,0 +1,42 @@
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsx as e,jsxs as r}from"@emotion/react/jsx-runtime";import{css as i}from"@emotion/react";import{useThemeTokens as o}from"@vef-framework/hooks";import{themeVariables as n,trim as t,cluster as l,isUndefined as c}from"@vef-framework/shared";import{useMemo as a,useCallback as s,memo as d,useState as m}from"react";import f from"../vef-dynamic-icon/index.js";import{dynamicIconNames as p}from"../vef-dynamic-icon/props.js";import h from"../vef-empty-placeholder/index.js";import v from"../vef-generic-select/index.js";import u from"../vef-space/index.js";import g from"../vef-text/index.js";import x from"../vef-virtual-grid/index.js";const y=i`
3
+ color: ${n.colorTextSlate};
4
+
5
+ .vef-icon-select-wrapper {
6
+ padding: calc(${n.paddingXxs} + 2px) ${n.paddingXs};
7
+ }
8
+ `,b=i`
9
+ height: 100%;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ background-color: ${n.colorFillContent};
14
+ border-radius: ${n.borderRadius};
15
+ transition: background-color ${n.motionDurationMid} ${n.motionEaseInOut};
16
+ &:hover {
17
+ cursor: pointer;
18
+ background-color: ${n.colorFillContentHover};
19
+ }
20
+
21
+ &.vef-icon-select-item-selected {
22
+ background-color: ${n.colorPrimaryBg};
23
+ }
24
+
25
+ .vef-icon {
26
+ font-size: 28px;
27
+ }
28
+ `;const w=d((function({value:r,onChange:i,keyword:n,onConfirm:c}){const{paddingXS:d,paddingXXS:m}=o(),v=a((()=>{const e=t(n);return l(e?p.filter((r=>r.includes(e))):p,6)}),[n]),[u,g]=a((()=>[420+2*d,348+2*(m+2)]),[m,d]),w=s((({item:o})=>{const n=o===r;return e("div",{className:n?"vef-icon-select-item-selected":void 0,css:b,title:o,onClick:()=>{n||i(o),c?.()},children:e(f,{name:o})})}),[i,c,r]),j=a((()=>({width:u,height:g})),[u,g]);return 0===v.length?e("div",{css:y,children:e("div",{className:"vef-icon-select-wrapper",style:j,children:e(h,{description:"暂无图标",presetIcon:"simple"})})}):e("div",{css:y,children:e(x,{className:"vef-icon-select-wrapper",columnWidth:60,gap:"small",height:g,items:v,renderItem:w,rowHeight:60,width:u})})})),j=i`
29
+ width: 100%;
30
+
31
+ .vef-space-item:last-of-type {
32
+ min-width: 0;
33
+ }
34
+
35
+ .vef-typography {
36
+ line-height: inherit;
37
+ font-size: inherit;
38
+ font-family: inherit;
39
+ color: inherit;
40
+ }
41
+ `;function k(i){return r(u,{css:j,children:[e(f,{name:i}),e(g,{ellipsis:!0,children:i})]})}const C=({defaultValue:r,value:i,size:o,placeholder:n,disabled:t,clearable:l,variant:a,onChange:d,onClear:f})=>{const[p,h]=m(r??null),u=s((e=>{c(i)?h(e):d?.(e)}),[d,i]),g=s((()=>{u(null),f?.()}),[u,f]);return e(v,{clearable:l,disabled:t,placeholder:n,renderLabel:k,size:o,value:i??p,variant:a,onClear:g,children:e(w,{value:c(i)?p:i,onChange:u})})};export{C as default};
42
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,43 @@
1
+ import type { BasicSize, Consumer, FormItemVariant, Handler, MaybeNull } from "@vef-framework/shared";
2
+ import type { DynamicIconName } from "../vef-dynamic-icon";
3
+ /**
4
+ * The props for the VefIconSelect component.
5
+ */
6
+ export interface VefIconSelectProps {
7
+ /**
8
+ * The default value of the icon select.
9
+ */
10
+ defaultValue?: DynamicIconName;
11
+ /**
12
+ * The value of the icon select.
13
+ */
14
+ value?: MaybeNull<DynamicIconName>;
15
+ /**
16
+ * The size of the icon select.
17
+ */
18
+ size?: BasicSize;
19
+ /**
20
+ * The placeholder of the icon select.
21
+ */
22
+ placeholder?: string;
23
+ /**
24
+ * Whether the icon select is disabled.
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * Whether the icon select is clearable.
29
+ */
30
+ clearable?: boolean;
31
+ /**
32
+ * The variant of the icon select.
33
+ */
34
+ variant?: FormItemVariant;
35
+ /**
36
+ * The onChange event of the icon select.
37
+ */
38
+ onChange?: Consumer<MaybeNull<DynamicIconName>>;
39
+ /**
40
+ * The onClear event of the icon select.
41
+ */
42
+ onClear?: Handler;
43
+ }
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
2
- import{useRef as r,useImperativeHandle as t}from"react";function u(u){const c=r(null);return t(u,(()=>({blur:()=>c.current?.blur(),focus:()=>c.current?.focus({preventScroll:!0})}))),c}export{u as useInputInstance};
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{useRef as n,useImperativeHandle as r}from"react";function t(t){const e=n(null);return r(t,(()=>({blur:()=>e.current?.blur(),focus:()=>e.current?.focus({preventScroll:!0}),input:e.current?.input??null,nativeElement:e.current?.nativeElement??null}))),e}export{t as useInputInstance};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{jsx as e}from"@emotion/react/jsx-runtime";import{isFunction as o}from"@vef-framework/shared";import{Input as r}from"antd";import{forwardRef as t,useMemo as n}from"react";import"../internal/index.js";import{useInputInstance as a}from"./hooks/use-input-instance.js";import{convertBasicSizeToUiSize as u}from"../internal/utils.js";function l(e){return""===e?null:e}const i=t((({defaultValue:t,value:i,clearable:s,size:d,showCount:m,prepend:f,append:p,onChange:v,onEnterKeyPress:c,onBlur:g,onFocus:h,...C},j)=>{const w=n((()=>({onChange:o(v)?e=>v(l(e.target.value)):void 0,onPressEnter:o(c)?e=>c(l(e.target.value)):void 0,onBlur:o(g)?e=>g(l(e.target.value)):void 0,onFocus:o(h)?e=>h(l(e.target.value)):void 0})),[v,c,g,h]),x=a(j);return e(r,{ref:x,addonAfter:p,addonBefore:f,allowClear:s,defaultValue:t,showCount:m,size:u(d),type:"text",value:i,...C,...w})}));export{i as default};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -13,6 +13,14 @@ export interface VefInputInstance {
13
13
  * The focus handler.
14
14
  */
15
15
  focus: Handler;
16
+ /**
17
+ * The input element.
18
+ */
19
+ input: MaybeNull<HTMLInputElement>;
20
+ /**
21
+ * The native element of the input.
22
+ */
23
+ nativeElement: MaybeNull<HTMLElement>;
16
24
  }
17
25
  /**
18
26
  * The props of the VefInput component.
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{useRef as r,useImperativeHandle as t}from"react";function u(u){const c=r(null);return t(u,(()=>({blur:()=>c.current?.blur(),focus:()=>c.current?.focus({preventScroll:!0})}))),c}export{u as useInputNumberInstance};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
2
  import{jsx as o}from"@emotion/react/jsx-runtime";import{isFunction as r,styles as e}from"@vef-framework/shared";import{InputNumber as n}from"antd";import{forwardRef as t,useMemo as s}from"react";import"../internal/index.js";import{useInputNumberInstance as a}from"./hooks/use-input-number-instance.js";import{convertBasicSizeToUiSize as u}from"../internal/utils.js";function i(o,r){const e=Number.parseFloat(o);return Number.isNaN(e)?null:r?`${e}`:e}const l=t((({size:t,showControls:l,step:m,min:d,max:f,prepend:c,append:g,...v},p)=>{const F=s((()=>{const{useStringFormat:o}=v;if(o){const{onChange:o,onEnterKeyPress:e,onBlur:n,onFocus:t}=v;return{stringFormat:!0,onChange:r(o)?r=>o(r):void 0,onPressEnter:r(e)?o=>e(i(o.target.value,!0)):void 0,onBlur:r(n)?o=>n(i(o.target.value,!0)):void 0,onFocus:r(t)?o=>t(i(o.target.value,!0)):void 0}}const{onChange:e,onEnterKeyPress:n,onBlur:t,onFocus:s}=v;return{stringFormat:!1,onChange:r(e)?o=>e(o):void 0,onPressEnter:r(n)?o=>n(i(o.target.value,!1)):void 0,onBlur:r(t)?o=>t(i(o.target.value,!1)):void 0,onFocus:r(s)?o=>s(i(o.target.value,!1)):void 0}}),[v]),h=a(p),{useStringFormat:B}=v;if(B){const{useStringFormat:r,defaultValue:s,value:a,onChange:i,onEnterKeyPress:p,onBlur:B,onFocus:C,...x}=v,{stringFormat:E}=F;if(E){const{stringFormat:r,...i}=F;return o(n,{ref:h,stringMode:!0,addonAfter:g,addonBefore:c,controls:l,css:e.fullWidth,defaultValue:s,max:`${f}`,min:`${d}`,size:u(t),step:`${m}`,value:a,...x,...i})}return}const{useStringFormat:C,defaultValue:x,value:E,onChange:P,onEnterKeyPress:j,onBlur:y,onFocus:K,...N}=v,{stringFormat:S}=F;if(!S){const{stringFormat:r,...t}=F;return o(n,{ref:h,addonAfter:g,addonBefore:c,controls:l,css:e.fullWidth,defaultValue:x,max:f,min:d,step:m,value:E,...N,...t})}}));export{l as default};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,3 @@
1
+ import type { ChildrenProps } from "@vef-framework/shared";
2
+ declare const VefContent: import("react").NamedExoticComponent<Required<ChildrenProps>>;
3
+ export default VefContent;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsx as t}from"@emotion/react/jsx-runtime";import{Layout as e}from"antd";import{memo as o}from"react";const{Content:r}=e,n=o((({children:e})=>t(r,{children:e})));n.displayName="VefContent";export{n as default};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,3 @@
1
+ import type { FC } from "react";
2
+ declare const VefFontSize: FC;
3
+ export default VefFontSize;
@@ -0,0 +1,6 @@
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsx as e,jsxs as l}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{themeVariables as o,styles as t}from"@vef-framework/shared";import{useConfigStore as n}from"../../vef-config-provider/store.js";import i from"../../vef-dropdown/index.js";import d from"../../vef-icon/index.js";function s(r){return e("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...r,children:l("g",{fill:"none",fillRule:"evenodd",children:[e("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e("path",{d:"M21 12a1 1 0 0 1 1 1v6a1 1 0 0 1-1.911.412a4 4 0 1 1 0-6.824A1 1 0 0 1 21 12M8 4c.732 0 1.381.473 1.605 1.17l4.347 13.524a1 1 0 0 1-1.904.612L10.664 15H5.336l-1.384 4.306a1 1 0 0 1-1.904-.612L6.395 5.17A1.69 1.69 0 0 1 8 4m10 10a2 2 0 1 0 0 4a2 2 0 0 0 0-4M8 6.712L5.979 13h4.042z",fill:"currentColor"})]})})}function h(l){return e("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{d:"M4 19V8.5a3.5 3.5 0 1 1 7 0V19m-7-6h7m10-1h-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}function m(l){return e("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{d:"M4 19V8.5a3.5 3.5 0 1 1 7 0V19m-7-6h7m7-4v6m3-3h-6",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}const a=r`
3
+ padding: ${o.paddingXs};
4
+ ${t.flexCenter}
5
+ `,c=[{key:"medium",type:"item",label:"默认字号",icon:e(d,{children:e(h,{})})},{key:"large",type:"item",label:"大字号",icon:e(d,{children:e(m,{})})}],f=()=>{const[l,r]=n((e=>[e.fontSize,e.setFontSize]));return e(i,{selectable:!0,items:c,selectedKeys:[l],onChange:([e])=>r(e),children:e("div",{css:a,children:e(d,{size:"large",children:e(s,{})})})})};export{f as default};
6
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,3 @@
1
+ import { type FC } from "react";
2
+ declare const VefFullscreen: FC;
3
+ export default VefFullscreen;
@@ -0,0 +1,6 @@
1
+ /*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{themeVariables as o,styles as t}from"@vef-framework/shared";import{MinimizeIcon as i,MaximizeIcon as n}from"lucide-react";import{useState as m,useCallback as c}from"react";import d from"../../vef-icon/index.js";import l from"../../vef-tooltip/index.js";const s=r`
3
+ padding: ${o.paddingXs};
4
+ ${t.flexCenter}
5
+ `,f=()=>{const[r,o]=m(!1),t=c((()=>{r?(document.exitFullscreen(),o(!1)):(document.body.requestFullscreen(),o(!0))}),[r]);return e(l,{content:r?"退出全屏":"全屏",delay:.5,children:e("div",{css:s,onClick:t,children:e(d,{size:"large",children:e(r?i:n,{})})})})};export{f as default};
6
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,3 @@
1
+ import type { FC } from "react";
2
+ declare const VefHeaderActionIcons: FC;
3
+ export default VefHeaderActionIcons;