@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,231 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/**
|
|
3
|
+
* 颜色
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 尺寸
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* 字体
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* 动画
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* 间距
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* 位置
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* 边框弧度
|
|
22
|
+
*/
|
|
23
|
+
.t-tips {
|
|
24
|
+
font-size: var(--td-font-size-body-small);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.t-tips.t-is-default {
|
|
28
|
+
color: #000;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.t-tips.t-is-error {
|
|
32
|
+
color: #000;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.t-tips.t-is-warning {
|
|
36
|
+
color: #000;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.t-tips.t-is-success {
|
|
40
|
+
color: #000;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.t-drawer {
|
|
44
|
+
position: fixed;
|
|
45
|
+
z-index: 1500;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
outline: none;
|
|
51
|
+
}
|
|
52
|
+
.t-drawer--lock {
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
}
|
|
55
|
+
.t-drawer--attach {
|
|
56
|
+
position: absolute;
|
|
57
|
+
}
|
|
58
|
+
.t-drawer--left, .t-drawer--right {
|
|
59
|
+
top: 0;
|
|
60
|
+
}
|
|
61
|
+
.t-drawer--left {
|
|
62
|
+
left: 0;
|
|
63
|
+
}
|
|
64
|
+
.t-drawer--right {
|
|
65
|
+
right: 0;
|
|
66
|
+
}
|
|
67
|
+
.t-drawer--top, .t-drawer--bottom {
|
|
68
|
+
left: 0;
|
|
69
|
+
}
|
|
70
|
+
.t-drawer--top {
|
|
71
|
+
top: 0;
|
|
72
|
+
}
|
|
73
|
+
.t-drawer--bottom {
|
|
74
|
+
bottom: 0;
|
|
75
|
+
}
|
|
76
|
+
.t-drawer__mask {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 0;
|
|
79
|
+
left: 0;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
background-color: var(--td-mask-active);
|
|
83
|
+
-webkit-transition: opacity 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
84
|
+
transition: opacity 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
.t-drawer__content-wrapper {
|
|
88
|
+
display: -webkit-box;
|
|
89
|
+
display: -ms-flexbox;
|
|
90
|
+
display: flex;
|
|
91
|
+
-webkit-box-orient: vertical;
|
|
92
|
+
-webkit-box-direction: normal;
|
|
93
|
+
-ms-flex-direction: column;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
background: var(--td-bg-color-container);
|
|
96
|
+
width: 16px;
|
|
97
|
+
height: 16px;
|
|
98
|
+
font-size: var(--td-font-body-medium);
|
|
99
|
+
color: var(--td-text-color-secondary);
|
|
100
|
+
-webkit-box-shadow: var(--td-shadow-2);
|
|
101
|
+
box-shadow: var(--td-shadow-2);
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
pointer-events: auto;
|
|
104
|
+
-webkit-transition: visibility 0.28s cubic-bezier(0.38, 0, 0.24, 1), -webkit-transform 0.28s cubic-bezier(0.38, 0, 0.24, 1);
|
|
105
|
+
transition: visibility 0.28s cubic-bezier(0.38, 0, 0.24, 1), -webkit-transform 0.28s cubic-bezier(0.38, 0, 0.24, 1);
|
|
106
|
+
transition: transform 0.28s cubic-bezier(0.38, 0, 0.24, 1), visibility 0.28s cubic-bezier(0.38, 0, 0.24, 1);
|
|
107
|
+
transition: transform 0.28s cubic-bezier(0.38, 0, 0.24, 1), visibility 0.28s cubic-bezier(0.38, 0, 0.24, 1), -webkit-transform 0.28s cubic-bezier(0.38, 0, 0.24, 1);
|
|
108
|
+
position: relative;
|
|
109
|
+
}
|
|
110
|
+
.t-drawer .t-drawer__content-wrapper {
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 100%;
|
|
114
|
+
visibility: hidden;
|
|
115
|
+
}
|
|
116
|
+
.t-drawer .t-drawer__content-wrapper--left, .t-drawer .t-drawer__content-wrapper--right {
|
|
117
|
+
top: 0;
|
|
118
|
+
}
|
|
119
|
+
.t-drawer .t-drawer__content-wrapper--left {
|
|
120
|
+
left: 0;
|
|
121
|
+
-webkit-transform: translateX(-100%);
|
|
122
|
+
transform: translateX(-100%);
|
|
123
|
+
}
|
|
124
|
+
.t-drawer .t-drawer__content-wrapper--right {
|
|
125
|
+
right: 0;
|
|
126
|
+
-webkit-transform: translateX(100%);
|
|
127
|
+
transform: translateX(100%);
|
|
128
|
+
}
|
|
129
|
+
.t-drawer .t-drawer__content-wrapper--top, .t-drawer .t-drawer__content-wrapper--bottom {
|
|
130
|
+
left: 0;
|
|
131
|
+
}
|
|
132
|
+
.t-drawer .t-drawer__content-wrapper--top {
|
|
133
|
+
top: 0;
|
|
134
|
+
-webkit-transform: translateY(-100%);
|
|
135
|
+
transform: translateY(-100%);
|
|
136
|
+
}
|
|
137
|
+
.t-drawer .t-drawer__content-wrapper--bottom {
|
|
138
|
+
bottom: 0;
|
|
139
|
+
-webkit-transform: translateY(100%);
|
|
140
|
+
transform: translateY(100%);
|
|
141
|
+
}
|
|
142
|
+
.t-drawer__header {
|
|
143
|
+
display: -webkit-box;
|
|
144
|
+
display: -ms-flexbox;
|
|
145
|
+
display: flex;
|
|
146
|
+
-webkit-box-align: center;
|
|
147
|
+
-ms-flex-align: center;
|
|
148
|
+
align-items: center;
|
|
149
|
+
min-height: var(--td-comp-size-xxxl);
|
|
150
|
+
padding: 0 var(--td-comp-paddingLR-l);
|
|
151
|
+
font: var(--td-font-title-medium);
|
|
152
|
+
color: var(--td-text-color-primary);
|
|
153
|
+
border-bottom: 1px solid var(--td-border-level-1-color);
|
|
154
|
+
border-radius: var(--td-radius-small) var(--td-radius-small) 0 0;
|
|
155
|
+
-webkit-box-sizing: border-box;
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
}
|
|
158
|
+
.t-drawer__body {
|
|
159
|
+
padding: var(--td-comp-paddingTB-l) var(--td-comp-paddingLR-l);
|
|
160
|
+
overflow: auto;
|
|
161
|
+
-webkit-box-flex: 1;
|
|
162
|
+
-ms-flex: 1;
|
|
163
|
+
flex: 1;
|
|
164
|
+
}
|
|
165
|
+
.t-drawer__footer {
|
|
166
|
+
width: 100%;
|
|
167
|
+
padding: var(--td-comp-paddingTB-l) var(--td-comp-paddingLR-l);
|
|
168
|
+
text-align: left;
|
|
169
|
+
border-top: 1px solid var(--td-border-level-1-color);
|
|
170
|
+
background-color: var(--td-bg-color-container);
|
|
171
|
+
-webkit-box-sizing: border-box;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
}
|
|
174
|
+
.t-drawer__footer .t-button {
|
|
175
|
+
margin-left: var(--td-comp-margin-s);
|
|
176
|
+
}
|
|
177
|
+
.t-drawer__footer .t-button:first-child {
|
|
178
|
+
margin-left: 0;
|
|
179
|
+
}
|
|
180
|
+
.t-drawer__close-btn {
|
|
181
|
+
position: absolute;
|
|
182
|
+
display: -webkit-box;
|
|
183
|
+
display: -ms-flexbox;
|
|
184
|
+
display: flex;
|
|
185
|
+
-webkit-box-pack: center;
|
|
186
|
+
-ms-flex-pack: center;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
-webkit-box-align: center;
|
|
189
|
+
-ms-flex-align: center;
|
|
190
|
+
align-items: center;
|
|
191
|
+
width: var(--td-comp-size-xs);
|
|
192
|
+
height: var(--td-comp-size-xs);
|
|
193
|
+
top: calc((var(--td-comp-size-xxxl) - var(--td-comp-size-xs)) / 2);
|
|
194
|
+
right: var(--td-comp-margin-s);
|
|
195
|
+
color: var(--td-text-color-primary);
|
|
196
|
+
background-color: var(--td-bg-color-container);
|
|
197
|
+
border-radius: var(--td-radius-default);
|
|
198
|
+
cursor: pointer;
|
|
199
|
+
-webkit-transition: background-color 0.2s;
|
|
200
|
+
transition: background-color 0.2s;
|
|
201
|
+
}
|
|
202
|
+
.t-drawer__close-btn:hover {
|
|
203
|
+
background-color: var(--td-bg-color-container-hover);
|
|
204
|
+
}
|
|
205
|
+
.t-drawer__close-btn:active {
|
|
206
|
+
background-color: var(--td-bg-color-container-active);
|
|
207
|
+
}
|
|
208
|
+
.t-drawer__close-btn .t-icon {
|
|
209
|
+
font-size: calc(var(--td-font-size-body-medium) + 2px);
|
|
210
|
+
vertical-align: unset;
|
|
211
|
+
}
|
|
212
|
+
.t-drawer--open {
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
pointer-events: auto;
|
|
216
|
+
}
|
|
217
|
+
.t-drawer--open > .t-drawer__content-wrapper {
|
|
218
|
+
visibility: visible;
|
|
219
|
+
}
|
|
220
|
+
.t-drawer--open > .t-drawer__mask {
|
|
221
|
+
opacity: 1;
|
|
222
|
+
width: 100%;
|
|
223
|
+
height: 100%;
|
|
224
|
+
}
|
|
225
|
+
.t-drawer--without-mask {
|
|
226
|
+
pointer-events: none;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
[tabindex="-1"]:focus {
|
|
230
|
+
outline: none !important;
|
|
231
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { ButtonProps } from "../button";
|
|
2
|
+
import { TNode, Styles, AttachNode } from "../common";
|
|
3
|
+
import { MouseEvent, KeyboardEvent } from "react";
|
|
4
|
+
export interface TdDrawerProps {
|
|
5
|
+
/**
|
|
6
|
+
* 抽屉挂载的节点,默认挂在组件本身的位置。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body
|
|
7
|
+
*/
|
|
8
|
+
attach?: AttachNode;
|
|
9
|
+
/**
|
|
10
|
+
* 抽屉内容
|
|
11
|
+
*/
|
|
12
|
+
body?: TNode;
|
|
13
|
+
/**
|
|
14
|
+
* 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件
|
|
15
|
+
*/
|
|
16
|
+
cancelBtn?: FooterButton;
|
|
17
|
+
/**
|
|
18
|
+
* 抽屉内容,同 body
|
|
19
|
+
*/
|
|
20
|
+
children?: TNode;
|
|
21
|
+
/**
|
|
22
|
+
* 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。值类型为 TNode,则表示呈现自定义按钮示例
|
|
23
|
+
*/
|
|
24
|
+
closeBtn?: TNode;
|
|
25
|
+
/**
|
|
26
|
+
* 按下 ESC 时是否触发抽屉关闭事件
|
|
27
|
+
*/
|
|
28
|
+
closeOnEscKeydown?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 点击蒙层时是否触发抽屉关闭事件
|
|
31
|
+
*/
|
|
32
|
+
closeOnOverlayClick?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 取消按钮,可自定义。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件
|
|
35
|
+
*/
|
|
36
|
+
confirmBtn?: FooterButton;
|
|
37
|
+
/**
|
|
38
|
+
* 抽屉关闭时是否销毁节点
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
destroyOnClose?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 底部操作栏,默认会有“确认”和“取消”两个按钮。值为 true 显示默认操作按钮,值为 false 或 null 不显示任何内容,值类型为 TNode 表示自定义底部内容
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
footer?: TNode;
|
|
47
|
+
/**
|
|
48
|
+
* 是否强制渲染Drawer
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
forceRender?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 头部内容。值为 true 显示空白头部,值为 false 不显示头部,值类型为 string 则直接显示值,值类型为 TNode 表示自定义头部内容
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
header?: TNode;
|
|
57
|
+
/**
|
|
58
|
+
* 是否启用抽屉懒加载,启用时抽屉的内容不渲染
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
lazy?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 展开方式,有两种:直接展示在内容上方 和 推开内容区域
|
|
64
|
+
* @default overlay
|
|
65
|
+
*/
|
|
66
|
+
mode?: "overlay" | "push";
|
|
67
|
+
/**
|
|
68
|
+
* 抽屉方向
|
|
69
|
+
* @default right
|
|
70
|
+
*/
|
|
71
|
+
placement?: "left" | "right" | "top" | "bottom";
|
|
72
|
+
/**
|
|
73
|
+
* 防止滚动穿透
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
preventScrollThrough?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
showInAttachedElement?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 是否显示遮罩层
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
|
+
showOverlay?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 尺寸,支持 'small', 'medium', 'large','35px', '30%', '3em' 等。纵向抽屉调整的是抽屉宽度,横向抽屉调整的是抽屉高度
|
|
89
|
+
*/
|
|
90
|
+
size?: string;
|
|
91
|
+
/**
|
|
92
|
+
* 抽屉大小可拖拽调整,横向抽屉调整宽度
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
sizeDraggable?: boolean | SizeDragLimit;
|
|
96
|
+
/**
|
|
97
|
+
* 组件是否可见
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
visible?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* 抽屉层级,样式默认为 1500
|
|
103
|
+
*/
|
|
104
|
+
zIndex?: number;
|
|
105
|
+
/**
|
|
106
|
+
* 对话框执行消失动画效果前触发
|
|
107
|
+
*/
|
|
108
|
+
onBeforeClose?: () => void;
|
|
109
|
+
/**
|
|
110
|
+
* 对话框执行弹出动画效果前触发
|
|
111
|
+
*/
|
|
112
|
+
onBeforeOpen?: () => void;
|
|
113
|
+
/**
|
|
114
|
+
* 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件
|
|
115
|
+
*/
|
|
116
|
+
onCancel?: (context: {
|
|
117
|
+
e: MouseEvent<HTMLDivElement | HTMLButtonElement>;
|
|
118
|
+
}) => void;
|
|
119
|
+
/**
|
|
120
|
+
* 关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发
|
|
121
|
+
*/
|
|
122
|
+
onClose?: (context: DrawerCloseContext) => void;
|
|
123
|
+
/**
|
|
124
|
+
* 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件
|
|
125
|
+
*/
|
|
126
|
+
onCloseBtnClick?: (context: {
|
|
127
|
+
e: MouseEvent<HTMLDivElement>;
|
|
128
|
+
}) => void;
|
|
129
|
+
/**
|
|
130
|
+
* 如果“确认”按钮存在,则点击“确认”按钮时触发
|
|
131
|
+
*/
|
|
132
|
+
onConfirm?: (context: {
|
|
133
|
+
e: MouseEvent<HTMLDivElement | HTMLButtonElement>;
|
|
134
|
+
}) => void;
|
|
135
|
+
/**
|
|
136
|
+
* 按下 ESC 键时触发
|
|
137
|
+
*/
|
|
138
|
+
onEscKeydown?: (context: {
|
|
139
|
+
e: KeyboardEvent<HTMLDivElement>;
|
|
140
|
+
}) => void;
|
|
141
|
+
/**
|
|
142
|
+
* 如果蒙层存在,点击蒙层时触发
|
|
143
|
+
*/
|
|
144
|
+
onOverlayClick?: (context: {
|
|
145
|
+
e: MouseEvent<HTMLDivElement>;
|
|
146
|
+
}) => void;
|
|
147
|
+
/**
|
|
148
|
+
* 抽屉大小调整结束事件
|
|
149
|
+
*/
|
|
150
|
+
onSizeDragEnd?: (context: {
|
|
151
|
+
e: globalThis.MouseEvent;
|
|
152
|
+
size: number;
|
|
153
|
+
}) => void;
|
|
154
|
+
}
|
|
155
|
+
export interface DrawerOptions extends Omit<TdDrawerProps, "attach"> {
|
|
156
|
+
/**
|
|
157
|
+
* 抽屉挂载的节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body
|
|
158
|
+
* @default 'body'
|
|
159
|
+
*/
|
|
160
|
+
attach?: AttachNode;
|
|
161
|
+
/**
|
|
162
|
+
* 抽屉类名,示例:'t-class-drawer-first t-class-drawer-second'
|
|
163
|
+
* @default ''
|
|
164
|
+
*/
|
|
165
|
+
className?: string;
|
|
166
|
+
/**
|
|
167
|
+
* 弹框 style 属性,输入 [CSSStyleDeclaration.cssText](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)
|
|
168
|
+
*/
|
|
169
|
+
style?: Styles;
|
|
170
|
+
}
|
|
171
|
+
export interface DrawerInstance {
|
|
172
|
+
/**
|
|
173
|
+
* 销毁抽屉
|
|
174
|
+
*/
|
|
175
|
+
destroy?: () => void;
|
|
176
|
+
/**
|
|
177
|
+
* 隐藏抽屉
|
|
178
|
+
*/
|
|
179
|
+
hide?: () => void;
|
|
180
|
+
/**
|
|
181
|
+
* 显示抽屉
|
|
182
|
+
*/
|
|
183
|
+
show?: () => void;
|
|
184
|
+
/**
|
|
185
|
+
* 更新抽屉内容
|
|
186
|
+
*/
|
|
187
|
+
update?: (props: DrawerOptions) => void;
|
|
188
|
+
}
|
|
189
|
+
export type FooterButton = string | ButtonProps | TNode;
|
|
190
|
+
export interface SizeDragLimit {
|
|
191
|
+
max: number;
|
|
192
|
+
min: number;
|
|
193
|
+
}
|
|
194
|
+
export type DrawerEventSource = "esc" | "close-btn" | "cancel" | "overlay";
|
|
195
|
+
export interface DrawerCloseContext {
|
|
196
|
+
trigger: DrawerEventSource;
|
|
197
|
+
e: MouseEvent<HTMLDivElement | HTMLButtonElement> | KeyboardEvent<HTMLDivElement>;
|
|
198
|
+
}
|
|
199
|
+
export type DrawerMethod = (options?: DrawerOptions) => DrawerInstance;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type Placement = "left" | "right" | "top" | "bottom";
|
|
2
|
+
interface SizeDragLimit {
|
|
3
|
+
max: number;
|
|
4
|
+
min: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function getSizeDraggable(sizeDraggable: boolean | SizeDragLimit, limit: {
|
|
7
|
+
max: number;
|
|
8
|
+
min: number;
|
|
9
|
+
}): {
|
|
10
|
+
allowSizeDraggable: boolean;
|
|
11
|
+
max: number;
|
|
12
|
+
min: number;
|
|
13
|
+
};
|
|
14
|
+
type IOptions = {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
maxWidth: number;
|
|
18
|
+
maxHeight: number;
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function calcMoveSize(placement: Placement, opts: IOptions): number;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
function getSizeDraggable(sizeDraggable, limit) {
|
|
2
|
+
if (typeof sizeDraggable === "boolean") {
|
|
3
|
+
return {
|
|
4
|
+
allowSizeDraggable: sizeDraggable,
|
|
5
|
+
max: limit.max,
|
|
6
|
+
min: limit.min
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
allowSizeDraggable: true,
|
|
11
|
+
max: sizeDraggable.max,
|
|
12
|
+
min: sizeDraggable.min
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function calcSizeRange(size, min, max) {
|
|
16
|
+
return Math.min(Math.max(size, min), max);
|
|
17
|
+
}
|
|
18
|
+
function calcMoveSize(placement, opts) {
|
|
19
|
+
var x = opts.x,
|
|
20
|
+
y = opts.y,
|
|
21
|
+
max = opts.max,
|
|
22
|
+
min = opts.min,
|
|
23
|
+
maxWidth = opts.maxWidth,
|
|
24
|
+
maxHeight = opts.maxHeight;
|
|
25
|
+
var moveSize;
|
|
26
|
+
switch (placement) {
|
|
27
|
+
case "right":
|
|
28
|
+
moveSize = calcSizeRange(maxWidth - x, min, max);
|
|
29
|
+
break;
|
|
30
|
+
case "left":
|
|
31
|
+
moveSize = calcSizeRange(x, min, max);
|
|
32
|
+
break;
|
|
33
|
+
case "top":
|
|
34
|
+
moveSize = calcSizeRange(y, min, max);
|
|
35
|
+
break;
|
|
36
|
+
case "bottom":
|
|
37
|
+
moveSize = calcSizeRange(maxHeight - y, min, max);
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
return moveSize;
|
|
41
|
+
}
|
|
42
|
+
return moveSize;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { calcMoveSize, getSizeDraggable };
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../components/drawer/utils/index.ts"],"sourcesContent":["type Placement = \"left\" | \"right\" | \"top\" | \"bottom\";\n\ninterface SizeDragLimit {\n max: number;\n min: number;\n}\n\nexport function getSizeDraggable(sizeDraggable: boolean | SizeDragLimit, limit: { max: number; min: number }) {\n if (typeof sizeDraggable === \"boolean\") {\n return {\n allowSizeDraggable: sizeDraggable,\n max: limit.max,\n min: limit.min\n };\n }\n\n return {\n allowSizeDraggable: true,\n max: sizeDraggable.max,\n min: sizeDraggable.min\n };\n}\n\ntype IOptions = {\n x: number;\n y: number;\n maxWidth: number;\n maxHeight: number;\n min: number;\n max: number;\n};\n\n// > min && < max\nfunction calcSizeRange(size: number, min: number, max: number) {\n return Math.min(Math.max(size, min), max);\n}\n\nexport function calcMoveSize(placement: Placement, opts: IOptions) {\n const { x, y, max, min, maxWidth, maxHeight } = opts;\n let moveSize: number | undefined;\n switch (placement) {\n case \"right\":\n // |<--- x --->| |\n // | maxWidth |\n // | size | > min && < max\n moveSize = calcSizeRange(maxWidth - x, min, max);\n break;\n case \"left\":\n // |<-- x -->| |\n // x > min && < max\n moveSize = calcSizeRange(x, min, max);\n break;\n case \"top\":\n // - - - - - - - -\n // | y |\n // | |\n // - - - - - - - -\n // > min && < max\n // moveSize = Math.min(Math.max(y, min), max);\n moveSize = calcSizeRange(y, min, max);\n break;\n case \"bottom\":\n // - - - - - - - -\n // | y |\n // | | maxHeight\n // - - - - - - - -\n // | size |\n // > min && < max\n moveSize = calcSizeRange(maxHeight - y, min, max);\n break;\n default:\n // 参数缺失直接返回\n return moveSize;\n }\n return moveSize;\n}\n"],"names":["getSizeDraggable","sizeDraggable","limit","allowSizeDraggable","max","min","calcSizeRange","size","Math","calcMoveSize","placement","opts","x","y","maxWidth","maxHeight","moveSize"],"mappings":"AAOO,SAASA,gBAAAA,CAAiBC,eAAwCC,KAAA,EAAqC;AAC5G,EAAA,IAAI,OAAOD,kBAAkB,SAAA,EAAW;IACtC,OAAO;AACLE,MAAAA,kBAAA,EAAoBF,aAAA;MACpBG,KAAKF,KAAA,CAAME,GAAA;MACXC,KAAKH,KAAA,CAAMG;KACb;AACF,EAAA;EAEA,OAAO;AACLF,IAAAA,kBAAA,EAAoB,IAAA;IACpBC,KAAKH,aAAA,CAAcG,GAAA;IACnBC,KAAKJ,aAAA,CAAcI;GACrB;AACF;AAYA,SAASC,aAAAA,CAAcC,IAAA,EAAcF,GAAA,EAAaD,GAAA,EAAa;AAC7D,EAAA,OAAOI,KAAKH,GAAA,CAAIG,IAAA,CAAKJ,IAAIG,IAAA,EAAMF,GAAG,GAAGD,GAAG,CAAA;AAC1C;AAEO,SAASK,YAAAA,CAAaC,WAAsBC,IAAA,EAAgB;AACjE,EAAA,IAAQC,CAAA,GAAwCD,IAAA,CAAxCC,CAAA;IAAGC,CAAA,GAAqCF,IAAA,CAArCE,CAAA;IAAGT,MAAkCO,IAAA,CAAlCP;IAAKC,GAAA,GAA6BM,IAAA,CAA7BN,GAAA;IAAKS,QAAA,GAAwBH,IAAA,CAAxBG,QAAA;IAAUC,YAAcJ,IAAA,CAAdI;AAClC,EAAA,IAAIC,QAAA;AACJ,EAAA,QAAQN,SAAA;AACN,IAAA,KAAK,OAAA;MAIHM,QAAA,GAAWV,aAAA,CAAcQ,QAAA,GAAWF,CAAA,EAAGP,GAAA,EAAKD,GAAG,CAAA;AAC/C,MAAA;AACF,IAAA,KAAK,MAAA;MAGHY,QAAA,GAAWV,aAAA,CAAcM,CAAA,EAAGP,GAAA,EAAKD,GAAG,CAAA;AACpC,MAAA;AACF,IAAA,KAAK,KAAA;MAOHY,QAAA,GAAWV,aAAA,CAAcO,CAAA,EAAGR,GAAA,EAAKD,GAAG,CAAA;AACpC,MAAA;AACF,IAAA,KAAK,QAAA;MAOHY,QAAA,GAAWV,aAAA,CAAcS,SAAA,GAAYF,CAAA,EAAGR,GAAA,EAAKD,GAAG,CAAA;AAChD,MAAA;AACF,IAAA;AAEE,MAAA,OAAOY,QAAA;AACX;AACA,EAAA,OAAOA,QAAA;AACT;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyledProps } from "../common";
|
|
3
|
+
import type { TdFireworksProps } from "./type";
|
|
4
|
+
export interface FireworksProps extends TdFireworksProps, StyledProps {
|
|
5
|
+
}
|
|
6
|
+
declare const Fireworks: React.ForwardRefExoticComponent<FireworksProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default Fireworks;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { _ as _defineProperty } from '../_chunks/dep-Cwish4GD.js';
|
|
2
|
+
import { _ as _slicedToArray } from '../_chunks/dep-CzLhKWCf.js';
|
|
3
|
+
import { _ as _objectWithoutProperties } from '../_chunks/dep-DN7d1SzH.js';
|
|
4
|
+
import React, { forwardRef, useState, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { u as useConfig } from '../_chunks/dep-gy8uvBaS.js';
|
|
7
|
+
import '../_chunks/dep-D-UKOauR.js';
|
|
8
|
+
import '../_chunks/dep-5U9UjDaf.js';
|
|
9
|
+
import 'dayjs';
|
|
10
|
+
|
|
11
|
+
var _excluded = ["className", "style", "count", "colors", "duration", "size", "interval", "particleCount", "loop", "onLaunch"];
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
var DEFAULT_COLORS = ["#FF5F6D", "#FFC371", "#00C9FF", "#92FE9D", "#C77DFF", "#F2EA02"];
|
|
15
|
+
var randomInRange = function randomInRange(min, max) {
|
|
16
|
+
return Math.random() * (max - min) + min;
|
|
17
|
+
};
|
|
18
|
+
var pickColor = function pickColor(palette) {
|
|
19
|
+
if (!palette || palette.length === 0) return DEFAULT_COLORS[0];
|
|
20
|
+
var index = Math.floor(Math.random() * palette.length);
|
|
21
|
+
return palette[index];
|
|
22
|
+
};
|
|
23
|
+
var createBurstList = function createBurstList(count, colors) {
|
|
24
|
+
return Array.from({
|
|
25
|
+
length: Math.max(1, count)
|
|
26
|
+
}).map(function (_, index) {
|
|
27
|
+
return {
|
|
28
|
+
id: "".concat(Date.now(), "-").concat(index, "-").concat(Math.random().toString(36).slice(2, 7)),
|
|
29
|
+
color: pickColor(colors),
|
|
30
|
+
left: randomInRange(8, 92),
|
|
31
|
+
top: randomInRange(15, 85),
|
|
32
|
+
delay: randomInRange(0, 500),
|
|
33
|
+
rotationOffset: randomInRange(0, 360)
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var Fireworks = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
38
|
+
var className = props.className,
|
|
39
|
+
style = props.style,
|
|
40
|
+
_props$count = props.count,
|
|
41
|
+
count = _props$count === void 0 ? 6 : _props$count,
|
|
42
|
+
_props$colors = props.colors,
|
|
43
|
+
colors = _props$colors === void 0 ? DEFAULT_COLORS : _props$colors,
|
|
44
|
+
_props$duration = props.duration,
|
|
45
|
+
duration = _props$duration === void 0 ? 2400 : _props$duration,
|
|
46
|
+
_props$size = props.size,
|
|
47
|
+
size = _props$size === void 0 ? 140 : _props$size,
|
|
48
|
+
_props$interval = props.interval,
|
|
49
|
+
interval = _props$interval === void 0 ? 2800 : _props$interval,
|
|
50
|
+
_props$particleCount = props.particleCount,
|
|
51
|
+
particleCount = _props$particleCount === void 0 ? 12 : _props$particleCount,
|
|
52
|
+
_props$loop = props.loop,
|
|
53
|
+
loop = _props$loop === void 0 ? true : _props$loop,
|
|
54
|
+
onLaunch = props.onLaunch,
|
|
55
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
56
|
+
var _useConfig = useConfig(),
|
|
57
|
+
classPrefix = _useConfig.classPrefix;
|
|
58
|
+
var componentCls = "".concat(classPrefix, "-fireworks");
|
|
59
|
+
var safeParticleCount = Math.max(6, particleCount);
|
|
60
|
+
var _useState = useState(function () {
|
|
61
|
+
return createBurstList(count, colors);
|
|
62
|
+
}),
|
|
63
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
64
|
+
bursts = _useState2[0],
|
|
65
|
+
setBursts = _useState2[1];
|
|
66
|
+
var timerRef = useRef();
|
|
67
|
+
var particleAngles = useMemo(function () {
|
|
68
|
+
return Array.from({
|
|
69
|
+
length: safeParticleCount
|
|
70
|
+
}).map(function (_, index) {
|
|
71
|
+
return 360 / safeParticleCount * index;
|
|
72
|
+
});
|
|
73
|
+
}, [safeParticleCount]);
|
|
74
|
+
var triggerLaunch = useCallback(function () {
|
|
75
|
+
var nextBursts = createBurstList(count, colors);
|
|
76
|
+
setBursts(nextBursts);
|
|
77
|
+
var context = {
|
|
78
|
+
bursts: nextBursts
|
|
79
|
+
};
|
|
80
|
+
onLaunch === null || onLaunch === void 0 || onLaunch(context);
|
|
81
|
+
}, [count, colors, onLaunch]);
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
triggerLaunch();
|
|
84
|
+
}, [triggerLaunch]);
|
|
85
|
+
useEffect(function () {
|
|
86
|
+
if (!loop) return void 0;
|
|
87
|
+
timerRef.current && clearInterval(timerRef.current);
|
|
88
|
+
timerRef.current = setInterval(triggerLaunch, Math.max(interval, duration));
|
|
89
|
+
return function () {
|
|
90
|
+
if (timerRef.current) {
|
|
91
|
+
clearInterval(timerRef.current);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}, [duration, interval, loop, triggerLaunch]);
|
|
95
|
+
useEffect(function () {
|
|
96
|
+
return function () {
|
|
97
|
+
if (timerRef.current) {
|
|
98
|
+
clearInterval(timerRef.current);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, []);
|
|
102
|
+
return /* @__PURE__ */React.createElement("div", _objectSpread({
|
|
103
|
+
ref: ref,
|
|
104
|
+
className: classNames(componentCls, className),
|
|
105
|
+
style: style,
|
|
106
|
+
role: "presentation",
|
|
107
|
+
"aria-hidden": "true"
|
|
108
|
+
}, rest), bursts.map(function (burst) {
|
|
109
|
+
var burstStyle = {
|
|
110
|
+
"--fireworks-left": "".concat(burst.left, "%"),
|
|
111
|
+
"--fireworks-top": "".concat(burst.top, "%"),
|
|
112
|
+
"--fireworks-delay": "".concat(burst.delay, "ms"),
|
|
113
|
+
"--fireworks-color": burst.color,
|
|
114
|
+
"--fireworks-size": "".concat(size, "px"),
|
|
115
|
+
"--fireworks-duration": "".concat(duration, "ms")
|
|
116
|
+
};
|
|
117
|
+
return /* @__PURE__ */React.createElement("span", {
|
|
118
|
+
key: burst.id,
|
|
119
|
+
className: "".concat(componentCls, "__burst"),
|
|
120
|
+
style: burstStyle
|
|
121
|
+
}, particleAngles.map(function (angle, index) {
|
|
122
|
+
var sparkStyle = {
|
|
123
|
+
"--fireworks-delay": "".concat(burst.delay, "ms"),
|
|
124
|
+
"--fireworks-duration": "".concat(duration, "ms"),
|
|
125
|
+
"--fireworks-color": burst.color,
|
|
126
|
+
"--fireworks-rotate": "".concat(angle + burst.rotationOffset, "deg")
|
|
127
|
+
};
|
|
128
|
+
return /* @__PURE__ */React.createElement("i", {
|
|
129
|
+
key: "".concat(burst.id, "-").concat(index),
|
|
130
|
+
className: "".concat(componentCls, "__spark"),
|
|
131
|
+
style: sparkStyle
|
|
132
|
+
});
|
|
133
|
+
}));
|
|
134
|
+
}));
|
|
135
|
+
});
|
|
136
|
+
Fireworks.displayName = "Fireworks";
|
|
137
|
+
|
|
138
|
+
export { Fireworks as default };
|
|
139
|
+
//# sourceMappingURL=Fireworks.js.map
|