@_tc/template-core 0.1.16 → 0.2.0-bate.1
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/.skills/tc-component-usage-skills/SKILL.md +9 -2
- package/.skills/tc-component-usage-skills/reference/component-api.md +6 -3
- package/.skills/tc-component-usage-skills/reference/patterns.md +3 -3
- package/.skills/tc-component-usage-skills/reference/template-core-frontend.md +11 -2
- package/.skills/tc-generator/SKILL.md +3 -2
- package/.skills/tc-generator/reference/example.md +5 -1
- package/.skills/tc-generator/reference/project-template/config/config.default.js +4 -0
- package/.skills/tc-generator/reference/project-template/index.js +1 -1
- package/.skills/tc-generator/reference/project-template/model/product/project/default.js +2 -0
- package/.skills/tc-generator/reference/runtime-extensions.md +112 -2
- package/AGENT_README.md +635 -0
- package/README.md +464 -41
- package/cjs/app/controller/project.js +1 -1
- package/cjs/app/controller/view.js +1 -1
- package/cjs/app/extends/crypto.js +1 -0
- package/cjs/app/{extend → extends}/db.js +1 -1
- package/cjs/app/extends/localCacheHtmlEtag.js +1 -0
- package/cjs/app/extends/render-view.js +1 -0
- package/cjs/app/middleware.js +1 -1
- package/cjs/app/middlewares/api-params-verify.js +1 -0
- package/cjs/app/middlewares/api-sign-verify.js +1 -0
- package/cjs/app/{middleware → middlewares}/error-handle.js +1 -1
- package/cjs/app/middlewares/project-handler.js +1 -0
- package/cjs/app/middlewares/request-parameter-parsing.js +1 -0
- package/cjs/app/router/project.js +1 -1
- package/cjs/app/view/entry.tpl +3 -0
- package/cjs/bundler/buildBE.js +1 -0
- package/cjs/bundler/defaultRouteGuard.js +1 -0
- package/cjs/bundler/index.js +1 -1
- package/cjs/bundler/state.js +1 -1
- package/cjs/bundler/utils.js +3 -1
- package/cjs/config/config.default.js +1 -1
- package/cjs/packages/common/index.js +1 -1
- package/cjs/packages/common/string/index.js +1 -1
- package/cjs/packages/core/env.js +1 -1
- package/cjs/packages/core/index.js +1 -1
- package/cjs/packages/core/loader/controller.js +1 -1
- package/cjs/packages/core/loader/extend.js +1 -1
- package/cjs/packages/core/loader/middleware.js +1 -1
- package/cjs/packages/core/loader/router-schema.js +1 -1
- package/cjs/packages/core/loader/router.js +1 -1
- package/cjs/packages/core/loader/service.js +1 -1
- package/cjs/packages/utils/runFileFn.js +1 -1
- package/cjs/scripts/vite-build/build.js +3 -0
- package/cjs/scripts/vite-build/collect.js +1 -0
- package/cjs/scripts/vite-build/constants.js +1 -0
- package/cjs/scripts/vite-build/dts.js +1 -0
- package/cjs/scripts/vite-build/index.js +1 -0
- package/cjs/scripts/vite-build/normalize.js +1 -0
- package/cjs/scripts/vite-build/plugins.js +1 -0
- package/cjs/scripts/vite-build/resolve.js +1 -0
- package/cjs/scripts/vite-build/types.js +0 -0
- package/cjs/scripts/vite-build/utils.js +1 -0
- package/esm/app/controller/project.js +7 -2
- package/esm/app/controller/view.js +33 -20
- package/esm/app/{extend → extends}/$fetch.js +1 -1
- package/esm/app/extends/crypto.js +31 -0
- package/esm/app/{extend → extends}/db.js +2 -2
- package/esm/app/{extend → extends}/generateErrorMessage.js +1 -1
- package/esm/app/extends/localCacheHtmlEtag.js +41 -0
- package/esm/app/{extend → extends}/logger.js +1 -1
- package/esm/app/{extend → extends}/parsingParamsOnUrl.js +1 -1
- package/esm/app/extends/render-view.js +18 -0
- package/esm/app/middleware.js +13 -12
- package/esm/app/{middleware → middlewares}/api-params-verify.js +2 -2
- package/esm/app/{middleware → middlewares}/api-sign-verify.js +2 -2
- package/esm/app/{middleware → middlewares}/error-handle.js +2 -2
- package/esm/app/middlewares/project-handler.js +15 -0
- package/esm/app/middlewares/request-parameter-parsing.js +18 -0
- package/esm/app/router/project.js +2 -2
- package/esm/app/view/entry.tpl +3 -0
- package/esm/bundler/buildBE.js +54 -0
- package/esm/bundler/defaultRouteGuard.js +4 -0
- package/esm/bundler/index.js +10 -13
- package/esm/bundler/state.js +5 -1
- package/esm/bundler/utils.js +160 -92
- package/esm/config/config.default.js +4 -0
- package/esm/packages/common/index.js +6 -6
- package/esm/packages/common/string/index.js +11 -2
- package/esm/packages/core/env.js +1 -1
- package/esm/packages/core/index.js +34 -24
- package/esm/packages/core/loader/controller.js +6 -6
- package/esm/packages/core/loader/extend.js +6 -6
- package/esm/packages/core/loader/middleware.js +6 -6
- package/esm/packages/core/loader/router-schema.js +7 -7
- package/esm/packages/core/loader/router.js +18 -15
- package/esm/packages/core/loader/service.js +6 -6
- package/esm/packages/utils/runFileFn.js +10 -10
- package/esm/scripts/vite-build/build.js +141 -0
- package/esm/scripts/vite-build/collect.js +79 -0
- package/esm/scripts/vite-build/constants.js +34 -0
- package/esm/scripts/vite-build/dts.js +132 -0
- package/esm/scripts/vite-build/index.js +3 -0
- package/esm/scripts/vite-build/normalize.js +78 -0
- package/esm/scripts/vite-build/plugins.js +106 -0
- package/esm/scripts/vite-build/resolve.js +46 -0
- package/esm/scripts/vite-build/types.js +0 -0
- package/esm/scripts/vite-build/utils.js +24 -0
- package/fe/frontend/apps/dash/Dashboard.d.ts +0 -1
- package/fe/frontend/apps/dash/Dashboard.js +178 -169
- package/fe/frontend/apps/dash/dash.entry.d.ts +0 -1
- package/fe/frontend/apps/dash/dash.entry.js +58 -78
- package/fe/frontend/apps/dash/types.d.ts +16 -14
- package/fe/frontend/apps/dash/types.js +0 -1
- package/fe/frontend/apps/ui-components/index.d.ts +0 -1
- package/fe/frontend/apps/ui-components/index.js +7 -7
- package/fe/frontend/apps/ui-components/ui-components.entry.d.ts +0 -1
- package/fe/frontend/apps/ui-components/ui-components.entry.js +7 -5
- package/fe/frontend/extended/SchemaForm/data.d.ts +1 -5
- package/fe/frontend/extended/SchemaForm/data.js +7 -7
- package/fe/frontend/src/api/baseInfo.d.ts +1 -2
- package/fe/frontend/src/api/baseInfo.js +12 -13
- package/fe/frontend/src/common/CRUD/CRUD.d.ts +2 -3
- package/fe/frontend/src/common/CRUD/CRUD.js +2 -2
- package/fe/frontend/src/common/CRUD/index.d.ts +1 -2
- package/fe/frontend/src/common/CRUD/index.js +2 -1
- package/fe/frontend/src/common/auth/index.d.ts +6 -2
- package/fe/frontend/src/common/auth/index.js +23 -16
- package/fe/frontend/src/common/fetchErrorShow.d.ts +1 -2
- package/fe/frontend/src/common/fetchErrorShow.js +10 -8
- package/fe/frontend/src/common/generateMenuData.d.ts +2 -3
- package/fe/frontend/src/common/generateMenuData.js +15 -12
- package/fe/frontend/src/common/importComponent.d.ts +1 -2
- package/fe/frontend/src/common/importComponent.js +21 -9
- package/fe/frontend/src/common/language.d.ts +1 -2
- package/fe/frontend/src/common/language.js +11 -10
- package/fe/frontend/src/common/logFn/index.d.ts +0 -1
- package/fe/frontend/src/common/logFn/index.js +11 -8
- package/fe/frontend/src/common/menu.d.ts +1 -14
- package/fe/frontend/src/common/menu.js +94 -98
- package/fe/frontend/src/common/request.d.ts +2 -6
- package/fe/frontend/src/common/request.js +159 -195
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +3 -4
- package/fe/frontend/src/components/AsyncSelect/AsyncSelect.js +35 -31
- package/fe/frontend/src/components/AsyncSelect/index.d.ts +2 -3
- package/fe/frontend/src/components/AsyncSelect/index.js +5 -3
- package/fe/frontend/src/components/BasePage/HeaderView.d.ts +1 -2
- package/fe/frontend/src/components/BasePage/HeaderView.js +53 -17
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.d.ts +14 -5
- package/fe/frontend/src/components/LanguageSwitch/LanguageSwitch.js +80 -31
- package/fe/frontend/src/components/LanguageSwitch/index.d.ts +2 -3
- package/fe/frontend/src/components/LanguageSwitch/index.js +5 -3
- package/fe/frontend/src/components/Router/index.d.ts +2 -3
- package/fe/frontend/src/components/Router/index.js +20 -10
- package/fe/frontend/src/components/Router/type.d.ts +0 -1
- package/fe/frontend/src/components/Router/type.js +0 -1
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.d.ts +0 -1
- package/fe/frontend/src/components/ThemeSwitch/ThemeSwitch.js +83 -55
- package/fe/frontend/src/components/ThemeSwitch/index.d.ts +2 -3
- package/fe/frontend/src/components/ThemeSwitch/index.js +5 -3
- package/fe/frontend/src/components/index.d.ts +10 -11
- package/fe/frontend/src/components/index.js +7 -10
- package/fe/frontend/src/defaultPages/Iframe/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/Iframe/index.js +14 -7
- package/fe/frontend/src/defaultPages/NotFoundPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/NotFoundPage/index.js +27 -6
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.js +97 -90
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.js +116 -127
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +2 -18
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.js +9 -6
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/components/CallCom/data.js +8 -5
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaSearch/index.js +60 -61
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.d.ts +2 -3
- package/fe/frontend/src/defaultPages/SchemaPage/components/SchemaTable/index.js +199 -186
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/data/eventInfo.js +8 -5
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/data/index.js +4 -1
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.js +16 -13
- package/fe/frontend/src/defaultPages/SchemaPage/index.css +1 -26
- package/fe/frontend/src/defaultPages/SchemaPage/index.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/index.js +89 -76
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +4 -14
- package/fe/frontend/src/defaultPages/SchemaPage/schemaType.js +7 -4
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SchemaPage/utils/permissions.js +6 -3
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.d.ts +1 -2
- package/fe/frontend/src/defaultPages/SchemaPage/utils/schemaConversion.js +63 -112
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +1 -5
- package/fe/frontend/src/defaultPages/SchemaPage/utils/validator.js +116 -165
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.d.ts +2 -3
- package/fe/frontend/src/defaultPages/SidebarSlotPage/SidebarSlotContainer.js +54 -37
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SidebarSlotPage/index.js +20 -16
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SidebarSlotPageTmp.js +20 -16
- package/fe/frontend/src/defaultPages/SlotPage/index.d.ts +0 -1
- package/fe/frontend/src/defaultPages/SlotPage/index.js +21 -26
- package/fe/frontend/src/exportStore.d.ts +4 -17
- package/fe/frontend/src/exportStore.js +5 -16
- package/fe/frontend/src/hooks/useCurrentMenuData.d.ts +1 -10
- package/fe/frontend/src/hooks/useCurrentMenuData.js +28 -26
- package/fe/frontend/src/hooks/useRouterParams.d.ts +0 -1
- package/fe/frontend/src/hooks/useRouterParams.js +15 -10
- package/fe/frontend/src/index.d.ts +13 -21
- package/fe/frontend/src/index.js +20 -18
- package/fe/frontend/src/language/en-US.d.ts +0 -1
- package/fe/frontend/src/language/en-US.js +89 -88
- package/fe/frontend/src/language/index.d.ts +1 -2
- package/fe/frontend/src/language/index.js +77 -74
- package/fe/frontend/src/language/zh-CN.d.ts +0 -1
- package/fe/frontend/src/language/zh-CN.js +89 -88
- package/fe/frontend/src/main.css +1 -1
- package/fe/frontend/src/main.d.ts +13 -20
- package/fe/frontend/src/main.js +75 -70
- package/fe/frontend/src/stores/apiFreezer.d.ts +1 -68
- package/fe/frontend/src/stores/apiFreezer.js +50 -46
- package/fe/frontend/src/stores/mode.d.ts +2 -6
- package/fe/frontend/src/stores/mode.js +35 -36
- package/fe/frontend/src/stores/schemaEventBus.d.ts +1 -21
- package/fe/frontend/src/stores/schemaEventBus.js +52 -69
- package/fe/frontend/src/stores/schemaStore.d.ts +5 -20
- package/fe/frontend/src/stores/schemaStore.js +27 -25
- package/fe/frontend/src/typing/scalability.d.ts +3 -35
- package/fe/frontend/src/typing/scalability.js +0 -1
- package/fe/frontend/src/typing/window.d.ts +0 -1
- package/fe/frontend/src/typing/window.js +0 -1
- package/fe/model/types/data/button.d.ts +2 -12
- package/fe/model/types/data/component.d.ts +4 -14
- package/fe/model/types/data/fetchInfo.d.ts +0 -13
- package/fe/model/types/data/schema.d.ts +6 -58
- package/fe/model/types/data/search.d.ts +1 -2
- package/{model → fe/model}/types/index.d.ts +2 -3
- package/fe/model/types/menuType.d.ts +0 -30
- package/fe/model/types/model.d.ts +1 -15
- package/fe/packages/common/LRUCache.d.ts +1 -0
- package/fe/packages/common/array/index.d.ts +0 -1
- package/fe/packages/common/cache/LRUCache.d.ts +0 -1
- package/fe/packages/common/cache/LRUCache.js +43 -47
- package/fe/packages/common/cache/index.d.ts +0 -1
- package/fe/packages/common/guards/index.d.ts +0 -1
- package/fe/packages/common/guards/index.js +8 -24
- package/fe/packages/common/http/index.d.ts +0 -1
- package/fe/packages/common/http/index.js +272 -282
- package/fe/packages/common/i18n/default.d.ts +0 -6
- package/fe/packages/common/i18n/default.js +91 -88
- package/fe/packages/common/i18n/en-US.d.ts +0 -6
- package/fe/packages/common/i18n/en-US.js +91 -88
- package/fe/packages/common/i18n/index.d.ts +3 -28
- package/fe/packages/common/i18n/index.js +142 -153
- package/fe/packages/common/i18n/locales.d.ts +3 -4
- package/fe/packages/common/i18n/locales.js +10 -9
- package/fe/packages/common/i18n/types.d.ts +0 -25
- package/fe/packages/common/index.d.ts +0 -1
- package/fe/packages/common/log/index.d.ts +0 -1
- package/fe/packages/common/number/index.d.ts +0 -1
- package/fe/packages/common/object/filterEmpty.d.ts +0 -1
- package/fe/packages/common/object/filterEmpty.js +25 -30
- package/fe/packages/common/object/filtereEmpty.d.ts +1 -0
- package/fe/packages/common/object/index.d.ts +0 -1
- package/fe/packages/common/string/index.d.ts +9 -1
- package/fe/packages/common/types/index.d.ts +0 -1
- package/fe/packages/{ui/react → react}/hooks/useBreadcrumb.d.ts +3 -4
- package/fe/packages/react/hooks/useBreadcrumb.js +5 -0
- package/fe/packages/react/hooks/useExecuteOnce.d.ts +11 -0
- package/fe/packages/react/hooks/useExecuteOnce.js +47 -0
- package/fe/packages/{ui/react → react}/hooks/useInit.d.ts +0 -1
- package/fe/packages/react/hooks/useInit.js +11 -0
- package/fe/packages/react/hooks/useLanguage.d.ts +1 -0
- package/fe/packages/react/hooks/useLanguage.js +8 -0
- package/fe/packages/{ui/react → react}/hooks/usePagination.d.ts +0 -1
- package/fe/packages/react/hooks/usePagination.js +30 -0
- package/fe/packages/{ui/react → react}/hooks/useRefState.d.ts +1 -14
- package/fe/packages/react/hooks/useRefState.js +35 -0
- package/fe/packages/{ui/react → react}/hooks/useWatch.d.ts +0 -9
- package/fe/packages/react/hooks/useWatch.js +60 -0
- package/fe/packages/react/hooks/useWatch.test.js +24 -0
- package/fe/packages/react/ui/assets/table/no-result.js +4 -0
- package/fe/packages/{ui/react → react/ui}/components/Button/Button.d.ts +1 -35
- package/fe/packages/react/ui/components/Button/Button.js +88 -0
- package/fe/packages/{ui/react → react/ui}/components/Button/SubmitButton.d.ts +2 -7
- package/fe/packages/react/ui/components/Button/SubmitButton.js +30 -0
- package/fe/packages/react/ui/components/Button/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Button/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Card/Card.d.ts +1 -6
- package/fe/packages/react/ui/components/Card/Card.js +31 -0
- package/fe/packages/react/ui/components/Card/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Card/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Checkbox/Checkbox.d.ts +1 -2
- package/fe/packages/react/ui/components/Checkbox/Checkbox.js +52 -0
- package/fe/packages/react/ui/components/Checkbox/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Checkbox/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/ConfirmDialog/ConfirmDialog.d.ts +0 -9
- package/fe/packages/react/ui/components/ConfirmDialog/ConfirmDialog.js +41 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -0
- package/fe/packages/react/ui/components/ConfirmDialog/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/ActionBtn.d.ts +1 -2
- package/fe/packages/react/ui/components/DataTable/ActionBtn.js +116 -0
- package/fe/packages/{ui/react → react/ui}/components/DataTable/index.d.ts +8 -28
- package/fe/packages/react/ui/components/DataTable/index.js +235 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Calendar.d.ts +2 -16
- package/fe/packages/react/ui/components/Date/Calendar.js +351 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/Date.d.ts +0 -12
- package/fe/packages/react/ui/components/Date/Date.js +210 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/DateTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/DateTestPage.js +340 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.d.ts +1 -0
- package/fe/packages/react/ui/components/Date/LocaleContext.js +11 -0
- package/fe/packages/react/ui/components/Date/LocaleProvider.d.ts +7 -0
- package/fe/packages/react/ui/components/Date/LocaleProvider.js +31 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/TimePicker.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/TimePicker.js +136 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/data.d.ts +0 -1
- package/fe/packages/react/ui/components/Date/data.js +7 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/dateLocaleStore.d.ts +1 -8
- package/fe/packages/react/ui/components/Date/dateLocaleStore.js +14 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/ui/components/Date/dropdownPositioning.js +12 -0
- package/fe/packages/react/ui/components/Date/index.d.ts +5 -0
- package/fe/packages/react/ui/components/Date/index.js +6 -0
- package/fe/packages/{ui/react → react/ui}/components/Date/locales.d.ts +0 -20
- package/fe/packages/react/ui/components/Date/locales.js +25 -0
- package/fe/packages/{ui/react → react/ui}/components/Drawer/Drawer.d.ts +1 -8
- package/fe/packages/react/ui/components/Drawer/Drawer.js +151 -0
- package/fe/packages/react/ui/components/Drawer/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Drawer/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Dropdown/Dropdown.d.ts +2 -4
- package/fe/packages/react/ui/components/Dropdown/Dropdown.js +105 -0
- package/fe/packages/react/ui/components/Dropdown/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Dropdown/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/Form.d.ts +2 -9
- package/fe/packages/react/ui/components/Form/Form.js +15 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/FormItem.d.ts +3 -25
- package/fe/packages/react/ui/components/Form/FormItem.js +60 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/SchemaForm/data.d.ts +8 -9
- package/fe/packages/react/ui/components/Form/SchemaForm/data.js +16 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.d.ts +3 -0
- package/fe/packages/react/ui/components/Form/SchemaForm/defaultComponentsMap.js +4 -0
- package/fe/packages/{ui/react → react/ui}/components/Form/SchemaForm/index.d.ts +9 -103
- package/fe/packages/react/ui/components/Form/SchemaForm/index.js +119 -0
- package/fe/packages/react/ui/components/Form/index.d.ts +4 -0
- package/fe/packages/react/ui/components/Form/index.js +5 -0
- package/fe/packages/react/ui/components/Form/useForm.d.ts +2 -0
- package/fe/packages/react/ui/components/Form/useForm.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/ImagePreview.d.ts +0 -1
- package/fe/packages/react/ui/components/ImagePreview/ImagePreview.js +307 -0
- package/fe/packages/{ui/react → react/ui}/components/ImagePreview/PreviewImage.d.ts +2 -6
- package/fe/packages/react/ui/components/ImagePreview/PreviewImage.js +56 -0
- package/fe/packages/react/ui/components/ImagePreview/index.d.ts +2 -0
- package/fe/packages/react/ui/components/ImagePreview/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Input/Input.d.ts +1 -24
- package/fe/packages/react/ui/components/Input/Input.js +142 -0
- package/fe/packages/react/ui/components/Input/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Input/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/InputNumber/InputNumber.d.ts +2 -5
- package/fe/packages/react/ui/components/InputNumber/InputNumber.js +207 -0
- package/fe/packages/react/ui/components/InputNumber/index.d.ts +1 -0
- package/fe/packages/react/ui/components/InputNumber/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/InputNumber/inputNumberUtils.d.ts +0 -1
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.js +45 -0
- package/fe/packages/react/ui/components/InputNumber/inputNumberUtils.test.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Label/Label.d.ts +1 -31
- package/fe/packages/react/ui/components/Label/Label.js +58 -0
- package/fe/packages/react/ui/components/Label/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Label/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Layout/Layout.d.ts +1 -2
- package/fe/packages/react/ui/components/Layout/Layout.js +33 -0
- package/fe/packages/react/ui/components/Layout/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Layout/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Loading/Loading.d.ts +1 -13
- package/fe/packages/react/ui/components/Loading/Loading.js +48 -0
- package/fe/packages/react/ui/components/Loading/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Loading/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/Menu.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/Menu.js +147 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/MenuContext.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/MenuContext.js +88 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/MenuItem.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/MenuItem.js +78 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.d.ts +2 -0
- package/fe/packages/react/ui/components/Menu/SubMenu.js +207 -0
- package/fe/packages/react/ui/components/Menu/index.d.ts +8 -0
- package/fe/packages/react/ui/components/Menu/index.js +5 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/menuTypes.d.ts +1 -3
- package/fe/packages/react/ui/components/Menu/menuTypes.js +0 -0
- package/fe/packages/{ui/react → react/ui}/components/Menu/utils.d.ts +0 -1
- package/fe/packages/react/ui/components/Menu/utils.js +8 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/Message.d.ts +1 -9
- package/fe/packages/react/ui/components/Message/Message.js +76 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/MessageManager.d.ts +2 -3
- package/fe/packages/react/ui/components/Message/MessageManager.js +104 -0
- package/fe/packages/{ui/react → react/ui}/components/Message/data.d.ts +0 -1
- package/fe/packages/react/ui/components/Message/data.js +4 -0
- package/fe/packages/react/ui/components/Message/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Message/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/Modal.d.ts +1 -8
- package/fe/packages/react/ui/components/Modal/Modal.js +59 -0
- package/fe/packages/{ui/react → react/ui}/components/Modal/ModalManager.d.ts +3 -16
- package/fe/packages/react/ui/components/Modal/ModalManager.js +106 -0
- package/fe/packages/react/ui/components/Modal/index.d.ts +3 -0
- package/fe/packages/react/ui/components/Modal/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Notification/Notification.d.ts +1 -2
- package/fe/packages/react/ui/components/Notification/Notification.js +56 -0
- package/fe/packages/react/ui/components/Notification/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Notification/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Overlay/Overlay.d.ts +1 -5
- package/fe/packages/react/ui/components/Overlay/Overlay.js +61 -0
- package/fe/packages/react/ui/components/Overlay/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Overlay/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Pagination/Pagination.d.ts +0 -8
- package/fe/packages/react/ui/components/Pagination/Pagination.js +115 -0
- package/fe/packages/react/ui/components/Pagination/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Pagination/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Popup/Popup.d.ts +0 -1
- package/fe/packages/react/ui/components/Popup/Popup.js +86 -0
- package/fe/packages/react/ui/components/Popup/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Popup/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Radio/Radio.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/Radio.js +36 -0
- package/fe/packages/{ui/react → react/ui}/components/Radio/RadioGroup.d.ts +1 -2
- package/fe/packages/react/ui/components/Radio/RadioGroup.js +33 -0
- package/fe/packages/react/ui/components/Radio/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Radio/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/Search/Search.d.ts +4 -8
- package/fe/packages/react/ui/components/Search/Search.js +24 -0
- package/fe/packages/react/ui/components/Search/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Search/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Select/Select.d.ts +2 -7
- package/fe/packages/react/ui/components/Select/Select.js +282 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.d.ts +2 -0
- package/fe/packages/react/ui/components/Select/dropdownPositioning.js +16 -0
- package/fe/packages/react/ui/components/Select/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Select/index.js +2 -0
- package/fe/packages/react/ui/components/Skeleton/Skeleton.d.ts +12 -0
- package/fe/packages/react/ui/components/Skeleton/Skeleton.js +101 -0
- package/fe/packages/react/ui/components/Skeleton/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Skeleton/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Switch/Switch.d.ts +1 -2
- package/fe/packages/react/ui/components/Switch/Switch.js +28 -0
- package/fe/packages/react/ui/components/Switch/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Switch/index.js +2 -0
- package/fe/packages/react/ui/components/TableSearch/TableSearch.d.ts +30 -0
- package/fe/packages/react/ui/components/TableSearch/TableSearch.js +146 -0
- package/fe/packages/react/ui/components/TableSearch/index.d.ts +2 -0
- package/fe/packages/react/ui/components/TableSearch/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/lang.d.ts +0 -1
- package/fe/packages/react/ui/components/TableSearch/lang.js +14 -0
- package/fe/packages/{ui/react → react/ui}/components/TableSearch/tableSearchLocaleStore.d.ts +1 -2
- package/fe/packages/react/ui/components/TableSearch/tableSearchLocaleStore.js +10 -0
- package/fe/packages/{ui/react → react/ui}/components/Tabs/Tabs.d.ts +1 -2
- package/fe/packages/react/ui/components/Tabs/Tabs.js +33 -0
- package/fe/packages/react/ui/components/Tabs/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Tabs/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Textarea/Textarea.d.ts +0 -47
- package/fe/packages/react/ui/components/Textarea/Textarea.js +58 -0
- package/fe/packages/react/ui/components/Textarea/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Textarea/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Tooltip/Tooltip.d.ts +0 -17
- package/fe/packages/react/ui/components/Tooltip/Tooltip.js +77 -0
- package/fe/packages/react/ui/components/Tooltip/index.d.ts +1 -0
- package/fe/packages/react/ui/components/Tooltip/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/TreeSelect/TreeSelect.d.ts +0 -7
- package/fe/packages/react/ui/components/TreeSelect/TreeSelect.js +190 -0
- package/fe/packages/react/ui/components/TreeSelect/index.d.ts +1 -0
- package/fe/packages/react/ui/components/TreeSelect/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/Upload/ImageUpload.d.ts +0 -1
- package/fe/packages/react/ui/components/Upload/ImageUpload.js +101 -0
- package/fe/packages/react/ui/components/Upload/Upload.d.ts +13 -0
- package/fe/packages/react/ui/components/Upload/Upload.js +29 -0
- package/fe/packages/react/ui/components/Upload/index.d.ts +2 -0
- package/fe/packages/react/ui/components/Upload/index.js +3 -0
- package/fe/packages/{ui/react → react/ui}/components/breadcrumb/breadcrumb.d.ts +0 -1
- package/fe/packages/react/ui/components/breadcrumb/breadcrumb.js +155 -0
- package/fe/packages/react/ui/components/breadcrumb/index.d.ts +1 -0
- package/fe/packages/react/ui/components/breadcrumb/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/hooks/useDropdownPositioning.d.ts +0 -7
- package/fe/packages/react/ui/components/hooks/useDropdownPositioning.js +121 -0
- package/fe/packages/{ui/react → react/ui}/components/hooks/useInputController.d.ts +0 -4
- package/fe/packages/react/ui/components/hooks/useInputController.js +39 -0
- package/fe/packages/react/ui/components/index.d.ts +35 -0
- package/fe/packages/react/ui/components/index.js +81 -0
- package/fe/packages/react/ui/components/table/index.d.ts +1 -0
- package/fe/packages/react/ui/components/table/index.js +2 -0
- package/fe/packages/{ui/react → react/ui}/components/table/table.d.ts +1 -2
- package/fe/packages/react/ui/components/table/table.js +166 -0
- package/fe/packages/{ui/react → react/ui}/components/testPage/MenuTestPage.d.ts +0 -1
- package/fe/packages/react/ui/components/testPage/MenuTestPage.js +397 -0
- package/fe/packages/{ui/react → react/ui}/components/testPage/index.d.ts +0 -1
- package/fe/packages/react/ui/components/testPage/index.js +1638 -0
- package/fe/packages/react/ui/i18n/I18nProvider.d.ts +12 -0
- package/fe/packages/react/ui/i18n/I18nProvider.js +38 -0
- package/fe/packages/react/ui/i18n/index.d.ts +3 -0
- package/fe/packages/react/ui/i18n/index.js +7 -0
- package/fe/packages/react/ui/i18n/useI18n.d.ts +8 -0
- package/fe/packages/react/ui/i18n/useI18n.js +25 -0
- package/fe/packages/react/ui/index.d.ts +4 -0
- package/fe/packages/react/ui/index.js +58 -0
- package/fe/packages/{ui/react → react/ui}/lib/createStoreHook.d.ts +1 -2
- package/fe/packages/react/ui/lib/createStoreHook.js +9 -0
- package/fe/packages/react/ui/lib/export.d.ts +21 -0
- package/fe/packages/react/ui/lib/export.js +112 -0
- package/fe/packages/react/ui/lib/utils.d.ts +9 -0
- package/fe/packages/react/ui/lib/utils.js +64 -0
- package/fe/packages/{ui/react → react/ui}/stores/breadcrumb.d.ts +1 -2
- package/fe/packages/react/ui/stores/breadcrumb.js +52 -0
- package/fe/packages/react/ui/stores/language.d.ts +3 -0
- package/fe/packages/react/ui/stores/language.js +4 -0
- package/fe/packages/{ui/react → react/ui}/types/index.d.ts +0 -1
- package/fe/packages/react/ui/types/index.js +0 -0
- package/fe/typings/type.d.ts +0 -1
- package/model/frontend/extended/SchemaForm/data.d.ts +9 -0
- package/model/frontend/src/common/auth/index.d.ts +11 -0
- package/model/frontend/src/common/fetchErrorShow.d.ts +2 -0
- package/model/frontend/src/common/language.d.ts +2 -0
- package/model/frontend/src/common/logFn/index.d.ts +4 -0
- package/model/frontend/src/common/request.d.ts +33 -0
- package/model/frontend/src/components/AsyncSelect/AsyncSelect.d.ts +7 -0
- package/model/frontend/src/components/AsyncSelect/index.d.ts +3 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/DetailPanel.d.ts +6 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/PopFrom.d.ts +12 -0
- package/model/frontend/src/defaultPages/SchemaPage/components/CallCom/builtIn.d.ts +28 -0
- package/model/frontend/src/defaultPages/SchemaPage/data/eventInfo.d.ts +7 -0
- package/model/frontend/src/defaultPages/SchemaPage/data/index.d.ts +2 -0
- package/model/frontend/src/defaultPages/SchemaPage/hooks/useComConfig.d.ts +9 -0
- package/model/frontend/src/defaultPages/SchemaPage/schemaType.d.ts +41 -0
- package/model/frontend/src/defaultPages/SchemaPage/utils/permissions.d.ts +2 -0
- package/model/frontend/src/defaultPages/SchemaPage/utils/validator.d.ts +7 -0
- package/model/frontend/src/language/en-US.d.ts +88 -0
- package/model/frontend/src/language/index.d.ts +72 -0
- package/model/frontend/src/language/zh-CN.d.ts +88 -0
- package/model/frontend/src/stores/apiFreezer.d.ts +26 -0
- package/model/frontend/src/stores/schemaEventBus.d.ts +22 -0
- package/model/frontend/src/stores/schemaStore.d.ts +32 -0
- package/model/frontend/src/typing/scalability.d.ts +15 -0
- package/model/frontend/src/typing/window.d.ts +8 -0
- package/model/{index.d.ts → model/index.d.ts} +1 -2
- package/model/{types → model/types}/data/button.d.ts +2 -12
- package/model/{types → model/types}/data/component.d.ts +4 -14
- package/model/model/types/data/fetchInfo.d.ts +7 -0
- package/model/model/types/data/schema.d.ts +46 -0
- package/model/{types → model/types}/data/search.d.ts +1 -2
- package/model/model/types/index.d.ts +2 -0
- package/model/{types → model/types}/menuType.d.ts +0 -30
- package/model/{types → model/types}/model.d.ts +1 -15
- package/model/packages/common/array/index.d.ts +6 -0
- package/model/packages/common/cache/LRUCache.d.ts +12 -0
- package/model/packages/common/guards/index.d.ts +8 -0
- package/model/packages/common/http/index.d.ts +89 -0
- package/model/packages/common/i18n/default.d.ts +86 -0
- package/model/packages/common/i18n/en-US.d.ts +86 -0
- package/model/packages/common/i18n/index.d.ts +18 -0
- package/model/packages/common/i18n/locales.d.ts +7 -0
- package/model/packages/common/i18n/types.d.ts +46 -0
- package/model/packages/common/log/index.d.ts +32 -0
- package/model/packages/common/number/index.d.ts +2 -0
- package/model/packages/common/object/filterEmpty.d.ts +2 -0
- package/model/packages/common/object/index.d.ts +4 -0
- package/model/packages/common/string/index.d.ts +12 -0
- package/model/packages/common/types/index.d.ts +3 -0
- package/model/packages/react/hooks/useBreadcrumb.d.ts +9 -0
- package/model/packages/react/hooks/useExecuteOnce.d.ts +11 -0
- package/model/packages/react/hooks/useLanguage.d.ts +1 -0
- package/model/packages/react/ui/components/Button/Button.d.ts +24 -0
- package/model/packages/react/ui/components/Button/SubmitButton.d.ts +8 -0
- package/model/packages/react/ui/components/Button/index.d.ts +3 -0
- package/model/packages/react/ui/components/Card/Card.d.ts +10 -0
- package/model/packages/react/ui/components/Card/index.d.ts +1 -0
- package/model/packages/react/ui/components/Checkbox/Checkbox.d.ts +16 -0
- package/model/packages/react/ui/components/Checkbox/index.d.ts +1 -0
- package/model/packages/react/ui/components/ConfirmDialog/ConfirmDialog.d.ts +11 -0
- package/model/packages/react/ui/components/ConfirmDialog/index.d.ts +1 -0
- package/model/packages/react/ui/components/DataTable/ActionBtn.d.ts +7 -0
- package/model/packages/react/ui/components/DataTable/index.d.ts +32 -0
- package/model/packages/react/ui/components/Date/Calendar.d.ts +21 -0
- package/model/packages/react/ui/components/Date/Date.d.ts +26 -0
- package/model/packages/react/ui/components/Date/LocaleContext.d.ts +1 -0
- package/model/packages/react/ui/components/Date/LocaleProvider.d.ts +7 -0
- package/model/packages/react/ui/components/Date/TimePicker.d.ts +6 -0
- package/model/packages/react/ui/components/Date/data.d.ts +5 -0
- package/model/packages/react/ui/components/Date/dateLocaleStore.d.ts +9 -0
- package/model/packages/react/ui/components/Date/dropdownPositioning.d.ts +2 -0
- package/model/packages/react/ui/components/Date/index.d.ts +5 -0
- package/model/packages/react/ui/components/Date/locales.d.ts +23 -0
- package/model/packages/react/ui/components/Drawer/Drawer.d.ts +22 -0
- package/model/packages/react/ui/components/Drawer/index.d.ts +2 -0
- package/model/packages/react/ui/components/Dropdown/Dropdown.d.ts +24 -0
- package/model/packages/react/ui/components/Dropdown/index.d.ts +1 -0
- package/model/packages/react/ui/components/Form/Form.d.ts +11 -0
- package/model/packages/react/ui/components/Form/FormItem.d.ts +19 -0
- package/model/packages/react/ui/components/Form/SchemaForm/data.d.ts +39 -0
- package/model/packages/react/ui/components/Form/SchemaForm/index.d.ts +59 -0
- package/model/packages/react/ui/components/Form/index.d.ts +4 -0
- package/model/packages/react/ui/components/Form/useForm.d.ts +2 -0
- package/model/packages/react/ui/components/ImagePreview/ImagePreview.d.ts +7 -0
- package/model/packages/react/ui/components/ImagePreview/PreviewImage.d.ts +7 -0
- package/model/packages/react/ui/components/ImagePreview/index.d.ts +2 -0
- package/model/packages/react/ui/components/Input/Input.d.ts +22 -0
- package/model/packages/react/ui/components/Input/index.d.ts +1 -0
- package/model/packages/react/ui/components/InputNumber/InputNumber.d.ts +25 -0
- package/model/packages/react/ui/components/InputNumber/index.d.ts +1 -0
- package/model/packages/react/ui/components/InputNumber/inputNumberUtils.d.ts +29 -0
- package/model/packages/react/ui/components/Label/Label.d.ts +21 -0
- package/model/packages/react/ui/components/Label/index.d.ts +2 -0
- package/model/packages/react/ui/components/Layout/Layout.d.ts +10 -0
- package/model/packages/react/ui/components/Layout/index.d.ts +1 -0
- package/model/packages/react/ui/components/Loading/Loading.d.ts +13 -0
- package/model/packages/react/ui/components/Loading/index.d.ts +1 -0
- package/model/packages/react/ui/components/Menu/Menu.d.ts +17 -0
- package/model/packages/react/ui/components/Menu/MenuContext.d.ts +38 -0
- package/model/packages/react/ui/components/Menu/MenuItem.d.ts +2 -0
- package/model/packages/react/ui/components/Menu/SubMenu.d.ts +2 -0
- package/model/packages/react/ui/components/Menu/index.d.ts +8 -0
- package/model/packages/react/ui/components/Menu/menuTypes.d.ts +57 -0
- package/model/packages/react/ui/components/Menu/utils.d.ts +1 -0
- package/model/packages/react/ui/components/Message/Message.d.ts +12 -0
- package/model/packages/react/ui/components/Message/MessageManager.d.ts +36 -0
- package/model/packages/react/ui/components/Message/data.d.ts +1 -0
- package/model/packages/react/ui/components/Message/index.d.ts +2 -0
- package/model/packages/react/ui/components/Modal/Modal.d.ts +20 -0
- package/model/packages/react/ui/components/Modal/ModalManager.d.ts +46 -0
- package/model/packages/react/ui/components/Modal/index.d.ts +3 -0
- package/model/packages/react/ui/components/Notification/Notification.d.ts +13 -0
- package/model/packages/react/ui/components/Notification/index.d.ts +1 -0
- package/model/packages/react/ui/components/Overlay/Overlay.d.ts +19 -0
- package/model/packages/react/ui/components/Overlay/index.d.ts +2 -0
- package/model/packages/react/ui/components/Pagination/Pagination.d.ts +10 -0
- package/model/packages/react/ui/components/Pagination/index.d.ts +1 -0
- package/model/packages/react/ui/components/Popup/Popup.d.ts +25 -0
- package/model/packages/react/ui/components/Popup/index.d.ts +1 -0
- package/model/packages/react/ui/components/Radio/Radio.d.ts +8 -0
- package/model/packages/react/ui/components/Radio/RadioGroup.d.ts +18 -0
- package/model/packages/react/ui/components/Radio/index.d.ts +2 -0
- package/model/packages/react/ui/components/Search/Search.d.ts +13 -0
- package/model/packages/react/ui/components/Search/index.d.ts +1 -0
- package/model/packages/react/ui/components/Select/Select.d.ts +21 -0
- package/model/packages/react/ui/components/Select/dropdownPositioning.d.ts +2 -0
- package/model/packages/react/ui/components/Select/index.d.ts +1 -0
- package/model/packages/react/ui/components/Skeleton/Skeleton.d.ts +12 -0
- package/model/packages/react/ui/components/Skeleton/index.d.ts +2 -0
- package/model/packages/react/ui/components/Switch/Switch.d.ts +10 -0
- package/model/packages/react/ui/components/Switch/index.d.ts +1 -0
- package/model/packages/react/ui/components/TableSearch/TableSearch.d.ts +30 -0
- package/model/packages/react/ui/components/TableSearch/index.d.ts +2 -0
- package/model/packages/react/ui/components/TableSearch/lang.d.ts +14 -0
- package/model/packages/react/ui/components/TableSearch/tableSearchLocaleStore.d.ts +8 -0
- package/model/packages/react/ui/components/Tabs/Tabs.d.ts +15 -0
- package/model/packages/react/ui/components/Tabs/index.d.ts +1 -0
- package/model/packages/react/ui/components/Textarea/Textarea.d.ts +20 -0
- package/model/packages/react/ui/components/Textarea/index.d.ts +1 -0
- package/model/packages/react/ui/components/Tooltip/Tooltip.d.ts +8 -0
- package/model/packages/react/ui/components/Tooltip/index.d.ts +1 -0
- package/model/packages/react/ui/components/TreeSelect/TreeSelect.d.ts +18 -0
- package/model/packages/react/ui/components/TreeSelect/index.d.ts +1 -0
- package/model/packages/react/ui/components/Upload/ImageUpload.d.ts +8 -0
- package/model/packages/react/ui/components/Upload/Upload.d.ts +13 -0
- package/model/packages/react/ui/components/Upload/index.d.ts +2 -0
- package/model/packages/react/ui/components/breadcrumb/breadcrumb.d.ts +34 -0
- package/model/packages/react/ui/components/breadcrumb/index.d.ts +1 -0
- package/model/packages/react/ui/components/hooks/useDropdownPositioning.d.ts +42 -0
- package/model/packages/react/ui/components/hooks/useInputController.d.ts +20 -0
- package/model/packages/react/ui/components/index.d.ts +35 -0
- package/model/packages/react/ui/components/table/index.d.ts +1 -0
- package/model/packages/react/ui/components/table/table.d.ts +29 -0
- package/model/packages/react/ui/i18n/I18nProvider.d.ts +12 -0
- package/model/packages/react/ui/i18n/index.d.ts +3 -0
- package/model/packages/react/ui/i18n/useI18n.d.ts +8 -0
- package/model/packages/react/ui/index.d.ts +4 -0
- package/model/packages/react/ui/lib/createStoreHook.d.ts +8 -0
- package/model/packages/react/ui/lib/export.d.ts +21 -0
- package/model/packages/react/ui/lib/utils.d.ts +9 -0
- package/model/packages/react/ui/stores/breadcrumb.d.ts +14 -0
- package/model/packages/react/ui/stores/language.d.ts +3 -0
- package/model/packages/react/ui/types/index.d.ts +1 -0
- package/model/typings/type.d.ts +4 -0
- package/package.json +24 -9
- package/types/app/controller/view.d.ts +2 -1
- package/types/app/extends/crypto.d.ts +64 -0
- package/types/app/extends/localCacheHtmlEtag.d.ts +10 -0
- package/types/app/extends/render-view.d.ts +7 -0
- package/types/app/middlewares/project-handler.d.ts +4 -0
- package/types/app/middlewares/request-parameter-parsing.d.ts +7 -0
- package/types/app/router/project.d.ts +1 -1
- package/types/app/service/base.d.ts +1 -1
- package/types/app/service/project.d.ts +1 -1
- package/types/app/type.d.ts +31 -1
- package/types/app/typings.d.ts +12 -7
- package/types/bundler/buildBE.d.ts +13 -0
- package/types/bundler/defaultRouteGuard.d.ts +2 -0
- package/types/bundler/index.d.ts +3 -1
- package/types/bundler/state.d.ts +4 -0
- package/types/bundler/utils.d.ts +5 -0
- package/types/config/config.default.d.ts +27 -1
- package/types/index.d.ts +4 -3
- package/types/packages/common/string/index.d.ts +16 -0
- package/types/packages/core/loader/config.d.ts +1 -1
- package/types/packages/core/loader/extend.d.ts +1 -1
- package/types/packages/core/loader/middleware.d.ts +1 -1
- package/types/packages/core/types.d.ts +11 -0
- package/types/scripts/vite-build/build.d.ts +24 -0
- package/types/scripts/vite-build/collect.d.ts +57 -0
- package/types/scripts/vite-build/constants.d.ts +6 -0
- package/types/scripts/vite-build/dts.d.ts +53 -0
- package/types/scripts/vite-build/index.d.ts +2 -0
- package/types/scripts/vite-build/normalize.d.ts +66 -0
- package/types/scripts/vite-build/plugins.d.ts +67 -0
- package/types/scripts/vite-build/resolve.d.ts +61 -0
- package/types/scripts/vite-build/types.d.ts +174 -0
- package/types/scripts/vite-build/utils.d.ts +35 -0
- package/cjs/app/extend/render-view.js +0 -1
- package/cjs/app/middleware/api-params-verify.js +0 -1
- package/cjs/app/middleware/api-sign-verify.js +0 -1
- package/cjs/app/middleware/project-handler.js +0 -1
- package/esm/app/extend/render-view.js +0 -23
- package/esm/app/middleware/project-handler.js +0 -15
- package/fe/model/types/data/button.js +0 -16
- package/fe/model/types/data/component.js +0 -11
- package/fe/model/types/data/schema.js +0 -1
- package/fe/model/types/data/search.js +0 -1
- package/fe/model/types/menuType.js +0 -1
- package/fe/model/types/model.js +0 -1
- package/fe/packages/common/array/index.js +0 -40
- package/fe/packages/common/i18n/types.js +0 -1
- package/fe/packages/common/log/index.js +0 -176
- package/fe/packages/common/number/index.js +0 -10
- package/fe/packages/common/object/index.js +0 -25
- package/fe/packages/common/string/index.js +0 -17
- package/fe/packages/common/types/index.js +0 -1
- package/fe/packages/ui/react/components/Button/Button.js +0 -73
- package/fe/packages/ui/react/components/Button/SubmitButton.js +0 -25
- package/fe/packages/ui/react/components/Button/index.d.ts +0 -4
- package/fe/packages/ui/react/components/Button/index.js +0 -2
- package/fe/packages/ui/react/components/Card/Card.js +0 -12
- package/fe/packages/ui/react/components/Card/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Card/index.js +0 -1
- package/fe/packages/ui/react/components/Checkbox/Checkbox.js +0 -39
- package/fe/packages/ui/react/components/Checkbox/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Checkbox/index.js +0 -1
- package/fe/packages/ui/react/components/ConfirmDialog/ConfirmDialog.js +0 -11
- package/fe/packages/ui/react/components/ConfirmDialog/index.d.ts +0 -2
- package/fe/packages/ui/react/components/ConfirmDialog/index.js +0 -1
- package/fe/packages/ui/react/components/DataTable/ActionBtn.js +0 -96
- package/fe/packages/ui/react/components/DataTable/index.js +0 -191
- package/fe/packages/ui/react/components/Date/Calendar.js +0 -216
- package/fe/packages/ui/react/components/Date/Date.js +0 -201
- package/fe/packages/ui/react/components/Date/DateTestPage.js +0 -29
- package/fe/packages/ui/react/components/Date/LocaleContext.d.ts +0 -6
- package/fe/packages/ui/react/components/Date/LocaleContext.js +0 -8
- package/fe/packages/ui/react/components/Date/LocaleProvider.d.ts +0 -19
- package/fe/packages/ui/react/components/Date/LocaleProvider.js +0 -24
- package/fe/packages/ui/react/components/Date/TimePicker.js +0 -78
- package/fe/packages/ui/react/components/Date/data.js +0 -4
- package/fe/packages/ui/react/components/Date/dateLocaleStore.js +0 -14
- package/fe/packages/ui/react/components/Date/dropdownPositioning.d.ts +0 -3
- package/fe/packages/ui/react/components/Date/dropdownPositioning.js +0 -12
- package/fe/packages/ui/react/components/Date/index.d.ts +0 -6
- package/fe/packages/ui/react/components/Date/index.js +0 -5
- package/fe/packages/ui/react/components/Date/locales.js +0 -21
- package/fe/packages/ui/react/components/Drawer/Drawer.js +0 -109
- package/fe/packages/ui/react/components/Drawer/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Drawer/index.js +0 -1
- package/fe/packages/ui/react/components/Dropdown/Dropdown.js +0 -89
- package/fe/packages/ui/react/components/Dropdown/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Dropdown/index.js +0 -1
- package/fe/packages/ui/react/components/Form/Form.js +0 -8
- package/fe/packages/ui/react/components/Form/FormItem.js +0 -43
- package/fe/packages/ui/react/components/Form/SchemaForm/data.js +0 -18
- package/fe/packages/ui/react/components/Form/SchemaForm/index.js +0 -79
- package/fe/packages/ui/react/components/Form/index.d.ts +0 -5
- package/fe/packages/ui/react/components/Form/index.js +0 -4
- package/fe/packages/ui/react/components/Form/useForm.d.ts +0 -3
- package/fe/packages/ui/react/components/Form/useForm.js +0 -1
- package/fe/packages/ui/react/components/ImagePreview/ImagePreview.js +0 -171
- package/fe/packages/ui/react/components/ImagePreview/PreviewImage.js +0 -28
- package/fe/packages/ui/react/components/ImagePreview/index.d.ts +0 -3
- package/fe/packages/ui/react/components/ImagePreview/index.js +0 -2
- package/fe/packages/ui/react/components/Input/Input.js +0 -61
- package/fe/packages/ui/react/components/Input/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Input/index.js +0 -1
- package/fe/packages/ui/react/components/InputNumber/InputNumber.js +0 -144
- package/fe/packages/ui/react/components/InputNumber/index.d.ts +0 -2
- package/fe/packages/ui/react/components/InputNumber/index.js +0 -1
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.js +0 -63
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.d.ts +0 -2
- package/fe/packages/ui/react/components/InputNumber/inputNumberUtils.test.js +0 -27
- package/fe/packages/ui/react/components/Label/Label.js +0 -35
- package/fe/packages/ui/react/components/Label/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Label/index.js +0 -2
- package/fe/packages/ui/react/components/Layout/Layout.js +0 -8
- package/fe/packages/ui/react/components/Layout/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Layout/index.js +0 -1
- package/fe/packages/ui/react/components/Loading/Loading.js +0 -21
- package/fe/packages/ui/react/components/Loading/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Loading/index.js +0 -1
- package/fe/packages/ui/react/components/Menu/Menu.js +0 -110
- package/fe/packages/ui/react/components/Menu/MenuContext.js +0 -97
- package/fe/packages/ui/react/components/Menu/MenuItem.js +0 -33
- package/fe/packages/ui/react/components/Menu/SubMenu.d.ts +0 -10
- package/fe/packages/ui/react/components/Menu/SubMenu.js +0 -169
- package/fe/packages/ui/react/components/Menu/index.d.ts +0 -9
- package/fe/packages/ui/react/components/Menu/index.js +0 -5
- package/fe/packages/ui/react/components/Menu/menuTypes.js +0 -1
- package/fe/packages/ui/react/components/Menu/utils.js +0 -7
- package/fe/packages/ui/react/components/Message/Message.js +0 -58
- package/fe/packages/ui/react/components/Message/MessageManager.js +0 -90
- package/fe/packages/ui/react/components/Message/data.js +0 -1
- package/fe/packages/ui/react/components/Message/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Message/index.js +0 -1
- package/fe/packages/ui/react/components/Modal/Modal.js +0 -14
- package/fe/packages/ui/react/components/Modal/ModalManager.js +0 -90
- package/fe/packages/ui/react/components/Modal/index.d.ts +0 -4
- package/fe/packages/ui/react/components/Modal/index.js +0 -2
- package/fe/packages/ui/react/components/Notification/Notification.js +0 -29
- package/fe/packages/ui/react/components/Notification/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Notification/index.js +0 -1
- package/fe/packages/ui/react/components/Overlay/Overlay.js +0 -53
- package/fe/packages/ui/react/components/Overlay/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Overlay/index.js +0 -1
- package/fe/packages/ui/react/components/Pagination/Pagination.js +0 -96
- package/fe/packages/ui/react/components/Pagination/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Pagination/index.js +0 -1
- package/fe/packages/ui/react/components/Popup/Popup.js +0 -81
- package/fe/packages/ui/react/components/Popup/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Popup/index.js +0 -1
- package/fe/packages/ui/react/components/Radio/Radio.js +0 -20
- package/fe/packages/ui/react/components/Radio/RadioGroup.js +0 -21
- package/fe/packages/ui/react/components/Radio/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Radio/index.js +0 -2
- package/fe/packages/ui/react/components/Search/Search.js +0 -8
- package/fe/packages/ui/react/components/Search/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Search/index.js +0 -1
- package/fe/packages/ui/react/components/Select/Select.js +0 -220
- package/fe/packages/ui/react/components/Select/dropdownPositioning.d.ts +0 -3
- package/fe/packages/ui/react/components/Select/dropdownPositioning.js +0 -13
- package/fe/packages/ui/react/components/Select/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Select/index.js +0 -1
- package/fe/packages/ui/react/components/Skeleton/Skeleton.d.ts +0 -28
- package/fe/packages/ui/react/components/Skeleton/Skeleton.js +0 -31
- package/fe/packages/ui/react/components/Skeleton/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Skeleton/index.js +0 -1
- package/fe/packages/ui/react/components/Switch/Switch.js +0 -22
- package/fe/packages/ui/react/components/Switch/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Switch/index.js +0 -1
- package/fe/packages/ui/react/components/TableSearch/TableSearch.d.ts +0 -68
- package/fe/packages/ui/react/components/TableSearch/TableSearch.js +0 -121
- package/fe/packages/ui/react/components/TableSearch/index.d.ts +0 -3
- package/fe/packages/ui/react/components/TableSearch/index.js +0 -1
- package/fe/packages/ui/react/components/TableSearch/lang.js +0 -14
- package/fe/packages/ui/react/components/TableSearch/tableSearchLocaleStore.js +0 -11
- package/fe/packages/ui/react/components/Tabs/Tabs.js +0 -19
- package/fe/packages/ui/react/components/Tabs/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Tabs/index.js +0 -1
- package/fe/packages/ui/react/components/Textarea/Textarea.js +0 -37
- package/fe/packages/ui/react/components/Textarea/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Textarea/index.js +0 -1
- package/fe/packages/ui/react/components/Tooltip/Tooltip.js +0 -79
- package/fe/packages/ui/react/components/Tooltip/index.d.ts +0 -2
- package/fe/packages/ui/react/components/Tooltip/index.js +0 -1
- package/fe/packages/ui/react/components/TreeSelect/TreeSelect.js +0 -160
- package/fe/packages/ui/react/components/TreeSelect/index.d.ts +0 -2
- package/fe/packages/ui/react/components/TreeSelect/index.js +0 -1
- package/fe/packages/ui/react/components/Upload/ImageUpload.js +0 -75
- package/fe/packages/ui/react/components/Upload/Upload.d.ts +0 -41
- package/fe/packages/ui/react/components/Upload/Upload.js +0 -7
- package/fe/packages/ui/react/components/Upload/index.d.ts +0 -3
- package/fe/packages/ui/react/components/Upload/index.js +0 -2
- package/fe/packages/ui/react/components/breadcrumb/breadcrumb.js +0 -81
- package/fe/packages/ui/react/components/breadcrumb/index.d.ts +0 -2
- package/fe/packages/ui/react/components/breadcrumb/index.js +0 -1
- package/fe/packages/ui/react/components/hooks/useDropdownPositioning.js +0 -137
- package/fe/packages/ui/react/components/hooks/useInputController.js +0 -44
- package/fe/packages/ui/react/components/index.d.ts +0 -36
- package/fe/packages/ui/react/components/index.js +0 -35
- package/fe/packages/ui/react/components/table/index.d.ts +0 -2
- package/fe/packages/ui/react/components/table/index.js +0 -1
- package/fe/packages/ui/react/components/table/table.js +0 -116
- package/fe/packages/ui/react/components/testPage/MenuTestPage.js +0 -104
- package/fe/packages/ui/react/components/testPage/index.js +0 -475
- package/fe/packages/ui/react/hooks/useBreadcrumb.js +0 -2
- package/fe/packages/ui/react/hooks/useExecuteOnce.d.ts +0 -30
- package/fe/packages/ui/react/hooks/useExecuteOnce.js +0 -57
- package/fe/packages/ui/react/hooks/useInit.js +0 -9
- package/fe/packages/ui/react/hooks/useLanguage.d.ts +0 -2
- package/fe/packages/ui/react/hooks/useLanguage.js +0 -4
- package/fe/packages/ui/react/hooks/usePagination.js +0 -27
- package/fe/packages/ui/react/hooks/useRefState.js +0 -29
- package/fe/packages/ui/react/hooks/useWatch.js +0 -87
- package/fe/packages/ui/react/hooks/useWatch.test.d.ts +0 -2
- package/fe/packages/ui/react/hooks/useWatch.test.js +0 -22
- package/fe/packages/ui/react/i18n/I18nProvider.d.ts +0 -31
- package/fe/packages/ui/react/i18n/I18nProvider.js +0 -25
- package/fe/packages/ui/react/i18n/index.d.ts +0 -4
- package/fe/packages/ui/react/i18n/index.js +0 -3
- package/fe/packages/ui/react/i18n/useI18n.d.ts +0 -13
- package/fe/packages/ui/react/i18n/useI18n.js +0 -18
- package/fe/packages/ui/react/index.d.ts +0 -5
- package/fe/packages/ui/react/index.js +0 -6
- package/fe/packages/ui/react/lib/createStoreHook.js +0 -6
- package/fe/packages/ui/react/lib/export.d.ts +0 -66
- package/fe/packages/ui/react/lib/export.js +0 -138
- package/fe/packages/ui/react/lib/utils.d.ts +0 -34
- package/fe/packages/ui/react/lib/utils.js +0 -70
- package/fe/packages/ui/react/stores/breadcrumb.js +0 -66
- package/fe/packages/ui/react/stores/language.d.ts +0 -4
- package/fe/packages/ui/react/stores/language.js +0 -2
- package/fe/packages/ui/react/types/index.js +0 -1
- package/fe/typings/type.js +0 -1
- package/model/test.d.ts +0 -2
- package/model/types/data/fetchInfo.d.ts +0 -20
- package/model/types/data/schema.d.ts +0 -98
- package/types/app/extend/render-view.d.ts +0 -6
- package/types/app/middleware/project-handler.d.ts +0 -4
- /package/cjs/app/{extend → extends}/$fetch.js +0 -0
- /package/cjs/app/{extend → extends}/generateErrorMessage.js +0 -0
- /package/cjs/app/{extend → extends}/logger.js +0 -0
- /package/cjs/app/{extend → extends}/parsingParamsOnUrl.js +0 -0
- /package/fe/packages/{ui/react → react/ui}/assets/table/no-result.svg +0 -0
- /package/fe/packages/{ui/react → react/ui}/index.css +0 -0
- /package/{fe/model/types/data/fetchInfo.js → model/model/test.d.ts} +0 -0
- /package/{fe/packages/common/cache/index.js → model/packages/common/cache/index.d.ts} +0 -0
- /package/{fe/packages/common/index.js → model/packages/common/index.d.ts} +0 -0
- /package/types/app/{extend → extends}/$fetch.d.ts +0 -0
- /package/types/app/{extend → extends}/db.d.ts +0 -0
- /package/types/app/{extend → extends}/generateErrorMessage.d.ts +0 -0
- /package/types/app/{extend → extends}/logger.d.ts +0 -0
- /package/types/app/{extend → extends}/parsingParamsOnUrl.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/api-params-verify.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/api-sign-verify.d.ts +0 -0
- /package/types/app/{middleware → middlewares}/error-handle.d.ts +0 -0
|
@@ -0,0 +1,1638 @@
|
|
|
1
|
+
import { Loading } from "../Loading/Loading.js";
|
|
2
|
+
import { Button } from "../Button/Button.js";
|
|
3
|
+
import { Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../breadcrumb/breadcrumb.js";
|
|
4
|
+
import { Card } from "../Card/Card.js";
|
|
5
|
+
import { Checkbox } from "../Checkbox/Checkbox.js";
|
|
6
|
+
import { Modal } from "../Modal/Modal.js";
|
|
7
|
+
import { modal } from "../Modal/ModalManager.js";
|
|
8
|
+
import { ConfirmDialog } from "../ConfirmDialog/ConfirmDialog.js";
|
|
9
|
+
import { Input } from "../Input/Input.js";
|
|
10
|
+
import { Select } from "../Select/Select.js";
|
|
11
|
+
import { Pagination } from "../Pagination/Pagination.js";
|
|
12
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/table.js";
|
|
13
|
+
import { Skeleton } from "../Skeleton/Skeleton.js";
|
|
14
|
+
import { Dropdown } from "../Dropdown/Dropdown.js";
|
|
15
|
+
import { DataTable } from "../DataTable/index.js";
|
|
16
|
+
import { Drawer } from "../Drawer/Drawer.js";
|
|
17
|
+
import { Form } from "../Form/Form.js";
|
|
18
|
+
import { Label } from "../Label/Label.js";
|
|
19
|
+
import { FormItem } from "../Form/FormItem.js";
|
|
20
|
+
import { useForm } from "../Form/useForm.js";
|
|
21
|
+
import { SchemaForm } from "../Form/SchemaForm/index.js";
|
|
22
|
+
import { PreviewImage } from "../ImagePreview/PreviewImage.js";
|
|
23
|
+
import { InputNumber } from "../InputNumber/InputNumber.js";
|
|
24
|
+
import { Layout } from "../Layout/Layout.js";
|
|
25
|
+
import { message } from "../Message/MessageManager.js";
|
|
26
|
+
import { Notification } from "../Notification/Notification.js";
|
|
27
|
+
import { RadioGroup } from "../Radio/RadioGroup.js";
|
|
28
|
+
import { Radio } from "../Radio/Radio.js";
|
|
29
|
+
import Search from "../Search/Search.js";
|
|
30
|
+
import { Switch } from "../Switch/Switch.js";
|
|
31
|
+
import TableSearch from "../TableSearch/TableSearch.js";
|
|
32
|
+
import { Tabs } from "../Tabs/Tabs.js";
|
|
33
|
+
import { Textarea } from "../Textarea/Textarea.js";
|
|
34
|
+
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
35
|
+
import { TreeSelect } from "../TreeSelect/TreeSelect.js";
|
|
36
|
+
import { ImageUpload } from "../Upload/ImageUpload.js";
|
|
37
|
+
import "../index.js";
|
|
38
|
+
import DateTestPage from "../Date/DateTestPage.js";
|
|
39
|
+
import MenuTestPage from "./MenuTestPage.js";
|
|
40
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
41
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
42
|
+
//#region packages/react/ui/components/testPage/index.tsx
|
|
43
|
+
function ThemeSwitcher() {
|
|
44
|
+
const [mode, setMode] = useState("dark");
|
|
45
|
+
const [theme, setTheme] = useState("default");
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
const root = document.documentElement;
|
|
48
|
+
const previousTheme = root.getAttribute("data-theme");
|
|
49
|
+
const previousDark = root.classList.contains("dark");
|
|
50
|
+
root.classList.toggle("dark", mode === "dark");
|
|
51
|
+
if (theme === "default") root.removeAttribute("data-theme");
|
|
52
|
+
else root.setAttribute("data-theme", theme);
|
|
53
|
+
return () => {
|
|
54
|
+
root.classList.toggle("dark", previousDark);
|
|
55
|
+
if (previousTheme) root.setAttribute("data-theme", previousTheme);
|
|
56
|
+
else root.removeAttribute("data-theme");
|
|
57
|
+
};
|
|
58
|
+
}, [mode, theme]);
|
|
59
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
60
|
+
title: "Theme",
|
|
61
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "flex w-full flex-wrap items-center gap-6 rounded-xl border border-border bg-background p-4",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "flex items-center gap-2",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: "text-sm text-muted-foreground",
|
|
69
|
+
children: "模式"
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsx(Button, {
|
|
72
|
+
variant: mode === "light" ? "primary" : "default",
|
|
73
|
+
size: "sm",
|
|
74
|
+
onClick: () => setMode("light"),
|
|
75
|
+
children: "Light"
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx(Button, {
|
|
78
|
+
variant: mode === "dark" ? "primary" : "default",
|
|
79
|
+
size: "sm",
|
|
80
|
+
onClick: () => setMode("dark"),
|
|
81
|
+
children: "Dark"
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "flex items-center gap-2",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: "text-sm text-muted-foreground",
|
|
90
|
+
children: "主题"
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ jsx(Button, {
|
|
93
|
+
variant: theme === "default" ? "primary" : "default",
|
|
94
|
+
size: "sm",
|
|
95
|
+
onClick: () => setTheme("default"),
|
|
96
|
+
children: "Default"
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx(Button, {
|
|
99
|
+
variant: theme === "green" ? "primary" : "default",
|
|
100
|
+
size: "sm",
|
|
101
|
+
onClick: () => setTheme("green"),
|
|
102
|
+
children: "Green"
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ jsx(Button, {
|
|
105
|
+
variant: theme === "gray" ? "primary" : "default",
|
|
106
|
+
size: "sm",
|
|
107
|
+
onClick: () => setTheme("gray"),
|
|
108
|
+
children: "Gray"
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ jsxs("div", {
|
|
113
|
+
className: "text-sm text-muted-foreground",
|
|
114
|
+
children: [
|
|
115
|
+
"当前: ",
|
|
116
|
+
mode,
|
|
117
|
+
" / ",
|
|
118
|
+
theme
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function Section({ title, children }) {
|
|
126
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
127
|
+
className: "mb-8",
|
|
128
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
129
|
+
className: "text-lg font-semibold mb-3 border-b pb-1",
|
|
130
|
+
children: title
|
|
131
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
132
|
+
className: "flex flex-wrap gap-3 items-start",
|
|
133
|
+
children
|
|
134
|
+
})]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function ButtonDemo() {
|
|
138
|
+
const [loading, setLoading] = useState(false);
|
|
139
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
140
|
+
title: "Button",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsx(Button, { children: "default" }),
|
|
143
|
+
/* @__PURE__ */ jsx(Button, {
|
|
144
|
+
variant: "primary",
|
|
145
|
+
children: "primary"
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ jsx(Button, {
|
|
148
|
+
variant: "dashed",
|
|
149
|
+
children: "dashed"
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ jsx(Button, {
|
|
152
|
+
variant: "text",
|
|
153
|
+
children: "text"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ jsx(Button, {
|
|
156
|
+
variant: "link",
|
|
157
|
+
href: "#button",
|
|
158
|
+
children: "link"
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ jsx(Button, {
|
|
161
|
+
state: "danger",
|
|
162
|
+
children: "danger"
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsx(Button, {
|
|
165
|
+
variant: "primary",
|
|
166
|
+
state: "danger",
|
|
167
|
+
children: "primary danger"
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsx("div", {
|
|
170
|
+
className: " bg-red-300 p-1.5",
|
|
171
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
172
|
+
state: "ghost",
|
|
173
|
+
children: "ghost"
|
|
174
|
+
})
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ jsx(Button, {
|
|
177
|
+
variant: "primary",
|
|
178
|
+
state: "ghost",
|
|
179
|
+
children: "primary ghost"
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ jsx(Button, {
|
|
182
|
+
disabled: true,
|
|
183
|
+
children: "disabled"
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ jsx(Button, {
|
|
186
|
+
loading,
|
|
187
|
+
onClick: () => {
|
|
188
|
+
setLoading(true);
|
|
189
|
+
setTimeout(() => setLoading(false), 2e3);
|
|
190
|
+
},
|
|
191
|
+
children: "loading (click)"
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ jsx(Button, {
|
|
194
|
+
size: "sm",
|
|
195
|
+
children: "sm"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ jsx(Button, {
|
|
198
|
+
size: "md",
|
|
199
|
+
children: "md"
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ jsx(Button, {
|
|
202
|
+
size: "lg",
|
|
203
|
+
children: "lg"
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function InputDemo() {
|
|
209
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
210
|
+
title: "Input",
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ jsx(Input, {
|
|
213
|
+
placeholder: "普通输入框",
|
|
214
|
+
className: "w-48"
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ jsx(Input, {
|
|
217
|
+
allowClear: true,
|
|
218
|
+
defaultValue: "可清空内容",
|
|
219
|
+
placeholder: "清空按钮",
|
|
220
|
+
className: "w-48"
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ jsx(Input, {
|
|
223
|
+
type: "password",
|
|
224
|
+
placeholder: "密码输入框",
|
|
225
|
+
className: "w-48"
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ jsx(Input, {
|
|
228
|
+
type: "password",
|
|
229
|
+
defaultValue: "template-core",
|
|
230
|
+
placeholder: "密码默认值",
|
|
231
|
+
className: "w-48"
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ jsx(Input, {
|
|
234
|
+
type: "password",
|
|
235
|
+
placeholder: "密码 + addon",
|
|
236
|
+
addonAfter: /* @__PURE__ */ jsx("span", {
|
|
237
|
+
className: "text-xs text-muted-foreground",
|
|
238
|
+
children: "PWD"
|
|
239
|
+
}),
|
|
240
|
+
className: "w-56"
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ jsx(Input, {
|
|
243
|
+
disabled: true,
|
|
244
|
+
placeholder: "禁用状态",
|
|
245
|
+
className: "w-48"
|
|
246
|
+
})
|
|
247
|
+
]
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
function InputNumberDemo() {
|
|
251
|
+
const [price, setPrice] = useState(12.5);
|
|
252
|
+
const [ratio, setRatio] = useState(.25);
|
|
253
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
254
|
+
title: "InputNumber",
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ jsx(InputNumber, {
|
|
257
|
+
placeholder: "基础数字输入",
|
|
258
|
+
className: "w-48"
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ jsx(InputNumber, {
|
|
261
|
+
value: price,
|
|
262
|
+
onChange: setPrice,
|
|
263
|
+
precision: 2,
|
|
264
|
+
min: 0,
|
|
265
|
+
max: 9999,
|
|
266
|
+
placeholder: "价格",
|
|
267
|
+
addonAfter: /* @__PURE__ */ jsx("span", {
|
|
268
|
+
className: "text-xs text-muted-foreground",
|
|
269
|
+
children: "CNY"
|
|
270
|
+
}),
|
|
271
|
+
className: "w-56"
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ jsx(InputNumber, {
|
|
274
|
+
value: ratio,
|
|
275
|
+
onChange: setRatio,
|
|
276
|
+
precision: 2,
|
|
277
|
+
step: .05,
|
|
278
|
+
min: 0,
|
|
279
|
+
max: 1,
|
|
280
|
+
allowStep: true,
|
|
281
|
+
placeholder: "比例",
|
|
282
|
+
className: "w-48"
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ jsx(InputNumber, {
|
|
285
|
+
defaultValue: 10,
|
|
286
|
+
step: .5,
|
|
287
|
+
precision: 1,
|
|
288
|
+
allowStep: true,
|
|
289
|
+
allowClear: true,
|
|
290
|
+
className: "w-48"
|
|
291
|
+
}),
|
|
292
|
+
/* @__PURE__ */ jsx(InputNumber, {
|
|
293
|
+
disabled: true,
|
|
294
|
+
defaultValue: 88.8,
|
|
295
|
+
precision: 1,
|
|
296
|
+
className: "w-48"
|
|
297
|
+
})
|
|
298
|
+
]
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function TextareaDemo() {
|
|
302
|
+
const [val, setVal] = useState("");
|
|
303
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
304
|
+
title: "Textarea",
|
|
305
|
+
children: [/* @__PURE__ */ jsx(Textarea, {
|
|
306
|
+
placeholder: "请输入内容(最多 500 字)",
|
|
307
|
+
value: val,
|
|
308
|
+
onChange: (v) => setVal(v),
|
|
309
|
+
className: "w-80"
|
|
310
|
+
}), /* @__PURE__ */ jsx(Textarea, {
|
|
311
|
+
placeholder: "不显示计数",
|
|
312
|
+
showCount: false,
|
|
313
|
+
className: "w-80"
|
|
314
|
+
})]
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
function SelectDemo() {
|
|
318
|
+
const [val, setVal] = useState(void 0);
|
|
319
|
+
const options = [
|
|
320
|
+
{
|
|
321
|
+
label: "选项 A",
|
|
322
|
+
value: "a"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
label: "选项 B",
|
|
326
|
+
value: "b"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
label: "选项 C",
|
|
330
|
+
value: "c"
|
|
331
|
+
}
|
|
332
|
+
];
|
|
333
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
334
|
+
title: "Select",
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ jsx(Select, {
|
|
337
|
+
options,
|
|
338
|
+
value: val,
|
|
339
|
+
onChange: setVal,
|
|
340
|
+
placeholder: "请选择",
|
|
341
|
+
className: "w-40"
|
|
342
|
+
}),
|
|
343
|
+
/* @__PURE__ */ jsx(Select, {
|
|
344
|
+
options,
|
|
345
|
+
placeholder: "不可搜索",
|
|
346
|
+
searchable: false,
|
|
347
|
+
className: "w-40"
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ jsx(Select, {
|
|
350
|
+
options,
|
|
351
|
+
placeholder: "不可清除",
|
|
352
|
+
clearable: false,
|
|
353
|
+
className: "w-40"
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ jsx(Select, {
|
|
356
|
+
options,
|
|
357
|
+
disabled: true,
|
|
358
|
+
placeholder: "禁用",
|
|
359
|
+
className: "w-40"
|
|
360
|
+
}),
|
|
361
|
+
/* @__PURE__ */ jsxs("div", {
|
|
362
|
+
className: "relative w-64 rounded-lg border border-border bg-muted/30 p-4",
|
|
363
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
364
|
+
className: "mb-2 text-sm text-muted-foreground",
|
|
365
|
+
children: "parent popup container"
|
|
366
|
+
}), /* @__PURE__ */ jsx(Select, {
|
|
367
|
+
options,
|
|
368
|
+
placeholder: "挂载到父元素",
|
|
369
|
+
getPopupContainer: "parent",
|
|
370
|
+
className: "w-full"
|
|
371
|
+
})]
|
|
372
|
+
})
|
|
373
|
+
]
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
function CheckboxDemo() {
|
|
377
|
+
const [checked, setChecked] = useState(false);
|
|
378
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
379
|
+
title: "Checkbox",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ jsxs("label", {
|
|
382
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
383
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
384
|
+
checked,
|
|
385
|
+
onChange: (c) => setChecked(c)
|
|
386
|
+
}), /* @__PURE__ */ jsxs("span", { children: ["受控: ", checked ? "选中" : "未选中"] })]
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ jsxs("label", {
|
|
389
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
390
|
+
children: [/* @__PURE__ */ jsx(Checkbox, { defaultChecked: true }), /* @__PURE__ */ jsx("span", { children: "非受控默认选中" })]
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ jsxs("label", {
|
|
393
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
394
|
+
children: [/* @__PURE__ */ jsx(Checkbox, { indeterminate: true }), /* @__PURE__ */ jsx("span", { children: "半选状态" })]
|
|
395
|
+
}),
|
|
396
|
+
/* @__PURE__ */ jsxs("label", {
|
|
397
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
398
|
+
children: [/* @__PURE__ */ jsx(Checkbox, { disabled: true }), /* @__PURE__ */ jsx("span", { children: "禁用" })]
|
|
399
|
+
})
|
|
400
|
+
]
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
function SwitchDemo() {
|
|
404
|
+
const [on, setOn] = useState(false);
|
|
405
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
406
|
+
title: "Switch",
|
|
407
|
+
children: [
|
|
408
|
+
/* @__PURE__ */ jsx(Switch, {
|
|
409
|
+
checked: on,
|
|
410
|
+
onChange: setOn
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ jsx("span", {
|
|
413
|
+
className: "self-center text-sm",
|
|
414
|
+
children: on ? "ON" : "OFF"
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ jsx(Switch, { defaultChecked: true }),
|
|
417
|
+
/* @__PURE__ */ jsx(Switch, { disabled: true }),
|
|
418
|
+
/* @__PURE__ */ jsx(Switch, {
|
|
419
|
+
disabled: true,
|
|
420
|
+
checked: true
|
|
421
|
+
})
|
|
422
|
+
]
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function TooltipDemo() {
|
|
426
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
427
|
+
title: "Tooltip",
|
|
428
|
+
children: [
|
|
429
|
+
"top",
|
|
430
|
+
"bottom",
|
|
431
|
+
"left",
|
|
432
|
+
"right"
|
|
433
|
+
].map((p) => /* @__PURE__ */ jsx(Tooltip, {
|
|
434
|
+
content: `placement: ${p}`,
|
|
435
|
+
placement: p,
|
|
436
|
+
children: /* @__PURE__ */ jsx(Button, { children: p })
|
|
437
|
+
}, p))
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
function DropdownDemo() {
|
|
441
|
+
const items = [
|
|
442
|
+
{
|
|
443
|
+
key: "edit",
|
|
444
|
+
label: "编辑",
|
|
445
|
+
onClick: () => console.log("edit")
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
key: "copy",
|
|
449
|
+
label: "复制",
|
|
450
|
+
onClick: () => console.log("copy")
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
key: "delete",
|
|
454
|
+
label: "删除",
|
|
455
|
+
danger: true,
|
|
456
|
+
onClick: () => console.log("delete")
|
|
457
|
+
}
|
|
458
|
+
];
|
|
459
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
460
|
+
title: "Dropdown",
|
|
461
|
+
children: [/* @__PURE__ */ jsx(Dropdown, {
|
|
462
|
+
items,
|
|
463
|
+
children: /* @__PURE__ */ jsx(Button, { children: "操作 ▾" })
|
|
464
|
+
}), /* @__PURE__ */ jsx(Dropdown, {
|
|
465
|
+
items,
|
|
466
|
+
placement: "bottom-start",
|
|
467
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
468
|
+
variant: "text",
|
|
469
|
+
children: "bottom-start ▾"
|
|
470
|
+
})
|
|
471
|
+
})]
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
function MessageDemo() {
|
|
475
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
476
|
+
title: "Message (imperative)",
|
|
477
|
+
children: [
|
|
478
|
+
/* @__PURE__ */ jsx(Button, {
|
|
479
|
+
onClick: () => message.success("操作成功"),
|
|
480
|
+
children: "success"
|
|
481
|
+
}),
|
|
482
|
+
/* @__PURE__ */ jsx(Button, {
|
|
483
|
+
onClick: () => message.error("操作失败"),
|
|
484
|
+
children: "error"
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ jsx(Button, {
|
|
487
|
+
onClick: () => message.warning("警告信息"),
|
|
488
|
+
children: "warning"
|
|
489
|
+
}),
|
|
490
|
+
/* @__PURE__ */ jsx(Button, {
|
|
491
|
+
onClick: () => message.info("提示信息"),
|
|
492
|
+
children: "info"
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ jsx(Button, {
|
|
495
|
+
onClick: () => {
|
|
496
|
+
const id = message.success("5秒后关闭", { duration: 5e3 });
|
|
497
|
+
setTimeout(() => message.close(id), 2e3);
|
|
498
|
+
},
|
|
499
|
+
children: "提前关闭"
|
|
500
|
+
})
|
|
501
|
+
]
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
function ModalDemo() {
|
|
505
|
+
const [open, setOpen] = useState(false);
|
|
506
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
507
|
+
title: "Modal",
|
|
508
|
+
children: [
|
|
509
|
+
/* @__PURE__ */ jsx(Button, {
|
|
510
|
+
onClick: () => setOpen(true),
|
|
511
|
+
children: "JSX Modal"
|
|
512
|
+
}),
|
|
513
|
+
/* @__PURE__ */ jsx(Button, {
|
|
514
|
+
onClick: () => modal.open({
|
|
515
|
+
title: "命令式弹窗",
|
|
516
|
+
content: /* @__PURE__ */ jsx("p", { children: "这是命令式打开的弹窗内容。" })
|
|
517
|
+
}),
|
|
518
|
+
children: "modal.open"
|
|
519
|
+
}),
|
|
520
|
+
/* @__PURE__ */ jsx(Button, {
|
|
521
|
+
onClick: () => modal.confirm({
|
|
522
|
+
title: "确认操作",
|
|
523
|
+
content: "确定要执行此操作吗?",
|
|
524
|
+
onOk: () => {
|
|
525
|
+
message.success("已确认");
|
|
526
|
+
},
|
|
527
|
+
onCancel: () => {
|
|
528
|
+
message.info("已取消");
|
|
529
|
+
}
|
|
530
|
+
}),
|
|
531
|
+
children: "modal.confirm"
|
|
532
|
+
}),
|
|
533
|
+
/* @__PURE__ */ jsxs(Modal, {
|
|
534
|
+
open,
|
|
535
|
+
onClose: () => setOpen(false),
|
|
536
|
+
title: "JSX 弹窗",
|
|
537
|
+
children: [/* @__PURE__ */ jsx("p", { children: "这是一个使用 JSX 控制的弹窗。" }), /* @__PURE__ */ jsx("div", {
|
|
538
|
+
className: "mt-4 flex justify-end gap-2",
|
|
539
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
540
|
+
onClick: () => setOpen(false),
|
|
541
|
+
children: "关闭"
|
|
542
|
+
})
|
|
543
|
+
})]
|
|
544
|
+
})
|
|
545
|
+
]
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
function DrawerDemo() {
|
|
549
|
+
const [placement, setPlacement] = useState("right");
|
|
550
|
+
const [open, setOpen] = useState(false);
|
|
551
|
+
const openDrawer = (nextPlacement) => {
|
|
552
|
+
setPlacement(nextPlacement);
|
|
553
|
+
setOpen(true);
|
|
554
|
+
};
|
|
555
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
556
|
+
title: "Drawer",
|
|
557
|
+
children: [
|
|
558
|
+
/* @__PURE__ */ jsx(Button, {
|
|
559
|
+
onClick: () => openDrawer("left"),
|
|
560
|
+
children: "left"
|
|
561
|
+
}),
|
|
562
|
+
/* @__PURE__ */ jsx(Button, {
|
|
563
|
+
onClick: () => openDrawer("right"),
|
|
564
|
+
children: "right"
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ jsx(Button, {
|
|
567
|
+
onClick: () => openDrawer("top"),
|
|
568
|
+
children: "top"
|
|
569
|
+
}),
|
|
570
|
+
/* @__PURE__ */ jsx(Button, {
|
|
571
|
+
onClick: () => openDrawer("bottom"),
|
|
572
|
+
children: "bottom"
|
|
573
|
+
}),
|
|
574
|
+
/* @__PURE__ */ jsx(Button, {
|
|
575
|
+
onClick: () => openDrawer("right"),
|
|
576
|
+
variant: "primary",
|
|
577
|
+
children: "打开详情"
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ jsx(Drawer, {
|
|
580
|
+
open,
|
|
581
|
+
onClose: () => setOpen(false),
|
|
582
|
+
title: `Drawer ${placement}`,
|
|
583
|
+
placement,
|
|
584
|
+
width: 420,
|
|
585
|
+
height: 320,
|
|
586
|
+
footer: /* @__PURE__ */ jsxs("div", {
|
|
587
|
+
className: "flex justify-end gap-2",
|
|
588
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
589
|
+
onClick: () => setOpen(false),
|
|
590
|
+
children: "取消"
|
|
591
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
592
|
+
variant: "primary",
|
|
593
|
+
onClick: () => {
|
|
594
|
+
message.success("已保存");
|
|
595
|
+
setOpen(false);
|
|
596
|
+
},
|
|
597
|
+
children: "保存"
|
|
598
|
+
})]
|
|
599
|
+
}),
|
|
600
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
601
|
+
className: "space-y-4",
|
|
602
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
603
|
+
className: "mb-1 text-sm font-medium text-foreground",
|
|
604
|
+
children: "外部 children"
|
|
605
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
606
|
+
className: "text-sm leading-6 text-muted-foreground",
|
|
607
|
+
children: "这里的内容完全由调用方定义,可以放表单、列表、详情或任意 JSX。"
|
|
608
|
+
})] }), /* @__PURE__ */ jsxs("div", {
|
|
609
|
+
className: "grid gap-3",
|
|
610
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
611
|
+
label: "名称",
|
|
612
|
+
layout: "vertical",
|
|
613
|
+
children: /* @__PURE__ */ jsx(Input, { placeholder: "请输入名称" })
|
|
614
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
615
|
+
label: "状态",
|
|
616
|
+
layout: "vertical",
|
|
617
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
618
|
+
placeholder: "请选择状态",
|
|
619
|
+
options: [{
|
|
620
|
+
label: "启用",
|
|
621
|
+
value: "enabled"
|
|
622
|
+
}, {
|
|
623
|
+
label: "停用",
|
|
624
|
+
value: "disabled"
|
|
625
|
+
}]
|
|
626
|
+
})
|
|
627
|
+
})]
|
|
628
|
+
})]
|
|
629
|
+
})
|
|
630
|
+
})
|
|
631
|
+
]
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
function ConfirmDialogDemo() {
|
|
635
|
+
const [open, setOpen] = useState(false);
|
|
636
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
637
|
+
title: "ConfirmDialog",
|
|
638
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
639
|
+
onClick: () => setOpen(true),
|
|
640
|
+
children: "打开确认框"
|
|
641
|
+
}), /* @__PURE__ */ jsx(ConfirmDialog, {
|
|
642
|
+
open,
|
|
643
|
+
title: "删除确认",
|
|
644
|
+
content: "确定要删除此条数据吗?此操作不可撤销。",
|
|
645
|
+
onOk: () => {
|
|
646
|
+
message.success("已删除");
|
|
647
|
+
setOpen(false);
|
|
648
|
+
},
|
|
649
|
+
onCancel: () => setOpen(false)
|
|
650
|
+
})]
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
function PaginationDemo() {
|
|
654
|
+
const [page, setPage] = useState(1);
|
|
655
|
+
const [pageSize, setPageSize] = useState(10);
|
|
656
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
657
|
+
title: "Pagination",
|
|
658
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
659
|
+
className: "w-full",
|
|
660
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
661
|
+
className: "text-sm mb-2",
|
|
662
|
+
children: [
|
|
663
|
+
"当前页: ",
|
|
664
|
+
page,
|
|
665
|
+
" / 每页: ",
|
|
666
|
+
pageSize
|
|
667
|
+
]
|
|
668
|
+
}), /* @__PURE__ */ jsx(Pagination, {
|
|
669
|
+
current: page,
|
|
670
|
+
pageSize,
|
|
671
|
+
total: 238,
|
|
672
|
+
onChange: setPage,
|
|
673
|
+
onPageSizeChange: setPageSize
|
|
674
|
+
})]
|
|
675
|
+
})
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
function TableDemo() {
|
|
679
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
680
|
+
title: "Table (低层)",
|
|
681
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
682
|
+
className: "w-full",
|
|
683
|
+
children: /* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
684
|
+
/* @__PURE__ */ jsx(TableHead, { children: "ID" }),
|
|
685
|
+
/* @__PURE__ */ jsx(TableHead, { children: "姓名" }),
|
|
686
|
+
/* @__PURE__ */ jsx(TableHead, { children: "角色" }),
|
|
687
|
+
/* @__PURE__ */ jsx(TableHead, { children: "状态" }),
|
|
688
|
+
/* @__PURE__ */ jsx(TableHead, {
|
|
689
|
+
isAction: true,
|
|
690
|
+
children: "操作"
|
|
691
|
+
})
|
|
692
|
+
] }) }), /* @__PURE__ */ jsx(TableBody, { children: [
|
|
693
|
+
{
|
|
694
|
+
id: 1,
|
|
695
|
+
name: "张三",
|
|
696
|
+
role: "管理员",
|
|
697
|
+
status: "正常"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
id: 2,
|
|
701
|
+
name: "李四",
|
|
702
|
+
role: "用户",
|
|
703
|
+
status: "禁用"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
id: 3,
|
|
707
|
+
name: "王五",
|
|
708
|
+
role: "审计员",
|
|
709
|
+
status: "正常"
|
|
710
|
+
}
|
|
711
|
+
].map((row) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
712
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.id }),
|
|
713
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.name }),
|
|
714
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.role }),
|
|
715
|
+
/* @__PURE__ */ jsx(TableCell, { children: row.status }),
|
|
716
|
+
/* @__PURE__ */ jsx(TableCell, {
|
|
717
|
+
isAction: true,
|
|
718
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
719
|
+
variant: "link",
|
|
720
|
+
size: "sm",
|
|
721
|
+
children: "编辑"
|
|
722
|
+
})
|
|
723
|
+
})
|
|
724
|
+
] }, row.id)) })] })
|
|
725
|
+
})
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
function DataTableDemo() {
|
|
729
|
+
const [selectedKeys, setSelectedKeys] = useState([]);
|
|
730
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
731
|
+
title: "DataTable",
|
|
732
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
733
|
+
className: "w-full",
|
|
734
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
735
|
+
className: "text-sm mb-2",
|
|
736
|
+
children: ["已选: ", JSON.stringify(selectedKeys)]
|
|
737
|
+
}), /* @__PURE__ */ jsx(DataTable, {
|
|
738
|
+
columns: [
|
|
739
|
+
{
|
|
740
|
+
key: "id",
|
|
741
|
+
title: "ID",
|
|
742
|
+
width: "60px"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
key: "name",
|
|
746
|
+
title: "姓名"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
key: "role1",
|
|
750
|
+
title: "角色1",
|
|
751
|
+
dataIndex: "role",
|
|
752
|
+
fixed: "left"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
key: "status1",
|
|
756
|
+
title: "状态1",
|
|
757
|
+
dataIndex: "status",
|
|
758
|
+
fixed: "left"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
key: "role2",
|
|
762
|
+
title: "角色2",
|
|
763
|
+
dataIndex: "role"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
key: "status2",
|
|
767
|
+
title: "状态2",
|
|
768
|
+
dataIndex: "status"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
key: "role3",
|
|
772
|
+
title: "角色3",
|
|
773
|
+
dataIndex: "role"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
key: "status3",
|
|
777
|
+
title: "状态3",
|
|
778
|
+
dataIndex: "status"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
key: "role4",
|
|
782
|
+
title: "角色4",
|
|
783
|
+
dataIndex: "role"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
key: "status4",
|
|
787
|
+
title: "状态4",
|
|
788
|
+
dataIndex: "status"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
key: "role5",
|
|
792
|
+
title: "角色5",
|
|
793
|
+
dataIndex: "role"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
key: "status5",
|
|
797
|
+
title: "状态5",
|
|
798
|
+
dataIndex: "status"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
key: "role6",
|
|
802
|
+
title: "角色6",
|
|
803
|
+
dataIndex: "role"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
key: "status6",
|
|
807
|
+
title: "状态6",
|
|
808
|
+
dataIndex: "status"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
key: "role7",
|
|
812
|
+
title: "角色",
|
|
813
|
+
dataIndex: "role",
|
|
814
|
+
fixed: "right"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
key: "status7",
|
|
818
|
+
title: "状态",
|
|
819
|
+
dataIndex: "status"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
key: "action",
|
|
823
|
+
title: "操作",
|
|
824
|
+
width: "96px",
|
|
825
|
+
actionOverflow: "dropdown",
|
|
826
|
+
actions: (_, record) => [
|
|
827
|
+
{
|
|
828
|
+
key: "edit",
|
|
829
|
+
label: "修改",
|
|
830
|
+
onClick: () => console.log("edit", record.id)
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
key: "view",
|
|
834
|
+
label: "查看",
|
|
835
|
+
onClick: () => console.log("view", record.id)
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
key: "delete",
|
|
839
|
+
label: "删除",
|
|
840
|
+
danger: true,
|
|
841
|
+
onClick: () => console.log("delete", record.id)
|
|
842
|
+
}
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
],
|
|
846
|
+
data: [
|
|
847
|
+
{
|
|
848
|
+
id: 1,
|
|
849
|
+
name: "张三",
|
|
850
|
+
role: "管理员",
|
|
851
|
+
role7: "管理员",
|
|
852
|
+
role6: "管理员",
|
|
853
|
+
role5: "管理员",
|
|
854
|
+
role4: "管理员",
|
|
855
|
+
role3: "管理员",
|
|
856
|
+
role2: "管理员",
|
|
857
|
+
role1: "管理员",
|
|
858
|
+
status: "正常",
|
|
859
|
+
status7: "正常",
|
|
860
|
+
status6: "正常",
|
|
861
|
+
status5: "正常",
|
|
862
|
+
status4: "正常",
|
|
863
|
+
status3: "正常",
|
|
864
|
+
status2: "正常",
|
|
865
|
+
status1: "正常"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
id: 2,
|
|
869
|
+
name: "李四",
|
|
870
|
+
role: "用户",
|
|
871
|
+
role7: "用户",
|
|
872
|
+
role6: "用户",
|
|
873
|
+
role5: "用户",
|
|
874
|
+
role4: "用户",
|
|
875
|
+
role3: "用户",
|
|
876
|
+
role2: "用户",
|
|
877
|
+
role1: "用户",
|
|
878
|
+
status: "禁用",
|
|
879
|
+
status7: "禁用",
|
|
880
|
+
status6: "禁用",
|
|
881
|
+
status5: "禁用",
|
|
882
|
+
status4: "禁用",
|
|
883
|
+
status3: "禁用",
|
|
884
|
+
status2: "禁用",
|
|
885
|
+
status1: "禁用"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
id: 3,
|
|
889
|
+
name: "王五",
|
|
890
|
+
role: "审计员",
|
|
891
|
+
role7: "审计员",
|
|
892
|
+
role6: "审计员",
|
|
893
|
+
role5: "审计员",
|
|
894
|
+
role4: "审计员",
|
|
895
|
+
role3: "审计员",
|
|
896
|
+
role2: "审计员",
|
|
897
|
+
role1: "审计员",
|
|
898
|
+
status: "正常",
|
|
899
|
+
status7: "正常",
|
|
900
|
+
status6: "正常",
|
|
901
|
+
status5: "正常",
|
|
902
|
+
status4: "正常",
|
|
903
|
+
status3: "正常",
|
|
904
|
+
status2: "正常",
|
|
905
|
+
status1: "正常"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
id: 4,
|
|
909
|
+
name: "赵六",
|
|
910
|
+
role: "用户",
|
|
911
|
+
role7: "用户",
|
|
912
|
+
role6: "用户",
|
|
913
|
+
role5: "用户",
|
|
914
|
+
role4: "用户",
|
|
915
|
+
role3: "用户",
|
|
916
|
+
role2: "用户",
|
|
917
|
+
role1: "用户",
|
|
918
|
+
status: "正常",
|
|
919
|
+
status7: "正常",
|
|
920
|
+
status6: "正常",
|
|
921
|
+
status5: "正常",
|
|
922
|
+
status4: "正常",
|
|
923
|
+
status3: "正常",
|
|
924
|
+
status2: "正常",
|
|
925
|
+
status1: "正常"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
id: 5,
|
|
929
|
+
name: "孙七",
|
|
930
|
+
role: "用户",
|
|
931
|
+
role7: "用户",
|
|
932
|
+
role6: "用户",
|
|
933
|
+
role5: "用户",
|
|
934
|
+
role4: "用户",
|
|
935
|
+
role3: "用户",
|
|
936
|
+
role2: "用户",
|
|
937
|
+
role1: "用户",
|
|
938
|
+
status: "正常",
|
|
939
|
+
status7: "正常",
|
|
940
|
+
status6: "正常",
|
|
941
|
+
status5: "正常",
|
|
942
|
+
status4: "正常",
|
|
943
|
+
status3: "正常",
|
|
944
|
+
status2: "正常",
|
|
945
|
+
status1: "正常"
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
rowKey: "id",
|
|
949
|
+
rowSelection: {
|
|
950
|
+
selectedRowKeys: selectedKeys,
|
|
951
|
+
onChange: (keys) => setSelectedKeys(keys)
|
|
952
|
+
}
|
|
953
|
+
})]
|
|
954
|
+
})
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
function SearchDemo() {
|
|
958
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
959
|
+
title: "Search",
|
|
960
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
961
|
+
className: "w-full",
|
|
962
|
+
children: /* @__PURE__ */ jsxs(Search, {
|
|
963
|
+
schemas: [{
|
|
964
|
+
type: "input",
|
|
965
|
+
key: "keyword",
|
|
966
|
+
label: "关键字",
|
|
967
|
+
fieldProps: { placeholder: "请输入" }
|
|
968
|
+
}, {
|
|
969
|
+
type: "select",
|
|
970
|
+
key: "status",
|
|
971
|
+
label: "状态",
|
|
972
|
+
fieldProps: {
|
|
973
|
+
options: [{
|
|
974
|
+
label: "正常",
|
|
975
|
+
value: "active"
|
|
976
|
+
}, {
|
|
977
|
+
label: "禁用",
|
|
978
|
+
value: "disabled"
|
|
979
|
+
}],
|
|
980
|
+
placeholder: "请选择"
|
|
981
|
+
}
|
|
982
|
+
}],
|
|
983
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
984
|
+
type: "submit",
|
|
985
|
+
variant: "primary",
|
|
986
|
+
children: "搜索"
|
|
987
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
988
|
+
type: "reset",
|
|
989
|
+
children: "重置"
|
|
990
|
+
})]
|
|
991
|
+
})
|
|
992
|
+
})
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
function BreadcrumbDemo() {
|
|
996
|
+
const [items, setItems] = useState([
|
|
997
|
+
{
|
|
998
|
+
id: "home",
|
|
999
|
+
label: "首页"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
id: "list",
|
|
1003
|
+
label: "用户列表"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
id: "detail",
|
|
1007
|
+
label: "用户详情",
|
|
1008
|
+
active: true
|
|
1009
|
+
}
|
|
1010
|
+
]);
|
|
1011
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1012
|
+
title: "Breadcrumb",
|
|
1013
|
+
children: /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, { children: items.map((item, idx) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, {
|
|
1014
|
+
active: item.active,
|
|
1015
|
+
onClose: () => setItems((prev) => prev.filter((i) => i.id !== item.id)),
|
|
1016
|
+
onClick: () => setItems((prev) => prev.map((i) => ({
|
|
1017
|
+
...i,
|
|
1018
|
+
active: i.id === item.id
|
|
1019
|
+
}))),
|
|
1020
|
+
className: "cursor-pointer",
|
|
1021
|
+
children: item.label
|
|
1022
|
+
}) }), idx < items.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})] }, item.id)) }) })
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
function LabelDemo() {
|
|
1026
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
1027
|
+
title: "Label",
|
|
1028
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
1029
|
+
label: "水平布局",
|
|
1030
|
+
layout: "horizontal",
|
|
1031
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1032
|
+
className: "text-sm",
|
|
1033
|
+
children: "内容区域"
|
|
1034
|
+
})
|
|
1035
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
1036
|
+
label: "垂直布局",
|
|
1037
|
+
layout: "vertical",
|
|
1038
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1039
|
+
className: "text-sm",
|
|
1040
|
+
children: "内容区域"
|
|
1041
|
+
})
|
|
1042
|
+
})]
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
function FormDemo() {
|
|
1046
|
+
const [form] = useForm();
|
|
1047
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1048
|
+
title: "Form",
|
|
1049
|
+
children: /* @__PURE__ */ jsxs(Form, {
|
|
1050
|
+
form,
|
|
1051
|
+
onFinish: (v) => console.log("表单值:", v),
|
|
1052
|
+
children: [
|
|
1053
|
+
/* @__PURE__ */ jsx(FormItem, {
|
|
1054
|
+
name: "username",
|
|
1055
|
+
label: "用户名",
|
|
1056
|
+
required: true,
|
|
1057
|
+
rules: [{
|
|
1058
|
+
required: true,
|
|
1059
|
+
message: "请输入用户名"
|
|
1060
|
+
}],
|
|
1061
|
+
children: /* @__PURE__ */ jsx(Input, { placeholder: "请输入用户名" })
|
|
1062
|
+
}),
|
|
1063
|
+
/* @__PURE__ */ jsx(FormItem, {
|
|
1064
|
+
name: "password",
|
|
1065
|
+
label: "密码",
|
|
1066
|
+
required: true,
|
|
1067
|
+
rules: [{
|
|
1068
|
+
required: true,
|
|
1069
|
+
message: "请输入密码"
|
|
1070
|
+
}],
|
|
1071
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
1072
|
+
type: "password",
|
|
1073
|
+
placeholder: "请输入密码"
|
|
1074
|
+
})
|
|
1075
|
+
}),
|
|
1076
|
+
/* @__PURE__ */ jsx(Button, {
|
|
1077
|
+
type: "submit",
|
|
1078
|
+
children: "提交"
|
|
1079
|
+
})
|
|
1080
|
+
]
|
|
1081
|
+
})
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
function SchemaFormDemo() {
|
|
1085
|
+
const form = useRef(void 0);
|
|
1086
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1087
|
+
title: "SchemaForm",
|
|
1088
|
+
children: /* @__PURE__ */ jsx(SchemaForm, {
|
|
1089
|
+
layout: "horizontal",
|
|
1090
|
+
getForm: (f) => {
|
|
1091
|
+
form.current = f;
|
|
1092
|
+
},
|
|
1093
|
+
schemas: [{
|
|
1094
|
+
key: "username",
|
|
1095
|
+
label: "用户名",
|
|
1096
|
+
type: "input",
|
|
1097
|
+
required: true,
|
|
1098
|
+
rules: [{
|
|
1099
|
+
required: true,
|
|
1100
|
+
message: "请输入用户名"
|
|
1101
|
+
}],
|
|
1102
|
+
fieldProps: { placeholder: "请输入用户名" }
|
|
1103
|
+
}, {
|
|
1104
|
+
key: "role",
|
|
1105
|
+
label: "角色",
|
|
1106
|
+
type: "select",
|
|
1107
|
+
fieldProps: {
|
|
1108
|
+
placeholder: "请选择",
|
|
1109
|
+
options: [{
|
|
1110
|
+
label: "管理员",
|
|
1111
|
+
value: "admin"
|
|
1112
|
+
}, {
|
|
1113
|
+
label: "用户",
|
|
1114
|
+
value: "user"
|
|
1115
|
+
}]
|
|
1116
|
+
}
|
|
1117
|
+
}],
|
|
1118
|
+
onFinish: (values) => console.log(values)
|
|
1119
|
+
})
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
function TableSearchDemo() {
|
|
1123
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1124
|
+
title: "TableSearch",
|
|
1125
|
+
children: /* @__PURE__ */ jsx(TableSearch, {
|
|
1126
|
+
onSearch: (v) => console.log(v),
|
|
1127
|
+
schemas: [
|
|
1128
|
+
{
|
|
1129
|
+
type: "input",
|
|
1130
|
+
key: "q1",
|
|
1131
|
+
label: "字段1",
|
|
1132
|
+
fieldProps: {}
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
type: "select",
|
|
1136
|
+
key: "q2",
|
|
1137
|
+
label: "状态",
|
|
1138
|
+
fieldProps: { options: [{
|
|
1139
|
+
value: "a",
|
|
1140
|
+
label: "A"
|
|
1141
|
+
}] }
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
type: "switch",
|
|
1145
|
+
key: "q3",
|
|
1146
|
+
label: "开关",
|
|
1147
|
+
fieldProps: {}
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
type: "date",
|
|
1151
|
+
key: "q4",
|
|
1152
|
+
label: "日期",
|
|
1153
|
+
fieldProps: {}
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
type: "date",
|
|
1157
|
+
key: "q5",
|
|
1158
|
+
label: "范围",
|
|
1159
|
+
fieldProps: { mode: "range" }
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
type: "textarea",
|
|
1163
|
+
key: "q6",
|
|
1164
|
+
label: "文本",
|
|
1165
|
+
fieldProps: {}
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
type: "input",
|
|
1169
|
+
key: "q7",
|
|
1170
|
+
label: "字段7",
|
|
1171
|
+
fieldProps: {}
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
type: "input",
|
|
1175
|
+
key: "q8",
|
|
1176
|
+
label: "字段8",
|
|
1177
|
+
fieldProps: {}
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
})
|
|
1181
|
+
});
|
|
1182
|
+
}
|
|
1183
|
+
function SkeletonDemo() {
|
|
1184
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1185
|
+
title: "Skeleton",
|
|
1186
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1187
|
+
className: "w-full space-y-4",
|
|
1188
|
+
children: [
|
|
1189
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
1190
|
+
className: "text-xs text-gray-500 mb-1",
|
|
1191
|
+
children: "pageloading"
|
|
1192
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
1193
|
+
mode: "pageloading",
|
|
1194
|
+
rows: 3,
|
|
1195
|
+
showTitle: true,
|
|
1196
|
+
showActions: true
|
|
1197
|
+
})] }),
|
|
1198
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
1199
|
+
className: "text-xs text-gray-500 mb-1",
|
|
1200
|
+
children: "tableloading"
|
|
1201
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
1202
|
+
mode: "tableloading",
|
|
1203
|
+
rows: 4
|
|
1204
|
+
})] }),
|
|
1205
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
1206
|
+
className: "text-xs text-gray-500 mb-1",
|
|
1207
|
+
children: "componentsloading"
|
|
1208
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
1209
|
+
mode: "componentsloading",
|
|
1210
|
+
rows: 2
|
|
1211
|
+
})] })
|
|
1212
|
+
]
|
|
1213
|
+
})
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
function TreeSelectDemo() {
|
|
1217
|
+
const [value, setValue] = useState(["1.1.1", "1.1.2"]);
|
|
1218
|
+
const [indeterminate, setIndeterminate] = useState([]);
|
|
1219
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1220
|
+
title: "TreeSelect",
|
|
1221
|
+
children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
1222
|
+
className: "text-sm mb-2",
|
|
1223
|
+
children: [/* @__PURE__ */ jsxs("span", { children: ["选中: ", JSON.stringify(value)] }), /* @__PURE__ */ jsxs("span", {
|
|
1224
|
+
className: "ml-4",
|
|
1225
|
+
children: ["半选: ", JSON.stringify(indeterminate)]
|
|
1226
|
+
})]
|
|
1227
|
+
}), /* @__PURE__ */ jsx(TreeSelect, {
|
|
1228
|
+
data: [{
|
|
1229
|
+
id: "1",
|
|
1230
|
+
name: "节点 1",
|
|
1231
|
+
children: [{
|
|
1232
|
+
id: "1.1",
|
|
1233
|
+
name: "节点 1.1",
|
|
1234
|
+
children: [{
|
|
1235
|
+
id: "1.1.1",
|
|
1236
|
+
name: "节点 1.1.1",
|
|
1237
|
+
children: [{
|
|
1238
|
+
id: "1.1.1.1",
|
|
1239
|
+
name: "1.1.1.1"
|
|
1240
|
+
}, {
|
|
1241
|
+
id: "1.1.1.2",
|
|
1242
|
+
name: "1.1.1.2"
|
|
1243
|
+
}]
|
|
1244
|
+
}, {
|
|
1245
|
+
id: "1.1.2",
|
|
1246
|
+
name: "节点 1.1.2"
|
|
1247
|
+
}]
|
|
1248
|
+
}, {
|
|
1249
|
+
id: "1.2",
|
|
1250
|
+
name: "节点 1.2",
|
|
1251
|
+
children: [{
|
|
1252
|
+
id: "1.2.1",
|
|
1253
|
+
name: "1.2.1"
|
|
1254
|
+
}, {
|
|
1255
|
+
id: "1.2.2",
|
|
1256
|
+
name: "1.2.2"
|
|
1257
|
+
}]
|
|
1258
|
+
}]
|
|
1259
|
+
}],
|
|
1260
|
+
value,
|
|
1261
|
+
onChange: ({ checked, indeterminate }) => {
|
|
1262
|
+
setValue(checked);
|
|
1263
|
+
setIndeterminate(indeterminate);
|
|
1264
|
+
}
|
|
1265
|
+
})] })
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
function PreviewImageDemo() {
|
|
1269
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1270
|
+
title: "PreviewImage",
|
|
1271
|
+
children: /* @__PURE__ */ jsx(PreviewImage, {
|
|
1272
|
+
images: ["https://images.unsplash.com/photo-1778512828600-4a6540a1a115?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxmZWF0dXJlZC1waG90b3MtZmVlZHw0fHx8ZW58MHx8fHx8", "https://images.unsplash.com/photo-1778392120781-a6b2b55dc12a?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxmZWF0dXJlZC1waG90b3MtZmVlZHwyNnx8fGVufDB8fHx8fA%3D%3D"],
|
|
1273
|
+
initialIndex: 0
|
|
1274
|
+
})
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
function ImageUploadDemo() {
|
|
1278
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1279
|
+
title: "ImageUpload",
|
|
1280
|
+
children: /* @__PURE__ */ jsx(ImageUpload, {
|
|
1281
|
+
accept: ".jpg,.png",
|
|
1282
|
+
maxCount: 4,
|
|
1283
|
+
beforeChange: (f) => {
|
|
1284
|
+
console.log(f);
|
|
1285
|
+
return parseInt(Math.random() * 10 + "") % 2 === 0;
|
|
1286
|
+
}
|
|
1287
|
+
})
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
function RadioDemo() {
|
|
1291
|
+
const [selected, setSelected] = useState("a");
|
|
1292
|
+
const [groupValue, setGroupValue] = useState("green");
|
|
1293
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
1294
|
+
title: "Radio",
|
|
1295
|
+
children: [
|
|
1296
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1297
|
+
className: "space-y-2",
|
|
1298
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
1299
|
+
className: "text-sm text-muted-foreground",
|
|
1300
|
+
children: ["受控: ", selected]
|
|
1301
|
+
}), [
|
|
1302
|
+
{
|
|
1303
|
+
label: "选项 A",
|
|
1304
|
+
value: "a"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
label: "选项 B",
|
|
1308
|
+
value: "b"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
label: "选项 C",
|
|
1312
|
+
value: "c"
|
|
1313
|
+
}
|
|
1314
|
+
].map((opt) => /* @__PURE__ */ jsx(Radio, {
|
|
1315
|
+
name: "demo-radio",
|
|
1316
|
+
label: opt.label,
|
|
1317
|
+
checked: selected === opt.value,
|
|
1318
|
+
onChange: () => setSelected(opt.value)
|
|
1319
|
+
}, opt.value))]
|
|
1320
|
+
}),
|
|
1321
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1322
|
+
className: "space-y-2 ml-8",
|
|
1323
|
+
children: [
|
|
1324
|
+
/* @__PURE__ */ jsx("p", {
|
|
1325
|
+
className: "text-sm text-muted-foreground",
|
|
1326
|
+
children: "非受控默认选中"
|
|
1327
|
+
}),
|
|
1328
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1329
|
+
name: "demo-radio-2",
|
|
1330
|
+
label: "默认选中",
|
|
1331
|
+
defaultChecked: true
|
|
1332
|
+
}),
|
|
1333
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1334
|
+
name: "demo-radio-2",
|
|
1335
|
+
label: "禁用状态",
|
|
1336
|
+
disabled: true
|
|
1337
|
+
}),
|
|
1338
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1339
|
+
name: "demo-radio-2",
|
|
1340
|
+
label: "禁用且选中",
|
|
1341
|
+
disabled: true,
|
|
1342
|
+
defaultChecked: true
|
|
1343
|
+
})
|
|
1344
|
+
]
|
|
1345
|
+
}),
|
|
1346
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1347
|
+
className: "w-full ml-8 space-y-2",
|
|
1348
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
1349
|
+
className: "text-sm text-muted-foreground",
|
|
1350
|
+
children: ["RadioGroup 垂直布局: ", groupValue]
|
|
1351
|
+
}), /* @__PURE__ */ jsxs(RadioGroup, {
|
|
1352
|
+
name: "demo-group",
|
|
1353
|
+
value: groupValue,
|
|
1354
|
+
onChange: setGroupValue,
|
|
1355
|
+
children: [
|
|
1356
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1357
|
+
value: "default",
|
|
1358
|
+
label: "默认主题"
|
|
1359
|
+
}),
|
|
1360
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1361
|
+
value: "green",
|
|
1362
|
+
label: "绿色主题"
|
|
1363
|
+
}),
|
|
1364
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1365
|
+
value: "gray",
|
|
1366
|
+
label: "灰色主题"
|
|
1367
|
+
})
|
|
1368
|
+
]
|
|
1369
|
+
})]
|
|
1370
|
+
}),
|
|
1371
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1372
|
+
className: "w-full ml-8 space-y-2",
|
|
1373
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1374
|
+
className: "text-sm text-muted-foreground",
|
|
1375
|
+
children: "RadioGroup 水平布局 (非受控)"
|
|
1376
|
+
}), /* @__PURE__ */ jsxs(RadioGroup, {
|
|
1377
|
+
name: "demo-group-2",
|
|
1378
|
+
defaultValue: "b",
|
|
1379
|
+
direction: "horizontal",
|
|
1380
|
+
children: [
|
|
1381
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1382
|
+
value: "a",
|
|
1383
|
+
label: "选项 A"
|
|
1384
|
+
}),
|
|
1385
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1386
|
+
value: "b",
|
|
1387
|
+
label: "选项 B"
|
|
1388
|
+
}),
|
|
1389
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1390
|
+
value: "c",
|
|
1391
|
+
label: "选项 C"
|
|
1392
|
+
}),
|
|
1393
|
+
/* @__PURE__ */ jsx(Radio, {
|
|
1394
|
+
value: "d",
|
|
1395
|
+
label: "禁用选项",
|
|
1396
|
+
disabled: true
|
|
1397
|
+
})
|
|
1398
|
+
]
|
|
1399
|
+
})]
|
|
1400
|
+
})
|
|
1401
|
+
]
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
function NotificationDemo() {
|
|
1405
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1406
|
+
title: "Notification",
|
|
1407
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1408
|
+
className: "w-full space-y-3",
|
|
1409
|
+
children: [
|
|
1410
|
+
/* @__PURE__ */ jsx(Notification, {
|
|
1411
|
+
type: "info",
|
|
1412
|
+
title: "信息提示",
|
|
1413
|
+
message: "这是一条普通信息通知。"
|
|
1414
|
+
}),
|
|
1415
|
+
/* @__PURE__ */ jsx(Notification, {
|
|
1416
|
+
type: "success",
|
|
1417
|
+
title: "操作成功",
|
|
1418
|
+
message: "数据已成功保存。"
|
|
1419
|
+
}),
|
|
1420
|
+
/* @__PURE__ */ jsx(Notification, {
|
|
1421
|
+
type: "warning",
|
|
1422
|
+
title: "警告",
|
|
1423
|
+
message: "请注意检查配置项是否正确。"
|
|
1424
|
+
}),
|
|
1425
|
+
/* @__PURE__ */ jsx(Notification, {
|
|
1426
|
+
type: "error",
|
|
1427
|
+
title: "错误",
|
|
1428
|
+
message: "请求失败,请稍后重试。",
|
|
1429
|
+
closable: false
|
|
1430
|
+
}),
|
|
1431
|
+
/* @__PURE__ */ jsx(Notification, {
|
|
1432
|
+
type: "info",
|
|
1433
|
+
title: "不自动关闭",
|
|
1434
|
+
message: "此通知需要手动关闭。",
|
|
1435
|
+
duration: 0
|
|
1436
|
+
})
|
|
1437
|
+
]
|
|
1438
|
+
})
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
function LoadingDemo() {
|
|
1442
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1443
|
+
title: "Loading",
|
|
1444
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1445
|
+
className: "flex items-end gap-8",
|
|
1446
|
+
children: [
|
|
1447
|
+
/* @__PURE__ */ jsx(Loading, {
|
|
1448
|
+
size: "sm",
|
|
1449
|
+
text: "加载中..."
|
|
1450
|
+
}),
|
|
1451
|
+
/* @__PURE__ */ jsx(Loading, {
|
|
1452
|
+
size: "md",
|
|
1453
|
+
text: "加载中..."
|
|
1454
|
+
}),
|
|
1455
|
+
/* @__PURE__ */ jsx(Loading, { size: "lg" })
|
|
1456
|
+
]
|
|
1457
|
+
})
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
|
+
function LayoutDemo() {
|
|
1461
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1462
|
+
title: "Layout",
|
|
1463
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1464
|
+
className: "w-full h-80 border rounded-lg overflow-hidden",
|
|
1465
|
+
children: /* @__PURE__ */ jsx(Layout, {
|
|
1466
|
+
header: /* @__PURE__ */ jsx("div", {
|
|
1467
|
+
className: "flex items-center h-12 px-4 text-sm font-medium",
|
|
1468
|
+
children: "Header"
|
|
1469
|
+
}),
|
|
1470
|
+
sidebar: /* @__PURE__ */ jsxs("div", {
|
|
1471
|
+
className: "p-4",
|
|
1472
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1473
|
+
className: "text-sm font-medium mb-2",
|
|
1474
|
+
children: "Sidebar"
|
|
1475
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1476
|
+
className: "space-y-1",
|
|
1477
|
+
children: [
|
|
1478
|
+
/* @__PURE__ */ jsx("div", {
|
|
1479
|
+
className: "text-sm text-muted-foreground p-1 rounded hover:bg-muted cursor-pointer",
|
|
1480
|
+
children: "菜单项 1"
|
|
1481
|
+
}),
|
|
1482
|
+
/* @__PURE__ */ jsx("div", {
|
|
1483
|
+
className: "text-sm text-muted-foreground p-1 rounded hover:bg-muted cursor-pointer",
|
|
1484
|
+
children: "菜单项 2"
|
|
1485
|
+
}),
|
|
1486
|
+
/* @__PURE__ */ jsx("div", {
|
|
1487
|
+
className: "text-sm text-muted-foreground p-1 rounded hover:bg-muted cursor-pointer",
|
|
1488
|
+
children: "菜单项 3"
|
|
1489
|
+
})
|
|
1490
|
+
]
|
|
1491
|
+
})]
|
|
1492
|
+
}),
|
|
1493
|
+
footer: /* @__PURE__ */ jsx("div", {
|
|
1494
|
+
className: "flex items-center h-10 px-4 text-xs text-muted-foreground",
|
|
1495
|
+
children: "Footer"
|
|
1496
|
+
}),
|
|
1497
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1498
|
+
className: "p-4",
|
|
1499
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1500
|
+
className: "text-sm font-medium mb-1",
|
|
1501
|
+
children: "Content"
|
|
1502
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1503
|
+
className: "text-xs text-muted-foreground",
|
|
1504
|
+
children: "这是主要内容区域。"
|
|
1505
|
+
})]
|
|
1506
|
+
})
|
|
1507
|
+
})
|
|
1508
|
+
})
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
function CardDemo() {
|
|
1512
|
+
return /* @__PURE__ */ jsxs(Section, {
|
|
1513
|
+
title: "Card",
|
|
1514
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1515
|
+
className: "w-72",
|
|
1516
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
1517
|
+
header: /* @__PURE__ */ jsx("span", {
|
|
1518
|
+
className: "text-sm font-medium",
|
|
1519
|
+
children: "卡片标题"
|
|
1520
|
+
}),
|
|
1521
|
+
footer: /* @__PURE__ */ jsxs("div", {
|
|
1522
|
+
className: "flex justify-end gap-2",
|
|
1523
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
1524
|
+
size: "sm",
|
|
1525
|
+
children: "取消"
|
|
1526
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1527
|
+
variant: "primary",
|
|
1528
|
+
size: "sm",
|
|
1529
|
+
children: "确认"
|
|
1530
|
+
})]
|
|
1531
|
+
}),
|
|
1532
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1533
|
+
className: "text-sm text-muted-foreground",
|
|
1534
|
+
children: "这是一张基础卡片,包含 header、body 和 footer 三个区域。"
|
|
1535
|
+
})
|
|
1536
|
+
})
|
|
1537
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1538
|
+
className: "w-72",
|
|
1539
|
+
children: /* @__PURE__ */ jsx(Card, {
|
|
1540
|
+
className: "border-theme",
|
|
1541
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1542
|
+
className: "text-sm text-muted-foreground",
|
|
1543
|
+
children: "无 header/footer 的简洁卡片。"
|
|
1544
|
+
})
|
|
1545
|
+
})
|
|
1546
|
+
})]
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
function TabsDemo() {
|
|
1550
|
+
const [activeTab, setActiveTab] = useState("tab1");
|
|
1551
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
1552
|
+
title: "Tabs",
|
|
1553
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1554
|
+
className: "w-full",
|
|
1555
|
+
children: [/* @__PURE__ */ jsx(Tabs, {
|
|
1556
|
+
items: [
|
|
1557
|
+
{
|
|
1558
|
+
key: "tab1",
|
|
1559
|
+
label: "标签页 1"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
key: "tab2",
|
|
1563
|
+
label: "标签页 2"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
key: "tab3",
|
|
1567
|
+
label: "标签页 3"
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
key: "tab4",
|
|
1571
|
+
label: "禁用标签",
|
|
1572
|
+
disabled: true
|
|
1573
|
+
}
|
|
1574
|
+
],
|
|
1575
|
+
activeKey: activeTab,
|
|
1576
|
+
onChange: setActiveTab
|
|
1577
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1578
|
+
className: "p-4 border border-t-0 rounded-b-lg bg-background",
|
|
1579
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1580
|
+
className: "text-sm text-muted-foreground",
|
|
1581
|
+
children: {
|
|
1582
|
+
tab1: "这是标签页 1 的内容区域。",
|
|
1583
|
+
tab2: "这是标签页 2 的内容区域。",
|
|
1584
|
+
tab3: "这是标签页 3 的内容区域。"
|
|
1585
|
+
}[activeTab]
|
|
1586
|
+
})
|
|
1587
|
+
})]
|
|
1588
|
+
})
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
var TestPage = () => {
|
|
1592
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1593
|
+
className: "p-6 max-w-5xl mx-auto",
|
|
1594
|
+
children: [
|
|
1595
|
+
/* @__PURE__ */ jsx("h1", {
|
|
1596
|
+
className: "text-2xl font-bold mb-6",
|
|
1597
|
+
children: "组件展示"
|
|
1598
|
+
}),
|
|
1599
|
+
/* @__PURE__ */ jsx(ThemeSwitcher, {}),
|
|
1600
|
+
/* @__PURE__ */ jsx(ButtonDemo, {}),
|
|
1601
|
+
/* @__PURE__ */ jsx(InputDemo, {}),
|
|
1602
|
+
/* @__PURE__ */ jsx(InputNumberDemo, {}),
|
|
1603
|
+
/* @__PURE__ */ jsx(TextareaDemo, {}),
|
|
1604
|
+
/* @__PURE__ */ jsx(SelectDemo, {}),
|
|
1605
|
+
/* @__PURE__ */ jsx(CheckboxDemo, {}),
|
|
1606
|
+
/* @__PURE__ */ jsx(RadioDemo, {}),
|
|
1607
|
+
/* @__PURE__ */ jsx(SwitchDemo, {}),
|
|
1608
|
+
/* @__PURE__ */ jsx(TooltipDemo, {}),
|
|
1609
|
+
/* @__PURE__ */ jsx(DropdownDemo, {}),
|
|
1610
|
+
/* @__PURE__ */ jsx(MessageDemo, {}),
|
|
1611
|
+
/* @__PURE__ */ jsx(NotificationDemo, {}),
|
|
1612
|
+
/* @__PURE__ */ jsx(LoadingDemo, {}),
|
|
1613
|
+
/* @__PURE__ */ jsx(ModalDemo, {}),
|
|
1614
|
+
/* @__PURE__ */ jsx(DrawerDemo, {}),
|
|
1615
|
+
/* @__PURE__ */ jsx(ConfirmDialogDemo, {}),
|
|
1616
|
+
/* @__PURE__ */ jsx(PaginationDemo, {}),
|
|
1617
|
+
/* @__PURE__ */ jsx(TableDemo, {}),
|
|
1618
|
+
/* @__PURE__ */ jsx(DataTableDemo, {}),
|
|
1619
|
+
/* @__PURE__ */ jsx(SearchDemo, {}),
|
|
1620
|
+
/* @__PURE__ */ jsx(BreadcrumbDemo, {}),
|
|
1621
|
+
/* @__PURE__ */ jsx(LabelDemo, {}),
|
|
1622
|
+
/* @__PURE__ */ jsx(LayoutDemo, {}),
|
|
1623
|
+
/* @__PURE__ */ jsx(CardDemo, {}),
|
|
1624
|
+
/* @__PURE__ */ jsx(TabsDemo, {}),
|
|
1625
|
+
/* @__PURE__ */ jsx(FormDemo, {}),
|
|
1626
|
+
/* @__PURE__ */ jsx(SchemaFormDemo, {}),
|
|
1627
|
+
/* @__PURE__ */ jsx(TableSearchDemo, {}),
|
|
1628
|
+
/* @__PURE__ */ jsx(SkeletonDemo, {}),
|
|
1629
|
+
/* @__PURE__ */ jsx(TreeSelectDemo, {}),
|
|
1630
|
+
/* @__PURE__ */ jsx(DateTestPage, {}),
|
|
1631
|
+
/* @__PURE__ */ jsx(PreviewImageDemo, {}),
|
|
1632
|
+
/* @__PURE__ */ jsx(ImageUploadDemo, {}),
|
|
1633
|
+
/* @__PURE__ */ jsx(MenuTestPage, {})
|
|
1634
|
+
]
|
|
1635
|
+
});
|
|
1636
|
+
};
|
|
1637
|
+
//#endregion
|
|
1638
|
+
export { TestPage as default };
|