tntd 2.7.3 → 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/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/color-picker/ColorPicker.js +1 -1
- package/es/color-picker/ColorPicker.js.map +1 -1
- package/es/color-picker/index.less +1 -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 +1 -1
- 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/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 +1 -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-modal/index.js +54 -21
- package/es/tntd-modal/index.js.map +1 -1
- package/es/tntd-modal/index.less +83 -63
- 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 +1 -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 +1 -1
- 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/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.js +1 -1
- 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-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/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
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deprecated. We should replace the animation with pure react motion instead of modify style directly.
|
|
3
|
-
* If you are creating new component with animation, please use `./motion`.
|
|
4
|
-
*/
|
|
5
|
-
import cssAnimation from 'css-animation';
|
|
6
|
-
import raf from 'raf';
|
|
7
|
-
function animate(node, show, done) {
|
|
8
|
-
let height;
|
|
9
|
-
let requestAnimationFrameId;
|
|
10
|
-
return cssAnimation(node, 'ant-motion-collapse-legacy', {
|
|
11
|
-
start() {
|
|
12
|
-
if (!show) {
|
|
13
|
-
node.style.height = `${node.offsetHeight}px`;
|
|
14
|
-
node.style.opacity = '1';
|
|
15
|
-
} else {
|
|
16
|
-
height = node.offsetHeight;
|
|
17
|
-
node.style.height = '0px';
|
|
18
|
-
node.style.opacity = '0';
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
active() {
|
|
22
|
-
if (requestAnimationFrameId) {
|
|
23
|
-
raf.cancel(requestAnimationFrameId);
|
|
24
|
-
}
|
|
25
|
-
requestAnimationFrameId = raf(() => {
|
|
26
|
-
node.style.height = `${show ? height : 0}px`;
|
|
27
|
-
node.style.opacity = show ? '1' : '0';
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
end() {
|
|
31
|
-
if (requestAnimationFrameId) {
|
|
32
|
-
raf.cancel(requestAnimationFrameId);
|
|
33
|
-
}
|
|
34
|
-
node.style.height = '';
|
|
35
|
-
node.style.opacity = '';
|
|
36
|
-
done();
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
const animation = {
|
|
41
|
-
enter(node, done) {
|
|
42
|
-
return animate(node, true, done);
|
|
43
|
-
},
|
|
44
|
-
leave(node, done) {
|
|
45
|
-
return animate(node, false, done);
|
|
46
|
-
},
|
|
47
|
-
appear(node, done) {
|
|
48
|
-
return animate(node, true, done);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
export default animation;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openAnimation.js","sourceRoot":"","sources":["../../src/_util/openAnimation.t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I,EAAE,CAAC;QACT,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,KAAK,CAAC,IAAiB,EAAE,IAAgB;QACvC,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IACD,KAAK,CAAC,IAAiB,EAAE,IAAgB;QACvC,OAAO,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,CAAC,IAAiB,EAAE,IAAgB;QACxC,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Deprecated. We should replace the animation with pure react motion instead of modify style directly.\n * If you are creating new component with animation, please use `./motion`.\n */\nimport cssAnimation from 'css-animation';\nimport raf from 'raf';\n\nfunction animate(node: HTMLElement, show: boolean, done: () => void) {\n let height: number;\n let requestAnimationFrameId: number;\n return cssAnimation(node, 'ant-motion-collapse-legacy', {\n start() {\n if (!show) {\n node.style.height = `${node.offsetHeight}px`;\n node.style.opacity = '1';\n } else {\n height = node.offsetHeight;\n node.style.height = '0px';\n node.style.opacity = '0';\n }\n },\n active() {\n if (requestAnimationFrameId) {\n raf.cancel(requestAnimationFrameId);\n }\n requestAnimationFrameId = raf(() => {\n node.style.height = `${show ? height : 0}px`;\n node.style.opacity = show ? '1' : '0';\n });\n },\n end() {\n if (requestAnimationFrameId) {\n raf.cancel(requestAnimationFrameId);\n }\n node.style.height = '';\n node.style.opacity = '';\n done();\n },\n });\n}\n\nconst animation = {\n enter(node: HTMLElement, done: () => void) {\n return animate(node, true, done);\n },\n leave(node: HTMLElement, done: () => void) {\n return animate(node, false, done);\n },\n appear(node: HTMLElement, done: () => void) {\n return animate(node, true, done);\n },\n};\n\nexport default animation;\n"]}
|
package/es/_util/raf.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import raf from 'raf';
|
|
2
|
-
let id = 0;
|
|
3
|
-
const ids = {};
|
|
4
|
-
// Support call raf with delay specified frame
|
|
5
|
-
export default function wrapperRaf(callback, delayFrames = 1) {
|
|
6
|
-
const myId = id++;
|
|
7
|
-
let restFrames = delayFrames;
|
|
8
|
-
function internalCallback() {
|
|
9
|
-
restFrames -= 1;
|
|
10
|
-
if (restFrames <= 0) {
|
|
11
|
-
callback();
|
|
12
|
-
delete ids[myId];
|
|
13
|
-
} else {
|
|
14
|
-
ids[myId] = raf(internalCallback);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
ids[myId] = raf(internalCallback);
|
|
18
|
-
return myId;
|
|
19
|
-
}
|
|
20
|
-
wrapperRaf.cancel = function cancel(pid) {
|
|
21
|
-
if (pid === undefined) return;
|
|
22
|
-
raf.cancel(ids[pid]);
|
|
23
|
-
delete ids[pid];
|
|
24
|
-
};
|
|
25
|
-
wrapperRaf.ids = ids; // export this for test usage
|
package/es/_util/raf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"raf.js","sourceRoot":"","sources":["../../src/_util/raf.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAMtB,IAAI,EAAE,GAAW,CAAC,CAAC;AACnB,MAAM,GAAG,GAAW,EAAE,CAAC;AAEvB,8CAA8C;AAC9C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,QAAoB,EAAE,cAAsB,CAAC;IAC9E,MAAM,IAAI,GAAW,EAAE,EAAE,CAAC;IAC1B,IAAI,UAAU,GAAW,WAAW,CAAC;IAErC,SAAS,gBAAgB;QACvB,UAAU,IAAI,CAAC,CAAC;QAEhB,IAAI,UAAU,IAAI,CAAC,EAAE;YACnB,QAAQ,EAAE,CAAC;YACX,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;SAClB;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC;SACnC;IACH,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAElC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,UAAU,CAAC,MAAM,GAAG,SAAS,MAAM,CAAC,GAAY;IAC9C,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO;IAE9B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF,UAAU,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,6BAA6B","sourcesContent":["import raf from 'raf';\n\ninterface RafMap {\n [id: number]: number;\n}\n\nlet id: number = 0;\nconst ids: RafMap = {};\n\n// Support call raf with delay specified frame\nexport default function wrapperRaf(callback: () => void, delayFrames: number = 1): number {\n const myId: number = id++;\n let restFrames: number = delayFrames;\n\n function internalCallback() {\n restFrames -= 1;\n\n if (restFrames <= 0) {\n callback();\n delete ids[myId];\n } else {\n ids[myId] = raf(internalCallback);\n }\n }\n\n ids[myId] = raf(internalCallback);\n\n return myId;\n}\n\nwrapperRaf.cancel = function cancel(pid?: number) {\n if (pid === undefined) return;\n\n raf.cancel(ids[pid]);\n delete ids[pid];\n};\n\nwrapperRaf.ids = ids; // export this for test usage\n"]}
|
package/es/_util/reactNode.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reactNode.js","sourceRoot":"","sources":["../../src/_util/reactNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wDAAwD;AACxD,MAAM,UAAU,YAAY,CAAC,OAAwB,EAAE,GAAG,QAAe;IACvE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAEnD,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function cloneElement(element: React.ReactNode, ...restArgs: any[]) {\n if (!React.isValidElement(element)) return element;\n\n return React.cloneElement(element, ...restArgs);\n}\n"]}
|
package/es/_util/ref.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import 'react';
|
|
2
|
-
export function fillRef(ref, node) {
|
|
3
|
-
if (typeof ref === 'function') {
|
|
4
|
-
ref(node);
|
|
5
|
-
} else if (typeof ref === 'object' && ref && 'current' in ref) {
|
|
6
|
-
ref.current = node;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export function composeRef(...refs) {
|
|
10
|
-
return node => {
|
|
11
|
-
refs.forEach(ref => {
|
|
12
|
-
fillRef(ref, node);
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
}
|
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,IAA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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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BAAgC,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"]}
|