@vef-framework-react/components 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/form/fields/upload/index.cjs +1 -1
- package/dist/cjs/form-drawer/index.cjs +1 -1
- package/dist/cjs/form-modal/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/constants/theme.js +1 -1
- package/dist/es/_base/globals.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/border-beam/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-editor/completions.js +1 -1
- package/dist/es/code-editor/format.js +1 -1
- package/dist/es/code-editor/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 +1 -1
- 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 +1 -1
- package/dist/es/crud/components/mutation-holder.js +1 -1
- package/dist/es/crud/components/operation-button-group.js +1 -1
- package/dist/es/crud/components/scene-form.js +1 -1
- package/dist/es/crud/components/selection-indicator.js +1 -1
- 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 +1 -1
- package/dist/es/crud/store.js +1 -1
- package/dist/es/crud/styles.js +1 -1
- 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/load-icon-node.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/editable-table/components/add-row-button.js +1 -1
- package/dist/es/editable-table/components/editable-cell.js +1 -1
- package/dist/es/editable-table/components/editable-row-actions.js +1 -1
- package/dist/es/editable-table/components/index.js +1 -1
- package/dist/es/editable-table/helpers.js +1 -1
- package/dist/es/editable-table/hooks/index.js +1 -1
- package/dist/es/editable-table/hooks/use-editable-actions.js +1 -1
- package/dist/es/editable-table/hooks/use-editable-columns.js +1 -1
- package/dist/es/editable-table/index.js +1 -1
- package/dist/es/editable-table/store.js +1 -1
- package/dist/es/empty/empty.js +1 -1
- package/dist/es/empty/index.js +1 -1
- package/dist/es/file-preview/index.js +1 -1
- package/dist/es/file-upload/helpers.js +1 -1
- package/dist/es/file-upload/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 +1 -1
- package/dist/es/flex-tabs/index.js +1 -1
- package/dist/es/flex-tabs/styles.js +1 -1
- 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 +1 -1
- 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/code-editor/index.js +1 -1
- package/dist/es/form/fields/color-picker/index.js +1 -1
- package/dist/es/form/fields/date-picker/index.js +1 -1
- package/dist/es/form/fields/date-range-picker/index.js +1 -1
- package/dist/es/form/fields/icon-picker/index.js +1 -1
- 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 +1 -1
- package/dist/es/form/fields/time-range-picker/index.js +1 -1
- 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 +38 -33
- package/dist/es/form/form-actions.js +1 -1
- package/dist/es/form/form.js +1 -1
- package/dist/es/form/helpers/create-field.js +1 -1
- package/dist/es/form/helpers/index.js +1 -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 +1 -1
- package/dist/es/form/use-form.js +1 -1
- package/dist/es/form-drawer/index.js +52 -50
- package/dist/es/form-modal/index.js +45 -43
- package/dist/es/generic-select/index.js +1 -1
- 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/icon-picker/icon-grid.js +1 -1
- package/dist/es/icon-picker/index.js +1 -1
- package/dist/es/image/index.js +1 -1
- package/dist/es/index.js +1 -1
- 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/labeled/index.js +1 -1
- package/dist/es/labels/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 +1 -1
- package/dist/es/modal/modal.js +1 -1
- 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 +1 -1
- package/dist/es/page/entrance.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/es/pro-search/index.js +1 -1
- package/dist/es/pro-search/styles.js +1 -1
- package/dist/es/pro-table/components/column-setting-item.js +1 -1
- package/dist/es/pro-table/components/column-settings-panel.js +1 -1
- 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 +1 -1
- package/dist/es/pro-table/components/width-popover.js +1 -1
- 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 +1 -1
- package/dist/es/pro-table/index.js +1 -1
- 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 +1 -1
- package/dist/es/select/hooks/use-code-set-options-select.js +1 -1
- package/dist/es/select/hooks/use-data-options-select.js +1 -1
- package/dist/es/select/index.js +1 -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 +1 -1
- 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/helpers.js +1 -1
- package/dist/es/upload/index.js +1 -1
- package/dist/es/watermark/index.js +1 -1
- package/dist/types/crud/store.d.ts +4 -0
- package/dist/types/dynamic-icon/index.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { Radio as e } from "../../../radio/index.js";
|
|
3
3
|
import { useFieldContext as t } from "../../contexts/form-context.js";
|
|
4
4
|
import { withFormItem as n } from "../../helpers/with-form-item.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useFieldContext as e } from "../../contexts/form-context.js";
|
|
3
3
|
import { withFormItem as t } from "../../helpers/with-form-item.js";
|
|
4
4
|
import { Rate as n } from "../../../rate/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useFieldContext as e } from "../../contexts/form-context.js";
|
|
3
3
|
import { withFormItem as t } from "../../helpers/with-form-item.js";
|
|
4
4
|
import { Select as n } from "../../../select/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { Slider as e } from "../../../slider/index.js";
|
|
3
3
|
import { useFieldContext as t } from "../../contexts/form-context.js";
|
|
4
4
|
import { withFormItem as n } from "../../helpers/with-form-item.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useFieldContext as e } from "../../contexts/form-context.js";
|
|
3
3
|
import { withFormItem as t } from "../../helpers/with-form-item.js";
|
|
4
4
|
import { Input as n } from "../../../input/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { fullWidth as e } from "../../../_base/styles/common.js";
|
|
3
3
|
import { useFieldContext as t } from "../../contexts/form-context.js";
|
|
4
4
|
import { withFormItem as n } from "../../helpers/with-form-item.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { fullWidth as e } from "../../../_base/styles/common.js";
|
|
3
3
|
import { useFieldContext as t } from "../../contexts/form-context.js";
|
|
4
4
|
import { withFormItem as n } from "../../helpers/with-form-item.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useFieldContext as e } from "../../contexts/form-context.js";
|
|
3
3
|
import { withFormItem as t } from "../../helpers/with-form-item.js";
|
|
4
4
|
import { Transfer as n } from "../../../transfer/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useFieldContext as e } from "../../contexts/form-context.js";
|
|
3
3
|
import { withFormItem as t } from "../../helpers/with-form-item.js";
|
|
4
4
|
import { TreeSelect as n } from "../../../tree-select/index.js";
|
|
@@ -1,61 +1,66 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useFieldContext as e } from "../../contexts/form-context.js";
|
|
3
3
|
import { withFormItem as t } from "../../helpers/with-form-item.js";
|
|
4
4
|
import { resolveStoredFileUrl as n } from "../../../file-upload/helpers.js";
|
|
5
5
|
import { FileUpload as r } from "../../../file-upload/index.js";
|
|
6
6
|
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
7
7
|
import { getBaseName as a, isArray as o } from "@vef-framework-react/shared";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useStoredFileNames as s } from "@vef-framework-react/hooks";
|
|
9
|
+
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
10
|
+
import { useAppContext as d, useDisabled as f } from "@vef-framework-react/core";
|
|
10
11
|
//#region src/form/fields/upload/index.tsx
|
|
11
|
-
function
|
|
12
|
+
function p(e) {
|
|
12
13
|
let t = e;
|
|
13
14
|
return t.key ?? t.uid;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function m(e, t, n) {
|
|
16
17
|
if (!t) return e;
|
|
17
|
-
let
|
|
18
|
-
return {
|
|
18
|
+
let r = e, i = {
|
|
19
19
|
...t,
|
|
20
|
-
key:
|
|
21
|
-
sourceUrl:
|
|
20
|
+
key: r.key,
|
|
21
|
+
sourceUrl: r.sourceUrl
|
|
22
22
|
};
|
|
23
|
+
return n && (i.name = n, i.fileName = n), i;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
return [...t.map((e) =>
|
|
25
|
+
function h(e, t, n) {
|
|
26
|
+
let r = new Map(e.filter((e) => e.status === "done").map((e) => [p(e), e]));
|
|
27
|
+
return [...t.map((e) => {
|
|
28
|
+
let t = p(e);
|
|
29
|
+
return m(e, r.get(t), n[t]);
|
|
30
|
+
}), ...e.filter((e) => e.status !== "done")];
|
|
27
31
|
}
|
|
28
|
-
function
|
|
29
|
-
let { state: { value:
|
|
30
|
-
let t = a(e);
|
|
32
|
+
function g({ disabled: t, maxCount: m, resolveFileUrl: g, ..._ }) {
|
|
33
|
+
let { state: { value: v }, handleChange: y } = e(), { fileBaseUrl: b } = d(), x = f() || t, S = l(() => o(v) ? v : v ? [v] : [], [v]), C = s(S), w = l(() => Object.fromEntries(Object.entries(C).map(([e, t]) => [e, t.originalFilename])), [C]), T = l(() => S.map((e) => {
|
|
34
|
+
let t = w[e] || a(e);
|
|
31
35
|
return {
|
|
32
36
|
uid: e,
|
|
33
37
|
key: e,
|
|
34
|
-
sourceUrl: n(e,
|
|
38
|
+
sourceUrl: n(e, b, g),
|
|
35
39
|
name: t,
|
|
36
40
|
fileName: t,
|
|
37
41
|
status: "done"
|
|
38
42
|
};
|
|
39
43
|
}), [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
S,
|
|
45
|
+
w,
|
|
46
|
+
b,
|
|
47
|
+
g
|
|
48
|
+
]), [E, D] = u(T);
|
|
49
|
+
return c(() => {
|
|
50
|
+
D((e) => h(e, T, w));
|
|
51
|
+
}, [T, w]), /* @__PURE__ */ i(r, {
|
|
52
|
+
..._,
|
|
53
|
+
disabled: x,
|
|
54
|
+
fileList: E,
|
|
55
|
+
maxCount: m,
|
|
56
|
+
resolveFileUrl: g,
|
|
52
57
|
onChange: ({ fileList: e }) => {
|
|
53
|
-
|
|
54
|
-
let t = e.filter((e) => e.status === "done").map((e) =>
|
|
55
|
-
|
|
58
|
+
D(e);
|
|
59
|
+
let t = e.filter((e) => e.status === "done").map((e) => p(e));
|
|
60
|
+
y((m ?? Infinity) > 1 ? t : t.length > 0 ? t[0] : null);
|
|
56
61
|
}
|
|
57
62
|
});
|
|
58
63
|
}
|
|
59
|
-
var
|
|
64
|
+
var _ = t("UploadField", g);
|
|
60
65
|
//#endregion
|
|
61
|
-
export {
|
|
66
|
+
export { _ as UploadField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { Icon as e } from "../icon/index.js";
|
|
3
3
|
import { useFormContext as t } from "./form.js";
|
|
4
4
|
import { Fragment as n, jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
|
package/dist/es/form/form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { fieldContext as e, formContext as t, useFormContext as n } from "./contexts/form-context.js";
|
|
3
3
|
import { formComponents as r } from "./components/index.js";
|
|
4
4
|
import { fieldComponents as i } from "./fields/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { createField as e, restoreFieldOptions as t } from "./create-field.js";
|
|
3
3
|
import { withFormItem as n } from "./with-form-item.js";
|
|
4
4
|
export { e as createField, t as restoreFieldOptions, n as withFormItem };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { restoreFieldOptions as e } from "./helpers/create-field.js";
|
|
3
3
|
import { useFormContext as t, withFieldGroup as n, withForm as r } from "./form.js";
|
|
4
4
|
import { DefaultResetButton as i, DefaultSubmitButton as a, FormActions as o } from "./form-actions.js";
|
package/dist/es/form/use-form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { createField as e } from "./helpers/create-field.js";
|
|
3
3
|
import { useAppForm as t } from "./form.js";
|
|
4
4
|
import { useMemo as n } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { Center as e } from "../center/index.js";
|
|
3
3
|
import t from "../empty/empty.js";
|
|
4
4
|
import { DefaultResetButton as n, DefaultSubmitButton as r, FormActions as i } from "../form/form-actions.js";
|
|
@@ -6,85 +6,87 @@ import { useForm as a } from "../form/use-form.js";
|
|
|
6
6
|
import { Drawer as o } from "../drawer/index.js";
|
|
7
7
|
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
8
8
|
import { isFunction as c } from "@vef-framework-react/shared";
|
|
9
|
-
import { memo as l, useCallback as u,
|
|
9
|
+
import { memo as l, useCallback as u, useEffect as d, useMemo as f, useRef as p } from "react";
|
|
10
10
|
import "@emotion/react";
|
|
11
|
-
import { useMutation as
|
|
11
|
+
import { useMutation as m } from "@vef-framework-react/core";
|
|
12
12
|
//#region src/form-drawer/index.tsx
|
|
13
|
-
function
|
|
13
|
+
function h() {
|
|
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 g = process.env.NODE_ENV === "production" ? {
|
|
17
17
|
name: "1mcunxu",
|
|
18
18
|
styles: "min-height:100%"
|
|
19
19
|
} : {
|
|
20
20
|
name: "1mcunxu",
|
|
21
|
-
styles: "min-height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
22
|
-
toString:
|
|
23
|
-
},
|
|
24
|
-
function
|
|
25
|
-
return c(e) ? e(t) : e ||
|
|
21
|
+
styles: "min-height:100%/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QmtCIiwiZmlsZSI6ImluZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQXdhaXRhYmxlIH0gZnJvbSBcIkB2ZWYtZnJhbWV3b3JrLXJlYWN0L3NoYXJlZFwiO1xuaW1wb3J0IHR5cGUgeyBGQywgUmVhY3ROb2RlIH0gZnJvbSBcInJlYWN0XCI7XG5cbmltcG9ydCB0eXBlIHsgR2V0UHJvcCB9IGZyb20gXCIuLi9fYmFzZVwiO1xuaW1wb3J0IHR5cGUgeyBEcmF3ZXJQcm9wcyB9IGZyb20gXCIuLi9kcmF3ZXJcIjtcbmltcG9ydCB0eXBlIHsgRm9ybUFwaSB9IGZyb20gXCIuLi9mb3JtXCI7XG5pbXBvcnQgdHlwZSB7IEZvcm1EcmF3ZXJQcm9wcyB9IGZyb20gXCIuL3Byb3BzXCI7XG5cbmltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xuaW1wb3J0IHsgdXNlTXV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MsIFREYXRhPikgPT4gQXdhaXRhYmxlPFJlYWN0Tm9kZT4pICYgUGljazxGQywgXCJkaXNwbGF5TmFtZVwiPjtcbkZvcm1EcmF3ZXIuZGlzcGxheU5hbWUgPSBcIkZvcm1EcmF3ZXJcIjtcblxuZXhwb3J0IHR5cGUgeyBGb3JtRHJhd2VyUHJvcHMgfSBmcm9tIFwiLi9wcm9wc1wiO1xuIl19 */",
|
|
22
|
+
toString: h
|
|
23
|
+
}, _ = /* @__PURE__ */ s(e, { children: /* @__PURE__ */ s(t, { description: "请提供表单内容" }) });
|
|
24
|
+
function v(e, t) {
|
|
25
|
+
return c(e) ? e(t) : e || _;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
let
|
|
29
|
-
defaultValues:
|
|
27
|
+
var y = l(({ open: e = !1, title: t, width: l, placement: h = "right", resizable: _, defaultValues: y, disabled: b = !1, formComponent: x, formLayout: S, renderActions: C, submitButtonProps: w, resetButtonProps: T, mutationFn: E, mutationMeta: D, children: O, beforeSubmit: k, afterSubmit: A, onClose: j, onSubmit: M, onReset: N }) => {
|
|
28
|
+
let P = a({
|
|
29
|
+
defaultValues: y,
|
|
30
30
|
onSubmit: async ({ value: e }) => {
|
|
31
31
|
let t = e;
|
|
32
|
-
c(
|
|
32
|
+
c(k) && (t = await k(t)), c(M) && await M(t), E ? await z(t) : M || j?.();
|
|
33
33
|
}
|
|
34
|
-
}), { Form:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
mutationKey: [w?.key],
|
|
38
|
-
mutationFn: w,
|
|
34
|
+
}), { Form: F, AppForm: I, reset: L } = P, { isPending: R, mutateAsync: z } = m({
|
|
35
|
+
mutationKey: [E?.key],
|
|
36
|
+
mutationFn: E,
|
|
39
37
|
onSuccess: async ({ data: e }, t) => {
|
|
40
|
-
c(
|
|
38
|
+
c(A) && await A(t, e), j?.();
|
|
41
39
|
},
|
|
42
|
-
meta:
|
|
43
|
-
}),
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
}, [
|
|
40
|
+
meta: D
|
|
41
|
+
}), B = u(() => {
|
|
42
|
+
N?.(y);
|
|
43
|
+
}, [y, N]), V = u(() => {
|
|
44
|
+
R || j?.();
|
|
45
|
+
}, [R, j]), H = p(e);
|
|
46
|
+
d(() => {
|
|
47
|
+
H.current && !e && L(), H.current = e;
|
|
48
|
+
}, [e, L]);
|
|
49
|
+
let U = f(() => ({ wrapper: { width: l } }), [l]), W = f(() => new Proxy(P, { get(e, t, n) {
|
|
48
50
|
if (t === "reset") {
|
|
49
51
|
let r = Reflect.get(e, t, n);
|
|
50
52
|
return () => {
|
|
51
|
-
r(),
|
|
53
|
+
r(), B();
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
return Reflect.get(e, t, n);
|
|
55
|
-
} }), [
|
|
57
|
+
} }), [P, B]);
|
|
56
58
|
return /* @__PURE__ */ s(o, {
|
|
57
59
|
destroyOnHidden: !0,
|
|
58
|
-
footer:
|
|
59
|
-
let e =
|
|
60
|
-
submitButton: /* @__PURE__ */ s(r, { submitButtonProps:
|
|
60
|
+
footer: C ? (() => {
|
|
61
|
+
let e = C(W, {
|
|
62
|
+
submitButton: /* @__PURE__ */ s(r, { submitButtonProps: w }),
|
|
61
63
|
resetButton: /* @__PURE__ */ s(n, {
|
|
62
|
-
resetButtonProps:
|
|
63
|
-
onReset:
|
|
64
|
+
resetButtonProps: T,
|
|
65
|
+
onReset: B
|
|
64
66
|
})
|
|
65
67
|
});
|
|
66
|
-
return e ? /* @__PURE__ */ s(
|
|
67
|
-
})() : /* @__PURE__ */ s(
|
|
68
|
-
resetButtonProps:
|
|
69
|
-
submitButtonProps:
|
|
70
|
-
onReset:
|
|
68
|
+
return e ? /* @__PURE__ */ s(I, { children: e }) : null;
|
|
69
|
+
})() : /* @__PURE__ */ s(I, { children: /* @__PURE__ */ s(i, {
|
|
70
|
+
resetButtonProps: T,
|
|
71
|
+
submitButtonProps: w,
|
|
72
|
+
onReset: B
|
|
71
73
|
}) }),
|
|
72
74
|
keyboard: !1,
|
|
73
75
|
open: e,
|
|
74
|
-
placement:
|
|
75
|
-
resizable:
|
|
76
|
-
styles:
|
|
76
|
+
placement: h,
|
|
77
|
+
resizable: _,
|
|
78
|
+
styles: U,
|
|
77
79
|
title: t,
|
|
78
|
-
onClose:
|
|
79
|
-
children: /* @__PURE__ */ s(
|
|
80
|
-
...
|
|
81
|
-
component:
|
|
82
|
-
css:
|
|
83
|
-
disabled:
|
|
84
|
-
children:
|
|
80
|
+
onClose: V,
|
|
81
|
+
children: /* @__PURE__ */ s(I, { children: /* @__PURE__ */ s(F, {
|
|
82
|
+
...S,
|
|
83
|
+
component: x,
|
|
84
|
+
css: g,
|
|
85
|
+
disabled: b || R,
|
|
86
|
+
children: v(O, P)
|
|
85
87
|
}) })
|
|
86
88
|
});
|
|
87
89
|
});
|
|
88
|
-
|
|
90
|
+
y.displayName = "FormDrawer";
|
|
89
91
|
//#endregion
|
|
90
|
-
export {
|
|
92
|
+
export { y as FormDrawer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { Center as e } from "../center/index.js";
|
|
3
3
|
import t from "../empty/empty.js";
|
|
4
4
|
import { DefaultResetButton as n, DefaultSubmitButton as r, FormActions as i } from "../form/form-actions.js";
|
|
@@ -6,73 +6,75 @@ import { useForm as a } from "../form/use-form.js";
|
|
|
6
6
|
import { Modal as o } from "../modal/modal.js";
|
|
7
7
|
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
8
8
|
import { isFunction as c } from "@vef-framework-react/shared";
|
|
9
|
-
import { memo as l, useCallback as u,
|
|
10
|
-
import { useMutation as
|
|
9
|
+
import { memo as l, useCallback as u, useEffect as d, useMemo as f, useRef as p } from "react";
|
|
10
|
+
import { useMutation as m } from "@vef-framework-react/core";
|
|
11
11
|
//#region src/form-modal/index.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return c(e) ? e(t) : e ||
|
|
12
|
+
var h = /* @__PURE__ */ s(e, { children: /* @__PURE__ */ s(t, { description: "请提供表单内容" }) });
|
|
13
|
+
function g(e, t) {
|
|
14
|
+
return c(e) ? e(t) : e || h;
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
let
|
|
18
|
-
defaultValues:
|
|
16
|
+
var _ = l(({ open: e = !1, title: t, width: l, draggable: h = !0, submitButtonProps: _, resetButtonProps: v, defaultValues: y, disabled: b = !1, formComponent: x, formLayout: S, renderActions: C, mutationFn: w, mutationMeta: T, children: E, beforeSubmit: D, afterSubmit: O, onClose: k, onSubmit: A, onReset: j }) => {
|
|
17
|
+
let M = a({
|
|
18
|
+
defaultValues: y,
|
|
19
19
|
onSubmit: async ({ value: e }) => {
|
|
20
20
|
let t = e;
|
|
21
|
-
c(
|
|
21
|
+
c(D) && (t = await D(t)), c(A) && await A(t), w ? await L(t) : A || k?.();
|
|
22
22
|
}
|
|
23
|
-
}), { Form:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
mutationKey: [S?.key],
|
|
27
|
-
mutationFn: S,
|
|
23
|
+
}), { Form: N, AppForm: P, reset: F } = M, { isPending: I, mutateAsync: L } = m({
|
|
24
|
+
mutationKey: [w?.key],
|
|
25
|
+
mutationFn: w,
|
|
28
26
|
onSuccess: async ({ data: e }, t) => {
|
|
29
|
-
c(
|
|
27
|
+
c(O) && await O(t, e), k?.();
|
|
30
28
|
},
|
|
31
|
-
meta:
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
|
|
36
|
-
}, [
|
|
29
|
+
meta: T
|
|
30
|
+
}), R = u(() => {
|
|
31
|
+
j?.(y);
|
|
32
|
+
}, [y, j]), z = u(() => {
|
|
33
|
+
I || k?.();
|
|
34
|
+
}, [I, k]), B = p(e);
|
|
35
|
+
d(() => {
|
|
36
|
+
B.current && !e && F(), B.current = e;
|
|
37
|
+
}, [e, F]);
|
|
38
|
+
let V = f(() => new Proxy(M, { get(e, t, n) {
|
|
37
39
|
if (t === "reset") {
|
|
38
40
|
let r = Reflect.get(e, t, n);
|
|
39
41
|
return () => {
|
|
40
|
-
r(),
|
|
42
|
+
r(), R();
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
return Reflect.get(e, t, n);
|
|
44
|
-
} }), [
|
|
46
|
+
} }), [M, R]);
|
|
45
47
|
return /* @__PURE__ */ s(o, {
|
|
46
48
|
centered: !0,
|
|
47
49
|
destroyOnHidden: !0,
|
|
48
|
-
draggable:
|
|
49
|
-
footer:
|
|
50
|
-
let e =
|
|
51
|
-
submitButton: /* @__PURE__ */ s(r, { submitButtonProps:
|
|
50
|
+
draggable: h,
|
|
51
|
+
footer: C ? (() => {
|
|
52
|
+
let e = C(V, {
|
|
53
|
+
submitButton: /* @__PURE__ */ s(r, { submitButtonProps: _ }),
|
|
52
54
|
resetButton: /* @__PURE__ */ s(n, {
|
|
53
|
-
resetButtonProps:
|
|
54
|
-
onReset:
|
|
55
|
+
resetButtonProps: v,
|
|
56
|
+
onReset: R
|
|
55
57
|
})
|
|
56
58
|
});
|
|
57
|
-
return e ? /* @__PURE__ */ s(
|
|
58
|
-
})() : /* @__PURE__ */ s(
|
|
59
|
-
resetButtonProps:
|
|
60
|
-
submitButtonProps:
|
|
61
|
-
onReset:
|
|
59
|
+
return e ? /* @__PURE__ */ s(P, { children: e }) : null;
|
|
60
|
+
})() : /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(i, {
|
|
61
|
+
resetButtonProps: v,
|
|
62
|
+
submitButtonProps: _,
|
|
63
|
+
onReset: R
|
|
62
64
|
}) }),
|
|
63
65
|
keyboard: !1,
|
|
64
66
|
open: e,
|
|
65
67
|
title: t,
|
|
66
68
|
width: l,
|
|
67
|
-
onCancel:
|
|
68
|
-
children: /* @__PURE__ */ s(
|
|
69
|
-
...
|
|
70
|
-
component:
|
|
71
|
-
disabled:
|
|
72
|
-
children:
|
|
69
|
+
onCancel: z,
|
|
70
|
+
children: /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(N, {
|
|
71
|
+
...S,
|
|
72
|
+
component: x,
|
|
73
|
+
disabled: b || I,
|
|
74
|
+
children: g(E, M)
|
|
73
75
|
}) })
|
|
74
76
|
});
|
|
75
77
|
});
|
|
76
|
-
|
|
78
|
+
_.displayName = "FormModal";
|
|
77
79
|
//#endregion
|
|
78
|
-
export {
|
|
80
|
+
export { _ as FormModal };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { fullWidth as e } from "../_base/styles/common.js";
|
|
3
3
|
import { Icon as t } from "../icon/index.js";
|
|
4
4
|
import { Fragment as n, jsx as r } from "@emotion/react/jsx-runtime";
|
package/dist/es/grid/context.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { createContext as e, use as t } from "react";
|
|
3
3
|
//#region src/grid/context.ts
|
|
4
4
|
var n = e(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
2
2
|
import { useContainerBreakpoints as e } from "./use-container-breakpoints.js";
|
|
3
3
|
import { useContainerWidth as t } from "./use-container-width.js";
|
|
4
4
|
import { useGridCollapsed as n } from "./use-grid-collapsed.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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
|
+
/*! @vef-framework-react/components v2.14.0 made by Venus | 2026-08-05T04:05:24.833Z */
|
|
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";
|