tntd 2.7.2 → 2.7.4
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/LICENSE +21 -0
- package/README.md +72 -0
- package/es/actions/index.js +12 -0
- package/es/actions/index.js.map +1 -0
- package/es/actions/index.less +70 -0
- package/es/affix/index.js +2 -1
- package/es/alert/index.js +2 -1
- package/es/anchor/index.js +2 -1
- package/es/array-input/icon.js +6 -24
- package/es/array-input/index.js +119 -203
- package/es/auth-context/index.js +2 -1
- package/es/auto-complete/index.js +2 -1
- package/es/avatar/index.js +2 -1
- package/es/back-top/index.js +2 -1
- package/es/badge/index.js +2 -1
- package/es/breadcrumb/index.js +2 -1
- package/es/button/index.js +2 -1
- package/es/calendar/index.js +2 -1
- package/es/card/index.js +2 -1
- package/es/carousel/index.js +2 -1
- package/es/cascader/index.js +2 -1
- package/es/check-card/group.js +149 -0
- package/es/check-card/group.js.map +1 -0
- package/es/check-card/index.js +120 -0
- package/es/check-card/index.js.map +1 -0
- package/es/check-card/index.less +179 -0
- package/es/checkbox/checkbox-group.js +2 -1
- package/es/checkbox/index.js +2 -1
- package/es/col/index.js +2 -1
- package/es/collapse/index.js +2 -1
- package/es/color-picker/ColorPicker.js +81 -127
- package/es/color-picker/ColorPicker.js.map +1 -1
- package/es/color-picker/index.js +5 -8
- package/es/color-picker/index.less +5 -1
- package/es/columns/index.js +30 -66
- package/es/columns/style/index.js +2 -1
- package/es/comment/index.js +2 -1
- package/es/config-provider/DisabledContext.js +5 -9
- package/es/config-provider/SizeContext.js +3 -7
- package/es/config-provider/config-provider.js +2 -1
- package/es/ellipsis/index.js +13 -3
- package/es/ellipsis/index.js.map +1 -1
- package/es/ellipsis/index.less +2 -2
- package/es/handle/index.js +20 -9
- package/es/handle/index.js.map +1 -1
- package/es/handle/index.less +1 -1
- package/es/index.js +7 -0
- package/es/index.js.map +1 -1
- package/es/index.less +5 -0
- package/es/locale/en_US.js +3 -1
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +3 -1
- package/es/locale/zh_CN.js.map +1 -1
- package/es/mention/index.js +4 -0
- package/es/mention/index.js.map +1 -0
- package/es/page/Box.js +1 -1
- package/es/page/Box.js.map +1 -1
- package/es/page/index.js +2 -2
- package/es/page/index.js.map +1 -1
- package/es/page/index.less +5 -5
- package/es/prev-locale.js +1 -1
- package/es/prev-locale.js.map +1 -1
- package/es/query-form/Field/SelectInput.js +2 -2
- package/es/query-form/Field/SelectInput.js.map +1 -1
- package/es/query-form/Field/index.js +2 -1
- package/es/query-form/Field/index.js.map +1 -1
- package/es/query-list-scene/QueryForm.js +2 -2
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/segmented/index.js +50 -0
- package/es/segmented/index.js.map +1 -0
- package/es/segmented/index.less +138 -0
- package/es/switch/switch.js.map +1 -1
- package/es/table/constants.js +53 -0
- package/es/table/constants.js.map +1 -1
- package/es/table/context.js.map +1 -1
- package/es/table/hooks/use-column-setting.js.map +1 -1
- package/es/table/table.js +107 -6
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +3 -1
- package/es/table/total-shower.js +6 -0
- package/es/table/total-shower.js.map +1 -0
- package/es/title/index.js +5 -5
- package/es/title/index.js.map +1 -1
- package/es/title/index.less +10 -10
- package/es/tntd-form/Form.js +13 -1
- package/es/tntd-form/Form.js.map +1 -1
- package/es/tntd-form/TntdForm/components/Item.js +42 -30
- package/es/tntd-form/TntdForm/components/ItemComp.js +167 -158
- package/es/tntd-form/TntdForm/components/List.js +89 -78
- package/es/tntd-form/TntdForm/index.js +38 -33
- package/es/tntd-form/TntdForm/interface.js +1 -2
- package/es/tntd-form/TntdForm/store.js +1 -2
- package/es/tntd-form/TntdForm/utils.js +158 -168
- package/es/tntd-form/tntd-form.stories.js +7 -5
- package/es/tntd-form/tntd-form.stories.js.map +1 -1
- package/es/tntd-layout/HeaderActions.js +1 -1
- package/es/tntd-layout/HeaderActions.js.map +1 -1
- package/es/tntd-modal/index.js +54 -21
- package/es/tntd-modal/index.js.map +1 -1
- package/es/tntd-modal/index.less +83 -63
- package/es/tree-select/index.js.map +1 -1
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -1
- package/es/utils/simple-template.js +11 -0
- package/es/utils/simple-template.js.map +1 -0
- package/es/water-mark/index.js +99 -0
- package/es/water-mark/index.js.map +1 -0
- package/lib/actions/index.d.ts +15 -0
- package/lib/actions/index.d.ts.map +1 -0
- package/lib/actions/index.js +17 -0
- package/lib/actions/index.js.map +1 -0
- package/lib/actions/index.less +70 -0
- package/lib/check-card/group.d.ts +130 -0
- package/lib/check-card/group.d.ts.map +1 -0
- package/lib/check-card/group.js +179 -0
- package/lib/check-card/group.js.map +1 -0
- package/lib/check-card/index.d.ts +136 -0
- package/lib/check-card/index.d.ts.map +1 -0
- package/lib/check-card/index.js +148 -0
- package/lib/check-card/index.js.map +1 -0
- package/lib/check-card/index.less +179 -0
- package/lib/color-picker/ColorPicker.js +1 -1
- package/lib/color-picker/ColorPicker.js.map +1 -1
- package/lib/color-picker/index.less +5 -1
- package/lib/ellipsis/index.d.ts.map +1 -1
- package/lib/ellipsis/index.js +13 -3
- package/lib/ellipsis/index.js.map +1 -1
- package/lib/ellipsis/index.less +2 -2
- package/lib/handle/index.d.ts.map +1 -1
- package/lib/handle/index.js +20 -9
- package/lib/handle/index.js.map +1 -1
- package/lib/handle/index.less +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -1
- package/lib/index.js.map +1 -1
- package/lib/index.less +5 -0
- package/lib/locale/default.d.ts +1 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/en_US.d.ts +1 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +3 -1
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +1 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +3 -1
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/mention/index.js +25 -0
- package/lib/page/Box.js +1 -1
- package/lib/page/Box.js.map +1 -1
- package/lib/page/index.js +2 -2
- package/lib/page/index.js.map +1 -1
- package/lib/page/index.less +5 -5
- package/lib/prev-locale.js +1 -1
- package/lib/prev-locale.js.map +1 -1
- package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
- package/lib/query-form/Field/SelectInput.js +2 -2
- package/lib/query-form/Field/SelectInput.js.map +1 -1
- package/lib/query-form/Field/index.d.ts.map +1 -1
- package/lib/query-form/Field/index.js +2 -1
- package/lib/query-form/Field/index.js.map +1 -1
- package/lib/query-list-scene/QueryForm.d.ts +1 -1
- package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
- package/lib/query-list-scene/QueryForm.js +2 -2
- package/lib/query-list-scene/QueryForm.js.map +1 -1
- package/lib/segmented/index.d.ts +23 -0
- package/lib/segmented/index.d.ts.map +1 -0
- package/lib/segmented/index.js +78 -0
- package/lib/segmented/index.js.map +1 -0
- package/lib/segmented/index.less +138 -0
- package/lib/switch/switch.d.ts +1 -1
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js.map +1 -1
- package/lib/table/constants.d.ts +2 -0
- package/lib/table/constants.d.ts.map +1 -1
- package/lib/table/constants.js +54 -1
- package/lib/table/constants.js.map +1 -1
- package/lib/table/context.d.ts +1 -0
- package/lib/table/context.d.ts.map +1 -1
- package/lib/table/context.js.map +1 -1
- package/lib/table/hooks/use-column-setting.d.ts +4 -1
- package/lib/table/hooks/use-column-setting.d.ts.map +1 -1
- package/lib/table/hooks/use-column-setting.js.map +1 -1
- package/lib/table/table.d.ts +2 -1
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +107 -6
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +3 -1
- package/lib/table/total-shower.d.ts +9 -0
- package/lib/table/total-shower.d.ts.map +1 -0
- package/lib/table/total-shower.js +13 -0
- package/lib/table/total-shower.js.map +1 -0
- package/lib/title/index.d.ts +11 -1
- package/lib/title/index.d.ts.map +1 -1
- package/lib/title/index.js +5 -5
- package/lib/title/index.js.map +1 -1
- package/lib/title/index.less +10 -10
- package/lib/tntd-form/Form.d.ts.map +1 -1
- package/lib/tntd-form/Form.js +12 -0
- package/lib/tntd-form/Form.js.map +1 -1
- package/lib/tntd-form/TntdForm/components/Item.js +55 -61
- package/lib/tntd-form/TntdForm/components/ItemComp.js +203 -190
- package/lib/tntd-form/TntdForm/components/List.js +118 -111
- package/lib/tntd-form/TntdForm/index.js +61 -67
- package/lib/tntd-form/TntdForm/interface.js +4 -2
- package/lib/tntd-form/TntdForm/store.js +8 -7
- package/lib/tntd-form/TntdForm/utils.js +182 -184
- package/lib/tntd-form/tntd-form.stories.d.ts.map +1 -1
- package/lib/tntd-form/tntd-form.stories.js +7 -5
- package/lib/tntd-form/tntd-form.stories.js.map +1 -1
- package/lib/tntd-layout/HeaderActions.js +1 -1
- package/lib/tntd-layout/HeaderActions.js.map +1 -1
- package/lib/tntd-modal/index.d.ts +15 -2
- package/lib/tntd-modal/index.d.ts.map +1 -1
- package/lib/tntd-modal/index.js +58 -23
- package/lib/tntd-modal/index.js.map +1 -1
- package/lib/tntd-modal/index.less +83 -63
- package/lib/tree-select/index.d.ts +7 -5
- package/lib/tree-select/index.d.ts.map +1 -1
- package/lib/tree-select/index.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/simple-template.d.ts +9 -0
- package/lib/utils/simple-template.d.ts.map +1 -0
- package/lib/utils/simple-template.js +15 -0
- package/lib/utils/simple-template.js.map +1 -0
- package/lib/water-mark/index.d.ts +49 -0
- package/lib/water-mark/index.d.ts.map +1 -0
- package/lib/water-mark/index.js +129 -0
- package/lib/water-mark/index.js.map +1 -0
- package/package.json +21 -3
- package/es/_util/colors.js +0 -3
- package/es/_util/colors.js.map +0 -1
- package/es/_util/easings.js +0 -9
- package/es/_util/easings.js.map +0 -1
- package/es/_util/getDataOrAriaProps.js +0 -8
- package/es/_util/getDataOrAriaProps.js.map +0 -1
- package/es/_util/getScroll.js +0 -14
- package/es/_util/getScroll.js.map +0 -1
- package/es/_util/interopDefault.js +0 -5
- package/es/_util/interopDefault.js.map +0 -1
- package/es/_util/isNumeric.js +0 -4
- package/es/_util/isNumeric.js.map +0 -1
- package/es/_util/motion.js +0 -22
- package/es/_util/motion.js.map +0 -1
- package/es/_util/openAnimation.js +0 -51
- package/es/_util/openAnimation.js.map +0 -1
- package/es/_util/raf.js +0 -25
- package/es/_util/raf.js.map +0 -1
- package/es/_util/reactNode.js +0 -6
- package/es/_util/reactNode.js.map +0 -1
- package/es/_util/ref.js +0 -15
- package/es/_util/ref.js.map +0 -1
- package/es/_util/responsiveObserve.js +0 -82
- package/es/_util/responsiveObserve.js.map +0 -1
- package/es/_util/scrollTo.js +0 -29
- package/es/_util/scrollTo.js.map +0 -1
- package/es/_util/styleChecker.js +0 -12
- package/es/_util/styleChecker.js.map +0 -1
- package/es/_util/throttleByAnimationFrame.js +0 -40
- package/es/_util/throttleByAnimationFrame.js.map +0 -1
- package/es/_util/transButton.js +0 -103
- package/es/_util/transButton.js.map +0 -1
- package/es/_util/triggerEvent.js +0 -8
- package/es/_util/triggerEvent.js.map +0 -1
- package/es/_util/type.js +0 -3
- package/es/_util/type.js.map +0 -1
- package/es/_util/warning.js +0 -5
- package/es/_util/warning.js.map +0 -1
- package/es/_util/wave.js +0 -228
- package/es/_util/wave.js.map +0 -1
- package/es/config-provider/context.js +0 -41
- package/es/config-provider/context.js.map +0 -1
- package/es/tntd-form/__tests__/demo-extend.test.js +0 -3
- package/es/tntd-form/__tests__/demo-extend.test.js.map +0 -1
- package/es/tntd-form/__tests__/demo.test.js +0 -3
- package/es/tntd-form/__tests__/demo.test.js.map +0 -1
- package/es/tntd-form/__tests__/image.test.js +0 -5
- package/es/tntd-form/__tests__/image.test.js.map +0 -1
- package/es/tntd-form/__tests__/index.test.js +0 -957
- package/es/tntd-form/__tests__/index.test.js.map +0 -1
- package/es/tntd-form/__tests__/list-noStyle.test.js +0 -41
- package/es/tntd-form/__tests__/list-noStyle.test.js.map +0 -1
- package/es/tntd-form/__tests__/list.test.js +0 -164
- package/es/tntd-form/__tests__/list.test.js.map +0 -1
- package/es/tntd-form/__tests__/ref.test.js +0 -45
- package/es/tntd-form/__tests__/ref.test.js.map +0 -1
- package/es/tntd-form/__tests__/type.test.js +0 -74
- package/es/tntd-form/__tests__/type.test.js.map +0 -1
- package/lib/_util/colors.d.ts +0 -3
- package/lib/_util/colors.d.ts.map +0 -1
- package/lib/_util/colors.js +0 -7
- package/lib/_util/colors.js.map +0 -1
- package/lib/_util/easings.d.ts +0 -2
- package/lib/_util/easings.d.ts.map +0 -1
- package/lib/_util/easings.js +0 -14
- package/lib/_util/easings.js.map +0 -1
- package/lib/_util/getDataOrAriaProps.d.ts +0 -2
- package/lib/_util/getDataOrAriaProps.d.ts.map +0 -1
- package/lib/_util/getDataOrAriaProps.js +0 -13
- package/lib/_util/getDataOrAriaProps.js.map +0 -1
- package/lib/_util/getScroll.d.ts +0 -2
- package/lib/_util/getScroll.d.ts.map +0 -1
- package/lib/_util/getScroll.js +0 -18
- package/lib/_util/getScroll.js.map +0 -1
- package/lib/_util/interopDefault.d.ts +0 -2
- package/lib/_util/interopDefault.d.ts.map +0 -1
- package/lib/_util/interopDefault.js +0 -9
- package/lib/_util/interopDefault.js.map +0 -1
- package/lib/_util/isNumeric.d.ts +0 -3
- package/lib/_util/isNumeric.d.ts.map +0 -1
- package/lib/_util/isNumeric.js +0 -7
- package/lib/_util/isNumeric.js.map +0 -1
- package/lib/_util/motion.d.ts +0 -24
- package/lib/_util/motion.d.ts.map +0 -1
- package/lib/_util/motion.js +0 -17
- package/lib/_util/motion.js.map +0 -1
- package/lib/_util/openAnimation.d.ts +0 -7
- package/lib/_util/openAnimation.d.ts.map +0 -1
- package/lib/_util/openAnimation.js +0 -58
- package/lib/_util/openAnimation.js.map +0 -1
- package/lib/_util/raf.d.ts +0 -10
- package/lib/_util/raf.d.ts.map +0 -1
- package/lib/_util/raf.js +0 -34
- package/lib/_util/raf.js.map +0 -1
- package/lib/_util/reactNode.d.ts +0 -3
- package/lib/_util/reactNode.d.ts.map +0 -1
- package/lib/_util/reactNode.js +0 -31
- package/lib/_util/reactNode.js.map +0 -1
- package/lib/_util/ref.d.ts +0 -4
- package/lib/_util/ref.d.ts.map +0 -1
- package/lib/_util/ref.js +0 -22
- package/lib/_util/ref.js.map +0 -1
- package/lib/_util/responsiveObserve.d.ts +0 -14
- package/lib/_util/responsiveObserve.d.ts.map +0 -1
- package/lib/_util/responsiveObserve.js +0 -83
- package/lib/_util/responsiveObserve.js.map +0 -1
- package/lib/_util/scrollTo.d.ts +0 -11
- package/lib/_util/scrollTo.d.ts.map +0 -1
- package/lib/_util/scrollTo.js +0 -34
- package/lib/_util/scrollTo.js.map +0 -1
- package/lib/_util/styleChecker.d.ts +0 -4
- package/lib/_util/styleChecker.d.ts.map +0 -1
- package/lib/_util/styleChecker.js +0 -14
- package/lib/_util/styleChecker.js.map +0 -1
- package/lib/_util/throttleByAnimationFrame.d.ts +0 -6
- package/lib/_util/throttleByAnimationFrame.d.ts.map +0 -1
- package/lib/_util/throttleByAnimationFrame.js +0 -49
- package/lib/_util/throttleByAnimationFrame.js.map +0 -1
- package/lib/_util/transButton.d.ts +0 -21
- package/lib/_util/transButton.d.ts.map +0 -1
- package/lib/_util/transButton.js +0 -112
- package/lib/_util/transButton.js.map +0 -1
- package/lib/_util/triggerEvent.d.ts +0 -2
- package/lib/_util/triggerEvent.d.ts.map +0 -1
- package/lib/_util/triggerEvent.js +0 -12
- package/lib/_util/triggerEvent.js.map +0 -1
- package/lib/_util/type.d.ts +0 -4
- package/lib/_util/type.d.ts.map +0 -1
- package/lib/_util/type.js +0 -9
- package/lib/_util/type.js.map +0 -1
- package/lib/_util/warning.d.ts +0 -5
- package/lib/_util/warning.d.ts.map +0 -1
- package/lib/_util/warning.js +0 -28
- package/lib/_util/warning.js.map +0 -1
- package/lib/_util/wave.d.ts +0 -26
- package/lib/_util/wave.d.ts.map +0 -1
- package/lib/_util/wave.js +0 -249
- package/lib/_util/wave.js.map +0 -1
- package/lib/config-provider/context.d.ts +0 -61
- package/lib/config-provider/context.d.ts.map +0 -1
- package/lib/config-provider/context.js +0 -64
- package/lib/config-provider/context.js.map +0 -1
- package/lib/tntd-form/TntdForm/components/Item.d.ts +0 -5
- package/lib/tntd-form/TntdForm/components/Item.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/components/Item.js.map +0 -1
- package/lib/tntd-form/TntdForm/components/ItemComp.d.ts +0 -5
- package/lib/tntd-form/TntdForm/components/ItemComp.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/components/ItemComp.js.map +0 -1
- package/lib/tntd-form/TntdForm/components/List.d.ts +0 -5
- package/lib/tntd-form/TntdForm/components/List.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/components/List.js.map +0 -1
- package/lib/tntd-form/TntdForm/index.d.ts +0 -10
- package/lib/tntd-form/TntdForm/index.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/index.js.map +0 -1
- package/lib/tntd-form/TntdForm/interface.d.ts +0 -93
- package/lib/tntd-form/TntdForm/interface.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/interface.js.map +0 -1
- package/lib/tntd-form/TntdForm/store.d.ts +0 -4
- package/lib/tntd-form/TntdForm/store.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/store.js.map +0 -1
- package/lib/tntd-form/TntdForm/utils.d.ts +0 -48
- package/lib/tntd-form/TntdForm/utils.d.ts.map +0 -1
- package/lib/tntd-form/TntdForm/utils.js.map +0 -1
- package/lib/tntd-form/__tests__/demo-extend.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/demo-extend.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/demo-extend.test.js +0 -5
- package/lib/tntd-form/__tests__/demo-extend.test.js.map +0 -1
- package/lib/tntd-form/__tests__/demo.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/demo.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/demo.test.js +0 -8
- package/lib/tntd-form/__tests__/demo.test.js.map +0 -1
- package/lib/tntd-form/__tests__/image.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/image.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/image.test.js +0 -7
- package/lib/tntd-form/__tests__/image.test.js.map +0 -1
- package/lib/tntd-form/__tests__/index.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/index.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/index.test.js +0 -981
- package/lib/tntd-form/__tests__/index.test.js.map +0 -1
- package/lib/tntd-form/__tests__/list-noStyle.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/list-noStyle.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/list-noStyle.test.js +0 -46
- package/lib/tntd-form/__tests__/list-noStyle.test.js.map +0 -1
- package/lib/tntd-form/__tests__/list.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/list.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/list.test.js +0 -169
- package/lib/tntd-form/__tests__/list.test.js.map +0 -1
- package/lib/tntd-form/__tests__/ref.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/ref.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/ref.test.js +0 -50
- package/lib/tntd-form/__tests__/ref.test.js.map +0 -1
- package/lib/tntd-form/__tests__/type.test.d.ts +0 -2
- package/lib/tntd-form/__tests__/type.test.d.ts.map +0 -1
- package/lib/tntd-form/__tests__/type.test.js +0 -98
- package/lib/tntd-form/__tests__/type.test.js.map +0 -1
package/es/_util/ref.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/_util/ref.ts"],"names":[],"mappings":"AAAA,OAAkB,OAAO,CAAC;AAE1B,MAAM,UAAU,OAAO,CAAI,GAAiB,EAAE,IAAO;IACnD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,IAAI,CAAC,CAAC;KACX;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,EAAE;QAC5D,GAAW,CAAC,OAAO,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAI,GAAG,IAAoB;IACnD,OAAO,CAAC,IAAO,EAAE,EAAE;QACjB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nexport function fillRef<T>(ref: React.Ref<T>, node: T) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (typeof ref === 'object' && ref && 'current' in ref) {\n (ref as any).current = node;\n }\n}\n\nexport function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T> {\n return (node: T) => {\n refs.forEach(ref => {\n fillRef(ref, node);\n });\n };\n}\n"]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// matchMedia polyfill for
|
|
2
|
-
// https://github.com/WickyNilliams/enquire.js/issues/82
|
|
3
|
-
let enquire;
|
|
4
|
-
// TODO: Will be removed in antd 4.0 because we will no longer support ie9
|
|
5
|
-
if (typeof window !== 'undefined') {
|
|
6
|
-
const matchMediaPolyfill = mediaQuery => {
|
|
7
|
-
return {
|
|
8
|
-
media: mediaQuery,
|
|
9
|
-
matches: false,
|
|
10
|
-
addListener() {},
|
|
11
|
-
removeListener() {}
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
// ref: https://github.com/ant-design/ant-design/issues/18774
|
|
15
|
-
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
|
|
16
|
-
// eslint-disable-next-line global-require
|
|
17
|
-
enquire = require('enquire.js');
|
|
18
|
-
}
|
|
19
|
-
export const responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
|
20
|
-
export const responsiveMap = {
|
|
21
|
-
xs: '(max-width: 575px)',
|
|
22
|
-
sm: '(min-width: 576px)',
|
|
23
|
-
md: '(min-width: 768px)',
|
|
24
|
-
lg: '(min-width: 992px)',
|
|
25
|
-
xl: '(min-width: 1200px)',
|
|
26
|
-
xxl: '(min-width: 1600px)'
|
|
27
|
-
};
|
|
28
|
-
let subscribers = [];
|
|
29
|
-
let subUid = -1;
|
|
30
|
-
let screens = {};
|
|
31
|
-
const responsiveObserve = {
|
|
32
|
-
dispatch(pointMap) {
|
|
33
|
-
screens = pointMap;
|
|
34
|
-
if (subscribers.length < 1) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
subscribers.forEach(item => {
|
|
38
|
-
item.func(screens);
|
|
39
|
-
});
|
|
40
|
-
return true;
|
|
41
|
-
},
|
|
42
|
-
subscribe(func) {
|
|
43
|
-
if (subscribers.length === 0) {
|
|
44
|
-
this.register();
|
|
45
|
-
}
|
|
46
|
-
const token = (++subUid).toString();
|
|
47
|
-
subscribers.push({
|
|
48
|
-
token,
|
|
49
|
-
func
|
|
50
|
-
});
|
|
51
|
-
func(screens);
|
|
52
|
-
return token;
|
|
53
|
-
},
|
|
54
|
-
unsubscribe(token) {
|
|
55
|
-
subscribers = subscribers.filter(item => item.token !== token);
|
|
56
|
-
if (subscribers.length === 0) {
|
|
57
|
-
this.unregister();
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
unregister() {
|
|
61
|
-
Object.keys(responsiveMap).map(screen => enquire.unregister(responsiveMap[screen]));
|
|
62
|
-
},
|
|
63
|
-
register() {
|
|
64
|
-
Object.keys(responsiveMap).map(screen => enquire.register(responsiveMap[screen], {
|
|
65
|
-
match: () => {
|
|
66
|
-
const pointMap = Object.assign(Object.assign({}, screens), {
|
|
67
|
-
[screen]: true
|
|
68
|
-
});
|
|
69
|
-
this.dispatch(pointMap);
|
|
70
|
-
},
|
|
71
|
-
unmatch: () => {
|
|
72
|
-
const pointMap = Object.assign(Object.assign({}, screens), {
|
|
73
|
-
[screen]: false
|
|
74
|
-
});
|
|
75
|
-
this.dispatch(pointMap);
|
|
76
|
-
},
|
|
77
|
-
// Keep a empty destory to avoid triggering unmatch when unregister
|
|
78
|
-
destroy() {}
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
export default responsiveObserve;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responsiveObserve.js","sourceRoot":"","sources":["../../src/_util/responsiveObserve.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,wDAAwD;AACxD,IAAI,OAAY,CAAC;AAEjB,0EAA0E;AAC1E,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,kBAAkB,GAAG,CAAC,UAAkB,EAAE,EAAE;QAChD,OAAO;YACL,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,WAAW,KAAI,CAAC;YAChB,cAAc,KAAI,CAAC;SACpB,CAAC;IACJ,CAAC,CAAC;IACF,6DAA6D;IAC7D,IAAI,CAAC,MAAM,CAAC,UAAU;QAAE,MAAM,CAAC,UAAU,GAAG,kBAAyB,CAAC;IACtE,0CAA0C;IAC1C,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACjC;AAKD,MAAM,CAAC,MAAM,eAAe,GAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,qBAAqB;IACzB,GAAG,E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AI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE,CACpD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;YACtC,KAAK,EAAE,GAAG,EAAE;gBACV,MAAM,QAAQ,mCACT,OAAO,KACV,CAAC,MAAM,CAAC,EAAE,IAAI,GACf,CAAC;gBACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC1B,CAAC;YACD,OAAO,EAAE,GAAG,EAAE;gBACZ,MAAM,QAAQ,mCACT,OAAO,KACV,CAAC,MAAM,CAAC,EAAE,KAAK,GAChB,CAAC;gBACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC1B,CAAC;YACD,mEAAmE;YACnE,OAAO,KAAI,CAAC;SACb,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["// matchMedia polyfill for\n// https://github.com/WickyNilliams/enquire.js/issues/82\nlet enquire: any;\n\n// TODO: Will be removed in antd 4.0 because we will no longer support ie9\nif (typeof window !== 'undefined') {\n const matchMediaPolyfill = (mediaQuery: string) => {\n return {\n media: mediaQuery,\n matches: false,\n addListener() {},\n removeListener() {},\n };\n };\n // ref: https://github.com/ant-design/ant-design/issues/18774\n if (!window.matchMedia) window.matchMedia = matchMediaPolyfill as any;\n // eslint-disable-next-line global-require\n enquire = require('enquire.js');\n}\n\nexport type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';\nexport type BreakpointMap = Partial<Record<Breakpoint, string>>;\n\nexport const responsiveArray: Breakpoint[] = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];\n\nexport const responsiveMap: BreakpointMap = {\n xs: '(max-width: 575px)',\n sm: '(min-width: 576px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 992px)',\n xl: '(min-width: 1200px)',\n xxl: '(min-width: 1600px)',\n};\n\ntype SubscribeFunc = (screens: BreakpointMap) => void;\n\nlet subscribers: Array<{\n token: string;\n func: SubscribeFunc;\n}> = [];\nlet subUid = -1;\nlet screens = {};\n\nconst responsiveObserve = {\n dispatch(pointMap: BreakpointMap) {\n screens = pointMap;\n if (subscribers.length < 1) {\n return false;\n }\n\n subscribers.forEach(item => {\n item.func(screens);\n });\n\n return true;\n },\n subscribe(func: SubscribeFunc) {\n if (subscribers.length === 0) {\n this.register();\n }\n const token = (++subUid).toString();\n subscribers.push({\n token,\n func,\n });\n func(screens);\n return token;\n },\n unsubscribe(token: string) {\n subscribers = subscribers.filter(item => item.token !== token);\n if (subscribers.length === 0) {\n this.unregister();\n }\n },\n unregister() {\n Object.keys(responsiveMap).map((screen: Breakpoint) =>\n enquire.unregister(responsiveMap[screen]),\n );\n },\n register() {\n Object.keys(responsiveMap).map((screen: Breakpoint) =>\n enquire.register(responsiveMap[screen], {\n match: () => {\n const pointMap = {\n ...screens,\n [screen]: true,\n };\n this.dispatch(pointMap);\n },\n unmatch: () => {\n const pointMap = {\n ...screens,\n [screen]: false,\n };\n this.dispatch(pointMap);\n },\n // Keep a empty destory to avoid triggering unmatch when unregister\n destroy() {},\n }),\n );\n },\n};\n\nexport default responsiveObserve;\n"]}
|
package/es/_util/scrollTo.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import raf from 'raf';
|
|
2
|
-
import getScroll from './getScroll';
|
|
3
|
-
import { easeInOutCubic } from './easings';
|
|
4
|
-
export default function scrollTo(y, options = {}) {
|
|
5
|
-
const {
|
|
6
|
-
getContainer = () => window,
|
|
7
|
-
callback,
|
|
8
|
-
duration = 450
|
|
9
|
-
} = options;
|
|
10
|
-
const container = getContainer();
|
|
11
|
-
const scrollTop = getScroll(container, true);
|
|
12
|
-
const startTime = Date.now();
|
|
13
|
-
const frameFunc = () => {
|
|
14
|
-
const timestamp = Date.now();
|
|
15
|
-
const time = timestamp - startTime;
|
|
16
|
-
const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
|
|
17
|
-
if (container === window) {
|
|
18
|
-
window.scrollTo(window.pageXOffset, nextScrollTop);
|
|
19
|
-
} else {
|
|
20
|
-
container.scrollTop = nextScrollTop;
|
|
21
|
-
}
|
|
22
|
-
if (time < duration) {
|
|
23
|
-
raf(frameFunc);
|
|
24
|
-
} else if (typeof callback === 'function') {
|
|
25
|
-
callback();
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
raf(frameFunc);
|
|
29
|
-
}
|
package/es/_util/scrollTo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollTo.js","sourceRoot":"","sources":["../../src/_util/scrollTo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAW3C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAS,EAAE,UAA2B,EAAE;IACvE,MAAM,EAAE,YAAY,GAAG,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC;IAE1E,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;QACnC,MAAM,aAAa,GAAG,cAAc,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;QAChG,IAAI,SAAS,KAAK,MAAM,EAAE;YACxB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;SACpD;aAAM;YACJ,SAAyB,CAAC,SAAS,GAAG,aAAa,CAAC;SACtD;QACD,IAAI,IAAI,GAAG,QAAQ,EAAE;YACnB,GAAG,CAAC,SAAS,CAAC,CAAC;SAChB;aAAM,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;YACzC,QAAQ,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;IACF,GAAG,CAAC,SAAS,CAAC,CAAC;AACjB,CAAC","sourcesContent":["import raf from 'raf';\nimport getScroll from './getScroll';\nimport { easeInOutCubic } from './easings';\n\ninterface ScrollToOptions {\n /** Scroll container, default as window */\n getContainer?: () => HTMLElement | Window;\n /** Scroll end callback */\n callback?: () => any;\n /** Animation duration, default as 450 */\n duration?: number;\n}\n\nexport default function scrollTo(y: number, options: ScrollToOptions = {}) {\n const { getContainer = () => window, callback, duration = 450 } = options;\n\n const container = getContainer();\n const scrollTop = getScroll(container, true);\n const startTime = Date.now();\n\n const frameFunc = () => {\n const timestamp = Date.now();\n const time = timestamp - startTime;\n const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);\n if (container === window) {\n window.scrollTo(window.pageXOffset, nextScrollTop);\n } else {\n (container as HTMLElement).scrollTop = nextScrollTop;\n }\n if (time < duration) {\n raf(frameFunc);\n } else if (typeof callback === 'function') {\n callback();\n }\n };\n raf(frameFunc);\n}\n"]}
|
package/es/_util/styleChecker.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const isStyleSupport = styleName => {
|
|
2
|
-
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
|
|
3
|
-
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
|
|
4
|
-
const {
|
|
5
|
-
documentElement
|
|
6
|
-
} = window.document;
|
|
7
|
-
return styleNameList.some(name => name in documentElement.style);
|
|
8
|
-
}
|
|
9
|
-
return false;
|
|
10
|
-
};
|
|
11
|
-
export const isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);
|
|
12
|
-
export default isStyleSupport;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styleChecker.js","sourceRoot":"","sources":["../../src/_util/styleChecker.tsx"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,CAAC,SAAiC,EAAW,EAAE;IACpE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE;QACvF,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACzE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;QAE5C,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;KAClE;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExF,eAAe,cAAc,CAAC","sourcesContent":["const isStyleSupport = (styleName: string | Array<string>): boolean => {\n if (typeof window !== 'undefined' && window.document && window.document.documentElement) {\n const styleNameList = Array.isArray(styleName) ? styleName : [styleName];\n const { documentElement } = window.document;\n\n return styleNameList.some(name => name in documentElement.style);\n }\n return false;\n};\n\nexport const isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);\n\nexport default isStyleSupport;\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import raf from 'raf';
|
|
2
|
-
export default function throttleByAnimationFrame(fn) {
|
|
3
|
-
let requestId;
|
|
4
|
-
const later = args => () => {
|
|
5
|
-
requestId = null;
|
|
6
|
-
fn(...args);
|
|
7
|
-
};
|
|
8
|
-
const throttled = (...args) => {
|
|
9
|
-
if (requestId == null) {
|
|
10
|
-
requestId = raf(later(args));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
throttled.cancel = () => raf.cancel(requestId);
|
|
14
|
-
return throttled;
|
|
15
|
-
}
|
|
16
|
-
export function throttleByAnimationFrameDecorator() {
|
|
17
|
-
// eslint-disable-next-line func-names
|
|
18
|
-
return function (target, key, descriptor) {
|
|
19
|
-
const fn = descriptor.value;
|
|
20
|
-
let definingProperty = false;
|
|
21
|
-
return {
|
|
22
|
-
configurable: true,
|
|
23
|
-
get() {
|
|
24
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
25
|
-
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
|
|
26
|
-
return fn;
|
|
27
|
-
}
|
|
28
|
-
const boundFn = throttleByAnimationFrame(fn.bind(this));
|
|
29
|
-
definingProperty = true;
|
|
30
|
-
Object.defineProperty(this, key, {
|
|
31
|
-
value: boundFn,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true
|
|
34
|
-
});
|
|
35
|
-
definingProperty = false;
|
|
36
|
-
return boundFn;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"throttleByAnimationFrame.js","sourceRoot":"","sources":["../../src/_util/throttleByAnimationFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAA4B;IAC3E,IAAI,SAAwB,CAAC;IAE7B,MAAM,KAAK,GAAG,CAAC,IAAW,EAAE,EAAE,CAAC,GAAG,EAAE;QAClC,SAAS,GAAG,IAAI,CAAC;QACjB,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;QACnC,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;IAED,SAAiB,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC;IAEzD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,sCAAsC;IACtC,OAAO,UAAS,MAAW,EAAE,GAAW,EAAE,UAAe;QACvD,MAAM,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC;QAC5B,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAC7B,OAAO;YACL,YAAY,EAAE,IAAI;YAClB,GAAG;gBACD,iDAAiD;gBACjD,IAAI,gBAAgB,IAAI,IAAI,KAAK,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBAC7E,OAAO,EAAE,CAAC;iBACX;gBAED,MAAM,OAAO,GAAG,wBAAwB,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACxD,gBAAgB,GAAG,IAAI,CAAC;gBACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE;oBAC/B,KAAK,EAAE,OAAO;oBACd,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC;gBACH,gBAAgB,GAAG,KAAK,CAAC;gBACzB,OAAO,OAAO,CAAC;YACjB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import raf from 'raf';\n\nexport default function throttleByAnimationFrame(fn: (...args: any[]) => void) {\n let requestId: number | null;\n\n const later = (args: any[]) => () => {\n requestId = null;\n fn(...args);\n };\n\n const throttled = (...args: any[]) => {\n if (requestId == null) {\n requestId = raf(later(args));\n }\n };\n\n (throttled as any).cancel = () => raf.cancel(requestId!);\n\n return throttled;\n}\n\nexport function throttleByAnimationFrameDecorator() {\n // eslint-disable-next-line func-names\n return function(target: any, key: string, descriptor: any) {\n const fn = descriptor.value;\n let definingProperty = false;\n return {\n configurable: true,\n get() {\n // eslint-disable-next-line no-prototype-builtins\n if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {\n return fn;\n }\n\n const boundFn = throttleByAnimationFrame(fn.bind(this));\n definingProperty = true;\n Object.defineProperty(this, key, {\n value: boundFn,\n configurable: true,\n writable: true,\n });\n definingProperty = false;\n return boundFn;\n },\n };\n };\n}\n"]}
|
package/es/_util/transButton.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Wrap of sub component which need use as Button capacity (like Icon component).
|
|
11
|
-
* This helps accessibility reader to tread as a interactive button to operation.
|
|
12
|
-
*/
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import KeyCode from 'rc-util/lib/KeyCode';
|
|
15
|
-
const inlineStyle = {
|
|
16
|
-
border: 0,
|
|
17
|
-
background: 'transparent',
|
|
18
|
-
padding: 0,
|
|
19
|
-
lineHeight: 'inherit',
|
|
20
|
-
display: 'inline-block'
|
|
21
|
-
};
|
|
22
|
-
class TransButton extends React.Component {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
Object.defineProperty(this, "div", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true,
|
|
29
|
-
value: void 0
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(this, "lastKeyCode", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true,
|
|
35
|
-
value: void 0
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(this, "onKeyDown", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: event => {
|
|
42
|
-
const {
|
|
43
|
-
keyCode
|
|
44
|
-
} = event;
|
|
45
|
-
if (keyCode === KeyCode.ENTER) {
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(this, "onKeyUp", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true,
|
|
54
|
-
value: event => {
|
|
55
|
-
const {
|
|
56
|
-
keyCode
|
|
57
|
-
} = event;
|
|
58
|
-
const {
|
|
59
|
-
onClick
|
|
60
|
-
} = this.props;
|
|
61
|
-
if (keyCode === KeyCode.ENTER && onClick) {
|
|
62
|
-
onClick();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(this, "setRef", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
configurable: true,
|
|
69
|
-
writable: true,
|
|
70
|
-
value: btn => {
|
|
71
|
-
this.div = btn;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
focus() {
|
|
76
|
-
if (this.div) {
|
|
77
|
-
this.div.focus();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
blur() {
|
|
81
|
-
if (this.div) {
|
|
82
|
-
this.div.blur();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
render() {
|
|
86
|
-
const _a = this.props,
|
|
87
|
-
{
|
|
88
|
-
style,
|
|
89
|
-
noStyle
|
|
90
|
-
} = _a,
|
|
91
|
-
restProps = __rest(_a, ["style", "noStyle"]);
|
|
92
|
-
return React.createElement("div", Object.assign({
|
|
93
|
-
role: "button",
|
|
94
|
-
tabIndex: 0,
|
|
95
|
-
ref: this.setRef
|
|
96
|
-
}, restProps, {
|
|
97
|
-
onKeyDown: this.onKeyDown,
|
|
98
|
-
onKeyUp: this.onKeyUp,
|
|
99
|
-
style: Object.assign(Object.assign({}, !noStyle ? inlineStyle : null), style)
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
export default TransButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transButton.js","sourceRoot":"","sources":["../../src/_util/transButton.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAO1C,MAAM,WAAW,GAAwB;IACvC,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,MAAM,WAAY,SAAQ,KAAK,CAAC,SAA2B;IAA3D;;QACE;;;;;WAAqB;QAErB;;;;;WAAqB;QAErB;;;;mBAAwD,KAAK,CAAC,EAAE;gBAC9D,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;gBAC1B,IAAI,OAAO,KAAK,OAAO,CAAC,KAAK,EAAE;oBAC7B,KAAK,CAAC,cAAc,EAAE,CAAC;iBACxB;YACH,CAAC;WAAC;QAEF;;;;mBAAsD,KAAK,CAAC,EAAE;gBAC5D,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;gBAC1B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;gBAC/B,IAAI,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,OAAO,EAAE;oBACxC,OAAO,EAAE,CAAC;iBACX;YACH,CAAC;WAAC;QAEF;;;;mBAAS,CAAC,GAAmB,EAAE,EAAE;gBAC/B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,CAAC;WAAC;IA6BJ,CAAC;IA3BC,KAAK;QACH,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;SAClB;IACH,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACjB;IACH,CAAC;IAED,MAAM;QACJ,MAAM,KAAmC,IAAI,CAAC,KAAK,EAA7C,EAAE,KAAK,EAAE,OAAO,OAA6B,EAAxB,SAAS,cAA9B,oBAAgC,CAAa,CAAC;QAEpD,OAAO,CACL,2CACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,IAAI,CAAC,MAAM,IACZ,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,kCAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAK,KAAK,KACrD,CACH,CAAC;IACJ,CAAC;CACF;AAED,eAAe,WAAW,CAAC","sourcesContent":["/**\n * Wrap of sub component which need use as Button capacity (like Icon component).\n * This helps accessibility reader to tread as a interactive button to operation.\n */\nimport * as React from 'react';\nimport KeyCode from 'rc-util/lib/KeyCode';\n\ninterface TransButtonProps extends React.HTMLAttributes<HTMLDivElement> {\n onClick?: (e?: React.MouseEvent<HTMLDivElement>) => void;\n noStyle?: boolean;\n}\n\nconst inlineStyle: React.CSSProperties = {\n border: 0,\n background: 'transparent',\n padding: 0,\n lineHeight: 'inherit',\n display: 'inline-block',\n};\n\nclass TransButton extends React.Component<TransButtonProps> {\n div?: HTMLDivElement;\n\n lastKeyCode?: number;\n\n onKeyDown: React.KeyboardEventHandler<HTMLDivElement> = event => {\n const { keyCode } = event;\n if (keyCode === KeyCode.ENTER) {\n event.preventDefault();\n }\n };\n\n onKeyUp: React.KeyboardEventHandler<HTMLDivElement> = event => {\n const { keyCode } = event;\n const { onClick } = this.props;\n if (keyCode === KeyCode.ENTER && onClick) {\n onClick();\n }\n };\n\n setRef = (btn: HTMLDivElement) => {\n this.div = btn;\n };\n\n focus() {\n if (this.div) {\n this.div.focus();\n }\n }\n\n blur() {\n if (this.div) {\n this.div.blur();\n }\n }\n\n render() {\n const { style, noStyle, ...restProps } = this.props;\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n ref={this.setRef}\n {...restProps}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n style={{ ...(!noStyle ? inlineStyle : null), ...style }}\n />\n );\n }\n}\n\nexport default TransButton;\n"]}
|
package/es/_util/triggerEvent.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"triggerEvent.js","sourceRoot":"","sources":["../../src/_util/triggerEvent.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAW,EAAE,IAAY;IAC5D,IAAI,aAAa,IAAI,QAAQ,EAAE;QAC7B,wBAAwB;QACxB,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC/B,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;KACrB;AACH,CAAC","sourcesContent":["export default function triggerEvent(el: Element, type: string) {\n if ('createEvent' in document) {\n // modern browsers, IE9+\n const e = document.createEvent('HTMLEvents');\n e.initEvent(type, false, true);\n el.dispatchEvent(e);\n }\n}\n"]}
|
package/es/_util/type.js
DELETED
package/es/_util/type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/_util/type.ts"],"names":[],"mappings":"AACA,qHAAqH;AACrH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC;AAE9D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC","sourcesContent":["export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\nexport const tuple = <T extends string[]>(...args: T) => args;\n\nexport const tupleNum = <T extends number[]>(...args: T) => args;\n"]}
|
package/es/_util/warning.js
DELETED
package/es/_util/warning.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"warning.js","sourceRoot":"","sources":["../../src/_util/warning.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,eAAe,CAAC,KAAc,EAAE,SAAiB,EAAE,OAAe,EAAQ,EAAE;IAC1E,OAAO,CAAC,KAAK,EAAE,UAAU,SAAS,KAAK,OAAO,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import warning, { resetWarned } from 'rc-util/lib/warning';\n\nexport { resetWarned };\n\nexport default (valid: boolean, component: string, message: string): void => {\n warning(valid, `[antd: ${component}] ${message}`);\n};\n"]}
|
package/es/_util/wave.js
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { findDOMNode } from 'react-dom';
|
|
3
|
-
import TransitionEvents from 'css-animation/lib/Event';
|
|
4
|
-
import raf from './raf';
|
|
5
|
-
import { ConfigConsumer } from '../config-provider';
|
|
6
|
-
let styleForPesudo;
|
|
7
|
-
// Where el is the DOM element you'd like to test for visibility
|
|
8
|
-
function isHidden(element) {
|
|
9
|
-
if (process.env.NODE_ENV === 'test') {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
return !element || element.offsetParent === null;
|
|
13
|
-
}
|
|
14
|
-
function isNotGrey(color) {
|
|
15
|
-
// eslint-disable-next-line no-useless-escape
|
|
16
|
-
const match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);
|
|
17
|
-
if (match && match[1] && match[2] && match[3]) {
|
|
18
|
-
return !(match[1] === match[2] && match[2] === match[3]);
|
|
19
|
-
}
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
export default class Wave extends React.Component {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
Object.defineProperty(this, "instance", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true,
|
|
29
|
-
value: void 0
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(this, "extraNode", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true,
|
|
35
|
-
value: void 0
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(this, "clickWaveTimeoutId", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
configurable: true,
|
|
40
|
-
writable: true,
|
|
41
|
-
value: void 0
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(this, "animationStartId", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
configurable: true,
|
|
46
|
-
writable: true,
|
|
47
|
-
value: void 0
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(this, "animationStart", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true,
|
|
53
|
-
value: false
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(this, "destroy", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: false
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(this, "csp", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
writable: true,
|
|
65
|
-
value: void 0
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(this, "onClick", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true,
|
|
70
|
-
writable: true,
|
|
71
|
-
value: (node, waveColor) => {
|
|
72
|
-
if (!node || isHidden(node) || node.className.indexOf('-leave') >= 0) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const {
|
|
76
|
-
insertExtraNode
|
|
77
|
-
} = this.props;
|
|
78
|
-
this.extraNode = document.createElement('div');
|
|
79
|
-
const {
|
|
80
|
-
extraNode
|
|
81
|
-
} = this;
|
|
82
|
-
extraNode.className = 'ant-click-animating-node';
|
|
83
|
-
const attributeName = this.getAttributeName();
|
|
84
|
-
node.setAttribute(attributeName, 'true');
|
|
85
|
-
// Not white or transparnt or grey
|
|
86
|
-
styleForPesudo = styleForPesudo || document.createElement('style');
|
|
87
|
-
if (waveColor && waveColor !== '#ffffff' && waveColor !== 'rgb(255, 255, 255)' && isNotGrey(waveColor) && !/rgba\(\d*, \d*, \d*, 0\)/.test(waveColor) &&
|
|
88
|
-
// any transparent rgba color
|
|
89
|
-
waveColor !== 'transparent') {
|
|
90
|
-
// Add nonce if CSP exist
|
|
91
|
-
if (this.csp && this.csp.nonce) {
|
|
92
|
-
styleForPesudo.nonce = this.csp.nonce;
|
|
93
|
-
}
|
|
94
|
-
extraNode.style.borderColor = waveColor;
|
|
95
|
-
styleForPesudo.innerHTML = `
|
|
96
|
-
[ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {
|
|
97
|
-
--antd-wave-shadow-color: ${waveColor};
|
|
98
|
-
}`;
|
|
99
|
-
if (!document.body.contains(styleForPesudo)) {
|
|
100
|
-
document.body.appendChild(styleForPesudo);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
if (insertExtraNode) {
|
|
104
|
-
node.appendChild(extraNode);
|
|
105
|
-
}
|
|
106
|
-
TransitionEvents.addStartEventListener(node, this.onTransitionStart);
|
|
107
|
-
TransitionEvents.addEndEventListener(node, this.onTransitionEnd);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
Object.defineProperty(this, "onTransitionStart", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
configurable: true,
|
|
113
|
-
writable: true,
|
|
114
|
-
value: e => {
|
|
115
|
-
if (this.destroy) return;
|
|
116
|
-
const node = findDOMNode(this);
|
|
117
|
-
if (!e || e.target !== node) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (!this.animationStart) {
|
|
121
|
-
this.resetEffect(node);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
Object.defineProperty(this, "onTransitionEnd", {
|
|
126
|
-
enumerable: true,
|
|
127
|
-
configurable: true,
|
|
128
|
-
writable: true,
|
|
129
|
-
value: e => {
|
|
130
|
-
if (!e || e.animationName !== 'fadeEffect') {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
this.resetEffect(e.target);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(this, "bindAnimationEvent", {
|
|
137
|
-
enumerable: true,
|
|
138
|
-
configurable: true,
|
|
139
|
-
writable: true,
|
|
140
|
-
value: node => {
|
|
141
|
-
if (!node || !node.getAttribute || node.getAttribute('disabled') || node.className.indexOf('disabled') >= 0) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
const onClick = e => {
|
|
145
|
-
// Fix radio button click twice
|
|
146
|
-
if (e.target.tagName === 'INPUT' || isHidden(e.target)) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
this.resetEffect(node);
|
|
150
|
-
// Get wave color from target
|
|
151
|
-
const waveColor = getComputedStyle(node).getPropertyValue('border-top-color') ||
|
|
152
|
-
// Firefox Compatible
|
|
153
|
-
getComputedStyle(node).getPropertyValue('border-color') || getComputedStyle(node).getPropertyValue('background-color');
|
|
154
|
-
this.clickWaveTimeoutId = window.setTimeout(() => this.onClick(node, waveColor), 0);
|
|
155
|
-
raf.cancel(this.animationStartId);
|
|
156
|
-
this.animationStart = true;
|
|
157
|
-
// Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this.
|
|
158
|
-
this.animationStartId = raf(() => {
|
|
159
|
-
this.animationStart = false;
|
|
160
|
-
}, 10);
|
|
161
|
-
};
|
|
162
|
-
node.addEventListener('click', onClick, true);
|
|
163
|
-
return {
|
|
164
|
-
cancel: () => {
|
|
165
|
-
node.removeEventListener('click', onClick, true);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
Object.defineProperty(this, "renderWave", {
|
|
171
|
-
enumerable: true,
|
|
172
|
-
configurable: true,
|
|
173
|
-
writable: true,
|
|
174
|
-
value: ({
|
|
175
|
-
csp
|
|
176
|
-
}) => {
|
|
177
|
-
const {
|
|
178
|
-
children
|
|
179
|
-
} = this.props;
|
|
180
|
-
this.csp = csp;
|
|
181
|
-
return children;
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
componentDidMount() {
|
|
186
|
-
const node = findDOMNode(this);
|
|
187
|
-
if (!node || node.nodeType !== 1) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
this.instance = this.bindAnimationEvent(node);
|
|
191
|
-
}
|
|
192
|
-
componentWillUnmount() {
|
|
193
|
-
if (this.instance) {
|
|
194
|
-
this.instance.cancel();
|
|
195
|
-
}
|
|
196
|
-
if (this.clickWaveTimeoutId) {
|
|
197
|
-
clearTimeout(this.clickWaveTimeoutId);
|
|
198
|
-
}
|
|
199
|
-
this.destroy = true;
|
|
200
|
-
}
|
|
201
|
-
getAttributeName() {
|
|
202
|
-
const {
|
|
203
|
-
insertExtraNode
|
|
204
|
-
} = this.props;
|
|
205
|
-
return insertExtraNode ? 'ant-click-animating' : 'ant-click-animating-without-extra-node';
|
|
206
|
-
}
|
|
207
|
-
resetEffect(node) {
|
|
208
|
-
if (!node || node === this.extraNode || !(node instanceof Element)) {
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const {
|
|
212
|
-
insertExtraNode
|
|
213
|
-
} = this.props;
|
|
214
|
-
const attributeName = this.getAttributeName();
|
|
215
|
-
node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466
|
|
216
|
-
if (styleForPesudo) {
|
|
217
|
-
styleForPesudo.innerHTML = '';
|
|
218
|
-
}
|
|
219
|
-
if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {
|
|
220
|
-
node.removeChild(this.extraNode);
|
|
221
|
-
}
|
|
222
|
-
TransitionEvents.removeStartEventListener(node, this.onTransitionStart);
|
|
223
|
-
TransitionEvents.removeEndEventListener(node, this.onTransitionEnd);
|
|
224
|
-
}
|
|
225
|
-
render() {
|
|
226
|
-
return React.createElement(ConfigConsumer, null, this.renderWave);
|
|
227
|
-
}
|
|
228
|
-
}
|
package/es/_util/wave.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wave.js","sourceRoot":"","sources":["../../src/_util/wave.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,cAAc,EAAkC,MAAM,oBAAoB,CAAC;AAEpF,IAAI,cAAuC,CAAC;AAE5C,gEAAgE;AAChE,SAAS,QAAQ,CAAC,OAAoB;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE;QACnC,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,OAA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ACtB,CAAC;IA+DD,gBAAgB;QACd,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACvC,OAAO,eAAe,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,wCAAwC,CAAC;IAC5F,CAAC;IAwCD,WAAW,CAAC,IAAiB;QAC3B,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,YAAY,OAAO,CAAC,EAAE;YAClE,OAAO;SACR;QACD,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACvC,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC9C,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,2CAA2C;QAEtF,IAAI,cAAc,EAAE;YAClB,cAAc,CAAC,SAAS,GAAG,EAAE,CAAC;SAC/B;QAED,IAAI,eAAe,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACtE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAClC;QACD,gBAAgB,CAAC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACxE,gBAAgB,CAAC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IACtE,CAAC;IASD,MAAM;QACJ,OAAO,oBAAC,cAAc,QAAE,IAAI,CAAC,UAAU,CAAkB,CAAC;IAC5D,CAAC;CACF","sourcesContent":["import * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport TransitionEvents from 'css-animation/lib/Event';\nimport raf from './raf';\nimport { ConfigConsumer, ConfigConsumerProps, CSPConfig } from '../config-provider';\n\nlet styleForPesudo: HTMLStyleElement | null;\n\n// Where el is the DOM element you'd like to test for visibility\nfunction isHidden(element: HTMLElement) {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n return !element || element.offsetParent === null;\n}\n\nfunction isNotGrey(color: string) {\n // eslint-disable-next-line no-useless-escape\n const match = (color || '').match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\.\\d]*)?\\)/);\n if (match && match[1] && match[2] && match[3]) {\n return !(match[1] === match[2] && match[2] === match[3]);\n }\n return true;\n}\n\nexport default class Wave extends React.Component<{ insertExtraNode?: boolean }> {\n private instance?: {\n cancel: () => void;\n };\n\n private extraNode: HTMLDivElement;\n\n private clickWaveTimeoutId: number;\n\n private animationStartId: number;\n\n private animationStart: boolean = false;\n\n private destroy: boolean = false;\n\n private csp?: CSPConfig;\n\n componentDidMount() {\n const node = findDOMNode(this) as HTMLElement;\n if (!node || node.nodeType !== 1) {\n return;\n }\n this.instance = this.bindAnimationEvent(node);\n }\n\n componentWillUnmount() {\n if (this.instance) {\n this.instance.cancel();\n }\n if (this.clickWaveTimeoutId) {\n clearTimeout(this.clickWaveTimeoutId);\n }\n\n this.destroy = true;\n }\n\n onClick = (node: HTMLElement, waveColor: string) => {\n if (!node || isHidden(node) || node.className.indexOf('-leave') >= 0) {\n return;\n }\n const { insertExtraNode } = this.props;\n this.extraNode = document.createElement('div');\n const { extraNode } = this;\n extraNode.className = 'ant-click-animating-node';\n const attributeName = this.getAttributeName();\n node.setAttribute(attributeName, 'true');\n // Not white or transparnt or grey\n styleForPesudo = styleForPesudo || document.createElement('style');\n if (\n waveColor &&\n waveColor !== '#ffffff' &&\n waveColor !== 'rgb(255, 255, 255)' &&\n isNotGrey(waveColor) &&\n !/rgba\\(\\d*, \\d*, \\d*, 0\\)/.test(waveColor) && // any transparent rgba color\n waveColor !== 'transparent'\n ) {\n // Add nonce if CSP exist\n if (this.csp && this.csp.nonce) {\n styleForPesudo.nonce = this.csp.nonce;\n }\n\n extraNode.style.borderColor = waveColor;\n styleForPesudo.innerHTML = `\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: ${waveColor};\n }`;\n if (!document.body.contains(styleForPesudo)) {\n document.body.appendChild(styleForPesudo);\n }\n }\n if (insertExtraNode) {\n node.appendChild(extraNode);\n }\n TransitionEvents.addStartEventListener(node, this.onTransitionStart);\n TransitionEvents.addEndEventListener(node, this.onTransitionEnd);\n };\n\n onTransitionStart = (e: AnimationEvent) => {\n if (this.destroy) return;\n\n const node = findDOMNode(this) as HTMLElement;\n if (!e || e.target !== node) {\n return;\n }\n\n if (!this.animationStart) {\n this.resetEffect(node);\n }\n };\n\n onTransitionEnd = (e: AnimationEvent) => {\n if (!e || e.animationName !== 'fadeEffect') {\n return;\n }\n this.resetEffect(e.target as HTMLElement);\n };\n\n getAttributeName() {\n const { insertExtraNode } = this.props;\n return insertExtraNode ? 'ant-click-animating' : 'ant-click-animating-without-extra-node';\n }\n\n bindAnimationEvent = (node: HTMLElement) => {\n if (\n !node ||\n !node.getAttribute ||\n node.getAttribute('disabled') ||\n node.className.indexOf('disabled') >= 0\n ) {\n return;\n }\n const onClick = (e: MouseEvent) => {\n // Fix radio button click twice\n if ((e.target as HTMLElement).tagName === 'INPUT' || isHidden(e.target as HTMLElement)) {\n return;\n }\n this.resetEffect(node);\n // Get wave color from target\n const waveColor =\n getComputedStyle(node).getPropertyValue('border-top-color') || // Firefox Compatible\n getComputedStyle(node).getPropertyValue('border-color') ||\n getComputedStyle(node).getPropertyValue('background-color');\n this.clickWaveTimeoutId = window.setTimeout(() => this.onClick(node, waveColor), 0);\n\n raf.cancel(this.animationStartId);\n this.animationStart = true;\n\n // Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this.\n this.animationStartId = raf(() => {\n this.animationStart = false;\n }, 10);\n };\n node.addEventListener('click', onClick, true);\n return {\n cancel: () => {\n node.removeEventListener('click', onClick, true);\n },\n };\n };\n\n resetEffect(node: HTMLElement) {\n if (!node || node === this.extraNode || !(node instanceof Element)) {\n return;\n }\n const { insertExtraNode } = this.props;\n const attributeName = this.getAttributeName();\n node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466\n\n if (styleForPesudo) {\n styleForPesudo.innerHTML = '';\n }\n\n if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {\n node.removeChild(this.extraNode);\n }\n TransitionEvents.removeStartEventListener(node, this.onTransitionStart);\n TransitionEvents.removeEndEventListener(node, this.onTransitionEnd);\n }\n\n renderWave = ({ csp }: ConfigConsumerProps) => {\n const { children } = this.props;\n this.csp = csp;\n\n return children;\n };\n\n render() {\n return <ConfigConsumer>{this.renderWave}</ConfigConsumer>;\n }\n}\n"]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
|
|
3
|
-
if (customizePrefixCls)
|
|
4
|
-
return customizePrefixCls;
|
|
5
|
-
return suffixCls ? `ant-${suffixCls}` : 'ant';
|
|
6
|
-
};
|
|
7
|
-
// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will case circular dependency.
|
|
8
|
-
export const ConfigContext = React.createContext({
|
|
9
|
-
// We provide a default function for Context without provider
|
|
10
|
-
getPrefixCls: defaultGetPrefixCls,
|
|
11
|
-
});
|
|
12
|
-
export const ConfigConsumer = ConfigContext.Consumer;
|
|
13
|
-
/** @deprecated Use hooks instead. This is a legacy function */
|
|
14
|
-
export function withConfigConsumer(config) {
|
|
15
|
-
return function withConfigConsumerFunc(Component) {
|
|
16
|
-
// Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods
|
|
17
|
-
const SFC = ((props) => ({}(configProps, ConfigConsumerProps)));
|
|
18
|
-
{
|
|
19
|
-
const { prefixCls: basicPrefixCls } = config;
|
|
20
|
-
const { getPrefixCls } = configProps;
|
|
21
|
-
const { prefixCls: customizePrefixCls } = props;
|
|
22
|
-
const prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls);
|
|
23
|
-
return Object.assign({}, configProps);
|
|
24
|
-
{
|
|
25
|
-
props;
|
|
26
|
-
}
|
|
27
|
-
prefixCls = { prefixCls } / > ;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
< /ConfigConsumer>;
|
|
31
|
-
as;
|
|
32
|
-
React.FC( & ComponentDef);
|
|
33
|
-
const cons = Component.constructor;
|
|
34
|
-
const name = (cons && cons.displayName) || Component.name || 'Component';
|
|
35
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
36
|
-
SFC.displayName = `withConfigConsumer(${name})`;
|
|
37
|
-
}
|
|
38
|
-
return SFC;
|
|
39
|
-
}
|
|
40
|
-
;
|
|
41
|
-
//# sourceMappingURL=context.js.map
|