@aloudata/aloudata-design 0.2.7 → 0.3.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/es/Avatar/index.d.ts +15 -0
- package/es/Avatar/index.js +33 -0
- package/es/{Message → Avatar}/style/index.d.ts +0 -0
- package/es/{Message → Avatar}/style/index.js +0 -0
- package/es/Avatar/style/index.less +34 -0
- package/es/Breadcrumb/index.d.ts +7 -0
- package/es/Breadcrumb/index.js +36 -0
- package/es/{Notification → Breadcrumb}/style/index.d.ts +0 -0
- package/es/{Notification → Breadcrumb}/style/index.js +0 -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/index.d.ts +0 -1
- 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/Drawer/index.d.ts +4 -0
- package/es/Drawer/index.js +3 -0
- package/{lib/Message → es/Drawer}/style/index.d.ts +0 -0
- package/es/Drawer/style/index.js +2 -0
- package/es/{Message → Drawer}/style/index.less +0 -0
- package/es/Dropdown/Button.js +1 -1
- package/es/Dropdown/style/index.less +41 -8
- package/es/Empty/image/Authority.d.ts +2 -0
- package/es/Empty/image/Authority.js +360 -0
- package/es/Empty/image/Dataspace.d.ts +2 -0
- package/es/Empty/image/Dataspace.js +271 -0
- package/es/Empty/image/Search.d.ts +2 -0
- package/es/Empty/image/Search.js +156 -0
- package/es/Empty/image/Simple.d.ts +2 -0
- package/es/Empty/image/Simple.js +20 -0
- package/es/Empty/image/Worksheet.d.ts +2 -0
- package/es/Empty/image/Worksheet.js +270 -0
- package/es/Empty/image/empty.d.ts +2 -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 -3
- 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 +3 -0
- package/es/InputNumber/index.js +32 -0
- package/{lib/Notification → es/InputNumber}/style/index.d.ts +0 -0
- package/es/InputNumber/style/index.js +2 -0
- package/es/InputNumber/style/index.less +224 -0
- package/es/Menu/Divider.d.ts +2 -2
- 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 +8 -0
- package/es/Navigator/components/Header/index.js +18 -0
- package/es/Navigator/components/Menu/index.d.ts +6 -13
- package/es/Navigator/components/Menu/index.js +26 -119
- 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 +97 -164
- package/es/Popover/index.d.ts +4 -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 +20 -5
- package/es/index.js +11 -3
- package/es/{Message → message}/index.d.ts +0 -0
- package/es/{Message → message}/index.js +0 -0
- package/es/message/style/index.d.ts +2 -0
- package/es/message/style/index.js +2 -0
- package/es/{Notification → message}/style/index.less +0 -0
- package/es/{Notification → notification}/index.d.ts +0 -0
- package/es/{Notification → notification}/index.js +0 -0
- package/es/notification/style/index.d.ts +2 -0
- package/es/notification/style/index.js +2 -0
- package/{lib/Message → es/notification}/style/index.less +0 -0
- 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/{Message → Avatar}/style/index.js +0 -0
- package/lib/Avatar/style/index.less +34 -0
- package/lib/Breadcrumb/index.d.ts +7 -0
- package/lib/Breadcrumb/index.js +50 -0
- package/lib/Breadcrumb/style/index.d.ts +2 -0
- package/lib/{Notification → Breadcrumb}/style/index.js +0 -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/index.d.ts +0 -1
- 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/Drawer/index.d.ts +4 -0
- package/lib/Drawer/index.js +15 -0
- package/lib/Drawer/style/index.d.ts +2 -0
- package/lib/Drawer/style/index.js +5 -0
- package/lib/{Notification → Drawer}/style/index.less +0 -0
- package/lib/Dropdown/Button.js +1 -1
- package/lib/Dropdown/style/index.less +41 -8
- package/lib/Empty/image/Authority.d.ts +2 -0
- package/lib/Empty/image/Authority.js +374 -0
- package/lib/Empty/image/Dataspace.d.ts +2 -0
- package/lib/Empty/image/Dataspace.js +285 -0
- package/lib/Empty/image/Search.d.ts +2 -0
- package/lib/Empty/image/Search.js +170 -0
- package/lib/Empty/image/Simple.d.ts +2 -0
- package/lib/Empty/image/Simple.js +34 -0
- package/lib/Empty/image/Worksheet.d.ts +2 -0
- package/lib/Empty/image/Worksheet.js +284 -0
- package/lib/Empty/image/empty.d.ts +2 -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 -3
- 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 +3 -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 -2
- 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 +8 -0
- package/lib/Navigator/components/Header/index.js +28 -0
- package/lib/Navigator/components/Menu/index.d.ts +6 -13
- package/lib/Navigator/components/Menu/index.js +25 -118
- 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 +97 -164
- package/lib/Popover/index.d.ts +4 -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 +20 -5
- package/lib/index.js +70 -6
- package/lib/{Message → message}/index.d.ts +0 -0
- package/lib/{Message → message}/index.js +0 -0
- package/lib/message/style/index.d.ts +2 -0
- package/lib/message/style/index.js +5 -0
- package/lib/message/style/index.less +1 -0
- package/lib/{Notification → notification}/index.d.ts +0 -0
- package/lib/{Notification → notification}/index.js +0 -0
- package/lib/notification/style/index.d.ts +2 -0
- package/lib/notification/style/index.js +5 -0
- package/lib/notification/style/index.less +1 -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 +7 -6
- 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
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _warning = _interopRequireDefault(require("rc-util/lib/warning"));
|
|
11
|
+
|
|
12
|
+
var _useMergedState5 = _interopRequireDefault(require("rc-util/lib/hooks/useMergedState"));
|
|
13
|
+
|
|
14
|
+
var _BaseSelect = _interopRequireWildcard(require("./BaseSelect"));
|
|
15
|
+
|
|
16
|
+
var _OptionList = _interopRequireDefault(require("./OptionList"));
|
|
17
|
+
|
|
18
|
+
var _Option = _interopRequireDefault(require("./Option"));
|
|
19
|
+
|
|
20
|
+
var _OptGroup = _interopRequireDefault(require("./OptGroup"));
|
|
21
|
+
|
|
22
|
+
var _useOptions = _interopRequireDefault(require("./hooks/useOptions"));
|
|
23
|
+
|
|
24
|
+
var _SelectContext = _interopRequireDefault(require("./SelectContext"));
|
|
25
|
+
|
|
26
|
+
var _useId = _interopRequireDefault(require("./hooks/useId"));
|
|
27
|
+
|
|
28
|
+
var _useRefFunc = _interopRequireDefault(require("./hooks/useRefFunc"));
|
|
29
|
+
|
|
30
|
+
var _valueUtil = require("./utils/valueUtil");
|
|
31
|
+
|
|
32
|
+
var _warningPropsUtil = _interopRequireDefault(require("./utils/warningPropsUtil"));
|
|
33
|
+
|
|
34
|
+
var _commonUtil = require("./utils/commonUtil");
|
|
35
|
+
|
|
36
|
+
var _useFilterOptions = _interopRequireDefault(require("./hooks/useFilterOptions"));
|
|
37
|
+
|
|
38
|
+
var _useCache3 = _interopRequireDefault(require("./hooks/useCache"));
|
|
39
|
+
|
|
40
|
+
var _excluded = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "listHeight", "listItemHeight", "value", "defaultValue", "labelInValue", "onChange"];
|
|
41
|
+
|
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
+
|
|
44
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
|
+
|
|
46
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
47
|
+
|
|
48
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
49
|
+
|
|
50
|
+
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."); }
|
|
51
|
+
|
|
52
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
53
|
+
|
|
54
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
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; }
|
|
59
|
+
|
|
60
|
+
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; }
|
|
61
|
+
|
|
62
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
63
|
+
|
|
64
|
+
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."); }
|
|
65
|
+
|
|
66
|
+
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); }
|
|
67
|
+
|
|
68
|
+
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; }
|
|
69
|
+
|
|
70
|
+
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; }
|
|
71
|
+
|
|
72
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
73
|
+
|
|
74
|
+
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; }
|
|
75
|
+
|
|
76
|
+
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; }
|
|
77
|
+
|
|
78
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
79
|
+
|
|
80
|
+
var OMIT_DOM_PROPS = ['inputValue'];
|
|
81
|
+
|
|
82
|
+
function isRawValue(value) {
|
|
83
|
+
return !value || _typeof(value) !== 'object';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var Select = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
87
|
+
var id = props.id,
|
|
88
|
+
mode = props.mode,
|
|
89
|
+
_props$prefixCls = props.prefixCls,
|
|
90
|
+
prefixCls = _props$prefixCls === void 0 ? 'rc-select' : _props$prefixCls,
|
|
91
|
+
backfill = props.backfill,
|
|
92
|
+
fieldNames = props.fieldNames,
|
|
93
|
+
inputValue = props.inputValue,
|
|
94
|
+
searchValue = props.searchValue,
|
|
95
|
+
onSearch = props.onSearch,
|
|
96
|
+
_props$autoClearSearc = props.autoClearSearchValue,
|
|
97
|
+
autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,
|
|
98
|
+
onSelect = props.onSelect,
|
|
99
|
+
onDeselect = props.onDeselect,
|
|
100
|
+
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
|
|
101
|
+
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? true : _props$dropdownMatchS,
|
|
102
|
+
filterOption = props.filterOption,
|
|
103
|
+
filterSort = props.filterSort,
|
|
104
|
+
optionFilterProp = props.optionFilterProp,
|
|
105
|
+
optionLabelProp = props.optionLabelProp,
|
|
106
|
+
options = props.options,
|
|
107
|
+
children = props.children,
|
|
108
|
+
defaultActiveFirstOption = props.defaultActiveFirstOption,
|
|
109
|
+
menuItemSelectedIcon = props.menuItemSelectedIcon,
|
|
110
|
+
virtual = props.virtual,
|
|
111
|
+
_props$listHeight = props.listHeight,
|
|
112
|
+
listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,
|
|
113
|
+
_props$listItemHeight = props.listItemHeight,
|
|
114
|
+
listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,
|
|
115
|
+
value = props.value,
|
|
116
|
+
defaultValue = props.defaultValue,
|
|
117
|
+
labelInValue = props.labelInValue,
|
|
118
|
+
onChange = props.onChange,
|
|
119
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
120
|
+
|
|
121
|
+
var mergedId = (0, _useId.default)(id);
|
|
122
|
+
var multiple = (0, _BaseSelect.isMultiple)(mode);
|
|
123
|
+
var childrenAsData = !!(!options && children);
|
|
124
|
+
var mergedFilterOption = React.useMemo(function () {
|
|
125
|
+
if (filterOption === undefined && mode === 'combobox') {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return filterOption;
|
|
130
|
+
}, [filterOption, mode]); // ========================= FieldNames =========================
|
|
131
|
+
|
|
132
|
+
var mergedFieldNames = React.useMemo(function () {
|
|
133
|
+
return (0, _valueUtil.fillFieldNames)(fieldNames, childrenAsData);
|
|
134
|
+
},
|
|
135
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
136
|
+
[// We stringify fieldNames to avoid unnecessary re-renders.
|
|
137
|
+
JSON.stringify(fieldNames), childrenAsData]); // =========================== Search ===========================
|
|
138
|
+
|
|
139
|
+
var _useMergedState = (0, _useMergedState5.default)('', {
|
|
140
|
+
value: searchValue !== undefined ? searchValue : inputValue,
|
|
141
|
+
postState: function postState(search) {
|
|
142
|
+
return search || '';
|
|
143
|
+
}
|
|
144
|
+
}),
|
|
145
|
+
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
146
|
+
mergedSearchValue = _useMergedState2[0],
|
|
147
|
+
setSearchValue = _useMergedState2[1]; // =========================== Option ===========================
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
var parsedOptions = (0, _useOptions.default)(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
|
|
151
|
+
var valueOptions = parsedOptions.valueOptions,
|
|
152
|
+
labelOptions = parsedOptions.labelOptions,
|
|
153
|
+
mergedOptions = parsedOptions.options; // ========================= Wrap Value =========================
|
|
154
|
+
|
|
155
|
+
var convert2LabelValues = React.useCallback(function (draftValues) {
|
|
156
|
+
// Convert to array
|
|
157
|
+
var valueList = (0, _commonUtil.toArray)(draftValues); // Convert to labelInValue type
|
|
158
|
+
|
|
159
|
+
return valueList.map(function (val) {
|
|
160
|
+
var rawValue;
|
|
161
|
+
var rawLabel;
|
|
162
|
+
var rawKey;
|
|
163
|
+
var rawDisabled; // Fill label & value
|
|
164
|
+
|
|
165
|
+
if (isRawValue(val)) {
|
|
166
|
+
rawValue = val;
|
|
167
|
+
} else {
|
|
168
|
+
var _val$value;
|
|
169
|
+
|
|
170
|
+
rawKey = val.key;
|
|
171
|
+
rawLabel = val.label;
|
|
172
|
+
rawValue = (_val$value = val.value) !== null && _val$value !== void 0 ? _val$value : rawKey;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
var option = valueOptions.get(rawValue);
|
|
176
|
+
|
|
177
|
+
if (option) {
|
|
178
|
+
var _option$key;
|
|
179
|
+
|
|
180
|
+
// Fill missing props
|
|
181
|
+
if (rawLabel === undefined) rawLabel = option === null || option === void 0 ? void 0 : option[optionLabelProp || mergedFieldNames.label];
|
|
182
|
+
if (rawKey === undefined) rawKey = (_option$key = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key !== void 0 ? _option$key : rawValue;
|
|
183
|
+
rawDisabled = option === null || option === void 0 ? void 0 : option.disabled; // Warning if label not same as provided
|
|
184
|
+
|
|
185
|
+
if (process.env.NODE_ENV !== 'production' && !optionLabelProp) {
|
|
186
|
+
var optionLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.label];
|
|
187
|
+
|
|
188
|
+
if (optionLabel !== undefined && optionLabel !== rawLabel) {
|
|
189
|
+
(0, _warning.default)(false, '`label` of `value` is not same as `label` in Select options.');
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return {
|
|
195
|
+
label: rawLabel,
|
|
196
|
+
value: rawValue,
|
|
197
|
+
key: rawKey,
|
|
198
|
+
disabled: rawDisabled
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
}, [mergedFieldNames, optionLabelProp, valueOptions]); // =========================== Values ===========================
|
|
202
|
+
|
|
203
|
+
var _useMergedState3 = (0, _useMergedState5.default)(defaultValue, {
|
|
204
|
+
value: value
|
|
205
|
+
}),
|
|
206
|
+
_useMergedState4 = _slicedToArray(_useMergedState3, 2),
|
|
207
|
+
internalValue = _useMergedState4[0],
|
|
208
|
+
setInternalValue = _useMergedState4[1]; // Merged value with LabelValueType
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
var rawLabeledValues = React.useMemo(function () {
|
|
212
|
+
var _values$;
|
|
213
|
+
|
|
214
|
+
var values = convert2LabelValues(internalValue); // combobox no need save value when it's empty
|
|
215
|
+
|
|
216
|
+
if (mode === 'combobox' && !((_values$ = values[0]) === null || _values$ === void 0 ? void 0 : _values$.value)) {
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return values;
|
|
221
|
+
}, [internalValue, convert2LabelValues, mode]); // Fill label with cache to avoid option remove
|
|
222
|
+
|
|
223
|
+
var _useCache = (0, _useCache3.default)(rawLabeledValues, valueOptions),
|
|
224
|
+
_useCache2 = _slicedToArray(_useCache, 2),
|
|
225
|
+
mergedValues = _useCache2[0],
|
|
226
|
+
getMixedOption = _useCache2[1];
|
|
227
|
+
|
|
228
|
+
var displayValues = React.useMemo(function () {
|
|
229
|
+
// `null` need show as placeholder instead
|
|
230
|
+
// https://github.com/ant-design/ant-design/issues/25057
|
|
231
|
+
if (!mode && mergedValues.length === 1) {
|
|
232
|
+
var firstValue = mergedValues[0];
|
|
233
|
+
|
|
234
|
+
if (firstValue.value === null && (firstValue.label === null || firstValue.label === undefined)) {
|
|
235
|
+
return [];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return mergedValues.map(function (item) {
|
|
240
|
+
var _item$label;
|
|
241
|
+
|
|
242
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
243
|
+
label: (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : item.value
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}, [mode, mergedValues]);
|
|
247
|
+
/** Convert `displayValues` to raw value type set */
|
|
248
|
+
|
|
249
|
+
var rawValues = React.useMemo(function () {
|
|
250
|
+
return new Set(mergedValues.map(function (val) {
|
|
251
|
+
return val.value;
|
|
252
|
+
}));
|
|
253
|
+
}, [mergedValues]);
|
|
254
|
+
React.useEffect(function () {
|
|
255
|
+
if (mode === 'combobox') {
|
|
256
|
+
var _mergedValues$;
|
|
257
|
+
|
|
258
|
+
var strValue = (_mergedValues$ = mergedValues[0]) === null || _mergedValues$ === void 0 ? void 0 : _mergedValues$.value;
|
|
259
|
+
|
|
260
|
+
if (strValue !== undefined && strValue !== null) {
|
|
261
|
+
setSearchValue(String(strValue));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}, [mergedValues]); // ======================= Display Option =======================
|
|
265
|
+
// Create a placeholder item if not exist in `options`
|
|
266
|
+
|
|
267
|
+
var createTagOption = (0, _useRefFunc.default)(function (val, label) {
|
|
268
|
+
var _ref;
|
|
269
|
+
|
|
270
|
+
var mergedLabel = label !== null && label !== void 0 ? label : val;
|
|
271
|
+
return _ref = {}, _defineProperty(_ref, mergedFieldNames.value, val), _defineProperty(_ref, mergedFieldNames.label, mergedLabel), _ref;
|
|
272
|
+
}); // Fill tag as option if mode is `tags`
|
|
273
|
+
|
|
274
|
+
var filledTagOptions = React.useMemo(function () {
|
|
275
|
+
if (mode !== 'tags') {
|
|
276
|
+
return mergedOptions;
|
|
277
|
+
} // >>> Tag mode
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
var cloneOptions = _toConsumableArray(mergedOptions); // Check if value exist in options (include new patch item)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
var existOptions = function existOptions(val) {
|
|
284
|
+
return valueOptions.has(val);
|
|
285
|
+
}; // Fill current value as option
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
_toConsumableArray(mergedValues).sort(function (a, b) {
|
|
289
|
+
return a.value < b.value ? -1 : 1;
|
|
290
|
+
}).forEach(function (item) {
|
|
291
|
+
var val = item.value;
|
|
292
|
+
|
|
293
|
+
if (!existOptions(val)) {
|
|
294
|
+
cloneOptions.push(createTagOption(val, item.label));
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
return cloneOptions;
|
|
299
|
+
}, [createTagOption, mergedOptions, valueOptions, mergedValues, mode]);
|
|
300
|
+
var filteredOptions = (0, _useFilterOptions.default)(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, optionFilterProp); // Fill options with search value if needed
|
|
301
|
+
|
|
302
|
+
var filledSearchOptions = React.useMemo(function () {
|
|
303
|
+
if (mode !== 'tags' || !mergedSearchValue || filteredOptions.some(function (item) {
|
|
304
|
+
return item[optionFilterProp || 'value'] === mergedSearchValue;
|
|
305
|
+
})) {
|
|
306
|
+
return filteredOptions;
|
|
307
|
+
} // Fill search value as option
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
return [createTagOption(mergedSearchValue)].concat(_toConsumableArray(filteredOptions));
|
|
311
|
+
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue]);
|
|
312
|
+
var orderedFilteredOptions = React.useMemo(function () {
|
|
313
|
+
if (!filterSort) {
|
|
314
|
+
return filledSearchOptions;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return _toConsumableArray(filledSearchOptions).sort(function (a, b) {
|
|
318
|
+
return filterSort(a, b);
|
|
319
|
+
});
|
|
320
|
+
}, [filledSearchOptions, filterSort]);
|
|
321
|
+
var displayOptions = React.useMemo(function () {
|
|
322
|
+
return (0, _valueUtil.flattenOptions)(orderedFilteredOptions, {
|
|
323
|
+
fieldNames: mergedFieldNames,
|
|
324
|
+
childrenAsData: childrenAsData
|
|
325
|
+
});
|
|
326
|
+
}, [orderedFilteredOptions, mergedFieldNames, childrenAsData]); // =========================== Change ===========================
|
|
327
|
+
|
|
328
|
+
var triggerChange = function triggerChange(values) {
|
|
329
|
+
var labeledValues = convert2LabelValues(values);
|
|
330
|
+
setInternalValue(labeledValues);
|
|
331
|
+
|
|
332
|
+
if (onChange && ( // Trigger event only when value changed
|
|
333
|
+
labeledValues.length !== mergedValues.length || labeledValues.some(function (newVal, index) {
|
|
334
|
+
var _mergedValues$index;
|
|
335
|
+
|
|
336
|
+
return ((_mergedValues$index = mergedValues[index]) === null || _mergedValues$index === void 0 ? void 0 : _mergedValues$index.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);
|
|
337
|
+
}))) {
|
|
338
|
+
var returnValues = labelInValue ? labeledValues : labeledValues.map(function (v) {
|
|
339
|
+
return v.value;
|
|
340
|
+
});
|
|
341
|
+
var returnOptions = labeledValues.map(function (v) {
|
|
342
|
+
return (0, _valueUtil.injectPropsWithOption)(getMixedOption(v.value));
|
|
343
|
+
});
|
|
344
|
+
onChange( // Value
|
|
345
|
+
multiple ? returnValues : returnValues[0], // Option
|
|
346
|
+
multiple ? returnOptions : returnOptions[0]);
|
|
347
|
+
}
|
|
348
|
+
}; // ======================= Accessibility ========================
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
var _React$useState = React.useState(null),
|
|
352
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
353
|
+
activeValue = _React$useState2[0],
|
|
354
|
+
setActiveValue = _React$useState2[1];
|
|
355
|
+
|
|
356
|
+
var _React$useState3 = React.useState(0),
|
|
357
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
358
|
+
accessibilityIndex = _React$useState4[0],
|
|
359
|
+
setAccessibilityIndex = _React$useState4[1];
|
|
360
|
+
|
|
361
|
+
var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';
|
|
362
|
+
var onActiveValue = React.useCallback(function (active, index) {
|
|
363
|
+
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
364
|
+
_ref2$source = _ref2.source,
|
|
365
|
+
source = _ref2$source === void 0 ? 'keyboard' : _ref2$source;
|
|
366
|
+
|
|
367
|
+
setAccessibilityIndex(index);
|
|
368
|
+
|
|
369
|
+
if (backfill && mode === 'combobox' && active !== null && source === 'keyboard') {
|
|
370
|
+
setActiveValue(String(active));
|
|
371
|
+
}
|
|
372
|
+
}, [backfill, mode]); // ========================= OptionList =========================
|
|
373
|
+
|
|
374
|
+
var triggerSelect = function triggerSelect(val, selected) {
|
|
375
|
+
var getSelectEnt = function getSelectEnt() {
|
|
376
|
+
var _option$key2;
|
|
377
|
+
|
|
378
|
+
var option = getMixedOption(val);
|
|
379
|
+
return [labelInValue ? {
|
|
380
|
+
label: option === null || option === void 0 ? void 0 : option[mergedFieldNames.label],
|
|
381
|
+
value: val,
|
|
382
|
+
key: (_option$key2 = option === null || option === void 0 ? void 0 : option.key) !== null && _option$key2 !== void 0 ? _option$key2 : val
|
|
383
|
+
} : val, (0, _valueUtil.injectPropsWithOption)(option)];
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
if (selected && onSelect) {
|
|
387
|
+
var _getSelectEnt = getSelectEnt(),
|
|
388
|
+
_getSelectEnt2 = _slicedToArray(_getSelectEnt, 2),
|
|
389
|
+
wrappedValue = _getSelectEnt2[0],
|
|
390
|
+
option = _getSelectEnt2[1];
|
|
391
|
+
|
|
392
|
+
onSelect(wrappedValue, option);
|
|
393
|
+
} else if (!selected && onDeselect) {
|
|
394
|
+
var _getSelectEnt3 = getSelectEnt(),
|
|
395
|
+
_getSelectEnt4 = _slicedToArray(_getSelectEnt3, 2),
|
|
396
|
+
_wrappedValue = _getSelectEnt4[0],
|
|
397
|
+
_option = _getSelectEnt4[1];
|
|
398
|
+
|
|
399
|
+
onDeselect(_wrappedValue, _option);
|
|
400
|
+
}
|
|
401
|
+
}; // Used for OptionList selection
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
var onInternalSelect = (0, _useRefFunc.default)(function (val, info) {
|
|
405
|
+
var cloneValues; // Single mode always trigger select only with option list
|
|
406
|
+
|
|
407
|
+
var mergedSelect = multiple ? info.selected : true;
|
|
408
|
+
|
|
409
|
+
if (mergedSelect) {
|
|
410
|
+
cloneValues = multiple ? [].concat(_toConsumableArray(mergedValues), [val]) : [val];
|
|
411
|
+
} else {
|
|
412
|
+
cloneValues = mergedValues.filter(function (v) {
|
|
413
|
+
return v.value !== val;
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
triggerChange(cloneValues);
|
|
418
|
+
triggerSelect(val, mergedSelect); // Clean search value if single or configured
|
|
419
|
+
|
|
420
|
+
if (mode === 'combobox') {
|
|
421
|
+
// setSearchValue(String(val));
|
|
422
|
+
setActiveValue('');
|
|
423
|
+
} else if (!_BaseSelect.isMultiple || autoClearSearchValue) {
|
|
424
|
+
setSearchValue('');
|
|
425
|
+
setActiveValue('');
|
|
426
|
+
}
|
|
427
|
+
}); // ======================= Display Change =======================
|
|
428
|
+
// BaseSelect display values change
|
|
429
|
+
|
|
430
|
+
var onDisplayValuesChange = function onDisplayValuesChange(nextValues, info) {
|
|
431
|
+
triggerChange(nextValues);
|
|
432
|
+
|
|
433
|
+
if (info.type === 'remove' || info.type === 'clear') {
|
|
434
|
+
info.values.forEach(function (item) {
|
|
435
|
+
triggerSelect(item.value, false);
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}; // =========================== Search ===========================
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
var onInternalSearch = function onInternalSearch(searchText, info) {
|
|
442
|
+
setSearchValue(searchText);
|
|
443
|
+
setActiveValue(null); // [Submit] Tag mode should flush input
|
|
444
|
+
|
|
445
|
+
if (info.source === 'submit') {
|
|
446
|
+
var formatted = (searchText || '').trim(); // prevent empty tags from appearing when you click the Enter button
|
|
447
|
+
|
|
448
|
+
if (formatted) {
|
|
449
|
+
var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), [formatted])));
|
|
450
|
+
triggerChange(newRawValues);
|
|
451
|
+
triggerSelect(formatted, true);
|
|
452
|
+
setSearchValue('');
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if (info.source !== 'blur') {
|
|
459
|
+
if (mode === 'combobox') {
|
|
460
|
+
triggerChange(searchText);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch(searchText);
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
var onInternalSearchSplit = function onInternalSearchSplit(words) {
|
|
468
|
+
var patchValues = words;
|
|
469
|
+
|
|
470
|
+
if (mode !== 'tags') {
|
|
471
|
+
patchValues = words.map(function (word) {
|
|
472
|
+
var opt = labelOptions.get(word);
|
|
473
|
+
return opt === null || opt === void 0 ? void 0 : opt.value;
|
|
474
|
+
}).filter(function (val) {
|
|
475
|
+
return val !== undefined;
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
var newRawValues = Array.from(new Set([].concat(_toConsumableArray(rawValues), _toConsumableArray(patchValues))));
|
|
480
|
+
triggerChange(newRawValues);
|
|
481
|
+
newRawValues.forEach(function (newRawValue) {
|
|
482
|
+
triggerSelect(newRawValue, true);
|
|
483
|
+
});
|
|
484
|
+
}; // ========================== Context ===========================
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
var selectContext = React.useMemo(function () {
|
|
488
|
+
var realVirtual = virtual !== false && dropdownMatchSelectWidth !== false;
|
|
489
|
+
return _objectSpread(_objectSpread({}, parsedOptions), {}, {
|
|
490
|
+
flattenOptions: displayOptions,
|
|
491
|
+
onActiveValue: onActiveValue,
|
|
492
|
+
defaultActiveFirstOption: mergedDefaultActiveFirstOption,
|
|
493
|
+
onSelect: onInternalSelect,
|
|
494
|
+
menuItemSelectedIcon: menuItemSelectedIcon,
|
|
495
|
+
rawValues: rawValues,
|
|
496
|
+
fieldNames: mergedFieldNames,
|
|
497
|
+
virtual: realVirtual,
|
|
498
|
+
listHeight: listHeight,
|
|
499
|
+
listItemHeight: listItemHeight,
|
|
500
|
+
childrenAsData: childrenAsData
|
|
501
|
+
});
|
|
502
|
+
}, [parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, listHeight, listItemHeight, childrenAsData]); // ========================== Warning ===========================
|
|
503
|
+
|
|
504
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
505
|
+
(0, _warningPropsUtil.default)(props);
|
|
506
|
+
} // ==============================================================
|
|
507
|
+
// == Render ==
|
|
508
|
+
// ==============================================================
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
return /*#__PURE__*/React.createElement(_SelectContext.default.Provider, {
|
|
512
|
+
value: selectContext
|
|
513
|
+
}, /*#__PURE__*/React.createElement(_BaseSelect.default, Object.assign({}, restProps, {
|
|
514
|
+
// >>> MISC
|
|
515
|
+
id: mergedId,
|
|
516
|
+
prefixCls: prefixCls,
|
|
517
|
+
ref: ref,
|
|
518
|
+
omitDomProps: OMIT_DOM_PROPS,
|
|
519
|
+
mode: mode,
|
|
520
|
+
// >>> Values
|
|
521
|
+
displayValues: displayValues,
|
|
522
|
+
onDisplayValuesChange: onDisplayValuesChange,
|
|
523
|
+
// >>> Search
|
|
524
|
+
searchValue: mergedSearchValue,
|
|
525
|
+
onSearch: onInternalSearch,
|
|
526
|
+
onSearchSplit: onInternalSearchSplit,
|
|
527
|
+
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
|
|
528
|
+
// >>> OptionList
|
|
529
|
+
OptionList: _OptionList.default,
|
|
530
|
+
emptyOptions: !displayOptions.length,
|
|
531
|
+
// >>> Accessibility
|
|
532
|
+
activeValue: activeValue,
|
|
533
|
+
activeDescendantId: "".concat(mergedId, "_list_").concat(accessibilityIndex)
|
|
534
|
+
})));
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
538
|
+
Select.displayName = 'Select';
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
var TypedSelect = Select;
|
|
542
|
+
TypedSelect.Option = _Option.default;
|
|
543
|
+
TypedSelect.OptGroup = _OptGroup.default;
|
|
544
|
+
var _default = TypedSelect;
|
|
545
|
+
exports.default = _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { RawValueType, RenderNode } from './BaseSelect';
|
|
3
|
+
import type { FlattenOptionData } from './interface';
|
|
4
|
+
import type { BaseOptionType, FieldNames, OnActiveValue, OnInternalSelect } from './Select';
|
|
5
|
+
export interface SelectContextProps {
|
|
6
|
+
options: BaseOptionType[];
|
|
7
|
+
flattenOptions: FlattenOptionData<BaseOptionType>[];
|
|
8
|
+
onActiveValue: OnActiveValue;
|
|
9
|
+
defaultActiveFirstOption?: boolean;
|
|
10
|
+
onSelect: OnInternalSelect;
|
|
11
|
+
menuItemSelectedIcon?: RenderNode;
|
|
12
|
+
rawValues: Set<RawValueType>;
|
|
13
|
+
fieldNames?: FieldNames;
|
|
14
|
+
virtual?: boolean;
|
|
15
|
+
listHeight?: number;
|
|
16
|
+
listItemHeight?: number;
|
|
17
|
+
childrenAsData?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const SelectContext: React.Context<SelectContextProps>;
|
|
20
|
+
export default SelectContext;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
// @ts-nocheck
|
|
17
|
+
var SelectContext = /*#__PURE__*/React.createContext(null);
|
|
18
|
+
var _default = SelectContext;
|
|
19
|
+
exports.default = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { AlignType } from 'rc-trigger/lib/interface';
|
|
3
|
+
import type { Placement, RenderDOMFunc } from './BaseSelect';
|
|
4
|
+
export interface RefTriggerProps {
|
|
5
|
+
getPopupElement: () => HTMLDivElement;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectTriggerProps {
|
|
8
|
+
prefixCls: string;
|
|
9
|
+
children: React.ReactElement;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
popupElement: React.ReactElement;
|
|
13
|
+
animation?: string;
|
|
14
|
+
transitionName?: string;
|
|
15
|
+
containerWidth: number;
|
|
16
|
+
placement?: Placement;
|
|
17
|
+
dropdownStyle: React.CSSProperties;
|
|
18
|
+
dropdownClassName: string;
|
|
19
|
+
direction: string;
|
|
20
|
+
dropdownMatchSelectWidth?: boolean | number;
|
|
21
|
+
dropdownRender?: (menu: React.ReactElement) => React.ReactElement;
|
|
22
|
+
getPopupContainer?: RenderDOMFunc;
|
|
23
|
+
dropdownAlign: AlignType;
|
|
24
|
+
empty: boolean;
|
|
25
|
+
getTriggerDOMNode: () => HTMLElement;
|
|
26
|
+
onPopupVisibleChange?: (visible: boolean) => void;
|
|
27
|
+
onPopupMouseEnter: () => void;
|
|
28
|
+
}
|
|
29
|
+
declare const RefSelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<RefTriggerProps>>;
|
|
30
|
+
export default RefSelectTrigger;
|