naive-ui 2.30.8 → 2.31.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/index.js +1362 -535
- package/dist/index.prod.js +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +8 -2
- package/es/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/es/_internal/selection/src/styles/index.cssr.js +1 -0
- package/es/_mixins/use-rtl.d.ts +1 -1
- package/es/_mixins/use-rtl.js +1 -1
- package/es/_utils/env/browser.d.ts +3 -0
- package/es/_utils/env/browser.js +4 -0
- package/es/_utils/env/is-native-lazy-load.d.ts +1 -0
- package/es/_utils/env/is-native-lazy-load.js +3 -0
- package/es/affix/index.d.ts +1 -1
- package/es/affix/index.js +1 -1
- package/es/alert/index.d.ts +1 -1
- package/es/alert/index.js +1 -1
- package/es/alert/src/Alert.d.ts +1 -1
- package/es/alert/src/Alert.js +2 -2
- package/es/anchor/index.d.ts +2 -2
- package/es/anchor/index.js +2 -2
- package/es/anchor/src/AnchorAdapter.d.ts +1 -1
- package/es/anchor/src/AnchorAdapter.js +1 -1
- package/es/anchor/src/Link.d.ts +1 -1
- package/es/anchor/src/Link.js +1 -1
- package/es/auto-complete/index.d.ts +1 -1
- package/es/auto-complete/index.js +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/auto-complete/src/AutoComplete.js +1 -1
- package/es/avatar/index.d.ts +1 -1
- package/es/avatar/index.js +1 -1
- package/es/avatar/src/Avatar.d.ts +13 -1
- package/es/avatar/src/Avatar.js +61 -8
- package/es/avatar-group/index.d.ts +1 -1
- package/es/avatar-group/index.js +1 -1
- package/es/avatar-group/src/AvatarGroup.d.ts +1 -1
- package/es/avatar-group/src/AvatarGroup.js +2 -2
- package/es/back-top/index.d.ts +1 -1
- package/es/back-top/index.js +1 -1
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/back-top/src/BackTop.js +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/badge/index.js +1 -1
- package/es/badge/src/Badge.d.ts +1 -1
- package/es/badge/src/Badge.js +2 -2
- package/es/breadcrumb/index.d.ts +2 -2
- package/es/breadcrumb/index.js +2 -2
- package/es/breadcrumb/src/Breadcrumb.d.ts +1 -1
- package/es/breadcrumb/src/Breadcrumb.js +1 -1
- package/es/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/es/breadcrumb/src/BreadcrumbItem.js +1 -1
- package/es/breadcrumb/src/styles/index.cssr.js +1 -0
- package/es/button/index.d.ts +1 -1
- package/es/button/index.js +1 -1
- package/es/button/src/Button.d.ts +13 -4
- package/es/button/src/Button.js +8 -4
- package/es/button/src/styles/index.cssr.js +1 -0
- package/es/button-group/index.d.ts +1 -1
- package/es/button-group/index.js +1 -1
- package/es/button-group/src/ButtonGroup.d.ts +1 -1
- package/es/button-group/src/ButtonGroup.js +2 -2
- package/es/calendar/index.d.ts +1 -1
- package/es/calendar/index.js +1 -1
- package/es/calendar/src/Calendar.d.ts +1 -1
- package/es/calendar/src/Calendar.js +1 -1
- package/es/card/index.d.ts +1 -1
- package/es/card/index.js +1 -1
- package/es/card/src/Card.d.ts +2 -2
- package/es/card/src/Card.js +2 -2
- package/es/carousel/index.d.ts +1 -1
- package/es/carousel/index.js +1 -1
- package/es/carousel/src/Carousel.d.ts +1 -1
- package/es/carousel/src/Carousel.js +1 -1
- package/es/carousel/src/styles/index.cssr.js +1 -0
- package/es/cascader/index.d.ts +1 -1
- package/es/cascader/index.js +1 -1
- package/es/cascader/src/Cascader.d.ts +1 -1
- package/es/cascader/src/Cascader.js +1 -1
- package/es/cascader/src/utils.d.ts +1 -4
- package/es/cascader/src/utils.js +18 -28
- package/es/checkbox/index.d.ts +2 -2
- package/es/checkbox/index.js +2 -2
- package/es/checkbox/src/Checkbox.d.ts +1 -1
- package/es/checkbox/src/Checkbox.js +2 -2
- package/es/checkbox/src/CheckboxGroup.d.ts +1 -1
- package/es/checkbox/src/CheckboxGroup.js +1 -1
- package/es/checkbox/src/styles/index.cssr.js +2 -0
- package/es/code/index.d.ts +1 -1
- package/es/code/index.js +1 -1
- package/es/code/src/Code.d.ts +1 -1
- package/es/code/src/Code.js +1 -1
- package/es/collapse/index.d.ts +2 -2
- package/es/collapse/index.js +2 -2
- package/es/collapse/src/Collapse.d.ts +1 -1
- package/es/collapse/src/Collapse.js +2 -2
- package/es/collapse/src/CollapseItem.d.ts +1 -1
- package/es/collapse/src/CollapseItem.js +2 -2
- package/es/collapse-transition/index.d.ts +1 -1
- package/es/collapse-transition/index.js +1 -1
- package/es/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/es/collapse-transition/src/CollapseTransition.js +3 -3
- package/es/color-picker/index.d.ts +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +2 -2
- package/es/color-picker/src/ColorPicker.js +2 -2
- package/es/countdown/index.d.ts +2 -2
- package/es/countdown/index.js +1 -1
- package/es/countdown/src/Countdown.d.ts +9 -2
- package/es/countdown/src/Countdown.js +42 -26
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/index.js +1 -1
- package/es/data-table/src/TableParts/Body.d.ts +4 -0
- package/es/data-table/src/TableParts/Body.js +50 -34
- package/es/data-table/src/TableParts/BodyRadio.d.ts +30 -0
- package/es/data-table/src/TableParts/BodyRadio.js +30 -0
- package/es/data-table/src/TableParts/Header.js +2 -2
- package/es/data-table/src/interface.d.ts +2 -1
- package/es/data-table/src/use-check.d.ts +1 -1
- package/es/data-table/src/use-check.js +15 -3
- package/es/date-picker/index.d.ts +1 -1
- package/es/date-picker/index.js +1 -1
- package/es/date-picker/src/DatePicker.d.ts +1 -1
- package/es/date-picker/src/DatePicker.js +19 -10
- package/es/date-picker/src/panel/daterange.js +1 -1
- package/es/date-picker/src/panel/datetimerange.js +1 -1
- package/es/date-picker/src/panel/month.js +1 -1
- package/es/date-picker/src/panel/monthrange.js +1 -1
- package/es/date-picker/src/styles/index.cssr.js +4 -0
- package/es/descriptions/index.d.ts +2 -2
- package/es/descriptions/index.js +2 -2
- package/es/descriptions/src/Descriptions.d.ts +2 -2
- package/es/descriptions/src/Descriptions.js +2 -2
- package/es/descriptions/src/DescriptionsItem.d.ts +2 -2
- package/es/descriptions/src/DescriptionsItem.js +2 -2
- package/es/dialog/index.d.ts +2 -1
- package/es/dialog/index.js +2 -1
- package/es/dialog/src/DialogProvider.d.ts +1 -1
- package/es/dialog/src/DialogProvider.js +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/divider/index.js +1 -1
- package/es/divider/src/Divider.d.ts +1 -1
- package/es/divider/src/Divider.js +1 -1
- package/es/drawer/index.d.ts +2 -2
- package/es/drawer/index.js +2 -2
- package/es/drawer/src/Drawer.d.ts +60 -27
- package/es/drawer/src/Drawer.js +39 -18
- package/es/drawer/src/DrawerBodyWrapper.d.ts +9 -0
- package/es/drawer/src/DrawerBodyWrapper.js +97 -2
- package/es/drawer/src/DrawerContent.d.ts +2 -1
- package/es/drawer/src/DrawerContent.js +1 -1
- package/es/drawer/src/interface.d.ts +2 -0
- package/es/drawer/src/styles/index.cssr.js +42 -5
- package/es/drawer/styles/light.d.ts +2 -0
- package/es/drawer/styles/light.js +3 -2
- package/es/dropdown/index.d.ts +2 -2
- package/es/dropdown/index.js +1 -1
- package/es/dropdown/src/Dropdown.d.ts +10 -2
- package/es/dropdown/src/Dropdown.js +15 -4
- package/es/dropdown/src/DropdownMenu.d.ts +3 -0
- package/es/dropdown/src/DropdownMenu.js +23 -15
- package/es/dropdown/src/DropdownOption.d.ts +5 -0
- package/es/dropdown/src/DropdownOption.js +32 -10
- package/es/dropdown/src/interface.d.ts +2 -1
- package/es/dropdown/src/styles/index.cssr.js +17 -11
- package/es/dynamic-input/index.d.ts +1 -1
- package/es/dynamic-input/index.js +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.js +2 -2
- package/es/dynamic-tags/index.d.ts +1 -1
- package/es/dynamic-tags/index.js +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/element/index.d.ts +1 -1
- package/es/element/index.js +1 -1
- package/es/element/src/Element.d.ts +1 -1
- package/es/element/src/Element.js +1 -1
- package/es/ellipsis/index.d.ts +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/ellipsis/src/Ellipsis.d.ts +1 -1
- package/es/ellipsis/src/Ellipsis.js +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/empty/index.js +1 -1
- package/es/empty/src/Empty.d.ts +1 -1
- package/es/empty/src/Empty.js +1 -1
- package/es/form/index.d.ts +3 -3
- package/es/form/index.js +3 -3
- package/es/form/src/Form.d.ts +1 -1
- package/es/form/src/Form.js +1 -1
- package/es/form/src/FormItemRow.d.ts +1 -1
- package/es/form/src/FormItemRow.js +1 -1
- package/es/form/src/styles/form-item.cssr.js +2 -0
- package/es/gradient-text/index.d.ts +1 -1
- package/es/gradient-text/index.js +1 -1
- package/es/gradient-text/src/GradientText.d.ts +1 -1
- package/es/gradient-text/src/GradientText.js +1 -1
- package/es/grid/index.d.ts +3 -3
- package/es/grid/index.js +3 -3
- package/es/grid/src/Grid.d.ts +1 -1
- package/es/grid/src/Grid.js +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/icon/index.js +1 -1
- package/es/icon/src/Icon.d.ts +1 -2
- package/es/icon/src/Icon.js +1 -1
- package/es/icon-wrapper/index.d.ts +1 -1
- package/es/icon-wrapper/index.js +1 -1
- package/es/icon-wrapper/src/IconWrapper.d.ts +1 -2
- package/es/icon-wrapper/src/IconWrapper.js +1 -1
- package/es/image/index.d.ts +2 -2
- package/es/image/index.js +2 -2
- package/es/image/src/Image.d.ts +1 -1
- package/es/image/src/Image.js +17 -10
- package/es/image/src/ImageGroup.d.ts +1 -1
- package/es/image/src/ImageGroup.js +1 -1
- package/es/image/src/styles/index.cssr.js +1 -0
- package/es/input/index.d.ts +3 -3
- package/es/input/index.js +3 -3
- package/es/input/src/Input.d.ts +1 -1
- package/es/input/src/Input.js +2 -2
- package/es/input/src/InputGroup.d.ts +1 -1
- package/es/input/src/InputGroup.js +1 -1
- package/es/input/src/InputGroupLabel.d.ts +1 -1
- package/es/input/src/InputGroupLabel.js +1 -1
- package/es/input/src/styles/input-group-label.cssr.js +1 -0
- package/es/input/src/styles/input.cssr.js +3 -0
- package/es/input-number/index.d.ts +1 -1
- package/es/input-number/index.js +1 -1
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/input-number/src/InputNumber.js +2 -2
- package/es/layout/index.d.ts +4 -4
- package/es/layout/index.js +4 -4
- package/es/layout/src/Layout.d.ts +1 -1
- package/es/layout/src/Layout.js +1 -1
- package/es/layout/src/LayoutFooter.d.ts +1 -1
- package/es/layout/src/LayoutFooter.js +1 -1
- package/es/layout/src/LayoutHeader.d.ts +1 -1
- package/es/layout/src/LayoutHeader.js +1 -1
- package/es/layout/src/LayoutSider.d.ts +1 -1
- package/es/layout/src/LayoutSider.js +1 -1
- package/es/legacy-grid/index.d.ts +2 -2
- package/es/legacy-grid/index.js +2 -2
- package/es/list/index.d.ts +1 -1
- package/es/list/index.js +1 -1
- package/es/list/src/List.d.ts +1 -1
- package/es/list/src/List.js +1 -1
- package/es/loading-bar/index.d.ts +1 -1
- package/es/loading-bar/index.js +1 -1
- package/es/loading-bar/src/LoadingBarProvider.d.ts +3 -3
- package/es/loading-bar/src/LoadingBarProvider.js +2 -2
- package/es/locales/common/ukUA.js +14 -18
- package/es/log/index.d.ts +1 -1
- package/es/log/index.js +1 -1
- package/es/log/src/Log.d.ts +1 -1
- package/es/log/src/Log.js +1 -1
- package/es/mention/index.d.ts +1 -1
- package/es/mention/index.js +1 -1
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/mention/src/Mention.js +1 -1
- package/es/menu/index.d.ts +1 -1
- package/es/menu/index.js +1 -1
- package/es/menu/src/Menu.d.ts +1 -1
- package/es/menu/src/Menu.js +1 -1
- package/es/message/index.d.ts +1 -1
- package/es/message/index.js +1 -1
- package/es/message/src/MessageProvider.d.ts +1 -1
- package/es/message/src/MessageProvider.js +1 -1
- package/es/modal/index.d.ts +1 -1
- package/es/modal/index.js +1 -1
- package/es/modal/src/Modal.d.ts +1 -1
- package/es/modal/src/Modal.js +1 -1
- package/es/modal/src/presetProps.d.ts +1 -1
- package/es/notification/index.d.ts +1 -1
- package/es/notification/index.js +1 -1
- package/es/notification/src/Notification.d.ts +1 -0
- package/es/notification/src/Notification.js +6 -2
- package/es/notification/src/NotificationContainer.js +1 -1
- package/es/notification/src/NotificationProvider.d.ts +1 -1
- package/es/notification/src/NotificationProvider.js +1 -1
- package/es/notification/src/styles/index.cssr.js +1 -3
- package/es/notification/src/styles/rtl.cssr.d.ts +2 -0
- package/es/notification/src/styles/rtl.cssr.js +22 -0
- package/es/notification/styles/index.d.ts +1 -0
- package/es/notification/styles/index.js +1 -0
- package/es/notification/styles/rtl.d.ts +2 -0
- package/es/notification/styles/rtl.js +5 -0
- package/es/number-animation/index.d.ts +1 -1
- package/es/number-animation/index.js +1 -1
- package/es/number-animation/src/NumberAnimation.d.ts +5 -1
- package/es/number-animation/src/NumberAnimation.js +5 -2
- package/es/page-header/index.d.ts +1 -1
- package/es/page-header/index.js +1 -1
- package/es/page-header/src/PageHeader.d.ts +1 -1
- package/es/page-header/src/PageHeader.js +2 -2
- package/es/pagination/index.d.ts +1 -1
- package/es/pagination/index.js +1 -1
- package/es/pagination/src/Pagination.d.ts +1 -1
- package/es/pagination/src/Pagination.js +2 -2
- package/es/pagination/src/styles/index.cssr.js +1 -0
- package/es/popconfirm/index.d.ts +1 -1
- package/es/popconfirm/index.js +1 -1
- package/es/popconfirm/src/Popconfirm.d.ts +4 -1
- package/es/popconfirm/src/Popconfirm.js +1 -1
- package/es/popover/index.d.ts +1 -1
- package/es/popover/index.js +1 -1
- package/es/popover/src/Popover.d.ts +8 -1
- package/es/popover/src/Popover.js +4 -2
- package/es/popover/src/PopoverBody.d.ts +6 -0
- package/es/popover/src/PopoverBody.js +23 -14
- package/es/popover/src/styles/index.cssr.js +19 -15
- package/es/popselect/index.d.ts +1 -1
- package/es/popselect/index.js +1 -1
- package/es/popselect/src/Popselect.d.ts +4 -1
- package/es/popselect/src/Popselect.js +1 -1
- package/es/progress/index.d.ts +1 -1
- package/es/progress/index.js +1 -1
- package/es/progress/src/Progress.d.ts +1 -1
- package/es/progress/src/Progress.js +1 -1
- package/es/radio/index.d.ts +3 -3
- package/es/radio/index.js +3 -3
- package/es/radio/src/Radio.d.ts +25 -0
- package/es/radio/src/Radio.js +2 -1
- package/es/radio/src/RadioButton.d.ts +25 -0
- package/es/radio/src/RadioButton.js +1 -0
- package/es/radio/src/RadioGroup.d.ts +1 -1
- package/es/radio/src/RadioGroup.js +2 -2
- package/es/radio/src/styles/radio-group.cssr.js +2 -0
- package/es/radio/src/styles/radio.cssr.js +1 -0
- package/es/rate/index.d.ts +1 -1
- package/es/rate/index.js +1 -1
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/rate/src/Rate.js +1 -1
- package/es/result/index.d.ts +1 -1
- package/es/result/index.js +1 -1
- package/es/result/src/Result.d.ts +1 -1
- package/es/result/src/Result.js +1 -1
- package/es/scrollbar/index.d.ts +1 -1
- package/es/scrollbar/index.js +1 -1
- package/es/scrollbar/src/Scrollbar.d.ts +1 -1
- package/es/scrollbar/src/Scrollbar.js +1 -1
- package/es/select/index.d.ts +1 -1
- package/es/select/index.js +1 -1
- package/es/select/src/Select.d.ts +1 -1
- package/es/select/src/Select.js +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/skeleton/index.js +1 -1
- package/es/skeleton/src/Skeleton.d.ts +1 -1
- package/es/skeleton/src/Skeleton.js +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/slider/index.js +1 -1
- package/es/slider/src/Slider.d.ts +1 -1
- package/es/slider/src/Slider.js +1 -1
- package/es/slider/src/styles/index.cssr.js +1 -0
- package/es/space/index.d.ts +1 -1
- package/es/space/index.js +1 -1
- package/es/space/src/Space.d.ts +1 -1
- package/es/space/src/Space.js +2 -2
- package/es/spin/index.d.ts +1 -1
- package/es/spin/index.js +1 -1
- package/es/spin/src/Spin.d.ts +1 -1
- package/es/spin/src/Spin.js +1 -1
- package/es/spin/src/styles/index.cssr.js +1 -0
- package/es/statistic/index.d.ts +1 -1
- package/es/statistic/index.js +1 -1
- package/es/statistic/src/Statistic.d.ts +1 -1
- package/es/statistic/src/Statistic.js +1 -1
- package/es/steps/index.d.ts +2 -2
- package/es/steps/index.js +2 -2
- package/es/steps/src/Step.d.ts +1 -1
- package/es/steps/src/Step.js +1 -1
- package/es/steps/src/Steps.d.ts +1 -1
- package/es/steps/src/Steps.js +1 -1
- package/es/switch/index.d.ts +1 -1
- package/es/switch/index.js +1 -1
- package/es/switch/src/Switch.d.ts +1 -1
- package/es/switch/src/Switch.js +1 -1
- package/es/switch/src/styles/index.cssr.js +1 -0
- package/es/table/index.d.ts +1 -1
- package/es/table/index.js +1 -1
- package/es/table/src/Table.d.ts +1 -1
- package/es/table/src/Table.js +2 -2
- package/es/tabs/index.d.ts +3 -3
- package/es/tabs/index.js +3 -3
- package/es/tabs/src/Tab.d.ts +2 -2
- package/es/tabs/src/Tab.js +2 -2
- package/es/tabs/src/Tabs.d.ts +1 -1
- package/es/tabs/src/Tabs.js +1 -1
- package/es/tag/index.d.ts +1 -1
- package/es/tag/index.js +1 -1
- package/es/tag/src/Tag.d.ts +1 -1
- package/es/tag/src/Tag.js +2 -2
- package/es/thing/index.d.ts +1 -1
- package/es/thing/index.js +1 -1
- package/es/thing/src/Thing.d.ts +1 -1
- package/es/thing/src/Thing.js +1 -1
- package/es/time/index.d.ts +1 -1
- package/es/time/index.js +1 -1
- package/es/time/src/Time.d.ts +1 -1
- package/es/time/src/Time.js +1 -1
- package/es/time-picker/index.d.ts +1 -1
- package/es/time-picker/index.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +1 -1
- package/es/time-picker/src/TimePicker.js +1 -1
- package/es/timeline/index.d.ts +2 -2
- package/es/timeline/index.js +2 -2
- package/es/timeline/src/Timeline.d.ts +1 -1
- package/es/timeline/src/Timeline.js +1 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/timeline/src/TimelineItem.js +1 -1
- package/es/tooltip/index.d.ts +1 -1
- package/es/tooltip/index.js +1 -1
- package/es/tooltip/src/Tooltip.d.ts +4 -1
- package/es/tooltip/src/Tooltip.js +1 -1
- package/es/transfer/index.d.ts +1 -1
- package/es/transfer/index.js +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/transfer/src/Transfer.js +1 -1
- package/es/tree/index.d.ts +1 -1
- package/es/tree/index.js +1 -1
- package/es/tree/src/Tree.d.ts +19 -2
- package/es/tree/src/Tree.js +45 -19
- package/es/tree/src/TreeNode.js +21 -6
- package/es/tree/src/interface.d.ts +2 -0
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/index.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +2 -2
- package/es/tree-select/src/TreeSelect.js +2 -2
- package/es/typography/index.d.ts +7 -6
- package/es/typography/index.js +7 -6
- package/es/typography/src/a.d.ts +1 -1
- package/es/typography/src/a.js +1 -1
- package/es/typography/src/blockquote.d.ts +1 -1
- package/es/typography/src/blockquote.js +1 -1
- package/es/typography/src/create-header.d.ts +1 -1
- package/es/typography/src/create-header.js +1 -1
- package/es/typography/src/ol.d.ts +1 -1
- package/es/typography/src/ol.js +1 -1
- package/es/typography/src/p.d.ts +1 -1
- package/es/typography/src/p.js +1 -1
- package/es/typography/src/text.d.ts +1 -1
- package/es/typography/src/text.js +1 -1
- package/es/typography/src/ul.d.ts +1 -1
- package/es/typography/src/ul.js +1 -1
- package/es/upload/index.d.ts +1 -1
- package/es/upload/index.js +1 -1
- package/es/upload/src/Upload.d.ts +1 -1
- package/es/upload/src/Upload.js +1 -1
- package/es/upload/src/UploadFile.d.ts +2 -2
- package/es/upload/src/UploadFile.js +8 -4
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/watermark/index.d.ts +1 -1
- package/es/watermark/index.js +1 -1
- package/es/watermark/src/Watermark.d.ts +1 -1
- package/es/watermark/src/Watermark.js +1 -1
- package/es/watermark/src/styles/index.cssr.js +4 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +8 -2
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/lib/_internal/selection/src/styles/index.cssr.js +1 -0
- package/lib/_mixins/use-rtl.d.ts +1 -1
- package/lib/_mixins/use-rtl.js +2 -1
- package/lib/_utils/env/browser.d.ts +3 -0
- package/lib/_utils/env/browser.js +7 -0
- package/lib/_utils/env/is-native-lazy-load.d.ts +1 -0
- package/lib/_utils/env/is-native-lazy-load.js +6 -0
- package/lib/affix/index.d.ts +1 -1
- package/lib/affix/index.js +2 -1
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.js +2 -1
- package/lib/alert/src/Alert.d.ts +1 -1
- package/lib/alert/src/Alert.js +5 -4
- package/lib/anchor/index.d.ts +2 -2
- package/lib/anchor/index.js +3 -1
- package/lib/anchor/src/AnchorAdapter.d.ts +1 -1
- package/lib/anchor/src/AnchorAdapter.js +3 -2
- package/lib/anchor/src/Link.d.ts +1 -1
- package/lib/anchor/src/Link.js +3 -3
- package/lib/auto-complete/index.d.ts +1 -1
- package/lib/auto-complete/index.js +2 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/auto-complete/src/AutoComplete.js +3 -2
- package/lib/avatar/index.d.ts +1 -1
- package/lib/avatar/index.js +2 -1
- package/lib/avatar/src/Avatar.d.ts +13 -1
- package/lib/avatar/src/Avatar.js +60 -7
- package/lib/avatar-group/index.d.ts +1 -1
- package/lib/avatar-group/index.js +2 -1
- package/lib/avatar-group/src/AvatarGroup.d.ts +1 -1
- package/lib/avatar-group/src/AvatarGroup.js +5 -4
- package/lib/back-top/index.d.ts +1 -1
- package/lib/back-top/index.js +2 -1
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/back-top/src/BackTop.js +3 -2
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.js +2 -1
- package/lib/badge/src/Badge.d.ts +1 -1
- package/lib/badge/src/Badge.js +5 -4
- package/lib/breadcrumb/index.d.ts +2 -2
- package/lib/breadcrumb/index.js +3 -1
- package/lib/breadcrumb/src/Breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/src/Breadcrumb.js +3 -3
- package/lib/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/lib/breadcrumb/src/BreadcrumbItem.js +3 -2
- package/lib/breadcrumb/src/styles/index.cssr.js +1 -0
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +2 -1
- package/lib/button/src/Button.d.ts +13 -4
- package/lib/button/src/Button.js +11 -7
- package/lib/button/src/styles/index.cssr.js +1 -0
- package/lib/button-group/index.d.ts +1 -1
- package/lib/button-group/index.js +2 -1
- package/lib/button-group/src/ButtonGroup.d.ts +1 -1
- package/lib/button-group/src/ButtonGroup.js +5 -4
- package/lib/calendar/index.d.ts +1 -1
- package/lib/calendar/index.js +2 -1
- package/lib/calendar/src/Calendar.d.ts +1 -1
- package/lib/calendar/src/Calendar.js +3 -2
- package/lib/card/index.d.ts +1 -1
- package/lib/card/index.js +2 -1
- package/lib/card/src/Card.d.ts +2 -2
- package/lib/card/src/Card.js +5 -5
- package/lib/carousel/index.d.ts +1 -1
- package/lib/carousel/index.js +2 -1
- package/lib/carousel/src/Carousel.d.ts +1 -1
- package/lib/carousel/src/Carousel.js +3 -2
- package/lib/carousel/src/styles/index.cssr.js +1 -0
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cascader/index.js +2 -1
- package/lib/cascader/src/Cascader.d.ts +1 -1
- package/lib/cascader/src/Cascader.js +3 -2
- package/lib/cascader/src/utils.d.ts +1 -4
- package/lib/cascader/src/utils.js +18 -29
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +3 -1
- package/lib/checkbox/src/Checkbox.d.ts +1 -1
- package/lib/checkbox/src/Checkbox.js +5 -4
- package/lib/checkbox/src/CheckboxGroup.d.ts +1 -1
- package/lib/checkbox/src/CheckboxGroup.js +3 -3
- package/lib/checkbox/src/styles/index.cssr.js +2 -0
- package/lib/code/index.d.ts +1 -1
- package/lib/code/index.js +2 -1
- package/lib/code/src/Code.d.ts +1 -1
- package/lib/code/src/Code.js +3 -2
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse/index.js +3 -1
- package/lib/collapse/src/Collapse.d.ts +1 -1
- package/lib/collapse/src/Collapse.js +5 -5
- package/lib/collapse/src/CollapseItem.d.ts +1 -1
- package/lib/collapse/src/CollapseItem.js +5 -4
- package/lib/collapse-transition/index.d.ts +1 -1
- package/lib/collapse-transition/index.js +2 -1
- package/lib/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/lib/collapse-transition/src/CollapseTransition.js +5 -4
- package/lib/color-picker/index.d.ts +1 -1
- package/lib/color-picker/index.js +2 -1
- package/lib/color-picker/src/ColorPicker.d.ts +2 -2
- package/lib/color-picker/src/ColorPicker.js +3 -3
- package/lib/countdown/index.d.ts +2 -2
- package/lib/countdown/index.js +2 -1
- package/lib/countdown/src/Countdown.d.ts +9 -2
- package/lib/countdown/src/Countdown.js +44 -27
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/index.js +2 -1
- package/lib/data-table/src/TableParts/Body.d.ts +4 -0
- package/lib/data-table/src/TableParts/Body.js +50 -34
- package/lib/data-table/src/TableParts/BodyRadio.d.ts +30 -0
- package/lib/data-table/src/TableParts/BodyRadio.js +32 -0
- package/lib/data-table/src/TableParts/Header.js +2 -2
- package/lib/data-table/src/interface.d.ts +2 -1
- package/lib/data-table/src/use-check.d.ts +1 -1
- package/lib/data-table/src/use-check.js +15 -3
- package/lib/date-picker/index.d.ts +1 -1
- package/lib/date-picker/index.js +2 -1
- package/lib/date-picker/src/DatePicker.d.ts +1 -1
- package/lib/date-picker/src/DatePicker.js +21 -11
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.js +1 -1
- package/lib/date-picker/src/panel/month.js +1 -1
- package/lib/date-picker/src/panel/monthrange.js +1 -1
- package/lib/date-picker/src/styles/index.cssr.js +4 -0
- package/lib/descriptions/index.d.ts +2 -2
- package/lib/descriptions/index.js +3 -1
- package/lib/descriptions/src/Descriptions.d.ts +2 -2
- package/lib/descriptions/src/Descriptions.js +3 -2
- package/lib/descriptions/src/DescriptionsItem.d.ts +2 -2
- package/lib/descriptions/src/DescriptionsItem.js +3 -2
- package/lib/dialog/index.d.ts +2 -1
- package/lib/dialog/index.js +4 -1
- package/lib/dialog/src/DialogProvider.d.ts +1 -1
- package/lib/dialog/src/DialogProvider.js +3 -3
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +2 -1
- package/lib/divider/src/Divider.d.ts +1 -1
- package/lib/divider/src/Divider.js +3 -2
- package/lib/drawer/index.d.ts +2 -2
- package/lib/drawer/index.js +3 -1
- package/lib/drawer/src/Drawer.d.ts +60 -27
- package/lib/drawer/src/Drawer.js +39 -17
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +9 -0
- package/lib/drawer/src/DrawerBodyWrapper.js +96 -1
- package/lib/drawer/src/DrawerContent.d.ts +2 -1
- package/lib/drawer/src/DrawerContent.js +3 -2
- package/lib/drawer/src/interface.d.ts +2 -0
- package/lib/drawer/src/styles/index.cssr.js +42 -5
- package/lib/drawer/styles/light.d.ts +2 -0
- package/lib/drawer/styles/light.js +3 -2
- package/lib/dropdown/index.d.ts +2 -2
- package/lib/dropdown/index.js +2 -1
- package/lib/dropdown/src/Dropdown.d.ts +10 -2
- package/lib/dropdown/src/Dropdown.js +17 -5
- package/lib/dropdown/src/DropdownMenu.d.ts +3 -0
- package/lib/dropdown/src/DropdownMenu.js +23 -15
- package/lib/dropdown/src/DropdownOption.d.ts +5 -0
- package/lib/dropdown/src/DropdownOption.js +32 -10
- package/lib/dropdown/src/interface.d.ts +2 -1
- package/lib/dropdown/src/styles/index.cssr.js +16 -10
- package/lib/dynamic-input/index.d.ts +1 -1
- package/lib/dynamic-input/index.js +2 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.js +5 -4
- package/lib/dynamic-tags/index.d.ts +1 -1
- package/lib/dynamic-tags/index.js +2 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.js +3 -2
- package/lib/element/index.d.ts +1 -1
- package/lib/element/index.js +2 -1
- package/lib/element/src/Element.d.ts +1 -1
- package/lib/element/src/Element.js +3 -2
- package/lib/ellipsis/index.d.ts +1 -1
- package/lib/ellipsis/index.js +2 -1
- package/lib/ellipsis/src/Ellipsis.d.ts +1 -1
- package/lib/ellipsis/src/Ellipsis.js +3 -2
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +2 -1
- package/lib/empty/src/Empty.d.ts +1 -1
- package/lib/empty/src/Empty.js +3 -2
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +5 -1
- package/lib/form/src/Form.d.ts +1 -1
- package/lib/form/src/Form.js +3 -2
- package/lib/form/src/FormItemRow.d.ts +1 -1
- package/lib/form/src/FormItemRow.js +3 -2
- package/lib/form/src/styles/form-item.cssr.js +2 -0
- package/lib/gradient-text/index.d.ts +1 -1
- package/lib/gradient-text/index.js +2 -1
- package/lib/gradient-text/src/GradientText.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.js +3 -2
- package/lib/grid/index.d.ts +3 -3
- package/lib/grid/index.js +4 -1
- package/lib/grid/src/Grid.d.ts +1 -1
- package/lib/grid/src/Grid.js +3 -2
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +2 -1
- package/lib/icon/src/Icon.d.ts +1 -2
- package/lib/icon/src/Icon.js +3 -3
- package/lib/icon-wrapper/index.d.ts +1 -1
- package/lib/icon-wrapper/index.js +2 -1
- package/lib/icon-wrapper/src/IconWrapper.d.ts +1 -2
- package/lib/icon-wrapper/src/IconWrapper.js +3 -3
- package/lib/image/index.d.ts +2 -2
- package/lib/image/index.js +3 -1
- package/lib/image/src/Image.d.ts +1 -1
- package/lib/image/src/Image.js +19 -11
- package/lib/image/src/ImageGroup.d.ts +1 -1
- package/lib/image/src/ImageGroup.js +3 -3
- package/lib/image/src/styles/index.cssr.js +1 -0
- package/lib/input/index.d.ts +3 -3
- package/lib/input/index.js +4 -1
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input/src/Input.js +5 -4
- package/lib/input/src/InputGroup.d.ts +1 -1
- package/lib/input/src/InputGroup.js +3 -2
- package/lib/input/src/InputGroupLabel.d.ts +1 -1
- package/lib/input/src/InputGroupLabel.js +3 -2
- package/lib/input/src/styles/input-group-label.cssr.js +1 -0
- package/lib/input/src/styles/input.cssr.js +3 -0
- package/lib/input-number/index.d.ts +1 -1
- package/lib/input-number/index.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/input-number/src/InputNumber.js +5 -4
- package/lib/layout/index.d.ts +4 -4
- package/lib/layout/index.js +6 -1
- package/lib/layout/src/Layout.d.ts +1 -1
- package/lib/layout/src/Layout.js +3 -3
- package/lib/layout/src/LayoutFooter.d.ts +1 -1
- package/lib/layout/src/LayoutFooter.js +3 -2
- package/lib/layout/src/LayoutHeader.d.ts +1 -1
- package/lib/layout/src/LayoutHeader.js +3 -2
- package/lib/layout/src/LayoutSider.d.ts +1 -1
- package/lib/layout/src/LayoutSider.js +3 -2
- package/lib/legacy-grid/index.d.ts +2 -2
- package/lib/legacy-grid/index.js +3 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/list/index.js +2 -1
- package/lib/list/src/List.d.ts +1 -1
- package/lib/list/src/List.js +3 -3
- package/lib/loading-bar/index.d.ts +1 -1
- package/lib/loading-bar/index.js +2 -1
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +3 -3
- package/lib/loading-bar/src/LoadingBarProvider.js +3 -2
- package/lib/locales/common/ukUA.js +14 -18
- package/lib/log/index.d.ts +1 -1
- package/lib/log/index.js +2 -1
- package/lib/log/src/Log.d.ts +1 -1
- package/lib/log/src/Log.js +3 -2
- package/lib/mention/index.d.ts +1 -1
- package/lib/mention/index.js +2 -1
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/mention/src/Mention.js +3 -2
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/index.js +2 -1
- package/lib/menu/src/Menu.d.ts +1 -1
- package/lib/menu/src/Menu.js +3 -2
- package/lib/message/index.d.ts +1 -1
- package/lib/message/index.js +2 -1
- package/lib/message/src/MessageProvider.d.ts +1 -1
- package/lib/message/src/MessageProvider.js +3 -2
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +2 -1
- package/lib/modal/src/Modal.d.ts +1 -1
- package/lib/modal/src/Modal.js +3 -2
- package/lib/modal/src/presetProps.d.ts +1 -1
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/index.js +2 -1
- package/lib/notification/src/Notification.d.ts +1 -0
- package/lib/notification/src/Notification.js +6 -2
- package/lib/notification/src/NotificationContainer.js +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.js +3 -3
- package/lib/notification/src/styles/index.cssr.js +1 -3
- package/lib/notification/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/notification/src/styles/rtl.cssr.js +29 -0
- package/lib/notification/styles/index.d.ts +1 -0
- package/lib/notification/styles/index.js +3 -1
- package/lib/notification/styles/rtl.d.ts +2 -0
- package/lib/notification/styles/rtl.js +11 -0
- package/lib/number-animation/index.d.ts +1 -1
- package/lib/number-animation/index.js +2 -1
- package/lib/number-animation/src/NumberAnimation.d.ts +5 -1
- package/lib/number-animation/src/NumberAnimation.js +7 -3
- package/lib/page-header/index.d.ts +1 -1
- package/lib/page-header/index.js +2 -1
- package/lib/page-header/src/PageHeader.d.ts +1 -1
- package/lib/page-header/src/PageHeader.js +5 -4
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/src/Pagination.d.ts +1 -1
- package/lib/pagination/src/Pagination.js +5 -4
- package/lib/pagination/src/styles/index.cssr.js +1 -0
- package/lib/popconfirm/index.d.ts +1 -1
- package/lib/popconfirm/index.js +2 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +4 -1
- package/lib/popconfirm/src/Popconfirm.js +3 -2
- package/lib/popover/index.d.ts +1 -1
- package/lib/popover/index.js +2 -1
- package/lib/popover/src/Popover.d.ts +8 -1
- package/lib/popover/src/Popover.js +6 -4
- package/lib/popover/src/PopoverBody.d.ts +6 -0
- package/lib/popover/src/PopoverBody.js +23 -14
- package/lib/popover/src/styles/index.cssr.js +19 -15
- package/lib/popselect/index.d.ts +1 -1
- package/lib/popselect/index.js +2 -1
- package/lib/popselect/src/Popselect.d.ts +4 -1
- package/lib/popselect/src/Popselect.js +3 -2
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +2 -1
- package/lib/progress/src/Progress.d.ts +1 -1
- package/lib/progress/src/Progress.js +3 -2
- package/lib/radio/index.d.ts +3 -3
- package/lib/radio/index.js +4 -1
- package/lib/radio/src/Radio.d.ts +25 -0
- package/lib/radio/src/Radio.js +4 -2
- package/lib/radio/src/RadioButton.d.ts +25 -0
- package/lib/radio/src/RadioButton.js +2 -0
- package/lib/radio/src/RadioGroup.d.ts +1 -1
- package/lib/radio/src/RadioGroup.js +5 -4
- package/lib/radio/src/styles/radio-group.cssr.js +2 -0
- package/lib/radio/src/styles/radio.cssr.js +1 -0
- package/lib/rate/index.d.ts +1 -1
- package/lib/rate/index.js +2 -1
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/rate/src/Rate.js +3 -2
- package/lib/result/index.d.ts +1 -1
- package/lib/result/index.js +2 -1
- package/lib/result/src/Result.d.ts +1 -1
- package/lib/result/src/Result.js +3 -2
- package/lib/scrollbar/index.d.ts +1 -1
- package/lib/scrollbar/index.js +2 -1
- package/lib/scrollbar/src/Scrollbar.d.ts +1 -1
- package/lib/scrollbar/src/Scrollbar.js +3 -2
- package/lib/select/index.d.ts +1 -1
- package/lib/select/index.js +2 -1
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/select/src/Select.js +3 -2
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton/index.js +2 -1
- package/lib/skeleton/src/Skeleton.d.ts +1 -1
- package/lib/skeleton/src/Skeleton.js +3 -2
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +2 -1
- package/lib/slider/src/Slider.d.ts +1 -1
- package/lib/slider/src/Slider.js +3 -2
- package/lib/slider/src/styles/index.cssr.js +1 -0
- package/lib/space/index.d.ts +1 -1
- package/lib/space/index.js +2 -1
- package/lib/space/src/Space.d.ts +1 -1
- package/lib/space/src/Space.js +5 -7
- package/lib/spin/index.d.ts +1 -1
- package/lib/spin/index.js +2 -1
- package/lib/spin/src/Spin.d.ts +1 -1
- package/lib/spin/src/Spin.js +3 -2
- package/lib/spin/src/styles/index.cssr.js +1 -0
- package/lib/statistic/index.d.ts +1 -1
- package/lib/statistic/index.js +2 -1
- package/lib/statistic/src/Statistic.d.ts +1 -1
- package/lib/statistic/src/Statistic.js +3 -2
- package/lib/steps/index.d.ts +2 -2
- package/lib/steps/index.js +3 -1
- package/lib/steps/src/Step.d.ts +1 -1
- package/lib/steps/src/Step.js +3 -2
- package/lib/steps/src/Steps.d.ts +1 -1
- package/lib/steps/src/Steps.js +3 -3
- package/lib/switch/index.d.ts +1 -1
- package/lib/switch/index.js +2 -1
- package/lib/switch/src/Switch.d.ts +1 -1
- package/lib/switch/src/Switch.js +3 -2
- package/lib/switch/src/styles/index.cssr.js +1 -0
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.js +2 -1
- package/lib/table/src/Table.d.ts +1 -1
- package/lib/table/src/Table.js +5 -4
- package/lib/tabs/index.d.ts +3 -3
- package/lib/tabs/index.js +4 -1
- package/lib/tabs/src/Tab.d.ts +2 -2
- package/lib/tabs/src/Tab.js +3 -2
- package/lib/tabs/src/Tabs.d.ts +1 -1
- package/lib/tabs/src/Tabs.js +3 -2
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag/index.js +2 -1
- package/lib/tag/src/Tag.d.ts +1 -1
- package/lib/tag/src/Tag.js +5 -5
- package/lib/thing/index.d.ts +1 -1
- package/lib/thing/index.js +2 -1
- package/lib/thing/src/Thing.d.ts +1 -1
- package/lib/thing/src/Thing.js +3 -2
- package/lib/time/index.d.ts +1 -1
- package/lib/time/index.js +2 -1
- package/lib/time/src/Time.d.ts +1 -1
- package/lib/time/src/Time.js +3 -2
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/time-picker/index.js +2 -1
- package/lib/time-picker/src/TimePicker.d.ts +1 -1
- package/lib/time-picker/src/TimePicker.js +3 -2
- package/lib/timeline/index.d.ts +2 -2
- package/lib/timeline/index.js +3 -1
- package/lib/timeline/src/Timeline.d.ts +1 -1
- package/lib/timeline/src/Timeline.js +3 -3
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/timeline/src/TimelineItem.js +3 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.js +2 -1
- package/lib/tooltip/src/Tooltip.d.ts +4 -1
- package/lib/tooltip/src/Tooltip.js +3 -2
- package/lib/transfer/index.d.ts +1 -1
- package/lib/transfer/index.js +2 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/transfer/src/Transfer.js +3 -2
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/index.js +2 -1
- package/lib/tree/src/Tree.d.ts +19 -2
- package/lib/tree/src/Tree.js +47 -21
- package/lib/tree/src/TreeNode.js +21 -6
- package/lib/tree/src/interface.d.ts +2 -0
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/index.js +2 -1
- package/lib/tree-select/src/TreeSelect.d.ts +2 -2
- package/lib/tree-select/src/TreeSelect.js +3 -2
- package/lib/typography/index.d.ts +7 -6
- package/lib/typography/index.js +14 -1
- package/lib/typography/src/a.d.ts +1 -1
- package/lib/typography/src/a.js +3 -2
- package/lib/typography/src/blockquote.d.ts +1 -1
- package/lib/typography/src/blockquote.js +3 -2
- package/lib/typography/src/create-header.d.ts +1 -1
- package/lib/typography/src/create-header.js +3 -2
- package/lib/typography/src/ol.d.ts +1 -1
- package/lib/typography/src/ol.js +3 -2
- package/lib/typography/src/p.d.ts +1 -1
- package/lib/typography/src/p.js +3 -2
- package/lib/typography/src/text.d.ts +1 -1
- package/lib/typography/src/text.js +3 -2
- package/lib/typography/src/ul.d.ts +1 -1
- package/lib/typography/src/ul.js +3 -2
- package/lib/upload/index.d.ts +1 -1
- package/lib/upload/index.js +2 -1
- package/lib/upload/src/Upload.d.ts +1 -1
- package/lib/upload/src/Upload.js +3 -2
- package/lib/upload/src/UploadFile.d.ts +2 -2
- package/lib/upload/src/UploadFile.js +8 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/index.d.ts +1 -1
- package/lib/watermark/index.js +2 -1
- package/lib/watermark/src/Watermark.d.ts +1 -1
- package/lib/watermark/src/Watermark.js +3 -2
- package/lib/watermark/src/styles/index.cssr.js +4 -1
- package/package.json +2 -2
- package/web-types.json +140 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Transition, defineComponent, ref, computed, watchEffect, provide, inject, withDirectives, vShow, mergeProps } from 'vue';
|
|
1
|
+
import { h, Transition, defineComponent, ref, computed, watchEffect, provide, inject, withDirectives, vShow, mergeProps, watch, onBeforeUnmount } from 'vue';
|
|
2
2
|
import { VFocusTrap } from 'vueuc';
|
|
3
3
|
import { clickoutside } from 'vdirs';
|
|
4
4
|
import { popoverBodyInjectionKey } from '../../popover/src/interface';
|
|
@@ -41,6 +41,7 @@ export default defineComponent({
|
|
|
41
41
|
type: [Boolean, String],
|
|
42
42
|
required: true
|
|
43
43
|
},
|
|
44
|
+
resizable: Boolean,
|
|
44
45
|
onClickoutside: Function,
|
|
45
46
|
onAfterLeave: Function,
|
|
46
47
|
onAfterEnter: Function,
|
|
@@ -51,10 +52,87 @@ export default defineComponent({
|
|
|
51
52
|
const bodyRef = ref(null); // used for detached content
|
|
52
53
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
53
54
|
const NDrawer = inject(drawerInjectionKey);
|
|
55
|
+
let startPosition = 0;
|
|
56
|
+
let memoizedBodyStyleCursor = '';
|
|
57
|
+
let hoverTimerId = null;
|
|
58
|
+
const isHoverOnResizeTriggerRef = ref(false);
|
|
59
|
+
const isDraggingRef = ref(false);
|
|
60
|
+
const isVertical = computed(() => {
|
|
61
|
+
return props.placement === 'top' || props.placement === 'bottom';
|
|
62
|
+
});
|
|
63
|
+
const handleMousedownResizeTrigger = (e) => {
|
|
64
|
+
isDraggingRef.value = true;
|
|
65
|
+
startPosition = isVertical.value ? e.clientY : e.clientX;
|
|
66
|
+
memoizedBodyStyleCursor = document.body.style.cursor;
|
|
67
|
+
document.body.style.cursor = isVertical.value ? 'ns-resize' : 'ew-resize';
|
|
68
|
+
document.body.addEventListener('mousemove', handleBodyMousemove);
|
|
69
|
+
document.body.addEventListener('mouseleave', handleBodyMouseleave);
|
|
70
|
+
document.body.addEventListener('mouseup', handleBodyMouseup);
|
|
71
|
+
};
|
|
72
|
+
const handleMouseenterResizeTrigger = () => {
|
|
73
|
+
if (hoverTimerId !== null) {
|
|
74
|
+
window.clearTimeout(hoverTimerId);
|
|
75
|
+
hoverTimerId = null;
|
|
76
|
+
}
|
|
77
|
+
if (isDraggingRef.value) {
|
|
78
|
+
isHoverOnResizeTriggerRef.value = true;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
hoverTimerId = window.setTimeout(() => {
|
|
82
|
+
isHoverOnResizeTriggerRef.value = true;
|
|
83
|
+
}, 300);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const handleMouseleaveResizeTrigger = () => {
|
|
87
|
+
if (hoverTimerId !== null) {
|
|
88
|
+
window.clearTimeout(hoverTimerId);
|
|
89
|
+
hoverTimerId = null;
|
|
90
|
+
}
|
|
91
|
+
isHoverOnResizeTriggerRef.value = false;
|
|
92
|
+
};
|
|
93
|
+
const { doUpdateHeight, doUpdateWidth } = NDrawer;
|
|
94
|
+
const handleBodyMousemove = (e) => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
if (isDraggingRef.value) {
|
|
97
|
+
if (isVertical.value) {
|
|
98
|
+
let height = ((_a = bodyRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
|
|
99
|
+
const increment = startPosition - e.clientY;
|
|
100
|
+
height += props.placement === 'bottom' ? increment : -increment;
|
|
101
|
+
doUpdateHeight(height);
|
|
102
|
+
startPosition = e.clientY;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
let width = ((_b = bodyRef.value) === null || _b === void 0 ? void 0 : _b.offsetWidth) || 0;
|
|
106
|
+
const increment = startPosition - e.clientX;
|
|
107
|
+
width += props.placement === 'right' ? increment : -increment;
|
|
108
|
+
doUpdateWidth(width);
|
|
109
|
+
startPosition = e.clientX;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const handleBodyMouseup = () => {
|
|
114
|
+
if (isDraggingRef.value) {
|
|
115
|
+
startPosition = 0;
|
|
116
|
+
isDraggingRef.value = false;
|
|
117
|
+
document.body.style.cursor = memoizedBodyStyleCursor;
|
|
118
|
+
document.body.removeEventListener('mousemove', handleBodyMousemove);
|
|
119
|
+
document.body.removeEventListener('mouseup', handleBodyMouseup);
|
|
120
|
+
document.body.removeEventListener('mouseleave', handleBodyMouseleave);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const handleBodyMouseleave = handleBodyMouseup;
|
|
54
124
|
watchEffect(() => {
|
|
55
125
|
if (props.show)
|
|
56
126
|
displayedRef.value = true;
|
|
57
127
|
});
|
|
128
|
+
watch(() => props.show, (value) => {
|
|
129
|
+
if (!value) {
|
|
130
|
+
handleBodyMouseup();
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
onBeforeUnmount(() => {
|
|
134
|
+
handleBodyMouseup();
|
|
135
|
+
});
|
|
58
136
|
const bodyDirectivesRef = computed(() => {
|
|
59
137
|
const { show } = props;
|
|
60
138
|
const directives = [[vShow, show]];
|
|
@@ -92,7 +170,12 @@ export default defineComponent({
|
|
|
92
170
|
}[props.placement];
|
|
93
171
|
}),
|
|
94
172
|
handleAfterLeave,
|
|
95
|
-
bodyDirectives: bodyDirectivesRef
|
|
173
|
+
bodyDirectives: bodyDirectivesRef,
|
|
174
|
+
handleMousedownResizeTrigger,
|
|
175
|
+
handleMouseenterResizeTrigger,
|
|
176
|
+
handleMouseleaveResizeTrigger,
|
|
177
|
+
isDragging: isDraggingRef,
|
|
178
|
+
isHoverOnResizeTrigger: isHoverOnResizeTriggerRef
|
|
96
179
|
};
|
|
97
180
|
},
|
|
98
181
|
render() {
|
|
@@ -111,10 +194,22 @@ export default defineComponent({
|
|
|
111
194
|
class: [
|
|
112
195
|
`${mergedClsPrefix}-drawer`,
|
|
113
196
|
`${mergedClsPrefix}-drawer--${this.placement}-placement`,
|
|
197
|
+
/**
|
|
198
|
+
* When the mouse is pressed to resize the drawer,
|
|
199
|
+
* disable text selection
|
|
200
|
+
*/
|
|
201
|
+
this.isDragging &&
|
|
202
|
+
`${mergedClsPrefix}-drawer--unselectable`,
|
|
114
203
|
this.nativeScrollbar &&
|
|
115
204
|
`${mergedClsPrefix}-drawer--native-scrollbar`
|
|
116
205
|
]
|
|
117
206
|
}), [
|
|
207
|
+
this.resizable ? (h("div", { class: [
|
|
208
|
+
`${mergedClsPrefix}-drawer__resize-trigger`,
|
|
209
|
+
(this.isDragging ||
|
|
210
|
+
this.isHoverOnResizeTrigger) &&
|
|
211
|
+
`${mergedClsPrefix}-drawer__resize-trigger--hover`
|
|
212
|
+
], onMouseenter: this.handleMouseenterResizeTrigger, onMouseleave: this.handleMouseleaveResizeTrigger, onMousedown: this.handleMousedownResizeTrigger })) : null,
|
|
118
213
|
this.nativeScrollbar ? (h("div", { class: `${mergedClsPrefix}-drawer-content-wrapper`, style: this.contentStyle, role: "none" }, $slots)) : (h(NScrollbar, Object.assign({}, this.scrollbarProps, { contentStyle: this.contentStyle, contentClass: `${mergedClsPrefix}-drawer-content-wrapper`, theme: this.mergedTheme.peers.Scrollbar, themeOverrides: this.mergedTheme.peerOverrides.Scrollbar }), $slots))
|
|
119
214
|
]), this.bodyDirectives)
|
|
120
215
|
}))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, PropType } from 'vue';
|
|
2
2
|
import type { ScrollbarProps } from '../../_internal';
|
|
3
3
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
4
|
-
declare const drawerContentProps: {
|
|
4
|
+
export declare const drawerContentProps: {
|
|
5
5
|
title: {
|
|
6
6
|
type: StringConstructor;
|
|
7
7
|
};
|
|
@@ -160,6 +160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
160
160
|
closeColorHover: string;
|
|
161
161
|
closeColorPressed: string;
|
|
162
162
|
closeBorderRadius: string;
|
|
163
|
+
resizableTriggerColorHover: string;
|
|
163
164
|
};
|
|
164
165
|
peers: {
|
|
165
166
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
@@ -2,7 +2,7 @@ import { defineComponent, h, inject } from 'vue';
|
|
|
2
2
|
import { NBaseClose, NScrollbar } from '../../_internal';
|
|
3
3
|
import { throwError } from '../../_utils';
|
|
4
4
|
import { drawerInjectionKey } from './interface';
|
|
5
|
-
const drawerContentProps = {
|
|
5
|
+
export const drawerContentProps = {
|
|
6
6
|
title: {
|
|
7
7
|
type: String
|
|
8
8
|
},
|
|
@@ -8,5 +8,7 @@ export interface DrawerInjection {
|
|
|
8
8
|
mergedThemeRef: Ref<MergedTheme<DrawerTheme>>;
|
|
9
9
|
mergedClsPrefixRef: Ref<string>;
|
|
10
10
|
doUpdateShow: (show: boolean) => void;
|
|
11
|
+
doUpdateWidth: (value: number) => void;
|
|
12
|
+
doUpdateHeight: (value: number) => void;
|
|
11
13
|
}
|
|
12
14
|
export declare const drawerInjectionKey: import("vue").InjectionKey<DrawerInjection>;
|
|
@@ -40,9 +40,18 @@ export default c([cB('drawer', `
|
|
|
40
40
|
background-color: var(--n-color);
|
|
41
41
|
color: var(--n-text-color);
|
|
42
42
|
box-sizing: border-box;
|
|
43
|
-
`, [slideInFromRightTransition(), slideInFromLeftTransition(), slideInFromTopTransition(), slideInFromBottomTransition(), cM('
|
|
43
|
+
`, [slideInFromRightTransition(), slideInFromLeftTransition(), slideInFromTopTransition(), slideInFromBottomTransition(), cM('unselectable', `
|
|
44
|
+
user-select: none;
|
|
45
|
+
-webkit-user-select: none;
|
|
46
|
+
`), cM('native-scrollbar', [cB('drawer-content-wrapper', `
|
|
44
47
|
overflow: auto;
|
|
45
48
|
height: 100%;
|
|
49
|
+
`)]), cE('resize-trigger', `
|
|
50
|
+
position: absolute;
|
|
51
|
+
background-color: #0000;
|
|
52
|
+
transition: background-color .3s var(--n-bezier);
|
|
53
|
+
`, [cM('hover', `
|
|
54
|
+
background-color: var(--n-resize-trigger-color-hover);
|
|
46
55
|
`)]), cB('drawer-content-wrapper', `
|
|
47
56
|
box-sizing: border-box;
|
|
48
57
|
`), cB('drawer-content', `
|
|
@@ -85,19 +94,47 @@ export default c([cB('drawer', `
|
|
|
85
94
|
top: 0;
|
|
86
95
|
bottom: 0;
|
|
87
96
|
right: 0;
|
|
88
|
-
|
|
97
|
+
`, [cE('resize-trigger', `
|
|
98
|
+
width: 3px;
|
|
99
|
+
height: 100%;
|
|
100
|
+
top: 0;
|
|
101
|
+
left: 0;
|
|
102
|
+
transform: translateX(-1.5px);
|
|
103
|
+
cursor: ew-resize;
|
|
104
|
+
`)]), cM('left-placement', `
|
|
89
105
|
top: 0;
|
|
90
106
|
bottom: 0;
|
|
91
107
|
left: 0;
|
|
92
|
-
|
|
108
|
+
`, [cE('resize-trigger', `
|
|
109
|
+
width: 3px;
|
|
110
|
+
height: 100%;
|
|
111
|
+
top: 0;
|
|
112
|
+
right: 0;
|
|
113
|
+
transform: translateX(1.5px);
|
|
114
|
+
cursor: ew-resize;
|
|
115
|
+
`)]), cM('top-placement', `
|
|
93
116
|
top: 0;
|
|
94
117
|
left: 0;
|
|
95
118
|
right: 0;
|
|
96
|
-
|
|
119
|
+
`, [cE('resize-trigger', `
|
|
120
|
+
width: 100%;
|
|
121
|
+
height: 3px;
|
|
122
|
+
bottom: 0;
|
|
123
|
+
left: 0;
|
|
124
|
+
transform: translateY(1.5px);
|
|
125
|
+
cursor: ns-resize;
|
|
126
|
+
`)]), cM('bottom-placement', `
|
|
97
127
|
left: 0;
|
|
98
128
|
bottom: 0;
|
|
99
129
|
right: 0;
|
|
100
|
-
|
|
130
|
+
`, [cE('resize-trigger', `
|
|
131
|
+
width: 100%;
|
|
132
|
+
height: 3px;
|
|
133
|
+
top: 0;
|
|
134
|
+
left: 0;
|
|
135
|
+
transform: translateY(-1.5px);
|
|
136
|
+
cursor: ns-resize;
|
|
137
|
+
`)])]), c('body', [c('>', [cB('drawer-container', {
|
|
101
138
|
position: 'fixed'
|
|
102
139
|
})])]), cB('drawer-container', `
|
|
103
140
|
position: relative;
|
|
@@ -20,6 +20,7 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
20
20
|
closeColorHover: string;
|
|
21
21
|
closeColorPressed: string;
|
|
22
22
|
closeBorderRadius: string;
|
|
23
|
+
resizableTriggerColorHover: string;
|
|
23
24
|
};
|
|
24
25
|
export declare type DrawerThemeVars = ReturnType<typeof self>;
|
|
25
26
|
declare const drawerLight: import("../../_mixins").Theme<"Drawer", {
|
|
@@ -43,6 +44,7 @@ declare const drawerLight: import("../../_mixins").Theme<"Drawer", {
|
|
|
43
44
|
closeColorHover: string;
|
|
44
45
|
closeColorPressed: string;
|
|
45
46
|
closeBorderRadius: string;
|
|
47
|
+
resizableTriggerColorHover: string;
|
|
46
48
|
}, {
|
|
47
49
|
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
48
50
|
color: string;
|
|
@@ -2,7 +2,7 @@ import { commonLight } from '../../_styles/common';
|
|
|
2
2
|
import { scrollbarLight } from '../../_internal/scrollbar/styles';
|
|
3
3
|
import { createTheme } from '../../_mixins';
|
|
4
4
|
export const self = (vars) => {
|
|
5
|
-
const { modalColor, textColor1, textColor2, boxShadow3, lineHeight, fontWeightStrong, dividerColor, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed, borderRadius } = vars;
|
|
5
|
+
const { modalColor, textColor1, textColor2, boxShadow3, lineHeight, fontWeightStrong, dividerColor, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed, borderRadius, primaryColorHover } = vars;
|
|
6
6
|
return {
|
|
7
7
|
bodyPadding: '16px 24px',
|
|
8
8
|
headerPadding: '16px 24px',
|
|
@@ -23,7 +23,8 @@ export const self = (vars) => {
|
|
|
23
23
|
closeIconSize: '18px',
|
|
24
24
|
closeColorHover,
|
|
25
25
|
closeColorPressed,
|
|
26
|
-
closeBorderRadius: borderRadius
|
|
26
|
+
closeBorderRadius: borderRadius,
|
|
27
|
+
resizableTriggerColorHover: primaryColorHover
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
const drawerLight = createTheme({
|
package/es/dropdown/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as NDropdown } from './src/Dropdown';
|
|
1
|
+
export { default as NDropdown, dropdownProps } from './src/Dropdown';
|
|
2
2
|
export type { DropdownProps } from './src/Dropdown';
|
|
3
|
-
export type { DropdownOption, DropdownGroupOption, DropdownDividerOption, DropdownRenderOption, NodeProps as DropdownNodeProps } from './src/interface';
|
|
3
|
+
export type { DropdownOption, DropdownGroupOption, DropdownDividerOption, DropdownRenderOption, NodeProps as DropdownNodeProps, DropdownMenuProps } from './src/interface';
|
package/es/dropdown/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as NDropdown } from './src/Dropdown';
|
|
1
|
+
export { default as NDropdown, dropdownProps } from './src/Dropdown';
|
|
@@ -2,11 +2,12 @@ import { PropType, Ref } from 'vue';
|
|
|
2
2
|
import { Key, TreeNode } from 'treemate';
|
|
3
3
|
import { FollowerPlacement } from 'vueuc';
|
|
4
4
|
import { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
5
|
-
import { DropdownMixedOption, OnUpdateValue, OnUpdateValueImpl, RenderLabel, RenderIcon, RenderLabelImpl, RenderIconImpl, RenderOption, NodeProps, RenderOptionImpl } from './interface';
|
|
5
|
+
import { DropdownMixedOption, OnUpdateValue, OnUpdateValueImpl, RenderLabel, RenderIcon, RenderLabelImpl, RenderIconImpl, RenderOption, NodeProps, RenderOptionImpl, DropdownMenuProps } from './interface';
|
|
6
6
|
export interface DropdownInjection {
|
|
7
7
|
renderLabelRef: Ref<RenderLabelImpl | undefined>;
|
|
8
8
|
renderIconRef: Ref<RenderIconImpl | undefined>;
|
|
9
9
|
renderOptionRef: Ref<RenderOptionImpl | undefined>;
|
|
10
|
+
menuPropsRef: Ref<DropdownMenuProps | undefined>;
|
|
10
11
|
nodePropsRef: Ref<NodeProps | undefined>;
|
|
11
12
|
hoverKeyRef: Ref<Key | null>;
|
|
12
13
|
keyboardKeyRef: Ref<Key | null>;
|
|
@@ -20,7 +21,7 @@ export interface DropdownInjection {
|
|
|
20
21
|
doSelect: OnUpdateValueImpl;
|
|
21
22
|
doUpdateShow: (value: boolean) => void;
|
|
22
23
|
}
|
|
23
|
-
declare const dropdownProps: {
|
|
24
|
+
export declare const dropdownProps: {
|
|
24
25
|
readonly theme: PropType<import("../../_mixins").Theme<"Dropdown", {
|
|
25
26
|
optionHeightSmall: string;
|
|
26
27
|
optionHeightMedium: string;
|
|
@@ -253,6 +254,7 @@ declare const dropdownProps: {
|
|
|
253
254
|
readonly type: PropType<DropdownMixedOption[]>;
|
|
254
255
|
readonly default: () => never[];
|
|
255
256
|
};
|
|
257
|
+
readonly menuProps: PropType<DropdownMenuProps>;
|
|
256
258
|
readonly showArrow: BooleanConstructor;
|
|
257
259
|
readonly renderLabel: PropType<RenderLabel>;
|
|
258
260
|
readonly renderIcon: PropType<RenderIcon>;
|
|
@@ -320,6 +322,7 @@ declare const dropdownProps: {
|
|
|
320
322
|
readonly scrollable: BooleanConstructor;
|
|
321
323
|
readonly contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
322
324
|
readonly headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
325
|
+
readonly footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
323
326
|
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
324
327
|
readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
|
|
325
328
|
readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
|
|
@@ -577,6 +580,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
577
580
|
readonly type: PropType<DropdownMixedOption[]>;
|
|
578
581
|
readonly default: () => never[];
|
|
579
582
|
};
|
|
583
|
+
readonly menuProps: PropType<DropdownMenuProps>;
|
|
580
584
|
readonly showArrow: BooleanConstructor;
|
|
581
585
|
readonly renderLabel: PropType<RenderLabel>;
|
|
582
586
|
readonly renderIcon: PropType<RenderIcon>;
|
|
@@ -644,6 +648,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
644
648
|
readonly scrollable: BooleanConstructor;
|
|
645
649
|
readonly contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
646
650
|
readonly headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
651
|
+
readonly footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
647
652
|
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
648
653
|
readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
|
|
649
654
|
readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
|
|
@@ -855,6 +860,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
855
860
|
}>;
|
|
856
861
|
tmNodes: import("vue").ComputedRef<TreeNode<import("../..").MenuOption | import("../../menu/src/interface").MenuRenderOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>[]>;
|
|
857
862
|
mergedShow: import("vue").ComputedRef<boolean>;
|
|
863
|
+
handleAfterLeave: () => void;
|
|
858
864
|
doUpdateShow: (value: boolean) => void;
|
|
859
865
|
cssVars: import("vue").ComputedRef<any> | undefined;
|
|
860
866
|
themeClass: Ref<string> | undefined;
|
|
@@ -1092,6 +1098,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1092
1098
|
readonly type: PropType<DropdownMixedOption[]>;
|
|
1093
1099
|
readonly default: () => never[];
|
|
1094
1100
|
};
|
|
1101
|
+
readonly menuProps: PropType<DropdownMenuProps>;
|
|
1095
1102
|
readonly showArrow: BooleanConstructor;
|
|
1096
1103
|
readonly renderLabel: PropType<RenderLabel>;
|
|
1097
1104
|
readonly renderIcon: PropType<RenderIcon>;
|
|
@@ -1159,6 +1166,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1159
1166
|
readonly scrollable: BooleanConstructor;
|
|
1160
1167
|
readonly contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
1161
1168
|
readonly headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
1169
|
+
readonly footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
1162
1170
|
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
1163
1171
|
readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
|
|
1164
1172
|
readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
|
|
@@ -32,6 +32,7 @@ const dropdownBaseProps = {
|
|
|
32
32
|
type: Array,
|
|
33
33
|
default: () => []
|
|
34
34
|
},
|
|
35
|
+
menuProps: Function,
|
|
35
36
|
showArrow: Boolean,
|
|
36
37
|
renderLabel: Function,
|
|
37
38
|
renderIcon: Function,
|
|
@@ -53,7 +54,7 @@ const dropdownBaseProps = {
|
|
|
53
54
|
value: [String, Number]
|
|
54
55
|
};
|
|
55
56
|
const popoverPropKeys = Object.keys(popoverBaseProps);
|
|
56
|
-
const dropdownProps = Object.assign(Object.assign(Object.assign({}, popoverBaseProps), dropdownBaseProps), useTheme.props);
|
|
57
|
+
export const dropdownProps = Object.assign(Object.assign(Object.assign({}, popoverBaseProps), dropdownBaseProps), useTheme.props);
|
|
57
58
|
export default defineComponent({
|
|
58
59
|
name: 'Dropdown',
|
|
59
60
|
inheritAttrs: false,
|
|
@@ -133,13 +134,15 @@ export default defineComponent({
|
|
|
133
134
|
mergedShowRef: mergedShowRef,
|
|
134
135
|
nodePropsRef: toRef(props, 'nodeProps'),
|
|
135
136
|
renderOptionRef: toRef(props, 'renderOption'),
|
|
137
|
+
menuPropsRef: toRef(props, 'menuProps'),
|
|
136
138
|
doSelect,
|
|
137
139
|
doUpdateShow
|
|
138
140
|
});
|
|
139
141
|
// watch
|
|
140
142
|
watch(mergedShowRef, (value) => {
|
|
141
|
-
if (!value)
|
|
143
|
+
if (!props.animated && !value) {
|
|
142
144
|
clearPendingState();
|
|
145
|
+
}
|
|
143
146
|
});
|
|
144
147
|
// methods
|
|
145
148
|
function doSelect(key, node) {
|
|
@@ -286,6 +289,11 @@ export default defineComponent({
|
|
|
286
289
|
// show
|
|
287
290
|
mergedShow: mergedShowRef,
|
|
288
291
|
// methods
|
|
292
|
+
handleAfterLeave: () => {
|
|
293
|
+
if (!props.animated)
|
|
294
|
+
return;
|
|
295
|
+
clearPendingState();
|
|
296
|
+
},
|
|
289
297
|
doUpdateShow,
|
|
290
298
|
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
291
299
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
@@ -295,8 +303,9 @@ export default defineComponent({
|
|
|
295
303
|
render() {
|
|
296
304
|
const renderPopoverBody = (className, ref, style, onMouseenter, onMouseleave) => {
|
|
297
305
|
var _a;
|
|
298
|
-
const { mergedClsPrefix } = this;
|
|
306
|
+
const { mergedClsPrefix, menuProps } = this;
|
|
299
307
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
308
|
+
const menuNodeProps = (menuProps === null || menuProps === void 0 ? void 0 : menuProps(undefined, this.tmNodes.map((v) => v.rawNode))) || {};
|
|
300
309
|
const dropdownProps = {
|
|
301
310
|
ref: createRefSetter(ref),
|
|
302
311
|
class: [className, `${mergedClsPrefix}-dropdown`, this.themeClass],
|
|
@@ -305,16 +314,18 @@ export default defineComponent({
|
|
|
305
314
|
style: [style, this.cssVars],
|
|
306
315
|
showArrow: this.showArrow,
|
|
307
316
|
arrowStyle: this.arrowStyle,
|
|
317
|
+
scrollable: this.scrollable,
|
|
308
318
|
onMouseenter,
|
|
309
319
|
onMouseleave
|
|
310
320
|
};
|
|
311
|
-
return h(NDropdownMenu, mergeProps(this.$attrs, dropdownProps));
|
|
321
|
+
return h(NDropdownMenu, mergeProps(this.$attrs, dropdownProps, menuNodeProps));
|
|
312
322
|
};
|
|
313
323
|
const { mergedTheme } = this;
|
|
314
324
|
const popoverProps = {
|
|
315
325
|
show: this.mergedShow,
|
|
316
326
|
theme: mergedTheme.peers.Popover,
|
|
317
327
|
themeOverrides: mergedTheme.peerOverrides.Popover,
|
|
328
|
+
internalOnAfterLeave: this.handleAfterLeave,
|
|
318
329
|
internalRenderBody: renderPopoverBody,
|
|
319
330
|
onUpdateShow: this.doUpdateShow,
|
|
320
331
|
'onUpdate:show': undefined
|
|
@@ -5,6 +5,7 @@ export interface NDropdownMenuInjection {
|
|
|
5
5
|
hasSubmenuRef: Ref<boolean>;
|
|
6
6
|
}
|
|
7
7
|
declare const _default: import("vue").DefineComponent<{
|
|
8
|
+
scrollable: BooleanConstructor;
|
|
8
9
|
showArrow: BooleanConstructor;
|
|
9
10
|
arrowStyle: PropType<string | CSSProperties>;
|
|
10
11
|
clsPrefix: {
|
|
@@ -22,6 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
23
|
}, {
|
|
23
24
|
bodyRef: Ref<HTMLElement | null>;
|
|
24
25
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
scrollable: BooleanConstructor;
|
|
25
27
|
showArrow: BooleanConstructor;
|
|
26
28
|
arrowStyle: PropType<string | CSSProperties>;
|
|
27
29
|
clsPrefix: {
|
|
@@ -37,6 +39,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
39
|
default: null;
|
|
38
40
|
};
|
|
39
41
|
}>>, {
|
|
42
|
+
scrollable: boolean;
|
|
40
43
|
showArrow: boolean;
|
|
41
44
|
parentKey: string | number;
|
|
42
45
|
tmNodes: TreeNode<import("../..").MenuOption, import("../..").MenuGroupOption, import("../../menu/src/interface").MenuIgnoredOption>[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { computed, defineComponent, h, inject, provide, ref } from 'vue';
|
|
2
2
|
import { renderArrow } from '../../popover/src/PopoverBody';
|
|
3
|
+
import { NxScrollbar } from '../../_internal/scrollbar';
|
|
3
4
|
import NDropdownDivider from './DropdownDivider';
|
|
4
5
|
// eslint-disable-next-line import/no-cycle
|
|
5
6
|
import NDropdownGroup from './DropdownGroup';
|
|
@@ -14,6 +15,7 @@ import { popoverBodyInjectionKey } from '../../popover/src/interface';
|
|
|
14
15
|
export default defineComponent({
|
|
15
16
|
name: 'DropdownMenu',
|
|
16
17
|
props: {
|
|
18
|
+
scrollable: Boolean,
|
|
17
19
|
showArrow: Boolean,
|
|
18
20
|
arrowStyle: [String, Object],
|
|
19
21
|
clsPrefix: {
|
|
@@ -65,21 +67,27 @@ export default defineComponent({
|
|
|
65
67
|
};
|
|
66
68
|
},
|
|
67
69
|
render() {
|
|
68
|
-
const { parentKey, clsPrefix } = this;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
const { parentKey, clsPrefix, scrollable } = this;
|
|
71
|
+
const menuOptionsNode = this.tmNodes.map((tmNode) => {
|
|
72
|
+
const { rawNode } = tmNode;
|
|
73
|
+
if (isRenderNode(rawNode)) {
|
|
74
|
+
return (h(NDropdownRenderOption, { tmNode: tmNode, key: tmNode.key }));
|
|
75
|
+
}
|
|
76
|
+
if (isDividerNode(rawNode)) {
|
|
77
|
+
return h(NDropdownDivider, { clsPrefix: clsPrefix, key: tmNode.key });
|
|
78
|
+
}
|
|
79
|
+
if (isGroupNode(rawNode)) {
|
|
80
|
+
return (h(NDropdownGroup, { clsPrefix: clsPrefix, tmNode: tmNode, parentKey: parentKey, key: tmNode.key }));
|
|
81
|
+
}
|
|
82
|
+
return (h(NDropdownOption, { clsPrefix: clsPrefix, tmNode: tmNode, parentKey: parentKey, key: tmNode.key, props: rawNode.props, scrollable: scrollable }));
|
|
83
|
+
});
|
|
84
|
+
return (h("div", { class: [
|
|
85
|
+
`${clsPrefix}-dropdown-menu`,
|
|
86
|
+
scrollable && `${clsPrefix}-dropdown-menu--scrollable`
|
|
87
|
+
], ref: "bodyRef" },
|
|
88
|
+
scrollable ? (h(NxScrollbar, { contentClass: `${clsPrefix}-dropdown-menu__content` }, {
|
|
89
|
+
default: () => menuOptionsNode
|
|
90
|
+
})) : (menuOptionsNode),
|
|
83
91
|
this.showArrow
|
|
84
92
|
? renderArrow({
|
|
85
93
|
clsPrefix,
|
|
@@ -22,12 +22,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
24
|
props: PropType<HTMLAttributes>;
|
|
25
|
+
scrollable: BooleanConstructor;
|
|
25
26
|
}, {
|
|
26
27
|
labelField: Ref<string>;
|
|
27
28
|
renderLabel: Ref<import("./interface").RenderLabelImpl | undefined>;
|
|
28
29
|
renderIcon: Ref<import("./interface").RenderIconImpl | undefined>;
|
|
29
30
|
siblingHasIcon: Ref<boolean>;
|
|
30
31
|
siblingHasSubmenu: Ref<boolean>;
|
|
32
|
+
menuProps: Ref<import("./interface").DropdownMenuProps | undefined>;
|
|
33
|
+
popoverBody: Ref<HTMLElement | null>;
|
|
31
34
|
animated: Ref<boolean>;
|
|
32
35
|
mergedShowSubmenu: import("vue").ComputedRef<boolean>;
|
|
33
36
|
rawNode: import("vue").ComputedRef<import("../..").MenuOption | import("../..").MenuGroupOption | import("../../menu/src/interface").MenuIgnoredOption>;
|
|
@@ -62,8 +65,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
65
|
default: string;
|
|
63
66
|
};
|
|
64
67
|
props: PropType<HTMLAttributes>;
|
|
68
|
+
scrollable: BooleanConstructor;
|
|
65
69
|
}>>, {
|
|
66
70
|
placement: FollowerPlacement;
|
|
71
|
+
scrollable: boolean;
|
|
67
72
|
parentKey: string | number | null;
|
|
68
73
|
}>;
|
|
69
74
|
export default _default;
|