tntd 2.8.45 → 2.8.47
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 +4 -4
- 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 +147 -0
- package/es/alert/alert.js.map +1 -0
- package/es/alert/alert.less +128 -0
- package/es/anchor/anchor.js +5 -5
- package/es/array-input/index.js +9 -9
- package/es/cascader/cascader.js +84 -0
- package/es/cascader/cascader.js.map +1 -0
- package/es/cascader/cascader.less +16 -0
- package/es/check-card/group.js +8 -8
- package/es/check-card/index.js +6 -6
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox-group.js +1 -1
- package/es/checkbox/checkbox.js +100 -0
- package/es/checkbox/checkbox.js.map +1 -0
- package/es/checkbox/checkbox.less +69 -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 +163 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/date-picker/index.less +294 -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 +5 -5
- 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 +8 -8
- 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 +89 -0
- package/es/input-number/inputNumber.js.map +1 -0
- package/es/input-number/inputNumber.less +12 -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/index.less +52 -0
- package/es/modal/modal.js +6 -4
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/modal.less +16 -0
- 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/popconfirm/index.less +32 -0
- package/es/popconfirm/popconfirm.js +96 -0
- package/es/popconfirm/popconfirm.js.map +1 -0
- package/es/popover/index.less +57 -0
- package/es/popover/popover.js +90 -0
- package/es/popover/popover.js.map +1 -0
- package/es/preview-text/index.js +7 -7
- package/es/progress/progress.js +179 -0
- package/es/progress/progress.js.map +1 -0
- package/es/progress/progress.less +82 -0
- package/es/query-form/Field/Checkbox.js +1 -1
- package/es/query-form/Field/Composition/FieldPopover.js +466 -0
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/es/query-form/Field/Composition/FieldPopover.less +41 -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 +241 -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 +167 -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-backup/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form-backup/Field/Composition/index.less +114 -0
- package/es/query-form-backup/index.less +90 -0
- 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 +110 -0
- package/es/radio/radio.js.map +1 -0
- package/es/radio/radio.less +43 -0
- package/es/render-empty/render-empty.js +1 -1
- package/es/scroll-bar/Bar.js +5 -5
- package/es/scroll-bar/Context.js +1 -1
- package/es/scroll-bar/ScrollBar.js +1 -1
- package/es/scroll-bar/Thumb.js +5 -5
- package/es/scroll-bar/index.js +1 -1
- package/es/scroll-bar/util.js +1 -1
- package/es/segmented/index.js +2 -2
- package/es/select/select.js +2 -2
- package/es/spin/spin.js +79 -0
- package/es/spin/spin.js.map +1 -0
- package/es/spin/spin.less +9 -0
- package/es/steps/assets/background_left.svg +12 -0
- package/es/steps/assets/background_right.svg +12 -0
- package/es/steps/assets/horizontal_line.svg +3 -0
- package/es/steps/assets/vertical_line.svg +3 -0
- package/es/steps/stepStyle/icon.less +51 -0
- package/es/steps/stepStyle/progress-dot.less +10 -0
- package/es/steps/stepStyle/variables.less +8 -0
- package/es/steps/stepStyle/vertical.less +41 -0
- package/es/steps/steps.js +2 -2
- package/es/svg-components/index.js +1 -1
- package/es/switch/index.less +45 -0
- 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/tabs.less +125 -0
- package/es/tabs-container/index.js +1 -1
- package/es/tag/tag.js +2 -2
- package/es/time-picker/TimePicker.js +90 -0
- package/es/time-picker/TimePicker.js.map +1 -0
- package/es/time-picker/index.less +38 -0
- package/es/title/index.js +1 -1
- package/es/tntd-action/Action.js +218 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-action/index.less +61 -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-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-select/index.less +7 -0
- 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 +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.js +14 -15
- 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/alert/alert.less +128 -0
- package/lib/anchor/anchor.js +17 -18
- 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/cascader/cascader.less +16 -0
- package/lib/check-card/group.js +23 -24
- package/lib/check-card/index.js +24 -31
- package/lib/checkbox/check.png +0 -0
- 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/checkbox/checkbox.less +69 -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/date-picker/index.less +294 -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.js +17 -18
- 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 +10 -10
- 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/input-number/inputNumber.less +12 -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/index.less +52 -0
- package/lib/modal/modal.d.ts +1 -0
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +8 -6
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/modal.less +16 -0
- 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/popconfirm/index.less +32 -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/index.less +57 -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/progress/progress.less +82 -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 +466 -0
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form/Field/Composition/FieldPopover.less +41 -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 +241 -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 +167 -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-backup/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form-backup/Field/Composition/index.less +114 -0
- package/lib/query-form-backup/index.less +90 -0
- 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/radio/radio.less +43 -0
- package/lib/render-empty/render-empty.js +3 -3
- package/lib/scroll-bar/Bar.js +17 -18
- package/lib/scroll-bar/Context.js +3 -3
- package/lib/scroll-bar/ScrollBar.js +3 -3
- package/lib/scroll-bar/Thumb.js +17 -18
- package/lib/scroll-bar/index.js +3 -3
- package/lib/scroll-bar/util.js +7 -13
- 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/spin/spin.less +9 -0
- package/lib/steps/assets/background_left.svg +12 -0
- package/lib/steps/assets/background_right.svg +12 -0
- package/lib/steps/assets/horizontal_line.svg +3 -0
- package/lib/steps/assets/vertical_line.svg +3 -0
- package/lib/steps/stepStyle/icon.less +51 -0
- package/lib/steps/stepStyle/progress-dot.less +10 -0
- package/lib/steps/stepStyle/variables.less +8 -0
- package/lib/steps/stepStyle/vertical.less +41 -0
- package/lib/steps/steps.js +10 -16
- package/lib/svg-components/index.js +3 -3
- package/lib/switch/index.less +45 -0
- 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/tabs.less +125 -0
- 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/time-picker/index.less +38 -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-action/index.less +61 -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-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-select/index.less +7 -0
- 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.js +3 -3
- 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 +2 -2
- package/es/array-input/utils.js +0 -414
- package/es/array-input/utils.js.map +0 -1
- package/lib/array-input/utils.d.ts +0 -2
- package/lib/array-input/utils.d.ts.map +0 -1
- package/lib/array-input/utils.js +0 -414
- package/lib/array-input/utils.js.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
exports["default"] = void 0;
|
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
|
+
var _configProvider = require("antd/lib/config-provider");
|
|
19
|
+
var _popconfirm = _interopRequireWildcard(require("antd/lib/popconfirm"));
|
|
20
|
+
Object.keys(_popconfirm).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _popconfirm[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _popconfirm[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
32
|
+
function _getRequireWildcardCache(e) {
|
|
33
|
+
if ("function" != typeof WeakMap) return null;
|
|
34
|
+
var r = new WeakMap(),
|
|
35
|
+
t = new WeakMap();
|
|
36
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
37
|
+
return e ? t : r;
|
|
38
|
+
})(e);
|
|
39
|
+
}
|
|
40
|
+
function _interopRequireWildcard(e, r) {
|
|
41
|
+
if (!r && e && e.__esModule) return e;
|
|
42
|
+
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
43
|
+
"default": e
|
|
44
|
+
};
|
|
45
|
+
var t = _getRequireWildcardCache(r);
|
|
46
|
+
if (t && t.has(e)) return t.get(e);
|
|
47
|
+
var n = {
|
|
48
|
+
__proto__: null
|
|
49
|
+
},
|
|
50
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
51
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
52
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
53
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
54
|
+
}
|
|
55
|
+
return n["default"] = e, t && t.set(e, n), n;
|
|
56
|
+
}
|
|
57
|
+
function _interopRequireDefault(e) {
|
|
58
|
+
return e && e.__esModule ? e : {
|
|
59
|
+
"default": e
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
63
|
+
var t = {};
|
|
64
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
65
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
66
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
};
|
|
70
|
+
var Popconfirm = function Popconfirm(_a) {
|
|
71
|
+
var cancelButtonProps = _a.cancelButtonProps,
|
|
72
|
+
okButtonProps = _a.okButtonProps,
|
|
73
|
+
hiddenArrow = _a.hiddenArrow,
|
|
74
|
+
props = __rest(_a, ["cancelButtonProps", "okButtonProps", "hiddenArrow"]);
|
|
75
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
76
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
77
|
+
var prefixCls = getPrefixCls('popover');
|
|
78
|
+
return _react["default"].createElement(_popconfirm["default"], Object.assign({
|
|
79
|
+
cancelButtonProps: Object.assign({
|
|
80
|
+
type: 'tertiary',
|
|
81
|
+
className: (0, _classnames["default"])('tnt-btn', {
|
|
82
|
+
'tnt-btn-tertiary': (cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.type) === 'tertiary' || !(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.type),
|
|
83
|
+
'tnt-btn-mini': (cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.size) === 'mini'
|
|
84
|
+
})
|
|
85
|
+
}, cancelButtonProps),
|
|
86
|
+
okButtonProps: Object.assign({
|
|
87
|
+
className: (0, _classnames["default"])('tnt-btn', {
|
|
88
|
+
'tnt-btn-tertiary': (okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.type) === 'tertiary',
|
|
89
|
+
'tnt-btn-mini': (okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.size) === 'mini'
|
|
90
|
+
})
|
|
91
|
+
}, okButtonProps),
|
|
92
|
+
overlayClassName: (0, _classnames["default"])(hiddenArrow ? prefixCls + '-arrow-hidden' : '')
|
|
93
|
+
}, props));
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
var _default = exports["default"] = Popconfirm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popconfirm.js","sourceRoot":"","sources":["../../src/popconfirm/popconfirm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAGzB,6DAAwD;AACxD,oEAA+C;AAC/C,4DAAmC;AAEnC,qDAAkC;AAElC,MAAM,UAAU,GAA0D,CAAC,EAK1E,EAAE,EAAE;QALsE,EACzE,iBAAiB,EACjB,aAAa,EACb,WAAW,OAEZ,EADI,KAAK,cAJiE,qDAK1E,CADS;IAER,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;QACzC,OAAO,CACL,8BAAC,oBAAc,kBACb,iBAAiB,EACf,gBACE,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE;oBAC/B,kBAAkB,EAChB,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAe,MAAK,UAAU,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAA;oBAChF,cAAc,EAAE,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAe,MAAK,MAAM;iBAC/D,CAAC,IACC,iBAAiB,CACA,EAExB,aAAa,kBACX,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE;oBAC/B,kBAAkB,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAe,MAAK,UAAU;oBAClE,cAAc,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAe,MAAK,MAAM;iBAC3D,CAAC,IACC,aAAa,GAElB,gBAAgB,EAAE,IAAA,oBAAU,EAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,IACxE,KAAK,EACT,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,UAAU,CAAA","sourcesContent":["import React from 'react'\nimport type { PopconfirmProps } from 'antd/lib/popconfirm'\nimport type { NativeButtonProps } from 'antd/lib/button/button'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdPopconfirm from 'antd/lib/popconfirm'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/popconfirm'\n\nconst Popconfirm: React.FC<PopconfirmProps & { hiddenArrow?: boolean }> = ({\n cancelButtonProps,\n okButtonProps,\n hiddenArrow,\n ...props\n}) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('popover')\n return (\n <AntdPopconfirm\n cancelButtonProps={\n {\n type: 'tertiary',\n className: classNames('tnt-btn', {\n 'tnt-btn-tertiary':\n (cancelButtonProps?.type as string) === 'tertiary' || !cancelButtonProps?.type,\n 'tnt-btn-mini': (cancelButtonProps?.size as string) === 'mini',\n }),\n ...cancelButtonProps,\n } as NativeButtonProps\n }\n okButtonProps={{\n className: classNames('tnt-btn', {\n 'tnt-btn-tertiary': (okButtonProps?.type as string) === 'tertiary',\n 'tnt-btn-mini': (okButtonProps?.size as string) === 'mini',\n }),\n ...okButtonProps,\n }}\n overlayClassName={classNames(hiddenArrow ? prefixCls + '-arrow-hidden' : '')}\n {...props}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Popconfirm\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@popover-prefix-cls: ~'@{ant-prefix}-popover';
|
|
2
|
+
|
|
3
|
+
// Base class
|
|
4
|
+
.tnt-popover.@{popover-prefix-cls} {
|
|
5
|
+
|
|
6
|
+
&-dark,
|
|
7
|
+
&-light {
|
|
8
|
+
.@{popover-prefix-cls}-title {
|
|
9
|
+
border-bottom: 0px !important;
|
|
10
|
+
padding: 10px 12px 4px !important;
|
|
11
|
+
border-bottom: 0px !important;
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.@{popover-prefix-cls}-inner {
|
|
16
|
+
&-content {
|
|
17
|
+
padding: 0px 12px 12px 12px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-dark {
|
|
23
|
+
.@{popover-prefix-cls}-title {
|
|
24
|
+
color: @popover-color-dark;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.@{popover-prefix-cls}-inner {
|
|
28
|
+
background-color: @popover-bg-dark;
|
|
29
|
+
|
|
30
|
+
&-content {
|
|
31
|
+
color: @popover-color-dark;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.@{popover-prefix-cls}-arrow {
|
|
36
|
+
border-color: @popover-arrow-color-dark !important;
|
|
37
|
+
|
|
38
|
+
&::before {
|
|
39
|
+
background-color: @popover-bg-dark;
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// Arrows
|
|
47
|
+
&-arrow {
|
|
48
|
+
border-radius: 1px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
.@{popover-prefix-cls}-arrow-hidden {
|
|
54
|
+
.@{popover-prefix-cls}-arrow {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopoverProps } from 'antd/lib/popover';
|
|
3
|
+
export * from 'antd/lib/popover';
|
|
4
|
+
interface CurProps extends PopoverProps {
|
|
5
|
+
theme?: string;
|
|
6
|
+
titleDivider?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Popover: React.FC<CurProps & {
|
|
9
|
+
theme?: string;
|
|
10
|
+
titleDivider?: boolean;
|
|
11
|
+
hiddenArrow?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export default Popover;
|
|
14
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAKnD,cAAc,iBAAiB,CAAA;AAI/B,UAAU,QAAS,SAAQ,YAAY;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CACrB,QAAQ,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CA8B7E,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
exports["default"] = void 0;
|
|
17
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
|
+
var _configProvider = require("antd/lib/config-provider");
|
|
19
|
+
var _popover = _interopRequireWildcard(require("antd/lib/popover"));
|
|
20
|
+
Object.keys(_popover).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _popover[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _popover[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
32
|
+
function _getRequireWildcardCache(e) {
|
|
33
|
+
if ("function" != typeof WeakMap) return null;
|
|
34
|
+
var r = new WeakMap(),
|
|
35
|
+
t = new WeakMap();
|
|
36
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
37
|
+
return e ? t : r;
|
|
38
|
+
})(e);
|
|
39
|
+
}
|
|
40
|
+
function _interopRequireWildcard(e, r) {
|
|
41
|
+
if (!r && e && e.__esModule) return e;
|
|
42
|
+
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
43
|
+
"default": e
|
|
44
|
+
};
|
|
45
|
+
var t = _getRequireWildcardCache(r);
|
|
46
|
+
if (t && t.has(e)) return t.get(e);
|
|
47
|
+
var n = {
|
|
48
|
+
__proto__: null
|
|
49
|
+
},
|
|
50
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
51
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
52
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
53
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
54
|
+
}
|
|
55
|
+
return n["default"] = e, t && t.set(e, n), n;
|
|
56
|
+
}
|
|
57
|
+
function _interopRequireDefault(e) {
|
|
58
|
+
return e && e.__esModule ? e : {
|
|
59
|
+
"default": e
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
63
|
+
var t = {};
|
|
64
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
65
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
66
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
};
|
|
70
|
+
var themeMap = function themeMap(prefixCls, themeColor) {
|
|
71
|
+
return "".concat(prefixCls, "-").concat(themeColor);
|
|
72
|
+
};
|
|
73
|
+
var Popover = function Popover(props) {
|
|
74
|
+
var overlayClassName = props.overlayClassName,
|
|
75
|
+
_props$theme = props.theme,
|
|
76
|
+
theme = _props$theme === void 0 ? '' : _props$theme,
|
|
77
|
+
_props$titleDivider = props.titleDivider,
|
|
78
|
+
titleDivider = _props$titleDivider === void 0 ? false : _props$titleDivider,
|
|
79
|
+
_props$hiddenArrow = props.hiddenArrow,
|
|
80
|
+
hiddenArrow = _props$hiddenArrow === void 0 ? false : _props$hiddenArrow,
|
|
81
|
+
restProps = __rest(props, ["overlayClassName", "theme", "titleDivider", "hiddenArrow"]);
|
|
82
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
83
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
84
|
+
var prefixCls = getPrefixCls('popover');
|
|
85
|
+
return _react["default"].createElement(_popover["default"], Object.assign({
|
|
86
|
+
overlayClassName: (0, _classnames["default"])(prefixCls, 'tnt-popover', themeMap(prefixCls, theme), hiddenArrow ? prefixCls + '-arrow-hidden' : '', overlayClassName)
|
|
87
|
+
}, restProps));
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
var _default = exports["default"] = Popover;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/popover/popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,6DAAwD;AACxD,8DAAyC;AACzC,4DAAmC;AAEnC,kDAA+B;AAC/B,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,UAAmB,EAAE,EAAE;IAC1D,OAAO,GAAG,SAAS,IAAI,UAAU,EAAE,CAAA;AACrC,CAAC,CAAA;AAMD,MAAM,OAAO,GAET,CAAC,KAAK,EAAE,EAAE;IACZ,MAAM,EACJ,gBAAgB,EAChB,KAAK,GAAG,EAAE,EACV,YAAY,GAAG,KAAK,EACpB,WAAW,GAAG,KAAK,KAEjB,KAAK,EADJ,SAAS,UACV,KAAK,EANH,4DAML,CAAQ,CAAA;IAET,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;QAEzC,OAAO,CACL,8BAAC,iBAAW,kBACV,gBAAgB,EAAE,IAAA,oBAAU,EAC1B,SAAS,EACT,aAAa,EACb,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,EAC1B,WAAW,CAAC,CAAC,CAAC,SAAS,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,EAC9C,gBAAgB,CACjB,IACG,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,OAAO,CAAA","sourcesContent":["import React from 'react'\nimport type { PopoverProps } from 'antd/lib/popover'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdPopover from 'antd/lib/popover'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/popover'\nconst themeMap = (prefixCls: string, themeColor?: string) => {\n return `${prefixCls}-${themeColor}`\n}\ninterface CurProps extends PopoverProps {\n theme?: string\n titleDivider?: boolean\n}\n\nconst Popover: React.FC<\n CurProps & { theme?: string; titleDivider?: boolean; hiddenArrow?: boolean }\n> = (props) => {\n const {\n overlayClassName,\n theme = '',\n titleDivider = false,\n hiddenArrow = false,\n ...restProps\n } = props\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('popover')\n\n return (\n <AntdPopover\n overlayClassName={classNames(\n prefixCls,\n 'tnt-popover',\n themeMap(prefixCls, theme),\n hiddenArrow ? prefixCls + '-arrow-hidden' : '',\n overlayClassName\n )}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Popover\n"]}
|
|
@@ -46,9 +46,9 @@ function _interopRequireWildcard(e, r) {
|
|
|
46
46
|
}
|
|
47
47
|
return n["default"] = e, t && t.set(e, n), n;
|
|
48
48
|
}
|
|
49
|
-
function _interopRequireDefault(
|
|
50
|
-
return
|
|
51
|
-
"default":
|
|
49
|
+
function _interopRequireDefault(e) {
|
|
50
|
+
return e && e.__esModule ? e : {
|
|
51
|
+
"default": e
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
var prefixCls = 'tnt-preview-text';
|
|
@@ -151,13 +151,13 @@ var TreeSelect = function TreeSelect(_ref3) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
|
-
var
|
|
154
|
+
var _findLabel = function findLabel(value, dataSource) {
|
|
155
155
|
for (var i = 0; i < (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length); i++) {
|
|
156
156
|
var item = dataSource[i];
|
|
157
157
|
if ((item === null || item === void 0 ? void 0 : item.value) === value || (item === null || item === void 0 ? void 0 : item.key) === value) {
|
|
158
158
|
return item === null || item === void 0 ? void 0 : item.title;
|
|
159
159
|
} else {
|
|
160
|
-
var childLabel =
|
|
160
|
+
var childLabel = _findLabel(value, item === null || item === void 0 ? void 0 : item.children);
|
|
161
161
|
if (childLabel) return childLabel;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -170,7 +170,7 @@ var TreeSelect = function TreeSelect(_ref3) {
|
|
|
170
170
|
label = _ref4.label;
|
|
171
171
|
return _react["default"].createElement(_react["default"].Fragment, null, multiple ? _react["default"].createElement(_tag["default"], {
|
|
172
172
|
key: key
|
|
173
|
-
},
|
|
173
|
+
}, _findLabel(value, dataSource) || label || placeholder) : _findLabel(value, dataSource) || label || placeholder);
|
|
174
174
|
});
|
|
175
175
|
};
|
|
176
176
|
return _react["default"].createElement("div", {
|
|
@@ -188,13 +188,13 @@ var Cascader = function Cascader(_ref5) {
|
|
|
188
188
|
var getSelected = function getSelected() {
|
|
189
189
|
return (0, _isArray2["default"])(value) ? value : [];
|
|
190
190
|
};
|
|
191
|
-
var
|
|
191
|
+
var _findLabel2 = function findLabel(value, dataSource) {
|
|
192
192
|
for (var i = 0; i < (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length); i++) {
|
|
193
193
|
var item = dataSource[i];
|
|
194
194
|
if ((item === null || item === void 0 ? void 0 : item.value) === value) {
|
|
195
195
|
return item === null || item === void 0 ? void 0 : item.label;
|
|
196
196
|
} else {
|
|
197
|
-
var childLabel =
|
|
197
|
+
var childLabel = _findLabel2(value, item === null || item === void 0 ? void 0 : item.children);
|
|
198
198
|
if (childLabel) return childLabel;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -205,7 +205,7 @@ var Cascader = function Cascader(_ref5) {
|
|
|
205
205
|
return placeholder;
|
|
206
206
|
}
|
|
207
207
|
return selected.map(function (value) {
|
|
208
|
-
return
|
|
208
|
+
return _findLabel2(value, dataSource) || placeholder;
|
|
209
209
|
}).join('/');
|
|
210
210
|
};
|
|
211
211
|
return _react["default"].createElement("div", {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProgressProps } from 'antd/lib/progress';
|
|
3
|
+
import './progress.less';
|
|
4
|
+
export * from 'antd/lib/tooltip';
|
|
5
|
+
interface ExtendsProgress {
|
|
6
|
+
percentPosition?: 'bottom' | 'right';
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
halfCircle?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Progress: React.FC<ProgressProps & ExtendsProgress>;
|
|
11
|
+
export default Progress;
|
|
12
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAOrD,OAAO,iBAAiB,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAE/B,UAAU,eAAe;IACvB,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAwBD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,GAAG,eAAe,CAoHvD,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {};
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _configProvider = require("antd/lib/config-provider");
|
|
10
|
+
var _progress = _interopRequireDefault(require("antd/lib/progress"));
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var _ellipsis = _interopRequireDefault(require("../ellipsis"));
|
|
13
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
14
|
+
require("./progress.less");
|
|
15
|
+
var _tooltip = require("antd/lib/tooltip");
|
|
16
|
+
Object.keys(_tooltip).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
+
if (key in exports && exports[key] === _tooltip[key]) return;
|
|
20
|
+
Object.defineProperty(exports, key, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _tooltip[key];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
function _interopRequireDefault(e) {
|
|
28
|
+
return e && e.__esModule ? e : {
|
|
29
|
+
"default": e
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _typeof(o) {
|
|
33
|
+
"@babel/helpers - typeof";
|
|
34
|
+
|
|
35
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
36
|
+
return typeof o;
|
|
37
|
+
} : function (o) {
|
|
38
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
39
|
+
}, _typeof(o);
|
|
40
|
+
}
|
|
41
|
+
function _defineProperty(e, r, t) {
|
|
42
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
43
|
+
value: t,
|
|
44
|
+
enumerable: !0,
|
|
45
|
+
configurable: !0,
|
|
46
|
+
writable: !0
|
|
47
|
+
}) : e[r] = t, e;
|
|
48
|
+
}
|
|
49
|
+
function _toPropertyKey(t) {
|
|
50
|
+
var i = _toPrimitive(t, "string");
|
|
51
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
52
|
+
}
|
|
53
|
+
function _toPrimitive(t, r) {
|
|
54
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
55
|
+
var e = t[Symbol.toPrimitive];
|
|
56
|
+
if (void 0 !== e) {
|
|
57
|
+
var i = e.call(t, r || "default");
|
|
58
|
+
if ("object" != _typeof(i)) return i;
|
|
59
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
60
|
+
}
|
|
61
|
+
return ("string" === r ? String : Number)(t);
|
|
62
|
+
}
|
|
63
|
+
var iconMap = {
|
|
64
|
+
line: {
|
|
65
|
+
success: 'check-circle',
|
|
66
|
+
exception: 'close-circle'
|
|
67
|
+
},
|
|
68
|
+
circle: {
|
|
69
|
+
success: 'check',
|
|
70
|
+
exception: 'close'
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var ifPercentBottom = function ifPercentBottom(type, percentPosition) {
|
|
74
|
+
return type === 'line' && percentPosition === 'bottom';
|
|
75
|
+
};
|
|
76
|
+
var percentTransform = function percentTransform(percent) {
|
|
77
|
+
return percent >= 100 ? 100 : percent <= 0 ? 0 : percent;
|
|
78
|
+
};
|
|
79
|
+
var themeStrokeColor = function themeStrokeColor(status, strokeColor, percent) {
|
|
80
|
+
return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100 ? 'var(--blue-5)' : '';
|
|
81
|
+
};
|
|
82
|
+
var Progress = function Progress(props) {
|
|
83
|
+
var className = props.className,
|
|
84
|
+
_props$type = props.type,
|
|
85
|
+
type = _props$type === void 0 ? 'line' : _props$type,
|
|
86
|
+
_props$percentPositio = props.percentPosition,
|
|
87
|
+
percentPosition = _props$percentPositio === void 0 ? 'right' : _props$percentPositio,
|
|
88
|
+
_props$percent = props.percent,
|
|
89
|
+
percent = _props$percent === void 0 ? 0 : _props$percent,
|
|
90
|
+
format = props.format,
|
|
91
|
+
size = props.size,
|
|
92
|
+
label = props.label,
|
|
93
|
+
_props$width = props.width,
|
|
94
|
+
width = _props$width === void 0 ? 132 : _props$width,
|
|
95
|
+
status = props.status,
|
|
96
|
+
halfCircle = props.halfCircle,
|
|
97
|
+
_props$gapDegree = props.gapDegree,
|
|
98
|
+
gapDegree = _props$gapDegree === void 0 ? props.halfCircle ? 135 : props.gapDegree : _props$gapDegree,
|
|
99
|
+
strokeColor = props.strokeColor,
|
|
100
|
+
_props$strokeWidth = props.strokeWidth,
|
|
101
|
+
strokeWidth = _props$strokeWidth === void 0 ? 7 : _props$strokeWidth;
|
|
102
|
+
var _percent = percentTransform(percent);
|
|
103
|
+
var _strokeColor = themeStrokeColor(status, strokeColor, _percent);
|
|
104
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
105
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
106
|
+
var prefixCls = getPrefixCls('progress');
|
|
107
|
+
var CusLabelOrPercent = function CusLabelOrPercent(props) {
|
|
108
|
+
var type = props.type,
|
|
109
|
+
theme = props.theme;
|
|
110
|
+
var labelPercentClassName = (0, _classnames["default"])("".concat(prefixCls, "-percent-bottom"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-percent-bottom-").concat(size), size === 'small'), "".concat(prefixCls, "-percent-bottom-").concat(type), type === 'line'));
|
|
111
|
+
var showIcon = function showIcon(status) {
|
|
112
|
+
return _react["default"].createElement(_icon["default"], {
|
|
113
|
+
type: "".concat(iconMap[type][status]),
|
|
114
|
+
theme: theme,
|
|
115
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(labelPercentClassName, " ").concat(labelPercentClassName, "-").concat(status || 'success'), type === 'line'))
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
var showPercent = _react["default"].createElement("div", {
|
|
119
|
+
className: labelPercentClassName
|
|
120
|
+
}, format ? format === null || format === void 0 ? void 0 : format(_percent) : _percent + '%');
|
|
121
|
+
var displayContent;
|
|
122
|
+
if (status === 'success' || status === 'exception') {
|
|
123
|
+
displayContent = showIcon(status);
|
|
124
|
+
} else if (status === 'normal' || status === 'active') {
|
|
125
|
+
displayContent = showPercent;
|
|
126
|
+
} else {
|
|
127
|
+
// 如果状态为空
|
|
128
|
+
displayContent = _percent === 100 ? showIcon('success') : showPercent;
|
|
129
|
+
}
|
|
130
|
+
return displayContent;
|
|
131
|
+
};
|
|
132
|
+
var CusCircleAndDashboardFormat = function CusCircleAndDashboardFormat(props) {
|
|
133
|
+
var widthNum = props.widthNum;
|
|
134
|
+
return _react["default"].createElement("div", {
|
|
135
|
+
className: "".concat(prefixCls, "-cus-format")
|
|
136
|
+
}, !!label && _react["default"].createElement(_ellipsis["default"], {
|
|
137
|
+
className: "".concat(prefixCls, "-cus-format-label"),
|
|
138
|
+
title: label,
|
|
139
|
+
widthLimit: widthNum <= 64 ? widthNum : 'calc(100% - 50px)',
|
|
140
|
+
placement: widthNum <= 64 ? 'bottom' : 'top'
|
|
141
|
+
}), _react["default"].createElement(CusLabelOrPercent, {
|
|
142
|
+
type: "circle",
|
|
143
|
+
theme: "outlined"
|
|
144
|
+
}));
|
|
145
|
+
};
|
|
146
|
+
//line
|
|
147
|
+
var LineProgress = function LineProgress() {
|
|
148
|
+
return _react["default"].createElement(_progress["default"], Object.assign({
|
|
149
|
+
strokeColor: _strokeColor
|
|
150
|
+
}, props, {
|
|
151
|
+
className: (0, _classnames["default"])('tnt-progress', className, _defineProperty({}, "".concat(prefixCls, "-percent-bottom"), percentPosition === 'bottom'))
|
|
152
|
+
}));
|
|
153
|
+
};
|
|
154
|
+
//circle,dashboard (额外新增label和半圆选项)
|
|
155
|
+
var CircleAndDashboardProgress = function CircleAndDashboardProgress() {
|
|
156
|
+
var widthNum = Number(String(width).split('px').shift());
|
|
157
|
+
return _react["default"].createElement(_progress["default"], Object.assign({
|
|
158
|
+
gapDegree: gapDegree,
|
|
159
|
+
strokeColor: _strokeColor,
|
|
160
|
+
strokeWidth: strokeWidth
|
|
161
|
+
}, props, {
|
|
162
|
+
type: halfCircle ? 'dashboard' : type,
|
|
163
|
+
className: (0, _classnames["default"])('tnt-progress', "".concat(prefixCls, "-circle-progress"), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-small-circle"), widthNum <= 64 && label), "".concat(prefixCls, "-large-circle"), widthNum > 64 && label), "".concat(prefixCls, "-small-half-circle"), halfCircle && widthNum <= 64 && label), "".concat(prefixCls, "-large-half-circle"), halfCircle && widthNum > 64 && label)),
|
|
164
|
+
format: function format() {
|
|
165
|
+
return _react["default"].createElement(CusCircleAndDashboardFormat, {
|
|
166
|
+
widthNum: widthNum
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}));
|
|
170
|
+
};
|
|
171
|
+
var progressMap = {
|
|
172
|
+
line: _react["default"].createElement(LineProgress, null),
|
|
173
|
+
circle: _react["default"].createElement(CircleAndDashboardProgress, null),
|
|
174
|
+
dashboard: _react["default"].createElement(CircleAndDashboardProgress, null)
|
|
175
|
+
};
|
|
176
|
+
return progressMap[type];
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
var _default = exports["default"] = Progress;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/progress/progress.tsx"],"names":[],"mappings":"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","sourcesContent":["import React from 'react'\nimport type { ProgressProps } from 'antd/lib/progress'\nimport type { ThemeType } from 'antd/lib/icon'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdProgress from 'antd/lib/progress'\nimport classNames from 'classnames'\nimport Ellipsis from '../ellipsis'\nimport Icon from '../icon'\nimport './progress.less'\nexport * from 'antd/lib/tooltip'\n\ninterface ExtendsProgress {\n percentPosition?: 'bottom' | 'right'\n label?: React.ReactNode\n halfCircle?: boolean\n}\nconst iconMap = {\n line: {\n success: 'check-circle',\n exception: 'close-circle',\n },\n circle: {\n success: 'check',\n exception: 'close',\n },\n}\nconst ifPercentBottom = (type: string, percentPosition: string) => {\n return type === 'line' && percentPosition === 'bottom'\n}\nconst percentTransform = (percent: number) => {\n return percent >= 100 ? 100 : percent <= 0 ? 0 : percent\n}\n\nconst themeStrokeColor = (status?: string, strokeColor?: string | object, percent?: number) => {\n return status !== 'success' && status !== 'exception' && !strokeColor && percent !== 100\n ? 'var(--blue-5)'\n : ''\n}\n\nconst Progress: React.FC<ProgressProps & ExtendsProgress> = (props) => {\n const {\n className,\n type = 'line',\n percentPosition = 'right',\n percent = 0,\n format,\n size,\n label,\n width = 132,\n status,\n halfCircle,\n gapDegree = props.halfCircle ? 135 : props.gapDegree,\n strokeColor,\n strokeWidth = 7,\n } = props\n const _percent = percentTransform(percent)\n const _strokeColor = themeStrokeColor(status, strokeColor, _percent)\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('progress')\n\n const CusLabelOrPercent = (props: { type: 'line' | 'circle'; theme?: ThemeType }) => {\n const { type, theme } = props\n const labelPercentClassName = classNames(`${prefixCls}-percent-bottom`, {\n [`${prefixCls}-percent-bottom-${size}`]: size === 'small',\n [`${prefixCls}-percent-bottom-${type}`]: type === 'line',\n })\n\n const showIcon = (status: 'success' | 'exception') => (\n <Icon\n type={`${iconMap[type][status]}`}\n theme={theme}\n className={classNames({\n [`${labelPercentClassName} ${labelPercentClassName}-${status || 'success'}`]:\n type === 'line',\n })}\n />\n )\n const showPercent = (\n <div className={labelPercentClassName}>\n {format ? format?.(_percent) : _percent + '%'}\n </div>\n )\n\n let displayContent\n if (status === 'success' || status === 'exception') {\n displayContent = showIcon(status)\n } else if (status === 'normal' || status === 'active') {\n displayContent = showPercent\n } else {\n // 如果状态为空\n displayContent = _percent === 100 ? showIcon('success') : showPercent\n }\n return displayContent\n }\n\n const CusCircleAndDashboardFormat = (props: { widthNum: number }) => {\n const { widthNum } = props\n return (\n <div className={`${prefixCls}-cus-format`}>\n {!!label && (\n <Ellipsis\n className={`${prefixCls}-cus-format-label`}\n title={label}\n widthLimit={widthNum <= 64 ? widthNum : 'calc(100% - 50px)'}\n placement={widthNum <= 64 ? 'bottom' : 'top'}\n />\n )}\n <CusLabelOrPercent type=\"circle\" theme=\"outlined\" />\n </div>\n )\n }\n\n //line\n const LineProgress: React.FC = () => (\n <AntdProgress\n strokeColor={_strokeColor}\n {...props}\n className={classNames('tnt-progress', className, {\n [`${prefixCls}-percent-bottom`]: percentPosition === 'bottom',\n })}\n />\n )\n\n //circle,dashboard (额外新增label和半圆选项)\n const CircleAndDashboardProgress: React.FC = () => {\n const widthNum = Number(String(width).split('px').shift())\n return (\n <AntdProgress\n gapDegree={gapDegree}\n strokeColor={_strokeColor}\n strokeWidth={strokeWidth}\n {...props}\n type={halfCircle ? 'dashboard' : type}\n className={classNames('tnt-progress', `${prefixCls}-circle-progress`, className, {\n [`${prefixCls}-small-circle`]: widthNum <= 64 && label,\n [`${prefixCls}-large-circle`]: widthNum > 64 && label,\n [`${prefixCls}-small-half-circle`]: halfCircle && widthNum <= 64 && label,\n [`${prefixCls}-large-half-circle`]: halfCircle && widthNum > 64 && label,\n })}\n format={() => <CusCircleAndDashboardFormat widthNum={widthNum} />}\n />\n )\n }\n\n const progressMap = {\n line: <LineProgress />,\n circle: <CircleAndDashboardProgress />,\n dashboard: <CircleAndDashboardProgress />,\n }\n return progressMap[type]\n }}\n </ConfigConsumer>\n )\n}\n\nexport default Progress\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@import '../style/themes/index.less';
|
|
2
|
+
@import '../style/mixins/index';
|
|
3
|
+
@progress-prefix-cls: ~'@{ant-prefix}-progress';
|
|
4
|
+
.tnt-progress.@{progress-prefix-cls} {
|
|
5
|
+
.ant-progress-text{
|
|
6
|
+
// font-family: PingFang SC;
|
|
7
|
+
font-weight: 500;
|
|
8
|
+
}
|
|
9
|
+
.ant-progress-cus-format-label{
|
|
10
|
+
.ant-progress-cus-format-label{
|
|
11
|
+
padding-bottom: 4px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
&-percent-bottom{
|
|
15
|
+
.ant-progress-outer{
|
|
16
|
+
padding-right: 0;
|
|
17
|
+
}
|
|
18
|
+
.ant-progress-text{
|
|
19
|
+
width: 100%;
|
|
20
|
+
display: block;
|
|
21
|
+
text-align: right;
|
|
22
|
+
margin-left: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
&-circle-progress{
|
|
26
|
+
.@{progress-prefix-cls}-cus-format{
|
|
27
|
+
height: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&-small-circle{
|
|
35
|
+
.ant-progress-text{
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
.ant-progress-inner{
|
|
39
|
+
overflow:visible;
|
|
40
|
+
}
|
|
41
|
+
.tntd-ellipsis{
|
|
42
|
+
position: absolute;
|
|
43
|
+
bottom: -1.8em;
|
|
44
|
+
font-size: 0.75em;
|
|
45
|
+
// margin-bottom: 2px;
|
|
46
|
+
// color: #8B919E;
|
|
47
|
+
color:tint(@text-color, 50%);
|
|
48
|
+
font-family: Inter;
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
text-align: center;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
&-large-circle{
|
|
54
|
+
.ant-progress-text{
|
|
55
|
+
height: 100%;
|
|
56
|
+
}
|
|
57
|
+
.tntd-ellipsis{
|
|
58
|
+
font-size: 0.55em;
|
|
59
|
+
// margin-bottom: 2px;
|
|
60
|
+
color:tint(@text-color, 50%);
|
|
61
|
+
font-family: Inter;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
text-align: center;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
&-small-half-circle{
|
|
67
|
+
.ant-progress-text{
|
|
68
|
+
height: 40%;
|
|
69
|
+
}
|
|
70
|
+
.tntd-ellipsis{
|
|
71
|
+
bottom: -1.5em;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
&-large-half-circle{
|
|
75
|
+
.ant-progress-inner{
|
|
76
|
+
.ant-progress-text{
|
|
77
|
+
top: 42%
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _checkbox = _interopRequireDefault(require("../../checkbox"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
return
|
|
11
|
-
"default":
|
|
9
|
+
function _interopRequireDefault(e) {
|
|
10
|
+
return e && e.__esModule ? e : {
|
|
11
|
+
"default": e
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|