tntd 3.0.28 → 3.0.29-beta.1
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/alert/alert.js +71 -0
- package/es/alert/alert.js.map +1 -0
- package/es/alert/alert.less +128 -0
- package/es/alert/index.js +1 -1
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.less +1 -0
- package/es/array-input/index.js +14 -12
- package/es/array-input/index.js.map +1 -1
- package/es/button/button.js +30 -3
- package/es/button/button.js.map +1 -1
- package/es/button/button.less +72 -2
- package/es/cascader/cascader.js +30 -0
- package/es/cascader/cascader.js.map +1 -0
- package/es/cascader/cascader.less +16 -0
- package/es/cascader/index.js +3 -6
- package/es/cascader/index.js.map +1 -1
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +48 -0
- package/es/checkbox/checkbox.js.map +1 -0
- package/es/checkbox/checkbox.less +69 -0
- package/es/checkbox/index.js +3 -7
- package/es/checkbox/index.js.map +1 -1
- package/es/date-picker/DatePicker.js +101 -0
- package/es/date-picker/DatePicker.js.map +1 -0
- package/es/date-picker/index.js +6 -12
- package/es/date-picker/index.js.map +1 -1
- package/es/date-picker/index.less +294 -0
- package/es/date-picker/style/Calendar.less +1 -1
- package/es/descriptions/descriptions.less +1 -0
- package/es/descriptions/index.js +2 -2
- package/es/descriptions/index.js.map +1 -1
- package/es/drawer/drawer.js +5 -5
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.less +15 -1
- package/es/drawer/style/drawer.less +18 -3
- package/es/drawer/style/index.js +2 -1
- package/es/drawer/style/index.js.map +1 -1
- package/es/form/style/index.less +6 -0
- package/es/handle/index.js +9 -6
- package/es/handle/index.js.map +1 -1
- package/es/handle/index.less +16 -0
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/input/index.js +1 -1
- package/es/input/index.js.map +1 -1
- package/es/input/input.js +21 -30
- package/es/input/input.js.map +1 -1
- package/es/input/input.less +123 -20
- package/es/input-number/index.js +4 -29
- package/es/input-number/index.js.map +1 -1
- package/es/input-number/inputNumber.js +34 -0
- package/es/input-number/inputNumber.js.map +1 -0
- package/es/input-number/inputNumber.less +12 -0
- package/es/locale/en_US.js +9 -5
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +7 -3
- package/es/locale/zh_CN.js.map +1 -1
- package/es/message/message.less +2 -1
- package/es/modal/index.js +2 -3
- package/es/modal/index.js.map +1 -1
- package/es/modal/index.less +36 -0
- package/es/modal/modal.js +103 -16
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/index.js +2 -1
- package/es/modal/style/index.js.map +1 -1
- package/es/modal/style/modal.less +15 -3
- package/es/notification/notification.less +27 -2
- package/es/notification/style/index.less +1 -0
- package/es/page-container/index.js +1 -1
- package/es/page-container/index.js.map +1 -1
- package/es/page-container/index.less +3 -2
- package/es/page-loading/index.js +1 -1
- package/es/page-loading/index.js.map +1 -1
- package/es/popconfirm/index.js +2 -2
- package/es/popconfirm/index.js.map +1 -1
- package/es/popconfirm/index.less +32 -0
- package/es/popconfirm/popconfirm.js +43 -0
- package/es/popconfirm/popconfirm.js.map +1 -0
- package/es/popconfirm/style/index.js +2 -1
- package/es/popconfirm/style/index.js.map +1 -1
- package/es/popover/index.js +2 -2
- package/es/popover/index.js.map +1 -1
- package/es/popover/index.less +57 -0
- package/es/popover/popover.js +34 -0
- package/es/popover/popover.js.map +1 -0
- package/es/popover/style/index.js +1 -0
- package/es/popover/style/index.js.map +1 -1
- package/es/prev-locale.js +1 -1
- package/es/prev-locale.js.map +1 -1
- package/es/preview-text/index.js.map +1 -1
- package/es/progress/index.js +2 -2
- package/es/progress/index.js.map +1 -1
- package/es/progress/progress.js +132 -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/Checkbox.js.map +1 -1
- package/es/query-form/Field/Composition/FieldPopover.js +304 -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 +122 -0
- package/es/query-form/Field/Composition/Select.js.map +1 -0
- package/es/query-form/Field/Composition/ValueTag.js +124 -0
- package/es/query-form/Field/Composition/ValueTag.js.map +1 -0
- package/es/query-form/Field/Composition/index.js +233 -0
- package/es/query-form/Field/Composition/index.js.map +1 -0
- package/es/query-form/Field/Composition/index.less +120 -0
- package/es/query-form/Field/Composition/utils.js +154 -0
- package/es/query-form/Field/Composition/utils.js.map +1 -0
- package/es/query-form/Field/SelectInput.js +22 -4
- package/es/query-form/Field/SelectInput.js.map +1 -1
- package/es/query-form/Field/fieldsMap.js +2 -2
- package/es/query-form/Field/fieldsMap.js.map +1 -1
- package/es/query-form/Field/index.js +1 -0
- package/es/query-form/Field/index.js.map +1 -1
- package/es/query-form/index.js +170 -335
- package/es/query-form/index.js.map +1 -1
- package/es/query-form/index.less +26 -60
- 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 +17 -3
- package/es/query-list-scene/List.js.map +1 -1
- package/es/query-list-scene/QueryForm.js +37 -14
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/query-list-scene/index.js +2 -1
- package/es/query-list-scene/index.js.map +1 -1
- package/es/query-list-scene/index.less +7 -7
- package/es/radio/index.js +3 -5
- package/es/radio/index.js.map +1 -1
- package/es/radio/radio.js +57 -0
- package/es/radio/radio.js.map +1 -0
- package/es/radio/radio.less +43 -0
- package/es/scroll-bar/Bar.js +56 -0
- package/es/scroll-bar/Bar.js.map +1 -0
- package/es/scroll-bar/Context.js +6 -0
- package/es/scroll-bar/Context.js.map +1 -0
- package/es/scroll-bar/ScrollBar.js +86 -0
- package/es/scroll-bar/ScrollBar.js.map +1 -0
- package/es/scroll-bar/Thumb.js +105 -0
- package/es/scroll-bar/Thumb.js.map +1 -0
- package/es/scroll-bar/index.js +3 -0
- package/es/scroll-bar/index.js.map +1 -0
- package/es/scroll-bar/scrollBar.less +59 -0
- package/es/scroll-bar/util.js +31 -0
- package/es/scroll-bar/util.js.map +1 -0
- package/es/segmented/index.less +126 -112
- package/es/select/index.js +1 -1
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +5 -6
- package/es/select/select.js.map +1 -1
- package/es/select/select.less +83 -9
- package/es/select/style/index.less +4 -4
- package/es/spin/index.js +3 -2
- package/es/spin/index.js.map +1 -1
- package/es/spin/spin.js +36 -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/index.js +9 -2
- package/es/steps/index.js.map +1 -1
- package/es/steps/stepStyle/icon.less +51 -0
- package/es/steps/stepStyle/index.less +173 -8
- package/es/steps/stepStyle/nav.less +51 -259
- 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 +53 -27
- package/es/steps/steps.js.map +1 -1
- package/es/steps/style/index.js +8 -0
- package/es/steps/style/index.js.map +1 -1
- package/es/style/themes/default.less +6 -5
- package/es/switch/index.less +45 -0
- package/es/switch/style/index.js +2 -1
- package/es/switch/style/index.js.map +1 -1
- package/es/switch/switch.js +40 -2
- package/es/switch/switch.js.map +1 -1
- package/es/table/hooks/use-expand-fixed.js.map +1 -1
- package/es/table/style/index.less +19 -21
- package/es/table/style/size.less +11 -12
- package/es/table/table.js +68 -40
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +31 -6
- package/es/table/table.stories.js +3 -3
- package/es/table/table.stories.js.map +1 -1
- package/es/table-container/index.js +5 -2
- package/es/table-container/index.js.map +1 -1
- package/es/table-container/index.less +4 -1
- package/es/tabs/index.js +1 -0
- package/es/tabs/index.js.map +1 -1
- package/es/tabs/style/index.js.map +1 -1
- package/es/tabs/style/index.less +1 -0
- package/es/tabs/tabs.js +27 -3
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs/tabs.less +125 -0
- package/es/tabs-container/index.js +1 -1
- package/es/tabs-container/index.js.map +1 -1
- package/es/tag/tag.less +4 -3
- package/es/time-picker/TimePicker.js +36 -0
- package/es/time-picker/TimePicker.js.map +1 -0
- package/es/time-picker/index.js +2 -2
- package/es/time-picker/index.js.map +1 -1
- package/es/time-picker/index.less +38 -0
- package/es/title/index.less +47 -45
- package/es/tntd-action/Action.js +117 -0
- package/es/tntd-action/Action.js.map +1 -0
- package/es/tntd-action/index.js +69 -6
- package/es/tntd-action/index.js.map +1 -1
- package/es/tntd-action/index.less +59 -0
- package/es/tntd-cascader/AntdCascader/index.less +35 -29
- package/es/tntd-select/index.js +3 -4
- package/es/tntd-select/index.js.map +1 -1
- package/es/tntd-select/index.less +7 -0
- package/es/tntd-virtual-tree/index.less +2 -1
- package/es/tntd-virtual-tree-select/index.less +1 -1
- package/es/tooltip/index.less +4 -5
- package/es/tooltip/style/index.js +2 -1
- package/es/tooltip/style/index.js.map +1 -1
- package/es/upload/index.js +1 -2
- package/es/upload/index.js.map +1 -1
- package/es/upload/style/index.less +1 -1
- package/es/upload/upload.less +5 -12
- package/es/utils/index.js +0 -1
- package/es/utils/index.js.map +1 -1
- package/es/utils/lang.js +8 -2
- package/es/utils/lang.js.map +1 -1
- package/lib/_util/context.js +1 -1
- package/lib/_util/defaultRenderEmpty.js +1 -1
- package/lib/_util/hooks/useFlexGapSupport.js +4 -4
- package/lib/_util/hooks/useForceUpdate.js +4 -4
- package/lib/_util/responsiveObserve.js +1 -1
- package/lib/_util/styleChecker.js +1 -1
- package/lib/actions/index.js +1 -1
- package/lib/alert/alert.d.ts +12 -0
- package/lib/alert/alert.d.ts.map +1 -0
- package/lib/alert/alert.js +93 -0
- package/lib/alert/alert.js.map +1 -0
- package/lib/alert/alert.less +128 -0
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.d.ts.map +1 -1
- package/lib/alert/index.js +7 -8
- package/lib/alert/index.js.map +1 -1
- package/lib/alert/style/index.less +1 -0
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +26 -23
- package/lib/array-input/index.js.map +1 -1
- package/lib/button/button.d.ts +9 -4
- package/lib/button/button.d.ts.map +1 -1
- package/lib/button/button.js +28 -4
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.less +72 -2
- package/lib/cascader/cascader.d.ts +10 -0
- package/lib/cascader/cascader.d.ts.map +1 -0
- package/lib/cascader/cascader.js +49 -0
- package/lib/cascader/cascader.js.map +1 -0
- package/lib/cascader/cascader.less +16 -0
- package/lib/cascader/index.d.ts +3 -7
- package/lib/cascader/index.d.ts.map +1 -1
- package/lib/cascader/index.js +5 -10
- package/lib/cascader/index.js.map +1 -1
- package/lib/check-card/group.js +8 -8
- package/lib/check-card/index.js +6 -6
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +16 -0
- package/lib/checkbox/checkbox.d.ts.map +1 -0
- package/lib/checkbox/checkbox.js +65 -0
- package/lib/checkbox/checkbox.js.map +1 -0
- package/lib/checkbox/checkbox.less +69 -0
- package/lib/checkbox/index.d.ts +3 -3
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +2 -17
- package/lib/checkbox/index.js.map +1 -1
- package/lib/color-picker/ColorPicker.js +6 -6
- package/lib/color-picker/index.js +1 -1
- package/lib/columns/index.js +1 -1
- package/lib/config-provider/config-provider.js +1 -1
- 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 +128 -0
- package/lib/date-picker/DatePicker.js.map +1 -0
- package/lib/date-picker/index.d.ts +2 -6
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +6 -37
- package/lib/date-picker/index.js.map +1 -1
- package/lib/date-picker/index.less +294 -0
- package/lib/date-picker/style/Calendar.less +1 -1
- package/lib/descriptions/descriptions.js +5 -5
- package/lib/descriptions/descriptions.less +1 -0
- package/lib/descriptions/index.d.ts +1 -1
- package/lib/descriptions/index.d.ts.map +1 -1
- package/lib/descriptions/index.js +7 -7
- package/lib/descriptions/index.js.map +1 -1
- package/lib/development-login/LoginModal.js +6 -6
- package/lib/development-login/index.js +4 -4
- package/lib/drawer/drawer.d.ts +3 -3
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +7 -7
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.less +15 -1
- package/lib/drawer/style/drawer.less +18 -3
- package/lib/drawer/style/index.d.ts +1 -0
- package/lib/drawer/style/index.d.ts.map +1 -1
- package/lib/drawer/style/index.js +2 -1
- package/lib/drawer/style/index.js.map +1 -1
- package/lib/ellipsis/Svg/CopySVG.js +1 -1
- package/lib/ellipsis/Svg/TickSVG.js +1 -1
- package/lib/ellipsis/index.js +5 -5
- package/lib/empty/empty.js +2 -2
- package/lib/empty/empty.stories.js +2 -2
- package/lib/exception/exception.js +1 -1
- package/lib/form/form.js +2 -2
- package/lib/form/style/index.less +6 -0
- package/lib/grid-v4/col.js +2 -2
- package/lib/grid-v4/hooks/useBreakpoint.js +1 -1
- package/lib/grid-v4/index.js +1 -1
- package/lib/grid-v4/row.js +6 -6
- package/lib/handle/index.d.ts.map +1 -1
- package/lib/handle/index.js +16 -11
- package/lib/handle/index.js.map +1 -1
- package/lib/handle/index.less +16 -0
- package/lib/handle-icon/index.js +11 -11
- package/lib/icon/IconFont.js +1 -1
- package/lib/icon/components/Icon.js +9 -9
- package/lib/icon/components/index.js +1 -1
- package/lib/icon/components/utils.js +3 -3
- package/lib/icon/index.js +7 -7
- package/lib/icon/twoTonePrimaryColor.js +1 -1
- package/lib/icon/utils.js +1 -1
- package/lib/img/Contain.js +1 -1
- package/lib/img/Cover.js +5 -5
- package/lib/img/index.js +5 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -1
- package/lib/index.js.map +1 -1
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.d.ts.map +1 -1
- package/lib/input/index.js +7 -7
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.d.ts +5 -5
- package/lib/input/input.d.ts.map +1 -1
- package/lib/input/input.js +13 -22
- package/lib/input/input.js.map +1 -1
- package/lib/input/input.less +123 -20
- package/lib/input-number/index.d.ts +4 -10
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +5 -32
- package/lib/input-number/index.js.map +1 -1
- 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 +54 -0
- package/lib/input-number/inputNumber.js.map +1 -0
- package/lib/input-number/inputNumber.less +12 -0
- package/lib/label/index.js +2 -2
- package/lib/loading-button/index.js +5 -5
- package/lib/locale/default.d.ts +7 -3
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/default.js +1 -1
- package/lib/locale/en_US.d.ts +7 -3
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +10 -6
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +7 -3
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +8 -4
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/message/message.less +2 -1
- package/lib/modal/index.d.ts +0 -1
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +2 -3
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/index.less +36 -0
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +91 -16
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/index.d.ts +1 -0
- package/lib/modal/style/index.d.ts.map +1 -1
- package/lib/modal/style/index.js +2 -1
- package/lib/modal/style/index.js.map +1 -1
- package/lib/modal/style/modal.less +15 -3
- package/lib/notification/assets/index.js +1 -1
- package/lib/notification/assets/svg-error-tip.d.ts +1 -1
- package/lib/notification/assets/svg-success-tip.d.ts +1 -1
- package/lib/notification/index.js +1 -1
- package/lib/notification/notification.js +1 -1
- package/lib/notification/notification.less +27 -2
- package/lib/notification/style/index.less +1 -0
- package/lib/page/Box.js +1 -1
- package/lib/page/index.js +7 -7
- package/lib/page-container/index.js +2 -2
- package/lib/page-container/index.js.map +1 -1
- package/lib/page-container/index.less +3 -2
- package/lib/page-loading/index.js +2 -2
- package/lib/page-loading/index.js.map +1 -1
- package/lib/popconfirm/index.d.ts +2 -2
- package/lib/popconfirm/index.d.ts.map +1 -1
- package/lib/popconfirm/index.js +1 -1
- package/lib/popconfirm/index.js.map +1 -1
- 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 +61 -0
- package/lib/popconfirm/popconfirm.js.map +1 -0
- package/lib/popconfirm/style/index.d.ts +1 -0
- package/lib/popconfirm/style/index.d.ts.map +1 -1
- package/lib/popconfirm/style/index.js +2 -1
- package/lib/popconfirm/style/index.js.map +1 -1
- package/lib/popover/index.d.ts +2 -2
- package/lib/popover/index.d.ts.map +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/popover/index.js.map +1 -1
- 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 +55 -0
- package/lib/popover/popover.js.map +1 -0
- package/lib/popover/style/index.d.ts +1 -0
- package/lib/popover/style/index.d.ts.map +1 -1
- package/lib/popover/style/index.js +2 -1
- package/lib/popover/style/index.js.map +1 -1
- package/lib/prev-locale.d.ts +1 -1
- package/lib/prev-locale.d.ts.map +1 -1
- package/lib/prev-locale.js +1 -1
- package/lib/prev-locale.js.map +1 -1
- package/lib/preview-text/index.d.ts +1 -1
- package/lib/preview-text/index.d.ts.map +1 -1
- package/lib/preview-text/index.js +7 -7
- package/lib/preview-text/index.js.map +1 -1
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.d.ts.map +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/index.js.map +1 -1
- package/lib/progress/progress.d.ts +12 -0
- package/lib/progress/progress.d.ts.map +1 -0
- package/lib/progress/progress.js +148 -0
- package/lib/progress/progress.js.map +1 -0
- package/lib/progress/progress.less +82 -0
- package/lib/query-form/Field/Checkbox.js +2 -2
- package/lib/query-form/Field/Checkbox.js.map +1 -1
- 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 +338 -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 +146 -0
- package/lib/query-form/Field/Composition/Select.js.map +1 -0
- package/lib/query-form/Field/Composition/ValueTag.d.ts +12 -0
- package/lib/query-form/Field/Composition/ValueTag.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/ValueTag.js +153 -0
- package/lib/query-form/Field/Composition/ValueTag.js.map +1 -0
- package/lib/query-form/Field/Composition/index.d.ts +12 -0
- package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/index.js +277 -0
- package/lib/query-form/Field/Composition/index.js.map +1 -0
- package/lib/query-form/Field/Composition/index.less +120 -0
- package/lib/query-form/Field/Composition/utils.d.ts +22 -0
- package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form/Field/Composition/utils.js +168 -0
- package/lib/query-form/Field/Composition/utils.js.map +1 -0
- package/lib/query-form/Field/Select.js +6 -6
- package/lib/query-form/Field/SelectInput.d.ts.map +1 -1
- package/lib/query-form/Field/SelectInput.js +21 -9
- package/lib/query-form/Field/SelectInput.js.map +1 -1
- package/lib/query-form/Field/fieldsMap.d.ts +6 -3
- package/lib/query-form/Field/fieldsMap.js +3 -3
- package/lib/query-form/Field/fieldsMap.js.map +1 -1
- package/lib/query-form/Field/index.d.ts.map +1 -1
- package/lib/query-form/Field/index.js +11 -10
- package/lib/query-form/Field/index.js.map +1 -1
- package/lib/query-form/createActions.js +1 -1
- package/lib/query-form/index.d.ts +19 -27
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +191 -361
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +26 -60
- package/lib/query-form/useForm.js +1 -1
- 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/Field/Checkbox.d.ts +8 -0
- package/lib/query-form-v2/Field/Checkbox.d.ts.map +1 -0
- package/lib/query-form-v2/Field/Checkbox.js +28 -0
- package/lib/query-form-v2/Field/Checkbox.js.map +1 -0
- package/lib/query-form-v2/Field/Select.d.ts +4 -0
- package/lib/query-form-v2/Field/Select.d.ts.map +1 -0
- package/lib/query-form-v2/Field/Select.js +80 -0
- package/lib/query-form-v2/Field/Select.js.map +1 -0
- package/lib/query-form-v2/Field/SelectInput.d.ts +4 -0
- package/lib/query-form-v2/Field/SelectInput.d.ts.map +1 -0
- package/lib/query-form-v2/Field/SelectInput.js +88 -0
- package/lib/query-form-v2/Field/SelectInput.js.map +1 -0
- package/lib/query-form-v2/Field/fieldsMap.d.ts +24 -0
- package/lib/query-form-v2/Field/fieldsMap.d.ts.map +1 -0
- package/lib/query-form-v2/Field/fieldsMap.js +35 -0
- package/lib/query-form-v2/Field/fieldsMap.js.map +1 -0
- package/lib/query-form-v2/Field/index.d.ts +14 -0
- package/lib/query-form-v2/Field/index.d.ts.map +1 -0
- package/lib/query-form-v2/Field/index.js +146 -0
- package/lib/query-form-v2/Field/index.js.map +1 -0
- package/lib/query-form-v2/createActions.d.ts +14 -0
- package/lib/query-form-v2/createActions.d.ts.map +1 -0
- package/lib/query-form-v2/createActions.js +54 -0
- package/lib/query-form-v2/createActions.js.map +1 -0
- package/lib/query-form-v2/index.d.ts +39 -0
- package/lib/query-form-v2/index.d.ts.map +1 -0
- package/lib/query-form-v2/index.js +391 -0
- package/lib/query-form-v2/index.js.map +1 -0
- package/lib/query-form-v2/index.less +133 -0
- package/lib/query-form-v2/useForm.d.ts +13 -0
- package/lib/query-form-v2/useForm.d.ts.map +1 -0
- package/lib/query-form-v2/useForm.js +13 -0
- package/lib/query-form-v2/useForm.js.map +1 -0
- package/lib/query-form-v3/Field/Checkbox.d.ts +8 -0
- package/lib/query-form-v3/Field/Checkbox.d.ts.map +1 -0
- package/lib/query-form-v3/Field/Checkbox.js +28 -0
- package/lib/query-form-v3/Field/Checkbox.js.map +1 -0
- package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts +19 -0
- package/lib/query-form-v3/Field/Composition/FieldPopover.d.ts.map +1 -0
- package/lib/query-form-v3/Field/Composition/FieldPopover.js +381 -0
- package/lib/query-form-v3/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form-v3/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form-v3/Field/Composition/Select.d.ts +4 -0
- package/lib/query-form-v3/Field/Composition/Select.d.ts.map +1 -0
- package/lib/query-form-v3/Field/Composition/Select.js +131 -0
- package/lib/query-form-v3/Field/Composition/Select.js.map +1 -0
- package/lib/query-form-v3/Field/Composition/index.d.ts +10 -0
- package/lib/query-form-v3/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form-v3/Field/Composition/index.js +255 -0
- package/lib/query-form-v3/Field/Composition/index.js.map +1 -0
- package/lib/query-form-v3/Field/Composition/index.less +118 -0
- package/lib/query-form-v3/Field/Composition/utils.d.ts +22 -0
- package/lib/query-form-v3/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form-v3/Field/Composition/utils.js +147 -0
- package/lib/query-form-v3/Field/Composition/utils.js.map +1 -0
- package/lib/query-form-v3/Field/Select.d.ts +4 -0
- package/lib/query-form-v3/Field/Select.d.ts.map +1 -0
- package/lib/query-form-v3/Field/Select.js +80 -0
- package/lib/query-form-v3/Field/Select.js.map +1 -0
- package/lib/query-form-v3/Field/SelectInput.d.ts +4 -0
- package/lib/query-form-v3/Field/SelectInput.d.ts.map +1 -0
- package/lib/query-form-v3/Field/SelectInput.js +100 -0
- package/lib/query-form-v3/Field/SelectInput.js.map +1 -0
- package/lib/query-form-v3/Field/fieldsMap.d.ts +27 -0
- package/lib/query-form-v3/Field/fieldsMap.d.ts.map +1 -0
- package/lib/query-form-v3/Field/fieldsMap.js +35 -0
- package/lib/query-form-v3/Field/fieldsMap.js.map +1 -0
- package/lib/query-form-v3/Field/index.d.ts +14 -0
- package/lib/query-form-v3/Field/index.d.ts.map +1 -0
- package/lib/query-form-v3/Field/index.js +147 -0
- package/lib/query-form-v3/Field/index.js.map +1 -0
- package/lib/query-form-v3/createActions.d.ts +14 -0
- package/lib/query-form-v3/createActions.d.ts.map +1 -0
- package/lib/query-form-v3/createActions.js +54 -0
- package/lib/query-form-v3/createActions.js.map +1 -0
- package/lib/query-form-v3/index.d.ts +27 -0
- package/lib/query-form-v3/index.d.ts.map +1 -0
- package/lib/query-form-v3/index.js +206 -0
- package/lib/query-form-v3/index.js.map +1 -0
- package/lib/query-form-v3/index.less +91 -0
- package/lib/query-form-v3/useForm.d.ts +13 -0
- package/lib/query-form-v3/useForm.d.ts.map +1 -0
- package/lib/query-form-v3/useForm.js +13 -0
- package/lib/query-form-v3/useForm.js.map +1 -0
- package/lib/query-list-scene/List.d.ts.map +1 -1
- package/lib/query-list-scene/List.js +31 -16
- package/lib/query-list-scene/List.js.map +1 -1
- package/lib/query-list-scene/QueryForm.d.ts +5 -3
- package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
- package/lib/query-list-scene/QueryForm.js +48 -23
- package/lib/query-list-scene/QueryForm.js.map +1 -1
- package/lib/query-list-scene/QueryListScene.js +10 -10
- package/lib/query-list-scene/Title.js +1 -1
- package/lib/query-list-scene/Toolbar.js +2 -2
- package/lib/query-list-scene/createActions.js +1 -1
- package/lib/query-list-scene/index.d.ts.map +1 -1
- package/lib/query-list-scene/index.js +3 -2
- package/lib/query-list-scene/index.js.map +1 -1
- package/lib/query-list-scene/index.less +7 -7
- package/lib/query-list-scene/useActions.js +1 -1
- package/lib/radio/index.d.ts +3 -2
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +2 -5
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio.d.ts +17 -0
- package/lib/radio/radio.d.ts.map +1 -0
- package/lib/radio/radio.js +75 -0
- package/lib/radio/radio.js.map +1 -0
- package/lib/radio/radio.less +43 -0
- package/lib/render-empty/render-empty.js +1 -1
- 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 +91 -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 +13 -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 +97 -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 +125 -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 +10 -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 +39 -0
- package/lib/scroll-bar/util.js.map +1 -0
- package/lib/segmented/index.d.ts +1 -1
- package/lib/segmented/index.js +2 -2
- package/lib/segmented/index.less +126 -112
- package/lib/select/index.d.ts +1 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +6 -6
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +1 -1
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +5 -6
- package/lib/select/select.js.map +1 -1
- package/lib/select/select.less +83 -9
- package/lib/select/style/index.less +4 -4
- package/lib/spin/index.d.ts +3 -2
- package/lib/spin/index.d.ts.map +1 -1
- package/lib/spin/index.js +4 -6
- package/lib/spin/index.js.map +1 -1
- package/lib/spin/spin.d.ts +9 -0
- package/lib/spin/spin.d.ts.map +1 -0
- package/lib/spin/spin.js +44 -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/index.d.ts +1 -2
- package/lib/steps/index.d.ts.map +1 -1
- package/lib/steps/index.js +9 -2
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/stepStyle/icon.less +51 -0
- package/lib/steps/stepStyle/index.less +173 -8
- package/lib/steps/stepStyle/nav.less +51 -259
- 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.d.ts +10 -2
- package/lib/steps/steps.d.ts.map +1 -1
- package/lib/steps/steps.js +52 -24
- package/lib/steps/steps.js.map +1 -1
- package/lib/steps/style/index.d.ts.map +1 -1
- package/lib/steps/style/index.js.map +1 -1
- package/lib/style/themes/default.less +6 -5
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/svg-components/index.js +1 -1
- package/lib/switch/index.less +45 -0
- package/lib/switch/style/index.d.ts +1 -0
- package/lib/switch/style/index.d.ts.map +1 -1
- package/lib/switch/style/index.js +2 -1
- package/lib/switch/style/index.js.map +1 -1
- package/lib/switch/switch.d.ts +8 -0
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js +40 -5
- package/lib/switch/switch.js.map +1 -1
- package/lib/table/assets/image-loading-background.d.ts +1 -1
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/hooks/use-column-setting.js +4 -4
- package/lib/table/hooks/use-expand-fixed.js +6 -6
- package/lib/table/hooks/use-expand-fixed.js.map +1 -1
- package/lib/table/resizableTable/index.js +6 -6
- package/lib/table/style/index.less +19 -21
- package/lib/table/style/size.less +11 -12
- package/lib/table/table-hoc.js +1 -1
- package/lib/table/table.d.ts +2 -1
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +63 -41
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +31 -6
- package/lib/table/table.stories.js +5 -5
- package/lib/table/table.stories.js.map +1 -1
- package/lib/table/total-shower.js +1 -1
- package/lib/table/utils.js +1 -1
- package/lib/table-container/index.d.ts.map +1 -1
- package/lib/table-container/index.js +7 -3
- package/lib/table-container/index.js.map +1 -1
- package/lib/table-container/index.less +4 -1
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.d.ts.map +1 -1
- package/lib/tabs/index.js +6 -5
- package/lib/tabs/index.js.map +1 -1
- package/lib/tabs/style/index.js.map +1 -1
- package/lib/tabs/style/index.less +1 -0
- package/lib/tabs/tabs.d.ts +3 -2
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +30 -3
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs/tabs.less +125 -0
- package/lib/tabs-container/index.js +2 -2
- package/lib/tabs-container/index.js.map +1 -1
- package/lib/tag/tag.js +2 -2
- package/lib/tag/tag.less +4 -3
- 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 +55 -0
- package/lib/time-picker/TimePicker.js.map +1 -0
- package/lib/time-picker/index.d.ts +7 -6
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +4 -17
- package/lib/time-picker/index.js.map +1 -1
- package/lib/time-picker/index.less +38 -0
- package/lib/title/index.js +1 -1
- package/lib/title/index.less +47 -45
- 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 +141 -0
- package/lib/tntd-action/Action.js.map +1 -0
- package/lib/tntd-action/index.d.ts +4 -2
- package/lib/tntd-action/index.d.ts.map +1 -1
- package/lib/tntd-action/index.js +79 -5
- package/lib/tntd-action/index.js.map +1 -1
- package/lib/tntd-action/index.less +59 -0
- package/lib/tntd-cascader/AntdCascader/component/context.js +1 -1
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/config/utils.js +2 -2
- package/lib/tntd-cascader/AntdCascader/index.js +7 -7
- package/lib/tntd-cascader/AntdCascader/index.less +35 -29
- package/lib/tntd-cascader/index.js +1 -1
- package/lib/tntd-cascader/rc-cascader/Cascader.js +8 -8
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
- package/lib/tntd-cascader/rc-cascader/index.js +1 -1
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
- package/lib/tntd-form/ErrorList.js +7 -7
- package/lib/tntd-form/Form.js +6 -6
- package/lib/tntd-form/FormItem/ItemHolder.js +6 -6
- package/lib/tntd-form/FormItem/index.js +8 -8
- package/lib/tntd-form/FormItemInput.js +1 -1
- package/lib/tntd-form/FormItemLabel.js +2 -2
- package/lib/tntd-form/FormList.js +1 -1
- package/lib/tntd-form/context.js +1 -1
- package/lib/tntd-form/hooks/useDebounce.js +4 -4
- package/lib/tntd-form/hooks/useForm.js +5 -5
- package/lib/tntd-form/hooks/useFormItemStatus.js +1 -1
- package/lib/tntd-form/hooks/useFrameState.js +5 -5
- package/lib/tntd-form/index.js +1 -1
- package/lib/tntd-icon/index.js +1 -1
- package/lib/tntd-layout/AppList.js +6 -6
- package/lib/tntd-layout/Application.js +6 -6
- package/lib/tntd-layout/Avatar.js +2 -2
- package/lib/tntd-layout/CompatibleLanguage.js +6 -6
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
- package/lib/tntd-layout/EnterpriseLayout/Language.js +6 -6
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +6 -6
- package/lib/tntd-layout/EnterpriseLayout/index.js +1 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
- package/lib/tntd-layout/GlobalNavigation/index.js +9 -9
- package/lib/tntd-layout/Header.js +2 -2
- package/lib/tntd-layout/HeaderActions.js +2 -2
- package/lib/tntd-layout/HeaderNavs.js +6 -6
- package/lib/tntd-layout/HeaderTabs.js +7 -7
- package/lib/tntd-layout/Iconfont.js +1 -1
- package/lib/tntd-layout/Language.js +6 -6
- package/lib/tntd-layout/Layout.js +6 -6
- package/lib/tntd-layout/Logo.js +2 -2
- package/lib/tntd-layout/OrgAppList.js +6 -6
- package/lib/tntd-layout/SideMenu.js +6 -6
- package/lib/tntd-layout/Theme.js +6 -6
- package/lib/tntd-layout/createActions.js +1 -1
- package/lib/tntd-layout/images/index.js +1 -1
- package/lib/tntd-layout/index.js +1 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
- package/lib/tntd-layout/paaslayout/Header.js +2 -2
- package/lib/tntd-layout/paaslayout/Logo.js +2 -2
- package/lib/tntd-layout/paaslayout/SideMenu.js +6 -6
- package/lib/tntd-layout/paaslayout/index.js +6 -6
- package/lib/tntd-layout/storage.js +1 -1
- package/lib/tntd-modal/index.js +6 -6
- package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
- package/lib/tntd-rc-select/_util/context.js +1 -1
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
- package/lib/tntd-rc-select/_util/getIcons.js +1 -1
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +2 -2
- package/lib/tntd-rc-select/index.js +2 -2
- package/lib/tntd-reference/AHref/index.js +1 -1
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +1 -1
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
- package/lib/tntd-reference/ReferenceCheck/index.js +1 -1
- package/lib/tntd-reference/ReferenceDrawer/index.js +5 -5
- package/lib/tntd-reference/ReferenceInfo/index.js +1 -1
- package/lib/tntd-reference/index.js +1 -1
- package/lib/tntd-second-page/index.js +1 -1
- package/lib/tntd-select/DropDownWrap.js +8 -8
- package/lib/tntd-select/index.d.ts.map +1 -1
- package/lib/tntd-select/index.js +13 -13
- package/lib/tntd-select/index.js.map +1 -1
- package/lib/tntd-select/index.less +7 -0
- package/lib/tntd-virtual-tree/index.js +8 -8
- package/lib/tntd-virtual-tree/index.less +2 -1
- package/lib/tntd-virtual-tree/utils.js +28 -28
- package/lib/tntd-virtual-tree-select/index.js +10 -10
- package/lib/tntd-virtual-tree-select/index.less +1 -1
- package/lib/tntd-virtual-tree-select/utils.js +9 -9
- package/lib/tooltip/index.less +4 -5
- package/lib/tooltip/style/index.d.ts +1 -0
- package/lib/tooltip/style/index.d.ts.map +1 -1
- package/lib/tooltip/style/index.js +2 -1
- package/lib/tooltip/style/index.js.map +1 -1
- package/lib/tooltip/tooltip.js +1 -1
- package/lib/upload/index.d.ts.map +1 -1
- package/lib/upload/index.js +7 -8
- package/lib/upload/index.js.map +1 -1
- package/lib/upload/style/index.less +1 -1
- package/lib/upload/svg/UploadSVG.js +1 -1
- package/lib/upload/upload.less +5 -12
- package/lib/utils/checkAuth.js +4 -4
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +9 -21
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +10 -4
- package/lib/utils/lang.js.map +1 -1
- package/lib/water-mark/index.js +5 -5
- package/package.json +3 -2
- package/CHANGELOG.json +0 -1034
- package/CHANGELOG.md +0 -605
- package/es/checkbox/checkbox-group.js +0 -5
- package/es/checkbox/checkbox-group.js.map +0 -1
- package/es/radio/radio-group.js +0 -5
- package/es/radio/radio-group.js.map +0 -1
- package/es/steps/stepStyle/small.less +0 -5
- package/lib/checkbox/checkbox-group.d.ts +0 -8
- package/lib/checkbox/checkbox-group.d.ts.map +0 -1
- package/lib/checkbox/checkbox-group.js +0 -12
- package/lib/checkbox/checkbox-group.js.map +0 -1
- package/lib/radio/radio-group.d.ts +0 -8
- package/lib/radio/radio-group.d.ts.map +0 -1
- package/lib/radio/radio-group.js +0 -12
- package/lib/radio/radio-group.js.map +0 -1
- package/lib/steps/stepStyle/small.less +0 -5
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
var _exportNames = {};
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
11
|
+
var _configProvider = require("antd/lib/config-provider");
|
|
12
|
+
var _timePicker = _interopRequireWildcard(require("antd/lib/time-picker"));
|
|
13
|
+
Object.keys(_timePicker).forEach(function (key) {
|
|
14
|
+
if (key === "default" || key === "__esModule") return;
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
|
+
if (key in exports && exports[key] === _timePicker[key]) return;
|
|
17
|
+
Object.defineProperty(exports, key, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function get() {
|
|
20
|
+
return _timePicker[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
28
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
29
|
+
var t = {};
|
|
30
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
31
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
32
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var TimePicker = function TimePicker(props) {
|
|
37
|
+
//theme样式类型 outline | fill 默认 outline
|
|
38
|
+
var _props$theme = props.theme,
|
|
39
|
+
theme = _props$theme === void 0 ? 'outline' : _props$theme,
|
|
40
|
+
className = props.className,
|
|
41
|
+
suffixIcon = props.suffixIcon,
|
|
42
|
+
restProps = __rest(props, ["theme", "className", "suffixIcon"]);
|
|
43
|
+
var defaultIcon = _react["default"].createElement(_icon["default"], {
|
|
44
|
+
type: "clock-circle"
|
|
45
|
+
});
|
|
46
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
47
|
+
var getPrefixCls = _ref.getPrefixCls;
|
|
48
|
+
var prefixCls = getPrefixCls('time-picker');
|
|
49
|
+
return _react["default"].createElement(_timePicker["default"], Object.assign({
|
|
50
|
+
suffixIcon: suffixIcon || defaultIcon,
|
|
51
|
+
className: (0, _classnames["default"])(className, "".concat(prefixCls, "-").concat(theme))
|
|
52
|
+
}, restProps));
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var _default = exports["default"] = TimePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../src/time-picker/TimePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuC;AACvC,mDAA0B;AAE1B,6DAAwD;AACxD,sEAA+C;AAC/C,4DAAmC;AACnC,sDAAmC;AACnC,MAAM,UAAU,GAA2E,CACzF,KAAK,EACL,EAAE;IACF,sCAAsC;IACtC,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAAlE,oCAA0D,CAAQ,CAAA;IACxE,MAAM,WAAW,GAAG,8BAAC,cAAI,IAAC,IAAI,EAAC,cAAc,GAAG,CAAA;IAEhD,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;QAC7C,OAAO,CACL,8BAAC,qBAAa,kBACZ,UAAU,EAAE,UAAU,IAAI,WAAW,EACrC,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,IACrD,SAAS,EACb,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,UAAU,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport Icon from '../icon'\nimport type { TimePickerProps as AntdTimePickerProps } from 'antd/lib/time-picker'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntTimePicker from 'antd/lib/time-picker'\nimport classNames from 'classnames'\nexport * from 'antd/lib/time-picker'\nconst TimePicker: React.FC<AntdTimePickerProps & { theme?: string; readonly?: boolean }> = (\n props\n) => {\n //theme样式类型 outline | fill 默认 outline\n const { theme = 'outline', className, suffixIcon, ...restProps } = props\n const defaultIcon = <Icon type=\"clock-circle\" />\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('time-picker')\n return (\n <AntTimePicker\n suffixIcon={suffixIcon || defaultIcon}\n className={classNames(className, `${prefixCls}-${theme}`)}\n {...restProps}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nexport default TimePicker\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TimePickerProps as AntdTimePickerProps } from 'antd/lib/time-picker';
|
|
3
2
|
import './style';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare const _default: import("react").ForwardRefExoticComponent<import("antd/lib/time-picker").TimePickerProps & {
|
|
5
|
+
theme?: string | undefined;
|
|
6
|
+
readonly?: boolean | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & import("react").RefAttributes<unknown>>;
|
|
9
10
|
export default _default;
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/time-picker/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/time-picker/index.ts"],"names":[],"mappings":";AAGA,OAAO,SAAS,CAAA;AAChB,OAAO,cAAc,CAAA;;;;;;;AAGrB,wBAA2E"}
|
package/lib/time-picker/index.js
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
var _exportNames = {};
|
|
8
6
|
exports["default"] = void 0;
|
|
9
|
-
var _timePicker = _interopRequireWildcard(require("antd/lib/time-picker"));
|
|
10
|
-
Object.keys(_timePicker).forEach(function (key) {
|
|
11
|
-
if (key === "default" || key === "__esModule") return;
|
|
12
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
13
|
-
if (key in exports && exports[key] === _timePicker[key]) return;
|
|
14
|
-
Object.defineProperty(exports, key, {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _timePicker[key];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
7
|
var _connect = require("../connect");
|
|
22
8
|
var _previewText = require("../preview-text");
|
|
23
9
|
require("./style");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
require("./index.less");
|
|
11
|
+
var _TimePicker = _interopRequireDefault(require("./TimePicker"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(_TimePicker["default"], _previewText.PreviewText.TimePicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/time-picker/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/time-picker/index.ts"],"names":[],"mappings":";;;;;AAAA,wCAAqD;AACrD,kDAA6C;AAE7C,mBAAgB;AAChB,wBAAqB;AACrB,8DAAqC;AAErC,kBAAe,IAAA,kCAAwB,EAAC,oBAAU,EAAE,0BAAW,CAAC,UAAU,CAAC,CAAA","sourcesContent":["import { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nimport './style'\nimport './index.less'\nimport TimePicker from './TimePicker'\n\nexport default connectReadonlyComponent(TimePicker, PreviewText.TimePicker)\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@import '../style/themes/index';
|
|
2
|
+
|
|
3
|
+
@timepicker-prefix-cls: ~'@{ant-prefix}-time-picker';
|
|
4
|
+
.@{timepicker-prefix-cls} {
|
|
5
|
+
input{
|
|
6
|
+
border-color: @border-color-secondary;
|
|
7
|
+
}
|
|
8
|
+
&:has(input:not([value=''])),&:hover {
|
|
9
|
+
.@{timepicker-prefix-cls}-icon{
|
|
10
|
+
i{
|
|
11
|
+
color: @text-color-secondary;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
&:has(input[disabled]){
|
|
16
|
+
.@{timepicker-prefix-cls}-icon{
|
|
17
|
+
i{
|
|
18
|
+
color: @disabled-color;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
&-fill{
|
|
23
|
+
input {
|
|
24
|
+
background-color: @fill-color-quaternary;
|
|
25
|
+
border-color: @fill-color-quaternary;
|
|
26
|
+
&[disabled] {
|
|
27
|
+
border: none;
|
|
28
|
+
}
|
|
29
|
+
&:focus{
|
|
30
|
+
background-color: @white;
|
|
31
|
+
}
|
|
32
|
+
&:not([value='']):hover {
|
|
33
|
+
background-color: @white;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
package/lib/title/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
var _ellipsis = _interopRequireDefault(require("../ellipsis"));
|
|
10
10
|
var _utils = require("../utils");
|
|
11
11
|
require("./index.less");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
13
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
package/lib/title/index.less
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: space-between;
|
|
7
|
-
.tntd-title-text{
|
|
8
|
-
|
|
7
|
+
.tntd-title-text {
|
|
8
|
+
height: 100%;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -93,7 +93,8 @@
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
&.large
|
|
96
|
+
&.large,
|
|
97
|
+
&.h1 {
|
|
97
98
|
& {
|
|
98
99
|
height: 40px;
|
|
99
100
|
line-height: 40px;
|
|
@@ -104,14 +105,14 @@
|
|
|
104
105
|
}
|
|
105
106
|
&::before {
|
|
106
107
|
height: 16px;
|
|
107
|
-
top: 12px;
|
|
108
108
|
}
|
|
109
109
|
.sub-title {
|
|
110
110
|
font-size: 16px;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
&.middle
|
|
114
|
+
&.middle,
|
|
115
|
+
&.h2 {
|
|
115
116
|
& {
|
|
116
117
|
height: 36px;
|
|
117
118
|
line-height: 36px;
|
|
@@ -122,56 +123,58 @@
|
|
|
122
123
|
}
|
|
123
124
|
&::before {
|
|
124
125
|
height: 14px;
|
|
125
|
-
top: 11px;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
&.h3
|
|
129
|
+
&.h3,
|
|
130
|
+
&.h4,
|
|
131
|
+
&.h5,
|
|
132
|
+
&.small {
|
|
130
133
|
& {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
134
|
+
height: 22px;
|
|
135
|
+
line-height: 22px;
|
|
136
|
+
.tntd-title-text {
|
|
137
|
+
h3 {
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
}
|
|
140
|
+
.sub-title {
|
|
141
|
+
font-size: 14px;
|
|
140
142
|
}
|
|
143
|
+
}
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
// 默认h3 和 small
|
|
144
|
-
&.h3
|
|
147
|
+
&.h3,
|
|
148
|
+
&.small {
|
|
145
149
|
.tntd-title-text {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
150
|
+
&::before {
|
|
151
|
+
height: 12px;
|
|
152
|
+
}
|
|
153
|
+
h3 {
|
|
154
|
+
font-weight: bold;
|
|
155
|
+
}
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
&.h4 {
|
|
156
159
|
.tntd-title-text {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
&::before {
|
|
161
|
+
display: none;
|
|
162
|
+
}
|
|
163
|
+
h3 {
|
|
164
|
+
font-weight: bold;
|
|
165
|
+
margin-left: 0;
|
|
166
|
+
}
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
&.h5 {
|
|
167
170
|
.tntd-title-text {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
&::before {
|
|
172
|
+
display: none;
|
|
173
|
+
}
|
|
174
|
+
h3 {
|
|
175
|
+
margin-left: 0;
|
|
176
|
+
font-weight: normal;
|
|
177
|
+
}
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
180
|
.tntd-title-text {
|
|
@@ -179,7 +182,7 @@
|
|
|
179
182
|
position: relative;
|
|
180
183
|
display: flex;
|
|
181
184
|
align-items: center;
|
|
182
|
-
flex:1;
|
|
185
|
+
flex: 1;
|
|
183
186
|
min-width: 0;
|
|
184
187
|
}
|
|
185
188
|
h3 {
|
|
@@ -191,7 +194,7 @@
|
|
|
191
194
|
white-space: nowrap;
|
|
192
195
|
overflow: hidden;
|
|
193
196
|
text-overflow: ellipsis;
|
|
194
|
-
&.has-sub-title{
|
|
197
|
+
&.has-sub-title {
|
|
195
198
|
max-width: 70%;
|
|
196
199
|
}
|
|
197
200
|
}
|
|
@@ -205,15 +208,14 @@
|
|
|
205
208
|
text-overflow: ellipsis;
|
|
206
209
|
margin-left: 8px;
|
|
207
210
|
}
|
|
208
|
-
.sub-tip{
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
.sub-tip {
|
|
212
|
+
margin-left: 4px;
|
|
213
|
+
font-size: 16px;
|
|
214
|
+
color: @text-color;
|
|
212
215
|
}
|
|
213
216
|
&::before {
|
|
214
217
|
position: absolute;
|
|
215
218
|
left: 0;
|
|
216
|
-
top: 10px;
|
|
217
219
|
background-color: @primary-color;
|
|
218
220
|
content: '';
|
|
219
221
|
width: 4px;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":"AASA;;;sBAgBC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = WarpAction;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
+
var _configProvider = require("antd/lib/config-provider");
|
|
11
|
+
var _LocaleReceiver = _interopRequireDefault(require("antd/lib/locale-provider/LocaleReceiver"));
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
var _button = require("../button");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
23
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
24
|
+
var t = {};
|
|
25
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
26
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
var defaultGetContainer = function defaultGetContainer() {
|
|
32
|
+
return document.getElementById('subapp-viewport') || document.body;
|
|
33
|
+
};
|
|
34
|
+
function WarpAction(_a) {
|
|
35
|
+
var _a$getContainer = _a.getContainer,
|
|
36
|
+
getContainer = _a$getContainer === void 0 ? defaultGetContainer : _a$getContainer,
|
|
37
|
+
other = __rest(_a, ["getContainer"]);
|
|
38
|
+
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
|
|
39
|
+
var getPrefixCls = _ref.getPrefixCls,
|
|
40
|
+
getContextPopupContainer = _ref.getPopupContainer;
|
|
41
|
+
var _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer;
|
|
42
|
+
return _react["default"].createElement(_LocaleReceiver["default"], {
|
|
43
|
+
componentName: "TntdAction"
|
|
44
|
+
}, function (locale) {
|
|
45
|
+
return _react["default"].createElement(Action, Object.assign({
|
|
46
|
+
getPopupContainer: _getContainer
|
|
47
|
+
}, other, {
|
|
48
|
+
locale: locale
|
|
49
|
+
}));
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function Action(_ref2) {
|
|
54
|
+
var title = _ref2.title,
|
|
55
|
+
hidden = _ref2.hidden,
|
|
56
|
+
data = _ref2.data,
|
|
57
|
+
afterClose = _ref2.afterClose,
|
|
58
|
+
locale = _ref2.locale,
|
|
59
|
+
className = _ref2.className,
|
|
60
|
+
_ref2$width = _ref2.width,
|
|
61
|
+
width = _ref2$width === void 0 ? 700 : _ref2$width,
|
|
62
|
+
getPopupContainer = _ref2.getPopupContainer;
|
|
63
|
+
var _useState = (0, _react.useState)(false),
|
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
+
visible = _useState2[0],
|
|
66
|
+
setVisible = _useState2[1];
|
|
67
|
+
var _useState3 = (0, _react.useState)({
|
|
68
|
+
left: 400,
|
|
69
|
+
bottom: 100,
|
|
70
|
+
width: width
|
|
71
|
+
}),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
offset = _useState4[0],
|
|
74
|
+
setOffset = _useState4[1];
|
|
75
|
+
var ref = (0, _react.useRef)();
|
|
76
|
+
var refDom = (0, _react.useRef)();
|
|
77
|
+
(0, _react.useEffect)(function () {
|
|
78
|
+
ref.current = getPopupContainer();
|
|
79
|
+
}, [getPopupContainer]);
|
|
80
|
+
(0, _react.useEffect)(function () {
|
|
81
|
+
var visible = data.length > 0;
|
|
82
|
+
if (visible && ref.current) {
|
|
83
|
+
var _offset = ref.current.getBoundingClientRect();
|
|
84
|
+
setOffset({
|
|
85
|
+
left: _offset.left + (_offset.width - width) / 2,
|
|
86
|
+
bottom: 100,
|
|
87
|
+
width: width
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
setVisible(visible);
|
|
91
|
+
}, [data, width]);
|
|
92
|
+
var onMouseDown = function onMouseDown(e) {
|
|
93
|
+
var startX = e.clientX - offset.left;
|
|
94
|
+
var startY = e.clientY + offset.bottom;
|
|
95
|
+
var onmousemove = function onmousemove(e) {
|
|
96
|
+
if (e.buttons === 1) {
|
|
97
|
+
refDom.current.style.left = e.clientX - startX + 'px';
|
|
98
|
+
refDom.current.style.bottom = startY - e.clientY + 'px';
|
|
99
|
+
} else {
|
|
100
|
+
_onmouseup(e);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var _onmouseup = function onmouseup(e) {
|
|
104
|
+
setOffset(function (offset) {
|
|
105
|
+
return Object.assign(Object.assign({}, offset), {
|
|
106
|
+
left: e.clientX - startX,
|
|
107
|
+
bottom: startY - e.clientY
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
document.removeEventListener('mousemove', onmousemove);
|
|
111
|
+
document.removeEventListener('mouseup', _onmouseup);
|
|
112
|
+
};
|
|
113
|
+
document.addEventListener('mousemove', onmousemove);
|
|
114
|
+
document.addEventListener('mouseup', _onmouseup);
|
|
115
|
+
};
|
|
116
|
+
if (ref.current && visible && !hidden) {
|
|
117
|
+
return _reactDom["default"].createPortal(_react["default"].createElement("div", {
|
|
118
|
+
className: (0, _classnames["default"])('tnt-action', className),
|
|
119
|
+
style: offset,
|
|
120
|
+
onMouseDown: onMouseDown,
|
|
121
|
+
ref: refDom
|
|
122
|
+
}, _react["default"].createElement("div", {
|
|
123
|
+
className: "fr",
|
|
124
|
+
onClick: function onClick(e) {
|
|
125
|
+
e.stopPropagation();
|
|
126
|
+
}
|
|
127
|
+
}, data), _react["default"].createElement(_button.Button, {
|
|
128
|
+
shape: "circle",
|
|
129
|
+
icon: "close",
|
|
130
|
+
type: "tertiary",
|
|
131
|
+
onClick: function onClick(e) {
|
|
132
|
+
e.stopPropagation();
|
|
133
|
+
setVisible(false);
|
|
134
|
+
afterClose && afterClose();
|
|
135
|
+
}
|
|
136
|
+
}), _react["default"].createElement("span", {
|
|
137
|
+
className: "tnt-action-text"
|
|
138
|
+
}, title)), document.body);
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/tntd-action/Action.js"],"names":[],"mappings":"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","sourcesContent":["import React, { useState, useEffect, useRef } from 'react'\nimport ReactDOM from 'react-dom'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport { Button } from '../button'\n\nconst defaultGetContainer = () => document.getElementById('subapp-viewport') || document.body\n\nexport default function WarpAction({ getContainer = defaultGetContainer, ...other }) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls, getPopupContainer: getContextPopupContainer }) => {\n const _getContainer = getContainer === undefined ? getContextPopupContainer : getContainer\n\n return (\n <LocaleReceiver componentName=\"TntdAction\">\n {(locale) => {\n return <Action getPopupContainer={_getContainer} {...other} locale={locale} />\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n\nfunction Action({\n title,\n hidden,\n data,\n afterClose,\n locale,\n className,\n width = 700,\n getPopupContainer,\n}) {\n const [visible, setVisible] = useState(false)\n const [offset, setOffset] = useState({ left: 400, bottom: 100, width })\n const ref = useRef()\n const refDom = useRef()\n\n useEffect(() => {\n ref.current = getPopupContainer()\n }, [getPopupContainer])\n\n useEffect(() => {\n const visible = data.length > 0\n if (visible && ref.current) {\n const offset = ref.current.getBoundingClientRect()\n setOffset({ left: offset.left + (offset.width - width) / 2, bottom: 100, width })\n }\n setVisible(visible)\n }, [data, width])\n\n const onMouseDown = (e) => {\n const startX = e.clientX - offset.left\n const startY = e.clientY + offset.bottom\n const onmousemove = (e) => {\n if (e.buttons === 1) {\n refDom.current.style.left = e.clientX - startX + 'px'\n refDom.current.style.bottom = startY - e.clientY + 'px'\n } else {\n onmouseup(e);\n }\n }\n const onmouseup = (e) => {\n setOffset((offset) => ({ ...offset, left: e.clientX - startX, bottom: startY - e.clientY }))\n document.removeEventListener('mousemove', onmousemove)\n document.removeEventListener('mouseup', onmouseup)\n }\n document.addEventListener('mousemove', onmousemove)\n document.addEventListener('mouseup', onmouseup)\n }\n\n if (ref.current && visible && !hidden) {\n return ReactDOM.createPortal(\n <div\n className={classNames('tnt-action', className)}\n style={offset}\n onMouseDown={onMouseDown}\n ref={refDom}\n >\n <div\n className=\"fr\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n >\n {data}\n </div>\n <Button\n shape=\"circle\"\n icon=\"close\"\n type=\"tertiary\"\n onClick={(e) => {\n e.stopPropagation()\n setVisible(false)\n afterClose && afterClose()\n }}\n />\n <span className=\"tnt-action-text\">{title}</span>\n </div>,\n document.body\n )\n }\n return null\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tntd-action/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tntd-action/index.js"],"names":[],"mappings":"AAoCA;;;sBA2BC"}
|
package/lib/tntd-action/index.js
CHANGED
|
@@ -1,12 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = _default;
|
|
7
|
-
require("react");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Action = _interopRequireDefault(require("./Action"));
|
|
10
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
11
|
+
require("./index.less");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
16
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
20
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
21
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
24
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
var _checkShowChild = function checkShowChild(child) {
|
|
30
|
+
var _ref = child.props || {},
|
|
31
|
+
disabled = _ref.disabled,
|
|
32
|
+
children = _ref.children,
|
|
33
|
+
check = _ref.check,
|
|
34
|
+
text = _ref.text;
|
|
35
|
+
if (check && !disabled) {
|
|
36
|
+
return _react["default"].cloneElement(child, text ? {
|
|
37
|
+
children: _react["default"].createElement(_react["default"].Fragment, null, children, text)
|
|
38
|
+
} : {});
|
|
39
|
+
} else if (children) {
|
|
40
|
+
var newChild = _react["default"].Children.map(children, function (child) {
|
|
41
|
+
return _checkShowChild(child);
|
|
42
|
+
}).filter(function (i) {
|
|
43
|
+
return !!i;
|
|
44
|
+
});
|
|
45
|
+
if (newChild.length > 0) {
|
|
46
|
+
var newProps = {
|
|
47
|
+
children: newChild
|
|
48
|
+
};
|
|
49
|
+
if (child.type === _tooltip["default"]) {
|
|
50
|
+
newProps.visible = false;
|
|
51
|
+
}
|
|
52
|
+
return _react["default"].cloneElement(child, newProps);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
};
|
|
57
|
+
function _default(_a) {
|
|
58
|
+
var children = _a.children,
|
|
59
|
+
other = __rest(_a, ["children"]);
|
|
60
|
+
var _useMemo = (0, _react.useMemo)(function () {
|
|
61
|
+
var thisChild = [];
|
|
62
|
+
var popChild = [];
|
|
63
|
+
_react["default"].Children.forEach(children, function (child) {
|
|
64
|
+
if (child && child.props) {
|
|
65
|
+
var exclude = child.props.exclude;
|
|
66
|
+
if (exclude) {
|
|
67
|
+
thisChild.push(_react["default"].cloneElement(child, {
|
|
68
|
+
exclude: undefined
|
|
69
|
+
}));
|
|
70
|
+
} else {
|
|
71
|
+
var showChild = _checkShowChild(child);
|
|
72
|
+
if (showChild) {
|
|
73
|
+
popChild.push(showChild);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return [thisChild, popChild];
|
|
79
|
+
}, [children]),
|
|
80
|
+
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
81
|
+
thisChild = _useMemo2[0],
|
|
82
|
+
popChild = _useMemo2[1];
|
|
83
|
+
return _react["default"].createElement(_react["default"].Fragment, null, thisChild, _react["default"].createElement(_Action["default"], Object.assign({
|
|
84
|
+
data: popChild
|
|
85
|
+
}, other)));
|
|
12
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tntd-action/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tntd-action/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsC;AACtC,sDAA6B;AAC7B,yDAAiC;AACjC,wBAAqB;AAErB,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,EAAE;IAC/B,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAA;IAC7D,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE;QACtB,OAAO,eAAK,CAAC,YAAY,CACvB,KAAK,EACL,IAAI;YACF,CAAC,CAAC;gBACE,QAAQ,EAAE,CACR;oBACG,QAAQ;oBACR,IAAI,CACJ,CACJ;aACF;YACH,CAAC,CAAC,EAAE,CACP,CAAA;KACF;SAAM,IAAI,QAAQ,EAAE;QACnB,MAAM,QAAQ,GAAG,eAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YACtD,OAAO,cAAc,CAAC,KAAK,CAAC,CAAA;QAC9B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACrB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACxC,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAO,EAAE;gBAC1B,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAA;aACzB;YACD,OAAO,eAAK,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;SAC3C;KACF;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,mBAAyB,EAAsB;QAAtB,EAAE,QAAQ,OAAY,EAAP,KAAK,cAApB,YAAsB,CAAF;IAC3C,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACzC,MAAM,SAAS,GAAG,EAAE,CAAA;QACpB,MAAM,QAAQ,GAAG,EAAE,CAAA;QACnB,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;YACzC,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE;gBACxB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,KAAK,CAAA;gBAC/B,IAAI,OAAO,EAAE;oBACX,SAAS,CAAC,IAAI,CAAC,eAAK,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;iBAClE;qBAAM;oBACL,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;oBACvC,IAAI,SAAS,EAAE;wBACb,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;qBACzB;iBACF;aACF;QACH,CAAC,CAAC,CAAA;QACF,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IAC9B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,CACL;QACG,SAAS;QAEV,8BAAC,gBAAM,kBAAC,IAAI,EAAE,QAAQ,IAAM,KAAK,EAAI,CACpC,CACJ,CAAA;AACH,CAAC;AA3BD,4BA2BC","sourcesContent":["import React, { useMemo } from 'react'\nimport Action from './Action'\nimport Tooltip from '../tooltip';\nimport './index.less'\n\nconst checkShowChild = (child) => {\n const { disabled, children, check, text } = child.props || {}\n if (check && !disabled) {\n return React.cloneElement(\n child,\n text\n ? {\n children: (\n <>\n {children}\n {text}\n </>\n ),\n }\n : {}\n )\n } else if (children) {\n const newChild = React.Children.map(children, (child) => {\n return checkShowChild(child)\n }).filter((i) => !!i)\n if (newChild.length > 0) {\n const newProps = { children: newChild };\n if (child.type === Tooltip) {\n newProps.visible = false\n }\n return React.cloneElement(child, newProps)\n }\n }\n return false\n}\n\nexport default function ({ children, ...other }) {\n const [thisChild, popChild] = useMemo(() => {\n const thisChild = []\n const popChild = []\n React.Children.forEach(children, (child) => {\n if (child && child.props) {\n const { exclude } = child.props\n if (exclude) {\n thisChild.push(React.cloneElement(child, { exclude: undefined }))\n } else {\n const showChild = checkShowChild(child)\n if (showChild) {\n popChild.push(showChild)\n }\n }\n }\n })\n return [thisChild, popChild]\n }, [children])\n\n return (\n <>\n {thisChild}\n\n <Action data={popChild} {...other} />\n </>\n )\n}\n"]}
|