@yoka-ui/ui 1.0.10-test
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/@Docs-yoka/exports.generated.md +92 -0
- package/@Docs-yoka/llms.txt +23 -0
- package/README.md +291 -0
- package/dist/es/Themes/InputTheme/index.d.ts +6 -0
- package/dist/es/Themes/InputTheme/index.js +22 -0
- package/dist/es/Themes/InputTheme/index.js.map +7 -0
- package/dist/es/Themes/TableTheme/index.d.ts +7 -0
- package/dist/es/Themes/TableTheme/index.js +31 -0
- package/dist/es/Themes/TableTheme/index.js.map +7 -0
- package/dist/es/Themes/TableTheme/index.less +46 -0
- package/dist/es/assets/image/YKUI-logo.png +0 -0
- package/dist/es/assets/less/ant-reset.less +402 -0
- package/dist/es/assets/less/index.less +1 -0
- package/dist/es/assets/less/variables.less +16 -0
- package/dist/es/business/AiChat/MarkdownRender.d.ts +9 -0
- package/dist/es/business/AiChat/MarkdownRender.js +72 -0
- package/dist/es/business/AiChat/MarkdownRender.js.map +7 -0
- package/dist/es/business/AiChat/index.d.ts +16 -0
- package/dist/es/business/AiChat/index.js +521 -0
- package/dist/es/business/AiChat/index.js.map +7 -0
- package/dist/es/business/AiChat/intentRecognizer.d.ts +33 -0
- package/dist/es/business/AiChat/intentRecognizer.js +166 -0
- package/dist/es/business/AiChat/intentRecognizer.js.map +7 -0
- package/dist/es/business/AiChat/navigationManager.d.ts +94 -0
- package/dist/es/business/AiChat/navigationManager.js +208 -0
- package/dist/es/business/AiChat/navigationManager.js.map +7 -0
- package/dist/es/business/AiChat/sse.d.ts +1 -0
- package/dist/es/business/AiChat/sse.js +60 -0
- package/dist/es/business/AiChat/sse.js.map +7 -0
- package/dist/es/business/AiChat/type.d.ts +157 -0
- package/dist/es/business/AiChat/type.js +1 -0
- package/dist/es/business/AiChat/type.js.map +7 -0
- package/dist/es/business/AiChat/useAiChat.d.ts +2 -0
- package/dist/es/business/AiChat/useAiChat.js +238 -0
- package/dist/es/business/AiChat/useAiChat.js.map +7 -0
- package/dist/es/business/AiChat/useTaskWorkflow.d.ts +26 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js +230 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js.map +7 -0
- package/dist/es/business/DrawerPageInfo/index.d.ts +35 -0
- package/dist/es/business/DrawerPageInfo/index.js +133 -0
- package/dist/es/business/DrawerPageInfo/index.js.map +7 -0
- package/dist/es/business/DrawerPageInfo/index.module.less +87 -0
- package/dist/es/business/DrawerPageInfo/test.png +0 -0
- package/dist/es/business/Editor/index.d.ts +11 -0
- package/dist/es/business/Editor/index.js +86 -0
- package/dist/es/business/Editor/index.js.map +7 -0
- package/dist/es/business/Editor/index.less +31 -0
- package/dist/es/business/Empty/empty.png +0 -0
- package/dist/es/business/Empty/index.d.ts +19 -0
- package/dist/es/business/Empty/index.js +51 -0
- package/dist/es/business/Empty/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/assets/images/empty.png +0 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.d.ts +13 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.js +51 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.d.ts +13 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.js +51 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.d.ts +25 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.js +30 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.module.less +97 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.d.ts +18 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +74 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.d.ts +37 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +216 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.d.ts +26 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +102 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.d.ts +51 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.js +71 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.module.less +260 -0
- package/dist/es/business/ModCommonFilter/index.d.ts +53 -0
- package/dist/es/business/ModCommonFilter/index.js +129 -0
- package/dist/es/business/ModCommonFilter/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/index.module.less +7 -0
- package/dist/es/business/ModCommonFilter/typing.d.ts +20 -0
- package/dist/es/business/ModCommonFilter/typing.js +1 -0
- package/dist/es/business/ModCommonFilter/typing.js.map +7 -0
- package/dist/es/business/YkPorjectSelect/icon-product.png +0 -0
- package/dist/es/business/YkPorjectSelect/index.d.ts +51 -0
- package/dist/es/business/YkPorjectSelect/index.js +260 -0
- package/dist/es/business/YkPorjectSelect/index.js.map +7 -0
- package/dist/es/business/YkPorjectSelect/index.module.less +334 -0
- package/dist/es/business/YkPorjectSelect/product-close.png +0 -0
- package/dist/es/components/Clock/index.d.ts +19 -0
- package/dist/es/components/Clock/index.js +55 -0
- package/dist/es/components/Clock/index.js.map +7 -0
- package/dist/es/components/DebounceInput/index.d.ts +16 -0
- package/dist/es/components/DebounceInput/index.js +77 -0
- package/dist/es/components/DebounceInput/index.js.map +7 -0
- package/dist/es/components/DebounceInput/index.module.less +23 -0
- package/dist/es/components/MultipleSelect/index.d.ts +23 -0
- package/dist/es/components/MultipleSelect/index.js +249 -0
- package/dist/es/components/MultipleSelect/index.js.map +7 -0
- package/dist/es/components/MultipleSelect/index.module.less +174 -0
- package/dist/es/components/NumericInput/index.d.ts +19 -0
- package/dist/es/components/NumericInput/index.js +56 -0
- package/dist/es/components/NumericInput/index.js.map +7 -0
- package/dist/es/components/RefreshButton/index.d.ts +8 -0
- package/dist/es/components/RefreshButton/index.js +21 -0
- package/dist/es/components/RefreshButton/index.js.map +7 -0
- package/dist/es/components/SearchWithHistory/index.d.ts +21 -0
- package/dist/es/components/SearchWithHistory/index.js +115 -0
- package/dist/es/components/SearchWithHistory/index.js.map +7 -0
- package/dist/es/components/SearchWithHistory/index.module.less +64 -0
- package/dist/es/components/TextWithInput/index.d.ts +15 -0
- package/dist/es/components/TextWithInput/index.js +35 -0
- package/dist/es/components/TextWithInput/index.js.map +7 -0
- package/dist/es/components/TextWithToolTip/index.d.ts +17 -0
- package/dist/es/components/TextWithToolTip/index.js +118 -0
- package/dist/es/components/TextWithToolTip/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +28 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +161 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.less +151 -0
- package/dist/es/components/TreeTransfer/index.d.ts +28 -0
- package/dist/es/components/TreeTransfer/index.js +210 -0
- package/dist/es/components/TreeTransfer/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/index.less +69 -0
- package/dist/es/components/TreeTransfer/types.d.ts +122 -0
- package/dist/es/components/TreeTransfer/types.js +6 -0
- package/dist/es/components/TreeTransfer/types.js.map +7 -0
- package/dist/es/components/TreeTransfer/utils/index.d.ts +120 -0
- package/dist/es/components/TreeTransfer/utils/index.js +195 -0
- package/dist/es/components/TreeTransfer/utils/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/index.d.ts +57 -0
- package/dist/es/components/YkDateRangePicker/index.js +261 -0
- package/dist/es/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/index.module.less +281 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +16 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +193 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +31 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +556 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +16 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js +55 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/index.d.ts +62 -0
- package/dist/es/components/YkRangeDateWithVS/index.js +130 -0
- package/dist/es/components/YkRangeDateWithVS/index.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/index.module.less +548 -0
- package/dist/es/components/YkRangeDateWithVS/styles.d.ts +2 -0
- package/dist/es/components/YkRangeDateWithVS/styles.js +18 -0
- package/dist/es/components/YkRangeDateWithVS/styles.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/typing.d.ts +15 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.d.ts +48 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.js +288 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.js.map +7 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +26 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.js +647 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.js.map +7 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.module.less +263 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.d.ts +17 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js +103 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js.map +7 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.less +106 -0
- package/dist/es/creative/ButtonWithProgress/index.d.ts +11 -0
- package/dist/es/creative/ButtonWithProgress/index.js +79 -0
- package/dist/es/creative/ButtonWithProgress/index.js.map +7 -0
- package/dist/es/creative/ButtonWithProgress/index.less +66 -0
- package/dist/es/global.less +12 -0
- package/dist/es/index.d.ts +41 -0
- package/dist/es/index.js +85 -0
- package/dist/es/index.js.map +7 -0
- package/dist/es/layout/FlexGrid/index.d.ts +25 -0
- package/dist/es/layout/FlexGrid/index.js +63 -0
- package/dist/es/layout/FlexGrid/index.js.map +7 -0
- package/dist/es/layout/YkContainer/index.d.ts +27 -0
- package/dist/es/layout/YkContainer/index.js +79 -0
- package/dist/es/layout/YkContainer/index.js.map +7 -0
- package/dist/es/layout/YkDrawer/index.d.ts +22 -0
- package/dist/es/layout/YkDrawer/index.js +160 -0
- package/dist/es/layout/YkDrawer/index.js.map +7 -0
- package/dist/es/layout/YkDrawer/index.module.less +45 -0
- package/dist/es/ui/LabelSelect/demo.d.ts +3 -0
- package/dist/es/ui/LabelSelect/demo.js +83 -0
- package/dist/es/ui/LabelSelect/demo.js.map +7 -0
- package/dist/es/ui/LabelSelect/index.d.ts +41 -0
- package/dist/es/ui/LabelSelect/index.js +136 -0
- package/dist/es/ui/LabelSelect/index.js.map +7 -0
- package/dist/es/ui/LogicOperator/index.d.ts +10 -0
- package/dist/es/ui/LogicOperator/index.js +12 -0
- package/dist/es/ui/LogicOperator/index.js.map +7 -0
- package/dist/es/ui/LogicOperator/index.module.less +97 -0
- package/dist/es/ui/YkButton/index.d.ts +9 -0
- package/dist/es/ui/YkButton/index.js +59 -0
- package/dist/es/ui/YkButton/index.js.map +7 -0
- package/dist/es/ui/YkCard/index.d.ts +4 -0
- package/dist/es/ui/YkCard/index.js +79 -0
- package/dist/es/ui/YkCard/index.js.map +7 -0
- package/dist/es/ui/YkCard/index.module.less +30 -0
- package/dist/es/ui/YkCheckbox/index.d.ts +4 -0
- package/dist/es/ui/YkCheckbox/index.js +45 -0
- package/dist/es/ui/YkCheckbox/index.js.map +7 -0
- package/dist/es/ui/YkCheckbox/index.module.less +22 -0
- package/dist/es/ui/YkDescriptions/index.d.ts +4 -0
- package/dist/es/ui/YkDescriptions/index.js +41 -0
- package/dist/es/ui/YkDescriptions/index.js.map +7 -0
- package/dist/es/ui/YkPagination/index.d.ts +4 -0
- package/dist/es/ui/YkPagination/index.js +63 -0
- package/dist/es/ui/YkPagination/index.js.map +7 -0
- package/dist/es/ui/YkPagination/index.module.less +22 -0
- package/dist/es/ui/YkRadio/index.d.ts +4 -0
- package/dist/es/ui/YkRadio/index.js +51 -0
- package/dist/es/ui/YkRadio/index.js.map +7 -0
- package/dist/es/ui/YkRadio/index.module.less +22 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.d.ts +15 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.js +23 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.js.map +7 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.module.less +112 -0
- package/dist/es/ui/YkSegmented/index.d.ts +4 -0
- package/dist/es/ui/YkSegmented/index.js +41 -0
- package/dist/es/ui/YkSegmented/index.js.map +7 -0
- package/dist/es/ui/YkSelect/index.d.ts +7 -0
- package/dist/es/ui/YkSelect/index.js +54 -0
- package/dist/es/ui/YkSelect/index.js.map +7 -0
- package/dist/es/ui/YkSpin/index.d.ts +4 -0
- package/dist/es/ui/YkSpin/index.js +41 -0
- package/dist/es/ui/YkSpin/index.js.map +7 -0
- package/dist/es/ui/YkStatistic/index.d.ts +4 -0
- package/dist/es/ui/YkStatistic/index.js +41 -0
- package/dist/es/ui/YkStatistic/index.js.map +7 -0
- package/dist/es/ui/YkSwitch/index.d.ts +4 -0
- package/dist/es/ui/YkSwitch/index.js +51 -0
- package/dist/es/ui/YkSwitch/index.js.map +7 -0
- package/dist/es/ui/YkTabs/index.d.ts +12 -0
- package/dist/es/ui/YkTabs/index.js +75 -0
- package/dist/es/ui/YkTabs/index.js.map +7 -0
- package/dist/es/ui/YkTabs/index.module.less +11 -0
- package/dist/es/ui/YkTooltip/index.d.ts +4 -0
- package/dist/es/ui/YkTooltip/index.js +50 -0
- package/dist/es/ui/YkTooltip/index.js.map +7 -0
- package/dist/es/utils/styleUtils.d.ts +18 -0
- package/dist/es/utils/styleUtils.js +57 -0
- package/dist/es/utils/styleUtils.js.map +7 -0
- package/dist/es/utils/ykStorybookDoc.d.ts +17 -0
- package/dist/es/utils/ykStorybookDoc.js +18 -0
- package/dist/es/utils/ykStorybookDoc.js.map +7 -0
- package/dist/lib/Themes/InputTheme/index.d.ts +6 -0
- package/dist/lib/Themes/InputTheme/index.js +52 -0
- package/dist/lib/Themes/InputTheme/index.js.map +7 -0
- package/dist/lib/Themes/TableTheme/index.d.ts +7 -0
- package/dist/lib/Themes/TableTheme/index.js +61 -0
- package/dist/lib/Themes/TableTheme/index.js.map +7 -0
- package/dist/lib/Themes/TableTheme/index.less +46 -0
- package/dist/lib/assets/image/YKUI-logo.png +0 -0
- package/dist/lib/assets/less/ant-reset.less +402 -0
- package/dist/lib/assets/less/index.less +1 -0
- package/dist/lib/assets/less/variables.less +16 -0
- package/dist/lib/business/AiChat/MarkdownRender.d.ts +9 -0
- package/dist/lib/business/AiChat/MarkdownRender.js +102 -0
- package/dist/lib/business/AiChat/MarkdownRender.js.map +7 -0
- package/dist/lib/business/AiChat/index.d.ts +16 -0
- package/dist/lib/business/AiChat/index.js +514 -0
- package/dist/lib/business/AiChat/index.js.map +7 -0
- package/dist/lib/business/AiChat/intentRecognizer.d.ts +33 -0
- package/dist/lib/business/AiChat/intentRecognizer.js +193 -0
- package/dist/lib/business/AiChat/intentRecognizer.js.map +7 -0
- package/dist/lib/business/AiChat/navigationManager.d.ts +94 -0
- package/dist/lib/business/AiChat/navigationManager.js +214 -0
- package/dist/lib/business/AiChat/navigationManager.js.map +7 -0
- package/dist/lib/business/AiChat/sse.d.ts +1 -0
- package/dist/lib/business/AiChat/sse.js +61 -0
- package/dist/lib/business/AiChat/sse.js.map +7 -0
- package/dist/lib/business/AiChat/type.d.ts +157 -0
- package/dist/lib/business/AiChat/type.js +18 -0
- package/dist/lib/business/AiChat/type.js.map +7 -0
- package/dist/lib/business/AiChat/useAiChat.d.ts +2 -0
- package/dist/lib/business/AiChat/useAiChat.js +222 -0
- package/dist/lib/business/AiChat/useAiChat.js.map +7 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +26 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js +216 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js.map +7 -0
- package/dist/lib/business/DrawerPageInfo/index.d.ts +35 -0
- package/dist/lib/business/DrawerPageInfo/index.js +163 -0
- package/dist/lib/business/DrawerPageInfo/index.js.map +7 -0
- package/dist/lib/business/DrawerPageInfo/index.module.less +87 -0
- package/dist/lib/business/DrawerPageInfo/test.png +0 -0
- package/dist/lib/business/Editor/index.d.ts +11 -0
- package/dist/lib/business/Editor/index.js +99 -0
- package/dist/lib/business/Editor/index.js.map +7 -0
- package/dist/lib/business/Editor/index.less +31 -0
- package/dist/lib/business/Empty/empty.png +0 -0
- package/dist/lib/business/Empty/index.d.ts +19 -0
- package/dist/lib/business/Empty/index.js +65 -0
- package/dist/lib/business/Empty/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/assets/images/empty.png +0 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.d.ts +13 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.js +50 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.d.ts +13 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.js +50 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.d.ts +25 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.js +60 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.module.less +97 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.d.ts +18 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +69 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.d.ts +37 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +211 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.d.ts +26 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +97 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.d.ts +51 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.js +101 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.module.less +260 -0
- package/dist/lib/business/ModCommonFilter/index.d.ts +53 -0
- package/dist/lib/business/ModCommonFilter/index.js +143 -0
- package/dist/lib/business/ModCommonFilter/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/index.module.less +7 -0
- package/dist/lib/business/ModCommonFilter/typing.d.ts +20 -0
- package/dist/lib/business/ModCommonFilter/typing.js +18 -0
- package/dist/lib/business/ModCommonFilter/typing.js.map +7 -0
- package/dist/lib/business/YkPorjectSelect/icon-product.png +0 -0
- package/dist/lib/business/YkPorjectSelect/index.d.ts +51 -0
- package/dist/lib/business/YkPorjectSelect/index.js +235 -0
- package/dist/lib/business/YkPorjectSelect/index.js.map +7 -0
- package/dist/lib/business/YkPorjectSelect/index.module.less +334 -0
- package/dist/lib/business/YkPorjectSelect/product-close.png +0 -0
- package/dist/lib/components/Clock/index.d.ts +19 -0
- package/dist/lib/components/Clock/index.js +85 -0
- package/dist/lib/components/Clock/index.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.d.ts +16 -0
- package/dist/lib/components/DebounceInput/index.js +107 -0
- package/dist/lib/components/DebounceInput/index.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.module.less +23 -0
- package/dist/lib/components/MultipleSelect/index.d.ts +23 -0
- package/dist/lib/components/MultipleSelect/index.js +279 -0
- package/dist/lib/components/MultipleSelect/index.js.map +7 -0
- package/dist/lib/components/MultipleSelect/index.module.less +174 -0
- package/dist/lib/components/NumericInput/index.d.ts +19 -0
- package/dist/lib/components/NumericInput/index.js +67 -0
- package/dist/lib/components/NumericInput/index.js.map +7 -0
- package/dist/lib/components/RefreshButton/index.d.ts +8 -0
- package/dist/lib/components/RefreshButton/index.js +51 -0
- package/dist/lib/components/RefreshButton/index.js.map +7 -0
- package/dist/lib/components/SearchWithHistory/index.d.ts +21 -0
- package/dist/lib/components/SearchWithHistory/index.js +145 -0
- package/dist/lib/components/SearchWithHistory/index.js.map +7 -0
- package/dist/lib/components/SearchWithHistory/index.module.less +64 -0
- package/dist/lib/components/TextWithInput/index.d.ts +15 -0
- package/dist/lib/components/TextWithInput/index.js +65 -0
- package/dist/lib/components/TextWithInput/index.js.map +7 -0
- package/dist/lib/components/TextWithToolTip/index.d.ts +17 -0
- package/dist/lib/components/TextWithToolTip/index.js +134 -0
- package/dist/lib/components/TextWithToolTip/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +28 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +191 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.less +151 -0
- package/dist/lib/components/TreeTransfer/index.d.ts +28 -0
- package/dist/lib/components/TreeTransfer/index.js +214 -0
- package/dist/lib/components/TreeTransfer/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/index.less +69 -0
- package/dist/lib/components/TreeTransfer/types.d.ts +122 -0
- package/dist/lib/components/TreeTransfer/types.js +30 -0
- package/dist/lib/components/TreeTransfer/types.js.map +7 -0
- package/dist/lib/components/TreeTransfer/utils/index.d.ts +120 -0
- package/dist/lib/components/TreeTransfer/utils/index.js +208 -0
- package/dist/lib/components/TreeTransfer/utils/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/index.d.ts +57 -0
- package/dist/lib/components/YkDateRangePicker/index.js +282 -0
- package/dist/lib/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/index.module.less +281 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +16 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +223 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +31 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +567 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +16 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js +85 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/index.d.ts +62 -0
- package/dist/lib/components/YkRangeDateWithVS/index.js +140 -0
- package/dist/lib/components/YkRangeDateWithVS/index.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/index.module.less +548 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.d.ts +2 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.js +48 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/typing.d.ts +15 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.d.ts +48 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.js +333 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.js.map +7 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +26 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.js +647 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +7 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.module.less +263 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.d.ts +17 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js +102 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +7 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.less +106 -0
- package/dist/lib/creative/ButtonWithProgress/index.d.ts +11 -0
- package/dist/lib/creative/ButtonWithProgress/index.js +70 -0
- package/dist/lib/creative/ButtonWithProgress/index.js.map +7 -0
- package/dist/lib/creative/ButtonWithProgress/index.less +66 -0
- package/dist/lib/global.less +12 -0
- package/dist/lib/index.d.ts +41 -0
- package/dist/lib/index.js +158 -0
- package/dist/lib/index.js.map +7 -0
- package/dist/lib/layout/FlexGrid/index.d.ts +25 -0
- package/dist/lib/layout/FlexGrid/index.js +77 -0
- package/dist/lib/layout/FlexGrid/index.js.map +7 -0
- package/dist/lib/layout/YkContainer/index.d.ts +27 -0
- package/dist/lib/layout/YkContainer/index.js +79 -0
- package/dist/lib/layout/YkContainer/index.js.map +7 -0
- package/dist/lib/layout/YkDrawer/index.d.ts +22 -0
- package/dist/lib/layout/YkDrawer/index.js +152 -0
- package/dist/lib/layout/YkDrawer/index.js.map +7 -0
- package/dist/lib/layout/YkDrawer/index.module.less +45 -0
- package/dist/lib/ui/LabelSelect/demo.d.ts +3 -0
- package/dist/lib/ui/LabelSelect/demo.js +113 -0
- package/dist/lib/ui/LabelSelect/demo.js.map +7 -0
- package/dist/lib/ui/LabelSelect/index.d.ts +41 -0
- package/dist/lib/ui/LabelSelect/index.js +124 -0
- package/dist/lib/ui/LabelSelect/index.js.map +7 -0
- package/dist/lib/ui/LogicOperator/index.d.ts +10 -0
- package/dist/lib/ui/LogicOperator/index.js +42 -0
- package/dist/lib/ui/LogicOperator/index.js.map +7 -0
- package/dist/lib/ui/LogicOperator/index.module.less +97 -0
- package/dist/lib/ui/YkButton/index.d.ts +9 -0
- package/dist/lib/ui/YkButton/index.js +55 -0
- package/dist/lib/ui/YkButton/index.js.map +7 -0
- package/dist/lib/ui/YkCard/index.d.ts +4 -0
- package/dist/lib/ui/YkCard/index.js +76 -0
- package/dist/lib/ui/YkCard/index.js.map +7 -0
- package/dist/lib/ui/YkCard/index.module.less +30 -0
- package/dist/lib/ui/YkCheckbox/index.d.ts +4 -0
- package/dist/lib/ui/YkCheckbox/index.js +42 -0
- package/dist/lib/ui/YkCheckbox/index.js.map +7 -0
- package/dist/lib/ui/YkCheckbox/index.module.less +22 -0
- package/dist/lib/ui/YkDescriptions/index.d.ts +4 -0
- package/dist/lib/ui/YkDescriptions/index.js +41 -0
- package/dist/lib/ui/YkDescriptions/index.js.map +7 -0
- package/dist/lib/ui/YkPagination/index.d.ts +4 -0
- package/dist/lib/ui/YkPagination/index.js +60 -0
- package/dist/lib/ui/YkPagination/index.js.map +7 -0
- package/dist/lib/ui/YkPagination/index.module.less +22 -0
- package/dist/lib/ui/YkRadio/index.d.ts +4 -0
- package/dist/lib/ui/YkRadio/index.js +51 -0
- package/dist/lib/ui/YkRadio/index.js.map +7 -0
- package/dist/lib/ui/YkRadio/index.module.less +22 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.d.ts +15 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.js +53 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.js.map +7 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.module.less +112 -0
- package/dist/lib/ui/YkSegmented/index.d.ts +4 -0
- package/dist/lib/ui/YkSegmented/index.js +41 -0
- package/dist/lib/ui/YkSegmented/index.js.map +7 -0
- package/dist/lib/ui/YkSelect/index.d.ts +7 -0
- package/dist/lib/ui/YkSelect/index.js +54 -0
- package/dist/lib/ui/YkSelect/index.js.map +7 -0
- package/dist/lib/ui/YkSpin/index.d.ts +4 -0
- package/dist/lib/ui/YkSpin/index.js +41 -0
- package/dist/lib/ui/YkSpin/index.js.map +7 -0
- package/dist/lib/ui/YkStatistic/index.d.ts +4 -0
- package/dist/lib/ui/YkStatistic/index.js +41 -0
- package/dist/lib/ui/YkStatistic/index.js.map +7 -0
- package/dist/lib/ui/YkSwitch/index.d.ts +4 -0
- package/dist/lib/ui/YkSwitch/index.js +51 -0
- package/dist/lib/ui/YkSwitch/index.js.map +7 -0
- package/dist/lib/ui/YkTabs/index.d.ts +12 -0
- package/dist/lib/ui/YkTabs/index.js +70 -0
- package/dist/lib/ui/YkTabs/index.js.map +7 -0
- package/dist/lib/ui/YkTabs/index.module.less +11 -0
- package/dist/lib/ui/YkTooltip/index.d.ts +4 -0
- package/dist/lib/ui/YkTooltip/index.js +45 -0
- package/dist/lib/ui/YkTooltip/index.js.map +7 -0
- package/dist/lib/utils/styleUtils.d.ts +18 -0
- package/dist/lib/utils/styleUtils.js +84 -0
- package/dist/lib/utils/styleUtils.js.map +7 -0
- package/dist/lib/utils/ykStorybookDoc.d.ts +17 -0
- package/dist/lib/utils/ykStorybookDoc.js +41 -0
- package/dist/lib/utils/ykStorybookDoc.js.map +7 -0
- package/package.json +147 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/*
|
|
2
|
+
基本样式
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@primaryColor: #3b86f9;
|
|
6
|
+
@iconPrimaryColor: #0a6bfd;
|
|
7
|
+
@fontPrimaryColor: #0a6bfd;
|
|
8
|
+
@borderPrimaryColor: #b0cffe;
|
|
9
|
+
@globalBgColor: #edeff4;
|
|
10
|
+
|
|
11
|
+
@ykFontFamilySemibold: 'PingFangSC-Semibold', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
12
|
+
sans-serif;
|
|
13
|
+
@ykFontFamilyRegular: 'PingFangSC-Regular', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
14
|
+
sans-serif;
|
|
15
|
+
@ykFontFamilyMedium: 'PingFangSC-Medium', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
16
|
+
sans-serif;
|
|
17
|
+
|
|
18
|
+
.button {
|
|
19
|
+
position: relative;
|
|
20
|
+
z-index: 2;
|
|
21
|
+
height: 30px;
|
|
22
|
+
padding: 0 10px;
|
|
23
|
+
color: #333;
|
|
24
|
+
background: rgb(255 255 255);
|
|
25
|
+
border: 0.5px solid rgb(231 231 231);
|
|
26
|
+
border-radius: 2px;
|
|
27
|
+
box-shadow: 0 0.5px 0 0 rgb(231 231 231);
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
color: #66a8ff !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:global {
|
|
34
|
+
.icon-xiala1 {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
transition: transform 0.1s linear;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.nameText {
|
|
41
|
+
max-width: 200px;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.valueText {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
text-align: left;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.popoverContent {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
min-width: 180px;
|
|
60
|
+
max-width: 180px;
|
|
61
|
+
|
|
62
|
+
.searchInput {
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
z-index: 2;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 42px;
|
|
71
|
+
padding: 0 10px;
|
|
72
|
+
border: none !important;
|
|
73
|
+
border-bottom: 1px solid #e7e7e7 !important;
|
|
74
|
+
box-shadow: none !important;
|
|
75
|
+
|
|
76
|
+
:global {
|
|
77
|
+
.icon-sousuo {
|
|
78
|
+
color: #5495fb;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.emptyItem {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 35px;
|
|
86
|
+
padding: 5px 10px;
|
|
87
|
+
color: #999;
|
|
88
|
+
text-align: center;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.popoverContentList {
|
|
92
|
+
position: relative;
|
|
93
|
+
margin-top: 42px;
|
|
94
|
+
padding-top: 10px;
|
|
95
|
+
|
|
96
|
+
.checkAll {
|
|
97
|
+
position: relative;
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 30px !important;
|
|
100
|
+
padding: 5px 0 5px 15px;
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
background: #f1f8ff;
|
|
104
|
+
|
|
105
|
+
span {
|
|
106
|
+
color: #3b86f9;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:global {
|
|
111
|
+
.ant-checkbox-wrapper {
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
span {
|
|
117
|
+
color: #666;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.optionItem {
|
|
123
|
+
position: relative;
|
|
124
|
+
display: flex;
|
|
125
|
+
gap: 2px;
|
|
126
|
+
height: 30px !important;
|
|
127
|
+
margin-bottom: 5px;
|
|
128
|
+
padding: 5px 5px 5px 15px;
|
|
129
|
+
color: #666;
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
transition: all 0.2s linear;
|
|
132
|
+
|
|
133
|
+
&:hover {
|
|
134
|
+
color: #3b86f9;
|
|
135
|
+
background: #f1f8ff;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.label {
|
|
139
|
+
flex: 1;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.checked {
|
|
147
|
+
width: 16px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.popoverFooter {
|
|
152
|
+
display: flex;
|
|
153
|
+
gap: 10px;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
padding: 10px 0px;
|
|
156
|
+
background: #fff;
|
|
157
|
+
border-top: 1px solid #e7e7e7;
|
|
158
|
+
.cancelButton {
|
|
159
|
+
color: #666;
|
|
160
|
+
background: #f9fafc;
|
|
161
|
+
border-color: #f0f1f3;
|
|
162
|
+
transition: all 0.1s linear;
|
|
163
|
+
&:hover {
|
|
164
|
+
background: #eff1f5 !important;
|
|
165
|
+
border-color: #f0f1f3;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
button {
|
|
169
|
+
padding: 0 10px !important;
|
|
170
|
+
font-size: 12px !important;
|
|
171
|
+
border-radius: 2px !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件名称:NumericInput
|
|
3
|
+
* 组件描述:一个用于输入数字的组件,支持正负数和小数点
|
|
4
|
+
* 组件使用场景:在需要输入数字的场景中使用,如筛选、排序等
|
|
5
|
+
* 组件参数说明:
|
|
6
|
+
* - style: 组件样式
|
|
7
|
+
* - placeholder: 输入框提示文字
|
|
8
|
+
*/
|
|
9
|
+
import type { InputProps } from 'antd';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export interface NumericInputProps extends Omit<InputProps, 'onChange'> {
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
value: string;
|
|
15
|
+
statusError?: boolean;
|
|
16
|
+
onChange: (value: string) => void;
|
|
17
|
+
}
|
|
18
|
+
declare const NumericInput: (props: NumericInputProps) => React.JSX.Element;
|
|
19
|
+
export default NumericInput;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/NumericInput/index.tsx
|
|
30
|
+
var NumericInput_exports = {};
|
|
31
|
+
__export(NumericInput_exports, {
|
|
32
|
+
default: () => NumericInput_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(NumericInput_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var NumericInput = (props) => {
|
|
38
|
+
const { value = "", statusError, onChange, placeholder, style = {} } = props;
|
|
39
|
+
const handleChange = (e) => {
|
|
40
|
+
const { value: inputValue } = e.target;
|
|
41
|
+
const reg = /^-?\d*(\.\d*)?$/;
|
|
42
|
+
if (reg.test(inputValue) || inputValue === "" || inputValue === "-") {
|
|
43
|
+
onChange(inputValue);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const handleBlur = () => {
|
|
47
|
+
let valueTemp = value;
|
|
48
|
+
if (value !== null && (value.charAt(value.length - 1) === "." || value === "-")) {
|
|
49
|
+
valueTemp = value == null ? void 0 : value.slice(0, -1);
|
|
50
|
+
}
|
|
51
|
+
onChange(valueTemp == null ? void 0 : valueTemp.replace(/0*(\d+)/, "$1"));
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
import_antd.Input,
|
|
55
|
+
{
|
|
56
|
+
...props,
|
|
57
|
+
style: { width: 100, ...style },
|
|
58
|
+
onChange: handleChange,
|
|
59
|
+
status: statusError ? "error" : void 0,
|
|
60
|
+
onBlur: handleBlur,
|
|
61
|
+
placeholder,
|
|
62
|
+
maxLength: 19
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
var NumericInput_default = NumericInput;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/NumericInput/index.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * 组件名称:NumericInput\n * 组件描述:一个用于输入数字的组件,支持正负数和小数点\n * 组件使用场景:在需要输入数字的场景中使用,如筛选、排序等\n * 组件参数说明:\n * - style: 组件样式\n * - placeholder: 输入框提示文字\n */\nimport type { InputProps } from 'antd';\nimport { Input } from 'antd';\nimport React from 'react';\n\nexport interface NumericInputProps extends Omit<InputProps, 'onChange'> {\n style?: React.CSSProperties;\n placeholder?: string;\n value: string;\n statusError?: boolean;\n onChange: (value: string) => void;\n}\n\nconst NumericInput = (props: NumericInputProps) => {\n const { value = '', statusError, onChange, placeholder, style = {} } = props;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const { value: inputValue } = e.target;\n const reg = /^-?\\d*(\\.\\d*)?$/;\n if (reg.test(inputValue) || inputValue === '' || inputValue === '-') {\n onChange(inputValue);\n }\n };\n\n // '.' at the end or only '-' in the input box.\n const handleBlur = () => {\n let valueTemp = value;\n if (value !== null && (value.charAt(value.length - 1) === '.' || value === '-')) {\n valueTemp = value?.slice(0, -1);\n }\n onChange(valueTemp?.replace(/0*(\\d+)/, '$1'));\n };\n\n return (\n <Input\n {...props}\n style={{ width: 100, ...style }}\n onChange={handleChange}\n status={statusError ? 'error' : undefined}\n onBlur={handleBlur}\n placeholder={placeholder}\n maxLength={19}\n />\n );\n};\n\nexport default NumericInput;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,kBAAsB;AACtB,mBAAkB;AAUlB,IAAM,eAAe,CAAC,UAA6B;AACjD,QAAM,EAAE,QAAQ,IAAI,aAAa,UAAU,aAAa,QAAQ,CAAC,EAAE,IAAI;AAEvE,QAAM,eAAe,CAAC,MAA2C;AAC/D,UAAM,EAAE,OAAO,WAAW,IAAI,EAAE;AAChC,UAAM,MAAM;AACZ,QAAI,IAAI,KAAK,UAAU,KAAK,eAAe,MAAM,eAAe,KAAK;AACnE,eAAS,UAAU;AAAA,IACrB;AAAA,EACF;AAGA,QAAM,aAAa,MAAM;AACvB,QAAI,YAAY;AAChB,QAAI,UAAU,SAAS,MAAM,OAAO,MAAM,SAAS,CAAC,MAAM,OAAO,UAAU,MAAM;AAC/E,kBAAY,+BAAO,MAAM,GAAG;AAAA,IAC9B;AACA,aAAS,uCAAW,QAAQ,WAAW,KAAK;AAAA,EAC9C;AAEA,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO,EAAE,OAAO,KAAK,GAAG,MAAM;AAAA,MAC9B,UAAU;AAAA,MACV,QAAQ,cAAc,UAAU;AAAA,MAChC,QAAQ;AAAA,MACR;AAAA,MACA,WAAW;AAAA;AAAA,EACb;AAEJ;AAEA,IAAO,uBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/RefreshButton/index.tsx
|
|
30
|
+
var RefreshButton_exports = {};
|
|
31
|
+
__export(RefreshButton_exports, {
|
|
32
|
+
default: () => RefreshButton_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(RefreshButton_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var RefreshButton = ({ handleRefresh, text = "刷新", style }) => {
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
39
|
+
import_antd.Button,
|
|
40
|
+
{
|
|
41
|
+
style,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
handleRefresh();
|
|
44
|
+
},
|
|
45
|
+
icon: /* @__PURE__ */ import_react.default.createElement("i", { className: "iconfont icon-refresh", style: { color: "#3B86F9", fontSize: 14 } })
|
|
46
|
+
},
|
|
47
|
+
text
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
var RefreshButton_default = RefreshButton;
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/RefreshButton/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Button } from 'antd';\nimport React from 'react';\ntype Props = {\n handleRefresh: () => void;\n text?: string;\n style?: React.CSSProperties;\n};\n\nconst RefreshButton: React.FC<Props> = ({ handleRefresh, text = '刷新', style }) => {\n return (\n <Button\n style={style}\n onClick={() => {\n handleRefresh();\n }}\n icon={<i className='iconfont icon-refresh' style={{ color: '#3B86F9', fontSize: 14 }} />}\n >\n {text}\n </Button>\n );\n};\n\nexport default RefreshButton;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuB;AACvB,mBAAkB;AAOlB,IAAM,gBAAiC,CAAC,EAAE,eAAe,OAAO,MAAM,MAAM,MAAM;AAChF,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAS,MAAM;AACb,sBAAc;AAAA,MAChB;AAAA,MACA,MAAM,6BAAAA,QAAA,cAAC,OAAE,WAAU,yBAAwB,OAAO,EAAE,OAAO,WAAW,UAAU,GAAG,GAAG;AAAA;AAAA,IAErF;AAAA,EACH;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SearchWithHistoryProps = {
|
|
3
|
+
/** localStorage 存储 key */
|
|
4
|
+
localstorageKey: string;
|
|
5
|
+
/** 可搜索的选项列表(含菜单路由、看板等) */
|
|
6
|
+
list: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
tag?: string;
|
|
10
|
+
}[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** 选中项回调,value 为路由 path 或看板 id 等 */
|
|
13
|
+
onClick: (value: string) => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* 带历史记录的搜索弹层
|
|
17
|
+
* - 无输入时展示最近搜索(localStorage 持久化)
|
|
18
|
+
* - 有输入时展示匹配的菜单/看板列表
|
|
19
|
+
*/
|
|
20
|
+
declare const SearchWithHistory: React.FC<SearchWithHistoryProps>;
|
|
21
|
+
export default SearchWithHistory;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/SearchWithHistory/index.tsx
|
|
30
|
+
var SearchWithHistory_exports = {};
|
|
31
|
+
__export(SearchWithHistory_exports, {
|
|
32
|
+
default: () => SearchWithHistory_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(SearchWithHistory_exports);
|
|
35
|
+
var import_TextWithToolTip = __toESM(require("../TextWithToolTip"));
|
|
36
|
+
var import_icons = require("@ant-design/icons");
|
|
37
|
+
var import_ahooks = require("ahooks");
|
|
38
|
+
var import_antd = require("antd");
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_index_module = __toESM(require("./index.module.less"));
|
|
41
|
+
var INPUT_THEME = {
|
|
42
|
+
token: { colorText: "rgba(191, 199, 209, 1)" },
|
|
43
|
+
components: {
|
|
44
|
+
Input: {
|
|
45
|
+
colorBgContainer: "rgba(45, 56, 86, 1)",
|
|
46
|
+
colorBorder: "#2D3856",
|
|
47
|
+
borderRadius: 18,
|
|
48
|
+
boxShadow: "inset 0px -0.5px 0px 0px rgba(20, 31, 62, 0.5)",
|
|
49
|
+
hoverBorderColor: "rgba(0, 85, 255, 1)",
|
|
50
|
+
paddingBlock: 6
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var SearchWithHistory = ({
|
|
55
|
+
localstorageKey = "yk_search_history",
|
|
56
|
+
list,
|
|
57
|
+
placeholder = "搜索",
|
|
58
|
+
onClick
|
|
59
|
+
}) => {
|
|
60
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
61
|
+
const [searchValue, setSearchValue] = (0, import_react.useState)("");
|
|
62
|
+
const [historyList, setHistoryList] = (0, import_ahooks.useLocalStorageState)(
|
|
63
|
+
localstorageKey,
|
|
64
|
+
{ defaultValue: [] }
|
|
65
|
+
);
|
|
66
|
+
const menuItemClick = (0, import_react.useCallback)(
|
|
67
|
+
(item) => {
|
|
68
|
+
onClick(item.value);
|
|
69
|
+
setOpen(false);
|
|
70
|
+
setHistoryList((prev = []) => [item, ...prev.filter((h) => h.value !== item.value)]);
|
|
71
|
+
},
|
|
72
|
+
[onClick, setHistoryList]
|
|
73
|
+
);
|
|
74
|
+
const clearHistory = (0, import_react.useCallback)(() => {
|
|
75
|
+
setOpen(false);
|
|
76
|
+
setTimeout(() => setHistoryList([]), 100);
|
|
77
|
+
}, [setHistoryList]);
|
|
78
|
+
const menuList = (0, import_react.useMemo)(() => list.filter((item) => item.label.includes(searchValue)), [list, searchValue]);
|
|
79
|
+
const historyContent = (0, import_react.useMemo)(
|
|
80
|
+
() => /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.historyHeader }, /* @__PURE__ */ import_react.default.createElement(import_icons.ClockCircleOutlined, { style: { marginRight: 10, transform: "translateY(-1px)" } }), /* @__PURE__ */ import_react.default.createElement("span", null, "最近搜索"), /* @__PURE__ */ import_react.default.createElement("i", { className: "iconfont icon-lajitong", onClick: clearHistory })), /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.historyList }, historyList.map((item) => /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.item, key: item.value, onClick: () => menuItemClick(item) }, /* @__PURE__ */ import_react.default.createElement(import_TextWithToolTip.default, { width: 160, text: item.label }), item.tag && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.tag }, item.tag))))),
|
|
81
|
+
[historyList, clearHistory, menuItemClick]
|
|
82
|
+
);
|
|
83
|
+
const listContent = (0, import_react.useMemo)(
|
|
84
|
+
() => /* @__PURE__ */ import_react.default.createElement("div", null, menuList.map((item) => /* @__PURE__ */ import_react.default.createElement("div", { key: item.value, className: import_index_module.default.item, onClick: () => menuItemClick(item) }, /* @__PURE__ */ import_react.default.createElement(import_TextWithToolTip.default, { width: 160, text: item.label, highlight: searchValue }), item.tag && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.tag }, item.tag)))),
|
|
85
|
+
[menuList, searchValue, menuItemClick]
|
|
86
|
+
);
|
|
87
|
+
const content = (0, import_react.useMemo)(() => {
|
|
88
|
+
if (!searchValue) {
|
|
89
|
+
if (historyList.length === 0)
|
|
90
|
+
return null;
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, historyContent);
|
|
92
|
+
}
|
|
93
|
+
if (menuList.length === 0)
|
|
94
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#999" } }, "暂无搜索结果");
|
|
95
|
+
return listContent;
|
|
96
|
+
}, [searchValue, historyList, historyContent, menuList, listContent]);
|
|
97
|
+
(0, import_react.useEffect)(() => {
|
|
98
|
+
if (!content)
|
|
99
|
+
setOpen(false);
|
|
100
|
+
}, [content]);
|
|
101
|
+
const shouldOpen = (value) => {
|
|
102
|
+
if (value)
|
|
103
|
+
return true;
|
|
104
|
+
return historyList.length > 0;
|
|
105
|
+
};
|
|
106
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
107
|
+
import_antd.Popover,
|
|
108
|
+
{
|
|
109
|
+
open,
|
|
110
|
+
onOpenChange: (nextOpen) => {
|
|
111
|
+
if (nextOpen && !content)
|
|
112
|
+
return;
|
|
113
|
+
setOpen(nextOpen);
|
|
114
|
+
},
|
|
115
|
+
className: import_index_module.default.popover,
|
|
116
|
+
styles: { body: { borderRadius: 4, width: 250, paddingRight: 0 } },
|
|
117
|
+
fresh: true,
|
|
118
|
+
title: false,
|
|
119
|
+
trigger: "click",
|
|
120
|
+
placement: "bottomLeft",
|
|
121
|
+
arrow: false,
|
|
122
|
+
content,
|
|
123
|
+
getPopupContainer: (triggerNode) => triggerNode.parentNode,
|
|
124
|
+
autoAdjustOverflow: false
|
|
125
|
+
},
|
|
126
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.ConfigProvider, { theme: INPUT_THEME }, /* @__PURE__ */ import_react.default.createElement(
|
|
127
|
+
import_antd.Input,
|
|
128
|
+
{
|
|
129
|
+
className: import_index_module.default.inputContainer,
|
|
130
|
+
classNames: { input: import_index_module.default.input },
|
|
131
|
+
placeholder,
|
|
132
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, null),
|
|
133
|
+
value: searchValue,
|
|
134
|
+
onFocus: () => historyList.length > 0 && setOpen(true),
|
|
135
|
+
onChange: (e) => {
|
|
136
|
+
const val = e.target.value;
|
|
137
|
+
setSearchValue(val);
|
|
138
|
+
setOpen(shouldOpen(val));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
))
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
var SearchWithHistory_default = SearchWithHistory;
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/SearchWithHistory/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import TextWithTooltip from '@/components/TextWithToolTip';\nimport { ClockCircleOutlined, SearchOutlined } from '@ant-design/icons';\nimport { useLocalStorageState } from 'ahooks';\nimport { ConfigProvider, Input, Popover } from 'antd';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport styles from './index.module.less';\n\ntype SearchWithHistoryProps = {\n /** localStorage 存储 key */\n localstorageKey: string;\n /** 可搜索的选项列表(含菜单路由、看板等) */\n list: { label: string; value: string; tag?: string }[];\n placeholder?: string;\n /** 选中项回调,value 为路由 path 或看板 id 等 */\n onClick: (value: string) => void;\n};\n\nconst INPUT_THEME = {\n token: { colorText: 'rgba(191, 199, 209, 1)' },\n components: {\n Input: {\n colorBgContainer: 'rgba(45, 56, 86, 1)',\n colorBorder: '#2D3856',\n borderRadius: 18,\n boxShadow: 'inset 0px -0.5px 0px 0px rgba(20, 31, 62, 0.5)',\n hoverBorderColor: 'rgba(0, 85, 255, 1)',\n paddingBlock: 6,\n },\n },\n};\n\n/**\n * 带历史记录的搜索弹层\n * - 无输入时展示最近搜索(localStorage 持久化)\n * - 有输入时展示匹配的菜单/看板列表\n */\nconst SearchWithHistory: React.FC<SearchWithHistoryProps> = ({\n localstorageKey = 'yk_search_history',\n list,\n placeholder = '搜索',\n onClick,\n}) => {\n const [open, setOpen] = useState(false);\n const [searchValue, setSearchValue] = useState('');\n const [historyList, setHistoryList] = useLocalStorageState<{ label: string; value: string; tag?: string }[]>(\n localstorageKey,\n { defaultValue: [] },\n );\n\n /** 选中项:执行回调并更新历史(同 value 则置顶) */\n const menuItemClick = useCallback(\n (item: { label: string; value: string; tag?: string }) => {\n onClick(item.value);\n setOpen(false);\n setHistoryList((prev = []) => [item, ...prev.filter((h) => h.value !== item.value)]);\n },\n [onClick, setHistoryList],\n );\n\n /** 清空历史 */\n const clearHistory = useCallback(() => {\n setOpen(false);\n setTimeout(() => setHistoryList([]), 100);\n }, [setHistoryList]);\n\n /** 匹配的选项列表(按 label 包含搜索词过滤) */\n const menuList = useMemo(() => list.filter((item) => item.label.includes(searchValue)), [list, searchValue]);\n\n /** 最近搜索列表 DOM */\n const historyContent = useMemo(\n () => (\n <div>\n <div className={styles.historyHeader}>\n <ClockCircleOutlined style={{ marginRight: 10, transform: 'translateY(-1px)' }} />\n <span>最近搜索</span>\n <i className='iconfont icon-lajitong' onClick={clearHistory} />\n </div>\n <div className={styles.historyList}>\n {historyList.map((item) => (\n <div className={styles.item} key={item.value} onClick={() => menuItemClick(item)}>\n <TextWithTooltip width={160} text={item.label} />\n {item.tag && <div className={styles.tag}>{item.tag}</div>}\n </div>\n ))}\n </div>\n </div>\n ),\n [historyList, clearHistory, menuItemClick],\n );\n\n /** 搜索结果列表 DOM */\n const listContent = useMemo(\n () => (\n <div>\n {menuList.map((item) => (\n <div key={item.value} className={styles.item} onClick={() => menuItemClick(item)}>\n <TextWithTooltip width={160} text={item.label} highlight={searchValue} />\n {item.tag && <div className={styles.tag}>{item.tag}</div>}\n </div>\n ))}\n </div>\n ),\n [menuList, searchValue, menuItemClick],\n );\n\n /**\n * 弹层内容:根据输入与历史决定\n * 1. 无历史 → null(不展示弹层)\n * 2. 有历史且无输入 → 最近搜索\n * 3. 有输入且无匹配 → 暂无搜索结果\n * 4. 有输入且匹配 → 菜单列表\n */\n const content = useMemo(() => {\n if (!searchValue) {\n if (historyList.length === 0) return null;\n return <div>{historyContent}</div>;\n }\n if (menuList.length === 0) return <div style={{ color: '#999' }}>暂无搜索结果</div>;\n return listContent;\n }, [searchValue, historyList, historyContent, menuList, listContent]);\n\n /** 内容为空时关闭弹层(如清空输入且无历史) */\n useEffect(() => {\n if (!content) setOpen(false);\n }, [content]);\n\n /** 有输入或有历史时显示弹层 */\n const shouldOpen = (value: string) => {\n if (value) return true;\n return historyList.length > 0;\n };\n\n return (\n <Popover\n open={open}\n onOpenChange={(nextOpen) => {\n if (nextOpen && !content) return; // 无内容时不打开,避免空白弹层\n setOpen(nextOpen);\n }}\n className={styles.popover}\n styles={{ body: { borderRadius: 4, width: 250, paddingRight: 0 } }}\n fresh\n title={false}\n trigger='click'\n placement='bottomLeft'\n arrow={false}\n content={content}\n getPopupContainer={(triggerNode: HTMLElement) => triggerNode.parentNode as HTMLElement}\n autoAdjustOverflow={false}\n >\n <ConfigProvider theme={INPUT_THEME}>\n <Input\n className={styles.inputContainer}\n classNames={{ input: styles.input }}\n placeholder={placeholder}\n prefix={<SearchOutlined />}\n value={searchValue}\n onFocus={() => historyList.length > 0 && setOpen(true)}\n onChange={(e) => {\n const val = e.target.value;\n setSearchValue(val);\n setOpen(shouldOpen(val));\n }}\n />\n </ConfigProvider>\n </Popover>\n );\n};\n\nexport default SearchWithHistory;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "styles", "TextWithTooltip"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.inputContainer {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
width: 250px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.input {
|
|
9
|
+
height: 20px;
|
|
10
|
+
color: rgba(191, 199, 209, 1) !important;
|
|
11
|
+
caret-color: #1890ff;
|
|
12
|
+
|
|
13
|
+
&::placeholder {
|
|
14
|
+
color: rgba(150, 166, 189, 1) !important;
|
|
15
|
+
}
|
|
16
|
+
&::-webkit-input-placeholder {
|
|
17
|
+
color: rgba(150, 166, 189, 1) !important;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.historyHeader {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
height: 17px;
|
|
25
|
+
margin-right: 10px;
|
|
26
|
+
margin-bottom: 10px;
|
|
27
|
+
color: rgba(153, 153, 153, 1);
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
line-height: 17px;
|
|
30
|
+
|
|
31
|
+
i {
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.historyList {
|
|
38
|
+
max-height: 300px;
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.item {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
height: 30px;
|
|
47
|
+
margin-right: 10px;
|
|
48
|
+
padding: 0 16px;
|
|
49
|
+
color: #666;
|
|
50
|
+
line-height: 30px;
|
|
51
|
+
border-radius: 2px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition: all 0.2s;
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
color: #3b82fe;
|
|
57
|
+
background: #f1f8ff;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tag {
|
|
61
|
+
color: #999;
|
|
62
|
+
font-size: 12px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 文本可编辑组件的 Props
|
|
4
|
+
*/
|
|
5
|
+
type PropsType = {
|
|
6
|
+
/** 当前展示/提交的文本值,受控 */
|
|
7
|
+
value: string;
|
|
8
|
+
/** 确认编辑后的回调,参数为输入框内的新值 */
|
|
9
|
+
callback: (value: string) => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 文本 + 内联编辑:默认展示文案与编辑图标,点击图标切为输入框+确认/取消,确认时调用 callback。
|
|
13
|
+
*/
|
|
14
|
+
declare const TextWithInput: React.FC<PropsType>;
|
|
15
|
+
export default TextWithInput;
|