@vef-framework-react/components 2.1.6 → 2.1.8
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.
- package/dist/cjs/charts/helpers/group.cjs +1 -1
- package/dist/cjs/charts/hooks/use-chart.cjs +1 -1
- package/dist/cjs/config-provider/global-style.cjs +1 -1
- package/dist/cjs/config-provider/index.cjs +1 -1
- package/dist/cjs/crud/components/main.cjs +1 -1
- package/dist/cjs/crud/components/mutation-holder.cjs +1 -1
- package/dist/cjs/crud/components/scene-form.cjs +1 -1
- package/dist/cjs/crud/components/selection-indicator.cjs +1 -1
- package/dist/cjs/crud/index.cjs +1 -1
- package/dist/cjs/crud/store.cjs +1 -1
- package/dist/cjs/crud/styles.cjs +1 -1
- package/dist/cjs/flex-card/styles.cjs +1 -1
- package/dist/cjs/form/components/form.cjs +1 -1
- package/dist/cjs/form/fields/date-picker/index.cjs +1 -1
- package/dist/cjs/form/fields/date-range-picker/index.cjs +1 -1
- package/dist/cjs/form/fields/time-picker/index.cjs +1 -1
- package/dist/cjs/form/fields/time-range-picker/index.cjs +1 -1
- package/dist/cjs/form/form-actions.cjs +1 -0
- package/dist/cjs/form/form.cjs +1 -1
- package/dist/cjs/form/helpers/create-field.cjs +1 -0
- package/dist/cjs/form/helpers/index.cjs +1 -1
- package/dist/cjs/form/index.cjs +1 -1
- package/dist/cjs/form/use-form.cjs +1 -1
- package/dist/cjs/form-drawer/index.cjs +1 -1
- package/dist/cjs/form-modal/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/modal/index.cjs +1 -1
- package/dist/cjs/modal/modal.cjs +1 -0
- package/dist/cjs/page/components/resize-handle.cjs +1 -1
- package/dist/cjs/page/components/scroll-content.cjs +1 -1
- package/dist/cjs/page/styles.cjs +1 -1
- package/dist/cjs/pro-search/components/search-actions.cjs +1 -1
- package/dist/cjs/pro-search/index.cjs +1 -1
- package/dist/cjs/pro-search/styles.cjs +1 -1
- package/dist/cjs/pro-table/components/column-setting-item.cjs +1 -1
- package/dist/cjs/pro-table/components/column-settings-panel.cjs +1 -1
- package/dist/cjs/pro-table/components/table.cjs +1 -1
- package/dist/cjs/pro-table/components/width-popover.cjs +1 -1
- package/dist/cjs/pro-table/hooks/use-table-columns.cjs +1 -1
- package/dist/cjs/pro-table/index.cjs +1 -1
- package/dist/cjs/select/hooks/index.cjs +1 -1
- package/dist/cjs/select/hooks/use-dictionary-options-select.cjs +1 -0
- package/dist/cjs/select/index.cjs +1 -1
- package/dist/cjs/table/index.cjs +1 -1
- package/dist/cjs/upload/index.cjs +1 -1
- package/dist/es/_base/constants/breakpoints.js +1 -1
- package/dist/es/_base/constants/common.js +1 -1
- package/dist/es/_base/constants/css-vars.js +1 -1
- package/dist/es/_base/constants/event.js +1 -1
- package/dist/es/_base/constants/index.js +1 -1
- package/dist/es/_base/constants/symbols.js +1 -1
- package/dist/es/_base/helpers/breakpoints.js +1 -1
- package/dist/es/_base/helpers/color.js +1 -1
- package/dist/es/_base/helpers/common.js +1 -1
- package/dist/es/_base/helpers/event.js +1 -1
- package/dist/es/_base/helpers/index.js +1 -1
- package/dist/es/_base/helpers/message.js +1 -1
- package/dist/es/_base/helpers/modal.js +1 -1
- package/dist/es/_base/helpers/notification.js +1 -1
- package/dist/es/_base/helpers/props.js +1 -1
- package/dist/es/_base/helpers/react.js +1 -1
- package/dist/es/_base/hooks/index.js +1 -1
- package/dist/es/_base/hooks/use-theme-tokens.js +1 -1
- package/dist/es/_base/index.js +1 -1
- package/dist/es/_base/styles/common.js +1 -1
- package/dist/es/_base/styles/index.js +1 -1
- package/dist/es/_base/types/breakpoints.js +1 -1
- package/dist/es/_base/types/common.js +1 -1
- package/dist/es/_base/types/index.js +1 -1
- package/dist/es/action-button/index.js +1 -1
- package/dist/es/action-button/use-action-button.js +1 -1
- package/dist/es/action-group/index.js +1 -1
- package/dist/es/action-group/use-action-group.js +1 -1
- package/dist/es/action-group/use-computed-action-buttons.js +1 -1
- package/dist/es/affix/index.js +1 -1
- package/dist/es/alert/index.js +1 -1
- package/dist/es/anchor/index.js +1 -1
- package/dist/es/auto-complete/index.js +1 -1
- package/dist/es/avatar/index.js +1 -1
- package/dist/es/badge/index.js +1 -1
- package/dist/es/bool/index.js +1 -1
- package/dist/es/breadcrumb/index.js +1 -1
- package/dist/es/button/index.js +1 -1
- package/dist/es/calendar/index.js +1 -1
- package/dist/es/card/index.js +1 -1
- package/dist/es/carousel/index.js +1 -1
- package/dist/es/cascader/index.js +1 -1
- package/dist/es/center/index.js +1 -1
- package/dist/es/charts/chart.js +1 -1
- package/dist/es/charts/helpers/group.js +1 -1
- package/dist/es/charts/helpers/index.js +1 -1
- package/dist/es/charts/hooks/index.js +1 -1
- package/dist/es/charts/hooks/use-chart.js +1 -1
- package/dist/es/charts/index.js +1 -1
- package/dist/es/charts/themes/index.js +1 -1
- package/dist/es/charts/themes/walden-dark.js +1 -1
- package/dist/es/charts/themes/walden.js +1 -1
- package/dist/es/charts/themes/wonderland-dark.js +1 -1
- package/dist/es/charts/themes/wonderland.js +1 -1
- package/dist/es/checkbox/index.js +1 -1
- package/dist/es/code-highlighter/index.js +1 -1
- package/dist/es/col/index.js +1 -1
- package/dist/es/collapse/index.js +1 -1
- package/dist/es/color-picker/index.js +1 -1
- package/dist/es/compact/index.js +1 -1
- package/dist/es/config-provider/app.js +1 -1
- package/dist/es/config-provider/constants.js +1 -1
- package/dist/es/config-provider/context-holder.js +1 -1
- package/dist/es/config-provider/css-vars.js +1 -1
- package/dist/es/config-provider/dark-mode-context.js +1 -1
- package/dist/es/config-provider/error-fallback.js +1 -1
- package/dist/es/config-provider/global-style.js +1 -1
- package/dist/es/config-provider/index.js +1 -1
- package/dist/es/config-provider/theme-config.js +1 -1
- package/dist/es/config-provider/use-config-provider.js +5 -8
- package/dist/es/crud/components/action-button-group.js +1 -1
- package/dist/es/crud/components/index.js +1 -1
- package/dist/es/crud/components/main.js +3 -3
- package/dist/es/crud/components/mutation-holder.js +33 -23
- package/dist/es/crud/components/operation-button-group.js +1 -1
- package/dist/es/crud/components/scene-form.js +3 -1
- package/dist/es/crud/components/selection-indicator.js +3 -3
- package/dist/es/crud/components/toolbar-actions.js +1 -1
- package/dist/es/crud/components/toolbar.js +1 -1
- package/dist/es/crud/event.js +1 -1
- package/dist/es/crud/helpers.js +1 -1
- package/dist/es/crud/hooks/index.js +1 -1
- package/dist/es/crud/hooks/use-query-observer.js +1 -1
- package/dist/es/crud/hooks/use-search-values.js +1 -1
- package/dist/es/crud/hooks/use-selected-rows.js +1 -1
- package/dist/es/crud/index.js +23 -20
- package/dist/es/crud/store.js +10 -2
- package/dist/es/crud/styles.js +3 -3
- package/dist/es/crud-page/index.js +1 -1
- package/dist/es/date-picker/index.js +1 -1
- package/dist/es/descriptions/index.js +1 -1
- package/dist/es/divider/index.js +1 -1
- package/dist/es/drawer/index.js +1 -1
- package/dist/es/dropdown/index.js +1 -1
- package/dist/es/dynamic-icon/index.js +1 -1
- package/dist/es/dynamic-icon/placeholder-icon.js +1 -1
- package/dist/es/dynamic-icon/unknown-icon.js +1 -1
- package/dist/es/empty/empty.js +1 -1
- package/dist/es/empty/index.js +1 -1
- package/dist/es/flex/index.js +1 -1
- package/dist/es/flex-card/index.js +1 -1
- package/dist/es/flex-card/styles.js +2 -2
- package/dist/es/flip-text/index.js +1 -1
- package/dist/es/float-button/index.js +1 -1
- package/dist/es/form/components/form.js +16 -16
- package/dist/es/form/components/index.js +1 -1
- package/dist/es/form/components/reset-button.js +1 -1
- package/dist/es/form/components/submit-button.js +1 -1
- package/dist/es/form/contexts/form-context.js +1 -1
- package/dist/es/form/contexts/form-layout.js +1 -1
- package/dist/es/form/contexts/index.js +1 -1
- package/dist/es/form/fields/auto-complete/index.js +1 -1
- package/dist/es/form/fields/bool/index.js +1 -1
- package/dist/es/form/fields/cascader/index.js +1 -1
- package/dist/es/form/fields/checkbox/index.js +1 -1
- package/dist/es/form/fields/color-picker/index.js +1 -1
- package/dist/es/form/fields/date-picker/index.js +11 -10
- package/dist/es/form/fields/date-range-picker/index.js +23 -10
- package/dist/es/form/fields/index.js +1 -1
- package/dist/es/form/fields/input/index.js +1 -1
- package/dist/es/form/fields/input-number/index.js +1 -1
- package/dist/es/form/fields/mentions/index.js +1 -1
- package/dist/es/form/fields/password/index.js +1 -1
- package/dist/es/form/fields/radio/index.js +1 -1
- package/dist/es/form/fields/rate/index.js +1 -1
- package/dist/es/form/fields/select/index.js +1 -1
- package/dist/es/form/fields/slider/index.js +1 -1
- package/dist/es/form/fields/textarea/index.js +1 -1
- package/dist/es/form/fields/time-picker/index.js +11 -10
- package/dist/es/form/fields/time-range-picker/index.js +23 -10
- package/dist/es/form/fields/transfer/index.js +1 -1
- package/dist/es/form/fields/tree-select/index.js +1 -1
- package/dist/es/form/fields/upload/index.js +1 -1
- package/dist/es/form/form-actions.js +40 -0
- package/dist/es/form/form.js +5 -2
- package/dist/es/form/helpers/create-field.js +15 -0
- package/dist/es/form/helpers/index.js +2 -1
- package/dist/es/form/helpers/with-form-item.js +1 -1
- package/dist/es/form/hooks/use-form-item-props.js +1 -1
- package/dist/es/form/hooks/use-label-width.js +1 -1
- package/dist/es/form/index.js +2 -1
- package/dist/es/form/use-form.js +5 -10
- package/dist/es/form-drawer/index.js +61 -54
- package/dist/es/form-modal/index.js +55 -51
- package/dist/es/grid/context.js +1 -1
- package/dist/es/grid/grid-item.js +1 -1
- package/dist/es/grid/hooks/index.js +1 -1
- package/dist/es/grid/hooks/use-container-breakpoints.js +1 -1
- package/dist/es/grid/hooks/use-container-width.js +1 -1
- package/dist/es/grid/hooks/use-grid-collapsed.js +1 -1
- package/dist/es/grid/hooks/use-normalized-gap.js +1 -1
- package/dist/es/grid/hooks/use-responsive-breakpoint.js +1 -1
- package/dist/es/grid/hooks/use-responsive-value.js +1 -1
- package/dist/es/grid/index.js +1 -1
- package/dist/es/grid/styles.js +1 -1
- package/dist/es/group/index.js +1 -1
- package/dist/es/icon/index.js +1 -1
- package/dist/es/icon-button/index.js +1 -1
- package/dist/es/image/index.js +1 -1
- package/dist/es/index.js +59 -58
- package/dist/es/input/index.js +1 -1
- package/dist/es/input-number/index.js +1 -1
- package/dist/es/keyboard/index.js +1 -1
- package/dist/es/list/index.js +1 -1
- package/dist/es/loader/index.js +1 -1
- package/dist/es/logo-icon/index.js +1 -1
- package/dist/es/mentions/index.js +1 -1
- package/dist/es/menu/index.js +1 -1
- package/dist/es/modal/index.js +2 -3
- package/dist/es/modal/modal.js +60 -0
- package/dist/es/operation-button/index.js +1 -1
- package/dist/es/page/components/aside-panel.js +1 -1
- package/dist/es/page/components/index.js +1 -1
- package/dist/es/page/components/resize-handle.js +1 -1
- package/dist/es/page/components/scroll-content.js +3 -3
- package/dist/es/page/hooks/index.js +1 -1
- package/dist/es/page/hooks/use-page-key.js +1 -1
- package/dist/es/page/hooks/use-resize.js +1 -1
- package/dist/es/page/index.js +1 -1
- package/dist/es/page/styles.js +15 -15
- package/dist/es/page/viewport-context.js +1 -1
- package/dist/es/pagination/index.js +1 -1
- package/dist/es/permission-gate/index.js +1 -1
- package/dist/es/popconfirm/index.js +1 -1
- package/dist/es/popover/index.js +1 -1
- package/dist/es/pro-search/components/advanced-search-toggler.js +1 -1
- package/dist/es/pro-search/components/advanced-search.js +1 -1
- package/dist/es/pro-search/components/index.js +1 -1
- package/dist/es/pro-search/components/search-actions.js +5 -5
- package/dist/es/pro-search/index.js +4 -4
- package/dist/es/pro-search/styles.js +6 -6
- package/dist/es/pro-table/components/column-setting-item.js +13 -13
- package/dist/es/pro-table/components/column-settings-panel.js +6 -6
- package/dist/es/pro-table/components/column-settings.js +1 -1
- package/dist/es/pro-table/components/index.js +1 -1
- package/dist/es/pro-table/components/operation-button-group.js +1 -1
- package/dist/es/pro-table/components/ref.js +1 -1
- package/dist/es/pro-table/components/table-subscriber.js +1 -1
- package/dist/es/pro-table/components/table-summary.js +1 -1
- package/dist/es/pro-table/components/table-title.js +1 -1
- package/dist/es/pro-table/components/table.js +2 -2
- package/dist/es/pro-table/components/width-popover.js +5 -5
- package/dist/es/pro-table/context.js +1 -1
- package/dist/es/pro-table/event.js +1 -1
- package/dist/es/pro-table/hooks/index.js +1 -1
- package/dist/es/pro-table/hooks/use-column-settings-persistence.js +1 -1
- package/dist/es/pro-table/hooks/use-row-selection.js +1 -1
- package/dist/es/pro-table/hooks/use-table-columns.js +4 -4
- package/dist/es/pro-table/index.js +2 -2
- package/dist/es/pro-table/store.js +1 -1
- package/dist/es/progress/index.js +1 -1
- package/dist/es/qrcode/index.js +1 -1
- package/dist/es/radio/index.js +1 -1
- package/dist/es/rate/index.js +1 -1
- package/dist/es/result/index.js +1 -1
- package/dist/es/row/index.js +1 -1
- package/dist/es/scroll-area/index.js +1 -1
- package/dist/es/scroll-area/styles.js +1 -1
- package/dist/es/segmented/index.js +1 -1
- package/dist/es/select/hooks/index.js +2 -1
- package/dist/es/select/hooks/use-data-options-select.js +1 -1
- package/dist/es/select/hooks/use-dictionary-options-select.js +55 -0
- package/dist/es/select/index.js +2 -1
- package/dist/es/skeleton/index.js +1 -1
- package/dist/es/slider/index.js +1 -1
- package/dist/es/space/index.js +1 -1
- package/dist/es/space/space.js +1 -1
- package/dist/es/sparkles-text/index.js +1 -1
- package/dist/es/sparkles-text/sparkle.js +1 -1
- package/dist/es/spin/index.js +1 -1
- package/dist/es/split-text/index.js +1 -1
- package/dist/es/splitter/index.js +1 -1
- package/dist/es/stack/index.js +1 -1
- package/dist/es/statistic/index.js +1 -1
- package/dist/es/steps/index.js +1 -1
- package/dist/es/switch/index.js +1 -1
- package/dist/es/table/index.js +2 -2
- package/dist/es/table/use-pagination-props.js +1 -1
- package/dist/es/tabs/index.js +1 -1
- package/dist/es/tag/index.js +1 -1
- package/dist/es/time-picker/index.js +1 -1
- package/dist/es/timeline/index.js +1 -1
- package/dist/es/tooltip/index.js +1 -1
- package/dist/es/tour/index.js +1 -1
- package/dist/es/transfer/index.js +1 -1
- package/dist/es/tree/hooks/index.js +1 -1
- package/dist/es/tree/hooks/use-data-options-tree.js +1 -1
- package/dist/es/tree/index.js +1 -1
- package/dist/es/tree-select/hooks/index.js +1 -1
- package/dist/es/tree-select/hooks/use-data-options-tree-select.js +1 -1
- package/dist/es/tree-select/index.js +1 -1
- package/dist/es/typing-animation/index.js +1 -1
- package/dist/es/typography/index.js +1 -1
- package/dist/es/upload/index.js +1 -1
- package/dist/es/watermark/index.js +1 -1
- package/dist/types/_base/types/common.d.ts +4 -0
- package/dist/types/crud/components/mutation-holder.d.ts +2 -1
- package/dist/types/crud/index.d.ts +1 -1
- package/dist/types/crud/props.d.ts +7 -1
- package/dist/types/crud/store.d.ts +5 -1
- package/dist/types/crud/types.d.ts +2 -2
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/dynamic-icon/index.d.ts +1 -1
- package/dist/types/form/components/form.d.ts +13 -4
- package/dist/types/form/fields/date-picker/index.d.ts +3 -3
- package/dist/types/form/fields/date-picker/props.d.ts +6 -1
- package/dist/types/form/fields/date-range-picker/index.d.ts +3 -3
- package/dist/types/form/fields/date-range-picker/props.d.ts +6 -1
- package/dist/types/form/fields/index.d.ts +4 -4
- package/dist/types/form/fields/time-picker/index.d.ts +3 -3
- package/dist/types/form/fields/time-picker/props.d.ts +6 -1
- package/dist/types/form/fields/time-range-picker/index.d.ts +3 -3
- package/dist/types/form/fields/time-range-picker/props.d.ts +6 -1
- package/dist/types/form/form-actions.d.ts +33 -0
- package/dist/types/form/form.d.ts +25 -25
- package/dist/types/form/helpers/create-field.d.ts +91 -0
- package/dist/types/form/helpers/index.d.ts +2 -0
- package/dist/types/form/index.d.ts +3 -0
- package/dist/types/form/types.d.ts +4 -1
- package/dist/types/form/use-form.d.ts +3 -37
- package/dist/types/form-drawer/props.d.ts +30 -10
- package/dist/types/form-modal/props.d.ts +30 -10
- package/dist/types/grid/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/modal/index.d.ts +2 -2
- package/dist/types/modal/modal.d.ts +11 -0
- package/dist/types/page/props.d.ts +1 -1
- package/dist/types/pro-search/props.d.ts +1 -1
- package/dist/types/pro-table/components/index.d.ts +1 -1
- package/dist/types/pro-table/components/table.d.ts +2 -1
- package/dist/types/pro-table/hooks/use-row-selection.d.ts +1 -1
- package/dist/types/pro-table/hooks/use-table-columns.d.ts +1 -1
- package/dist/types/pro-table/index.d.ts +1 -1
- package/dist/types/pro-table/props.d.ts +1 -1
- package/dist/types/pro-table/store.d.ts +3 -3
- package/dist/types/pro-table/types.d.ts +1 -1
- package/dist/types/select/hooks/index.d.ts +1 -0
- package/dist/types/select/hooks/use-dictionary-options-select.d.ts +18 -0
- package/dist/types/select/index.d.ts +1 -1
- package/package.json +10 -10
- package/dist/cjs/form-drawer/components/form-actions.cjs +0 -1
- package/dist/cjs/form-drawer/components/index.cjs +0 -1
- package/dist/cjs/form-modal/components/draggable-wrapper.cjs +0 -1
- package/dist/cjs/form-modal/components/form-actions.cjs +0 -1
- package/dist/cjs/form-modal/components/index.cjs +0 -1
- package/dist/es/form-drawer/components/form-actions.js +0 -26
- package/dist/es/form-drawer/components/index.js +0 -2
- package/dist/es/form-modal/components/draggable-wrapper.js +0 -52
- package/dist/es/form-modal/components/form-actions.js +0 -26
- package/dist/es/form-modal/components/index.js +0 -3
- package/dist/types/form-drawer/components/form-actions.d.ts +0 -19
- package/dist/types/form-drawer/components/index.d.ts +0 -1
- package/dist/types/form-modal/components/draggable-wrapper.d.ts +0 -9
- package/dist/types/form-modal/components/form-actions.d.ts +0 -19
- package/dist/types/form-modal/components/index.d.ts +0 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
|
+
//#region src/form/helpers/create-field.ts
|
|
3
|
+
function e(e) {
|
|
4
|
+
return e;
|
|
5
|
+
}
|
|
6
|
+
function t(t, n) {
|
|
7
|
+
return {
|
|
8
|
+
name: t,
|
|
9
|
+
validators: n.validators ? e(n.validators) : void 0,
|
|
10
|
+
render: n.render,
|
|
11
|
+
meta: n.meta
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { t as createField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useFieldContext as e } from "../contexts/form-context.js";
|
|
3
3
|
import { useFormItemProps as t } from "../hooks/use-form-item-props.js";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useFormLayout as e } from "../contexts/form-layout.js";
|
|
3
3
|
import { useLabelWidth as t } from "./use-label-width.js";
|
|
4
4
|
import { useMemo as n } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { showWarningMessage as e } from "../../_base/helpers/message.js";
|
|
3
3
|
import { useMemo as t } from "react";
|
|
4
4
|
//#region src/form/hooks/use-label-width.ts
|
package/dist/es/form/index.js
CHANGED
package/dist/es/form/use-form.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
|
+
import { createField as e } from "./helpers/create-field.js";
|
|
3
|
+
import { useAppForm as t } from "./form.js";
|
|
4
4
|
import { useMemo as n } from "react";
|
|
5
5
|
//#region src/form/use-form.tsx
|
|
6
6
|
function r(r) {
|
|
7
|
-
let i =
|
|
8
|
-
return n(() => {
|
|
9
|
-
let { AppForm: e, Form: n } = i, r = (r) => /* @__PURE__ */ t(e, { children: /* @__PURE__ */ t(n, { ...r }) });
|
|
10
|
-
return new Proxy(i, { get(e, t, n) {
|
|
11
|
-
return t === "Form" ? r : Reflect.get(e, t, n);
|
|
12
|
-
} });
|
|
13
|
-
}, [i]);
|
|
7
|
+
let i = t(r);
|
|
8
|
+
return n(() => Object.assign(i, { createField: e }), [i]);
|
|
14
9
|
}
|
|
15
10
|
//#endregion
|
|
16
11
|
export { r as useForm };
|
|
@@ -1,82 +1,89 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { Center as e } from "../center/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { isFunction as
|
|
9
|
-
import { memo as
|
|
3
|
+
import { DefaultResetButton as t, DefaultSubmitButton as n, FormActions as r } from "../form/form-actions.js";
|
|
4
|
+
import { useForm as i } from "../form/use-form.js";
|
|
5
|
+
import { Drawer as a } from "../drawer/index.js";
|
|
6
|
+
import o from "../empty/empty.js";
|
|
7
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
8
|
+
import { isFunction as c } from "@vef-framework-react/shared";
|
|
9
|
+
import { memo as l, useCallback as u, useMemo as d } from "react";
|
|
10
10
|
import "@emotion/react";
|
|
11
|
-
import { useMutation as
|
|
11
|
+
import { useMutation as f } from "@vef-framework-react/core";
|
|
12
12
|
//#region src/form-drawer/index.tsx
|
|
13
|
-
function
|
|
13
|
+
function p() {
|
|
14
14
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var m = process.env.NODE_ENV === "production" ? {
|
|
17
17
|
name: "13udsys",
|
|
18
18
|
styles: "height:100%"
|
|
19
19
|
} : {
|
|
20
20
|
name: "13udsys",
|
|
21
|
-
styles: "height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
22
|
-
toString:
|
|
23
|
-
},
|
|
24
|
-
function
|
|
25
|
-
return
|
|
21
|
+
styles: "height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQmtCIiwiZmlsZSI6ImluZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQXdhaXRhYmxlIH0gZnJvbSBcIkB2ZWYtZnJhbWV3b3JrLXJlYWN0L3NoYXJlZFwiO1xuaW1wb3J0IHR5cGUgeyBGQywgUmVhY3ROb2RlIH0gZnJvbSBcInJlYWN0XCI7XG5cbmltcG9ydCB0eXBlIHsgR2V0UHJvcCB9IGZyb20gXCIuLi9fYmFzZVwiO1xuaW1wb3J0IHR5cGUgeyBEcmF3ZXJQcm9wcyB9IGZyb20gXCIuLi9kcmF3ZXJcIjtcbmltcG9ydCB0eXBlIHsgRm9ybUFwaSB9IGZyb20gXCIuLi9mb3JtXCI7XG5pbXBvcnQgdHlwZSB7IEZvcm1EcmF3ZXJQcm9wcyB9IGZyb20gXCIuL3Byb3BzXCI7XG5cbmltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xuaW1wb3J0IHsgdXNlTXV0YXRpb24gfSBmcm9tIFwiQHZlZi1mcmFtZXdvcmstcmVhY3QvY29yZVwiO1xuaW1wb3J0IHsgaXNGdW5jdGlvbiB9IGZyb20gXCJAdmVmLWZyYW1ld29yay1yZWFjdC9zaGFyZWRcIjtcbmltcG9ydCB7IG1lbW8sIHVzZUNhbGxiYWNrLCB1c2VNZW1vIH0gZnJvbSBcInJl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uICAgICgpID0+IG5ldyBQcm94eShmb3JtQXBpLCB7XG4gICAgICBnZXQodGFyZ2V0LCBwcm9wLCByZWNlaXZlcikge1xuICAgICAgICBpZiAocHJvcCA9PT0gXCJyZXNldFwiKSB7XG4gICAgICAgICAgY29uc3Qgb3JpZ2luYWxSZXNldCA9IFJlZmxlY3QuZ2V0KHRhcmdldCwgcHJvcCwgcmVjZWl2ZXIpO1xuXG4gICAgICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgICAgIG9yaWdpbmFsUmVzZXQoKTtcbiAgICAgICAgICAgIGhhbmRsZVJlc2V0KCk7XG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBSZWZsZWN0LmdldCh0YXJnZXQsIHByb3AsIHJlY2VpdmVyKTtcbiAgICAgIH1cbiAgICB9KSxcbiAgICBbZm9ybUFwaSwgaGFuZGxlUmVzZXRdXG4gICk7XG5cbiAgY29uc3QgZm9vdGVyID0gcmVuZGVyQWN0aW9uc1xuICAgID8gKCgpID0+IHtcbiAgICAgICAgY29uc3QgYWN0aW9ucyA9IHJlbmRlckFjdGlvbnMocHJveGllZEZvcm1BcGksIHtcbiAgICAgICAgICBzdWJtaXRCdXR0b246IDxEZWZhdWx0U3VibWl0QnV0dG9uIHN1Ym1pdEJ1dHRvblByb3BzPXtzdWJtaXRCdXR0b25Qcm9wc30gLz4sXG4gICAgICAgICAgcmVzZXRCdXR0b246IDxEZWZhdWx0UmVzZXRCdXR0b24gcmVzZXRCdXR0b25Qcm9wcz17cmVzZXRCdXR0b25Qcm9wc30gb25SZXNldD17aGFuZGxlUmVzZXR9IC8+XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBhY3Rpb25zXG4gICAgICAgICAgPyAoXG4gICAgICAgICAgICAgIDxBcHBGb3JtPlxuICAgICAgICAgICAgICAgIHthY3Rpb25zfVxuICAgICAgICAgICAgICA8L0FwcEZvcm0+XG4gICAgICAgICAgICApXG4gICAgICAgIC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Tm9kZT4pICYgUGljazxGQywgXCJkaXNwbGF5TmFtZVwiPjtcbkZvcm1EcmF3ZXIuZGlzcGxheU5hbWUgPSBcIkZvcm1EcmF3ZXJcIjtcblxuZXhwb3J0IHR5cGUgeyBGb3JtRHJhd2VyUHJvcHMgfSBmcm9tIFwiLi9wcm9wc1wiO1xuIl19 */",
|
|
22
|
+
toString: p
|
|
23
|
+
}, h = /* @__PURE__ */ s(e, { children: /* @__PURE__ */ s(o, { description: "请提供表单内容" }) });
|
|
24
|
+
function g(e, t) {
|
|
25
|
+
return c(e) ? e(t) : e || h;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
let
|
|
29
|
-
defaultValues:
|
|
27
|
+
var _ = l(({ open: e = !1, title: o, width: l, placement: p = "right", resizable: h, defaultValues: _, disabled: v = !1, formComponent: y, renderActions: b, submitButtonProps: x, resetButtonProps: S, mutationFn: C, mutationMeta: w, children: T, beforeSubmit: E, afterSubmit: D, onClose: O, onSubmit: k, onReset: A }) => {
|
|
28
|
+
let j = i({
|
|
29
|
+
defaultValues: _,
|
|
30
30
|
onSubmit: async ({ value: e }) => {
|
|
31
31
|
let t = e;
|
|
32
|
-
|
|
32
|
+
c(E) && (t = await E(t)), c(k) && await k(t), C ? await L(t) : k || F();
|
|
33
33
|
}
|
|
34
|
-
}), { Form:
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
mutationKey: [
|
|
38
|
-
mutationFn:
|
|
34
|
+
}), { Form: M, AppForm: N, reset: P } = j, F = u(() => {
|
|
35
|
+
P(), O?.();
|
|
36
|
+
}, [O, P]), { isPending: I, mutateAsync: L } = f({
|
|
37
|
+
mutationKey: [C?.key],
|
|
38
|
+
mutationFn: C,
|
|
39
39
|
onSuccess: async ({ data: e }, t) => {
|
|
40
|
-
|
|
40
|
+
c(D) && await D(t, e), F();
|
|
41
41
|
},
|
|
42
|
-
meta:
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
}, [
|
|
42
|
+
meta: w
|
|
43
|
+
}), R = u(() => {
|
|
44
|
+
A?.(_);
|
|
45
|
+
}, [_, A]), z = u(() => {
|
|
46
|
+
I || F();
|
|
47
|
+
}, [F, I]), B = d(() => ({ wrapper: { width: l } }), [l]), V = d(() => new Proxy(j, { get(e, t, n) {
|
|
48
48
|
if (t === "reset") {
|
|
49
49
|
let r = Reflect.get(e, t, n);
|
|
50
50
|
return () => {
|
|
51
|
-
r(),
|
|
51
|
+
r(), R();
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
return Reflect.get(e, t, n);
|
|
55
|
-
} }), [
|
|
56
|
-
return /* @__PURE__ */ a
|
|
55
|
+
} }), [j, R]);
|
|
56
|
+
return /* @__PURE__ */ s(a, {
|
|
57
57
|
destroyOnHidden: !0,
|
|
58
|
-
footer:
|
|
59
|
-
let e =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
footer: b ? (() => {
|
|
59
|
+
let e = b(V, {
|
|
60
|
+
submitButton: /* @__PURE__ */ s(n, { submitButtonProps: x }),
|
|
61
|
+
resetButton: /* @__PURE__ */ s(t, {
|
|
62
|
+
resetButtonProps: S,
|
|
63
|
+
onReset: R
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
return e ? /* @__PURE__ */ s(N, { children: e }) : null;
|
|
67
|
+
})() : /* @__PURE__ */ s(N, { children: /* @__PURE__ */ s(r, {
|
|
68
|
+
resetButtonProps: S,
|
|
69
|
+
submitButtonProps: x,
|
|
70
|
+
onReset: R
|
|
65
71
|
}) }),
|
|
66
72
|
keyboard: !1,
|
|
67
73
|
open: e,
|
|
68
|
-
placement:
|
|
69
|
-
resizable:
|
|
70
|
-
styles:
|
|
71
|
-
title:
|
|
72
|
-
onClose:
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
placement: p,
|
|
75
|
+
resizable: h,
|
|
76
|
+
styles: B,
|
|
77
|
+
title: o,
|
|
78
|
+
onClose: z,
|
|
79
|
+
children: /* @__PURE__ */ s(N, { children: /* @__PURE__ */ s(M, {
|
|
80
|
+
component: y,
|
|
81
|
+
css: m,
|
|
82
|
+
disabled: v || I,
|
|
83
|
+
children: g(T, j)
|
|
84
|
+
}) })
|
|
78
85
|
});
|
|
79
86
|
});
|
|
80
|
-
|
|
87
|
+
_.displayName = "FormDrawer";
|
|
81
88
|
//#endregion
|
|
82
|
-
export {
|
|
89
|
+
export { _ as FormDrawer };
|
|
@@ -1,72 +1,76 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { Center as e } from "../center/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { useMutation as d } from "@vef-framework-react/core";
|
|
3
|
+
import { DefaultResetButton as t, DefaultSubmitButton as n, FormActions as r } from "../form/form-actions.js";
|
|
4
|
+
import { useForm as i } from "../form/use-form.js";
|
|
5
|
+
import a from "../empty/empty.js";
|
|
6
|
+
import { Modal as o } from "../modal/modal.js";
|
|
7
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
8
|
+
import { isFunction as c } from "@vef-framework-react/shared";
|
|
9
|
+
import { memo as l, useCallback as u, useMemo as d } from "react";
|
|
10
|
+
import { useMutation as f } from "@vef-framework-react/core";
|
|
12
11
|
//#region src/form-modal/index.tsx
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
return
|
|
12
|
+
var p = /* @__PURE__ */ s(e, { children: /* @__PURE__ */ s(a, { description: "请提供表单内容" }) });
|
|
13
|
+
function m(e, t) {
|
|
14
|
+
return c(e) ? e(t) : e || p;
|
|
16
15
|
}
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
defaultValues:
|
|
16
|
+
var h = l(({ open: e = !1, title: a, width: l, draggable: p = !0, submitButtonProps: h, resetButtonProps: g, defaultValues: _, disabled: v = !1, formComponent: y, renderActions: b, mutationFn: x, mutationMeta: S, children: C, beforeSubmit: w, afterSubmit: T, onClose: E, onSubmit: D, onReset: O }) => {
|
|
17
|
+
let k = i({
|
|
18
|
+
defaultValues: _,
|
|
20
19
|
onSubmit: async ({ value: e }) => {
|
|
21
20
|
let t = e;
|
|
22
|
-
|
|
21
|
+
c(w) && (t = await w(t)), c(D) && await D(t), x ? await F(t) : D || N();
|
|
23
22
|
}
|
|
24
|
-
}), { Form:
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
mutationKey: [
|
|
28
|
-
mutationFn:
|
|
23
|
+
}), { Form: A, AppForm: j, reset: M } = k, N = u(() => {
|
|
24
|
+
M(), E?.();
|
|
25
|
+
}, [E, M]), { isPending: P, mutateAsync: F } = f({
|
|
26
|
+
mutationKey: [x?.key],
|
|
27
|
+
mutationFn: x,
|
|
29
28
|
onSuccess: async ({ data: e }, t) => {
|
|
30
|
-
|
|
29
|
+
c(T) && await T(t, e), N();
|
|
31
30
|
},
|
|
32
|
-
meta:
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
|
|
37
|
-
}, [
|
|
31
|
+
meta: S
|
|
32
|
+
}), I = u(() => {
|
|
33
|
+
O?.(_);
|
|
34
|
+
}, [_, O]), L = u(() => {
|
|
35
|
+
P || N();
|
|
36
|
+
}, [P, N]), R = d(() => new Proxy(k, { get(e, t, n) {
|
|
38
37
|
if (t === "reset") {
|
|
39
38
|
let r = Reflect.get(e, t, n);
|
|
40
39
|
return () => {
|
|
41
|
-
r(),
|
|
40
|
+
r(), I();
|
|
42
41
|
};
|
|
43
42
|
}
|
|
44
43
|
return Reflect.get(e, t, n);
|
|
45
|
-
} }), [
|
|
44
|
+
} }), [k, I]);
|
|
45
|
+
return /* @__PURE__ */ s(o, {
|
|
46
46
|
destroyOnHidden: !0,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
draggable: p,
|
|
48
|
+
footer: b ? (() => {
|
|
49
|
+
let e = b(R, {
|
|
50
|
+
submitButton: /* @__PURE__ */ s(n, { submitButtonProps: h }),
|
|
51
|
+
resetButton: /* @__PURE__ */ s(t, {
|
|
52
|
+
resetButtonProps: g,
|
|
53
|
+
onReset: I
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
return e ? /* @__PURE__ */ s(j, { children: e }) : null;
|
|
57
|
+
})() : /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(r, {
|
|
58
|
+
resetButtonProps: g,
|
|
59
|
+
submitButtonProps: h,
|
|
60
|
+
onReset: I
|
|
54
61
|
}) }),
|
|
55
62
|
keyboard: !1,
|
|
56
63
|
open: e,
|
|
57
|
-
title:
|
|
58
|
-
width:
|
|
59
|
-
onCancel:
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
title: a,
|
|
65
|
+
width: l,
|
|
66
|
+
onCancel: L,
|
|
67
|
+
children: /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(A, {
|
|
68
|
+
component: y,
|
|
69
|
+
disabled: v || P,
|
|
70
|
+
children: m(C, k)
|
|
71
|
+
}) })
|
|
64
72
|
});
|
|
65
|
-
return f ? /* @__PURE__ */ o(i, {
|
|
66
|
-
title: n,
|
|
67
|
-
children: L
|
|
68
|
-
}) : L;
|
|
69
73
|
});
|
|
70
|
-
|
|
74
|
+
h.displayName = "FormModal";
|
|
71
75
|
//#endregion
|
|
72
|
-
export {
|
|
76
|
+
export { h as FormModal };
|
package/dist/es/grid/context.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { createContext as e, use as t } from "react";
|
|
3
3
|
//#region src/grid/context.ts
|
|
4
4
|
var n = e(null), r = n.Provider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useGridContext as e } from "./context.js";
|
|
3
3
|
import { gridItem as t } from "./styles.js";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import "./use-container-breakpoints.js";
|
|
3
3
|
import "./use-container-width.js";
|
|
4
4
|
import "./use-grid-collapsed.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useMemo as e } from "react";
|
|
3
3
|
//#region src/grid/hooks/use-container-breakpoints.ts
|
|
4
4
|
function t(t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useIsomorphicEffect as e } from "@vef-framework-react/hooks";
|
|
3
3
|
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
4
4
|
//#region src/grid/hooks/use-container-width.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useGridContext as e } from "../context.js";
|
|
3
3
|
//#region src/grid/hooks/use-grid-collapsed.ts
|
|
4
4
|
function t() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useThemeTokens as e } from "../../_base/hooks/use-theme-tokens.js";
|
|
3
3
|
import { isNumber as t, isString as n } from "@vef-framework-react/shared";
|
|
4
4
|
import { useMemo as r } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { useMemo as e } from "react";
|
|
3
3
|
//#region src/grid/hooks/use-responsive-breakpoint.ts
|
|
4
4
|
function t(t, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { breakpoints as e } from "../../_base/constants/breakpoints.js";
|
|
3
3
|
import { isPlainObject as t } from "@vef-framework-react/shared";
|
|
4
4
|
import "react";
|
package/dist/es/grid/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { GridContextProvider as e } from "./context.js";
|
|
3
3
|
import { grid as t } from "./styles.js";
|
|
4
4
|
import { GridItem as n } from "./grid-item.js";
|
package/dist/es/grid/styles.js
CHANGED
package/dist/es/group/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { Flex as e } from "../flex/index.js";
|
|
3
3
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/group/index.tsx
|
package/dist/es/icon/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import "@emotion/react";
|
|
4
4
|
import { Icon as t } from "lucide-react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.1.
|
|
1
|
+
/*! @vef-framework-react/components v2.1.8 made by Venus | 2026-04-25T10:51:15.377Z */
|
|
2
2
|
import { globalCssVars as e } from "../_base/constants/css-vars.js";
|
|
3
3
|
import { Button as t } from "../button/index.js";
|
|
4
4
|
import { Tooltip as n } from "../tooltip/index.js";
|
package/dist/es/image/index.js
CHANGED