naive-ui 2.24.7 → 2.25.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/es/_internal/clear/src/Clear.js +3 -2
- package/es/_internal/close/src/Close.js +1 -1
- package/es/_internal/icon/src/Icon.js +1 -1
- package/es/_internal/icons/ArrowUp.d.ts +2 -0
- package/es/_internal/icons/ArrowUp.js +9 -0
- package/es/_internal/icons/index.d.ts +1 -0
- package/es/_internal/icons/index.js +1 -0
- package/es/_internal/loading/src/Loading.js +1 -1
- package/es/_internal/menu-mask/src/MenuMask.js +1 -1
- package/es/_internal/scrollbar/src/ScrollBar.js +1 -1
- package/es/_internal/select-menu/src/SelectMenu.d.ts +5 -5
- package/es/_internal/select-menu/src/SelectMenu.js +32 -16
- package/es/_internal/selection/src/Selection.d.ts +13 -5
- package/es/_internal/selection/src/Selection.js +24 -15
- package/es/_internal/selection/src/interface.d.ts +2 -2
- package/es/_internal/selection/src/styles/index.cssr.js +16 -31
- package/es/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/es/_internal/wave/src/Wave.js +1 -1
- package/es/_mixins/use-config.js +1 -1
- package/es/_mixins/use-css-vars-class.d.ts +4 -2
- package/es/_mixins/use-css-vars-class.js +26 -11
- package/es/_mixins/use-form-item.d.ts +4 -0
- package/es/_mixins/use-form-item.js +7 -0
- package/es/_mixins/use-hljs.js +1 -1
- package/es/_mixins/use-locale.js +1 -1
- package/es/_mixins/use-style.js +1 -1
- package/es/_mixins/use-theme.d.ts +1 -1
- package/es/_mixins/use-theme.js +2 -2
- package/es/_utils/cssr/index.d.ts +1 -2
- package/es/_utils/cssr/index.js +1 -14
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/index.d.ts +1 -1
- package/es/_utils/vue/index.js +1 -1
- package/es/_utils/vue/resolve-slot.d.ts +8 -2
- package/es/_utils/vue/resolve-slot.js +18 -1
- package/es/affix/src/Affix.js +1 -1
- package/es/alert/src/Alert.d.ts +4 -4
- package/es/alert/src/Alert.js +1 -1
- package/es/anchor/src/AnchorAdapter.js +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +17 -2
- package/es/auto-complete/src/AutoComplete.js +9 -5
- package/es/avatar/src/Avatar.js +2 -2
- package/es/avatar/src/AvatarGroup.d.ts +0 -1
- package/es/avatar/src/AvatarGroup.js +2 -3
- package/es/avatar/src/context.d.ts +2 -0
- package/es/avatar/src/context.js +2 -0
- package/es/back-top/src/BackTop.js +1 -1
- package/es/badge/src/Badge.d.ts +4 -4
- package/es/badge/src/Badge.js +1 -1
- package/es/breadcrumb/src/Breadcrumb.js +1 -1
- package/es/button/src/Button.d.ts +4 -3
- package/es/button/src/Button.js +265 -229
- package/es/button/src/ButtonGroup.js +1 -1
- package/es/button/src/styles/button.cssr.js +1 -0
- package/es/calendar/src/Calendar.js +1 -1
- package/es/card/src/Card.d.ts +5 -1
- package/es/card/src/Card.js +3 -2
- package/es/carousel/src/Carousel.js +4 -1
- package/es/carousel/src/CarouselArrow.js +6 -9
- package/es/carousel/src/styles/index.cssr.js +59 -48
- package/es/carousel/styles/light.js +2 -2
- package/es/cascader/src/Cascader.d.ts +6 -4
- package/es/cascader/src/Cascader.js +6 -6
- package/es/checkbox/src/Checkbox.js +1 -1
- package/es/code/src/Code.js +1 -1
- package/es/collapse/src/Collapse.js +1 -1
- package/es/collapse-transition/src/CollapseTransition.js +1 -1
- package/es/color-picker/src/ColorInputUnit.js +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +24 -17
- package/es/color-picker/src/ColorPicker.js +7 -4
- package/es/color-picker/src/ColorPickerTrigger.js +1 -1
- package/es/color-picker/src/context.d.ts +9 -0
- package/es/color-picker/src/context.js +2 -0
- package/es/color-picker/src/styles/index.cssr.js +1 -0
- package/es/components.d.ts +2 -1
- package/es/components.js +2 -1
- package/es/composables/use-theme-vars.js +1 -1
- package/es/config-provider/src/ConfigProvider.d.ts +15 -3
- package/es/config-provider/src/ConfigProvider.js +29 -3
- package/es/config-provider/src/context.d.ts +2 -0
- package/es/config-provider/src/context.js +2 -0
- package/es/config-provider/src/interface.d.ts +2 -1
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/data-table/src/DataTable.d.ts +1 -1
- package/es/data-table/src/DataTable.js +1 -1
- package/es/data-table/src/interface.d.ts +2 -2
- package/es/data-table/src/use-check.d.ts +2 -2
- package/es/data-table/src/use-group-header.d.ts +1 -1
- package/es/data-table/src/use-scroll.d.ts +1 -1
- package/es/data-table/src/use-scroll.js +3 -3
- package/es/data-table/src/use-sorter.d.ts +1 -1
- package/es/data-table/src/use-table-data.d.ts +1 -1
- package/es/data-table/src/utils.d.ts +2 -1
- package/es/data-table/src/utils.js +13 -3
- package/es/date-picker/src/DatePicker.d.ts +2 -1
- package/es/date-picker/src/DatePicker.js +6 -6
- package/es/descriptions/src/Descriptions.d.ts +2 -2
- package/es/descriptions/src/Descriptions.js +1 -1
- package/es/dialog/index.d.ts +3 -3
- package/es/dialog/index.js +2 -2
- package/es/dialog/src/Dialog.d.ts +28 -61
- package/es/dialog/src/Dialog.js +4 -31
- package/es/dialog/src/DialogEnvironment.d.ts +12 -13
- package/es/dialog/src/DialogEnvironment.js +3 -2
- package/es/dialog/src/DialogProvider.d.ts +4 -6
- package/es/dialog/src/DialogProvider.js +5 -6
- package/es/dialog/src/context.d.ts +3 -0
- package/es/dialog/src/context.js +3 -0
- package/es/dialog/src/dialogProps.d.ts +32 -0
- package/es/dialog/src/dialogProps.js +29 -0
- package/es/dialog/src/use-dialog.js +1 -1
- package/es/divider/src/Divider.js +1 -1
- package/es/drawer/index.d.ts +1 -0
- package/es/drawer/src/Drawer.js +1 -1
- package/es/dropdown/src/Dropdown.d.ts +17 -5
- package/es/dropdown/src/Dropdown.js +6 -5
- package/es/dropdown/src/DropdownGroup.js +1 -0
- package/es/dropdown/src/DropdownGroupHeader.js +1 -2
- package/es/dropdown/src/DropdownMenu.d.ts +0 -1
- package/es/dropdown/src/DropdownMenu.js +4 -4
- package/es/dropdown/src/DropdownOption.d.ts +3 -0
- package/es/dropdown/src/DropdownOption.js +4 -4
- package/es/dropdown/src/context.d.ts +6 -0
- package/es/dropdown/src/context.js +4 -0
- package/es/dropdown/src/interface.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +10 -1
- package/es/dynamic-input/src/DynamicInput.js +61 -18
- package/es/dynamic-tags/src/DynamicTags.d.ts +11 -20
- package/es/dynamic-tags/src/DynamicTags.js +14 -16
- package/es/element/src/Element.js +1 -1
- package/es/ellipsis/src/Ellipsis.js +1 -1
- package/es/empty/src/Empty.js +2 -2
- package/es/form/src/Form.d.ts +1 -1
- package/es/form/src/Form.js +2 -2
- package/es/form/src/FormItem.d.ts +5 -5
- package/es/form/src/FormItem.js +3 -2
- package/es/form/src/FormItemCol.d.ts +4 -4
- package/es/form/src/FormItemGridItem.d.ts +5 -5
- package/es/form/src/FormItemRow.d.ts +3 -3
- package/es/form/src/context.d.ts +3 -0
- package/es/form/src/context.js +3 -0
- package/es/form/src/interface.d.ts +4 -3
- package/es/form/src/interface.js +1 -3
- package/es/form/src/styles/form-item.cssr.js +6 -5
- package/es/form/src/utils.d.ts +1 -1
- package/es/form/src/utils.js +1 -1
- package/es/global-style/src/GlobalStyle.js +1 -1
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/gradient-text/src/GradientText.js +1 -1
- package/es/grid/src/Grid.d.ts +0 -1
- package/es/grid/src/Grid.js +2 -3
- package/es/grid/src/GridItem.js +1 -1
- package/es/grid/src/config.d.ts +3 -0
- package/es/grid/src/config.js +3 -0
- 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 +2 -2
- package/es/icon-wrapper/index.d.ts +1 -0
- package/es/icon-wrapper/index.js +1 -0
- package/es/icon-wrapper/src/IconWrapper.d.ts +50 -0
- package/es/icon-wrapper/src/IconWrapper.js +48 -0
- package/es/icon-wrapper/src/styles/index.cssr.d.ts +2 -0
- package/es/icon-wrapper/src/styles/index.cssr.js +16 -0
- package/es/icon-wrapper/styles/dark.d.ts +3 -0
- package/es/icon-wrapper/styles/dark.js +8 -0
- package/es/icon-wrapper/styles/index.d.ts +3 -0
- package/es/icon-wrapper/styles/index.js +2 -0
- package/es/icon-wrapper/styles/light.d.ts +10 -0
- package/es/icon-wrapper/styles/light.js +14 -0
- package/es/image/src/ImagePreview.js +1 -1
- package/es/input/src/Input.d.ts +7 -2
- package/es/input/src/Input.js +21 -17
- package/es/input/src/InputGroup.js +1 -1
- package/es/input/src/InputGroupLabel.js +1 -1
- package/es/input/src/WordCount.js +9 -8
- package/es/input/src/styles/input.cssr.js +5 -5
- package/es/input-number/src/InputNumber.d.ts +3 -2
- package/es/input-number/src/InputNumber.js +23 -21
- package/es/layout/src/Layout.js +1 -1
- package/es/layout/src/LayoutFooter.js +1 -1
- package/es/layout/src/LayoutHeader.js +1 -1
- package/es/layout/src/LayoutSider.js +1 -1
- package/es/legacy-grid/src/Col.js +0 -3
- package/es/legacy-grid/src/Row.js +1 -1
- package/es/list/src/List.js +1 -1
- package/es/loading-bar/src/LoadingBar.js +2 -2
- package/es/loading-bar/src/LoadingBarProvider.d.ts +3 -8
- package/es/loading-bar/src/LoadingBarProvider.js +1 -3
- package/es/loading-bar/src/context.d.ts +7 -0
- package/es/loading-bar/src/context.js +3 -0
- package/es/loading-bar/src/use-loading-bar.js +1 -1
- package/es/log/index.d.ts +1 -1
- package/es/log/src/Log.d.ts +17 -12
- package/es/log/src/Log.js +10 -17
- package/es/log/src/LogLine.js +1 -1
- package/es/log/src/context.d.ts +2 -0
- package/es/log/src/context.js +2 -0
- package/es/log/src/styles/index.cssr.js +2 -3
- package/es/mention/src/Mention.d.ts +17 -2
- package/es/mention/src/Mention.js +7 -3
- package/es/menu/src/Menu.d.ts +2 -4
- package/es/menu/src/Menu.js +3 -3
- package/es/menu/src/MenuDivider.js +1 -1
- package/es/menu/src/MenuOption.d.ts +1 -2
- package/es/menu/src/MenuOption.js +1 -1
- package/es/menu/src/MenuOptionContent.js +1 -1
- package/es/menu/src/MenuOptionGroup.d.ts +1 -4
- package/es/menu/src/MenuOptionGroup.js +4 -5
- package/es/menu/src/Submenu.d.ts +1 -4
- package/es/menu/src/Submenu.js +3 -4
- package/es/menu/src/context.d.ts +4 -0
- package/es/menu/src/context.js +4 -0
- package/es/menu/src/use-menu-child.js +1 -3
- package/es/menu/src/useCheckDeprecated.d.ts +1 -1
- package/es/menu/src/utils.d.ts +1 -1
- package/es/menu/src/utils.js +5 -3
- package/es/message/src/Message.d.ts +2 -158
- package/es/message/src/Message.js +2 -2
- package/es/message/src/MessageProvider.d.ts +4 -9
- package/es/message/src/MessageProvider.js +2 -3
- package/es/message/src/context.d.ts +7 -0
- package/es/message/src/context.js +3 -0
- package/es/message/src/types.d.ts +1 -1
- package/es/message/src/use-message.js +1 -1
- package/es/modal/src/BodyWrapper.d.ts +6 -4
- package/es/modal/src/BodyWrapper.js +2 -2
- package/es/modal/src/Modal.d.ts +8 -5
- package/es/modal/src/Modal.js +2 -2
- package/es/modal/src/presetProps.d.ts +3 -2
- package/es/modal/src/presetProps.js +1 -1
- package/es/notification/index.d.ts +1 -1
- package/es/notification/src/Notification.d.ts +5 -6
- package/es/notification/src/Notification.js +3 -5
- package/es/notification/src/NotificationContainer.d.ts +1 -2
- package/es/notification/src/NotificationContainer.js +2 -2
- package/es/notification/src/NotificationEnvironment.d.ts +7 -8
- package/es/notification/src/NotificationEnvironment.js +3 -3
- package/es/notification/src/NotificationProvider.d.ts +11 -7
- package/es/notification/src/NotificationProvider.js +6 -6
- package/es/notification/src/context.d.ts +2 -0
- package/es/notification/src/context.js +2 -0
- package/es/page-header/src/PageHeader.js +1 -1
- package/es/pagination/src/Pagination.js +1 -1
- package/es/popconfirm/src/Popconfirm.d.ts +21 -8
- package/es/popconfirm/src/Popconfirm.js +1 -1
- package/es/popover/index.d.ts +1 -0
- package/es/popover/src/Popover.d.ts +21 -4
- package/es/popover/src/Popover.js +9 -2
- package/es/popover/src/PopoverBody.d.ts +4 -0
- package/es/popover/src/PopoverBody.js +13 -11
- package/es/popover/src/styles/index.cssr.js +2 -2
- package/es/popselect/src/Popselect.d.ts +18 -5
- package/es/popselect/src/Popselect.js +5 -2
- package/es/popselect/src/PopselectPanel.d.ts +2 -2
- package/es/popselect/src/PopselectPanel.js +4 -1
- package/es/progress/src/Progress.d.ts +1 -1
- package/es/progress/src/Progress.js +1 -1
- package/es/radio/src/Radio.js +1 -1
- package/es/radio/src/RadioGroup.js +1 -1
- package/es/rate/src/Rate.js +1 -1
- package/es/result/src/Result.d.ts +4 -4
- package/es/result/src/Result.js +1 -1
- package/es/select/index.d.ts +2 -0
- package/es/select/src/Select.d.ts +27 -24
- package/es/select/src/Select.js +71 -41
- package/es/select/src/interface.d.ts +2 -0
- package/es/skeleton/src/Skeleton.js +1 -1
- package/es/slider/src/Slider.js +1 -1
- package/es/space/src/Space.js +1 -1
- package/es/spin/src/Spin.js +1 -1
- package/es/statistic/src/Statistic.js +1 -1
- package/es/steps/src/Steps.js +1 -1
- package/es/switch/src/Switch.js +1 -1
- package/es/table/src/Table.js +1 -1
- package/es/tabs/src/Tabs.d.ts +7 -4
- package/es/tabs/src/Tabs.js +12 -4
- package/es/tag/src/Tag.d.ts +4 -4
- package/es/tag/src/Tag.js +1 -1
- package/es/tag/src/common-props.d.ts +1 -1
- package/es/tag/src/styles/index.cssr.js +5 -17
- package/es/themes/dark.js +3 -0
- package/es/themes/light.js +3 -0
- package/es/themes/utils.d.ts +2 -1
- package/es/themes/utils.js +16 -4
- package/es/thing/src/Thing.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +7 -5
- package/es/time-picker/src/TimePicker.js +5 -5
- package/es/timeline/src/Timeline.js +1 -1
- package/es/timeline/src/TimelineItem.d.ts +4 -4
- package/es/tooltip/src/Tooltip.d.ts +20 -7
- package/es/tooltip/src/Tooltip.js +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/transfer/src/Transfer.js +1 -1
- package/es/tree/src/Tree.d.ts +6 -2
- package/es/tree/src/Tree.js +15 -8
- package/es/tree/src/TreeNode.d.ts +2 -0
- package/es/tree/src/TreeNode.js +37 -10
- package/es/tree/src/TreeNodeContent.d.ts +3 -1
- package/es/tree/src/TreeNodeContent.js +4 -3
- package/es/tree/src/interface.d.ts +5 -1
- package/es/tree-select/src/TreeSelect.d.ts +16 -14
- package/es/tree-select/src/TreeSelect.js +8 -5
- package/es/typography/src/a.js +1 -1
- package/es/typography/src/blockquote.js +1 -1
- package/es/typography/src/create-header.d.ts +4 -4
- package/es/typography/src/create-header.js +1 -1
- package/es/typography/src/headers.d.ts +18 -18
- package/es/typography/src/hr.js +1 -1
- package/es/typography/src/ol.js +1 -1
- package/es/typography/src/p.js +1 -1
- package/es/typography/src/text.js +1 -1
- package/es/typography/src/ul.js +1 -1
- package/es/upload/src/Upload.js +1 -1
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadProgress.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/Clear.js +3 -2
- package/lib/_internal/close/src/Close.js +1 -1
- package/lib/_internal/icon/src/Icon.js +1 -1
- package/lib/_internal/icons/ArrowUp.d.ts +2 -0
- package/lib/_internal/icons/ArrowUp.js +11 -0
- package/lib/_internal/icons/index.d.ts +1 -0
- package/lib/_internal/icons/index.js +3 -1
- package/lib/_internal/loading/src/Loading.js +1 -1
- package/lib/_internal/menu-mask/src/MenuMask.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.js +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +5 -5
- package/lib/_internal/select-menu/src/SelectMenu.js +31 -15
- package/lib/_internal/selection/src/Selection.d.ts +13 -5
- package/lib/_internal/selection/src/Selection.js +24 -15
- package/lib/_internal/selection/src/interface.d.ts +2 -2
- package/lib/_internal/selection/src/styles/index.cssr.js +15 -30
- package/lib/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/lib/_internal/wave/src/Wave.js +1 -1
- package/lib/_mixins/use-config.js +2 -2
- package/lib/_mixins/use-css-vars-class.d.ts +4 -2
- package/lib/_mixins/use-css-vars-class.js +25 -13
- package/lib/_mixins/use-form-item.d.ts +4 -0
- package/lib/_mixins/use-form-item.js +7 -0
- package/lib/_mixins/use-hljs.js +2 -2
- package/lib/_mixins/use-locale.js +2 -2
- package/lib/_mixins/use-style.js +1 -1
- package/lib/_mixins/use-theme.d.ts +1 -1
- package/lib/_mixins/use-theme.js +3 -3
- package/lib/_utils/cssr/index.d.ts +1 -2
- package/lib/_utils/cssr/index.js +1 -15
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +5 -1
- package/lib/_utils/vue/index.d.ts +1 -1
- package/lib/_utils/vue/index.js +4 -1
- package/lib/_utils/vue/resolve-slot.d.ts +8 -2
- package/lib/_utils/vue/resolve-slot.js +22 -2
- package/lib/affix/src/Affix.js +1 -1
- package/lib/alert/src/Alert.d.ts +4 -4
- package/lib/alert/src/Alert.js +1 -1
- package/lib/anchor/src/AnchorAdapter.js +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +17 -2
- package/lib/auto-complete/src/AutoComplete.js +9 -5
- package/lib/avatar/src/Avatar.js +3 -3
- package/lib/avatar/src/AvatarGroup.d.ts +0 -1
- package/lib/avatar/src/AvatarGroup.js +3 -5
- package/lib/avatar/src/context.d.ts +2 -0
- package/lib/avatar/src/context.js +5 -0
- package/lib/back-top/src/BackTop.js +1 -1
- package/lib/badge/src/Badge.d.ts +4 -4
- package/lib/badge/src/Badge.js +1 -1
- package/lib/breadcrumb/src/Breadcrumb.js +1 -1
- package/lib/button/src/Button.d.ts +4 -3
- package/lib/button/src/Button.js +264 -228
- package/lib/button/src/ButtonGroup.js +1 -1
- package/lib/button/src/styles/button.cssr.js +1 -0
- package/lib/calendar/src/Calendar.js +1 -1
- package/lib/card/src/Card.d.ts +5 -1
- package/lib/card/src/Card.js +3 -2
- package/lib/carousel/src/Carousel.js +4 -1
- package/lib/carousel/src/CarouselArrow.js +5 -8
- package/lib/carousel/src/styles/index.cssr.js +59 -48
- package/lib/carousel/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.d.ts +6 -4
- package/lib/cascader/src/Cascader.js +6 -6
- package/lib/checkbox/src/Checkbox.js +1 -1
- package/lib/code/src/Code.js +1 -1
- package/lib/collapse/src/Collapse.js +1 -1
- package/lib/collapse-transition/src/CollapseTransition.js +1 -1
- package/lib/color-picker/src/ColorInputUnit.js +2 -2
- package/lib/color-picker/src/ColorPicker.d.ts +24 -17
- package/lib/color-picker/src/ColorPicker.js +8 -5
- package/lib/color-picker/src/ColorPickerTrigger.js +2 -2
- package/lib/color-picker/src/context.d.ts +9 -0
- package/lib/color-picker/src/context.js +5 -0
- package/lib/color-picker/src/styles/index.cssr.js +1 -0
- package/lib/components.d.ts +2 -1
- package/lib/components.js +2 -1
- package/lib/composables/use-theme-vars.js +2 -2
- package/lib/config-provider/src/ConfigProvider.d.ts +15 -3
- package/lib/config-provider/src/ConfigProvider.js +31 -5
- package/lib/config-provider/src/context.d.ts +2 -0
- package/lib/config-provider/src/context.js +5 -0
- package/lib/config-provider/src/interface.d.ts +2 -1
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/data-table/src/DataTable.d.ts +1 -1
- package/lib/data-table/src/DataTable.js +1 -1
- package/lib/data-table/src/interface.d.ts +2 -2
- package/lib/data-table/src/use-check.d.ts +2 -2
- package/lib/data-table/src/use-group-header.d.ts +1 -1
- package/lib/data-table/src/use-scroll.d.ts +1 -1
- package/lib/data-table/src/use-scroll.js +2 -2
- package/lib/data-table/src/use-sorter.d.ts +1 -1
- package/lib/data-table/src/use-table-data.d.ts +1 -1
- package/lib/data-table/src/utils.d.ts +2 -1
- package/lib/data-table/src/utils.js +15 -4
- package/lib/date-picker/src/DatePicker.d.ts +2 -1
- package/lib/date-picker/src/DatePicker.js +6 -6
- package/lib/descriptions/src/Descriptions.d.ts +2 -2
- package/lib/descriptions/src/Descriptions.js +1 -1
- package/lib/dialog/index.d.ts +3 -3
- package/lib/dialog/index.js +2 -5
- package/lib/dialog/src/Dialog.d.ts +28 -61
- package/lib/dialog/src/Dialog.js +5 -32
- package/lib/dialog/src/DialogEnvironment.d.ts +12 -13
- package/lib/dialog/src/DialogEnvironment.js +6 -24
- package/lib/dialog/src/DialogProvider.d.ts +4 -6
- package/lib/dialog/src/DialogProvider.js +8 -12
- package/lib/dialog/src/context.d.ts +3 -0
- package/lib/dialog/src/context.js +6 -0
- package/lib/dialog/src/dialogProps.d.ts +32 -0
- package/lib/dialog/src/dialogProps.js +32 -0
- package/lib/dialog/src/use-dialog.js +2 -2
- package/lib/divider/src/Divider.js +1 -1
- package/lib/drawer/index.d.ts +1 -0
- package/lib/drawer/src/Drawer.js +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +17 -5
- package/lib/dropdown/src/Dropdown.js +6 -6
- package/lib/dropdown/src/DropdownGroup.js +1 -0
- package/lib/dropdown/src/DropdownGroupHeader.js +3 -4
- package/lib/dropdown/src/DropdownMenu.d.ts +0 -1
- package/lib/dropdown/src/DropdownMenu.js +6 -7
- package/lib/dropdown/src/DropdownOption.d.ts +3 -0
- package/lib/dropdown/src/DropdownOption.js +9 -25
- package/lib/dropdown/src/context.d.ts +6 -0
- package/lib/dropdown/src/context.js +7 -0
- package/lib/dropdown/src/interface.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +10 -1
- package/lib/dynamic-input/src/DynamicInput.js +59 -16
- package/lib/dynamic-tags/src/DynamicTags.d.ts +11 -20
- package/lib/dynamic-tags/src/DynamicTags.js +12 -14
- package/lib/element/src/Element.js +1 -1
- package/lib/ellipsis/src/Ellipsis.js +1 -1
- package/lib/empty/src/Empty.js +3 -3
- package/lib/form/src/Form.d.ts +1 -1
- package/lib/form/src/Form.js +4 -4
- package/lib/form/src/FormItem.d.ts +5 -5
- package/lib/form/src/FormItem.js +5 -4
- package/lib/form/src/FormItemCol.d.ts +4 -4
- package/lib/form/src/FormItemGridItem.d.ts +5 -5
- package/lib/form/src/FormItemRow.d.ts +3 -3
- package/lib/form/src/context.d.ts +3 -0
- package/lib/form/src/context.js +6 -0
- package/lib/form/src/interface.d.ts +4 -3
- package/lib/form/src/interface.js +0 -4
- package/lib/form/src/styles/form-item.cssr.js +3 -2
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/form/src/utils.js +4 -4
- package/lib/global-style/src/GlobalStyle.js +2 -2
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/gradient-text/src/GradientText.js +1 -1
- package/lib/grid/src/Grid.d.ts +0 -1
- package/lib/grid/src/Grid.js +4 -6
- package/lib/grid/src/GridItem.js +2 -2
- package/lib/grid/src/config.d.ts +3 -0
- package/lib/grid/src/config.js +6 -0
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +1 -4
- package/lib/icon/src/Icon.d.ts +1 -2
- package/lib/icon/src/Icon.js +3 -2
- package/lib/icon-wrapper/index.d.ts +1 -0
- package/lib/icon-wrapper/index.js +5 -0
- package/lib/icon-wrapper/src/IconWrapper.d.ts +50 -0
- package/lib/icon-wrapper/src/IconWrapper.js +54 -0
- package/lib/icon-wrapper/src/styles/index.cssr.d.ts +2 -0
- package/lib/icon-wrapper/src/styles/index.cssr.js +23 -0
- package/lib/icon-wrapper/styles/dark.d.ts +3 -0
- package/lib/icon-wrapper/styles/dark.js +10 -0
- package/lib/icon-wrapper/styles/index.d.ts +3 -0
- package/lib/icon-wrapper/styles/index.js +10 -0
- package/lib/icon-wrapper/styles/light.d.ts +10 -0
- package/lib/icon-wrapper/styles/light.js +18 -0
- package/lib/image/src/ImagePreview.js +1 -1
- package/lib/input/src/Input.d.ts +7 -2
- package/lib/input/src/Input.js +20 -16
- package/lib/input/src/InputGroup.js +1 -1
- package/lib/input/src/InputGroupLabel.js +1 -1
- package/lib/input/src/WordCount.js +9 -8
- package/lib/input/src/styles/input.cssr.js +4 -4
- package/lib/input-number/src/InputNumber.d.ts +3 -2
- package/lib/input-number/src/InputNumber.js +23 -21
- package/lib/layout/src/Layout.js +1 -1
- package/lib/layout/src/LayoutFooter.js +1 -1
- package/lib/layout/src/LayoutHeader.js +1 -1
- package/lib/layout/src/LayoutSider.js +1 -1
- package/lib/legacy-grid/src/Col.js +0 -6
- package/lib/legacy-grid/src/Row.js +1 -1
- package/lib/list/src/List.js +1 -1
- package/lib/loading-bar/src/LoadingBar.js +3 -3
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +3 -8
- package/lib/loading-bar/src/LoadingBarProvider.js +3 -6
- package/lib/loading-bar/src/context.d.ts +7 -0
- package/lib/loading-bar/src/context.js +6 -0
- package/lib/loading-bar/src/use-loading-bar.js +2 -2
- package/lib/log/index.d.ts +1 -1
- package/lib/log/src/Log.d.ts +17 -12
- package/lib/log/src/Log.js +10 -18
- package/lib/log/src/LogLine.js +2 -2
- package/lib/log/src/context.d.ts +2 -0
- package/lib/log/src/context.js +5 -0
- package/lib/log/src/styles/index.cssr.js +2 -3
- package/lib/mention/src/Mention.d.ts +17 -2
- package/lib/mention/src/Mention.js +7 -3
- package/lib/menu/src/Menu.d.ts +2 -4
- package/lib/menu/src/Menu.js +3 -4
- package/lib/menu/src/MenuDivider.js +2 -2
- package/lib/menu/src/MenuOption.d.ts +1 -2
- package/lib/menu/src/MenuOption.js +2 -2
- package/lib/menu/src/MenuOptionContent.js +2 -2
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -4
- package/lib/menu/src/MenuOptionGroup.js +7 -8
- package/lib/menu/src/Submenu.d.ts +1 -4
- package/lib/menu/src/Submenu.js +6 -7
- package/lib/menu/src/context.d.ts +4 -0
- package/lib/menu/src/context.js +7 -0
- package/lib/menu/src/use-menu-child.js +4 -6
- package/lib/menu/src/useCheckDeprecated.d.ts +1 -1
- package/lib/menu/src/utils.d.ts +1 -1
- package/lib/menu/src/utils.js +8 -25
- package/lib/message/src/Message.d.ts +2 -158
- package/lib/message/src/Message.js +3 -3
- package/lib/message/src/MessageProvider.d.ts +4 -9
- package/lib/message/src/MessageProvider.js +3 -5
- package/lib/message/src/context.d.ts +7 -0
- package/lib/message/src/context.js +6 -0
- package/lib/message/src/types.d.ts +1 -1
- package/lib/message/src/use-message.js +2 -2
- package/lib/modal/src/BodyWrapper.d.ts +6 -4
- package/lib/modal/src/BodyWrapper.js +3 -3
- package/lib/modal/src/Modal.d.ts +8 -5
- package/lib/modal/src/Modal.js +3 -3
- package/lib/modal/src/presetProps.d.ts +3 -2
- package/lib/modal/src/presetProps.js +2 -2
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/src/Notification.d.ts +5 -6
- package/lib/notification/src/Notification.js +5 -7
- package/lib/notification/src/NotificationContainer.d.ts +1 -2
- package/lib/notification/src/NotificationContainer.js +4 -3
- package/lib/notification/src/NotificationEnvironment.d.ts +7 -8
- package/lib/notification/src/NotificationEnvironment.js +4 -23
- package/lib/notification/src/NotificationProvider.d.ts +11 -7
- package/lib/notification/src/NotificationProvider.js +9 -9
- package/lib/notification/src/context.d.ts +2 -0
- package/lib/notification/src/context.js +5 -0
- package/lib/page-header/src/PageHeader.js +1 -1
- package/lib/pagination/src/Pagination.js +1 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +21 -8
- package/lib/popconfirm/src/Popconfirm.js +1 -1
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/src/Popover.d.ts +21 -4
- package/lib/popover/src/Popover.js +9 -2
- package/lib/popover/src/PopoverBody.d.ts +4 -0
- package/lib/popover/src/PopoverBody.js +11 -9
- package/lib/popover/src/styles/index.cssr.js +2 -2
- package/lib/popselect/src/Popselect.d.ts +18 -5
- package/lib/popselect/src/Popselect.js +5 -2
- package/lib/popselect/src/PopselectPanel.d.ts +2 -2
- package/lib/popselect/src/PopselectPanel.js +4 -1
- package/lib/progress/src/Progress.d.ts +1 -1
- package/lib/progress/src/Progress.js +1 -1
- package/lib/radio/src/Radio.js +1 -1
- package/lib/radio/src/RadioGroup.js +1 -1
- package/lib/rate/src/Rate.js +1 -1
- package/lib/result/src/Result.d.ts +4 -4
- package/lib/result/src/Result.js +1 -1
- package/lib/select/index.d.ts +2 -0
- package/lib/select/src/Select.d.ts +27 -24
- package/lib/select/src/Select.js +71 -41
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/skeleton/src/Skeleton.js +1 -1
- package/lib/slider/src/Slider.js +1 -1
- package/lib/space/src/Space.js +1 -1
- package/lib/spin/src/Spin.js +1 -1
- package/lib/statistic/src/Statistic.js +1 -1
- package/lib/steps/src/Steps.js +1 -1
- package/lib/switch/src/Switch.js +1 -1
- package/lib/table/src/Table.js +1 -1
- package/lib/tabs/src/Tabs.d.ts +7 -4
- package/lib/tabs/src/Tabs.js +12 -4
- package/lib/tag/src/Tag.d.ts +4 -4
- package/lib/tag/src/Tag.js +1 -1
- package/lib/tag/src/common-props.d.ts +1 -1
- package/lib/tag/src/styles/index.cssr.js +5 -17
- package/lib/themes/dark.js +87 -84
- package/lib/themes/light.js +87 -84
- package/lib/themes/utils.d.ts +2 -1
- package/lib/themes/utils.js +16 -4
- package/lib/thing/src/Thing.js +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +7 -5
- package/lib/time-picker/src/TimePicker.js +5 -5
- package/lib/timeline/src/Timeline.js +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +4 -4
- package/lib/tooltip/src/Tooltip.d.ts +20 -7
- package/lib/tooltip/src/Tooltip.js +1 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/transfer/src/Transfer.js +1 -1
- package/lib/tree/src/Tree.d.ts +6 -2
- package/lib/tree/src/Tree.js +15 -8
- package/lib/tree/src/TreeNode.d.ts +2 -0
- package/lib/tree/src/TreeNode.js +37 -10
- package/lib/tree/src/TreeNodeContent.d.ts +3 -1
- package/lib/tree/src/TreeNodeContent.js +4 -3
- package/lib/tree/src/interface.d.ts +5 -1
- package/lib/tree-select/src/TreeSelect.d.ts +16 -14
- package/lib/tree-select/src/TreeSelect.js +8 -5
- package/lib/typography/src/a.js +1 -1
- package/lib/typography/src/blockquote.js +1 -1
- package/lib/typography/src/create-header.d.ts +4 -4
- package/lib/typography/src/create-header.js +1 -1
- package/lib/typography/src/headers.d.ts +18 -18
- package/lib/typography/src/hr.js +1 -1
- package/lib/typography/src/ol.js +1 -1
- package/lib/typography/src/p.js +1 -1
- package/lib/typography/src/text.js +1 -1
- package/lib/typography/src/ul.js +1 -1
- package/lib/upload/src/Upload.js +1 -1
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadProgress.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +7 -8
- package/volar.d.ts +1 -0
- package/web-types.json +425 -220
|
@@ -11,7 +11,7 @@ export declare const exposedDialogEnvProps: {
|
|
|
11
11
|
readonly onMaskClick: PropType<(e: MouseEvent) => void>;
|
|
12
12
|
readonly icon: PropType<() => import("vue").VNodeChild>;
|
|
13
13
|
readonly type: {
|
|
14
|
-
readonly type: PropType<"default" | "
|
|
14
|
+
readonly type: PropType<"default" | "success" | "error" | "warning" | "info">;
|
|
15
15
|
readonly default: "default";
|
|
16
16
|
};
|
|
17
17
|
readonly title: PropType<string | (() => import("vue").VNodeChild)>;
|
|
@@ -31,7 +31,7 @@ export declare const exposedDialogEnvProps: {
|
|
|
31
31
|
readonly bordered: BooleanConstructor;
|
|
32
32
|
readonly iconPlacement: PropType<import("./interface").IconPlacement>;
|
|
33
33
|
};
|
|
34
|
-
declare const
|
|
34
|
+
export declare const NDialogEnvironment: import("vue").DefineComponent<{
|
|
35
35
|
internalKey: {
|
|
36
36
|
type: StringConstructor;
|
|
37
37
|
required: true;
|
|
@@ -46,13 +46,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
46
|
readonly type: BooleanConstructor;
|
|
47
47
|
readonly default: true;
|
|
48
48
|
};
|
|
49
|
-
onPositiveClick: PropType<(e: MouseEvent) => unknown>;
|
|
50
|
-
onNegativeClick: PropType<(e: MouseEvent) => unknown>;
|
|
51
|
-
onClose: PropType<() => unknown>;
|
|
49
|
+
onPositiveClick: PropType<(e: MouseEvent) => Promise<unknown> | unknown>;
|
|
50
|
+
onNegativeClick: PropType<(e: MouseEvent) => Promise<unknown> | unknown>;
|
|
51
|
+
onClose: PropType<() => Promise<unknown> | unknown>;
|
|
52
52
|
onMaskClick: PropType<(e: MouseEvent) => void>;
|
|
53
53
|
icon: PropType<() => import("vue").VNodeChild>;
|
|
54
54
|
type: {
|
|
55
|
-
readonly type: PropType<"default" | "
|
|
55
|
+
readonly type: PropType<"default" | "success" | "error" | "warning" | "info">;
|
|
56
56
|
readonly default: "default";
|
|
57
57
|
};
|
|
58
58
|
title: PropType<string | (() => import("vue").VNodeChild)>;
|
|
@@ -95,13 +95,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
95
|
readonly type: BooleanConstructor;
|
|
96
96
|
readonly default: true;
|
|
97
97
|
};
|
|
98
|
-
onPositiveClick: PropType<(e: MouseEvent) => unknown>;
|
|
99
|
-
onNegativeClick: PropType<(e: MouseEvent) => unknown>;
|
|
100
|
-
onClose: PropType<() => unknown>;
|
|
98
|
+
onPositiveClick: PropType<(e: MouseEvent) => Promise<unknown> | unknown>;
|
|
99
|
+
onNegativeClick: PropType<(e: MouseEvent) => Promise<unknown> | unknown>;
|
|
100
|
+
onClose: PropType<() => Promise<unknown> | unknown>;
|
|
101
101
|
onMaskClick: PropType<(e: MouseEvent) => void>;
|
|
102
102
|
icon: PropType<() => import("vue").VNodeChild>;
|
|
103
103
|
type: {
|
|
104
|
-
readonly type: PropType<"default" | "
|
|
104
|
+
readonly type: PropType<"default" | "success" | "error" | "warning" | "info">;
|
|
105
105
|
readonly default: "default";
|
|
106
106
|
};
|
|
107
107
|
title: PropType<string | (() => import("vue").VNodeChild)>;
|
|
@@ -121,11 +121,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
121
121
|
bordered: BooleanConstructor;
|
|
122
122
|
iconPlacement: PropType<import("./interface").IconPlacement>;
|
|
123
123
|
}>>, {
|
|
124
|
-
type: "default" | "
|
|
124
|
+
type: "default" | "success" | "error" | "warning" | "info";
|
|
125
|
+
bordered: boolean;
|
|
125
126
|
loading: boolean;
|
|
126
127
|
showIcon: boolean;
|
|
127
|
-
bordered: boolean;
|
|
128
128
|
closable: boolean;
|
|
129
129
|
maskClosable: boolean;
|
|
130
130
|
}>;
|
|
131
|
-
export default _default;
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
import { h, defineComponent, ref } from 'vue';
|
|
4
4
|
import NModal from '../../modal/src/Modal';
|
|
5
5
|
import { keep } from '../../_utils';
|
|
6
|
-
import
|
|
6
|
+
import { NDialog } from './Dialog';
|
|
7
|
+
import { dialogProps, dialogPropKeys } from './dialogProps';
|
|
7
8
|
export const exposedDialogEnvProps = Object.assign(Object.assign({}, dialogProps), { internalStyle: [String, Object], maskClosable: {
|
|
8
9
|
type: Boolean,
|
|
9
10
|
default: true
|
|
10
11
|
}, onPositiveClick: Function, onNegativeClick: Function, onClose: Function, onMaskClick: Function });
|
|
11
|
-
export
|
|
12
|
+
export const NDialogEnvironment = defineComponent({
|
|
12
13
|
name: 'DialogEnvironment',
|
|
13
14
|
props: Object.assign(Object.assign({}, exposedDialogEnvProps), { internalKey: {
|
|
14
15
|
type: String,
|
|
@@ -16,7 +16,6 @@ export interface DialogApiInjection {
|
|
|
16
16
|
error: (options: DialogOptions) => DialogReactive;
|
|
17
17
|
info: (options: DialogOptions) => DialogReactive;
|
|
18
18
|
}
|
|
19
|
-
export declare const dialogApiInjectionKey: import("vue").InjectionKey<DialogApiInjection>;
|
|
20
19
|
export interface DialogProviderInjection {
|
|
21
20
|
clickedRef: Ref<boolean>;
|
|
22
21
|
clickPositionRef: Ref<{
|
|
@@ -24,7 +23,6 @@ export interface DialogProviderInjection {
|
|
|
24
23
|
y: number;
|
|
25
24
|
} | null>;
|
|
26
25
|
}
|
|
27
|
-
export declare const dialogProviderInjectionKey: import("vue").InjectionKey<DialogProviderInjection>;
|
|
28
26
|
interface DialogInst {
|
|
29
27
|
hide: () => void;
|
|
30
28
|
}
|
|
@@ -34,23 +32,23 @@ declare const dialogProviderProps: {
|
|
|
34
32
|
to: PropType<string | HTMLElement>;
|
|
35
33
|
};
|
|
36
34
|
export declare type DialogProviderProps = ExtractPublicPropTypes<typeof dialogProviderProps>;
|
|
37
|
-
declare const
|
|
35
|
+
export declare const NDialogProvider: import("vue").DefineComponent<{
|
|
38
36
|
injectionKey: StringConstructor;
|
|
39
37
|
to: PropType<string | HTMLElement>;
|
|
40
38
|
}, {
|
|
41
39
|
dialogList: Ref<{
|
|
42
40
|
readonly key: string;
|
|
43
41
|
readonly destroy: () => void;
|
|
44
|
-
type?: "default" | "
|
|
42
|
+
type?: "default" | "success" | "error" | "warning" | "info" | undefined;
|
|
45
43
|
content?: string | (() => import("vue").VNodeChild) | undefined;
|
|
46
44
|
icon?: (() => import("vue").VNodeChild) | undefined;
|
|
47
45
|
title?: string | (() => import("vue").VNodeChild) | undefined;
|
|
48
46
|
action?: (() => import("vue").VNodeChild) | undefined;
|
|
47
|
+
bordered?: boolean | undefined;
|
|
49
48
|
positiveText?: string | undefined;
|
|
50
49
|
negativeText?: string | undefined;
|
|
51
50
|
loading?: boolean | undefined;
|
|
52
51
|
showIcon?: boolean | undefined;
|
|
53
|
-
bordered?: boolean | undefined;
|
|
54
52
|
onClose?: (() => unknown) | undefined;
|
|
55
53
|
closable?: boolean | undefined;
|
|
56
54
|
iconPlacement?: import("./interface").IconPlacement | undefined;
|
|
@@ -72,4 +70,4 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
70
|
injectionKey: StringConstructor;
|
|
73
71
|
to: PropType<string | HTMLElement>;
|
|
74
72
|
}>>, {}>;
|
|
75
|
-
export
|
|
73
|
+
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { defineComponent, Fragment, ref, h, provide, reactive } from 'vue';
|
|
2
2
|
import { createId } from 'seemly';
|
|
3
|
-
import { createInjectionKey, omit } from '../../_utils';
|
|
4
|
-
import DialogEnvironment from './DialogEnvironment';
|
|
5
3
|
import { useClicked, useClickPosition } from 'vooks';
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { omit } from '../../_utils';
|
|
5
|
+
import { NDialogEnvironment } from './DialogEnvironment';
|
|
6
|
+
import { dialogApiInjectionKey, dialogProviderInjectionKey } from './context';
|
|
8
7
|
const dialogProviderProps = {
|
|
9
8
|
injectionKey: String,
|
|
10
9
|
to: [String, Object]
|
|
11
10
|
};
|
|
12
|
-
export
|
|
11
|
+
export const NDialogProvider = defineComponent({
|
|
13
12
|
name: 'DialogProvider',
|
|
14
13
|
props: dialogProviderProps,
|
|
15
14
|
setup() {
|
|
@@ -52,7 +51,7 @@ export default defineComponent({
|
|
|
52
51
|
render() {
|
|
53
52
|
var _a, _b;
|
|
54
53
|
return h(Fragment, null, [
|
|
55
|
-
this.dialogList.map((dialog) => h(
|
|
54
|
+
this.dialogList.map((dialog) => h(NDialogEnvironment, omit(dialog, ['destroy', 'style'], {
|
|
56
55
|
internalStyle: dialog.style,
|
|
57
56
|
to: this.to,
|
|
58
57
|
ref: ((inst) => {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DialogApiInjection, DialogProviderInjection } from './DialogProvider';
|
|
2
|
+
export declare const dialogProviderInjectionKey: import("vue").InjectionKey<DialogProviderInjection>;
|
|
3
|
+
export declare const dialogApiInjectionKey: import("vue").InjectionKey<DialogApiInjection>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PropType, VNodeChild } from 'vue';
|
|
2
|
+
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
import type { IconPlacement } from './interface';
|
|
4
|
+
declare const dialogProps: {
|
|
5
|
+
readonly icon: PropType<() => VNodeChild>;
|
|
6
|
+
readonly type: {
|
|
7
|
+
readonly type: PropType<"default" | "success" | "error" | "warning" | "info">;
|
|
8
|
+
readonly default: "default";
|
|
9
|
+
};
|
|
10
|
+
readonly title: PropType<string | (() => VNodeChild)>;
|
|
11
|
+
readonly closable: {
|
|
12
|
+
readonly type: BooleanConstructor;
|
|
13
|
+
readonly default: true;
|
|
14
|
+
};
|
|
15
|
+
readonly negativeText: StringConstructor;
|
|
16
|
+
readonly positiveText: StringConstructor;
|
|
17
|
+
readonly content: PropType<string | (() => VNodeChild)>;
|
|
18
|
+
readonly action: PropType<() => VNodeChild>;
|
|
19
|
+
readonly showIcon: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
23
|
+
readonly loading: BooleanConstructor;
|
|
24
|
+
readonly bordered: BooleanConstructor;
|
|
25
|
+
readonly iconPlacement: PropType<IconPlacement>;
|
|
26
|
+
readonly onPositiveClick: PropType<(e: MouseEvent) => void>;
|
|
27
|
+
readonly onNegativeClick: PropType<(e: MouseEvent) => void>;
|
|
28
|
+
readonly onClose: PropType<() => void>;
|
|
29
|
+
};
|
|
30
|
+
export declare type DialogProps = ExtractPublicPropTypes<typeof dialogProps>;
|
|
31
|
+
export { dialogProps };
|
|
32
|
+
export declare const dialogPropKeys: ("type" | "content" | "icon" | "title" | "action" | "bordered" | "positiveText" | "negativeText" | "loading" | "showIcon" | "onClose" | "closable" | "iconPlacement" | "onPositiveClick" | "onNegativeClick")[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { keysOf } from '../../_utils';
|
|
2
|
+
const dialogProps = {
|
|
3
|
+
icon: Function,
|
|
4
|
+
type: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: 'default'
|
|
7
|
+
},
|
|
8
|
+
title: [String, Function],
|
|
9
|
+
closable: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: true
|
|
12
|
+
},
|
|
13
|
+
negativeText: String,
|
|
14
|
+
positiveText: String,
|
|
15
|
+
content: [String, Function],
|
|
16
|
+
action: Function,
|
|
17
|
+
showIcon: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: true
|
|
20
|
+
},
|
|
21
|
+
loading: Boolean,
|
|
22
|
+
bordered: Boolean,
|
|
23
|
+
iconPlacement: String,
|
|
24
|
+
onPositiveClick: Function,
|
|
25
|
+
onNegativeClick: Function,
|
|
26
|
+
onClose: Function
|
|
27
|
+
};
|
|
28
|
+
export { dialogProps };
|
|
29
|
+
export const dialogPropKeys = keysOf(dialogProps);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject } from 'vue';
|
|
2
|
-
import { dialogApiInjectionKey } from './
|
|
2
|
+
import { dialogApiInjectionKey } from './context';
|
|
3
3
|
import { throwError } from '../../_utils';
|
|
4
4
|
export function useDialog() {
|
|
5
5
|
const dialog = inject(dialogApiInjectionKey, null);
|
|
@@ -11,7 +11,7 @@ export default defineComponent({
|
|
|
11
11
|
props: dividerProps,
|
|
12
12
|
setup(props) {
|
|
13
13
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
14
|
-
const themeRef = useTheme('Divider', '
|
|
14
|
+
const themeRef = useTheme('Divider', '-divider', style, dividerLight, props, mergedClsPrefixRef);
|
|
15
15
|
return {
|
|
16
16
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
17
17
|
cssVars: computed(() => {
|
package/es/drawer/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { default as NDrawer } from './src/Drawer';
|
|
|
2
2
|
export type { DrawerProps } from './src/Drawer';
|
|
3
3
|
export { default as NDrawerContent } from './src/DrawerContent';
|
|
4
4
|
export type { DrawerContentProps } from './src/DrawerContent';
|
|
5
|
+
export type { Placement as DrawerPlacement } from './src/DrawerBodyWrapper';
|
package/es/drawer/src/Drawer.js
CHANGED
|
@@ -64,7 +64,7 @@ export default defineComponent({
|
|
|
64
64
|
}
|
|
65
65
|
const { mergedClsPrefixRef, namespaceRef } = useConfig(props);
|
|
66
66
|
const isMountedRef = useIsMounted();
|
|
67
|
-
const themeRef = useTheme('Drawer', '
|
|
67
|
+
const themeRef = useTheme('Drawer', '-drawer', style, drawerLight, props, mergedClsPrefixRef);
|
|
68
68
|
const styleWidthRef = computed(() => {
|
|
69
69
|
const { placement } = props;
|
|
70
70
|
if (placement === 'top' || placement === 'bottom')
|
|
@@ -18,7 +18,6 @@ export interface DropdownInjection {
|
|
|
18
18
|
doSelect: OnUpdateValueImpl;
|
|
19
19
|
doUpdateShow: (value: boolean) => void;
|
|
20
20
|
}
|
|
21
|
-
export declare const dropdownInjectionKey: import("vue").InjectionKey<DropdownInjection>;
|
|
22
21
|
declare const dropdownProps: {
|
|
23
22
|
readonly theme: PropType<import("../../_mixins").Theme<"Dropdown", {
|
|
24
23
|
optionHeightSmall: string;
|
|
@@ -304,11 +303,15 @@ declare const dropdownProps: {
|
|
|
304
303
|
default: undefined;
|
|
305
304
|
};
|
|
306
305
|
readonly overlap: BooleanConstructor;
|
|
306
|
+
readonly keepAliveOnHover: {
|
|
307
|
+
type: BooleanConstructor;
|
|
308
|
+
default: boolean;
|
|
309
|
+
};
|
|
310
|
+
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
307
311
|
readonly internalExtraClass: {
|
|
308
312
|
type: PropType<string[]>;
|
|
309
313
|
default: () => never[];
|
|
310
314
|
};
|
|
311
|
-
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
312
315
|
readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
|
|
313
316
|
readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
|
|
314
317
|
readonly zIndex: NumberConstructor;
|
|
@@ -617,11 +620,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
617
620
|
default: undefined;
|
|
618
621
|
};
|
|
619
622
|
readonly overlap: BooleanConstructor;
|
|
623
|
+
readonly keepAliveOnHover: {
|
|
624
|
+
type: BooleanConstructor;
|
|
625
|
+
default: boolean;
|
|
626
|
+
};
|
|
627
|
+
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
620
628
|
readonly internalExtraClass: {
|
|
621
629
|
type: PropType<string[]>;
|
|
622
630
|
default: () => never[];
|
|
623
631
|
};
|
|
624
|
-
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
625
632
|
readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
|
|
626
633
|
readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
|
|
627
634
|
readonly zIndex: NumberConstructor;
|
|
@@ -1117,11 +1124,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1117
1124
|
default: undefined;
|
|
1118
1125
|
};
|
|
1119
1126
|
readonly overlap: BooleanConstructor;
|
|
1127
|
+
readonly keepAliveOnHover: {
|
|
1128
|
+
type: BooleanConstructor;
|
|
1129
|
+
default: boolean;
|
|
1130
|
+
};
|
|
1131
|
+
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
1120
1132
|
readonly internalExtraClass: {
|
|
1121
1133
|
type: PropType<string[]>;
|
|
1122
1134
|
default: () => never[];
|
|
1123
1135
|
};
|
|
1124
|
-
readonly onClickoutside: PropType<(e: MouseEvent) => void>;
|
|
1125
1136
|
readonly 'onUpdate:show': PropType<MaybeArray<(value: boolean) => void>>;
|
|
1126
1137
|
readonly onUpdateShow: PropType<MaybeArray<(value: boolean) => void>>;
|
|
1127
1138
|
readonly zIndex: NumberConstructor;
|
|
@@ -1151,6 +1162,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1151
1162
|
disabled: boolean;
|
|
1152
1163
|
duration: number;
|
|
1153
1164
|
to: string | boolean | HTMLElement;
|
|
1165
|
+
options: DropdownMixedOption[];
|
|
1154
1166
|
raw: boolean;
|
|
1155
1167
|
placement: FollowerPlacement;
|
|
1156
1168
|
overlap: boolean;
|
|
@@ -1159,6 +1171,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1159
1171
|
showArrow: boolean;
|
|
1160
1172
|
delay: number;
|
|
1161
1173
|
displayDirective: "show" | "if";
|
|
1174
|
+
keepAliveOnHover: boolean;
|
|
1162
1175
|
internalTrapFocus: boolean;
|
|
1163
1176
|
animated: boolean;
|
|
1164
1177
|
defaultShow: boolean;
|
|
@@ -1166,7 +1179,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1166
1179
|
internalSyncTargetWithParent: boolean;
|
|
1167
1180
|
internalInheritedEventHandlers: import("../../popover/src/Popover").TriggerEventHandlers[];
|
|
1168
1181
|
arrow: boolean | undefined;
|
|
1169
|
-
options: DropdownMixedOption[];
|
|
1170
1182
|
labelField: string;
|
|
1171
1183
|
keyboard: boolean;
|
|
1172
1184
|
inverted: boolean;
|
|
@@ -4,11 +4,11 @@ import { useMergedState, useKeyboard, useMemo } from 'vooks';
|
|
|
4
4
|
import { popoverBaseProps } from '../../popover/src/Popover';
|
|
5
5
|
import { useConfig, useTheme } from '../../_mixins';
|
|
6
6
|
import { NPopover } from '../../popover';
|
|
7
|
-
import { keep, call, createKey, createRefSetter
|
|
7
|
+
import { keep, call, createKey, createRefSetter } from '../../_utils';
|
|
8
8
|
import { dropdownLight } from '../styles';
|
|
9
9
|
import NDropdownMenu from './DropdownMenu';
|
|
10
10
|
import style from './styles/index.cssr';
|
|
11
|
-
|
|
11
|
+
import { dropdownInjectionKey } from './context';
|
|
12
12
|
const dropdownBaseProps = {
|
|
13
13
|
animated: {
|
|
14
14
|
type: Boolean,
|
|
@@ -116,7 +116,7 @@ export default defineComponent({
|
|
|
116
116
|
}
|
|
117
117
|
}, keyboardEnabledRef);
|
|
118
118
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
119
|
-
const themeRef = useTheme('Dropdown', '
|
|
119
|
+
const themeRef = useTheme('Dropdown', '-dropdown', style, dropdownLight, props, mergedClsPrefixRef);
|
|
120
120
|
provide(dropdownInjectionKey, {
|
|
121
121
|
labelFieldRef: toRef(props, 'labelField'),
|
|
122
122
|
childrenFieldRef: toRef(props, 'childrenField'),
|
|
@@ -290,6 +290,8 @@ export default defineComponent({
|
|
|
290
290
|
class: [
|
|
291
291
|
className,
|
|
292
292
|
`${mergedClsPrefix}-dropdown`,
|
|
293
|
+
this.trigger === 'manual' &&
|
|
294
|
+
`${mergedClsPrefix}-popover--manual-trigger`,
|
|
293
295
|
this.showArrow && `${mergedClsPrefix}-popover--show-arrow`
|
|
294
296
|
],
|
|
295
297
|
clsPrefix: mergedClsPrefix,
|
|
@@ -311,8 +313,7 @@ export default defineComponent({
|
|
|
311
313
|
onUpdateShow: this.doUpdateShow
|
|
312
314
|
};
|
|
313
315
|
return (h(NPopover, Object.assign({}, keep(this.$props, popoverPropKeys), popoverProps), {
|
|
314
|
-
trigger: this.$slots.default
|
|
315
|
-
_: 1
|
|
316
|
+
trigger: () => { var _a, _b; return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a); }
|
|
316
317
|
}));
|
|
317
318
|
}
|
|
318
319
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, Fragment, h } from 'vue';
|
|
2
2
|
import { warn } from '../../_utils';
|
|
3
|
+
// eslint-disable-next-line import/no-cycle
|
|
3
4
|
import NDropdownOption from './DropdownOption';
|
|
4
5
|
import NDropdownDivider from './DropdownDivider';
|
|
5
6
|
import NDropdownGroupHeader from './DropdownGroupHeader';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, inject } from 'vue';
|
|
2
2
|
import { render } from '../../_utils';
|
|
3
|
-
import { dropdownInjectionKey } from './
|
|
4
|
-
import { dropdownMenuInjectionKey } from './DropdownMenu';
|
|
3
|
+
import { dropdownInjectionKey, dropdownMenuInjectionKey } from './context';
|
|
5
4
|
export default defineComponent({
|
|
6
5
|
name: 'DropdownGroupHeader',
|
|
7
6
|
props: {
|
|
@@ -4,7 +4,6 @@ export interface NDropdownMenuInjection {
|
|
|
4
4
|
showIconRef: Ref<boolean>;
|
|
5
5
|
hasSubmenuRef: Ref<boolean>;
|
|
6
6
|
}
|
|
7
|
-
export declare const dropdownMenuInjectionKey: import("vue").InjectionKey<NDropdownMenuInjection>;
|
|
8
7
|
declare const _default: import("vue").DefineComponent<{
|
|
9
8
|
showArrow: BooleanConstructor;
|
|
10
9
|
arrowStyle: PropType<string | CSSProperties>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed, defineComponent, h, inject, provide } from 'vue';
|
|
2
2
|
import { renderArrow } from '../../popover/src/PopoverBody';
|
|
3
|
-
import NDropdownOption from './DropdownOption';
|
|
4
3
|
import NDropdownDivider from './DropdownDivider';
|
|
4
|
+
// eslint-disable-next-line import/no-cycle
|
|
5
5
|
import NDropdownGroup from './DropdownGroup';
|
|
6
|
+
// eslint-disable-next-line import/no-cycle
|
|
7
|
+
import NDropdownOption from './DropdownOption';
|
|
6
8
|
import NDropdownRenderOption from './DropdownRenderOption';
|
|
7
9
|
import { isSubmenuNode, isGroupNode, isDividerNode, isRenderNode } from './utils';
|
|
8
|
-
import { dropdownInjectionKey } from './
|
|
9
|
-
import { createInjectionKey } from '../../_utils';
|
|
10
|
-
export const dropdownMenuInjectionKey = createInjectionKey('n-dropdown-menu');
|
|
10
|
+
import { dropdownInjectionKey, dropdownMenuInjectionKey } from './context';
|
|
11
11
|
export default defineComponent({
|
|
12
12
|
name: 'DropdownMenu',
|
|
13
13
|
props: {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { PropType, Ref, HTMLAttributes } from 'vue';
|
|
2
2
|
import { FollowerPlacement } from 'vueuc';
|
|
3
3
|
import { TreeNode } from 'treemate';
|
|
4
|
+
export interface NDropdownOptionInjection {
|
|
5
|
+
enteringSubmenuRef: Ref<boolean>;
|
|
6
|
+
}
|
|
4
7
|
declare const _default: import("vue").DefineComponent<{
|
|
5
8
|
clsPrefix: {
|
|
6
9
|
type: StringConstructor;
|
|
@@ -2,13 +2,13 @@ import { h, computed, inject, ref, Transition, defineComponent, provide, mergePr
|
|
|
2
2
|
import { VBinder, VTarget, VFollower } from 'vueuc';
|
|
3
3
|
import { useMemo } from 'vooks';
|
|
4
4
|
import { ChevronRightIcon } from '../../_internal/icons';
|
|
5
|
-
import {
|
|
5
|
+
import { render, useDeferredTrue } from '../../_utils';
|
|
6
6
|
import { NIcon } from '../../icon';
|
|
7
|
-
|
|
8
|
-
import
|
|
7
|
+
// eslint-disable-next-line import/no-cycle
|
|
8
|
+
import NDropdownMenu from './DropdownMenu';
|
|
9
|
+
import { dropdownMenuInjectionKey, dropdownInjectionKey, dropdownOptionInjectionKey } from './context';
|
|
9
10
|
import { isSubmenuNode } from './utils';
|
|
10
11
|
import { happensIn } from 'seemly';
|
|
11
|
-
const dropdownOptionInjectionKey = createInjectionKey('n-dropdown-option');
|
|
12
12
|
export default defineComponent({
|
|
13
13
|
name: 'DropdownOption',
|
|
14
14
|
props: {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DropdownInjection } from './Dropdown';
|
|
2
|
+
import type { NDropdownMenuInjection } from './DropdownMenu';
|
|
3
|
+
import type { NDropdownOptionInjection } from './DropdownOption';
|
|
4
|
+
export declare const dropdownMenuInjectionKey: import("vue").InjectionKey<NDropdownMenuInjection>;
|
|
5
|
+
export declare const dropdownInjectionKey: import("vue").InjectionKey<DropdownInjection>;
|
|
6
|
+
export declare const dropdownOptionInjectionKey: import("vue").InjectionKey<NDropdownOptionInjection>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createInjectionKey } from '../../_utils';
|
|
2
|
+
export const dropdownMenuInjectionKey = createInjectionKey('n-dropdown-menu');
|
|
3
|
+
export const dropdownInjectionKey = createInjectionKey('n-dropdown');
|
|
4
|
+
export const dropdownOptionInjectionKey = createInjectionKey('n-dropdown-option');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreeNode } from 'treemate';
|
|
2
2
|
import { VNodeChild } from 'vue';
|
|
3
|
-
import { MenuOption, MenuGroupOption, MenuDividerOption, MenuIgnoredOption, MenuRenderOption } from '../../menu/src/interface';
|
|
3
|
+
import type { MenuOption, MenuGroupOption, MenuDividerOption, MenuIgnoredOption, MenuRenderOption } from '../../menu/src/interface';
|
|
4
4
|
export declare type Key = string | number;
|
|
5
5
|
export declare type DropdownOption = MenuOption;
|
|
6
6
|
export declare type DropdownGroupOption = MenuGroupOption;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType, CSSProperties } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import type { ButtonProps } from '../../button';
|
|
3
|
+
import type { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
3
4
|
import type { OnUpdateValue } from './interface';
|
|
4
5
|
declare const dynamicInputProps: {
|
|
5
6
|
readonly max: NumberConstructor;
|
|
@@ -30,6 +31,8 @@ declare const dynamicInputProps: {
|
|
|
30
31
|
readonly type: StringConstructor;
|
|
31
32
|
readonly default: "";
|
|
32
33
|
};
|
|
34
|
+
readonly showSortButton: BooleanConstructor;
|
|
35
|
+
readonly createButtonProps: PropType<ButtonProps>;
|
|
33
36
|
readonly onCreate: PropType<(index: number) => any>;
|
|
34
37
|
readonly onRemove: PropType<(index: number) => void>;
|
|
35
38
|
readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
@@ -871,6 +874,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
871
874
|
readonly type: StringConstructor;
|
|
872
875
|
readonly default: "";
|
|
873
876
|
};
|
|
877
|
+
readonly showSortButton: BooleanConstructor;
|
|
878
|
+
readonly createButtonProps: PropType<ButtonProps>;
|
|
874
879
|
readonly onCreate: PropType<(index: number) => any>;
|
|
875
880
|
readonly onRemove: PropType<(index: number) => void>;
|
|
876
881
|
readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
@@ -1696,6 +1701,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1696
1701
|
ensureKey: (value: any, index: number) => string | number;
|
|
1697
1702
|
handleValueChange: (index: number, value: any) => void;
|
|
1698
1703
|
remove: (index: number) => void;
|
|
1704
|
+
move: (type: 'up' | 'down', index: number) => void;
|
|
1699
1705
|
createItem: (index: number) => void;
|
|
1700
1706
|
mergedTheme: import("vue").ComputedRef<{
|
|
1701
1707
|
common: {
|
|
@@ -2115,6 +2121,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2115
2121
|
readonly type: StringConstructor;
|
|
2116
2122
|
readonly default: "";
|
|
2117
2123
|
};
|
|
2124
|
+
readonly showSortButton: BooleanConstructor;
|
|
2125
|
+
readonly createButtonProps: PropType<ButtonProps>;
|
|
2118
2126
|
readonly onCreate: PropType<(index: number) => any>;
|
|
2119
2127
|
readonly onRemove: PropType<(index: number) => void>;
|
|
2120
2128
|
readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
@@ -2932,5 +2940,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2932
2940
|
preset: "input" | "pair";
|
|
2933
2941
|
keyPlaceholder: string;
|
|
2934
2942
|
valuePlaceholder: string;
|
|
2943
|
+
showSortButton: boolean;
|
|
2935
2944
|
}>;
|
|
2936
2945
|
export default _default;
|