tntd 2.8.38 → 2.8.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_util/context.js +1 -1
- package/es/_util/defaultRenderEmpty.js +1 -1
- package/es/_util/hooks/useFlexGapSupport.js +4 -4
- package/es/_util/hooks/useForceUpdate.js +4 -4
- package/es/_util/hooks/useScrollLock.js +64 -0
- package/es/_util/hooks/useScrollLock.js.map +1 -0
- package/es/_util/responsiveObserve.js +1 -1
- package/es/_util/styleChecker.js +1 -1
- package/es/actions/index.js +1 -1
- package/es/alert/alert.js +93 -0
- package/es/alert/alert.js.map +1 -0
- package/es/anchor/anchor.js +96 -0
- package/es/anchor/anchor.js.map +1 -0
- package/es/array-input/icon.js +32 -0
- package/es/array-input/icon.js.map +1 -0
- package/es/array-input/index.js +9 -9
- package/es/cascader/cascader.js +49 -0
- package/es/cascader/cascader.js.map +1 -0
- package/es/check-card/group.js +8 -8
- package/es/check-card/index.js +6 -6
- package/es/checkbox/checkbox-group.js +1 -1
- package/es/checkbox/checkbox.js +65 -0
- package/es/checkbox/checkbox.js.map +1 -0
- package/es/color-picker/ColorPicker.js +6 -6
- package/es/color-picker/index.js +1 -1
- package/es/columns/index.js +1 -1
- package/es/config-provider/config-provider.js +1 -1
- package/es/date-picker/DatePicker.js +128 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/descriptions/descriptions.js +5 -5
- package/es/development-login/LoginModal.js +6 -6
- package/es/development-login/index.js +4 -4
- package/es/drawer/drawer.js +2 -2
- package/es/ellipsis/Svg/CopySVG.js +1 -1
- package/es/ellipsis/Svg/TickSVG.js +1 -1
- package/es/ellipsis/index.js +16 -6
- package/es/ellipsis/index.js.map +1 -1
- package/es/empty/empty.js +2 -2
- package/es/empty/empty.stories.js +2 -2
- package/es/exception/exception.js +1 -1
- package/es/form/form.js +2 -2
- package/es/grid-v4/col.js +2 -2
- package/es/grid-v4/hooks/useBreakpoint.js +1 -1
- package/es/grid-v4/index.js +1 -1
- package/es/grid-v4/row.js +6 -6
- package/es/handle/index.js +1 -1
- package/es/handle-icon/index.js +11 -11
- package/es/icon/IconFont.js +1 -1
- package/es/icon/components/Icon.js +9 -9
- package/es/icon/components/index.js +1 -1
- package/es/icon/components/utils.js +3 -3
- package/es/icon/index.js +7 -7
- package/es/icon/twoTonePrimaryColor.js +1 -1
- package/es/icon/utils.js +1 -1
- package/es/img/Contain.js +1 -1
- package/es/img/Cover.js +5 -5
- package/es/img/index.js +5 -5
- package/es/index.js +1 -1
- package/es/input/input.js +2 -2
- package/es/input-number/index.js +1 -1
- package/es/input-number/inputNumber.js +54 -0
- package/es/input-number/inputNumber.js.map +1 -0
- package/es/label/index.js +2 -2
- package/es/loading-button/index.js +5 -5
- package/es/locale/default.js +1 -1
- package/es/locale/en_US.js +1 -1
- package/es/locale/zh_CN.js +1 -1
- package/es/modal/modal.js +1 -1
- package/es/notification/assets/index.js +1 -1
- package/es/notification/index.js +1 -1
- package/es/notification/notification.js +1 -1
- package/es/page/Box.js +1 -1
- package/es/page/index.js +7 -7
- package/es/page-container/index.js +1 -1
- package/es/page-loading/index.js +1 -1
- package/es/page-loading/index.less +4 -4
- package/es/page-loading/loading.gif +0 -0
- package/es/page-loading/loading1.gif +0 -0
- package/es/popconfirm/popconfirm.js +61 -0
- package/es/popconfirm/popconfirm.js.map +1 -0
- package/es/popover/popover.js +55 -0
- package/es/popover/popover.js.map +1 -0
- package/es/preview-text/index.js +7 -7
- package/es/progress/progress.js +148 -0
- package/es/progress/progress.js.map +1 -0
- package/es/query-form/Field/Checkbox.js +1 -1
- package/es/query-form/Field/Composition/FieldPopover.js +464 -0
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/es/query-form/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form/Field/Composition/Select.js +260 -0
- package/es/query-form/Field/Composition/Select.js.map +1 -0
- package/es/query-form/Field/Composition/SelectInput.js +112 -0
- package/es/query-form/Field/Composition/SelectInput.js.map +1 -0
- package/es/query-form/Field/Composition/ValueTag.js +240 -0
- package/es/query-form/Field/Composition/ValueTag.js.map +1 -0
- package/es/query-form/Field/Composition/index.js +448 -0
- package/es/query-form/Field/Composition/index.js.map +1 -0
- package/es/query-form/Field/Composition/index.less +145 -0
- package/es/query-form/Field/Composition/utils.js +173 -0
- package/es/query-form/Field/Composition/utils.js.map +1 -0
- package/es/query-form/Field/Select.js +6 -6
- package/es/query-form/Field/SelectInput.js +6 -6
- package/es/query-form/Field/fieldsMap.js +1 -1
- package/es/query-form/Field/index.js +10 -10
- package/es/query-form/createActions.js +1 -1
- package/es/query-form/index.js +10 -10
- package/es/query-form/useForm.js +1 -1
- package/es/query-form-v2/index.less +133 -0
- package/es/query-list-scene/List.js +13 -13
- package/es/query-list-scene/QueryForm.js +10 -10
- package/es/query-list-scene/QueryListScene.js +10 -10
- package/es/query-list-scene/Title.js +1 -1
- package/es/query-list-scene/Toolbar.js +2 -2
- package/es/query-list-scene/createActions.js +1 -1
- package/es/query-list-scene/index.js +1 -1
- package/es/query-list-scene/useActions.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/radio/radio-group.js +1 -1
- package/es/radio/radio.js +75 -0
- package/es/radio/radio.js.map +1 -0
- package/es/render-empty/render-empty.js +1 -1
- package/es/scroll-bar/Bar.js +169 -0
- package/es/scroll-bar/Bar.js.map +1 -0
- package/es/scroll-bar/Context.js +17 -0
- package/es/scroll-bar/Context.js.map +1 -0
- package/es/scroll-bar/ScrollBar.js +132 -0
- package/es/scroll-bar/ScrollBar.js.map +1 -0
- package/es/scroll-bar/Thumb.js +203 -0
- package/es/scroll-bar/Thumb.js.map +1 -0
- package/es/scroll-bar/index.js +14 -0
- package/es/scroll-bar/index.js.map +1 -0
- package/es/scroll-bar/scrollBar.less +59 -0
- package/es/scroll-bar/util.js +72 -0
- package/es/scroll-bar/util.js.map +1 -0
- package/es/segmented/index.js +2 -2
- package/es/select/select.js +2 -2
- package/es/spin/spin.js +44 -0
- package/es/spin/spin.js.map +1 -0
- package/es/steps/steps.js +2 -2
- package/es/svg-components/index.js +1 -1
- package/es/switch/switch.js +1 -1
- package/es/table/hooks/use-column-setting.js +4 -4
- package/es/table/hooks/use-expand-fixed.js +6 -6
- package/es/table/resizableTable/index.js +6 -6
- package/es/table/table-hoc.js +1 -1
- package/es/table/table.js +9 -9
- package/es/table/table.stories.js +2 -2
- package/es/table/total-shower.js +1 -1
- package/es/table/utils.js +1 -1
- package/es/table-container/index.js +1 -1
- package/es/tabs-container/index.js +1 -1
- package/es/tag/tag.js +2 -2
- package/es/time-picker/TimePicker.js +55 -0
- package/es/time-picker/TimePicker.js.map +1 -0
- package/es/title/index.js +1 -1
- package/es/tntd-action/Action.js +141 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-cascader/AntdCascader/component/context.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
- package/es/tntd-cascader/AntdCascader/config/utils.js +2 -2
- package/es/tntd-cascader/AntdCascader/index.js +7 -7
- package/es/tntd-cascader/index.js +1 -1
- package/es/tntd-cascader/rc-cascader/Cascader.js +8 -8
- package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
- package/es/tntd-cascader/rc-cascader/index.js +1 -1
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
- package/es/tntd-form/ErrorList.js +7 -7
- package/es/tntd-form/Form.js +6 -6
- package/es/tntd-form/FormItem/ItemHolder.js +6 -6
- package/es/tntd-form/FormItem/index.js +8 -8
- package/es/tntd-form/FormItemInput.js +1 -1
- package/es/tntd-form/FormItemLabel.js +2 -2
- package/es/tntd-form/FormList.js +1 -1
- package/es/tntd-form/context.js +1 -1
- package/es/tntd-form/hooks/useDebounce.js +4 -4
- package/es/tntd-form/hooks/useForm.js +5 -5
- package/es/tntd-form/hooks/useFormItemStatus.js +1 -1
- package/es/tntd-form/hooks/useFrameState.js +5 -5
- package/es/tntd-form/index.js +1 -1
- package/es/tntd-icon/index.js +1 -1
- package/es/tntd-layout/AppList.js +6 -6
- package/es/tntd-layout/Application.js +6 -6
- package/es/tntd-layout/Avatar.js +2 -2
- package/es/tntd-layout/CompatibleLanguage.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
- package/es/tntd-layout/EnterpriseLayout/Language.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/Theme.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/index.js +1 -1
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
- package/es/tntd-layout/GlobalNavigation/index.js +9 -9
- package/es/tntd-layout/Header.js +2 -2
- package/es/tntd-layout/HeaderActions.js +2 -2
- package/es/tntd-layout/HeaderNavs.js +6 -6
- package/es/tntd-layout/HeaderTabs.js +7 -7
- package/es/tntd-layout/Iconfont.js +1 -1
- package/es/tntd-layout/Language.js +6 -6
- package/es/tntd-layout/Layout.js +6 -6
- package/es/tntd-layout/Logo.js +2 -2
- package/es/tntd-layout/OrgAppList.js +6 -6
- package/es/tntd-layout/SideMenu.js +6 -6
- package/es/tntd-layout/Theme.js +6 -6
- package/es/tntd-layout/createActions.js +1 -1
- package/es/tntd-layout/images/index.js +1 -1
- package/es/tntd-layout/index.js +1 -1
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
- package/es/tntd-layout/paaslayout/Header.js +2 -2
- package/es/tntd-layout/paaslayout/Logo.js +2 -2
- package/es/tntd-layout/paaslayout/SideMenu.js +6 -6
- package/es/tntd-layout/paaslayout/index.js +6 -6
- package/es/tntd-layout/storage.js +1 -1
- package/es/tntd-modal/index.js +6 -6
- package/es/tntd-rc-select/_util/PurePanel.js +5 -5
- package/es/tntd-rc-select/_util/context.js +1 -1
- package/es/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
- package/es/tntd-rc-select/_util/getIcons.js +1 -1
- package/es/tntd-rc-select/_util/useCompactItemContext.js +2 -2
- package/es/tntd-rc-select/index.js +2 -2
- package/es/tntd-rc-select/style/index.less +20 -2
- package/es/tntd-reference/AHref/index.js +1 -1
- package/es/tntd-reference/ReferenceBatchCheck/index.js +1 -1
- package/es/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
- package/es/tntd-reference/ReferenceCheck/index.js +1 -1
- package/es/tntd-reference/ReferenceDrawer/index.js +5 -5
- package/es/tntd-reference/ReferenceInfo/index.js +1 -1
- package/es/tntd-reference/index.js +1 -1
- package/es/tntd-second-page/index.js +1 -1
- package/es/tntd-select/DropDownWrap.js +8 -8
- package/es/tntd-select/index.js +10 -9
- package/es/tntd-virtual-tree/index.js +8 -8
- package/es/tntd-virtual-tree/utils.js +28 -28
- package/es/tntd-virtual-tree-select/index.js +10 -10
- package/es/tntd-virtual-tree-select/utils.js +9 -9
- package/es/tooltip/tooltip.js +19 -5
- package/es/tooltip/tooltip.js.map +1 -1
- package/es/upload/index.js +6 -6
- package/es/upload/svg/UploadSVG.js +1 -1
- package/es/utils/checkAuth.js +4 -4
- package/es/utils/index.js +9 -9
- package/es/utils/lang.js +1 -1
- package/es/water-mark/index.js +5 -5
- package/lib/_util/context.js +3 -3
- package/lib/_util/defaultRenderEmpty.js +3 -3
- package/lib/_util/hooks/useFlexGapSupport.js +14 -15
- package/lib/_util/hooks/useForceUpdate.js +14 -15
- package/lib/_util/hooks/useScrollLock.d.ts +9 -0
- package/lib/_util/hooks/useScrollLock.d.ts.map +1 -0
- package/lib/_util/hooks/useScrollLock.js +106 -0
- package/lib/_util/hooks/useScrollLock.js.map +1 -0
- package/lib/_util/responsiveObserve.js +7 -13
- package/lib/_util/styleChecker.js +3 -3
- package/lib/actions/index.js +3 -3
- package/lib/alert/alert.d.ts +12 -0
- package/lib/alert/alert.d.ts.map +1 -0
- package/lib/alert/alert.js +147 -0
- package/lib/alert/alert.js.map +1 -0
- package/lib/anchor/anchor.d.ts +15 -0
- package/lib/anchor/anchor.d.ts.map +1 -0
- package/lib/anchor/anchor.js +131 -0
- package/lib/anchor/anchor.js.map +1 -0
- package/lib/array-input/icon.d.ts +4 -0
- package/lib/array-input/icon.d.ts.map +1 -0
- package/lib/array-input/icon.js +36 -0
- package/lib/array-input/icon.js.map +1 -0
- package/lib/array-input/index.js +30 -37
- package/lib/cascader/cascader.d.ts +10 -0
- package/lib/cascader/cascader.d.ts.map +1 -0
- package/lib/cascader/cascader.js +84 -0
- package/lib/cascader/cascader.js.map +1 -0
- package/lib/check-card/group.js +23 -24
- package/lib/check-card/index.js +24 -31
- package/lib/checkbox/checkbox-group.js +3 -3
- package/lib/checkbox/checkbox.d.ts +16 -0
- package/lib/checkbox/checkbox.d.ts.map +1 -0
- package/lib/checkbox/checkbox.js +100 -0
- package/lib/checkbox/checkbox.js.map +1 -0
- package/lib/color-picker/ColorPicker.js +24 -31
- package/lib/color-picker/index.js +3 -3
- package/lib/columns/index.js +3 -3
- package/lib/config-provider/config-provider.js +3 -3
- package/lib/date-picker/DatePicker.d.ts +21 -0
- package/lib/date-picker/DatePicker.d.ts.map +1 -0
- package/lib/date-picker/DatePicker.js +163 -0
- package/lib/date-picker/DatePicker.js.map +1 -0
- package/lib/descriptions/descriptions.js +13 -19
- package/lib/development-login/LoginModal.js +24 -31
- package/lib/development-login/index.js +14 -15
- package/lib/drawer/drawer.js +10 -16
- package/lib/ellipsis/Svg/CopySVG.js +3 -3
- package/lib/ellipsis/Svg/TickSVG.js +3 -3
- package/lib/ellipsis/index.d.ts.map +1 -1
- package/lib/ellipsis/index.js +28 -19
- package/lib/ellipsis/index.js.map +1 -1
- package/lib/empty/empty.js +10 -16
- package/lib/empty/empty.stories.js +6 -9
- package/lib/exception/exception.js +3 -3
- package/lib/form/form.js +10 -16
- package/lib/grid-v4/col.js +10 -16
- package/lib/grid-v4/hooks/useBreakpoint.js +3 -3
- package/lib/grid-v4/index.js +3 -3
- package/lib/grid-v4/row.js +24 -31
- package/lib/handle/index.js +3 -3
- package/lib/handle-icon/index.js +13 -13
- package/lib/icon/IconFont.js +3 -3
- package/lib/icon/components/Icon.js +44 -70
- package/lib/icon/components/index.js +3 -3
- package/lib/icon/components/utils.js +10 -18
- package/lib/icon/index.js +26 -33
- package/lib/icon/twoTonePrimaryColor.js +3 -3
- package/lib/icon/utils.js +3 -3
- package/lib/img/Contain.js +3 -3
- package/lib/img/Cover.js +17 -18
- package/lib/img/index.js +17 -18
- package/lib/index.js +3 -3
- package/lib/input/input.js +10 -16
- package/lib/input-number/index.js +3 -3
- package/lib/input-number/inputNumber.d.ts +10 -0
- package/lib/input-number/inputNumber.d.ts.map +1 -0
- package/lib/input-number/inputNumber.js +89 -0
- package/lib/input-number/inputNumber.js.map +1 -0
- package/lib/label/index.js +10 -16
- package/lib/loading-button/index.js +17 -18
- package/lib/locale/default.js +3 -3
- package/lib/locale/en_US.js +3 -3
- package/lib/locale/zh_CN.js +3 -3
- package/lib/modal/modal.js +3 -3
- package/lib/notification/assets/index.js +3 -3
- package/lib/notification/index.js +3 -3
- package/lib/notification/notification.js +3 -3
- package/lib/page/Box.js +3 -3
- package/lib/page/index.js +26 -33
- package/lib/page-container/index.js +3 -3
- package/lib/page-loading/index.js +3 -3
- package/lib/page-loading/index.less +4 -4
- package/lib/page-loading/loading.gif +0 -0
- package/lib/page-loading/loading1.gif +0 -0
- package/lib/popconfirm/popconfirm.d.ts +8 -0
- package/lib/popconfirm/popconfirm.d.ts.map +1 -0
- package/lib/popconfirm/popconfirm.js +96 -0
- package/lib/popconfirm/popconfirm.js.map +1 -0
- package/lib/popover/popover.d.ts +14 -0
- package/lib/popover/popover.d.ts.map +1 -0
- package/lib/popover/popover.js +90 -0
- package/lib/popover/popover.js.map +1 -0
- package/lib/preview-text/index.js +9 -9
- package/lib/progress/progress.d.ts +12 -0
- package/lib/progress/progress.d.ts.map +1 -0
- package/lib/progress/progress.js +179 -0
- package/lib/progress/progress.js.map +1 -0
- package/lib/query-form/Field/Checkbox.js +3 -3
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +19 -0
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.js +464 -0
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form/Field/Composition/Select.d.ts +4 -0
- package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/Select.js +260 -0
- package/lib/query-form/Field/Composition/Select.js.map +1 -0
- package/lib/query-form/Field/Composition/SelectInput.d.ts +3 -0
- package/lib/query-form/Field/Composition/SelectInput.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/SelectInput.js +112 -0
- package/lib/query-form/Field/Composition/SelectInput.js.map +1 -0
- package/lib/query-form/Field/Composition/ValueTag.d.ts +13 -0
- package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/ValueTag.js +240 -0
- package/lib/query-form/Field/Composition/ValueTag.js.map +1 -0
- package/lib/query-form/Field/Composition/index.d.ts +15 -0
- package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/index.js +448 -0
- package/lib/query-form/Field/Composition/index.js.map +1 -0
- package/lib/query-form/Field/Composition/index.less +145 -0
- package/lib/query-form/Field/Composition/utils.d.ts +21 -0
- package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/utils.js +173 -0
- package/lib/query-form/Field/Composition/utils.js.map +1 -0
- package/lib/query-form/Field/Select.js +24 -31
- package/lib/query-form/Field/SelectInput.js +24 -31
- package/lib/query-form/Field/fieldsMap.js +3 -3
- package/lib/query-form/Field/index.js +47 -73
- package/lib/query-form/createActions.js +3 -3
- package/lib/query-form/index.js +44 -70
- package/lib/query-form/useForm.js +3 -3
- package/lib/query-form-v2/index.less +133 -0
- package/lib/query-list-scene/List.js +41 -61
- package/lib/query-list-scene/QueryForm.js +44 -70
- package/lib/query-list-scene/QueryListScene.js +44 -70
- package/lib/query-list-scene/Title.js +3 -3
- package/lib/query-list-scene/Toolbar.js +10 -16
- package/lib/query-list-scene/createActions.js +3 -3
- package/lib/query-list-scene/index.js +3 -3
- package/lib/query-list-scene/useActions.js +3 -3
- package/lib/radio/index.js +3 -3
- package/lib/radio/radio-group.js +3 -3
- package/lib/radio/radio.d.ts +17 -0
- package/lib/radio/radio.d.ts.map +1 -0
- package/lib/radio/radio.js +110 -0
- package/lib/radio/radio.js.map +1 -0
- package/lib/render-empty/render-empty.js +3 -3
- package/lib/scroll-bar/Bar.d.ts +4 -0
- package/lib/scroll-bar/Bar.d.ts.map +1 -0
- package/lib/scroll-bar/Bar.js +169 -0
- package/lib/scroll-bar/Bar.js.map +1 -0
- package/lib/scroll-bar/Context.d.ts +7 -0
- package/lib/scroll-bar/Context.d.ts.map +1 -0
- package/lib/scroll-bar/Context.js +17 -0
- package/lib/scroll-bar/Context.js.map +1 -0
- package/lib/scroll-bar/ScrollBar.d.ts +4 -0
- package/lib/scroll-bar/ScrollBar.d.ts.map +1 -0
- package/lib/scroll-bar/ScrollBar.js +132 -0
- package/lib/scroll-bar/ScrollBar.js.map +1 -0
- package/lib/scroll-bar/Thumb.d.ts +3 -0
- package/lib/scroll-bar/Thumb.d.ts.map +1 -0
- package/lib/scroll-bar/Thumb.js +203 -0
- package/lib/scroll-bar/Thumb.js.map +1 -0
- package/lib/scroll-bar/index.d.ts +3 -0
- package/lib/scroll-bar/index.d.ts.map +1 -0
- package/lib/scroll-bar/index.js +14 -0
- package/lib/scroll-bar/index.js.map +1 -0
- package/lib/scroll-bar/scrollBar.less +59 -0
- package/lib/scroll-bar/util.d.ts +40 -0
- package/lib/scroll-bar/util.d.ts.map +1 -0
- package/lib/scroll-bar/util.js +72 -0
- package/lib/scroll-bar/util.js.map +1 -0
- package/lib/segmented/index.js +10 -16
- package/lib/select/select.js +10 -16
- package/lib/spin/spin.d.ts +9 -0
- package/lib/spin/spin.d.ts.map +1 -0
- package/lib/spin/spin.js +79 -0
- package/lib/spin/spin.js.map +1 -0
- package/lib/steps/steps.js +10 -16
- package/lib/svg-components/index.js +3 -3
- package/lib/switch/switch.js +3 -3
- package/lib/table/hooks/use-column-setting.js +14 -15
- package/lib/table/hooks/use-expand-fixed.js +30 -36
- package/lib/table/resizableTable/index.js +24 -31
- package/lib/table/table-hoc.js +3 -3
- package/lib/table/table.js +27 -34
- package/lib/table/table.stories.js +10 -16
- package/lib/table/total-shower.js +3 -3
- package/lib/table/utils.js +3 -3
- package/lib/table-container/index.js +3 -3
- package/lib/tabs-container/index.js +3 -3
- package/lib/tag/tag.js +10 -16
- package/lib/time-picker/TimePicker.d.ts +9 -0
- package/lib/time-picker/TimePicker.d.ts.map +1 -0
- package/lib/time-picker/TimePicker.js +90 -0
- package/lib/time-picker/TimePicker.js.map +1 -0
- package/lib/title/index.js +3 -3
- package/lib/tntd-action/Action.d.ts +6 -0
- package/lib/tntd-action/Action.d.ts.map +1 -0
- package/lib/tntd-action/Action.js +218 -0
- package/lib/tntd-action/Action.js.map +1 -0
- package/lib/tntd-cascader/AntdCascader/component/context.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +10 -16
- package/lib/tntd-cascader/AntdCascader/config/utils.js +10 -16
- package/lib/tntd-cascader/AntdCascader/index.js +26 -33
- package/lib/tntd-cascader/index.js +3 -3
- package/lib/tntd-cascader/rc-cascader/Cascader.js +23 -24
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +10 -16
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +26 -33
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +30 -37
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +17 -18
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +23 -24
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +16 -17
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +23 -30
- package/lib/tntd-cascader/rc-cascader/index.js +3 -3
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +6 -6
- package/lib/tntd-form/ErrorList.js +26 -33
- package/lib/tntd-form/Form.js +24 -31
- package/lib/tntd-form/FormItem/ItemHolder.js +24 -31
- package/lib/tntd-form/FormItem/index.js +23 -24
- package/lib/tntd-form/FormItemInput.js +3 -3
- package/lib/tntd-form/FormItemLabel.js +10 -16
- package/lib/tntd-form/FormList.js +3 -3
- package/lib/tntd-form/context.js +3 -3
- package/lib/tntd-form/hooks/useDebounce.js +14 -15
- package/lib/tntd-form/hooks/useForm.js +17 -18
- package/lib/tntd-form/hooks/useFormItemStatus.js +3 -3
- package/lib/tntd-form/hooks/useFrameState.js +17 -18
- package/lib/tntd-form/index.js +3 -3
- package/lib/tntd-icon/index.js +3 -3
- package/lib/tntd-layout/AppList.js +20 -24
- package/lib/tntd-layout/Application.js +20 -24
- package/lib/tntd-layout/Avatar.js +6 -9
- package/lib/tntd-layout/CompatibleLanguage.js +20 -24
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +6 -9
- package/lib/tntd-layout/EnterpriseLayout/Language.js +20 -24
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +20 -24
- package/lib/tntd-layout/EnterpriseLayout/index.js +3 -3
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +20 -24
- package/lib/tntd-layout/GlobalNavigation/index.js +26 -30
- package/lib/tntd-layout/Header.js +6 -9
- package/lib/tntd-layout/HeaderActions.js +6 -9
- package/lib/tntd-layout/HeaderNavs.js +20 -24
- package/lib/tntd-layout/HeaderTabs.js +27 -37
- package/lib/tntd-layout/Iconfont.js +3 -3
- package/lib/tntd-layout/Language.js +20 -24
- package/lib/tntd-layout/Layout.js +20 -24
- package/lib/tntd-layout/Logo.js +6 -9
- package/lib/tntd-layout/OrgAppList.js +20 -24
- package/lib/tntd-layout/SideMenu.js +20 -24
- package/lib/tntd-layout/Theme.js +20 -24
- package/lib/tntd-layout/createActions.js +3 -3
- package/lib/tntd-layout/images/index.js +3 -3
- package/lib/tntd-layout/index.js +3 -3
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +20 -24
- package/lib/tntd-layout/paaslayout/Header.js +6 -9
- package/lib/tntd-layout/paaslayout/Logo.js +6 -9
- package/lib/tntd-layout/paaslayout/SideMenu.js +20 -24
- package/lib/tntd-layout/paaslayout/index.js +20 -24
- package/lib/tntd-layout/storage.js +3 -3
- package/lib/tntd-modal/index.js +24 -31
- package/lib/tntd-rc-select/_util/PurePanel.js +17 -18
- package/lib/tntd-rc-select/_util/context.js +3 -3
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +3 -3
- package/lib/tntd-rc-select/_util/getIcons.js +3 -3
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +10 -16
- package/lib/tntd-rc-select/index.js +10 -16
- package/lib/tntd-rc-select/style/index.less +20 -2
- package/lib/tntd-reference/AHref/index.js +3 -3
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +3 -3
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +17 -18
- package/lib/tntd-reference/ReferenceCheck/index.js +3 -3
- package/lib/tntd-reference/ReferenceDrawer/index.js +17 -18
- package/lib/tntd-reference/ReferenceInfo/index.js +3 -3
- package/lib/tntd-reference/index.js +3 -3
- package/lib/tntd-second-page/index.js +3 -3
- package/lib/tntd-select/DropDownWrap.js +34 -54
- package/lib/tntd-select/index.js +40 -57
- package/lib/tntd-virtual-tree/index.js +23 -24
- package/lib/tntd-virtual-tree/utils.js +62 -66
- package/lib/tntd-virtual-tree-select/index.js +22 -23
- package/lib/tntd-virtual-tree-select/utils.js +20 -21
- package/lib/tooltip/tooltip.d.ts +1 -0
- package/lib/tooltip/tooltip.d.ts.map +1 -1
- package/lib/tooltip/tooltip.js +23 -9
- package/lib/tooltip/tooltip.js.map +1 -1
- package/lib/upload/index.js +41 -45
- package/lib/upload/svg/UploadSVG.js +3 -3
- package/lib/utils/checkAuth.js +6 -6
- package/lib/utils/index.js +20 -21
- package/lib/utils/lang.js +3 -3
- package/lib/water-mark/index.js +17 -18
- package/package.json +1 -1
|
@@ -40,24 +40,23 @@ function _interopRequireWildcard(e, r) {
|
|
|
40
40
|
}
|
|
41
41
|
return n["default"] = e, t && t.set(e, n), n;
|
|
42
42
|
}
|
|
43
|
-
function _slicedToArray(
|
|
44
|
-
return _arrayWithHoles(
|
|
43
|
+
function _slicedToArray(r, e) {
|
|
44
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
45
45
|
}
|
|
46
46
|
function _nonIterableRest() {
|
|
47
47
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48
48
|
}
|
|
49
|
-
function _unsupportedIterableToArray(
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
49
|
+
function _unsupportedIterableToArray(r, a) {
|
|
50
|
+
if (r) {
|
|
51
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
52
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
53
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
54
|
+
}
|
|
56
55
|
}
|
|
57
|
-
function _arrayLikeToArray(
|
|
58
|
-
|
|
59
|
-
for (var
|
|
60
|
-
return
|
|
56
|
+
function _arrayLikeToArray(r, a) {
|
|
57
|
+
(null == a || a > r.length) && (a = r.length);
|
|
58
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
59
|
+
return n;
|
|
61
60
|
}
|
|
62
61
|
function _iterableToArrayLimit(r, l) {
|
|
63
62
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -86,8 +85,8 @@ function _iterableToArrayLimit(r, l) {
|
|
|
86
85
|
return a;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
function _arrayWithHoles(
|
|
90
|
-
if (Array.isArray(
|
|
88
|
+
function _arrayWithHoles(r) {
|
|
89
|
+
if (Array.isArray(r)) return r;
|
|
91
90
|
}
|
|
92
91
|
var _default = exports["default"] = function _default() {
|
|
93
92
|
var _React$useState = React.useState(false),
|
|
@@ -39,24 +39,23 @@ function _interopRequireWildcard(e, r) {
|
|
|
39
39
|
}
|
|
40
40
|
return n["default"] = e, t && t.set(e, n), n;
|
|
41
41
|
}
|
|
42
|
-
function _slicedToArray(
|
|
43
|
-
return _arrayWithHoles(
|
|
42
|
+
function _slicedToArray(r, e) {
|
|
43
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
44
44
|
}
|
|
45
45
|
function _nonIterableRest() {
|
|
46
46
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47
47
|
}
|
|
48
|
-
function _unsupportedIterableToArray(
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
48
|
+
function _unsupportedIterableToArray(r, a) {
|
|
49
|
+
if (r) {
|
|
50
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
51
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
52
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
53
|
+
}
|
|
55
54
|
}
|
|
56
|
-
function _arrayLikeToArray(
|
|
57
|
-
|
|
58
|
-
for (var
|
|
59
|
-
return
|
|
55
|
+
function _arrayLikeToArray(r, a) {
|
|
56
|
+
(null == a || a > r.length) && (a = r.length);
|
|
57
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
58
|
+
return n;
|
|
60
59
|
}
|
|
61
60
|
function _iterableToArrayLimit(r, l) {
|
|
62
61
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -85,8 +84,8 @@ function _iterableToArrayLimit(r, l) {
|
|
|
85
84
|
return a;
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
|
-
function _arrayWithHoles(
|
|
89
|
-
if (Array.isArray(
|
|
87
|
+
function _arrayWithHoles(r) {
|
|
88
|
+
if (Array.isArray(r)) return r;
|
|
90
89
|
}
|
|
91
90
|
function useForceUpdate() {
|
|
92
91
|
var _React$useReducer = React.useReducer(function (x) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ScrollControlConfig {
|
|
2
|
+
debounceTime?: number;
|
|
3
|
+
throttleTime?: number;
|
|
4
|
+
scrollContainer?: HTMLElement | Window | null;
|
|
5
|
+
enableScrollObserver?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: (config?: ScrollControlConfig | undefined) => boolean;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=useScrollLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../../src/_util/hooks/useScrollLock.ts"],"names":[],"mappings":"AAGA,UAAU,mBAAmB;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAA;IAC7C,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;;AAGD,wBAoDC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
function _slicedToArray(r, e) {
|
|
9
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
10
|
+
}
|
|
11
|
+
function _nonIterableRest() {
|
|
12
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13
|
+
}
|
|
14
|
+
function _unsupportedIterableToArray(r, a) {
|
|
15
|
+
if (r) {
|
|
16
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
17
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
18
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function _arrayLikeToArray(r, a) {
|
|
22
|
+
(null == a || a > r.length) && (a = r.length);
|
|
23
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
function _iterableToArrayLimit(r, l) {
|
|
27
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
28
|
+
if (null != t) {
|
|
29
|
+
var e,
|
|
30
|
+
n,
|
|
31
|
+
i,
|
|
32
|
+
u,
|
|
33
|
+
a = [],
|
|
34
|
+
f = !0,
|
|
35
|
+
o = !1;
|
|
36
|
+
try {
|
|
37
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
38
|
+
if (Object(t) !== t) return;
|
|
39
|
+
f = !1;
|
|
40
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
41
|
+
} catch (r) {
|
|
42
|
+
o = !0, n = r;
|
|
43
|
+
} finally {
|
|
44
|
+
try {
|
|
45
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
46
|
+
} finally {
|
|
47
|
+
if (o) throw n;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return a;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function _arrayWithHoles(r) {
|
|
54
|
+
if (Array.isArray(r)) return r;
|
|
55
|
+
}
|
|
56
|
+
// ==================== 优化版 Hook ====================
|
|
57
|
+
var _default = exports["default"] = function _default(config) {
|
|
58
|
+
var _ref = config || {},
|
|
59
|
+
_ref$enableScrollObse = _ref.enableScrollObserver,
|
|
60
|
+
enableScrollObserver = _ref$enableScrollObse === void 0 ? true : _ref$enableScrollObse,
|
|
61
|
+
_ref$debounceTime = _ref.debounceTime,
|
|
62
|
+
debounceTime = _ref$debounceTime === void 0 ? 100 : _ref$debounceTime,
|
|
63
|
+
_ref$throttleTime = _ref.throttleTime,
|
|
64
|
+
throttleTime = _ref$throttleTime === void 0 ? 50 : _ref$throttleTime,
|
|
65
|
+
_ref$scrollContainer = _ref.scrollContainer,
|
|
66
|
+
scrollContainer = _ref$scrollContainer === void 0 ? window : _ref$scrollContainer;
|
|
67
|
+
// 滚动状态追踪
|
|
68
|
+
var _useState = (0, _react.useState)(false),
|
|
69
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
70
|
+
isScrolling = _useState2[0],
|
|
71
|
+
setIsScrolling = _useState2[1];
|
|
72
|
+
// 定时器引用
|
|
73
|
+
var timerRef = (0, _react.useRef)();
|
|
74
|
+
// 最后一次滚动时间戳
|
|
75
|
+
var lastScrollTime = (0, _react.useRef)(0);
|
|
76
|
+
// ==================== 核心逻辑 ====================
|
|
77
|
+
var handleScroll = (0, _react.useCallback)(function () {
|
|
78
|
+
// 节流控制:限制执行频率
|
|
79
|
+
var now = Date.now();
|
|
80
|
+
if (now - lastScrollTime.current < throttleTime) return;
|
|
81
|
+
lastScrollTime.current = now;
|
|
82
|
+
// 标记开始滚动
|
|
83
|
+
setIsScrolling(true);
|
|
84
|
+
// 防抖控制:延迟结束标记
|
|
85
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
86
|
+
timerRef.current = setTimeout(function () {
|
|
87
|
+
setIsScrolling(false);
|
|
88
|
+
}, debounceTime);
|
|
89
|
+
}, [debounceTime, throttleTime]);
|
|
90
|
+
// ==================== 事件监听 ====================
|
|
91
|
+
(0, _react.useEffect)(function () {
|
|
92
|
+
var container = scrollContainer || window;
|
|
93
|
+
if (!container || !enableScrollObserver) return;
|
|
94
|
+
// 高性能事件监听选项
|
|
95
|
+
var options = {
|
|
96
|
+
passive: true,
|
|
97
|
+
capture: true // 捕获阶段触发
|
|
98
|
+
};
|
|
99
|
+
container.addEventListener('scroll', handleScroll, options);
|
|
100
|
+
return function () {
|
|
101
|
+
container.removeEventListener('scroll', handleScroll, options);
|
|
102
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
103
|
+
};
|
|
104
|
+
}, [handleScroll, scrollContainer, enableScrollObserver]);
|
|
105
|
+
return isScrolling;
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollLock.js","sourceRoot":"","sources":["../../../src/_util/hooks/useScrollLock.ts"],"names":[],"mappings":";;AAAA,iCAAgE;AAUhE,qDAAqD;AACrD,kBAAe,CAAC,MAA4B,EAAE,EAAE;IAC9C,MAAM,EACJ,oBAAoB,GAAG,IAAI,EAC3B,YAAY,GAAG,GAAG,EAClB,YAAY,GAAG,EAAE,EACjB,eAAe,GAAG,MAAM,GACzB,GAAG,MAAM,IAAI,EAAE,CAAA;IAEhB,SAAS;IACT,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IACrD,QAAQ;IACR,MAAM,QAAQ,GAAG,IAAA,cAAM,GAAiC,CAAA;IACxD,YAAY;IACZ,MAAM,cAAc,GAAG,IAAA,cAAM,EAAC,CAAC,CAAC,CAAA;IAEhC,iDAAiD;IACjD,MAAM,YAAY,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACpC,cAAc;QACd,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QACtB,IAAI,GAAG,GAAG,cAAc,CAAC,OAAO,GAAG,YAAY;YAAE,OAAM;QACvD,cAAc,CAAC,OAAO,GAAG,GAAG,CAAA;QAE5B,SAAS;QACT,cAAc,CAAC,IAAI,CAAC,CAAA;QAEpB,cAAc;QACd,IAAI,QAAQ,CAAC,OAAO;YAAE,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QACpD,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YACjC,cAAc,CAAC,KAAK,CAAC,CAAA;QACvB,CAAC,EAAE,YAAY,CAAC,CAAA;IAClB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA;IAEhC,iDAAiD;IACjD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,SAAS,GAAG,eAAe,IAAI,MAAM,CAAA;QAC3C,IAAI,CAAC,SAAS,IAAI,CAAC,oBAAoB;YAAE,OAAM;QAE/C,YAAY;QACZ,MAAM,OAAO,GAA4B;YACvC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI,EAAE,SAAS;SACzB,CAAA;QAED,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,CAAA;QAE3D,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,CAAA;YAC9D,IAAI,QAAQ,CAAC,OAAO;gBAAE,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QACtD,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC,CAAA;IAEzD,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA","sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react'\n\n// ==================== 类型定义 ====================\ninterface ScrollControlConfig {\n debounceTime?: number // 防抖时间 (默认: 100ms)\n throttleTime?: number // 节流时间 (默认: 50ms)\n scrollContainer?: HTMLElement | Window | null\n enableScrollObserver?: boolean\n}\n\n// ==================== 优化版 Hook ====================\nexport default (config?: ScrollControlConfig) => {\n const {\n enableScrollObserver = true,\n debounceTime = 100,\n throttleTime = 50,\n scrollContainer = window,\n } = config || {}\n\n // 滚动状态追踪\n const [isScrolling, setIsScrolling] = useState(false)\n // 定时器引用\n const timerRef = useRef<ReturnType<typeof setTimeout>>()\n // 最后一次滚动时间戳\n const lastScrollTime = useRef(0)\n\n // ==================== 核心逻辑 ====================\n const handleScroll = useCallback(() => {\n // 节流控制:限制执行频率\n const now = Date.now()\n if (now - lastScrollTime.current < throttleTime) return\n lastScrollTime.current = now\n\n // 标记开始滚动\n setIsScrolling(true)\n\n // 防抖控制:延迟结束标记\n if (timerRef.current) clearTimeout(timerRef.current)\n timerRef.current = setTimeout(() => {\n setIsScrolling(false)\n }, debounceTime)\n }, [debounceTime, throttleTime])\n\n // ==================== 事件监听 ====================\n useEffect(() => {\n const container = scrollContainer || window\n if (!container || !enableScrollObserver) return\n\n // 高性能事件监听选项\n const options: AddEventListenerOptions = {\n passive: true, // 启用被动监听提升性能\n capture: true, // 捕获阶段触发\n }\n\n container.addEventListener('scroll', handleScroll, options)\n\n return () => {\n container.removeEventListener('scroll', handleScroll, options)\n if (timerRef.current) clearTimeout(timerRef.current)\n }\n }, [handleScroll, scrollContainer, enableScrollObserver])\n\n return isScrolling\n}\n"]}
|
|
@@ -13,19 +13,13 @@ function _typeof(o) {
|
|
|
13
13
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
14
14
|
}, _typeof(o);
|
|
15
15
|
}
|
|
16
|
-
function _defineProperty(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
writable: true
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
obj[key] = value;
|
|
27
|
-
}
|
|
28
|
-
return obj;
|
|
16
|
+
function _defineProperty(e, r, t) {
|
|
17
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
18
|
+
value: t,
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
configurable: !0,
|
|
21
|
+
writable: !0
|
|
22
|
+
}) : e[r] = t, e;
|
|
29
23
|
}
|
|
30
24
|
function _toPropertyKey(t) {
|
|
31
25
|
var i = _toPrimitive(t, "string");
|
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "isStyleSupport", {
|
|
|
12
12
|
});
|
|
13
13
|
var _canUseDom = _interopRequireDefault(require("rc-util/lib/Dom/canUseDom"));
|
|
14
14
|
var _styleChecker = require("rc-util/lib/Dom/styleChecker");
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
return
|
|
17
|
-
"default":
|
|
15
|
+
function _interopRequireDefault(e) {
|
|
16
|
+
return e && e.__esModule ? e : {
|
|
17
|
+
"default": e
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
var canUseDocElement = exports.canUseDocElement = function canUseDocElement() {
|
package/lib/actions/index.js
CHANGED
|
@@ -7,9 +7,9 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.less");
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
return
|
|
12
|
-
"default":
|
|
10
|
+
function _interopRequireDefault(e) {
|
|
11
|
+
return e && e.__esModule ? e : {
|
|
12
|
+
"default": e
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
var ProCardActions = function ProCardActions(props) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AlertProps as AntdAlertProps } from 'antd/lib/alert';
|
|
3
|
+
import { default as AntdAlert } from 'antd/lib/alert';
|
|
4
|
+
export * from 'antd/lib/alert';
|
|
5
|
+
export interface AlertProps extends AntdAlertProps {
|
|
6
|
+
action: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface AlertComponent extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {
|
|
9
|
+
}
|
|
10
|
+
export declare const Alert: AlertComponent;
|
|
11
|
+
export default Alert;
|
|
12
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AAIjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAEpD,cAAc,eAAe,CAAA;AAE7B,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB;AAED,UAAU,cACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;CAAG;AAI7F,eAAO,MAAM,KAAK,gBAmDC,CAAA;AAEnB,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Alert: true
|
|
8
|
+
};
|
|
9
|
+
exports["default"] = exports.Alert = void 0;
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _icon = _interopRequireDefault(require("antd/lib/icon"));
|
|
12
|
+
var _configProvider = require("antd/lib/config-provider");
|
|
13
|
+
var _alert = _interopRequireWildcard(require("antd/lib/alert"));
|
|
14
|
+
Object.keys(_alert).forEach(function (key) {
|
|
15
|
+
if (key === "default" || key === "__esModule") return;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
+
if (key in exports && exports[key] === _alert[key]) return;
|
|
18
|
+
Object.defineProperty(exports, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _alert[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
26
|
+
function _interopRequireDefault(e) {
|
|
27
|
+
return e && e.__esModule ? e : {
|
|
28
|
+
"default": e
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function _getRequireWildcardCache(e) {
|
|
32
|
+
if ("function" != typeof WeakMap) return null;
|
|
33
|
+
var r = new WeakMap(),
|
|
34
|
+
t = new WeakMap();
|
|
35
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
36
|
+
return e ? t : r;
|
|
37
|
+
})(e);
|
|
38
|
+
}
|
|
39
|
+
function _interopRequireWildcard(e, r) {
|
|
40
|
+
if (!r && e && e.__esModule) return e;
|
|
41
|
+
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
42
|
+
"default": e
|
|
43
|
+
};
|
|
44
|
+
var t = _getRequireWildcardCache(r);
|
|
45
|
+
if (t && t.has(e)) return t.get(e);
|
|
46
|
+
var n = {
|
|
47
|
+
__proto__: null
|
|
48
|
+
},
|
|
49
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
50
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
51
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
52
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
53
|
+
}
|
|
54
|
+
return n["default"] = e, t && t.set(e, n), n;
|
|
55
|
+
}
|
|
56
|
+
function _typeof(o) {
|
|
57
|
+
"@babel/helpers - typeof";
|
|
58
|
+
|
|
59
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
60
|
+
return typeof o;
|
|
61
|
+
} : function (o) {
|
|
62
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
63
|
+
}, _typeof(o);
|
|
64
|
+
}
|
|
65
|
+
function _defineProperty(e, r, t) {
|
|
66
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
67
|
+
value: t,
|
|
68
|
+
enumerable: !0,
|
|
69
|
+
configurable: !0,
|
|
70
|
+
writable: !0
|
|
71
|
+
}) : e[r] = t, e;
|
|
72
|
+
}
|
|
73
|
+
function _toPropertyKey(t) {
|
|
74
|
+
var i = _toPrimitive(t, "string");
|
|
75
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
76
|
+
}
|
|
77
|
+
function _toPrimitive(t, r) {
|
|
78
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
79
|
+
var e = t[Symbol.toPrimitive];
|
|
80
|
+
if (void 0 !== e) {
|
|
81
|
+
var i = e.call(t, r || "default");
|
|
82
|
+
if ("object" != _typeof(i)) return i;
|
|
83
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
84
|
+
}
|
|
85
|
+
return ("string" === r ? String : Number)(t);
|
|
86
|
+
}
|
|
87
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
88
|
+
var t = {};
|
|
89
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
90
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
91
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
92
|
+
}
|
|
93
|
+
return t;
|
|
94
|
+
};
|
|
95
|
+
/*
|
|
96
|
+
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
97
|
+
* @Date: 2024-03-21 19:43:36
|
|
98
|
+
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
99
|
+
* @LastEditTime: 2024-03-21 19:46:23
|
|
100
|
+
* @FilePath: /tntd/packages/tntd/src/alert/alert.tsx
|
|
101
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
var prefix = 'tnt-alert';
|
|
105
|
+
var Alert = exports.Alert = (0, _react.forwardRef)(function (_a, ref) {
|
|
106
|
+
var action = _a.action,
|
|
107
|
+
message = _a.message,
|
|
108
|
+
icon = _a.icon,
|
|
109
|
+
rest = __rest(_a, ["action", "message", "icon"]);
|
|
110
|
+
var fragment = _react["default"].createElement(_react["default"].Fragment, null, message, !!action && _react["default"].createElement("span", {
|
|
111
|
+
className: "action-btn"
|
|
112
|
+
}, action));
|
|
113
|
+
var iconTheme = 'filled';
|
|
114
|
+
var iconType = 'default';
|
|
115
|
+
switch (rest === null || rest === void 0 ? void 0 : rest.type) {
|
|
116
|
+
case 'success':
|
|
117
|
+
iconType = 'check-circle';
|
|
118
|
+
break;
|
|
119
|
+
case 'info':
|
|
120
|
+
iconType = 'info-circle';
|
|
121
|
+
break;
|
|
122
|
+
case 'error':
|
|
123
|
+
iconType = 'close-circle';
|
|
124
|
+
break;
|
|
125
|
+
case 'warning':
|
|
126
|
+
iconType = 'exclamation-circle';
|
|
127
|
+
break;
|
|
128
|
+
default:
|
|
129
|
+
iconType = 'default';
|
|
130
|
+
}
|
|
131
|
+
var iconNode = icon || (rest.type ? _react["default"].createElement(_icon["default"], {
|
|
132
|
+
className: "".concat(prefix, "-icon"),
|
|
133
|
+
type: iconType,
|
|
134
|
+
theme: iconTheme
|
|
135
|
+
}) : null);
|
|
136
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
137
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
138
|
+
return _react["default"].createElement(_alert["default"], Object.assign({
|
|
139
|
+
ref: ref
|
|
140
|
+
}, rest, {
|
|
141
|
+
message: fragment,
|
|
142
|
+
icon: iconNode,
|
|
143
|
+
className: (0, _classnames["default"])(rest === null || rest === void 0 ? void 0 : rest.className, 'tnt-alert', _defineProperty({}, "".concat(prefix, "-with-action"), action))
|
|
144
|
+
}));
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
var _default = exports["default"] = Alert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AAGzC,wDAA+B;AAC/B,6DAAwD;AACxD,0DAAoD;AACpD,4DAAkC;AAClC,gDAA6B;AAS7B,MAAM,MAAM,GAAG,WAAW,CAAA;AAEb,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CAAC,EAAkC,EAAE,GAAG,EAAE,EAAE;QAA3C,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,OAAW,EAAN,IAAI,cAAhC,6BAAkC,CAAF;IAC/B,MAAM,QAAQ,GAAG,CACf;QACG,OAAO;QACP,CAAC,CAAC,MAAM,IAAI,wCAAM,SAAS,EAAC,YAAY,IAAE,MAAM,CAAQ,CACxD,CACJ,CAAA;IAED,MAAM,SAAS,GAAc,QAAQ,CAAA;IACrC,IAAI,QAAQ,GAAG,SAAS,CAAA;IAExB,QAAQ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE;QAClB,KAAK,SAAS;YACZ,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,MAAM;YACT,QAAQ,GAAG,aAAa,CAAA;YACxB,MAAK;QACP,KAAK,OAAO;YACV,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,SAAS;YACZ,QAAQ,GAAG,oBAAoB,CAAA;YAC/B,MAAK;QACP;YACE,QAAQ,GAAG,SAAS,CAAA;KACvB;IAED,MAAM,QAAQ,GACZ,IAAI;QACJ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,8BAAC,cAAI,IAAC,SAAS,EAAE,GAAG,MAAM,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAE9F,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,8BAAC,eAAS,kBACR,GAAG,EAAE,GAAG,IACJ,IAAI,IACR,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,IAAA,oBAAS,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,WAAW,EAAE;gBACjD,CAAC,GAAG,MAAM,cAAc,CAAC,EAAE,MAAM;aAClC,CAAC,IACF,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACgB,CAAA;AAEnB,kBAAe,aAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-21 19:43:36\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-21 19:46:23\n * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { AlertProps as AntdAlertProps } from 'antd/lib/alert'\nimport type { ThemeType } from 'antd/lib/icon'\nimport Icon from 'antd/lib/icon'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport { default as AntdAlert } from 'antd/lib/alert'\nimport classname from 'classnames'\nexport * from 'antd/lib/alert'\n\nexport interface AlertProps extends AntdAlertProps {\n action: React.ReactNode\n}\n\ninterface AlertComponent\n extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {}\n\nconst prefix = 'tnt-alert'\n\nexport const Alert = forwardRef<AntdAlert, AlertProps>(\n ({ action, message, icon, ...rest }, ref) => {\n const fragment = (\n <>\n {message}\n {!!action && <span className=\"action-btn\">{action}</span>}\n </>\n )\n\n const iconTheme: ThemeType = 'filled'\n let iconType = 'default'\n\n switch (rest?.type) {\n case 'success':\n iconType = 'check-circle'\n break\n case 'info':\n iconType = 'info-circle'\n break\n case 'error':\n iconType = 'close-circle'\n break\n case 'warning':\n iconType = 'exclamation-circle'\n break\n default:\n iconType = 'default'\n }\n\n const iconNode =\n icon ||\n (rest.type ? <Icon className={`${prefix}-icon`} type={iconType} theme={iconTheme} /> : null)\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdAlert\n ref={ref}\n {...rest}\n message={fragment}\n icon={iconNode}\n className={classname(rest?.className, 'tnt-alert', {\n [`${prefix}-with-action`]: action,\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as AlertComponent\n\nexport default Alert\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AnchorProps as AntdAnchorProps, AnchorLinkProps } from 'antd/lib/anchor';
|
|
3
|
+
import { default as AntdAnchor } from 'antd/lib/anchor';
|
|
4
|
+
import { default as AntdAnchorLink } from 'antd/lib/anchor/AnchorLink';
|
|
5
|
+
export * from 'antd/lib/anchor';
|
|
6
|
+
export interface AnchorProps extends AntdAnchorProps {
|
|
7
|
+
tdAnchor?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const AnchorLink: React.ForwardRefExoticComponent<AnchorLinkProps & React.RefAttributes<AntdAnchorLink>>;
|
|
10
|
+
interface AnchorComponent extends React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<AntdAnchor>> {
|
|
11
|
+
Link: typeof AnchorLink;
|
|
12
|
+
}
|
|
13
|
+
export declare const Anchor: AnchorComponent;
|
|
14
|
+
export default Anchor;
|
|
15
|
+
//# sourceMappingURL=anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/anchor/anchor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAIrE,cAAc,gBAAgB,CAAA;AAE9B,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAGD,QAAA,MAAM,UAAU,wFAcd,CAAA;AAEF,UAAU,eACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACtF,IAAI,EAAE,OAAO,UAAU,CAAA;CACxB;AAGD,eAAO,MAAM,MAAM,iBAwBE,CAAA;AAMrB,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) {
|
|
4
|
+
"@babel/helpers - typeof";
|
|
5
|
+
|
|
6
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
} : function (o) {
|
|
9
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
+
}, _typeof(o);
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
var _exportNames = {
|
|
16
|
+
Anchor: true
|
|
17
|
+
};
|
|
18
|
+
exports["default"] = exports.Anchor = void 0;
|
|
19
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
+
var _configProvider = require("../config-provider");
|
|
21
|
+
var _anchor = _interopRequireWildcard(require("antd/lib/anchor"));
|
|
22
|
+
Object.keys(_anchor).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
25
|
+
if (key in exports && exports[key] === _anchor[key]) return;
|
|
26
|
+
Object.defineProperty(exports, key, {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _anchor[key];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
var _AnchorLink = _interopRequireDefault(require("antd/lib/anchor/AnchorLink"));
|
|
34
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
35
|
+
var _useScrollLock = _interopRequireDefault(require("../_util/hooks/useScrollLock"));
|
|
36
|
+
function _interopRequireDefault(e) {
|
|
37
|
+
return e && e.__esModule ? e : {
|
|
38
|
+
"default": e
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function _getRequireWildcardCache(e) {
|
|
42
|
+
if ("function" != typeof WeakMap) return null;
|
|
43
|
+
var r = new WeakMap(),
|
|
44
|
+
t = new WeakMap();
|
|
45
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
46
|
+
return e ? t : r;
|
|
47
|
+
})(e);
|
|
48
|
+
}
|
|
49
|
+
function _interopRequireWildcard(e, r) {
|
|
50
|
+
if (!r && e && e.__esModule) return e;
|
|
51
|
+
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
52
|
+
"default": e
|
|
53
|
+
};
|
|
54
|
+
var t = _getRequireWildcardCache(r);
|
|
55
|
+
if (t && t.has(e)) return t.get(e);
|
|
56
|
+
var n = {
|
|
57
|
+
__proto__: null
|
|
58
|
+
},
|
|
59
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
60
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
61
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
62
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
63
|
+
}
|
|
64
|
+
return n["default"] = e, t && t.set(e, n), n;
|
|
65
|
+
}
|
|
66
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
67
|
+
var t = {};
|
|
68
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
69
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
70
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
71
|
+
}
|
|
72
|
+
return t;
|
|
73
|
+
};
|
|
74
|
+
/*
|
|
75
|
+
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
76
|
+
* @Date: 2023-10-26 09:46:28
|
|
77
|
+
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
78
|
+
* @LastEditTime: 2023-10-31 09:59:35
|
|
79
|
+
* @FilePath: /tntd/packages/tntd/src/button/button.tsx
|
|
80
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
// 新增 AnchorLink 组件
|
|
84
|
+
var AnchorLink = (0, _react.forwardRef)(function (props, ref) {
|
|
85
|
+
var href = props.href,
|
|
86
|
+
children = props.children,
|
|
87
|
+
restProps = __rest(props
|
|
88
|
+
// 简单的错误处理示例
|
|
89
|
+
, ["href", "children"]);
|
|
90
|
+
// 简单的错误处理示例
|
|
91
|
+
if (typeof href !== 'string') {
|
|
92
|
+
console.error('Invalid href prop. Expected a string.');
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return _react["default"].createElement(_AnchorLink["default"], Object.assign({
|
|
96
|
+
ref: ref,
|
|
97
|
+
href: href
|
|
98
|
+
}, restProps), children);
|
|
99
|
+
});
|
|
100
|
+
// 新增 Anchor 组件
|
|
101
|
+
var Anchor = exports.Anchor = (0, _react.forwardRef)(function (props, ref) {
|
|
102
|
+
var className = props.className,
|
|
103
|
+
children = props.children,
|
|
104
|
+
_props$tdAnchor = props.tdAnchor,
|
|
105
|
+
tdAnchor = _props$tdAnchor === void 0 ? false : _props$tdAnchor,
|
|
106
|
+
restProps = __rest(props, ["className", "children", "tdAnchor"]);
|
|
107
|
+
var isScrolling = (0, _useScrollLock["default"])({
|
|
108
|
+
debounceTime: 400,
|
|
109
|
+
throttleTime: 50,
|
|
110
|
+
enableScrollObserver: tdAnchor
|
|
111
|
+
});
|
|
112
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
113
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
114
|
+
var prefixCls = getPrefixCls('anchor');
|
|
115
|
+
var anchorClass = (0, _classnames["default"])(prefixCls, className, {
|
|
116
|
+
'tnt-anchor': true,
|
|
117
|
+
'tnt-td-anchor': tdAnchor,
|
|
118
|
+
'tnt-anchor-hide': isScrolling
|
|
119
|
+
});
|
|
120
|
+
return _react["default"].createElement(_anchor["default"], Object.assign({
|
|
121
|
+
ref: ref,
|
|
122
|
+
className: anchorClass
|
|
123
|
+
}, restProps, {
|
|
124
|
+
showInkInFixed: true
|
|
125
|
+
}), children);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
// 新增 AnchorLink 组件
|
|
129
|
+
// 保留 Anchor.Link 的关系
|
|
130
|
+
Anchor.Link = AnchorLink;
|
|
131
|
+
var _default = exports["default"] = Anchor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/anchor/anchor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AACzC,wDAAmD;AAEnD,4DAAsD;AACtD,2EAAqE;AACrE,4DAAmC;AACnC,iFAAwD;AAExD,iDAA8B;AAM9B,mBAAmB;AACnB,MAAM,UAAU,GAAG,IAAA,kBAAU,EAAkC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC5E,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK;IAE9C,YAAY;MAFN,oBAAgC,CAAQ,CAAA;IAE9C,YAAY;IACZ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAA;QACtD,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL,8BAAC,oBAAc,kBAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,IAAM,SAAS,GAChD,QAAQ,CACM,CAClB,CAAA;AACH,CAAC,CAAC,CAAA;AAOF,eAAe;AACF,QAAA,MAAM,GAAG,IAAA,kBAAU,EAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACvE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAA/D,qCAAuD,CAAQ,CAAA;IACrE,MAAM,WAAW,GAAG,IAAA,uBAAa,EAAC;QAChC,YAAY,EAAE,GAAG;QACjB,YAAY,EAAE,EAAE;QAChB,oBAAoB,EAAE,QAAQ;KAC/B,CAAC,CAAA;IACF,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,MAAM,WAAW,GAAG,IAAA,oBAAU,EAAC,SAAS,EAAE,SAAS,EAAE;YACnD,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,QAAQ;YACzB,iBAAiB,EAAE,WAAW;SAC/B,CAAC,CAAA;QACF,OAAO,CACL,8BAAC,gBAAU,kBAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,IAAM,SAAS,IAAE,cAAc,EAAE,IAAI,KAC9E,QAAQ,CACE,CACd,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAoB,CAAA;AAErB,mBAAmB;AACnB,qBAAqB;AACrB,cAAM,CAAC,IAAI,GAAG,UAAU,CAAA;AAExB,kBAAe,cAAM,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-10-26 09:46:28\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-10-31 09:59:35\n * @FilePath: /tntd/packages/tntd/src/button/button.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport { ConfigConsumer } from '../config-provider'\nimport type { AnchorProps as AntdAnchorProps, AnchorLinkProps } from 'antd/lib/anchor'\nimport { default as AntdAnchor } from 'antd/lib/anchor'\nimport { default as AntdAnchorLink } from 'antd/lib/anchor/AnchorLink'\nimport classNames from 'classnames'\nimport useScrollLock from '../_util/hooks/useScrollLock'\n\nexport * from 'antd/lib/anchor'\n\nexport interface AnchorProps extends AntdAnchorProps {\n tdAnchor?: boolean\n}\n\n// 新增 AnchorLink 组件\nconst AnchorLink = forwardRef<AntdAnchorLink, AnchorLinkProps>((props, ref) => {\n const { href, children, ...restProps } = props\n\n // 简单的错误处理示例\n if (typeof href !== 'string') {\n console.error('Invalid href prop. Expected a string.')\n return null\n }\n\n return (\n <AntdAnchorLink ref={ref} href={href} {...restProps}>\n {children}\n </AntdAnchorLink>\n )\n})\n\ninterface AnchorComponent\n extends React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<AntdAnchor>> {\n Link: typeof AnchorLink\n}\n\n// 新增 Anchor 组件\nexport const Anchor = forwardRef<AntdAnchor, AnchorProps>((props, ref) => {\n const { className, children, tdAnchor = false, ...restProps } = props\n const isScrolling = useScrollLock({\n debounceTime: 400,\n throttleTime: 50,\n enableScrollObserver: tdAnchor,\n })\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('anchor')\n const anchorClass = classNames(prefixCls, className, {\n 'tnt-anchor': true,\n 'tnt-td-anchor': tdAnchor,\n 'tnt-anchor-hide': isScrolling,\n })\n return (\n <AntdAnchor ref={ref} className={anchorClass} {...restProps} showInkInFixed={true}>\n {children}\n </AntdAnchor>\n )\n }}\n </ConfigConsumer>\n )\n}) as AnchorComponent\n\n// 新增 AnchorLink 组件\n// 保留 Anchor.Link 的关系\nAnchor.Link = AnchorLink\n\nexport default Anchor\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/array-input/icon.js"],"names":[],"mappings":"AAEA,yCAaC;AAED,2CAYC"}
|