@yoka-ui/ui 1.0.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/@Docs-yoka/exports.generated.md +93 -0
- package/@Docs-yoka/llms.txt +23 -0
- package/README.md +113 -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 +733 -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 +16 -0
- package/dist/es/business/AiChat/sse.js +171 -0
- package/dist/es/business/AiChat/sse.js.map +7 -0
- package/dist/es/business/AiChat/type.d.ts +156 -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 +268 -0
- package/dist/es/business/AiChat/useAiChat.js.map +7 -0
- package/dist/es/business/AiChat/useTaskWorkflow.d.ts +25 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js +196 -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/YkDateRangePicker.mdx +180 -0
- package/dist/es/components/YkDateRangePicker/index.d.ts +61 -0
- package/dist/es/components/YkDateRangePicker/index.js +317 -0
- package/dist/es/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/index.module.less +304 -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 +576 -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 +566 -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 +43 -0
- package/dist/es/index.js +87 -0
- package/dist/es/index.js.map +7 -0
- package/dist/es/index.less +35 -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 +723 -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 +16 -0
- package/dist/lib/business/AiChat/sse.js +171 -0
- package/dist/lib/business/AiChat/sse.js.map +7 -0
- package/dist/lib/business/AiChat/type.d.ts +156 -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 +252 -0
- package/dist/lib/business/AiChat/useAiChat.js.map +7 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +25 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js +182 -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/YkDateRangePicker.mdx +180 -0
- package/dist/lib/components/YkDateRangePicker/index.d.ts +61 -0
- package/dist/lib/components/YkDateRangePicker/index.js +338 -0
- package/dist/lib/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/index.module.less +304 -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 +587 -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 +566 -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 +43 -0
- package/dist/lib/index.js +161 -0
- package/dist/lib/index.js.map +7 -0
- package/dist/lib/index.less +35 -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 +148 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/business/Editor/index.tsx
|
|
19
|
+
import { Editor } from "@wangeditor/editor-for-react";
|
|
20
|
+
import "@wangeditor/editor/dist/css/style.css";
|
|
21
|
+
import React, { useEffect, useState } from "react";
|
|
22
|
+
import "./index.less";
|
|
23
|
+
var NoteEditor = ({ value, onChange, style, readOnly = false }) => {
|
|
24
|
+
const [editor, setEditor] = useState(null);
|
|
25
|
+
const editorConfig = {
|
|
26
|
+
placeholder: "请输入内容...",
|
|
27
|
+
readOnly,
|
|
28
|
+
// 配置 hoverbar 菜单项
|
|
29
|
+
hoverbarKeys: {
|
|
30
|
+
text: {
|
|
31
|
+
menuKeys: [
|
|
32
|
+
"headerSelect",
|
|
33
|
+
// N级标题
|
|
34
|
+
"justifyLeft",
|
|
35
|
+
// 左对齐按钮
|
|
36
|
+
"justifyCenter",
|
|
37
|
+
// 居中按钮
|
|
38
|
+
"justifyRight",
|
|
39
|
+
// 右对齐按钮
|
|
40
|
+
"bulletedList",
|
|
41
|
+
// 无序列表
|
|
42
|
+
"numberedList",
|
|
43
|
+
// 有序列表
|
|
44
|
+
"|",
|
|
45
|
+
// 分隔符
|
|
46
|
+
"color",
|
|
47
|
+
// 字色
|
|
48
|
+
"bgColor",
|
|
49
|
+
// 字背景
|
|
50
|
+
"bold",
|
|
51
|
+
// 加粗按钮
|
|
52
|
+
"through",
|
|
53
|
+
// 删除按钮(删除线)
|
|
54
|
+
"italic",
|
|
55
|
+
// 斜体按钮
|
|
56
|
+
"underline"
|
|
57
|
+
// 下划线按钮
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
return () => {
|
|
64
|
+
if (editor === null)
|
|
65
|
+
return;
|
|
66
|
+
editor.destroy();
|
|
67
|
+
setEditor(null);
|
|
68
|
+
};
|
|
69
|
+
}, [editor]);
|
|
70
|
+
return /* @__PURE__ */ React.createElement(
|
|
71
|
+
Editor,
|
|
72
|
+
{
|
|
73
|
+
defaultConfig: editorConfig,
|
|
74
|
+
value,
|
|
75
|
+
onCreated: setEditor,
|
|
76
|
+
onChange: (editor2) => onChange == null ? void 0 : onChange(editor2.getHtml()),
|
|
77
|
+
mode: "default",
|
|
78
|
+
style: __spreadValues({}, style)
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
var Editor_default = NoteEditor;
|
|
83
|
+
export {
|
|
84
|
+
Editor_default as default
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/Editor/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { IDomEditor, IEditorConfig } from '@wangeditor/editor';\nimport { Editor } from '@wangeditor/editor-for-react';\nimport '@wangeditor/editor/dist/css/style.css'; // 引入 css\nimport React, { FC, useEffect, useState } from 'react';\nimport './index.less';\n\ntype PageTypes = {\n value: string;\n onChange?: (value: string) => void;\n style?: React.CSSProperties;\n readOnly?: boolean;\n};\n\nconst NoteEditor: FC<PageTypes> = ({ value, onChange, style, readOnly = false }) => {\n // editor 实例\n const [editor, setEditor] = useState<IDomEditor | null>(null);\n\n // 编辑器配置\n const editorConfig: Partial<IEditorConfig> = {\n placeholder: '请输入内容...',\n readOnly: readOnly,\n // 配置 hoverbar 菜单项\n hoverbarKeys: {\n text: {\n menuKeys: [\n 'headerSelect', // N级标题\n 'justifyLeft', // 左对齐按钮\n 'justifyCenter', // 居中按钮\n 'justifyRight', // 右对齐按钮\n 'bulletedList', // 无序列表\n 'numberedList', // 有序列表\n '|', // 分隔符\n 'color', // 字色\n 'bgColor', // 字背景\n 'bold', // 加粗按钮\n 'through', // 删除按钮(删除线)\n 'italic', // 斜体按钮\n 'underline', // 下划线按钮\n ],\n },\n },\n };\n\n // 及时销毁 editor ,重要!\n useEffect(() => {\n return () => {\n if (editor === null) return;\n editor.destroy();\n setEditor(null);\n };\n }, [editor]);\n\n return (\n <Editor\n defaultConfig={editorConfig}\n value={value}\n onCreated={setEditor}\n onChange={(editor) => onChange?.(editor.getHtml())}\n mode='default'\n style={{ ...style }}\n />\n );\n};\n\nexport default NoteEditor;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AACA,SAAS,cAAc;AACvB,OAAO;AACP,OAAO,SAAa,WAAW,gBAAgB;AAC/C,OAAO;AASP,IAAM,aAA4B,CAAC,EAAE,OAAO,UAAU,OAAO,WAAW,MAAM,MAAM;AAElF,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA4B,IAAI;AAG5D,QAAM,eAAuC;AAAA,IAC3C,aAAa;AAAA,IACb;AAAA;AAAA,IAEA,cAAc;AAAA,MACZ,MAAM;AAAA,QACJ,UAAU;AAAA,UACR;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAGA,YAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,WAAW;AAAM;AACrB,aAAO,QAAQ;AACf,gBAAU,IAAI;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe;AAAA,MACf;AAAA,MACA,WAAW;AAAA,MACX,UAAU,CAACA,YAAW,qCAAWA,QAAO,QAAQ;AAAA,MAChD,MAAK;AAAA,MACL,OAAO,mBAAK;AAAA;AAAA,EACd;AAEJ;AAEA,IAAO,iBAAQ;",
|
|
6
|
+
"names": ["editor"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.w-e-menu-tooltip-v5::before {
|
|
2
|
+
display: none !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.w-e-menu-tooltip-v5::after {
|
|
6
|
+
display: none !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.w-e-text-placeholder {
|
|
10
|
+
top: 4px !important;
|
|
11
|
+
font-style: normal !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.w-e-text-container [data-slate-editor] p {
|
|
15
|
+
margin: 0 !important;
|
|
16
|
+
color: #666 !important;
|
|
17
|
+
line-height: 1.5 !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.w-e-text-container [data-slate-editor] h1,
|
|
21
|
+
.w-e-text-container [data-slate-editor] h2,
|
|
22
|
+
.w-e-text-container [data-slate-editor] h3,
|
|
23
|
+
.w-e-text-container [data-slate-editor] h4,
|
|
24
|
+
.w-e-text-container [data-slate-editor] h5,
|
|
25
|
+
.w-e-text-container [data-slate-editor] h6 {
|
|
26
|
+
margin: 5px 0 !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.w-e-drop-panel {
|
|
30
|
+
z-index: 1001 !important;
|
|
31
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 空状态占位组件的 Props(ref 由 forwardRef 注入,无需在 props 中声明)
|
|
4
|
+
*/
|
|
5
|
+
type EmptyProps = {
|
|
6
|
+
/** 空状态插图,不传则使用默认 empty.png */
|
|
7
|
+
image?: React.ReactNode | string;
|
|
8
|
+
/** 描述文案或自定义节点,默认「暂无数据」 */
|
|
9
|
+
description?: string | React.ReactNode;
|
|
10
|
+
/** 图片容器样式,会与默认宽高合并 */
|
|
11
|
+
imageStyle?: React.CSSProperties;
|
|
12
|
+
/** 根节点 Flex 的样式 */
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* 空状态占位:居中展示默认图 + 描述,支持自定义图片与文案,支持 ref 透传。
|
|
17
|
+
*/
|
|
18
|
+
declare const ForwardedEmptyPlaceholder: React.ForwardRefExoticComponent<EmptyProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export default ForwardedEmptyPlaceholder;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/business/Empty/index.tsx
|
|
19
|
+
import { Empty, Flex } from "antd";
|
|
20
|
+
import React from "react";
|
|
21
|
+
import EmptyImg from "./empty.png";
|
|
22
|
+
var descriptionStyle = {
|
|
23
|
+
color: "#999",
|
|
24
|
+
fontSize: 14,
|
|
25
|
+
height: 20,
|
|
26
|
+
lineHeight: "20px"
|
|
27
|
+
};
|
|
28
|
+
var ForwardedEmptyPlaceholder = React.forwardRef(
|
|
29
|
+
({ image, description, imageStyle = {}, style = {} }, ref) => {
|
|
30
|
+
return /* @__PURE__ */ React.createElement(Flex, { ref, style: __spreadValues({ padding: "80px 0" }, style), align: "center", justify: "center" }, /* @__PURE__ */ React.createElement(
|
|
31
|
+
Empty,
|
|
32
|
+
{
|
|
33
|
+
image: image || EmptyImg,
|
|
34
|
+
styles: {
|
|
35
|
+
image: __spreadValues({
|
|
36
|
+
height: 60,
|
|
37
|
+
width: 150,
|
|
38
|
+
display: "inline-block"
|
|
39
|
+
}, imageStyle)
|
|
40
|
+
},
|
|
41
|
+
description: description == null || description === "" ? /* @__PURE__ */ React.createElement("span", { style: descriptionStyle }, "暂无数据") : typeof description === "string" ? /* @__PURE__ */ React.createElement("span", { style: descriptionStyle }, description) : description
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
ForwardedEmptyPlaceholder.displayName = "EmptyPlaceholder";
|
|
47
|
+
var Empty_default = ForwardedEmptyPlaceholder;
|
|
48
|
+
export {
|
|
49
|
+
Empty_default as default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/Empty/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Empty, Flex } from 'antd';\nimport type { ForwardedRef } from 'react';\nimport React from 'react';\nimport EmptyImg from './empty.png';\n\n/**\n * 空状态占位组件的 Props(ref 由 forwardRef 注入,无需在 props 中声明)\n */\ntype EmptyProps = {\n /** 空状态插图,不传则使用默认 empty.png */\n image?: React.ReactNode | string;\n /** 描述文案或自定义节点,默认「暂无数据」 */\n description?: string | React.ReactNode;\n /** 图片容器样式,会与默认宽高合并 */\n imageStyle?: React.CSSProperties;\n /** 根节点 Flex 的样式 */\n style?: React.CSSProperties;\n};\n\n/** 描述文字统一样式 */\nconst descriptionStyle: React.CSSProperties = {\n color: '#999',\n fontSize: 14,\n height: 20,\n lineHeight: '20px',\n};\n\n/**\n * 空状态占位:居中展示默认图 + 描述,支持自定义图片与文案,支持 ref 透传。\n */\nconst ForwardedEmptyPlaceholder = React.forwardRef(\n ({ image, description, imageStyle = {}, style = {} }: EmptyProps, ref: ForwardedRef<HTMLDivElement>) => {\n return (\n <Flex ref={ref} style={{ padding: '80px 0', ...style }} align='center' justify='center'>\n <Empty\n image={image || EmptyImg}\n styles={{\n image: {\n height: 60,\n width: 150,\n display: 'inline-block',\n ...imageStyle,\n },\n }}\n description={\n description == null || description === '' ? (\n <span style={descriptionStyle}>暂无数据</span>\n ) : typeof description === 'string' ? (\n <span style={descriptionStyle}>{description}</span>\n ) : (\n description\n )\n }\n />\n </Flex>\n );\n },\n);\n\nForwardedEmptyPlaceholder.displayName = 'EmptyPlaceholder';\n\nexport default ForwardedEmptyPlaceholder;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA,SAAS,OAAO,YAAY;AAE5B,OAAO,WAAW;AAClB,OAAO,cAAc;AAiBrB,IAAM,mBAAwC;AAAA,EAC5C,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AACd;AAKA,IAAM,4BAA4B,MAAM;AAAA,EACtC,CAAC,EAAE,OAAO,aAAa,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,GAAe,QAAsC;AACtG,WACE,oCAAC,QAAK,KAAU,OAAO,iBAAE,SAAS,YAAa,QAAS,OAAM,UAAS,SAAQ,YAC7E;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,SAAS;AAAA,QAChB,QAAQ;AAAA,UACN,OAAO;AAAA,YACL,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,SAAS;AAAA,aACN;AAAA,QAEP;AAAA,QACA,aACE,eAAe,QAAQ,gBAAgB,KACrC,oCAAC,UAAK,OAAO,oBAAkB,MAAI,IACjC,OAAO,gBAAgB,WACzB,oCAAC,UAAK,OAAO,oBAAmB,WAAY,IAE5C;AAAA;AAAA,IAGN,CACF;AAAA,EAEJ;AACF;AAEA,0BAA0B,cAAc;AAExC,IAAO,gBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 关闭图标的 Props,继承 SVG 原生属性
|
|
4
|
+
*/
|
|
5
|
+
interface IconCloseProps extends React.SVGAttributes<SVGSVGElement> {
|
|
6
|
+
/** 图标尺寸(宽高),默认 14 */
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 关闭图标:fill 为 currentColor,可通过 className 的 color 控制颜色。
|
|
11
|
+
*/
|
|
12
|
+
declare const IconClose: React.FC<IconCloseProps>;
|
|
13
|
+
export default IconClose;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// src/business/ModCommonFilter/components/FilterButton/IconClose.tsx
|
|
31
|
+
import React from "react";
|
|
32
|
+
var IconClose = (_a) => {
|
|
33
|
+
var _b = _a, { size = 14, className } = _b, rest = __objRest(_b, ["size", "className"]);
|
|
34
|
+
return /* @__PURE__ */ React.createElement(
|
|
35
|
+
"svg",
|
|
36
|
+
__spreadValues({
|
|
37
|
+
className,
|
|
38
|
+
viewBox: "0 0 1024 1024",
|
|
39
|
+
width: size,
|
|
40
|
+
height: size,
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
43
|
+
}, rest),
|
|
44
|
+
/* @__PURE__ */ React.createElement("path", { d: "M512 15.675077a497.191385 497.191385 0 1 0 0 994.382769A497.191385 497.191385 0 0 0 512 15.675077z m213.228308 645.907692a45.607385 45.607385 0 0 1-64.433231 64.512L512 577.299692 363.204923 726.094769a45.607385 45.607385 0 1 1-64.433231-64.512l148.795077-148.716307-148.795077-148.795077a45.607385 45.607385 0 1 1 64.433231-64.433231L512 448.433231l148.795077-148.795077a45.607385 45.607385 0 0 1 64.433231 64.433231L576.433231 512.866462l148.795077 148.716307z" })
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
var IconClose_default = IconClose;
|
|
48
|
+
export {
|
|
49
|
+
IconClose_default as default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=IconClose.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/business/ModCommonFilter/components/FilterButton/IconClose.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\n/**\n * 关闭图标的 Props,继承 SVG 原生属性\n */\ninterface IconCloseProps extends React.SVGAttributes<SVGSVGElement> {\n /** 图标尺寸(宽高),默认 14 */\n size?: number;\n}\n\n/**\n * 关闭图标:fill 为 currentColor,可通过 className 的 color 控制颜色。\n */\nconst IconClose: React.FC<IconCloseProps> = ({ size = 14, className, ...rest }) => (\n <svg\n className={className}\n viewBox='0 0 1024 1024'\n width={size}\n height={size}\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n {...rest}\n >\n <path d='M512 15.675077a497.191385 497.191385 0 1 0 0 994.382769A497.191385 497.191385 0 0 0 512 15.675077z m213.228308 645.907692a45.607385 45.607385 0 0 1-64.433231 64.512L512 577.299692 363.204923 726.094769a45.607385 45.607385 0 1 1-64.433231-64.512l148.795077-148.716307-148.795077-148.795077a45.607385 45.607385 0 1 1 64.433231-64.433231L512 448.433231l148.795077-148.795077a45.607385 45.607385 0 0 1 64.433231 64.433231L576.433231 512.866462l148.795077 148.716307z' />\n </svg>\n);\n\nexport default IconClose;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAalB,IAAM,YAAsC,CAAC,OAAmC;AAAnC,eAAE,SAAO,IAAI,UAb1D,IAa6C,IAA2B,iBAA3B,IAA2B,CAAzB,QAAW;AACxD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,OACF;AAAA,IAEJ,oCAAC,UAAK,GAAE,kdAAid;AAAA,EAC3d;AAAA;AAGF,IAAO,oBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 下拉箭头图标的 Props,继承 SVG 原生属性
|
|
4
|
+
*/
|
|
5
|
+
interface IconXialaProps extends React.SVGAttributes<SVGSVGElement> {
|
|
6
|
+
/** 图标尺寸(宽高),默认 14 */
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 下拉箭头图标:fill 为 currentColor,可通过 className 的 color 控制颜色。
|
|
11
|
+
*/
|
|
12
|
+
declare const IconXiala: React.FC<IconXialaProps>;
|
|
13
|
+
export default IconXiala;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// src/business/ModCommonFilter/components/FilterButton/IconXiala.tsx
|
|
31
|
+
import React from "react";
|
|
32
|
+
var IconXiala = (_a) => {
|
|
33
|
+
var _b = _a, { size = 14, className } = _b, rest = __objRest(_b, ["size", "className"]);
|
|
34
|
+
return /* @__PURE__ */ React.createElement(
|
|
35
|
+
"svg",
|
|
36
|
+
__spreadValues({
|
|
37
|
+
className,
|
|
38
|
+
viewBox: "0 0 1024 1024",
|
|
39
|
+
width: size,
|
|
40
|
+
height: size,
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
43
|
+
}, rest),
|
|
44
|
+
/* @__PURE__ */ React.createElement("path", { d: "M257.243429 371.053714c16.018286-16.091429 41.691429-17.261714 59.172571-2.925714l3.145143 2.925714 217.965714 217.965715 216.502857-219.428572a44.105143 44.105143 0 0 1 59.099429-3.218286l3.218286 2.779429c16.091429 15.945143 17.554286 41.618286 3.218285 59.245714l-2.852571 3.072L569.051429 682.496a44.105143 44.105143 0 0 1-59.538286 2.925714l-2.925714-2.706285-249.417143-249.344a44.105143 44.105143 0 0 1 0-62.317715z" })
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
var IconXiala_default = IconXiala;
|
|
48
|
+
export {
|
|
49
|
+
IconXiala_default as default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=IconXiala.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/business/ModCommonFilter/components/FilterButton/IconXiala.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\n/**\n * 下拉箭头图标的 Props,继承 SVG 原生属性\n */\ninterface IconXialaProps extends React.SVGAttributes<SVGSVGElement> {\n /** 图标尺寸(宽高),默认 14 */\n size?: number;\n}\n\n/**\n * 下拉箭头图标:fill 为 currentColor,可通过 className 的 color 控制颜色。\n */\nconst IconXiala: React.FC<IconXialaProps> = ({ size = 14, className, ...rest }) => (\n <svg\n className={className}\n viewBox='0 0 1024 1024'\n width={size}\n height={size}\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n {...rest}\n >\n <path d='M257.243429 371.053714c16.018286-16.091429 41.691429-17.261714 59.172571-2.925714l3.145143 2.925714 217.965714 217.965715 216.502857-219.428572a44.105143 44.105143 0 0 1 59.099429-3.218286l3.218286 2.779429c16.091429 15.945143 17.554286 41.618286 3.218285 59.245714l-2.852571 3.072L569.051429 682.496a44.105143 44.105143 0 0 1-59.538286 2.925714l-2.925714-2.706285-249.417143-249.344a44.105143 44.105143 0 0 1 0-62.317715z' />\n </svg>\n);\n\nexport default IconXiala;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAalB,IAAM,YAAsC,CAAC,OAAmC;AAAnC,eAAE,SAAO,IAAI,UAb1D,IAa6C,IAA2B,iBAA3B,IAA2B,CAAzB,QAAW;AACxD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,OACF;AAAA,IAEJ,oCAAC,UAAK,GAAE,0aAAya;AAAA,EACnb;AAAA;AAGF,IAAO,oBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 筛选按钮组件的 Props
|
|
4
|
+
*/
|
|
5
|
+
type PropsType = {
|
|
6
|
+
/** 按钮左侧图标 */
|
|
7
|
+
iconPrefix?: React.ReactNode;
|
|
8
|
+
/** 筛选维度名称,未选时展示「全{title}」 */
|
|
9
|
+
title: string;
|
|
10
|
+
/** 已选时展示前缀,如「品类」则显示「品类:已选N个」 */
|
|
11
|
+
prefixTitle?: string;
|
|
12
|
+
/** 当前选中项(code 或 id),有长度则按钮为已选样式并显示「已选N个」 */
|
|
13
|
+
value: Array<string | number>;
|
|
14
|
+
/** 弹层是否打开,用于控制箭头旋转与 hover 样式 */
|
|
15
|
+
popOpen: boolean;
|
|
16
|
+
/** 点击按钮切换弹层显隐 */
|
|
17
|
+
handlePopOpen: () => void;
|
|
18
|
+
/** 点击关闭图标清空选中(由父组件传入清空逻辑) */
|
|
19
|
+
handleClear: () => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 筛选器触发按钮:展示「全{title}」或「已选N个」,带下拉箭头与清空图标。
|
|
23
|
+
*/
|
|
24
|
+
declare const FilterButton: React.FC<PropsType>;
|
|
25
|
+
export default FilterButton;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/business/ModCommonFilter/components/FilterButton/index.tsx
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { isEmpty } from "lodash";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import IconClose from "./IconClose";
|
|
6
|
+
import IconXiala from "./IconXiala";
|
|
7
|
+
import styles from "./index.module.less";
|
|
8
|
+
var FilterButton = ({
|
|
9
|
+
title,
|
|
10
|
+
prefixTitle,
|
|
11
|
+
value = [],
|
|
12
|
+
popOpen,
|
|
13
|
+
iconPrefix,
|
|
14
|
+
handlePopOpen,
|
|
15
|
+
handleClear
|
|
16
|
+
}) => {
|
|
17
|
+
const buttonClassNames = classNames(styles.filterBtn, {
|
|
18
|
+
[styles.checked]: !isEmpty(value),
|
|
19
|
+
[styles.isHover]: popOpen
|
|
20
|
+
});
|
|
21
|
+
const buttonTextClass = classNames({
|
|
22
|
+
[styles.textUncheck]: true
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ React.createElement("button", { className: buttonClassNames, onClick: handlePopOpen, type: "button" }, iconPrefix && iconPrefix, value.length ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", null, prefixTitle ? `${prefixTitle}:` : ""), /* @__PURE__ */ React.createElement("span", { className: buttonTextClass }, value.length ? `已选${value.length}个` : "全部")) : /* @__PURE__ */ React.createElement("span", null, `全${title}`), /* @__PURE__ */ React.createElement(IconXiala, { className: classNames(styles.iconSuffix, { [styles.rotate]: popOpen }) }), /* @__PURE__ */ React.createElement(IconClose, { className: classNames(styles.iconClose, styles.iconSuffix), onClick: handleClear }));
|
|
25
|
+
};
|
|
26
|
+
var FilterButton_default = FilterButton;
|
|
27
|
+
export {
|
|
28
|
+
FilterButton_default as default
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/business/ModCommonFilter/components/FilterButton/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import classNames from 'classnames';\nimport { isEmpty } from 'lodash';\nimport React from 'react';\nimport IconClose from './IconClose';\nimport IconXiala from './IconXiala';\nimport styles from './index.module.less';\n\n/**\n * 筛选按钮组件的 Props\n */\ntype PropsType = {\n /** 按钮左侧图标 */\n iconPrefix?: React.ReactNode;\n /** 筛选维度名称,未选时展示「全{title}」 */\n title: string;\n /** 已选时展示前缀,如「品类」则显示「品类:已选N个」 */\n prefixTitle?: string;\n /** 当前选中项(code 或 id),有长度则按钮为已选样式并显示「已选N个」 */\n value: Array<string | number>;\n /** 弹层是否打开,用于控制箭头旋转与 hover 样式 */\n popOpen: boolean;\n /** 点击按钮切换弹层显隐 */\n handlePopOpen: () => void;\n /** 点击关闭图标清空选中(由父组件传入清空逻辑) */\n handleClear: () => void;\n};\n\n/**\n * 筛选器触发按钮:展示「全{title}」或「已选N个」,带下拉箭头与清空图标。\n */\nconst FilterButton: React.FC<PropsType> = ({\n title,\n prefixTitle,\n value = [],\n popOpen,\n iconPrefix,\n handlePopOpen,\n handleClear,\n}) => {\n const buttonClassNames = classNames(styles.filterBtn, {\n [styles.checked]: !isEmpty(value),\n [styles.isHover]: popOpen,\n });\n\n const buttonTextClass = classNames({\n [styles.textUncheck]: true,\n });\n\n return (\n <button className={buttonClassNames} onClick={handlePopOpen} type='button'>\n {iconPrefix && iconPrefix}\n {value.length ? (\n <>\n <span>{prefixTitle ? `${prefixTitle}:` : ''}</span>\n <span className={buttonTextClass}>{value.length ? `已选${value.length}个` : '全部'}</span>\n </>\n ) : (\n <span>{`全${title}`}</span>\n )}\n\n <IconXiala className={classNames(styles.iconSuffix, { [styles.rotate]: popOpen })} />\n <IconClose className={classNames(styles.iconClose, styles.iconSuffix)} onClick={handleClear} />\n </button>\n );\n};\n\nexport default FilterButton;\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,gBAAgB;AACvB,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,YAAY;AAyBnB,IAAM,eAAoC,CAAC;AAAA,EACzC;AAAA,EACA;AAAA,EACA,QAAQ,CAAC;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,mBAAmB,WAAW,OAAO,WAAW;AAAA,IACpD,CAAC,OAAO,OAAO,GAAG,CAAC,QAAQ,KAAK;AAAA,IAChC,CAAC,OAAO,OAAO,GAAG;AAAA,EACpB,CAAC;AAED,QAAM,kBAAkB,WAAW;AAAA,IACjC,CAAC,OAAO,WAAW,GAAG;AAAA,EACxB,CAAC;AAED,SACE,oCAAC,YAAO,WAAW,kBAAkB,SAAS,eAAe,MAAK,YAC/D,cAAc,YACd,MAAM,SACL,0DACE,oCAAC,cAAM,cAAc,GAAG,iBAAiB,EAAG,GAC5C,oCAAC,UAAK,WAAW,mBAAkB,MAAM,SAAS,KAAK,MAAM,YAAY,IAAK,CAChF,IAEA,oCAAC,cAAM,IAAI,OAAQ,GAGrB,oCAAC,aAAU,WAAW,WAAW,OAAO,YAAY,EAAE,CAAC,OAAO,MAAM,GAAG,QAAQ,CAAC,GAAG,GACnF,oCAAC,aAAU,WAAW,WAAW,OAAO,WAAW,OAAO,UAAU,GAAG,SAAS,aAAa,CAC/F;AAEJ;AAEA,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@primaryColor: #3b86f9;
|
|
2
|
+
@iconPrimaryColor: #0a6bfd;
|
|
3
|
+
@fontPrimaryColor: #0a6bfd;
|
|
4
|
+
@borderPrimaryColor: #b0cffe;
|
|
5
|
+
@globalBgColor: #edeff4;
|
|
6
|
+
|
|
7
|
+
@ykFontFamilySemibold: 'PingFangSC-Semibold', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
8
|
+
sans-serif;
|
|
9
|
+
@ykFontFamilyRegular: 'PingFangSC-Regular', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
10
|
+
sans-serif;
|
|
11
|
+
@ykFontFamilyMedium: 'PingFangSC-Medium', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
12
|
+
sans-serif;
|
|
13
|
+
|
|
14
|
+
.filterBtn {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 5px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
min-width: 120px;
|
|
20
|
+
max-width: 200px;
|
|
21
|
+
height: 30px;
|
|
22
|
+
padding: 5px 30px 5px 8px;
|
|
23
|
+
color: #252934;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
line-height: 1;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
text-align: left;
|
|
28
|
+
background: #ffffff;
|
|
29
|
+
border: 0.5px solid #e7e7e7;
|
|
30
|
+
border-radius: 2px;
|
|
31
|
+
box-shadow: 0px 0.5px 0px 0px #e7e7e7;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
transition:
|
|
34
|
+
all 0.2s,
|
|
35
|
+
width 0s;
|
|
36
|
+
|
|
37
|
+
.textUncheck {
|
|
38
|
+
color: #666666;
|
|
39
|
+
transition: color 0.2s;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.iconPrefix {
|
|
43
|
+
margin-right: 5px;
|
|
44
|
+
color: @iconPrimaryColor;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.iconSuffix {
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: 10px;
|
|
51
|
+
width: 14px;
|
|
52
|
+
height: 14px;
|
|
53
|
+
color: #666;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
transition:
|
|
56
|
+
z-index 0.2s,
|
|
57
|
+
opacity 0.2s,
|
|
58
|
+
transform 0.2s;
|
|
59
|
+
|
|
60
|
+
&.rotate {
|
|
61
|
+
transform: rotate(180deg);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.iconClose {
|
|
66
|
+
z-index: -1;
|
|
67
|
+
width: 14px;
|
|
68
|
+
height: 14px;
|
|
69
|
+
color: #0a6bfd;
|
|
70
|
+
opacity: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover,
|
|
74
|
+
&.isHover {
|
|
75
|
+
border-color: @borderPrimaryColor;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.checked {
|
|
79
|
+
color: #0a6bfd;
|
|
80
|
+
background: #e7ecff;
|
|
81
|
+
border: 1px solid @borderPrimaryColor;
|
|
82
|
+
|
|
83
|
+
span {
|
|
84
|
+
color: #0a6bfd;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.iconSuffix {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.iconClose {
|
|
92
|
+
z-index: 1;
|
|
93
|
+
color: #0a6bfd;
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CategoryItem } from '../../typing';
|
|
3
|
+
/**
|
|
4
|
+
* 分类组件的 Props
|
|
5
|
+
*/
|
|
6
|
+
interface PropsType {
|
|
7
|
+
/** 分类项列表(code/name) */
|
|
8
|
+
category?: CategoryItem[];
|
|
9
|
+
/** 当前选中的分类 code */
|
|
10
|
+
categorySelected: string;
|
|
11
|
+
/** 设置选中的分类 */
|
|
12
|
+
setCategorySelected: (categorySelected: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 筛选弹层左侧分类列表:垂直滚动,点击项切换分类并高亮当前项。
|
|
16
|
+
*/
|
|
17
|
+
declare const Category: React.FC<PropsType>;
|
|
18
|
+
export default Category;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/business/ModCommonFilter/components/PopoverContent/Category.tsx
|
|
34
|
+
import TextWithTooltip from "../../../../components/TextWithToolTip";
|
|
35
|
+
import classNames from "classnames";
|
|
36
|
+
import React, { useRef } from "react";
|
|
37
|
+
import { Scrollbars } from "react-custom-scrollbars";
|
|
38
|
+
import IconXiala from "../FilterButton/IconXiala";
|
|
39
|
+
import styles from "./index.module.less";
|
|
40
|
+
var Category = ({ category, categorySelected, setCategorySelected }) => {
|
|
41
|
+
const scrollLeftRef = useRef(null);
|
|
42
|
+
return /* @__PURE__ */ React.createElement("div", { className: styles.category }, /* @__PURE__ */ React.createElement(
|
|
43
|
+
Scrollbars,
|
|
44
|
+
{
|
|
45
|
+
ref: scrollLeftRef,
|
|
46
|
+
style: { height: 365 },
|
|
47
|
+
renderThumbVertical: (_a) => {
|
|
48
|
+
var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
|
|
49
|
+
return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({}, props), { style: __spreadProps(__spreadValues({}, style), { background: "#EFEFEF", borderRadius: 3 }) }));
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
category == null ? void 0 : category.map((item) => {
|
|
53
|
+
return /* @__PURE__ */ React.createElement(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
onClick: () => {
|
|
57
|
+
setCategorySelected(item.code);
|
|
58
|
+
},
|
|
59
|
+
key: item.code,
|
|
60
|
+
className: classNames(styles.categoryItem, {
|
|
61
|
+
[styles.categoryItemActive]: categorySelected === item.code
|
|
62
|
+
})
|
|
63
|
+
},
|
|
64
|
+
/* @__PURE__ */ React.createElement(TextWithTooltip, { text: item.name, width: 100 }),
|
|
65
|
+
/* @__PURE__ */ React.createElement(IconXiala, { size: 16, className: styles.categoryItemIcon })
|
|
66
|
+
);
|
|
67
|
+
})
|
|
68
|
+
));
|
|
69
|
+
};
|
|
70
|
+
var Category_default = Category;
|
|
71
|
+
export {
|
|
72
|
+
Category_default as default
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=Category.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/business/ModCommonFilter/components/PopoverContent/Category.tsx"],
|
|
4
|
+
"sourcesContent": ["import TextWithTooltip from '@/components/TextWithToolTip';\nimport classNames from 'classnames';\nimport React, { useRef } from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars';\nimport type { CategoryItem } from '../../typing';\nimport IconXiala from '../FilterButton/IconXiala';\nimport styles from './index.module.less';\n\n/**\n * 分类组件的 Props\n */\ninterface PropsType {\n /** 分类项列表(code/name) */\n category?: CategoryItem[];\n /** 当前选中的分类 code */\n categorySelected: string;\n /** 设置选中的分类 */\n setCategorySelected: (categorySelected: string) => void;\n}\n\n/**\n * 筛选弹层左侧分类列表:垂直滚动,点击项切换分类并高亮当前项。\n */\nconst Category: React.FC<PropsType> = ({ category, categorySelected, setCategorySelected }) => {\n const scrollLeftRef = useRef<typeof Scrollbars>(null);\n\n return (\n <div className={styles.category}>\n <Scrollbars\n ref={scrollLeftRef}\n style={{ height: 365 }}\n renderThumbVertical={({ style, ...props }) => (\n <div {...props} style={{ ...style, background: '#EFEFEF', borderRadius: 3 }} />\n )}\n >\n {category?.map((item) => {\n return (\n <div\n onClick={() => {\n setCategorySelected(item.code);\n // setSelfKind(item.isSelf ? item.code : '');\n }}\n key={item.code}\n className={classNames(styles.categoryItem, {\n [styles.categoryItemActive]: categorySelected === item.code,\n })}\n >\n <TextWithTooltip text={item.name} width={100}></TextWithTooltip>\n <IconXiala size={16} className={styles.categoryItemIcon} />\n </div>\n );\n })}\n </Scrollbars>\n </div>\n );\n};\n\nexport default Category;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,qBAAqB;AAC5B,OAAO,gBAAgB;AACvB,OAAO,SAAS,cAAc;AAC9B,SAAS,kBAAkB;AAE3B,OAAO,eAAe;AACtB,OAAO,YAAY;AAiBnB,IAAM,WAAgC,CAAC,EAAE,UAAU,kBAAkB,oBAAoB,MAAM;AAC7F,QAAM,gBAAgB,OAA0B,IAAI;AAEpD,SACE,oCAAC,SAAI,WAAW,OAAO,YACrB;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,OAAO,EAAE,QAAQ,IAAI;AAAA,MACrB,qBAAqB,CAAC,OAAqB;AAArB,qBAAE,QA/BhC,IA+B8B,IAAY,kBAAZ,IAAY,CAAV;AACtB,mDAAC,wCAAQ,QAAR,EAAe,OAAO,iCAAK,QAAL,EAAY,YAAY,WAAW,cAAc,EAAE,KAAG;AAAA;AAAA;AAAA,IAG9E,qCAAU,IAAI,CAAC,SAAS;AACvB,aACE;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,gCAAoB,KAAK,IAAI;AAAA,UAE/B;AAAA,UACA,KAAK,KAAK;AAAA,UACV,WAAW,WAAW,OAAO,cAAc;AAAA,YACzC,CAAC,OAAO,kBAAkB,GAAG,qBAAqB,KAAK;AAAA,UACzD,CAAC;AAAA;AAAA,QAED,oCAAC,mBAAgB,MAAM,KAAK,MAAM,OAAO,KAAK;AAAA,QAC9C,oCAAC,aAAU,MAAM,IAAI,WAAW,OAAO,kBAAkB;AAAA,MAC3D;AAAA,IAEJ;AAAA,EACF,CACF;AAEJ;AAEA,IAAO,mBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|