tntd 2.6.8 → 2.6.10
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 +26 -0
- package/es/actions/index.js.map +1 -0
- package/es/actions/index.less +70 -0
- package/es/cascader/index.js +5 -1
- package/es/cascader/index.js.map +1 -1
- package/es/check-card/group.js +197 -0
- package/es/check-card/group.js.map +1 -0
- package/es/check-card/index.js +163 -0
- package/es/check-card/index.js.map +1 -0
- package/es/check-card/index.less +179 -0
- package/es/checkbox/checkbox-group.js +5 -0
- package/es/checkbox/checkbox-group.js.map +1 -0
- package/es/checkbox/index.js +5 -0
- package/es/checkbox/index.js.map +1 -1
- 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/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/index.js +4 -0
- package/es/config-provider/index.js.map +1 -1
- package/es/connect/index.js +29 -0
- package/es/connect/index.js.map +1 -0
- package/es/date-picker/index.js +15 -1
- package/es/date-picker/index.js.map +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/ellipsis/index.js.map +1 -1
- package/es/ellipsis/index.less +1 -1
- package/es/handle/index.js +13 -5
- package/es/handle/index.js.map +1 -1
- package/es/handle/index.less +1 -1
- package/es/index.js +8 -1
- package/es/index.js.map +1 -1
- package/es/index.less +5 -0
- package/es/input/input.js +19 -10
- 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/label/label.js +140 -0
- package/es/label/label.js.map +1 -0
- package/es/label/label.test.js +12 -0
- package/es/label/label.test.js.map +1 -0
- package/es/locale/en_US.js +4 -2
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +4 -2
- package/es/locale/zh_CN.js.map +1 -1
- 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/preview-text/index.js +265 -0
- package/es/preview-text/index.js.map +1 -0
- package/es/preview-text/index.less +3 -0
- package/es/query-form/Field/SelectInput.js +7 -5
- package/es/query-form/Field/SelectInput.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 +5 -0
- package/es/radio/radio-group.js.map +1 -0
- package/es/segmented/index.js +67 -0
- package/es/segmented/index.js.map +1 -0
- package/es/segmented/index.less +138 -0
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +25 -3
- 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 +10 -0
- package/es/switch/switch.js.map +1 -0
- package/es/table/table.js +10 -4
- package/es/table/table.js.map +1 -1
- package/es/table/total-shower.js +10 -0
- package/es/table/total-shower.js.map +1 -0
- package/es/time-picker/index.js +3 -1
- package/es/time-picker/index.js.map +1 -1
- package/es/title/index.js +9 -11
- package/es/title/index.js.map +1 -1
- package/es/title/index.less +10 -10
- package/es/tntd-form/ErrorList.js +87 -0
- package/es/tntd-form/ErrorList.js.map +1 -0
- package/es/tntd-form/Form.js +122 -0
- package/es/tntd-form/Form.js.map +1 -0
- package/es/tntd-form/FormItem/ItemHolder.js +144 -0
- package/es/tntd-form/FormItem/ItemHolder.js.map +1 -0
- package/es/tntd-form/FormItem/index.js +264 -0
- package/es/tntd-form/FormItem/index.js.map +1 -0
- package/es/tntd-form/FormItemInput.js +79 -0
- package/es/tntd-form/FormItemInput.js.map +1 -0
- package/es/tntd-form/FormItemLabel.js +98 -0
- package/es/tntd-form/FormItemLabel.js.map +1 -0
- package/es/tntd-form/FormList.js +40 -0
- package/es/tntd-form/FormList.js.map +1 -0
- package/es/tntd-form/_util/motion.js +47 -0
- package/es/tntd-form/_util/motion.js.map +1 -0
- package/es/tntd-form/_util/reactNode.js +16 -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 +3 -0
- package/es/tntd-form/_util/type.js.map +1 -0
- package/es/tntd-form/_util/warning.js +5 -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 +40 -0
- package/es/tntd-form/context.js.map +1 -0
- package/es/tntd-form/hooks/useDebounce.js +13 -0
- package/es/tntd-form/hooks/useDebounce.js.map +1 -0
- package/es/tntd-form/hooks/useForm.js +40 -0
- package/es/tntd-form/hooks/useForm.js.map +1 -0
- package/es/tntd-form/hooks/useFormInstance.js +8 -0
- package/es/tntd-form/hooks/useFormInstance.js.map +1 -0
- package/es/tntd-form/hooks/useFormItemStatus.js +13 -0
- package/es/tntd-form/hooks/useFormItemStatus.js.map +1 -0
- package/es/tntd-form/hooks/useFrameState.js +37 -0
- package/es/tntd-form/hooks/useFrameState.js.map +1 -0
- package/es/tntd-form/hooks/useItemRef.js +20 -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 +2 -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 +5 -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 +786 -0
- package/es/tntd-form/tntd-form.stories.js.map +1 -0
- package/es/tntd-form/util.js +18 -0
- package/es/tntd-form/util.js.map +1 -0
- package/es/tntd-form/validateMessagesContext.js +5 -0
- package/es/tntd-form/validateMessagesContext.js.map +1 -0
- package/es/tntd-modal/index.js +71 -56
- package/es/tntd-modal/index.js.map +1 -1
- package/es/tntd-modal/index.less +83 -63
- package/es/tree-select/index.js +4 -1
- package/es/tree-select/index.js.map +1 -1
- package/es/upload/index.js +8 -1
- package/es/upload/index.js.map +1 -1
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -1
- package/es/utils/simple-template.js +10 -0
- package/es/utils/simple-template.js.map +1 -0
- package/es/water-mark/index.js +110 -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 +34 -0
- package/lib/actions/index.js.map +1 -0
- package/lib/actions/index.less +70 -0
- package/lib/cascader/index.d.ts +6 -1
- package/lib/cascader/index.d.ts.map +1 -1
- package/lib/cascader/index.js +10 -3
- package/lib/cascader/index.js.map +1 -1
- 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 +236 -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 +178 -0
- package/lib/check-card/index.js.map +1 -0
- package/lib/check-card/index.less +179 -0
- 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 +13 -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 +16 -0
- package/lib/checkbox/index.js.map +1 -1
- 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/config-provider/DisabledContext.d.ts +10 -0
- package/lib/config-provider/DisabledContext.d.ts.map +1 -0
- package/lib/config-provider/DisabledContext.js +22 -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 +23 -0
- package/lib/config-provider/SizeContext.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 +15 -0
- 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 +50 -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 +29 -3
- package/lib/date-picker/index.js.map +1 -1
- package/lib/ellipsis/index.js +1 -1
- package/lib/ellipsis/index.js.map +1 -1
- package/lib/ellipsis/index.less +1 -1
- package/lib/handle/index.d.ts.map +1 -1
- package/lib/handle/index.js +13 -4
- 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 +22 -0
- package/lib/index.js.map +1 -1
- package/lib/index.less +5 -0
- package/lib/input/input.d.ts +5 -0
- package/lib/input/input.d.ts.map +1 -1
- package/lib/input/input.js +18 -8
- 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 +4 -1
- package/lib/input-number/index.js.map +1 -1
- package/lib/label/label.d.ts +52 -0
- package/lib/label/label.d.ts.map +1 -0
- package/lib/label/label.js +150 -0
- package/lib/label/label.js.map +1 -0
- package/lib/label/label.test.d.ts +2 -0
- package/lib/label/label.test.d.ts.map +1 -0
- package/lib/label/label.test.js +14 -0
- package/lib/label/label.test.js.map +1 -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 +4 -2
- 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 +4 -2
- package/lib/locale/zh_CN.js.map +1 -1
- 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/preview-text/index.d.ts +20 -0
- package/lib/preview-text/index.d.ts.map +1 -0
- package/lib/preview-text/index.js +278 -0
- package/lib/preview-text/index.js.map +1 -0
- package/lib/preview-text/index.less +3 -0
- package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
- package/lib/query-form/Field/SelectInput.js +6 -4
- package/lib/query-form/Field/SelectInput.js.map +1 -1
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +4 -0
- 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 +13 -0
- package/lib/radio/radio-group.js.map +1 -0
- package/lib/segmented/index.d.ts +23 -0
- package/lib/segmented/index.d.ts.map +1 -0
- package/lib/segmented/index.js +80 -0
- package/lib/segmented/index.js.map +1 -0
- package/lib/segmented/index.less +138 -0
- package/lib/select/index.d.ts +2 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +12 -0
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +25 -4
- package/lib/select/select.js.map +1 -1
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/switch/index.d.ts +2 -3
- package/lib/switch/index.d.ts.map +1 -1
- package/lib/switch/index.js +1 -2
- 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 +37 -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.d.ts +1 -1
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +14 -7
- package/lib/table/table.js.map +1 -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 +17 -0
- package/lib/table/total-shower.js.map +1 -0
- 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 +3 -1
- package/lib/time-picker/index.js.map +1 -1
- package/lib/title/index.d.ts +11 -1
- package/lib/title/index.d.ts.map +1 -1
- package/lib/title/index.js +8 -10
- package/lib/title/index.js.map +1 -1
- package/lib/title/index.less +10 -10
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +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 +104 -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 +160 -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 +163 -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 +301 -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 +92 -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 +106 -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 +56 -0
- package/lib/tntd-form/FormList.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 +59 -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 +27 -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 +21 -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 +20 -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 +54 -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 +31 -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 +63 -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 +13 -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 +20 -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 +55 -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 +28 -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 +24 -8
- 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 +7 -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 +6 -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 +888 -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 +25 -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 +12 -0
- package/lib/tntd-form/validateMessagesContext.js.map +1 -0
- 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 +76 -61
- package/lib/tntd-modal/index.js.map +1 -1
- package/lib/tntd-modal/index.less +83 -63
- package/lib/tree-select/index.d.ts +7 -1
- package/lib/tree-select/index.d.ts.map +1 -1
- package/lib/tree-select/index.js +9 -3
- package/lib/tree-select/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 -1
- package/lib/upload/index.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +12 -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 +19 -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 +142 -0
- package/lib/water-mark/index.js.map +1 -0
- package/package.json +26 -5
- package/themes/default/variables.less +43 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
.tntd-checkcard {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 320px;
|
|
5
|
+
margin-inline-end: 16px;
|
|
6
|
+
margin-block-end: 16px;
|
|
7
|
+
color: rgba(0, 0, 0, 0.88);
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
line-height: 1.5714285714285714;
|
|
10
|
+
vertical-align: top;
|
|
11
|
+
background-color: #ffffff;
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
transition: all 0.3s;
|
|
15
|
+
|
|
16
|
+
&:last-child {
|
|
17
|
+
margin-inline-end: 0;
|
|
18
|
+
}
|
|
19
|
+
& + .tntd-checkcard {
|
|
20
|
+
margin-inline-start: 0 !important;
|
|
21
|
+
}
|
|
22
|
+
.tntd-checkcard-loading {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
user-select: none;
|
|
25
|
+
}
|
|
26
|
+
.tntd-checkcard-loading-content {
|
|
27
|
+
padding-inline: 16px;
|
|
28
|
+
padding-block: 12px;
|
|
29
|
+
p {
|
|
30
|
+
margin-block: 0;
|
|
31
|
+
margin-inline: 0;
|
|
32
|
+
}
|
|
33
|
+
.tntd-checkcard-loading-block {
|
|
34
|
+
height: 14px;
|
|
35
|
+
margin-block: 4px;
|
|
36
|
+
background: linear-gradient(
|
|
37
|
+
90deg,
|
|
38
|
+
rgba(54, 61, 64, 0.2),
|
|
39
|
+
rgba(54, 61, 64, 0.4),
|
|
40
|
+
rgba(54, 61, 64, 0.2)
|
|
41
|
+
);
|
|
42
|
+
animation-name: card-loading;
|
|
43
|
+
animation-duration: 1.4s;
|
|
44
|
+
animation-timing-function: ease;
|
|
45
|
+
animation-iteration-count: infinite;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&:not(.tntd-checkcard-disabled):hover {
|
|
49
|
+
border-color: @primary-color;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.tntd-checkcard-bordered {
|
|
53
|
+
border: 1px solid #d9d9d9;
|
|
54
|
+
}
|
|
55
|
+
.tntd-checkcard-group {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
}
|
|
58
|
+
// @keyframes {
|
|
59
|
+
// card-loading {
|
|
60
|
+
// 0% {
|
|
61
|
+
// background-position: 0 50%;
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
64
|
+
// 50% {
|
|
65
|
+
// background-position: 100% 50%;
|
|
66
|
+
// }
|
|
67
|
+
// 100% {
|
|
68
|
+
// background-position: 0 50%;
|
|
69
|
+
// }
|
|
70
|
+
// }
|
|
71
|
+
.tntd-checkcard {
|
|
72
|
+
&:focus {
|
|
73
|
+
background-color: #bae0ff;
|
|
74
|
+
border-color: @primary-color;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
.tntd-checkcard-checked {
|
|
78
|
+
background-color: #bae0ff;
|
|
79
|
+
border-color: @primary-color;
|
|
80
|
+
|
|
81
|
+
&:after {
|
|
82
|
+
position: absolute;
|
|
83
|
+
inset-block-start: 2px;
|
|
84
|
+
inset-inline-end: 2px;
|
|
85
|
+
width: 0;
|
|
86
|
+
height: 0;
|
|
87
|
+
border: 6px solid @primary-color;
|
|
88
|
+
border-block-end: 6px solid transparent;
|
|
89
|
+
border-inline-start: 6px solid transparent;
|
|
90
|
+
border-start-end-radius: 2px;
|
|
91
|
+
content: '';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
.tntd-checkcard-disabled {
|
|
95
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
96
|
+
border-color: #d9d9d9;
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
.tntd-checkcard-description {
|
|
99
|
+
color: rgba(0, 0, 0, 0.25);
|
|
100
|
+
}
|
|
101
|
+
.tntd-checkcard-title {
|
|
102
|
+
color: rgba(0, 0, 0, 0.25);
|
|
103
|
+
}
|
|
104
|
+
.tntd-checkcard-avatar {
|
|
105
|
+
opacity: 0.25;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
.tntd-checkcard.tntd-checkcard-disabled {
|
|
109
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
110
|
+
border-color: #d9d9d9;
|
|
111
|
+
cursor: not-allowed;
|
|
112
|
+
|
|
113
|
+
.tntd-checkcard-description {
|
|
114
|
+
color: rgba(0, 0, 0, 0.25);
|
|
115
|
+
}
|
|
116
|
+
.tntd-checkcard-title {
|
|
117
|
+
color: rgba(0, 0, 0, 0.25);
|
|
118
|
+
}
|
|
119
|
+
.tntd-checkcard-avatar {
|
|
120
|
+
opacity: 0.25;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.tntd-checkcard-lg {
|
|
124
|
+
width: 440px;
|
|
125
|
+
}
|
|
126
|
+
.tntd-checkcard-sm {
|
|
127
|
+
width: 212px;
|
|
128
|
+
}
|
|
129
|
+
.tntd-checkcard-cover {
|
|
130
|
+
padding-inline: 4px;
|
|
131
|
+
padding-block: 4px;
|
|
132
|
+
img {
|
|
133
|
+
width: 100%;
|
|
134
|
+
height: 100%;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
border-radius: 4px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.tntd-checkcard-content {
|
|
141
|
+
display: flex;
|
|
142
|
+
padding-inline: 12px;
|
|
143
|
+
padding-block: 16px;
|
|
144
|
+
}
|
|
145
|
+
.tntd-checkcard-avatar-header {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
}
|
|
149
|
+
.tntd-checkcard-avatar {
|
|
150
|
+
padding-inline-end: 8px;
|
|
151
|
+
}
|
|
152
|
+
.tntd-checkcard-detail {
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
width: 100%;
|
|
155
|
+
& > div {
|
|
156
|
+
&:not(:last-child) {
|
|
157
|
+
margin-block-end: 4px;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
.tntd-checkcard-header {
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
}
|
|
166
|
+
.tntd-checkcard-title {
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
color: rgba(0, 0, 0, 0.88);
|
|
169
|
+
font-weight: 500;
|
|
170
|
+
font-size: 14px;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
text-overflow: ellipsis;
|
|
173
|
+
}
|
|
174
|
+
.tntd-checkcard-description {
|
|
175
|
+
color: rgba(0, 0, 0, 0.65);
|
|
176
|
+
p:last-child {
|
|
177
|
+
margin-bottom: 0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/lib/checkbox/Group';
|
|
3
|
+
export declare type CheckboxGroupProps = AntdCheckboxGroupProps & {
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<AntdCheckboxGroupProps & React.RefAttributes<unknown>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAI1F,oBAAY,kBAAkB,GAAG,sBAAsB,GAAG;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;;AAED,wBAA2E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
require("react");
|
|
8
|
+
var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
|
|
9
|
+
var _connect = require("../connect");
|
|
10
|
+
var _previewText = require("../preview-text");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
var _default = (0, _connect.connectReadonlyComponent)(_checkbox["default"].Group, _previewText.PreviewText.Select);
|
|
13
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../src/checkbox/checkbox-group.tsx"],"names":[],"mappings":";;;;;AAAA,iBAAyC;AACzC,gEAAuC;AAEvC,wCAAqD;AACrD,kDAA6C;AAM7C,kBAAe,IAAA,kCAAwB,EAAC,kBAAQ,CAAC,KAAK,EAAE,0BAAW,CAAC,MAAM,CAAC,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport Checkbox from 'antd/lib/checkbox'\nimport type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/lib/checkbox/Group'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport type CheckboxGroupProps = AntdCheckboxGroupProps & {\n readonly?: boolean\n}\n\nexport default connectReadonlyComponent(Checkbox.Group, PreviewText.Select)\n"]}
|
package/lib/checkbox/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAA;AAGvC,OAAO,wBAAwB,CAAA;AAE/B,cAAc,kBAAkB,CAAA;AAEhC,cAAc,kBAAkB,CAAA;AAKhC,eAAe,QAAQ,CAAA"}
|
package/lib/checkbox/index.js
CHANGED
|
@@ -18,8 +18,24 @@ Object.keys(_checkbox).forEach(function (key) {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
+
var _checkboxGroup = _interopRequireWildcard(require("./checkbox-group"));
|
|
22
|
+
Object.keys(_checkboxGroup).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
25
|
+
if (key in exports && exports[key] === _checkboxGroup[key]) return;
|
|
26
|
+
Object.defineProperty(exports, key, {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _checkboxGroup[key];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
21
33
|
require("antd/lib/checkbox/style");
|
|
22
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
35
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
_checkbox["default"].Group = _checkboxGroup["default"];
|
|
24
40
|
var _default = _checkbox["default"];
|
|
25
41
|
exports["default"] = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,gEAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/checkbox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,gEAAuC;AACvC,sEAA4C;AAE5C,kCAA+B;AAE/B,mDAAgC;AAChC,aAAa;AACb,mDAAgC;AAEhC,aAAa;AACb,kBAAQ,CAAC,KAAK,GAAG,wBAAa,CAAA;AAE9B,kBAAe,kBAAQ,CAAA","sourcesContent":["import Checkbox from 'antd/lib/checkbox'\nimport CheckboxGroup from './checkbox-group'\n\nimport 'antd/lib/checkbox/style'\n\nexport * from 'antd/lib/checkbox'\n// @ts-ignore\nexport * from './checkbox-group'\n\n// @ts-ignore\nCheckbox.Group = CheckboxGroup\n\nexport default Checkbox\n"]}
|
|
@@ -38,7 +38,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
38
38
|
}
|
|
39
39
|
return t;
|
|
40
40
|
};
|
|
41
|
-
var prefixCls = '
|
|
41
|
+
var prefixCls = 'tntd-color-picker';
|
|
42
42
|
var modeMap = {
|
|
43
43
|
AlphaPicker: _reactColor.AlphaPicker,
|
|
44
44
|
BlockPicker: _reactColor.BlockPicker,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../src/color-picker/ColorPicker.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwE;AACxE,+BAAoC;AACpC,6CAcoB;AACpB,4DAA2B;AAC3B,mCAA2D;AAC3D,wDAA8B;AAE9B,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../src/color-picker/ColorPicker.js"],"names":[],"mappings":"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","sourcesContent":["import React, { useState, useCallback, useEffect, useMemo } from 'react'\nimport { Popover, Icon } from 'antd'\nimport {\n AlphaPicker,\n BlockPicker,\n ChromePicker,\n CirclePicker,\n CompactPicker,\n GithubPicker,\n HuePicker,\n MaterialPicker,\n PhotoshopPicker,\n SketchPicker,\n SliderPicker,\n SwatchesPicker,\n TwitterPicker,\n} from 'react-color'\nimport cn from 'classnames'\nimport { get, isObject, upperFirst, toLower } from 'lodash'\nimport imgSrc from './tip.svg'\n\nconst prefixCls = 'tntd-color-picker'\n\nconst modeMap = {\n AlphaPicker,\n BlockPicker,\n ChromePicker,\n CirclePicker,\n CompactPicker,\n GithubPicker,\n HuePicker,\n MaterialPicker,\n PhotoshopPicker,\n SketchPicker,\n SliderPicker,\n SwatchesPicker,\n TwitterPicker,\n}\n\nconst propsFormatMap = {\n SketchPicker: ({ colors, ...otherProps }) => {\n if (colors) {\n return {\n presetColors: colors,\n ...otherProps,\n }\n }\n return otherProps\n },\n}\n\nexport default function ColorPicker({\n value: _value,\n onChange,\n visible: vs,\n allowClear,\n disabled,\n className,\n mode = 'sketch',\n style = {},\n size,\n placeholder,\n placement = 'bottomLeft',\n locale,\n ...otherProps\n}) {\n const [visible, setVisible] = useState(vs)\n const [value, setValue] = useState(_value)\n\n useEffect(() => {\n setValue(_value)\n }, [_value])\n\n const handleChange = useCallback(\n (color) => {\n let value\n if (isObject(color?.rgb)) {\n value = `rgba(${color.rgb.r},${color.rgb.g},${color.rgb.b},${color.rgb.a})`\n }\n if (onChange) {\n onChange(value)\n } else {\n setValue(value)\n }\n },\n [onChange]\n )\n\n const domClick = useCallback(() => {\n setVisible(true)\n }, [])\n\n const doClear = useCallback(\n (e) => {\n e.stopPropagation()\n handleChange()\n },\n [handleChange]\n )\n\n const [ModePicker, propsFormat] = useMemo(() => {\n const modeKey = upperFirst(toLower(mode)) + 'Picker' || 'SketchPicker'\n const ModePicker = modeMap[modeKey] || SketchPicker\n return [ModePicker, propsFormatMap[modeKey] || ((p) => p)]\n }, [mode])\n\n return (\n <Popover\n placement={placement}\n trigger=\"click\"\n visible={visible && !disabled}\n onVisibleChange={setVisible}\n content={\n <ModePicker {...propsFormat(otherProps)} color={value} onChangeComplete={handleChange} />\n }\n overlayClassName={`${prefixCls}-pop`}\n >\n <div\n className={cn(prefixCls, className, {\n [`${prefixCls}-selected`]: !!value,\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-active`]: visible && !disabled,\n [`${prefixCls}-sm`]: size === 'small',\n [`${prefixCls}-lg`]: size === 'large',\n })}\n style={style}\n onClick={domClick}\n >\n <div className={`${prefixCls}-inner`}>\n {!!value ? (\n <div className={`${prefixCls}-value`}>\n <div className={`${prefixCls}-value-bg`} style={{ background: value }}></div>\n </div>\n ) : (\n <div className={`${prefixCls}-placeholder`}>{placeholder}</div>\n )}\n <span className={`${prefixCls}-img`}>\n <img src={imgSrc} />\n </span>\n {allowClear && !!value && !disabled && (\n <span className={`${prefixCls}-clear`} onClick={doClear}>\n <Icon type=\"close-circle\" theme=\"filled\" />\n </span>\n )}\n </div>\n </div>\n </Popover>\n )\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare type DisabledType = true | false | undefined;
|
|
3
|
+
declare const DisabledContext: React.Context<DisabledType>;
|
|
4
|
+
export interface DisabledContextProps {
|
|
5
|
+
disabled?: DisabledType;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const DisabledContextProvider: React.FC<DisabledContextProps>;
|
|
9
|
+
export default DisabledContext;
|
|
10
|
+
//# sourceMappingURL=DisabledContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisabledContext.d.ts","sourceRoot":"","sources":["../../src/config-provider/DisabledContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,oBAAY,YAAY,GAAG,IAAI,GAAG,KAAK,GAAG,SAAS,CAAA;AAEnD,QAAA,MAAM,eAAe,6BAA2C,CAAA;AAEhE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAOlE,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = exports.DisabledContextProvider = void 0;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
var DisabledContext = React.createContext(false);
|
|
12
|
+
var DisabledContextProvider = function DisabledContextProvider(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
disabled = _ref.disabled;
|
|
15
|
+
var originDisabled = React.useContext(DisabledContext);
|
|
16
|
+
return React.createElement(DisabledContext.Provider, {
|
|
17
|
+
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
18
|
+
}, children);
|
|
19
|
+
};
|
|
20
|
+
exports.DisabledContextProvider = DisabledContextProvider;
|
|
21
|
+
var _default = DisabledContext;
|
|
22
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisabledContext.js","sourceRoot":"","sources":["../../src/config-provider/DisabledContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAI9B,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAe,KAAK,CAAC,CAAA;AAOzD,MAAM,uBAAuB,GAAmC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChG,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IACxD,OAAO,CACL,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,cAAc,IACxD,QAAQ,CACgB,CAC5B,CAAA;AACH,CAAC,CAAA;AAPY,QAAA,uBAAuB,2BAOnC;AAED,kBAAe,eAAe,CAAA","sourcesContent":["import * as React from 'react'\n\nexport type DisabledType = true | false | undefined\n\nconst DisabledContext = React.createContext<DisabledType>(false)\n\nexport interface DisabledContextProps {\n disabled?: DisabledType\n children?: React.ReactNode\n}\n\nexport const DisabledContextProvider: React.FC<DisabledContextProps> = ({ children, disabled }) => {\n const originDisabled = React.useContext(DisabledContext)\n return (\n <DisabledContext.Provider value={disabled ?? originDisabled}>\n {children}\n </DisabledContext.Provider>\n )\n}\n\nexport default DisabledContext\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare type SizeType = 'small' | 'middle' | 'large' | undefined;
|
|
3
|
+
declare const SizeContext: React.Context<SizeType>;
|
|
4
|
+
export interface SizeContextProps {
|
|
5
|
+
size?: SizeType;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const SizeContextProvider: React.FC<SizeContextProps>;
|
|
9
|
+
export default SizeContext;
|
|
10
|
+
//# sourceMappingURL=SizeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeContext.d.ts","sourceRoot":"","sources":["../../src/config-provider/SizeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,oBAAY,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAE/D,QAAA,MAAM,WAAW,yBAA2C,CAAA;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAM1D,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = exports.SizeContextProvider = void 0;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
var SizeContext = React.createContext(undefined);
|
|
12
|
+
var SizeContextProvider = function SizeContextProvider(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
size = _ref.size;
|
|
15
|
+
return React.createElement(SizeContext.Consumer, null, function (originSize) {
|
|
16
|
+
return React.createElement(SizeContext.Provider, {
|
|
17
|
+
value: size || originSize
|
|
18
|
+
}, children);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.SizeContextProvider = SizeContextProvider;
|
|
22
|
+
var _default = SizeContext;
|
|
23
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeContext.js","sourceRoot":"","sources":["../../src/config-provider/SizeContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAI9B,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAW,SAAS,CAAC,CAAA;AAOrD,MAAM,mBAAmB,GAA+B,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACrF,oBAAC,WAAW,CAAC,QAAQ,QAClB,CAAC,UAAU,EAAE,EAAE,CAAC,CACf,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,IAAI,UAAU,IAAG,QAAQ,CAAwB,CACnF,CACoB,CACxB,CAAA;AANY,QAAA,mBAAmB,uBAM/B;AAED,kBAAe,WAAW,CAAA","sourcesContent":["import * as React from 'react'\n\nexport type SizeType = 'small' | 'middle' | 'large' | undefined\n\nconst SizeContext = React.createContext<SizeType>(undefined)\n\nexport interface SizeContextProps {\n size?: SizeType\n children?: React.ReactNode\n}\n\nexport const SizeContextProvider: React.FC<SizeContextProps> = ({ children, size }) => (\n <SizeContext.Consumer>\n {(originSize) => (\n <SizeContext.Provider value={size || originSize}>{children}</SizeContext.Provider>\n )}\n </SizeContext.Consumer>\n)\n\nexport default SizeContext\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,yBAAyB,CAAA;AAKpD,OAAO,+BAA+B,CAAA;AAEtC,cAAc,yBAAyB,CAAA;AAEvC,cAAc,iCAAiC,CAAA;AAE/C,eAAe,cAAc,CAAA"}
|
|
@@ -19,7 +19,22 @@ Object.keys(_configProvider).forEach(function (key) {
|
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
21
|
require("antd/lib/config-provider/style");
|
|
22
|
+
var _context = require("antd/lib/config-provider/context");
|
|
23
|
+
Object.keys(_context).forEach(function (key) {
|
|
24
|
+
if (key === "default" || key === "__esModule") return;
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
|
+
if (key in exports && exports[key] === _context[key]) return;
|
|
27
|
+
Object.defineProperty(exports, key, {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function get() {
|
|
30
|
+
return _context[key];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
22
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
35
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
36
|
+
// import { DisabledContextProvider } from './DisabledContext'
|
|
37
|
+
// import type { SizeType } from './SizeContext'
|
|
38
|
+
// import SizeContext, { SizeContextProvider } from './SizeContext'
|
|
24
39
|
var _default = _configProvider["default"];
|
|
25
40
|
exports["default"] = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config-provider/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,8EAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config-provider/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,8EAAoD;AACpD,8DAA8D;AAC9D,gDAAgD;AAChD,mEAAmE;AAEnE,yCAAsC;AAEtC,0DAAuC;AAEvC,kEAA+C;AAE/C,kBAAe,yBAAc,CAAA","sourcesContent":["import ConfigProvider from 'antd/lib/config-provider'\n// import { DisabledContextProvider } from './DisabledContext'\n// import type { SizeType } from './SizeContext'\n// import SizeContext, { SizeContextProvider } from './SizeContext'\n\nimport 'antd/lib/config-provider/style'\n\nexport * from 'antd/lib/config-provider'\n\nexport * from 'antd/lib/config-provider/context'\n\nexport default ConfigProvider\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
|
+
declare type JSXComponent = ElementType;
|
|
3
|
+
export interface ComponentMapper<T extends JSXComponent> {
|
|
4
|
+
(target: T): JSXComponent;
|
|
5
|
+
}
|
|
6
|
+
export declare const mapReadonlyComponent: <C extends JSXComponent, T extends JSXComponent>(component: C) => (target: T) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<ComponentProps<T> & {
|
|
7
|
+
readonly?: boolean | undefined;
|
|
8
|
+
}> & import("react").RefAttributes<unknown>>;
|
|
9
|
+
export declare const connect: <T extends JSXComponent>(target: T, ...args: ComponentMapper<T>[]) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<ComponentProps<T>> & import("react").RefAttributes<unknown>>;
|
|
10
|
+
export declare const connectReadonlyComponent: <T extends JSXComponent, P extends JSXComponent>(target: T, preview: P) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<ComponentProps<T>> & import("react").RefAttributes<unknown>>;
|
|
11
|
+
export default connect;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,WAAW,EAAc,MAAM,OAAO,CAAA;AAE9E,aAAK,YAAY,GAAG,WAAW,CAAA;AAE/B,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,YAAY;IACrD,CAAC,MAAM,EAAE,CAAC,GAAG,YAAY,CAAA;CAC1B;AAED,eAAO,MAAM,oBAAoB;;4CAK5B,CAAA;AAEL,eAAO,MAAM,OAAO,8MAOnB,CAAA;AAED,eAAO,MAAM,wBAAwB,mNAGc,CAAA;AAEnD,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mapReadonlyComponent = exports["default"] = exports.connectReadonlyComponent = exports.connect = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
9
|
+
var t = {};
|
|
10
|
+
for (var p in s) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
14
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
};
|
|
18
|
+
var mapReadonlyComponent = function mapReadonlyComponent(component) {
|
|
19
|
+
return function (target) {
|
|
20
|
+
return (0, _react.forwardRef)(function (_a, ref) {
|
|
21
|
+
var readonly = _a.readonly,
|
|
22
|
+
props = __rest(_a, ["readonly"]);
|
|
23
|
+
return (0, _react.createElement)(readonly ? component : target, Object.assign(Object.assign({}, props), {
|
|
24
|
+
ref: ref
|
|
25
|
+
}));
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.mapReadonlyComponent = mapReadonlyComponent;
|
|
30
|
+
var connect = function connect(target) {
|
|
31
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
32
|
+
args[_key - 1] = arguments[_key];
|
|
33
|
+
}
|
|
34
|
+
var Target = args.reduce(function (acc, mapper) {
|
|
35
|
+
acc = mapper(target);
|
|
36
|
+
return acc;
|
|
37
|
+
}, target);
|
|
38
|
+
return (0, _react.forwardRef)(function (props, ref) {
|
|
39
|
+
return (0, _react.createElement)(Target, Object.assign(Object.assign({}, props), {
|
|
40
|
+
ref: ref
|
|
41
|
+
}));
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
exports.connect = connect;
|
|
45
|
+
var connectReadonlyComponent = function connectReadonlyComponent(target, preview) {
|
|
46
|
+
return connect(target, mapReadonlyComponent(preview));
|
|
47
|
+
};
|
|
48
|
+
exports.connectReadonlyComponent = connectReadonlyComponent;
|
|
49
|
+
var _default = connect;
|
|
50
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAA8E;AAQvE,MAAM,oBAAoB,GAC/B,CAAiD,SAAY,EAAE,EAAE,CACjE,CAAC,MAAS,EAAE,EAAE,CACZ,IAAA,kBAAU,EAAC,CAAC,EAAkE,EAAE,GAAG,EAAE,EAAE;QAA3E,EAAE,QAAQ,OAAwD,EAAnD,KAAK,cAApB,YAAsB,CAAF;IAC9B,OAAA,IAAA,qBAAa,EAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,kCAAO,KAAK,KAAE,GAAG,IAAG,CAAA;CAAA,CAChE,CAAA;AALQ,QAAA,oBAAoB,wBAK5B;AAEE,MAAM,OAAO,GAAG,CAAyB,MAAS,EAAE,GAAG,IAA0B,EAAE,EAAE;IAC1F,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAI,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;QAC5C,GAAG,GAAG,MAAM,CAAC,MAAM,CAAM,CAAA;QACzB,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,MAAM,CAAC,CAAA;IAEV,OAAO,IAAA,kBAAU,EAAC,CAAC,KAAwB,EAAE,GAAG,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,MAAM,kCAAO,KAAK,KAAE,GAAG,IAAG,CAAC,CAAA;AAChG,CAAC,CAAA;AAPY,QAAA,OAAO,WAOnB;AAEM,MAAM,wBAAwB,GAAG,CACtC,MAAS,EACT,OAAU,EACV,EAAE,CAAC,IAAA,eAAO,EAAC,MAAM,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC,CAAA;AAHtC,QAAA,wBAAwB,4BAGc;AAEnD,kBAAe,eAAO,CAAA","sourcesContent":["import { ComponentProps, createElement, ElementType, forwardRef } from 'react'\n\ntype JSXComponent = ElementType\n\nexport interface ComponentMapper<T extends JSXComponent> {\n (target: T): JSXComponent\n}\n\nexport const mapReadonlyComponent =\n <C extends JSXComponent, T extends JSXComponent>(component: C) =>\n (target: T) =>\n forwardRef(({ readonly, ...props }: ComponentProps<T> & { readonly?: boolean }, ref) =>\n createElement(readonly ? component : target, { ...props, ref })\n )\n\nexport const connect = <T extends JSXComponent>(target: T, ...args: ComponentMapper<T>[]) => {\n const Target = args.reduce<T>((acc, mapper) => {\n acc = mapper(target) as T\n return acc\n }, target)\n\n return forwardRef((props: ComponentProps<T>, ref) => createElement(Target, { ...props, ref }))\n}\n\nexport const connectReadonlyComponent = <T extends JSXComponent, P extends JSXComponent>(\n target: T,\n preview: P\n) => connect(target, mapReadonlyComponent(preview))\n\nexport default connect\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { DatePickerProps as AntdDatePickerProps, DatePickerDecorator } from 'antd/lib/date-picker/interface';
|
|
2
2
|
import 'antd/lib/date-picker/style';
|
|
3
3
|
export * from 'antd/lib/date-picker';
|
|
4
|
+
export * from 'antd/lib/date-picker/interface';
|
|
5
|
+
export declare type DatePickerProps = AntdDatePickerProps & {
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const DatePicker: DatePickerDecorator;
|
|
4
9
|
export default DatePicker;
|
|
5
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/date-picker/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/date-picker/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,IAAI,mBAAmB,EACtC,mBAAmB,EACpB,MAAM,+BAA+B,CAAA;AAGtC,OAAO,2BAA2B,CAAA;AAElC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,+BAA+B,CAAA;AAE7C,oBAAY,eAAe,GAAG,mBAAmB,GAAG;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,UAAU,qBAGY,CAAA;AAUnC,eAAe,UAAU,CAAA"}
|
package/lib/date-picker/index.js
CHANGED
|
@@ -4,8 +4,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
var _exportNames = {
|
|
8
|
-
|
|
7
|
+
var _exportNames = {
|
|
8
|
+
DatePicker: true
|
|
9
|
+
};
|
|
10
|
+
exports["default"] = exports.DatePicker = void 0;
|
|
9
11
|
var _datePicker = _interopRequireWildcard(require("antd/lib/date-picker"));
|
|
10
12
|
Object.keys(_datePicker).forEach(function (key) {
|
|
11
13
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -18,8 +20,32 @@ Object.keys(_datePicker).forEach(function (key) {
|
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
});
|
|
23
|
+
var _connect = require("../connect");
|
|
24
|
+
var _previewText = require("../preview-text");
|
|
21
25
|
require("antd/lib/date-picker/style");
|
|
26
|
+
var _interface = require("antd/lib/date-picker/interface");
|
|
27
|
+
Object.keys(_interface).forEach(function (key) {
|
|
28
|
+
if (key === "default" || key === "__esModule") return;
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
30
|
+
if (key in exports && exports[key] === _interface[key]) return;
|
|
31
|
+
Object.defineProperty(exports, key, {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function get() {
|
|
34
|
+
return _interface[key];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
22
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
39
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
-
var
|
|
40
|
+
var DatePicker = (0, _connect.connectReadonlyComponent)(_datePicker["default"], _previewText.PreviewText.DatePicker);
|
|
41
|
+
exports.DatePicker = DatePicker;
|
|
42
|
+
var MonthPicker = _datePicker["default"].MonthPicker,
|
|
43
|
+
WeekPicker = _datePicker["default"].WeekPicker,
|
|
44
|
+
RangePicker = _datePicker["default"].RangePicker;
|
|
45
|
+
Object.assign(DatePicker, {
|
|
46
|
+
MonthPicker: (0, _connect.connectReadonlyComponent)(MonthPicker, _previewText.PreviewText.MonthPicker),
|
|
47
|
+
RangePicker: (0, _connect.connectReadonlyComponent)(RangePicker, _previewText.PreviewText.DatePicker),
|
|
48
|
+
WeekPicker: (0, _connect.connectReadonlyComponent)(WeekPicker, _previewText.PreviewText.WeekPicker)
|
|
49
|
+
});
|
|
50
|
+
var _default = DatePicker;
|
|
25
51
|
exports["default"] = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/date-picker/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/date-picker/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,sEAAgD;AAKhD,wCAAqD;AACrD,kDAA6C;AAC7C,qCAAkC;AAElC,sDAAmC;AAEnC,gEAA6C;AAMhC,QAAA,UAAU,GAAG,IAAA,kCAAwB,EAChD,qBAAc,EACd,0BAAW,CAAC,UAAU,CACW,CAAA;AAEnC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,qBAAc,CAAA;AAE/D,MAAM,CAAC,MAAM,CAAC,kBAAU,EAAE;IACxB,WAAW,EAAE,IAAA,kCAAwB,EAAC,WAAW,EAAE,0BAAW,CAAC,WAAW,CAAC;IAC3E,WAAW,EAAE,IAAA,kCAAwB,EAAC,WAAW,EAAE,0BAAW,CAAC,UAAU,CAAC;IAC1E,UAAU,EAAE,IAAA,kCAAwB,EAAC,UAAU,EAAE,0BAAW,CAAC,UAAU,CAAC;CACzE,CAAC,CAAA;AAEF,kBAAe,kBAAU,CAAA","sourcesContent":["import AntdDatePicker from 'antd/lib/date-picker'\nimport type {\n DatePickerProps as AntdDatePickerProps,\n DatePickerDecorator,\n} from 'antd/lib/date-picker/interface'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\nimport 'antd/lib/date-picker/style'\n\nexport * from 'antd/lib/date-picker'\n\nexport * from 'antd/lib/date-picker/interface'\n\nexport type DatePickerProps = AntdDatePickerProps & {\n readonly?: boolean\n}\n\nexport const DatePicker = connectReadonlyComponent(\n AntdDatePicker,\n PreviewText.DatePicker\n) as unknown as DatePickerDecorator\n\nconst { MonthPicker, WeekPicker, RangePicker } = AntdDatePicker\n\nObject.assign(DatePicker, {\n MonthPicker: connectReadonlyComponent(MonthPicker, PreviewText.MonthPicker),\n RangePicker: connectReadonlyComponent(RangePicker, PreviewText.DatePicker),\n WeekPicker: connectReadonlyComponent(WeekPicker, PreviewText.WeekPicker),\n})\n\nexport default DatePicker\n"]}
|
package/lib/ellipsis/index.js
CHANGED
|
@@ -126,7 +126,7 @@ var _default = function _default(props) {
|
|
|
126
126
|
return _popover ? popoverNode : tooltipNode;
|
|
127
127
|
};
|
|
128
128
|
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement("div", {
|
|
129
|
-
className: "
|
|
129
|
+
className: "tntd-ellipsis",
|
|
130
130
|
style: Object.assign(Object.assign({}, style), {
|
|
131
131
|
maxWidth: widthLimit
|
|
132
132
|
})
|