@qsxy/element-plus-react 1.0.3 → 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/typings.d.ts +1 -1
- 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/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 -13
- package/dist/Cascader/useCascader.js +120 -27
- 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/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 +139 -149
- 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 +122 -100
- 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 +84 -29
- package/dist/Input/index.d.ts +1 -0
- package/dist/Input/index.js +2 -1
- package/dist/Input/typings.d.ts +3 -25
- package/dist/InputNumber/InputNumber.js +74 -23
- package/dist/InputNumber/typings.d.ts +0 -4
- package/dist/Menu/Menu.js +1 -1
- package/dist/Menu/typings.d.ts +3 -13
- package/dist/Message/index.js +5 -3
- package/dist/MessageBox/MessageBox.js +29 -33
- package/dist/MessageBox/typings.d.ts +0 -1
- 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/SelectCore.js +52 -9
- package/dist/Select/typings.d.ts +13 -8
- package/dist/Select/useSelect.d.ts +23 -9
- package/dist/Select/useSelect.js +55 -8
- 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.js +9 -12
- package/dist/Space/useSpace.js +2 -1
- package/dist/Statistic/Statistic.js +1 -2
- 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/typings.d.ts +0 -1
- package/dist/Table/Table.js +14 -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 +26 -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/TableV2/src/constants.js +22 -0
- 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/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/Tree.js +1 -0
- package/dist/Tree/model/tree-store.js +4 -4
- package/dist/Tree/typings.d.ts +3 -1
- package/dist/TreeSelect/typings.d.ts +1 -1
- package/dist/TreeSelect/useSelect.d.ts +38 -85
- package/dist/TreeSelect/useSelect.js +1 -1
- package/dist/TreeSelect/useTree.d.ts +47 -52
- package/dist/TreeSelect/useTree.js +2 -2
- package/dist/Upload/UploadContent.js +1 -1
- package/dist/Upload/typings.d.ts +1 -1
- package/dist/Util/PopupManager.js +1 -1
- package/dist/Util/aria.d.ts +1 -1
- package/dist/Util/base.d.ts +33 -8
- package/dist/Util/base.js +44 -16
- 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/hooks/index.d.ts +1 -0
- 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/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 +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +33 -12
- package/dist/index.js +17 -6
- 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 -115
- package/theme-chalk/anchor-link.scss +45 -0
- package/theme-chalk/anchor.scss +93 -0
- 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/cascader-panel.scss +57 -82
- package/theme-chalk/cascader.scss +206 -160
- package/theme-chalk/checkbox.scss +4 -0
- package/theme-chalk/collapse-item.scss +72 -0
- package/theme-chalk/collapse.scss +21 -76
- package/theme-chalk/common/popup.scss +47 -0
- package/theme-chalk/common/var.scss +62 -6
- package/theme-chalk/dialog.scss +145 -137
- package/theme-chalk/drawer.scss +252 -247
- package/theme-chalk/form-item.scss +437 -0
- package/theme-chalk/form.scss +23 -361
- package/theme-chalk/index.scss +17 -1
- package/theme-chalk/input/input.scss +19 -0
- package/theme-chalk/input-number.scss +179 -192
- package/theme-chalk/message-box.scss +160 -133
- package/theme-chalk/message.scss +104 -104
- package/theme-chalk/mixins/mixins.scss +148 -151
- package/theme-chalk/notification.scss +109 -109
- package/theme-chalk/overlay.scss +17 -0
- package/theme-chalk/page-header.scss +60 -0
- package/theme-chalk/popper.scss +1 -1
- package/theme-chalk/radio.scss +3 -3
- package/theme-chalk/segmented.scss +186 -0
- package/theme-chalk/slider.scss +212 -0
- package/theme-chalk/space.scss +20 -20
- package/theme-chalk/statistic.scss +35 -35
- package/theme-chalk/step.scss +320 -0
- package/theme-chalk/steps.scss +22 -0
- package/theme-chalk/table-v2.scss +237 -0
- package/theme-chalk/table.scss +461 -482
- 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/tree-select.scss +41 -41
- package/theme-chalk/virtual-list.scss +40 -0
- 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/input-number.bak +0 -172
- package/theme-chalk/link.scss--bak +0 -99
- package/theme-chalk/notification.bak +0 -156
- 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
- /package/dist/TreeSelect/{utils.d.ts → Utils.d.ts} +0 -0
- /package/dist/TreeSelect/{utils.js → Utils.js} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
14
|
+
import { useClassNames } from "../hooks";
|
|
15
|
+
import { useFloating } from "./helper";
|
|
16
|
+
function Content(_ref) {
|
|
17
|
+
var _ref$placement = _ref.placement,
|
|
18
|
+
initialPlacement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
|
|
19
|
+
reference = _ref.reference,
|
|
20
|
+
_ref$strategy = _ref.strategy,
|
|
21
|
+
strategy = _ref$strategy === void 0 ? 'absolute' : _ref$strategy,
|
|
22
|
+
_ref$offset = _ref.offset,
|
|
23
|
+
offsetValue = _ref$offset === void 0 ? 10 : _ref$offset,
|
|
24
|
+
showArrow = _ref.showArrow,
|
|
25
|
+
style = _ref.style,
|
|
26
|
+
_ref$zIndex = _ref.zIndex,
|
|
27
|
+
zIndex = _ref$zIndex === void 0 ? 2001 : _ref$zIndex,
|
|
28
|
+
children = _ref.children,
|
|
29
|
+
onClose = _ref.onClose;
|
|
30
|
+
var ns = useClassNames('tour');
|
|
31
|
+
var _useState = useState(null),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
popperElement = _useState2[0],
|
|
34
|
+
setPopperElement = _useState2[1];
|
|
35
|
+
var _useState3 = useState(null),
|
|
36
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
+
arrowElement = _useState4[0],
|
|
38
|
+
setArrowElement = _useState4[1];
|
|
39
|
+
var _useFloating = useFloating(reference, popperElement, arrowElement, initialPlacement, strategy, offsetValue, zIndex, showArrow),
|
|
40
|
+
update = _useFloating.update,
|
|
41
|
+
contentStyle = _useFloating.contentStyle,
|
|
42
|
+
arrowStyle = _useFloating.arrowStyle,
|
|
43
|
+
states = _useFloating.states;
|
|
44
|
+
useEffect(function () {
|
|
45
|
+
if (popperElement && update) {
|
|
46
|
+
update();
|
|
47
|
+
}
|
|
48
|
+
}, [popperElement]);
|
|
49
|
+
var side = useMemo(function () {
|
|
50
|
+
return states.placement.split('-')[0];
|
|
51
|
+
}, [states]);
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
54
|
+
if (e.key === 'Escape') {
|
|
55
|
+
onClose === null || onClose === void 0 || onClose();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
59
|
+
return function () {
|
|
60
|
+
window.removeEventListener('keydown', handleKeyDown);
|
|
61
|
+
};
|
|
62
|
+
}, [onClose]);
|
|
63
|
+
var mergedContentStyle = useMemo(function () {
|
|
64
|
+
return _objectSpread(_objectSpread({}, contentStyle), style);
|
|
65
|
+
}, [contentStyle, style]);
|
|
66
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
ref: setPopperElement,
|
|
68
|
+
style: mergedContentStyle,
|
|
69
|
+
className: ns.e('content'),
|
|
70
|
+
"data-side": side,
|
|
71
|
+
tabIndex: -1 /* {...attributes.popper} */
|
|
72
|
+
}, children, /*#__PURE__*/React.createElement("span", {
|
|
73
|
+
ref: setArrowElement,
|
|
74
|
+
style: _objectSpread(_objectSpread({}, arrowStyle), {}, {
|
|
75
|
+
display: showArrow ? 'block' : 'none'
|
|
76
|
+
}),
|
|
77
|
+
className: ns.e('arrow'),
|
|
78
|
+
"data-popper-arrow": true
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
export default Content;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PosInfo } from './typings';
|
|
3
|
+
interface MaskProps {
|
|
4
|
+
zIndex?: number;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
fill?: string;
|
|
7
|
+
pos?: PosInfo | null;
|
|
8
|
+
targetAreaClickable?: boolean;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
declare function Mask({ zIndex, visible, fill, pos, targetAreaClickable, style }: MaskProps): React.JSX.Element;
|
|
12
|
+
export default Mask;
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
14
|
+
import { useClassNames } from "../hooks";
|
|
15
|
+
function Mask(_ref) {
|
|
16
|
+
var _pos$radius;
|
|
17
|
+
var _ref$zIndex = _ref.zIndex,
|
|
18
|
+
zIndex = _ref$zIndex === void 0 ? 1001 : _ref$zIndex,
|
|
19
|
+
_ref$visible = _ref.visible,
|
|
20
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
21
|
+
_ref$fill = _ref.fill,
|
|
22
|
+
fill = _ref$fill === void 0 ? 'rgba(0,0,0,0.5)' : _ref$fill,
|
|
23
|
+
pos = _ref.pos,
|
|
24
|
+
_ref$targetAreaClicka = _ref.targetAreaClickable,
|
|
25
|
+
targetAreaClickable = _ref$targetAreaClicka === void 0 ? true : _ref$targetAreaClicka,
|
|
26
|
+
style = _ref.style;
|
|
27
|
+
var ns = useClassNames('tour');
|
|
28
|
+
var radius = (_pos$radius = pos === null || pos === void 0 ? void 0 : pos.radius) !== null && _pos$radius !== void 0 ? _pos$radius : 2;
|
|
29
|
+
var roundInfo = useMemo(function () {
|
|
30
|
+
var v = radius;
|
|
31
|
+
var baseInfo = "a".concat(v, ",").concat(v, " 0 0 1");
|
|
32
|
+
return {
|
|
33
|
+
topRight: "".concat(baseInfo, " ").concat(v, ",").concat(v),
|
|
34
|
+
bottomRight: "".concat(baseInfo, " ").concat(-v, ",").concat(v),
|
|
35
|
+
bottomLeft: "".concat(baseInfo, " ").concat(-v, ",").concat(-v),
|
|
36
|
+
topLeft: "".concat(baseInfo, " ").concat(v, ",").concat(-v)
|
|
37
|
+
};
|
|
38
|
+
}, [radius]);
|
|
39
|
+
var _useState = useState({
|
|
40
|
+
width: window.innerWidth,
|
|
41
|
+
height: window.innerHeight
|
|
42
|
+
}),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
windowSize = _useState2[0],
|
|
45
|
+
setWindowSize = _useState2[1];
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
var handleResize = function handleResize() {
|
|
48
|
+
setWindowSize({
|
|
49
|
+
width: window.innerWidth,
|
|
50
|
+
height: window.innerHeight
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
window.addEventListener('resize', handleResize);
|
|
54
|
+
return function () {
|
|
55
|
+
return window.removeEventListener('resize', handleResize);
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
var path = useMemo(function () {
|
|
59
|
+
var width = windowSize.width,
|
|
60
|
+
height = windowSize.height;
|
|
61
|
+
var info = roundInfo;
|
|
62
|
+
var _path = "M".concat(width, ",0 L0,0 L0,").concat(height, " L").concat(width, ",").concat(height, " L").concat(width, ",0 Z");
|
|
63
|
+
var _radius = radius;
|
|
64
|
+
if (!pos) {
|
|
65
|
+
return _path;
|
|
66
|
+
}
|
|
67
|
+
return "".concat(_path, " M").concat(pos.left + _radius, ",").concat(pos.top, " h").concat(pos.width - _radius * 2, " ").concat(info.topRight, " v").concat(pos.height - _radius * 2, " ").concat(info.bottomRight, " h").concat(-pos.width + _radius * 2, " ").concat(info.bottomLeft, " v").concat(-pos.height + _radius * 2, " ").concat(info.topLeft, " z");
|
|
68
|
+
}, [windowSize, roundInfo, radius, pos]);
|
|
69
|
+
var maskStyle = _objectSpread({
|
|
70
|
+
position: 'fixed',
|
|
71
|
+
left: 0,
|
|
72
|
+
right: 0,
|
|
73
|
+
top: 0,
|
|
74
|
+
bottom: 0,
|
|
75
|
+
zIndex: zIndex,
|
|
76
|
+
pointerEvents: pos && targetAreaClickable ? 'none' : 'auto'
|
|
77
|
+
}, style);
|
|
78
|
+
var pathStyle = {
|
|
79
|
+
fill: fill,
|
|
80
|
+
pointerEvents: 'auto',
|
|
81
|
+
cursor: 'auto'
|
|
82
|
+
};
|
|
83
|
+
if (!visible) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
className: ns.e('mask'),
|
|
88
|
+
style: maskStyle
|
|
89
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
90
|
+
style: {
|
|
91
|
+
width: '100%',
|
|
92
|
+
height: '100%'
|
|
93
|
+
}
|
|
94
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
95
|
+
className: ns.e('hollow'),
|
|
96
|
+
style: pathStyle,
|
|
97
|
+
d: path
|
|
98
|
+
})));
|
|
99
|
+
}
|
|
100
|
+
export default Mask;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import omit from 'lodash/omit';
|
|
4
|
+
import React, { useEffect } from 'react';
|
|
5
|
+
import { Button } from "../Button";
|
|
6
|
+
import { Icon } from "../Icon";
|
|
7
|
+
import { useClassNames } from "../hooks";
|
|
8
|
+
import { useTourContext } from "./context";
|
|
9
|
+
function Step(props) {
|
|
10
|
+
var _props$showClose, _ref, _props$prevButtonProp2, _ref2, _props$nextButtonProp2;
|
|
11
|
+
var ns = useClassNames('tour');
|
|
12
|
+
var _useTourContext = useTourContext(),
|
|
13
|
+
current = _useTourContext.current,
|
|
14
|
+
total = _useTourContext.total,
|
|
15
|
+
tourShowClose = _useTourContext.showClose,
|
|
16
|
+
closeIcon = _useTourContext.closeIcon,
|
|
17
|
+
mergedType = _useTourContext.mergedType,
|
|
18
|
+
indicators = _useTourContext.indicators,
|
|
19
|
+
onPrev = _useTourContext.onPrev,
|
|
20
|
+
onNext = _useTourContext.onNext,
|
|
21
|
+
onClose = _useTourContext.onClose;
|
|
22
|
+
var mergedShowClose = (_props$showClose = props.showClose) !== null && _props$showClose !== void 0 ? _props$showClose : tourShowClose;
|
|
23
|
+
var filterButtonProps = function filterButtonProps(btnProps) {
|
|
24
|
+
if (!btnProps) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
return omit(btnProps, ['children', 'onClick']);
|
|
28
|
+
};
|
|
29
|
+
var handlePrev = function handlePrev() {
|
|
30
|
+
var _props$prevButtonProp;
|
|
31
|
+
if ((_props$prevButtonProp = props.prevButtonProps) !== null && _props$prevButtonProp !== void 0 && _props$prevButtonProp.onClick) {
|
|
32
|
+
props.prevButtonProps.onClick();
|
|
33
|
+
}
|
|
34
|
+
onPrev();
|
|
35
|
+
};
|
|
36
|
+
var handleNext = function handleNext() {
|
|
37
|
+
var _props$nextButtonProp;
|
|
38
|
+
if ((_props$nextButtonProp = props.nextButtonProps) !== null && _props$nextButtonProp !== void 0 && _props$nextButtonProp.onClick) {
|
|
39
|
+
props.nextButtonProps.onClick();
|
|
40
|
+
}
|
|
41
|
+
onNext();
|
|
42
|
+
};
|
|
43
|
+
var handleClose = function handleClose() {
|
|
44
|
+
onClose();
|
|
45
|
+
if (props.onClose) {
|
|
46
|
+
props.onClose();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
51
|
+
var target = e.target;
|
|
52
|
+
if (target !== null && target !== void 0 && target.isContentEditable) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
switch (e.key) {
|
|
56
|
+
case 'ArrowLeft':
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
if (current > 0) {
|
|
59
|
+
onPrev();
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case 'ArrowRight':
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
onNext();
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
69
|
+
return function () {
|
|
70
|
+
return window.removeEventListener('keydown', handleKeyDown);
|
|
71
|
+
};
|
|
72
|
+
}, [current, onPrev, onNext]);
|
|
73
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, mergedShowClose && /*#__PURE__*/React.createElement("button", {
|
|
74
|
+
"aria-label": "Close tour",
|
|
75
|
+
className: ns.e('closebtn'),
|
|
76
|
+
type: "button",
|
|
77
|
+
onClick: handleClose
|
|
78
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
79
|
+
className: ns.e('close'),
|
|
80
|
+
name: closeIcon
|
|
81
|
+
})), /*#__PURE__*/React.createElement("header", {
|
|
82
|
+
className: classNames(ns.e('header'), {
|
|
83
|
+
'show-close': mergedShowClose
|
|
84
|
+
})
|
|
85
|
+
}, props.header || /*#__PURE__*/React.createElement("span", {
|
|
86
|
+
role: "heading",
|
|
87
|
+
className: ns.e('title')
|
|
88
|
+
}, props.title)), /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: ns.e('body')
|
|
90
|
+
}, props.children || /*#__PURE__*/React.createElement("span", null, props.description)), /*#__PURE__*/React.createElement("footer", {
|
|
91
|
+
className: ns.e('footer')
|
|
92
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: ns.b('indicators')
|
|
94
|
+
}, indicators ? indicators({
|
|
95
|
+
current: current,
|
|
96
|
+
total: total
|
|
97
|
+
}) : Array.from({
|
|
98
|
+
length: total
|
|
99
|
+
}).map(function (_, index) {
|
|
100
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
101
|
+
key: index,
|
|
102
|
+
className: classNames(ns.b('indicator'), ns.is('active', index === current))
|
|
103
|
+
});
|
|
104
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
className: ns.b('buttons')
|
|
106
|
+
}, current > 0 && /*#__PURE__*/React.createElement(Button, _extends({
|
|
107
|
+
size: "small",
|
|
108
|
+
type: mergedType
|
|
109
|
+
}, filterButtonProps(props.prevButtonProps), {
|
|
110
|
+
onClick: handlePrev
|
|
111
|
+
}), (_ref = (_props$prevButtonProp2 = props.prevButtonProps) === null || _props$prevButtonProp2 === void 0 ? void 0 : _props$prevButtonProp2.children) !== null && _ref !== void 0 ? _ref : 'Previous'), current <= total - 1 && /*#__PURE__*/React.createElement(Button, _extends({
|
|
112
|
+
size: "small",
|
|
113
|
+
type: mergedType === 'primary' ? 'default' : 'primary'
|
|
114
|
+
}, filterButtonProps(props.nextButtonProps), {
|
|
115
|
+
onClick: handleNext
|
|
116
|
+
}), (_ref2 = (_props$nextButtonProp2 = props.nextButtonProps) === null || _props$nextButtonProp2 === void 0 ? void 0 : _props$nextButtonProp2.children) !== null && _ref2 !== void 0 ? _ref2 : current === total - 1 ? 'Finish' : 'Next'))));
|
|
117
|
+
}
|
|
118
|
+
Step.displayName = 'ElTourStep';
|
|
119
|
+
export default Step;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import { addClass, removeClass } from 'dom-lib';
|
|
9
|
+
import isBoolean from 'lodash/isBoolean';
|
|
10
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
|
+
import * as ReactDOM from 'react-dom';
|
|
12
|
+
import { useClassNames, useControlled } from "../hooks";
|
|
13
|
+
import { mergeDefaultProps } from "../Util";
|
|
14
|
+
import PopupManager from "../Util/PopupManager";
|
|
15
|
+
import Content from "./Content";
|
|
16
|
+
import { TourContext } from "./context";
|
|
17
|
+
import { useTarget } from "./helper";
|
|
18
|
+
import Mask from "./Mask";
|
|
19
|
+
import Step from "./Step";
|
|
20
|
+
function resolveAppendTo(appendTo) {
|
|
21
|
+
if (typeof appendTo === 'string') {
|
|
22
|
+
return document.querySelector(appendTo) || document.body;
|
|
23
|
+
}
|
|
24
|
+
return appendTo;
|
|
25
|
+
}
|
|
26
|
+
function Tour(props) {
|
|
27
|
+
props = mergeDefaultProps({
|
|
28
|
+
defaultCurrent: 0,
|
|
29
|
+
showArrow: true,
|
|
30
|
+
showClose: true,
|
|
31
|
+
placement: 'bottom',
|
|
32
|
+
mask: true,
|
|
33
|
+
gap: {
|
|
34
|
+
offset: 6,
|
|
35
|
+
radius: 2
|
|
36
|
+
},
|
|
37
|
+
scrollIntoViewOptions: {
|
|
38
|
+
block: 'center'
|
|
39
|
+
},
|
|
40
|
+
appendTo: 'body',
|
|
41
|
+
closeOnPressEscape: true,
|
|
42
|
+
targetAreaClickable: true,
|
|
43
|
+
closeIcon: 'xmark'
|
|
44
|
+
}, props);
|
|
45
|
+
var _props = props,
|
|
46
|
+
showArrow = _props.showArrow,
|
|
47
|
+
showClose = _props.showClose,
|
|
48
|
+
closeIcon = _props.closeIcon,
|
|
49
|
+
placementProp = _props.placement,
|
|
50
|
+
contentStyle = _props.contentStyle,
|
|
51
|
+
maskProp = _props.mask,
|
|
52
|
+
gapProp = _props.gap,
|
|
53
|
+
zIndexProp = _props.zIndex,
|
|
54
|
+
scrollIntoViewOptionsProp = _props.scrollIntoViewOptions,
|
|
55
|
+
typeProp = _props.type,
|
|
56
|
+
appendTo = _props.appendTo,
|
|
57
|
+
closeOnPressEscape = _props.closeOnPressEscape,
|
|
58
|
+
targetAreaClickable = _props.targetAreaClickable,
|
|
59
|
+
onChange = _props.onChange,
|
|
60
|
+
onClose = _props.onClose,
|
|
61
|
+
onFinish = _props.onFinish,
|
|
62
|
+
children = _props.children,
|
|
63
|
+
indicators = _props.indicators,
|
|
64
|
+
className = _props.className,
|
|
65
|
+
style = _props.style;
|
|
66
|
+
var ns = useClassNames('tour');
|
|
67
|
+
var _useControlled = useControlled(props.visible, props.defaultVisible),
|
|
68
|
+
_useControlled2 = _slicedToArray(_useControlled, 2),
|
|
69
|
+
visible = _useControlled2[0],
|
|
70
|
+
setVisible = _useControlled2[1];
|
|
71
|
+
var _useControlled3 = useControlled(props.current, props.defaultCurrent),
|
|
72
|
+
_useControlled4 = _slicedToArray(_useControlled3, 2),
|
|
73
|
+
current = _useControlled4[0],
|
|
74
|
+
setCurrent = _useControlled4[1];
|
|
75
|
+
var _useState = useState(0),
|
|
76
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
77
|
+
total = _useState2[0],
|
|
78
|
+
setTotal = _useState2[1];
|
|
79
|
+
var childrenArray = useMemo(function () {
|
|
80
|
+
return React.Children.toArray(children);
|
|
81
|
+
}, [children]);
|
|
82
|
+
var stepChildren = useMemo(function () {
|
|
83
|
+
return childrenArray.filter(function (child) {
|
|
84
|
+
return /*#__PURE__*/React.isValidElement(child) && child.type === Step;
|
|
85
|
+
});
|
|
86
|
+
}, [childrenArray]);
|
|
87
|
+
var currentChild = useMemo(function () {
|
|
88
|
+
return stepChildren[current] || null;
|
|
89
|
+
}, [stepChildren, current]);
|
|
90
|
+
var currentStep = useMemo(function () {
|
|
91
|
+
return /*#__PURE__*/React.isValidElement(currentChild) ? currentChild.props : undefined;
|
|
92
|
+
}, [currentChild]);
|
|
93
|
+
var currentTarget = useMemo(function () {
|
|
94
|
+
return currentStep === null || currentStep === void 0 ? void 0 : currentStep.target;
|
|
95
|
+
}, [currentStep === null || currentStep === void 0 ? void 0 : currentStep.target]);
|
|
96
|
+
var mergedPlacement = useMemo(function () {
|
|
97
|
+
return (currentStep === null || currentStep === void 0 ? void 0 : currentStep.placement) || placementProp;
|
|
98
|
+
}, [currentStep === null || currentStep === void 0 ? void 0 : currentStep.placement, placementProp]);
|
|
99
|
+
var mergedContentStyle = useMemo(function () {
|
|
100
|
+
var _currentStep$contentS;
|
|
101
|
+
return (_currentStep$contentS = currentStep === null || currentStep === void 0 ? void 0 : currentStep.contentStyle) !== null && _currentStep$contentS !== void 0 ? _currentStep$contentS : contentStyle;
|
|
102
|
+
}, [currentStep === null || currentStep === void 0 ? void 0 : currentStep.contentStyle, contentStyle]);
|
|
103
|
+
var mergedMask = useMemo(function () {
|
|
104
|
+
var _currentStep$mask;
|
|
105
|
+
return (_currentStep$mask = currentStep === null || currentStep === void 0 ? void 0 : currentStep.mask) !== null && _currentStep$mask !== void 0 ? _currentStep$mask : maskProp;
|
|
106
|
+
}, [currentStep === null || currentStep === void 0 ? void 0 : currentStep.mask, maskProp]);
|
|
107
|
+
var mergedShowMask = useMemo(function () {
|
|
108
|
+
return !!mergedMask && visible;
|
|
109
|
+
}, [mergedMask, visible]);
|
|
110
|
+
var mergedMaskStyle = useMemo(function () {
|
|
111
|
+
return isBoolean(mergedMask) ? undefined : mergedMask;
|
|
112
|
+
}, [mergedMask]);
|
|
113
|
+
var mergedShowArrow = useMemo(function () {
|
|
114
|
+
var _currentStep$showArro;
|
|
115
|
+
return !!(currentTarget && ((_currentStep$showArro = currentStep === null || currentStep === void 0 ? void 0 : currentStep.showArrow) !== null && _currentStep$showArro !== void 0 ? _currentStep$showArro : showArrow));
|
|
116
|
+
}, [currentTarget, currentStep === null || currentStep === void 0 ? void 0 : currentStep.showArrow, showArrow]);
|
|
117
|
+
var mergedScrollIntoViewOptions = useMemo(function () {
|
|
118
|
+
var _currentStep$scrollIn;
|
|
119
|
+
return (_currentStep$scrollIn = currentStep === null || currentStep === void 0 ? void 0 : currentStep.scrollIntoViewOptions) !== null && _currentStep$scrollIn !== void 0 ? _currentStep$scrollIn : scrollIntoViewOptionsProp;
|
|
120
|
+
}, [currentStep === null || currentStep === void 0 ? void 0 : currentStep.scrollIntoViewOptions, scrollIntoViewOptionsProp]);
|
|
121
|
+
var mergedType = useMemo(function () {
|
|
122
|
+
var _currentStep$type;
|
|
123
|
+
return (_currentStep$type = currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) !== null && _currentStep$type !== void 0 ? _currentStep$type : typeProp;
|
|
124
|
+
}, [currentStep === null || currentStep === void 0 ? void 0 : currentStep.type, typeProp]);
|
|
125
|
+
var mergedZIndex = useMemo(function () {
|
|
126
|
+
return zIndexProp !== null && zIndexProp !== void 0 ? zIndexProp : PopupManager.nextZIndex();
|
|
127
|
+
}, [zIndexProp]);
|
|
128
|
+
var _useTarget = useTarget(currentTarget, visible, gapProp, mergedMask, mergedScrollIntoViewOptions),
|
|
129
|
+
mergedPosInfo = _useTarget.mergedPosInfo,
|
|
130
|
+
triggerTarget = _useTarget.triggerTarget;
|
|
131
|
+
var handlePrev = useCallback(function () {
|
|
132
|
+
var _currentStep$prevButt;
|
|
133
|
+
var prev = current - 1;
|
|
134
|
+
setCurrent(prev);
|
|
135
|
+
currentStep === null || currentStep === void 0 || (_currentStep$prevButt = currentStep.prevButtonProps) === null || _currentStep$prevButt === void 0 || _currentStep$prevButt.onClick();
|
|
136
|
+
onChange === null || onChange === void 0 || onChange(prev, visible);
|
|
137
|
+
}, [current, setCurrent, currentStep === null || currentStep === void 0 ? void 0 : currentStep.prevButtonProps, onChange, visible]);
|
|
138
|
+
var handleFinish = useCallback(function () {
|
|
139
|
+
setVisible === null || setVisible === void 0 || setVisible(false);
|
|
140
|
+
onClose === null || onClose === void 0 || onClose(current);
|
|
141
|
+
onFinish === null || onFinish === void 0 || onFinish();
|
|
142
|
+
onChange === null || onChange === void 0 || onChange(current, false);
|
|
143
|
+
}, [current, onClose, onFinish, setVisible, onChange]);
|
|
144
|
+
var handleNext = useCallback(function () {
|
|
145
|
+
if (current >= total - 1) {
|
|
146
|
+
handleFinish();
|
|
147
|
+
} else {
|
|
148
|
+
var _currentStep$nextButt;
|
|
149
|
+
var next = current + 1;
|
|
150
|
+
setCurrent(next);
|
|
151
|
+
currentStep === null || currentStep === void 0 || (_currentStep$nextButt = currentStep.nextButtonProps) === null || _currentStep$nextButt === void 0 || _currentStep$nextButt.onClick();
|
|
152
|
+
onChange === null || onChange === void 0 || onChange(next, visible);
|
|
153
|
+
}
|
|
154
|
+
}, [current, total, handleFinish, setCurrent, currentStep === null || currentStep === void 0 ? void 0 : currentStep.nextButtonProps, onChange, visible]);
|
|
155
|
+
var handleClose = useCallback(function () {
|
|
156
|
+
setVisible === null || setVisible === void 0 || setVisible(false);
|
|
157
|
+
onClose === null || onClose === void 0 || onClose(current);
|
|
158
|
+
onChange === null || onChange === void 0 || onChange(current, false);
|
|
159
|
+
}, [setVisible, onClose, current, onChange]);
|
|
160
|
+
var handleEscClose = useCallback(function () {
|
|
161
|
+
if (closeOnPressEscape) {
|
|
162
|
+
handleClose();
|
|
163
|
+
}
|
|
164
|
+
}, [closeOnPressEscape, handleClose]);
|
|
165
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
166
|
+
if (e.key === 'Escape' && visible) {
|
|
167
|
+
handleEscClose();
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
useEffect(function () {
|
|
171
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
172
|
+
return function () {
|
|
173
|
+
return window.removeEventListener('keydown', handleKeyDown);
|
|
174
|
+
};
|
|
175
|
+
}, []);
|
|
176
|
+
useEffect(function () {
|
|
177
|
+
setTotal(stepChildren.length);
|
|
178
|
+
}, [stepChildren.length]);
|
|
179
|
+
|
|
180
|
+
// useEffect(() => {
|
|
181
|
+
// setCurrent(currentProp);
|
|
182
|
+
// }, [currentProp]);
|
|
183
|
+
|
|
184
|
+
useEffect(function () {
|
|
185
|
+
if (!visible) {
|
|
186
|
+
setCurrent(0);
|
|
187
|
+
if (portalContainer) {
|
|
188
|
+
removeClass(portalContainer, ns.b('parent--hidden'));
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
if (portalContainer && maskProp) {
|
|
192
|
+
addClass(portalContainer, ns.b('parent--hidden'));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, [visible]);
|
|
196
|
+
var contextValue = useMemo(function () {
|
|
197
|
+
return {
|
|
198
|
+
current: current,
|
|
199
|
+
total: total,
|
|
200
|
+
showClose: showClose,
|
|
201
|
+
closeIcon: closeIcon,
|
|
202
|
+
mergedType: mergedType,
|
|
203
|
+
ns: ns,
|
|
204
|
+
indicators: indicators,
|
|
205
|
+
onPrev: handlePrev,
|
|
206
|
+
onNext: handleNext,
|
|
207
|
+
onFinish: handleFinish,
|
|
208
|
+
onClose: handleClose
|
|
209
|
+
};
|
|
210
|
+
}, [current, total, showClose, closeIcon, mergedType, ns, indicators, handlePrev, handleNext, handleFinish, handleClose]);
|
|
211
|
+
var kls = classNames(ns.b(), mergedType === 'primary' ? ns.m('primary') : '', className);
|
|
212
|
+
var portalContainer = useMemo(function () {
|
|
213
|
+
return resolveAppendTo(appendTo);
|
|
214
|
+
}, [appendTo]);
|
|
215
|
+
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
className: kls,
|
|
217
|
+
style: style
|
|
218
|
+
}, /*#__PURE__*/React.createElement(Mask, {
|
|
219
|
+
visible: mergedShowMask,
|
|
220
|
+
fill: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.color,
|
|
221
|
+
style: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.style,
|
|
222
|
+
pos: mergedPosInfo,
|
|
223
|
+
zIndex: mergedZIndex,
|
|
224
|
+
targetAreaClickable: targetAreaClickable
|
|
225
|
+
}), visible && currentChild ? /*#__PURE__*/React.createElement(TourContext.Provider, {
|
|
226
|
+
value: contextValue
|
|
227
|
+
}, /*#__PURE__*/React.createElement(Content, {
|
|
228
|
+
reference: triggerTarget || undefined,
|
|
229
|
+
placement: mergedPlacement,
|
|
230
|
+
showArrow: mergedShowArrow,
|
|
231
|
+
zIndex: mergedZIndex,
|
|
232
|
+
style: mergedContentStyle,
|
|
233
|
+
onClose: handleEscClose
|
|
234
|
+
}, currentChild)) : null), portalContainer);
|
|
235
|
+
}
|
|
236
|
+
Tour.displayName = 'ElTour';
|
|
237
|
+
export default Tour;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export var TourContext = /*#__PURE__*/createContext(null);
|
|
3
|
+
export var useTourContext = function useTourContext() {
|
|
4
|
+
var context = useContext(TourContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error('useTourContext must be used within a Tour');
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Middleware, Strategy } from '@floating-ui/dom';
|
|
2
|
+
import { Placement, VirtualElement } from '@popperjs/core';
|
|
3
|
+
import { CSSProperties } from 'react';
|
|
4
|
+
export declare function isInViewPort(element: HTMLElement): boolean;
|
|
5
|
+
export declare function getTargetEl(target: string | HTMLElement | (() => HTMLElement | null) | null | undefined): HTMLElement | null | undefined;
|
|
6
|
+
export declare function getGapOffset(gap: {
|
|
7
|
+
offset?: number | [number, number];
|
|
8
|
+
}, index: number): number;
|
|
9
|
+
export declare function useTarget(target: string | HTMLElement | (() => HTMLElement | null) | null | undefined, open: boolean, gap: {
|
|
10
|
+
offset?: number | [number, number];
|
|
11
|
+
radius?: number;
|
|
12
|
+
}, mergedMask: boolean | {
|
|
13
|
+
style?: any;
|
|
14
|
+
color?: string;
|
|
15
|
+
}, scrollIntoViewOptions: boolean | ScrollIntoViewOptions): {
|
|
16
|
+
mergedPosInfo: {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
radius: number;
|
|
22
|
+
} | null;
|
|
23
|
+
triggerTarget: HTMLElement | {
|
|
24
|
+
getBoundingClientRect(): DOMRect;
|
|
25
|
+
} | undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const useFloating: (referenceRef: VirtualElement, contentRef: HTMLElement, arrowRef: HTMLElement, placement: Placement, strategy: Strategy, offset: number, zIndex: number, showArrow: boolean) => {
|
|
28
|
+
update: () => Promise<void>;
|
|
29
|
+
contentStyle: CSSProperties;
|
|
30
|
+
arrowStyle: CSSProperties;
|
|
31
|
+
states: {
|
|
32
|
+
x: any;
|
|
33
|
+
y: any;
|
|
34
|
+
placement: Placement;
|
|
35
|
+
strategy: Strategy;
|
|
36
|
+
middlewareData: import("@floating-ui/dom").MiddlewareData;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const overflowMiddleware: () => Middleware;
|