tntd 2.6.6 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_util/colors.js +3 -0
- package/es/_util/colors.js.map +1 -0
- package/es/_util/easings.js +9 -0
- package/es/_util/easings.js.map +1 -0
- package/es/_util/getDataOrAriaProps.js +8 -0
- package/es/_util/getDataOrAriaProps.js.map +1 -0
- package/es/_util/getScroll.js +14 -0
- package/es/_util/getScroll.js.map +1 -0
- package/es/_util/interopDefault.js +5 -0
- package/es/_util/interopDefault.js.map +1 -0
- package/es/_util/isNumeric.js +4 -0
- package/es/_util/isNumeric.js.map +1 -0
- package/es/_util/motion.js +22 -0
- package/es/_util/motion.js.map +1 -0
- package/es/_util/openAnimation.js +51 -0
- package/es/_util/openAnimation.js.map +1 -0
- package/es/_util/raf.js +25 -0
- package/es/_util/raf.js.map +1 -0
- package/es/_util/reactNode.js +6 -0
- package/es/_util/reactNode.js.map +1 -0
- package/es/_util/ref.js +15 -0
- package/es/_util/ref.js.map +1 -0
- package/es/_util/responsiveObserve.js +82 -0
- package/es/_util/responsiveObserve.js.map +1 -0
- package/es/_util/scrollTo.js +29 -0
- package/es/_util/scrollTo.js.map +1 -0
- package/es/_util/styleChecker.js +12 -0
- package/es/_util/styleChecker.js.map +1 -0
- package/es/_util/throttleByAnimationFrame.js +40 -0
- package/es/_util/throttleByAnimationFrame.js.map +1 -0
- package/es/_util/transButton.js +103 -0
- package/es/_util/transButton.js.map +1 -0
- package/es/_util/triggerEvent.js +8 -0
- package/es/_util/triggerEvent.js.map +1 -0
- package/es/_util/type.js +3 -0
- package/es/_util/type.js.map +1 -0
- package/es/_util/warning.js +5 -0
- package/es/_util/warning.js.map +1 -0
- package/es/_util/wave.js +228 -0
- package/es/_util/wave.js.map +1 -0
- package/es/affix/index.js +1 -2
- package/es/alert/index.js +1 -2
- package/es/anchor/index.js +1 -2
- package/es/array-input/icon.js +24 -6
- package/es/array-input/index.js +203 -119
- package/es/auth-context/index.js +1 -2
- package/es/auto-complete/index.js +1 -2
- package/es/avatar/index.js +1 -2
- package/es/back-top/index.js +1 -2
- package/es/badge/index.js +1 -2
- package/es/breadcrumb/index.js +1 -2
- package/es/button/index.js +1 -2
- package/es/calendar/index.js +1 -2
- package/es/card/index.js +1 -2
- package/es/carousel/index.js +1 -2
- package/es/cascader/index.js +6 -3
- package/es/cascader/index.js.map +1 -1
- package/es/checkbox/checkbox-group.js +5 -0
- package/es/checkbox/checkbox-group.js.map +1 -0
- package/es/checkbox/index.js +6 -2
- package/es/checkbox/index.js.map +1 -1
- package/es/col/index.js +1 -2
- package/es/collapse/index.js +1 -2
- package/es/color-picker/ColorPicker.js +126 -80
- package/es/color-picker/index.js +8 -5
- package/es/columns/index.js +66 -30
- package/es/columns/style/index.js +1 -2
- package/es/comment/index.js +1 -2
- package/es/config-provider/DisabledContext.js +12 -0
- package/es/config-provider/DisabledContext.js.map +1 -0
- package/es/config-provider/SizeContext.js +9 -0
- package/es/config-provider/SizeContext.js.map +1 -0
- package/es/config-provider/config-provider.js +1 -2
- package/es/config-provider/context.js +41 -0
- package/es/config-provider/context.js.map +1 -0
- package/es/config-provider/index.js +4 -0
- package/es/config-provider/index.js.map +1 -1
- package/es/connect/index.js +26 -0
- package/es/connect/index.js.map +1 -0
- package/es/date-picker/index.js +11 -1
- package/es/date-picker/index.js.map +1 -1
- package/es/ellipsis/index.less +1 -1
- package/es/input/input.js +37 -25
- package/es/input/input.js.map +1 -1
- package/es/input-number/index.js +3 -1
- package/es/input-number/index.js.map +1 -1
- package/es/preview-text/index.js +195 -0
- package/es/preview-text/index.js.map +1 -0
- package/es/preview-text/index.less +3 -0
- package/es/query-form/index.js.map +1 -1
- package/es/radio/index.js +3 -0
- package/es/radio/index.js.map +1 -1
- package/es/radio/radio-group.js +6 -0
- package/es/radio/radio-group.js.map +1 -0
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +17 -5
- package/es/select/select.js.map +1 -1
- package/es/switch/index.js +2 -3
- package/es/switch/index.js.map +1 -1
- package/es/switch/switch.js +9 -0
- package/es/switch/switch.js.map +1 -0
- package/es/table/table.less +2 -0
- package/es/time-picker/index.js +3 -1
- package/es/time-picker/index.js.map +1 -1
- package/es/tntd-form/ErrorList.js +53 -0
- package/es/tntd-form/ErrorList.js.map +1 -0
- package/es/tntd-form/Form.js +101 -0
- package/es/tntd-form/Form.js.map +1 -0
- package/es/tntd-form/FormItem/ItemHolder.js +135 -0
- package/es/tntd-form/FormItem/ItemHolder.js.map +1 -0
- package/es/tntd-form/FormItem/index.js +238 -0
- package/es/tntd-form/FormItem/index.js.map +1 -0
- package/es/tntd-form/FormItemInput.js +38 -0
- package/es/tntd-form/FormItemInput.js.map +1 -0
- package/es/tntd-form/FormItemLabel.js +73 -0
- package/es/tntd-form/FormItemLabel.js.map +1 -0
- package/es/tntd-form/FormList.js +34 -0
- package/es/tntd-form/FormList.js.map +1 -0
- package/es/tntd-form/TntdForm/components/ItemComp.js +2 -2
- package/es/tntd-form/TntdForm/components/ItemComp.js.map +1 -1
- package/es/tntd-form/__tests__/demo-extend.test.js +3 -0
- package/es/tntd-form/__tests__/demo-extend.test.js.map +1 -0
- package/es/tntd-form/__tests__/demo.test.js +3 -0
- package/es/tntd-form/__tests__/demo.test.js.map +1 -0
- package/es/tntd-form/__tests__/image.test.js +5 -0
- package/es/tntd-form/__tests__/image.test.js.map +1 -0
- package/es/tntd-form/__tests__/index.test.js +957 -0
- package/es/tntd-form/__tests__/index.test.js.map +1 -0
- package/es/tntd-form/__tests__/list-noStyle.test.js +41 -0
- package/es/tntd-form/__tests__/list-noStyle.test.js.map +1 -0
- package/es/tntd-form/__tests__/list.test.js +164 -0
- package/es/tntd-form/__tests__/list.test.js.map +1 -0
- package/es/tntd-form/__tests__/ref.test.js +45 -0
- package/es/tntd-form/__tests__/ref.test.js.map +1 -0
- package/es/tntd-form/__tests__/type.test.js +74 -0
- package/es/tntd-form/__tests__/type.test.js.map +1 -0
- package/es/tntd-form/_util/motion.js +38 -0
- package/es/tntd-form/_util/motion.js.map +1 -0
- package/es/tntd-form/_util/reactNode.js +15 -0
- package/es/tntd-form/_util/reactNode.js.map +1 -0
- package/es/tntd-form/_util/scrollTo.js +35 -0
- package/es/tntd-form/_util/scrollTo.js.map +1 -0
- package/es/tntd-form/_util/type.js +4 -0
- package/es/tntd-form/_util/type.js.map +1 -0
- package/es/tntd-form/_util/warning.js +6 -0
- package/es/tntd-form/_util/warning.js.map +1 -0
- package/es/tntd-form/_util/wave.js +168 -0
- package/es/tntd-form/_util/wave.js.map +1 -0
- package/es/tntd-form/context.js +35 -0
- package/es/tntd-form/context.js.map +1 -0
- package/es/tntd-form/hooks/useDebounce.js +14 -0
- package/es/tntd-form/hooks/useDebounce.js.map +1 -0
- package/es/tntd-form/hooks/useForm.js +35 -0
- package/es/tntd-form/hooks/useForm.js.map +1 -0
- package/es/tntd-form/hooks/useFormInstance.js +7 -0
- package/es/tntd-form/hooks/useFormInstance.js.map +1 -0
- package/es/tntd-form/hooks/useFormItemStatus.js +10 -0
- package/es/tntd-form/hooks/useFormItemStatus.js.map +1 -0
- package/es/tntd-form/hooks/useFrameState.js +38 -0
- package/es/tntd-form/hooks/useFrameState.js.map +1 -0
- package/es/tntd-form/hooks/useItemRef.js +19 -0
- package/es/tntd-form/hooks/useItemRef.js.map +1 -0
- package/es/tntd-form/index.js +17 -1
- package/es/tntd-form/index.js.map +1 -1
- package/es/tntd-form/interface.js +3 -0
- package/es/tntd-form/interface.js.map +1 -0
- package/es/tntd-form/style/components.less +16 -0
- package/es/tntd-form/style/horizontal.less +26 -0
- package/es/tntd-form/style/index.js +6 -0
- package/es/tntd-form/style/index.js.map +1 -0
- package/es/tntd-form/style/index.less +342 -0
- package/es/tntd-form/style/inline.less +40 -0
- package/es/tntd-form/style/mixin.less +90 -0
- package/es/tntd-form/style/rtl.less +204 -0
- package/es/tntd-form/style/status.less +45 -0
- package/es/tntd-form/style/vertical.less +95 -0
- package/es/tntd-form/tntd-form.stories.js +426 -0
- package/es/tntd-form/tntd-form.stories.js.map +1 -0
- package/es/tntd-form/util.js +21 -0
- package/es/tntd-form/util.js.map +1 -0
- package/es/tntd-form/validateMessagesContext.js +6 -0
- package/es/tntd-form/validateMessagesContext.js.map +1 -0
- package/es/tntd-select/index.js +8 -7
- package/es/tntd-select/index.js.map +1 -1
- package/es/tree-select/index.js +4 -1
- package/es/tree-select/index.js.map +1 -1
- package/es/upload/index.js +6 -1
- package/es/upload/index.js.map +1 -1
- package/lib/_util/colors.d.ts +3 -0
- package/lib/_util/colors.d.ts.map +1 -0
- package/lib/_util/colors.js +7 -0
- package/lib/_util/colors.js.map +1 -0
- package/lib/_util/easings.d.ts +2 -0
- package/lib/_util/easings.d.ts.map +1 -0
- package/lib/_util/easings.js +14 -0
- package/lib/_util/easings.js.map +1 -0
- package/lib/_util/getDataOrAriaProps.d.ts +2 -0
- package/lib/_util/getDataOrAriaProps.d.ts.map +1 -0
- package/lib/_util/getDataOrAriaProps.js +13 -0
- package/lib/_util/getDataOrAriaProps.js.map +1 -0
- package/lib/_util/getScroll.d.ts +2 -0
- package/lib/_util/getScroll.d.ts.map +1 -0
- package/lib/_util/getScroll.js +18 -0
- package/lib/_util/getScroll.js.map +1 -0
- package/lib/_util/interopDefault.d.ts +2 -0
- package/lib/_util/interopDefault.d.ts.map +1 -0
- package/lib/_util/interopDefault.js +9 -0
- package/lib/_util/interopDefault.js.map +1 -0
- package/lib/_util/isNumeric.d.ts +3 -0
- package/lib/_util/isNumeric.d.ts.map +1 -0
- package/lib/_util/isNumeric.js +7 -0
- package/lib/_util/isNumeric.js.map +1 -0
- package/lib/_util/motion.d.ts +24 -0
- package/lib/_util/motion.d.ts.map +1 -0
- package/lib/_util/motion.js +17 -0
- package/lib/_util/motion.js.map +1 -0
- package/lib/_util/openAnimation.d.ts +7 -0
- package/lib/_util/openAnimation.d.ts.map +1 -0
- package/lib/_util/openAnimation.js +58 -0
- package/lib/_util/openAnimation.js.map +1 -0
- package/lib/_util/raf.d.ts +10 -0
- package/lib/_util/raf.d.ts.map +1 -0
- package/lib/_util/raf.js +34 -0
- package/lib/_util/raf.js.map +1 -0
- package/lib/_util/reactNode.d.ts +3 -0
- package/lib/_util/reactNode.d.ts.map +1 -0
- package/lib/_util/reactNode.js +31 -0
- package/lib/_util/reactNode.js.map +1 -0
- package/lib/_util/ref.d.ts +4 -0
- package/lib/_util/ref.d.ts.map +1 -0
- package/lib/_util/ref.js +22 -0
- package/lib/_util/ref.js.map +1 -0
- package/lib/_util/responsiveObserve.d.ts +14 -0
- package/lib/_util/responsiveObserve.d.ts.map +1 -0
- package/lib/_util/responsiveObserve.js +83 -0
- package/lib/_util/responsiveObserve.js.map +1 -0
- package/lib/_util/scrollTo.d.ts +11 -0
- package/lib/_util/scrollTo.d.ts.map +1 -0
- package/lib/_util/scrollTo.js +34 -0
- package/lib/_util/scrollTo.js.map +1 -0
- package/lib/_util/styleChecker.d.ts +4 -0
- package/lib/_util/styleChecker.d.ts.map +1 -0
- package/lib/_util/styleChecker.js +14 -0
- package/lib/_util/styleChecker.js.map +1 -0
- package/lib/_util/throttleByAnimationFrame.d.ts +6 -0
- package/lib/_util/throttleByAnimationFrame.d.ts.map +1 -0
- package/lib/_util/throttleByAnimationFrame.js +49 -0
- package/lib/_util/throttleByAnimationFrame.js.map +1 -0
- package/lib/_util/transButton.d.ts +21 -0
- package/lib/_util/transButton.d.ts.map +1 -0
- package/lib/_util/transButton.js +112 -0
- package/lib/_util/transButton.js.map +1 -0
- package/lib/_util/triggerEvent.d.ts +2 -0
- package/lib/_util/triggerEvent.d.ts.map +1 -0
- package/lib/_util/triggerEvent.js +12 -0
- package/lib/_util/triggerEvent.js.map +1 -0
- package/lib/_util/type.d.ts +4 -0
- package/lib/_util/type.d.ts.map +1 -0
- package/lib/_util/type.js +9 -0
- package/lib/_util/type.js.map +1 -0
- package/lib/_util/warning.d.ts +5 -0
- package/lib/_util/warning.d.ts.map +1 -0
- package/lib/_util/warning.js +28 -0
- package/lib/_util/warning.js.map +1 -0
- package/lib/_util/wave.d.ts +26 -0
- package/lib/_util/wave.d.ts.map +1 -0
- package/lib/_util/wave.js +249 -0
- package/lib/_util/wave.js.map +1 -0
- package/lib/affix/index.js +5 -1
- package/lib/affix/index.js.map +1 -1
- package/lib/alert/index.js +5 -1
- package/lib/alert/index.js.map +1 -1
- package/lib/anchor/index.js +5 -1
- package/lib/anchor/index.js.map +1 -1
- package/lib/array-input/index.js +5 -1
- package/lib/array-input/index.js.map +1 -1
- package/lib/auto-complete/index.js +5 -1
- package/lib/auto-complete/index.js.map +1 -1
- package/lib/avatar/index.js +5 -1
- package/lib/avatar/index.js.map +1 -1
- package/lib/back-top/index.js +5 -1
- package/lib/back-top/index.js.map +1 -1
- package/lib/badge/index.js +5 -1
- package/lib/badge/index.js.map +1 -1
- package/lib/breadcrumb/index.js +5 -1
- package/lib/breadcrumb/index.js.map +1 -1
- package/lib/button/index.js +5 -1
- package/lib/button/index.js.map +1 -1
- package/lib/calendar/index.js +5 -1
- package/lib/calendar/index.js.map +1 -1
- package/lib/card/index.js +5 -1
- package/lib/card/index.js.map +1 -1
- package/lib/carousel/index.js +5 -1
- package/lib/carousel/index.js.map +1 -1
- package/lib/cascader/index.d.ts +6 -1
- package/lib/cascader/index.d.ts.map +1 -1
- package/lib/cascader/index.js +11 -2
- package/lib/cascader/index.js.map +1 -1
- package/lib/checkbox/checkbox-group.d.ts +8 -0
- package/lib/checkbox/checkbox-group.d.ts.map +1 -0
- package/lib/checkbox/checkbox-group.js +11 -0
- package/lib/checkbox/checkbox-group.js.map +1 -0
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +10 -1
- package/lib/checkbox/index.js.map +1 -1
- package/lib/col/index.js +5 -1
- package/lib/col/index.js.map +1 -1
- package/lib/collapse/index.js +5 -1
- package/lib/collapse/index.js.map +1 -1
- package/lib/color-picker/ColorPicker.js +5 -1
- package/lib/color-picker/ColorPicker.js.map +1 -1
- package/lib/comment/index.js +5 -1
- package/lib/comment/index.js.map +1 -1
- package/lib/config-provider/DisabledContext.d.ts +10 -0
- package/lib/config-provider/DisabledContext.d.ts.map +1 -0
- package/lib/config-provider/DisabledContext.js +35 -0
- package/lib/config-provider/DisabledContext.js.map +1 -0
- package/lib/config-provider/SizeContext.d.ts +10 -0
- package/lib/config-provider/SizeContext.d.ts.map +1 -0
- package/lib/config-provider/SizeContext.js +32 -0
- package/lib/config-provider/SizeContext.js.map +1 -0
- package/lib/config-provider/context.d.ts +61 -0
- package/lib/config-provider/context.d.ts.map +1 -0
- package/lib/config-provider/context.js +64 -0
- package/lib/config-provider/context.js.map +1 -0
- package/lib/config-provider/index.d.ts +1 -0
- package/lib/config-provider/index.d.ts.map +1 -1
- package/lib/config-provider/index.js +9 -1
- package/lib/config-provider/index.js.map +1 -1
- package/lib/connect/index.d.ts +12 -0
- package/lib/connect/index.d.ts.map +1 -0
- package/lib/connect/index.js +32 -0
- package/lib/connect/index.js.map +1 -0
- package/lib/date-picker/index.d.ts +6 -1
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +17 -2
- package/lib/date-picker/index.js.map +1 -1
- package/lib/descriptions/descriptions.d.ts +1 -1
- package/lib/descriptions/descriptions.d.ts.map +1 -1
- package/lib/descriptions/descriptions.js +5 -1
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/index.js +5 -1
- package/lib/descriptions/index.js.map +1 -1
- package/lib/development-login/LoginModal.js +5 -1
- package/lib/development-login/LoginModal.js.map +1 -1
- package/lib/development-login/index.js +5 -1
- package/lib/development-login/index.js.map +1 -1
- package/lib/divider/index.js +5 -1
- package/lib/divider/index.js.map +1 -1
- package/lib/drawer/index.js +5 -1
- package/lib/drawer/index.js.map +1 -1
- package/lib/dropdown/index.js +5 -1
- package/lib/dropdown/index.js.map +1 -1
- package/lib/ellipsis/index.js +5 -1
- package/lib/ellipsis/index.js.map +1 -1
- package/lib/ellipsis/index.less +1 -1
- package/lib/empty/empty.js +5 -1
- package/lib/empty/empty.js.map +1 -1
- package/lib/empty/index.js +5 -1
- package/lib/empty/index.js.map +1 -1
- package/lib/exception/index.js +5 -1
- package/lib/exception/index.js.map +1 -1
- package/lib/form/index.js +5 -1
- package/lib/form/index.js.map +1 -1
- package/lib/handle/index.js +5 -1
- package/lib/handle/index.js.map +1 -1
- package/lib/icon/index.js +5 -1
- package/lib/icon/index.js.map +1 -1
- package/lib/img/index.js +5 -1
- package/lib/img/index.js.map +1 -1
- package/lib/input/index.js +5 -1
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.d.ts +22 -8
- package/lib/input/input.d.ts.map +1 -1
- package/lib/input/input.js +61 -27
- package/lib/input/input.js.map +1 -1
- package/lib/input-number/index.d.ts +7 -2
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +8 -2
- package/lib/input-number/index.js.map +1 -1
- package/lib/label/index.js +5 -1
- package/lib/label/index.js.map +1 -1
- package/lib/layout/index.js +5 -1
- package/lib/layout/index.js.map +1 -1
- package/lib/list/index.js +5 -1
- package/lib/list/index.js.map +1 -1
- package/lib/loading-button/index.js +5 -1
- package/lib/loading-button/index.js.map +1 -1
- package/lib/locale/index.js +5 -1
- package/lib/locale/index.js.map +1 -1
- package/lib/locale-provider/index.js +5 -1
- package/lib/locale-provider/index.js.map +1 -1
- package/lib/mentions/index.js +5 -1
- package/lib/mentions/index.js.map +1 -1
- package/lib/menu/index.js +5 -1
- package/lib/menu/index.js.map +1 -1
- package/lib/message/index.js +5 -1
- package/lib/message/index.js.map +1 -1
- package/lib/modal/index.js +5 -1
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/modal.js +5 -1
- package/lib/modal/modal.js.map +1 -1
- package/lib/notification/index.js +5 -1
- package/lib/notification/index.js.map +1 -1
- package/lib/page-header/index.js +5 -1
- package/lib/page-header/index.js.map +1 -1
- package/lib/pagination/index.js +5 -1
- package/lib/pagination/index.js.map +1 -1
- package/lib/popconfirm/index.js +5 -1
- package/lib/popconfirm/index.js.map +1 -1
- package/lib/popover/index.js +5 -1
- package/lib/popover/index.js.map +1 -1
- package/lib/preview-text/index.d.ts +20 -0
- package/lib/preview-text/index.d.ts.map +1 -0
- package/lib/preview-text/index.js +224 -0
- package/lib/preview-text/index.js.map +1 -0
- package/lib/preview-text/index.less +3 -0
- package/lib/progress/index.js +5 -1
- package/lib/progress/index.js.map +1 -1
- package/lib/query-form/Field/Select.js +5 -1
- package/lib/query-form/Field/Select.js.map +1 -1
- package/lib/query-form/Field/SelectInput.js +5 -1
- package/lib/query-form/Field/SelectInput.js.map +1 -1
- package/lib/query-form/Field/fieldsMap.d.ts +2 -2
- package/lib/query-form/Field/index.d.ts +6 -0
- package/lib/query-form/Field/index.d.ts.map +1 -1
- package/lib/query-form/Field/index.js +5 -1
- package/lib/query-form/Field/index.js.map +1 -1
- package/lib/query-form/index.d.ts +9 -0
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +5 -1
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-list-scene/List.d.ts +13 -0
- package/lib/query-list-scene/List.d.ts.map +1 -1
- package/lib/query-list-scene/List.js +5 -1
- package/lib/query-list-scene/List.js.map +1 -1
- package/lib/query-list-scene/QueryForm.d.ts +3 -0
- package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
- package/lib/query-list-scene/QueryListScene.d.ts +1 -0
- package/lib/query-list-scene/QueryListScene.d.ts.map +1 -1
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +8 -1
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio-group.d.ts +8 -0
- package/lib/radio/radio-group.d.ts.map +1 -0
- package/lib/radio/radio-group.js +11 -0
- package/lib/radio/radio-group.js.map +1 -0
- package/lib/rate/index.js +5 -1
- package/lib/rate/index.js.map +1 -1
- package/lib/result/index.js +5 -1
- package/lib/result/index.js.map +1 -1
- package/lib/row/index.js +5 -1
- package/lib/row/index.js.map +1 -1
- package/lib/select/index.d.ts +2 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +5 -1
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +20 -6
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +41 -7
- package/lib/select/select.js.map +1 -1
- package/lib/skeleton/index.js +5 -1
- package/lib/skeleton/index.js.map +1 -1
- package/lib/slider/index.js +5 -1
- package/lib/slider/index.js.map +1 -1
- package/lib/spin/index.js +5 -1
- package/lib/spin/index.js.map +1 -1
- package/lib/statistic/index.js +5 -1
- package/lib/statistic/index.js.map +1 -1
- package/lib/steps/index.js +5 -1
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/steps.js +5 -1
- package/lib/steps/steps.js.map +1 -1
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-403.js +5 -1
- package/lib/svg-components/illustration-403.js.map +1 -1
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-404.js +5 -1
- package/lib/svg-components/illustration-404.js.map +1 -1
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-500.js +5 -1
- package/lib/svg-components/illustration-500.js.map +1 -1
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-empty.js +5 -1
- package/lib/svg-components/illustration-empty.js.map +1 -1
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-failure.js +5 -1
- package/lib/svg-components/illustration-failure.js.map +1 -1
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.js +5 -1
- package/lib/svg-components/illustration-no-access.js.map +1 -1
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.js +5 -1
- package/lib/svg-components/illustration-no-chart.js.map +1 -1
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.js +5 -1
- package/lib/svg-components/illustration-no-result.js.map +1 -1
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-offline.js +5 -1
- package/lib/svg-components/illustration-offline.js.map +1 -1
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/svg-components/illustration-success.js +5 -1
- package/lib/svg-components/illustration-success.js.map +1 -1
- package/lib/switch/index.d.ts +2 -3
- package/lib/switch/index.d.ts.map +1 -1
- package/lib/switch/index.js +7 -4
- package/lib/switch/index.js.map +1 -1
- package/lib/switch/switch.d.ts +10 -0
- package/lib/switch/switch.d.ts.map +1 -0
- package/lib/switch/switch.js +29 -0
- package/lib/switch/switch.js.map +1 -0
- package/lib/table/assets/image-loading-background.d.ts +1 -1
- package/lib/table/assets/image-loading-background.js +5 -1
- package/lib/table/assets/image-loading-background.js.map +1 -1
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/assets/image-loading.js +5 -1
- package/lib/table/assets/image-loading.js.map +1 -1
- package/lib/table/hooks/index.js +5 -1
- package/lib/table/hooks/index.js.map +1 -1
- package/lib/table/index.js +5 -1
- package/lib/table/index.js.map +1 -1
- package/lib/table/table.js +5 -1
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +2 -0
- package/lib/tabs/index.js +5 -1
- package/lib/tabs/index.js.map +1 -1
- package/lib/tag/index.js +5 -1
- package/lib/tag/index.js.map +1 -1
- package/lib/time-picker/index.d.ts +7 -2
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +8 -2
- package/lib/time-picker/index.js.map +1 -1
- package/lib/timeline/index.js +5 -1
- package/lib/timeline/index.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +5 -1
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +5 -1
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +5 -1
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +5 -1
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +5 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +5 -1
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/config/warning.js +5 -1
- package/lib/tntd-cascader/AntdCascader/config/warning.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/index.js +5 -1
- package/lib/tntd-cascader/AntdCascader/index.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/Cascader.js +5 -1
- package/lib/tntd-cascader/rc-cascader/Cascader.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +5 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +5 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +5 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +5 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/context.js +5 -1
- package/lib/tntd-cascader/rc-cascader/context.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +5 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +5 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +5 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +5 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +5 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js.map +1 -1
- package/lib/tntd-form/ErrorList.d.ts +13 -0
- package/lib/tntd-form/ErrorList.d.ts.map +1 -0
- package/lib/tntd-form/ErrorList.js +82 -0
- package/lib/tntd-form/ErrorList.js.map +1 -0
- package/lib/tntd-form/Form.d.ts +36 -0
- package/lib/tntd-form/Form.d.ts.map +1 -0
- package/lib/tntd-form/Form.js +132 -0
- package/lib/tntd-form/Form.js.map +1 -0
- package/lib/tntd-form/FormItem/ItemHolder.d.ts +18 -0
- package/lib/tntd-form/FormItem/ItemHolder.d.ts.map +1 -0
- package/lib/tntd-form/FormItem/ItemHolder.js +164 -0
- package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -0
- package/lib/tntd-form/FormItem/index.d.ts +36 -0
- package/lib/tntd-form/FormItem/index.d.ts.map +1 -0
- package/lib/tntd-form/FormItem/index.js +266 -0
- package/lib/tntd-form/FormItem/index.js.map +1 -0
- package/lib/tntd-form/FormItemInput.d.ts +30 -0
- package/lib/tntd-form/FormItemInput.d.ts.map +1 -0
- package/lib/tntd-form/FormItemInput.js +66 -0
- package/lib/tntd-form/FormItemInput.js.map +1 -0
- package/lib/tntd-form/FormItemLabel.d.ts +24 -0
- package/lib/tntd-form/FormItemLabel.d.ts.map +1 -0
- package/lib/tntd-form/FormItemLabel.js +101 -0
- package/lib/tntd-form/FormItemLabel.js.map +1 -0
- package/lib/tntd-form/FormList.d.ts +26 -0
- package/lib/tntd-form/FormList.d.ts.map +1 -0
- package/lib/tntd-form/FormList.js +62 -0
- package/lib/tntd-form/FormList.js.map +1 -0
- package/lib/tntd-form/TntdForm/components/Item.js +5 -1
- package/lib/tntd-form/TntdForm/components/Item.js.map +1 -1
- package/lib/tntd-form/TntdForm/components/ItemComp.js +7 -3
- package/lib/tntd-form/TntdForm/components/ItemComp.js.map +1 -1
- package/lib/tntd-form/TntdForm/components/List.js +5 -1
- package/lib/tntd-form/TntdForm/components/List.js.map +1 -1
- package/lib/tntd-form/TntdForm/index.js +5 -1
- package/lib/tntd-form/TntdForm/index.js.map +1 -1
- package/lib/tntd-form/__tests__/demo-extend.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/demo-extend.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/demo-extend.test.js +5 -0
- package/lib/tntd-form/__tests__/demo-extend.test.js.map +1 -0
- package/lib/tntd-form/__tests__/demo.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/demo.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/demo.test.js +8 -0
- package/lib/tntd-form/__tests__/demo.test.js.map +1 -0
- package/lib/tntd-form/__tests__/image.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/image.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/image.test.js +7 -0
- package/lib/tntd-form/__tests__/image.test.js.map +1 -0
- package/lib/tntd-form/__tests__/index.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/index.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/index.test.js +981 -0
- package/lib/tntd-form/__tests__/index.test.js.map +1 -0
- package/lib/tntd-form/__tests__/list-noStyle.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/list-noStyle.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/list-noStyle.test.js +46 -0
- package/lib/tntd-form/__tests__/list-noStyle.test.js.map +1 -0
- package/lib/tntd-form/__tests__/list.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/list.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/list.test.js +169 -0
- package/lib/tntd-form/__tests__/list.test.js.map +1 -0
- package/lib/tntd-form/__tests__/ref.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/ref.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/ref.test.js +50 -0
- package/lib/tntd-form/__tests__/ref.test.js.map +1 -0
- package/lib/tntd-form/__tests__/type.test.d.ts +2 -0
- package/lib/tntd-form/__tests__/type.test.d.ts.map +1 -0
- package/lib/tntd-form/__tests__/type.test.js +98 -0
- package/lib/tntd-form/__tests__/type.test.js.map +1 -0
- package/lib/tntd-form/_util/motion.d.ts +9 -0
- package/lib/tntd-form/_util/motion.d.ts.map +1 -0
- package/lib/tntd-form/_util/motion.js +42 -0
- package/lib/tntd-form/_util/motion.js.map +1 -0
- package/lib/tntd-form/_util/reactNode.d.ts +9 -0
- package/lib/tntd-form/_util/reactNode.d.ts.map +1 -0
- package/lib/tntd-form/_util/reactNode.js +44 -0
- package/lib/tntd-form/_util/reactNode.js.map +1 -0
- package/lib/tntd-form/_util/scrollTo.d.ts +1 -0
- package/lib/tntd-form/_util/scrollTo.d.ts.map +1 -0
- package/lib/tntd-form/_util/scrollTo.js +35 -0
- package/lib/tntd-form/_util/scrollTo.js.map +1 -0
- package/lib/tntd-form/_util/type.d.ts +4 -0
- package/lib/tntd-form/_util/type.d.ts.map +1 -0
- package/lib/tntd-form/_util/type.js +9 -0
- package/lib/tntd-form/_util/type.js.map +1 -0
- package/lib/tntd-form/_util/warning.d.ts +5 -0
- package/lib/tntd-form/_util/warning.d.ts.map +1 -0
- package/lib/tntd-form/_util/warning.js +32 -0
- package/lib/tntd-form/_util/warning.js.map +1 -0
- package/lib/tntd-form/_util/wave.d.ts +1 -0
- package/lib/tntd-form/_util/wave.d.ts.map +1 -0
- package/lib/tntd-form/_util/wave.js +168 -0
- package/lib/tntd-form/_util/wave.js.map +1 -0
- package/lib/tntd-form/context.d.ts +51 -0
- package/lib/tntd-form/context.d.ts.map +1 -0
- package/lib/tntd-form/context.js +66 -0
- package/lib/tntd-form/context.js.map +1 -0
- package/lib/tntd-form/hooks/useDebounce.d.ts +2 -0
- package/lib/tntd-form/hooks/useDebounce.d.ts.map +1 -0
- package/lib/tntd-form/hooks/useDebounce.js +40 -0
- package/lib/tntd-form/hooks/useDebounce.js.map +1 -0
- package/lib/tntd-form/hooks/useForm.d.ts +16 -0
- package/lib/tntd-form/hooks/useForm.d.ts.map +1 -0
- package/lib/tntd-form/hooks/useForm.js +64 -0
- package/lib/tntd-form/hooks/useForm.js.map +1 -0
- package/lib/tntd-form/hooks/useFormInstance.d.ts +3 -0
- package/lib/tntd-form/hooks/useFormInstance.d.ts.map +1 -0
- package/lib/tntd-form/hooks/useFormInstance.js +10 -0
- package/lib/tntd-form/hooks/useFormInstance.js.map +1 -0
- package/lib/tntd-form/hooks/useFormItemStatus.d.ts +7 -0
- package/lib/tntd-form/hooks/useFormItemStatus.d.ts.map +1 -0
- package/lib/tntd-form/hooks/useFormItemStatus.js +15 -0
- package/lib/tntd-form/hooks/useFormItemStatus.js.map +1 -0
- package/lib/tntd-form/hooks/useFrameState.d.ts +4 -0
- package/lib/tntd-form/hooks/useFrameState.d.ts.map +1 -0
- package/lib/tntd-form/hooks/useFrameState.js +67 -0
- package/lib/tntd-form/hooks/useFrameState.js.map +1 -0
- package/lib/tntd-form/hooks/useItemRef.d.ts +4 -0
- package/lib/tntd-form/hooks/useItemRef.d.ts.map +1 -0
- package/lib/tntd-form/hooks/useItemRef.js +45 -0
- package/lib/tntd-form/hooks/useItemRef.js.map +1 -0
- package/lib/tntd-form/index.d.ts +23 -1
- package/lib/tntd-form/index.d.ts.map +1 -1
- package/lib/tntd-form/index.js +40 -3
- package/lib/tntd-form/index.js.map +1 -1
- package/lib/tntd-form/interface.d.ts +4 -0
- package/lib/tntd-form/interface.d.ts.map +1 -0
- package/lib/tntd-form/interface.js +5 -0
- package/lib/tntd-form/interface.js.map +1 -0
- package/lib/tntd-form/style/components.less +16 -0
- package/lib/tntd-form/style/horizontal.less +26 -0
- package/lib/tntd-form/style/index.d.ts +5 -0
- package/lib/tntd-form/style/index.d.ts.map +1 -0
- package/lib/tntd-form/style/index.js +8 -0
- package/lib/tntd-form/style/index.js.map +1 -0
- package/lib/tntd-form/style/index.less +342 -0
- package/lib/tntd-form/style/inline.less +40 -0
- package/lib/tntd-form/style/mixin.less +90 -0
- package/lib/tntd-form/style/rtl.less +204 -0
- package/lib/tntd-form/style/status.less +45 -0
- package/lib/tntd-form/style/vertical.less +95 -0
- package/lib/tntd-form/tntd-form.stories.d.ts +33 -0
- package/lib/tntd-form/tntd-form.stories.d.ts.map +1 -0
- package/lib/tntd-form/tntd-form.stories.js +455 -0
- package/lib/tntd-form/tntd-form.stories.js.map +1 -0
- package/lib/tntd-form/util.d.ts +4 -0
- package/lib/tntd-form/util.d.ts.map +1 -0
- package/lib/tntd-form/util.js +26 -0
- package/lib/tntd-form/util.js.map +1 -0
- package/lib/tntd-form/validateMessagesContext.d.ts +5 -0
- package/lib/tntd-form/validateMessagesContext.d.ts.map +1 -0
- package/lib/tntd-form/validateMessagesContext.js +8 -0
- package/lib/tntd-form/validateMessagesContext.js.map +1 -0
- package/lib/tntd-layout/AppList.js +5 -1
- package/lib/tntd-layout/AppList.js.map +1 -1
- package/lib/tntd-layout/Application.js +5 -1
- package/lib/tntd-layout/Application.js.map +1 -1
- package/lib/tntd-layout/Avatar.js +5 -1
- package/lib/tntd-layout/Avatar.js.map +1 -1
- package/lib/tntd-layout/CompatibleLanguage.js +5 -1
- package/lib/tntd-layout/CompatibleLanguage.js.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +5 -1
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Language.js +5 -1
- package/lib/tntd-layout/EnterpriseLayout/Language.js.map +1 -1
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +5 -1
- package/lib/tntd-layout/EnterpriseLayout/Theme.js.map +1 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +5 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js.map +1 -1
- package/lib/tntd-layout/GlobalNavigation/index.js +5 -1
- package/lib/tntd-layout/GlobalNavigation/index.js.map +1 -1
- package/lib/tntd-layout/Header.js +5 -1
- package/lib/tntd-layout/Header.js.map +1 -1
- package/lib/tntd-layout/HeaderActions.js +5 -1
- package/lib/tntd-layout/HeaderActions.js.map +1 -1
- package/lib/tntd-layout/HeaderNavs.js +5 -1
- package/lib/tntd-layout/HeaderNavs.js.map +1 -1
- package/lib/tntd-layout/HeaderTabs.js +5 -1
- package/lib/tntd-layout/HeaderTabs.js.map +1 -1
- package/lib/tntd-layout/Language.js +5 -1
- package/lib/tntd-layout/Language.js.map +1 -1
- package/lib/tntd-layout/Layout.js +5 -1
- package/lib/tntd-layout/Layout.js.map +1 -1
- package/lib/tntd-layout/Logo.js +5 -1
- package/lib/tntd-layout/Logo.js.map +1 -1
- package/lib/tntd-layout/OrgAppList.js +5 -1
- package/lib/tntd-layout/OrgAppList.js.map +1 -1
- package/lib/tntd-layout/SideMenu.js +5 -1
- package/lib/tntd-layout/SideMenu.js.map +1 -1
- package/lib/tntd-layout/Theme.js +5 -1
- package/lib/tntd-layout/Theme.js.map +1 -1
- package/lib/tntd-layout/index.js +5 -1
- package/lib/tntd-layout/index.js.map +1 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +5 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js.map +1 -1
- package/lib/tntd-layout/paaslayout/Header.js +5 -1
- package/lib/tntd-layout/paaslayout/Header.js.map +1 -1
- package/lib/tntd-layout/paaslayout/SideMenu.js +5 -1
- package/lib/tntd-layout/paaslayout/SideMenu.js.map +1 -1
- package/lib/tntd-layout/paaslayout/index.js +5 -1
- package/lib/tntd-layout/paaslayout/index.js.map +1 -1
- package/lib/tntd-modal/index.js +5 -1
- package/lib/tntd-modal/index.js.map +1 -1
- package/lib/tntd-select/DropDownWrap.d.ts +10 -0
- package/lib/tntd-select/DropDownWrap.d.ts.map +1 -1
- package/lib/tntd-select/DropDownWrap.js +5 -1
- package/lib/tntd-select/DropDownWrap.js.map +1 -1
- package/lib/tntd-select/index.d.ts +12 -1
- package/lib/tntd-select/index.d.ts.map +1 -1
- package/lib/tntd-select/index.js +13 -8
- package/lib/tntd-select/index.js.map +1 -1
- package/lib/tooltip/index.js +5 -1
- package/lib/tooltip/index.js.map +1 -1
- package/lib/transfer/index.js +5 -1
- package/lib/transfer/index.js.map +1 -1
- package/lib/tree/index.js +5 -1
- package/lib/tree/index.js.map +1 -1
- package/lib/tree-select/index.d.ts +7 -1
- package/lib/tree-select/index.d.ts.map +1 -1
- package/lib/tree-select/index.js +10 -2
- package/lib/tree-select/index.js.map +1 -1
- package/lib/typography/index.js +5 -1
- package/lib/typography/index.js.map +1 -1
- package/lib/upload/index.d.ts +6 -1
- package/lib/upload/index.d.ts.map +1 -1
- package/lib/upload/index.js +11 -2
- package/lib/upload/index.js.map +1 -1
- package/lib/utils/index.js +5 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/version/index.js +5 -1
- package/lib/version/index.js.map +1 -1
- package/package.json +7 -4
- package/themes/default/variables.less +43 -0
- package/es/mention/index.js +0 -5
- package/es/mention/index.js.map +0 -1
- package/lib/mention/index.d.ts +0 -5
- package/lib/mention/index.d.ts.map +0 -1
- package/lib/mention/index.js +0 -20
- package/lib/mention/index.js.map +0 -1
package/lib/_util/ref.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.composeRef = exports.fillRef = void 0;
|
|
4
|
+
require("react");
|
|
5
|
+
function fillRef(ref, node) {
|
|
6
|
+
if (typeof ref === 'function') {
|
|
7
|
+
ref(node);
|
|
8
|
+
}
|
|
9
|
+
else if (typeof ref === 'object' && ref && 'current' in ref) {
|
|
10
|
+
ref.current = node;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.fillRef = fillRef;
|
|
14
|
+
function composeRef(...refs) {
|
|
15
|
+
return (node) => {
|
|
16
|
+
refs.forEach(ref => {
|
|
17
|
+
fillRef(ref, node);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.composeRef = composeRef;
|
|
22
|
+
//# sourceMappingURL=ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../src/_util/ref.ts"],"names":[],"mappings":";;;AAAA,iBAA0B;AAE1B,SAAgB,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;AAND,0BAMC;AAED,SAAgB,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;AAND,gCAMC","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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
2
|
+
export declare type BreakpointMap = Partial<Record<Breakpoint, string>>;
|
|
3
|
+
export declare const responsiveArray: Breakpoint[];
|
|
4
|
+
export declare const responsiveMap: BreakpointMap;
|
|
5
|
+
declare type SubscribeFunc = (screens: BreakpointMap) => void;
|
|
6
|
+
declare const responsiveObserve: {
|
|
7
|
+
dispatch(pointMap: BreakpointMap): boolean;
|
|
8
|
+
subscribe(func: SubscribeFunc): string;
|
|
9
|
+
unsubscribe(token: string): void;
|
|
10
|
+
unregister(): void;
|
|
11
|
+
register(): void;
|
|
12
|
+
};
|
|
13
|
+
export default responsiveObserve;
|
|
14
|
+
//# sourceMappingURL=responsiveObserve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsiveObserve.d.ts","sourceRoot":"","sources":["../../src/_util/responsiveObserve.ts"],"names":[],"mappings":"AAoBA,oBAAY,UAAU,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAClE,oBAAY,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe,EAAE,UAAU,EAA0C,CAAC;AAEnF,eAAO,MAAM,aAAa,EAAE,aAO3B,CAAC;AAEF,aAAK,aAAa,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;AAStD,QAAA,MAAM,iBAAiB;uBACF,aAAa;oBAYhB,aAAa;uBAYV,MAAM;;;CAiC1B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.responsiveMap = exports.responsiveArray = void 0;
|
|
4
|
+
// matchMedia polyfill for
|
|
5
|
+
// https://github.com/WickyNilliams/enquire.js/issues/82
|
|
6
|
+
let enquire;
|
|
7
|
+
// TODO: Will be removed in antd 4.0 because we will no longer support ie9
|
|
8
|
+
if (typeof window !== 'undefined') {
|
|
9
|
+
const matchMediaPolyfill = (mediaQuery) => {
|
|
10
|
+
return {
|
|
11
|
+
media: mediaQuery,
|
|
12
|
+
matches: false,
|
|
13
|
+
addListener() { },
|
|
14
|
+
removeListener() { },
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
// ref: https://github.com/ant-design/ant-design/issues/18774
|
|
18
|
+
if (!window.matchMedia)
|
|
19
|
+
window.matchMedia = matchMediaPolyfill;
|
|
20
|
+
// eslint-disable-next-line global-require
|
|
21
|
+
enquire = require('enquire.js');
|
|
22
|
+
}
|
|
23
|
+
exports.responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
|
24
|
+
exports.responsiveMap = {
|
|
25
|
+
xs: '(max-width: 575px)',
|
|
26
|
+
sm: '(min-width: 576px)',
|
|
27
|
+
md: '(min-width: 768px)',
|
|
28
|
+
lg: '(min-width: 992px)',
|
|
29
|
+
xl: '(min-width: 1200px)',
|
|
30
|
+
xxl: '(min-width: 1600px)',
|
|
31
|
+
};
|
|
32
|
+
let subscribers = [];
|
|
33
|
+
let subUid = -1;
|
|
34
|
+
let screens = {};
|
|
35
|
+
const responsiveObserve = {
|
|
36
|
+
dispatch(pointMap) {
|
|
37
|
+
screens = pointMap;
|
|
38
|
+
if (subscribers.length < 1) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
subscribers.forEach(item => {
|
|
42
|
+
item.func(screens);
|
|
43
|
+
});
|
|
44
|
+
return true;
|
|
45
|
+
},
|
|
46
|
+
subscribe(func) {
|
|
47
|
+
if (subscribers.length === 0) {
|
|
48
|
+
this.register();
|
|
49
|
+
}
|
|
50
|
+
const token = (++subUid).toString();
|
|
51
|
+
subscribers.push({
|
|
52
|
+
token,
|
|
53
|
+
func,
|
|
54
|
+
});
|
|
55
|
+
func(screens);
|
|
56
|
+
return token;
|
|
57
|
+
},
|
|
58
|
+
unsubscribe(token) {
|
|
59
|
+
subscribers = subscribers.filter(item => item.token !== token);
|
|
60
|
+
if (subscribers.length === 0) {
|
|
61
|
+
this.unregister();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
unregister() {
|
|
65
|
+
Object.keys(exports.responsiveMap).map((screen) => enquire.unregister(exports.responsiveMap[screen]));
|
|
66
|
+
},
|
|
67
|
+
register() {
|
|
68
|
+
Object.keys(exports.responsiveMap).map((screen) => enquire.register(exports.responsiveMap[screen], {
|
|
69
|
+
match: () => {
|
|
70
|
+
const pointMap = Object.assign(Object.assign({}, screens), { [screen]: true });
|
|
71
|
+
this.dispatch(pointMap);
|
|
72
|
+
},
|
|
73
|
+
unmatch: () => {
|
|
74
|
+
const pointMap = Object.assign(Object.assign({}, screens), { [screen]: false });
|
|
75
|
+
this.dispatch(pointMap);
|
|
76
|
+
},
|
|
77
|
+
// Keep a empty destory to avoid triggering unmatch when unregister
|
|
78
|
+
destroy() { },
|
|
79
|
+
}));
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
exports.default = responsiveObserve;
|
|
83
|
+
//# sourceMappingURL=responsiveObserve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAKY,QAAA,eAAe,GAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEtE,QAAA,aAAa,GAAkB;IAC1C,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,qBAAqB;IACzB,GAAG,EAAE,qBAAqB;CAC3B,CAAC;AAIF,IAAI,WAAW,GAGV,EAAE,CAAC;AACR,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;AAChB,IAAI,OAAO,GAAG,EAAE,CAAC;AAEjB,MAAM,iBAAiB,GAAG;IACxB,QAAQ,CAAC,QAAuB;QAC9B,OAAO,GAAG,QAAQ,CAAC;QACnB,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAC;SACd;QAED,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,SAAS,CAAC,IAAmB;QAC3B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,IAAI,CAAC,QAAQ,EAAE,CAAC;SACjB;QACD,MAAM,KAAK,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;QACpC,WAAW,CAAC,IAAI,CAAC;YACf,KAAK;YACL,IAAI;SACL,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IACD,WAAW,CAAC,KAAa;QACvB,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QAC/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;SACnB;IACH,CAAC;IACD,UAAU;QACR,MAAM,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAC,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE,CACpD,OAAO,CAAC,UAAU,CAAC,qBAAa,CAAC,MAAM,CAAC,CAAC,CAC1C,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,MAAM,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAC,GAAG,CAAC,CAAC,MAAkB,EAAE,EAAE,CACpD,OAAO,CAAC,QAAQ,CAAC,qBAAa,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,kBAAe,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"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ScrollToOptions {
|
|
2
|
+
/** Scroll container, default as window */
|
|
3
|
+
getContainer?: () => HTMLElement | Window;
|
|
4
|
+
/** Scroll end callback */
|
|
5
|
+
callback?: () => any;
|
|
6
|
+
/** Animation duration, default as 450 */
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
export default function scrollTo(y: number, options?: ScrollToOptions): void;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=scrollTo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollTo.d.ts","sourceRoot":"","sources":["../../src/_util/scrollTo.ts"],"names":[],"mappings":"AAIA,UAAU,eAAe;IACvB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,WAAW,GAAG,MAAM,CAAC;IAC1C,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,QAuBxE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const raf_1 = __importDefault(require("raf"));
|
|
7
|
+
const getScroll_1 = __importDefault(require("./getScroll"));
|
|
8
|
+
const easings_1 = require("./easings");
|
|
9
|
+
function scrollTo(y, options = {}) {
|
|
10
|
+
const { getContainer = () => window, callback, duration = 450 } = options;
|
|
11
|
+
const container = getContainer();
|
|
12
|
+
const scrollTop = (0, getScroll_1.default)(container, true);
|
|
13
|
+
const startTime = Date.now();
|
|
14
|
+
const frameFunc = () => {
|
|
15
|
+
const timestamp = Date.now();
|
|
16
|
+
const time = timestamp - startTime;
|
|
17
|
+
const nextScrollTop = (0, easings_1.easeInOutCubic)(time > duration ? duration : time, scrollTop, y, duration);
|
|
18
|
+
if (container === window) {
|
|
19
|
+
window.scrollTo(window.pageXOffset, nextScrollTop);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
container.scrollTop = nextScrollTop;
|
|
23
|
+
}
|
|
24
|
+
if (time < duration) {
|
|
25
|
+
(0, raf_1.default)(frameFunc);
|
|
26
|
+
}
|
|
27
|
+
else if (typeof callback === 'function') {
|
|
28
|
+
callback();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
(0, raf_1.default)(frameFunc);
|
|
32
|
+
}
|
|
33
|
+
exports.default = scrollTo;
|
|
34
|
+
//# sourceMappingURL=scrollTo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollTo.js","sourceRoot":"","sources":["../../src/_util/scrollTo.ts"],"names":[],"mappings":";;;;;AAAA,8CAAsB;AACtB,4DAAoC;AACpC,uCAA2C;AAW3C,SAAwB,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,IAAA,mBAAS,EAAC,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,IAAA,wBAAc,EAAC,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,IAAA,aAAG,EAAC,SAAS,CAAC,CAAC;SAChB;aAAM,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;YACzC,QAAQ,EAAE,CAAC;SACZ;IACH,CAAC,CAAC;IACF,IAAA,aAAG,EAAC,SAAS,CAAC,CAAC;AACjB,CAAC;AAvBD,2BAuBC","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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleChecker.d.ts","sourceRoot":"","sources":["../../src/_util/styleChecker.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,cAAe,MAAM,GAAG,MAAM,MAAM,CAAC,KAAG,OAQ3D,CAAC;AAEF,eAAO,MAAM,eAAe,SAA2D,CAAC;AAExF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFlexSupported = void 0;
|
|
4
|
+
const isStyleSupport = (styleName) => {
|
|
5
|
+
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
|
|
6
|
+
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
|
|
7
|
+
const { documentElement } = window.document;
|
|
8
|
+
return styleNameList.some(name => name in documentElement.style);
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
};
|
|
12
|
+
exports.isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);
|
|
13
|
+
exports.default = isStyleSupport;
|
|
14
|
+
//# sourceMappingURL=styleChecker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAEW,QAAA,eAAe,GAAG,cAAc,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExF,kBAAe,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"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export default function throttleByAnimationFrame(fn: (...args: any[]) => void): (...args: any[]) => void;
|
|
2
|
+
export declare function throttleByAnimationFrameDecorator(): (target: any, key: string, descriptor: any) => {
|
|
3
|
+
configurable: boolean;
|
|
4
|
+
get(): any;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=throttleByAnimationFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttleByAnimationFrame.d.ts","sourceRoot":"","sources":["../../src/_util/throttleByAnimationFrame.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,aAQ/C,GAAG,EAAE,UASlC;AAED,wBAAgB,iCAAiC,aAEvB,GAAG,OAAO,MAAM,cAAc,GAAG;;;EAuB1D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.throttleByAnimationFrameDecorator = void 0;
|
|
7
|
+
const raf_1 = __importDefault(require("raf"));
|
|
8
|
+
function throttleByAnimationFrame(fn) {
|
|
9
|
+
let requestId;
|
|
10
|
+
const later = (args) => () => {
|
|
11
|
+
requestId = null;
|
|
12
|
+
fn(...args);
|
|
13
|
+
};
|
|
14
|
+
const throttled = (...args) => {
|
|
15
|
+
if (requestId == null) {
|
|
16
|
+
requestId = (0, raf_1.default)(later(args));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
throttled.cancel = () => raf_1.default.cancel(requestId);
|
|
20
|
+
return throttled;
|
|
21
|
+
}
|
|
22
|
+
exports.default = throttleByAnimationFrame;
|
|
23
|
+
function throttleByAnimationFrameDecorator() {
|
|
24
|
+
// eslint-disable-next-line func-names
|
|
25
|
+
return function (target, key, descriptor) {
|
|
26
|
+
const fn = descriptor.value;
|
|
27
|
+
let definingProperty = false;
|
|
28
|
+
return {
|
|
29
|
+
configurable: true,
|
|
30
|
+
get() {
|
|
31
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
32
|
+
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
|
|
33
|
+
return fn;
|
|
34
|
+
}
|
|
35
|
+
const boundFn = throttleByAnimationFrame(fn.bind(this));
|
|
36
|
+
definingProperty = true;
|
|
37
|
+
Object.defineProperty(this, key, {
|
|
38
|
+
value: boundFn,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
});
|
|
42
|
+
definingProperty = false;
|
|
43
|
+
return boundFn;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.throttleByAnimationFrameDecorator = throttleByAnimationFrameDecorator;
|
|
49
|
+
//# sourceMappingURL=throttleByAnimationFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttleByAnimationFrame.js","sourceRoot":"","sources":["../../src/_util/throttleByAnimationFrame.tsx"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AAEtB,SAAwB,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,IAAA,aAAG,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;IAED,SAAiB,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,aAAG,CAAC,MAAM,CAAC,SAAU,CAAC,CAAC;IAEzD,OAAO,SAAS,CAAC;AACnB,CAAC;AAjBD,2CAiBC;AAED,SAAgB,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;AAzBD,8EAyBC","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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrap of sub component which need use as Button capacity (like Icon component).
|
|
3
|
+
* This helps accessibility reader to tread as a interactive button to operation.
|
|
4
|
+
*/
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
interface TransButtonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
onClick?: (e?: React.MouseEvent<HTMLDivElement>) => void;
|
|
8
|
+
noStyle?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare class TransButton extends React.Component<TransButtonProps> {
|
|
11
|
+
div?: HTMLDivElement;
|
|
12
|
+
lastKeyCode?: number;
|
|
13
|
+
onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
|
|
14
|
+
onKeyUp: React.KeyboardEventHandler<HTMLDivElement>;
|
|
15
|
+
setRef: (btn: HTMLDivElement) => void;
|
|
16
|
+
focus(): void;
|
|
17
|
+
blur(): void;
|
|
18
|
+
render(): JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export default TransButton;
|
|
21
|
+
//# sourceMappingURL=transButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transButton.d.ts","sourceRoot":"","sources":["../../src/_util/transButton.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAUD,cAAM,WAAY,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IACzD,GAAG,CAAC,EAAE,cAAc,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAKnD;IAEF,OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAMjD;IAEF,MAAM,QAAS,cAAc,UAE3B;IAEF,KAAK;IAML,IAAI;IAMJ,MAAM;CAeP;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
/**
|
|
37
|
+
* Wrap of sub component which need use as Button capacity (like Icon component).
|
|
38
|
+
* This helps accessibility reader to tread as a interactive button to operation.
|
|
39
|
+
*/
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const KeyCode_1 = __importDefault(require("rc-util/lib/KeyCode"));
|
|
42
|
+
const inlineStyle = {
|
|
43
|
+
border: 0,
|
|
44
|
+
background: 'transparent',
|
|
45
|
+
padding: 0,
|
|
46
|
+
lineHeight: 'inherit',
|
|
47
|
+
display: 'inline-block',
|
|
48
|
+
};
|
|
49
|
+
class TransButton extends React.Component {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments);
|
|
52
|
+
Object.defineProperty(this, "div", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: void 0
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(this, "lastKeyCode", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
configurable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
value: void 0
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(this, "onKeyDown", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
value: event => {
|
|
69
|
+
const { keyCode } = event;
|
|
70
|
+
if (keyCode === KeyCode_1.default.ENTER) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(this, "onKeyUp", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
value: event => {
|
|
80
|
+
const { keyCode } = event;
|
|
81
|
+
const { onClick } = this.props;
|
|
82
|
+
if (keyCode === KeyCode_1.default.ENTER && onClick) {
|
|
83
|
+
onClick();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(this, "setRef", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
configurable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
value: (btn) => {
|
|
92
|
+
this.div = btn;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
focus() {
|
|
97
|
+
if (this.div) {
|
|
98
|
+
this.div.focus();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
blur() {
|
|
102
|
+
if (this.div) {
|
|
103
|
+
this.div.blur();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
const _a = this.props, { style, noStyle } = _a, restProps = __rest(_a, ["style", "noStyle"]);
|
|
108
|
+
return (React.createElement("div", Object.assign({ role: "button", tabIndex: 0, ref: this.setRef }, restProps, { onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp, style: Object.assign(Object.assign({}, (!noStyle ? inlineStyle : null)), style) })));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.default = TransButton;
|
|
112
|
+
//# sourceMappingURL=transButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transButton.js","sourceRoot":"","sources":["../../src/_util/transButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,6CAA+B;AAC/B,kEAA0C;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,iBAAO,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,iBAAO,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,kBAAe,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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggerEvent.d.ts","sourceRoot":"","sources":["../../src/_util/triggerEvent.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAO7D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function triggerEvent(el, type) {
|
|
4
|
+
if ('createEvent' in document) {
|
|
5
|
+
// modern browsers, IE9+
|
|
6
|
+
const e = document.createEvent('HTMLEvents');
|
|
7
|
+
e.initEvent(type, false, true);
|
|
8
|
+
el.dispatchEvent(e);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.default = triggerEvent;
|
|
12
|
+
//# sourceMappingURL=triggerEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggerEvent.js","sourceRoot":"","sources":["../../src/_util/triggerEvent.tsx"],"names":[],"mappings":";;AAAA,SAAwB,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;AAPD,+BAOC","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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/_util/type.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtE,eAAO,MAAM,KAAK,uCAA2C,CAAC;AAE9D,eAAO,MAAM,QAAQ,uCAA2C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tupleNum = exports.tuple = void 0;
|
|
4
|
+
// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
|
|
5
|
+
const tuple = (...args) => args;
|
|
6
|
+
exports.tuple = tuple;
|
|
7
|
+
const tupleNum = (...args) => args;
|
|
8
|
+
exports.tupleNum = tupleNum;
|
|
9
|
+
//# sourceMappingURL=type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/_util/type.ts"],"names":[],"mappings":";;;AACA,qHAAqH;AAC9G,MAAM,KAAK,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC;AAAjD,QAAA,KAAK,SAA4C;AAEvD,MAAM,QAAQ,GAAG,CAAqB,GAAG,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC;AAApD,QAAA,QAAQ,YAA4C","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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../src/_util/warning.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,CAAC;gCAEA,OAAO,aAAa,MAAM,WAAW,MAAM,KAAG,IAAI;AAAzE,wBAEE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.resetWarned = void 0;
|
|
23
|
+
const warning_1 = __importStar(require("rc-util/lib/warning"));
|
|
24
|
+
Object.defineProperty(exports, "resetWarned", { enumerable: true, get: function () { return warning_1.resetWarned; } });
|
|
25
|
+
exports.default = (valid, component, message) => {
|
|
26
|
+
(0, warning_1.default)(valid, `[antd: ${component}] ${message}`);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.js","sourceRoot":"","sources":["../../src/_util/warning.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA2D;AAElD,4FAFS,qBAAW,OAET;AAEpB,kBAAe,CAAC,KAAc,EAAE,SAAiB,EAAE,OAAe,EAAQ,EAAE;IAC1E,IAAA,iBAAO,EAAC,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"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ConfigConsumerProps } from '../config-provider';
|
|
3
|
+
export default class Wave extends React.Component<{
|
|
4
|
+
insertExtraNode?: boolean;
|
|
5
|
+
}> {
|
|
6
|
+
private instance?;
|
|
7
|
+
private extraNode;
|
|
8
|
+
private clickWaveTimeoutId;
|
|
9
|
+
private animationStartId;
|
|
10
|
+
private animationStart;
|
|
11
|
+
private destroy;
|
|
12
|
+
private csp?;
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
15
|
+
onClick: (node: HTMLElement, waveColor: string) => void;
|
|
16
|
+
onTransitionStart: (e: AnimationEvent) => void;
|
|
17
|
+
onTransitionEnd: (e: AnimationEvent) => void;
|
|
18
|
+
getAttributeName(): "ant-click-animating" | "ant-click-animating-without-extra-node";
|
|
19
|
+
bindAnimationEvent: (node: HTMLElement) => {
|
|
20
|
+
cancel: () => void;
|
|
21
|
+
} | undefined;
|
|
22
|
+
resetEffect(node: HTMLElement): void;
|
|
23
|
+
renderWave: ({ csp }: ConfigConsumerProps) => React.ReactNode;
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=wave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wave.d.ts","sourceRoot":"","sources":["../../src/_util/wave.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAkB,mBAAmB,EAAa,MAAM,oBAAoB,CAAC;AAqBpF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;IAC9E,OAAO,CAAC,QAAQ,CAAC,CAEf;IAEF,OAAO,CAAC,SAAS,CAAiB;IAElC,OAAO,CAAC,kBAAkB,CAAS;IAEnC,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,cAAc,CAAkB;IAExC,OAAO,CAAC,OAAO,CAAkB;IAEjC,OAAO,CAAC,GAAG,CAAC,CAAY;IAExB,iBAAiB;IAQjB,oBAAoB;IAWpB,OAAO,SAAU,WAAW,aAAa,MAAM,UAuC7C;IAEF,iBAAiB,MAAO,cAAc,UAWpC;IAEF,eAAe,MAAO,cAAc,UAKlC;IAEF,gBAAgB;IAKhB,kBAAkB,SAAU,WAAW;;kBAoCrC;IAEF,WAAW,CAAC,IAAI,EAAE,WAAW;IAmB7B,UAAU,YAAa,mBAAmB,qBAKxC;IAEF,MAAM;CAGP"}
|