@vef-framework/components 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +3 -0
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.js +3 -0
- package/dist/internal/utils.d.ts +9 -0
- package/dist/internal/utils.js +3 -0
- package/dist/vef-access-denied/access-denied-icon.d.ts +4 -0
- package/dist/vef-access-denied/access-denied-icon.js +3 -0
- package/dist/vef-access-denied/index.d.ts +5 -0
- package/dist/vef-access-denied/index.js +29 -0
- package/dist/vef-access-denied/props.d.ts +18 -0
- package/dist/vef-action-buttons/index.d.ts +6 -0
- package/dist/vef-action-buttons/index.js +3 -0
- package/dist/vef-action-buttons/props.d.ts +23 -0
- package/dist/vef-badge/index.d.ts +5 -0
- package/dist/vef-badge/index.js +3 -0
- package/dist/vef-badge/props.d.ts +28 -0
- package/dist/vef-bool/hooks/use-bool-instance.d.ts +6 -0
- package/dist/vef-bool/hooks/use-bool-instance.js +3 -0
- package/dist/vef-bool/index.d.ts +4 -0
- package/dist/vef-bool/index.js +3 -0
- package/dist/vef-bool/props.d.ts +63 -0
- package/dist/vef-button/components/base-button.d.ts +9 -0
- package/dist/vef-button/components/base-button.js +3 -0
- package/dist/vef-button/index.d.ts +4 -0
- package/dist/vef-button/index.js +3 -0
- package/dist/vef-button/props.d.ts +79 -0
- package/dist/vef-card/index.d.ts +5 -0
- package/dist/vef-card/index.js +3 -0
- package/dist/vef-card/props.d.ts +27 -0
- package/dist/vef-card-meta/index.d.ts +5 -0
- package/dist/vef-card-meta/index.js +3 -0
- package/dist/vef-card-meta/props.d.ts +7 -0
- package/dist/vef-checkbox/hooks/use-checkbox-instance.d.ts +11 -0
- package/dist/vef-checkbox/hooks/use-checkbox-instance.js +3 -0
- package/dist/vef-checkbox/hooks/use-data-options.d.ts +34 -0
- package/dist/vef-checkbox/hooks/use-data-options.js +3 -0
- package/dist/vef-checkbox/index.d.ts +6 -0
- package/dist/vef-checkbox/index.js +5 -0
- package/dist/vef-checkbox/props.d.ts +41 -0
- package/dist/vef-col/index.d.ts +5 -0
- package/dist/vef-col/index.js +3 -0
- package/dist/vef-col/props.d.ts +5 -0
- package/dist/vef-color-picker/index.d.ts +5 -0
- package/dist/vef-color-picker/index.js +3 -0
- package/dist/vef-color-picker/props.d.ts +28 -0
- package/dist/vef-compact/index.d.ts +5 -0
- package/dist/vef-compact/index.js +3 -0
- package/dist/vef-compact/props.d.ts +11 -0
- package/dist/vef-config-provider/fonts/din/bold.woff2.js +3 -0
- package/dist/vef-config-provider/fonts/din/regular.woff2.js +3 -0
- package/dist/vef-config-provider/hooks/use-ui-config.d.ts +46 -0
- package/dist/vef-config-provider/hooks/use-ui-config.js +3 -0
- package/dist/vef-config-provider/index.d.ts +5 -0
- package/dist/vef-config-provider/index.js +111 -0
- package/dist/vef-config-provider/props.d.ts +24 -0
- package/dist/vef-config-provider/reset-style.d.ts +4 -0
- package/dist/vef-config-provider/reset-style.js +257 -0
- package/dist/vef-config-provider/store.d.ts +12 -0
- package/dist/vef-config-provider/store.js +3 -0
- package/dist/vef-container/index.d.ts +5 -0
- package/dist/vef-container/index.js +3 -0
- package/dist/vef-container/props.d.ts +6 -0
- package/dist/vef-crud-page/components/crud-actions.d.ts +21 -0
- package/dist/vef-crud-page/components/crud-actions.js +3 -0
- package/dist/vef-crud-page/components/crud-filter.d.ts +31 -0
- package/dist/vef-crud-page/components/crud-filter.js +3 -0
- package/dist/vef-crud-page/components/crud-footer.d.ts +31 -0
- package/dist/vef-crud-page/components/crud-footer.js +9 -0
- package/dist/vef-crud-page/components/crud-form-modal.d.ts +18 -0
- package/dist/vef-crud-page/components/crud-form-modal.js +3 -0
- package/dist/vef-crud-page/components/crud-header.d.ts +32 -0
- package/dist/vef-crud-page/components/crud-header.js +3 -0
- package/dist/vef-crud-page/components/crud-table.d.ts +57 -0
- package/dist/vef-crud-page/components/crud-table.js +3 -0
- package/dist/vef-crud-page/hooks/use-action-buttons.d.ts +16 -0
- package/dist/vef-crud-page/hooks/use-action-buttons.js +3 -0
- package/dist/vef-crud-page/hooks/use-crud-context.d.ts +8 -0
- package/dist/vef-crud-page/hooks/use-crud-context.js +3 -0
- package/dist/vef-crud-page/hooks/use-crud-schema.d.ts +17 -0
- package/dist/vef-crud-page/hooks/use-crud-schema.js +3 -0
- package/dist/vef-crud-page/hooks/use-operation-buttons.d.ts +11 -0
- package/dist/vef-crud-page/hooks/use-operation-buttons.js +3 -0
- package/dist/vef-crud-page/index.d.ts +6 -0
- package/dist/vef-crud-page/index.js +3 -0
- package/dist/vef-crud-page/props.d.ts +84 -0
- package/dist/vef-crud-page/store.d.ts +119 -0
- package/dist/vef-crud-page/store.js +3 -0
- package/dist/vef-crud-page/types.d.ts +173 -0
- package/dist/vef-divider/index.d.ts +5 -0
- package/dist/vef-divider/index.js +3 -0
- package/dist/vef-divider/props.d.ts +25 -0
- package/dist/vef-drawer/components/action-button-wrapper.d.ts +14 -0
- package/dist/vef-drawer/components/action-button-wrapper.js +3 -0
- package/dist/vef-drawer/components/button-props.d.ts +15 -0
- package/dist/vef-drawer/components/button-props.js +2 -0
- package/dist/vef-drawer/components/cancel-action-button.d.ts +4 -0
- package/dist/vef-drawer/components/cancel-action-button.js +3 -0
- package/dist/vef-drawer/components/ok-action-button.d.ts +4 -0
- package/dist/vef-drawer/components/ok-action-button.js +3 -0
- package/dist/vef-drawer/context.d.ts +27 -0
- package/dist/vef-drawer/context.js +3 -0
- package/dist/vef-drawer/index.d.ts +5 -0
- package/dist/vef-drawer/index.js +10 -0
- package/dist/vef-drawer/props.d.ts +97 -0
- package/dist/vef-dropdown/index.d.ts +4 -0
- package/dist/vef-dropdown/index.js +3 -0
- package/dist/vef-dropdown/props.d.ts +68 -0
- package/dist/vef-empty/index.d.ts +5 -0
- package/dist/vef-empty/index.js +3 -0
- package/dist/vef-empty/props.d.ts +7 -0
- package/dist/vef-empty-placeholder/index.d.ts +5 -0
- package/dist/vef-empty-placeholder/index.js +7 -0
- package/dist/vef-empty-placeholder/props.d.ts +6 -0
- package/dist/vef-error/error-icon.d.ts +4 -0
- package/dist/vef-error/error-icon.js +3 -0
- package/dist/vef-error/index.d.ts +5 -0
- package/dist/vef-error/index.js +30 -0
- package/dist/vef-error/props.d.ts +18 -0
- package/dist/vef-filter/components/action-buttons.d.ts +3 -0
- package/dist/vef-filter/components/action-buttons.js +21 -0
- package/dist/vef-filter/components/advanced-filter.d.ts +13 -0
- package/dist/vef-filter/components/advanced-filter.js +11 -0
- package/dist/vef-filter/components/basic-filter.d.ts +14 -0
- package/dist/vef-filter/components/basic-filter.js +21 -0
- package/dist/vef-filter/components/fields/index.d.ts +9 -0
- package/dist/vef-filter/components/fields/index.js +3 -0
- package/dist/vef-filter/components/fields/input-number.d.ts +4 -0
- package/dist/vef-filter/components/fields/input-number.js +3 -0
- package/dist/vef-filter/components/fields/input.d.ts +4 -0
- package/dist/vef-filter/components/fields/input.js +3 -0
- package/dist/vef-filter/components/fields/props.d.ts +32 -0
- package/dist/vef-filter/components/filter-field.d.ts +4 -0
- package/dist/vef-filter/components/filter-field.js +3 -0
- package/dist/vef-filter/components/filter-item.d.ts +15 -0
- package/dist/vef-filter/components/filter-item.js +3 -0
- package/dist/vef-filter/event.d.ts +12 -0
- package/dist/vef-filter/event.js +3 -0
- package/dist/vef-filter/helper.d.ts +10 -0
- package/dist/vef-filter/helper.js +3 -0
- package/dist/vef-filter/hooks/use-action-handlers.d.ts +20 -0
- package/dist/vef-filter/hooks/use-action-handlers.js +3 -0
- package/dist/vef-filter/hooks/use-computed-values.d.ts +42 -0
- package/dist/vef-filter/hooks/use-computed-values.js +3 -0
- package/dist/vef-filter/hooks/use-filter-context.d.ts +8 -0
- package/dist/vef-filter/hooks/use-filter-context.js +3 -0
- package/dist/vef-filter/hooks/use-filter-initialization.d.ts +7 -0
- package/dist/vef-filter/hooks/use-filter-initialization.js +3 -0
- package/dist/vef-filter/hooks/use-filter-instance.d.ts +10 -0
- package/dist/vef-filter/hooks/use-filter-instance.js +3 -0
- package/dist/vef-filter/hooks/use-filter-items.d.ts +13 -0
- package/dist/vef-filter/hooks/use-filter-items.js +3 -0
- package/dist/vef-filter/hooks/use-filter-values-change.d.ts +11 -0
- package/dist/vef-filter/hooks/use-filter-values-change.js +3 -0
- package/dist/vef-filter/hooks/use-label-config.d.ts +14 -0
- package/dist/vef-filter/hooks/use-label-config.js +3 -0
- package/dist/vef-filter/index.d.ts +8 -0
- package/dist/vef-filter/index.js +10 -0
- package/dist/vef-filter/props.d.ts +106 -0
- package/dist/vef-filter/store.d.ts +77 -0
- package/dist/vef-filter/store.js +3 -0
- package/dist/vef-filter/types.d.ts +224 -0
- package/dist/vef-flex/index.d.ts +5 -0
- package/dist/vef-flex/index.js +3 -0
- package/dist/vef-flex/props.d.ts +12 -0
- package/dist/vef-float-button/index.d.ts +5 -0
- package/dist/vef-float-button/index.js +3 -0
- package/dist/vef-float-button/props.d.ts +26 -0
- package/dist/vef-float-button-group/index.d.ts +5 -0
- package/dist/vef-float-button-group/index.js +3 -0
- package/dist/vef-float-button-group/props.d.ts +11 -0
- package/dist/vef-form/components/fields/index.d.ts +10 -0
- package/dist/vef-form/components/fields/index.js +3 -0
- package/dist/vef-form/components/fields/input-number.d.ts +5 -0
- package/dist/vef-form/components/fields/input-number.js +3 -0
- package/dist/vef-form/components/fields/input.d.ts +5 -0
- package/dist/vef-form/components/fields/input.js +3 -0
- package/dist/vef-form/components/fields/props.d.ts +33 -0
- package/dist/vef-form/components/form-actions.d.ts +20 -0
- package/dist/vef-form/components/form-actions.js +5 -0
- package/dist/vef-form/components/form-content.d.ts +18 -0
- package/dist/vef-form/components/form-content.js +6 -0
- package/dist/vef-form/components/form-field.d.ts +5 -0
- package/dist/vef-form/components/form-field.js +3 -0
- package/dist/vef-form/components/form-group.d.ts +22 -0
- package/dist/vef-form/components/form-group.js +13 -0
- package/dist/vef-form/components/form-hidden-item.d.ts +14 -0
- package/dist/vef-form/components/form-hidden-item.js +3 -0
- package/dist/vef-form/components/form-item.d.ts +18 -0
- package/dist/vef-form/components/form-item.js +3 -0
- package/dist/vef-form/components/form-row.d.ts +26 -0
- package/dist/vef-form/components/form-row.js +3 -0
- package/dist/vef-form/event.d.ts +15 -0
- package/dist/vef-form/event.js +3 -0
- package/dist/vef-form/helper.d.ts +11 -0
- package/dist/vef-form/helper.js +3 -0
- package/dist/vef-form/hooks/use-action-handlers.d.ts +14 -0
- package/dist/vef-form/hooks/use-action-handlers.js +3 -0
- package/dist/vef-form/hooks/use-columns-layout.d.ts +12 -0
- package/dist/vef-form/hooks/use-columns-layout.js +3 -0
- package/dist/vef-form/hooks/use-computed-values.d.ts +42 -0
- package/dist/vef-form/hooks/use-computed-values.js +3 -0
- package/dist/vef-form/hooks/use-form-context.d.ts +6 -0
- package/dist/vef-form/hooks/use-form-context.js +3 -0
- package/dist/vef-form/hooks/use-form-initialization.d.ts +14 -0
- package/dist/vef-form/hooks/use-form-initialization.js +3 -0
- package/dist/vef-form/hooks/use-form-instance.d.ts +10 -0
- package/dist/vef-form/hooks/use-form-instance.js +3 -0
- package/dist/vef-form/hooks/use-form-values-change.d.ts +11 -0
- package/dist/vef-form/hooks/use-form-values-change.js +3 -0
- package/dist/vef-form/hooks/use-label-width.d.ts +9 -0
- package/dist/vef-form/hooks/use-label-width.js +3 -0
- package/dist/vef-form/index.d.ts +8 -0
- package/dist/vef-form/index.js +5 -0
- package/dist/vef-form/props.d.ts +158 -0
- package/dist/vef-form/store.d.ts +89 -0
- package/dist/vef-form/store.js +3 -0
- package/dist/vef-form/types.d.ts +335 -0
- package/dist/vef-form/validation-rules.d.ts +175 -0
- package/dist/vef-form/validation-rules.js +3 -0
- package/dist/vef-form-drawer/index.d.ts +9 -0
- package/dist/vef-form-drawer/index.js +3 -0
- package/dist/vef-form-drawer/props.d.ts +17 -0
- package/dist/vef-form-modal/index.d.ts +9 -0
- package/dist/vef-form-modal/index.js +3 -0
- package/dist/vef-form-modal/props.d.ts +20 -0
- package/dist/vef-grid/index.d.ts +5 -0
- package/dist/vef-grid/index.js +14 -0
- package/dist/vef-grid/props.d.ts +25 -0
- package/dist/vef-grid/props.js +3 -0
- package/dist/vef-grid-item/index.d.ts +5 -0
- package/dist/vef-grid-item/index.js +3 -0
- package/dist/vef-grid-item/props.d.ts +34 -0
- package/dist/vef-icon/index.d.ts +4 -0
- package/dist/vef-icon/index.js +3 -0
- package/dist/vef-icon/props.d.ts +12 -0
- package/dist/vef-input/hooks/use-input-instance.d.ts +12 -0
- package/dist/vef-input/hooks/use-input-instance.js +3 -0
- package/dist/vef-input/index.d.ts +4 -0
- package/dist/vef-input/index.js +3 -0
- package/dist/vef-input/props.d.ts +67 -0
- package/dist/vef-input-number/hooks/use-input-number-instance.d.ts +12 -0
- package/dist/vef-input-number/hooks/use-input-number-instance.js +3 -0
- package/dist/vef-input-number/index.d.ts +4 -0
- package/dist/vef-input-number/index.js +3 -0
- package/dist/vef-input-number/props.d.ts +124 -0
- package/dist/vef-loading-placeholder/index.d.ts +5 -0
- package/dist/vef-loading-placeholder/index.js +7 -0
- package/dist/vef-loading-placeholder/props.d.ts +6 -0
- package/dist/vef-login/index.d.ts +5 -0
- package/dist/vef-login/index.js +53 -0
- package/dist/vef-login/login-icon.d.ts +4 -0
- package/dist/vef-login/login-icon.js +3 -0
- package/dist/vef-login/props.d.ts +57 -0
- package/dist/vef-modal/components/action-button-wrapper.d.ts +14 -0
- package/dist/vef-modal/components/action-button-wrapper.js +3 -0
- package/dist/vef-modal/components/button-props.d.ts +15 -0
- package/dist/vef-modal/components/button-props.js +2 -0
- package/dist/vef-modal/components/cancel-action-button.d.ts +4 -0
- package/dist/vef-modal/components/cancel-action-button.js +3 -0
- package/dist/vef-modal/components/ok-action-button.d.ts +4 -0
- package/dist/vef-modal/components/ok-action-button.js +3 -0
- package/dist/vef-modal/context.d.ts +27 -0
- package/dist/vef-modal/context.js +3 -0
- package/dist/vef-modal/index.d.ts +5 -0
- package/dist/vef-modal/index.js +6 -0
- package/dist/vef-modal/props.d.ts +88 -0
- package/dist/vef-not-found/index.d.ts +5 -0
- package/dist/vef-not-found/index.js +30 -0
- package/dist/vef-not-found/not-found-icon.d.ts +4 -0
- package/dist/vef-not-found/not-found-icon.js +3 -0
- package/dist/vef-not-found/props.d.ts +18 -0
- package/dist/vef-page/index.d.ts +5 -0
- package/dist/vef-page/index.js +59 -0
- package/dist/vef-page/props.d.ts +29 -0
- package/dist/vef-pagination/index.d.ts +4 -0
- package/dist/vef-pagination/index.js +3 -0
- package/dist/vef-pagination/props.d.ts +59 -0
- package/dist/vef-pagination/props.js +3 -0
- package/dist/vef-paragraph/index.d.ts +5 -0
- package/dist/vef-paragraph/index.js +3 -0
- package/dist/vef-paragraph/props.d.ts +55 -0
- package/dist/vef-password/hooks/use-password-instance.d.ts +13 -0
- package/dist/vef-password/hooks/use-password-instance.js +3 -0
- package/dist/vef-password/index.d.ts +4 -0
- package/dist/vef-password/index.js +3 -0
- package/dist/vef-password/props.d.ts +58 -0
- package/dist/vef-popconfirm/index.d.ts +5 -0
- package/dist/vef-popconfirm/index.js +3 -0
- package/dist/vef-popconfirm/props.d.ts +33 -0
- package/dist/vef-popover/index.d.ts +5 -0
- package/dist/vef-popover/index.js +3 -0
- package/dist/vef-popover/props.d.ts +29 -0
- package/dist/vef-radio/hooks/use-data-options.d.ts +35 -0
- package/dist/vef-radio/hooks/use-data-options.js +3 -0
- package/dist/vef-radio/hooks/use-radio-instance.d.ts +11 -0
- package/dist/vef-radio/hooks/use-radio-instance.js +3 -0
- package/dist/vef-radio/index.d.ts +7 -0
- package/dist/vef-radio/index.js +5 -0
- package/dist/vef-radio/props.d.ts +59 -0
- package/dist/vef-rate/hooks/use-rate-instance.d.ts +12 -0
- package/dist/vef-rate/hooks/use-rate-instance.js +3 -0
- package/dist/vef-rate/index.d.ts +4 -0
- package/dist/vef-rate/index.js +3 -0
- package/dist/vef-rate/props.d.ts +25 -0
- package/dist/vef-responsive-container/index.d.ts +4 -0
- package/dist/vef-responsive-container/index.js +7 -0
- package/dist/vef-responsive-container/props.d.ts +21 -0
- package/dist/vef-responsive-item/index.d.ts +4 -0
- package/dist/vef-responsive-item/index.js +5 -0
- package/dist/vef-responsive-item/props.d.ts +12 -0
- package/dist/vef-ribbon/index.d.ts +5 -0
- package/dist/vef-ribbon/index.js +3 -0
- package/dist/vef-ribbon/props.d.ts +15 -0
- package/dist/vef-row/index.d.ts +5 -0
- package/dist/vef-row/index.js +3 -0
- package/dist/vef-row/props.d.ts +7 -0
- package/dist/vef-scroll-area/components/scrollbar.d.ts +2 -0
- package/dist/vef-scroll-area/components/scrollbar.js +34 -0
- package/dist/vef-scroll-area/index.d.ts +4 -0
- package/dist/vef-scroll-area/index.js +10 -0
- package/dist/vef-scroll-area/props.d.ts +24 -0
- package/dist/vef-select/components/option.d.ts +7 -0
- package/dist/vef-select/components/option.js +11 -0
- package/dist/vef-select/hooks/use-data-options.d.ts +37 -0
- package/dist/vef-select/hooks/use-data-options.js +3 -0
- package/dist/vef-select/hooks/use-field-names.d.ts +9 -0
- package/dist/vef-select/hooks/use-field-names.js +3 -0
- package/dist/vef-select/hooks/use-label-render.d.ts +11 -0
- package/dist/vef-select/hooks/use-label-render.js +10 -0
- package/dist/vef-select/hooks/use-option-render.d.ts +11 -0
- package/dist/vef-select/hooks/use-option-render.js +3 -0
- package/dist/vef-select/hooks/use-select-instance.d.ts +11 -0
- package/dist/vef-select/hooks/use-select-instance.js +3 -0
- package/dist/vef-select/index.d.ts +7 -0
- package/dist/vef-select/index.js +3 -0
- package/dist/vef-select/props.d.ts +153 -0
- package/dist/vef-slider/hooks/use-slider-instance.d.ts +12 -0
- package/dist/vef-slider/hooks/use-slider-instance.js +3 -0
- package/dist/vef-slider/index.d.ts +4 -0
- package/dist/vef-slider/index.js +3 -0
- package/dist/vef-slider/props.d.ts +72 -0
- package/dist/vef-sortable-list/components/overlay-item.d.ts +9 -0
- package/dist/vef-sortable-list/components/overlay-item.js +7 -0
- package/dist/vef-sortable-list/components/sortable-item.d.ts +21 -0
- package/dist/vef-sortable-list/components/sortable-item.js +7 -0
- package/dist/vef-sortable-list/hooks/use-merged-items.d.ts +10 -0
- package/dist/vef-sortable-list/hooks/use-merged-items.js +3 -0
- package/dist/vef-sortable-list/index.d.ts +7 -0
- package/dist/vef-sortable-list/index.js +3 -0
- package/dist/vef-sortable-list/props.d.ts +77 -0
- package/dist/vef-space/index.d.ts +5 -0
- package/dist/vef-space/index.js +3 -0
- package/dist/vef-space/props.d.ts +12 -0
- package/dist/vef-spin/index.d.ts +5 -0
- package/dist/vef-spin/index.js +3 -0
- package/dist/vef-spin/props.d.ts +12 -0
- package/dist/vef-splitter/index.d.ts +5 -0
- package/dist/vef-splitter/index.js +3 -0
- package/dist/vef-splitter/props.d.ts +16 -0
- package/dist/vef-splitter-panel/index.d.ts +5 -0
- package/dist/vef-splitter-panel/index.js +3 -0
- package/dist/vef-splitter-panel/props.d.ts +6 -0
- package/dist/vef-status/index.d.ts +5 -0
- package/dist/vef-status/index.js +3 -0
- package/dist/vef-status/props.d.ts +17 -0
- package/dist/vef-table/components/columns/bool.d.ts +5 -0
- package/dist/vef-table/components/columns/bool.js +3 -0
- package/dist/vef-table/components/columns/code.d.ts +4 -0
- package/dist/vef-table/components/columns/code.js +3 -0
- package/dist/vef-table/components/columns/data-dictionary.d.ts +4 -0
- package/dist/vef-table/components/columns/data-dictionary.js +3 -0
- package/dist/vef-table/components/columns/enum.d.ts +4 -0
- package/dist/vef-table/components/columns/enum.js +3 -0
- package/dist/vef-table/components/columns/file.d.ts +4 -0
- package/dist/vef-table/components/columns/file.js +3 -0
- package/dist/vef-table/components/columns/icon.d.ts +4 -0
- package/dist/vef-table/components/columns/icon.js +3 -0
- package/dist/vef-table/components/columns/id.d.ts +4 -0
- package/dist/vef-table/components/columns/id.js +3 -0
- package/dist/vef-table/components/columns/image.d.ts +4 -0
- package/dist/vef-table/components/columns/image.js +3 -0
- package/dist/vef-table/components/columns/index.d.ts +31 -0
- package/dist/vef-table/components/columns/index.js +3 -0
- package/dist/vef-table/components/columns/markdown.d.ts +4 -0
- package/dist/vef-table/components/columns/markdown.js +3 -0
- package/dist/vef-table/components/columns/number.d.ts +4 -0
- package/dist/vef-table/components/columns/number.js +3 -0
- package/dist/vef-table/components/columns/props.d.ts +24 -0
- package/dist/vef-table/components/columns/render.d.ts +4 -0
- package/dist/vef-table/components/columns/render.js +3 -0
- package/dist/vef-table/components/columns/rich-text.d.ts +4 -0
- package/dist/vef-table/components/columns/rich-text.js +3 -0
- package/dist/vef-table/components/columns/text.d.ts +4 -0
- package/dist/vef-table/components/columns/text.js +3 -0
- package/dist/vef-table/components/columns-settings.d.ts +2 -0
- package/dist/vef-table/components/columns-settings.js +54 -0
- package/dist/vef-table/components/operation-buttons.d.ts +22 -0
- package/dist/vef-table/components/operation-buttons.js +12 -0
- package/dist/vef-table/components/settings-icon.d.ts +2 -0
- package/dist/vef-table/components/settings-icon.js +5 -0
- package/dist/vef-table/components/table-footer.d.ts +34 -0
- package/dist/vef-table/components/table-footer.js +19 -0
- package/dist/vef-table/helper.d.ts +12 -0
- package/dist/vef-table/helper.js +3 -0
- package/dist/vef-table/hooks/use-computed-batch-buttons.d.ts +13 -0
- package/dist/vef-table/hooks/use-computed-batch-buttons.js +3 -0
- package/dist/vef-table/hooks/use-computed-columns.d.ts +10 -0
- package/dist/vef-table/hooks/use-computed-columns.js +3 -0
- package/dist/vef-table/hooks/use-computed-values.d.ts +45 -0
- package/dist/vef-table/hooks/use-computed-values.js +3 -0
- package/dist/vef-table/hooks/use-data.d.ts +11 -0
- package/dist/vef-table/hooks/use-data.js +3 -0
- package/dist/vef-table/hooks/use-default-column-configs.d.ts +9 -0
- package/dist/vef-table/hooks/use-default-column-configs.js +3 -0
- package/dist/vef-table/hooks/use-display-value.d.ts +32 -0
- package/dist/vef-table/hooks/use-display-value.js +3 -0
- package/dist/vef-table/hooks/use-helper-columns.d.ts +6 -0
- package/dist/vef-table/hooks/use-helper-columns.js +3 -0
- package/dist/vef-table/hooks/use-merged-value.d.ts +10 -0
- package/dist/vef-table/hooks/use-merged-value.js +3 -0
- package/dist/vef-table/hooks/use-operation-column-width.d.ts +11 -0
- package/dist/vef-table/hooks/use-operation-column-width.js +3 -0
- package/dist/vef-table/hooks/use-pagination-props.d.ts +17 -0
- package/dist/vef-table/hooks/use-pagination-props.js +3 -0
- package/dist/vef-table/hooks/use-row-props.d.ts +11 -0
- package/dist/vef-table/hooks/use-row-props.js +3 -0
- package/dist/vef-table/hooks/use-row-selection-config.d.ts +11 -0
- package/dist/vef-table/hooks/use-row-selection-config.js +3 -0
- package/dist/vef-table/hooks/use-table-columns.d.ts +12 -0
- package/dist/vef-table/hooks/use-table-columns.js +3 -0
- package/dist/vef-table/hooks/use-table-context.d.ts +9 -0
- package/dist/vef-table/hooks/use-table-context.js +3 -0
- package/dist/vef-table/hooks/use-table-instance.d.ts +10 -0
- package/dist/vef-table/hooks/use-table-instance.js +3 -0
- package/dist/vef-table/hooks/use-table-summary.d.ts +10 -0
- package/dist/vef-table/hooks/use-table-summary.js +3 -0
- package/dist/vef-table/hooks/use-table-width.d.ts +9 -0
- package/dist/vef-table/hooks/use-table-width.js +3 -0
- package/dist/vef-table/index.d.ts +7 -0
- package/dist/vef-table/index.js +56 -0
- package/dist/vef-table/props.d.ts +330 -0
- package/dist/vef-table/store.d.ts +21 -0
- package/dist/vef-table/store.js +3 -0
- package/dist/vef-table/types.d.ts +481 -0
- package/dist/vef-tabs/index.d.ts +5 -0
- package/dist/vef-tabs/index.js +3 -0
- package/dist/vef-tabs/props.d.ts +12 -0
- package/dist/vef-tag/index.d.ts +5 -0
- package/dist/vef-tag/index.js +3 -0
- package/dist/vef-tag/props.d.ts +20 -0
- package/dist/vef-temporal-picker/hooks/use-dayjs-value.d.ts +10 -0
- package/dist/vef-temporal-picker/hooks/use-dayjs-value.js +3 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-formats.d.ts +8 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-formats.js +3 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-limit.d.ts +13 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-limit.js +3 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.d.ts +12 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.js +3 -0
- package/dist/vef-temporal-picker/index.d.ts +5 -0
- package/dist/vef-temporal-picker/index.js +3 -0
- package/dist/vef-temporal-picker/props.d.ts +101 -0
- package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.d.ts +10 -0
- package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.js +3 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-formats.d.ts +8 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-formats.js +3 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.d.ts +13 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.js +3 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.d.ts +12 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.js +3 -0
- package/dist/vef-temporal-range-picker/index.d.ts +5 -0
- package/dist/vef-temporal-range-picker/index.js +3 -0
- package/dist/vef-temporal-range-picker/props.d.ts +82 -0
- package/dist/vef-temporal-range-picker/props.js +3 -0
- package/dist/vef-text/index.d.ts +5 -0
- package/dist/vef-text/index.js +3 -0
- package/dist/vef-text/props.d.ts +47 -0
- package/dist/vef-textarea/hooks/use-textarea-instance.d.ts +13 -0
- package/dist/vef-textarea/hooks/use-textarea-instance.js +3 -0
- package/dist/vef-textarea/index.d.ts +4 -0
- package/dist/vef-textarea/index.js +3 -0
- package/dist/vef-textarea/props.d.ts +58 -0
- package/dist/vef-title/index.d.ts +5 -0
- package/dist/vef-title/index.js +15 -0
- package/dist/vef-title/props.d.ts +39 -0
- package/dist/vef-tooltip/index.d.ts +5 -0
- package/dist/vef-tooltip/index.js +3 -0
- package/dist/vef-tooltip/props.d.ts +30 -0
- package/dist/vef-tree-select/hooks/use-change-handler.d.ts +10 -0
- package/dist/vef-tree-select/hooks/use-change-handler.js +3 -0
- package/dist/vef-tree-select/hooks/use-data-options.d.ts +36 -0
- package/dist/vef-tree-select/hooks/use-data-options.js +3 -0
- package/dist/vef-tree-select/hooks/use-tree-select-instance.d.ts +11 -0
- package/dist/vef-tree-select/hooks/use-tree-select-instance.js +3 -0
- package/dist/vef-tree-select/index.d.ts +7 -0
- package/dist/vef-tree-select/index.js +3 -0
- package/dist/vef-tree-select/props.d.ts +142 -0
- package/package.json +56 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { AnyValue, ObjectType, ObjectValue, StringKey } from "@vef-framework/shared";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { FormScene, FormValidationRule } from "./types";
|
|
4
|
+
type MessageType = string | ReactElement;
|
|
5
|
+
/**
|
|
6
|
+
* The required validation rule.
|
|
7
|
+
*
|
|
8
|
+
* @param message The error message
|
|
9
|
+
* @returns The validation rule.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isRequired<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: MessageType): FormValidationRule<Values, Key, Scene>;
|
|
12
|
+
/**
|
|
13
|
+
* The equals to validation rule.
|
|
14
|
+
*
|
|
15
|
+
* @param target - The target value.
|
|
16
|
+
* @param message - The error message.
|
|
17
|
+
* @returns The validation rule.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isEqualsTo<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(target: AnyValue, message?: string): FormValidationRule<Values, Key, Scene>;
|
|
20
|
+
/**
|
|
21
|
+
* The not equals to validation rule.
|
|
22
|
+
*
|
|
23
|
+
* @param target - The target value.
|
|
24
|
+
* @param message - The message.
|
|
25
|
+
* @returns The validation rule.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isNotEqualsTo<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(target: AnyValue, message?: string): FormValidationRule<Values, Key, Scene>;
|
|
28
|
+
/**
|
|
29
|
+
* The in validation rule.
|
|
30
|
+
*
|
|
31
|
+
* @param allowed - The allowed values.
|
|
32
|
+
* @param message - The error message.
|
|
33
|
+
* @returns The validation rule.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isIn<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(allowed: AnyValue[], message?: MessageType): FormValidationRule<Values, Key, Scene>;
|
|
36
|
+
/**
|
|
37
|
+
* The meets min size validation rule.
|
|
38
|
+
*
|
|
39
|
+
* @param min - The min size.
|
|
40
|
+
* @param message - The error message.
|
|
41
|
+
* @returns The validation rule.
|
|
42
|
+
*/
|
|
43
|
+
export declare function isMeetsMinSize<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(min: number, message?: MessageType): FormValidationRule<Values, Key, Scene>;
|
|
44
|
+
/**
|
|
45
|
+
* The meets max size validation rule.
|
|
46
|
+
*
|
|
47
|
+
* @param max - The max size.
|
|
48
|
+
* @param message - The error message.
|
|
49
|
+
* @returns The validation rule.
|
|
50
|
+
*/
|
|
51
|
+
export declare function isMeetsMaxSize<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(max: number, message?: MessageType): FormValidationRule<Values, Key, Scene>;
|
|
52
|
+
/**
|
|
53
|
+
* The meets range size validation rule.
|
|
54
|
+
*
|
|
55
|
+
* @param min - The min size.
|
|
56
|
+
* @param max - The max size.
|
|
57
|
+
* @param message - The error message.
|
|
58
|
+
* @returns The validation rule.
|
|
59
|
+
*/
|
|
60
|
+
export declare function isMeetsRangeSize<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(min: number, max: number, message?: MessageType): FormValidationRule<Values, Key, Scene>;
|
|
61
|
+
/**
|
|
62
|
+
* The alpha validation rule.
|
|
63
|
+
*
|
|
64
|
+
* @param message - The error message.
|
|
65
|
+
* @returns The validation rule.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isAlpha<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
68
|
+
/**
|
|
69
|
+
* The alphanumeric validation rule.
|
|
70
|
+
*
|
|
71
|
+
* @param message - The error message.
|
|
72
|
+
* @returns The validation rule.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isAlphanumeric<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
75
|
+
/**
|
|
76
|
+
* The ascii validation rule.
|
|
77
|
+
*
|
|
78
|
+
* @param message - The error message.
|
|
79
|
+
* @returns The validation rule.
|
|
80
|
+
*/
|
|
81
|
+
export declare function isAscii<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
82
|
+
/**
|
|
83
|
+
* The numeric validation rule.
|
|
84
|
+
*
|
|
85
|
+
* @param message - The error message.
|
|
86
|
+
* @returns The validation rule.
|
|
87
|
+
*/
|
|
88
|
+
export declare function isNumeric<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
89
|
+
/**
|
|
90
|
+
* The email validation rule.
|
|
91
|
+
*
|
|
92
|
+
* @param message - The error message.
|
|
93
|
+
* @returns The validation rule.
|
|
94
|
+
*/
|
|
95
|
+
export declare function isEmail<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
96
|
+
/**
|
|
97
|
+
* The hex color validation rule.
|
|
98
|
+
*
|
|
99
|
+
* @param message - The error message.
|
|
100
|
+
* @returns The validation rule.
|
|
101
|
+
*/
|
|
102
|
+
export declare function isHexColor<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
103
|
+
/**
|
|
104
|
+
* The identity card validation rule.
|
|
105
|
+
*
|
|
106
|
+
* @param message - The error message.
|
|
107
|
+
* @returns The validation rule.
|
|
108
|
+
*/
|
|
109
|
+
export declare function isIdentityCard<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
110
|
+
/**
|
|
111
|
+
* The ip validation rule.
|
|
112
|
+
*
|
|
113
|
+
* @param message - The error message.
|
|
114
|
+
* @returns The validation rule.
|
|
115
|
+
*/
|
|
116
|
+
export declare function isIp<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
117
|
+
/**
|
|
118
|
+
* The port validation rule.
|
|
119
|
+
*
|
|
120
|
+
* @param message - The error message.
|
|
121
|
+
* @returns The validation rule.
|
|
122
|
+
*/
|
|
123
|
+
export declare function isPort<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
124
|
+
/**
|
|
125
|
+
* The json validation rule.
|
|
126
|
+
*
|
|
127
|
+
* @param message - The error message.
|
|
128
|
+
* @returns The validation rule.
|
|
129
|
+
*/
|
|
130
|
+
export declare function isJson<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
131
|
+
/**
|
|
132
|
+
* The url validation rule.
|
|
133
|
+
*
|
|
134
|
+
* @param message - The error message.
|
|
135
|
+
* @returns The validation rule.
|
|
136
|
+
*/
|
|
137
|
+
export declare function isUrl<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
138
|
+
/**
|
|
139
|
+
* The uri validation rule.
|
|
140
|
+
*
|
|
141
|
+
* @param message - The error message.
|
|
142
|
+
* @returns The validation rule.
|
|
143
|
+
*/
|
|
144
|
+
export declare function isUri<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
145
|
+
/**
|
|
146
|
+
* The postal code validation rule.
|
|
147
|
+
*
|
|
148
|
+
* @param message - The error message.
|
|
149
|
+
* @returns The validation rule.
|
|
150
|
+
*/
|
|
151
|
+
export declare function isPostalCode<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
152
|
+
/**
|
|
153
|
+
* The date before validation rule.
|
|
154
|
+
*
|
|
155
|
+
* @param targetDate - The target date.
|
|
156
|
+
* @param message - The error message.
|
|
157
|
+
* @returns The validation rule.
|
|
158
|
+
*/
|
|
159
|
+
export declare function isDateBefore<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(targetDate?: string, message?: string): FormValidationRule<Values, Key, Scene>;
|
|
160
|
+
/**
|
|
161
|
+
* The date after validation rule.
|
|
162
|
+
*
|
|
163
|
+
* @param targetDate - The target date.
|
|
164
|
+
* @param message - The error message.
|
|
165
|
+
* @returns The validation rule.
|
|
166
|
+
*/
|
|
167
|
+
export declare function isDateAfter<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(targetDate?: string, message?: string): FormValidationRule<Values, Key, Scene>;
|
|
168
|
+
/**
|
|
169
|
+
* The chinese name validation rule.
|
|
170
|
+
*
|
|
171
|
+
* @param message - The error message.
|
|
172
|
+
* @returns The validation rule.
|
|
173
|
+
*/
|
|
174
|
+
export declare function isChineseName<Values extends ObjectType = ObjectValue, Key extends StringKey<Values> = StringKey<Values>, Scene extends FormScene = FormScene>(message?: string): FormValidationRule<Values, Key, Scene>;
|
|
175
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
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
|
+
/*! 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,9 @@
|
|
|
1
|
+
import type { AnyValue, ObjectType, ObjectValue } from "@vef-framework/shared";
|
|
2
|
+
import { type FC } from "react";
|
|
3
|
+
import type { FormScene, FormSchema } from "../vef-form";
|
|
4
|
+
import type { FormVirtualKeys } from "../vef-form/types";
|
|
5
|
+
import type { VefFormDrawerProps } from "./props";
|
|
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
|
+
declare const VefFormDrawer: typeof VefFormDrawerBase & Pick<FC, "displayName">;
|
|
8
|
+
export type { VefFormDrawerProps };
|
|
9
|
+
export default VefFormDrawer;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
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
|
+
/*! 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,17 @@
|
|
|
1
|
+
import type { AnyValue, Mapper, ObjectType, ObjectValue } from "@vef-framework/shared";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { Except } from "@vef-framework/shared";
|
|
4
|
+
import type { VefDrawerProps } from "../vef-drawer";
|
|
5
|
+
import type { FormScene, FormSchema, VefFormProps } from "../vef-form";
|
|
6
|
+
import type { FormVirtualKeys } from "../vef-form/types";
|
|
7
|
+
export interface VefFormDrawerProps<Values extends ObjectType = ObjectValue, Result = AnyValue, Scene extends FormScene = FormScene, Schema extends FormSchema<Values, Scene> = FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema> = FormVirtualKeys<Schema>> extends Except<VefFormProps<Values, Result, Scene, Schema, VirtualKeys>, "submissionButton" | "resetButton">, Except<VefDrawerProps, "showCancelButton" | "okButtonText" | "actions" | "onOk" | "children"> {
|
|
8
|
+
/**
|
|
9
|
+
* The text of the submission button.
|
|
10
|
+
* @default "提交"
|
|
11
|
+
*/
|
|
12
|
+
submissionButtonText?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The actions content of the form drawer.
|
|
15
|
+
*/
|
|
16
|
+
actions?: Mapper<readonly [ReactElement, ReactElement, ReactElement], ReactNode>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AnyValue, ObjectType, ObjectValue } from "@vef-framework/shared";
|
|
2
|
+
import { type FC } from "react";
|
|
3
|
+
import type { FormScene, FormSchema } from "../vef-form";
|
|
4
|
+
import type { FormVirtualKeys } from "../vef-form/types";
|
|
5
|
+
import type { VefFormModalProps } from "./props";
|
|
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
|
+
declare const VefFormModal: typeof VefFormModalBase & Pick<FC, "displayName">;
|
|
8
|
+
export type { VefFormModalProps };
|
|
9
|
+
export default VefFormModal;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
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
|
+
/*! 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,20 @@
|
|
|
1
|
+
import type { AnyValue, Mapper, ObjectType, ObjectValue } from "@vef-framework/shared";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { Except } from "@vef-framework/shared";
|
|
4
|
+
import type { FormSchema, VefFormProps } from "../vef-form";
|
|
5
|
+
import type { FormScene, FormVirtualKeys } from "../vef-form/types";
|
|
6
|
+
import type { VefModalProps } from "../vef-modal";
|
|
7
|
+
/**
|
|
8
|
+
* The props of the VefFormModal component.
|
|
9
|
+
*/
|
|
10
|
+
export interface VefFormModalProps<Values extends ObjectType = ObjectValue, Result = AnyValue, Scene extends FormScene = FormScene, Schema extends FormSchema<Values, Scene> = FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema> = FormVirtualKeys<Schema>> extends Except<VefFormProps<Values, Result, Scene, Schema, VirtualKeys>, "submissionButton" | "resetButton">, Except<VefModalProps, "showCancelButton" | "okButtonText" | "actions" | "onOk" | "children"> {
|
|
11
|
+
/**
|
|
12
|
+
* The text of the submission button.
|
|
13
|
+
* @default "提交"
|
|
14
|
+
*/
|
|
15
|
+
submissionButtonText?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The actions content of the form modal.
|
|
18
|
+
*/
|
|
19
|
+
actions?: Mapper<readonly [ReactElement, ReactElement, ReactElement], ReactNode>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
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
|
+
display: grid;
|
|
4
|
+
grid: auto-flow / repeat(${p}, minmax(0, 1fr));
|
|
5
|
+
|
|
6
|
+
> * {
|
|
7
|
+
grid-column: span ${p};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
${Array.from({length:p}).map(((r,n)=>`\n > .vef-grid-item-${n+1} {\n grid-column: span ${n+1};\n }\n `))}
|
|
11
|
+
|
|
12
|
+
${e.map((r=>`\n &.vef-container-${r} {\n ${Array.from({length:p}).map(((n,t)=>`\n > .vef-grid-item-${r}-${t+1} {\n grid-column: span ${t+1};\n }\n `))}\n }\n `))}
|
|
13
|
+
`,l=({baseWidth:n=240,gap:e,children:l})=>{const h=a((()=>({"vef-container-xs":{minWidth:0},"vef-container-sm":{minWidth:2*n},"vef-container-md":{minWidth:3*n},"vef-container-lg":{minWidth:4*n},"vef-container-xl":{minWidth:5*n},"vef-container-xxl":{minWidth:6*n}})),[n]),$=f(null),[g,u]=d(h,{width:2*n}),v=t(),[x,w]=a((()=>{if(o(e))return[v(e[0]),v(e[1])];if(e){const r=v(e);return[r,r]}return[0,0]}),[e,v]);c((()=>{u($.current)}),[$,u]);const W=i($),y=a((()=>(W?.width??2*n)>p*w?{gap:`${x}px ${w}px`}:{gap:`${x}px ${Math.floor((W?.width??2*n)/p)}px`}),[W?.width,n,w,x]);return r("div",{ref:$,className:m(g),css:s,style:y,children:l})};export{l as default};
|
|
14
|
+
/*! 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,25 @@
|
|
|
1
|
+
import type { GapType, MaybeArray } from "@vef-framework/shared";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type VefGridItem from "../vef-grid-item";
|
|
4
|
+
/**
|
|
5
|
+
* The breakpoints for the grid.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BREAKPOINTS: readonly ["xs", "sm", "md", "lg", "xl", "xxl"];
|
|
8
|
+
export type Breakpoint = (typeof BREAKPOINTS)[number];
|
|
9
|
+
/**
|
|
10
|
+
* The props for the VefGrid component.
|
|
11
|
+
*/
|
|
12
|
+
export interface VefGridProps {
|
|
13
|
+
/**
|
|
14
|
+
* The base width of the grid item.
|
|
15
|
+
*/
|
|
16
|
+
baseWidth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The gap of the grid item.
|
|
19
|
+
*/
|
|
20
|
+
gap?: GapType<number>;
|
|
21
|
+
/**
|
|
22
|
+
* The children of the component.
|
|
23
|
+
*/
|
|
24
|
+
children: MaybeArray<ReactElement<typeof VefGridItem>>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
2
|
+
const x=["xs","sm","md","lg","xl","xxl"];export{x as BREAKPOINTS};
|
|
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
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
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
|
+
/*! 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,34 @@
|
|
|
1
|
+
import type { ChildrenProps } from "@vef-framework/shared";
|
|
2
|
+
/**
|
|
3
|
+
* The props for the VefGridItem component.
|
|
4
|
+
*/
|
|
5
|
+
export interface VefGridItemProps extends ChildrenProps {
|
|
6
|
+
/**
|
|
7
|
+
* The span of the grid item.
|
|
8
|
+
*/
|
|
9
|
+
span?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The span of the grid item on extra small screen size.
|
|
12
|
+
*/
|
|
13
|
+
xs?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The span of the grid item on small screen size.
|
|
16
|
+
*/
|
|
17
|
+
sm?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The span of the grid item on medium screen size.
|
|
20
|
+
*/
|
|
21
|
+
md?: number;
|
|
22
|
+
/**
|
|
23
|
+
* The span of the grid item on large screen size.
|
|
24
|
+
*/
|
|
25
|
+
lg?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The span of the grid item on extra large screen size.
|
|
28
|
+
*/
|
|
29
|
+
xl?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The span of the grid item on extra extra large screen size.
|
|
32
|
+
*/
|
|
33
|
+
xxl?: number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { VefIconProps } from "./props";
|
|
2
|
+
declare const VefIcon: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<VefIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>>;
|
|
3
|
+
export type { VefIconProps };
|
|
4
|
+
export default VefIcon;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, 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};
|
|
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,12 @@
|
|
|
1
|
+
import type { IconComponentProps } from "@ant-design/icons/lib/components/Icon";
|
|
2
|
+
import type { Except } from "@vef-framework/shared";
|
|
3
|
+
import type { ReactElement } from "react";
|
|
4
|
+
/**
|
|
5
|
+
* The props of VefIcon component.
|
|
6
|
+
*/
|
|
7
|
+
export interface VefIconProps extends Except<IconComponentProps, "component" | "children"> {
|
|
8
|
+
/**
|
|
9
|
+
* The icon component.
|
|
10
|
+
*/
|
|
11
|
+
children: ReactElement;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GetRef, Input } from "antd";
|
|
2
|
+
import { type ForwardedRef, type RefObject } from "react";
|
|
3
|
+
import type { VefInputInstance } from "../props";
|
|
4
|
+
type InputRef = GetRef<typeof Input>;
|
|
5
|
+
/**
|
|
6
|
+
* The hook to get the instance of the VefInput component.
|
|
7
|
+
*
|
|
8
|
+
* @param ref - The forwarded ref.
|
|
9
|
+
* @returns The ref object.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useInputInstance(ref: ForwardedRef<VefInputInstance>): RefObject<InputRef>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, 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};
|
|
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 { VefInputInstance, VefInputProps } from "./props";
|
|
2
|
+
declare const VefInput: import("react").ForwardRefExoticComponent<VefInputProps & import("react").RefAttributes<VefInputInstance>>;
|
|
3
|
+
export type { VefInputInstance, VefInputProps };
|
|
4
|
+
export default VefInput;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
2
|
+
import{jsx as e}from"@emotion/react/jsx-runtime";import{Input as o}from"antd";import{isFunction as r}from"@vef-framework/shared";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:r(v)?e=>v(l(e.target.value)):void 0,onPressEnter:r(c)?e=>c(l(e.target.value)):void 0,onBlur:r(g)?e=>g(l(e.target.value)):void 0,onFocus:r(h)?e=>h(l(e.target.value)):void 0})),[v,c,g,h]),x=a(j);return e(o,{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
|
+
/*! 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,67 @@
|
|
|
1
|
+
import type { BasicSize, Consumer, Handler, MaybeNull } from "@vef-framework/shared";
|
|
2
|
+
import type { InputProps } from "antd";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
/**
|
|
5
|
+
* The instance of the VefInput component.
|
|
6
|
+
*/
|
|
7
|
+
export interface VefInputInstance {
|
|
8
|
+
/**
|
|
9
|
+
* The blur handler.
|
|
10
|
+
*/
|
|
11
|
+
blur: Handler;
|
|
12
|
+
/**
|
|
13
|
+
* The focus handler.
|
|
14
|
+
*/
|
|
15
|
+
focus: Handler;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The props of the VefInput component.
|
|
19
|
+
*/
|
|
20
|
+
export interface VefInputProps extends Pick<InputProps, "className" | "style" | "placeholder" | "disabled" | "maxLength" | "prefix" | "suffix" | "status" | "variant" | "onClear"> {
|
|
21
|
+
/**
|
|
22
|
+
* The default value of the input.
|
|
23
|
+
*/
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The value of the input.
|
|
27
|
+
*/
|
|
28
|
+
value?: MaybeNull<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to allow clear.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
clearable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The size of the input.
|
|
36
|
+
*/
|
|
37
|
+
size?: BasicSize;
|
|
38
|
+
/**
|
|
39
|
+
* Whether to show the count of the input.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
showCount?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The prepend element of the input.
|
|
45
|
+
*/
|
|
46
|
+
prepend?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* The append element of the input.
|
|
49
|
+
*/
|
|
50
|
+
append?: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* The change handler.
|
|
53
|
+
*/
|
|
54
|
+
onChange?: Consumer<MaybeNull<string>>;
|
|
55
|
+
/**
|
|
56
|
+
* The enter key press handler.
|
|
57
|
+
*/
|
|
58
|
+
onEnterKeyPress?: Consumer<MaybeNull<string>>;
|
|
59
|
+
/**
|
|
60
|
+
* The blur handler.
|
|
61
|
+
*/
|
|
62
|
+
onBlur?: Consumer<MaybeNull<string>>;
|
|
63
|
+
/**
|
|
64
|
+
* The focus handler.
|
|
65
|
+
*/
|
|
66
|
+
onFocus?: Consumer<MaybeNull<string>>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GetRef, InputNumber } from "antd";
|
|
2
|
+
import { type ForwardedRef, type RefObject } from "react";
|
|
3
|
+
import type { VefInputNumberInstance } from "../props";
|
|
4
|
+
type InputNumberRef = GetRef<typeof InputNumber>;
|
|
5
|
+
/**
|
|
6
|
+
* The hook to get the instance of the VefInputNumber component.
|
|
7
|
+
*
|
|
8
|
+
* @param ref - The forwarded ref.
|
|
9
|
+
* @returns The ref object.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useInputNumberInstance(ref: ForwardedRef<VefInputNumberInstance>): RefObject<InputNumberRef>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, 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 useInputNumberInstance};
|
|
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 { VefInputNumberInstance, VefInputNumberProps } from "./props";
|
|
2
|
+
declare const VefInputNumber: import("react").ForwardRefExoticComponent<VefInputNumberProps & import("react").RefAttributes<VefInputNumberInstance>>;
|
|
3
|
+
export type { VefInputNumberInstance, VefInputNumberProps };
|
|
4
|
+
export default VefInputNumber;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
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
|
+
/*! 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 */
|