@tendaui/react 1.1.1 → 1.1.3
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/_chunks/{dep-D7LanWes.js → dep-4LYjB3c6.js} +3 -18
- package/es/_chunks/dep-4LYjB3c6.js.map +1 -0
- package/es/_chunks/dep-5U9UjDaf.js +345 -0
- package/es/_chunks/dep-5U9UjDaf.js.map +1 -0
- package/es/_chunks/{dep-B7HmDtze.js → dep-B4_O1Vgv.js} +2 -2
- package/es/_chunks/{dep-B7HmDtze.js.map → dep-B4_O1Vgv.js.map} +1 -1
- package/es/_chunks/dep-BP0-apUT.js.map +1 -1
- package/es/_chunks/dep-BRbJGDI9.js +7 -0
- package/es/_chunks/dep-BRbJGDI9.js.map +1 -0
- package/es/_chunks/{dep-EcrDKDlu.js → dep-BYlJzn45.js} +10 -9
- package/es/_chunks/dep-BYlJzn45.js.map +1 -0
- package/es/_chunks/dep-BbeHB7S3.js +116 -0
- package/es/_chunks/dep-BbeHB7S3.js.map +1 -0
- package/es/_chunks/{dep-DB5wmwh1.js → dep-Bjfn7Zv_.js} +2 -2
- package/es/_chunks/{dep-DB5wmwh1.js.map → dep-Bjfn7Zv_.js.map} +1 -1
- package/es/_chunks/{dep-C36au4Ip.js → dep-BuIAffJt.js} +2 -2
- package/es/_chunks/{dep-C36au4Ip.js.map → dep-BuIAffJt.js.map} +1 -1
- package/es/_chunks/{dep-bWaVq_y3.js → dep-ByzdZjUR.js} +2 -2
- package/es/_chunks/dep-ByzdZjUR.js.map +1 -0
- package/es/_chunks/dep-CD_4-1Xb.js +103 -0
- package/es/_chunks/dep-CD_4-1Xb.js.map +1 -0
- package/es/_chunks/{dep-Dk2xX8lh.js → dep-CJCt0IS0.js} +5 -212
- package/es/_chunks/dep-CJCt0IS0.js.map +1 -0
- package/es/_chunks/dep-CMPsNAXF.js +52 -0
- package/es/_chunks/dep-CMPsNAXF.js.map +1 -0
- package/es/_chunks/dep-COy5g3FT.js +512 -0
- package/es/_chunks/dep-COy5g3FT.js.map +1 -0
- package/es/_chunks/{dep-CoIiHOgo.js → dep-CRURwzDj.js} +3 -3
- package/es/_chunks/{dep-CoIiHOgo.js.map → dep-CRURwzDj.js.map} +1 -1
- package/es/_chunks/dep-C_wPqvpm.js +36 -0
- package/es/_chunks/dep-C_wPqvpm.js.map +1 -0
- package/es/_chunks/dep-Ccktr_jk.js +33 -0
- package/es/_chunks/dep-Ccktr_jk.js.map +1 -0
- package/es/_chunks/dep-Chz4ZJCb.js +20 -0
- package/es/_chunks/dep-Chz4ZJCb.js.map +1 -0
- package/es/_chunks/dep-CkmtEv0Y.js +55 -0
- package/es/_chunks/dep-CkmtEv0Y.js.map +1 -0
- package/es/_chunks/dep-DJmE940f.js +764 -0
- package/es/_chunks/dep-DJmE940f.js.map +1 -0
- package/es/_chunks/{dep-DHWwZ2Nj.js → dep-DQ6kXoi8.js} +2 -2
- package/es/_chunks/{dep-DHWwZ2Nj.js.map → dep-DQ6kXoi8.js.map} +1 -1
- package/es/_chunks/{dep-0QH2Ee4R.js → dep-DRwijJcv.js} +5 -5
- package/es/_chunks/dep-DRwijJcv.js.map +1 -0
- package/es/_chunks/dep-DTlQ2dCA.js +46 -0
- package/es/_chunks/dep-DTlQ2dCA.js.map +1 -0
- package/es/_chunks/dep-DURB9x8g.js +170 -0
- package/es/_chunks/dep-DURB9x8g.js.map +1 -0
- package/es/_chunks/{dep-DZ_0EvBk.js → dep-DX65P8M9.js} +4 -45
- package/es/_chunks/dep-DX65P8M9.js.map +1 -0
- package/es/_chunks/{dep-BH5n5r1M.js → dep-DbVHGoUC.js} +2 -2
- package/es/_chunks/dep-DbVHGoUC.js.map +1 -0
- package/es/_chunks/dep-Dlppf0JU.js +214 -0
- package/es/_chunks/dep-Dlppf0JU.js.map +1 -0
- package/es/_chunks/dep-Dr5wkz0z.js +266 -0
- package/es/_chunks/dep-Dr5wkz0z.js.map +1 -0
- package/es/_chunks/dep-DwWrhxkd.js.map +1 -1
- package/es/_chunks/dep-Tshfumgl.js +31 -0
- package/es/_chunks/dep-Tshfumgl.js.map +1 -0
- package/es/_chunks/{dep-u1x3x6MJ.js → dep-gy8uvBaS.js} +2 -2
- package/es/_chunks/{dep-u1x3x6MJ.js.map → dep-gy8uvBaS.js.map} +1 -1
- package/es/_chunks/dep-oUgTcXgm.js +11 -0
- package/es/_chunks/dep-oUgTcXgm.js.map +1 -0
- package/es/_chunks/dep-zOZQ0R9g.js +1181 -0
- package/es/_chunks/dep-zOZQ0R9g.js.map +1 -0
- package/es/alert/Alert.d.ts +7 -0
- package/es/alert/Alert.js +4 -3
- package/es/alert/Alert.js.map +1 -1
- package/es/alert/defaultProps.d.ts +2 -0
- package/es/alert/index.d.ts +5 -0
- package/es/alert/index.js +4 -3
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/css.d.ts +1 -0
- package/es/alert/style/index.d.ts +1 -0
- package/es/alert/type.d.ts +45 -0
- package/es/badge/Badge.d.ts +7 -0
- package/es/badge/Badge.js +3 -2
- package/es/badge/Badge.js.map +1 -1
- package/es/badge/defaultProps.d.ts +2 -0
- package/es/badge/index.d.ts +5 -0
- package/es/badge/index.js +3 -2
- package/es/badge/index.js.map +1 -1
- package/es/badge/style/css.d.ts +1 -0
- package/es/badge/style/index.d.ts +1 -0
- package/es/badge/type.d.ts +50 -0
- package/es/button/Button.d.ts +6 -0
- package/es/button/Button.js +7 -5
- package/es/button/Button.js.map +1 -1
- package/es/button/_example/base.js +171 -0
- package/es/button/_example/base.js.map +1 -0
- package/es/button/_example/icon.js +181 -0
- package/es/button/_example/icon.js.map +1 -0
- package/es/button/defaultProps.d.ts +2 -0
- package/es/button/index.d.ts +5 -0
- package/es/button/index.js +7 -5
- package/es/button/index.js.map +1 -1
- package/es/button/style/css.d.ts +1 -0
- package/es/button/style/index.d.ts +1 -0
- package/es/button/type.d.ts +81 -0
- package/es/checkbox/Checkbox.d.ts +10 -0
- package/es/checkbox/Checkbox.js +5 -4
- package/es/checkbox/Checkbox.js.map +1 -1
- package/es/checkbox/CheckboxGroup.d.ts +14 -0
- package/es/checkbox/CheckboxGroup.js +5 -4
- package/es/checkbox/CheckboxGroup.js.map +1 -1
- package/es/checkbox/defaultProps.d.ts +3 -0
- package/es/checkbox/index.d.ts +11 -0
- package/es/checkbox/index.js +5 -4
- package/es/checkbox/index.js.map +1 -1
- package/es/checkbox/style/css.d.ts +1 -0
- package/es/checkbox/style/index.d.ts +1 -0
- package/es/checkbox/type.d.ts +115 -0
- package/es/color-picker/ColorPickPanel.d.ts +4 -0
- package/es/color-picker/ColorPickPanel.js +44 -0
- package/es/color-picker/ColorPickPanel.js.map +1 -0
- package/es/color-picker/ColorPicker.d.ts +4 -0
- package/es/color-picker/ColorPicker.js +118 -0
- package/es/color-picker/ColorPicker.js.map +1 -0
- package/es/color-picker/components/panel/alpha.d.ts +4 -0
- package/es/color-picker/components/panel/alpha.js +44 -0
- package/es/color-picker/components/panel/alpha.js.map +1 -0
- package/es/color-picker/components/panel/format/index.d.ts +10 -0
- package/es/color-picker/components/panel/format/index.js +128 -0
- package/es/color-picker/components/panel/format/index.js.map +1 -0
- package/es/color-picker/components/panel/format/inputs.d.ts +4 -0
- package/es/color-picker/components/panel/format/inputs.js +147 -0
- package/es/color-picker/components/panel/format/inputs.js.map +1 -0
- package/es/color-picker/components/panel/header.d.ts +13 -0
- package/es/color-picker/components/panel/header.js +60 -0
- package/es/color-picker/components/panel/header.js.map +1 -0
- package/es/color-picker/components/panel/hue.d.ts +4 -0
- package/es/color-picker/components/panel/hue.js +33 -0
- package/es/color-picker/components/panel/hue.js.map +1 -0
- package/es/color-picker/components/panel/index.d.ts +4 -0
- package/es/color-picker/components/panel/index.js +32 -0
- package/es/color-picker/components/panel/index.js.map +1 -0
- package/es/color-picker/components/panel/saturation.d.ts +4 -0
- package/es/color-picker/components/panel/saturation.js +101 -0
- package/es/color-picker/components/panel/saturation.js.map +1 -0
- package/es/color-picker/components/panel/slider.d.ts +11 -0
- package/es/color-picker/components/panel/slider.js +121 -0
- package/es/color-picker/components/panel/slider.js.map +1 -0
- package/es/color-picker/components/panel/swatches.d.ts +11 -0
- package/es/color-picker/components/panel/swatches.js +100 -0
- package/es/color-picker/components/panel/swatches.js.map +1 -0
- package/es/color-picker/components/trigger.d.ts +9 -0
- package/es/color-picker/components/trigger.js +73 -0
- package/es/color-picker/components/trigger.js.map +1 -0
- package/es/color-picker/defaultProps.d.ts +2 -0
- package/es/color-picker/helpers.d.ts +5 -0
- package/es/color-picker/hooks/useClassNames.d.ts +2 -0
- package/es/color-picker/hooks/useStyles.d.ts +14 -0
- package/es/color-picker/index.d.ts +6 -0
- package/es/color-picker/index.js +62 -0
- package/es/color-picker/index.js.map +1 -0
- package/es/color-picker/style/index.css +597 -0
- package/es/color-picker/style/index.d.ts +1 -0
- package/es/color-picker/style/index.js +2 -0
- package/es/color-picker/style/index.js.map +1 -0
- package/es/color-picker/type.d.ts +135 -0
- package/es/color-picker/utils/color-picker/cmyk.d.ts +27 -0
- package/es/color-picker/utils/color-picker/color.d.ts +144 -0
- package/es/color-picker/utils/color-picker/constants.d.ts +30 -0
- package/es/color-picker/utils/color-picker/draggable.d.ts +23 -0
- package/es/color-picker/utils/color-picker/format.d.ts +64 -0
- package/es/color-picker/utils/color-picker/gradient.d.ts +22 -0
- package/es/color-picker/utils/color-picker/index.d.ts +7 -0
- package/es/color-picker/utils/color-picker/index.js +147 -0
- package/es/color-picker/utils/color-picker/index.js.map +1 -0
- package/es/color-picker/utils/color-picker/types.d.ts +28 -0
- package/es/common/Check.d.ts +22 -0
- package/es/common/Check.js +4 -3
- package/es/common/Check.js.map +1 -1
- package/es/common/FakeArrow.d.ts +9 -0
- package/es/common/FakeArrow.js +3 -2
- package/es/common/FakeArrow.js.map +1 -1
- package/es/common/PluginContainer.d.ts +9 -0
- package/es/common/PluginContainer.js +2 -1
- package/es/common/PluginContainer.js.map +1 -1
- package/es/common/Portal.d.ts +16 -0
- package/es/common/Portal.js +6 -3
- package/es/common/Portal.js.map +1 -1
- package/es/common/observe.d.ts +1 -0
- package/es/common.d.ts +81 -0
- package/es/config-provider/ConfigContext.d.ts +13 -0
- package/es/config-provider/ConfigContext.js +5 -16
- package/es/config-provider/ConfigContext.js.map +1 -1
- package/es/config-provider/ConfigProvider.d.ts +25 -0
- package/es/config-provider/ConfigProvider.js +2 -1
- package/es/config-provider/ConfigProvider.js.map +1 -1
- package/es/config-provider/index.d.ts +7 -0
- package/es/config-provider/index.js +2 -1
- package/es/config-provider/index.js.map +1 -1
- package/es/config-provider/type.d.ts +1029 -0
- package/es/dialog/Dialog.d.ts +8 -0
- package/es/dialog/Dialog.js +12 -149
- package/es/dialog/Dialog.js.map +1 -1
- package/es/dialog/DialogCard.d.ts +8 -0
- package/es/dialog/DialogCard.js +9 -7
- package/es/dialog/DialogCard.js.map +1 -1
- package/es/dialog/defaultProps.d.ts +6 -0
- package/es/dialog/hooks/useDialogDrag.d.ts +7 -0
- package/es/dialog/hooks/useDialogEsc.d.ts +3 -0
- package/es/dialog/hooks/useDialogPosition.d.ts +2 -0
- package/es/dialog/hooks/useLockStyle.d.ts +2 -0
- package/es/dialog/index.d.ts +8 -0
- package/es/dialog/index.js +12 -8
- package/es/dialog/index.js.map +1 -1
- package/es/dialog/plugin.d.ts +6 -0
- package/es/dialog/plugin.js +15 -10
- package/es/dialog/plugin.js.map +1 -1
- package/es/dialog/style/css.d.ts +1 -0
- package/es/dialog/style/index.d.ts +1 -0
- package/es/dialog/type.d.ts +227 -0
- package/es/dialog/utils.d.ts +1 -0
- package/es/drawer/Drawer.d.ts +11 -0
- package/es/drawer/Drawer.js +458 -0
- package/es/drawer/Drawer.js.map +1 -0
- package/es/drawer/defaultProps.d.ts +2 -0
- package/es/drawer/hooks/useDrag.d.ts +8 -0
- package/es/drawer/hooks/useLockStyle.d.ts +1 -0
- package/es/drawer/index.d.ts +4 -0
- package/es/drawer/index.js +39 -0
- package/es/drawer/index.js.map +1 -0
- package/es/drawer/style/css.d.ts +1 -0
- package/es/drawer/style/css.js +1 -0
- package/es/drawer/style/index.css +231 -0
- package/es/drawer/style/index.d.ts +1 -0
- package/es/drawer/style/index.js +2 -0
- package/es/drawer/style/index.js.map +1 -0
- package/es/drawer/type.d.ts +199 -0
- package/es/drawer/utils/index.d.ts +23 -0
- package/es/drawer/utils/index.js +46 -0
- package/es/drawer/utils/index.js.map +1 -0
- package/es/fireworks/Fireworks.d.ts +7 -0
- package/es/fireworks/Fireworks.js +139 -0
- package/es/fireworks/Fireworks.js.map +1 -0
- package/es/fireworks/index.d.ts +5 -0
- package/es/fireworks/index.js +16 -0
- package/es/fireworks/index.js.map +1 -0
- package/es/fireworks/style/css.d.ts +1 -0
- package/es/fireworks/style/css.js +2 -0
- package/es/fireworks/style/index.css +121 -0
- package/es/fireworks/style/index.d.ts +1 -0
- package/es/fireworks/style/index.js +2 -0
- package/es/fireworks/style/index.js.map +1 -0
- package/es/fireworks/type.d.ts +69 -0
- package/es/form/Form.d.ts +8 -0
- package/es/form/Form.js +14 -10
- package/es/form/Form.js.map +1 -1
- package/es/form/FormContext.d.ts +59 -0
- package/es/form/FormItem.d.ts +23 -0
- package/es/form/FormItem.js +14 -10
- package/es/form/FormItem.js.map +1 -1
- package/es/form/FormList.d.ts +4 -0
- package/es/form/FormList.js +2 -1
- package/es/form/FormList.js.map +1 -1
- package/es/form/const.d.ts +6 -0
- package/es/form/defaultProps.d.ts +3 -0
- package/es/form/easing.d.ts +2 -0
- package/es/form/formModel.d.ts +37 -0
- package/es/form/hooks/interface.d.ts +16 -0
- package/es/form/hooks/useForm.d.ts +3 -0
- package/es/form/hooks/useFormItemInitialData.d.ts +9 -0
- package/es/form/hooks/useFormItemStyle.d.ts +10 -0
- package/es/form/hooks/useFormItemStyle.js +4 -3
- package/es/form/hooks/useFormItemStyle.js.map +1 -1
- package/es/form/hooks/useInstance.d.ts +16 -0
- package/es/form/hooks/useInstance.js +5 -4
- package/es/form/hooks/useInstance.js.map +1 -1
- package/es/form/hooks/useWatch.d.ts +3 -0
- package/es/form/index.d.ts +7 -0
- package/es/form/index.js +14 -10
- package/es/form/index.js.map +1 -1
- package/es/form/scroll.d.ts +39 -0
- package/es/form/style/css.d.ts +1 -0
- package/es/form/style/index.d.ts +1 -0
- package/es/form/type.d.ts +486 -0
- package/es/form/utils/index.d.ts +5 -0
- package/es/global-config/default-config.d.ts +84 -0
- package/es/global-config/locale/ar_KW.d.ts +239 -0
- package/es/global-config/locale/en_US.d.ts +263 -0
- package/es/global-config/locale/it_IT.d.ts +263 -0
- package/es/global-config/locale/ja_JP.d.ts +263 -0
- package/es/global-config/locale/ko_KR.d.ts +263 -0
- package/es/global-config/locale/ru_RU.d.ts +263 -0
- package/es/global-config/locale/zh_CN.d.ts +263 -0
- package/es/global-config/locale/zh_TW.d.ts +263 -0
- package/es/global-config/mobile/default-config.d.ts +7 -0
- package/es/global-config/mobile/locale/ar_KW.d.ts +98 -0
- package/es/global-config/mobile/locale/en_US.d.ts +99 -0
- package/es/global-config/mobile/locale/it_IT.d.ts +99 -0
- package/es/global-config/mobile/locale/ja_JP.d.ts +99 -0
- package/es/global-config/mobile/locale/ko_KR.d.ts +99 -0
- package/es/global-config/mobile/locale/ru_RU.d.ts +99 -0
- package/es/global-config/mobile/locale/zh_CN.d.ts +99 -0
- package/es/global-config/mobile/locale/zh_TW.d.ts +99 -0
- package/es/global-config/t.d.ts +25 -0
- package/es/hooks/useAttach.d.ts +10 -0
- package/es/hooks/useCommonClassName.d.ts +54 -0
- package/es/hooks/useConfig.d.ts +2 -0
- package/es/hooks/useControlled.d.ts +9 -0
- package/es/hooks/useDeepEffect.d.ts +7 -0
- package/es/hooks/useDefaultProps.d.ts +1 -0
- package/es/hooks/useDomCallback.d.ts +1 -0
- package/es/hooks/useDomRefCallback.d.ts +1 -0
- package/es/hooks/useDragSorter.d.ts +28 -0
- package/es/hooks/useEventCallback.d.ts +9 -0
- package/es/hooks/useGlobalConfig.d.ts +1 -0
- package/es/hooks/useGlobalIcon.d.ts +5 -0
- package/es/hooks/useLastest.d.ts +2 -0
- package/es/hooks/useLayoutEffect.d.ts +3 -0
- package/es/hooks/useMouseEvent.d.ts +25 -0
- package/es/hooks/useMutationObserver.d.ts +4 -0
- package/es/hooks/usePopper.d.ts +19 -0
- package/es/hooks/useResizeObserve.d.ts +1 -0
- package/es/hooks/useRipple.d.ts +0 -0
- package/es/hooks/useSetState.d.ts +7 -0
- package/es/hooks/useVirtualScroll.d.ts +30 -0
- package/es/hooks/useWindowSize.d.ts +6 -0
- package/es/index.d.ts +25 -0
- package/es/index.js +68 -14
- package/es/index.js.map +1 -1
- package/es/input/Input.d.ts +16 -0
- package/es/input/Input.js +5 -5
- package/es/input/Input.js.map +1 -1
- package/es/input/InputGroup.d.ts +10 -0
- package/es/input/defaultProps.d.ts +17 -0
- package/es/input/index.d.ts +6 -0
- package/es/input/index.js +5 -3
- package/es/input/index.js.map +1 -1
- package/es/input/style/css.d.ts +1 -0
- package/es/input/style/index.d.ts +1 -0
- package/es/input/type.d.ts +237 -0
- package/es/input-number/InputNumber.d.ts +17 -0
- package/es/input-number/InputNumber.js +139 -0
- package/es/input-number/InputNumber.js.map +1 -0
- package/es/input-number/defaultProps.d.ts +2 -0
- package/es/input-number/index.d.ts +5 -0
- package/es/input-number/index.js +43 -0
- package/es/input-number/index.js.map +1 -0
- package/es/input-number/style/css.d.ts +1 -0
- package/es/input-number/style/css.js +1 -0
- package/es/input-number/style/index.css +331 -0
- package/es/input-number/style/index.d.ts +1 -0
- package/es/input-number/style/index.js +2 -0
- package/es/input-number/style/index.js.map +1 -0
- package/es/input-number/type.d.ts +156 -0
- package/es/input-number/useInputNumber.d.ts +51 -0
- package/es/input-number/useInputNumber.js +809 -0
- package/es/input-number/useInputNumber.js.map +1 -0
- package/es/ip-input/IPInput.d.ts +5 -0
- package/es/ip-input/IPInput.js +16 -0
- package/es/ip-input/IPInput.js.map +1 -0
- package/es/ip-input/defaultProps.d.ts +2 -0
- package/es/ip-input/index.d.ts +3 -0
- package/es/ip-input/index.js +16 -0
- package/es/ip-input/index.js.map +1 -0
- package/es/ip-input/style/index.css +323 -0
- package/es/ip-input/style/index.d.ts +1 -0
- package/es/ip-input/style/index.js +2 -0
- package/es/ip-input/style/index.js.map +1 -0
- package/es/ip-input/type.d.ts +113 -0
- package/es/ip-input/utils.d.ts +35 -0
- package/es/layout/Aside.d.ts +11 -0
- package/es/layout/Aside.js +41 -0
- package/es/layout/Aside.js.map +1 -0
- package/es/layout/Layout.d.ts +26 -0
- package/es/layout/Layout.js +106 -0
- package/es/layout/Layout.js.map +1 -0
- package/es/layout/defaultProps.d.ts +5 -0
- package/es/layout/index.d.ts +10 -0
- package/es/layout/index.js +19 -0
- package/es/layout/index.js.map +1 -0
- package/es/layout/style/index.css +56 -0
- package/es/layout/style/index.d.ts +1 -0
- package/es/layout/style/index.js +2 -0
- package/es/layout/style/index.js.map +1 -0
- package/es/layout/type.d.ts +38 -0
- package/es/list/List.d.ts +17 -0
- package/es/list/List.js +217 -0
- package/es/list/List.js.map +1 -0
- package/es/list/ListItem.d.ts +15 -0
- package/es/list/ListItem.js +31 -0
- package/es/list/ListItem.js.map +1 -0
- package/es/list/ListItemMeta.d.ts +10 -0
- package/es/list/ListItemMeta.js +45 -0
- package/es/list/ListItemMeta.js.map +1 -0
- package/es/list/defaultProps.d.ts +7 -0
- package/es/list/hooks/useListVirtualScroll.d.ts +24 -0
- package/es/list/index.d.ts +10 -0
- package/es/list/index.js +40 -0
- package/es/list/index.js.map +1 -0
- package/es/list/style/css.d.ts +1 -0
- package/es/list/style/css.js +1 -0
- package/es/list/style/index.css +172 -0
- package/es/list/style/index.d.ts +1 -0
- package/es/list/style/index.js +2 -0
- package/es/list/style/index.js.map +1 -0
- package/es/list/type.d.ts +92 -0
- package/es/loading/Gradient.d.ts +6 -0
- package/es/loading/Gradient.js +4 -3
- package/es/loading/Gradient.js.map +1 -1
- package/es/loading/Loading.d.ts +7 -0
- package/es/loading/Loading.js +7 -5
- package/es/loading/Loading.js.map +1 -1
- package/es/loading/circleAdapter.d.ts +1 -0
- package/es/loading/defaultProps.d.ts +2 -0
- package/es/loading/index.d.ts +5 -0
- package/es/loading/index.js +7 -5
- package/es/loading/index.js.map +1 -1
- package/es/loading/style/css.d.ts +1 -0
- package/es/loading/style/index.d.ts +1 -0
- package/es/loading/type.d.ts +68 -0
- package/es/loading/utils/setStyle.d.ts +7 -0
- package/es/locale/LocalReceiver.d.ts +6 -0
- package/es/locale/ar_KW.d.ts +3 -0
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/it_IT.d.ts +3 -0
- package/es/locale/ja_JP.d.ts +3 -0
- package/es/locale/ko_KR.d.ts +3 -0
- package/es/locale/ru_RU.d.ts +3 -0
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_TW.d.ts +3 -0
- package/es/myform/index.d.ts +0 -0
- package/es/notification/Notify.d.ts +11 -0
- package/es/notification/NotifyContainer.d.ts +13 -0
- package/es/notification/NotifyContainer.js +3 -2
- package/es/notification/NotifyContainer.js.map +1 -1
- package/es/notification/NotifyContext.d.ts +23 -0
- package/es/notification/NotifyContext.js +3 -2
- package/es/notification/NotifyContext.js.map +1 -1
- package/es/notification/NotifyItem.d.ts +4 -0
- package/es/notification/NotifyItem.js +3 -2
- package/es/notification/NotifyItem.js.map +1 -1
- package/es/notification/index.d.ts +3 -0
- package/es/notification/index.js +3 -2
- package/es/notification/index.js.map +1 -1
- package/es/notification/style/css.d.ts +1 -0
- package/es/notification/style/index.d.ts +1 -0
- package/es/notification/type.d.ts +22 -0
- package/es/popup/Popup.d.ts +21 -0
- package/es/popup/Popup.js +36 -100
- package/es/popup/Popup.js.map +1 -1
- package/es/popup/defaultProps.d.ts +5 -0
- package/es/popup/hooks/useTrigger.d.ts +20 -0
- package/es/popup/index.d.ts +5 -0
- package/es/popup/index.js +8 -4
- package/es/popup/index.js.map +1 -1
- package/es/popup/style/css.d.ts +1 -0
- package/es/popup/style/index.d.ts +1 -0
- package/es/popup/type.d.ts +109 -0
- package/es/portal/Portal.d.ts +16 -0
- package/es/portal/Portal.js +2 -1
- package/es/portal/Portal.js.map +1 -1
- package/es/portal/index.d.ts +1 -0
- package/es/portal/index.js +2 -1
- package/es/portal/index.js.map +1 -1
- package/es/radio/Radio.d.ts +8 -0
- package/es/radio/Radio.js +22 -0
- package/es/radio/Radio.js.map +1 -0
- package/es/radio/RadioGroup.d.ts +14 -0
- package/es/radio/RadioGroup.js +22 -0
- package/es/radio/RadioGroup.js.map +1 -0
- package/es/radio/defaultProps.d.ts +3 -0
- package/es/radio/index.d.ts +10 -0
- package/es/radio/index.js +28 -0
- package/es/radio/index.js.map +1 -0
- package/es/radio/style/css.d.ts +0 -0
- package/es/radio/style/css.js +0 -0
- package/es/radio/style/index.css +333 -0
- package/es/radio/style/index.d.ts +1 -0
- package/es/radio/style/index.js +2 -0
- package/es/radio/style/index.js.map +1 -0
- package/es/radio/type.d.ts +117 -0
- package/es/radio/useKeyboard.d.ts +4 -0
- package/es/select/Option.d.ts +24 -0
- package/es/select/Option.js +3 -2
- package/es/select/Option.js.map +1 -1
- package/es/select/OptionGroup.d.ts +7 -0
- package/es/select/OptionGroup.js +4 -3
- package/es/select/OptionGroup.js.map +1 -1
- package/es/select/PopupContent.d.ts +24 -0
- package/es/select/PopupContent.js +6 -4
- package/es/select/PopupContent.js.map +1 -1
- package/es/select/Select.d.ts +13 -0
- package/es/select/Select.js +21 -12
- package/es/select/Select.js.map +1 -1
- package/es/select/defaultProps.d.ts +4 -0
- package/es/select/hooks/useOptions.d.ts +16 -0
- package/es/select/hooks/usePanelVirtualScroll.d.ts +24 -0
- package/es/select/index.d.ts +8 -0
- package/es/select/index.js +14 -8
- package/es/select/index.js.map +1 -1
- package/es/select/style/css.d.ts +1 -0
- package/es/select/style/index.d.ts +1 -0
- package/es/select/type.d.ts +344 -0
- package/es/select/utils/helper.d.ts +18 -0
- package/es/select-input/SelectInput.d.ts +11 -0
- package/es/select-input/SelectInput.js +10 -5
- package/es/select-input/SelectInput.js.map +1 -1
- package/es/select-input/defaultProps.d.ts +2 -0
- package/es/select-input/hook/useMultiple.d.ts +23 -0
- package/es/select-input/hook/useMultiple.js +7 -4
- package/es/select-input/hook/useMultiple.js.map +1 -1
- package/es/select-input/hook/useOverlayInnerStyle.d.ts +11 -0
- package/es/select-input/hook/useSingle.d.ts +16 -0
- package/es/select-input/hook/useSingle.js +5 -3
- package/es/select-input/hook/useSingle.js.map +1 -1
- package/es/select-input/index.d.ts +5 -0
- package/es/select-input/index.js +10 -5
- package/es/select-input/index.js.map +1 -1
- package/es/select-input/interface.d.ts +17 -0
- package/es/select-input/style/css.d.ts +1 -0
- package/es/select-input/style/index.d.ts +1 -0
- package/es/select-input/type.d.ts +243 -0
- package/es/slider/Slider.d.ts +7 -0
- package/es/slider/Slider.js +668 -0
- package/es/slider/Slider.js.map +1 -0
- package/es/slider/SliderHandleButton.d.ts +11 -0
- package/es/slider/SliderHandleButton.js +48 -0
- package/es/slider/SliderHandleButton.js.map +1 -0
- package/es/slider/defaultProps.d.ts +5 -0
- package/es/slider/index.d.ts +5 -0
- package/es/slider/index.js +46 -0
- package/es/slider/index.js.map +1 -0
- package/es/slider/style/css.d.ts +1 -0
- package/es/slider/style/css.js +1 -0
- package/es/slider/style/index.css +252 -0
- package/es/slider/style/index.d.ts +1 -0
- package/es/slider/style/index.js +2 -0
- package/es/slider/style/index.js.map +1 -0
- package/es/slider/type.d.ts +78 -0
- package/es/space/defaultProps.d.ts +0 -0
- package/es/space/index.d.ts +0 -0
- package/es/space/type.d.ts +0 -0
- package/es/style/index.css +24 -34
- package/es/style/index.d.ts +1 -0
- package/es/switch/Switch.d.ts +9 -0
- package/es/switch/Switch.js +9 -47
- package/es/switch/Switch.js.map +1 -1
- package/es/switch/defaultProps.d.ts +2 -0
- package/es/switch/index.d.ts +4 -0
- package/es/switch/index.js +8 -5
- package/es/switch/index.js.map +1 -1
- package/es/switch/style/css.d.ts +1 -0
- package/es/switch/style/index.d.ts +1 -0
- package/es/switch/type.d.ts +48 -0
- package/es/tab/TabBar.d.ts +9 -0
- package/es/tab/TabBar.js +109 -0
- package/es/tab/TabBar.js.map +1 -0
- package/es/tab/TabNav.d.ts +10 -0
- package/es/tab/TabNav.js +123 -0
- package/es/tab/TabNav.js.map +1 -0
- package/es/tab/TabNavItem.d.ts +15 -0
- package/es/tab/TabNavItem.js +65 -0
- package/es/tab/TabNavItem.js.map +1 -0
- package/es/tab/TabPanel.d.ts +9 -0
- package/es/tab/TabPanel.js +11 -0
- package/es/tab/TabPanel.js.map +1 -0
- package/es/tab/Tabs.d.ts +10 -0
- package/es/tab/Tabs.js +95 -0
- package/es/tab/Tabs.js.map +1 -0
- package/es/tab/defaultProps.d.ts +3 -0
- package/es/tab/index.d.ts +8 -0
- package/es/tab/index.js +31 -0
- package/es/tab/index.js.map +1 -0
- package/es/tab/style/index.css +159 -0
- package/es/tab/style/index.d.ts +1 -0
- package/es/tab/style/index.js +2 -0
- package/es/tab/style/index.js.map +1 -0
- package/es/tab/type.d.ts +130 -0
- package/es/tab/useTabClass.d.ts +8 -0
- package/es/table/Cell.d.ts +18 -0
- package/es/table/Cell.js +73 -0
- package/es/table/Cell.js.map +1 -0
- package/es/table/TBody.d.ts +28 -0
- package/es/table/TBody.js +70 -0
- package/es/table/TBody.js.map +1 -0
- package/es/table/THead.d.ts +10 -0
- package/es/table/THead.js +56 -0
- package/es/table/THead.js.map +1 -0
- package/es/table/TR.d.ts +28 -0
- package/es/table/TR.js +76 -0
- package/es/table/TR.js.map +1 -0
- package/es/table/Table.d.ts +6 -0
- package/es/table/Table.js +98 -0
- package/es/table/Table.js.map +1 -0
- package/es/table/defaultProps.d.ts +2 -0
- package/es/table/hooks/index.d.ts +4 -0
- package/es/table/hooks/index.js +98 -0
- package/es/table/hooks/index.js.map +1 -0
- package/es/table/hooks/useTableClassName.d.ts +26 -0
- package/es/table/hooks/useTableStyle.d.ts +11 -0
- package/es/table/index.d.ts +5 -0
- package/es/table/index.js +22 -0
- package/es/table/index.js.map +1 -0
- package/es/table/style/css.d.ts +1 -0
- package/es/table/style/css.js +1 -0
- package/es/table/style/index.css +139 -0
- package/es/table/style/index.d.ts +1 -0
- package/es/table/style/index.js +2 -0
- package/es/table/style/index.js.map +1 -0
- package/es/table/type.d.ts +195 -0
- package/es/tag/Tag.d.ts +14 -0
- package/es/tag/Tag.js +5 -1182
- package/es/tag/Tag.js.map +1 -1
- package/es/tag/defaultProps.d.ts +7 -0
- package/es/tag/index.d.ts +4 -0
- package/es/tag/index.js +5 -3
- package/es/tag/index.js.map +1 -1
- package/es/tag/style/css.d.ts +1 -0
- package/es/tag/style/index.d.ts +1 -0
- package/es/tag/type.d.ts +169 -0
- package/es/tag-input/TagInput.d.ts +9 -0
- package/es/tag-input/TagInput.js +7 -4
- package/es/tag-input/TagInput.js.map +1 -1
- package/es/tag-input/defaultProps.d.ts +2 -0
- package/es/tag-input/hooks/useHover.d.ts +17 -0
- package/es/tag-input/hooks/useTagList.d.ts +30 -0
- package/es/tag-input/hooks/useTagList.js +5 -3
- package/es/tag-input/hooks/useTagList.js.map +1 -1
- package/es/tag-input/hooks/useTagScroll.d.ts +25 -0
- package/es/tag-input/index.d.ts +5 -0
- package/es/tag-input/index.js +7 -4
- package/es/tag-input/index.js.map +1 -1
- package/es/tag-input/style/css.d.ts +1 -0
- package/es/tag-input/style/index.d.ts +1 -0
- package/es/tag-input/type.d.ts +235 -0
- package/es/tag-input/useTagList.d.ts +30 -0
- package/es/tag-input/useTagList.js +5 -3
- package/es/tag-input/useTagList.js.map +1 -1
- package/es/utils/composeRefs.d.ts +2 -0
- package/es/utils/dom.d.ts +7 -0
- package/es/utils/forwardRefWithStatics.d.ts +2 -0
- package/es/utils/getScrollbarWidth.d.ts +6 -0
- package/es/utils/helper.d.ts +46 -0
- package/es/utils/input-number/large-number.d.ts +85 -0
- package/es/utils/input-number/number.d.ts +81 -0
- package/es/utils/isFragment.d.ts +4 -0
- package/es/utils/listener.d.ts +4 -0
- package/es/utils/log/index.d.ts +2 -0
- package/es/utils/log/index.js +27 -0
- package/es/utils/log/index.js.map +1 -0
- package/es/utils/log/log.d.ts +3 -0
- package/es/utils/log/types.d.ts +8 -0
- package/es/utils/noop.d.ts +2 -0
- package/es/utils/number.d.ts +7 -0
- package/es/utils/parentTNode.d.ts +10 -0
- package/es/utils/parseTNode.d.ts +10 -0
- package/es/utils/react-render.d.ts +16 -0
- package/es/utils/ref.d.ts +1 -0
- package/es/utils/refs.d.ts +13 -0
- package/es/utils/scroll.d.ts +3 -0
- package/es/utils/style.d.ts +4 -0
- package/es/utils/transition.d.ts +20 -0
- package/package.json +59 -59
- package/LICENSE +0 -21
- package/es/_chunks/dep-0QH2Ee4R.js.map +0 -1
- package/es/_chunks/dep-BH5n5r1M.js.map +0 -1
- package/es/_chunks/dep-D7LanWes.js.map +0 -1
- package/es/_chunks/dep-DZ_0EvBk.js.map +0 -1
- package/es/_chunks/dep-Dk2xX8lh.js.map +0 -1
- package/es/_chunks/dep-EcrDKDlu.js.map +0 -1
- package/es/_chunks/dep-bWaVq_y3.js.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyledProps } from "../common";
|
|
3
|
+
import { TdCheckboxProps } from "../checkbox/type";
|
|
4
|
+
export interface CheckProps extends TdCheckboxProps, StyledProps {
|
|
5
|
+
type: "radio" | "radio-button" | "checkbox";
|
|
6
|
+
allowUncheck?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
stopLabelTrigger?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Check 组件支持使用 CheckContext 进行状态托管
|
|
13
|
+
*/
|
|
14
|
+
export declare const CheckContext: React.Context<CheckContextValue>;
|
|
15
|
+
/**
|
|
16
|
+
* 托管 Check 组件的状态,请提供 inject() 方法注入托管好的 props
|
|
17
|
+
*/
|
|
18
|
+
export interface CheckContextValue {
|
|
19
|
+
inject: (props: CheckProps) => CheckProps;
|
|
20
|
+
}
|
|
21
|
+
declare const Check: React.ForwardRefExoticComponent<CheckProps & React.RefAttributes<HTMLLabelElement>>;
|
|
22
|
+
export default Check;
|
package/es/common/Check.js
CHANGED
|
@@ -4,11 +4,12 @@ import { _ as _objectWithoutProperties } from '../_chunks/dep-DN7d1SzH.js';
|
|
|
4
4
|
import React, { forwardRef, useContext } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { isBoolean } from 'lodash-es';
|
|
7
|
-
import { o as omit } from '../_chunks/dep-
|
|
8
|
-
import { u as useConfig } from '../_chunks/dep-
|
|
7
|
+
import { o as omit } from '../_chunks/dep-DQ6kXoi8.js';
|
|
8
|
+
import { u as useConfig } from '../_chunks/dep-gy8uvBaS.js';
|
|
9
9
|
import { u as useControlled } from '../_chunks/dep-DwWrhxkd.js';
|
|
10
10
|
import '../_chunks/dep-D-UKOauR.js';
|
|
11
|
-
import '../
|
|
11
|
+
import '../_chunks/dep-5U9UjDaf.js';
|
|
12
|
+
import 'dayjs';
|
|
12
13
|
|
|
13
14
|
var _excluded = ["allowUncheck", "type", "disabled", "name", "value", "onChange", "indeterminate", "children", "label", "className", "style", "readonly", "onClick"];
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
package/es/common/Check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Check.js","sources":["../../../components/common/Check.tsx"],"sourcesContent":["import React, { forwardRef, useContext, MouseEvent, ChangeEvent } from \"react\";\nimport classNames from \"classnames\";\nimport { isBoolean } from \"lodash-es\";\nimport { omit } from \"../utils/helper\";\nimport { StyledProps } from \"../common\";\nimport useConfig from \"../hooks/useConfig\";\nimport useControlled from \"../hooks/useControlled\";\nimport { TdCheckboxProps } from \"../checkbox/type\";\n\nexport interface CheckProps extends TdCheckboxProps, StyledProps {\n type: \"radio\" | \"radio-button\" | \"checkbox\";\n allowUncheck?: boolean;\n title?: string;\n children?: React.ReactNode;\n stopLabelTrigger?: boolean;\n}\n\n/**\n * Check 组件支持使用 CheckContext 进行状态托管\n */\nexport const CheckContext = React.createContext<CheckContextValue>(null);\n\n/**\n * 托管 Check 组件的状态,请提供 inject() 方法注入托管好的 props\n */\nexport interface CheckContextValue {\n inject: (props: CheckProps) => CheckProps;\n}\n\nconst Check = forwardRef<HTMLLabelElement, CheckProps>((_props, ref) => {\n // 支持从 Context 注入\n const context = useContext(CheckContext);\n const props = context ? context.inject(_props) : _props;\n\n const {\n allowUncheck = false,\n type,\n disabled,\n name,\n value,\n onChange,\n indeterminate,\n children,\n label,\n className,\n style,\n readonly,\n onClick,\n ...htmlProps\n } = props;\n\n const { classPrefix } = useConfig();\n\n const TOnChange: (\n checked: boolean,\n context: { e: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLInputElement> }\n ) => void = onChange;\n\n const [internalChecked, setInternalChecked] = useControlled(props, \"checked\", TOnChange);\n\n const labelClassName = classNames(`${classPrefix}-${type}`, className, {\n [`${classPrefix}-is-checked`]: internalChecked,\n [`${classPrefix}-is-disabled`]: disabled,\n [`${classPrefix}-is-indeterminate`]: indeterminate\n });\n\n const isDisabled = disabled || readonly;\n\n const input = (\n <input\n readOnly={readonly}\n type={type === \"radio-button\" ? \"radio\" : type}\n className={`${classPrefix}-${type}__former`}\n checked={internalChecked}\n disabled={disabled}\n name={name}\n tabIndex={-1}\n value={isBoolean(value) ? Number(value) : value}\n data-value={typeof value === \"string\" ? `'${value}'` : value}\n data-allow-uncheck={allowUncheck || undefined}\n onClick={(e) => {\n e.stopPropagation();\n if ((type === \"radio-button\" || type === \"radio\") && allowUncheck && internalChecked) {\n setInternalChecked(!e.currentTarget.checked, { e });\n }\n }}\n onChange={(e) => {\n if (isDisabled) return;\n setInternalChecked(e.currentTarget.checked, { e });\n }}\n />\n );\n // Checkbox/ Radio 内容为空则不再渲染 span,不存在 0:Number 的情况\n const showLabel = !!(children || label);\n\n const handleLabelClick = (event: MouseEvent<HTMLSpanElement>) => {\n // 在tree等组件中使用 阻止label触发checked 与expand冲突\n if (props.stopLabelTrigger) {\n event.preventDefault();\n }\n };\n\n const onInnerClick = (e: MouseEvent<HTMLLabelElement>) => {\n if (isDisabled) return;\n onClick?.({ e });\n };\n\n return (\n <label\n ref={ref}\n tabIndex={disabled ? undefined : 0}\n className={labelClassName}\n title={props.title}\n style={style}\n {...omit(htmlProps, [\"checkAll\", \"stopLabelTrigger\"])}\n onClick={onInnerClick}\n >\n {input}\n <span className={`${classPrefix}-${type}__input`} />\n {showLabel && (\n <span key=\"label\" className={`${classPrefix}-${type}__label`} onClick={handleLabelClick}>\n {children || label}\n </span>\n )}\n </label>\n );\n});\n\nCheck.displayName = \"Check\";\n\nexport default Check;\n"],"names":["CheckContext","React","createContext","Check","forwardRef","_props","ref","context","useContext","props","inject","_props$allowUncheck","allowUncheck","type","disabled","name","value","onChange","indeterminate","children","label","className","style","readonly","onClick","htmlProps","_objectWithoutProperties","_excluded","_useConfig","useConfig","classPrefix","TOnChange","_useControlled","useControlled","_useControlled2","_slicedToArray","internalChecked","setInternalChecked","labelClassName","classNames","concat","_defineProperty","isDisabled","input","createElement","readOnly","checked","tabIndex","isBoolean","Number","e","stopPropagation","currentTarget","showLabel","handleLabelClick","event","stopLabelTrigger","preventDefault","onInnerClick","_objectSpread","title","omit","key","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Check.js","sources":["../../../components/common/Check.tsx"],"sourcesContent":["import React, { forwardRef, useContext, MouseEvent, ChangeEvent } from \"react\";\nimport classNames from \"classnames\";\nimport { isBoolean } from \"lodash-es\";\nimport { omit } from \"../utils/helper\";\nimport { StyledProps } from \"../common\";\nimport useConfig from \"../hooks/useConfig\";\nimport useControlled from \"../hooks/useControlled\";\nimport { TdCheckboxProps } from \"../checkbox/type\";\n\nexport interface CheckProps extends TdCheckboxProps, StyledProps {\n type: \"radio\" | \"radio-button\" | \"checkbox\";\n allowUncheck?: boolean;\n title?: string;\n children?: React.ReactNode;\n stopLabelTrigger?: boolean;\n}\n\n/**\n * Check 组件支持使用 CheckContext 进行状态托管\n */\nexport const CheckContext = React.createContext<CheckContextValue>(null);\n\n/**\n * 托管 Check 组件的状态,请提供 inject() 方法注入托管好的 props\n */\nexport interface CheckContextValue {\n inject: (props: CheckProps) => CheckProps;\n}\n\nconst Check = forwardRef<HTMLLabelElement, CheckProps>((_props, ref) => {\n // 支持从 Context 注入\n const context = useContext(CheckContext);\n const props = context ? context.inject(_props) : _props;\n\n const {\n allowUncheck = false,\n type,\n disabled,\n name,\n value,\n onChange,\n indeterminate,\n children,\n label,\n className,\n style,\n readonly,\n onClick,\n ...htmlProps\n } = props;\n\n const { classPrefix } = useConfig();\n\n const TOnChange: (\n checked: boolean,\n context: { e: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLInputElement> }\n ) => void = onChange;\n\n const [internalChecked, setInternalChecked] = useControlled(props, \"checked\", TOnChange);\n\n const labelClassName = classNames(`${classPrefix}-${type}`, className, {\n [`${classPrefix}-is-checked`]: internalChecked,\n [`${classPrefix}-is-disabled`]: disabled,\n [`${classPrefix}-is-indeterminate`]: indeterminate\n });\n\n const isDisabled = disabled || readonly;\n\n const input = (\n <input\n readOnly={readonly}\n type={type === \"radio-button\" ? \"radio\" : type}\n className={`${classPrefix}-${type}__former`}\n checked={internalChecked}\n disabled={disabled}\n name={name}\n tabIndex={-1}\n value={isBoolean(value) ? Number(value) : value}\n data-value={typeof value === \"string\" ? `'${value}'` : value}\n data-allow-uncheck={allowUncheck || undefined}\n onClick={(e) => {\n e.stopPropagation();\n if ((type === \"radio-button\" || type === \"radio\") && allowUncheck && internalChecked) {\n setInternalChecked(!e.currentTarget.checked, { e });\n }\n }}\n onChange={(e) => {\n if (isDisabled) return;\n setInternalChecked(e.currentTarget.checked, { e });\n }}\n />\n );\n // Checkbox/ Radio 内容为空则不再渲染 span,不存在 0:Number 的情况\n const showLabel = !!(children || label);\n\n const handleLabelClick = (event: MouseEvent<HTMLSpanElement>) => {\n // 在tree等组件中使用 阻止label触发checked 与expand冲突\n if (props.stopLabelTrigger) {\n event.preventDefault();\n }\n };\n\n const onInnerClick = (e: MouseEvent<HTMLLabelElement>) => {\n if (isDisabled) return;\n onClick?.({ e });\n };\n\n return (\n <label\n ref={ref}\n tabIndex={disabled ? undefined : 0}\n className={labelClassName}\n title={props.title}\n style={style}\n {...omit(htmlProps, [\"checkAll\", \"stopLabelTrigger\"])}\n onClick={onInnerClick}\n >\n {input}\n <span className={`${classPrefix}-${type}__input`} />\n {showLabel && (\n <span key=\"label\" className={`${classPrefix}-${type}__label`} onClick={handleLabelClick}>\n {children || label}\n </span>\n )}\n </label>\n );\n});\n\nCheck.displayName = \"Check\";\n\nexport default Check;\n"],"names":["CheckContext","React","createContext","Check","forwardRef","_props","ref","context","useContext","props","inject","_props$allowUncheck","allowUncheck","type","disabled","name","value","onChange","indeterminate","children","label","className","style","readonly","onClick","htmlProps","_objectWithoutProperties","_excluded","_useConfig","useConfig","classPrefix","TOnChange","_useControlled","useControlled","_useControlled2","_slicedToArray","internalChecked","setInternalChecked","labelClassName","classNames","concat","_defineProperty","isDisabled","input","createElement","readOnly","checked","tabIndex","isBoolean","Number","e","stopPropagation","currentTarget","showLabel","handleLabelClick","event","stopLabelTrigger","preventDefault","onInnerClick","_objectSpread","title","omit","key","displayName"],"mappings":"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"}
|
package/es/common/FakeArrow.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_chunks/dep-Cwish4GD.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { u as useConfig } from '../_chunks/dep-
|
|
4
|
+
import { u as useConfig } from '../_chunks/dep-gy8uvBaS.js';
|
|
5
5
|
import '../_chunks/dep-D-UKOauR.js';
|
|
6
|
-
import '../
|
|
6
|
+
import '../_chunks/dep-5U9UjDaf.js';
|
|
7
|
+
import 'dayjs';
|
|
7
8
|
|
|
8
9
|
function FakeArrow(props) {
|
|
9
10
|
var _useConfig = useConfig(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FakeArrow.js","sources":["../../../components/common/FakeArrow.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { ClassName } from \"../common\";\n\nimport useConfig from \"../hooks/useConfig\";\n\n// 翻转箭头统一组件\nfunction FakeArrow(props: {\n className?: ClassName;\n isActive?: boolean;\n disabled?: boolean;\n style?: React.CSSProperties;\n}) {\n const { classPrefix } = useConfig();\n return (\n <svg\n style={props.style}\n className={classNames(\n `${classPrefix}-fake-arrow`,\n {\n [`${classPrefix}-fake-arrow--active`]: props?.isActive && !props?.disabled\n },\n props?.className\n )}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M3.75 5.7998L7.99274 10.0425L12.2361 5.79921\" stroke=\"black\" strokeOpacity=\"0.9\" strokeWidth=\"1.3\" />\n </svg>\n );\n}\n\nexport default FakeArrow;\n"],"names":["FakeArrow","props","_useConfig","useConfig","classPrefix","React","createElement","style","className","classNames","concat","_defineProperty","isActive","disabled","width","height","viewBox","fill","xmlns","d","stroke","strokeOpacity","strokeWidth"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FakeArrow.js","sources":["../../../components/common/FakeArrow.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { ClassName } from \"../common\";\n\nimport useConfig from \"../hooks/useConfig\";\n\n// 翻转箭头统一组件\nfunction FakeArrow(props: {\n className?: ClassName;\n isActive?: boolean;\n disabled?: boolean;\n style?: React.CSSProperties;\n}) {\n const { classPrefix } = useConfig();\n return (\n <svg\n style={props.style}\n className={classNames(\n `${classPrefix}-fake-arrow`,\n {\n [`${classPrefix}-fake-arrow--active`]: props?.isActive && !props?.disabled\n },\n props?.className\n )}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M3.75 5.7998L7.99274 10.0425L12.2361 5.79921\" stroke=\"black\" strokeOpacity=\"0.9\" strokeWidth=\"1.3\" />\n </svg>\n );\n}\n\nexport default FakeArrow;\n"],"names":["FakeArrow","props","_useConfig","useConfig","classPrefix","React","createElement","style","className","classNames","concat","_defineProperty","isActive","disabled","width","height","viewBox","fill","xmlns","d","stroke","strokeOpacity","strokeWidth"],"mappings":";;;;;;;;AAOA,SAASA,UAAUC,KAAA,EAKhB;AACD,EAAA,IAAAC,UAAA,GAAwBC,SAAA,EAAU;IAA1BC,WAAA,GAAAF,UAAA,CAAAE,WAAA;AACR,EAAA,sBACEC,KAAA,CAAAC,aAAA,CAAC,KAAA,EAAA;IACCC,OAAON,KAAA,CAAMM,KAAA;AACbC,IAAAA,SAAA,EAAWC,UAAA,CAAA,EAAA,CAAAC,MAAA,CACNN,WAAW,EAAA,aAAA,CAAA,EAAAO,eAAA,CAAA,EAAA,EAAA,EAAA,CAAAD,MAAA,CAERN,WAAW,EAAA,qBAAA,CAAA,EAAwB,CAAAH,KAAA,KAAA,IAAA,IAAAA,KAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAAA,KAAA,CAAOW,QAAA,KAAY,EAACX,KAAA,KAAA,IAAA,IAAAA,KAAA,eAAAA,KAAA,CAAOY,QAAA,CAAA,CAAA,EAEpEZ,KAAA,KAAA,IAAA,IAAAA,KAAA,uBAAAA,KAAA,CAAOO,SACT,CAAA;AACAM,IAAAA,KAAA,EAAM,IAAA;AACNC,IAAAA,MAAA,EAAO,IAAA;AACPC,IAAAA,OAAA,EAAQ,WAAA;AACRC,IAAAA,IAAA,EAAK,MAAA;AACLC,IAAAA,KAAA,EAAM;AAAA,GAAA,iBAENb,KAAA,CAAAC,aAAA,CAAC;AAAKa,IAAAA,CAAA,EAAE,8CAAA;AAA+CC,IAAAA,QAAO,OAAA;AAAQC,IAAAA,aAAA,EAAc,KAAA;AAAMC,IAAAA,WAAA,EAAY;AAAA,GAAM,CAC9G,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ConfigProviderProps } from "../config-provider";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param notSet 默认不传设置为true,函数是调用唤起组件不需要同步设置全局上下文信息
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
declare const PluginContainer: React.FC<ConfigProviderProps>;
|
|
9
|
+
export default PluginContainer;
|
|
@@ -3,7 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import '../config-provider/index.js';
|
|
4
4
|
import ConfigProvider from '../config-provider/ConfigProvider.js';
|
|
5
5
|
import '../_chunks/dep-D-UKOauR.js';
|
|
6
|
-
import '../
|
|
6
|
+
import '../_chunks/dep-5U9UjDaf.js';
|
|
7
|
+
import 'dayjs';
|
|
7
8
|
import 'lodash-es';
|
|
8
9
|
|
|
9
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginContainer.js","sources":["../../../components/common/PluginContainer.tsx"],"sourcesContent":["import React from \"react\";\nimport ConfigProvider, { ConfigProviderProps } from \"../config-provider\";\n\n/**\n *\n * @param notSet 默认不传设置为true,函数是调用唤起组件不需要同步设置全局上下文信息\n * @returns\n */\nconst PluginContainer: React.FC<ConfigProviderProps> = (props) => (\n <>\n {props?.globalConfig?.isContextEffectPlugin ? (\n <ConfigProvider notSet {...props}>\n {props?.children}\n </ConfigProvider>\n ) : (\n props?.children\n )}\n </>\n);\n\nexport default PluginContainer;\n"],"names":["PluginContainer","props","_props$globalConfig","React","createElement","Fragment","globalConfig","isContextEffectPlugin","ConfigProvider","_objectSpread","notSet","children"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PluginContainer.js","sources":["../../../components/common/PluginContainer.tsx"],"sourcesContent":["import React from \"react\";\nimport ConfigProvider, { ConfigProviderProps } from \"../config-provider\";\n\n/**\n *\n * @param notSet 默认不传设置为true,函数是调用唤起组件不需要同步设置全局上下文信息\n * @returns\n */\nconst PluginContainer: React.FC<ConfigProviderProps> = (props) => (\n <>\n {props?.globalConfig?.isContextEffectPlugin ? (\n <ConfigProvider notSet {...props}>\n {props?.children}\n </ConfigProvider>\n ) : (\n props?.children\n )}\n </>\n);\n\nexport default PluginContainer;\n"],"names":["PluginContainer","props","_props$globalConfig","React","createElement","Fragment","globalConfig","isContextEffectPlugin","ConfigProvider","_objectSpread","notSet","children"],"mappings":";;;;;;;;;;;AAQA,IAAMA,kBAAiD,SAAjDA,gBAAkDC,KAAA,EAAA;AAAA,EAAA,IAAAC,mBAAA;AAAA,EAAA,sBACtDC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,EAAA,IAAA,EACGJ,KAAA,KAAA,IAAA,IAAAA,KAAA,gBAAAC,mBAAA,GAAAD,KAAA,CAAOK,4DAAPJ,mBAAA,CAAqBK,qBAAA,kBACpBJ,KAAA,CAAAC,aAAA,CAACI,cAAA,EAAAC,aAAA,CAAA;AAAeC,IAAAA,MAAA,EAAM;KAAKT,KAAA,CAAA,EACxBA,kBAAAA,4BAAAA,MAAOU,QACV,CAAA,GAEAV,kBAAAA,4BAAAA,MAAOU,QAEX,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AttachNode, AttachNodeReturnValue } from "../common";
|
|
3
|
+
export interface PortalProps {
|
|
4
|
+
/**
|
|
5
|
+
* 指定挂载的 HTML 节点, false 为挂载在 body
|
|
6
|
+
*/
|
|
7
|
+
attach?: React.ReactElement | AttachNode | boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 触发元素
|
|
10
|
+
*/
|
|
11
|
+
triggerNode?: HTMLElement;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function getAttach(attach: PortalProps["attach"], triggerNode?: HTMLElement): AttachNodeReturnValue;
|
|
15
|
+
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<unknown>>;
|
|
16
|
+
export default Portal;
|
package/es/common/Portal.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { _ as _typeof } from '../_chunks/dep-D-UKOauR.js';
|
|
2
2
|
import { forwardRef, useMemo, useImperativeHandle } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import { c as canUseDocument
|
|
5
|
-
import { u as useConfig } from '../_chunks/dep-
|
|
4
|
+
import { c as canUseDocument } from '../_chunks/dep-DRwijJcv.js';
|
|
5
|
+
import { u as useConfig } from '../_chunks/dep-gy8uvBaS.js';
|
|
6
|
+
import { u as useIsomorphicLayoutEffect } from '../_chunks/dep-BRbJGDI9.js';
|
|
6
7
|
import 'lodash-es';
|
|
7
|
-
import '../
|
|
8
|
+
import '../_chunks/dep-5U9UjDaf.js';
|
|
9
|
+
import '../_chunks/dep-Cwish4GD.js';
|
|
10
|
+
import 'dayjs';
|
|
8
11
|
|
|
9
12
|
function getAttach(attach, triggerNode) {
|
|
10
13
|
if (!canUseDocument) return null;
|
package/es/common/Portal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.js","sources":["../../../components/common/Portal.tsx"],"sourcesContent":["import React, { forwardRef, useMemo, useImperativeHandle } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { AttachNode, AttachNodeReturnValue } from \"../common\";\nimport { canUseDocument } from \"../utils/dom\";\nimport useConfig from \"../hooks/useConfig\";\nimport useIsomorphicLayoutEffect from \"../hooks/useLayoutEffect\";\n\nexport interface PortalProps {\n /**\n * 指定挂载的 HTML 节点, false 为挂载在 body\n */\n attach?: React.ReactElement | AttachNode | boolean;\n /**\n * 触发元素\n */\n triggerNode?: HTMLElement;\n children: React.ReactNode;\n}\n\nexport function getAttach(attach: PortalProps[\"attach\"], triggerNode?: HTMLElement): AttachNodeReturnValue {\n if (!canUseDocument) return null;\n\n let el: AttachNodeReturnValue;\n if (typeof attach === \"string\") {\n el = document.querySelector(attach);\n }\n if (typeof attach === \"function\") {\n el = attach(triggerNode);\n }\n if (typeof attach === \"object\" && attach instanceof window.HTMLElement) {\n el = attach;\n }\n\n // fix el in iframe\n if (el && el.nodeType === 1) return el;\n\n return document.body;\n}\n\nconst Portal = forwardRef((props: PortalProps, ref) => {\n const { attach, children, triggerNode } = props;\n const { classPrefix } = useConfig();\n\n const container = useMemo(() => {\n if (!canUseDocument) return null;\n const el = document.createElement(\"div\");\n el.className = `${classPrefix}-portal-wrapper`;\n return el;\n }, [classPrefix]);\n\n useIsomorphicLayoutEffect(() => {\n const parentElement = getAttach(attach, triggerNode);\n parentElement?.appendChild?.(container);\n\n return () => {\n parentElement?.removeChild?.(container);\n };\n }, [container, attach, triggerNode]);\n\n useImperativeHandle(ref, () => container);\n\n return canUseDocument ? createPortal(children, container) : null;\n});\n\nPortal.displayName = \"Portal\";\n\nexport default Portal;\n"],"names":["getAttach","attach","triggerNode","canUseDocument","el","document","querySelector","_typeof","window","HTMLElement","nodeType","body","Portal","forwardRef","props","ref","children","_useConfig","useConfig","classPrefix","container","useMemo","createElement","className","concat","useIsomorphicLayoutEffect","_parentElement$append","parentElement","appendChild","call","_parentElement$remove","removeChild","useImperativeHandle","createPortal","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Portal.js","sources":["../../../components/common/Portal.tsx"],"sourcesContent":["import React, { forwardRef, useMemo, useImperativeHandle } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { AttachNode, AttachNodeReturnValue } from \"../common\";\nimport { canUseDocument } from \"../utils/dom\";\nimport useConfig from \"../hooks/useConfig\";\nimport useIsomorphicLayoutEffect from \"../hooks/useLayoutEffect\";\n\nexport interface PortalProps {\n /**\n * 指定挂载的 HTML 节点, false 为挂载在 body\n */\n attach?: React.ReactElement | AttachNode | boolean;\n /**\n * 触发元素\n */\n triggerNode?: HTMLElement;\n children: React.ReactNode;\n}\n\nexport function getAttach(attach: PortalProps[\"attach\"], triggerNode?: HTMLElement): AttachNodeReturnValue {\n if (!canUseDocument) return null;\n\n let el: AttachNodeReturnValue;\n if (typeof attach === \"string\") {\n el = document.querySelector(attach);\n }\n if (typeof attach === \"function\") {\n el = attach(triggerNode);\n }\n if (typeof attach === \"object\" && attach instanceof window.HTMLElement) {\n el = attach;\n }\n\n // fix el in iframe\n if (el && el.nodeType === 1) return el;\n\n return document.body;\n}\n\nconst Portal = forwardRef((props: PortalProps, ref) => {\n const { attach, children, triggerNode } = props;\n const { classPrefix } = useConfig();\n\n const container = useMemo(() => {\n if (!canUseDocument) return null;\n const el = document.createElement(\"div\");\n el.className = `${classPrefix}-portal-wrapper`;\n return el;\n }, [classPrefix]);\n\n useIsomorphicLayoutEffect(() => {\n const parentElement = getAttach(attach, triggerNode);\n parentElement?.appendChild?.(container);\n\n return () => {\n parentElement?.removeChild?.(container);\n };\n }, [container, attach, triggerNode]);\n\n useImperativeHandle(ref, () => container);\n\n return canUseDocument ? createPortal(children, container) : null;\n});\n\nPortal.displayName = \"Portal\";\n\nexport default Portal;\n"],"names":["getAttach","attach","triggerNode","canUseDocument","el","document","querySelector","_typeof","window","HTMLElement","nodeType","body","Portal","forwardRef","props","ref","children","_useConfig","useConfig","classPrefix","container","useMemo","createElement","className","concat","useIsomorphicLayoutEffect","_parentElement$append","parentElement","appendChild","call","_parentElement$remove","removeChild","useImperativeHandle","createPortal","displayName"],"mappings":";;;;;;;;;;;AAmBO,SAASA,SAAAA,CAAUC,QAA+BC,WAAA,EAAkD;AACzG,EAAA,IAAI,CAACC,gBAAgB,OAAO,IAAA;AAE5B,EAAA,IAAIC,EAAA;AACJ,EAAA,IAAI,OAAOH,WAAW,QAAA,EAAU;AAC9BG,IAAAA,EAAA,GAAKC,QAAA,CAASC,cAAcL,MAAM,CAAA;AACpC,EAAA;AACA,EAAA,IAAI,OAAOA,WAAW,UAAA,EAAY;AAChCG,IAAAA,EAAA,GAAKH,OAAOC,WAAW,CAAA;AACzB,EAAA;EACA,IAAIK,OAAA,CAAON,MAAA,CAAA,KAAW,QAAA,IAAYA,MAAA,YAAkBO,OAAOC,WAAA,EAAa;AACtEL,IAAAA,EAAA,GAAKH,MAAA;AACP,EAAA;EAGA,IAAIG,EAAA,IAAMA,EAAA,CAAGM,QAAA,KAAa,CAAA,EAAG,OAAON,EAAA;EAEpC,OAAOC,QAAA,CAASM,IAAA;AAClB;AAEA,IAAMC,MAAA,gBAASC,UAAA,CAAW,UAACC,KAAA,EAAoBC,GAAA,EAAQ;AACrD,EAAA,IAAQd,MAAA,GAAkCa,KAAA,CAAlCb,MAAA;IAAQe,QAAA,GAA0BF,KAAA,CAA1BE,QAAA;IAAUd,WAAA,GAAgBY,KAAA,CAAhBZ,WAAA;AAC1B,EAAA,IAAAe,UAAA,GAAwBC,SAAA,EAAU;IAA1BC,WAAA,GAAAF,UAAA,CAAAE,WAAA;AAER,EAAA,IAAMC,SAAA,GAAYC,QAAQ,YAAM;AAC9B,IAAA,IAAI,CAAClB,gBAAgB,OAAO,IAAA;AAC5B,IAAA,IAAMC,EAAA,GAAKC,QAAA,CAASiB,aAAA,CAAc,KAAK,CAAA;AACvClB,IAAAA,EAAA,CAAGmB,SAAA,GAAA,EAAA,CAAAC,MAAA,CAAeL,WAAW,EAAA,iBAAA,CAAA;AAC7B,IAAA,OAAOf,EAAA;AACT,EAAA,CAAA,EAAG,CAACe,WAAW,CAAC,CAAA;AAEhBM,EAAAA,yBAAA,CAA0B,YAAM;AAAA,IAAA,IAAAC,qBAAA;AAC9B,IAAA,IAAMC,aAAA,GAAgB3B,SAAA,CAAUC,MAAA,EAAQC,WAAW,CAAA;AACnDyB,IAAAA,aAAA,aAAAA,aAAA,KAAA,KAAA,CAAA,IAAA,CAAAD,qBAAA,GAAAC,aAAA,CAAeC,6DAAfF,qBAAA,CAAAG,IAAA,CAAAF,aAAA,EAA6BP,SAAS,CAAA;AAEtC,IAAA,OAAO,YAAM;AAAA,MAAA,IAAAU,qBAAA;AACXH,MAAAA,aAAA,aAAAA,aAAA,KAAA,KAAA,CAAA,IAAA,CAAAG,qBAAA,GAAAH,aAAA,CAAeI,6DAAfD,qBAAA,CAAAD,IAAA,CAAAF,aAAA,EAA6BP,SAAS,CAAA;IACxC,CAAA;EACF,CAAA,EAAG,CAACA,SAAA,EAAWnB,MAAA,EAAQC,WAAW,CAAC,CAAA;EAEnC8B,mBAAA,CAAoBjB,GAAA,EAAK,YAAA;AAAA,IAAA,OAAMK,SAAS;EAAA,CAAA,CAAA;EAExC,OAAOjB,cAAA,gBAAiB8B,YAAA,CAAajB,QAAA,EAAUI,SAAS,CAAA,GAAI,IAAA;AAC9D,CAAC;AAEDR,MAAA,CAAOsB,WAAA,GAAc,QAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function observe(element: HTMLElement, root: HTMLElement, callback: Function, marginBottom: number): IntersectionObserver;
|
package/es/common.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { CSSProperties, ReactElement, FormEvent } from "react";
|
|
2
|
+
export interface StyledProps {
|
|
3
|
+
style?: React.CSSProperties;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export type FormResetEvent = FormEvent<HTMLFormElement>;
|
|
7
|
+
export type FormSubmitEvent = FormEvent<HTMLFormElement>;
|
|
8
|
+
export type AttachNodeReturnValue = HTMLElement | Element | Document | null;
|
|
9
|
+
export type AttachNode = CSSSelector | ((triggerNode?: HTMLElement) => AttachNodeReturnValue);
|
|
10
|
+
export type CSSSelector = string;
|
|
11
|
+
export type Styles = CSSProperties;
|
|
12
|
+
export type TNode<T = undefined> = T extends undefined ? React.ReactNode : React.ReactNode | ((props: T) => React.ReactNode);
|
|
13
|
+
export type ClassName = string | string[] | {
|
|
14
|
+
[key: string]: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type SizeEnum = "small" | "medium" | "large";
|
|
17
|
+
export type ShapeEnum = "circle" | "round";
|
|
18
|
+
export type HorizontalAlignEnum = "left" | "center" | "right";
|
|
19
|
+
export type VerticalAlignEnum = "top" | "middle" | "bottom";
|
|
20
|
+
export type LayoutEnum = "vertical" | "horizontal";
|
|
21
|
+
export type TElement<T = undefined> = T extends undefined ? ReactElement : (props: T) => ReactElement;
|
|
22
|
+
export interface TScroll {
|
|
23
|
+
/**
|
|
24
|
+
* 表示除可视区域外,额外渲染的行数,避免快速滚动过程中,新出现的内容来不及渲染从而出现空白
|
|
25
|
+
* @default 20
|
|
26
|
+
*/
|
|
27
|
+
bufferSize?: number;
|
|
28
|
+
/**
|
|
29
|
+
* 表示每行内容是否同一个固定高度,仅在 `scroll.type` 为 `virtual` 时有效,该属性设置为 `true` 时,可用于简化虚拟滚动内部计算逻辑,提升性能,此时则需要明确指定 `scroll.rowHeight` 属性的值
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
isFixedRowHeight?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 行高,不会给元素添加样式高度,仅作为滚动时的行高参考。一般情况不需要设置该属性。如果设置,可尽量将该属性设置为每行平均高度,从而使得滚动过程更加平滑
|
|
35
|
+
*/
|
|
36
|
+
rowHeight?: number;
|
|
37
|
+
/**
|
|
38
|
+
* 启动虚拟滚动的阈值。为保证组件收益最大化,当数据量小于阈值 `scroll.threshold` 时,无论虚拟滚动的配置是否存在,组件内部都不会开启虚拟滚动
|
|
39
|
+
* @default 100
|
|
40
|
+
*/
|
|
41
|
+
threshold?: number;
|
|
42
|
+
/**
|
|
43
|
+
* 滚动加载类型,有两种:懒加载和虚拟滚动。<br />值为 `lazy` ,表示滚动时会进行懒加载,非可视区域内的内容将不会默认渲染,直到该内容可见时,才会进行渲染,并且已渲染的内容滚动到不可见时,不会被销毁;<br />值为`virtual`时,表示会进行虚拟滚动,无论滚动条滚动到哪个位置,同一时刻,仅渲染该可视区域内的内容,当需要展示的数据量较大时,建议开启该特性
|
|
44
|
+
*/
|
|
45
|
+
type: "lazy" | "virtual";
|
|
46
|
+
}
|
|
47
|
+
export interface ScrollToElementParams {
|
|
48
|
+
/** 跳转元素下标 */
|
|
49
|
+
index?: number;
|
|
50
|
+
/** 跳转元素距离顶部的距离 */
|
|
51
|
+
top?: number;
|
|
52
|
+
/** 单个元素高度非固定场景下,即 isFixedRowHeight = false。延迟设置元素位置,一般用于依赖不同高度异步渲染等场景,单位:毫秒 */
|
|
53
|
+
time?: number;
|
|
54
|
+
behavior?: "auto" | "smooth";
|
|
55
|
+
/** 跳转元素的 key */
|
|
56
|
+
key?: string | number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 通用全局类型
|
|
60
|
+
* */
|
|
61
|
+
export type PlainObject = {
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated use TScroll instead
|
|
66
|
+
*/
|
|
67
|
+
export type InfinityScroll = TScroll;
|
|
68
|
+
export declare const ARROW_DOWN_REG: RegExp;
|
|
69
|
+
export declare const ARROW_UP_REG: RegExp;
|
|
70
|
+
export declare const ARROW_LEFT_REG: RegExp;
|
|
71
|
+
export declare const ARROW_RIGHT_REG: RegExp;
|
|
72
|
+
export declare const ESCAPE_REG: RegExp;
|
|
73
|
+
export declare const SPACE_REG: RegExp;
|
|
74
|
+
export declare const ENTER_REG: RegExp;
|
|
75
|
+
export declare const SHIFT_REG: RegExp;
|
|
76
|
+
export declare const CLEAR_REG: RegExp;
|
|
77
|
+
export declare const ALL_REG: RegExp;
|
|
78
|
+
export declare const CHECKED_CODE_REG: RegExp;
|
|
79
|
+
export declare const THEME_MODE = "theme-mode";
|
|
80
|
+
export type ScrollContainer = string | (() => HTMLElement | Window) | HTMLElement | Window | null;
|
|
81
|
+
export type ScrollContainerElement = HTMLElement | Window;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GlobalConfigProvider } from "./type";
|
|
2
|
+
export declare const defaultClassPrefix = "t";
|
|
3
|
+
import defaultLocale from "../locale/zh_CN";
|
|
4
|
+
export declare const defaultGlobalConfig: GlobalConfigProvider;
|
|
5
|
+
export declare const defaultContext: {
|
|
6
|
+
globalConfig: GlobalConfigProvider;
|
|
7
|
+
};
|
|
8
|
+
export type Config = typeof defaultContext;
|
|
9
|
+
declare const ConfigContext: import("react").Context<{
|
|
10
|
+
globalConfig: GlobalConfigProvider;
|
|
11
|
+
}>;
|
|
12
|
+
export default ConfigContext;
|
|
13
|
+
export type Locale = typeof defaultLocale;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
attach: null,
|
|
7
|
-
form: {},
|
|
8
|
-
icon: {},
|
|
9
|
-
isContextEffectPlugin: false
|
|
10
|
-
};
|
|
11
|
-
var defaultContext = {
|
|
12
|
-
globalConfig: defaultGlobalConfig
|
|
13
|
-
};
|
|
14
|
-
var ConfigContext = /*#__PURE__*/createContext(defaultContext);
|
|
15
|
-
|
|
16
|
-
export { ConfigContext as default, defaultClassPrefix, defaultContext, defaultGlobalConfig };
|
|
1
|
+
import '../_chunks/dep-Cwish4GD.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
export { C as default, a as defaultClassPrefix, b as defaultContext, d as defaultGlobalConfig } from '../_chunks/dep-5U9UjDaf.js';
|
|
4
|
+
import '../_chunks/dep-D-UKOauR.js';
|
|
5
|
+
import 'dayjs';
|
|
17
6
|
//# sourceMappingURL=ConfigContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigContext.js","sources":[
|
|
1
|
+
{"version":3,"file":"ConfigContext.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Config } from "./ConfigContext";
|
|
3
|
+
import { GlobalConfigProvider } from "./type";
|
|
4
|
+
export interface ConfigProviderProps extends Config {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* 不需要设置全局上下文信息
|
|
8
|
+
* 不传或者false:表示全局上下文变动,需要更新全局上下文的信息放入到变量中
|
|
9
|
+
* true:表示全局上下文信息不需要重新设置,
|
|
10
|
+
* 解决问题:当plugin调用的时候,单独包裹的Provider 也会传全局变量,仅自身可用,多次调用时相互之间不会冲突。
|
|
11
|
+
* 插件单独的config方法依然可用。自身属性通过props传递
|
|
12
|
+
* 例如:多处调用message.config 如果每次都更新全局上下文,插件调用时配置会相互影响,导致行为结果跟预期不一致。
|
|
13
|
+
*/
|
|
14
|
+
notSet?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const merge: (src: GlobalConfigProvider, config: GlobalConfigProvider) => GlobalConfigProvider;
|
|
17
|
+
export declare const getGlobalConfig: (configInfo?: GlobalConfigProvider) => GlobalConfigProvider;
|
|
18
|
+
export declare const setGlobalConfig: (configInfo?: GlobalConfigProvider) => void;
|
|
19
|
+
declare function ConfigProvider({ children, globalConfig, notSet }: ConfigProviderProps): React.JSX.Element;
|
|
20
|
+
declare namespace ConfigProvider {
|
|
21
|
+
var getGlobalConfig: (configInfo?: GlobalConfigProvider) => GlobalConfigProvider;
|
|
22
|
+
var setGlobalConfig: (configInfo?: GlobalConfigProvider) => void;
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
export default ConfigProvider;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_chunks/dep-Cwish4GD.js';
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { mergeWith, cloneDeep } from 'lodash-es';
|
|
4
|
-
import
|
|
4
|
+
import { d as defaultGlobalConfig, C as ConfigContext } from '../_chunks/dep-5U9UjDaf.js';
|
|
5
5
|
import '../_chunks/dep-D-UKOauR.js';
|
|
6
|
+
import 'dayjs';
|
|
6
7
|
|
|
7
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigProvider.js","sources":["../../../components/config-provider/ConfigProvider.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { mergeWith as _mergeWith, cloneDeep } from \"lodash-es\";\nimport ConfigContext, { defaultGlobalConfig, Config } from \"./ConfigContext\";\nimport { GlobalConfigProvider } from \"./type\";\n\nexport interface ConfigProviderProps extends Config {\n children: React.ReactNode;\n /**\n * 不需要设置全局上下文信息\n * 不传或者false:表示全局上下文变动,需要更新全局上下文的信息放入到变量中\n * true:表示全局上下文信息不需要重新设置,\n * 解决问题:当plugin调用的时候,单独包裹的Provider 也会传全局变量,仅自身可用,多次调用时相互之间不会冲突。\n * 插件单独的config方法依然可用。自身属性通过props传递\n * 例如:多处调用message.config 如果每次都更新全局上下文,插件调用时配置会相互影响,导致行为结果跟预期不一致。\n */\n notSet?: boolean;\n}\n\nexport const merge = (src: GlobalConfigProvider, config: GlobalConfigProvider) =>\n _mergeWith(src, config, (objValue, srcValue) => {\n if (Array.isArray(objValue)) {\n return srcValue;\n }\n });\n\n// 存放全局的上下文配置\nlet globalConfig = defaultGlobalConfig;\n\nexport const getGlobalConfig = (configInfo?: GlobalConfigProvider): GlobalConfigProvider =>\n merge({ ...globalConfig }, configInfo);\n\nexport const setGlobalConfig = (configInfo?: GlobalConfigProvider) => {\n globalConfig = configInfo;\n};\n\nexport default function ConfigProvider({ children, globalConfig, notSet }: ConfigProviderProps) {\n const defaultData = cloneDeep(defaultGlobalConfig);\n const mergedGlobalConfig = merge(defaultData, globalConfig);\n\n useEffect(() => {\n if (!notSet) {\n // 需要设置的情况下,当配置信息变化时更新变量中的配置信息,方便plugin调用时获取\n setGlobalConfig(mergedGlobalConfig);\n }\n }, [mergedGlobalConfig, notSet]);\n\n return <ConfigContext.Provider value={{ globalConfig: mergedGlobalConfig }}>{children}</ConfigContext.Provider>;\n}\n\nConfigProvider.getGlobalConfig = getGlobalConfig;\nConfigProvider.setGlobalConfig = setGlobalConfig;\n\nConfigProvider.displayName = \"ConfigProvider\";\n"],"names":["merge","src","config","_mergeWith","objValue","srcValue","Array","isArray","globalConfig","defaultGlobalConfig","getGlobalConfig","configInfo","_objectSpread","setGlobalConfig","ConfigProvider","children","_ref","notSet","defaultData","cloneDeep","mergedGlobalConfig","useEffect","React","createElement","ConfigContext","Provider","value","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfigProvider.js","sources":["../../../components/config-provider/ConfigProvider.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { mergeWith as _mergeWith, cloneDeep } from \"lodash-es\";\nimport ConfigContext, { defaultGlobalConfig, Config } from \"./ConfigContext\";\nimport { GlobalConfigProvider } from \"./type\";\n\nexport interface ConfigProviderProps extends Config {\n children: React.ReactNode;\n /**\n * 不需要设置全局上下文信息\n * 不传或者false:表示全局上下文变动,需要更新全局上下文的信息放入到变量中\n * true:表示全局上下文信息不需要重新设置,\n * 解决问题:当plugin调用的时候,单独包裹的Provider 也会传全局变量,仅自身可用,多次调用时相互之间不会冲突。\n * 插件单独的config方法依然可用。自身属性通过props传递\n * 例如:多处调用message.config 如果每次都更新全局上下文,插件调用时配置会相互影响,导致行为结果跟预期不一致。\n */\n notSet?: boolean;\n}\n\nexport const merge = (src: GlobalConfigProvider, config: GlobalConfigProvider) =>\n _mergeWith(src, config, (objValue, srcValue) => {\n if (Array.isArray(objValue)) {\n return srcValue;\n }\n });\n\n// 存放全局的上下文配置\nlet globalConfig = defaultGlobalConfig;\n\nexport const getGlobalConfig = (configInfo?: GlobalConfigProvider): GlobalConfigProvider =>\n merge({ ...globalConfig }, configInfo);\n\nexport const setGlobalConfig = (configInfo?: GlobalConfigProvider) => {\n globalConfig = configInfo;\n};\n\nexport default function ConfigProvider({ children, globalConfig, notSet }: ConfigProviderProps) {\n const defaultData = cloneDeep(defaultGlobalConfig);\n const mergedGlobalConfig = merge(defaultData, globalConfig);\n\n useEffect(() => {\n if (!notSet) {\n // 需要设置的情况下,当配置信息变化时更新变量中的配置信息,方便plugin调用时获取\n setGlobalConfig(mergedGlobalConfig);\n }\n }, [mergedGlobalConfig, notSet]);\n\n return <ConfigContext.Provider value={{ globalConfig: mergedGlobalConfig }}>{children}</ConfigContext.Provider>;\n}\n\nConfigProvider.getGlobalConfig = getGlobalConfig;\nConfigProvider.setGlobalConfig = setGlobalConfig;\n\nConfigProvider.displayName = \"ConfigProvider\";\n"],"names":["merge","src","config","_mergeWith","objValue","srcValue","Array","isArray","globalConfig","defaultGlobalConfig","getGlobalConfig","configInfo","_objectSpread","setGlobalConfig","ConfigProvider","children","_ref","notSet","defaultData","cloneDeep","mergedGlobalConfig","useEffect","React","createElement","ConfigContext","Provider","value","displayName"],"mappings":";;;;;;;;;AAkBO,IAAMA,KAAA,GAAQ,SAARA,KAAAA,CAASC,GAAA,EAA2BC,MAAA,EAAA;EAAA,OAC/CC,UAAWF,GAAA,EAAKC,MAAA,EAAQ,UAACE,QAAA,EAAUC,QAAA,EAAa;AAC9C,IAAA,IAAIC,KAAA,CAAMC,OAAA,CAAQH,QAAQ,CAAA,EAAG;AAC3B,MAAA,OAAOC,QAAA;AACT,IAAA;AACF,EAAA,CAAC,CAAA;AAAA;AAGH,IAAIG,YAAA,GAAeC,mBAAA;IAENC,eAAA,GAAkB,SAAlBA,eAAAA,CAAmBC,UAAA,EAAA;AAAA,EAAA,OAC9BX,KAAA,CAAAY,aAAA,KAAWJ,YAAA,CAAA,EAAgBG,UAAU,CAAA;AAAA;IAE1BE,eAAA,GAAkB,SAAlBA,eAAAA,CAAmBF,UAAA,EAAsC;AACpEH,EAAAA,YAAA,GAAeG,UAAA;AACjB;AAEA,SAAwBG,qBAAwE;AAAA,EAAA,IAAvDC,QAAA,GAAAC,IAAA,CAAAD,QAAA;IAAUP,aAAAA,GAAAA,IAAAA,CAAAA,YAAA;IAAcS,cAAAA;AAC/D,EAAA,IAAMC,WAAA,GAAcC,UAAUV,mBAAmB,CAAA;AACjD,EAAA,IAAMW,kBAAA,GAAqBpB,KAAA,CAAMkB,WAAA,EAAaV,aAAY,CAAA;AAE1Da,EAAAA,SAAA,CAAU,YAAM;IACd,IAAI,CAACJ,MAAA,EAAQ;MAEXJ,eAAA,CAAgBO,kBAAkB,CAAA;AACpC,IAAA;AACF,EAAA,CAAA,EAAG,CAACA,kBAAA,EAAoBH,MAAM,CAAC,CAAA;EAE/B,sBAAOK,KAAA,CAAAC,aAAA,CAACC,cAAcC,QAAA,EAAd;AAAuBC,IAAAA,OAAO;AAAElB,MAAAA,YAAA,EAAcY;AAAmB;GAAA,EAAIL,QAAS,CAAA;AACxF;AAEAD,cAAA,CAAeJ,eAAA,GAAkBA,eAAA;AACjCI,cAAA,CAAeD,eAAA,GAAkBA,eAAA;AAEjCC,cAAA,CAAea,WAAA,GAAc,gBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import ConfigProvider, { merge } from "./ConfigProvider";
|
|
2
|
+
import ConfigContext from "./ConfigContext";
|
|
3
|
+
export type { Config, Locale } from "./ConfigContext";
|
|
4
|
+
export type { ConfigProviderProps } from "./ConfigProvider";
|
|
5
|
+
export * from "./type";
|
|
6
|
+
export { ConfigContext, ConfigProvider, merge };
|
|
7
|
+
export default ConfigProvider;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import ConfigProvider from './ConfigProvider.js';
|
|
2
2
|
export { merge } from './ConfigProvider.js';
|
|
3
|
-
export {
|
|
3
|
+
export { C as ConfigContext } from '../_chunks/dep-5U9UjDaf.js';
|
|
4
4
|
import '../_chunks/dep-Cwish4GD.js';
|
|
5
5
|
import '../_chunks/dep-D-UKOauR.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash-es';
|
|
8
|
+
import 'dayjs';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|