@tongfun/ui 0.0.1-alpha.1 → 0.0.1-alpha.2
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/.claude/settings.local.json +7 -0
- package/.hermes/plans/datapicker-object-mode.md +57 -0
- package/.hermes/plans/design-spec-fusion-5175-v2.md +146 -0
- package/.hermes/plans/design-spec-fusion-5175.md +88 -0
- package/.hermes/plans/file-upload-chip-redesign.md +66 -0
- package/.hermes/plans/form-image-upload-modelvalue-fix.md +38 -0
- package/.hermes/plans/form-layout-responsive-span-plan.md +137 -0
- package/.hermes/plans/global-audit-report.md +728 -0
- package/.hermes/plans/global-audit-report.v1.md +604 -0
- package/.hermes/plans/global-audit-report.v3.md +777 -0
- package/.hermes/plans/image-file-erp-redesign.md +173 -0
- package/.hermes/plans/location-picker-baidu-modal.md +173 -0
- package/.hermes/plans/new-document-3b-color-componentization-plan.md +155 -0
- package/.hermes/plans/new-document-form-layout-rebuild-plan.md +150 -0
- package/.hermes/plans/new-document-fullwidth-3col-plan.md +177 -0
- package/.hermes/plans/picker-quick-options-range-mode.md +143 -0
- package/.hermes/plans/region-picker-mock-contract.md +202 -0
- package/.hermes/plans/zero-div-component-contracts.md +466 -0
- package/README.md +110 -101
- package/components.json +19 -0
- package/docs/DEVELOPMENT.md +315 -0
- package/docs/PRD.md +170 -0
- package/docs/ai-api-layering.md +141 -0
- package/docs/anchor-component-plan.md +165 -0
- package/docs/components-analysis.md +2911 -0
- package/docs/demo-scan-report.md +142 -0
- package/docs/editable-table-research.md +8 -0
- package/docs/form-panorama-plan.md +141 -0
- package/docs/lowcode-agent-component-registry.sample.json +36364 -0
- package/docs/tf-form-table-modification-plan.md +503 -0
- package/docs/token-compliance-audit-report.md +542 -0
- package/env.d.ts +5 -0
- package/eslint.config.js +66 -0
- package/package.json +85 -110
- package/packages/ui/__tests__/package-exports.test.ts +23 -0
- package/packages/ui/components/affix/README.md +78 -0
- package/packages/ui/components/affix/__tests__/affix.test.ts +204 -0
- package/packages/ui/components/affix/index.ts +13 -0
- package/packages/ui/components/affix/src/affix.vue +216 -0
- package/packages/ui/components/affix/src/types.ts +47 -0
- package/packages/ui/components/affix/styles/affix.css +17 -0
- package/packages/ui/components/ai-overlay/README.md +180 -0
- package/packages/ui/components/ai-overlay/__tests__/ai-action-menu.test.ts +133 -0
- package/packages/ui/components/ai-overlay/__tests__/ai-overlay.test.ts +117 -0
- package/packages/ui/components/ai-overlay/index.ts +32 -0
- package/packages/ui/components/ai-overlay/src/ai-action-menu-types.ts +22 -0
- package/packages/ui/components/ai-overlay/src/ai-action-menu.vue +200 -0
- package/packages/ui/components/ai-overlay/src/ai-overlay.vue +329 -0
- package/packages/ui/components/ai-overlay/src/types.ts +84 -0
- package/packages/ui/components/ai-overlay/styles/ai-overlay.css +306 -0
- package/packages/ui/components/ai-state-flow/README.md +111 -0
- package/packages/ui/components/ai-state-flow/__tests__/ai-state-flow.test.ts +69 -0
- package/packages/ui/components/ai-state-flow/ai-state-flow.ts +16 -0
- package/packages/ui/components/ai-state-flow/ai-state-flow.vue +67 -0
- package/packages/ui/components/ai-state-flow/index.ts +24 -0
- package/packages/ui/components/ai-state-flow/styles/ai-state-flow.css +144 -0
- package/packages/ui/components/alert/README.md +83 -0
- package/packages/ui/components/alert/__tests__/alert.test.ts +155 -0
- package/packages/ui/components/alert/index.ts +13 -0
- package/packages/ui/components/alert/src/alert.ts +90 -0
- package/packages/ui/components/alert/src/alert.vue +87 -0
- package/packages/ui/components/alert/styles/alert.css +158 -0
- package/packages/ui/components/anchor/README.md +50 -0
- package/packages/ui/components/anchor/__tests__/anchor.test.ts +284 -0
- package/packages/ui/components/anchor/index.ts +13 -0
- package/packages/ui/components/anchor/src/anchor.vue +94 -0
- package/packages/ui/components/anchor/src/types.ts +55 -0
- package/packages/ui/components/anchor/src/use-anchor.ts +253 -0
- package/packages/ui/components/anchor/styles/anchor.css +90 -0
- package/packages/ui/components/avatar/README.md +118 -0
- package/packages/ui/components/avatar/__tests__/avatar.test.ts +83 -0
- package/packages/ui/components/avatar/index.ts +12 -0
- package/packages/ui/components/avatar/src/avatar.ts +62 -0
- package/packages/ui/components/avatar/src/avatar.vue +106 -0
- package/packages/ui/components/back-top/README.md +63 -0
- package/packages/ui/components/back-top/__tests__/back-top.test.ts +215 -0
- package/packages/ui/components/back-top/index.ts +13 -0
- package/packages/ui/components/back-top/src/back-top.ts +51 -0
- package/packages/ui/components/back-top/src/back-top.vue +104 -0
- package/packages/ui/components/back-top/styles/back-top.css +24 -0
- package/packages/ui/components/badge/README.md +71 -0
- package/packages/ui/components/badge/__tests__/badge.test.ts +142 -0
- package/packages/ui/components/badge/index.ts +13 -0
- package/packages/ui/components/badge/src/badge.ts +64 -0
- package/packages/ui/components/badge/src/badge.vue +76 -0
- package/packages/ui/components/badge/styles/badge.css +45 -0
- package/packages/ui/components/batch-action-button/README.md +68 -0
- package/packages/ui/components/batch-action-button/__tests__/batch-action-button.test.ts +30 -0
- package/packages/ui/components/batch-action-button/index.ts +11 -0
- package/packages/ui/components/batch-action-button/src/batch-action-button.vue +59 -0
- package/packages/ui/components/batch-action-button/src/types.ts +9 -0
- package/packages/ui/components/breadcrumb/README.md +115 -0
- package/packages/ui/components/breadcrumb/__tests__/breadcrumb.test.ts +168 -0
- package/packages/ui/components/breadcrumb/index.ts +13 -0
- package/packages/ui/components/breadcrumb/src/breadcrumb.ts +60 -0
- package/packages/ui/components/breadcrumb/src/breadcrumb.vue +86 -0
- package/packages/ui/components/business/document/action-header/index.ts +14 -0
- package/packages/ui/components/business/document/action-header/src/context.ts +10 -0
- package/packages/ui/components/business/document/action-header/src/document-action-header.vue +296 -0
- package/packages/ui/components/business/document/action-header/src/types.ts +100 -0
- package/packages/ui/components/business/document/ai-toolbar/index.ts +12 -0
- package/packages/ui/components/business/document/ai-toolbar/src/document-ai-toolbar.vue +72 -0
- package/packages/ui/components/business/document/form-page/index.ts +16 -0
- package/packages/ui/components/business/document/form-page/src/composables/use-document-ai-toolbar.ts +37 -0
- package/packages/ui/components/business/document/form-page/src/composables/use-document-layout-mode.ts +24 -0
- package/packages/ui/components/business/document/form-page/src/composables/use-document-recognition.ts +55 -0
- package/packages/ui/components/business/document/form-page/src/composables/use-document-save.ts +243 -0
- package/packages/ui/components/business/document/form-page/src/composables/use-document-sections.ts +234 -0
- package/packages/ui/components/business/document/form-page/src/context.ts +15 -0
- package/packages/ui/components/business/document/form-page/src/document-form-page.vue +251 -0
- package/packages/ui/components/business/document/form-page/src/document-section-card.vue +187 -0
- package/packages/ui/components/business/document/form-page/src/types.ts +245 -0
- package/packages/ui/components/business/document/form-page/styles/document-form-page.css +40 -0
- package/packages/ui/components/business/enum-select/index.ts +18 -0
- package/packages/ui/components/business/enum-select/src/enum-select.vue +171 -0
- package/packages/ui/components/business/enum-select/src/types.ts +33 -0
- package/packages/ui/components/button/README.md +155 -0
- package/packages/ui/components/button/__tests__/button.test.ts +261 -0
- package/packages/ui/components/button/index.ts +14 -0
- package/packages/ui/components/button/src/button.ts +168 -0
- package/packages/ui/components/button/src/button.vue +341 -0
- package/packages/ui/components/button/styles/button.css +149 -0
- package/packages/ui/components/carousel/README.md +48 -0
- package/packages/ui/components/carousel/__tests__/carousel.test.ts +82 -0
- package/packages/ui/components/carousel/index.ts +11 -0
- package/packages/ui/components/carousel/src/carousel.ts +38 -0
- package/packages/ui/components/carousel/src/carousel.vue +101 -0
- package/packages/ui/components/carousel/styles/carousel.css +40 -0
- package/packages/ui/components/chart/README.md +120 -0
- package/packages/ui/components/chart/__tests__/chart.test.ts +86 -0
- package/packages/ui/components/chart/__tests__/simple-charts.test.ts +130 -0
- package/packages/ui/components/chart/index.ts +22 -0
- package/packages/ui/components/chart/src/bar-chart.vue +83 -0
- package/packages/ui/components/chart/src/chart.ts +135 -0
- package/packages/ui/components/chart/src/chart.vue +147 -0
- package/packages/ui/components/chart/src/donut-chart.vue +96 -0
- package/packages/ui/components/chart/src/line-chart.vue +101 -0
- package/packages/ui/components/chart/src/metric-grid.vue +55 -0
- package/packages/ui/components/chart/src/types.ts +91 -0
- package/packages/ui/components/chart/src/utils.ts +68 -0
- package/packages/ui/components/chart/styles/bar-chart.css +134 -0
- package/packages/ui/components/chart/styles/chart.css +48 -0
- package/packages/ui/components/chart/styles/donut-chart.css +114 -0
- package/packages/ui/components/chart/styles/line-chart.css +61 -0
- package/packages/ui/components/chart/styles/metric-grid.css +115 -0
- package/packages/ui/components/code-block/README.md +56 -0
- package/packages/ui/components/code-block/__tests__/code-block.test.ts +166 -0
- package/packages/ui/components/code-block/index.ts +13 -0
- package/packages/ui/components/code-block/src/code-block.vue +216 -0
- package/packages/ui/components/code-block/src/types.ts +31 -0
- package/packages/ui/components/code-block/styles/code-block.css +192 -0
- package/packages/ui/components/data-grid/CellRendererActions.vue +77 -0
- package/packages/ui/components/data-grid/CellRendererButton.vue +51 -0
- package/packages/ui/components/data-grid/CellRendererCsCheckbox.vue +16 -0
- package/packages/ui/components/data-grid/CellRendererCsInput.vue +29 -0
- package/packages/ui/components/data-grid/CellRendererCsSelect.vue +19 -0
- package/packages/ui/components/data-grid/CellRendererInput.vue +120 -0
- package/packages/ui/components/data-grid/CellRendererText.vue +94 -0
- package/packages/ui/components/data-grid/ColumnSettings.vue +40 -0
- package/packages/ui/components/data-grid/ColumnSettingsDialog.vue +367 -0
- package/packages/ui/components/data-grid/DataGrid.vue +850 -0
- package/packages/ui/components/data-grid/DataGridFilter.vue +242 -0
- package/packages/ui/components/data-grid/column-settings-api.ts +62 -0
- package/packages/ui/components/data-grid/index.ts +29 -0
- package/packages/ui/components/data-grid/props.ts +246 -0
- package/packages/ui/components/data-grid/variants.ts +26 -0
- package/packages/ui/components/divider/README.md +84 -0
- package/packages/ui/components/divider/__tests__/divider.test.ts +105 -0
- package/packages/ui/components/divider/index.ts +13 -0
- package/packages/ui/components/divider/src/divider.ts +50 -0
- package/packages/ui/components/divider/src/divider.vue +76 -0
- package/packages/ui/components/divider/styles/divider.css +65 -0
- package/packages/ui/components/drawer/README.md +90 -0
- package/packages/ui/components/drawer/__tests__/drawer.test.ts +218 -0
- package/packages/ui/components/drawer/index.ts +13 -0
- package/packages/ui/components/drawer/src/drawer.ts +88 -0
- package/packages/ui/components/drawer/src/drawer.vue +157 -0
- package/packages/ui/components/drawer/styles/drawer.css +164 -0
- package/packages/ui/components/dropdown/README.md +51 -0
- package/packages/ui/components/dropdown/__tests__/dropdown.test.ts +143 -0
- package/packages/ui/components/dropdown/index.ts +11 -0
- package/packages/ui/components/dropdown/src/dropdown.ts +47 -0
- package/packages/ui/components/dropdown/src/dropdown.vue +75 -0
- package/packages/ui/components/dropdown/styles/dropdown.css +16 -0
- package/packages/ui/components/dropdown-button/README.md +78 -0
- package/packages/ui/components/dropdown-button/__tests__/dropdown-button.test.ts +75 -0
- package/packages/ui/components/dropdown-button/index.ts +11 -0
- package/packages/ui/components/dropdown-button/src/dropdown-button-menu-items.vue +79 -0
- package/packages/ui/components/dropdown-button/src/dropdown-button.vue +152 -0
- package/packages/ui/components/dropdown-button/src/types.ts +98 -0
- package/packages/ui/components/dropdown-button/styles/dropdown-button.css +171 -0
- package/packages/ui/components/empty/README.md +48 -0
- package/packages/ui/components/empty/__tests__/empty.test.ts +37 -0
- package/packages/ui/components/empty/index.ts +13 -0
- package/packages/ui/components/empty/src/empty.vue +73 -0
- package/packages/ui/components/empty/src/types.ts +32 -0
- package/packages/ui/components/empty/styles/empty.css +69 -0
- package/packages/ui/components/error/README.md +44 -0
- package/packages/ui/components/error/__tests__/error.test.ts +34 -0
- package/packages/ui/components/error/index.ts +13 -0
- package/packages/ui/components/error/src/error.vue +65 -0
- package/packages/ui/components/error/src/types.ts +28 -0
- package/packages/ui/components/error/styles/error.css +69 -0
- package/packages/ui/components/filter-button/README.md +68 -0
- package/packages/ui/components/filter-button/__tests__/filter-button.test.ts +30 -0
- package/packages/ui/components/filter-button/index.ts +11 -0
- package/packages/ui/components/filter-button/src/filter-button.vue +59 -0
- package/packages/ui/components/filter-button/src/types.ts +9 -0
- package/packages/ui/components/form/README.md +750 -0
- package/packages/ui/components/form/__tests__/form-ai-registry-integration.test.ts +214 -0
- package/packages/ui/components/form/__tests__/form-field.test.ts +377 -0
- package/packages/ui/components/form/__tests__/form-item-ai-actions.test.ts +299 -0
- package/packages/ui/components/form/__tests__/form-item.test.ts +110 -0
- package/packages/ui/components/form/__tests__/form-wrapper-reject-forward.test.ts +269 -0
- package/packages/ui/components/form/__tests__/form.test.ts +148 -0
- package/packages/ui/components/form/base/cascader/README.md +75 -0
- package/packages/ui/components/form/base/cascader/__tests__/ai-capability.test.ts +507 -0
- package/packages/ui/components/form/base/cascader/__tests__/cascader.test.ts +203 -0
- package/packages/ui/components/form/base/cascader/index.ts +14 -0
- package/packages/ui/components/form/base/cascader/src/cascader.vue +505 -0
- package/packages/ui/components/form/base/cascader/src/types.ts +168 -0
- package/packages/ui/components/form/base/cascader/styles/cascader.css +186 -0
- package/packages/ui/components/form/base/checkbox/README.md +110 -0
- package/packages/ui/components/form/base/checkbox/__tests__/ai-capability.test.ts +465 -0
- package/packages/ui/components/form/base/checkbox/__tests__/checkbox.test.ts +98 -0
- package/packages/ui/components/form/base/checkbox/__tests__/group-integration.test.ts +192 -0
- package/packages/ui/components/form/base/checkbox/index.ts +18 -0
- package/packages/ui/components/form/base/checkbox/src/checkbox-group.vue +311 -0
- package/packages/ui/components/form/base/checkbox/src/checkbox.ts +210 -0
- package/packages/ui/components/form/base/checkbox/src/checkbox.vue +368 -0
- package/packages/ui/components/form/base/checkbox/styles/checkbox.css +24 -0
- package/packages/ui/components/form/base/data-picker/README.md +192 -0
- package/packages/ui/components/form/base/data-picker/__tests__/ai-capability.test.ts +566 -0
- package/packages/ui/components/form/base/data-picker/__tests__/data-picker.test.ts +628 -0
- package/packages/ui/components/form/base/data-picker/index.ts +23 -0
- package/packages/ui/components/form/base/data-picker/src/data-picker.ts +192 -0
- package/packages/ui/components/form/base/data-picker/src/data-picker.vue +1267 -0
- package/packages/ui/components/form/base/data-picker/styles/data-picker.css +174 -0
- package/packages/ui/components/form/base/date-picker/README.md +94 -0
- package/packages/ui/components/form/base/date-picker/__tests__/ai-capability.test.ts +462 -0
- package/packages/ui/components/form/base/date-picker/__tests__/date-picker.test.ts +115 -0
- package/packages/ui/components/form/base/date-picker/index.ts +13 -0
- package/packages/ui/components/form/base/date-picker/src/date-picker.ts +212 -0
- package/packages/ui/components/form/base/date-picker/src/date-picker.vue +871 -0
- package/packages/ui/components/form/base/date-picker/styles/date-picker.css +210 -0
- package/packages/ui/components/form/base/datetime-picker/README.md +197 -0
- package/packages/ui/components/form/base/datetime-picker/__tests__/ai-capability.test.ts +368 -0
- package/packages/ui/components/form/base/datetime-picker/__tests__/datetime-picker.test.ts +445 -0
- package/packages/ui/components/form/base/datetime-picker/index.ts +13 -0
- package/packages/ui/components/form/base/datetime-picker/src/datetime-picker.ts +149 -0
- package/packages/ui/components/form/base/datetime-picker/src/datetime-picker.vue +1158 -0
- package/packages/ui/components/form/base/datetime-picker/styles/datetime-picker.css +570 -0
- package/packages/ui/components/form/base/file-upload/README.md +73 -0
- package/packages/ui/components/form/base/file-upload/__tests__/ai-capability.test.ts +223 -0
- package/packages/ui/components/form/base/file-upload/__tests__/file-upload.spec.ts +199 -0
- package/packages/ui/components/form/base/file-upload/index.ts +11 -0
- package/packages/ui/components/form/base/file-upload/src/file-upload.ts +95 -0
- package/packages/ui/components/form/base/file-upload/src/file-upload.vue +451 -0
- package/packages/ui/components/form/base/file-upload/styles/file-upload.css +57 -0
- package/packages/ui/components/form/base/image-upload/README.md +70 -0
- package/packages/ui/components/form/base/image-upload/__tests__/ai-capability.test.ts +149 -0
- package/packages/ui/components/form/base/image-upload/__tests__/image-upload.spec.ts +282 -0
- package/packages/ui/components/form/base/image-upload/index.ts +11 -0
- package/packages/ui/components/form/base/image-upload/src/image-upload.ts +76 -0
- package/packages/ui/components/form/base/image-upload/src/image-upload.vue +657 -0
- package/packages/ui/components/form/base/index.ts +24 -0
- package/packages/ui/components/form/base/input/README.md +63 -0
- package/packages/ui/components/form/base/input/__tests__/ai-capability.test.ts +143 -0
- package/packages/ui/components/form/base/input/__tests__/input.test.ts +195 -0
- package/packages/ui/components/form/base/input/index.ts +37 -0
- package/packages/ui/components/form/base/input/src/input.ts +104 -0
- package/packages/ui/components/form/base/input/src/input.vue +384 -0
- package/packages/ui/components/form/base/input/styles/input.css +198 -0
- package/packages/ui/components/form/base/location-picker/README.md +92 -0
- package/packages/ui/components/form/base/location-picker/__tests__/ai-capability.test.ts +147 -0
- package/packages/ui/components/form/base/location-picker/__tests__/location-picker.test.ts +161 -0
- package/packages/ui/components/form/base/location-picker/index.ts +13 -0
- package/packages/ui/components/form/base/location-picker/src/location-picker.ts +99 -0
- package/packages/ui/components/form/base/location-picker/src/location-picker.vue +558 -0
- package/packages/ui/components/form/base/radio/README.md +95 -0
- package/packages/ui/components/form/base/radio/__tests__/ai-capability.test.ts +578 -0
- package/packages/ui/components/form/base/radio/__tests__/group-integration.test.ts +191 -0
- package/packages/ui/components/form/base/radio/__tests__/radio.test.ts +64 -0
- package/packages/ui/components/form/base/radio/index.ts +18 -0
- package/packages/ui/components/form/base/radio/src/radio-group.vue +270 -0
- package/packages/ui/components/form/base/radio/src/radio.ts +154 -0
- package/packages/ui/components/form/base/radio/src/radio.vue +141 -0
- package/packages/ui/components/form/base/radio/styles/radio.css +12 -0
- package/packages/ui/components/form/base/region-picker/README.md +166 -0
- package/packages/ui/components/form/base/region-picker/__tests__/ai-capability.test.ts +147 -0
- package/packages/ui/components/form/base/region-picker/__tests__/region-picker.spec.ts +556 -0
- package/packages/ui/components/form/base/region-picker/index.ts +19 -0
- package/packages/ui/components/form/base/region-picker/src/region-picker.ts +333 -0
- package/packages/ui/components/form/base/region-picker/src/region-picker.vue +552 -0
- package/packages/ui/components/form/base/select/README.md +66 -0
- package/packages/ui/components/form/base/select/__tests__/ai-capability.test.ts +463 -0
- package/packages/ui/components/form/base/select/__tests__/select.test.ts +167 -0
- package/packages/ui/components/form/base/select/index.ts +15 -0
- package/packages/ui/components/form/base/select/src/select.ts +173 -0
- package/packages/ui/components/form/base/select/src/select.vue +534 -0
- package/packages/ui/components/form/base/select/styles/select.css +206 -0
- package/packages/ui/components/form/base/signature/README.md +96 -0
- package/packages/ui/components/form/base/signature/__tests__/ai-capability.test.ts +147 -0
- package/packages/ui/components/form/base/signature/__tests__/signature.spec.ts +156 -0
- package/packages/ui/components/form/base/signature/index.ts +14 -0
- package/packages/ui/components/form/base/signature/src/signature.ts +100 -0
- package/packages/ui/components/form/base/signature/src/signature.vue +871 -0
- package/packages/ui/components/form/base/switch/README.md +102 -0
- package/packages/ui/components/form/base/switch/__tests__/ai-capability.test.ts +545 -0
- package/packages/ui/components/form/base/switch/__tests__/switch.test.ts +105 -0
- package/packages/ui/components/form/base/switch/index.ts +12 -0
- package/packages/ui/components/form/base/switch/src/switch.ts +133 -0
- package/packages/ui/components/form/base/switch/src/switch.vue +385 -0
- package/packages/ui/components/form/base/switch/styles/switch.css +35 -0
- package/packages/ui/components/form/base/text-area/README.md +89 -0
- package/packages/ui/components/form/base/text-area/__tests__/ai-capability.test.ts +176 -0
- package/packages/ui/components/form/base/text-area/__tests__/text-area.test.ts +152 -0
- package/packages/ui/components/form/base/text-area/index.ts +37 -0
- package/packages/ui/components/form/base/text-area/src/text-area.ts +137 -0
- package/packages/ui/components/form/base/text-area/src/text-area.vue +405 -0
- package/packages/ui/components/form/base/text-area/styles/text-area.css +137 -0
- package/packages/ui/components/form/base/time-picker/README.md +75 -0
- package/packages/ui/components/form/base/time-picker/__tests__/ai-capability.test.ts +135 -0
- package/packages/ui/components/form/base/time-picker/__tests__/time-picker.test.ts +258 -0
- package/packages/ui/components/form/base/time-picker/index.ts +13 -0
- package/packages/ui/components/form/base/time-picker/src/time-picker.ts +141 -0
- package/packages/ui/components/form/base/time-picker/src/time-picker.vue +844 -0
- package/packages/ui/components/form/base/time-picker/styles/time-picker.css +124 -0
- package/packages/ui/components/form/base/upload/README.md +126 -0
- package/packages/ui/components/form/base/upload/__tests__/ai-capability.test.ts +145 -0
- package/packages/ui/components/form/base/upload/__tests__/upload.spec.ts +288 -0
- package/packages/ui/components/form/base/upload/index.ts +11 -0
- package/packages/ui/components/form/base/upload/src/upload.ts +171 -0
- package/packages/ui/components/form/base/upload/src/upload.vue +890 -0
- package/packages/ui/components/form/base/upload/styles/upload.css +116 -0
- package/packages/ui/components/form/index.ts +138 -0
- package/packages/ui/components/form/items/form-array/README.md +61 -0
- package/packages/ui/components/form/items/form-array/__tests__/form-array.test.ts +122 -0
- package/packages/ui/components/form/items/form-array/index.ts +2 -0
- package/packages/ui/components/form/items/form-array/src/form-array.vue +80 -0
- package/packages/ui/components/form/items/form-array/src/types.ts +27 -0
- package/packages/ui/components/form/items/form-array/styles/form-array.css +99 -0
- package/packages/ui/components/form/items/form-cascader/README.md +132 -0
- package/packages/ui/components/form/items/form-cascader/__tests__/form-cascader.test.ts +99 -0
- package/packages/ui/components/form/items/form-cascader/index.ts +1 -0
- package/packages/ui/components/form/items/form-cascader/src/form-cascader.ts +7 -0
- package/packages/ui/components/form/items/form-cascader/src/form-cascader.vue +15 -0
- package/packages/ui/components/form/items/form-checkbox/README.md +121 -0
- package/packages/ui/components/form/items/form-checkbox/__tests__/form-checkbox.test.ts +93 -0
- package/packages/ui/components/form/items/form-checkbox/index.ts +1 -0
- package/packages/ui/components/form/items/form-checkbox/src/form-checkbox.ts +7 -0
- package/packages/ui/components/form/items/form-checkbox/src/form-checkbox.vue +15 -0
- package/packages/ui/components/form/items/form-data-picker/README.md +111 -0
- package/packages/ui/components/form/items/form-data-picker/__tests__/form-data-picker.test.ts +98 -0
- package/packages/ui/components/form/items/form-data-picker/index.ts +1 -0
- package/packages/ui/components/form/items/form-data-picker/src/form-data-picker.ts +7 -0
- package/packages/ui/components/form/items/form-data-picker/src/form-data-picker.vue +17 -0
- package/packages/ui/components/form/items/form-date-picker/README.md +119 -0
- package/packages/ui/components/form/items/form-date-picker/__tests__/form-date-picker.test.ts +104 -0
- package/packages/ui/components/form/items/form-date-picker/index.ts +1 -0
- package/packages/ui/components/form/items/form-date-picker/src/form-date-picker.ts +7 -0
- package/packages/ui/components/form/items/form-date-picker/src/form-date-picker.vue +17 -0
- package/packages/ui/components/form/items/form-datetime-picker/README.md +112 -0
- package/packages/ui/components/form/items/form-datetime-picker/__tests__/form-datetime-picker.test.ts +105 -0
- package/packages/ui/components/form/items/form-datetime-picker/index.ts +1 -0
- package/packages/ui/components/form/items/form-datetime-picker/src/form-datetime-picker.ts +7 -0
- package/packages/ui/components/form/items/form-datetime-picker/src/form-datetime-picker.vue +17 -0
- package/packages/ui/components/form/items/form-dynamic/README.md +105 -0
- package/packages/ui/components/form/items/form-dynamic/__tests__/form-dynamic.test.ts +172 -0
- package/packages/ui/components/form/items/form-dynamic/index.ts +2 -0
- package/packages/ui/components/form/items/form-dynamic/src/form-dynamic.vue +222 -0
- package/packages/ui/components/form/items/form-dynamic/src/types.ts +63 -0
- package/packages/ui/components/form/items/form-file-upload/README.md +92 -0
- package/packages/ui/components/form/items/form-file-upload/__tests__/form-file-upload.test.ts +99 -0
- package/packages/ui/components/form/items/form-file-upload/index.ts +1 -0
- package/packages/ui/components/form/items/form-file-upload/src/form-file-upload.ts +7 -0
- package/packages/ui/components/form/items/form-file-upload/src/form-file-upload.vue +15 -0
- package/packages/ui/components/form/items/form-group/README.md +57 -0
- package/packages/ui/components/form/items/form-group/__tests__/form-group.test.ts +108 -0
- package/packages/ui/components/form/items/form-group/index.ts +2 -0
- package/packages/ui/components/form/items/form-group/src/form-group.vue +85 -0
- package/packages/ui/components/form/items/form-group/src/types.ts +37 -0
- package/packages/ui/components/form/items/form-group/styles/form-group.css +92 -0
- package/packages/ui/components/form/items/form-image-upload/README.md +92 -0
- package/packages/ui/components/form/items/form-image-upload/__tests__/form-image-upload.test.ts +109 -0
- package/packages/ui/components/form/items/form-image-upload/index.ts +1 -0
- package/packages/ui/components/form/items/form-image-upload/src/form-image-upload.ts +7 -0
- package/packages/ui/components/form/items/form-image-upload/src/form-image-upload.vue +37 -0
- package/packages/ui/components/form/items/form-input/README.md +110 -0
- package/packages/ui/components/form/items/form-input/__tests__/form-input.test.ts +87 -0
- package/packages/ui/components/form/items/form-input/index.ts +1 -0
- package/packages/ui/components/form/items/form-input/src/form-input.ts +7 -0
- package/packages/ui/components/form/items/form-input/src/form-input.vue +15 -0
- package/packages/ui/components/form/items/form-location-picker/README.md +119 -0
- package/packages/ui/components/form/items/form-location-picker/__tests__/form-location-picker.test.ts +98 -0
- package/packages/ui/components/form/items/form-location-picker/index.ts +1 -0
- package/packages/ui/components/form/items/form-location-picker/src/form-location-picker.ts +7 -0
- package/packages/ui/components/form/items/form-location-picker/src/form-location-picker.vue +15 -0
- package/packages/ui/components/form/items/form-radio/README.md +125 -0
- package/packages/ui/components/form/items/form-radio/__tests__/form-radio.test.ts +104 -0
- package/packages/ui/components/form/items/form-radio/index.ts +1 -0
- package/packages/ui/components/form/items/form-radio/src/form-radio.ts +7 -0
- package/packages/ui/components/form/items/form-radio/src/form-radio.vue +15 -0
- package/packages/ui/components/form/items/form-region-picker/README.md +111 -0
- package/packages/ui/components/form/items/form-region-picker/__tests__/form-region-picker.test.ts +95 -0
- package/packages/ui/components/form/items/form-region-picker/index.ts +1 -0
- package/packages/ui/components/form/items/form-region-picker/src/form-region-picker.ts +7 -0
- package/packages/ui/components/form/items/form-region-picker/src/form-region-picker.vue +15 -0
- package/packages/ui/components/form/items/form-select/README.md +117 -0
- package/packages/ui/components/form/items/form-select/__tests__/form-select.test.ts +80 -0
- package/packages/ui/components/form/items/form-select/index.ts +1 -0
- package/packages/ui/components/form/items/form-select/src/form-select.ts +7 -0
- package/packages/ui/components/form/items/form-select/src/form-select.vue +15 -0
- package/packages/ui/components/form/items/form-signature/README.md +89 -0
- package/packages/ui/components/form/items/form-signature/__tests__/form-signature.test.ts +109 -0
- package/packages/ui/components/form/items/form-signature/index.ts +1 -0
- package/packages/ui/components/form/items/form-signature/src/form-signature.ts +7 -0
- package/packages/ui/components/form/items/form-signature/src/form-signature.vue +15 -0
- package/packages/ui/components/form/items/form-slider/README.md +125 -0
- package/packages/ui/components/form/items/form-slider/__tests__/form-slider.test.ts +95 -0
- package/packages/ui/components/form/items/form-slider/index.ts +1 -0
- package/packages/ui/components/form/items/form-slider/src/form-slider.ts +7 -0
- package/packages/ui/components/form/items/form-slider/src/form-slider.vue +15 -0
- package/packages/ui/components/form/items/form-subform/README.md +71 -0
- package/packages/ui/components/form/items/form-subform/__tests__/form-subform.test.ts +116 -0
- package/packages/ui/components/form/items/form-subform/index.ts +2 -0
- package/packages/ui/components/form/items/form-subform/src/form-subform.vue +92 -0
- package/packages/ui/components/form/items/form-subform/src/types.ts +32 -0
- package/packages/ui/components/form/items/form-subform/styles/form-subform.css +127 -0
- package/packages/ui/components/form/items/form-switch/README.md +118 -0
- package/packages/ui/components/form/items/form-switch/__tests__/form-switch.test.ts +88 -0
- package/packages/ui/components/form/items/form-switch/index.ts +1 -0
- package/packages/ui/components/form/items/form-switch/src/form-switch.ts +7 -0
- package/packages/ui/components/form/items/form-switch/src/form-switch.vue +15 -0
- package/packages/ui/components/form/items/form-table/OPTIMIZATION_REPORT.md +205 -0
- package/packages/ui/components/form/items/form-table/README.md +144 -0
- package/packages/ui/components/form/items/form-table/__tests__/form-table.test.ts +373 -0
- package/packages/ui/components/form/items/form-table/index.ts +3 -0
- package/packages/ui/components/form/items/form-table/src/column-filter-popover.vue +149 -0
- package/packages/ui/components/form/items/form-table/src/form-table.vue +1315 -0
- package/packages/ui/components/form/items/form-table/src/types.ts +165 -0
- package/packages/ui/components/form/items/form-table/styles/column-filter-popover.css +138 -0
- package/packages/ui/components/form/items/form-table/styles/form-table.css +393 -0
- package/packages/ui/components/form/items/form-textarea/README.md +123 -0
- package/packages/ui/components/form/items/form-textarea/__tests__/form-textarea.test.ts +93 -0
- package/packages/ui/components/form/items/form-textarea/index.ts +1 -0
- package/packages/ui/components/form/items/form-textarea/src/form-textarea.ts +7 -0
- package/packages/ui/components/form/items/form-textarea/src/form-textarea.vue +15 -0
- package/packages/ui/components/form/items/form-time-picker/README.md +117 -0
- package/packages/ui/components/form/items/form-time-picker/__tests__/form-time-picker.test.ts +105 -0
- package/packages/ui/components/form/items/form-time-picker/index.ts +1 -0
- package/packages/ui/components/form/items/form-time-picker/src/form-time-picker.ts +7 -0
- package/packages/ui/components/form/items/form-time-picker/src/form-time-picker.vue +17 -0
- package/packages/ui/components/form/items/form-upload/README.md +92 -0
- package/packages/ui/components/form/items/form-upload/__tests__/form-upload.test.ts +137 -0
- package/packages/ui/components/form/items/form-upload/index.ts +1 -0
- package/packages/ui/components/form/items/form-upload/src/form-upload.ts +7 -0
- package/packages/ui/components/form/items/form-upload/src/form-upload.vue +15 -0
- package/packages/ui/components/form/shared/types.ts +82 -0
- package/packages/ui/components/form/src/form-field.ts +96 -0
- package/packages/ui/components/form/src/form-field.vue +404 -0
- package/packages/ui/components/form/src/form-item.vue +646 -0
- package/packages/ui/components/form/src/form.ts +11 -0
- package/packages/ui/components/form/src/form.vue +156 -0
- package/packages/ui/components/form/src/types.ts +337 -0
- package/packages/ui/components/form/src/use-form-field.ts +190 -0
- package/packages/ui/components/form/styles/form-ai-actions.css +41 -0
- package/packages/ui/components/form/styles/form-field.css +123 -0
- package/packages/ui/components/form/styles/form-item-ai-status.css +212 -0
- package/packages/ui/components/form/styles/form-item.css +218 -0
- package/packages/ui/components/form/styles/form.css +132 -0
- package/packages/ui/components/form-ai-status/README.md +86 -0
- package/packages/ui/components/form-ai-status/__tests__/form-ai-status.test.ts +183 -0
- package/packages/ui/components/form-ai-status/index.ts +12 -0
- package/packages/ui/components/form-ai-status/src/form-ai-status.vue +254 -0
- package/packages/ui/components/form-ai-status/src/types.ts +36 -0
- package/packages/ui/components/form-ai-status/styles/form-ai-status.css +238 -0
- package/packages/ui/components/form-ai-toolbar/README.md +100 -0
- package/packages/ui/components/form-ai-toolbar/__tests__/form-ai-toolbar.test.ts +344 -0
- package/packages/ui/components/form-ai-toolbar/index.ts +13 -0
- package/packages/ui/components/form-ai-toolbar/src/form-ai-toolbar.vue +598 -0
- package/packages/ui/components/form-ai-toolbar/src/types.ts +130 -0
- package/packages/ui/components/form-ai-toolbar/styles/form-ai-toolbar.css +281 -0
- package/packages/ui/components/icon/README.md +137 -0
- package/packages/ui/components/icon/__tests__/icon.test.ts +125 -0
- package/packages/ui/components/icon/index.ts +13 -0
- package/packages/ui/components/icon/src/icon.ts +67 -0
- package/packages/ui/components/icon/src/icon.vue +69 -0
- package/packages/ui/components/icon/styles/icon.css +41 -0
- package/packages/ui/components/image-preview/README.md +90 -0
- package/packages/ui/components/image-preview/__tests__/image-preview.test.ts +183 -0
- package/packages/ui/components/image-preview/index.ts +13 -0
- package/packages/ui/components/image-preview/src/image-preview.vue +71 -0
- package/packages/ui/components/image-preview/src/index.ts +11 -0
- package/packages/ui/components/image-preview/src/preview-layer.vue +90 -0
- package/packages/ui/components/image-preview/src/types.ts +63 -0
- package/packages/ui/components/image-preview/styles/image-preview.css +39 -0
- package/packages/ui/components/layout/app-bar/README.md +59 -0
- package/packages/ui/components/layout/app-bar/__tests__/app-bar.test.ts +124 -0
- package/packages/ui/components/layout/app-bar/index.ts +13 -0
- package/packages/ui/components/layout/app-bar/src/app-bar.vue +106 -0
- package/packages/ui/components/layout/app-bar/src/types.ts +43 -0
- package/packages/ui/components/layout/app-bar/styles/app-bar.css +175 -0
- package/packages/ui/components/layout/card/README.md +90 -0
- package/packages/ui/components/layout/card/__tests__/card.test.ts +321 -0
- package/packages/ui/components/layout/card/index.ts +13 -0
- package/packages/ui/components/layout/card/src/card.vue +210 -0
- package/packages/ui/components/layout/card/src/types.ts +79 -0
- package/packages/ui/components/layout/card/styles/card.css +334 -0
- package/packages/ui/components/layout/container/README.md +29 -0
- package/packages/ui/components/layout/container/__tests__/container.test.ts +74 -0
- package/packages/ui/components/layout/container/index.ts +13 -0
- package/packages/ui/components/layout/container/src/container.vue +35 -0
- package/packages/ui/components/layout/container/src/types.ts +15 -0
- package/packages/ui/components/layout/container/styles/container.css +50 -0
- package/packages/ui/components/layout/detail-layout/README.md +30 -0
- package/packages/ui/components/layout/detail-layout/__tests__/detail-layout.test.ts +75 -0
- package/packages/ui/components/layout/detail-layout/index.ts +13 -0
- package/packages/ui/components/layout/detail-layout/src/detail-layout.vue +53 -0
- package/packages/ui/components/layout/detail-layout/src/types.ts +22 -0
- package/packages/ui/components/layout/detail-layout/styles/detail-layout.css +71 -0
- package/packages/ui/components/layout/form-layout/README.md +59 -0
- package/packages/ui/components/layout/form-layout/__tests__/form-layout.test.ts +140 -0
- package/packages/ui/components/layout/form-layout/index.ts +13 -0
- package/packages/ui/components/layout/form-layout/src/form-layout.vue +93 -0
- package/packages/ui/components/layout/form-layout/src/types.ts +64 -0
- package/packages/ui/components/layout/form-layout/styles/form-layout.css +98 -0
- package/packages/ui/components/layout/grid/README.md +41 -0
- package/packages/ui/components/layout/grid/__tests__/grid.test.ts +77 -0
- package/packages/ui/components/layout/grid/index.ts +13 -0
- package/packages/ui/components/layout/grid/src/grid.vue +79 -0
- package/packages/ui/components/layout/grid/src/types.ts +44 -0
- package/packages/ui/components/layout/grid/styles/grid.css +46 -0
- package/packages/ui/components/layout/hero/README.md +59 -0
- package/packages/ui/components/layout/hero/__tests__/hero.test.ts +112 -0
- package/packages/ui/components/layout/hero/index.ts +13 -0
- package/packages/ui/components/layout/hero/src/hero.vue +143 -0
- package/packages/ui/components/layout/hero/src/types.ts +44 -0
- package/packages/ui/components/layout/hero/styles/hero.css +129 -0
- package/packages/ui/components/layout/inline/README.md +30 -0
- package/packages/ui/components/layout/inline/__tests__/inline.test.ts +154 -0
- package/packages/ui/components/layout/inline/index.ts +13 -0
- package/packages/ui/components/layout/inline/src/inline.vue +99 -0
- package/packages/ui/components/layout/inline/src/types.ts +23 -0
- package/packages/ui/components/layout/inline/styles/inline.css +150 -0
- package/packages/ui/components/layout/master-detail/README.md +36 -0
- package/packages/ui/components/layout/master-detail/__tests__/master-detail.test.ts +104 -0
- package/packages/ui/components/layout/master-detail/index.ts +13 -0
- package/packages/ui/components/layout/master-detail/src/master-detail.vue +72 -0
- package/packages/ui/components/layout/master-detail/src/types.ts +28 -0
- package/packages/ui/components/layout/master-detail/styles/master-detail.css +82 -0
- package/packages/ui/components/layout/page/README.md +35 -0
- package/packages/ui/components/layout/page/__tests__/page.test.ts +136 -0
- package/packages/ui/components/layout/page/index.ts +13 -0
- package/packages/ui/components/layout/page/src/page.vue +85 -0
- package/packages/ui/components/layout/page/src/types.ts +39 -0
- package/packages/ui/components/layout/page/styles/page.css +177 -0
- package/packages/ui/components/layout/page-header/README.md +39 -0
- package/packages/ui/components/layout/page-header/__tests__/page-header.test.ts +198 -0
- package/packages/ui/components/layout/page-header/index.ts +13 -0
- package/packages/ui/components/layout/page-header/src/page-header.vue +133 -0
- package/packages/ui/components/layout/page-header/src/types.ts +56 -0
- package/packages/ui/components/layout/page-header/styles/page-header.css +155 -0
- package/packages/ui/components/layout/section/README.md +40 -0
- package/packages/ui/components/layout/section/__tests__/section.test.ts +121 -0
- package/packages/ui/components/layout/section/index.ts +13 -0
- package/packages/ui/components/layout/section/src/section.vue +79 -0
- package/packages/ui/components/layout/section/src/types.ts +28 -0
- package/packages/ui/components/layout/section/styles/section.css +103 -0
- package/packages/ui/components/layout/sidebar-layout/README.md +60 -0
- package/packages/ui/components/layout/sidebar-layout/__tests__/sidebar-layout.test.ts +220 -0
- package/packages/ui/components/layout/sidebar-layout/index.ts +13 -0
- package/packages/ui/components/layout/sidebar-layout/src/sidebar-layout.vue +113 -0
- package/packages/ui/components/layout/sidebar-layout/src/types.ts +54 -0
- package/packages/ui/components/layout/sidebar-layout/styles/sidebar-layout.css +211 -0
- package/packages/ui/components/layout/split/README.md +40 -0
- package/packages/ui/components/layout/split/__tests__/split.test.ts +99 -0
- package/packages/ui/components/layout/split/index.ts +13 -0
- package/packages/ui/components/layout/split/src/split.vue +65 -0
- package/packages/ui/components/layout/split/src/types.ts +49 -0
- package/packages/ui/components/layout/split/styles/split.css +40 -0
- package/packages/ui/components/layout/stack/README.md +29 -0
- package/packages/ui/components/layout/stack/__tests__/stack.test.ts +66 -0
- package/packages/ui/components/layout/stack/index.ts +13 -0
- package/packages/ui/components/layout/stack/src/stack.vue +31 -0
- package/packages/ui/components/layout/stack/src/types.ts +14 -0
- package/packages/ui/components/layout/stack/styles/stack.css +61 -0
- package/packages/ui/components/layout/state-container/README.md +45 -0
- package/packages/ui/components/layout/state-container/__tests__/state-container.test.ts +123 -0
- package/packages/ui/components/layout/state-container/index.ts +13 -0
- package/packages/ui/components/layout/state-container/src/state-container.vue +72 -0
- package/packages/ui/components/layout/state-container/src/types.ts +46 -0
- package/packages/ui/components/layout/state-container/styles/state-container.css +71 -0
- package/packages/ui/components/layout/toolbar/README.md +34 -0
- package/packages/ui/components/layout/toolbar/__tests__/toolbar.test.ts +90 -0
- package/packages/ui/components/layout/toolbar/index.ts +13 -0
- package/packages/ui/components/layout/toolbar/src/toolbar.vue +50 -0
- package/packages/ui/components/layout/toolbar/src/types.ts +19 -0
- package/packages/ui/components/layout/toolbar/styles/toolbar.css +80 -0
- package/packages/ui/components/loading/README.md +39 -0
- package/packages/ui/components/loading/__tests__/loading.test.ts +37 -0
- package/packages/ui/components/loading/index.ts +13 -0
- package/packages/ui/components/loading/src/loading.vue +59 -0
- package/packages/ui/components/loading/src/types.ts +27 -0
- package/packages/ui/components/loading/styles/loading.css +59 -0
- package/packages/ui/components/menu/README.md +51 -0
- package/packages/ui/components/menu/__tests__/menu.test.ts +80 -0
- package/packages/ui/components/menu/index.ts +11 -0
- package/packages/ui/components/menu/src/menu.ts +49 -0
- package/packages/ui/components/menu/src/menu.vue +103 -0
- package/packages/ui/components/menu/styles/menu.css +19 -0
- package/packages/ui/components/message/README.md +69 -0
- package/packages/ui/components/message/__tests__/message.test.ts +98 -0
- package/packages/ui/components/message/index.ts +13 -0
- package/packages/ui/components/message/src/message.ts +87 -0
- package/packages/ui/components/message/src/message.vue +88 -0
- package/packages/ui/components/message/styles/message.css +70 -0
- package/packages/ui/components/metric/README.md +63 -0
- package/packages/ui/components/metric/__tests__/metric.test.ts +166 -0
- package/packages/ui/components/metric/index.ts +13 -0
- package/packages/ui/components/metric/src/metric.vue +107 -0
- package/packages/ui/components/metric/src/types.ts +50 -0
- package/packages/ui/components/metric/styles/metric.css +233 -0
- package/packages/ui/components/modal/README.md +91 -0
- package/packages/ui/components/modal/__tests__/modal.test.ts +145 -0
- package/packages/ui/components/modal/index.ts +13 -0
- package/packages/ui/components/modal/src/modal.ts +153 -0
- package/packages/ui/components/modal/src/modal.vue +234 -0
- package/packages/ui/components/modal/styles/modal.css +104 -0
- package/packages/ui/components/more-action-button/README.md +68 -0
- package/packages/ui/components/more-action-button/__tests__/more-action-button.test.ts +30 -0
- package/packages/ui/components/more-action-button/index.ts +11 -0
- package/packages/ui/components/more-action-button/src/more-action-button.vue +59 -0
- package/packages/ui/components/more-action-button/src/types.ts +9 -0
- package/packages/ui/components/navigation/side-nav/README.md +59 -0
- package/packages/ui/components/navigation/side-nav/__tests__/side-nav.test.ts +105 -0
- package/packages/ui/components/navigation/side-nav/index.ts +13 -0
- package/packages/ui/components/navigation/side-nav/src/side-nav.vue +147 -0
- package/packages/ui/components/navigation/side-nav/src/types.ts +50 -0
- package/packages/ui/components/navigation/side-nav/styles/side-nav.css +171 -0
- package/packages/ui/components/notification/README.md +82 -0
- package/packages/ui/components/notification/__tests__/notification.test.ts +150 -0
- package/packages/ui/components/notification/index.ts +30 -0
- package/packages/ui/components/notification/src/notification.vue +114 -0
- package/packages/ui/components/notification/src/types.ts +67 -0
- package/packages/ui/components/notification/src/use-notification.ts +136 -0
- package/packages/ui/components/notification/styles/notification.css +4 -0
- package/packages/ui/components/pagination/README.md +82 -0
- package/packages/ui/components/pagination/__tests__/pagination.test.ts +210 -0
- package/packages/ui/components/pagination/index.ts +13 -0
- package/packages/ui/components/pagination/src/pagination.ts +86 -0
- package/packages/ui/components/pagination/src/pagination.vue +270 -0
- package/packages/ui/components/pagination/styles/pagination.css +143 -0
- package/packages/ui/components/progress/README.md +132 -0
- package/packages/ui/components/progress/__tests__/progress.test.ts +81 -0
- package/packages/ui/components/progress/index.ts +12 -0
- package/packages/ui/components/progress/src/progress.ts +80 -0
- package/packages/ui/components/progress/src/progress.vue +202 -0
- package/packages/ui/components/skeleton/README.md +71 -0
- package/packages/ui/components/skeleton/__tests__/skeleton.test.ts +138 -0
- package/packages/ui/components/skeleton/index.ts +13 -0
- package/packages/ui/components/skeleton/src/skeleton.ts +46 -0
- package/packages/ui/components/skeleton/src/skeleton.vue +67 -0
- package/packages/ui/components/skeleton/styles/skeleton.css +75 -0
- package/packages/ui/components/slider/README.md +87 -0
- package/packages/ui/components/slider/__tests__/ai-capability.test.ts +469 -0
- package/packages/ui/components/slider/__tests__/slider.test.ts +235 -0
- package/packages/ui/components/slider/index.ts +26 -0
- package/packages/ui/components/slider/src/slider.ts +192 -0
- package/packages/ui/components/slider/src/slider.vue +504 -0
- package/packages/ui/components/slider/src/use-slider.ts +399 -0
- package/packages/ui/components/slider/styles/slider.css +344 -0
- package/packages/ui/components/split-button/README.md +71 -0
- package/packages/ui/components/split-button/__tests__/split-button.test.ts +32 -0
- package/packages/ui/components/split-button/index.ts +11 -0
- package/packages/ui/components/split-button/src/split-button.vue +69 -0
- package/packages/ui/components/split-button/src/types.ts +34 -0
- package/packages/ui/components/split-button/styles/split-button.css +15 -0
- package/packages/ui/components/status-dot/README.md +42 -0
- package/packages/ui/components/status-dot/__tests__/status-dot.test.ts +53 -0
- package/packages/ui/components/status-dot/index.ts +13 -0
- package/packages/ui/components/status-dot/src/status-dot.vue +39 -0
- package/packages/ui/components/status-dot/src/types.ts +23 -0
- package/packages/ui/components/status-dot/styles/status-dot.css +65 -0
- package/packages/ui/components/steps/README.md +101 -0
- package/packages/ui/components/steps/__tests__/steps.test.ts +261 -0
- package/packages/ui/components/steps/index.ts +15 -0
- package/packages/ui/components/steps/src/step.vue +99 -0
- package/packages/ui/components/steps/src/steps.ts +93 -0
- package/packages/ui/components/steps/src/steps.vue +143 -0
- package/packages/ui/components/steps/styles/step.css +116 -0
- package/packages/ui/components/steps/styles/steps.css +200 -0
- package/packages/ui/components/table/README.md +81 -0
- package/packages/ui/components/table/__tests__/table.test.ts +162 -0
- package/packages/ui/components/table/index.ts +13 -0
- package/packages/ui/components/table/src/table.ts +195 -0
- package/packages/ui/components/table/src/table.vue +453 -0
- package/packages/ui/components/table/styles/table.css +88 -0
- package/packages/ui/components/tabs/README.md +88 -0
- package/packages/ui/components/tabs/__tests__/tabs.test.ts +161 -0
- package/packages/ui/components/tabs/index.ts +19 -0
- package/packages/ui/components/tabs/src/tab-pane.ts +18 -0
- package/packages/ui/components/tabs/src/tab-pane.vue +11 -0
- package/packages/ui/components/tabs/src/tabs-content.vue +58 -0
- package/packages/ui/components/tabs/src/tabs-list.vue +36 -0
- package/packages/ui/components/tabs/src/tabs-trigger.vue +70 -0
- package/packages/ui/components/tabs/src/tabs.ts +94 -0
- package/packages/ui/components/tabs/src/tabs.vue +101 -0
- package/packages/ui/components/tabs/src/types.ts +126 -0
- package/packages/ui/components/tabs/styles/tabs.css +239 -0
- package/packages/ui/components/tag/README.md +67 -0
- package/packages/ui/components/tag/__tests__/tag.test.ts +222 -0
- package/packages/ui/components/tag/index.ts +13 -0
- package/packages/ui/components/tag/src/tag.ts +87 -0
- package/packages/ui/components/tag/src/tag.vue +163 -0
- package/packages/ui/components/tag/styles/tag.css +47 -0
- package/packages/ui/components/timeline/README.md +80 -0
- package/packages/ui/components/timeline/__tests__/timeline.test.ts +78 -0
- package/packages/ui/components/timeline/index.ts +15 -0
- package/packages/ui/components/timeline/src/timeline-item.vue +38 -0
- package/packages/ui/components/timeline/src/timeline.ts +76 -0
- package/packages/ui/components/timeline/src/timeline.vue +30 -0
- package/packages/ui/components/timeline/styles/timeline-item.css +49 -0
- package/packages/ui/components/timeline/styles/timeline.css +43 -0
- package/packages/ui/components/tooltip/README.md +134 -0
- package/packages/ui/components/tooltip/__tests__/tooltip.test.ts +125 -0
- package/packages/ui/components/tooltip/index.ts +12 -0
- package/packages/ui/components/tooltip/src/tooltip.ts +66 -0
- package/packages/ui/components/tooltip/src/tooltip.vue +189 -0
- package/packages/ui/components/tree/README.md +54 -0
- package/packages/ui/components/tree/__tests__/tree.test.ts +80 -0
- package/packages/ui/components/tree/index.ts +11 -0
- package/packages/ui/components/tree/src/tree.ts +51 -0
- package/packages/ui/components/tree/src/tree.vue +242 -0
- package/packages/ui/components/tree/styles/tree.css +31 -0
- package/packages/ui/components/typography/README.md +120 -0
- package/packages/ui/components/typography/__tests__/typography.test.ts +164 -0
- package/packages/ui/components/typography/index.ts +13 -0
- package/packages/ui/components/typography/src/typography.ts +95 -0
- package/packages/ui/components/typography/src/typography.vue +94 -0
- package/packages/ui/components/typography/styles/typography.css +47 -0
- package/packages/ui/components/upload/README.md +103 -0
- package/packages/ui/components/upload/__tests__/upload.test.ts +181 -0
- package/packages/ui/components/upload/index.ts +11 -0
- package/packages/ui/components/upload/src/upload.ts +92 -0
- package/packages/ui/components/upload/src/upload.vue +382 -0
- package/packages/ui/components/upload/styles/upload.css +283 -0
- package/packages/ui/components/watermark/README.md +94 -0
- package/packages/ui/components/watermark/__tests__/watermark.test.ts +252 -0
- package/packages/ui/components/watermark/index.ts +13 -0
- package/packages/ui/components/watermark/src/index.ts +13 -0
- package/packages/ui/components/watermark/src/types.ts +86 -0
- package/packages/ui/components/watermark/src/use-watermark.ts +132 -0
- package/packages/ui/components/watermark/src/watermark.vue +181 -0
- package/packages/ui/components/watermark/styles/watermark.css +27 -0
- package/packages/ui/index.ts +338 -0
- package/packages/ui/lib/utils.ts +6 -0
- package/packages/ui/lowcode-agent/icons.ts +148 -0
- package/packages/ui/lowcode-agent/index.ts +26 -0
- package/packages/ui/lowcode-agent/registry.json +37004 -0
- package/packages/ui/lowcode-agent/types.ts +312 -0
- package/packages/ui/src/composables/__tests__/use-floating-popup.test.ts +275 -0
- package/packages/ui/src/composables/__tests__/use-form-ai-actions.test.ts +101 -0
- package/packages/ui/src/composables/__tests__/use-form-ai-registry.test.ts +92 -0
- package/packages/ui/src/composables/__tests__/use-form-ai.test.ts +116 -0
- package/packages/ui/src/composables/index.ts +10 -0
- package/packages/ui/src/composables/use-ai-state-machine.ts +142 -0
- package/packages/ui/src/composables/use-floating-popup.ts +237 -0
- package/packages/ui/src/composables/use-form-ai-registry.ts +198 -0
- package/packages/ui/src/composables/use-form-ai.ts +280 -0
- package/packages/ui/src/composables/useLightbox.ts +51 -0
- package/packages/ui/src/request/document.ts +53 -0
- package/packages/ui/src/request/enum.ts +18 -0
- package/packages/ui/src/request/index.ts +4 -0
- package/packages/ui/src/request/request.ts +200 -0
- package/packages/ui/src/request/types.ts +27 -0
- package/packages/ui/src/types/form-ai-registry.ts +70 -0
- package/packages/ui/src/types/form-ai.ts +84 -0
- package/packages/ui/src/utils/date-format.ts +60 -0
- package/packages/ui/styles/design-tokens.css +383 -0
- package/packages/ui/styles/tailwind.css +76 -0
- package/packages/ui/styles/tokens.css +7 -0
- package/playground/index.html +12 -0
- package/playground/postcss.config.cjs +5 -0
- package/playground/src/App.vue +3 -0
- package/playground/src/__tests__/__debug-input.test.ts +29 -0
- package/playground/src/__tests__/button-ai-confirm.test.ts +41 -0
- package/playground/src/__tests__/home-render.test.ts +87 -0
- package/playground/src/__tests__/icon-library.test.ts +107 -0
- package/playground/src/__tests__/input-ai-confirm.test.ts +113 -0
- package/playground/src/__tests__/textarea-ai-button.test.ts +87 -0
- package/playground/src/__tests__/textarea-wordlimit.test.ts +66 -0
- package/playground/src/chart-theme.ts +22 -0
- package/playground/src/components/AiStateFlow.vue +59 -0
- package/playground/src/components/ComponentShowcase.vue +180 -0
- package/playground/src/composables/useAiStateMachine.ts +111 -0
- package/playground/src/data/component-api.ts +187 -0
- package/playground/src/data/component-meta.ts +84 -0
- package/playground/src/layouts/DefaultLayout.vue +318 -0
- package/playground/src/main.ts +18 -0
- package/playground/src/router/index.ts +101 -0
- package/playground/src/views/AffixDemo.vue +133 -0
- package/playground/src/views/AiStateFlowDemo.vue +170 -0
- package/playground/src/views/AlertDemo.vue +554 -0
- package/playground/src/views/AnchorDemo.vue +150 -0
- package/playground/src/views/AppBarDemo.vue +722 -0
- package/playground/src/views/AvatarDemo.vue +266 -0
- package/playground/src/views/BackTopDemo.vue +71 -0
- package/playground/src/views/BadgeDemo.vue +109 -0
- package/playground/src/views/BatchActionButtonDemo.vue +65 -0
- package/playground/src/views/BreadcrumbDemo.vue +248 -0
- package/playground/src/views/ButtonDemo.vue +344 -0
- package/playground/src/views/CardDemo.vue +254 -0
- package/playground/src/views/CarouselDemo.vue +158 -0
- package/playground/src/views/CascaderDemo.vue +425 -0
- package/playground/src/views/ChartDemo.vue +232 -0
- package/playground/src/views/CheckboxDemo.vue +339 -0
- package/playground/src/views/DataGridDemo.vue +518 -0
- package/playground/src/views/DataPickerDemo.vue +240 -0
- package/playground/src/views/DatePickerDemo.vue +292 -0
- package/playground/src/views/DateTimePickerDemo.vue +208 -0
- package/playground/src/views/DesignSpecDemo.vue +1647 -0
- package/playground/src/views/DividerDemo.vue +77 -0
- package/playground/src/views/DocumentActionHeaderDemo.vue +113 -0
- package/playground/src/views/DocumentFormPageDemo.vue +200 -0
- package/playground/src/views/DrawerDemo.vue +166 -0
- package/playground/src/views/DropdownButtonDemo.vue +74 -0
- package/playground/src/views/DropdownDemo.vue +306 -0
- package/playground/src/views/EmptyDemo.vue +104 -0
- package/playground/src/views/ErrorDemo.vue +111 -0
- package/playground/src/views/FileUploadDemo.vue +241 -0
- package/playground/src/views/FilterButtonDemo.vue +65 -0
- package/playground/src/views/FormFieldAiDemo.vue +364 -0
- package/playground/src/views/FormFieldBasicDemo.vue +174 -0
- package/playground/src/views/FormFieldBusinessDemo.vue +245 -0
- package/playground/src/views/FormFieldDemo.vue +178 -0
- package/playground/src/views/FormFieldLayoutDemo.vue +183 -0
- package/playground/src/views/FormFieldValidationDemo.vue +163 -0
- package/playground/src/views/FormItemAiDemo.vue +371 -0
- package/playground/src/views/FormSelectDemo.vue +519 -0
- package/playground/src/views/FormUploadDemo.vue +536 -0
- package/playground/src/views/HeroDemo.vue +836 -0
- package/playground/src/views/Home.vue +213 -0
- package/playground/src/views/IconDemo.vue +186 -0
- package/playground/src/views/IconLibraryView.vue +370 -0
- package/playground/src/views/IconRenderTest.vue +86 -0
- package/playground/src/views/ImagePreviewDemo.vue +368 -0
- package/playground/src/views/ImageUploadDemo.vue +199 -0
- package/playground/src/views/InputDemo.vue +348 -0
- package/playground/src/views/LayoutDemo.vue +946 -0
- package/playground/src/views/LoadingDemo.vue +95 -0
- package/playground/src/views/LocationPickerDemo.vue +218 -0
- package/playground/src/views/MenuDemo.vue +283 -0
- package/playground/src/views/MessageDemo.vue +201 -0
- package/playground/src/views/MetricDemo.vue +535 -0
- package/playground/src/views/ModalDemo.vue +291 -0
- package/playground/src/views/MoreActionButtonDemo.vue +65 -0
- package/playground/src/views/NewDocumentDemo.vue +973 -0
- package/playground/src/views/NotificationDemo.vue +255 -0
- package/playground/src/views/PaginationDemo.vue +292 -0
- package/playground/src/views/ProgressDemo.vue +356 -0
- package/playground/src/views/RadioDemo.vue +414 -0
- package/playground/src/views/RegionPickerDemo.vue +249 -0
- package/playground/src/views/ScalingRulesDemo.vue +333 -0
- package/playground/src/views/SelectDemo.vue +453 -0
- package/playground/src/views/SideNavDemo.vue +769 -0
- package/playground/src/views/SignatureDemo.vue +205 -0
- package/playground/src/views/SkeletonDemo.vue +109 -0
- package/playground/src/views/SliderDemo.vue +312 -0
- package/playground/src/views/SplitButtonDemo.vue +65 -0
- package/playground/src/views/StatusDotDemo.vue +131 -0
- package/playground/src/views/StepsDemo.vue +587 -0
- package/playground/src/views/SwitchDemo.vue +442 -0
- package/playground/src/views/TableDemo.vue +438 -0
- package/playground/src/views/TabsDemo.vue +246 -0
- package/playground/src/views/TagDemo.vue +113 -0
- package/playground/src/views/TextAreaDemo.vue +317 -0
- package/playground/src/views/TimePickerDemo.vue +291 -0
- package/playground/src/views/TimelineDemo.vue +133 -0
- package/playground/src/views/TooltipDemo.vue +102 -0
- package/playground/src/views/TreeDemo.vue +521 -0
- package/playground/src/views/TypographyDemo.vue +175 -0
- package/playground/src/views/UploadDemo.vue +331 -0
- package/playground/src/views/WatermarkDemo.vue +112 -0
- package/playground/src/views/_mocks/new-document.mock.ts +506 -0
- package/playground/src/views/data/form-field-events-table.ts +243 -0
- package/playground/src/views/data/form-field-options.ts +77 -0
- package/playground/src/views/data/form-field-props-table.ts +227 -0
- package/playground/src/views/data/form-field-snippets.ts +149 -0
- package/playground/src/views/data/slider-snippets.ts +100 -0
- package/playground/src/views/inner/FormFieldEventsDoc.vue +147 -0
- package/playground/src/views/inner/FormFieldPropsDoc.vue +138 -0
- package/playground/vite.config.ts +25 -0
- package/pnpm-workspace.yaml +3 -0
- package/postcss.config.cjs +5 -0
- package/scripts/check-design-token-compliance.mjs +223 -0
- package/scripts/generate-package-dts.mjs +105 -0
- package/tsconfig.json +35 -0
- package/tsconfig.node.json +13 -0
- package/vite.config.ts +68 -0
- package/dist/Accordion.vue_vue_type_script_setup_true_lang--wy6blIE.js +0 -215
- package/dist/Accordion.vue_vue_type_script_setup_true_lang-BLeKfnsj.cjs +0 -1
- package/dist/Alert.vue_vue_type_script_setup_true_lang-D-jeM-WY.cjs +0 -1
- package/dist/Alert.vue_vue_type_script_setup_true_lang-TxBBGtUT.js +0 -84
- package/dist/AlertDialog.vue_vue_type_script_setup_true_lang-Bu2DzAMe.js +0 -154
- package/dist/AlertDialog.vue_vue_type_script_setup_true_lang-UYpaBI80.cjs +0 -1
- package/dist/AspectRatio.vue_vue_type_script_setup_true_lang-C1Vsh6aT.js +0 -53
- package/dist/AspectRatio.vue_vue_type_script_setup_true_lang-ClsMtGoF.cjs +0 -1
- package/dist/Avatar.vue_vue_type_script_setup_true_lang-BH6iM5tr.js +0 -73
- package/dist/Avatar.vue_vue_type_script_setup_true_lang-DO68pMXd.cjs +0 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CEWGZXh5.js +0 -51
- package/dist/Badge.vue_vue_type_script_setup_true_lang-ywvX3cQa.cjs +0 -1
- package/dist/BasicData.vue_vue_type_script_setup_true_lang-BIj7l5cr.cjs +0 -1
- package/dist/BasicData.vue_vue_type_script_setup_true_lang-CbariCIQ.js +0 -128
- package/dist/Breadcrumb.vue_vue_type_script_setup_true_lang-CydnFxPt.cjs +0 -1
- package/dist/Breadcrumb.vue_vue_type_script_setup_true_lang-DEb9qtjR.js +0 -129
- package/dist/Button.vue_vue_type_script_setup_true_lang-BKdqhxHb.js +0 -77
- package/dist/Button.vue_vue_type_script_setup_true_lang-DDvMH9EZ.cjs +0 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-B4hE3gsW.cjs +0 -1
- package/dist/ButtonGroup.vue_vue_type_script_setup_true_lang-Bs0B8Vd8.js +0 -120
- package/dist/Calendar.vue_vue_type_script_setup_true_lang-BDi2p9Jy.js +0 -190
- package/dist/Calendar.vue_vue_type_script_setup_true_lang-DGZRfB16.cjs +0 -1
- package/dist/Card.vue_vue_type_script_setup_true_lang-B3VTzVMY.cjs +0 -1
- package/dist/Card.vue_vue_type_script_setup_true_lang-CCOp9xQD.js +0 -119
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-DsZtCSP7.cjs +0 -1
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-pkxqabIY.js +0 -65
- package/dist/Collapsible.vue_vue_type_script_setup_true_lang-CkP6uzq2.js +0 -195
- package/dist/Collapsible.vue_vue_type_script_setup_true_lang-DQt_yIv4.cjs +0 -1
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-DH4Rseiw.js +0 -192
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-MmX7xgxo.cjs +0 -1
- package/dist/Command.vue_vue_type_script_setup_true_lang-FUM9Zk8T.cjs +0 -1
- package/dist/Command.vue_vue_type_script_setup_true_lang-S58WiQYS.js +0 -210
- package/dist/ConfigProvider.vue_vue_type_script_setup_true_lang-K0H6qX1E.js +0 -54
- package/dist/ConfigProvider.vue_vue_type_script_setup_true_lang-ru3M-m26.cjs +0 -1
- package/dist/ContextMenu.vue_vue_type_script_setup_true_lang-BoVF4TPX.js +0 -179
- package/dist/ContextMenu.vue_vue_type_script_setup_true_lang-C6tWKeM7.cjs +0 -1
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-B6LaPpp6.cjs +0 -1
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-_f_sZGq1.js +0 -242
- package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang-C43ZwNIn.cjs +0 -1
- package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang-DQUWt_Wu.js +0 -271
- package/dist/DateTimePicker.vue_vue_type_script_setup_true_lang-BlKdEbyK.cjs +0 -1
- package/dist/DateTimePicker.vue_vue_type_script_setup_true_lang-LTCCmsla.js +0 -410
- package/dist/DateTimeRangePicker.vue_vue_type_script_setup_true_lang-ClYv_nVS.js +0 -576
- package/dist/DateTimeRangePicker.vue_vue_type_script_setup_true_lang-Cw7MNCi2.cjs +0 -1
- package/dist/DecimalField.vue_vue_type_script_setup_true_lang-BJjaNs3A.cjs +0 -1
- package/dist/DecimalField.vue_vue_type_script_setup_true_lang-D7aOG5Dh.js +0 -91
- package/dist/DescriptionList.vue_vue_type_script_setup_true_lang-AfzkSyE9.js +0 -93
- package/dist/DescriptionList.vue_vue_type_script_setup_true_lang-Bmf_3Dc1.cjs +0 -1
- package/dist/Dialog.vue_vue_type_script_setup_true_lang-CIRDXaZe.cjs +0 -1
- package/dist/Dialog.vue_vue_type_script_setup_true_lang-DO5uFv4H.js +0 -197
- package/dist/Drawer.vue_vue_type_script_setup_true_lang-CFARHqW5.cjs +0 -1
- package/dist/Drawer.vue_vue_type_script_setup_true_lang-DD3XKgWN.js +0 -224
- package/dist/DropdownMenu.vue_vue_type_script_setup_true_lang-DEIcofhM.js +0 -187
- package/dist/DropdownMenu.vue_vue_type_script_setup_true_lang-LPRBC-sT.cjs +0 -1
- package/dist/Empty.vue_vue_type_script_setup_true_lang-BcHRqYVE.cjs +0 -1
- package/dist/Empty.vue_vue_type_script_setup_true_lang-Dpi0qEtn.js +0 -54
- package/dist/Field.vue_vue_type_script_setup_true_lang-BpHsfsic.cjs +0 -1
- package/dist/Field.vue_vue_type_script_setup_true_lang-DJJy-YPW.js +0 -131
- package/dist/Form.vue_vue_type_script_setup_true_lang-C1U8snBS.cjs +0 -1
- package/dist/Form.vue_vue_type_script_setup_true_lang-QWZ4SdKT.js +0 -261
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BF42kZLr.js +0 -423
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-DITQLBpA.cjs +0 -1
- package/dist/FormRenderer.vue_vue_type_script_setup_true_lang-CAxNwqHD.cjs +0 -1
- package/dist/FormRenderer.vue_vue_type_script_setup_true_lang-Dhm-WjC8.js +0 -233
- package/dist/Grid.vue_vue_type_script_setup_true_lang-BPbW0pD8.cjs +0 -1
- package/dist/Grid.vue_vue_type_script_setup_true_lang-DdUORFs2.js +0 -104
- package/dist/HoverCard.vue_vue_type_script_setup_true_lang-BX1R_w3e.cjs +0 -1
- package/dist/HoverCard.vue_vue_type_script_setup_true_lang-DQyN5fZJ.js +0 -171
- package/dist/ImagePreview.vue_vue_type_script_setup_true_lang-B0OOqOY8.js +0 -302
- package/dist/ImagePreview.vue_vue_type_script_setup_true_lang-DzqU_CNv.cjs +0 -1
- package/dist/Input.vue_vue_type_script_setup_true_lang-Cp2TGrCk.js +0 -49
- package/dist/Input.vue_vue_type_script_setup_true_lang-z96sVbKu.cjs +0 -1
- package/dist/InputGroup.vue_vue_type_script_setup_true_lang-D_OJAjSL.cjs +0 -1
- package/dist/InputGroup.vue_vue_type_script_setup_true_lang-DhMJFd3E.js +0 -254
- package/dist/InputOtp.vue_vue_type_script_setup_true_lang-BfhYqjWQ.cjs +0 -1
- package/dist/InputOtp.vue_vue_type_script_setup_true_lang-BppDfxqy.js +0 -104
- package/dist/IntegerField.vue_vue_type_script_setup_true_lang-9l6zsnms.js +0 -138
- package/dist/IntegerField.vue_vue_type_script_setup_true_lang-DKHzNN7U.cjs +0 -1
- package/dist/Item.vue_vue_type_script_setup_true_lang-C-HydRiq.cjs +0 -1
- package/dist/Item.vue_vue_type_script_setup_true_lang-a96_Oj5N.js +0 -294
- package/dist/Kbd.vue_vue_type_script_setup_true_lang-CLohvO70.js +0 -59
- package/dist/Kbd.vue_vue_type_script_setup_true_lang-DmNRZNY7.cjs +0 -1
- package/dist/Label.vue_vue_type_script_setup_true_lang-B24W9bVo.cjs +0 -1
- package/dist/Label.vue_vue_type_script_setup_true_lang-DiEbF66L.js +0 -36
- package/dist/Layout.vue_vue_type_script_setup_true_lang-DhuBYtXR.cjs +0 -1
- package/dist/Layout.vue_vue_type_script_setup_true_lang-qyWN0Zic.js +0 -266
- package/dist/Loading-3o1JTfTo.js +0 -151
- package/dist/Loading-Bb__Xu0A.cjs +0 -1
- package/dist/Menubar.vue_vue_type_script_setup_true_lang-Bv2izUjc.cjs +0 -1
- package/dist/Menubar.vue_vue_type_script_setup_true_lang-D_tfSoC2.js +0 -158
- package/dist/Message.vue_vue_type_script_setup_true_lang-DXupIlLr.cjs +0 -1
- package/dist/Message.vue_vue_type_script_setup_true_lang-Dlfgz0TE.js +0 -103
- package/dist/MonthPicker.vue_vue_type_script_setup_true_lang-BC6_j8NI.js +0 -208
- package/dist/MonthPicker.vue_vue_type_script_setup_true_lang-CPViB4Ld.cjs +0 -1
- package/dist/NavigationMenu.vue_vue_type_script_setup_true_lang-BsGhzlGm.cjs +0 -1
- package/dist/NavigationMenu.vue_vue_type_script_setup_true_lang-D2uAwqI7.js +0 -222
- package/dist/Notification.vue_vue_type_script_setup_true_lang-BvtuThJf.js +0 -148
- package/dist/Notification.vue_vue_type_script_setup_true_lang-DEyslU7t.cjs +0 -1
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-BbVMAU2p.cjs +0 -1
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Byu8A8uh.js +0 -105
- package/dist/PageContainer.vue_vue_type_script_setup_true_lang-CKe6JoYl.js +0 -234
- package/dist/PageContainer.vue_vue_type_script_setup_true_lang-Dj20ALwk.cjs +0 -1
- package/dist/PageRenderer.vue_vue_type_script_setup_true_lang-CEnN5hpQ.cjs +0 -1
- package/dist/PageRenderer.vue_vue_type_script_setup_true_lang-yFhOgQ0d.js +0 -323
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-CaA7p1U_.js +0 -139
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-Lh-HNwDK.cjs +0 -1
- package/dist/Popover.vue_vue_type_script_setup_true_lang-BjbI4KXM.js +0 -134
- package/dist/Popover.vue_vue_type_script_setup_true_lang-Cm77KH2H.cjs +0 -1
- package/dist/Progress.vue_vue_type_script_setup_true_lang-87j8mX2L.cjs +0 -1
- package/dist/Progress.vue_vue_type_script_setup_true_lang-CgHMn6cZ.js +0 -78
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-BCD6_cQf.js +0 -97
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-Dy6pu-sy.cjs +0 -1
- package/dist/ResizablePanelGroup.vue_vue_type_script_setup_true_lang-C6Hrh-OK.cjs +0 -1
- package/dist/ResizablePanelGroup.vue_vue_type_script_setup_true_lang-DnQJzPd5.js +0 -97
- package/dist/Result.vue_vue_type_script_setup_true_lang-C7tmhboo.js +0 -141
- package/dist/Result.vue_vue_type_script_setup_true_lang-CY_5_FQA.cjs +0 -1
- package/dist/ScrollArea.vue_vue_type_script_setup_true_lang-CGlecwYE.js +0 -72
- package/dist/ScrollArea.vue_vue_type_script_setup_true_lang-DotfmsY-.cjs +0 -1
- package/dist/Section.vue_vue_type_script_setup_true_lang-C7N8AafD.cjs +0 -1
- package/dist/Section.vue_vue_type_script_setup_true_lang-D5u3369q.js +0 -252
- package/dist/Select.vue_vue_type_script_setup_true_lang-DTZtMKx_.js +0 -67
- package/dist/Select.vue_vue_type_script_setup_true_lang-Xq-QJSlA.cjs +0 -1
- package/dist/Separator.vue_vue_type_script_setup_true_lang-BOSUjxhy.js +0 -49
- package/dist/Separator.vue_vue_type_script_setup_true_lang-fp-6WKch.cjs +0 -1
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-Bypym9gW.js +0 -200
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-DQMXcp7q.cjs +0 -1
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-8P4v4YYK.js +0 -33
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DvTCib5t.cjs +0 -1
- package/dist/Slider.vue_vue_type_script_setup_true_lang-5qILedGS.js +0 -130
- package/dist/Slider.vue_vue_type_script_setup_true_lang-DpOQgMTW.cjs +0 -1
- package/dist/Space.vue_vue_type_script_setup_true_lang-DUCQzntm.cjs +0 -1
- package/dist/Space.vue_vue_type_script_setup_true_lang-ikc41cqV.js +0 -125
- package/dist/Spinner.vue_vue_type_script_setup_true_lang-CkR6YQjH.cjs +0 -1
- package/dist/Spinner.vue_vue_type_script_setup_true_lang-RVwVkb2d.js +0 -26
- package/dist/Steps.vue_vue_type_script_setup_true_lang-BvboiRtG.cjs +0 -1
- package/dist/Steps.vue_vue_type_script_setup_true_lang-COm_8BK4.js +0 -228
- package/dist/Switch.vue_vue_type_script_setup_true_lang-ZRKl1Zni.cjs +0 -1
- package/dist/Switch.vue_vue_type_script_setup_true_lang-a1UgZsjV.js +0 -102
- package/dist/Table.vue_vue_type_script_setup_true_lang-7A--ssWe.js +0 -172
- package/dist/Table.vue_vue_type_script_setup_true_lang-BuP_bKG9.cjs +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BUSu2vID.cjs +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CkvqMjSo.js +0 -100
- package/dist/Text.vue_vue_type_script_setup_true_lang-4oqbt-Uo.js +0 -111
- package/dist/Text.vue_vue_type_script_setup_true_lang-Cen2Rzgv.cjs +0 -1
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-Bt_S9rml.js +0 -62
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-CsdJqI4Y.cjs +0 -1
- package/dist/TimePicker.vue_vue_type_script_setup_true_lang-5I_hONIZ.js +0 -256
- package/dist/TimePicker.vue_vue_type_script_setup_true_lang-C9UhNJIv.cjs +0 -1
- package/dist/TimeRangePicker.vue_vue_type_script_setup_true_lang-23XAbOog.js +0 -392
- package/dist/TimeRangePicker.vue_vue_type_script_setup_true_lang-Cjsue_WN.cjs +0 -1
- package/dist/Toast.vue_vue_type_script_setup_true_lang-B3klIVmK.cjs +0 -1
- package/dist/Toast.vue_vue_type_script_setup_true_lang-DPFmb7FU.js +0 -165
- package/dist/Toggle.vue_vue_type_script_setup_true_lang-DMbVbYBd.cjs +0 -1
- package/dist/Toggle.vue_vue_type_script_setup_true_lang-lgv-RLr_.js +0 -56
- package/dist/ToggleGroup.vue_vue_type_script_setup_true_lang-IUOuR9p4.js +0 -90
- package/dist/ToggleGroup.vue_vue_type_script_setup_true_lang-NuidvvgX.cjs +0 -1
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-BCAtYvdC.cjs +0 -1
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-D0opA9eL.js +0 -88
- package/dist/Upload.vue_vue_type_script_setup_true_lang-BJtdtelu.js +0 -496
- package/dist/Upload.vue_vue_type_script_setup_true_lang-CCOuXxZN.cjs +0 -1
- package/dist/WeekPicker.vue_vue_type_script_setup_true_lang-DhKqIXY4.cjs +0 -1
- package/dist/WeekPicker.vue_vue_type_script_setup_true_lang-YNWQQCeH.js +0 -271
- package/dist/YearPicker.vue_vue_type_script_setup_true_lang-BwNZyS4Q.cjs +0 -1
- package/dist/YearPicker.vue_vue_type_script_setup_true_lang-C2M6HDSn.js +0 -195
- package/dist/accordion.cjs +0 -1
- package/dist/accordion.js +0 -13
- package/dist/agent-schema.cjs +0 -1
- package/dist/agent-schema.js +0 -10516
- package/dist/alert-dialog.cjs +0 -1
- package/dist/alert-dialog.js +0 -15
- package/dist/alert.cjs +0 -1
- package/dist/alert.js +0 -9
- package/dist/aspect-ratio.cjs +0 -1
- package/dist/aspect-ratio.js +0 -6
- package/dist/avatar.cjs +0 -1
- package/dist/avatar.js +0 -7
- package/dist/badge.cjs +0 -1
- package/dist/badge.js +0 -7
- package/dist/basic-data.cjs +0 -1
- package/dist/basic-data.js +0 -14
- package/dist/breadcrumb.cjs +0 -1
- package/dist/breadcrumb.js +0 -11
- package/dist/button-group.cjs +0 -1
- package/dist/button-group.js +0 -10
- package/dist/button.cjs +0 -1
- package/dist/button.js +0 -7
- package/dist/calendar.cjs +0 -1
- package/dist/calendar.js +0 -38
- package/dist/card.cjs +0 -1
- package/dist/card.js +0 -13
- package/dist/checkbox.cjs +0 -1
- package/dist/checkbox.js +0 -10
- package/dist/cn-B6yFEsav.js +0 -8
- package/dist/cn-IjLH3w2e.cjs +0 -1
- package/dist/collapsible.cjs +0 -1
- package/dist/collapsible.js +0 -11
- package/dist/combobox.cjs +0 -1
- package/dist/combobox.js +0 -13
- package/dist/command.cjs +0 -1
- package/dist/command.js +0 -17
- package/dist/components.cjs +0 -1
- package/dist/components.js +0 -831
- package/dist/config-provider.cjs +0 -1
- package/dist/config-provider.js +0 -8
- package/dist/context-menu.cjs +0 -1
- package/dist/context-menu.js +0 -12
- package/dist/date-BJhpbnm4.js +0 -238
- package/dist/date-aqfSS7Zy.cjs +0 -1
- package/dist/date-picker.cjs +0 -1
- package/dist/date-picker.js +0 -20
- package/dist/date-range-picker.cjs +0 -1
- package/dist/date-range-picker.js +0 -20
- package/dist/date-time-picker.cjs +0 -1
- package/dist/date-time-picker.js +0 -30
- package/dist/date-time-range-picker.cjs +0 -1
- package/dist/date-time-range-picker.js +0 -35
- package/dist/decimal-field.cjs +0 -1
- package/dist/decimal-field.js +0 -6
- package/dist/description-list.cjs +0 -1
- package/dist/description-list.js +0 -11
- package/dist/dialog.cjs +0 -1
- package/dist/dialog.js +0 -12
- package/dist/drawer.cjs +0 -1
- package/dist/drawer.js +0 -13
- package/dist/dropdown-menu.cjs +0 -1
- package/dist/dropdown-menu.js +0 -13
- package/dist/empty.cjs +0 -1
- package/dist/empty.js +0 -5
- package/dist/engines.cjs +0 -1
- package/dist/engines.js +0 -72
- package/dist/field.cjs +0 -1
- package/dist/field.js +0 -10
- package/dist/form-item.cjs +0 -1
- package/dist/form-item.js +0 -7
- package/dist/form-renderer.cjs +0 -1
- package/dist/form-renderer.js +0 -4
- package/dist/form.cjs +0 -1
- package/dist/form.js +0 -8
- package/dist/grid.cjs +0 -1
- package/dist/grid.js +0 -7
- package/dist/hover-card.cjs +0 -1
- package/dist/hover-card.js +0 -11
- package/dist/image-preview.cjs +0 -1
- package/dist/image-preview.js +0 -29
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -870
- package/dist/input-group.cjs +0 -1
- package/dist/input-group.js +0 -12
- package/dist/input-otp.cjs +0 -1
- package/dist/input-otp.js +0 -11
- package/dist/input.cjs +0 -1
- package/dist/input.js +0 -7
- package/dist/integer-field.cjs +0 -1
- package/dist/integer-field.js +0 -10
- package/dist/item.cjs +0 -1
- package/dist/item.js +0 -15
- package/dist/kbd.cjs +0 -1
- package/dist/kbd.js +0 -7
- package/dist/label.cjs +0 -1
- package/dist/label.js +0 -7
- package/dist/layout.cjs +0 -1
- package/dist/layout.js +0 -13
- package/dist/loading.cjs +0 -1
- package/dist/loading.js +0 -13
- package/dist/menubar.cjs +0 -1
- package/dist/menubar.js +0 -12
- package/dist/message.cjs +0 -1
- package/dist/message.js +0 -11
- package/dist/month-picker.cjs +0 -1
- package/dist/month-picker.js +0 -15
- package/dist/navigation-menu.cjs +0 -1
- package/dist/navigation-menu.js +0 -16
- package/dist/notification.cjs +0 -1
- package/dist/notification.js +0 -16
- package/dist/number-field.cjs +0 -1
- package/dist/number-field.js +0 -11
- package/dist/page-container.cjs +0 -1
- package/dist/page-container.js +0 -17
- package/dist/page-renderer.cjs +0 -1
- package/dist/page-renderer.js +0 -28
- package/dist/pagination.cjs +0 -1
- package/dist/pagination.js +0 -14
- package/dist/plugin.cjs +0 -1
- package/dist/plugin.js +0 -12
- package/dist/popover.cjs +0 -1
- package/dist/popover.js +0 -13
- package/dist/progress.cjs +0 -1
- package/dist/progress.js +0 -8
- package/dist/radio-group.cjs +0 -1
- package/dist/radio-group.js +0 -9
- package/dist/resizable.cjs +0 -1
- package/dist/resizable.js +0 -10
- package/dist/result.cjs +0 -1
- package/dist/result.js +0 -11
- package/dist/schemas.cjs +0 -1
- package/dist/schemas.js +0 -1
- package/dist/scroll-area.cjs +0 -1
- package/dist/scroll-area.js +0 -10
- package/dist/section.cjs +0 -1
- package/dist/section.js +0 -13
- package/dist/select.cjs +0 -1
- package/dist/select.js +0 -7
- package/dist/separator.cjs +0 -1
- package/dist/separator.js +0 -7
- package/dist/sheet.cjs +0 -1
- package/dist/sheet.js +0 -12
- package/dist/skeleton.cjs +0 -1
- package/dist/skeleton.js +0 -7
- package/dist/slider.cjs +0 -1
- package/dist/slider.js +0 -8
- package/dist/space.cjs +0 -1
- package/dist/space.js +0 -7
- package/dist/spinner.cjs +0 -1
- package/dist/spinner.js +0 -5
- package/dist/src/agent-schema/components.d.ts +0 -7935
- package/dist/src/agent-schema/index.d.ts +0 -2
- package/dist/src/agent-schema/types.d.ts +0 -169
- package/dist/src/agent-schema.d.ts +0 -1
- package/dist/src/components/accordion/Accordion.vue.d.ts +0 -33
- package/dist/src/components/accordion/index.d.ts +0 -6
- package/dist/src/components/accordion/props.d.ts +0 -40
- package/dist/src/components/accordion/variants.d.ts +0 -30
- package/dist/src/components/alert/Alert.vue.d.ts +0 -16
- package/dist/src/components/alert/index.d.ts +0 -6
- package/dist/src/components/alert/props.d.ts +0 -10
- package/dist/src/components/alert/variants.d.ts +0 -10
- package/dist/src/components/alert-dialog/AlertDialog.vue.d.ts +0 -33
- package/dist/src/components/alert-dialog/index.d.ts +0 -6
- package/dist/src/components/alert-dialog/props.d.ts +0 -23
- package/dist/src/components/alert-dialog/variants.d.ts +0 -19
- package/dist/src/components/aspect-ratio/AspectRatio.vue.d.ts +0 -16
- package/dist/src/components/aspect-ratio/index.d.ts +0 -4
- package/dist/src/components/aspect-ratio/props.d.ts +0 -8
- package/dist/src/components/aspect-ratio/variants.d.ts +0 -5
- package/dist/src/components/avatar/Avatar.vue.d.ts +0 -20
- package/dist/src/components/avatar/index.d.ts +0 -4
- package/dist/src/components/avatar/props.d.ts +0 -12
- package/dist/src/components/avatar/variants.d.ts +0 -10
- package/dist/src/components/badge/Badge.vue.d.ts +0 -16
- package/dist/src/components/badge/index.d.ts +0 -6
- package/dist/src/components/badge/props.d.ts +0 -7
- package/dist/src/components/badge/variants.d.ts +0 -6
- package/dist/src/components/basic-data/BasicData.vue.d.ts +0 -30
- package/dist/src/components/basic-data/index.d.ts +0 -3
- package/dist/src/components/basic-data/props.d.ts +0 -27
- package/dist/src/components/basic-data/variants.d.ts +0 -21
- package/dist/src/components/breadcrumb/Breadcrumb.vue.d.ts +0 -18
- package/dist/src/components/breadcrumb/index.d.ts +0 -4
- package/dist/src/components/breadcrumb/props.d.ts +0 -23
- package/dist/src/components/breadcrumb/variants.d.ts +0 -15
- package/dist/src/components/button/Button.vue.d.ts +0 -24
- package/dist/src/components/button/index.d.ts +0 -6
- package/dist/src/components/button/props.d.ts +0 -15
- package/dist/src/components/button/variants.d.ts +0 -10
- package/dist/src/components/button-group/ButtonGroup.vue.d.ts +0 -23
- package/dist/src/components/button-group/index.d.ts +0 -6
- package/dist/src/components/button-group/props.d.ts +0 -30
- package/dist/src/components/button-group/variants.d.ts +0 -9
- package/dist/src/components/calendar/Calendar.vue.d.ts +0 -18
- package/dist/src/components/calendar/index.d.ts +0 -4
- package/dist/src/components/calendar/props.d.ts +0 -25
- package/dist/src/components/calendar/variants.d.ts +0 -27
- package/dist/src/components/card/Card.vue.d.ts +0 -25
- package/dist/src/components/card/index.d.ts +0 -6
- package/dist/src/components/card/props.d.ts +0 -13
- package/dist/src/components/card/variants.d.ts +0 -13
- package/dist/src/components/checkbox/Checkbox.vue.d.ts +0 -15
- package/dist/src/components/checkbox/index.d.ts +0 -6
- package/dist/src/components/checkbox/props.d.ts +0 -17
- package/dist/src/components/checkbox/variants.d.ts +0 -7
- package/dist/src/components/collapsible/Collapsible.vue.d.ts +0 -29
- package/dist/src/components/collapsible/index.d.ts +0 -6
- package/dist/src/components/collapsible/props.d.ts +0 -25
- package/dist/src/components/collapsible/variants.d.ts +0 -25
- package/dist/src/components/combobox/Combobox.vue.d.ts +0 -15
- package/dist/src/components/combobox/index.d.ts +0 -4
- package/dist/src/components/combobox/props.d.ts +0 -33
- package/dist/src/components/combobox/variants.d.ts +0 -26
- package/dist/src/components/command/Command.vue.d.ts +0 -25
- package/dist/src/components/command/index.d.ts +0 -4
- package/dist/src/components/command/props.d.ts +0 -54
- package/dist/src/components/command/variants.d.ts +0 -27
- package/dist/src/components/config-provider/ConfigProvider.vue.d.ts +0 -20
- package/dist/src/components/config-provider/context.d.ts +0 -12
- package/dist/src/components/config-provider/index.d.ts +0 -4
- package/dist/src/components/config-provider/props.d.ts +0 -16
- package/dist/src/components/config-provider/variants.d.ts +0 -3
- package/dist/src/components/context-menu/ContextMenu.vue.d.ts +0 -32
- package/dist/src/components/context-menu/index.d.ts +0 -4
- package/dist/src/components/context-menu/props.d.ts +0 -38
- package/dist/src/components/context-menu/variants.d.ts +0 -21
- package/dist/src/components/date-picker/DatePicker.vue.d.ts +0 -15
- package/dist/src/components/date-picker/index.d.ts +0 -3
- package/dist/src/components/date-picker/props.d.ts +0 -24
- package/dist/src/components/date-picker/variants.d.ts +0 -35
- package/dist/src/components/date-range-picker/DateRangePicker.vue.d.ts +0 -15
- package/dist/src/components/date-range-picker/index.d.ts +0 -3
- package/dist/src/components/date-range-picker/props.d.ts +0 -27
- package/dist/src/components/date-range-picker/variants.d.ts +0 -37
- package/dist/src/components/date-time-picker/DateTimePicker.vue.d.ts +0 -19
- package/dist/src/components/date-time-picker/index.d.ts +0 -3
- package/dist/src/components/date-time-picker/props.d.ts +0 -28
- package/dist/src/components/date-time-picker/variants.d.ts +0 -57
- package/dist/src/components/date-time-range-picker/DateTimeRangePicker.vue.d.ts +0 -20
- package/dist/src/components/date-time-range-picker/index.d.ts +0 -3
- package/dist/src/components/date-time-range-picker/props.d.ts +0 -32
- package/dist/src/components/date-time-range-picker/variants.d.ts +0 -69
- package/dist/src/components/decimal-field/DecimalField.vue.d.ts +0 -16
- package/dist/src/components/decimal-field/index.d.ts +0 -3
- package/dist/src/components/decimal-field/props.d.ts +0 -23
- package/dist/src/components/decimal-field/variants.d.ts +0 -2
- package/dist/src/components/description-list/DescriptionList.vue.d.ts +0 -5
- package/dist/src/components/description-list/index.d.ts +0 -3
- package/dist/src/components/description-list/props.d.ts +0 -15
- package/dist/src/components/description-list/variants.d.ts +0 -19
- package/dist/src/components/dialog/Dialog.vue.d.ts +0 -27
- package/dist/src/components/dialog/index.d.ts +0 -3
- package/dist/src/components/dialog/props.d.ts +0 -39
- package/dist/src/components/dialog/variants.d.ts +0 -7
- package/dist/src/components/drawer/Drawer.vue.d.ts +0 -29
- package/dist/src/components/drawer/index.d.ts +0 -3
- package/dist/src/components/drawer/props.d.ts +0 -43
- package/dist/src/components/drawer/variants.d.ts +0 -13
- package/dist/src/components/dropdown-menu/DropdownMenu.vue.d.ts +0 -27
- package/dist/src/components/dropdown-menu/index.d.ts +0 -5
- package/dist/src/components/dropdown-menu/props.d.ts +0 -44
- package/dist/src/components/dropdown-menu/variants.d.ts +0 -14
- package/dist/src/components/empty/Empty.vue.d.ts +0 -19
- package/dist/src/components/empty/index.d.ts +0 -3
- package/dist/src/components/empty/props.d.ts +0 -11
- package/dist/src/components/empty/variants.d.ts +0 -3
- package/dist/src/components/field/Field.vue.d.ts +0 -21
- package/dist/src/components/field/index.d.ts +0 -3
- package/dist/src/components/field/props.d.ts +0 -30
- package/dist/src/components/field/variants.d.ts +0 -10
- package/dist/src/components/form/Form.vue.d.ts +0 -55
- package/dist/src/components/form/context.d.ts +0 -11
- package/dist/src/components/form/index.d.ts +0 -3
- package/dist/src/components/form/props.d.ts +0 -85
- package/dist/src/components/form/variants.d.ts +0 -15
- package/dist/src/components/form-item/FormItem.vue.d.ts +0 -24
- package/dist/src/components/form-item/index.d.ts +0 -3
- package/dist/src/components/form-item/props.d.ts +0 -67
- package/dist/src/components/form-item/variants.d.ts +0 -14
- package/dist/src/components/form-renderer/FormRenderer.vue.d.ts +0 -15
- package/dist/src/components/form-renderer/index.d.ts +0 -2
- package/dist/src/components/form-renderer/props.d.ts +0 -11
- package/dist/src/components/form-renderer/variants.d.ts +0 -17
- package/dist/src/components/grid/Grid.vue.d.ts +0 -19
- package/dist/src/components/grid/index.d.ts +0 -5
- package/dist/src/components/grid/props.d.ts +0 -14
- package/dist/src/components/grid/variants.d.ts +0 -5
- package/dist/src/components/hover-card/HoverCard.vue.d.ts +0 -24
- package/dist/src/components/hover-card/index.d.ts +0 -3
- package/dist/src/components/hover-card/props.d.ts +0 -53
- package/dist/src/components/hover-card/variants.d.ts +0 -7
- package/dist/src/components/image-preview/ImagePreview.vue.d.ts +0 -19
- package/dist/src/components/image-preview/index.d.ts +0 -3
- package/dist/src/components/image-preview/props.d.ts +0 -29
- package/dist/src/components/image-preview/variants.d.ts +0 -57
- package/dist/src/components/index.d.ts +0 -164
- package/dist/src/components/input/Input.vue.d.ts +0 -14
- package/dist/src/components/input/index.d.ts +0 -6
- package/dist/src/components/input/props.d.ts +0 -19
- package/dist/src/components/input/variants.d.ts +0 -5
- package/dist/src/components/input-group/InputGroup.vue.d.ts +0 -32
- package/dist/src/components/input-group/index.d.ts +0 -5
- package/dist/src/components/input-group/props.d.ts +0 -75
- package/dist/src/components/input-group/variants.d.ts +0 -13
- package/dist/src/components/input-otp/InputOtp.vue.d.ts +0 -21
- package/dist/src/components/input-otp/index.d.ts +0 -5
- package/dist/src/components/input-otp/props.d.ts +0 -34
- package/dist/src/components/input-otp/variants.d.ts +0 -5
- package/dist/src/components/integer-field/IntegerField.vue.d.ts +0 -14
- package/dist/src/components/integer-field/index.d.ts +0 -3
- package/dist/src/components/integer-field/props.d.ts +0 -21
- package/dist/src/components/integer-field/variants.d.ts +0 -6
- package/dist/src/components/item/Item.vue.d.ts +0 -22
- package/dist/src/components/item/index.d.ts +0 -3
- package/dist/src/components/item/props.d.ts +0 -100
- package/dist/src/components/item/variants.d.ts +0 -22
- package/dist/src/components/kbd/Kbd.vue.d.ts +0 -16
- package/dist/src/components/kbd/index.d.ts +0 -3
- package/dist/src/components/kbd/props.d.ts +0 -9
- package/dist/src/components/kbd/variants.d.ts +0 -7
- package/dist/src/components/label/Label.vue.d.ts +0 -15
- package/dist/src/components/label/index.d.ts +0 -6
- package/dist/src/components/label/props.d.ts +0 -6
- package/dist/src/components/label/variants.d.ts +0 -3
- package/dist/src/components/layout/Layout.vue.d.ts +0 -22
- package/dist/src/components/layout/index.d.ts +0 -5
- package/dist/src/components/layout/props.d.ts +0 -27
- package/dist/src/components/layout/variants.d.ts +0 -27
- package/dist/src/components/loading/Loading.vue.d.ts +0 -17
- package/dist/src/components/loading/index.d.ts +0 -3
- package/dist/src/components/loading/props.d.ts +0 -11
- package/dist/src/components/loading/variants.d.ts +0 -31
- package/dist/src/components/menubar/Menubar.vue.d.ts +0 -25
- package/dist/src/components/menubar/index.d.ts +0 -5
- package/dist/src/components/menubar/props.d.ts +0 -50
- package/dist/src/components/menubar/variants.d.ts +0 -13
- package/dist/src/components/message/Message.vue.d.ts +0 -25
- package/dist/src/components/message/index.d.ts +0 -3
- package/dist/src/components/message/props.d.ts +0 -16
- package/dist/src/components/message/variants.d.ts +0 -17
- package/dist/src/components/month-picker/MonthPicker.vue.d.ts +0 -14
- package/dist/src/components/month-picker/index.d.ts +0 -3
- package/dist/src/components/month-picker/props.d.ts +0 -19
- package/dist/src/components/month-picker/variants.d.ts +0 -27
- package/dist/src/components/navigation-menu/NavigationMenu.vue.d.ts +0 -27
- package/dist/src/components/navigation-menu/index.d.ts +0 -5
- package/dist/src/components/navigation-menu/props.d.ts +0 -54
- package/dist/src/components/navigation-menu/variants.d.ts +0 -10
- package/dist/src/components/notification/Notification.vue.d.ts +0 -27
- package/dist/src/components/notification/index.d.ts +0 -3
- package/dist/src/components/notification/props.d.ts +0 -17
- package/dist/src/components/notification/variants.d.ts +0 -29
- package/dist/src/components/number-field/NumberField.vue.d.ts +0 -10
- package/dist/src/components/number-field/index.d.ts +0 -3
- package/dist/src/components/number-field/props.d.ts +0 -21
- package/dist/src/components/number-field/utils.d.ts +0 -9
- package/dist/src/components/number-field/variants.d.ts +0 -7
- package/dist/src/components/page-container/PageContainer.vue.d.ts +0 -17
- package/dist/src/components/page-container/index.d.ts +0 -5
- package/dist/src/components/page-container/props.d.ts +0 -28
- package/dist/src/components/page-container/variants.d.ts +0 -25
- package/dist/src/components/page-renderer/PageRenderer.vue.d.ts +0 -10
- package/dist/src/components/page-renderer/index.d.ts +0 -3
- package/dist/src/components/page-renderer/props.d.ts +0 -16
- package/dist/src/components/page-renderer/variants.d.ts +0 -30
- package/dist/src/components/pagination/Pagination.vue.d.ts +0 -30
- package/dist/src/components/pagination/index.d.ts +0 -5
- package/dist/src/components/pagination/props.d.ts +0 -28
- package/dist/src/components/pagination/variants.d.ts +0 -8
- package/dist/src/components/popover/Popover.vue.d.ts +0 -22
- package/dist/src/components/popover/index.d.ts +0 -5
- package/dist/src/components/popover/props.d.ts +0 -34
- package/dist/src/components/popover/variants.d.ts +0 -7
- package/dist/src/components/progress/Progress.vue.d.ts +0 -6
- package/dist/src/components/progress/index.d.ts +0 -6
- package/dist/src/components/progress/props.d.ts +0 -14
- package/dist/src/components/progress/variants.d.ts +0 -10
- package/dist/src/components/radio-group/RadioGroup.vue.d.ts +0 -22
- package/dist/src/components/radio-group/index.d.ts +0 -5
- package/dist/src/components/radio-group/props.d.ts +0 -29
- package/dist/src/components/radio-group/variants.d.ts +0 -3
- package/dist/src/components/resizable/ResizablePanelGroup.vue.d.ts +0 -21
- package/dist/src/components/resizable/index.d.ts +0 -5
- package/dist/src/components/resizable/props.d.ts +0 -37
- package/dist/src/components/resizable/variants.d.ts +0 -6
- package/dist/src/components/result/Result.vue.d.ts +0 -20
- package/dist/src/components/result/index.d.ts +0 -3
- package/dist/src/components/result/props.d.ts +0 -11
- package/dist/src/components/result/variants.d.ts +0 -26
- package/dist/src/components/scroll-area/ScrollArea.vue.d.ts +0 -19
- package/dist/src/components/scroll-area/index.d.ts +0 -5
- package/dist/src/components/scroll-area/props.d.ts +0 -12
- package/dist/src/components/scroll-area/variants.d.ts +0 -8
- package/dist/src/components/section/Section.vue.d.ts +0 -16
- package/dist/src/components/section/index.d.ts +0 -5
- package/dist/src/components/section/props.d.ts +0 -27
- package/dist/src/components/section/variants.d.ts +0 -27
- package/dist/src/components/select/Select.vue.d.ts +0 -22
- package/dist/src/components/select/index.d.ts +0 -6
- package/dist/src/components/select/props.d.ts +0 -21
- package/dist/src/components/select/variants.d.ts +0 -5
- package/dist/src/components/separator/Separator.vue.d.ts +0 -7
- package/dist/src/components/separator/index.d.ts +0 -6
- package/dist/src/components/separator/props.d.ts +0 -7
- package/dist/src/components/separator/variants.d.ts +0 -5
- package/dist/src/components/sheet/Sheet.vue.d.ts +0 -26
- package/dist/src/components/sheet/index.d.ts +0 -3
- package/dist/src/components/sheet/props.d.ts +0 -39
- package/dist/src/components/sheet/variants.d.ts +0 -12
- package/dist/src/components/skeleton/Skeleton.vue.d.ts +0 -15
- package/dist/src/components/skeleton/index.d.ts +0 -6
- package/dist/src/components/skeleton/props.d.ts +0 -5
- package/dist/src/components/skeleton/variants.d.ts +0 -3
- package/dist/src/components/slider/Slider.vue.d.ts +0 -20
- package/dist/src/components/slider/index.d.ts +0 -3
- package/dist/src/components/slider/props.d.ts +0 -21
- package/dist/src/components/slider/variants.d.ts +0 -15
- package/dist/src/components/space/Space.vue.d.ts +0 -22
- package/dist/src/components/space/index.d.ts +0 -5
- package/dist/src/components/space/props.d.ts +0 -15
- package/dist/src/components/space/variants.d.ts +0 -10
- package/dist/src/components/spinner/Spinner.vue.d.ts +0 -5
- package/dist/src/components/spinner/index.d.ts +0 -3
- package/dist/src/components/spinner/props.d.ts +0 -6
- package/dist/src/components/spinner/variants.d.ts +0 -3
- package/dist/src/components/steps/Steps.vue.d.ts +0 -15
- package/dist/src/components/steps/index.d.ts +0 -3
- package/dist/src/components/steps/props.d.ts +0 -24
- package/dist/src/components/steps/variants.d.ts +0 -40
- package/dist/src/components/switch/Switch.vue.d.ts +0 -18
- package/dist/src/components/switch/index.d.ts +0 -6
- package/dist/src/components/switch/props.d.ts +0 -14
- package/dist/src/components/switch/variants.d.ts +0 -9
- package/dist/src/components/table/Table.vue.d.ts +0 -16
- package/dist/src/components/table/index.d.ts +0 -5
- package/dist/src/components/table/props.d.ts +0 -42
- package/dist/src/components/table/variants.d.ts +0 -9
- package/dist/src/components/tabs/Tabs.vue.d.ts +0 -19
- package/dist/src/components/tabs/index.d.ts +0 -5
- package/dist/src/components/tabs/props.d.ts +0 -30
- package/dist/src/components/tabs/variants.d.ts +0 -4
- package/dist/src/components/text/Text.vue.d.ts +0 -21
- package/dist/src/components/text/index.d.ts +0 -6
- package/dist/src/components/text/props.d.ts +0 -15
- package/dist/src/components/text/variants.d.ts +0 -14
- package/dist/src/components/textarea/Textarea.vue.d.ts +0 -13
- package/dist/src/components/textarea/index.d.ts +0 -6
- package/dist/src/components/textarea/props.d.ts +0 -18
- package/dist/src/components/textarea/variants.d.ts +0 -5
- package/dist/src/components/time-picker/TimePicker.vue.d.ts +0 -19
- package/dist/src/components/time-picker/index.d.ts +0 -3
- package/dist/src/components/time-picker/props.d.ts +0 -23
- package/dist/src/components/time-picker/variants.d.ts +0 -33
- package/dist/src/components/time-range-picker/TimeRangePicker.vue.d.ts +0 -19
- package/dist/src/components/time-range-picker/index.d.ts +0 -3
- package/dist/src/components/time-range-picker/props.d.ts +0 -26
- package/dist/src/components/time-range-picker/variants.d.ts +0 -45
- package/dist/src/components/toast/Toast.vue.d.ts +0 -33
- package/dist/src/components/toast/index.d.ts +0 -3
- package/dist/src/components/toast/props.d.ts +0 -54
- package/dist/src/components/toast/variants.d.ts +0 -17
- package/dist/src/components/toggle/Toggle.vue.d.ts +0 -26
- package/dist/src/components/toggle/index.d.ts +0 -3
- package/dist/src/components/toggle/props.d.ts +0 -17
- package/dist/src/components/toggle/variants.d.ts +0 -3
- package/dist/src/components/toggle-group/ToggleGroup.vue.d.ts +0 -27
- package/dist/src/components/toggle-group/index.d.ts +0 -5
- package/dist/src/components/toggle-group/props.d.ts +0 -37
- package/dist/src/components/toggle-group/variants.d.ts +0 -6
- package/dist/src/components/tooltip/Tooltip.vue.d.ts +0 -23
- package/dist/src/components/tooltip/index.d.ts +0 -5
- package/dist/src/components/tooltip/props.d.ts +0 -26
- package/dist/src/components/tooltip/variants.d.ts +0 -1
- package/dist/src/components/upload/Upload.vue.d.ts +0 -46
- package/dist/src/components/upload/index.d.ts +0 -3
- package/dist/src/components/upload/props.d.ts +0 -53
- package/dist/src/components/upload/variants.d.ts +0 -47
- package/dist/src/components/week-picker/WeekPicker.vue.d.ts +0 -15
- package/dist/src/components/week-picker/index.d.ts +0 -3
- package/dist/src/components/week-picker/props.d.ts +0 -24
- package/dist/src/components/week-picker/variants.d.ts +0 -41
- package/dist/src/components/year-picker/YearPicker.vue.d.ts +0 -13
- package/dist/src/components/year-picker/index.d.ts +0 -3
- package/dist/src/components/year-picker/props.d.ts +0 -19
- package/dist/src/components/year-picker/variants.d.ts +0 -27
- package/dist/src/components.d.ts +0 -1
- package/dist/src/composables/use-confirm.d.ts +0 -1
- package/dist/src/composables/use-loading.d.ts +0 -6
- package/dist/src/composables/use-locale.d.ts +0 -6
- package/dist/src/composables/use-theme.d.ts +0 -9
- package/dist/src/composables/use-toast.d.ts +0 -1
- package/dist/src/engines/defaults.d.ts +0 -6
- package/dist/src/engines/index.d.ts +0 -2
- package/dist/src/engines/visibility.d.ts +0 -3
- package/dist/src/engines.d.ts +0 -1
- package/dist/src/index.d.ts +0 -15
- package/dist/src/locales/en-US.d.ts +0 -13
- package/dist/src/locales/zh-CN.d.ts +0 -13
- package/dist/src/plugin/context.d.ts +0 -32
- package/dist/src/plugin/index.d.ts +0 -3
- package/dist/src/plugin.d.ts +0 -7
- package/dist/src/schemas/action.d.ts +0 -18
- package/dist/src/schemas/field.d.ts +0 -60
- package/dist/src/schemas/index.d.ts +0 -3
- package/dist/src/schemas/page.d.ts +0 -56
- package/dist/src/schemas.d.ts +0 -1
- package/dist/src/services/confirm/ConfirmDialog.vue.d.ts +0 -13
- package/dist/src/services/confirm/index.d.ts +0 -2
- package/dist/src/services/confirm/service.d.ts +0 -4
- package/dist/src/services/confirm/types.d.ts +0 -13
- package/dist/src/services/loading/LoadingOverlay.vue.d.ts +0 -9
- package/dist/src/services/loading/index.d.ts +0 -2
- package/dist/src/services/loading/service.d.ts +0 -10
- package/dist/src/services/loading/types.d.ts +0 -7
- package/dist/src/services/toast/ToastProviderHost.vue.d.ts +0 -2
- package/dist/src/services/toast/index.d.ts +0 -2
- package/dist/src/services/toast/service.d.ts +0 -6
- package/dist/src/services/toast/store.d.ts +0 -8
- package/dist/src/services/toast/types.d.ts +0 -22
- package/dist/src/utils/cn.d.ts +0 -2
- package/dist/src/utils/date.d.ts +0 -40
- package/dist/steps.cjs +0 -1
- package/dist/steps.js +0 -13
- package/dist/style.css +0 -1
- package/dist/switch.cjs +0 -1
- package/dist/switch.js +0 -8
- package/dist/table.cjs +0 -1
- package/dist/table.js +0 -15
- package/dist/tabs.cjs +0 -1
- package/dist/tabs.js +0 -10
- package/dist/text.cjs +0 -1
- package/dist/text.js +0 -7
- package/dist/textarea.cjs +0 -1
- package/dist/textarea.js +0 -7
- package/dist/time-picker.cjs +0 -1
- package/dist/time-picker.js +0 -18
- package/dist/time-range-picker.cjs +0 -1
- package/dist/time-range-picker.js +0 -24
- package/dist/toast.cjs +0 -1
- package/dist/toast.js +0 -12
- package/dist/toggle-group.cjs +0 -1
- package/dist/toggle-group.js +0 -8
- package/dist/toggle.cjs +0 -1
- package/dist/toggle.js +0 -5
- package/dist/tooltip.cjs +0 -1
- package/dist/tooltip.js +0 -7
- package/dist/upload.cjs +0 -1
- package/dist/upload.js +0 -41
- package/dist/use-toast-CVNjgE9a.js +0 -657
- package/dist/use-toast-Cj_Ukd84.cjs +0 -1
- package/dist/utils-C0vnPoY0.js +0 -60
- package/dist/utils-UI2zegLo.cjs +0 -1
- package/dist/variants-Brr3yHhf.cjs +0 -1
- package/dist/variants-BwUifyts.cjs +0 -1
- package/dist/variants-CX5PAVtU.cjs +0 -1
- package/dist/variants-Dw8sMIE2.js +0 -5
- package/dist/variants-L_ACzsUn.js +0 -19
- package/dist/variants-O5HI2qRP.js +0 -32
- package/dist/vite.config.d.ts +0 -2
- package/dist/week-picker.cjs +0 -1
- package/dist/week-picker.js +0 -22
- package/dist/year-picker.cjs +0 -1
- package/dist/year-picker.js +0 -15
|
@@ -0,0 +1,871 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* TfDatePicker 日期选择组件
|
|
4
|
+
*
|
|
5
|
+
* 🆕 AI 增强集成:
|
|
6
|
+
* - 业务代码只需传 :ai="{...}" 即可
|
|
7
|
+
* - 组件内部自动: 状态机 (useAiStateMachine) + 状态徽章 + 触发按钮 + 确认按钮
|
|
8
|
+
* - 智能推荐结果自动填入 v-model (Date/string/对象 智能识别)
|
|
9
|
+
* - AI 状态行位于输入框底部, 不影响日历弹层 UI
|
|
10
|
+
*
|
|
11
|
+
* 适用场景:
|
|
12
|
+
* - 智能推荐浇筑日期 (避开周末 + 工期分析)
|
|
13
|
+
* - 智能检测混凝土浇筑间隔 (<7 天风险提示)
|
|
14
|
+
* - 节假日/周末异常检测
|
|
15
|
+
*/
|
|
16
|
+
import { ref, computed, watch, nextTick } from 'vue'
|
|
17
|
+
import { cva } from 'class-variance-authority'
|
|
18
|
+
import { cn } from '../../../../../lib/utils'
|
|
19
|
+
import { useAiStateMachine } from '../../../../../src/composables/use-ai-state-machine'
|
|
20
|
+
import type { AiState } from '../../../../../src/composables/use-ai-state-machine'
|
|
21
|
+
import { useFloatingPopup } from '../../../../../src/composables/use-floating-popup'
|
|
22
|
+
import { formatDate as formatDateStr } from '../../../../../src/utils/date-format'
|
|
23
|
+
import type { DatePickerProps, DatePickerEmits, DatePickerSlots, AiConfig } from './date-picker'
|
|
24
|
+
|
|
25
|
+
const props = withDefaults(defineProps<DatePickerProps>(), {
|
|
26
|
+
format: 'YYYY-MM-DD',
|
|
27
|
+
type: 'date',
|
|
28
|
+
size: 'md',
|
|
29
|
+
disabled: false,
|
|
30
|
+
clearable: true,
|
|
31
|
+
bordered: true
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const emit = defineEmits<DatePickerEmits>()
|
|
35
|
+
defineSlots<DatePickerSlots>()
|
|
36
|
+
|
|
37
|
+
const anchorRef = ref<HTMLElement | null>(null)
|
|
38
|
+
const isOpen = ref(false)
|
|
39
|
+
const displayValue = ref('')
|
|
40
|
+
const currentDate = ref(new Date())
|
|
41
|
+
const selectedDate = ref<Date | null>(null)
|
|
42
|
+
|
|
43
|
+
// 区间选择状态
|
|
44
|
+
const rangeStart = ref<string>('')
|
|
45
|
+
const rangeEnd = ref<string>('')
|
|
46
|
+
const rangeHoverDate = ref<Date | null>(null) // 悬停预览
|
|
47
|
+
const pickingRange = ref(false) // 正在选择区间
|
|
48
|
+
|
|
49
|
+
// 区间单输入框的显示值
|
|
50
|
+
const rangeDisplayValue = computed(() => {
|
|
51
|
+
if (rangeStart.value && rangeEnd.value) return `${rangeStart.value} ~ ${rangeEnd.value}`
|
|
52
|
+
if (rangeStart.value) return `${rangeStart.value} ~ ...`
|
|
53
|
+
return ''
|
|
54
|
+
})
|
|
55
|
+
const rangePlaceholder = computed(() => {
|
|
56
|
+
const [s, e] = props.rangePlaceholder ?? ['开始日期', '结束日期']
|
|
57
|
+
return `${s} ~ ${e}`
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
// 周几显示
|
|
61
|
+
const weekDays = ['日', '一', '二', '三', '四', '五', '六']
|
|
62
|
+
|
|
63
|
+
// 尺寸类名 (CVA)
|
|
64
|
+
const inputVariants = cva(
|
|
65
|
+
'tf-date-picker-input w-full rounded-lg outline-none transition-all duration-200',
|
|
66
|
+
{
|
|
67
|
+
variants: {
|
|
68
|
+
size: {
|
|
69
|
+
sm: 'px-2 h-[var(--tf-form-control-h-sm)]',
|
|
70
|
+
md: 'px-3 py-2 h-[var(--tf-form-control-h-md)]',
|
|
71
|
+
lg: 'px-4 py-2.5 h-[var(--tf-form-control-h-lg)]'
|
|
72
|
+
},
|
|
73
|
+
bordered: {
|
|
74
|
+
true: 'border tf-date-picker-input--bordered focus:ring-2',
|
|
75
|
+
false: 'border-b tf-date-picker-input--borderless'
|
|
76
|
+
},
|
|
77
|
+
disabled: {
|
|
78
|
+
true: 'tf-date-picker-input--disabled cursor-not-allowed',
|
|
79
|
+
false: 'cursor-pointer'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
size: 'md',
|
|
84
|
+
bordered: true,
|
|
85
|
+
disabled: false
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
// 字体大小 (引用设计令牌 CSS 变量)
|
|
91
|
+
const datePickerFontSizes: Record<string, string> = {
|
|
92
|
+
sm: 'var(--tf-font-size-xs)',
|
|
93
|
+
md: 'var(--tf-font-size-sm)',
|
|
94
|
+
lg: 'var(--tf-font-size-md)'
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 更新显示值
|
|
98
|
+
const updateDisplayValue = () => {
|
|
99
|
+
if (!selectedDate.value) {
|
|
100
|
+
displayValue.value = ''
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
displayValue.value = formatDateStr(selectedDate.value, props.format)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 初始化
|
|
107
|
+
if (props.modelValue) {
|
|
108
|
+
if (props.range && Array.isArray(props.modelValue)) {
|
|
109
|
+
const arr = props.modelValue as any as string[]
|
|
110
|
+
rangeStart.value = String(arr[0] ?? '')
|
|
111
|
+
rangeEnd.value = String(arr[1] ?? '')
|
|
112
|
+
pickingRange.value = false // 从外部同步视为已完成
|
|
113
|
+
if (rangeStart.value) {
|
|
114
|
+
const d = new Date(rangeStart.value)
|
|
115
|
+
if (!isNaN(d.getTime())) {
|
|
116
|
+
selectedDate.value = d
|
|
117
|
+
currentDate.value = new Date(d)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// range 模式不调用 updateDisplayValue (用 rangeDisplayValue)
|
|
121
|
+
} else if (!props.range) {
|
|
122
|
+
const date = typeof props.modelValue === 'string' ? new Date(props.modelValue) : props.modelValue
|
|
123
|
+
if (!isNaN(date.getTime())) {
|
|
124
|
+
selectedDate.value = date
|
|
125
|
+
currentDate.value = new Date(date)
|
|
126
|
+
updateDisplayValue()
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// 浮层定位 + 点击外部关闭:统一由 useFloatingPopup 处理
|
|
132
|
+
// (详见 packages/ui/src/composables/use-floating-popup.ts)
|
|
133
|
+
const { popupStyle, popupRef } = useFloatingPopup({
|
|
134
|
+
anchor: anchorRef,
|
|
135
|
+
open: isOpen,
|
|
136
|
+
placement: 'bottom-start',
|
|
137
|
+
offset: 8,
|
|
138
|
+
matchWidth: false,
|
|
139
|
+
onClickOutside: () => {
|
|
140
|
+
if (isOpen.value) {
|
|
141
|
+
isOpen.value = false
|
|
142
|
+
emit('close')
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
// 监听外部值变化
|
|
148
|
+
watch(() => props.modelValue, (val) => {
|
|
149
|
+
if (props.range) {
|
|
150
|
+
if (Array.isArray(val) && val.length === 2) {
|
|
151
|
+
rangeStart.value = String(val[0] ?? '')
|
|
152
|
+
rangeEnd.value = String(val[1] ?? '')
|
|
153
|
+
pickingRange.value = false // 从外部同步视为已完成
|
|
154
|
+
if (val[0]) {
|
|
155
|
+
const d = new Date(val[0])
|
|
156
|
+
if (!isNaN(d.getTime())) {
|
|
157
|
+
selectedDate.value = d
|
|
158
|
+
currentDate.value = new Date(d)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
displayValue.value = '' // range 模式用 rangeDisplayValue
|
|
162
|
+
} else if (!val || (Array.isArray(val) && val[0] === '')) {
|
|
163
|
+
rangeStart.value = ''
|
|
164
|
+
rangeEnd.value = ''
|
|
165
|
+
pickingRange.value = false
|
|
166
|
+
selectedDate.value = null
|
|
167
|
+
displayValue.value = ''
|
|
168
|
+
}
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
if (val) {
|
|
172
|
+
const date = typeof val === 'string' ? new Date(val) : val
|
|
173
|
+
if (!isNaN(date.getTime())) {
|
|
174
|
+
// 只有当日期真正变化时才更新,避免无限递归
|
|
175
|
+
if (!selectedDate.value ||
|
|
176
|
+
selectedDate.value.getTime() !== date.getTime() ||
|
|
177
|
+
currentDate.value.getFullYear() !== date.getFullYear() ||
|
|
178
|
+
currentDate.value.getMonth() !== date.getMonth()) {
|
|
179
|
+
selectedDate.value = date
|
|
180
|
+
currentDate.value = new Date(date)
|
|
181
|
+
updateDisplayValue()
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
} else if (selectedDate.value !== null) {
|
|
185
|
+
selectedDate.value = null
|
|
186
|
+
displayValue.value = ''
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
// 当前年月
|
|
191
|
+
const currentYear = computed(() => currentDate.value.getFullYear())
|
|
192
|
+
const currentMonth = computed(() => currentDate.value.getMonth())
|
|
193
|
+
|
|
194
|
+
// 获取当月的天数
|
|
195
|
+
const getDaysInMonth = (year: number, month: number) => {
|
|
196
|
+
return new Date(year, month + 1, 0).getDate()
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// 获取当月第一天是周几
|
|
200
|
+
const getFirstDayOfMonth = (year: number, month: number) => {
|
|
201
|
+
return new Date(year, month, 1).getDay()
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// 日历数据
|
|
205
|
+
const calendarDays = computed(() => {
|
|
206
|
+
const year = currentYear.value
|
|
207
|
+
const month = currentMonth.value
|
|
208
|
+
const daysInMonth = getDaysInMonth(year, month)
|
|
209
|
+
const firstDay = getFirstDayOfMonth(year, month)
|
|
210
|
+
|
|
211
|
+
const days: { day: number; isCurrentMonth: boolean; isSelected: boolean; isToday: boolean; isDisabled: boolean; isRangeStart: boolean; isRangeEnd: boolean }[] = []
|
|
212
|
+
|
|
213
|
+
// 上月的天数
|
|
214
|
+
const prevMonth = month === 0 ? 11 : month - 1
|
|
215
|
+
const prevYear = month === 0 ? year - 1 : year
|
|
216
|
+
const daysInPrevMonth = getDaysInMonth(prevYear, prevMonth)
|
|
217
|
+
|
|
218
|
+
for (let i = firstDay - 1; i >= 0; i--) {
|
|
219
|
+
const day = daysInPrevMonth - i
|
|
220
|
+
days.push({ day, isCurrentMonth: false, isSelected: false, isToday: false, isDisabled: false, isRangeStart: false, isRangeEnd: false })
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// 当月的天数
|
|
224
|
+
const today = new Date()
|
|
225
|
+
for (let i = 1; i <= daysInMonth; i++) {
|
|
226
|
+
const date = new Date(year, month, i)
|
|
227
|
+
const isSelected = selectedDate.value &&
|
|
228
|
+
date.getFullYear() === selectedDate.value.getFullYear() &&
|
|
229
|
+
date.getMonth() === selectedDate.value.getMonth() &&
|
|
230
|
+
date.getDate() === selectedDate.value.getDate()
|
|
231
|
+
const isToday = date.getFullYear() === today.getFullYear() &&
|
|
232
|
+
date.getMonth() === today.getMonth() &&
|
|
233
|
+
date.getDate() === today.getDate()
|
|
234
|
+
|
|
235
|
+
// range 模式下的起止判断
|
|
236
|
+
const isRangeStart = !!(
|
|
237
|
+
props.range && rangeStart.value &&
|
|
238
|
+
date.getFullYear() === new Date(rangeStart.value).getFullYear() &&
|
|
239
|
+
date.getMonth() === new Date(rangeStart.value).getMonth() &&
|
|
240
|
+
date.getDate() === new Date(rangeStart.value).getDate()
|
|
241
|
+
)
|
|
242
|
+
const isRangeEnd = !!(
|
|
243
|
+
props.range && rangeEnd.value &&
|
|
244
|
+
date.getFullYear() === new Date(rangeEnd.value).getFullYear() &&
|
|
245
|
+
date.getMonth() === new Date(rangeEnd.value).getMonth() &&
|
|
246
|
+
date.getDate() === new Date(rangeEnd.value).getDate()
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
// rangeMin/rangeMax 范围禁用
|
|
250
|
+
let isDisabled = false
|
|
251
|
+
if (props.rangeMin) {
|
|
252
|
+
const min = typeof props.rangeMin === 'string' ? new Date(props.rangeMin) : props.rangeMin
|
|
253
|
+
if (!isNaN(min.getTime()) && date < min) isDisabled = true
|
|
254
|
+
}
|
|
255
|
+
if (props.rangeMax) {
|
|
256
|
+
const max = typeof props.rangeMax === 'string' ? new Date(props.rangeMax) : props.rangeMax
|
|
257
|
+
if (!isNaN(max.getTime()) && date > max) isDisabled = true
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
days.push({ day: i, isCurrentMonth: true, isSelected: !!isSelected, isToday, isDisabled, isRangeStart, isRangeEnd })
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// 下月的天数
|
|
264
|
+
const remaining = 42 - days.length
|
|
265
|
+
for (let i = 1; i <= remaining; i++) {
|
|
266
|
+
days.push({ day: i, isCurrentMonth: false, isSelected: false, isToday: false, isDisabled: false, isRangeStart: false, isRangeEnd: false })
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return days
|
|
270
|
+
})
|
|
271
|
+
|
|
272
|
+
// 打开/关闭
|
|
273
|
+
const toggleDropdown = () => {
|
|
274
|
+
if (props.disabled) return
|
|
275
|
+
isOpen.value = !isOpen.value
|
|
276
|
+
if (isOpen.value) {
|
|
277
|
+
emit('open')
|
|
278
|
+
} else {
|
|
279
|
+
emit('close')
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// 格式化日期为 yyyy-MM-dd
|
|
284
|
+
const formatDate = (d: Date): string => {
|
|
285
|
+
const y = d.getFullYear()
|
|
286
|
+
const m = String(d.getMonth() + 1).padStart(2, '0')
|
|
287
|
+
const day = String(d.getDate()).padStart(2, '0')
|
|
288
|
+
return `${y}-${m}-${day}`
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// 判断日期是否在区间内(用于高亮)
|
|
292
|
+
const isInRange = (day: number, isCurrentMonth: boolean): boolean => {
|
|
293
|
+
if (!props.range || !rangeStart.value) return false
|
|
294
|
+
if (!isCurrentMonth) return false
|
|
295
|
+
const d = new Date(currentYear.value, currentMonth.value, day)
|
|
296
|
+
const start = new Date(rangeStart.value)
|
|
297
|
+
const end = rangeEnd.value ? new Date(rangeEnd.value) : (rangeHoverDate.value ?? start)
|
|
298
|
+
return d >= start && d <= end
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// 区间选择日期
|
|
302
|
+
const selectRangeDate = (day: number, isCurrentMonth: boolean) => {
|
|
303
|
+
if (!isCurrentMonth || props.disabled) return
|
|
304
|
+
const newDate = new Date(currentYear.value, currentMonth.value, day)
|
|
305
|
+
const formatted = formatDate(newDate)
|
|
306
|
+
|
|
307
|
+
// 检查范围约束
|
|
308
|
+
if (props.rangeMin) {
|
|
309
|
+
const min = typeof props.rangeMin === 'string' ? new Date(props.rangeMin) : props.rangeMin
|
|
310
|
+
if (!isNaN(min.getTime()) && newDate < min) return
|
|
311
|
+
}
|
|
312
|
+
if (props.rangeMax) {
|
|
313
|
+
const max = typeof props.rangeMax === 'string' ? new Date(props.rangeMax) : props.rangeMax
|
|
314
|
+
if (!isNaN(max.getTime()) && newDate > max) return
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// pickingRange=false 表示上一轮已完成 → 视为新一轮开始
|
|
318
|
+
if (!pickingRange.value) {
|
|
319
|
+
rangeStart.value = ''
|
|
320
|
+
rangeEnd.value = ''
|
|
321
|
+
rangeHoverDate.value = null
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (!rangeStart.value) {
|
|
325
|
+
// 第一步: 选开始日期
|
|
326
|
+
rangeStart.value = formatted
|
|
327
|
+
rangeEnd.value = ''
|
|
328
|
+
selectedDate.value = newDate
|
|
329
|
+
pickingRange.value = true
|
|
330
|
+
} else {
|
|
331
|
+
// 第二步: 选结束日期 (自动交换)
|
|
332
|
+
const start = new Date(rangeStart.value)
|
|
333
|
+
if (newDate < start) {
|
|
334
|
+
rangeEnd.value = rangeStart.value
|
|
335
|
+
rangeStart.value = formatted
|
|
336
|
+
} else {
|
|
337
|
+
rangeEnd.value = formatted
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// ✅ 跨度校验
|
|
341
|
+
const spanDays = Math.abs(Math.round((new Date(rangeEnd.value).getTime() - new Date(rangeStart.value).getTime()) / 86400000))
|
|
342
|
+
if (props.rangeMinSpan && props.rangeMinSpan > 0 && spanDays < props.rangeMinSpan) {
|
|
343
|
+
// 不满足最小跨度, 提示并重置(不清空开始日期, 让用户重选结束日期)
|
|
344
|
+
rangeEnd.value = ''
|
|
345
|
+
// 不关闭弹窗, 不 emit
|
|
346
|
+
return
|
|
347
|
+
}
|
|
348
|
+
if (props.rangeMaxSpan && props.rangeMaxSpan > 0 && spanDays > props.rangeMaxSpan) {
|
|
349
|
+
// 超出最大跨度, 同样重置结束日期
|
|
350
|
+
rangeEnd.value = ''
|
|
351
|
+
return
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
selectedDate.value = newDate
|
|
355
|
+
pickingRange.value = false
|
|
356
|
+
|
|
357
|
+
// emit 区间数组
|
|
358
|
+
const rangeVal: [string, string] = [rangeStart.value, rangeEnd.value]
|
|
359
|
+
emit('update:modelValue', rangeVal as any)
|
|
360
|
+
emit('change', rangeVal as any)
|
|
361
|
+
isOpen.value = false
|
|
362
|
+
emit('close')
|
|
363
|
+
}
|
|
364
|
+
updateDisplayValue()
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// 选择日期
|
|
368
|
+
const selectDate = (day: number, isCurrentMonth: boolean) => {
|
|
369
|
+
if (props.range) {
|
|
370
|
+
selectRangeDate(day, isCurrentMonth)
|
|
371
|
+
return
|
|
372
|
+
}
|
|
373
|
+
if (!isCurrentMonth || props.disabled) return
|
|
374
|
+
|
|
375
|
+
const newDate = new Date(currentYear.value, currentMonth.value, day)
|
|
376
|
+
|
|
377
|
+
// 检查范围约束
|
|
378
|
+
if (props.rangeMin) {
|
|
379
|
+
const min = typeof props.rangeMin === 'string' ? new Date(props.rangeMin) : props.rangeMin
|
|
380
|
+
if (!isNaN(min.getTime()) && newDate < min) return
|
|
381
|
+
}
|
|
382
|
+
if (props.rangeMax) {
|
|
383
|
+
const max = typeof props.rangeMax === 'string' ? new Date(props.rangeMax) : props.rangeMax
|
|
384
|
+
if (!isNaN(max.getTime()) && newDate > max) return
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
selectedDate.value = newDate
|
|
388
|
+
updateDisplayValue()
|
|
389
|
+
|
|
390
|
+
const formatted = displayValue.value
|
|
391
|
+
emit('update:modelValue', formatted)
|
|
392
|
+
emit('change', formatted)
|
|
393
|
+
isOpen.value = false
|
|
394
|
+
emit('close')
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// 上一月
|
|
398
|
+
const prevMonth = () => {
|
|
399
|
+
currentDate.value = new Date(currentYear.value, currentMonth.value - 1, 1)
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// 下一月
|
|
403
|
+
const nextMonth = () => {
|
|
404
|
+
currentDate.value = new Date(currentYear.value, currentMonth.value + 1, 1)
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// 上一年
|
|
408
|
+
const prevYear = () => {
|
|
409
|
+
currentDate.value = new Date(currentYear.value - 1, currentMonth.value, 1)
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// 下一年
|
|
413
|
+
const nextYear = () => {
|
|
414
|
+
currentDate.value = new Date(currentYear.value + 1, currentMonth.value, 1)
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// 清空
|
|
418
|
+
const clear = (e: MouseEvent) => {
|
|
419
|
+
e.stopPropagation()
|
|
420
|
+
if (props.disabled || !props.clearable) return
|
|
421
|
+
if (props.range) {
|
|
422
|
+
rangeStart.value = ''
|
|
423
|
+
rangeEnd.value = ''
|
|
424
|
+
pickingRange.value = false
|
|
425
|
+
emit('update:modelValue', ['', ''] as any)
|
|
426
|
+
emit('change', ['', ''] as any)
|
|
427
|
+
} else {
|
|
428
|
+
selectedDate.value = null
|
|
429
|
+
emit('update:modelValue', '')
|
|
430
|
+
emit('change', '')
|
|
431
|
+
}
|
|
432
|
+
displayValue.value = ''
|
|
433
|
+
emit('clear')
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// 快捷选择
|
|
437
|
+
const quickSelect = (type: string) => {
|
|
438
|
+
if (props.disabled) return
|
|
439
|
+
const today = new Date()
|
|
440
|
+
today.setHours(0, 0, 0, 0)
|
|
441
|
+
|
|
442
|
+
let target: Date
|
|
443
|
+
switch (type) {
|
|
444
|
+
case 'today':
|
|
445
|
+
target = today
|
|
446
|
+
break
|
|
447
|
+
case 'yesterday':
|
|
448
|
+
target = new Date(today)
|
|
449
|
+
target.setDate(target.getDate() - 1)
|
|
450
|
+
break
|
|
451
|
+
case 'tomorrow':
|
|
452
|
+
target = new Date(today)
|
|
453
|
+
target.setDate(target.getDate() + 1)
|
|
454
|
+
break
|
|
455
|
+
case '3days':
|
|
456
|
+
target = new Date(today)
|
|
457
|
+
target.setDate(target.getDate() - 3)
|
|
458
|
+
break
|
|
459
|
+
case '1week':
|
|
460
|
+
target = new Date(today)
|
|
461
|
+
target.setDate(target.getDate() - 7)
|
|
462
|
+
break
|
|
463
|
+
case '1month':
|
|
464
|
+
target = new Date(today)
|
|
465
|
+
target.setMonth(target.getMonth() - 1)
|
|
466
|
+
break
|
|
467
|
+
case '3months':
|
|
468
|
+
target = new Date(today)
|
|
469
|
+
target.setMonth(target.getMonth() - 3)
|
|
470
|
+
break
|
|
471
|
+
default:
|
|
472
|
+
return
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (props.range) {
|
|
476
|
+
// range 模式: 设置 rangeStart, 不清空 rangeEnd, pickingRange=true
|
|
477
|
+
const formatted = formatDate(target)
|
|
478
|
+
rangeStart.value = formatted
|
|
479
|
+
selectedDate.value = target
|
|
480
|
+
currentDate.value = new Date(target)
|
|
481
|
+
displayValue.value = formatted
|
|
482
|
+
pickingRange.value = true
|
|
483
|
+
emit('update:modelValue', [formatted, rangeEnd.value] as any)
|
|
484
|
+
emit('change', [formatted, rangeEnd.value] as any)
|
|
485
|
+
return
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
selectedDate.value = target
|
|
489
|
+
currentDate.value = new Date(target)
|
|
490
|
+
updateDisplayValue()
|
|
491
|
+
const formatted = displayValue.value
|
|
492
|
+
emit('update:modelValue', formatted)
|
|
493
|
+
emit('change', formatted)
|
|
494
|
+
isOpen.value = false
|
|
495
|
+
emit('close')
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// 快捷选项列表
|
|
499
|
+
const quickOptions = [
|
|
500
|
+
{ label: '今天', type: 'today' },
|
|
501
|
+
{ label: '昨天', type: 'yesterday' },
|
|
502
|
+
{ label: '明天', type: 'tomorrow' },
|
|
503
|
+
{ label: '三天前', type: '3days' },
|
|
504
|
+
{ label: '一周前', type: '1week' },
|
|
505
|
+
{ label: '一月前', type: '1month' },
|
|
506
|
+
{ label: '三月前', type: '3months' },
|
|
507
|
+
]
|
|
508
|
+
|
|
509
|
+
// 判断当前选中日期是否匹配某个快捷选项(用于高亮)
|
|
510
|
+
const isQuickMatch = (type: string): boolean => {
|
|
511
|
+
if (!selectedDate.value) return false
|
|
512
|
+
const today = new Date()
|
|
513
|
+
today.setHours(0, 0, 0, 0)
|
|
514
|
+
const sel = new Date(selectedDate.value)
|
|
515
|
+
sel.setHours(0, 0, 0, 0)
|
|
516
|
+
|
|
517
|
+
const diffDays = Math.round((today.getTime() - sel.getTime()) / 86400000)
|
|
518
|
+
|
|
519
|
+
switch (type) {
|
|
520
|
+
case 'today': return diffDays === 0
|
|
521
|
+
case 'yesterday': return diffDays === 1
|
|
522
|
+
case 'tomorrow': return diffDays === -1
|
|
523
|
+
case '3days': return diffDays === 3
|
|
524
|
+
case '1week': return diffDays === 7
|
|
525
|
+
case '1month': return (today.getFullYear() * 12 + today.getMonth()) - (sel.getFullYear() * 12 + sel.getMonth()) === 1
|
|
526
|
+
case '3months': return (today.getFullYear() * 12 + today.getMonth()) - (sel.getFullYear() * 12 + sel.getMonth()) === 3
|
|
527
|
+
default: return false
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// 输入框类名
|
|
532
|
+
const inputClasses = computed(() => cn(
|
|
533
|
+
inputVariants({ size: props.size, bordered: props.bordered, disabled: props.disabled })
|
|
534
|
+
))
|
|
535
|
+
|
|
536
|
+
// ============== 🆕 AI 增强集成 (业务方只需传 :ai 即可) ==============
|
|
537
|
+
const aiEnabled = computed(() => !!props.ai)
|
|
538
|
+
const preset = computed(() => props.ai?.preset ?? 'complete')
|
|
539
|
+
|
|
540
|
+
const defaultLabels = computed(() => {
|
|
541
|
+
switch (preset.value) {
|
|
542
|
+
case 'check':
|
|
543
|
+
return { trigger: 'AI 校验日期', retry: '重新校验', confirm: '✓ 应用推荐' }
|
|
544
|
+
case 'anomaly':
|
|
545
|
+
return { trigger: 'AI 检测异常', retry: '再次检测', confirm: '✓ 确认结果' }
|
|
546
|
+
case 'complete':
|
|
547
|
+
default:
|
|
548
|
+
return { trigger: 'AI 智能推荐', retry: '重新推荐', confirm: '✓ 应用日期' }
|
|
549
|
+
}
|
|
550
|
+
})
|
|
551
|
+
|
|
552
|
+
const triggerLabel = computed(() => props.ai?.triggerLabel ?? defaultLabels.value.trigger)
|
|
553
|
+
const retryLabel = computed(() => props.ai?.retryLabel ?? defaultLabels.value.retry)
|
|
554
|
+
const confirmLabel = computed(() => props.ai?.confirmLabel ?? defaultLabels.value.confirm)
|
|
555
|
+
|
|
556
|
+
const ai = useAiStateMachine({
|
|
557
|
+
needConfirm: props.ai?.needConfirm ?? true,
|
|
558
|
+
errorRate: props.ai?.errorRate ?? 0,
|
|
559
|
+
runningDuration: props.ai?.runningDuration ?? 1500,
|
|
560
|
+
autoReset: props.ai?.autoReset ?? 0
|
|
561
|
+
})
|
|
562
|
+
|
|
563
|
+
const aiStateLabels: Record<AiState, string> = {
|
|
564
|
+
idle: '空闲',
|
|
565
|
+
running: 'AI 处理中',
|
|
566
|
+
confirming: '⚠ 等待确认',
|
|
567
|
+
done: '✓ 已完成',
|
|
568
|
+
error: '✗ 失败'
|
|
569
|
+
}
|
|
570
|
+
const aiStateClasses: Record<AiState, string> = {
|
|
571
|
+
idle: 'tf-date-picker__ai-state--idle',
|
|
572
|
+
running: 'tf-date-picker__ai-state--running animate-pulse',
|
|
573
|
+
confirming: 'tf-date-picker__ai-state--confirming',
|
|
574
|
+
done: 'tf-date-picker__ai-state--done',
|
|
575
|
+
error: 'tf-date-picker__ai-state--error'
|
|
576
|
+
}
|
|
577
|
+
const aiStateLabel = computed(() => aiStateLabels[ai.state.value])
|
|
578
|
+
const aiStateClass = computed(() => aiStateClasses[ai.state.value])
|
|
579
|
+
|
|
580
|
+
const currentTriggerLabel = computed(() => {
|
|
581
|
+
const s = ai.state.value
|
|
582
|
+
if (s === 'error') return retryLabel.value
|
|
583
|
+
if (s === 'done') return retryLabel.value
|
|
584
|
+
return triggerLabel.value
|
|
585
|
+
})
|
|
586
|
+
|
|
587
|
+
// 默认 applyResult: 把 AI result 智能转换为 string | Date
|
|
588
|
+
// - null/undefined -> 不变
|
|
589
|
+
// - Date 对象 -> 直接用
|
|
590
|
+
// - string -> 直接用
|
|
591
|
+
// - { value, date } -> 取 value/date
|
|
592
|
+
const defaultApply = (result: any, _current: string | Date | undefined): string | Date | undefined => {
|
|
593
|
+
if (result == null) return _current
|
|
594
|
+
if (result instanceof Date) return result
|
|
595
|
+
if (typeof result === 'string') return result
|
|
596
|
+
if (typeof result === 'object') {
|
|
597
|
+
if (typeof result.value !== 'undefined') return result.value
|
|
598
|
+
if (typeof result.date !== 'undefined') return result.date
|
|
599
|
+
}
|
|
600
|
+
return _current
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
const applyAndConfirm = () => {
|
|
604
|
+
const result = ai.result.value
|
|
605
|
+
const applyFn = props.ai?.applyResult ?? defaultApply
|
|
606
|
+
const next = applyFn(result, props.modelValue as string | Date | undefined)
|
|
607
|
+
if (next !== undefined) {
|
|
608
|
+
// next 可能是 Date 或 string, 组件内部统一 emit string
|
|
609
|
+
let emitVal: string = ''
|
|
610
|
+
if (next instanceof Date) {
|
|
611
|
+
const y = next.getFullYear()
|
|
612
|
+
const m = String(next.getMonth() + 1).padStart(2, '0')
|
|
613
|
+
const d = String(next.getDate()).padStart(2, '0')
|
|
614
|
+
emitVal = `${y}-${m}-${d}`
|
|
615
|
+
} else {
|
|
616
|
+
emitVal = String(next)
|
|
617
|
+
}
|
|
618
|
+
emit('update:modelValue', emitVal)
|
|
619
|
+
emit('change', emitVal)
|
|
620
|
+
// 同步内部 selectedDate
|
|
621
|
+
const parsed = typeof next === 'string' ? new Date(next) : next
|
|
622
|
+
if (parsed instanceof Date && !isNaN(parsed.getTime())) {
|
|
623
|
+
selectedDate.value = parsed
|
|
624
|
+
currentDate.value = new Date(parsed)
|
|
625
|
+
updateDisplayValue()
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
ai.confirm()
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
const handleTrigger = () => {
|
|
632
|
+
if (typeof props.ai?.onTrigger === 'function') {
|
|
633
|
+
ai.trigger(() => props.ai!.onTrigger(props.modelValue as string | Date | undefined))
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
// 格式化 AI 推荐结果为简短提示
|
|
638
|
+
const formatAiHint = (result: any): string => {
|
|
639
|
+
if (result == null) return ''
|
|
640
|
+
if (result instanceof Date) {
|
|
641
|
+
const y = result.getFullYear()
|
|
642
|
+
const m = String(result.getMonth() + 1).padStart(2, '0')
|
|
643
|
+
const d = String(result.getDate()).padStart(2, '0')
|
|
644
|
+
return `${y}-${m}-${d}`
|
|
645
|
+
}
|
|
646
|
+
if (typeof result === 'object') {
|
|
647
|
+
// 优先显示具体的日期值 (yyyy-MM-dd), 这样测试和实际业务都能看到日期
|
|
648
|
+
const dateStr = typeof result.value !== 'undefined' ? String(result.value)
|
|
649
|
+
: typeof result.date !== 'undefined' ? String(result.date) : null
|
|
650
|
+
const label = typeof result.label !== 'undefined' ? String(result.label) : null
|
|
651
|
+
if (dateStr && label && dateStr !== label) return `${dateStr} (${label})`
|
|
652
|
+
if (dateStr) return dateStr
|
|
653
|
+
if (label) return label
|
|
654
|
+
}
|
|
655
|
+
return String(result)
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
// 状态变化向上抛事件
|
|
659
|
+
watch(
|
|
660
|
+
() => ai.state.value,
|
|
661
|
+
(s) => {
|
|
662
|
+
if (!aiEnabled.value) return
|
|
663
|
+
emit('ai-state-change', s, ai.result.value, ai.error.value)
|
|
664
|
+
}
|
|
665
|
+
)
|
|
666
|
+
</script>
|
|
667
|
+
|
|
668
|
+
<template>
|
|
669
|
+
<div class="tf-date-picker tf-form-control relative inline-block w-full">
|
|
670
|
+
<div ref="anchorRef" class="relative" @click="toggleDropdown">
|
|
671
|
+
<slot name="prefix">
|
|
672
|
+
<svg class="tf-date-picker__calendar-icon absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
673
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
|
|
674
|
+
</svg>
|
|
675
|
+
</slot>
|
|
676
|
+
<template v-if="range">
|
|
677
|
+
<input
|
|
678
|
+
type="text"
|
|
679
|
+
readonly
|
|
680
|
+
:class="cn(inputClasses, 'pl-9')"
|
|
681
|
+
:style="{ fontSize: datePickerFontSizes[props.size] }"
|
|
682
|
+
:value="rangeDisplayValue"
|
|
683
|
+
:placeholder="rangePlaceholder"
|
|
684
|
+
:disabled="disabled"
|
|
685
|
+
/>
|
|
686
|
+
</template>
|
|
687
|
+
<!-- 单日期模式 -->
|
|
688
|
+
<template v-else>
|
|
689
|
+
<input
|
|
690
|
+
type="text"
|
|
691
|
+
readonly
|
|
692
|
+
:class="cn(inputClasses, 'pl-9')"
|
|
693
|
+
:style="{ fontSize: datePickerFontSizes[props.size] }"
|
|
694
|
+
:value="displayValue"
|
|
695
|
+
:placeholder="placeholder || '请选择日期'"
|
|
696
|
+
:disabled="disabled"
|
|
697
|
+
/>
|
|
698
|
+
</template>
|
|
699
|
+
<button
|
|
700
|
+
v-if="clearable && (range ? rangeDisplayValue : displayValue) && !disabled"
|
|
701
|
+
type="button"
|
|
702
|
+
class="tf-date-picker__clear absolute right-3 top-1/2 -translate-y-1/2 transition-colors"
|
|
703
|
+
@click="clear"
|
|
704
|
+
>
|
|
705
|
+
<slot name="clearIcon">
|
|
706
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
707
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
|
708
|
+
</svg>
|
|
709
|
+
</slot>
|
|
710
|
+
</button>
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
<!-- 🆕 AI 状态行 (输入框下方, 弹层外, 不影响日历弹层 UI)
|
|
714
|
+
顺序固定: aiPrefix slot → 状态徽章 → 错误信息/推荐日期 → 操作按钮 -->
|
|
715
|
+
<div
|
|
716
|
+
v-if="aiEnabled"
|
|
717
|
+
class="tf-date-picker__ai-bar flex items-center gap-2 mt-1.5 text-[10px] h-5"
|
|
718
|
+
>
|
|
719
|
+
<div class="flex items-center gap-2 min-w-0 flex-1 overflow-hidden h-5">
|
|
720
|
+
<slot name="aiPrefix" />
|
|
721
|
+
<span
|
|
722
|
+
:class="cn('px-2 py-0.5 rounded-full font-medium whitespace-nowrap shrink-0 inline-flex items-center leading-none h-5', aiStateClass)"
|
|
723
|
+
>
|
|
724
|
+
{{ aiStateLabel }}
|
|
725
|
+
</span>
|
|
726
|
+
<span
|
|
727
|
+
v-if="ai.state.value === 'error' && ai.error.value"
|
|
728
|
+
class="tf-date-picker__ai-error truncate min-w-0"
|
|
729
|
+
:title="ai.error.value"
|
|
730
|
+
>
|
|
731
|
+
{{ ai.error.value }}
|
|
732
|
+
</span>
|
|
733
|
+
<!-- confirming 态时, 简短提示推荐日期 -->
|
|
734
|
+
<span
|
|
735
|
+
v-else-if="ai.state.value === 'confirming' && ai.result.value != null"
|
|
736
|
+
class="tf-date-picker__ai-hint truncate min-w-0"
|
|
737
|
+
>
|
|
738
|
+
推荐: {{ formatAiHint(ai.result.value) }}
|
|
739
|
+
</span>
|
|
740
|
+
</div>
|
|
741
|
+
|
|
742
|
+
<!-- 右侧: 操作按钮 -->
|
|
743
|
+
<div class="flex items-center gap-1.5 shrink-0 h-5">
|
|
744
|
+
<button
|
|
745
|
+
v-if="ai.state.value === 'idle' || ai.state.value === 'error' || ai.state.value === 'done'"
|
|
746
|
+
type="button"
|
|
747
|
+
:disabled="disabled"
|
|
748
|
+
class="tf-date-picker__ai-button tf-date-picker__ai-button--primary px-2 py-0.5 rounded disabled:opacity-50 disabled:cursor-not-allowed transition inline-flex items-center leading-none h-5"
|
|
749
|
+
@click="handleTrigger"
|
|
750
|
+
>
|
|
751
|
+
{{ currentTriggerLabel }}
|
|
752
|
+
</button>
|
|
753
|
+
<button
|
|
754
|
+
v-else-if="ai.state.value === 'confirming'"
|
|
755
|
+
type="button"
|
|
756
|
+
:disabled="disabled"
|
|
757
|
+
class="tf-date-picker__ai-button tf-date-picker__ai-button--confirm px-2 py-0.5 rounded disabled:opacity-50 disabled:cursor-not-allowed transition inline-flex items-center leading-none h-5"
|
|
758
|
+
@click="applyAndConfirm"
|
|
759
|
+
>
|
|
760
|
+
{{ confirmLabel }}
|
|
761
|
+
</button>
|
|
762
|
+
<button
|
|
763
|
+
v-else-if="ai.state.value === 'running'"
|
|
764
|
+
type="button"
|
|
765
|
+
:disabled="disabled"
|
|
766
|
+
class="tf-date-picker__ai-button tf-date-picker__ai-button--cancel px-2 py-0.5 rounded disabled:opacity-50 disabled:cursor-not-allowed transition inline-flex items-center leading-none h-5"
|
|
767
|
+
@click="ai.reset()"
|
|
768
|
+
>
|
|
769
|
+
取消
|
|
770
|
+
</button>
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
|
|
774
|
+
<!-- 日历下拉框:Teleport 到 body,position:fixed,避免被祖先 overflow:hidden 裁剪 -->
|
|
775
|
+
<Teleport to="body">
|
|
776
|
+
<Transition name="tf-fade">
|
|
777
|
+
<div
|
|
778
|
+
v-if="isOpen"
|
|
779
|
+
ref="popupRef"
|
|
780
|
+
:style="popupStyle"
|
|
781
|
+
class="tf-date-picker-dropdown rounded-xl shadow-lg z-50 flex overflow-hidden"
|
|
782
|
+
>
|
|
783
|
+
<!-- 左侧快捷选项 -->
|
|
784
|
+
<div class="tf-date-picker__quick-panel w-20 shrink-0 border-r py-2">
|
|
785
|
+
<button
|
|
786
|
+
v-for="opt in quickOptions"
|
|
787
|
+
:key="opt.type"
|
|
788
|
+
type="button"
|
|
789
|
+
class="tf-date-picker__quick-option block w-full text-left px-3 py-1.5 text-xs transition-colors"
|
|
790
|
+
:class="{ 'tf-date-picker__quick-option--active font-medium': selectedDate && isQuickMatch(opt.type) }"
|
|
791
|
+
@click="quickSelect(opt.type)"
|
|
792
|
+
>
|
|
793
|
+
{{ opt.label }}
|
|
794
|
+
</button>
|
|
795
|
+
</div>
|
|
796
|
+
|
|
797
|
+
<!-- 右侧日历面板 -->
|
|
798
|
+
<div class="flex-1 p-3 min-w-[256px]">
|
|
799
|
+
<!-- 头部 -->
|
|
800
|
+
<div class="flex items-center justify-between mb-4">
|
|
801
|
+
<div class="flex items-center gap-1">
|
|
802
|
+
<button type="button" class="tf-date-picker__nav-button p-1 rounded transition-colors" @click="prevYear">
|
|
803
|
+
<svg class="tf-date-picker__nav-icon w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
804
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7"></path>
|
|
805
|
+
</svg>
|
|
806
|
+
</button>
|
|
807
|
+
<button type="button" class="tf-date-picker__nav-button p-1 rounded transition-colors" @click="prevMonth">
|
|
808
|
+
<svg class="tf-date-picker__nav-icon w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
809
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>
|
|
810
|
+
</svg>
|
|
811
|
+
</button>
|
|
812
|
+
</div>
|
|
813
|
+
<span class="tf-date-picker__title text-sm font-medium">
|
|
814
|
+
{{ currentYear }}年{{ currentMonth + 1 }}月
|
|
815
|
+
</span>
|
|
816
|
+
<div class="flex items-center gap-1">
|
|
817
|
+
<button type="button" class="tf-date-picker__nav-button p-1 rounded transition-colors" @click="nextMonth">
|
|
818
|
+
<svg class="tf-date-picker__nav-icon w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
819
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
|
|
820
|
+
</svg>
|
|
821
|
+
</button>
|
|
822
|
+
<button type="button" class="tf-date-picker__nav-button p-1 rounded transition-colors" @click="nextYear">
|
|
823
|
+
<svg class="tf-date-picker__nav-icon w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
824
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 5l7 7-7 7"></path>
|
|
825
|
+
</svg>
|
|
826
|
+
</button>
|
|
827
|
+
</div>
|
|
828
|
+
</div>
|
|
829
|
+
|
|
830
|
+
<!-- 周标题 -->
|
|
831
|
+
<div class="grid grid-cols-7 gap-1 mb-2">
|
|
832
|
+
<div v-for="day in weekDays" :key="day" class="tf-date-picker__weekday text-center text-xs font-medium py-1">
|
|
833
|
+
{{ day }}
|
|
834
|
+
</div>
|
|
835
|
+
</div>
|
|
836
|
+
|
|
837
|
+
<!-- 日期网格 -->
|
|
838
|
+
<div class="grid grid-cols-7 gap-1">
|
|
839
|
+
<button
|
|
840
|
+
v-for="(item, index) in calendarDays"
|
|
841
|
+
:key="index"
|
|
842
|
+
type="button"
|
|
843
|
+
:class="[
|
|
844
|
+
'tf-date-picker-day w-8 h-8 text-sm rounded-lg transition-all duration-200 flex items-center justify-center',
|
|
845
|
+
!item.isCurrentMonth ? 'tf-date-picker-day--out' : '',
|
|
846
|
+
item.isDisabled ? 'tf-date-picker-day--disabled opacity-30 cursor-not-allowed' : '',
|
|
847
|
+
item.isToday ? 'tf-date-picker-day--today border font-medium' : '',
|
|
848
|
+
item.isSelected ? 'tf-date-picker-day--selected font-medium' : '',
|
|
849
|
+
!item.isSelected && item.isCurrentMonth && !item.isToday && !item.isDisabled ? 'tf-date-picker-day--available' : '',
|
|
850
|
+
isInRange(item.day, item.isCurrentMonth) ? 'tf-date-picker-day--range rounded-none' : '',
|
|
851
|
+
item.isRangeStart ? 'rounded-l-lg' : '',
|
|
852
|
+
item.isRangeEnd ? 'rounded-r-lg' : '',
|
|
853
|
+
disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'
|
|
854
|
+
]"
|
|
855
|
+
:disabled="disabled || item.isDisabled"
|
|
856
|
+
@click="selectDate(item.day, item.isCurrentMonth)"
|
|
857
|
+
>
|
|
858
|
+
{{ item.day }}
|
|
859
|
+
</button>
|
|
860
|
+
</div>
|
|
861
|
+
<!-- 关闭右侧日历面板 -->
|
|
862
|
+
</div>
|
|
863
|
+
</div>
|
|
864
|
+
</Transition>
|
|
865
|
+
</Teleport>
|
|
866
|
+
</div>
|
|
867
|
+
</template>
|
|
868
|
+
|
|
869
|
+
<style>
|
|
870
|
+
@import '../styles/date-picker.css';
|
|
871
|
+
</style>
|