@apdesign/web-react 1.0.0 → 1.0.2
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/README.md +6 -114
- package/README.zh-CN.md +10 -111
- package/dist/arco-icon.min.js +2 -2
- package/dist/arco.development.js +22 -22
- package/dist/arco.min.js +2 -2
- package/dist/css/index.less +73 -73
- package/es/Affix/index.d.ts +10 -10
- package/es/Affix/index.js +172 -172
- package/es/Affix/interface.d.ts +52 -52
- package/es/Affix/interface.js +1 -1
- package/es/Affix/style/index.d.ts +2 -2
- package/es/Affix/style/index.js +2 -2
- package/es/Alert/index.d.ts +5 -5
- package/es/Alert/index.js +100 -100
- package/es/Alert/interface.d.ts +66 -66
- package/es/Alert/interface.js +1 -1
- package/es/Alert/style/index.d.ts +2 -2
- package/es/Alert/style/index.js +2 -2
- package/es/Anchor/anchor.d.ts +9 -9
- package/es/Anchor/anchor.js +275 -275
- package/es/Anchor/context.d.ts +11 -11
- package/es/Anchor/context.js +8 -8
- package/es/Anchor/index.d.ts +4 -4
- package/es/Anchor/index.js +2 -2
- package/es/Anchor/interface.d.ts +105 -105
- package/es/Anchor/interface.js +1 -1
- package/es/Anchor/link.d.ts +6 -6
- package/es/Anchor/link.js +69 -69
- package/es/Anchor/style/index.d.ts +3 -3
- package/es/Anchor/style/index.js +3 -3
- package/es/Anchor/utils.d.ts +4 -4
- package/es/Anchor/utils.js +42 -42
- package/es/AutoComplete/index.d.ts +12 -12
- package/es/AutoComplete/index.js +161 -161
- package/es/AutoComplete/interface.d.ts +127 -127
- package/es/AutoComplete/interface.js +1 -1
- package/es/AutoComplete/style/index.d.ts +4 -4
- package/es/AutoComplete/style/index.js +4 -4
- package/es/Avatar/avatar.d.ts +6 -6
- package/es/Avatar/avatar.js +81 -81
- package/es/Avatar/context.d.ts +4 -4
- package/es/Avatar/context.js +2 -2
- package/es/Avatar/group.d.ts +6 -6
- package/es/Avatar/group.js +67 -67
- package/es/Avatar/index.d.ts +8 -8
- package/es/Avatar/index.js +6 -6
- package/es/Avatar/interface.d.ts +95 -95
- package/es/Avatar/interface.js +1 -1
- package/es/Avatar/style/index.d.ts +3 -3
- package/es/Avatar/style/index.js +3 -3
- package/es/BackTop/index.d.ts +7 -7
- package/es/BackTop/index.js +93 -93
- package/es/BackTop/interface.d.ts +37 -37
- package/es/BackTop/interface.js +1 -1
- package/es/BackTop/style/index.d.ts +2 -2
- package/es/BackTop/style/index.js +2 -2
- package/es/Badge/count.d.ts +8 -8
- package/es/Badge/count.js +33 -33
- package/es/Badge/index.d.ts +5 -5
- package/es/Badge/index.js +114 -114
- package/es/Badge/interface.d.ts +57 -57
- package/es/Badge/interface.js +1 -1
- package/es/Badge/style/index.d.ts +2 -2
- package/es/Badge/style/index.js +2 -2
- package/es/Breadcrumb/index.d.ts +8 -8
- package/es/Breadcrumb/index.js +95 -95
- package/es/Breadcrumb/interface.d.ts +78 -78
- package/es/Breadcrumb/interface.js +1 -1
- package/es/Breadcrumb/item.d.ts +8 -8
- package/es/Breadcrumb/item.js +65 -65
- package/es/Breadcrumb/style/index.d.ts +3 -3
- package/es/Breadcrumb/style/index.js +3 -3
- package/es/Button/group.d.ts +5 -5
- package/es/Button/group.js +35 -35
- package/es/Button/index.d.ts +15 -15
- package/es/Button/index.js +132 -132
- package/es/Button/interface.d.ts +105 -105
- package/es/Button/interface.js +1 -1
- package/es/Button/style/index.d.ts +2 -2
- package/es/Button/style/index.js +2 -2
- package/es/Calendar/header/header.d.ts +2 -2
- package/es/Calendar/header/header.js +65 -65
- package/es/Calendar/header/panel-header.d.ts +2 -2
- package/es/Calendar/header/panel-header.js +28 -28
- package/es/Calendar/hooks/useCellClassName.d.ts +1 -1
- package/es/Calendar/hooks/useCellClassName.js +53 -53
- package/es/Calendar/index.d.ts +7 -7
- package/es/Calendar/index.js +142 -142
- package/es/Calendar/interface.d.ts +122 -122
- package/es/Calendar/interface.js +1 -1
- package/es/Calendar/month.d.ts +15 -15
- package/es/Calendar/month.js +133 -133
- package/es/Calendar/style/index.d.ts +4 -4
- package/es/Calendar/style/index.js +4 -4
- package/es/Calendar/week-list.d.ts +10 -10
- package/es/Calendar/week-list.js +17 -17
- package/es/Calendar/year.d.ts +13 -13
- package/es/Calendar/year.js +59 -59
- package/es/Card/grid.d.ts +5 -5
- package/es/Card/grid.js +13 -13
- package/es/Card/index.d.ts +10 -10
- package/es/Card/index.js +76 -76
- package/es/Card/interface.d.ts +99 -99
- package/es/Card/interface.js +1 -1
- package/es/Card/meta.d.ts +5 -5
- package/es/Card/meta.js +42 -42
- package/es/Card/style/index.d.ts +3 -3
- package/es/Card/style/index.js +3 -3
- package/es/Carousel/arrow.d.ts +4 -4
- package/es/Carousel/arrow.js +36 -36
- package/es/Carousel/index.d.ts +5 -5
- package/es/Carousel/index.js +288 -288
- package/es/Carousel/indicator.d.ts +4 -4
- package/es/Carousel/indicator.js +57 -57
- package/es/Carousel/interface.d.ts +144 -144
- package/es/Carousel/interface.js +1 -1
- package/es/Carousel/style/index.d.ts +2 -2
- package/es/Carousel/style/index.js +2 -2
- package/es/Cascader/base/node.d.ts +78 -78
- package/es/Cascader/base/node.js +201 -201
- package/es/Cascader/base/store.d.ts +43 -43
- package/es/Cascader/base/store.js +166 -166
- package/es/Cascader/cascader.d.ts +17 -17
- package/es/Cascader/cascader.js +344 -344
- package/es/Cascader/hook/useRefCurrent.d.ts +3 -3
- package/es/Cascader/hook/useRefCurrent.js +41 -41
- package/es/Cascader/index.d.ts +5 -5
- package/es/Cascader/index.js +3 -3
- package/es/Cascader/interface.d.ts +308 -308
- package/es/Cascader/interface.js +1 -1
- package/es/Cascader/panel/list.d.ts +4 -4
- package/es/Cascader/panel/list.js +383 -383
- package/es/Cascader/panel/option.d.ts +23 -23
- package/es/Cascader/panel/option.js +12 -12
- package/es/Cascader/panel/search-panel.d.ts +28 -28
- package/es/Cascader/panel/search-panel.js +206 -206
- package/es/Cascader/style/index.d.ts +6 -6
- package/es/Cascader/style/index.js +6 -6
- package/es/Cascader/util.d.ts +24 -24
- package/es/Cascader/util.js +111 -111
- package/es/Checkbox/checkbox.d.ts +14 -14
- package/es/Checkbox/checkbox.js +122 -122
- package/es/Checkbox/group.d.ts +17 -17
- package/es/Checkbox/group.js +109 -109
- package/es/Checkbox/icon-check.d.ts +3 -3
- package/es/Checkbox/icon-check.js +6 -6
- package/es/Checkbox/index.d.ts +4 -4
- package/es/Checkbox/index.js +3 -3
- package/es/Checkbox/interface.d.ts +102 -102
- package/es/Checkbox/interface.js +1 -1
- package/es/Checkbox/style/index.d.ts +2 -2
- package/es/Checkbox/style/index.js +2 -2
- package/es/Checkbox/useCheckbox.d.ts +22 -22
- package/es/Checkbox/useCheckbox.js +103 -103
- package/es/Collapse/collapse.d.ts +14 -14
- package/es/Collapse/collapse.js +120 -120
- package/es/Collapse/index.d.ts +3 -3
- package/es/Collapse/index.js +2 -2
- package/es/Collapse/interface.d.ts +111 -111
- package/es/Collapse/interface.js +1 -1
- package/es/Collapse/item.d.ts +7 -7
- package/es/Collapse/item.js +101 -101
- package/es/Collapse/style/index.d.ts +2 -2
- package/es/Collapse/style/index.js +2 -2
- package/es/ColorPicker/colors.d.ts +1 -1
- package/es/ColorPicker/colors.js +24 -24
- package/es/ColorPicker/control-bar.d.ts +12 -12
- package/es/ColorPicker/control-bar.js +36 -36
- package/es/ColorPicker/hooks/useColorPicker.d.ts +30 -30
- package/es/ColorPicker/hooks/useColorPicker.js +94 -94
- package/es/ColorPicker/hooks/useControlBlock.d.ts +11 -11
- package/es/ColorPicker/hooks/useControlBlock.js +71 -71
- package/es/ColorPicker/index.d.ts +5 -5
- package/es/ColorPicker/index.js +59 -59
- package/es/ColorPicker/input-alpha.d.ts +7 -7
- package/es/ColorPicker/input-alpha.js +9 -9
- package/es/ColorPicker/input-hex.d.ts +11 -11
- package/es/ColorPicker/input-hex.js +59 -59
- package/es/ColorPicker/input-rgb.d.ts +10 -10
- package/es/ColorPicker/input-rgb.js +21 -21
- package/es/ColorPicker/interface.d.ts +126 -126
- package/es/ColorPicker/interface.js +1 -1
- package/es/ColorPicker/palette.d.ts +7 -7
- package/es/ColorPicker/palette.js +25 -25
- package/es/ColorPicker/panel.d.ts +20 -20
- package/es/ColorPicker/panel.js +114 -114
- package/es/ColorPicker/style/index.d.ts +4 -4
- package/es/ColorPicker/style/index.js +4 -4
- package/es/Comment/index.d.ts +7 -7
- package/es/Comment/index.js +50 -50
- package/es/Comment/interface.d.ts +41 -41
- package/es/Comment/interface.js +1 -1
- package/es/Comment/style/index.d.ts +2 -2
- package/es/Comment/style/index.js +2 -2
- package/es/ConfigProvider/context.d.ts +4 -4
- package/es/ConfigProvider/context.js +34 -34
- package/es/ConfigProvider/index.d.ts +11 -11
- package/es/ConfigProvider/index.js +98 -98
- package/es/ConfigProvider/interface.d.ts +248 -248
- package/es/ConfigProvider/interface.js +1 -1
- package/es/ConfigProvider/style/index.d.ts +1 -1
- package/es/ConfigProvider/style/index.js +1 -1
- package/es/ConfigProvider/util.d.ts +2 -2
- package/es/ConfigProvider/util.js +118 -118
- package/es/DatePicker/__test__/utils.d.ts +4 -4
- package/es/DatePicker/__test__/utils.js +34 -34
- package/es/DatePicker/context.d.ts +8 -8
- package/es/DatePicker/context.js +2 -2
- package/es/DatePicker/hooks/useCellClassName.d.ts +1 -1
- package/es/DatePicker/hooks/useCellClassName.js +107 -107
- package/es/DatePicker/index.d.ts +4 -4
- package/es/DatePicker/index.js +85 -85
- package/es/DatePicker/interface.d.ts +518 -518
- package/es/DatePicker/interface.js +1 -1
- package/es/DatePicker/panels/body.d.ts +30 -30
- package/es/DatePicker/panels/body.js +44 -44
- package/es/DatePicker/panels/date/index.d.ts +24 -24
- package/es/DatePicker/panels/date/index.js +159 -159
- package/es/DatePicker/panels/footer.d.ts +1 -1
- package/es/DatePicker/panels/footer.js +20 -20
- package/es/DatePicker/panels/header.d.ts +20 -20
- package/es/DatePicker/panels/header.js +54 -54
- package/es/DatePicker/panels/month/index.d.ts +17 -17
- package/es/DatePicker/panels/month/index.js +84 -84
- package/es/DatePicker/panels/quarter/index.d.ts +17 -17
- package/es/DatePicker/panels/quarter/index.js +64 -64
- package/es/DatePicker/panels/range/index.d.ts +28 -28
- package/es/DatePicker/panels/range/index.js +146 -146
- package/es/DatePicker/panels/shortcuts.d.ts +4 -4
- package/es/DatePicker/panels/shortcuts.js +25 -25
- package/es/DatePicker/panels/week/index.d.ts +16 -16
- package/es/DatePicker/panels/week/index.js +37 -37
- package/es/DatePicker/panels/week-list.d.ts +8 -8
- package/es/DatePicker/panels/week-list.js +12 -12
- package/es/DatePicker/panels/year/index.d.ts +16 -16
- package/es/DatePicker/panels/year/index.js +64 -64
- package/es/DatePicker/picker-range.d.ts +4 -4
- package/es/DatePicker/picker-range.js +685 -685
- package/es/DatePicker/picker.d.ts +18 -18
- package/es/DatePicker/picker.js +403 -403
- package/es/DatePicker/style/index.d.ts +7 -7
- package/es/DatePicker/style/index.js +7 -7
- package/es/DatePicker/util.d.ts +9 -9
- package/es/DatePicker/util.js +96 -96
- package/es/Descriptions/index.d.ts +7 -7
- package/es/Descriptions/index.js +151 -151
- package/es/Descriptions/interface.d.ts +79 -79
- package/es/Descriptions/interface.js +1 -1
- package/es/Descriptions/style/index.d.ts +2 -2
- package/es/Descriptions/style/index.js +2 -2
- package/es/Divider/index.d.ts +5 -5
- package/es/Divider/index.js +45 -45
- package/es/Divider/interface.d.ts +21 -21
- package/es/Divider/interface.js +1 -1
- package/es/Divider/style/index.d.ts +2 -2
- package/es/Divider/style/index.js +2 -2
- package/es/Drawer/index.d.ts +5 -5
- package/es/Drawer/index.js +201 -201
- package/es/Drawer/interface.d.ts +185 -185
- package/es/Drawer/interface.js +1 -1
- package/es/Drawer/style/index.d.ts +3 -3
- package/es/Drawer/style/index.js +3 -3
- package/es/Dropdown/button.d.ts +5 -5
- package/es/Dropdown/button.js +72 -72
- package/es/Dropdown/index.d.ts +8 -8
- package/es/Dropdown/index.js +170 -170
- package/es/Dropdown/interface.d.ts +109 -109
- package/es/Dropdown/interface.js +1 -1
- package/es/Dropdown/style/index.d.ts +4 -4
- package/es/Dropdown/style/index.js +4 -4
- package/es/Empty/index.d.ts +5 -5
- package/es/Empty/index.js +43 -43
- package/es/Empty/interface.d.ts +23 -23
- package/es/Empty/interface.js +1 -1
- package/es/Empty/style/index.d.ts +2 -2
- package/es/Empty/style/index.js +2 -2
- package/es/Form/context.d.ts +14 -14
- package/es/Form/context.js +37 -37
- package/es/Form/control.d.ts +66 -66
- package/es/Form/control.js +434 -434
- package/es/Form/form-item.d.ts +7 -7
- package/es/Form/form-item.js +263 -263
- package/es/Form/form-label.d.ts +9 -9
- package/es/Form/form-label.js +72 -72
- package/es/Form/form-list.d.ts +6 -6
- package/es/Form/form-list.js +148 -148
- package/es/Form/form-provider.d.ts +4 -4
- package/es/Form/form-provider.js +33 -33
- package/es/Form/form.d.ts +8 -8
- package/es/Form/form.js +159 -159
- package/es/Form/hooks/useContext.d.ts +10 -10
- package/es/Form/hooks/useContext.js +42 -42
- package/es/Form/hooks/useState.d.ts +3 -3
- package/es/Form/hooks/useState.js +56 -56
- package/es/Form/hooks/useWatch.d.ts +3 -3
- package/es/Form/hooks/useWatch.js +63 -63
- package/es/Form/index.d.ts +24 -24
- package/es/Form/index.js +19 -19
- package/es/Form/interface.d.ts +533 -533
- package/es/Form/interface.js +15 -15
- package/es/Form/promisify.d.ts +2 -2
- package/es/Form/promisify.js +50 -50
- package/es/Form/store.d.ts +95 -95
- package/es/Form/store.js +526 -526
- package/es/Form/style/index.d.ts +3 -3
- package/es/Form/style/index.js +3 -3
- package/es/Form/useForm.d.ts +3 -3
- package/es/Form/useForm.js +57 -57
- package/es/Form/utils.d.ts +14 -14
- package/es/Form/utils.js +198 -198
- package/es/Grid/col.d.ts +5 -5
- package/es/Grid/col.js +93 -93
- package/es/Grid/context.d.ts +20 -20
- package/es/Grid/context.js +4 -4
- package/es/Grid/grid-item.d.ts +7 -7
- package/es/Grid/grid-item.js +91 -91
- package/es/Grid/grid.d.ts +5 -5
- package/es/Grid/grid.js +134 -134
- package/es/Grid/hooks/useResponsiveState.d.ts +2 -2
- package/es/Grid/hooks/useResponsiveState.js +63 -63
- package/es/Grid/index.d.ts +11 -11
- package/es/Grid/index.js +9 -9
- package/es/Grid/interface.d.ts +239 -239
- package/es/Grid/interface.js +1 -1
- package/es/Grid/row.d.ts +5 -5
- package/es/Grid/row.js +121 -121
- package/es/Grid/style/index.d.ts +2 -2
- package/es/Grid/style/index.js +2 -2
- package/es/Grid/utils.d.ts +11 -11
- package/es/Grid/utils.js +51 -51
- package/es/Icon/addFromIconFontCn.d.ts +9 -9
- package/es/Icon/addFromIconFontCn.js +57 -57
- package/es/Icon/index.d.ts +25 -25
- package/es/Icon/index.js +72 -72
- package/es/Image/image-footer.d.ts +13 -13
- package/es/Image/image-footer.js +50 -50
- package/es/Image/image-preview-arrow.d.ts +9 -9
- package/es/Image/image-preview-arrow.js +30 -30
- package/es/Image/image-preview-group.d.ts +10 -10
- package/es/Image/image-preview-group.js +173 -173
- package/es/Image/image-preview-toolbar.d.ts +14 -14
- package/es/Image/image-preview-toolbar.js +111 -111
- package/es/Image/image-preview.d.ts +7 -7
- package/es/Image/image-preview.js +451 -451
- package/es/Image/image.d.ts +11 -11
- package/es/Image/image.js +195 -195
- package/es/Image/index.d.ts +3 -3
- package/es/Image/index.js +2 -2
- package/es/Image/interface.d.ts +274 -274
- package/es/Image/interface.js +1 -1
- package/es/Image/previewGroupContext.d.ts +25 -25
- package/es/Image/previewGroupContext.js +14 -14
- package/es/Image/style/index.d.ts +2 -2
- package/es/Image/style/index.js +2 -2
- package/es/Image/trigger-for-toolbar.d.ts +10 -10
- package/es/Image/trigger-for-toolbar.js +8 -8
- package/es/Image/utils/getFixTranslate.d.ts +1 -1
- package/es/Image/utils/getFixTranslate.js +39 -39
- package/es/Image/utils/getScale.d.ts +13 -13
- package/es/Image/utils/getScale.js +80 -80
- package/es/Image/utils/hooks/useImageStatus.d.ts +11 -11
- package/es/Image/utils/hooks/useImageStatus.js +34 -34
- package/es/Image/utils/hooks/useShowFooter.d.ts +8 -8
- package/es/Image/utils/hooks/useShowFooter.js +7 -7
- package/es/Input/autoSizeTextAreaHeight.d.ts +5 -5
- package/es/Input/autoSizeTextAreaHeight.js +99 -99
- package/es/Input/group.d.ts +7 -7
- package/es/Input/group.js +37 -37
- package/es/Input/index.d.ts +7 -7
- package/es/Input/index.js +2 -2
- package/es/Input/input-element.d.ts +4 -4
- package/es/Input/input-element.js +227 -227
- package/es/Input/input.d.ts +17 -17
- package/es/Input/input.js +154 -154
- package/es/Input/interface.d.ts +325 -325
- package/es/Input/interface.js +1 -1
- package/es/Input/password.d.ts +5 -5
- package/es/Input/password.js +93 -93
- package/es/Input/search.d.ts +5 -5
- package/es/Input/search.js +77 -77
- package/es/Input/style/index.d.ts +3 -3
- package/es/Input/style/index.js +3 -3
- package/es/Input/textarea.d.ts +12 -12
- package/es/Input/textarea.js +169 -169
- package/es/Input/useComposition.d.ts +17 -17
- package/es/Input/useComposition.js +72 -72
- package/es/InputNumber/Decimal.d.ts +21 -21
- package/es/InputNumber/Decimal.js +194 -194
- package/es/InputNumber/index.d.ts +6 -6
- package/es/InputNumber/index.js +248 -248
- package/es/InputNumber/interface.d.ts +141 -141
- package/es/InputNumber/interface.js +1 -1
- package/es/InputNumber/style/index.d.ts +3 -3
- package/es/InputNumber/style/index.js +3 -3
- package/es/InputNumber/useSelectionRange.d.ts +4 -4
- package/es/InputNumber/useSelectionRange.js +26 -26
- package/es/InputNumber/utils.d.ts +28 -28
- package/es/InputNumber/utils.js +113 -113
- package/es/InputTag/index.d.ts +3 -3
- package/es/InputTag/index.js +2 -2
- package/es/InputTag/input-tag.d.ts +9 -9
- package/es/InputTag/input-tag.js +503 -503
- package/es/InputTag/interface.d.ts +215 -215
- package/es/InputTag/interface.js +1 -1
- package/es/InputTag/style/index.d.ts +3 -3
- package/es/InputTag/style/index.js +3 -3
- package/es/Layout/content.d.ts +4 -4
- package/es/Layout/content.js +35 -35
- package/es/Layout/footer.d.ts +4 -4
- package/es/Layout/footer.js +35 -35
- package/es/Layout/header.d.ts +4 -4
- package/es/Layout/header.js +35 -35
- package/es/Layout/index.d.ts +17 -17
- package/es/Layout/index.js +87 -87
- package/es/Layout/interface.d.ts +121 -121
- package/es/Layout/interface.js +1 -1
- package/es/Layout/sider.d.ts +10 -10
- package/es/Layout/sider.js +143 -143
- package/es/Layout/style/index.d.ts +4 -4
- package/es/Layout/style/index.js +4 -4
- package/es/Link/index.d.ts +5 -5
- package/es/Link/index.js +63 -63
- package/es/Link/interface.d.ts +30 -30
- package/es/Link/interface.js +1 -1
- package/es/Link/style/index.d.ts +2 -2
- package/es/Link/style/index.js +2 -2
- package/es/List/index.d.ts +12 -12
- package/es/List/index.js +232 -232
- package/es/List/interface.d.ts +192 -192
- package/es/List/interface.js +1 -1
- package/es/List/item.d.ts +7 -7
- package/es/List/item.js +62 -62
- package/es/List/meta.d.ts +4 -4
- package/es/List/meta.js +41 -41
- package/es/List/style/index.d.ts +6 -6
- package/es/List/style/index.js +6 -6
- package/es/Mentions/index.d.ts +5 -5
- package/es/Mentions/index.js +152 -152
- package/es/Mentions/interface.d.ts +92 -92
- package/es/Mentions/interface.js +1 -1
- package/es/Mentions/style/index.d.ts +2 -2
- package/es/Mentions/style/index.js +2 -2
- package/es/Mentions/utils.d.ts +9 -9
- package/es/Mentions/utils.js +21 -21
- package/es/Menu/context.d.ts +16 -16
- package/es/Menu/context.js +3 -3
- package/es/Menu/indent.d.ts +5 -5
- package/es/Menu/indent.js +35 -35
- package/es/Menu/index.d.ts +13 -13
- package/es/Menu/index.js +202 -202
- package/es/Menu/interface.d.ts +233 -233
- package/es/Menu/interface.js +1 -1
- package/es/Menu/item-group.d.ts +6 -6
- package/es/Menu/item-group.js +21 -21
- package/es/Menu/item.d.ts +6 -6
- package/es/Menu/item.js +84 -84
- package/es/Menu/overflow-wrap.d.ts +9 -9
- package/es/Menu/overflow-wrap.js +131 -131
- package/es/Menu/style/index.d.ts +4 -4
- package/es/Menu/style/index.js +4 -4
- package/es/Menu/sub-menu/index.d.ts +6 -6
- package/es/Menu/sub-menu/index.js +34 -34
- package/es/Menu/sub-menu/inline.d.ts +5 -5
- package/es/Menu/sub-menu/inline.js +154 -154
- package/es/Menu/sub-menu/pop.d.ts +5 -5
- package/es/Menu/sub-menu/pop.js +99 -99
- package/es/Menu/util.d.ts +16 -16
- package/es/Menu/util.js +134 -134
- package/es/Message/index.d.ts +30 -30
- package/es/Message/index.js +189 -189
- package/es/Message/interface.d.ts +83 -83
- package/es/Message/interface.js +1 -1
- package/es/Message/style/index.d.ts +2 -2
- package/es/Message/style/index.js +2 -2
- package/es/Message/useMessage.d.ts +5 -5
- package/es/Message/useMessage.js +71 -71
- package/es/Modal/config.d.ts +10 -10
- package/es/Modal/config.js +28 -28
- package/es/Modal/confirm.d.ts +14 -14
- package/es/Modal/confirm.js +142 -142
- package/es/Modal/index.d.ts +2 -2
- package/es/Modal/index.js +2 -2
- package/es/Modal/interface.d.ts +190 -190
- package/es/Modal/interface.js +1 -1
- package/es/Modal/modal.d.ts +18 -18
- package/es/Modal/modal.js +324 -324
- package/es/Modal/style/index.d.ts +3 -3
- package/es/Modal/style/index.js +3 -3
- package/es/Modal/useModal/hookModal.d.ts +8 -8
- package/es/Modal/useModal/hookModal.js +62 -62
- package/es/Modal/useModal/index.d.ts +4 -4
- package/es/Modal/useModal/index.js +63 -63
- package/es/Notification/index.d.ts +26 -26
- package/es/Notification/index.js +204 -204
- package/es/Notification/interface.d.ts +77 -77
- package/es/Notification/interface.js +1 -1
- package/es/Notification/style/index.d.ts +2 -2
- package/es/Notification/style/index.js +2 -2
- package/es/Notification/useNotification.d.ts +5 -5
- package/es/Notification/useNotification.js +68 -68
- package/es/PageHeader/index.d.ts +8 -8
- package/es/PageHeader/index.js +90 -90
- package/es/PageHeader/interface.d.ts +44 -44
- package/es/PageHeader/interface.js +1 -1
- package/es/PageHeader/style/index.d.ts +3 -3
- package/es/PageHeader/style/index.js +3 -3
- package/es/Pagination/index.d.ts +3 -3
- package/es/Pagination/index.js +2 -2
- package/es/Pagination/interface.d.ts +133 -133
- package/es/Pagination/interface.js +1 -1
- package/es/Pagination/page-item.d.ts +62 -62
- package/es/Pagination/page-item.js +143 -143
- package/es/Pagination/page-jumper.d.ts +13 -13
- package/es/Pagination/page-jumper.js +84 -84
- package/es/Pagination/page-options.d.ts +13 -13
- package/es/Pagination/page-options.js +29 -29
- package/es/Pagination/pagination.d.ts +11 -11
- package/es/Pagination/pagination.js +252 -252
- package/es/Pagination/style/index.d.ts +4 -4
- package/es/Pagination/style/index.js +4 -4
- package/es/Popconfirm/index.d.ts +7 -7
- package/es/Popconfirm/index.js +131 -131
- package/es/Popconfirm/interface.d.ts +128 -128
- package/es/Popconfirm/interface.js +1 -1
- package/es/Popconfirm/style/index.d.ts +5 -5
- package/es/Popconfirm/style/index.js +5 -5
- package/es/Popover/index.d.ts +7 -7
- package/es/Popover/index.js +49 -49
- package/es/Popover/interface.d.ts +20 -20
- package/es/Popover/interface.js +1 -1
- package/es/Popover/style/index.d.ts +3 -3
- package/es/Popover/style/index.js +3 -3
- package/es/Portal/Portal.d.ts +15 -15
- package/es/Portal/Portal.js +57 -57
- package/es/Portal/index.d.ts +19 -19
- package/es/Portal/index.js +48 -48
- package/es/Progress/circle-progress.d.ts +8 -8
- package/es/Progress/circle-progress.js +68 -68
- package/es/Progress/index.d.ts +5 -5
- package/es/Progress/index.js +71 -71
- package/es/Progress/interface.d.ts +87 -87
- package/es/Progress/interface.js +1 -1
- package/es/Progress/line-progess.d.ts +2 -2
- package/es/Progress/line-progess.js +62 -62
- package/es/Progress/steps-progress.d.ts +2 -2
- package/es/Progress/steps-progress.js +62 -62
- package/es/Progress/style/index.d.ts +3 -3
- package/es/Progress/style/index.js +3 -3
- package/es/Radio/group.d.ts +10 -10
- package/es/Radio/group.js +97 -97
- package/es/Radio/index.d.ts +5 -5
- package/es/Radio/index.js +3 -3
- package/es/Radio/interface.d.ts +103 -103
- package/es/Radio/interface.js +1 -1
- package/es/Radio/radio.d.ts +11 -11
- package/es/Radio/radio.js +107 -107
- package/es/Radio/style/index.d.ts +2 -2
- package/es/Radio/style/index.js +2 -2
- package/es/Rate/index.d.ts +5 -5
- package/es/Rate/index.js +161 -161
- package/es/Rate/interface.d.ts +70 -70
- package/es/Rate/interface.js +1 -1
- package/es/Rate/style/index.d.ts +3 -3
- package/es/Rate/style/index.js +3 -3
- package/es/ResizeBox/index.d.ts +13 -13
- package/es/ResizeBox/index.js +225 -225
- package/es/ResizeBox/interface.d.ts +264 -264
- package/es/ResizeBox/interface.js +1 -1
- package/es/ResizeBox/resize-trigger.d.ts +30 -30
- package/es/ResizeBox/resize-trigger.js +91 -91
- package/es/ResizeBox/split-group.d.ts +4 -4
- package/es/ResizeBox/split-group.js +321 -321
- package/es/ResizeBox/split.d.ts +5 -5
- package/es/ResizeBox/split.js +150 -150
- package/es/ResizeBox/style/index.d.ts +2 -2
- package/es/ResizeBox/style/index.js +2 -2
- package/es/Result/403.d.ts +1 -1
- package/es/Result/403.js +160 -160
- package/es/Result/404.d.ts +1 -1
- package/es/Result/404.js +126 -126
- package/es/Result/500.d.ts +1 -1
- package/es/Result/500.js +164 -164
- package/es/Result/index.d.ts +7 -7
- package/es/Result/index.js +69 -69
- package/es/Result/interface.d.ts +35 -35
- package/es/Result/interface.js +1 -1
- package/es/Result/style/index.d.ts +2 -2
- package/es/Result/style/index.js +2 -2
- package/es/Select/index.d.ts +3 -3
- package/es/Select/index.js +2 -2
- package/es/Select/interface.d.ts +315 -315
- package/es/Select/interface.js +1 -1
- package/es/Select/opt-group.d.ts +6 -6
- package/es/Select/opt-group.js +32 -32
- package/es/Select/option.d.ts +6 -6
- package/es/Select/option.js +73 -73
- package/es/Select/select.d.ts +10 -10
- package/es/Select/select.js +672 -672
- package/es/Select/style/index.d.ts +6 -6
- package/es/Select/style/index.js +6 -6
- package/es/Select/utils.d.ts +26 -26
- package/es/Select/utils.js +189 -189
- package/es/Skeleton/image.d.ts +2 -2
- package/es/Skeleton/image.js +12 -12
- package/es/Skeleton/index.d.ts +7 -7
- package/es/Skeleton/index.js +54 -54
- package/es/Skeleton/interface.d.ts +50 -50
- package/es/Skeleton/interface.js +1 -1
- package/es/Skeleton/style/index.d.ts +2 -2
- package/es/Skeleton/style/index.js +2 -2
- package/es/Skeleton/text.d.ts +2 -2
- package/es/Skeleton/text.js +21 -21
- package/es/Slider/button.d.ts +21 -21
- package/es/Slider/button.js +178 -178
- package/es/Slider/dots.d.ts +17 -17
- package/es/Slider/dots.js +33 -33
- package/es/Slider/hooks/useInterval.d.ts +24 -24
- package/es/Slider/hooks/useInterval.js +125 -125
- package/es/Slider/hooks/useLegalValue.d.ts +15 -15
- package/es/Slider/hooks/useLegalValue.js +107 -107
- package/es/Slider/index.d.ts +5 -5
- package/es/Slider/index.js +351 -351
- package/es/Slider/input.d.ts +15 -15
- package/es/Slider/input.js +81 -81
- package/es/Slider/interface.d.ts +122 -122
- package/es/Slider/interface.js +1 -1
- package/es/Slider/marks.d.ts +16 -16
- package/es/Slider/marks.js +26 -26
- package/es/Slider/style/index.d.ts +5 -5
- package/es/Slider/style/index.js +5 -5
- package/es/Slider/ticks.d.ts +13 -13
- package/es/Slider/ticks.js +29 -29
- package/es/Slider/utils.d.ts +11 -11
- package/es/Slider/utils.js +86 -86
- package/es/Space/index.d.ts +5 -5
- package/es/Space/index.js +115 -115
- package/es/Space/interface.d.ts +38 -38
- package/es/Space/interface.js +1 -1
- package/es/Space/style/index.d.ts +2 -2
- package/es/Space/style/index.js +2 -2
- package/es/Space/toArray.d.ts +1 -1
- package/es/Space/toArray.js +14 -14
- package/es/Spin/dot-loading.d.ts +5 -5
- package/es/Spin/dot-loading.js +43 -43
- package/es/Spin/index.d.ts +5 -5
- package/es/Spin/index.js +86 -86
- package/es/Spin/interface.d.ts +50 -50
- package/es/Spin/interface.js +1 -1
- package/es/Spin/style/index.d.ts +2 -2
- package/es/Spin/style/index.js +2 -2
- package/es/Statistic/countdown.d.ts +5 -5
- package/es/Statistic/countdown.js +68 -68
- package/es/Statistic/index.d.ts +8 -8
- package/es/Statistic/index.js +150 -150
- package/es/Statistic/interface.d.ts +139 -139
- package/es/Statistic/interface.js +1 -1
- package/es/Statistic/style/index.d.ts +3 -3
- package/es/Statistic/style/index.js +3 -3
- package/es/Statistic/util.d.ts +1 -1
- package/es/Statistic/util.js +42 -42
- package/es/Steps/index.d.ts +8 -8
- package/es/Steps/index.js +69 -69
- package/es/Steps/interface.d.ts +124 -124
- package/es/Steps/interface.js +1 -1
- package/es/Steps/step.d.ts +5 -5
- package/es/Steps/step.js +72 -72
- package/es/Steps/style/index.d.ts +2 -2
- package/es/Steps/style/index.js +2 -2
- package/es/Switch/index.d.ts +10 -10
- package/es/Switch/index.js +112 -112
- package/es/Switch/interface.d.ts +65 -65
- package/es/Switch/interface.js +1 -1
- package/es/Switch/style/index.d.ts +2 -2
- package/es/Switch/style/index.js +2 -2
- package/es/Table/__test__/common/columns.d.ts +11 -11
- package/es/Table/__test__/common/columns.js +193 -193
- package/es/Table/__test__/common/data.d.ts +29 -29
- package/es/Table/__test__/common/data.js +139 -139
- package/es/Table/colgroup.d.ts +13 -13
- package/es/Table/colgroup.js +46 -46
- package/es/Table/constant.d.ts +2 -2
- package/es/Table/constant.js +2 -2
- package/es/Table/hooks/useColumns.d.ts +3 -3
- package/es/Table/hooks/useColumns.js +191 -191
- package/es/Table/hooks/useComponent.d.ts +30 -30
- package/es/Table/hooks/useComponent.js +64 -64
- package/es/Table/hooks/useExpand.d.ts +3 -3
- package/es/Table/hooks/useExpand.js +66 -66
- package/es/Table/hooks/useRowSelection.d.ts +12 -12
- package/es/Table/hooks/useRowSelection.js +158 -158
- package/es/Table/hooks/useSorter.d.ts +7 -7
- package/es/Table/hooks/useSorter.js +122 -122
- package/es/Table/hooks/useStickyClassNames.d.ts +3 -3
- package/es/Table/hooks/useStickyClassNames.js +38 -38
- package/es/Table/hooks/useStickyOffsets.d.ts +3 -3
- package/es/Table/hooks/useStickyOffsets.js +66 -66
- package/es/Table/index.d.ts +8 -8
- package/es/Table/index.js +5 -5
- package/es/Table/interface.d.ts +704 -704
- package/es/Table/interface.js +1 -1
- package/es/Table/style/index.d.ts +11 -11
- package/es/Table/style/index.js +11 -11
- package/es/Table/summary/cell.d.ts +12 -12
- package/es/Table/summary/cell.js +30 -30
- package/es/Table/summary/context.d.ts +10 -10
- package/es/Table/summary/context.js +2 -2
- package/es/Table/summary/index.d.ts +8 -8
- package/es/Table/summary/index.js +8 -8
- package/es/Table/summary/row.d.ts +7 -7
- package/es/Table/summary/row.js +56 -56
- package/es/Table/table.d.ts +10 -10
- package/es/Table/table.js +701 -701
- package/es/Table/tbody/index.d.ts +3 -3
- package/es/Table/tbody/index.js +119 -119
- package/es/Table/tbody/td.d.ts +25 -25
- package/es/Table/tbody/td.js +117 -117
- package/es/Table/tbody/tr.d.ts +16 -16
- package/es/Table/tbody/tr.js +140 -140
- package/es/Table/tfoot/index.d.ts +3 -3
- package/es/Table/tfoot/index.js +9 -9
- package/es/Table/thead/column.d.ts +3 -3
- package/es/Table/thead/column.js +220 -220
- package/es/Table/thead/index.d.ts +3 -3
- package/es/Table/thead/index.js +91 -91
- package/es/Table/utils.d.ts +17 -17
- package/es/Table/utils.js +211 -211
- package/es/Tabs/hook/useDomSize.d.ts +11 -11
- package/es/Tabs/hook/useDomSize.js +34 -34
- package/es/Tabs/hook/useHeaderScroll.d.ts +9 -9
- package/es/Tabs/hook/useHeaderScroll.js +86 -86
- package/es/Tabs/index.d.ts +4 -4
- package/es/Tabs/index.js +2 -2
- package/es/Tabs/interface.d.ts +213 -213
- package/es/Tabs/interface.js +1 -1
- package/es/Tabs/style/index.d.ts +3 -3
- package/es/Tabs/style/index.js +3 -3
- package/es/Tabs/tab-content.d.ts +9 -9
- package/es/Tabs/tab-content.js +34 -34
- package/es/Tabs/tab-header/dropdown-icon.d.ts +1 -1
- package/es/Tabs/tab-header/dropdown-icon.js +54 -54
- package/es/Tabs/tab-header/index.d.ts +4 -4
- package/es/Tabs/tab-header/index.js +305 -305
- package/es/Tabs/tab-header/tab-ink.d.ts +11 -11
- package/es/Tabs/tab-header/tab-ink.js +58 -58
- package/es/Tabs/tab-header/tab-nav-icon.d.ts +17 -17
- package/es/Tabs/tab-header/tab-nav-icon.js +79 -79
- package/es/Tabs/tab-header/tab-title.d.ts +17 -17
- package/es/Tabs/tab-header/tab-title.js +56 -56
- package/es/Tabs/tab-pane.d.ts +8 -8
- package/es/Tabs/tab-pane.js +38 -38
- package/es/Tabs/tabs.d.ts +18 -18
- package/es/Tabs/tabs.js +153 -153
- package/es/Tabs/utils.d.ts +12 -12
- package/es/Tabs/utils.js +37 -37
- package/es/Tag/index.d.ts +5 -5
- package/es/Tag/index.js +135 -135
- package/es/Tag/interface.d.ts +72 -72
- package/es/Tag/interface.js +1 -1
- package/es/Tag/style/index.d.ts +2 -2
- package/es/Tag/style/index.js +2 -2
- package/es/TimePicker/context.d.ts +7 -7
- package/es/TimePicker/context.js +2 -2
- package/es/TimePicker/index.d.ts +4 -4
- package/es/TimePicker/index.js +49 -49
- package/es/TimePicker/interface.d.ts +244 -244
- package/es/TimePicker/interface.js +1 -1
- package/es/TimePicker/picker.d.ts +15 -15
- package/es/TimePicker/picker.js +223 -223
- package/es/TimePicker/range-picker.d.ts +12 -12
- package/es/TimePicker/range-picker.js +56 -56
- package/es/TimePicker/style/index.d.ts +5 -5
- package/es/TimePicker/style/index.js +5 -5
- package/es/TimePicker/time-column.d.ts +17 -17
- package/es/TimePicker/time-column.js +55 -55
- package/es/TimePicker/time-picker.d.ts +24 -24
- package/es/TimePicker/time-picker.js +236 -236
- package/es/TimePicker/util.d.ts +7 -7
- package/es/TimePicker/util.js +55 -55
- package/es/Timeline/index.d.ts +3 -3
- package/es/Timeline/index.js +2 -2
- package/es/Timeline/interface.d.ts +95 -95
- package/es/Timeline/interface.js +1 -1
- package/es/Timeline/item.d.ts +7 -7
- package/es/Timeline/item.js +67 -67
- package/es/Timeline/style/index.d.ts +2 -2
- package/es/Timeline/style/index.js +2 -2
- package/es/Timeline/timeline.d.ts +10 -10
- package/es/Timeline/timeline.js +97 -97
- package/es/Tooltip/index.d.ts +10 -10
- package/es/Tooltip/index.js +90 -90
- package/es/Tooltip/interface.d.ts +92 -92
- package/es/Tooltip/interface.js +1 -1
- package/es/Tooltip/style/index.d.ts +3 -3
- package/es/Tooltip/style/index.js +3 -3
- package/es/Transfer/index.d.ts +5 -5
- package/es/Transfer/index.js +223 -223
- package/es/Transfer/interface.d.ts +225 -225
- package/es/Transfer/interface.js +1 -1
- package/es/Transfer/item.d.ts +3 -3
- package/es/Transfer/item.js +117 -117
- package/es/Transfer/list.d.ts +5 -5
- package/es/Transfer/list.js +152 -152
- package/es/Transfer/style/index.d.ts +6 -6
- package/es/Transfer/style/index.js +6 -6
- package/es/Tree/animation.d.ts +7 -7
- package/es/Tree/animation.js +119 -119
- package/es/Tree/context.d.ts +27 -27
- package/es/Tree/context.js +2 -2
- package/es/Tree/index.d.ts +73 -73
- package/es/Tree/index.js +750 -750
- package/es/Tree/interface.d.ts +344 -344
- package/es/Tree/interface.js +1 -1
- package/es/Tree/node-list.d.ts +3 -3
- package/es/Tree/node-list.js +125 -125
- package/es/Tree/node.d.ts +12 -12
- package/es/Tree/node.js +268 -268
- package/es/Tree/style/index.d.ts +3 -3
- package/es/Tree/style/index.js +3 -3
- package/es/Tree/util.d.ts +13 -13
- package/es/Tree/util.js +169 -169
- package/es/TreeSelect/hook/useKeyCache.d.ts +6 -6
- package/es/TreeSelect/hook/useKeyCache.js +83 -83
- package/es/TreeSelect/hook/useStateValue.d.ts +19 -19
- package/es/TreeSelect/hook/useStateValue.js +139 -139
- package/es/TreeSelect/hook/useTreeData.d.ts +3 -3
- package/es/TreeSelect/hook/useTreeData.js +33 -33
- package/es/TreeSelect/index.d.ts +4 -4
- package/es/TreeSelect/index.js +2 -2
- package/es/TreeSelect/interface.d.ts +211 -211
- package/es/TreeSelect/interface.js +10 -10
- package/es/TreeSelect/style/index.d.ts +5 -5
- package/es/TreeSelect/style/index.js +5 -5
- package/es/TreeSelect/tree-list.d.ts +12 -12
- package/es/TreeSelect/tree-list.js +144 -144
- package/es/TreeSelect/tree-select.d.ts +12 -12
- package/es/TreeSelect/tree-select.js +343 -343
- package/es/TreeSelect/utils.d.ts +1 -1
- package/es/TreeSelect/utils.js +13 -13
- package/es/Trigger/getPopupStyle.d.ts +20 -20
- package/es/Trigger/getPopupStyle.js +394 -394
- package/es/Trigger/index.d.ts +123 -123
- package/es/Trigger/index.js +917 -917
- package/es/Trigger/interface.d.ts +246 -246
- package/es/Trigger/interface.js +1 -1
- package/es/Trigger/portal.d.ts +8 -8
- package/es/Trigger/portal.js +24 -24
- package/es/Trigger/style/index.d.ts +2 -2
- package/es/Trigger/style/index.js +2 -2
- package/es/Typography/base.d.ts +6 -6
- package/es/Typography/base.js +217 -217
- package/es/Typography/edit-content.d.ts +4 -4
- package/es/Typography/edit-content.js +30 -30
- package/es/Typography/ellipsis.d.ts +6 -6
- package/es/Typography/ellipsis.js +204 -204
- package/es/Typography/index.d.ts +13 -13
- package/es/Typography/index.js +11 -11
- package/es/Typography/interface.d.ts +262 -262
- package/es/Typography/interface.js +1 -1
- package/es/Typography/operations.d.ts +3 -3
- package/es/Typography/operations.js +88 -88
- package/es/Typography/paragraph.d.ts +4 -4
- package/es/Typography/paragraph.js +25 -25
- package/es/Typography/style/index.d.ts +5 -5
- package/es/Typography/style/index.js +5 -5
- package/es/Typography/text.d.ts +3 -3
- package/es/Typography/text.js +19 -19
- package/es/Typography/title.d.ts +4 -4
- package/es/Typography/title.js +31 -31
- package/es/Typography/typography.d.ts +4 -4
- package/es/Typography/typography.js +13 -13
- package/es/Typography/useCssEllipsis.d.ts +6 -6
- package/es/Typography/useCssEllipsis.js +69 -69
- package/es/Typography/useEllipsis.d.ts +21 -21
- package/es/Typography/useEllipsis.js +217 -217
- package/es/Upload/index.d.ts +3 -3
- package/es/Upload/index.js +2 -2
- package/es/Upload/interface.d.ts +337 -337
- package/es/Upload/interface.js +6 -6
- package/es/Upload/list/index.d.ts +6 -6
- package/es/Upload/list/index.js +125 -125
- package/es/Upload/list/pictureItem.d.ts +9 -9
- package/es/Upload/list/pictureItem.js +57 -57
- package/es/Upload/list/textItem.d.ts +9 -9
- package/es/Upload/list/textItem.js +103 -103
- package/es/Upload/list/uploadProgress.d.ts +14 -14
- package/es/Upload/list/uploadProgress.js +60 -60
- package/es/Upload/request.d.ts +3 -3
- package/es/Upload/request.js +64 -64
- package/es/Upload/style/index.d.ts +6 -6
- package/es/Upload/style/index.js +6 -6
- package/es/Upload/trigger-node.d.ts +6 -6
- package/es/Upload/trigger-node.js +132 -132
- package/es/Upload/upload.d.ts +12 -12
- package/es/Upload/upload.js +225 -225
- package/es/Upload/uploader.d.ts +28 -28
- package/es/Upload/uploader.js +256 -256
- package/es/Upload/util.d.ts +4 -4
- package/es/Upload/util.js +114 -114
- package/es/VerificationCode/index.d.ts +4 -4
- package/es/VerificationCode/index.js +2 -2
- package/es/VerificationCode/interface.d.ts +80 -80
- package/es/VerificationCode/interface.js +1 -1
- package/es/VerificationCode/style/index.d.ts +3 -3
- package/es/VerificationCode/style/index.js +3 -3
- package/es/VerificationCode/verification-code.d.ts +5 -5
- package/es/VerificationCode/verification-code.js +79 -79
- package/es/Watermark/index.d.ts +4 -4
- package/es/Watermark/index.js +2 -2
- package/es/Watermark/interface.d.ts +70 -70
- package/es/Watermark/interface.js +1 -1
- package/es/Watermark/style/index.d.ts +1 -1
- package/es/Watermark/style/index.js +1 -1
- package/es/Watermark/watermark.d.ts +5 -5
- package/es/Watermark/watermark.js +67 -67
- package/es/_class/Draggable/index.d.ts +2 -2
- package/es/_class/Draggable/index.js +35 -35
- package/es/_class/Draggable/interface.d.ts +24 -24
- package/es/_class/Draggable/interface.js +1 -1
- package/es/_class/Draggable/item.d.ts +3 -3
- package/es/_class/Draggable/item.js +88 -88
- package/es/_class/OverflowEllipsis/OverflowItem.d.ts +10 -10
- package/es/_class/OverflowEllipsis/OverflowItem.js +23 -23
- package/es/_class/OverflowEllipsis/index.d.ts +11 -11
- package/es/_class/OverflowEllipsis/index.js +109 -109
- package/es/_class/VirtualList/Filler.d.ts +15 -15
- package/es/_class/VirtualList/Filler.js +30 -30
- package/es/_class/VirtualList/index.d.ts +39 -39
- package/es/_class/VirtualList/index.js +485 -485
- package/es/_class/VirtualList/utils/algorithmUtil.d.ts +23 -23
- package/es/_class/VirtualList/utils/algorithmUtil.js +70 -70
- package/es/_class/VirtualList/utils/itemUtil.d.ts +75 -75
- package/es/_class/VirtualList/utils/itemUtil.js +132 -132
- package/es/_class/icon-hover.d.ts +10 -10
- package/es/_class/icon-hover.js +36 -36
- package/es/_class/notice.d.ts +50 -50
- package/es/_class/notice.js +170 -170
- package/es/_class/notification.d.ts +15 -15
- package/es/_class/notification.js +93 -93
- package/es/_class/picker/input-range.d.ts +35 -35
- package/es/_class/picker/input-range.js +173 -173
- package/es/_class/picker/input.d.ts +31 -31
- package/es/_class/picker/input.js +114 -114
- package/es/_class/select-view.d.ts +158 -158
- package/es/_class/select-view.js +368 -368
- package/es/_hooks/useVerificationCode/index.d.ts +2 -2
- package/es/_hooks/useVerificationCode/index.js +119 -119
- package/es/_hooks/useVerificationCode/interface.d.ts +63 -63
- package/es/_hooks/useVerificationCode/interface.js +1 -1
- package/es/_hooks/useWatermark/index.d.ts +2 -2
- package/es/_hooks/useWatermark/index.js +307 -307
- package/es/_hooks/useWatermark/interface.d.ts +81 -81
- package/es/_hooks/useWatermark/interface.js +1 -1
- package/es/_hooks/useWatermark/utils.d.ts +1 -1
- package/es/_hooks/useWatermark/utils.js +15 -15
- package/es/_util/CSSTransition.d.ts +2 -2
- package/es/_util/CSSTransition.js +85 -85
- package/es/_util/classNames.d.ts +5 -5
- package/es/_util/classNames.js +61 -61
- package/es/_util/clipboard.d.ts +1 -1
- package/es/_util/clipboard.js +83 -83
- package/es/_util/color.d.ts +27 -27
- package/es/_util/color.js +190 -190
- package/es/_util/constant.d.ts +3 -3
- package/es/_util/constant.js +17 -17
- package/es/_util/contextHolder.d.ts +9 -9
- package/es/_util/contextHolder.js +47 -47
- package/es/_util/dayjs.d.ts +21 -21
- package/es/_util/dayjs.js +294 -294
- package/es/_util/dom.d.ts +12 -12
- package/es/_util/dom.js +64 -64
- package/es/_util/fillNBSP.d.ts +1 -1
- package/es/_util/fillNBSP.js +6 -6
- package/es/_util/getHighlightText.d.ts +5 -5
- package/es/_util/getHighlightText.js +32 -32
- package/es/_util/getHotkeyHandler.d.ts +16 -16
- package/es/_util/getHotkeyHandler.js +35 -35
- package/es/_util/getStringLength.d.ts +1 -1
- package/es/_util/getStringLength.js +13 -13
- package/es/_util/hooks/useComputedState.d.ts +4 -4
- package/es/_util/hooks/useComputedState.js +25 -25
- package/es/_util/hooks/useCreate.d.ts +1 -1
- package/es/_util/hooks/useCreate.js +8 -8
- package/es/_util/hooks/useForceUpdate.d.ts +2 -2
- package/es/_util/hooks/useForceUpdate.js +21 -21
- package/es/_util/hooks/useId.d.ts +6 -6
- package/es/_util/hooks/useId.js +33 -33
- package/es/_util/hooks/useInView.d.ts +11 -11
- package/es/_util/hooks/useInView.js +60 -60
- package/es/_util/hooks/useIntersectionObserver.d.ts +7 -7
- package/es/_util/hooks/useIntersectionObserver.js +29 -29
- package/es/_util/hooks/useInterval.d.ts +1 -1
- package/es/_util/hooks/useInterval.js +29 -29
- package/es/_util/hooks/useIsFirstRender.d.ts +1 -1
- package/es/_util/hooks/useIsFirstRender.js +8 -8
- package/es/_util/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/es/_util/hooks/useIsomorphicLayoutEffect.js +6 -6
- package/es/_util/hooks/useKeyboardEvent.d.ts +14 -14
- package/es/_util/hooks/useKeyboardEvent.js +29 -29
- package/es/_util/hooks/useMergeProps.d.ts +4 -4
- package/es/_util/hooks/useMergeProps.js +31 -31
- package/es/_util/hooks/useMergeValue.d.ts +5 -5
- package/es/_util/hooks/useMergeValue.js +44 -44
- package/es/_util/hooks/useOverflowHidden.d.ts +5 -5
- package/es/_util/hooks/useOverflowHidden.js +43 -43
- package/es/_util/hooks/useOverrideRef.d.ts +5 -5
- package/es/_util/hooks/useOverrideRef.js +18 -18
- package/es/_util/hooks/usePersistCallback.d.ts +1 -1
- package/es/_util/hooks/usePersistCallback.js +40 -40
- package/es/_util/hooks/usePrevious.d.ts +2 -2
- package/es/_util/hooks/usePrevious.js +8 -8
- package/es/_util/hooks/useRefs.d.ts +1 -1
- package/es/_util/hooks/useRefs.js +15 -15
- package/es/_util/hooks/useResizeObserver.d.ts +6 -6
- package/es/_util/hooks/useResizeObserver.js +25 -25
- package/es/_util/hooks/useStateCallback.d.ts +5 -5
- package/es/_util/hooks/useStateCallback.js +30 -30
- package/es/_util/hooks/useStateWithPromise.d.ts +2 -2
- package/es/_util/hooks/useStateWithPromise.js +47 -47
- package/es/_util/hooks/useUpdate.d.ts +2 -2
- package/es/_util/hooks/useUpdate.js +13 -13
- package/es/_util/hooks/useWatch.d.ts +2 -2
- package/es/_util/hooks/useWatch.js +10 -10
- package/es/_util/include.d.ts +1 -1
- package/es/_util/include.js +10 -10
- package/es/_util/is.d.ts +27 -27
- package/es/_util/is.js +131 -131
- package/es/_util/keycode.d.ts +36 -36
- package/es/_util/keycode.js +37 -37
- package/es/_util/mergeProps.d.ts +1 -1
- package/es/_util/mergeProps.js +23 -23
- package/es/_util/mergedToString.d.ts +2 -2
- package/es/_util/mergedToString.js +20 -20
- package/es/_util/omit.d.ts +1 -1
- package/es/_util/omit.js +22 -22
- package/es/_util/pad.d.ts +2 -2
- package/es/_util/pad.js +18 -18
- package/es/_util/pick.d.ts +4 -4
- package/es/_util/pick.js +25 -25
- package/es/_util/raf.d.ts +3 -3
- package/es/_util/raf.js +29 -29
- package/es/_util/react-dom.d.ts +13 -13
- package/es/_util/react-dom.js +105 -105
- package/es/_util/resizeObserver.d.ts +21 -21
- package/es/_util/resizeObserver.js +90 -90
- package/es/_util/responsiveObserve.d.ts +15 -15
- package/es/_util/responsiveObserve.js +85 -85
- package/es/_util/scrollIntoView.d.ts +2 -2
- package/es/_util/scrollIntoView.js +27 -27
- package/es/_util/style.d.ts +3 -3
- package/es/_util/style.js +38 -38
- package/es/_util/throttleByRaf.d.ts +4 -4
- package/es/_util/throttleByRaf.js +45 -45
- package/es/_util/throttleByRafV2.d.ts +4 -4
- package/es/_util/throttleByRafV2.js +49 -49
- package/es/_util/type.d.ts +4 -4
- package/es/_util/type.js +1 -1
- package/es/_util/warning.d.ts +1 -1
- package/es/_util/warning.js +11 -11
- package/es/index.d.ts +142 -142
- package/es/index.js +72 -72
- package/es/locale/ar-EG.d.ts +228 -228
- package/es/locale/ar-EG.js +167 -167
- package/es/locale/de-DE.d.ts +228 -228
- package/es/locale/de-DE.js +165 -165
- package/es/locale/default.d.ts +2 -2
- package/es/locale/default.js +2 -2
- package/es/locale/en-US.d.ts +234 -234
- package/es/locale/en-US.js +172 -172
- package/es/locale/es-ES.d.ts +228 -228
- package/es/locale/es-ES.js +165 -165
- package/es/locale/fr-FR.d.ts +228 -228
- package/es/locale/fr-FR.js +165 -165
- package/es/locale/id-ID.d.ts +228 -228
- package/es/locale/id-ID.js +165 -165
- package/es/locale/interface.d.ts +39 -39
- package/es/locale/interface.js +1 -1
- package/es/locale/it-IT.d.ts +228 -228
- package/es/locale/it-IT.js +165 -165
- package/es/locale/ja-JP.d.ts +281 -281
- package/es/locale/ja-JP.js +218 -218
- package/es/locale/ko-KR.d.ts +228 -228
- package/es/locale/ko-KR.js +165 -165
- package/es/locale/ms-MY.d.ts +228 -228
- package/es/locale/ms-MY.js +165 -165
- package/es/locale/pt-BR.d.ts +228 -228
- package/es/locale/pt-BR.js +165 -165
- package/es/locale/pt-PT.d.ts +228 -228
- package/es/locale/pt-PT.js +165 -165
- package/es/locale/ru-RU.d.ts +228 -228
- package/es/locale/ru-RU.js +165 -165
- package/es/locale/th-TH.d.ts +228 -228
- package/es/locale/th-TH.js +165 -165
- package/es/locale/tr-TR.d.ts +229 -229
- package/es/locale/tr-TR.js +167 -167
- package/es/locale/vi-VN.d.ts +228 -228
- package/es/locale/vi-VN.js +166 -166
- package/es/locale/zh-CN.d.ts +281 -281
- package/es/locale/zh-CN.js +219 -219
- package/es/locale/zh-HK.d.ts +281 -281
- package/es/locale/zh-HK.js +219 -219
- package/es/locale/zh-TW.d.ts +281 -281
- package/es/locale/zh-TW.js +218 -218
- package/hooks/es/index.d.ts +2 -2
- package/hooks/es/index.js +2 -2
- package/hooks/es/useVerificationCode/index.d.ts +2 -2
- package/hooks/es/useVerificationCode/index.js +2 -2
- package/hooks/es/useWatermark/index.d.ts +2 -2
- package/hooks/es/useWatermark/index.js +2 -2
- package/hooks/lib/index.d.ts +2 -2
- package/hooks/lib/index.js +10 -10
- package/hooks/lib/useVerificationCode/index.d.ts +2 -2
- package/hooks/lib/useVerificationCode/index.js +7 -7
- package/hooks/lib/useWatermark/index.d.ts +2 -2
- package/hooks/lib/useWatermark/index.js +7 -7
- package/hooks/package.json +2 -2
- package/icon/icons.json +439 -309
- package/icon/index.d.ts +37 -0
- package/icon/index.es.js +38 -1
- package/icon/index.js +860 -564
- package/icon/react-icon/IconYtBasicConfigMaterial/index.js +60 -0
- package/icon/react-icon/IconYtCalendar/index.js +55 -0
- package/icon/react-icon/IconYtCircular/index.js +50 -0
- package/icon/react-icon/IconYtDirectionArrowDown/index.js +50 -0
- package/icon/react-icon/IconYtDirectionArrowLeft/index.js +50 -0
- package/icon/react-icon/IconYtDirectionArrowRight/index.js +50 -0
- package/icon/react-icon/IconYtDirectionArrowUp/index.js +50 -0
- package/icon/react-icon/IconYtDirectionCaretDown/index.js +48 -0
- package/icon/react-icon/IconYtDirectionCaretLeft/index.js +48 -0
- package/icon/react-icon/IconYtDirectionCaretRight/index.js +48 -0
- package/icon/react-icon/IconYtDirectionCaretUp/index.js +48 -0
- package/icon/react-icon/IconYtDirectionDoubleDown/index.js +51 -0
- package/icon/react-icon/IconYtDirectionDoubleLeft/index.js +51 -0
- package/icon/react-icon/IconYtDirectionDoubleRight/index.js +51 -0
- package/icon/react-icon/IconYtDirectionDoubleUp/index.js +51 -0
- package/icon/react-icon/IconYtDirectionDown/index.js +50 -0
- package/icon/react-icon/IconYtDirectionLeft/index.js +50 -0
- package/icon/react-icon/IconYtDirectionMenuFold/index.js +53 -0
- package/icon/react-icon/IconYtDirectionMenuUnfold/index.js +53 -0
- package/icon/react-icon/IconYtDirectionRight/index.js +50 -0
- package/icon/react-icon/IconYtDirectionUp/index.js +50 -0
- package/icon/react-icon/IconYtForecastingManagement/index.js +60 -0
- package/icon/react-icon/IconYtGeneralCalendar/index.js +55 -0
- package/icon/react-icon/IconYtGeneralDragDot/index.js +50 -0
- package/icon/react-icon/IconYtGeneralDragDotVertical/index.js +50 -0
- package/icon/react-icon/IconYtGeneralMore/index.js +50 -0
- package/icon/react-icon/IconYtGeneralRefresh/index.js +50 -0
- package/icon/react-icon/IconYtGeneralSetting/index.js +57 -0
- package/icon/react-icon/IconYtMaterialControl/index.js +55 -0
- package/icon/react-icon/IconYtMoon/index.js +50 -0
- package/icon/react-icon/IconYtNotification/index.js +55 -0
- package/icon/react-icon/IconYtOmnichannelInventory/index.js +61 -0
- package/icon/react-icon/IconYtOmnichannelSalesCenter/index.js +60 -0
- package/icon/react-icon/IconYtSearch/index.js +50 -0
- package/icon/react-icon/IconYtSetting/index.js +55 -0
- package/icon/react-icon/IconYtSortSwitching/index.js +48 -0
- package/icon/react-icon/IconYtSun/index.js +50 -0
- package/icon/react-icon-cjs/IconYtBasicConfigMaterial/index.js +79 -0
- package/icon/react-icon-cjs/IconYtCalendar/index.js +74 -0
- package/icon/react-icon-cjs/IconYtCircular/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionArrowDown/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionArrowLeft/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionArrowRight/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionArrowUp/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionCaretDown/index.js +67 -0
- package/icon/react-icon-cjs/IconYtDirectionCaretLeft/index.js +67 -0
- package/icon/react-icon-cjs/IconYtDirectionCaretRight/index.js +67 -0
- package/icon/react-icon-cjs/IconYtDirectionCaretUp/index.js +67 -0
- package/icon/react-icon-cjs/IconYtDirectionDoubleDown/index.js +70 -0
- package/icon/react-icon-cjs/IconYtDirectionDoubleLeft/index.js +70 -0
- package/icon/react-icon-cjs/IconYtDirectionDoubleRight/index.js +70 -0
- package/icon/react-icon-cjs/IconYtDirectionDoubleUp/index.js +70 -0
- package/icon/react-icon-cjs/IconYtDirectionDown/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionLeft/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionMenuFold/index.js +72 -0
- package/icon/react-icon-cjs/IconYtDirectionMenuUnfold/index.js +72 -0
- package/icon/react-icon-cjs/IconYtDirectionRight/index.js +69 -0
- package/icon/react-icon-cjs/IconYtDirectionUp/index.js +69 -0
- package/icon/react-icon-cjs/IconYtForecastingManagement/index.js +79 -0
- package/icon/react-icon-cjs/IconYtGeneralCalendar/index.js +74 -0
- package/icon/react-icon-cjs/IconYtGeneralDragDot/index.js +69 -0
- package/icon/react-icon-cjs/IconYtGeneralDragDotVertical/index.js +69 -0
- package/icon/react-icon-cjs/IconYtGeneralMore/index.js +69 -0
- package/icon/react-icon-cjs/IconYtGeneralRefresh/index.js +69 -0
- package/icon/react-icon-cjs/IconYtGeneralSetting/index.js +76 -0
- package/icon/react-icon-cjs/IconYtMaterialControl/index.js +74 -0
- package/icon/react-icon-cjs/IconYtMoon/index.js +69 -0
- package/icon/react-icon-cjs/IconYtNotification/index.js +74 -0
- package/icon/react-icon-cjs/IconYtOmnichannelInventory/index.js +80 -0
- package/icon/react-icon-cjs/IconYtOmnichannelSalesCenter/index.js +79 -0
- package/icon/react-icon-cjs/IconYtSearch/index.js +69 -0
- package/icon/react-icon-cjs/IconYtSetting/index.js +74 -0
- package/icon/react-icon-cjs/IconYtSortSwitching/index.js +67 -0
- package/icon/react-icon-cjs/IconYtSun/index.js +69 -0
- package/lib/Affix/index.d.ts +10 -10
- package/lib/Affix/index.js +196 -196
- package/lib/Affix/interface.d.ts +52 -52
- package/lib/Affix/interface.js +2 -2
- package/lib/Affix/style/index.d.ts +2 -2
- package/lib/Affix/style/index.js +4 -4
- package/lib/Alert/index.d.ts +5 -5
- package/lib/Alert/index.js +124 -124
- package/lib/Alert/interface.d.ts +66 -66
- package/lib/Alert/interface.js +2 -2
- package/lib/Alert/style/index.d.ts +2 -2
- package/lib/Alert/style/index.js +4 -4
- package/lib/Anchor/anchor.d.ts +9 -9
- package/lib/Anchor/anchor.js +299 -299
- package/lib/Anchor/context.d.ts +11 -11
- package/lib/Anchor/context.js +10 -10
- package/lib/Anchor/index.d.ts +4 -4
- package/lib/Anchor/index.js +7 -7
- package/lib/Anchor/interface.d.ts +105 -105
- package/lib/Anchor/interface.js +2 -2
- package/lib/Anchor/link.d.ts +6 -6
- package/lib/Anchor/link.js +93 -93
- package/lib/Anchor/style/index.d.ts +3 -3
- package/lib/Anchor/style/index.js +5 -5
- package/lib/Anchor/utils.d.ts +4 -4
- package/lib/Anchor/utils.js +52 -52
- package/lib/AutoComplete/index.d.ts +12 -12
- package/lib/AutoComplete/index.js +185 -185
- package/lib/AutoComplete/interface.d.ts +127 -127
- package/lib/AutoComplete/interface.js +2 -2
- package/lib/AutoComplete/style/index.d.ts +4 -4
- package/lib/AutoComplete/style/index.js +6 -6
- package/lib/Avatar/avatar.d.ts +6 -6
- package/lib/Avatar/avatar.js +105 -105
- package/lib/Avatar/context.d.ts +4 -4
- package/lib/Avatar/context.js +4 -4
- package/lib/Avatar/group.d.ts +6 -6
- package/lib/Avatar/group.js +91 -91
- package/lib/Avatar/index.d.ts +8 -8
- package/lib/Avatar/index.js +21 -21
- package/lib/Avatar/interface.d.ts +95 -95
- package/lib/Avatar/interface.js +2 -2
- package/lib/Avatar/style/index.d.ts +3 -3
- package/lib/Avatar/style/index.js +5 -5
- package/lib/BackTop/index.d.ts +7 -7
- package/lib/BackTop/index.js +117 -117
- package/lib/BackTop/interface.d.ts +37 -37
- package/lib/BackTop/interface.js +2 -2
- package/lib/BackTop/style/index.d.ts +2 -2
- package/lib/BackTop/style/index.js +4 -4
- package/lib/Badge/count.d.ts +8 -8
- package/lib/Badge/count.js +57 -57
- package/lib/Badge/index.d.ts +5 -5
- package/lib/Badge/index.js +138 -138
- package/lib/Badge/interface.d.ts +57 -57
- package/lib/Badge/interface.js +2 -2
- package/lib/Badge/style/index.d.ts +2 -2
- package/lib/Badge/style/index.js +4 -4
- package/lib/Breadcrumb/index.d.ts +8 -8
- package/lib/Breadcrumb/index.js +119 -119
- package/lib/Breadcrumb/interface.d.ts +78 -78
- package/lib/Breadcrumb/interface.js +2 -2
- package/lib/Breadcrumb/item.d.ts +8 -8
- package/lib/Breadcrumb/item.js +89 -89
- package/lib/Breadcrumb/style/index.d.ts +3 -3
- package/lib/Breadcrumb/style/index.js +5 -5
- package/lib/Button/group.d.ts +5 -5
- package/lib/Button/group.js +59 -59
- package/lib/Button/index.d.ts +15 -15
- package/lib/Button/index.js +156 -156
- package/lib/Button/interface.d.ts +105 -105
- package/lib/Button/interface.js +2 -2
- package/lib/Button/style/index.d.ts +2 -2
- package/lib/Button/style/index.js +4 -4
- package/lib/Calendar/header/header.d.ts +2 -2
- package/lib/Calendar/header/header.js +89 -89
- package/lib/Calendar/header/panel-header.d.ts +2 -2
- package/lib/Calendar/header/panel-header.js +33 -33
- package/lib/Calendar/hooks/useCellClassName.d.ts +1 -1
- package/lib/Calendar/hooks/useCellClassName.js +59 -59
- package/lib/Calendar/index.d.ts +7 -7
- package/lib/Calendar/index.js +166 -166
- package/lib/Calendar/interface.d.ts +122 -122
- package/lib/Calendar/interface.js +2 -2
- package/lib/Calendar/month.d.ts +15 -15
- package/lib/Calendar/month.js +140 -140
- package/lib/Calendar/style/index.d.ts +4 -4
- package/lib/Calendar/style/index.js +6 -6
- package/lib/Calendar/week-list.d.ts +10 -10
- package/lib/Calendar/week-list.js +22 -22
- package/lib/Calendar/year.d.ts +13 -13
- package/lib/Calendar/year.js +64 -64
- package/lib/Card/grid.d.ts +5 -5
- package/lib/Card/grid.js +37 -37
- package/lib/Card/index.d.ts +10 -10
- package/lib/Card/index.js +100 -100
- package/lib/Card/interface.d.ts +99 -99
- package/lib/Card/interface.js +2 -2
- package/lib/Card/meta.d.ts +5 -5
- package/lib/Card/meta.js +66 -66
- package/lib/Card/style/index.d.ts +3 -3
- package/lib/Card/style/index.js +5 -5
- package/lib/Carousel/arrow.d.ts +4 -4
- package/lib/Carousel/arrow.js +60 -60
- package/lib/Carousel/index.d.ts +5 -5
- package/lib/Carousel/index.js +312 -312
- package/lib/Carousel/indicator.d.ts +4 -4
- package/lib/Carousel/indicator.js +81 -81
- package/lib/Carousel/interface.d.ts +144 -144
- package/lib/Carousel/interface.js +2 -2
- package/lib/Carousel/style/index.d.ts +2 -2
- package/lib/Carousel/style/index.js +4 -4
- package/lib/Cascader/base/node.d.ts +78 -78
- package/lib/Cascader/base/node.js +203 -203
- package/lib/Cascader/base/store.d.ts +43 -43
- package/lib/Cascader/base/store.js +171 -171
- package/lib/Cascader/cascader.d.ts +17 -17
- package/lib/Cascader/cascader.js +369 -369
- package/lib/Cascader/hook/useRefCurrent.d.ts +3 -3
- package/lib/Cascader/hook/useRefCurrent.js +46 -46
- package/lib/Cascader/index.d.ts +5 -5
- package/lib/Cascader/index.js +18 -18
- package/lib/Cascader/interface.d.ts +308 -308
- package/lib/Cascader/interface.js +2 -2
- package/lib/Cascader/panel/list.d.ts +4 -4
- package/lib/Cascader/panel/list.js +409 -409
- package/lib/Cascader/panel/option.d.ts +23 -23
- package/lib/Cascader/panel/option.js +17 -17
- package/lib/Cascader/panel/search-panel.d.ts +28 -28
- package/lib/Cascader/panel/search-panel.js +232 -232
- package/lib/Cascader/style/index.d.ts +6 -6
- package/lib/Cascader/style/index.js +8 -8
- package/lib/Cascader/util.d.ts +24 -24
- package/lib/Cascader/util.js +125 -125
- package/lib/Checkbox/checkbox.d.ts +14 -14
- package/lib/Checkbox/checkbox.js +146 -146
- package/lib/Checkbox/group.d.ts +17 -17
- package/lib/Checkbox/group.js +135 -135
- package/lib/Checkbox/icon-check.d.ts +3 -3
- package/lib/Checkbox/icon-check.js +12 -12
- package/lib/Checkbox/index.d.ts +4 -4
- package/lib/Checkbox/index.js +10 -10
- package/lib/Checkbox/interface.d.ts +102 -102
- package/lib/Checkbox/interface.js +2 -2
- package/lib/Checkbox/style/index.d.ts +2 -2
- package/lib/Checkbox/style/index.js +4 -4
- package/lib/Checkbox/useCheckbox.d.ts +22 -22
- package/lib/Checkbox/useCheckbox.js +105 -105
- package/lib/Collapse/collapse.d.ts +14 -14
- package/lib/Collapse/collapse.js +145 -145
- package/lib/Collapse/index.d.ts +3 -3
- package/lib/Collapse/index.js +7 -7
- package/lib/Collapse/interface.d.ts +111 -111
- package/lib/Collapse/interface.js +2 -2
- package/lib/Collapse/item.d.ts +7 -7
- package/lib/Collapse/item.js +125 -125
- package/lib/Collapse/style/index.d.ts +2 -2
- package/lib/Collapse/style/index.js +4 -4
- package/lib/ColorPicker/colors.d.ts +1 -1
- package/lib/ColorPicker/colors.js +27 -27
- package/lib/ColorPicker/control-bar.d.ts +12 -12
- package/lib/ColorPicker/control-bar.js +62 -62
- package/lib/ColorPicker/hooks/useColorPicker.d.ts +30 -30
- package/lib/ColorPicker/hooks/useColorPicker.js +101 -101
- package/lib/ColorPicker/hooks/useControlBlock.d.ts +12 -12
- package/lib/ColorPicker/hooks/useControlBlock.js +75 -75
- package/lib/ColorPicker/index.d.ts +5 -5
- package/lib/ColorPicker/index.js +83 -83
- package/lib/ColorPicker/input-alpha.d.ts +7 -7
- package/lib/ColorPicker/input-alpha.js +35 -35
- package/lib/ColorPicker/input-hex.d.ts +11 -11
- package/lib/ColorPicker/input-hex.js +85 -85
- package/lib/ColorPicker/input-rgb.d.ts +10 -10
- package/lib/ColorPicker/input-rgb.js +47 -47
- package/lib/ColorPicker/interface.d.ts +126 -126
- package/lib/ColorPicker/interface.js +2 -2
- package/lib/ColorPicker/palette.d.ts +7 -7
- package/lib/ColorPicker/palette.js +48 -48
- package/lib/ColorPicker/panel.d.ts +20 -20
- package/lib/ColorPicker/panel.js +140 -140
- package/lib/ColorPicker/style/index.d.ts +4 -4
- package/lib/ColorPicker/style/index.js +6 -6
- package/lib/Comment/index.d.ts +7 -7
- package/lib/Comment/index.js +74 -74
- package/lib/Comment/interface.d.ts +41 -41
- package/lib/Comment/interface.js +2 -2
- package/lib/Comment/style/index.d.ts +2 -2
- package/lib/Comment/style/index.js +4 -4
- package/lib/ConfigProvider/context.d.ts +4 -4
- package/lib/ConfigProvider/context.js +59 -59
- package/lib/ConfigProvider/index.d.ts +11 -11
- package/lib/ConfigProvider/index.js +123 -123
- package/lib/ConfigProvider/interface.d.ts +248 -248
- package/lib/ConfigProvider/interface.js +2 -2
- package/lib/ConfigProvider/style/index.d.ts +1 -1
- package/lib/ConfigProvider/style/index.js +3 -3
- package/lib/ConfigProvider/util.d.ts +2 -2
- package/lib/ConfigProvider/util.js +123 -123
- package/lib/DatePicker/__test__/utils.d.ts +4 -4
- package/lib/DatePicker/__test__/utils.js +41 -41
- package/lib/DatePicker/context.d.ts +8 -8
- package/lib/DatePicker/context.js +4 -4
- package/lib/DatePicker/hooks/useCellClassName.d.ts +1 -1
- package/lib/DatePicker/hooks/useCellClassName.js +113 -113
- package/lib/DatePicker/index.d.ts +4 -4
- package/lib/DatePicker/index.js +90 -90
- package/lib/DatePicker/interface.d.ts +518 -518
- package/lib/DatePicker/interface.js +2 -2
- package/lib/DatePicker/panels/body.d.ts +30 -30
- package/lib/DatePicker/panels/body.js +68 -68
- package/lib/DatePicker/panels/date/index.d.ts +24 -24
- package/lib/DatePicker/panels/date/index.js +183 -183
- package/lib/DatePicker/panels/footer.d.ts +1 -1
- package/lib/DatePicker/panels/footer.js +26 -26
- package/lib/DatePicker/panels/header.d.ts +20 -20
- package/lib/DatePicker/panels/header.js +59 -59
- package/lib/DatePicker/panels/month/index.d.ts +17 -17
- package/lib/DatePicker/panels/month/index.js +108 -108
- package/lib/DatePicker/panels/quarter/index.d.ts +17 -17
- package/lib/DatePicker/panels/quarter/index.js +88 -88
- package/lib/DatePicker/panels/range/index.d.ts +28 -28
- package/lib/DatePicker/panels/range/index.js +170 -170
- package/lib/DatePicker/panels/shortcuts.d.ts +4 -4
- package/lib/DatePicker/panels/shortcuts.js +49 -49
- package/lib/DatePicker/panels/week/index.d.ts +16 -16
- package/lib/DatePicker/panels/week/index.js +61 -61
- package/lib/DatePicker/panels/week-list.d.ts +8 -8
- package/lib/DatePicker/panels/week-list.js +17 -17
- package/lib/DatePicker/panels/year/index.d.ts +16 -16
- package/lib/DatePicker/panels/year/index.js +88 -88
- package/lib/DatePicker/picker-range.d.ts +4 -4
- package/lib/DatePicker/picker-range.js +709 -709
- package/lib/DatePicker/picker.d.ts +18 -18
- package/lib/DatePicker/picker.js +427 -427
- package/lib/DatePicker/style/index.d.ts +7 -7
- package/lib/DatePicker/style/index.js +9 -9
- package/lib/DatePicker/util.d.ts +9 -9
- package/lib/DatePicker/util.js +108 -108
- package/lib/Descriptions/index.d.ts +7 -7
- package/lib/Descriptions/index.js +175 -175
- package/lib/Descriptions/interface.d.ts +79 -79
- package/lib/Descriptions/interface.js +2 -2
- package/lib/Descriptions/style/index.d.ts +2 -2
- package/lib/Descriptions/style/index.js +4 -4
- package/lib/Divider/index.d.ts +5 -5
- package/lib/Divider/index.js +69 -69
- package/lib/Divider/interface.d.ts +21 -21
- package/lib/Divider/interface.js +2 -2
- package/lib/Divider/style/index.d.ts +2 -2
- package/lib/Divider/style/index.js +4 -4
- package/lib/Drawer/index.d.ts +5 -5
- package/lib/Drawer/index.js +225 -225
- package/lib/Drawer/interface.d.ts +185 -185
- package/lib/Drawer/interface.js +2 -2
- package/lib/Drawer/style/index.d.ts +3 -3
- package/lib/Drawer/style/index.js +5 -5
- package/lib/Dropdown/button.d.ts +5 -5
- package/lib/Dropdown/button.js +96 -96
- package/lib/Dropdown/index.d.ts +8 -8
- package/lib/Dropdown/index.js +194 -194
- package/lib/Dropdown/interface.d.ts +109 -109
- package/lib/Dropdown/interface.js +2 -2
- package/lib/Dropdown/style/index.d.ts +4 -4
- package/lib/Dropdown/style/index.js +6 -6
- package/lib/Empty/index.d.ts +5 -5
- package/lib/Empty/index.js +67 -67
- package/lib/Empty/interface.d.ts +23 -23
- package/lib/Empty/interface.js +2 -2
- package/lib/Empty/style/index.d.ts +2 -2
- package/lib/Empty/style/index.js +4 -4
- package/lib/Form/context.d.ts +14 -14
- package/lib/Form/context.js +40 -40
- package/lib/Form/control.d.ts +66 -66
- package/lib/Form/control.js +458 -458
- package/lib/Form/form-item.d.ts +7 -7
- package/lib/Form/form-item.js +287 -287
- package/lib/Form/form-label.d.ts +9 -9
- package/lib/Form/form-label.js +96 -96
- package/lib/Form/form-list.d.ts +6 -6
- package/lib/Form/form-list.js +172 -172
- package/lib/Form/form-provider.d.ts +4 -4
- package/lib/Form/form-provider.js +54 -54
- package/lib/Form/form.d.ts +8 -8
- package/lib/Form/form.js +183 -183
- package/lib/Form/hooks/useContext.d.ts +10 -10
- package/lib/Form/hooks/useContext.js +47 -47
- package/lib/Form/hooks/useState.d.ts +3 -3
- package/lib/Form/hooks/useState.js +61 -61
- package/lib/Form/hooks/useWatch.d.ts +3 -3
- package/lib/Form/hooks/useWatch.js +68 -68
- package/lib/Form/index.d.ts +24 -24
- package/lib/Form/index.js +24 -24
- package/lib/Form/interface.d.ts +533 -533
- package/lib/Form/interface.js +18 -18
- package/lib/Form/promisify.d.ts +2 -2
- package/lib/Form/promisify.js +52 -52
- package/lib/Form/store.d.ts +95 -95
- package/lib/Form/store.js +531 -531
- package/lib/Form/style/index.d.ts +3 -3
- package/lib/Form/style/index.js +5 -5
- package/lib/Form/useForm.d.ts +3 -3
- package/lib/Form/useForm.js +65 -65
- package/lib/Form/utils.d.ts +14 -14
- package/lib/Form/utils.js +211 -211
- package/lib/Grid/col.d.ts +5 -5
- package/lib/Grid/col.js +117 -117
- package/lib/Grid/context.d.ts +20 -20
- package/lib/Grid/context.js +7 -7
- package/lib/Grid/grid-item.d.ts +7 -7
- package/lib/Grid/grid-item.js +115 -115
- package/lib/Grid/grid.d.ts +5 -5
- package/lib/Grid/grid.js +158 -158
- package/lib/Grid/hooks/useResponsiveState.d.ts +2 -2
- package/lib/Grid/hooks/useResponsiveState.js +86 -86
- package/lib/Grid/index.d.ts +11 -11
- package/lib/Grid/index.js +14 -14
- package/lib/Grid/interface.d.ts +239 -239
- package/lib/Grid/interface.js +2 -2
- package/lib/Grid/row.d.ts +5 -5
- package/lib/Grid/row.js +145 -145
- package/lib/Grid/style/index.d.ts +2 -2
- package/lib/Grid/style/index.js +4 -4
- package/lib/Grid/utils.d.ts +11 -11
- package/lib/Grid/utils.js +56 -56
- package/lib/Icon/addFromIconFontCn.d.ts +9 -9
- package/lib/Icon/addFromIconFontCn.js +82 -82
- package/lib/Icon/index.d.ts +25 -25
- package/lib/Icon/index.js +96 -96
- package/lib/Image/image-footer.d.ts +13 -13
- package/lib/Image/image-footer.js +57 -57
- package/lib/Image/image-preview-arrow.d.ts +9 -9
- package/lib/Image/image-preview-arrow.js +54 -54
- package/lib/Image/image-preview-group.d.ts +10 -10
- package/lib/Image/image-preview-group.js +197 -197
- package/lib/Image/image-preview-toolbar.d.ts +14 -14
- package/lib/Image/image-preview-toolbar.js +135 -135
- package/lib/Image/image-preview.d.ts +7 -7
- package/lib/Image/image-preview.js +475 -475
- package/lib/Image/image.d.ts +11 -11
- package/lib/Image/image.js +219 -219
- package/lib/Image/index.d.ts +3 -3
- package/lib/Image/index.js +7 -7
- package/lib/Image/interface.d.ts +274 -274
- package/lib/Image/interface.js +2 -2
- package/lib/Image/previewGroupContext.d.ts +25 -25
- package/lib/Image/previewGroupContext.js +17 -17
- package/lib/Image/style/index.d.ts +2 -2
- package/lib/Image/style/index.js +4 -4
- package/lib/Image/trigger-for-toolbar.d.ts +10 -10
- package/lib/Image/trigger-for-toolbar.js +15 -15
- package/lib/Image/utils/getFixTranslate.d.ts +1 -1
- package/lib/Image/utils/getFixTranslate.js +42 -42
- package/lib/Image/utils/getScale.d.ts +13 -13
- package/lib/Image/utils/getScale.js +83 -83
- package/lib/Image/utils/hooks/useImageStatus.d.ts +12 -12
- package/lib/Image/utils/hooks/useImageStatus.js +37 -37
- package/lib/Image/utils/hooks/useShowFooter.d.ts +8 -8
- package/lib/Image/utils/hooks/useShowFooter.js +10 -10
- package/lib/Input/autoSizeTextAreaHeight.d.ts +5 -5
- package/lib/Input/autoSizeTextAreaHeight.js +101 -101
- package/lib/Input/group.d.ts +7 -7
- package/lib/Input/group.js +61 -61
- package/lib/Input/index.d.ts +7 -7
- package/lib/Input/index.js +7 -7
- package/lib/Input/input-element.d.ts +4 -4
- package/lib/Input/input-element.js +251 -251
- package/lib/Input/input.d.ts +17 -17
- package/lib/Input/input.js +180 -180
- package/lib/Input/interface.d.ts +325 -325
- package/lib/Input/interface.js +2 -2
- package/lib/Input/password.d.ts +5 -5
- package/lib/Input/password.js +117 -117
- package/lib/Input/search.d.ts +5 -5
- package/lib/Input/search.js +101 -101
- package/lib/Input/style/index.d.ts +3 -3
- package/lib/Input/style/index.js +5 -5
- package/lib/Input/textarea.d.ts +12 -12
- package/lib/Input/textarea.js +193 -193
- package/lib/Input/useComposition.d.ts +17 -17
- package/lib/Input/useComposition.js +75 -75
- package/lib/InputNumber/Decimal.d.ts +21 -21
- package/lib/InputNumber/Decimal.js +199 -199
- package/lib/InputNumber/index.d.ts +6 -6
- package/lib/InputNumber/index.js +272 -272
- package/lib/InputNumber/interface.d.ts +141 -141
- package/lib/InputNumber/interface.js +2 -2
- package/lib/InputNumber/style/index.d.ts +3 -3
- package/lib/InputNumber/style/index.js +5 -5
- package/lib/InputNumber/useSelectionRange.d.ts +4 -4
- package/lib/InputNumber/useSelectionRange.js +32 -32
- package/lib/InputNumber/utils.d.ts +28 -28
- package/lib/InputNumber/utils.js +122 -122
- package/lib/InputTag/index.d.ts +3 -3
- package/lib/InputTag/index.js +7 -7
- package/lib/InputTag/input-tag.d.ts +9 -9
- package/lib/InputTag/input-tag.js +527 -527
- package/lib/InputTag/interface.d.ts +215 -215
- package/lib/InputTag/interface.js +2 -2
- package/lib/InputTag/style/index.d.ts +3 -3
- package/lib/InputTag/style/index.js +5 -5
- package/lib/Layout/content.d.ts +4 -4
- package/lib/Layout/content.js +59 -59
- package/lib/Layout/footer.d.ts +4 -4
- package/lib/Layout/footer.js +59 -59
- package/lib/Layout/header.d.ts +4 -4
- package/lib/Layout/header.js +59 -59
- package/lib/Layout/index.d.ts +17 -17
- package/lib/Layout/index.js +112 -112
- package/lib/Layout/interface.d.ts +121 -121
- package/lib/Layout/interface.js +2 -2
- package/lib/Layout/sider.d.ts +10 -10
- package/lib/Layout/sider.js +168 -168
- package/lib/Layout/style/index.d.ts +4 -4
- package/lib/Layout/style/index.js +6 -6
- package/lib/Link/index.d.ts +5 -5
- package/lib/Link/index.js +87 -87
- package/lib/Link/interface.d.ts +30 -30
- package/lib/Link/interface.js +2 -2
- package/lib/Link/style/index.d.ts +2 -2
- package/lib/Link/style/index.js +4 -4
- package/lib/List/index.d.ts +12 -12
- package/lib/List/index.js +256 -256
- package/lib/List/interface.d.ts +192 -192
- package/lib/List/interface.js +2 -2
- package/lib/List/item.d.ts +7 -7
- package/lib/List/item.js +86 -86
- package/lib/List/meta.d.ts +4 -4
- package/lib/List/meta.js +65 -65
- package/lib/List/style/index.d.ts +6 -6
- package/lib/List/style/index.js +8 -8
- package/lib/Mentions/index.d.ts +5 -5
- package/lib/Mentions/index.js +176 -176
- package/lib/Mentions/interface.d.ts +92 -92
- package/lib/Mentions/interface.js +2 -2
- package/lib/Mentions/style/index.d.ts +2 -2
- package/lib/Mentions/style/index.js +4 -4
- package/lib/Mentions/utils.d.ts +9 -9
- package/lib/Mentions/utils.js +27 -27
- package/lib/Menu/context.d.ts +16 -16
- package/lib/Menu/context.js +5 -5
- package/lib/Menu/indent.d.ts +5 -5
- package/lib/Menu/indent.js +60 -60
- package/lib/Menu/index.d.ts +13 -13
- package/lib/Menu/index.js +226 -226
- package/lib/Menu/interface.d.ts +233 -233
- package/lib/Menu/interface.js +2 -2
- package/lib/Menu/item-group.d.ts +6 -6
- package/lib/Menu/item-group.js +45 -45
- package/lib/Menu/item.d.ts +6 -6
- package/lib/Menu/item.js +108 -108
- package/lib/Menu/overflow-wrap.d.ts +9 -9
- package/lib/Menu/overflow-wrap.js +155 -155
- package/lib/Menu/style/index.d.ts +4 -4
- package/lib/Menu/style/index.js +6 -6
- package/lib/Menu/sub-menu/index.d.ts +6 -6
- package/lib/Menu/sub-menu/index.js +58 -58
- package/lib/Menu/sub-menu/inline.d.ts +5 -5
- package/lib/Menu/sub-menu/inline.js +178 -178
- package/lib/Menu/sub-menu/pop.d.ts +5 -5
- package/lib/Menu/sub-menu/pop.js +123 -123
- package/lib/Menu/util.d.ts +16 -16
- package/lib/Menu/util.js +143 -143
- package/lib/Message/index.d.ts +30 -30
- package/lib/Message/index.js +194 -194
- package/lib/Message/interface.d.ts +83 -83
- package/lib/Message/interface.js +2 -2
- package/lib/Message/style/index.d.ts +2 -2
- package/lib/Message/style/index.js +4 -4
- package/lib/Message/useMessage.d.ts +5 -5
- package/lib/Message/useMessage.js +95 -95
- package/lib/Modal/config.d.ts +10 -10
- package/lib/Modal/config.js +35 -35
- package/lib/Modal/confirm.d.ts +14 -14
- package/lib/Modal/confirm.js +149 -149
- package/lib/Modal/index.d.ts +2 -2
- package/lib/Modal/index.js +7 -7
- package/lib/Modal/interface.d.ts +190 -190
- package/lib/Modal/interface.js +2 -2
- package/lib/Modal/modal.d.ts +18 -18
- package/lib/Modal/modal.js +348 -348
- package/lib/Modal/style/index.d.ts +3 -3
- package/lib/Modal/style/index.js +5 -5
- package/lib/Modal/useModal/hookModal.d.ts +8 -8
- package/lib/Modal/useModal/hookModal.js +86 -86
- package/lib/Modal/useModal/index.d.ts +4 -4
- package/lib/Modal/useModal/index.js +87 -87
- package/lib/Notification/index.d.ts +26 -26
- package/lib/Notification/index.js +209 -209
- package/lib/Notification/interface.d.ts +77 -77
- package/lib/Notification/interface.js +2 -2
- package/lib/Notification/style/index.d.ts +2 -2
- package/lib/Notification/style/index.js +4 -4
- package/lib/Notification/useNotification.d.ts +5 -5
- package/lib/Notification/useNotification.js +92 -92
- package/lib/PageHeader/index.d.ts +8 -8
- package/lib/PageHeader/index.js +114 -114
- package/lib/PageHeader/interface.d.ts +44 -44
- package/lib/PageHeader/interface.js +2 -2
- package/lib/PageHeader/style/index.d.ts +3 -3
- package/lib/PageHeader/style/index.js +5 -5
- package/lib/Pagination/index.d.ts +3 -3
- package/lib/Pagination/index.js +7 -7
- package/lib/Pagination/interface.d.ts +133 -133
- package/lib/Pagination/interface.js +2 -2
- package/lib/Pagination/page-item.d.ts +62 -62
- package/lib/Pagination/page-item.js +170 -170
- package/lib/Pagination/page-jumper.d.ts +13 -13
- package/lib/Pagination/page-jumper.js +108 -108
- package/lib/Pagination/page-options.d.ts +13 -13
- package/lib/Pagination/page-options.js +53 -53
- package/lib/Pagination/pagination.d.ts +11 -11
- package/lib/Pagination/pagination.js +276 -276
- package/lib/Pagination/style/index.d.ts +4 -4
- package/lib/Pagination/style/index.js +6 -6
- package/lib/Popconfirm/index.d.ts +7 -7
- package/lib/Popconfirm/index.js +155 -155
- package/lib/Popconfirm/interface.d.ts +128 -128
- package/lib/Popconfirm/interface.js +2 -2
- package/lib/Popconfirm/style/index.d.ts +5 -5
- package/lib/Popconfirm/style/index.js +7 -7
- package/lib/Popover/index.d.ts +7 -7
- package/lib/Popover/index.js +73 -73
- package/lib/Popover/interface.d.ts +20 -20
- package/lib/Popover/interface.js +2 -2
- package/lib/Popover/style/index.d.ts +3 -3
- package/lib/Popover/style/index.js +5 -5
- package/lib/Portal/Portal.d.ts +15 -15
- package/lib/Portal/Portal.js +62 -62
- package/lib/Portal/index.d.ts +19 -19
- package/lib/Portal/index.js +72 -72
- package/lib/Progress/circle-progress.d.ts +8 -8
- package/lib/Progress/circle-progress.js +92 -92
- package/lib/Progress/index.d.ts +5 -5
- package/lib/Progress/index.js +95 -95
- package/lib/Progress/interface.d.ts +87 -87
- package/lib/Progress/interface.js +2 -2
- package/lib/Progress/line-progess.d.ts +2 -2
- package/lib/Progress/line-progess.js +86 -86
- package/lib/Progress/steps-progress.d.ts +2 -2
- package/lib/Progress/steps-progress.js +88 -88
- package/lib/Progress/style/index.d.ts +3 -3
- package/lib/Progress/style/index.js +5 -5
- package/lib/Radio/group.d.ts +10 -10
- package/lib/Radio/group.js +123 -123
- package/lib/Radio/index.d.ts +5 -5
- package/lib/Radio/index.js +10 -10
- package/lib/Radio/interface.d.ts +103 -103
- package/lib/Radio/interface.js +2 -2
- package/lib/Radio/radio.d.ts +11 -11
- package/lib/Radio/radio.js +131 -131
- package/lib/Radio/style/index.d.ts +2 -2
- package/lib/Radio/style/index.js +4 -4
- package/lib/Rate/index.d.ts +5 -5
- package/lib/Rate/index.js +185 -185
- package/lib/Rate/interface.d.ts +70 -70
- package/lib/Rate/interface.js +2 -2
- package/lib/Rate/style/index.d.ts +3 -3
- package/lib/Rate/style/index.js +5 -5
- package/lib/ResizeBox/index.d.ts +13 -13
- package/lib/ResizeBox/index.js +249 -249
- package/lib/ResizeBox/interface.d.ts +264 -264
- package/lib/ResizeBox/interface.js +2 -2
- package/lib/ResizeBox/resize-trigger.d.ts +30 -30
- package/lib/ResizeBox/resize-trigger.js +116 -116
- package/lib/ResizeBox/split-group.d.ts +4 -4
- package/lib/ResizeBox/split-group.js +345 -345
- package/lib/ResizeBox/split.d.ts +5 -5
- package/lib/ResizeBox/split.js +174 -174
- package/lib/ResizeBox/style/index.d.ts +2 -2
- package/lib/ResizeBox/style/index.js +4 -4
- package/lib/Result/403.d.ts +1 -1
- package/lib/Result/403.js +166 -166
- package/lib/Result/404.d.ts +1 -1
- package/lib/Result/404.js +132 -132
- package/lib/Result/500.d.ts +1 -1
- package/lib/Result/500.js +170 -170
- package/lib/Result/index.d.ts +7 -7
- package/lib/Result/index.js +93 -93
- package/lib/Result/interface.d.ts +35 -35
- package/lib/Result/interface.js +2 -2
- package/lib/Result/style/index.d.ts +2 -2
- package/lib/Result/style/index.js +4 -4
- package/lib/Select/index.d.ts +3 -3
- package/lib/Select/index.js +7 -7
- package/lib/Select/interface.d.ts +315 -315
- package/lib/Select/interface.js +2 -2
- package/lib/Select/opt-group.d.ts +6 -6
- package/lib/Select/opt-group.js +37 -37
- package/lib/Select/option.d.ts +6 -6
- package/lib/Select/option.js +78 -78
- package/lib/Select/select.d.ts +10 -10
- package/lib/Select/select.js +696 -696
- package/lib/Select/style/index.d.ts +6 -6
- package/lib/Select/style/index.js +8 -8
- package/lib/Select/utils.d.ts +26 -26
- package/lib/Select/utils.js +200 -200
- package/lib/Skeleton/image.d.ts +2 -2
- package/lib/Skeleton/image.js +18 -18
- package/lib/Skeleton/index.d.ts +7 -7
- package/lib/Skeleton/index.js +78 -78
- package/lib/Skeleton/interface.d.ts +50 -50
- package/lib/Skeleton/interface.js +2 -2
- package/lib/Skeleton/style/index.d.ts +2 -2
- package/lib/Skeleton/style/index.js +4 -4
- package/lib/Skeleton/text.d.ts +2 -2
- package/lib/Skeleton/text.js +27 -27
- package/lib/Slider/button.d.ts +21 -21
- package/lib/Slider/button.js +202 -202
- package/lib/Slider/dots.d.ts +17 -17
- package/lib/Slider/dots.js +57 -57
- package/lib/Slider/hooks/useInterval.d.ts +24 -24
- package/lib/Slider/hooks/useInterval.js +127 -127
- package/lib/Slider/hooks/useLegalValue.d.ts +15 -15
- package/lib/Slider/hooks/useLegalValue.js +110 -110
- package/lib/Slider/index.d.ts +5 -5
- package/lib/Slider/index.js +375 -375
- package/lib/Slider/input.d.ts +15 -15
- package/lib/Slider/input.js +105 -105
- package/lib/Slider/interface.d.ts +122 -122
- package/lib/Slider/interface.js +2 -2
- package/lib/Slider/marks.d.ts +16 -16
- package/lib/Slider/marks.js +47 -47
- package/lib/Slider/style/index.d.ts +5 -5
- package/lib/Slider/style/index.js +7 -7
- package/lib/Slider/ticks.d.ts +13 -13
- package/lib/Slider/ticks.js +53 -53
- package/lib/Slider/utils.d.ts +11 -11
- package/lib/Slider/utils.js +99 -99
- package/lib/Space/index.d.ts +5 -5
- package/lib/Space/index.js +139 -139
- package/lib/Space/interface.d.ts +38 -38
- package/lib/Space/interface.js +2 -2
- package/lib/Space/style/index.d.ts +2 -2
- package/lib/Space/style/index.js +4 -4
- package/lib/Space/toArray.d.ts +1 -1
- package/lib/Space/toArray.js +20 -20
- package/lib/Spin/dot-loading.d.ts +5 -5
- package/lib/Spin/dot-loading.js +65 -65
- package/lib/Spin/index.d.ts +5 -5
- package/lib/Spin/index.js +110 -110
- package/lib/Spin/interface.d.ts +50 -50
- package/lib/Spin/interface.js +2 -2
- package/lib/Spin/style/index.d.ts +2 -2
- package/lib/Spin/style/index.js +4 -4
- package/lib/Statistic/countdown.d.ts +5 -5
- package/lib/Statistic/countdown.js +92 -92
- package/lib/Statistic/index.d.ts +8 -8
- package/lib/Statistic/index.js +174 -174
- package/lib/Statistic/interface.d.ts +139 -139
- package/lib/Statistic/interface.js +2 -2
- package/lib/Statistic/style/index.d.ts +3 -3
- package/lib/Statistic/style/index.js +5 -5
- package/lib/Statistic/util.d.ts +1 -1
- package/lib/Statistic/util.js +46 -46
- package/lib/Steps/index.d.ts +8 -8
- package/lib/Steps/index.js +93 -93
- package/lib/Steps/interface.d.ts +124 -124
- package/lib/Steps/interface.js +2 -2
- package/lib/Steps/step.d.ts +5 -5
- package/lib/Steps/step.js +96 -96
- package/lib/Steps/style/index.d.ts +2 -2
- package/lib/Steps/style/index.js +4 -4
- package/lib/Switch/index.d.ts +10 -10
- package/lib/Switch/index.js +136 -136
- package/lib/Switch/interface.d.ts +65 -65
- package/lib/Switch/interface.js +2 -2
- package/lib/Switch/style/index.d.ts +2 -2
- package/lib/Switch/style/index.js +4 -4
- package/lib/Table/__test__/common/columns.d.ts +11 -11
- package/lib/Table/__test__/common/columns.js +199 -199
- package/lib/Table/__test__/common/data.d.ts +29 -29
- package/lib/Table/__test__/common/data.js +142 -142
- package/lib/Table/colgroup.d.ts +13 -13
- package/lib/Table/colgroup.js +67 -67
- package/lib/Table/constant.d.ts +2 -2
- package/lib/Table/constant.js +5 -5
- package/lib/Table/hooks/useColumns.d.ts +3 -3
- package/lib/Table/hooks/useColumns.js +196 -196
- package/lib/Table/hooks/useComponent.d.ts +31 -31
- package/lib/Table/hooks/useComponent.js +70 -70
- package/lib/Table/hooks/useExpand.d.ts +3 -3
- package/lib/Table/hooks/useExpand.js +69 -69
- package/lib/Table/hooks/useRowSelection.d.ts +12 -12
- package/lib/Table/hooks/useRowSelection.js +161 -161
- package/lib/Table/hooks/useSorter.d.ts +7 -7
- package/lib/Table/hooks/useSorter.js +128 -128
- package/lib/Table/hooks/useStickyClassNames.d.ts +3 -3
- package/lib/Table/hooks/useStickyClassNames.js +43 -43
- package/lib/Table/hooks/useStickyOffsets.d.ts +3 -3
- package/lib/Table/hooks/useStickyOffsets.js +68 -68
- package/lib/Table/index.d.ts +9 -9
- package/lib/Table/index.js +10 -10
- package/lib/Table/interface.d.ts +704 -704
- package/lib/Table/interface.js +2 -2
- package/lib/Table/style/index.d.ts +11 -11
- package/lib/Table/style/index.js +13 -13
- package/lib/Table/summary/cell.d.ts +12 -12
- package/lib/Table/summary/cell.js +35 -35
- package/lib/Table/summary/context.d.ts +10 -10
- package/lib/Table/summary/context.js +5 -5
- package/lib/Table/summary/index.d.ts +8 -8
- package/lib/Table/summary/index.js +13 -13
- package/lib/Table/summary/row.d.ts +7 -7
- package/lib/Table/summary/row.js +80 -80
- package/lib/Table/table.d.ts +10 -10
- package/lib/Table/table.js +725 -725
- package/lib/Table/tbody/index.d.ts +3 -3
- package/lib/Table/tbody/index.js +143 -143
- package/lib/Table/tbody/td.d.ts +25 -25
- package/lib/Table/tbody/td.js +141 -141
- package/lib/Table/tbody/tr.d.ts +16 -16
- package/lib/Table/tbody/tr.js +164 -164
- package/lib/Table/tfoot/index.d.ts +3 -3
- package/lib/Table/tfoot/index.js +14 -14
- package/lib/Table/thead/column.d.ts +3 -3
- package/lib/Table/thead/column.js +244 -244
- package/lib/Table/thead/index.d.ts +3 -3
- package/lib/Table/thead/index.js +115 -115
- package/lib/Table/utils.d.ts +17 -17
- package/lib/Table/utils.js +224 -224
- package/lib/Tabs/hook/useDomSize.d.ts +11 -11
- package/lib/Tabs/hook/useDomSize.js +37 -37
- package/lib/Tabs/hook/useHeaderScroll.d.ts +9 -9
- package/lib/Tabs/hook/useHeaderScroll.js +89 -89
- package/lib/Tabs/index.d.ts +4 -4
- package/lib/Tabs/index.js +7 -7
- package/lib/Tabs/interface.d.ts +213 -213
- package/lib/Tabs/interface.js +2 -2
- package/lib/Tabs/style/index.d.ts +3 -3
- package/lib/Tabs/style/index.js +5 -5
- package/lib/Tabs/tab-content.d.ts +9 -9
- package/lib/Tabs/tab-content.js +59 -59
- package/lib/Tabs/tab-header/dropdown-icon.d.ts +1 -1
- package/lib/Tabs/tab-header/dropdown-icon.js +79 -79
- package/lib/Tabs/tab-header/index.d.ts +4 -4
- package/lib/Tabs/tab-header/index.js +329 -329
- package/lib/Tabs/tab-header/tab-ink.d.ts +11 -11
- package/lib/Tabs/tab-header/tab-ink.js +82 -82
- package/lib/Tabs/tab-header/tab-nav-icon.d.ts +17 -17
- package/lib/Tabs/tab-header/tab-nav-icon.js +103 -103
- package/lib/Tabs/tab-header/tab-title.d.ts +17 -17
- package/lib/Tabs/tab-header/tab-title.js +61 -61
- package/lib/Tabs/tab-pane.d.ts +8 -8
- package/lib/Tabs/tab-pane.js +62 -62
- package/lib/Tabs/tabs.d.ts +18 -18
- package/lib/Tabs/tabs.js +178 -178
- package/lib/Tabs/utils.d.ts +12 -12
- package/lib/Tabs/utils.js +43 -43
- package/lib/Tag/index.d.ts +5 -5
- package/lib/Tag/index.js +159 -159
- package/lib/Tag/interface.d.ts +72 -72
- package/lib/Tag/interface.js +2 -2
- package/lib/Tag/style/index.d.ts +2 -2
- package/lib/Tag/style/index.js +4 -4
- package/lib/TimePicker/context.d.ts +7 -7
- package/lib/TimePicker/context.js +4 -4
- package/lib/TimePicker/index.d.ts +4 -4
- package/lib/TimePicker/index.js +54 -54
- package/lib/TimePicker/interface.d.ts +244 -244
- package/lib/TimePicker/interface.js +2 -2
- package/lib/TimePicker/picker.d.ts +15 -15
- package/lib/TimePicker/picker.js +247 -247
- package/lib/TimePicker/range-picker.d.ts +12 -12
- package/lib/TimePicker/range-picker.js +80 -80
- package/lib/TimePicker/style/index.d.ts +5 -5
- package/lib/TimePicker/style/index.js +7 -7
- package/lib/TimePicker/time-column.d.ts +17 -17
- package/lib/TimePicker/time-column.js +80 -80
- package/lib/TimePicker/time-picker.d.ts +24 -24
- package/lib/TimePicker/time-picker.js +260 -260
- package/lib/TimePicker/util.d.ts +7 -7
- package/lib/TimePicker/util.js +64 -64
- package/lib/Timeline/index.d.ts +3 -3
- package/lib/Timeline/index.js +7 -7
- package/lib/Timeline/interface.d.ts +95 -95
- package/lib/Timeline/interface.js +2 -2
- package/lib/Timeline/item.d.ts +7 -7
- package/lib/Timeline/item.js +91 -91
- package/lib/Timeline/style/index.d.ts +2 -2
- package/lib/Timeline/style/index.js +4 -4
- package/lib/Timeline/timeline.d.ts +10 -10
- package/lib/Timeline/timeline.js +121 -121
- package/lib/Tooltip/index.d.ts +10 -10
- package/lib/Tooltip/index.js +114 -114
- package/lib/Tooltip/interface.d.ts +92 -92
- package/lib/Tooltip/interface.js +2 -2
- package/lib/Tooltip/style/index.d.ts +3 -3
- package/lib/Tooltip/style/index.js +5 -5
- package/lib/Transfer/index.d.ts +5 -5
- package/lib/Transfer/index.js +247 -247
- package/lib/Transfer/interface.d.ts +225 -225
- package/lib/Transfer/interface.js +2 -2
- package/lib/Transfer/item.d.ts +3 -3
- package/lib/Transfer/item.js +141 -141
- package/lib/Transfer/list.d.ts +5 -5
- package/lib/Transfer/list.js +178 -178
- package/lib/Transfer/style/index.d.ts +6 -6
- package/lib/Transfer/style/index.js +8 -8
- package/lib/Tree/animation.d.ts +7 -7
- package/lib/Tree/animation.js +143 -143
- package/lib/Tree/context.d.ts +27 -27
- package/lib/Tree/context.js +5 -5
- package/lib/Tree/index.d.ts +73 -73
- package/lib/Tree/index.js +774 -774
- package/lib/Tree/interface.d.ts +344 -344
- package/lib/Tree/interface.js +2 -2
- package/lib/Tree/node-list.d.ts +3 -3
- package/lib/Tree/node-list.js +149 -149
- package/lib/Tree/node.d.ts +12 -12
- package/lib/Tree/node.js +292 -292
- package/lib/Tree/style/index.d.ts +3 -3
- package/lib/Tree/style/index.js +5 -5
- package/lib/Tree/util.d.ts +13 -13
- package/lib/Tree/util.js +179 -179
- package/lib/TreeSelect/hook/useKeyCache.d.ts +6 -6
- package/lib/TreeSelect/hook/useKeyCache.js +88 -88
- package/lib/TreeSelect/hook/useStateValue.d.ts +19 -19
- package/lib/TreeSelect/hook/useStateValue.js +146 -146
- package/lib/TreeSelect/hook/useTreeData.d.ts +3 -3
- package/lib/TreeSelect/hook/useTreeData.js +39 -39
- package/lib/TreeSelect/index.d.ts +4 -4
- package/lib/TreeSelect/index.js +7 -7
- package/lib/TreeSelect/interface.d.ts +211 -211
- package/lib/TreeSelect/interface.js +13 -13
- package/lib/TreeSelect/style/index.d.ts +5 -5
- package/lib/TreeSelect/style/index.js +7 -7
- package/lib/TreeSelect/tree-list.d.ts +12 -12
- package/lib/TreeSelect/tree-list.js +168 -168
- package/lib/TreeSelect/tree-select.d.ts +12 -12
- package/lib/TreeSelect/tree-select.js +367 -367
- package/lib/TreeSelect/utils.d.ts +1 -1
- package/lib/TreeSelect/utils.js +17 -17
- package/lib/Trigger/getPopupStyle.d.ts +20 -20
- package/lib/Trigger/getPopupStyle.js +398 -398
- package/lib/Trigger/index.d.ts +123 -123
- package/lib/Trigger/index.js +942 -942
- package/lib/Trigger/interface.d.ts +246 -246
- package/lib/Trigger/interface.js +2 -2
- package/lib/Trigger/portal.d.ts +8 -8
- package/lib/Trigger/portal.js +29 -29
- package/lib/Trigger/style/index.d.ts +2 -2
- package/lib/Trigger/style/index.js +4 -4
- package/lib/Typography/base.d.ts +6 -6
- package/lib/Typography/base.js +241 -241
- package/lib/Typography/edit-content.d.ts +4 -4
- package/lib/Typography/edit-content.js +54 -54
- package/lib/Typography/ellipsis.d.ts +6 -6
- package/lib/Typography/ellipsis.js +228 -228
- package/lib/Typography/index.d.ts +13 -13
- package/lib/Typography/index.js +16 -16
- package/lib/Typography/interface.d.ts +262 -262
- package/lib/Typography/interface.js +2 -2
- package/lib/Typography/operations.d.ts +3 -3
- package/lib/Typography/operations.js +113 -113
- package/lib/Typography/paragraph.d.ts +4 -4
- package/lib/Typography/paragraph.js +49 -49
- package/lib/Typography/style/index.d.ts +5 -5
- package/lib/Typography/style/index.js +7 -7
- package/lib/Typography/text.d.ts +3 -3
- package/lib/Typography/text.js +43 -43
- package/lib/Typography/title.d.ts +4 -4
- package/lib/Typography/title.js +55 -55
- package/lib/Typography/typography.d.ts +4 -4
- package/lib/Typography/typography.js +37 -37
- package/lib/Typography/useCssEllipsis.d.ts +6 -6
- package/lib/Typography/useCssEllipsis.js +71 -71
- package/lib/Typography/useEllipsis.d.ts +21 -21
- package/lib/Typography/useEllipsis.js +242 -242
- package/lib/Upload/index.d.ts +3 -3
- package/lib/Upload/index.js +7 -7
- package/lib/Upload/interface.d.ts +337 -337
- package/lib/Upload/interface.js +9 -9
- package/lib/Upload/list/index.d.ts +6 -6
- package/lib/Upload/list/index.js +151 -151
- package/lib/Upload/list/pictureItem.d.ts +9 -9
- package/lib/Upload/list/pictureItem.js +81 -81
- package/lib/Upload/list/textItem.d.ts +9 -9
- package/lib/Upload/list/textItem.js +127 -127
- package/lib/Upload/list/uploadProgress.d.ts +14 -14
- package/lib/Upload/list/uploadProgress.js +84 -84
- package/lib/Upload/request.d.ts +3 -3
- package/lib/Upload/request.js +66 -66
- package/lib/Upload/style/index.d.ts +6 -6
- package/lib/Upload/style/index.js +8 -8
- package/lib/Upload/trigger-node.d.ts +6 -6
- package/lib/Upload/trigger-node.js +156 -156
- package/lib/Upload/upload.d.ts +12 -12
- package/lib/Upload/upload.js +249 -249
- package/lib/Upload/uploader.d.ts +28 -28
- package/lib/Upload/uploader.js +261 -261
- package/lib/Upload/util.d.ts +4 -4
- package/lib/Upload/util.js +120 -120
- package/lib/VerificationCode/index.d.ts +4 -4
- package/lib/VerificationCode/index.js +7 -7
- package/lib/VerificationCode/interface.d.ts +80 -80
- package/lib/VerificationCode/interface.js +2 -2
- package/lib/VerificationCode/style/index.d.ts +3 -3
- package/lib/VerificationCode/style/index.js +5 -5
- package/lib/VerificationCode/verification-code.d.ts +5 -5
- package/lib/VerificationCode/verification-code.js +105 -105
- package/lib/Watermark/index.d.ts +4 -4
- package/lib/Watermark/index.js +7 -7
- package/lib/Watermark/interface.d.ts +70 -70
- package/lib/Watermark/interface.js +2 -2
- package/lib/Watermark/style/index.d.ts +1 -1
- package/lib/Watermark/style/index.js +3 -3
- package/lib/Watermark/watermark.d.ts +5 -5
- package/lib/Watermark/watermark.js +93 -93
- package/lib/_class/Draggable/index.d.ts +2 -2
- package/lib/_class/Draggable/index.js +60 -60
- package/lib/_class/Draggable/interface.d.ts +24 -24
- package/lib/_class/Draggable/interface.js +2 -2
- package/lib/_class/Draggable/item.d.ts +3 -3
- package/lib/_class/Draggable/item.js +112 -112
- package/lib/_class/OverflowEllipsis/OverflowItem.d.ts +10 -10
- package/lib/_class/OverflowEllipsis/OverflowItem.js +48 -48
- package/lib/_class/OverflowEllipsis/index.d.ts +11 -11
- package/lib/_class/OverflowEllipsis/index.js +134 -134
- package/lib/_class/VirtualList/Filler.d.ts +15 -15
- package/lib/_class/VirtualList/Filler.js +51 -51
- package/lib/_class/VirtualList/index.d.ts +39 -39
- package/lib/_class/VirtualList/index.js +509 -509
- package/lib/_class/VirtualList/utils/algorithmUtil.d.ts +23 -23
- package/lib/_class/VirtualList/utils/algorithmUtil.js +75 -75
- package/lib/_class/VirtualList/utils/itemUtil.d.ts +75 -75
- package/lib/_class/VirtualList/utils/itemUtil.js +147 -147
- package/lib/_class/icon-hover.d.ts +10 -10
- package/lib/_class/icon-hover.js +61 -61
- package/lib/_class/notice.d.ts +50 -50
- package/lib/_class/notice.js +194 -194
- package/lib/_class/notification.d.ts +15 -15
- package/lib/_class/notification.js +95 -95
- package/lib/_class/picker/input-range.d.ts +35 -35
- package/lib/_class/picker/input-range.js +197 -197
- package/lib/_class/picker/input.d.ts +31 -31
- package/lib/_class/picker/input.js +138 -138
- package/lib/_class/select-view.d.ts +158 -158
- package/lib/_class/select-view.js +392 -392
- package/lib/_hooks/useVerificationCode/index.d.ts +2 -2
- package/lib/_hooks/useVerificationCode/index.js +125 -125
- package/lib/_hooks/useVerificationCode/interface.d.ts +63 -63
- package/lib/_hooks/useVerificationCode/interface.js +2 -2
- package/lib/_hooks/useWatermark/index.d.ts +2 -2
- package/lib/_hooks/useWatermark/index.js +313 -313
- package/lib/_hooks/useWatermark/interface.d.ts +81 -81
- package/lib/_hooks/useWatermark/interface.js +2 -2
- package/lib/_hooks/useWatermark/utils.d.ts +1 -1
- package/lib/_hooks/useWatermark/utils.js +19 -19
- package/lib/_util/CSSTransition.d.ts +2 -2
- package/lib/_util/CSSTransition.js +107 -107
- package/lib/_util/classNames.d.ts +5 -5
- package/lib/_util/classNames.js +67 -67
- package/lib/_util/clipboard.d.ts +1 -1
- package/lib/_util/clipboard.js +86 -86
- package/lib/_util/color.d.ts +27 -27
- package/lib/_util/color.js +202 -202
- package/lib/_util/constant.d.ts +3 -3
- package/lib/_util/constant.js +26 -26
- package/lib/_util/contextHolder.d.ts +9 -9
- package/lib/_util/contextHolder.js +68 -68
- package/lib/_util/dayjs.d.ts +21 -21
- package/lib/_util/dayjs.js +311 -311
- package/lib/_util/dom.d.ts +12 -12
- package/lib/_util/dom.js +70 -70
- package/lib/_util/fillNBSP.d.ts +1 -1
- package/lib/_util/fillNBSP.js +9 -9
- package/lib/_util/getHighlightText.d.ts +5 -5
- package/lib/_util/getHighlightText.js +57 -57
- package/lib/_util/getHotkeyHandler.d.ts +16 -16
- package/lib/_util/getHotkeyHandler.js +38 -38
- package/lib/_util/getStringLength.d.ts +1 -1
- package/lib/_util/getStringLength.js +16 -16
- package/lib/_util/hooks/useComputedState.d.ts +4 -4
- package/lib/_util/hooks/useComputedState.js +28 -28
- package/lib/_util/hooks/useCreate.d.ts +1 -1
- package/lib/_util/hooks/useCreate.js +30 -30
- package/lib/_util/hooks/useForceUpdate.d.ts +2 -2
- package/lib/_util/hooks/useForceUpdate.js +24 -24
- package/lib/_util/hooks/useId.d.ts +6 -6
- package/lib/_util/hooks/useId.js +36 -36
- package/lib/_util/hooks/useInView.d.ts +11 -11
- package/lib/_util/hooks/useInView.js +81 -81
- package/lib/_util/hooks/useIntersectionObserver.d.ts +7 -7
- package/lib/_util/hooks/useIntersectionObserver.js +32 -32
- package/lib/_util/hooks/useInterval.d.ts +1 -1
- package/lib/_util/hooks/useInterval.js +33 -33
- package/lib/_util/hooks/useIsFirstRender.d.ts +1 -1
- package/lib/_util/hooks/useIsFirstRender.js +11 -11
- package/lib/_util/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/lib/_util/hooks/useIsomorphicLayoutEffect.js +8 -8
- package/lib/_util/hooks/useKeyboardEvent.d.ts +14 -14
- package/lib/_util/hooks/useKeyboardEvent.js +32 -32
- package/lib/_util/hooks/useMergeProps.d.ts +4 -4
- package/lib/_util/hooks/useMergeProps.js +37 -37
- package/lib/_util/hooks/useMergeValue.d.ts +5 -5
- package/lib/_util/hooks/useMergeValue.js +50 -50
- package/lib/_util/hooks/useOverflowHidden.d.ts +5 -5
- package/lib/_util/hooks/useOverflowHidden.js +46 -46
- package/lib/_util/hooks/useOverrideRef.d.ts +5 -5
- package/lib/_util/hooks/useOverrideRef.js +40 -40
- package/lib/_util/hooks/usePersistCallback.d.ts +1 -1
- package/lib/_util/hooks/usePersistCallback.js +43 -43
- package/lib/_util/hooks/usePrevious.d.ts +2 -2
- package/lib/_util/hooks/usePrevious.js +11 -11
- package/lib/_util/hooks/useRefs.d.ts +1 -1
- package/lib/_util/hooks/useRefs.js +18 -18
- package/lib/_util/hooks/useResizeObserver.d.ts +6 -6
- package/lib/_util/hooks/useResizeObserver.js +31 -31
- package/lib/_util/hooks/useStateCallback.d.ts +5 -5
- package/lib/_util/hooks/useStateCallback.js +32 -32
- package/lib/_util/hooks/useStateWithPromise.d.ts +2 -2
- package/lib/_util/hooks/useStateWithPromise.js +49 -49
- package/lib/_util/hooks/useUpdate.d.ts +2 -2
- package/lib/_util/hooks/useUpdate.js +16 -16
- package/lib/_util/hooks/useWatch.d.ts +2 -2
- package/lib/_util/hooks/useWatch.js +16 -16
- package/lib/_util/include.d.ts +1 -1
- package/lib/_util/include.js +13 -13
- package/lib/_util/is.d.ts +27 -27
- package/lib/_util/is.js +159 -159
- package/lib/_util/keycode.d.ts +36 -36
- package/lib/_util/keycode.js +40 -40
- package/lib/_util/mergeProps.d.ts +1 -1
- package/lib/_util/mergeProps.js +26 -26
- package/lib/_util/mergedToString.d.ts +2 -2
- package/lib/_util/mergedToString.js +26 -26
- package/lib/_util/omit.d.ts +1 -1
- package/lib/_util/omit.js +25 -25
- package/lib/_util/pad.d.ts +2 -2
- package/lib/_util/pad.js +23 -23
- package/lib/_util/pick.d.ts +4 -4
- package/lib/_util/pick.js +30 -30
- package/lib/_util/raf.d.ts +3 -3
- package/lib/_util/raf.js +33 -33
- package/lib/_util/react-dom.d.ts +13 -13
- package/lib/_util/react-dom.js +113 -113
- package/lib/_util/resizeObserver.d.ts +21 -21
- package/lib/_util/resizeObserver.js +114 -114
- package/lib/_util/responsiveObserve.d.ts +15 -15
- package/lib/_util/responsiveObserve.js +88 -88
- package/lib/_util/scrollIntoView.d.ts +2 -2
- package/lib/_util/scrollIntoView.js +33 -33
- package/lib/_util/style.d.ts +3 -3
- package/lib/_util/style.js +44 -44
- package/lib/_util/throttleByRaf.d.ts +4 -4
- package/lib/_util/throttleByRaf.js +48 -48
- package/lib/_util/throttleByRafV2.d.ts +4 -4
- package/lib/_util/throttleByRafV2.js +52 -52
- package/lib/_util/type.d.ts +4 -4
- package/lib/_util/type.js +2 -2
- package/lib/_util/warning.d.ts +1 -1
- package/lib/_util/warning.js +14 -14
- package/lib/index.d.ts +142 -142
- package/lib/index.js +150 -150
- package/lib/locale/ar-EG.d.ts +228 -228
- package/lib/locale/ar-EG.js +169 -169
- package/lib/locale/de-DE.d.ts +228 -228
- package/lib/locale/de-DE.js +167 -167
- package/lib/locale/default.d.ts +2 -2
- package/lib/locale/default.js +7 -7
- package/lib/locale/en-US.d.ts +234 -234
- package/lib/locale/en-US.js +174 -174
- package/lib/locale/es-ES.d.ts +228 -228
- package/lib/locale/es-ES.js +167 -167
- package/lib/locale/fr-FR.d.ts +228 -228
- package/lib/locale/fr-FR.js +167 -167
- package/lib/locale/id-ID.d.ts +228 -228
- package/lib/locale/id-ID.js +167 -167
- package/lib/locale/interface.d.ts +39 -39
- package/lib/locale/interface.js +2 -2
- package/lib/locale/it-IT.d.ts +228 -228
- package/lib/locale/it-IT.js +167 -167
- package/lib/locale/ja-JP.d.ts +281 -281
- package/lib/locale/ja-JP.js +220 -220
- package/lib/locale/ko-KR.d.ts +228 -228
- package/lib/locale/ko-KR.js +167 -167
- package/lib/locale/ms-MY.d.ts +228 -228
- package/lib/locale/ms-MY.js +167 -167
- package/lib/locale/pt-BR.d.ts +228 -228
- package/lib/locale/pt-BR.js +167 -167
- package/lib/locale/pt-PT.d.ts +228 -228
- package/lib/locale/pt-PT.js +167 -167
- package/lib/locale/ru-RU.d.ts +228 -228
- package/lib/locale/ru-RU.js +167 -167
- package/lib/locale/th-TH.d.ts +228 -228
- package/lib/locale/th-TH.js +167 -167
- package/lib/locale/tr-TR.d.ts +229 -229
- package/lib/locale/tr-TR.js +169 -169
- package/lib/locale/vi-VN.d.ts +228 -228
- package/lib/locale/vi-VN.js +168 -168
- package/lib/locale/zh-CN.d.ts +281 -281
- package/lib/locale/zh-CN.js +221 -221
- package/lib/locale/zh-HK.d.ts +281 -281
- package/lib/locale/zh-HK.js +221 -221
- package/lib/locale/zh-TW.d.ts +281 -281
- package/lib/locale/zh-TW.js +220 -220
- package/package.json +5 -16
package/es/Trigger/index.js
CHANGED
|
@@ -1,917 +1,917 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
import React, { PureComponent, createRef, } from 'react';
|
|
28
|
-
import ResizeObserverPolyfill from 'resize-observer-polyfill';
|
|
29
|
-
import { CSSTransition } from 'react-transition-group';
|
|
30
|
-
import { callbackOriginRef, findDOMNode } from '../_util/react-dom';
|
|
31
|
-
import { on, off, contains, getScrollElements, isScrollElement } from '../_util/dom';
|
|
32
|
-
import { isFunction, isObject, isArray, supportRef } from '../_util/is';
|
|
33
|
-
import { pickDataAttributes } from '../_util/pick';
|
|
34
|
-
import { Esc } from '../_util/keycode';
|
|
35
|
-
import Portal from './portal';
|
|
36
|
-
import ResizeObserver from '../_util/resizeObserver';
|
|
37
|
-
import cs from '../_util/classNames';
|
|
38
|
-
import { ConfigContext } from '../ConfigProvider';
|
|
39
|
-
import getStyle, { getBoundingClientRect } from './getPopupStyle';
|
|
40
|
-
import throttleByRaf from '../_util/throttleByRaf';
|
|
41
|
-
import { raf, caf } from '../_util/raf';
|
|
42
|
-
import mergeProps from '../_util/mergeProps';
|
|
43
|
-
function getDOMPos(dom, options) {
|
|
44
|
-
if (!dom) {
|
|
45
|
-
return {};
|
|
46
|
-
}
|
|
47
|
-
var _a = getBoundingClientRect(dom, options), width = _a.width, height = _a.height, left = _a.left, right = _a.right;
|
|
48
|
-
return {
|
|
49
|
-
width: width,
|
|
50
|
-
height: height,
|
|
51
|
-
left: left,
|
|
52
|
-
right: right,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export var EventsByTriggerNeed = [
|
|
56
|
-
'onClick',
|
|
57
|
-
'onMouseEnter',
|
|
58
|
-
'onMouseLeave',
|
|
59
|
-
'onMouseMove',
|
|
60
|
-
'onFocus',
|
|
61
|
-
'onBlur',
|
|
62
|
-
'onContextMenu',
|
|
63
|
-
'onKeyDown',
|
|
64
|
-
];
|
|
65
|
-
function splitChildrenStyle(obj, keys) {
|
|
66
|
-
var picked = {};
|
|
67
|
-
var omitted = __assign({}, obj);
|
|
68
|
-
keys.forEach(function (key) {
|
|
69
|
-
if (obj && key in obj) {
|
|
70
|
-
picked[key] = obj[key];
|
|
71
|
-
delete omitted[key];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return { picked: picked, omitted: omitted };
|
|
75
|
-
}
|
|
76
|
-
var defaultProps = {
|
|
77
|
-
blurToHide: true,
|
|
78
|
-
// clickToClose: true,
|
|
79
|
-
classNames: 'fadeIn',
|
|
80
|
-
trigger: 'hover',
|
|
81
|
-
position: 'bottom',
|
|
82
|
-
duration: 200,
|
|
83
|
-
unmountOnExit: true,
|
|
84
|
-
popupAlign: {},
|
|
85
|
-
popupHoverStay: true,
|
|
86
|
-
clickOutsideToClose: true,
|
|
87
|
-
escToClose: false,
|
|
88
|
-
mouseLeaveToClose: true,
|
|
89
|
-
containerScrollToClose: false,
|
|
90
|
-
getDocument: function () { return window.document; },
|
|
91
|
-
autoFixPosition: true,
|
|
92
|
-
mouseEnterDelay: 100,
|
|
93
|
-
mouseLeaveDelay: 100,
|
|
94
|
-
autoFitPosition: true,
|
|
95
|
-
};
|
|
96
|
-
var Trigger = /** @class */ (function (_super) {
|
|
97
|
-
__extends(Trigger, _super);
|
|
98
|
-
function Trigger(props, context) {
|
|
99
|
-
var _this = _super.call(this, props, context) || this;
|
|
100
|
-
_this.delayTimer = null;
|
|
101
|
-
_this.updatePositionTimer = null;
|
|
102
|
-
// is popup open?
|
|
103
|
-
_this.popupOpen = false;
|
|
104
|
-
// if mousedown to hide popup, ignore onFocus
|
|
105
|
-
_this.mousedownToHide = false;
|
|
106
|
-
_this.hasPopupMouseDown = false;
|
|
107
|
-
_this.unmount = false;
|
|
108
|
-
_this.isDidMount = false;
|
|
109
|
-
// 保存鼠标的位置
|
|
110
|
-
_this.mouseLocation = {
|
|
111
|
-
clientX: 0,
|
|
112
|
-
clientY: 0,
|
|
113
|
-
};
|
|
114
|
-
// 保存当前的mount container dom元素
|
|
115
|
-
_this.observerContainer = null;
|
|
116
|
-
// 保存当前节点到 popupContainer 间的所有滚动元素
|
|
117
|
-
_this.scrollElements = null;
|
|
118
|
-
// container 触发 resize时执行
|
|
119
|
-
_this.resizeObserver = new ResizeObserverPolyfill(function () {
|
|
120
|
-
_this.handleUpdatePosition();
|
|
121
|
-
});
|
|
122
|
-
_this.childrenDom = null;
|
|
123
|
-
// 保存children节点的尺寸。 主要用于在弹出层动画前和动画完成后比较尺寸是否有变化。
|
|
124
|
-
_this.childrenDomSize = {};
|
|
125
|
-
_this.getMergedProps = function (basePropsOrKeys) {
|
|
126
|
-
var componentConfig = _this.context.componentConfig;
|
|
127
|
-
var props = mergeProps(basePropsOrKeys && isObject(basePropsOrKeys) ? basePropsOrKeys : _this.props, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.Trigger, basePropsOrKeys && isArray(basePropsOrKeys) ? basePropsOrKeys : undefined);
|
|
128
|
-
return props;
|
|
129
|
-
};
|
|
130
|
-
_this.getRootElement = function () {
|
|
131
|
-
var _a, _b;
|
|
132
|
-
_this.childrenDom = findDOMNode(((_b = (_a = _this.props).getTargetDOMNode) === null || _b === void 0 ? void 0 : _b.call(_a)) || _this.rootElementRef, _this);
|
|
133
|
-
return _this.childrenDom;
|
|
134
|
-
};
|
|
135
|
-
_this.getPopupElement = function () {
|
|
136
|
-
var _a;
|
|
137
|
-
return ((_a = _this.triggerRef) === null || _a === void 0 ? void 0 : _a.current) || null;
|
|
138
|
-
};
|
|
139
|
-
_this.offScrollListeners = function () {
|
|
140
|
-
(_this.scrollElements || []).forEach(function (item) {
|
|
141
|
-
off(item, 'scroll', _this.handleScroll);
|
|
142
|
-
});
|
|
143
|
-
_this.scrollElements = null;
|
|
144
|
-
};
|
|
145
|
-
_this.offWindowResize = function () {
|
|
146
|
-
_this.handleWindowResize = false;
|
|
147
|
-
off(window, 'resize', _this.handleUpdatePosition);
|
|
148
|
-
};
|
|
149
|
-
_this.offContainerResize = function () {
|
|
150
|
-
if (_this.resizeObserver && _this.observerContainer) {
|
|
151
|
-
_this.resizeObserver.unobserve(_this.observerContainer);
|
|
152
|
-
_this.observerContainer = null;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
_this.handleScroll = function () {
|
|
156
|
-
var currentProps = _this.getMergedProps(['containerScrollToClose', 'updateOnScroll']);
|
|
157
|
-
if (currentProps.containerScrollToClose) {
|
|
158
|
-
_this.setPopupVisible(false);
|
|
159
|
-
}
|
|
160
|
-
else if (currentProps.updateOnScroll) {
|
|
161
|
-
_this.handleUpdatePosition();
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
_this.onContainersScroll = function (props) {
|
|
165
|
-
var _a, _b;
|
|
166
|
-
if (_this.scrollElements) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
_this.scrollElements = getScrollElements(_this.childrenDom, (_a = _this.popupContainer) === null || _a === void 0 ? void 0 : _a.parentNode);
|
|
170
|
-
// 弹出层挂载载 body 且 body 不是滚动元素时,需要额外检测 document.documentElement 是否是滚动元素
|
|
171
|
-
// 默认 html,body 不限制宽高时,滚动事件仅能在 window 上监听
|
|
172
|
-
// fix: https://github.com/arco-design/arco-design/issues/1599
|
|
173
|
-
if (props.containerScrollToClose &&
|
|
174
|
-
((_b = _this.popupContainer) === null || _b === void 0 ? void 0 : _b.parentNode) === document.body &&
|
|
175
|
-
_this.scrollElements.indexOf(document.body) === -1 &&
|
|
176
|
-
isScrollElement(document.documentElement)) {
|
|
177
|
-
_this.scrollElements.push(window);
|
|
178
|
-
}
|
|
179
|
-
_this.scrollElements.forEach(function (item) {
|
|
180
|
-
on(item, 'scroll', _this.handleScroll);
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
_this.onContainerResize = function () {
|
|
184
|
-
var _a;
|
|
185
|
-
// containerParent 相当于是通过getPopupContainer传入的节点
|
|
186
|
-
// 因为 this.popupContainer 会被挂载到getPopupContainer返回的节点上
|
|
187
|
-
var containerParent = (_a = _this.popupContainer) === null || _a === void 0 ? void 0 : _a.parentNode;
|
|
188
|
-
if (_this.resizeObserver && _this.observerContainer !== containerParent) {
|
|
189
|
-
// 说明containerParent变了,取消之前的监听,监听新的container
|
|
190
|
-
_this.offContainerResize();
|
|
191
|
-
containerParent && _this.resizeObserver.observe(containerParent);
|
|
192
|
-
_this.observerContainer = containerParent;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
// getPopupContainer 改变时候触发
|
|
196
|
-
_this.handleUpdatePosition = throttleByRaf(function () {
|
|
197
|
-
_this.updatePopupPosition();
|
|
198
|
-
});
|
|
199
|
-
_this.isClickTrigger = function () {
|
|
200
|
-
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
201
|
-
return [].concat(trigger).indexOf('click') > -1;
|
|
202
|
-
};
|
|
203
|
-
_this.isFocusTrigger = function () {
|
|
204
|
-
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
205
|
-
return [].concat(trigger).indexOf('focus') > -1;
|
|
206
|
-
};
|
|
207
|
-
_this.isHoverTrigger = function () {
|
|
208
|
-
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
209
|
-
return [].concat(trigger).indexOf('hover') > -1;
|
|
210
|
-
};
|
|
211
|
-
_this.isContextMenuTrigger = function () {
|
|
212
|
-
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
213
|
-
return [].concat(trigger).indexOf('contextMenu') > -1;
|
|
214
|
-
};
|
|
215
|
-
// 是否在鼠标移出触发节点和popup的时候隐藏弹出层
|
|
216
|
-
_this.isMouseLeaveToClose = function () {
|
|
217
|
-
return _this.isHoverTrigger() && _this.getMergedProps(['mouseLeaveToClose']).mouseLeaveToClose;
|
|
218
|
-
};
|
|
219
|
-
// 是否在悬浮到popup的时候隐藏弹出层
|
|
220
|
-
_this.isPopupHoverHide = function () {
|
|
221
|
-
return _this.isHoverTrigger() && !_this.getMergedProps(['popupHoverStay']).popupHoverStay;
|
|
222
|
-
};
|
|
223
|
-
_this.isClickToHide = function () {
|
|
224
|
-
if (_this.isClickTrigger() || _this.isContextMenuTrigger()) {
|
|
225
|
-
var _a = _this.getMergedProps(['clickToClose']).clickToClose, clickToClose = _a === void 0 ? true : _a;
|
|
226
|
-
return clickToClose;
|
|
227
|
-
}
|
|
228
|
-
// 2.44.0 及之前版本 clickToClose 对 hover触发不生效。
|
|
229
|
-
// 2.44.1 之后只有在props直接传入clickToClose 时才生效于 hover 触发方式,避免如以下用法前后表现不一致
|
|
230
|
-
// <Trigger><Trigger trigger="click"><button>sss</button></a></Trigger></Trigger>
|
|
231
|
-
return _this.isHoverTrigger() && _this.props.clickToClose;
|
|
232
|
-
};
|
|
233
|
-
_this.isBlurToHide = function () {
|
|
234
|
-
return _this.isFocusTrigger() && _this.getMergedProps(['blurToHide']).blurToHide;
|
|
235
|
-
};
|
|
236
|
-
_this.clearTimer = function () {
|
|
237
|
-
if (_this.updatePositionTimer) {
|
|
238
|
-
if (_this.updatePositionTimer.cancel) {
|
|
239
|
-
_this.updatePositionTimer.cancel();
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
clearTimeout(_this.updatePositionTimer);
|
|
243
|
-
_this.updatePositionTimer = null;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (_this.delayTimer) {
|
|
247
|
-
clearTimeout(_this.delayTimer);
|
|
248
|
-
_this.delayTimer = null;
|
|
249
|
-
}
|
|
250
|
-
if (_this.mouseDownTimeout) {
|
|
251
|
-
clearTimeout(_this.mouseDownTimeout);
|
|
252
|
-
_this.mouseDownTimeout = null;
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
_this.offClickOutside = function () {
|
|
256
|
-
if (_this.handleClickOutside) {
|
|
257
|
-
var getDocument = _this.getMergedProps(['getDocument']).getDocument;
|
|
258
|
-
var root = isFunction(getDocument) && getDocument();
|
|
259
|
-
off(root, 'mousedown', _this.onClickOutside);
|
|
260
|
-
_this.handleClickOutside = false;
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
_this.getTransformOrigin = function (position) {
|
|
264
|
-
var _a, _b;
|
|
265
|
-
var content = _this.getPopupElement();
|
|
266
|
-
if (!content)
|
|
267
|
-
return {};
|
|
268
|
-
var _c = _this.getMergedProps(['showArrow', 'classNames']), showArrow = _c.showArrow, classNames = _c.classNames;
|
|
269
|
-
var top = (showArrow && ((_a = _this.arrowStyle) === null || _a === void 0 ? void 0 : _a.top)) || 0;
|
|
270
|
-
var left = (showArrow && ((_b = _this.arrowStyle) === null || _b === void 0 ? void 0 : _b.left)) || 0;
|
|
271
|
-
top = top ? top + "px" : '';
|
|
272
|
-
left = left ? left + "px" : '';
|
|
273
|
-
var transformOrigin = {
|
|
274
|
-
top: (left || '50%') + " 100% 0",
|
|
275
|
-
tl: (left || '15px') + " 100% 0",
|
|
276
|
-
tr: (left || content.clientWidth - 15 + "px") + " 100% 0",
|
|
277
|
-
bottom: (left || '50%') + " 0 0",
|
|
278
|
-
bl: (left || '15px') + " 0 0",
|
|
279
|
-
br: (left || content.clientWidth - 15 + "px") + " 0 0",
|
|
280
|
-
left: "100% " + (top || '50%') + " 0",
|
|
281
|
-
lt: "100% " + (top || '15px') + " 0",
|
|
282
|
-
lb: "100% " + (top || content.clientHeight - 15 + "px") + " 0",
|
|
283
|
-
right: "0 " + (top || '50%') + " 0",
|
|
284
|
-
rt: "0 " + (top || '15px') + " 0",
|
|
285
|
-
rb: "0 " + (top || content.clientHeight - 15 + "px") + " 0",
|
|
286
|
-
};
|
|
287
|
-
// tooltip popover popconfirm
|
|
288
|
-
if (classNames && classNames.indexOf('zoom') > -1) {
|
|
289
|
-
return {
|
|
290
|
-
transformOrigin: transformOrigin[position],
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
if (classNames === 'slideDynamicOrigin') {
|
|
294
|
-
var origin_1 = '0% 0%';
|
|
295
|
-
if (['top', 'tl', 'tr'].indexOf(position) > -1) {
|
|
296
|
-
origin_1 = '100% 100%';
|
|
297
|
-
}
|
|
298
|
-
return {
|
|
299
|
-
transformOrigin: origin_1,
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
return {};
|
|
303
|
-
};
|
|
304
|
-
// 下拉框存在初始translateY/translateX,需要根据真实的弹出位置确定
|
|
305
|
-
_this.getTransformTranslate = function () {
|
|
306
|
-
if (_this.getMergedProps(['classNames']).classNames !== 'slideDynamicOrigin') {
|
|
307
|
-
return '';
|
|
308
|
-
}
|
|
309
|
-
switch (_this.realPosition) {
|
|
310
|
-
case 'bottom':
|
|
311
|
-
case 'bl':
|
|
312
|
-
case 'br':
|
|
313
|
-
return 'scaleY(0.9) translateY(-4px)';
|
|
314
|
-
case 'top':
|
|
315
|
-
case 'tl':
|
|
316
|
-
case 'tr':
|
|
317
|
-
return 'scaleY(0.9) translateY(4px)';
|
|
318
|
-
default:
|
|
319
|
-
return '';
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
_this.getPopupStyle = function () {
|
|
323
|
-
if (_this.unmount || !_this.popupContainer) {
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
var mountContainer = _this.popupContainer;
|
|
327
|
-
var content = _this.triggerRef.current;
|
|
328
|
-
var child = _this.getRootElement();
|
|
329
|
-
// offsetParent=null when display:none or position: fixed
|
|
330
|
-
if (!child.offsetParent && !child.getClientRects().length) {
|
|
331
|
-
return _this.state.popupStyle;
|
|
332
|
-
}
|
|
333
|
-
var mergedProps = _this.getMergedProps();
|
|
334
|
-
var _a = getStyle(mergedProps, content, child, mountContainer, _this.mouseLocation), style = _a.style, arrowStyle = _a.arrowStyle, realPosition = _a.realPosition;
|
|
335
|
-
_this.realPosition = realPosition || mergedProps.position;
|
|
336
|
-
_this.arrowStyle = arrowStyle || {};
|
|
337
|
-
return __assign(__assign({}, style), _this.getTransformOrigin(_this.realPosition));
|
|
338
|
-
};
|
|
339
|
-
_this.showPopup = function (callback) {
|
|
340
|
-
if (callback === void 0) { callback = function () { }; }
|
|
341
|
-
var popupStyle = _this.getPopupStyle();
|
|
342
|
-
_this.setState({
|
|
343
|
-
popupStyle: popupStyle,
|
|
344
|
-
}, callback);
|
|
345
|
-
};
|
|
346
|
-
_this.update = throttleByRaf(function (callback) {
|
|
347
|
-
if (_this.unmount || !_this.state.popupVisible) {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
var popupStyle = _this.getPopupStyle();
|
|
351
|
-
_this.setState({
|
|
352
|
-
popupStyle: popupStyle,
|
|
353
|
-
}, function () {
|
|
354
|
-
callback === null || callback === void 0 ? void 0 : callback();
|
|
355
|
-
});
|
|
356
|
-
});
|
|
357
|
-
_this.getRootDOMNode = function () {
|
|
358
|
-
return _this.getRootElement();
|
|
359
|
-
};
|
|
360
|
-
_this.updatePopupPosition = function (delay, callback) {
|
|
361
|
-
if (delay === void 0) { delay = 0; }
|
|
362
|
-
var currentVisible = _this.state.popupVisible;
|
|
363
|
-
if (!currentVisible) {
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
if (delay < 4) {
|
|
367
|
-
_this.updatePositionTimer = _this.update(callback);
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
_this.updatePositionTimer = setTimeout(function () {
|
|
371
|
-
var popupStyle = _this.getPopupStyle();
|
|
372
|
-
_this.setState({
|
|
373
|
-
popupStyle: popupStyle,
|
|
374
|
-
}, function () {
|
|
375
|
-
callback === null || callback === void 0 ? void 0 : callback();
|
|
376
|
-
});
|
|
377
|
-
}, delay);
|
|
378
|
-
};
|
|
379
|
-
_this.setPopupVisible = function (visible, delay, callback) {
|
|
380
|
-
if (delay === void 0) { delay = 0; }
|
|
381
|
-
var mergedProps = _this.getMergedProps(['onVisibleChange', 'popupVisible']);
|
|
382
|
-
var onVisibleChange = mergedProps.onVisibleChange;
|
|
383
|
-
var currentVisible = _this.state.popupVisible;
|
|
384
|
-
if (visible !== currentVisible) {
|
|
385
|
-
_this.delayToDo(delay, function () {
|
|
386
|
-
onVisibleChange && onVisibleChange(visible);
|
|
387
|
-
if (!('popupVisible' in mergedProps)) {
|
|
388
|
-
if (visible) {
|
|
389
|
-
_this.setState({
|
|
390
|
-
popupVisible: true,
|
|
391
|
-
}, function () {
|
|
392
|
-
_this.showPopup(callback);
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
_this.setState({
|
|
397
|
-
popupVisible: false,
|
|
398
|
-
}, function () {
|
|
399
|
-
callback === null || callback === void 0 ? void 0 : callback();
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
callback === null || callback === void 0 ? void 0 : callback();
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
else {
|
|
409
|
-
callback === null || callback === void 0 ? void 0 : callback();
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
_this.delayToDo = function (delay, callback) {
|
|
413
|
-
if (delay) {
|
|
414
|
-
_this.clearDelayTimer();
|
|
415
|
-
_this.delayTimer = setTimeout(function () {
|
|
416
|
-
callback();
|
|
417
|
-
_this.clearDelayTimer();
|
|
418
|
-
}, delay);
|
|
419
|
-
}
|
|
420
|
-
else {
|
|
421
|
-
callback();
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
// 点击非popup内部,非children内部的节点,触发clickoutside 逻辑
|
|
425
|
-
_this.onClickOutside = function (e) {
|
|
426
|
-
var _a = _this.getMergedProps([
|
|
427
|
-
'onClickOutside',
|
|
428
|
-
'clickOutsideToClose',
|
|
429
|
-
]), onClickOutside = _a.onClickOutside, clickOutsideToClose = _a.clickOutsideToClose;
|
|
430
|
-
var triggerNode = _this.getPopupElement();
|
|
431
|
-
var childrenDom = _this.getRootElement();
|
|
432
|
-
if (!contains(triggerNode, e.target) &&
|
|
433
|
-
!contains(childrenDom, e.target) &&
|
|
434
|
-
!_this.hasPopupMouseDown) {
|
|
435
|
-
onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside();
|
|
436
|
-
if (clickOutsideToClose) {
|
|
437
|
-
// 以下判断条件避免onVisibleChange触发两次
|
|
438
|
-
// blurToHide 为true时不需要执行,因为onBlur里会执行setPopupVisible
|
|
439
|
-
// hover 触发方式,不执行以下逻辑。因为mouseLeave里会执行setPopupVisible
|
|
440
|
-
if (!_this.isBlurToHide() && !_this.isHoverTrigger()) {
|
|
441
|
-
_this.setPopupVisible(false);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
_this.onKeyDown = function (e) {
|
|
447
|
-
var keyCode = e.keyCode || e.which;
|
|
448
|
-
_this.triggerPropsEvent('onKeyDown', e);
|
|
449
|
-
if (keyCode === Esc.code) {
|
|
450
|
-
_this.onPressEsc(e);
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
_this.onPressEsc = function (e) {
|
|
454
|
-
var escToClose = _this.getMergedProps(['escToClose']).escToClose;
|
|
455
|
-
if (escToClose && e && e.key === Esc.key && _this.state.popupVisible) {
|
|
456
|
-
_this.setPopupVisible(false);
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
_this.onMouseEnter = function (e) {
|
|
460
|
-
var mouseEnterDelay = _this.getMergedProps(['mouseEnterDelay']).mouseEnterDelay;
|
|
461
|
-
_this.triggerPropsEvent('onMouseEnter', e);
|
|
462
|
-
_this.clearDelayTimer();
|
|
463
|
-
_this.setPopupVisible(true, mouseEnterDelay || 0);
|
|
464
|
-
};
|
|
465
|
-
_this.onMouseMove = function (e) {
|
|
466
|
-
_this.triggerPropsEvent('onMouseMove', e);
|
|
467
|
-
_this.setMouseLocation(e);
|
|
468
|
-
if (_this.state.popupVisible) {
|
|
469
|
-
_this.update();
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
_this.onMouseLeave = function (e) {
|
|
473
|
-
var mouseLeaveDelay = _this.getMergedProps(['mouseLeaveDelay']).mouseLeaveDelay;
|
|
474
|
-
_this.clearDelayTimer();
|
|
475
|
-
_this.triggerPropsEvent('onMouseLeave', e);
|
|
476
|
-
if (_this.isMouseLeaveToClose()) {
|
|
477
|
-
if (_this.state.popupVisible) {
|
|
478
|
-
_this.setPopupVisible(false, mouseLeaveDelay || 0);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
_this.onPopupMouseEnter = function () {
|
|
483
|
-
_this.clearDelayTimer();
|
|
484
|
-
};
|
|
485
|
-
_this.onPopupMouseLeave = function (e) {
|
|
486
|
-
_this.onMouseLeave(e);
|
|
487
|
-
};
|
|
488
|
-
_this.setMouseLocation = function (e) {
|
|
489
|
-
if (_this.getMergedProps(['alignPoint']).alignPoint) {
|
|
490
|
-
_this.mouseLocation = {
|
|
491
|
-
clientX: e.clientX,
|
|
492
|
-
clientY: e.clientY,
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
_this.onContextMenu = function (e) {
|
|
497
|
-
e.preventDefault();
|
|
498
|
-
_this.triggerPropsEvent('onContextMenu', e);
|
|
499
|
-
_this.setMouseLocation(e);
|
|
500
|
-
if (!_this.state.popupVisible) {
|
|
501
|
-
_this.setPopupVisible(true, 0);
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
// 更新位置
|
|
505
|
-
_this.getMergedProps(['alignPoint']).alignPoint && _this.update();
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
_this.clickToHidePopup = function (e) {
|
|
509
|
-
var popupVisible = _this.state.popupVisible;
|
|
510
|
-
if (popupVisible) {
|
|
511
|
-
_this.mousedownToHide = true;
|
|
512
|
-
}
|
|
513
|
-
_this.triggerPropsEvent('onClick', e);
|
|
514
|
-
if (_this.isClickToHide() && popupVisible) {
|
|
515
|
-
_this.setPopupVisible(!popupVisible, 0);
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
_this.onClick = function (e) {
|
|
519
|
-
var popupVisible = _this.state.popupVisible;
|
|
520
|
-
if (popupVisible) {
|
|
521
|
-
_this.mousedownToHide = true;
|
|
522
|
-
}
|
|
523
|
-
_this.triggerPropsEvent('onClick', e);
|
|
524
|
-
_this.setMouseLocation(e);
|
|
525
|
-
if (!_this.isClickToHide() && popupVisible) {
|
|
526
|
-
return;
|
|
527
|
-
}
|
|
528
|
-
_this.setPopupVisible(!popupVisible, 0);
|
|
529
|
-
};
|
|
530
|
-
_this.onFocus = function (e) {
|
|
531
|
-
var focusDelay = _this.getMergedProps(['focusDelay']).focusDelay;
|
|
532
|
-
var onFocus = function () {
|
|
533
|
-
_this.triggerPropsEvent('onFocus', e);
|
|
534
|
-
};
|
|
535
|
-
_this.clearDelayTimer();
|
|
536
|
-
if (!_this.mousedownToHide) {
|
|
537
|
-
if (_this.state.popupVisible) {
|
|
538
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
539
|
-
}
|
|
540
|
-
else {
|
|
541
|
-
_this.setPopupVisible(true, focusDelay || 0, onFocus);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
_this.mousedownToHide = false;
|
|
545
|
-
};
|
|
546
|
-
_this.onBlur = function (e) {
|
|
547
|
-
_this.setPopupVisible(false, 200, function () { return _this.triggerPropsEvent('onBlur', e); });
|
|
548
|
-
};
|
|
549
|
-
_this.onResize = function () {
|
|
550
|
-
if (_this.getMergedProps(['autoFixPosition']).autoFixPosition && _this.state.popupVisible) {
|
|
551
|
-
_this.updatePopupPosition();
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
_this.onPopupMouseDown = function () {
|
|
555
|
-
_this.hasPopupMouseDown = true;
|
|
556
|
-
clearTimeout(_this.mouseDownTimeout);
|
|
557
|
-
_this.mouseDownTimeout = setTimeout(function () {
|
|
558
|
-
_this.hasPopupMouseDown = false;
|
|
559
|
-
}, 0);
|
|
560
|
-
};
|
|
561
|
-
// 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应
|
|
562
|
-
// 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式
|
|
563
|
-
_this.getChild = function () {
|
|
564
|
-
var _a;
|
|
565
|
-
var children = _this.props.children;
|
|
566
|
-
var element = children;
|
|
567
|
-
var elementType = (element && typeof element !== 'string' && element.type);
|
|
568
|
-
var child = children;
|
|
569
|
-
if (['string', 'number'].indexOf(typeof children) > -1 || React.Children.count(children) > 1) {
|
|
570
|
-
child = React.createElement("span", null, children);
|
|
571
|
-
}
|
|
572
|
-
else if (element &&
|
|
573
|
-
elementType &&
|
|
574
|
-
(elementType.__BYTE_BUTTON === true ||
|
|
575
|
-
elementType.__BYTE_CHECKBOX === true ||
|
|
576
|
-
elementType.__BYTE_SWITCH === true ||
|
|
577
|
-
elementType.__BYTE_RADIO === true ||
|
|
578
|
-
elementType === 'button') &&
|
|
579
|
-
element.props.disabled) {
|
|
580
|
-
// 从样式中提取出会影响布局的到上层 span 样式中。
|
|
581
|
-
var _b = splitChildrenStyle(element.props.style, [
|
|
582
|
-
'position',
|
|
583
|
-
'left',
|
|
584
|
-
'right',
|
|
585
|
-
'top',
|
|
586
|
-
'bottom',
|
|
587
|
-
'float',
|
|
588
|
-
'display',
|
|
589
|
-
'zIndex',
|
|
590
|
-
]), picked = _b.picked, omitted = _b.omitted;
|
|
591
|
-
child = (React.createElement("span", { className: (_a = element.props) === null || _a === void 0 ? void 0 : _a.className, style: __assign(__assign({ display: 'inline-block' }, picked), { cursor: 'not-allowed' }) }, React.cloneElement(element, {
|
|
592
|
-
style: __assign(__assign({}, omitted), { pointerEvents: 'none' }),
|
|
593
|
-
className: undefined,
|
|
594
|
-
})));
|
|
595
|
-
}
|
|
596
|
-
// 防止为空报错
|
|
597
|
-
return child || React.createElement("span", null);
|
|
598
|
-
};
|
|
599
|
-
// 创建的dom节点插入getPopupContainer。
|
|
600
|
-
_this.appendToContainer = function (node) {
|
|
601
|
-
caf(_this.rafId);
|
|
602
|
-
if (_this.isDidMount) {
|
|
603
|
-
var getGlobalPopupContainer = _this.context.getPopupContainer;
|
|
604
|
-
var getPopupContainer = _this.getMergedProps(['getPopupContainer']).getPopupContainer;
|
|
605
|
-
var gpc = getPopupContainer || getGlobalPopupContainer;
|
|
606
|
-
var rootElement = _this.getRootElement();
|
|
607
|
-
var parent_1 = gpc(rootElement);
|
|
608
|
-
if (parent_1) {
|
|
609
|
-
parent_1.appendChild(node);
|
|
610
|
-
return;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
_this.rafId = raf(function () {
|
|
614
|
-
_this.appendToContainer(node);
|
|
615
|
-
});
|
|
616
|
-
};
|
|
617
|
-
_this.getContainer = function () {
|
|
618
|
-
var popupContainer = document.createElement('div');
|
|
619
|
-
popupContainer.style.width = '100%';
|
|
620
|
-
popupContainer.style.position = 'absolute';
|
|
621
|
-
popupContainer.style.top = '0';
|
|
622
|
-
popupContainer.style.left = '0';
|
|
623
|
-
_this.popupContainer = popupContainer;
|
|
624
|
-
_this.appendToContainer(popupContainer);
|
|
625
|
-
return popupContainer;
|
|
626
|
-
};
|
|
627
|
-
// 1. 触发直接附加到 Trigger 上的事件,大多是Trigger直接嵌套Trigger的情况
|
|
628
|
-
// 2. 触发children上直接被附加的事件
|
|
629
|
-
_this.triggerPropsEvent = function (eventName, e) {
|
|
630
|
-
var child = _this.getChild();
|
|
631
|
-
var childHandler = child && child.props && child.props[eventName];
|
|
632
|
-
var handlerFn = _this.getMergedProps([eventName])[eventName];
|
|
633
|
-
if (isFunction(childHandler)) {
|
|
634
|
-
childHandler(e);
|
|
635
|
-
}
|
|
636
|
-
if (isFunction(handlerFn)) {
|
|
637
|
-
handlerFn(e);
|
|
638
|
-
}
|
|
639
|
-
};
|
|
640
|
-
// 触发 children/ trigger 组件上被附加的事件
|
|
641
|
-
_this.triggerOriginEvent = function (eventName) {
|
|
642
|
-
var child = _this.getChild();
|
|
643
|
-
var childHandler = child && child.props && child.props[eventName];
|
|
644
|
-
var propsHandler = _this.getMergedProps([eventName])[eventName];
|
|
645
|
-
if (isFunction(propsHandler) && isFunction(childHandler)) {
|
|
646
|
-
return function (e) {
|
|
647
|
-
childHandler(e);
|
|
648
|
-
propsHandler(e);
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
return childHandler || propsHandler;
|
|
652
|
-
};
|
|
653
|
-
var mergedProps = _this.getMergedProps(props);
|
|
654
|
-
var popupVisible = 'popupVisible' in mergedProps ? mergedProps.popupVisible : mergedProps.defaultPopupVisible;
|
|
655
|
-
_this.popupOpen = !!popupVisible;
|
|
656
|
-
_this.triggerRef = createRef();
|
|
657
|
-
_this.state = {
|
|
658
|
-
popupVisible: !!popupVisible,
|
|
659
|
-
popupStyle: {},
|
|
660
|
-
};
|
|
661
|
-
return _this;
|
|
662
|
-
}
|
|
663
|
-
Trigger.getDerivedStateFromProps = function (nextProps, state) {
|
|
664
|
-
if ('popupVisible' in nextProps && nextProps.popupVisible !== state.popupVisible) {
|
|
665
|
-
return {
|
|
666
|
-
popupVisible: nextProps.popupVisible,
|
|
667
|
-
};
|
|
668
|
-
}
|
|
669
|
-
return null;
|
|
670
|
-
};
|
|
671
|
-
Trigger.prototype.componentDidMount = function () {
|
|
672
|
-
this.componentDidUpdate(this.getMergedProps());
|
|
673
|
-
this.isDidMount = true;
|
|
674
|
-
this.unmount = false;
|
|
675
|
-
this.childrenDom = this.getRootElement();
|
|
676
|
-
if (this.state.popupVisible) {
|
|
677
|
-
this.childrenDomSize = getDOMPos(this.childrenDom, {
|
|
678
|
-
boundaryDistance: this.props.alignPoint ? undefined : this.props.boundaryDistance,
|
|
679
|
-
position: this.props.position,
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
};
|
|
683
|
-
Trigger.prototype.componentDidUpdate = function (_prevProps) {
|
|
684
|
-
var prevProps = this.getMergedProps(_prevProps);
|
|
685
|
-
var currentProps = this.getMergedProps();
|
|
686
|
-
if (!prevProps.popupVisible && currentProps.popupVisible) {
|
|
687
|
-
this.update();
|
|
688
|
-
}
|
|
689
|
-
var popupVisible = this.state.popupVisible;
|
|
690
|
-
this.popupOpen = popupVisible;
|
|
691
|
-
var getDocument = currentProps.getDocument;
|
|
692
|
-
if (!popupVisible) {
|
|
693
|
-
this.offClickOutside();
|
|
694
|
-
this.offContainerResize();
|
|
695
|
-
this.offWindowResize();
|
|
696
|
-
this.offScrollListeners();
|
|
697
|
-
return;
|
|
698
|
-
}
|
|
699
|
-
var rect = getDOMPos(this.childrenDom, {
|
|
700
|
-
boundaryDistance: this.props.alignPoint ? {} : this.props.boundaryDistance,
|
|
701
|
-
position: this.props.position,
|
|
702
|
-
});
|
|
703
|
-
// children节点的尺寸改变,主要是处理children 存在scale等动画属性,或者移动位置的时候,popup 的位置有问题
|
|
704
|
-
if (JSON.stringify(rect) !== JSON.stringify(this.childrenDomSize)) {
|
|
705
|
-
this.updatePopupPosition();
|
|
706
|
-
this.childrenDomSize = rect;
|
|
707
|
-
}
|
|
708
|
-
// popupVisible为true
|
|
709
|
-
this.onContainerResize();
|
|
710
|
-
if (currentProps.updateOnScroll || currentProps.containerScrollToClose) {
|
|
711
|
-
this.onContainersScroll(currentProps);
|
|
712
|
-
}
|
|
713
|
-
if (!this.handleWindowResize) {
|
|
714
|
-
on(window, 'resize', this.handleUpdatePosition);
|
|
715
|
-
this.handleWindowResize = true;
|
|
716
|
-
}
|
|
717
|
-
if (!this.handleClickOutside) {
|
|
718
|
-
var root = isFunction(getDocument) && getDocument();
|
|
719
|
-
if (root) {
|
|
720
|
-
// clickOutside 必须监听mousedown。
|
|
721
|
-
// 1. 如果事件目标元素在click后被移除,document.onclick被触发时已经没有该元素,会错误触发clickOutside逻辑,隐藏popup。
|
|
722
|
-
// 2. 点击label标签,会触发对应input元素的点击事件,导致触发clickOutside,隐藏popup。
|
|
723
|
-
on(root, 'mousedown', this.onClickOutside, {
|
|
724
|
-
capture: isObject(currentProps.clickOutsideToClose)
|
|
725
|
-
? currentProps.clickOutsideToClose.capture
|
|
726
|
-
: false,
|
|
727
|
-
});
|
|
728
|
-
this.handleClickOutside = true;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
|
-
Trigger.prototype.componentWillUnmount = function () {
|
|
733
|
-
this.unmount = true;
|
|
734
|
-
this.offClickOutside();
|
|
735
|
-
this.clearTimer();
|
|
736
|
-
this.offWindowResize();
|
|
737
|
-
this.offScrollListeners();
|
|
738
|
-
this.offContainerResize();
|
|
739
|
-
caf(this.rafId);
|
|
740
|
-
};
|
|
741
|
-
Trigger.prototype.clearDelayTimer = function () {
|
|
742
|
-
if (this.delayTimer) {
|
|
743
|
-
clearTimeout(this.delayTimer);
|
|
744
|
-
this.delayTimer = null;
|
|
745
|
-
}
|
|
746
|
-
};
|
|
747
|
-
Trigger.prototype.render = function () {
|
|
748
|
-
var _a, _b, _c;
|
|
749
|
-
var _this = this;
|
|
750
|
-
var _d;
|
|
751
|
-
var _e = this.getMergedProps(), children = _e.children, style = _e.style, className = _e.className, arrowProps = _e.arrowProps, disabled = _e.disabled, popup = _e.popup, classNames = _e.classNames, duration = _e.duration, unmountOnExit = _e.unmountOnExit, alignPoint = _e.alignPoint, autoAlignPopupWidth = _e.autoAlignPopupWidth, position = _e.position, childrenPrefix = _e.childrenPrefix, showArrow = _e.showArrow, dropdownPopupStyle = _e.popupStyle, __onExit = _e.__onExit, __onExited = _e.__onExited;
|
|
752
|
-
var isExistChildren = children || children === 0;
|
|
753
|
-
var _f = this.context, getPrefixCls = _f.getPrefixCls, zIndex = _f.zIndex, rtl = _f.rtl;
|
|
754
|
-
var _g = this.state, popupVisible = _g.popupVisible, popupStyle = _g.popupStyle;
|
|
755
|
-
if (!popup) {
|
|
756
|
-
return null;
|
|
757
|
-
}
|
|
758
|
-
var mergeProps = {};
|
|
759
|
-
var popupEventProps = {
|
|
760
|
-
onMouseDown: this.onPopupMouseDown,
|
|
761
|
-
};
|
|
762
|
-
if (this.isHoverTrigger() && !disabled) {
|
|
763
|
-
mergeProps.onMouseEnter = this.onMouseEnter;
|
|
764
|
-
mergeProps.onMouseLeave = this.onMouseLeave;
|
|
765
|
-
// https://github.com/arco-design/arco-design/issues/1804
|
|
766
|
-
// TODO: remove login in next major version
|
|
767
|
-
if (this.isClickToHide()) {
|
|
768
|
-
mergeProps.onClick = this.clickToHidePopup;
|
|
769
|
-
}
|
|
770
|
-
if (alignPoint) {
|
|
771
|
-
mergeProps.onMouseMove = this.onMouseMove;
|
|
772
|
-
}
|
|
773
|
-
if (!this.isPopupHoverHide()) {
|
|
774
|
-
popupEventProps.onMouseEnter = this.onPopupMouseEnter;
|
|
775
|
-
popupEventProps.onMouseLeave = this.onPopupMouseLeave;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
else {
|
|
779
|
-
mergeProps.onMouseEnter = this.triggerOriginEvent('onMouseEnter');
|
|
780
|
-
mergeProps.onMouseLeave = this.triggerOriginEvent('onMouseLeave');
|
|
781
|
-
}
|
|
782
|
-
if (this.isContextMenuTrigger() && !disabled) {
|
|
783
|
-
mergeProps.onContextMenu = this.onContextMenu;
|
|
784
|
-
mergeProps.onClick = this.clickToHidePopup;
|
|
785
|
-
}
|
|
786
|
-
else {
|
|
787
|
-
mergeProps.onContextMenu = this.triggerOriginEvent('onContextMenu');
|
|
788
|
-
}
|
|
789
|
-
if (this.isClickTrigger() && !disabled) {
|
|
790
|
-
mergeProps.onClick = this.onClick;
|
|
791
|
-
}
|
|
792
|
-
else {
|
|
793
|
-
mergeProps.onClick = mergeProps.onClick || this.triggerOriginEvent('onClick');
|
|
794
|
-
}
|
|
795
|
-
if (this.isFocusTrigger() && !disabled) {
|
|
796
|
-
mergeProps.onFocus = this.onFocus;
|
|
797
|
-
if (this.isBlurToHide()) {
|
|
798
|
-
mergeProps.onBlur = this.onBlur;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
else {
|
|
802
|
-
mergeProps.onFocus = this.triggerOriginEvent('onFocus');
|
|
803
|
-
mergeProps.onBlur = this.triggerOriginEvent('onBlur');
|
|
804
|
-
}
|
|
805
|
-
if (!disabled) {
|
|
806
|
-
mergeProps.onKeyDown = this.onKeyDown;
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
mergeProps.onKeyDown = this.triggerOriginEvent('onKeyDown');
|
|
810
|
-
}
|
|
811
|
-
var child = this.getChild();
|
|
812
|
-
var popupChildren = React.Children.only(popup());
|
|
813
|
-
if (child.props.className) {
|
|
814
|
-
mergeProps.className = child.props.className;
|
|
815
|
-
}
|
|
816
|
-
if (childrenPrefix && popupVisible) {
|
|
817
|
-
mergeProps.className = mergeProps.className
|
|
818
|
-
? mergeProps.className + " " + childrenPrefix + "-open"
|
|
819
|
-
: childrenPrefix + "-open";
|
|
820
|
-
}
|
|
821
|
-
// 只有在focus触发时,设置tabIndex,点击tab键,能触发focus事件,展示弹出框
|
|
822
|
-
if (this.isFocusTrigger()) {
|
|
823
|
-
mergeProps.tabIndex = disabled ? -1 : 0;
|
|
824
|
-
}
|
|
825
|
-
var prefixCls = getPrefixCls('trigger');
|
|
826
|
-
var popupClassName = cs(prefixCls, childrenPrefix, prefixCls + "-position-" + position, (_a = {}, _a[prefixCls + "-rtl"] = rtl, _a), className);
|
|
827
|
-
var childrenComponent = isExistChildren && (React.createElement(ResizeObserver, { onResize: this.onResize, getTargetDOMNode: function () {
|
|
828
|
-
return _this.rootElementRef;
|
|
829
|
-
} }, React.cloneElement(child, __assign(__assign({}, mergeProps), { ref: !supportRef(child)
|
|
830
|
-
? undefined
|
|
831
|
-
: function (node) {
|
|
832
|
-
_this.rootElementRef = node;
|
|
833
|
-
callbackOriginRef(child, node);
|
|
834
|
-
} }))));
|
|
835
|
-
var portalContent = (React.createElement(CSSTransition, { in: !!popupVisible, timeout: duration, classNames: classNames, unmountOnExit: unmountOnExit, appear: true, mountOnEnter: true, onEnter: function () {
|
|
836
|
-
_this.triggerRefDestoried = false;
|
|
837
|
-
var e = _this.getPopupElement();
|
|
838
|
-
if (!e) {
|
|
839
|
-
return;
|
|
840
|
-
}
|
|
841
|
-
e.style.display = 'initial';
|
|
842
|
-
e.style.pointerEvents = 'none';
|
|
843
|
-
if (classNames === 'slideDynamicOrigin') {
|
|
844
|
-
// 下拉菜单
|
|
845
|
-
e.style.transform = _this.getTransformTranslate();
|
|
846
|
-
}
|
|
847
|
-
}, onEntering: function () {
|
|
848
|
-
var e = _this.getPopupElement();
|
|
849
|
-
if (!e) {
|
|
850
|
-
return;
|
|
851
|
-
}
|
|
852
|
-
if (classNames === 'slideDynamicOrigin') {
|
|
853
|
-
// 下拉菜单
|
|
854
|
-
e.style.transform = '';
|
|
855
|
-
}
|
|
856
|
-
}, onEntered: function () {
|
|
857
|
-
var e = _this.getPopupElement();
|
|
858
|
-
if (!e) {
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
e.style.pointerEvents = 'auto';
|
|
862
|
-
_this.forceUpdate();
|
|
863
|
-
}, onExit: function () {
|
|
864
|
-
var e = _this.getPopupElement();
|
|
865
|
-
if (!e) {
|
|
866
|
-
return;
|
|
867
|
-
}
|
|
868
|
-
// 避免消失动画时对元素的快速点击触发意外的操作
|
|
869
|
-
e.style.pointerEvents = 'none';
|
|
870
|
-
__onExit === null || __onExit === void 0 ? void 0 : __onExit(e);
|
|
871
|
-
}, onExited: function () {
|
|
872
|
-
var e = _this.getPopupElement();
|
|
873
|
-
if (!e) {
|
|
874
|
-
return;
|
|
875
|
-
}
|
|
876
|
-
e.style.display = 'none';
|
|
877
|
-
// 这里立即设置为null是为了在setState popupStyle引起重新渲染时,能触发 Portal的卸载事件。移除父节点。
|
|
878
|
-
// 否则只有在下个循环中 triggerRef 才会变为null,需要重新forceUpdate,才能触发Portal的unmount。
|
|
879
|
-
if (unmountOnExit) {
|
|
880
|
-
_this.triggerRefDestoried = true;
|
|
881
|
-
}
|
|
882
|
-
_this.setState({ popupStyle: {} });
|
|
883
|
-
__onExited === null || __onExited === void 0 ? void 0 : __onExited(e);
|
|
884
|
-
}, nodeRef: this.triggerRef },
|
|
885
|
-
React.createElement(ResizeObserver, { onResize: function () {
|
|
886
|
-
var target = _this.triggerRef.current;
|
|
887
|
-
if (target) {
|
|
888
|
-
// Avoid the flickering problem caused by the size change and positioning not being recalculated in time.
|
|
889
|
-
// TODO: Consider changing the popup style directly in the next major version
|
|
890
|
-
var popupStyle_1 = _this.getPopupStyle();
|
|
891
|
-
var style_1 = _this.props.style || {};
|
|
892
|
-
target.style.top = String(style_1.top || popupStyle_1.top + "px");
|
|
893
|
-
target.style.left = String(style_1.left || popupStyle_1.left + "px");
|
|
894
|
-
}
|
|
895
|
-
_this.onResize();
|
|
896
|
-
}, getTargetDOMNode: function () { return _this.getPopupElement(); } },
|
|
897
|
-
React.createElement("span", __assign({ ref: this.triggerRef, "trigger-placement": this.realPosition, style: __assign(__assign(__assign({ width: autoAlignPopupWidth && (style === null || style === void 0 ? void 0 : style.width) === undefined
|
|
898
|
-
? (_d = this.childrenDomSize) === null || _d === void 0 ? void 0 : _d.width
|
|
899
|
-
: '' }, popupStyle), { position: 'absolute', zIndex: zIndex || '' }), style) }, popupEventProps, { className: popupClassName }, pickDataAttributes(this.props)),
|
|
900
|
-
React.createElement(popupChildren.type, __assign({ ref: popupChildren.ref }, popupChildren.props, { style: __assign(__assign({}, popupChildren.props.style), dropdownPopupStyle) })),
|
|
901
|
-
(showArrow || arrowProps) && (React.createElement("div", { className: cs(prefixCls + "-arrow-container", (_b = {},
|
|
902
|
-
_b[childrenPrefix + "-arrow-container"] = childrenPrefix,
|
|
903
|
-
_b)) },
|
|
904
|
-
React.createElement("div", __assign({}, arrowProps, { className: cs(prefixCls + "-arrow", (_c = {},
|
|
905
|
-
_c[childrenPrefix + "-arrow"] = childrenPrefix,
|
|
906
|
-
_c), arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.className), style: __assign(__assign({}, this.arrowStyle), arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.style) }))))))));
|
|
907
|
-
// 如果 triggerRef 不存在,说明弹出层内容被销毁,可以隐藏portal。
|
|
908
|
-
var portal = popupVisible || (this.getPopupElement() && !this.triggerRefDestoried) ? (React.createElement(Portal, { getContainer: this.getContainer }, portalContent)) : null;
|
|
909
|
-
return isExistChildren ? (React.createElement(React.Fragment, null,
|
|
910
|
-
childrenComponent,
|
|
911
|
-
portal)) : (portal);
|
|
912
|
-
};
|
|
913
|
-
Trigger.displayName = 'Trigger';
|
|
914
|
-
Trigger.contextType = ConfigContext;
|
|
915
|
-
return Trigger;
|
|
916
|
-
}(PureComponent));
|
|
917
|
-
export default Trigger;
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
import React, { PureComponent, createRef, } from 'react';
|
|
28
|
+
import ResizeObserverPolyfill from 'resize-observer-polyfill';
|
|
29
|
+
import { CSSTransition } from 'react-transition-group';
|
|
30
|
+
import { callbackOriginRef, findDOMNode } from '../_util/react-dom';
|
|
31
|
+
import { on, off, contains, getScrollElements, isScrollElement } from '../_util/dom';
|
|
32
|
+
import { isFunction, isObject, isArray, supportRef } from '../_util/is';
|
|
33
|
+
import { pickDataAttributes } from '../_util/pick';
|
|
34
|
+
import { Esc } from '../_util/keycode';
|
|
35
|
+
import Portal from './portal';
|
|
36
|
+
import ResizeObserver from '../_util/resizeObserver';
|
|
37
|
+
import cs from '../_util/classNames';
|
|
38
|
+
import { ConfigContext } from '../ConfigProvider';
|
|
39
|
+
import getStyle, { getBoundingClientRect } from './getPopupStyle';
|
|
40
|
+
import throttleByRaf from '../_util/throttleByRaf';
|
|
41
|
+
import { raf, caf } from '../_util/raf';
|
|
42
|
+
import mergeProps from '../_util/mergeProps';
|
|
43
|
+
function getDOMPos(dom, options) {
|
|
44
|
+
if (!dom) {
|
|
45
|
+
return {};
|
|
46
|
+
}
|
|
47
|
+
var _a = getBoundingClientRect(dom, options), width = _a.width, height = _a.height, left = _a.left, right = _a.right;
|
|
48
|
+
return {
|
|
49
|
+
width: width,
|
|
50
|
+
height: height,
|
|
51
|
+
left: left,
|
|
52
|
+
right: right,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export var EventsByTriggerNeed = [
|
|
56
|
+
'onClick',
|
|
57
|
+
'onMouseEnter',
|
|
58
|
+
'onMouseLeave',
|
|
59
|
+
'onMouseMove',
|
|
60
|
+
'onFocus',
|
|
61
|
+
'onBlur',
|
|
62
|
+
'onContextMenu',
|
|
63
|
+
'onKeyDown',
|
|
64
|
+
];
|
|
65
|
+
function splitChildrenStyle(obj, keys) {
|
|
66
|
+
var picked = {};
|
|
67
|
+
var omitted = __assign({}, obj);
|
|
68
|
+
keys.forEach(function (key) {
|
|
69
|
+
if (obj && key in obj) {
|
|
70
|
+
picked[key] = obj[key];
|
|
71
|
+
delete omitted[key];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return { picked: picked, omitted: omitted };
|
|
75
|
+
}
|
|
76
|
+
var defaultProps = {
|
|
77
|
+
blurToHide: true,
|
|
78
|
+
// clickToClose: true,
|
|
79
|
+
classNames: 'fadeIn',
|
|
80
|
+
trigger: 'hover',
|
|
81
|
+
position: 'bottom',
|
|
82
|
+
duration: 200,
|
|
83
|
+
unmountOnExit: true,
|
|
84
|
+
popupAlign: {},
|
|
85
|
+
popupHoverStay: true,
|
|
86
|
+
clickOutsideToClose: true,
|
|
87
|
+
escToClose: false,
|
|
88
|
+
mouseLeaveToClose: true,
|
|
89
|
+
containerScrollToClose: false,
|
|
90
|
+
getDocument: function () { return window.document; },
|
|
91
|
+
autoFixPosition: true,
|
|
92
|
+
mouseEnterDelay: 100,
|
|
93
|
+
mouseLeaveDelay: 100,
|
|
94
|
+
autoFitPosition: true,
|
|
95
|
+
};
|
|
96
|
+
var Trigger = /** @class */ (function (_super) {
|
|
97
|
+
__extends(Trigger, _super);
|
|
98
|
+
function Trigger(props, context) {
|
|
99
|
+
var _this = _super.call(this, props, context) || this;
|
|
100
|
+
_this.delayTimer = null;
|
|
101
|
+
_this.updatePositionTimer = null;
|
|
102
|
+
// is popup open?
|
|
103
|
+
_this.popupOpen = false;
|
|
104
|
+
// if mousedown to hide popup, ignore onFocus
|
|
105
|
+
_this.mousedownToHide = false;
|
|
106
|
+
_this.hasPopupMouseDown = false;
|
|
107
|
+
_this.unmount = false;
|
|
108
|
+
_this.isDidMount = false;
|
|
109
|
+
// 保存鼠标的位置
|
|
110
|
+
_this.mouseLocation = {
|
|
111
|
+
clientX: 0,
|
|
112
|
+
clientY: 0,
|
|
113
|
+
};
|
|
114
|
+
// 保存当前的mount container dom元素
|
|
115
|
+
_this.observerContainer = null;
|
|
116
|
+
// 保存当前节点到 popupContainer 间的所有滚动元素
|
|
117
|
+
_this.scrollElements = null;
|
|
118
|
+
// container 触发 resize时执行
|
|
119
|
+
_this.resizeObserver = new ResizeObserverPolyfill(function () {
|
|
120
|
+
_this.handleUpdatePosition();
|
|
121
|
+
});
|
|
122
|
+
_this.childrenDom = null;
|
|
123
|
+
// 保存children节点的尺寸。 主要用于在弹出层动画前和动画完成后比较尺寸是否有变化。
|
|
124
|
+
_this.childrenDomSize = {};
|
|
125
|
+
_this.getMergedProps = function (basePropsOrKeys) {
|
|
126
|
+
var componentConfig = _this.context.componentConfig;
|
|
127
|
+
var props = mergeProps(basePropsOrKeys && isObject(basePropsOrKeys) ? basePropsOrKeys : _this.props, defaultProps, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.Trigger, basePropsOrKeys && isArray(basePropsOrKeys) ? basePropsOrKeys : undefined);
|
|
128
|
+
return props;
|
|
129
|
+
};
|
|
130
|
+
_this.getRootElement = function () {
|
|
131
|
+
var _a, _b;
|
|
132
|
+
_this.childrenDom = findDOMNode(((_b = (_a = _this.props).getTargetDOMNode) === null || _b === void 0 ? void 0 : _b.call(_a)) || _this.rootElementRef, _this);
|
|
133
|
+
return _this.childrenDom;
|
|
134
|
+
};
|
|
135
|
+
_this.getPopupElement = function () {
|
|
136
|
+
var _a;
|
|
137
|
+
return ((_a = _this.triggerRef) === null || _a === void 0 ? void 0 : _a.current) || null;
|
|
138
|
+
};
|
|
139
|
+
_this.offScrollListeners = function () {
|
|
140
|
+
(_this.scrollElements || []).forEach(function (item) {
|
|
141
|
+
off(item, 'scroll', _this.handleScroll);
|
|
142
|
+
});
|
|
143
|
+
_this.scrollElements = null;
|
|
144
|
+
};
|
|
145
|
+
_this.offWindowResize = function () {
|
|
146
|
+
_this.handleWindowResize = false;
|
|
147
|
+
off(window, 'resize', _this.handleUpdatePosition);
|
|
148
|
+
};
|
|
149
|
+
_this.offContainerResize = function () {
|
|
150
|
+
if (_this.resizeObserver && _this.observerContainer) {
|
|
151
|
+
_this.resizeObserver.unobserve(_this.observerContainer);
|
|
152
|
+
_this.observerContainer = null;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
_this.handleScroll = function () {
|
|
156
|
+
var currentProps = _this.getMergedProps(['containerScrollToClose', 'updateOnScroll']);
|
|
157
|
+
if (currentProps.containerScrollToClose) {
|
|
158
|
+
_this.setPopupVisible(false);
|
|
159
|
+
}
|
|
160
|
+
else if (currentProps.updateOnScroll) {
|
|
161
|
+
_this.handleUpdatePosition();
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
_this.onContainersScroll = function (props) {
|
|
165
|
+
var _a, _b;
|
|
166
|
+
if (_this.scrollElements) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
_this.scrollElements = getScrollElements(_this.childrenDom, (_a = _this.popupContainer) === null || _a === void 0 ? void 0 : _a.parentNode);
|
|
170
|
+
// 弹出层挂载载 body 且 body 不是滚动元素时,需要额外检测 document.documentElement 是否是滚动元素
|
|
171
|
+
// 默认 html,body 不限制宽高时,滚动事件仅能在 window 上监听
|
|
172
|
+
// fix: https://github.com/arco-design/arco-design/issues/1599
|
|
173
|
+
if (props.containerScrollToClose &&
|
|
174
|
+
((_b = _this.popupContainer) === null || _b === void 0 ? void 0 : _b.parentNode) === document.body &&
|
|
175
|
+
_this.scrollElements.indexOf(document.body) === -1 &&
|
|
176
|
+
isScrollElement(document.documentElement)) {
|
|
177
|
+
_this.scrollElements.push(window);
|
|
178
|
+
}
|
|
179
|
+
_this.scrollElements.forEach(function (item) {
|
|
180
|
+
on(item, 'scroll', _this.handleScroll);
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
_this.onContainerResize = function () {
|
|
184
|
+
var _a;
|
|
185
|
+
// containerParent 相当于是通过getPopupContainer传入的节点
|
|
186
|
+
// 因为 this.popupContainer 会被挂载到getPopupContainer返回的节点上
|
|
187
|
+
var containerParent = (_a = _this.popupContainer) === null || _a === void 0 ? void 0 : _a.parentNode;
|
|
188
|
+
if (_this.resizeObserver && _this.observerContainer !== containerParent) {
|
|
189
|
+
// 说明containerParent变了,取消之前的监听,监听新的container
|
|
190
|
+
_this.offContainerResize();
|
|
191
|
+
containerParent && _this.resizeObserver.observe(containerParent);
|
|
192
|
+
_this.observerContainer = containerParent;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
// getPopupContainer 改变时候触发
|
|
196
|
+
_this.handleUpdatePosition = throttleByRaf(function () {
|
|
197
|
+
_this.updatePopupPosition();
|
|
198
|
+
});
|
|
199
|
+
_this.isClickTrigger = function () {
|
|
200
|
+
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
201
|
+
return [].concat(trigger).indexOf('click') > -1;
|
|
202
|
+
};
|
|
203
|
+
_this.isFocusTrigger = function () {
|
|
204
|
+
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
205
|
+
return [].concat(trigger).indexOf('focus') > -1;
|
|
206
|
+
};
|
|
207
|
+
_this.isHoverTrigger = function () {
|
|
208
|
+
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
209
|
+
return [].concat(trigger).indexOf('hover') > -1;
|
|
210
|
+
};
|
|
211
|
+
_this.isContextMenuTrigger = function () {
|
|
212
|
+
var trigger = _this.getMergedProps(['trigger']).trigger;
|
|
213
|
+
return [].concat(trigger).indexOf('contextMenu') > -1;
|
|
214
|
+
};
|
|
215
|
+
// 是否在鼠标移出触发节点和popup的时候隐藏弹出层
|
|
216
|
+
_this.isMouseLeaveToClose = function () {
|
|
217
|
+
return _this.isHoverTrigger() && _this.getMergedProps(['mouseLeaveToClose']).mouseLeaveToClose;
|
|
218
|
+
};
|
|
219
|
+
// 是否在悬浮到popup的时候隐藏弹出层
|
|
220
|
+
_this.isPopupHoverHide = function () {
|
|
221
|
+
return _this.isHoverTrigger() && !_this.getMergedProps(['popupHoverStay']).popupHoverStay;
|
|
222
|
+
};
|
|
223
|
+
_this.isClickToHide = function () {
|
|
224
|
+
if (_this.isClickTrigger() || _this.isContextMenuTrigger()) {
|
|
225
|
+
var _a = _this.getMergedProps(['clickToClose']).clickToClose, clickToClose = _a === void 0 ? true : _a;
|
|
226
|
+
return clickToClose;
|
|
227
|
+
}
|
|
228
|
+
// 2.44.0 及之前版本 clickToClose 对 hover触发不生效。
|
|
229
|
+
// 2.44.1 之后只有在props直接传入clickToClose 时才生效于 hover 触发方式,避免如以下用法前后表现不一致
|
|
230
|
+
// <Trigger><Trigger trigger="click"><button>sss</button></a></Trigger></Trigger>
|
|
231
|
+
return _this.isHoverTrigger() && _this.props.clickToClose;
|
|
232
|
+
};
|
|
233
|
+
_this.isBlurToHide = function () {
|
|
234
|
+
return _this.isFocusTrigger() && _this.getMergedProps(['blurToHide']).blurToHide;
|
|
235
|
+
};
|
|
236
|
+
_this.clearTimer = function () {
|
|
237
|
+
if (_this.updatePositionTimer) {
|
|
238
|
+
if (_this.updatePositionTimer.cancel) {
|
|
239
|
+
_this.updatePositionTimer.cancel();
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
clearTimeout(_this.updatePositionTimer);
|
|
243
|
+
_this.updatePositionTimer = null;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (_this.delayTimer) {
|
|
247
|
+
clearTimeout(_this.delayTimer);
|
|
248
|
+
_this.delayTimer = null;
|
|
249
|
+
}
|
|
250
|
+
if (_this.mouseDownTimeout) {
|
|
251
|
+
clearTimeout(_this.mouseDownTimeout);
|
|
252
|
+
_this.mouseDownTimeout = null;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
_this.offClickOutside = function () {
|
|
256
|
+
if (_this.handleClickOutside) {
|
|
257
|
+
var getDocument = _this.getMergedProps(['getDocument']).getDocument;
|
|
258
|
+
var root = isFunction(getDocument) && getDocument();
|
|
259
|
+
off(root, 'mousedown', _this.onClickOutside);
|
|
260
|
+
_this.handleClickOutside = false;
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
_this.getTransformOrigin = function (position) {
|
|
264
|
+
var _a, _b;
|
|
265
|
+
var content = _this.getPopupElement();
|
|
266
|
+
if (!content)
|
|
267
|
+
return {};
|
|
268
|
+
var _c = _this.getMergedProps(['showArrow', 'classNames']), showArrow = _c.showArrow, classNames = _c.classNames;
|
|
269
|
+
var top = (showArrow && ((_a = _this.arrowStyle) === null || _a === void 0 ? void 0 : _a.top)) || 0;
|
|
270
|
+
var left = (showArrow && ((_b = _this.arrowStyle) === null || _b === void 0 ? void 0 : _b.left)) || 0;
|
|
271
|
+
top = top ? top + "px" : '';
|
|
272
|
+
left = left ? left + "px" : '';
|
|
273
|
+
var transformOrigin = {
|
|
274
|
+
top: (left || '50%') + " 100% 0",
|
|
275
|
+
tl: (left || '15px') + " 100% 0",
|
|
276
|
+
tr: (left || content.clientWidth - 15 + "px") + " 100% 0",
|
|
277
|
+
bottom: (left || '50%') + " 0 0",
|
|
278
|
+
bl: (left || '15px') + " 0 0",
|
|
279
|
+
br: (left || content.clientWidth - 15 + "px") + " 0 0",
|
|
280
|
+
left: "100% " + (top || '50%') + " 0",
|
|
281
|
+
lt: "100% " + (top || '15px') + " 0",
|
|
282
|
+
lb: "100% " + (top || content.clientHeight - 15 + "px") + " 0",
|
|
283
|
+
right: "0 " + (top || '50%') + " 0",
|
|
284
|
+
rt: "0 " + (top || '15px') + " 0",
|
|
285
|
+
rb: "0 " + (top || content.clientHeight - 15 + "px") + " 0",
|
|
286
|
+
};
|
|
287
|
+
// tooltip popover popconfirm
|
|
288
|
+
if (classNames && classNames.indexOf('zoom') > -1) {
|
|
289
|
+
return {
|
|
290
|
+
transformOrigin: transformOrigin[position],
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
if (classNames === 'slideDynamicOrigin') {
|
|
294
|
+
var origin_1 = '0% 0%';
|
|
295
|
+
if (['top', 'tl', 'tr'].indexOf(position) > -1) {
|
|
296
|
+
origin_1 = '100% 100%';
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
transformOrigin: origin_1,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
return {};
|
|
303
|
+
};
|
|
304
|
+
// 下拉框存在初始translateY/translateX,需要根据真实的弹出位置确定
|
|
305
|
+
_this.getTransformTranslate = function () {
|
|
306
|
+
if (_this.getMergedProps(['classNames']).classNames !== 'slideDynamicOrigin') {
|
|
307
|
+
return '';
|
|
308
|
+
}
|
|
309
|
+
switch (_this.realPosition) {
|
|
310
|
+
case 'bottom':
|
|
311
|
+
case 'bl':
|
|
312
|
+
case 'br':
|
|
313
|
+
return 'scaleY(0.9) translateY(-4px)';
|
|
314
|
+
case 'top':
|
|
315
|
+
case 'tl':
|
|
316
|
+
case 'tr':
|
|
317
|
+
return 'scaleY(0.9) translateY(4px)';
|
|
318
|
+
default:
|
|
319
|
+
return '';
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
_this.getPopupStyle = function () {
|
|
323
|
+
if (_this.unmount || !_this.popupContainer) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
var mountContainer = _this.popupContainer;
|
|
327
|
+
var content = _this.triggerRef.current;
|
|
328
|
+
var child = _this.getRootElement();
|
|
329
|
+
// offsetParent=null when display:none or position: fixed
|
|
330
|
+
if (!child.offsetParent && !child.getClientRects().length) {
|
|
331
|
+
return _this.state.popupStyle;
|
|
332
|
+
}
|
|
333
|
+
var mergedProps = _this.getMergedProps();
|
|
334
|
+
var _a = getStyle(mergedProps, content, child, mountContainer, _this.mouseLocation), style = _a.style, arrowStyle = _a.arrowStyle, realPosition = _a.realPosition;
|
|
335
|
+
_this.realPosition = realPosition || mergedProps.position;
|
|
336
|
+
_this.arrowStyle = arrowStyle || {};
|
|
337
|
+
return __assign(__assign({}, style), _this.getTransformOrigin(_this.realPosition));
|
|
338
|
+
};
|
|
339
|
+
_this.showPopup = function (callback) {
|
|
340
|
+
if (callback === void 0) { callback = function () { }; }
|
|
341
|
+
var popupStyle = _this.getPopupStyle();
|
|
342
|
+
_this.setState({
|
|
343
|
+
popupStyle: popupStyle,
|
|
344
|
+
}, callback);
|
|
345
|
+
};
|
|
346
|
+
_this.update = throttleByRaf(function (callback) {
|
|
347
|
+
if (_this.unmount || !_this.state.popupVisible) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
var popupStyle = _this.getPopupStyle();
|
|
351
|
+
_this.setState({
|
|
352
|
+
popupStyle: popupStyle,
|
|
353
|
+
}, function () {
|
|
354
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
_this.getRootDOMNode = function () {
|
|
358
|
+
return _this.getRootElement();
|
|
359
|
+
};
|
|
360
|
+
_this.updatePopupPosition = function (delay, callback) {
|
|
361
|
+
if (delay === void 0) { delay = 0; }
|
|
362
|
+
var currentVisible = _this.state.popupVisible;
|
|
363
|
+
if (!currentVisible) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
if (delay < 4) {
|
|
367
|
+
_this.updatePositionTimer = _this.update(callback);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
_this.updatePositionTimer = setTimeout(function () {
|
|
371
|
+
var popupStyle = _this.getPopupStyle();
|
|
372
|
+
_this.setState({
|
|
373
|
+
popupStyle: popupStyle,
|
|
374
|
+
}, function () {
|
|
375
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
376
|
+
});
|
|
377
|
+
}, delay);
|
|
378
|
+
};
|
|
379
|
+
_this.setPopupVisible = function (visible, delay, callback) {
|
|
380
|
+
if (delay === void 0) { delay = 0; }
|
|
381
|
+
var mergedProps = _this.getMergedProps(['onVisibleChange', 'popupVisible']);
|
|
382
|
+
var onVisibleChange = mergedProps.onVisibleChange;
|
|
383
|
+
var currentVisible = _this.state.popupVisible;
|
|
384
|
+
if (visible !== currentVisible) {
|
|
385
|
+
_this.delayToDo(delay, function () {
|
|
386
|
+
onVisibleChange && onVisibleChange(visible);
|
|
387
|
+
if (!('popupVisible' in mergedProps)) {
|
|
388
|
+
if (visible) {
|
|
389
|
+
_this.setState({
|
|
390
|
+
popupVisible: true,
|
|
391
|
+
}, function () {
|
|
392
|
+
_this.showPopup(callback);
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
_this.setState({
|
|
397
|
+
popupVisible: false,
|
|
398
|
+
}, function () {
|
|
399
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
_this.delayToDo = function (delay, callback) {
|
|
413
|
+
if (delay) {
|
|
414
|
+
_this.clearDelayTimer();
|
|
415
|
+
_this.delayTimer = setTimeout(function () {
|
|
416
|
+
callback();
|
|
417
|
+
_this.clearDelayTimer();
|
|
418
|
+
}, delay);
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
callback();
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
// 点击非popup内部,非children内部的节点,触发clickoutside 逻辑
|
|
425
|
+
_this.onClickOutside = function (e) {
|
|
426
|
+
var _a = _this.getMergedProps([
|
|
427
|
+
'onClickOutside',
|
|
428
|
+
'clickOutsideToClose',
|
|
429
|
+
]), onClickOutside = _a.onClickOutside, clickOutsideToClose = _a.clickOutsideToClose;
|
|
430
|
+
var triggerNode = _this.getPopupElement();
|
|
431
|
+
var childrenDom = _this.getRootElement();
|
|
432
|
+
if (!contains(triggerNode, e.target) &&
|
|
433
|
+
!contains(childrenDom, e.target) &&
|
|
434
|
+
!_this.hasPopupMouseDown) {
|
|
435
|
+
onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside();
|
|
436
|
+
if (clickOutsideToClose) {
|
|
437
|
+
// 以下判断条件避免onVisibleChange触发两次
|
|
438
|
+
// blurToHide 为true时不需要执行,因为onBlur里会执行setPopupVisible
|
|
439
|
+
// hover 触发方式,不执行以下逻辑。因为mouseLeave里会执行setPopupVisible
|
|
440
|
+
if (!_this.isBlurToHide() && !_this.isHoverTrigger()) {
|
|
441
|
+
_this.setPopupVisible(false);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
_this.onKeyDown = function (e) {
|
|
447
|
+
var keyCode = e.keyCode || e.which;
|
|
448
|
+
_this.triggerPropsEvent('onKeyDown', e);
|
|
449
|
+
if (keyCode === Esc.code) {
|
|
450
|
+
_this.onPressEsc(e);
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
_this.onPressEsc = function (e) {
|
|
454
|
+
var escToClose = _this.getMergedProps(['escToClose']).escToClose;
|
|
455
|
+
if (escToClose && e && e.key === Esc.key && _this.state.popupVisible) {
|
|
456
|
+
_this.setPopupVisible(false);
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
_this.onMouseEnter = function (e) {
|
|
460
|
+
var mouseEnterDelay = _this.getMergedProps(['mouseEnterDelay']).mouseEnterDelay;
|
|
461
|
+
_this.triggerPropsEvent('onMouseEnter', e);
|
|
462
|
+
_this.clearDelayTimer();
|
|
463
|
+
_this.setPopupVisible(true, mouseEnterDelay || 0);
|
|
464
|
+
};
|
|
465
|
+
_this.onMouseMove = function (e) {
|
|
466
|
+
_this.triggerPropsEvent('onMouseMove', e);
|
|
467
|
+
_this.setMouseLocation(e);
|
|
468
|
+
if (_this.state.popupVisible) {
|
|
469
|
+
_this.update();
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
_this.onMouseLeave = function (e) {
|
|
473
|
+
var mouseLeaveDelay = _this.getMergedProps(['mouseLeaveDelay']).mouseLeaveDelay;
|
|
474
|
+
_this.clearDelayTimer();
|
|
475
|
+
_this.triggerPropsEvent('onMouseLeave', e);
|
|
476
|
+
if (_this.isMouseLeaveToClose()) {
|
|
477
|
+
if (_this.state.popupVisible) {
|
|
478
|
+
_this.setPopupVisible(false, mouseLeaveDelay || 0);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
_this.onPopupMouseEnter = function () {
|
|
483
|
+
_this.clearDelayTimer();
|
|
484
|
+
};
|
|
485
|
+
_this.onPopupMouseLeave = function (e) {
|
|
486
|
+
_this.onMouseLeave(e);
|
|
487
|
+
};
|
|
488
|
+
_this.setMouseLocation = function (e) {
|
|
489
|
+
if (_this.getMergedProps(['alignPoint']).alignPoint) {
|
|
490
|
+
_this.mouseLocation = {
|
|
491
|
+
clientX: e.clientX,
|
|
492
|
+
clientY: e.clientY,
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
_this.onContextMenu = function (e) {
|
|
497
|
+
e.preventDefault();
|
|
498
|
+
_this.triggerPropsEvent('onContextMenu', e);
|
|
499
|
+
_this.setMouseLocation(e);
|
|
500
|
+
if (!_this.state.popupVisible) {
|
|
501
|
+
_this.setPopupVisible(true, 0);
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
// 更新位置
|
|
505
|
+
_this.getMergedProps(['alignPoint']).alignPoint && _this.update();
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
_this.clickToHidePopup = function (e) {
|
|
509
|
+
var popupVisible = _this.state.popupVisible;
|
|
510
|
+
if (popupVisible) {
|
|
511
|
+
_this.mousedownToHide = true;
|
|
512
|
+
}
|
|
513
|
+
_this.triggerPropsEvent('onClick', e);
|
|
514
|
+
if (_this.isClickToHide() && popupVisible) {
|
|
515
|
+
_this.setPopupVisible(!popupVisible, 0);
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
_this.onClick = function (e) {
|
|
519
|
+
var popupVisible = _this.state.popupVisible;
|
|
520
|
+
if (popupVisible) {
|
|
521
|
+
_this.mousedownToHide = true;
|
|
522
|
+
}
|
|
523
|
+
_this.triggerPropsEvent('onClick', e);
|
|
524
|
+
_this.setMouseLocation(e);
|
|
525
|
+
if (!_this.isClickToHide() && popupVisible) {
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
_this.setPopupVisible(!popupVisible, 0);
|
|
529
|
+
};
|
|
530
|
+
_this.onFocus = function (e) {
|
|
531
|
+
var focusDelay = _this.getMergedProps(['focusDelay']).focusDelay;
|
|
532
|
+
var onFocus = function () {
|
|
533
|
+
_this.triggerPropsEvent('onFocus', e);
|
|
534
|
+
};
|
|
535
|
+
_this.clearDelayTimer();
|
|
536
|
+
if (!_this.mousedownToHide) {
|
|
537
|
+
if (_this.state.popupVisible) {
|
|
538
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
_this.setPopupVisible(true, focusDelay || 0, onFocus);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
_this.mousedownToHide = false;
|
|
545
|
+
};
|
|
546
|
+
_this.onBlur = function (e) {
|
|
547
|
+
_this.setPopupVisible(false, 200, function () { return _this.triggerPropsEvent('onBlur', e); });
|
|
548
|
+
};
|
|
549
|
+
_this.onResize = function () {
|
|
550
|
+
if (_this.getMergedProps(['autoFixPosition']).autoFixPosition && _this.state.popupVisible) {
|
|
551
|
+
_this.updatePopupPosition();
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
_this.onPopupMouseDown = function () {
|
|
555
|
+
_this.hasPopupMouseDown = true;
|
|
556
|
+
clearTimeout(_this.mouseDownTimeout);
|
|
557
|
+
_this.mouseDownTimeout = setTimeout(function () {
|
|
558
|
+
_this.hasPopupMouseDown = false;
|
|
559
|
+
}, 0);
|
|
560
|
+
};
|
|
561
|
+
// 当 children 中的元素 disabled 时,不能正确触发 hover 等事件,所以当监测到对应
|
|
562
|
+
// 组件有 disabled 时,给元素加一层 span,处理事件,模拟样式
|
|
563
|
+
_this.getChild = function () {
|
|
564
|
+
var _a;
|
|
565
|
+
var children = _this.props.children;
|
|
566
|
+
var element = children;
|
|
567
|
+
var elementType = (element && typeof element !== 'string' && element.type);
|
|
568
|
+
var child = children;
|
|
569
|
+
if (['string', 'number'].indexOf(typeof children) > -1 || React.Children.count(children) > 1) {
|
|
570
|
+
child = React.createElement("span", null, children);
|
|
571
|
+
}
|
|
572
|
+
else if (element &&
|
|
573
|
+
elementType &&
|
|
574
|
+
(elementType.__BYTE_BUTTON === true ||
|
|
575
|
+
elementType.__BYTE_CHECKBOX === true ||
|
|
576
|
+
elementType.__BYTE_SWITCH === true ||
|
|
577
|
+
elementType.__BYTE_RADIO === true ||
|
|
578
|
+
elementType === 'button') &&
|
|
579
|
+
element.props.disabled) {
|
|
580
|
+
// 从样式中提取出会影响布局的到上层 span 样式中。
|
|
581
|
+
var _b = splitChildrenStyle(element.props.style, [
|
|
582
|
+
'position',
|
|
583
|
+
'left',
|
|
584
|
+
'right',
|
|
585
|
+
'top',
|
|
586
|
+
'bottom',
|
|
587
|
+
'float',
|
|
588
|
+
'display',
|
|
589
|
+
'zIndex',
|
|
590
|
+
]), picked = _b.picked, omitted = _b.omitted;
|
|
591
|
+
child = (React.createElement("span", { className: (_a = element.props) === null || _a === void 0 ? void 0 : _a.className, style: __assign(__assign({ display: 'inline-block' }, picked), { cursor: 'not-allowed' }) }, React.cloneElement(element, {
|
|
592
|
+
style: __assign(__assign({}, omitted), { pointerEvents: 'none' }),
|
|
593
|
+
className: undefined,
|
|
594
|
+
})));
|
|
595
|
+
}
|
|
596
|
+
// 防止为空报错
|
|
597
|
+
return child || React.createElement("span", null);
|
|
598
|
+
};
|
|
599
|
+
// 创建的dom节点插入getPopupContainer。
|
|
600
|
+
_this.appendToContainer = function (node) {
|
|
601
|
+
caf(_this.rafId);
|
|
602
|
+
if (_this.isDidMount) {
|
|
603
|
+
var getGlobalPopupContainer = _this.context.getPopupContainer;
|
|
604
|
+
var getPopupContainer = _this.getMergedProps(['getPopupContainer']).getPopupContainer;
|
|
605
|
+
var gpc = getPopupContainer || getGlobalPopupContainer;
|
|
606
|
+
var rootElement = _this.getRootElement();
|
|
607
|
+
var parent_1 = gpc(rootElement);
|
|
608
|
+
if (parent_1) {
|
|
609
|
+
parent_1.appendChild(node);
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
_this.rafId = raf(function () {
|
|
614
|
+
_this.appendToContainer(node);
|
|
615
|
+
});
|
|
616
|
+
};
|
|
617
|
+
_this.getContainer = function () {
|
|
618
|
+
var popupContainer = document.createElement('div');
|
|
619
|
+
popupContainer.style.width = '100%';
|
|
620
|
+
popupContainer.style.position = 'absolute';
|
|
621
|
+
popupContainer.style.top = '0';
|
|
622
|
+
popupContainer.style.left = '0';
|
|
623
|
+
_this.popupContainer = popupContainer;
|
|
624
|
+
_this.appendToContainer(popupContainer);
|
|
625
|
+
return popupContainer;
|
|
626
|
+
};
|
|
627
|
+
// 1. 触发直接附加到 Trigger 上的事件,大多是Trigger直接嵌套Trigger的情况
|
|
628
|
+
// 2. 触发children上直接被附加的事件
|
|
629
|
+
_this.triggerPropsEvent = function (eventName, e) {
|
|
630
|
+
var child = _this.getChild();
|
|
631
|
+
var childHandler = child && child.props && child.props[eventName];
|
|
632
|
+
var handlerFn = _this.getMergedProps([eventName])[eventName];
|
|
633
|
+
if (isFunction(childHandler)) {
|
|
634
|
+
childHandler(e);
|
|
635
|
+
}
|
|
636
|
+
if (isFunction(handlerFn)) {
|
|
637
|
+
handlerFn(e);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
// 触发 children/ trigger 组件上被附加的事件
|
|
641
|
+
_this.triggerOriginEvent = function (eventName) {
|
|
642
|
+
var child = _this.getChild();
|
|
643
|
+
var childHandler = child && child.props && child.props[eventName];
|
|
644
|
+
var propsHandler = _this.getMergedProps([eventName])[eventName];
|
|
645
|
+
if (isFunction(propsHandler) && isFunction(childHandler)) {
|
|
646
|
+
return function (e) {
|
|
647
|
+
childHandler(e);
|
|
648
|
+
propsHandler(e);
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
return childHandler || propsHandler;
|
|
652
|
+
};
|
|
653
|
+
var mergedProps = _this.getMergedProps(props);
|
|
654
|
+
var popupVisible = 'popupVisible' in mergedProps ? mergedProps.popupVisible : mergedProps.defaultPopupVisible;
|
|
655
|
+
_this.popupOpen = !!popupVisible;
|
|
656
|
+
_this.triggerRef = createRef();
|
|
657
|
+
_this.state = {
|
|
658
|
+
popupVisible: !!popupVisible,
|
|
659
|
+
popupStyle: {},
|
|
660
|
+
};
|
|
661
|
+
return _this;
|
|
662
|
+
}
|
|
663
|
+
Trigger.getDerivedStateFromProps = function (nextProps, state) {
|
|
664
|
+
if ('popupVisible' in nextProps && nextProps.popupVisible !== state.popupVisible) {
|
|
665
|
+
return {
|
|
666
|
+
popupVisible: nextProps.popupVisible,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
return null;
|
|
670
|
+
};
|
|
671
|
+
Trigger.prototype.componentDidMount = function () {
|
|
672
|
+
this.componentDidUpdate(this.getMergedProps());
|
|
673
|
+
this.isDidMount = true;
|
|
674
|
+
this.unmount = false;
|
|
675
|
+
this.childrenDom = this.getRootElement();
|
|
676
|
+
if (this.state.popupVisible) {
|
|
677
|
+
this.childrenDomSize = getDOMPos(this.childrenDom, {
|
|
678
|
+
boundaryDistance: this.props.alignPoint ? undefined : this.props.boundaryDistance,
|
|
679
|
+
position: this.props.position,
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
Trigger.prototype.componentDidUpdate = function (_prevProps) {
|
|
684
|
+
var prevProps = this.getMergedProps(_prevProps);
|
|
685
|
+
var currentProps = this.getMergedProps();
|
|
686
|
+
if (!prevProps.popupVisible && currentProps.popupVisible) {
|
|
687
|
+
this.update();
|
|
688
|
+
}
|
|
689
|
+
var popupVisible = this.state.popupVisible;
|
|
690
|
+
this.popupOpen = popupVisible;
|
|
691
|
+
var getDocument = currentProps.getDocument;
|
|
692
|
+
if (!popupVisible) {
|
|
693
|
+
this.offClickOutside();
|
|
694
|
+
this.offContainerResize();
|
|
695
|
+
this.offWindowResize();
|
|
696
|
+
this.offScrollListeners();
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
var rect = getDOMPos(this.childrenDom, {
|
|
700
|
+
boundaryDistance: this.props.alignPoint ? {} : this.props.boundaryDistance,
|
|
701
|
+
position: this.props.position,
|
|
702
|
+
});
|
|
703
|
+
// children节点的尺寸改变,主要是处理children 存在scale等动画属性,或者移动位置的时候,popup 的位置有问题
|
|
704
|
+
if (JSON.stringify(rect) !== JSON.stringify(this.childrenDomSize)) {
|
|
705
|
+
this.updatePopupPosition();
|
|
706
|
+
this.childrenDomSize = rect;
|
|
707
|
+
}
|
|
708
|
+
// popupVisible为true
|
|
709
|
+
this.onContainerResize();
|
|
710
|
+
if (currentProps.updateOnScroll || currentProps.containerScrollToClose) {
|
|
711
|
+
this.onContainersScroll(currentProps);
|
|
712
|
+
}
|
|
713
|
+
if (!this.handleWindowResize) {
|
|
714
|
+
on(window, 'resize', this.handleUpdatePosition);
|
|
715
|
+
this.handleWindowResize = true;
|
|
716
|
+
}
|
|
717
|
+
if (!this.handleClickOutside) {
|
|
718
|
+
var root = isFunction(getDocument) && getDocument();
|
|
719
|
+
if (root) {
|
|
720
|
+
// clickOutside 必须监听mousedown。
|
|
721
|
+
// 1. 如果事件目标元素在click后被移除,document.onclick被触发时已经没有该元素,会错误触发clickOutside逻辑,隐藏popup。
|
|
722
|
+
// 2. 点击label标签,会触发对应input元素的点击事件,导致触发clickOutside,隐藏popup。
|
|
723
|
+
on(root, 'mousedown', this.onClickOutside, {
|
|
724
|
+
capture: isObject(currentProps.clickOutsideToClose)
|
|
725
|
+
? currentProps.clickOutsideToClose.capture
|
|
726
|
+
: false,
|
|
727
|
+
});
|
|
728
|
+
this.handleClickOutside = true;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
Trigger.prototype.componentWillUnmount = function () {
|
|
733
|
+
this.unmount = true;
|
|
734
|
+
this.offClickOutside();
|
|
735
|
+
this.clearTimer();
|
|
736
|
+
this.offWindowResize();
|
|
737
|
+
this.offScrollListeners();
|
|
738
|
+
this.offContainerResize();
|
|
739
|
+
caf(this.rafId);
|
|
740
|
+
};
|
|
741
|
+
Trigger.prototype.clearDelayTimer = function () {
|
|
742
|
+
if (this.delayTimer) {
|
|
743
|
+
clearTimeout(this.delayTimer);
|
|
744
|
+
this.delayTimer = null;
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
Trigger.prototype.render = function () {
|
|
748
|
+
var _a, _b, _c;
|
|
749
|
+
var _this = this;
|
|
750
|
+
var _d;
|
|
751
|
+
var _e = this.getMergedProps(), children = _e.children, style = _e.style, className = _e.className, arrowProps = _e.arrowProps, disabled = _e.disabled, popup = _e.popup, classNames = _e.classNames, duration = _e.duration, unmountOnExit = _e.unmountOnExit, alignPoint = _e.alignPoint, autoAlignPopupWidth = _e.autoAlignPopupWidth, position = _e.position, childrenPrefix = _e.childrenPrefix, showArrow = _e.showArrow, dropdownPopupStyle = _e.popupStyle, __onExit = _e.__onExit, __onExited = _e.__onExited;
|
|
752
|
+
var isExistChildren = children || children === 0;
|
|
753
|
+
var _f = this.context, getPrefixCls = _f.getPrefixCls, zIndex = _f.zIndex, rtl = _f.rtl;
|
|
754
|
+
var _g = this.state, popupVisible = _g.popupVisible, popupStyle = _g.popupStyle;
|
|
755
|
+
if (!popup) {
|
|
756
|
+
return null;
|
|
757
|
+
}
|
|
758
|
+
var mergeProps = {};
|
|
759
|
+
var popupEventProps = {
|
|
760
|
+
onMouseDown: this.onPopupMouseDown,
|
|
761
|
+
};
|
|
762
|
+
if (this.isHoverTrigger() && !disabled) {
|
|
763
|
+
mergeProps.onMouseEnter = this.onMouseEnter;
|
|
764
|
+
mergeProps.onMouseLeave = this.onMouseLeave;
|
|
765
|
+
// https://github.com/arco-design/arco-design/issues/1804
|
|
766
|
+
// TODO: remove login in next major version
|
|
767
|
+
if (this.isClickToHide()) {
|
|
768
|
+
mergeProps.onClick = this.clickToHidePopup;
|
|
769
|
+
}
|
|
770
|
+
if (alignPoint) {
|
|
771
|
+
mergeProps.onMouseMove = this.onMouseMove;
|
|
772
|
+
}
|
|
773
|
+
if (!this.isPopupHoverHide()) {
|
|
774
|
+
popupEventProps.onMouseEnter = this.onPopupMouseEnter;
|
|
775
|
+
popupEventProps.onMouseLeave = this.onPopupMouseLeave;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
else {
|
|
779
|
+
mergeProps.onMouseEnter = this.triggerOriginEvent('onMouseEnter');
|
|
780
|
+
mergeProps.onMouseLeave = this.triggerOriginEvent('onMouseLeave');
|
|
781
|
+
}
|
|
782
|
+
if (this.isContextMenuTrigger() && !disabled) {
|
|
783
|
+
mergeProps.onContextMenu = this.onContextMenu;
|
|
784
|
+
mergeProps.onClick = this.clickToHidePopup;
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
mergeProps.onContextMenu = this.triggerOriginEvent('onContextMenu');
|
|
788
|
+
}
|
|
789
|
+
if (this.isClickTrigger() && !disabled) {
|
|
790
|
+
mergeProps.onClick = this.onClick;
|
|
791
|
+
}
|
|
792
|
+
else {
|
|
793
|
+
mergeProps.onClick = mergeProps.onClick || this.triggerOriginEvent('onClick');
|
|
794
|
+
}
|
|
795
|
+
if (this.isFocusTrigger() && !disabled) {
|
|
796
|
+
mergeProps.onFocus = this.onFocus;
|
|
797
|
+
if (this.isBlurToHide()) {
|
|
798
|
+
mergeProps.onBlur = this.onBlur;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
else {
|
|
802
|
+
mergeProps.onFocus = this.triggerOriginEvent('onFocus');
|
|
803
|
+
mergeProps.onBlur = this.triggerOriginEvent('onBlur');
|
|
804
|
+
}
|
|
805
|
+
if (!disabled) {
|
|
806
|
+
mergeProps.onKeyDown = this.onKeyDown;
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
mergeProps.onKeyDown = this.triggerOriginEvent('onKeyDown');
|
|
810
|
+
}
|
|
811
|
+
var child = this.getChild();
|
|
812
|
+
var popupChildren = React.Children.only(popup());
|
|
813
|
+
if (child.props.className) {
|
|
814
|
+
mergeProps.className = child.props.className;
|
|
815
|
+
}
|
|
816
|
+
if (childrenPrefix && popupVisible) {
|
|
817
|
+
mergeProps.className = mergeProps.className
|
|
818
|
+
? mergeProps.className + " " + childrenPrefix + "-open"
|
|
819
|
+
: childrenPrefix + "-open";
|
|
820
|
+
}
|
|
821
|
+
// 只有在focus触发时,设置tabIndex,点击tab键,能触发focus事件,展示弹出框
|
|
822
|
+
if (this.isFocusTrigger()) {
|
|
823
|
+
mergeProps.tabIndex = disabled ? -1 : 0;
|
|
824
|
+
}
|
|
825
|
+
var prefixCls = getPrefixCls('trigger');
|
|
826
|
+
var popupClassName = cs(prefixCls, childrenPrefix, prefixCls + "-position-" + position, (_a = {}, _a[prefixCls + "-rtl"] = rtl, _a), className);
|
|
827
|
+
var childrenComponent = isExistChildren && (React.createElement(ResizeObserver, { onResize: this.onResize, getTargetDOMNode: function () {
|
|
828
|
+
return _this.rootElementRef;
|
|
829
|
+
} }, React.cloneElement(child, __assign(__assign({}, mergeProps), { ref: !supportRef(child)
|
|
830
|
+
? undefined
|
|
831
|
+
: function (node) {
|
|
832
|
+
_this.rootElementRef = node;
|
|
833
|
+
callbackOriginRef(child, node);
|
|
834
|
+
} }))));
|
|
835
|
+
var portalContent = (React.createElement(CSSTransition, { in: !!popupVisible, timeout: duration, classNames: classNames, unmountOnExit: unmountOnExit, appear: true, mountOnEnter: true, onEnter: function () {
|
|
836
|
+
_this.triggerRefDestoried = false;
|
|
837
|
+
var e = _this.getPopupElement();
|
|
838
|
+
if (!e) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
e.style.display = 'initial';
|
|
842
|
+
e.style.pointerEvents = 'none';
|
|
843
|
+
if (classNames === 'slideDynamicOrigin') {
|
|
844
|
+
// 下拉菜单
|
|
845
|
+
e.style.transform = _this.getTransformTranslate();
|
|
846
|
+
}
|
|
847
|
+
}, onEntering: function () {
|
|
848
|
+
var e = _this.getPopupElement();
|
|
849
|
+
if (!e) {
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
if (classNames === 'slideDynamicOrigin') {
|
|
853
|
+
// 下拉菜单
|
|
854
|
+
e.style.transform = '';
|
|
855
|
+
}
|
|
856
|
+
}, onEntered: function () {
|
|
857
|
+
var e = _this.getPopupElement();
|
|
858
|
+
if (!e) {
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
e.style.pointerEvents = 'auto';
|
|
862
|
+
_this.forceUpdate();
|
|
863
|
+
}, onExit: function () {
|
|
864
|
+
var e = _this.getPopupElement();
|
|
865
|
+
if (!e) {
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
// 避免消失动画时对元素的快速点击触发意外的操作
|
|
869
|
+
e.style.pointerEvents = 'none';
|
|
870
|
+
__onExit === null || __onExit === void 0 ? void 0 : __onExit(e);
|
|
871
|
+
}, onExited: function () {
|
|
872
|
+
var e = _this.getPopupElement();
|
|
873
|
+
if (!e) {
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
e.style.display = 'none';
|
|
877
|
+
// 这里立即设置为null是为了在setState popupStyle引起重新渲染时,能触发 Portal的卸载事件。移除父节点。
|
|
878
|
+
// 否则只有在下个循环中 triggerRef 才会变为null,需要重新forceUpdate,才能触发Portal的unmount。
|
|
879
|
+
if (unmountOnExit) {
|
|
880
|
+
_this.triggerRefDestoried = true;
|
|
881
|
+
}
|
|
882
|
+
_this.setState({ popupStyle: {} });
|
|
883
|
+
__onExited === null || __onExited === void 0 ? void 0 : __onExited(e);
|
|
884
|
+
}, nodeRef: this.triggerRef },
|
|
885
|
+
React.createElement(ResizeObserver, { onResize: function () {
|
|
886
|
+
var target = _this.triggerRef.current;
|
|
887
|
+
if (target) {
|
|
888
|
+
// Avoid the flickering problem caused by the size change and positioning not being recalculated in time.
|
|
889
|
+
// TODO: Consider changing the popup style directly in the next major version
|
|
890
|
+
var popupStyle_1 = _this.getPopupStyle();
|
|
891
|
+
var style_1 = _this.props.style || {};
|
|
892
|
+
target.style.top = String(style_1.top || popupStyle_1.top + "px");
|
|
893
|
+
target.style.left = String(style_1.left || popupStyle_1.left + "px");
|
|
894
|
+
}
|
|
895
|
+
_this.onResize();
|
|
896
|
+
}, getTargetDOMNode: function () { return _this.getPopupElement(); } },
|
|
897
|
+
React.createElement("span", __assign({ ref: this.triggerRef, "trigger-placement": this.realPosition, style: __assign(__assign(__assign({ width: autoAlignPopupWidth && (style === null || style === void 0 ? void 0 : style.width) === undefined
|
|
898
|
+
? (_d = this.childrenDomSize) === null || _d === void 0 ? void 0 : _d.width
|
|
899
|
+
: '' }, popupStyle), { position: 'absolute', zIndex: zIndex || '' }), style) }, popupEventProps, { className: popupClassName }, pickDataAttributes(this.props)),
|
|
900
|
+
React.createElement(popupChildren.type, __assign({ ref: popupChildren.ref }, popupChildren.props, { style: __assign(__assign({}, popupChildren.props.style), dropdownPopupStyle) })),
|
|
901
|
+
(showArrow || arrowProps) && (React.createElement("div", { className: cs(prefixCls + "-arrow-container", (_b = {},
|
|
902
|
+
_b[childrenPrefix + "-arrow-container"] = childrenPrefix,
|
|
903
|
+
_b)) },
|
|
904
|
+
React.createElement("div", __assign({}, arrowProps, { className: cs(prefixCls + "-arrow", (_c = {},
|
|
905
|
+
_c[childrenPrefix + "-arrow"] = childrenPrefix,
|
|
906
|
+
_c), arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.className), style: __assign(__assign({}, this.arrowStyle), arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.style) }))))))));
|
|
907
|
+
// 如果 triggerRef 不存在,说明弹出层内容被销毁,可以隐藏portal。
|
|
908
|
+
var portal = popupVisible || (this.getPopupElement() && !this.triggerRefDestoried) ? (React.createElement(Portal, { getContainer: this.getContainer }, portalContent)) : null;
|
|
909
|
+
return isExistChildren ? (React.createElement(React.Fragment, null,
|
|
910
|
+
childrenComponent,
|
|
911
|
+
portal)) : (portal);
|
|
912
|
+
};
|
|
913
|
+
Trigger.displayName = 'Trigger';
|
|
914
|
+
Trigger.contextType = ConfigContext;
|
|
915
|
+
return Trigger;
|
|
916
|
+
}(PureComponent));
|
|
917
|
+
export default Trigger;
|