@qsxy/element-plus-react 1.0.2 → 2.0.0
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/dist/Affix/Affix.d.ts +4 -0
- package/dist/Affix/Affix.js +301 -0
- package/dist/Affix/index.d.ts +2 -0
- package/dist/Affix/index.js +1 -0
- package/dist/Affix/typings.d.ts +50 -0
- package/dist/Affix/typings.js +1 -0
- package/dist/Alert/Alert.d.ts +7 -0
- package/dist/Alert/Alert.js +98 -0
- package/dist/Alert/index.d.ts +2 -0
- package/dist/Alert/index.js +1 -0
- package/dist/Alert/typings.d.ts +45 -0
- package/dist/Alert/typings.js +1 -0
- package/dist/Anchor/Anchor.d.ts +6 -0
- package/dist/Anchor/Anchor.js +258 -0
- package/dist/Anchor/AnchorLink.d.ts +4 -0
- package/dist/Anchor/AnchorLink.js +77 -0
- package/dist/Anchor/element.d.ts +4 -0
- package/dist/Anchor/element.js +17 -0
- package/dist/Anchor/index.d.ts +3 -0
- package/dist/Anchor/index.js +2 -0
- package/dist/Anchor/typings.d.ts +101 -0
- package/dist/Anchor/typings.js +1 -0
- package/dist/Backtop/Backtop.d.ts +7 -0
- package/dist/Backtop/Backtop.js +153 -0
- package/dist/Backtop/index.d.ts +2 -0
- package/dist/Backtop/index.js +1 -0
- package/dist/Backtop/typings.d.ts +31 -0
- package/dist/Backtop/typings.js +1 -0
- package/dist/Button/Button.d.ts +2 -11
- package/dist/Button/Button.js +2 -6
- package/dist/Button/index.d.ts +1 -1
- package/dist/Calendar/Calendar.js +12 -8
- package/dist/Calendar/YearRangePanel.js +1 -1
- package/dist/Card/Card.js +5 -3
- package/dist/Carousel/typings.d.ts +1 -1
- package/dist/Cascader/Cascader.d.ts +3 -3
- package/dist/Cascader/Cascader.js +238 -166
- package/dist/Cascader/CascaderContext.d.ts +9 -3
- package/dist/Cascader/CascaderContext.js +3 -1
- package/dist/Cascader/CascaderDropdown.d.ts +4 -3
- package/dist/Cascader/CascaderDropdown.js +21 -10
- package/dist/Cascader/CascaderMenu.d.ts +2 -2
- package/dist/Cascader/CascaderMenu.js +56 -14
- package/dist/Cascader/CascaderPanel.d.ts +4 -0
- package/dist/Cascader/CascaderPanel.js +11 -0
- package/dist/Cascader/index.d.ts +4 -1
- package/dist/Cascader/index.js +2 -1
- package/dist/Cascader/typings.d.ts +45 -31
- package/dist/Cascader/useCascader.d.ts +14 -27
- package/dist/Cascader/useCascader.js +153 -59
- package/dist/Checkbox/Checkbox.js +3 -2
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +11 -1
- package/dist/CheckboxGroup/CheckboxGroup.js +78 -19
- package/dist/Collapse/Collapse.d.ts +3 -3
- package/dist/Collapse/Collapse.js +71 -16
- package/dist/Collapse/CollapseContext.d.ts +3 -6
- package/dist/Collapse/CollapseContext.js +2 -4
- package/dist/Collapse/CollapseItem.d.ts +3 -3
- package/dist/Collapse/CollapseItem.js +93 -51
- package/dist/Collapse/CollapseTransition.js +11 -7
- package/dist/Collapse/index.d.ts +1 -1
- package/dist/Collapse/typings.d.ts +20 -5
- package/dist/ColorPicker/typings.d.ts +1 -1
- package/dist/ConfigProvider/ConfigProvider.js +2 -24
- package/dist/ConfigProvider/ConfigProviderContext.js +1 -1
- package/dist/ConfigProvider/typings.d.ts +1 -1
- package/dist/Container/Main.d.ts +1 -1
- package/dist/Container/typings.d.ts +1 -1
- package/dist/Countdown/Countdown.d.ts +4 -0
- package/dist/Countdown/Countdown.js +121 -0
- package/dist/Countdown/index.d.ts +2 -0
- package/dist/Countdown/index.js +1 -0
- package/dist/Countdown/typings.d.ts +52 -0
- package/dist/Countdown/typings.js +1 -0
- package/dist/Countdown/util.d.ts +14 -0
- package/dist/Countdown/util.js +58 -0
- package/dist/DatePicker/DatePicker.js +9 -6
- package/dist/DatePicker/DateRangePicker.js +7 -6
- package/dist/DatePicker/typings.d.ts +0 -13
- package/dist/DateTimePicker/DateTimePicker.js +29 -19
- package/dist/Dialog/Dialog.d.ts +2 -13
- package/dist/Dialog/Dialog.js +143 -160
- package/dist/Dialog/DialogBody.js +3 -38
- package/dist/Dialog/DialogContext.d.ts +0 -7
- package/dist/Dialog/DialogContext.js +1 -5
- package/dist/Dialog/DialogHeader.js +2 -2
- package/dist/Dialog/typings.d.ts +43 -28
- package/dist/Dialog/useDraggable.d.ts +2 -1
- package/dist/Dialog/useDraggable.js +34 -9
- package/dist/Drawer/Drawer.d.ts +2 -13
- package/dist/Drawer/Drawer.js +115 -137
- package/dist/Drawer/DrawerBody.js +7 -8
- package/dist/Drawer/DrawerFooter.js +7 -7
- package/dist/Drawer/DrawerHeader.js +11 -8
- package/dist/Drawer/typings.d.ts +22 -6
- package/dist/Dropdown/Dropdown.js +5 -3
- package/dist/Dropdown/typings.d.ts +2 -1
- package/dist/Empty/Empty.js +16 -4
- package/dist/Form/Form.d.ts +4 -21
- package/dist/Form/Form.js +53 -25
- package/dist/Form/FormItem.d.ts +4 -52
- package/dist/Form/FormItem.js +633 -650
- package/dist/Form/FormItemContext.d.ts +10 -1
- package/dist/Form/FormItemContext.js +9 -1
- package/dist/Form/FormLabelWrap.d.ts +8 -0
- package/dist/Form/FormLabelWrap.js +103 -0
- package/dist/Form/{FieldContext.d.ts → InternalFormContext.d.ts} +2 -2
- package/dist/Form/{FieldContext.js → InternalFormContext.js} +5 -2
- package/dist/Form/List.d.ts +3 -3
- package/dist/Form/List.js +4 -4
- package/dist/Form/index.d.ts +4 -2
- package/dist/Form/index.js +4 -1
- package/dist/Form/typings.d.ts +61 -9
- package/dist/Form/typings.js +15 -1
- package/dist/Form/useForm.js +3 -3
- package/dist/Form/useWatch.js +1 -1
- package/dist/Input/Input.d.ts +2 -14
- package/dist/Input/Input.js +187 -140
- package/dist/Input/InputGroup.js +1 -1
- package/dist/Input/InputRange.js +7 -11
- package/dist/Input/TextArea.d.ts +1 -1
- package/dist/Input/TextArea.js +85 -30
- package/dist/Input/index.d.ts +1 -0
- package/dist/Input/index.js +2 -1
- package/dist/Input/typings.d.ts +38 -19
- package/dist/Input/utils.d.ts +1 -0
- package/dist/Input/utils.js +5 -1
- package/dist/InputNumber/InputNumber.js +408 -147
- package/dist/InputNumber/typings.d.ts +15 -5
- package/dist/Loading/Loading.js +5 -2
- package/dist/Menu/Menu.js +26 -2
- package/dist/Menu/MenuItem.js +4 -2
- package/dist/Menu/SubMenu.js +2 -2
- package/dist/Menu/SubMenuCollapseTransition.js +14 -9
- package/dist/Menu/typings.d.ts +5 -14
- package/dist/Message/Message.js +51 -23
- package/dist/Message/index.js +13 -13
- package/dist/Message/typings.d.ts +8 -5
- package/dist/MessageBox/MessageBox.js +75 -57
- package/dist/MessageBox/index.d.ts +2 -1
- package/dist/MessageBox/index.js +4 -2
- package/dist/MessageBox/typings.d.ts +3 -1
- package/dist/Notification/Notification.js +26 -19
- package/dist/Notification/typings.d.ts +1 -1
- package/dist/PageHeader/PageHeader.d.ts +8 -0
- package/dist/PageHeader/PageHeader.js +91 -0
- package/dist/PageHeader/index.d.ts +2 -0
- package/dist/PageHeader/index.js +1 -0
- package/dist/PageHeader/typings.d.ts +34 -0
- package/dist/PageHeader/typings.js +1 -0
- package/dist/Pagination/typings.d.ts +1 -1
- package/dist/Popover/Popover.js +7 -7
- package/dist/Popover/typings.d.ts +3 -3
- package/dist/Popper/Popper.js +49 -28
- package/dist/Popper/popperOptions.js +1 -0
- package/dist/Popper/typings.d.ts +2 -0
- package/dist/Radio/Radio.d.ts +2 -12
- package/dist/Radio/Radio.js +2 -6
- package/dist/Radio/RadioButton.d.ts +1 -1
- package/dist/Radio/RadioButton.js +4 -4
- package/dist/Radio/index.d.ts +1 -0
- package/dist/Radio/index.js +2 -1
- package/dist/Radio/typings.d.ts +1 -1
- package/dist/RadioGroup/RadioGroup.js +44 -16
- package/dist/RadioGroup/typings.d.ts +10 -0
- package/dist/Segmented/Segmented.d.ts +4 -0
- package/dist/Segmented/Segmented.js +208 -0
- package/dist/Segmented/index.d.ts +2 -0
- package/dist/Segmented/index.js +1 -0
- package/dist/Segmented/typings.d.ts +20 -0
- package/dist/Segmented/typings.js +5 -0
- package/dist/Select/SelectContext.d.ts +2 -1
- package/dist/Select/SelectContext.js +2 -1
- package/dist/Select/SelectCore.js +64 -15
- package/dist/Select/SelectDropdown.js +23 -15
- package/dist/Select/index.d.ts +1 -1
- package/dist/Select/typings.d.ts +26 -17
- package/dist/Select/useSelect.d.ts +35 -18
- package/dist/Select/useSelect.js +88 -33
- package/dist/Skeleton/typings.d.ts +1 -1
- package/dist/Slider/Button.d.ts +4 -0
- package/dist/Slider/Button.js +96 -0
- package/dist/Slider/Marker.d.ts +4 -0
- package/dist/Slider/Marker.js +31 -0
- package/dist/Slider/Slider.d.ts +4 -0
- package/dist/Slider/Slider.js +263 -0
- package/dist/Slider/SliderContext.d.ts +3 -0
- package/dist/Slider/SliderContext.js +2 -0
- package/dist/Slider/hooks/index.d.ts +5 -0
- package/dist/Slider/hooks/index.js +5 -0
- package/dist/Slider/hooks/useLifecycle.d.ts +5 -0
- package/dist/Slider/hooks/useLifecycle.js +50 -0
- package/dist/Slider/hooks/useMarks.d.ts +2 -0
- package/dist/Slider/hooks/useMarks.js +49 -0
- package/dist/Slider/hooks/useSlider.d.ts +38 -0
- package/dist/Slider/hooks/useSlider.js +227 -0
- package/dist/Slider/hooks/useSliderButton.d.ts +28 -0
- package/dist/Slider/hooks/useSliderButton.js +454 -0
- package/dist/Slider/hooks/useStops.d.ts +6 -0
- package/dist/Slider/hooks/useStops.js +47 -0
- package/dist/Slider/hooks/useWatch.d.ts +3 -0
- package/dist/Slider/hooks/useWatch.js +119 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/index.js +1 -0
- package/dist/Slider/style/css.d.ts +1 -0
- package/dist/Slider/style/css.js +1 -0
- package/dist/Slider/style/index.d.ts +1 -0
- package/dist/Slider/style/index.js +1 -0
- package/dist/Slider/typings.d.ts +122 -0
- package/dist/Slider/typings.js +1 -0
- package/dist/Space/Space.d.ts +4 -0
- package/dist/Space/Space.js +125 -0
- package/dist/Space/SpaceItem.d.ts +7 -0
- package/dist/Space/SpaceItem.js +14 -0
- package/dist/Space/index.d.ts +3 -0
- package/dist/Space/index.js +2 -0
- package/dist/Space/typings.d.ts +26 -0
- package/dist/Space/typings.js +1 -0
- package/dist/Space/useSpace.d.ts +7 -0
- package/dist/Space/useSpace.js +105 -0
- package/dist/Statistic/Statistic.d.ts +4 -0
- package/dist/Statistic/Statistic.js +91 -0
- package/dist/Statistic/index.d.ts +2 -0
- package/dist/Statistic/index.js +1 -0
- package/dist/Statistic/typings.d.ts +28 -0
- package/dist/Statistic/typings.js +1 -0
- package/dist/Steps/Step.d.ts +4 -0
- package/dist/Steps/Step.js +247 -0
- package/dist/Steps/Steps.d.ts +5 -0
- package/dist/Steps/Steps.js +116 -0
- package/dist/Steps/index.d.ts +3 -0
- package/dist/Steps/index.js +2 -0
- package/dist/Steps/typings.d.ts +119 -0
- package/dist/Steps/typings.js +1 -0
- package/dist/Switch/Switch.js +2 -2
- package/dist/Switch/typings.d.ts +0 -1
- package/dist/Table/Table.js +17 -14
- package/dist/Table/TableBody.js +4 -4
- package/dist/Table/TableCell.js +53 -28
- package/dist/Table/TableColumn.d.ts +2 -2
- package/dist/Table/TableHeader.js +2 -2
- package/dist/Table/TableHeaderCell.js +2 -2
- package/dist/Table/hooks/useResize.js +0 -2
- package/dist/Table/hooks/useTable.d.ts +1 -1
- package/dist/Table/hooks/useTable.js +15 -10
- package/dist/Table/typings.d.ts +28 -12
- package/dist/Table/util.d.ts +1 -1
- package/dist/Table/util.js +8 -65
- package/dist/TableV2/index.d.ts +10 -0
- package/dist/TableV2/index.js +7 -0
- package/dist/TableV2/src/auto-resizer.d.ts +14 -0
- package/dist/TableV2/src/auto-resizer.js +1 -0
- package/dist/TableV2/src/cell.d.ts +21 -0
- package/dist/TableV2/src/cell.js +1 -0
- package/dist/TableV2/src/components/auto-resizer.d.ts +4 -0
- package/dist/TableV2/src/components/auto-resizer.js +32 -0
- package/dist/TableV2/src/components/cell.d.ts +4 -0
- package/dist/TableV2/src/components/cell.js +22 -0
- package/dist/TableV2/src/components/expand-icon.d.ts +12 -0
- package/dist/TableV2/src/components/expand-icon.js +29 -0
- package/dist/TableV2/src/components/header-cell.d.ts +4 -0
- package/dist/TableV2/src/components/header-cell.js +23 -0
- package/dist/TableV2/src/components/header-row.d.ts +17 -0
- package/dist/TableV2/src/components/header-row.js +41 -0
- package/dist/TableV2/src/components/header.d.ts +20 -0
- package/dist/TableV2/src/components/header.js +103 -0
- package/dist/TableV2/src/components/index.d.ts +10 -0
- package/dist/TableV2/src/components/index.js +7 -0
- package/dist/TableV2/src/components/row.d.ts +19 -0
- package/dist/TableV2/src/components/row.js +206 -0
- package/dist/TableV2/src/components/sort-icon.d.ts +9 -0
- package/dist/TableV2/src/components/sort-icon.js +14 -0
- package/dist/TableV2/src/composables/index.d.ts +6 -0
- package/dist/TableV2/src/composables/index.js +6 -0
- package/dist/TableV2/src/composables/use-auto-resize.d.ts +7 -0
- package/dist/TableV2/src/composables/use-auto-resize.js +55 -0
- package/dist/TableV2/src/composables/use-columns.d.ts +21 -0
- package/dist/TableV2/src/composables/use-columns.js +119 -0
- package/dist/TableV2/src/composables/use-data.d.ts +15 -0
- package/dist/TableV2/src/composables/use-data.js +62 -0
- package/dist/TableV2/src/composables/use-row.d.ts +34 -0
- package/dist/TableV2/src/composables/use-row.js +191 -0
- package/dist/TableV2/src/composables/use-scrollbar.d.ts +25 -0
- package/dist/TableV2/src/composables/use-scrollbar.js +117 -0
- package/dist/TableV2/src/composables/use-styles.d.ts +23 -0
- package/dist/TableV2/src/composables/use-styles.js +90 -0
- package/dist/TableV2/src/composables/utils.d.ts +3 -0
- package/dist/TableV2/src/composables/utils.js +29 -0
- package/dist/TableV2/src/constants.d.ts +18 -0
- package/dist/{Tree/Indent.js → TableV2/src/constants.js} +18 -21
- package/dist/TableV2/src/grid.d.ts +52 -0
- package/dist/TableV2/src/grid.js +1 -0
- package/dist/TableV2/src/header-cell.d.ts +13 -0
- package/dist/TableV2/src/header-cell.js +1 -0
- package/dist/TableV2/src/header-row.d.ts +10 -0
- package/dist/TableV2/src/header-row.js +1 -0
- package/dist/TableV2/src/header.d.ts +15 -0
- package/dist/TableV2/src/header.js +1 -0
- package/dist/TableV2/src/private.d.ts +1 -0
- package/dist/TableV2/src/private.js +1 -0
- package/dist/TableV2/src/renderers/cell.d.ts +14 -0
- package/dist/TableV2/src/renderers/cell.js +120 -0
- package/dist/TableV2/src/renderers/empty.d.ts +7 -0
- package/dist/TableV2/src/renderers/empty.js +11 -0
- package/dist/TableV2/src/renderers/footer.d.ts +7 -0
- package/dist/TableV2/src/renderers/footer.js +9 -0
- package/dist/TableV2/src/renderers/header-cell.d.ts +13 -0
- package/dist/TableV2/src/renderers/header-cell.js +92 -0
- package/dist/TableV2/src/renderers/header.d.ts +9 -0
- package/dist/TableV2/src/renderers/header.js +39 -0
- package/dist/TableV2/src/renderers/left-table.d.ts +32 -0
- package/dist/TableV2/src/renderers/left-table.js +15 -0
- package/dist/TableV2/src/renderers/main-table.d.ts +31 -0
- package/dist/TableV2/src/renderers/main-table.js +12 -0
- package/dist/TableV2/src/renderers/overlay.d.ts +3 -0
- package/dist/TableV2/src/renderers/overlay.js +9 -0
- package/dist/TableV2/src/renderers/right-table.d.ts +31 -0
- package/dist/TableV2/src/renderers/right-table.js +15 -0
- package/dist/TableV2/src/renderers/row.d.ts +11 -0
- package/dist/TableV2/src/renderers/row.js +96 -0
- package/dist/TableV2/src/row.d.ts +51 -0
- package/dist/TableV2/src/row.js +1 -0
- package/dist/TableV2/src/table-grid.d.ts +43 -0
- package/dist/TableV2/src/table-grid.js +283 -0
- package/dist/TableV2/src/table-v2.d.ts +31 -0
- package/dist/TableV2/src/table-v2.js +311 -0
- package/dist/TableV2/src/table.d.ts +196 -0
- package/dist/TableV2/src/table.js +1 -0
- package/dist/TableV2/src/tokens.d.ts +11 -0
- package/dist/TableV2/src/tokens.js +6 -0
- package/dist/TableV2/src/types.d.ts +94 -0
- package/dist/TableV2/src/types.js +1 -0
- package/dist/TableV2/src/use-table.d.ts +48 -0
- package/dist/TableV2/src/use-table.js +197 -0
- package/dist/TableV2/src/utils.d.ts +5 -0
- package/dist/TableV2/src/utils.js +47 -0
- package/dist/Tabs/Tabs.js +1 -1
- package/dist/Tabs/typings.d.ts +1 -3
- package/dist/Tag/Tag.js +1 -1
- package/dist/Tag/typings.d.ts +1 -1
- package/dist/Text/Text.d.ts +4 -0
- package/dist/Text/Text.js +84 -0
- package/dist/Text/index.d.ts +2 -0
- package/dist/Text/index.js +1 -0
- package/dist/Text/typings.d.ts +15 -0
- package/dist/Text/typings.js +1 -0
- package/dist/TimePicker/TimePicker.js +6 -7
- package/dist/TimePicker/TimePickerPanel.js +12 -2
- package/dist/TimePicker/TimePickerRange.js +19 -8
- package/dist/Tooltip/Tooltip.js +31 -8
- package/dist/Tooltip/typings.d.ts +4 -0
- package/dist/Tour/Content.d.ts +9 -0
- package/dist/Tour/Content.js +81 -0
- package/dist/Tour/Mask.d.ts +12 -0
- package/dist/Tour/Mask.js +100 -0
- package/dist/Tour/Step.d.ts +7 -0
- package/dist/Tour/Step.js +119 -0
- package/dist/Tour/Tour.d.ts +6 -0
- package/dist/Tour/Tour.js +237 -0
- package/dist/Tour/context.d.ts +4 -0
- package/dist/Tour/context.js +9 -0
- package/dist/Tour/helper.d.ts +39 -0
- package/dist/Tour/helper.js +286 -0
- package/dist/Tour/index.d.ts +3 -0
- package/dist/Tour/index.js +2 -0
- package/dist/Tour/typings.d.ts +318 -0
- package/dist/Tour/typings.js +38 -0
- package/dist/Transfer/List.js +58 -59
- package/dist/Transfer/ListItem.d.ts +2 -2
- package/dist/Transfer/Transfer.d.ts +2 -2
- package/dist/Transfer/Transfer.js +84 -70
- package/dist/Transfer/index.d.ts +1 -1
- package/dist/Transfer/operation.js +8 -10
- package/dist/Transfer/typings/index.d.ts +49 -38
- package/dist/Transfer/typings/list.d.ts +11 -11
- package/dist/Transfer/typings/listBody.d.ts +2 -2
- package/dist/Transition/Transition.d.ts +1 -0
- package/dist/Transition/Transition.js +8 -7
- package/dist/Tree/CollapseTransition.d.ts +7 -0
- package/dist/Tree/CollapseTransition.js +60 -0
- package/dist/Tree/Tree.d.ts +3 -140
- package/dist/Tree/Tree.js +351 -77
- package/dist/Tree/TreeContext.d.ts +9 -0
- package/dist/Tree/TreeContext.js +14 -0
- package/dist/Tree/TreeNode.d.ts +5 -3
- package/dist/Tree/TreeNode.js +321 -331
- package/dist/Tree/TreeNodeContent.d.ts +9 -0
- package/dist/Tree/TreeNodeContent.js +22 -0
- package/dist/Tree/index.d.ts +3 -8
- package/dist/Tree/index.js +1 -4
- package/dist/Tree/model/node.d.ts +62 -0
- package/dist/Tree/model/node.js +601 -0
- package/dist/Tree/model/tree-store.d.ts +52 -0
- package/dist/Tree/model/tree-store.js +510 -0
- package/dist/Tree/model/useDragNode.d.ts +30 -0
- package/dist/Tree/model/useDragNode.js +293 -0
- package/dist/Tree/model/useKeydown.d.ts +0 -0
- package/dist/Tree/model/useKeydown.js +104 -0
- package/dist/Tree/model/useNodeExpandEventBroadcast.d.ts +15 -0
- package/dist/Tree/model/useNodeExpandEventBroadcast.js +54 -0
- package/dist/Tree/model/util.d.ts +7 -0
- package/dist/Tree/model/util.js +24 -0
- package/dist/Tree/typings.d.ts +227 -114
- package/dist/TreeSelect/TreeSelect.d.ts +2 -10
- package/dist/TreeSelect/TreeSelect.js +90 -566
- package/dist/TreeSelect/TreeSelectOption.d.ts +6 -0
- package/dist/TreeSelect/TreeSelectOption.js +62 -0
- package/dist/TreeSelect/Utils.d.ts +10 -3
- package/dist/TreeSelect/Utils.js +37 -19
- package/dist/TreeSelect/cacheOptions.d.ts +9 -0
- package/dist/TreeSelect/cacheOptions.js +22 -0
- package/dist/TreeSelect/index.d.ts +0 -1
- package/dist/TreeSelect/typings.d.ts +11 -63
- package/dist/TreeSelect/useSelect.d.ts +78 -0
- package/dist/TreeSelect/useSelect.js +104 -0
- package/dist/TreeSelect/useTree.d.ts +125 -0
- package/dist/TreeSelect/useTree.js +285 -0
- package/dist/Upload/UploadContent.js +3 -1
- package/dist/Upload/ajax.js +3 -0
- package/dist/Upload/typings.d.ts +5 -1
- package/dist/Util/PopupManager.js +1 -1
- package/dist/Util/aria.d.ts +1 -1
- package/dist/Util/aria.js +12 -12
- package/dist/Util/base.d.ts +36 -6
- package/dist/Util/base.js +180 -13
- package/dist/Util/easings.d.ts +1 -0
- package/dist/Util/easings.js +8 -0
- package/dist/Util/error.d.ts +3 -0
- package/dist/Util/error.js +39 -0
- package/dist/Util/icons.d.ts +2 -0
- package/dist/Util/icons.js +15 -0
- package/dist/Util/index.d.ts +6 -2
- package/dist/Util/index.js +6 -2
- package/dist/Util/position.d.ts +9 -0
- package/dist/Util/position.js +53 -0
- package/dist/Util/raf.d.ts +4 -0
- package/dist/Util/raf.js +10 -0
- package/dist/Util/scroll.d.ts +9 -0
- package/dist/Util/scroll.js +72 -0
- package/dist/Util/throttleByRaf.d.ts +4 -0
- package/dist/Util/throttleByRaf.js +21 -0
- package/dist/VirtualList/builders/build-grid.d.ts +5 -0
- package/dist/VirtualList/builders/build-grid.js +561 -0
- package/dist/VirtualList/builders/build-list.d.ts +7 -0
- package/dist/VirtualList/builders/build-list.js +408 -0
- package/dist/VirtualList/components/dynamic-size-grid.d.ts +15 -0
- package/dist/VirtualList/components/dynamic-size-grid.js +242 -0
- package/dist/VirtualList/components/dynamic-size-list.d.ts +7 -0
- package/dist/VirtualList/components/dynamic-size-list.js +186 -0
- package/dist/VirtualList/components/fixed-size-grid.d.ts +4 -0
- package/dist/VirtualList/components/fixed-size-grid.js +161 -0
- package/dist/VirtualList/components/fixed-size-list.d.ts +7 -0
- package/dist/VirtualList/components/fixed-size-list.js +103 -0
- package/dist/VirtualList/components/scrollbar.d.ts +5 -0
- package/dist/VirtualList/components/scrollbar.js +272 -0
- package/dist/VirtualList/defaults.d.ts +26 -0
- package/dist/VirtualList/defaults.js +24 -0
- package/dist/VirtualList/hooks/use-cache.d.ts +1 -0
- package/dist/VirtualList/hooks/use-cache.js +16 -0
- package/dist/VirtualList/hooks/use-grid-touch.d.ts +8 -0
- package/dist/VirtualList/hooks/use-grid-touch.js +58 -0
- package/dist/VirtualList/hooks/use-grid-wheel.d.ts +12 -0
- package/dist/VirtualList/hooks/use-grid-wheel.js +48 -0
- package/dist/VirtualList/hooks/use-wheel.d.ts +12 -0
- package/dist/VirtualList/hooks/use-wheel.js +41 -0
- package/dist/VirtualList/index.d.ts +9 -0
- package/dist/VirtualList/index.js +6 -0
- package/dist/VirtualList/props.d.ts +95 -0
- package/dist/VirtualList/props.js +42 -0
- package/dist/VirtualList/types.d.ts +151 -0
- package/dist/VirtualList/types.js +1 -0
- package/dist/VirtualList/utils.d.ts +11 -0
- package/dist/VirtualList/utils.js +56 -0
- package/dist/Watermark/Watermark.d.ts +4 -0
- package/dist/Watermark/Watermark.js +257 -0
- package/dist/Watermark/helper.d.ts +50 -0
- package/dist/Watermark/helper.js +253 -0
- package/dist/Watermark/index.d.ts +2 -0
- package/dist/Watermark/index.js +1 -0
- package/dist/Watermark/typings.d.ts +93 -0
- package/dist/Watermark/typings.js +1 -0
- package/dist/config/Constants.d.ts +3 -0
- package/dist/config/Constants.js +8 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/popperPropsUtils.js +1 -1
- package/dist/hooks/treePropsUtils.d.ts +3 -3
- package/dist/hooks/treePropsUtils.js +2 -2
- package/dist/hooks/useClassNames.d.ts +1 -0
- package/dist/hooks/useClickOutside.js +25 -9
- package/dist/hooks/useCommonProps.d.ts +4 -0
- package/dist/hooks/useCommonProps.js +12 -3
- package/dist/hooks/useConfigProvider.d.ts +27 -0
- package/dist/hooks/useConfigProvider.js +78 -0
- package/dist/hooks/useLockscreen.d.ts +6 -0
- package/dist/hooks/useLockscreen.js +45 -0
- package/dist/hooks/useResizeObserver.d.ts +1 -1
- package/dist/hooks/useResizeObserver.js +7 -7
- package/dist/index.css +1 -1
- package/dist/index.d.ts +50 -22
- package/dist/index.js +27 -10
- package/dist/locale/en.d.ts +4 -1
- package/dist/locale/en.js +4 -1
- package/dist/locale/zhCn.d.ts +4 -1
- package/dist/locale/zhCn.js +4 -1
- package/package.json +5 -3
- package/theme-chalk/affix.scss +7 -0
- package/theme-chalk/alert.scss +115 -0
- package/theme-chalk/anchor-link.scss +45 -0
- package/theme-chalk/anchor.scss +93 -0
- package/theme-chalk/aside.scss +8 -8
- package/theme-chalk/backtop.scss +29 -0
- package/theme-chalk/breadcrumb-item.scss +58 -0
- package/theme-chalk/breadcrumb.scss +5 -61
- package/theme-chalk/button-group.scss +80 -80
- package/theme-chalk/button.scss +304 -304
- package/theme-chalk/calendar/date-table.scss +164 -164
- package/theme-chalk/cascader-panel.scss +57 -82
- package/theme-chalk/cascader.scss +206 -160
- package/theme-chalk/checkbox.scss +38 -0
- package/theme-chalk/collapse-item.scss +72 -0
- package/theme-chalk/collapse.scss +21 -76
- package/theme-chalk/color/index.scss +20 -20
- package/theme-chalk/common/popup.scss +47 -0
- package/theme-chalk/common/transition.scss +142 -142
- package/theme-chalk/common/var.scss +62 -6
- package/theme-chalk/container.scss +14 -14
- package/theme-chalk/dark/css-vars.scss +39 -39
- package/theme-chalk/dark/var.scss +225 -225
- package/theme-chalk/date-picker.scss +12 -12
- package/theme-chalk/dialog.scss +145 -137
- package/theme-chalk/drawer.scss +252 -246
- package/theme-chalk/footer.scss +12 -12
- package/theme-chalk/form-item.scss +437 -0
- package/theme-chalk/form.scss +23 -361
- package/theme-chalk/header.scss +12 -12
- package/theme-chalk/index.scss +21 -1
- package/theme-chalk/input/input-range.scss +2 -1
- package/theme-chalk/input/input.scss +458 -424
- package/theme-chalk/input-number.scss +82 -75
- package/theme-chalk/link.scss +87 -87
- package/theme-chalk/main.scss +14 -14
- package/theme-chalk/menu.scss +353 -353
- package/theme-chalk/message-box.scss +160 -133
- package/theme-chalk/message.scss +54 -128
- package/theme-chalk/mixins/_button.scss +224 -224
- package/theme-chalk/mixins/_col.scss +33 -33
- package/theme-chalk/mixins/_var.scss +67 -67
- package/theme-chalk/mixins/config.scss +5 -5
- package/theme-chalk/mixins/function.scss +99 -99
- package/theme-chalk/mixins/mixins.scss +237 -240
- package/theme-chalk/mixins/utils.scss +39 -39
- package/theme-chalk/notification.scss +96 -143
- package/theme-chalk/overlay.scss +17 -0
- package/theme-chalk/page-header.scss +60 -0
- package/theme-chalk/popper.scss +104 -104
- package/theme-chalk/radio-button.scss +169 -169
- package/theme-chalk/radio.scss +3 -3
- package/theme-chalk/segmented.scss +186 -0
- package/theme-chalk/select/index.scss +278 -272
- package/theme-chalk/slider.scss +212 -0
- package/theme-chalk/space.scss +20 -0
- package/theme-chalk/statistic.scss +35 -0
- package/theme-chalk/step.scss +320 -0
- package/theme-chalk/steps.scss +22 -0
- package/theme-chalk/switch.scss +300 -300
- package/theme-chalk/table-v2.scss +237 -0
- package/theme-chalk/table.scss +461 -482
- package/theme-chalk/tag.scss +181 -181
- package/theme-chalk/text.scss +48 -0
- package/theme-chalk/time-range-picker.scss +1 -1
- package/theme-chalk/tooltip.scss +2 -2
- package/theme-chalk/tour.scss +170 -0
- package/theme-chalk/transfer.scss +38 -12
- package/theme-chalk/transition.scss +34 -4
- package/theme-chalk/tree-select.scss +35 -19
- package/theme-chalk/tree.scss +136 -0
- package/theme-chalk/var.scss +83 -83
- package/theme-chalk/virtual-list.scss +40 -0
- package/dist/Input/Input.1.d.ts +0 -16
- package/dist/Input/Input.1.js +0 -376
- package/dist/Tree/DirectoryTree.d.ts +0 -15
- package/dist/Tree/DirectoryTree.js +0 -183
- package/dist/Tree/DropIndicator.d.ts +0 -8
- package/dist/Tree/DropIndicator.js +0 -34
- package/dist/Tree/Indent.d.ts +0 -9
- package/dist/Tree/MotionTreeNode.d.ts +0 -14
- package/dist/Tree/MotionTreeNode.js +0 -125
- package/dist/Tree/NodeList.d.ts +0 -50
- package/dist/Tree/NodeList.js +0 -301
- package/dist/Tree/RCTree.d.ts +0 -248
- package/dist/Tree/RCTree.js +0 -1216
- package/dist/Tree/contextTypes.d.ts +0 -69
- package/dist/Tree/contextTypes.js +0 -9
- package/dist/Tree/typings.tsx--bak +0 -245
- package/dist/Tree/useUnmount.d.ts +0 -5
- package/dist/Tree/useUnmount.js +0 -34
- package/dist/Tree/util.d.ts +0 -51
- package/dist/Tree/util.js +0 -303
- package/dist/Tree/utils/conductUtil.d.ts +0 -17
- package/dist/Tree/utils/conductUtil.js +0 -209
- package/dist/Tree/utils/dictUtil.d.ts +0 -13
- package/dist/Tree/utils/dictUtil.js +0 -75
- package/dist/Tree/utils/diffUtil.d.ts +0 -7
- package/dist/Tree/utils/diffUtil.js +0 -48
- package/dist/Tree/utils/dropIndicator.d.ts +0 -11
- package/dist/Tree/utils/dropIndicator.js +0 -36
- package/dist/Tree/utils/iconUtil.d.ts +0 -5
- package/dist/Tree/utils/iconUtil.js +0 -62
- package/dist/Tree/utils/keyUtil.d.ts +0 -2
- package/dist/Tree/utils/keyUtil.js +0 -3
- package/dist/Tree/utils/motion.d.ts +0 -10
- package/dist/Tree/utils/motion.js +0 -54
- package/dist/Tree/utils/pickAttrs.d.ts +0 -11
- package/dist/Tree/utils/pickAttrs.js +0 -51
- package/dist/Tree/utils/treeUtil.d.ts +0 -86
- package/dist/Tree/utils/treeUtil.js +0 -364
- package/theme-chalk/button/_mixins.scss +0 -317
- package/theme-chalk/button/button-group.scss +0 -83
- package/theme-chalk/button/button.scss +0 -382
- package/theme-chalk/button/index.scss +0 -2
- package/theme-chalk/button--bak/_mixins.scss +0 -317
- package/theme-chalk/button--bak/button-group.scss +0 -83
- package/theme-chalk/button--bak/button.scss +0 -382
- package/theme-chalk/button--bak/index.scss +0 -2
- package/theme-chalk/calendar/date-table.scss--bak +0 -156
- package/theme-chalk/input/input.scss--bak +0 -578
- package/theme-chalk/link.scss--bak +0 -99
- package/theme-chalk/popper.scss--bak +0 -86
- package/theme-chalk/radio-button.scss--bak +0 -128
- package/theme-chalk/select/index.scss--bak +0 -247
- package/theme-chalk/switch.scss--bak +0 -273
- package/theme-chalk/tag.scss--bak +0 -203
- package/theme-chalk/tree/_directory.scss +0 -73
- package/theme-chalk/tree/_tree.scss +0 -401
- package/theme-chalk/tree/index.scss +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
3
|
-
var _excluded = ["title", "message", "type", "icon", "width", "callback", "showClose", "beforeClose", "showCancelButton", "showConfirmButton", "cancelButtonText", "cancelButtonClass", "confirmButtonClass", "buttonSize", "buttonPosition", "draggable", "overflow", "showInput", "inputType", "inputPlaceholder", "inputPattern", "inputErrorMessage", "inputValidator", "distinguishCancelAndClose", "classPrefix", "className", "style", "
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
3
|
+
var _excluded = ["title", "message", "type", "icon", "width", "callback", "showClose", "beforeClose", "showCancelButton", "showConfirmButton", "cancelButtonText", "cancelButtonClass", "confirmButtonClass", "buttonSize", "buttonPosition", "draggable", "overflow", "showInput", "inputType", "inputPlaceholder", "inputPattern", "inputErrorMessage", "inputValidator", "distinguishCancelAndClose", "classPrefix", "className", "style", "roundButton", "dangerouslyUseHTMLString"];
|
|
4
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -21,44 +21,58 @@ import isString from 'lodash/isString';
|
|
|
21
21
|
import React, { cloneElement, forwardRef, memo, useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
22
22
|
import { useTranslation } from 'react-i18next';
|
|
23
23
|
import Button from "../Button/Button";
|
|
24
|
-
import { useConfigProvider } from "../ConfigProvider/ConfigProviderContext";
|
|
25
24
|
import Dialog from "../Dialog/Dialog";
|
|
26
25
|
import { partitionAnimationProps, useClassNames, useControlled } from "../hooks";
|
|
27
26
|
import { namespace } from "../hooks/prefix";
|
|
28
27
|
import Icon from "../Icon/Icon";
|
|
29
28
|
import Input from "../Input/Input";
|
|
30
|
-
import { addUnit, isNotEmpty } from "../Util";
|
|
29
|
+
import { addUnit, isNotEmpty, mergeDefaultProps } from "../Util";
|
|
31
30
|
var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32
|
-
var
|
|
33
|
-
locale = _useConfigProvider.locale;
|
|
31
|
+
var _props2;
|
|
34
32
|
var _useTranslation = useTranslation(),
|
|
35
33
|
t = _useTranslation.t;
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
var locale = useMemo(function () {
|
|
35
|
+
var _props;
|
|
36
|
+
return ((_props = props) === null || _props === void 0 || (_props = _props.options) === null || _props === void 0 ? void 0 : _props.locale) || 'en';
|
|
37
|
+
}, [(_props2 = props) === null || _props2 === void 0 || (_props2 = _props2.options) === null || _props2 === void 0 ? void 0 : _props2.locale]);
|
|
38
|
+
props = mergeDefaultProps({
|
|
39
|
+
options: {}
|
|
40
|
+
}, props);
|
|
41
|
+
props.options = mergeDefaultProps({
|
|
42
|
+
width: 420,
|
|
43
|
+
showClose: true,
|
|
44
|
+
showCancelButton: true,
|
|
45
|
+
showConfirmButton: true,
|
|
46
|
+
cancelButtonText: t('el.messagebox.cancel', {
|
|
47
|
+
lng: locale
|
|
48
|
+
}),
|
|
49
|
+
confirmButtonText: t('el.messagebox.confirm', {
|
|
50
|
+
lng: locale
|
|
51
|
+
}),
|
|
52
|
+
distinguishCancelAndClose: false,
|
|
53
|
+
draggable: false,
|
|
54
|
+
buttonPosition: 'right',
|
|
55
|
+
showInput: false
|
|
56
|
+
}, props.options);
|
|
57
|
+
var _props3 = props,
|
|
58
|
+
boxType = _props3.boxType,
|
|
59
|
+
onAction = _props3.onAction,
|
|
60
|
+
options = _props3.options;
|
|
39
61
|
var title = options.title,
|
|
40
62
|
message = options.message,
|
|
41
63
|
type = options.type,
|
|
42
64
|
icon = options.icon,
|
|
43
|
-
|
|
44
|
-
width = _options$width === void 0 ? 420 : _options$width,
|
|
65
|
+
width = options.width,
|
|
45
66
|
callback = options.callback,
|
|
46
|
-
|
|
47
|
-
showClose = _options$showClose === void 0 ? true : _options$showClose,
|
|
67
|
+
showClose = options.showClose,
|
|
48
68
|
beforeClose = options.beforeClose,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
showConfirmButton = _options$showConfirmB === void 0 ? true : _options$showConfirmB,
|
|
53
|
-
_options$cancelButton = options.cancelButtonText,
|
|
54
|
-
cancelButtonText = _options$cancelButton === void 0 ? t('el.messagebox.cancel', {
|
|
55
|
-
lng: locale
|
|
56
|
-
}) : _options$cancelButton,
|
|
69
|
+
showCancelButton = options.showCancelButton,
|
|
70
|
+
showConfirmButton = options.showConfirmButton,
|
|
71
|
+
cancelButtonText = options.cancelButtonText,
|
|
57
72
|
cancelButtonClass = options.cancelButtonClass,
|
|
58
73
|
confirmButtonClass = options.confirmButtonClass,
|
|
59
74
|
buttonSize = options.buttonSize,
|
|
60
|
-
|
|
61
|
-
buttonPosition = _options$buttonPositi === void 0 ? 'right' : _options$buttonPositi,
|
|
75
|
+
buttonPosition = options.buttonPosition,
|
|
62
76
|
draggable = options.draggable,
|
|
63
77
|
overflow = options.overflow,
|
|
64
78
|
showInput = options.showInput,
|
|
@@ -72,8 +86,8 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
72
86
|
classPrefix = _options$classPrefix === void 0 ? 'message-box' : _options$classPrefix,
|
|
73
87
|
className = options.className,
|
|
74
88
|
style = options.style,
|
|
75
|
-
padding = options.padding,
|
|
76
89
|
roundButton = options.roundButton,
|
|
90
|
+
dangerouslyUseHTMLString = options.dangerouslyUseHTMLString,
|
|
77
91
|
rest = _objectWithoutProperties(options, _excluded);
|
|
78
92
|
var _useClassNames = useClassNames(classPrefix),
|
|
79
93
|
e = _useClassNames.e,
|
|
@@ -86,9 +100,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
86
100
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
87
101
|
confirmButtonLoading = _useState4[0],
|
|
88
102
|
setConfirmButtonLoading = _useState4[1];
|
|
89
|
-
var _useState5 = useState(options.confirmButtonText
|
|
90
|
-
lng: locale
|
|
91
|
-
})),
|
|
103
|
+
var _useState5 = useState(options.confirmButtonText),
|
|
92
104
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
93
105
|
confirmButtonText = _useState6[0],
|
|
94
106
|
setConfirmButtonText = _useState6[1];
|
|
@@ -228,7 +240,8 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
228
240
|
ref: containerRef,
|
|
229
241
|
classPrefix: classPrefix,
|
|
230
242
|
visible: visible,
|
|
231
|
-
|
|
243
|
+
modalClass: "is-message-box",
|
|
244
|
+
className: className
|
|
232
245
|
// @ts-ignore
|
|
233
246
|
,
|
|
234
247
|
style: _objectSpread(_objectSpread({}, style), {}, _defineProperty({}, "--".concat(namespace, "-messagebox-width"), addUnit(width))),
|
|
@@ -240,46 +253,51 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
240
253
|
beforeClose: function beforeClose() {
|
|
241
254
|
return handleAction('close');
|
|
242
255
|
}
|
|
243
|
-
}, transitionProps
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
256
|
+
}, transitionProps, {
|
|
257
|
+
unmountOnExit: false,
|
|
258
|
+
transitionConfig: 'fade-in-linear',
|
|
259
|
+
footer: showCancelButton || showConfirmButton ? /*#__PURE__*/React.createElement(React.Fragment, null, showCancelButton && /*#__PURE__*/React.createElement(Button, {
|
|
260
|
+
className: cancelButtonClass,
|
|
261
|
+
size: buttonSize,
|
|
262
|
+
round: roundButton,
|
|
263
|
+
onClick: function onClick() {
|
|
264
|
+
return handleAction('cancel');
|
|
265
|
+
}
|
|
266
|
+
}, cancelButtonText), showConfirmButton && /*#__PURE__*/React.createElement(Button, {
|
|
267
|
+
className: confirmButtonClass,
|
|
268
|
+
type: "primary",
|
|
269
|
+
size: buttonSize,
|
|
270
|
+
round: roundButton,
|
|
271
|
+
loading: confirmButtonLoading,
|
|
272
|
+
onClick: function onClick() {
|
|
273
|
+
return handleAction('confirm');
|
|
274
|
+
}
|
|
275
|
+
}, confirmButtonText)) : null
|
|
276
|
+
}), dangerouslyUseHTMLString ? /*#__PURE__*/React.createElement("div", {
|
|
247
277
|
className: e(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["container"])))
|
|
248
278
|
}, iconContent, /*#__PURE__*/React.createElement("div", {
|
|
249
|
-
|
|
279
|
+
dangerouslySetInnerHTML: {
|
|
280
|
+
__html: message
|
|
281
|
+
}
|
|
282
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
283
|
+
className: e(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["container"])))
|
|
284
|
+
}, iconContent, /*#__PURE__*/React.createElement("div", {
|
|
285
|
+
className: e(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["message"])))
|
|
250
286
|
}, messageContainer)), boxType === 'prompt' && showInput && /*#__PURE__*/React.createElement("div", {
|
|
251
|
-
className: e(
|
|
287
|
+
className: e(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["input"])))
|
|
252
288
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
253
289
|
value: inputValue,
|
|
254
|
-
type: inputType
|
|
255
|
-
error
|
|
290
|
+
type: inputType
|
|
291
|
+
// error={validateError}
|
|
292
|
+
,
|
|
256
293
|
placeholder: inputPlaceholder,
|
|
257
294
|
onChange: function onChange(value) {
|
|
258
295
|
setInputValue(value);
|
|
259
296
|
validate(value);
|
|
260
297
|
}
|
|
261
298
|
}), validateError && /*#__PURE__*/React.createElement("div", {
|
|
262
|
-
className: e(
|
|
263
|
-
}, editorErrorMessage)))
|
|
264
|
-
classPrefix: classPrefix,
|
|
265
|
-
position: buttonPosition
|
|
266
|
-
}, showCancelButton && /*#__PURE__*/React.createElement(Button, {
|
|
267
|
-
className: cancelButtonClass,
|
|
268
|
-
size: buttonSize,
|
|
269
|
-
round: roundButton,
|
|
270
|
-
onClick: function onClick() {
|
|
271
|
-
return handleAction('cancel');
|
|
272
|
-
}
|
|
273
|
-
}, cancelButtonText), showConfirmButton && /*#__PURE__*/React.createElement(Button, {
|
|
274
|
-
className: confirmButtonClass,
|
|
275
|
-
type: "primary",
|
|
276
|
-
size: buttonSize,
|
|
277
|
-
round: roundButton,
|
|
278
|
-
loading: confirmButtonLoading,
|
|
279
|
-
onClick: function onClick() {
|
|
280
|
-
return handleAction('confirm');
|
|
281
|
-
}
|
|
282
|
-
}, confirmButtonText)));
|
|
299
|
+
className: e(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["errormsg"])))
|
|
300
|
+
}, editorErrorMessage))));
|
|
283
301
|
}));
|
|
284
302
|
MessageBox.displayName = 'ElMessageBox';
|
|
285
303
|
export default MessageBox;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Action, MessageBoxInputData, MessageBoxProps } from './typings';
|
|
2
|
+
import { Action, MessageBoxData, MessageBoxInputData, MessageBoxProps, MessageState } from './typings';
|
|
3
|
+
export declare const instanceFactory: <T extends MessageBoxData>(boxType: MessageState['boxType'], locale?: 'en' | 'zh-CN') => (message: string | React.ReactElement, title?: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<T>;
|
|
3
4
|
export declare const MessageBox: {
|
|
4
5
|
(options?: MessageBoxProps): Promise<Action>;
|
|
5
6
|
/**
|
package/dist/MessageBox/index.js
CHANGED
|
@@ -8,7 +8,8 @@ import { isObject, isUndefined } from "../Util";
|
|
|
8
8
|
import Main from "./Main";
|
|
9
9
|
var MESSAGE_BOX_DEFAULT_OPTS = {
|
|
10
10
|
alert: {
|
|
11
|
-
closeOnClickModal: false
|
|
11
|
+
closeOnClickModal: false,
|
|
12
|
+
showCancelButton: false
|
|
12
13
|
},
|
|
13
14
|
confirm: {
|
|
14
15
|
showCancelButton: true
|
|
@@ -18,7 +19,7 @@ var MESSAGE_BOX_DEFAULT_OPTS = {
|
|
|
18
19
|
showInput: true
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
var instanceFactory = function instanceFactory(boxType) {
|
|
22
|
+
export var instanceFactory = function instanceFactory(boxType, locale) {
|
|
22
23
|
return function (message, title, options) {
|
|
23
24
|
var _options;
|
|
24
25
|
var titleOrOpts = '';
|
|
@@ -36,6 +37,7 @@ var instanceFactory = function instanceFactory(boxType) {
|
|
|
36
37
|
new Main({
|
|
37
38
|
boxType: boxType,
|
|
38
39
|
options: _objectSpread(_objectSpread({
|
|
40
|
+
locale: locale,
|
|
39
41
|
message: message,
|
|
40
42
|
title: titleOrOpts
|
|
41
43
|
}, MESSAGE_BOX_DEFAULT_OPTS[boxType]), options),
|
|
@@ -8,6 +8,7 @@ export interface MessageBoxProps extends BaseProps, NativeProps, AnimationEventP
|
|
|
8
8
|
/** 消息正文内容 */
|
|
9
9
|
message?: string | React.ReactElement;
|
|
10
10
|
/** 是否将 message 属性作为 HTML 片段处理 */
|
|
11
|
+
dangerouslyUseHTMLString?: boolean;
|
|
11
12
|
/** 消息类型,用于显示图标 */
|
|
12
13
|
type?: 'success' | 'info' | 'warning' | 'error';
|
|
13
14
|
/** 消息自定义图标,该属性会覆盖 type 的图标 */
|
|
@@ -43,7 +44,6 @@ export interface MessageBoxProps extends BaseProps, NativeProps, AnimationEventP
|
|
|
43
44
|
/** 是否将取消(点击取消按钮)与关闭(点击关闭按钮或遮罩层、按下 Esc 键)进行区分 */
|
|
44
45
|
distinguishCancelAndClose?: boolean;
|
|
45
46
|
/** 内容区域padding */
|
|
46
|
-
padding?: string | number;
|
|
47
47
|
/** 是否在 MessageBox 出现时将 body 滚动锁定 */
|
|
48
48
|
lockScroll?: boolean;
|
|
49
49
|
/** 是否显示输入框 */
|
|
@@ -68,6 +68,8 @@ export interface MessageBoxProps extends BaseProps, NativeProps, AnimationEventP
|
|
|
68
68
|
overflow?: boolean;
|
|
69
69
|
/** 是否使用圆角按钮 */
|
|
70
70
|
roundButton?: boolean;
|
|
71
|
+
/** 国际化 */
|
|
72
|
+
locale?: 'en' | 'zh-CN';
|
|
71
73
|
}
|
|
72
74
|
export type MessageState = {
|
|
73
75
|
boxType: '' | 'prompt' | 'alert' | 'confirm';
|
|
@@ -2,10 +2,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
9
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
10
|
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."); }
|
|
11
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -15,9 +15,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import { createPortal } from 'react-dom';
|
|
18
|
+
import Icon from "../Icon/Icon";
|
|
18
19
|
import Transition from "../Transition/Transition";
|
|
19
20
|
import { PopupManager, mergeDefaultProps } from "../Util";
|
|
20
|
-
import { EVENT_CODE,
|
|
21
|
+
import { EVENT_CODE, TypeComponentsMap } from "../config/Constants";
|
|
21
22
|
import { useClassNames } from "../hooks";
|
|
22
23
|
var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
23
24
|
props = mergeDefaultProps({
|
|
@@ -48,6 +49,7 @@ var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48
49
|
afterLeave = _props.afterLeave;
|
|
49
50
|
var _useClassNames = useClassNames(classPrefix),
|
|
50
51
|
b = _useClassNames.b,
|
|
52
|
+
m = _useClassNames.m,
|
|
51
53
|
e = _useClassNames.e;
|
|
52
54
|
var _useState = useState(false),
|
|
53
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -61,7 +63,12 @@ var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
61
63
|
var timer = useRef(null);
|
|
62
64
|
var notificationRef = useRef(null);
|
|
63
65
|
var contentRef = useRef(null);
|
|
64
|
-
var
|
|
66
|
+
var horizontalProperty = useMemo(function () {
|
|
67
|
+
return position.endsWith('right') ? 'right' : 'left';
|
|
68
|
+
}, [position]);
|
|
69
|
+
var verticalProperty = useMemo(function () {
|
|
70
|
+
return position.startsWith('top') ? 'top' : 'bottom';
|
|
71
|
+
}, [position]);
|
|
65
72
|
var handleClose = useCallback(function () {
|
|
66
73
|
setVisible(false);
|
|
67
74
|
onClose === null || onClose === void 0 || onClose();
|
|
@@ -124,20 +131,20 @@ var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
124
131
|
}
|
|
125
132
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126
133
|
}, [visible]);
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var _type = !iconClass && type;
|
|
131
|
-
return _type && TypeMap[_type] ? b("icon-".concat(TypeMap[_type]), false) : '';
|
|
132
|
-
}, [b, iconClass, type]);
|
|
134
|
+
var positionStyle = useMemo(function () {
|
|
135
|
+
return _defineProperty(_defineProperty({}, verticalProperty, "".concat(offset, "px")), "zIndex", PopupManager.nextZIndex());
|
|
136
|
+
}, [offset, verticalProperty]);
|
|
133
137
|
|
|
134
138
|
/** 关闭图标 */
|
|
139
|
+
// const closeIcon = useMemo(() => showClose && <div className={classNames(e`closeBtn`, b('icon-close', false))} onClick={handleClose} />, [showClose, e, b, handleClose]);
|
|
135
140
|
var closeIcon = useMemo(function () {
|
|
136
|
-
return showClose && /*#__PURE__*/React.createElement(
|
|
137
|
-
|
|
141
|
+
return showClose && /*#__PURE__*/React.createElement(Icon, {
|
|
142
|
+
name: "xmark",
|
|
143
|
+
prefix: "fal",
|
|
144
|
+
className: classNames(e(_templateObject || (_templateObject = _taggedTemplateLiteral(["closeBtn"])))),
|
|
138
145
|
onClick: handleClose
|
|
139
146
|
});
|
|
140
|
-
}, [showClose, e,
|
|
147
|
+
}, [showClose, e, handleClose]);
|
|
141
148
|
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Transition, {
|
|
142
149
|
nodeRef: notificationRef,
|
|
143
150
|
name: b('notification-fade', false),
|
|
@@ -146,19 +153,19 @@ var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
146
153
|
afterLeave: afterLeave
|
|
147
154
|
}, /*#__PURE__*/React.createElement("div", {
|
|
148
155
|
ref: notificationRef,
|
|
149
|
-
className: classNames(b(),
|
|
150
|
-
style: _objectSpread(
|
|
156
|
+
className: classNames(b(), horizontalProperty, props.className),
|
|
157
|
+
style: _objectSpread(_objectSpread({}, props.style), positionStyle)
|
|
151
158
|
// 鼠标悬浮停止自动关闭
|
|
152
159
|
,
|
|
153
160
|
onMouseEnter: clearTimer,
|
|
154
161
|
onMouseLeave: startTimer,
|
|
155
162
|
onClick: props.onClick
|
|
156
|
-
}, (type || iconClass) && /*#__PURE__*/React.createElement(
|
|
157
|
-
|
|
163
|
+
}, (type || iconClass) && /*#__PURE__*/React.createElement(Icon, {
|
|
164
|
+
name: TypeComponentsMap[type],
|
|
165
|
+
prefix: "fas",
|
|
166
|
+
className: classNames(e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["icon"]))), _defineProperty({}, m(type), type && TypeComponentsMap[type]), iconClass)
|
|
158
167
|
}), /*#__PURE__*/React.createElement("div", {
|
|
159
|
-
className: classNames(e(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["group"])))
|
|
160
|
-
'is-with-icon': typeClass || iconClass
|
|
161
|
-
})
|
|
168
|
+
className: classNames(e(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["group"]))))
|
|
162
169
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
163
170
|
className: e(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["title"])))
|
|
164
171
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PageHeaderProps } from './typings';
|
|
3
|
+
/**
|
|
4
|
+
* @description PageHeader 页面头部组件
|
|
5
|
+
* 用于展示页面的标题、面包屑和操作区域
|
|
6
|
+
*/
|
|
7
|
+
declare const PageHeader: React.MemoExoticComponent<React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLDivElement>>>;
|
|
8
|
+
export default PageHeader;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
var _excluded = ["icon", "title", "content", "onBack", "breadcrumb", "extra", "className", "style", "children"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import React, { forwardRef, memo, useCallback, useMemo } from 'react';
|
|
11
|
+
import { useTranslation } from 'react-i18next';
|
|
12
|
+
import { useConfigProvider } from "../ConfigProvider/ConfigProviderContext";
|
|
13
|
+
import Divider from "../Divider/Divider";
|
|
14
|
+
import { useClassNames } from "../hooks";
|
|
15
|
+
import Icon from "../Icon/Icon";
|
|
16
|
+
/**
|
|
17
|
+
* @description PageHeader 页面头部组件
|
|
18
|
+
* 用于展示页面的标题、面包屑和操作区域
|
|
19
|
+
*/
|
|
20
|
+
var PageHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
+
var _props$icon = props.icon,
|
|
22
|
+
icon = _props$icon === void 0 ? 'arrow-left' : _props$icon,
|
|
23
|
+
title = props.title,
|
|
24
|
+
_props$content = props.content,
|
|
25
|
+
content = _props$content === void 0 ? '' : _props$content,
|
|
26
|
+
onBack = props.onBack,
|
|
27
|
+
breadcrumb = props.breadcrumb,
|
|
28
|
+
extra = props.extra,
|
|
29
|
+
className = props.className,
|
|
30
|
+
style = props.style,
|
|
31
|
+
children = props.children,
|
|
32
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
33
|
+
var _useClassNames = useClassNames('page-header'),
|
|
34
|
+
b = _useClassNames.b,
|
|
35
|
+
e = _useClassNames.e,
|
|
36
|
+
m = _useClassNames.m;
|
|
37
|
+
var _useConfigProvider = useConfigProvider(),
|
|
38
|
+
locale = _useConfigProvider.locale;
|
|
39
|
+
var _useTranslation = useTranslation(),
|
|
40
|
+
t = _useTranslation.t;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description 处理返回按钮点击事件
|
|
44
|
+
*/
|
|
45
|
+
var handleClick = useCallback(function () {
|
|
46
|
+
onBack === null || onBack === void 0 || onBack();
|
|
47
|
+
}, [onBack]);
|
|
48
|
+
var hasBreadcrumb = useMemo(function () {
|
|
49
|
+
return !!breadcrumb;
|
|
50
|
+
}, [breadcrumb]);
|
|
51
|
+
var hasExtra = useMemo(function () {
|
|
52
|
+
return !!extra;
|
|
53
|
+
}, [extra]);
|
|
54
|
+
var hasContent = useMemo(function () {
|
|
55
|
+
return !!children;
|
|
56
|
+
}, [children]);
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
58
|
+
ref: ref,
|
|
59
|
+
className: classNames(b(), e('contentful', hasContent), _defineProperty({}, m('has-breadcrumb'), hasBreadcrumb), _defineProperty({}, m('has-extra'), hasExtra), className),
|
|
60
|
+
style: style
|
|
61
|
+
}, rest), hasBreadcrumb && /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: e('breadcrumb')
|
|
63
|
+
}, breadcrumb), /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: e('header')
|
|
65
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: e('left')
|
|
67
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: e('back'),
|
|
69
|
+
role: "button",
|
|
70
|
+
tabIndex: 0,
|
|
71
|
+
onClick: handleClick
|
|
72
|
+
}, icon && /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: e('icon')
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
75
|
+
name: icon
|
|
76
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: e('title')
|
|
78
|
+
}, title || t('el.pageHeader.title', {
|
|
79
|
+
lng: locale
|
|
80
|
+
}))), /*#__PURE__*/React.createElement(Divider, {
|
|
81
|
+
direction: "vertical"
|
|
82
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: e('content')
|
|
84
|
+
}, content)), hasExtra && /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: e('extra')
|
|
86
|
+
}, extra)), hasContent && /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
className: e('main')
|
|
88
|
+
}, children));
|
|
89
|
+
}));
|
|
90
|
+
PageHeader.displayName = 'ElPageHeader';
|
|
91
|
+
export default PageHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PageHeader } from "./PageHeader";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconName } from '../Icon';
|
|
3
|
+
import { BaseProps, NativeProps } from '../types/common';
|
|
4
|
+
/**
|
|
5
|
+
* @description PageHeader 页面头部组件属性
|
|
6
|
+
*/
|
|
7
|
+
export interface PageHeaderProps extends BaseProps, NativeProps {
|
|
8
|
+
/**
|
|
9
|
+
* @description 页面头部的图标组件
|
|
10
|
+
* @default Left 图标
|
|
11
|
+
*/
|
|
12
|
+
icon?: IconName;
|
|
13
|
+
/**
|
|
14
|
+
* @description 页面头部的主标题
|
|
15
|
+
*/
|
|
16
|
+
title?: string | React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* @description 页面头部的内容
|
|
19
|
+
* @default ''
|
|
20
|
+
*/
|
|
21
|
+
content?: string | React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* @description 点击返回图标时触发的回调函数
|
|
24
|
+
*/
|
|
25
|
+
onBack?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* @description 面包屑插槽内容
|
|
28
|
+
*/
|
|
29
|
+
breadcrumb?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* @description 额外内容插槽(右侧)
|
|
32
|
+
*/
|
|
33
|
+
extra?: React.ReactNode;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,7 +11,7 @@ export interface PaginationRef {
|
|
|
11
11
|
/** 设置每页条数 */
|
|
12
12
|
setPageSize: (value: number) => void;
|
|
13
13
|
}
|
|
14
|
-
export interface PaginationProps extends BaseProps, NativeProps {
|
|
14
|
+
export interface PaginationProps extends BaseProps, NativeProps<'--el-pagination-font-size' | '--el-pagination-bg-color' | '--el-pagination-text-color' | '--el-pagination-border-radius' | '--el-pagination-button-color' | '--el-pagination-button-width' | '--el-pagination-button-height' | '--el-pagination-button-disabled-color' | '--el-pagination-button-disabled-bg-color' | '--el-pagination-button-bg-color' | '--el-pagination-hover-color' | '--el-pagination-font-size-small' | '--el-pagination-button-width-small' | '--el-pagination-button-height-small' | '--el-pagination-button-width-large' | '--el-pagination-button-height-large' | '--el-pagination-item-gap'> {
|
|
15
15
|
/** 当前页数 */
|
|
16
16
|
currentPage?: number;
|
|
17
17
|
/** 当前页数的默认初始值,不设置时默认为 1 */
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
-
var _excluded = ["title", "classPrefix", "plain", "width", "
|
|
3
|
+
var _excluded = ["title", "classPrefix", "plain", "width", "showAfter", "hideAfter", "offset", "trigger", "content", "onEnter", "onMouseEnter", "onMouseLeave", "placement"];
|
|
4
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -25,8 +25,8 @@ var Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
25
25
|
props = mergeDefaultProps({
|
|
26
26
|
placement: 'bottom',
|
|
27
27
|
showArrow: true,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
showAfter: 0,
|
|
29
|
+
hideAfter: 100,
|
|
30
30
|
width: 200,
|
|
31
31
|
trigger: 'click'
|
|
32
32
|
}, props);
|
|
@@ -36,8 +36,8 @@ var Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
36
36
|
classPrefix = _props$classPrefix === void 0 ? 'popover' : _props$classPrefix,
|
|
37
37
|
plain = _props.plain,
|
|
38
38
|
width = _props.width,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
showAfter = _props.showAfter,
|
|
40
|
+
hideAfter = _props.hideAfter,
|
|
41
41
|
offset = _props.offset,
|
|
42
42
|
trigger = _props.trigger,
|
|
43
43
|
content = _props.content,
|
|
@@ -82,8 +82,8 @@ var Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
82
82
|
effect: "light",
|
|
83
83
|
placement: placement,
|
|
84
84
|
offset: offset,
|
|
85
|
-
showAfter:
|
|
86
|
-
hideAfter:
|
|
85
|
+
showAfter: showAfter,
|
|
86
|
+
hideAfter: hideAfter,
|
|
87
87
|
trigger: trigger,
|
|
88
88
|
onEnter: onEnter,
|
|
89
89
|
onMouseEnter: handleMouseEnter,
|
|
@@ -10,15 +10,15 @@ export interface PopoverProps extends BaseProps<React.ReactElement>, NativeProps
|
|
|
10
10
|
/** 显示的内容 */
|
|
11
11
|
content?: string | React.ReactElement;
|
|
12
12
|
/** 默认提供的主题 */
|
|
13
|
-
|
|
13
|
+
effect?: 'light' | 'dark' | string;
|
|
14
14
|
/** 宽度 */
|
|
15
15
|
width?: number | string;
|
|
16
16
|
/** Popover 是否可用 */
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
/** 展开下拉菜单的延时,仅在 trigger 为 hover 时有效 */
|
|
19
|
-
|
|
19
|
+
showAfter?: number;
|
|
20
20
|
/** 收起下拉菜单的延时(仅在 trigger 为 hover 时有效) */
|
|
21
|
-
|
|
21
|
+
hideAfter?: number;
|
|
22
22
|
/** 状态是否可见 */
|
|
23
23
|
visible?: boolean;
|
|
24
24
|
/** 初始值 */
|