@aloudata/aloudata-design 0.2.6 → 0.3.0
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/es/Avatar/index.d.ts +15 -0
- package/es/Avatar/index.js +33 -0
- package/es/Avatar/style/index.d.ts +2 -0
- package/es/Avatar/style/index.js +2 -0
- package/es/Avatar/style/index.less +34 -0
- package/es/Breadcrumb/index.d.ts +8 -0
- package/es/Breadcrumb/index.js +36 -0
- package/es/Breadcrumb/style/index.d.ts +2 -0
- package/es/Breadcrumb/style/index.js +2 -0
- package/es/Breadcrumb/style/index.less +36 -0
- package/es/Button/index.d.ts +4 -4
- package/es/Button/index.js +45 -25
- package/es/Button/style/index.less +185 -150
- package/es/Button/style/variables.less +67 -0
- package/es/Checkbox/style/index.less +35 -1
- package/es/ConfigProvider/index.d.ts +1 -0
- package/es/ConfigProvider/index.js +1 -0
- package/es/Dropdown/Button.js +1 -1
- package/es/Dropdown/style/index.less +41 -8
- package/es/Empty/image/Authority.d.ts +3 -0
- package/es/Empty/image/Authority.js +360 -0
- package/es/Empty/image/Dataspace.d.ts +3 -0
- package/es/Empty/image/Dataspace.js +271 -0
- package/es/Empty/image/Search.d.ts +3 -0
- package/es/Empty/image/Search.js +156 -0
- package/es/Empty/image/Simple.d.ts +3 -0
- package/es/Empty/image/Simple.js +20 -0
- package/es/Empty/image/Worksheet.d.ts +3 -0
- package/es/Empty/image/Worksheet.js +270 -0
- package/es/Empty/image/empty.d.ts +3 -0
- package/es/Empty/image/empty.js +139 -0
- package/es/Empty/index.d.ts +21 -5
- package/es/Empty/index.js +84 -54
- package/es/Empty/style/index.less +56 -11
- package/es/Form/style/index.less +8 -0
- package/es/Icon/antdIconfont.d.ts +4 -0
- package/es/Icon/antdIconfont.js +2 -0
- package/es/Icon/components/Icon.d.ts +32 -0
- package/es/Icon/components/Icon.js +27 -0
- package/es/Icon/components/createFromScripts.d.ts +1 -0
- package/es/Icon/components/createFromScripts.js +35 -0
- package/es/Icon/iconSvgs/arrows_right_sm.svg +3 -0
- package/es/Icon/icons/AddLine.d.ts +13 -0
- package/es/Icon/icons/AddLine.js +66 -0
- package/es/Icon/icons/AlertFill.d.ts +13 -0
- package/es/Icon/icons/AlertFill.js +73 -0
- package/es/Icon/icons/ArrowsDownLine.d.ts +13 -0
- package/es/Icon/icons/ArrowsDownLine.js +66 -0
- package/es/Icon/icons/CancelFill.d.ts +13 -0
- package/es/Icon/icons/CancelFill.js +73 -0
- package/es/Icon/icons/CheckFill.d.ts +13 -0
- package/es/Icon/icons/CheckFill.js +73 -0
- package/es/Icon/icons/CloseLine.d.ts +13 -0
- package/es/Icon/icons/CloseLine.js +66 -0
- package/es/Icon/icons/DatabaseLine.d.ts +13 -0
- package/es/Icon/icons/DatabaseLine.js +66 -0
- package/es/Icon/icons/Deleteline.d.ts +13 -0
- package/es/Icon/icons/Deleteline.js +66 -0
- package/es/Icon/icons/DownloadLine.d.ts +13 -0
- package/es/Icon/icons/DownloadLine.js +73 -0
- package/es/Icon/icons/ErrorFill.d.ts +13 -0
- package/es/Icon/icons/ErrorFill.js +73 -0
- package/es/Icon/icons/EyeOffLine.d.ts +13 -0
- package/es/Icon/icons/EyeOffLine.js +73 -0
- package/es/Icon/icons/EyeOnLine.d.ts +13 -0
- package/es/Icon/icons/EyeOnLine.js +66 -0
- package/es/Icon/icons/FileLine.d.ts +13 -0
- package/es/Icon/icons/FileLine.js +73 -0
- package/es/Icon/icons/HomeFill.d.ts +13 -0
- package/es/Icon/icons/HomeFill.js +73 -0
- package/es/Icon/icons/IconBase.withSpan.tpl +58 -0
- package/es/Icon/icons/LightningLine.d.ts +13 -0
- package/es/Icon/icons/LightningLine.js +66 -0
- package/es/Icon/icons/Loading.d.ts +13 -0
- package/es/Icon/icons/Loading.js +66 -0
- package/es/Icon/icons/More.d.ts +13 -0
- package/es/Icon/icons/More.js +66 -0
- package/es/Icon/icons/NewWindowsLine.d.ts +13 -0
- package/es/Icon/icons/NewWindowsLine.js +74 -0
- package/es/Icon/icons/SearchLine.d.ts +13 -0
- package/es/Icon/icons/SearchLine.js +73 -0
- package/es/Icon/icons/SortAscendingLine.d.ts +13 -0
- package/es/Icon/icons/SortAscendingLine.js +66 -0
- package/es/Icon/icons/SortDescendingLine.d.ts +13 -0
- package/es/Icon/icons/SortDescendingLine.js +66 -0
- package/es/Icon/icons/TextLine.d.ts +13 -0
- package/es/Icon/icons/TextLine.js +73 -0
- package/es/Icon/icons/UserLine.d.ts +13 -0
- package/es/Icon/icons/UserLine.js +73 -0
- package/es/Icon/icons/style.css +9 -0
- package/es/Icon/icons/style.css.d.ts +10 -0
- package/es/Icon/index.d.ts +2 -13
- package/es/Icon/index.js +2 -45
- package/es/Icon/index.less +9 -17
- package/es/Icon/style/index.d.ts +1 -0
- package/es/Icon/style/index.js +1 -0
- package/es/Icon/style/index.less +0 -0
- package/es/Input/components/Group/index.d.ts +4 -2
- package/es/Input/components/Group/index.js +23 -1
- package/es/Input/components/Input/index.d.ts +1 -1
- package/es/Input/components/Input/index.js +12 -0
- package/es/Input/components/Password/index.d.ts +7 -1
- package/es/Input/components/Password/index.js +29 -6
- package/es/Input/style/index.less +278 -43
- package/es/InputNumber/index.d.ts +4 -0
- package/es/InputNumber/index.js +32 -0
- package/es/InputNumber/style/index.d.ts +2 -0
- package/es/InputNumber/style/index.js +2 -0
- package/es/InputNumber/style/index.less +224 -0
- package/es/Menu/Divider.d.ts +2 -1
- package/es/Menu/MenuItem.d.ts +2 -1
- package/es/Menu/SubMenu.d.ts +2 -1
- package/es/Menu/SubMenu.js +1 -1
- package/es/Menu/index.d.ts +2 -1
- package/es/Menu/style/index.less +5 -5
- package/es/Modal/index.d.ts +21 -0
- package/es/Modal/index.js +95 -0
- package/es/Modal/style/index.d.ts +2 -0
- package/es/Modal/style/index.js +2 -0
- package/es/Modal/style/index.less +206 -0
- package/es/Navigator/components/Header/index.d.ts +9 -0
- package/es/Navigator/components/Header/index.js +18 -0
- package/es/Navigator/components/Menu/index.d.ts +7 -13
- package/es/Navigator/components/Menu/index.js +26 -162
- package/es/Navigator/components/MenuItem/index.d.ts +21 -0
- package/es/Navigator/components/MenuItem/index.js +39 -0
- package/es/Navigator/index.d.ts +19 -8
- package/es/Navigator/index.js +6 -15
- package/es/Navigator/style/bg.png +0 -0
- package/es/Navigator/style/index.less +105 -174
- package/es/Popover/index.d.ts +5 -0
- package/es/Popover/index.js +22 -0
- package/es/Popover/style/index.d.ts +2 -0
- package/es/Popover/style/index.js +2 -0
- package/es/Popover/style/index.less +37 -0
- package/es/Radio/index.d.ts +2 -3
- package/es/Select/index.d.ts +37 -9
- package/es/Select/index.js +155 -7
- package/es/Select/rc-select/BaseSelect.d.ts +116 -0
- package/es/Select/rc-select/BaseSelect.js +641 -0
- package/es/Select/rc-select/OptGroup.d.ts +12 -0
- package/es/Select/{OptionsList → rc-select}/OptGroup.js +1 -0
- package/es/Select/rc-select/Option.d.ts +14 -0
- package/es/Select/{OptionsList/Options.js → rc-select/Option.js} +1 -0
- package/es/Select/rc-select/OptionList.d.ts +10 -0
- package/es/Select/rc-select/OptionList.js +401 -0
- package/es/Select/rc-select/Select.d.ts +109 -0
- package/es/Select/rc-select/Select.js +547 -0
- package/es/Select/rc-select/SelectContext.d.ts +20 -0
- package/es/Select/rc-select/SelectContext.js +4 -0
- package/es/Select/rc-select/SelectTrigger.d.ts +30 -0
- package/es/Select/rc-select/SelectTrigger.js +136 -0
- package/es/Select/rc-select/Selector/Input.d.ts +26 -0
- package/es/Select/rc-select/Selector/Input.js +114 -0
- package/es/Select/rc-select/Selector/MultipleSelector.d.ts +16 -0
- package/es/Select/rc-select/Selector/MultipleSelector.js +236 -0
- package/es/Select/rc-select/Selector/SingleSelector.d.ts +8 -0
- package/es/Select/rc-select/Selector/SingleSelector.js +112 -0
- package/es/Select/rc-select/Selector/index.d.ts +80 -0
- package/es/Select/rc-select/Selector/index.js +194 -0
- package/es/Select/rc-select/TransBtn.d.ts +12 -0
- package/es/Select/rc-select/TransBtn.js +42 -0
- package/es/Select/rc-select/hooks/useBaseProps.d.ts +13 -0
- package/es/Select/rc-select/hooks/useBaseProps.js +11 -0
- package/es/Select/rc-select/hooks/useCache.d.ts +7 -0
- package/es/Select/rc-select/hooks/useCache.js +49 -0
- package/es/Select/rc-select/hooks/useDelayReset.d.ts +5 -0
- package/es/Select/rc-select/hooks/useDelayReset.js +50 -0
- package/es/Select/rc-select/hooks/useFilterOptions.d.ts +3 -0
- package/es/Select/rc-select/hooks/useFilterOptions.js +75 -0
- package/es/Select/rc-select/hooks/useId.d.ts +5 -0
- package/es/Select/rc-select/hooks/useId.js +47 -0
- package/es/Select/rc-select/hooks/useLayoutEffect.d.ts +5 -0
- package/es/Select/rc-select/hooks/useLayoutEffect.js +17 -0
- package/es/Select/rc-select/hooks/useLock.d.ts +7 -0
- package/es/Select/rc-select/hooks/useLock.js +35 -0
- package/es/Select/rc-select/hooks/useOptions.d.ts +11 -0
- package/es/Select/rc-select/hooks/useOptions.js +53 -0
- package/es/Select/rc-select/hooks/useRefFunc.d.ts +5 -0
- package/es/Select/rc-select/hooks/useRefFunc.js +15 -0
- package/es/Select/rc-select/hooks/useSelectTriggerControl.d.ts +1 -0
- package/es/Select/rc-select/hooks/useSelectTriggerControl.js +40 -0
- package/es/Select/rc-select/index.d.ts +10 -0
- package/es/Select/rc-select/index.js +7 -0
- package/es/Select/rc-select/interface.d.ts +10 -0
- package/es/Select/{interface.js → rc-select/interface.js} +0 -0
- package/es/Select/rc-select/utils/commonUtil.d.ts +4 -0
- package/es/Select/rc-select/utils/commonUtil.js +12 -0
- package/es/Select/rc-select/utils/keyUtil.d.ts +2 -0
- package/es/Select/rc-select/utils/keyUtil.js +8 -0
- package/es/Select/rc-select/utils/legacyUtil.d.ts +3 -0
- package/es/Select/rc-select/utils/legacyUtil.js +58 -0
- package/es/Select/rc-select/utils/platformUtil.d.ts +1 -0
- package/es/Select/rc-select/utils/platformUtil.js +4 -0
- package/es/Select/rc-select/utils/valueUtil.d.ts +22 -0
- package/es/Select/rc-select/utils/valueUtil.js +157 -0
- package/es/Select/rc-select/utils/warningPropsUtil.d.ts +3 -0
- package/es/Select/rc-select/utils/warningPropsUtil.js +114 -0
- package/es/Select/style/index.d.ts +1 -0
- package/es/Select/style/index.js +3 -1
- package/es/Select/style/index.less +230 -480
- package/es/Select/style/multiple.less +222 -0
- package/es/Select/style/rtl.less +168 -0
- package/es/Select/style/select.less +337 -0
- package/es/Select/style/single.less +179 -0
- package/es/Select/style/status.less +48 -0
- package/es/Select/style/variables.less +67 -0
- package/es/Select/style/variables.less.d.ts +100 -0
- package/es/Select/utils/iconUtil.d.ts +24 -0
- package/es/Select/utils/iconUtil.js +82 -0
- package/es/Space/index.d.ts +1 -1
- package/es/Space/index.js +0 -1
- package/es/Table/Table.d.ts +5 -0
- package/es/Table/Table.js +473 -0
- package/es/Table/index.d.ts +2 -4
- package/es/Table/index.js +2 -463
- package/es/Table/interface.d.ts +11 -15
- package/es/Table/style/index.less +51 -21
- package/es/Tabs/index.d.ts +2 -1
- package/es/Tabs/index.js +10 -4
- package/es/Tabs/style/index.less +73 -7
- package/es/Tooltip/style/index.less +2 -1
- package/es/index.d.ts +15 -2
- package/es/index.js +8 -1
- package/es/style/index.less +3 -1
- package/es/style/mixins/index.less +8 -0
- package/es/style/themes/default/index.less +10 -10
- package/es/style/themes/default/scrollBar.less +13 -0
- package/es/style/themes/default/themeColor.module.less +58 -94
- package/es/style/themes/default/themeColor.module.less.d.ts +1 -17
- package/lib/Avatar/index.d.ts +15 -0
- package/lib/Avatar/index.js +57 -0
- package/lib/Avatar/style/index.d.ts +2 -0
- package/lib/Avatar/style/index.js +5 -0
- package/lib/Avatar/style/index.less +34 -0
- package/lib/Breadcrumb/index.d.ts +8 -0
- package/lib/Breadcrumb/index.js +50 -0
- package/lib/Breadcrumb/style/index.d.ts +2 -0
- package/lib/Breadcrumb/style/index.js +5 -0
- package/lib/Breadcrumb/style/index.less +36 -0
- package/lib/Button/index.d.ts +4 -4
- package/lib/Button/index.js +45 -25
- package/lib/Button/style/index.less +185 -150
- package/lib/Button/style/variables.less +67 -0
- package/lib/Checkbox/style/index.less +35 -1
- package/lib/ConfigProvider/index.d.ts +1 -0
- package/lib/ConfigProvider/index.js +26 -0
- package/lib/Dropdown/Button.js +1 -1
- package/lib/Dropdown/style/index.less +41 -8
- package/lib/Empty/image/Authority.d.ts +3 -0
- package/lib/Empty/image/Authority.js +374 -0
- package/lib/Empty/image/Dataspace.d.ts +3 -0
- package/lib/Empty/image/Dataspace.js +285 -0
- package/lib/Empty/image/Search.d.ts +3 -0
- package/lib/Empty/image/Search.js +170 -0
- package/lib/Empty/image/Simple.d.ts +3 -0
- package/lib/Empty/image/Simple.js +34 -0
- package/lib/Empty/image/Worksheet.d.ts +3 -0
- package/lib/Empty/image/Worksheet.js +284 -0
- package/lib/Empty/image/empty.d.ts +3 -0
- package/lib/Empty/image/empty.js +153 -0
- package/lib/Empty/index.d.ts +21 -5
- package/lib/Empty/index.js +94 -53
- package/lib/Empty/style/index.less +56 -11
- package/lib/Form/style/index.less +8 -0
- package/lib/Icon/antdIconfont.d.ts +4 -0
- package/lib/Icon/antdIconfont.js +13 -0
- package/lib/Icon/components/Icon.d.ts +32 -0
- package/lib/Icon/components/Icon.js +38 -0
- package/lib/Icon/components/createFromScripts.d.ts +1 -0
- package/lib/Icon/components/createFromScripts.js +41 -0
- package/lib/Icon/iconSvgs/arrows_right_sm.svg +3 -0
- package/lib/Icon/icons/AddLine.d.ts +13 -0
- package/lib/Icon/icons/AddLine.js +83 -0
- package/lib/Icon/icons/AlertFill.d.ts +13 -0
- package/lib/Icon/icons/AlertFill.js +90 -0
- package/lib/Icon/icons/ArrowsDownLine.d.ts +13 -0
- package/lib/Icon/icons/ArrowsDownLine.js +83 -0
- package/lib/Icon/icons/CancelFill.d.ts +13 -0
- package/lib/Icon/icons/CancelFill.js +90 -0
- package/lib/Icon/icons/CheckFill.d.ts +13 -0
- package/lib/Icon/icons/CheckFill.js +90 -0
- package/lib/Icon/icons/CloseLine.d.ts +13 -0
- package/lib/Icon/icons/CloseLine.js +83 -0
- package/lib/Icon/icons/DatabaseLine.d.ts +13 -0
- package/lib/Icon/icons/DatabaseLine.js +83 -0
- package/lib/Icon/icons/Deleteline.d.ts +13 -0
- package/lib/Icon/icons/Deleteline.js +83 -0
- package/lib/Icon/icons/DownloadLine.d.ts +13 -0
- package/lib/Icon/icons/DownloadLine.js +90 -0
- package/lib/Icon/icons/ErrorFill.d.ts +13 -0
- package/lib/Icon/icons/ErrorFill.js +90 -0
- package/lib/Icon/icons/EyeOffLine.d.ts +13 -0
- package/lib/Icon/icons/EyeOffLine.js +90 -0
- package/lib/Icon/icons/EyeOnLine.d.ts +13 -0
- package/lib/Icon/icons/EyeOnLine.js +83 -0
- package/lib/Icon/icons/FileLine.d.ts +13 -0
- package/lib/Icon/icons/FileLine.js +90 -0
- package/lib/Icon/icons/HomeFill.d.ts +13 -0
- package/lib/Icon/icons/HomeFill.js +90 -0
- package/lib/Icon/icons/IconBase.withSpan.tpl +58 -0
- package/lib/Icon/icons/LightningLine.d.ts +13 -0
- package/lib/Icon/icons/LightningLine.js +83 -0
- package/lib/Icon/icons/Loading.d.ts +13 -0
- package/lib/Icon/icons/Loading.js +83 -0
- package/lib/Icon/icons/More.d.ts +13 -0
- package/lib/Icon/icons/More.js +83 -0
- package/lib/Icon/icons/NewWindowsLine.d.ts +13 -0
- package/lib/Icon/icons/NewWindowsLine.js +91 -0
- package/lib/Icon/icons/SearchLine.d.ts +13 -0
- package/lib/Icon/icons/SearchLine.js +90 -0
- package/lib/Icon/icons/SortAscendingLine.d.ts +13 -0
- package/lib/Icon/icons/SortAscendingLine.js +83 -0
- package/lib/Icon/icons/SortDescendingLine.d.ts +13 -0
- package/lib/Icon/icons/SortDescendingLine.js +83 -0
- package/lib/Icon/icons/TextLine.d.ts +13 -0
- package/lib/Icon/icons/TextLine.js +90 -0
- package/lib/Icon/icons/UserLine.d.ts +13 -0
- package/lib/Icon/icons/UserLine.js +90 -0
- package/lib/Icon/icons/style.css +9 -0
- package/lib/Icon/icons/style.css.d.ts +10 -0
- package/lib/Icon/index.d.ts +2 -13
- package/lib/Icon/index.js +2 -51
- package/lib/Icon/index.less +9 -17
- package/lib/Icon/style/index.d.ts +1 -0
- package/lib/Icon/style/index.js +1 -0
- package/lib/Icon/style/index.less +0 -0
- package/lib/Input/components/Group/index.d.ts +4 -2
- package/lib/Input/components/Group/index.js +24 -1
- package/lib/Input/components/Input/index.d.ts +1 -1
- package/lib/Input/components/Input/index.js +13 -0
- package/lib/Input/components/Password/index.d.ts +7 -1
- package/lib/Input/components/Password/index.js +30 -5
- package/lib/Input/style/index.less +278 -43
- package/lib/InputNumber/index.d.ts +4 -0
- package/lib/InputNumber/index.js +45 -0
- package/lib/InputNumber/style/index.d.ts +2 -0
- package/lib/InputNumber/style/index.js +5 -0
- package/lib/InputNumber/style/index.less +224 -0
- package/lib/Menu/Divider.d.ts +2 -1
- package/lib/Menu/MenuItem.d.ts +2 -1
- package/lib/Menu/SubMenu.d.ts +2 -1
- package/lib/Menu/SubMenu.js +1 -1
- package/lib/Menu/index.d.ts +2 -1
- package/lib/Menu/style/index.less +5 -5
- package/lib/Modal/index.d.ts +21 -0
- package/lib/Modal/index.js +121 -0
- package/lib/Modal/style/index.d.ts +2 -0
- package/lib/Modal/style/index.js +5 -0
- package/lib/Modal/style/index.less +206 -0
- package/lib/Navigator/components/Header/index.d.ts +9 -0
- package/lib/Navigator/components/Header/index.js +28 -0
- package/lib/Navigator/components/Menu/index.d.ts +7 -13
- package/lib/Navigator/components/Menu/index.js +25 -162
- package/lib/Navigator/components/MenuItem/index.d.ts +21 -0
- package/lib/Navigator/components/MenuItem/index.js +56 -0
- package/lib/Navigator/index.d.ts +19 -8
- package/lib/Navigator/index.js +7 -15
- package/lib/Navigator/style/bg.png +0 -0
- package/lib/Navigator/style/index.less +105 -174
- package/lib/Popover/index.d.ts +5 -0
- package/lib/Popover/index.js +35 -0
- package/lib/Popover/style/index.d.ts +2 -0
- package/lib/Popover/style/index.js +5 -0
- package/lib/Popover/style/index.less +37 -0
- package/lib/Radio/index.d.ts +2 -3
- package/lib/Select/index.d.ts +37 -9
- package/lib/Select/index.js +167 -18
- package/lib/Select/rc-select/BaseSelect.d.ts +116 -0
- package/lib/Select/rc-select/BaseSelect.js +672 -0
- package/lib/Select/rc-select/OptGroup.d.ts +12 -0
- package/lib/Select/{OptionsList → rc-select}/OptGroup.js +1 -0
- package/lib/Select/rc-select/Option.d.ts +14 -0
- package/lib/Select/{OptionsList/Options.js → rc-select/Option.js} +1 -0
- package/lib/Select/rc-select/OptionList.d.ts +10 -0
- package/lib/Select/rc-select/OptionList.js +427 -0
- package/lib/Select/rc-select/Select.d.ts +109 -0
- package/lib/Select/rc-select/Select.js +545 -0
- package/lib/Select/rc-select/SelectContext.d.ts +20 -0
- package/lib/Select/rc-select/SelectContext.js +19 -0
- package/lib/Select/rc-select/SelectTrigger.d.ts +30 -0
- package/lib/Select/rc-select/SelectTrigger.js +153 -0
- package/lib/Select/rc-select/Selector/Input.d.ts +26 -0
- package/lib/Select/rc-select/Selector/Input.js +132 -0
- package/lib/Select/rc-select/Selector/MultipleSelector.d.ts +16 -0
- package/lib/Select/rc-select/Selector/MultipleSelector.js +257 -0
- package/lib/Select/rc-select/Selector/SingleSelector.d.ts +8 -0
- package/lib/Select/rc-select/Selector/SingleSelector.js +129 -0
- package/lib/Select/rc-select/Selector/index.d.ts +80 -0
- package/lib/Select/rc-select/Selector/index.js +203 -0
- package/lib/Select/rc-select/TransBtn.d.ts +12 -0
- package/lib/Select/rc-select/TransBtn.js +59 -0
- package/lib/Select/rc-select/hooks/useBaseProps.d.ts +13 -0
- package/lib/Select/rc-select/hooks/useBaseProps.js +28 -0
- package/lib/Select/rc-select/hooks/useCache.d.ts +7 -0
- package/lib/Select/rc-select/hooks/useCache.js +63 -0
- package/lib/Select/rc-select/hooks/useDelayReset.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useDelayReset.js +62 -0
- package/lib/Select/rc-select/hooks/useFilterOptions.d.ts +3 -0
- package/lib/Select/rc-select/hooks/useFilterOptions.js +91 -0
- package/lib/Select/rc-select/hooks/useId.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useId.js +68 -0
- package/lib/Select/rc-select/hooks/useLayoutEffect.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useLayoutEffect.js +32 -0
- package/lib/Select/rc-select/hooks/useLock.d.ts +7 -0
- package/lib/Select/rc-select/hooks/useLock.js +49 -0
- package/lib/Select/rc-select/hooks/useOptions.d.ts +11 -0
- package/lib/Select/rc-select/hooks/useOptions.js +68 -0
- package/lib/Select/rc-select/hooks/useRefFunc.d.ts +5 -0
- package/lib/Select/rc-select/hooks/useRefFunc.js +29 -0
- package/lib/Select/rc-select/hooks/useSelectTriggerControl.d.ts +1 -0
- package/lib/Select/rc-select/hooks/useSelectTriggerControl.js +54 -0
- package/lib/Select/rc-select/index.d.ts +10 -0
- package/lib/Select/rc-select/index.js +45 -0
- package/lib/Select/rc-select/interface.d.ts +10 -0
- package/lib/Select/{interface.js → rc-select/interface.js} +0 -0
- package/lib/Select/rc-select/utils/commonUtil.d.ts +4 -0
- package/lib/Select/rc-select/utils/commonUtil.js +23 -0
- package/lib/Select/rc-select/utils/keyUtil.d.ts +2 -0
- package/lib/Select/rc-select/utils/keyUtil.js +17 -0
- package/lib/Select/rc-select/utils/legacyUtil.d.ts +3 -0
- package/lib/Select/rc-select/utils/legacyUtil.js +73 -0
- package/lib/Select/rc-select/utils/platformUtil.d.ts +1 -0
- package/lib/Select/rc-select/utils/platformUtil.js +11 -0
- package/lib/Select/rc-select/utils/valueUtil.d.ts +22 -0
- package/lib/Select/rc-select/utils/valueUtil.js +172 -0
- package/lib/Select/rc-select/utils/warningPropsUtil.d.ts +3 -0
- package/lib/Select/rc-select/utils/warningPropsUtil.js +132 -0
- package/lib/Select/style/index.d.ts +1 -0
- package/lib/Select/style/index.js +2 -0
- package/lib/Select/style/index.less +230 -480
- package/lib/Select/style/multiple.less +222 -0
- package/lib/Select/style/rtl.less +168 -0
- package/lib/Select/style/select.less +337 -0
- package/lib/Select/style/single.less +179 -0
- package/lib/Select/style/status.less +48 -0
- package/lib/Select/style/variables.less +67 -0
- package/lib/Select/style/variables.less.d.ts +100 -0
- package/lib/Select/utils/iconUtil.d.ts +24 -0
- package/lib/Select/utils/iconUtil.js +102 -0
- package/lib/Space/index.d.ts +1 -1
- package/lib/Space/index.js +0 -6
- package/lib/Table/Table.d.ts +5 -0
- package/lib/Table/Table.js +501 -0
- package/lib/Table/index.d.ts +2 -4
- package/lib/Table/index.js +2 -478
- package/lib/Table/interface.d.ts +11 -15
- package/lib/Table/style/index.less +51 -21
- package/lib/Tabs/index.d.ts +2 -1
- package/lib/Tabs/index.js +11 -4
- package/lib/Tabs/style/index.less +73 -7
- package/lib/Tooltip/style/index.less +2 -1
- package/lib/index.d.ts +15 -2
- package/lib/index.js +56 -0
- package/lib/style/index.less +3 -1
- package/lib/style/mixins/index.less +8 -0
- package/lib/style/themes/default/index.less +10 -10
- package/lib/style/themes/default/scrollBar.less +13 -0
- package/lib/style/themes/default/themeColor.module.less +58 -94
- package/lib/style/themes/default/themeColor.module.less.d.ts +1 -17
- package/package.json +3 -2
- package/es/Icon/iconfont/demo.css +0 -539
- package/es/Icon/iconfont/demo_index.html +0 -720
- package/es/Icon/iconfont/iconfont.css +0 -109
- package/es/Icon/iconfont/iconfont.js +0 -46
- package/es/Icon/iconfont/iconfont.json +0 -170
- package/es/Icon/iconfont/iconfont.ttf +0 -0
- package/es/Icon/iconfont/iconfont.woff +0 -0
- package/es/Icon/iconfont/iconfont.woff2 +0 -0
- package/es/Select/BaseSelect.d.ts +0 -5
- package/es/Select/BaseSelect.js +0 -413
- package/es/Select/OptionsList/OptGroup.d.ts +0 -7
- package/es/Select/OptionsList/OptionItem/RenderGroup.d.ts +0 -9
- package/es/Select/OptionsList/OptionItem/RenderGroup.js +0 -16
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +0 -10
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.js +0 -45
- package/es/Select/OptionsList/OptionItem/RenderOption.d.ts +0 -16
- package/es/Select/OptionsList/OptionItem/RenderOption.js +0 -79
- package/es/Select/OptionsList/OptionItem/RenderTooltip.d.ts +0 -8
- package/es/Select/OptionsList/OptionItem/RenderTooltip.js +0 -25
- package/es/Select/OptionsList/OptionItem.d.ts +0 -4
- package/es/Select/OptionsList/OptionItem.js +0 -4
- package/es/Select/OptionsList/Options.d.ts +0 -7
- package/es/Select/OptionsList/index.d.ts +0 -4
- package/es/Select/OptionsList/index.js +0 -176
- package/es/Select/Selector/index.d.ts +0 -4
- package/es/Select/Selector/index.js +0 -252
- package/es/Select/VirtualList.d.ts +0 -5
- package/es/Select/VirtualList.js +0 -29
- package/es/Select/hooks/useCacheOption.d.ts +0 -9
- package/es/Select/hooks/useCacheOption.js +0 -107
- package/es/Select/interface.d.ts +0 -235
- package/es/Select/utils.d.ts +0 -21
- package/es/Select/utils.js +0 -193
- package/lib/Icon/iconfont/demo.css +0 -539
- package/lib/Icon/iconfont/demo_index.html +0 -720
- package/lib/Icon/iconfont/iconfont.css +0 -109
- package/lib/Icon/iconfont/iconfont.js +0 -48
- package/lib/Icon/iconfont/iconfont.json +0 -170
- package/lib/Icon/iconfont/iconfont.ttf +0 -0
- package/lib/Icon/iconfont/iconfont.woff +0 -0
- package/lib/Icon/iconfont/iconfont.woff2 +0 -0
- package/lib/Select/BaseSelect.d.ts +0 -5
- package/lib/Select/BaseSelect.js +0 -446
- package/lib/Select/OptionsList/OptGroup.d.ts +0 -7
- package/lib/Select/OptionsList/OptionItem/RenderGroup.d.ts +0 -9
- package/lib/Select/OptionsList/OptionItem/RenderGroup.js +0 -27
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +0 -10
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.js +0 -60
- package/lib/Select/OptionsList/OptionItem/RenderOption.d.ts +0 -16
- package/lib/Select/OptionsList/OptionItem/RenderOption.js +0 -94
- package/lib/Select/OptionsList/OptionItem/RenderTooltip.d.ts +0 -8
- package/lib/Select/OptionsList/OptionItem/RenderTooltip.js +0 -37
- package/lib/Select/OptionsList/OptionItem.d.ts +0 -4
- package/lib/Select/OptionsList/OptionItem.js +0 -39
- package/lib/Select/OptionsList/Options.d.ts +0 -7
- package/lib/Select/OptionsList/index.d.ts +0 -4
- package/lib/Select/OptionsList/index.js +0 -195
- package/lib/Select/Selector/index.d.ts +0 -4
- package/lib/Select/Selector/index.js +0 -276
- package/lib/Select/VirtualList.d.ts +0 -5
- package/lib/Select/VirtualList.js +0 -42
- package/lib/Select/hooks/useCacheOption.d.ts +0 -9
- package/lib/Select/hooks/useCacheOption.js +0 -113
- package/lib/Select/interface.d.ts +0 -235
- package/lib/Select/utils.d.ts +0 -21
- package/lib/Select/utils.js +0 -233
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = useCacheOptions;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _excluded = ["options"];
|
|
11
|
-
|
|
12
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
|
|
18
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
19
|
-
|
|
20
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
21
|
-
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
-
|
|
28
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
-
|
|
30
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
|
|
32
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
-
|
|
34
|
-
var optionSet = function optionSet(map, key, value) {
|
|
35
|
-
map.set(key, value);
|
|
36
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var groupOptionSet = function groupOptionSet(map, key, option) {
|
|
40
|
-
if (map.get(key)) {
|
|
41
|
-
var _map$get = map.get(key),
|
|
42
|
-
_map$get$options = _map$get.options,
|
|
43
|
-
groupOptions = _map$get$options === void 0 ? new Map() : _map$get$options,
|
|
44
|
-
rest = _objectWithoutProperties(_map$get, _excluded);
|
|
45
|
-
|
|
46
|
-
map.set(key, _objectSpread({
|
|
47
|
-
options: groupOptions.set(option.value, option)
|
|
48
|
-
}, rest));
|
|
49
|
-
} else {
|
|
50
|
-
map.set(key, {
|
|
51
|
-
label: option.groupLabel,
|
|
52
|
-
value: option.groupValue,
|
|
53
|
-
isSelectOptGroup: true,
|
|
54
|
-
options: new Map([[option.value, option]])
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
map.set(option.value, option);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
function useCacheOptions() {
|
|
62
|
-
var cacheOptions = (0, _react.useRef)(new Map());
|
|
63
|
-
var cacheOptionsMap = cacheOptions.current;
|
|
64
|
-
|
|
65
|
-
var _useState = (0, _react.useState)(false),
|
|
66
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
-
isGroup = _useState2[0],
|
|
68
|
-
setIsGroup = _useState2[1];
|
|
69
|
-
|
|
70
|
-
var setCacheOptions = function setCacheOptions(options) {
|
|
71
|
-
if (!isGroup) {
|
|
72
|
-
options.forEach(function (option) {
|
|
73
|
-
return optionSet(cacheOptionsMap, option.value, option);
|
|
74
|
-
});
|
|
75
|
-
} else {
|
|
76
|
-
options.forEach(function (option) {
|
|
77
|
-
return groupOptionSet(cacheOptionsMap, option.groupValue, option);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
var updateGroup = function updateGroup(value) {
|
|
83
|
-
if (value !== isGroup) {
|
|
84
|
-
setIsGroup(value);
|
|
85
|
-
}
|
|
86
|
-
}; // value to option || options
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var getOptionByValue = (0, _react.useCallback)(function (optValue) {
|
|
90
|
-
return cacheOptionsMap.get(optValue);
|
|
91
|
-
}, [cacheOptionsMap]);
|
|
92
|
-
|
|
93
|
-
var getOptionsByValue = function getOptionsByValue(optValue) {
|
|
94
|
-
return Array.isArray(optValue) ? optValue.reduce(function (prev, v) {
|
|
95
|
-
var op = getOptionByValue(v);
|
|
96
|
-
|
|
97
|
-
if (op) {
|
|
98
|
-
prev.push(op);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return prev;
|
|
102
|
-
}, []) : getOptionByValue(optValue);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
setCacheOptions: setCacheOptions,
|
|
107
|
-
getOptionByValue: getOptionByValue,
|
|
108
|
-
getOptionsByValue: getOptionsByValue,
|
|
109
|
-
updateGroup: updateGroup,
|
|
110
|
-
cacheOptionsMap: cacheOptionsMap,
|
|
111
|
-
hasGroup: isGroup
|
|
112
|
-
};
|
|
113
|
-
}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare type TSize = 'small' | 'default' | 'large';
|
|
4
|
-
export declare type TMaybeArray<T> = T | T[];
|
|
5
|
-
export declare type modeType = 'string' | 'tags' | undefined;
|
|
6
|
-
export declare type searchType = 'normal' | 'inner' | 'no-search';
|
|
7
|
-
export interface IOption {
|
|
8
|
-
/**
|
|
9
|
-
列表单项主要文字
|
|
10
|
-
*/
|
|
11
|
-
label?: string | React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
作为列表的 `key` 来使用
|
|
14
|
-
*/
|
|
15
|
-
value: string | number;
|
|
16
|
-
/**
|
|
17
|
-
列表次要文字
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
是否禁用
|
|
21
|
-
*/
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* 选中该 Option 后,Select 的 title
|
|
25
|
-
*/
|
|
26
|
-
title?: string;
|
|
27
|
-
/**
|
|
28
|
-
`tooltip` 描述
|
|
29
|
-
*/
|
|
30
|
-
tooltip?: string;
|
|
31
|
-
/**
|
|
32
|
-
分组的 `key` ,与 `groupLabel` 一起使用
|
|
33
|
-
*/
|
|
34
|
-
groupValue?: string;
|
|
35
|
-
/**
|
|
36
|
-
分组的标题
|
|
37
|
-
*/
|
|
38
|
-
groupLabel?: string;
|
|
39
|
-
options?: Map<string | number, IOption>;
|
|
40
|
-
isSelectOptGroup?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface IOptGroupProps {
|
|
43
|
-
children?: React.ReactNode;
|
|
44
|
-
label: string | React.ReactNode;
|
|
45
|
-
value: string | number;
|
|
46
|
-
}
|
|
47
|
-
export interface IOptionProps {
|
|
48
|
-
children?: React.ReactNode;
|
|
49
|
-
/**
|
|
50
|
-
* @description 默认根据次属性值进行筛选
|
|
51
|
-
*/
|
|
52
|
-
value: string | number;
|
|
53
|
-
/**
|
|
54
|
-
* @description 是否禁用
|
|
55
|
-
* @default false
|
|
56
|
-
*/
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
title?: string;
|
|
59
|
-
}
|
|
60
|
-
export interface ISelectProps {
|
|
61
|
-
/**
|
|
62
|
-
* @description 输入框尺寸
|
|
63
|
-
* @default default
|
|
64
|
-
* @type 'small' | 'default' | 'large';
|
|
65
|
-
*/
|
|
66
|
-
size?: TSize;
|
|
67
|
-
customizePrefixCls?: string;
|
|
68
|
-
/**
|
|
69
|
-
* @description 多选模式
|
|
70
|
-
* @default false
|
|
71
|
-
*/
|
|
72
|
-
multiple?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* @description 选择框默认文本
|
|
75
|
-
*/
|
|
76
|
-
placeholder?: string;
|
|
77
|
-
/**
|
|
78
|
-
* @description 是否禁用
|
|
79
|
-
* @default false
|
|
80
|
-
*/
|
|
81
|
-
disabled?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* @description 是否默认展开下拉菜单
|
|
84
|
-
* @default false
|
|
85
|
-
*/
|
|
86
|
-
defaultOpen?: boolean;
|
|
87
|
-
className?: string;
|
|
88
|
-
/**
|
|
89
|
-
* @description 下拉菜单的 className 属性
|
|
90
|
-
*/
|
|
91
|
-
dropDownClassName?: string;
|
|
92
|
-
style?: React.CSSProperties;
|
|
93
|
-
groupStyle?: React.CSSProperties;
|
|
94
|
-
optionStyle?: React.CSSProperties;
|
|
95
|
-
/**
|
|
96
|
-
* @description 下拉菜单的 style 属性
|
|
97
|
-
*/
|
|
98
|
-
dropDownStyle?: React.CSSProperties;
|
|
99
|
-
/**
|
|
100
|
-
* @description 指定默认选中的条目
|
|
101
|
-
*/
|
|
102
|
-
defaultValue?: TMaybeArray<string | number> | null;
|
|
103
|
-
/**
|
|
104
|
-
* @description 指定当前选中的条目,多选时为一个数组。
|
|
105
|
-
*/
|
|
106
|
-
value?: TMaybeArray<string | number> | null;
|
|
107
|
-
/**
|
|
108
|
-
* @description 数据化配置选项内容,相比 jsx 定义会获得更好的渲染性能
|
|
109
|
-
*/
|
|
110
|
-
options?: IOption[];
|
|
111
|
-
/**
|
|
112
|
-
* @description 设置弹窗滚动高度
|
|
113
|
-
* @default 256
|
|
114
|
-
*/
|
|
115
|
-
listHeight?: number;
|
|
116
|
-
listRowHeight?: number;
|
|
117
|
-
labelRenderer?: (input: string) => (option: IOption, isGroup: boolean) => React.ReactNode;
|
|
118
|
-
searchPredicate?: (input: string) => _.ListIterateeCustom<IOption, boolean>;
|
|
119
|
-
matchPredicate?: (input: string) => _.ListIterateeCustom<IOption, boolean>;
|
|
120
|
-
/**
|
|
121
|
-
* @description 渲染选中条目对应的内容
|
|
122
|
-
*/
|
|
123
|
-
optionLabelRenderer?: (value: string | number, option?: IOption) => React.ReactNode;
|
|
124
|
-
/**
|
|
125
|
-
* @description 选中值改变时的回调
|
|
126
|
-
*/
|
|
127
|
-
onChange?: (value: TMaybeArray<string | number> | null, options?: TMaybeArray<IOption> | null) => void;
|
|
128
|
-
/**
|
|
129
|
-
* @description 被选中时调用,参数为选中项的 value
|
|
130
|
-
*/
|
|
131
|
-
onSelect?: (value: string | number, option: IOption) => void;
|
|
132
|
-
/**
|
|
133
|
-
* @description 开启清除功能
|
|
134
|
-
*/
|
|
135
|
-
allowClear?: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* @description 清除的回调
|
|
138
|
-
*/
|
|
139
|
-
onClear?: () => void;
|
|
140
|
-
/**
|
|
141
|
-
* 浮层渲染父节点,默认渲染到 body 上
|
|
142
|
-
*/
|
|
143
|
-
getContainer?: (node: HTMLElement) => HTMLElement;
|
|
144
|
-
/**
|
|
145
|
-
* @description 是否展开下拉菜单
|
|
146
|
-
*/
|
|
147
|
-
open?: boolean;
|
|
148
|
-
/**
|
|
149
|
-
* dropdown visible 值改变时的回调
|
|
150
|
-
*/
|
|
151
|
-
onDropDownVisibleChange?: (visible: boolean) => void;
|
|
152
|
-
/** *
|
|
153
|
-
* @description 下拉菜单和选择器同宽
|
|
154
|
-
* @default true
|
|
155
|
-
*/
|
|
156
|
-
dropdownMatchSelectWidth?: boolean;
|
|
157
|
-
/**
|
|
158
|
-
* @description 下拉菜单内置标签
|
|
159
|
-
*/
|
|
160
|
-
label?: React.ReactNode;
|
|
161
|
-
children?: React.ReactNode[] | React.ReactNode;
|
|
162
|
-
/**
|
|
163
|
-
* @description 下拉菜单的 z-index层级 属性
|
|
164
|
-
* @default 1050
|
|
165
|
-
*/
|
|
166
|
-
zIndex?: number;
|
|
167
|
-
}
|
|
168
|
-
export interface ISelectorProps {
|
|
169
|
-
input: string;
|
|
170
|
-
disabled: boolean;
|
|
171
|
-
prefix: string;
|
|
172
|
-
size: 'small' | 'default' | 'large';
|
|
173
|
-
multiple: boolean;
|
|
174
|
-
bordered: boolean;
|
|
175
|
-
isFocused: boolean;
|
|
176
|
-
className?: string | undefined;
|
|
177
|
-
visible: boolean;
|
|
178
|
-
style?: React.CSSProperties | undefined;
|
|
179
|
-
allowClear: boolean;
|
|
180
|
-
mode?: modeType;
|
|
181
|
-
label?: React.ReactNode;
|
|
182
|
-
value?: TMaybeArray<string | number> | undefined | null;
|
|
183
|
-
filteredOptions: IOption[];
|
|
184
|
-
searchType: searchType;
|
|
185
|
-
placeholder?: string;
|
|
186
|
-
optionLabelRenderer: (value: string | number, option?: IOption) => React.ReactNode;
|
|
187
|
-
getOptionByValue: (optValue: string | number) => IOption;
|
|
188
|
-
onInputChange: (value: string) => void;
|
|
189
|
-
onAllowClear: () => void;
|
|
190
|
-
deleteValue: (value: React.ReactText[], v: string | number) => void;
|
|
191
|
-
arrowComponent?: React.ReactElement | undefined;
|
|
192
|
-
closeComponent?: React.ReactElement | undefined;
|
|
193
|
-
}
|
|
194
|
-
export interface IVirtualListProps {
|
|
195
|
-
itemHeight?: number;
|
|
196
|
-
height?: number;
|
|
197
|
-
prefixCls?: string;
|
|
198
|
-
children: React.ReactNode;
|
|
199
|
-
data: IOption[];
|
|
200
|
-
virtual?: boolean;
|
|
201
|
-
itemKey: string | number | ((item: never) => React.ReactText);
|
|
202
|
-
}
|
|
203
|
-
export interface IOptionsListProps {
|
|
204
|
-
style?: React.CSSProperties;
|
|
205
|
-
input: string;
|
|
206
|
-
prefixCls: string;
|
|
207
|
-
groupStyle?: React.CSSProperties;
|
|
208
|
-
optionStyle?: React.CSSProperties;
|
|
209
|
-
selected?: TMaybeArray<React.ReactText> | null;
|
|
210
|
-
multiple: boolean;
|
|
211
|
-
isMode?: boolean;
|
|
212
|
-
optionChecked?: TMaybeArray<React.ReactText>;
|
|
213
|
-
visible?: boolean;
|
|
214
|
-
isUseAll?: boolean;
|
|
215
|
-
data: IOption[];
|
|
216
|
-
hasGroup: boolean;
|
|
217
|
-
searchType: searchType;
|
|
218
|
-
placeholder?: string;
|
|
219
|
-
notFoundContent?: React.ReactElement;
|
|
220
|
-
onTempValueChange: (tempValue: React.ReactText[]) => void;
|
|
221
|
-
setTempValue: (values: React.ReactText[]) => void;
|
|
222
|
-
value?: TMaybeArray<React.ReactText> | null;
|
|
223
|
-
tempValue: React.ReactText[];
|
|
224
|
-
isFooter?: boolean;
|
|
225
|
-
labelRenderer: (option: IOption, isGruop: false) => React.ReactNode;
|
|
226
|
-
onOptionClick: (selectedValue: string | number) => void;
|
|
227
|
-
getContainer?: (node: HTMLElement) => HTMLElement;
|
|
228
|
-
onValueChange?: (optionValues: TMaybeArray<string | number> | null) => void;
|
|
229
|
-
onInputChange: (value: string) => void;
|
|
230
|
-
height?: number | undefined;
|
|
231
|
-
itemHeight?: number | undefined;
|
|
232
|
-
activeIndex: number;
|
|
233
|
-
setActiveIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
234
|
-
}
|
|
235
|
-
export {};
|
package/lib/Select/utils.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IOption } from './interface';
|
|
3
|
-
interface IGroup {
|
|
4
|
-
groupLabel?: string;
|
|
5
|
-
groupValue?: string | number;
|
|
6
|
-
}
|
|
7
|
-
export declare const customOptionKeyPrefix = "select_custom_option_";
|
|
8
|
-
export declare const customOptionKey: string;
|
|
9
|
-
export declare function convertNodeToOption(node: React.ReactElement, group: IGroup): IOption;
|
|
10
|
-
export declare const getFlattenOptions: (data: IOption[], hasGroup: boolean) => IOption[];
|
|
11
|
-
export declare function convertChildrenToData(nodes: React.ReactElement[], group?: {}): IOption[];
|
|
12
|
-
export declare function handleOptions(mergedOptions: IOption[], setCacheOptions: (options: IOption[]) => void, updateGroup: (value: boolean) => void): {
|
|
13
|
-
flattenOptions: IOption[];
|
|
14
|
-
isGroup: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare const defaultLabelRenderer: (input: string, prefix: string) => (option: IOption, isGroup: boolean) => React.ReactNode;
|
|
17
|
-
export declare const defaultOptionLabelRenderer: (value: string | number, option?: IOption | undefined) => {};
|
|
18
|
-
export declare const defaultSearchPredicate: (input: string) => (o: IOption) => boolean;
|
|
19
|
-
export declare const defaultMatchPredicate: (input: string) => (o: IOption) => boolean;
|
|
20
|
-
export declare const CustomOption: (value: string | number, withGroup?: boolean, id?: string) => IOption;
|
|
21
|
-
export {};
|
package/lib/Select/utils.js
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CustomOption = void 0;
|
|
7
|
-
exports.convertChildrenToData = convertChildrenToData;
|
|
8
|
-
exports.convertNodeToOption = convertNodeToOption;
|
|
9
|
-
exports.getFlattenOptions = exports.defaultSearchPredicate = exports.defaultOptionLabelRenderer = exports.defaultMatchPredicate = exports.defaultLabelRenderer = exports.customOptionKeyPrefix = exports.customOptionKey = void 0;
|
|
10
|
-
exports.handleOptions = handleOptions;
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["value", "children"],
|
|
17
|
-
_excluded2 = ["options"];
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
21
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
|
-
|
|
23
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
-
|
|
25
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
26
|
-
|
|
27
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
28
|
-
|
|
29
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
30
|
-
|
|
31
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
32
|
-
|
|
33
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
34
|
-
|
|
35
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
36
|
-
|
|
37
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
38
|
-
|
|
39
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
40
|
-
|
|
41
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
42
|
-
|
|
43
|
-
var ZERO_INDEX = 0;
|
|
44
|
-
var ungroupedOptionKeyPrefix = 'select_isungrouped_option_';
|
|
45
|
-
var ungroupedOptionKey = (0, _lodash.uniqueId)(ungroupedOptionKeyPrefix);
|
|
46
|
-
var ungroupedOptionLabel = '未分组';
|
|
47
|
-
var customOptionKeyPrefix = 'select_custom_option_';
|
|
48
|
-
exports.customOptionKeyPrefix = customOptionKeyPrefix;
|
|
49
|
-
var customOptionKey = (0, _lodash.uniqueId)(customOptionKeyPrefix); // ReactNode To Options
|
|
50
|
-
|
|
51
|
-
exports.customOptionKey = customOptionKey;
|
|
52
|
-
|
|
53
|
-
function convertNodeToOption(node, group) {
|
|
54
|
-
var _node$props = node.props,
|
|
55
|
-
value = _node$props.value,
|
|
56
|
-
children = _node$props.children,
|
|
57
|
-
restProps = _objectWithoutProperties(_node$props, _excluded);
|
|
58
|
-
|
|
59
|
-
var groupValue = group.groupValue,
|
|
60
|
-
groupLabel = group.groupLabel;
|
|
61
|
-
|
|
62
|
-
if (groupLabel && groupLabel) {
|
|
63
|
-
return _objectSpread({
|
|
64
|
-
value: value,
|
|
65
|
-
label: children !== undefined ? children : value,
|
|
66
|
-
groupValue: groupValue,
|
|
67
|
-
groupLabel: groupLabel
|
|
68
|
-
}, restProps);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return _objectSpread({
|
|
72
|
-
value: value,
|
|
73
|
-
label: children !== undefined ? children : value
|
|
74
|
-
}, restProps);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
var getFlattenOptions = function getFlattenOptions(data, hasGroup) {
|
|
78
|
-
var groupMap = new Map();
|
|
79
|
-
|
|
80
|
-
if (!hasGroup) {
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
data === null || data === void 0 ? void 0 : data.map(function (cur) {
|
|
85
|
-
var gValue = groupMap.get(cur.groupValue);
|
|
86
|
-
|
|
87
|
-
if (gValue) {
|
|
88
|
-
var options = gValue.options,
|
|
89
|
-
rest = _objectWithoutProperties(gValue, _excluded2);
|
|
90
|
-
|
|
91
|
-
return groupMap.set(cur.groupValue, _objectSpread({
|
|
92
|
-
options: [].concat(_toConsumableArray(options), [cur])
|
|
93
|
-
}, rest));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return groupMap.set(cur.groupValue, {
|
|
97
|
-
label: cur.groupLabel,
|
|
98
|
-
value: cur.groupValue,
|
|
99
|
-
isSelectOptGroup: true,
|
|
100
|
-
options: [cur]
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
var flattenOption = [];
|
|
104
|
-
groupMap.forEach(function (value) {
|
|
105
|
-
flattenOption.push(value); // @ts-ignore
|
|
106
|
-
|
|
107
|
-
flattenOption.push.apply(flattenOption, _toConsumableArray(value.options));
|
|
108
|
-
});
|
|
109
|
-
return flattenOption;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
exports.getFlattenOptions = getFlattenOptions;
|
|
113
|
-
|
|
114
|
-
function convertChildrenToData(nodes) {
|
|
115
|
-
var group = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
116
|
-
var nodeOptions = [];
|
|
117
|
-
|
|
118
|
-
_react.default.Children.forEach(nodes, function (node) {
|
|
119
|
-
if (! /*#__PURE__*/_react.default.isValidElement(node)) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
var isSelectOptGroup = node.type.isSelectOptGroup,
|
|
124
|
-
_node$props2 = node.props,
|
|
125
|
-
children = _node$props2.children,
|
|
126
|
-
label = _node$props2.label,
|
|
127
|
-
value = _node$props2.value; // 联合类型
|
|
128
|
-
|
|
129
|
-
if (!isSelectOptGroup) {
|
|
130
|
-
// option
|
|
131
|
-
nodeOptions.push(convertNodeToOption(node, group));
|
|
132
|
-
} else {
|
|
133
|
-
// Group
|
|
134
|
-
nodeOptions = (0, _lodash.concat)(nodeOptions, convertChildrenToData(children, {
|
|
135
|
-
groupLabel: label,
|
|
136
|
-
groupValue: value
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
return nodeOptions;
|
|
142
|
-
} // optionsMap flattenOptions
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
function handleOptions(mergedOptions, setCacheOptions, updateGroup) {
|
|
146
|
-
var isGroup = !!mergedOptions.find(function (v) {
|
|
147
|
-
return Object.prototype.hasOwnProperty.call(v, 'groupValue');
|
|
148
|
-
});
|
|
149
|
-
var flattenOptions = [];
|
|
150
|
-
mergedOptions.forEach(function (option) {
|
|
151
|
-
var optionGroupLabel = option.groupLabel,
|
|
152
|
-
optionGroupValue = option.groupValue;
|
|
153
|
-
|
|
154
|
-
if (isGroup && !optionGroupValue && !optionGroupLabel) {
|
|
155
|
-
var ungroupedOption = _objectSpread(_objectSpread({}, option), {}, {
|
|
156
|
-
groupLabel: ungroupedOptionLabel,
|
|
157
|
-
groupValue: ungroupedOptionKey
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
flattenOptions.push(ungroupedOption);
|
|
161
|
-
} else {
|
|
162
|
-
flattenOptions.push(option);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
updateGroup(isGroup);
|
|
166
|
-
setCacheOptions(flattenOptions);
|
|
167
|
-
return {
|
|
168
|
-
flattenOptions: flattenOptions,
|
|
169
|
-
isGroup: isGroup
|
|
170
|
-
};
|
|
171
|
-
} // provide search matching hightlight;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var defaultLabelRenderer = function defaultLabelRenderer(input, prefix) {
|
|
175
|
-
return function (option, isGroup) {
|
|
176
|
-
var title = option.title,
|
|
177
|
-
label = option.label;
|
|
178
|
-
|
|
179
|
-
if (isGroup || typeof label !== 'string') {
|
|
180
|
-
return title || label;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
var index = label.indexOf(input);
|
|
184
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
-
style: {
|
|
186
|
-
display: 'inline-block',
|
|
187
|
-
lineHeight: '40px'
|
|
188
|
-
}
|
|
189
|
-
}, label.slice(ZERO_INDEX, index), /*#__PURE__*/_react.default.createElement("span", {
|
|
190
|
-
className: "".concat(prefix, "-search-highlight")
|
|
191
|
-
}, label.slice(index, index + input.length)), label.slice(index + input.length));
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
exports.defaultLabelRenderer = defaultLabelRenderer;
|
|
196
|
-
|
|
197
|
-
var defaultOptionLabelRenderer = function defaultOptionLabelRenderer(value, option) {
|
|
198
|
-
return (option === null || option === void 0 ? void 0 : option.title) || (option === null || option === void 0 ? void 0 : option.label) || value;
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
exports.defaultOptionLabelRenderer = defaultOptionLabelRenderer;
|
|
202
|
-
|
|
203
|
-
var defaultSearchPredicate = function defaultSearchPredicate(input) {
|
|
204
|
-
return function (o) {
|
|
205
|
-
return typeof o.label === 'string' ? o.label.includes(input) : true;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
exports.defaultSearchPredicate = defaultSearchPredicate;
|
|
210
|
-
|
|
211
|
-
var defaultMatchPredicate = function defaultMatchPredicate(input) {
|
|
212
|
-
return function (o) {
|
|
213
|
-
return o.label === input;
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
exports.defaultMatchPredicate = defaultMatchPredicate;
|
|
218
|
-
|
|
219
|
-
var CustomOption = function CustomOption(value) {
|
|
220
|
-
var withGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
221
|
-
var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : customOptionKeyPrefix;
|
|
222
|
-
return withGroup ? {
|
|
223
|
-
value: value,
|
|
224
|
-
label: value.toString(),
|
|
225
|
-
groupValue: id,
|
|
226
|
-
groupLabel: '自由输入'
|
|
227
|
-
} : {
|
|
228
|
-
value: value,
|
|
229
|
-
label: value.toString()
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
exports.CustomOption = CustomOption;
|