naive-ui 2.24.6 → 2.25.2
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 +11 -6
- package/es/_internal/select-menu/src/SelectMenu.js +49 -24
- package/es/_internal/selection/src/Selection.d.ts +42 -29
- package/es/_internal/selection/src/Selection.js +100 -93
- package/es/_internal/selection/src/interface.d.ts +2 -2
- package/es/_internal/selection/src/styles/index.cssr.js +16 -31
- package/es/_internal/selection/styles/dark.js +3 -3
- package/es/_internal/selection/styles/light.d.ts +6 -6
- package/es/_internal/selection/styles/light.js +3 -3
- package/es/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/es/_internal/wave/src/Wave.js +1 -1
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-config.js +1 -1
- package/es/_mixins/use-css-vars-class.d.ts +11 -2
- package/es/_mixins/use-css-vars-class.js +49 -18
- 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/css/color-to-class.d.ts +1 -0
- package/es/_utils/css/color-to-class.js +3 -0
- package/es/_utils/css/format-length.d.ts +2 -2
- package/es/_utils/css/format-length.js +1 -2
- package/es/_utils/css/index.d.ts +2 -1
- package/es/_utils/css/index.js +2 -1
- package/es/_utils/cssr/index.d.ts +1 -2
- package/es/_utils/cssr/index.js +1 -14
- package/es/_utils/index.d.ts +2 -2
- package/es/_utils/index.js +2 -2
- 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 +17 -1
- package/es/affix/src/Affix.js +1 -1
- package/es/alert/src/Alert.js +1 -1
- package/es/anchor/src/AnchorAdapter.js +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +16 -1
- 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.js +1 -1
- package/es/breadcrumb/src/Breadcrumb.js +1 -1
- package/es/button/src/Button.d.ts +4 -2
- package/es/button/src/Button.js +270 -245
- package/es/button/src/ButtonGroup.js +1 -1
- package/es/button/src/styles/button.cssr.js +1 -0
- package/es/button/styles/index.d.ts +1 -1
- package/es/button/styles/index.js +1 -1
- package/es/button/styles/rtl.d.ts +2 -5
- package/es/button/styles/rtl.js +1 -1
- package/es/calendar/src/Calendar.js +1 -1
- package/es/card/src/Card.d.ts +8 -2
- package/es/card/src/Card.js +44 -40
- package/es/card/styles/index.d.ts +1 -1
- package/es/card/styles/index.js +1 -1
- package/es/card/styles/rtl.d.ts +2 -5
- package/es/card/styles/rtl.js +1 -1
- 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 +36 -34
- package/es/cascader/src/Cascader.js +6 -6
- package/es/cascader/src/CascaderMenu.d.ts +3 -3
- package/es/cascader/src/CascaderOption.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/es/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/es/cascader/styles/light.d.ts +3 -3
- package/es/checkbox/src/Checkbox.js +1 -1
- package/es/checkbox/src/styles/index.cssr.js +12 -12
- 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 +33 -33
- package/es/data-table/src/DataTable.js +1 -1
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/es/data-table/src/TableParts/Body.d.ts +6 -6
- package/es/data-table/src/TableParts/Cell.d.ts +12 -12
- package/es/data-table/src/TableParts/Header.d.ts +6 -6
- 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/data-table/styles/light.d.ts +3 -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 +1 -1
- 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 +27 -60
- package/es/dialog/src/Dialog.js +4 -31
- package/es/dialog/src/DialogEnvironment.d.ts +8 -9
- package/es/dialog/src/DialogEnvironment.js +3 -2
- package/es/dialog/src/DialogProvider.d.ts +3 -5
- 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 +7 -16
- 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 +1 -1
- package/es/form/src/FormItem.js +3 -2
- package/es/form/src/FormItemCol.d.ts +1 -1
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- 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.js +1 -1
- package/es/global-style/src/GlobalStyle.js +1 -1
- 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 +50 -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/Image.d.ts +1 -1
- package/es/image/src/ImagePreview.js +1 -1
- package/es/input/src/Input.d.ts +6 -1
- 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 +2 -1
- 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/locales/common/deDE.js +13 -15
- package/es/locales/common/enGB.d.ts +109 -0
- package/es/locales/common/enGB.js +109 -0
- package/es/locales/common/eo.d.ts +109 -0
- package/es/locales/common/eo.js +109 -0
- package/es/locales/common/jaJP.js +12 -14
- package/es/locales/common/plPL.d.ts +3 -0
- package/es/locales/common/plPL.js +109 -0
- package/es/locales/date/enGB.d.ts +3 -0
- package/es/locales/date/enGB.js +6 -0
- package/es/locales/date/eo.d.ts +3 -0
- package/es/locales/date/eo.js +6 -0
- package/es/locales/date/plPL.d.ts +3 -0
- package/es/locales/date/plPL.js +6 -0
- package/es/locales/index.d.ts +6 -0
- package/es/locales/index.js +6 -0
- 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 +16 -1
- package/es/mention/src/Mention.js +7 -3
- package/es/menu/src/Menu.d.ts +3 -5
- 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 +5 -3
- package/es/modal/src/BodyWrapper.js +2 -2
- package/es/modal/src/Modal.d.ts +7 -4
- package/es/modal/src/Modal.js +2 -2
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/src/presetProps.js +1 -1
- package/es/notification/index.d.ts +1 -1
- package/es/notification/src/Notification.d.ts +1 -2
- 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 +3 -4
- package/es/notification/src/NotificationEnvironment.js +3 -3
- package/es/notification/src/NotificationProvider.d.ts +10 -6
- 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.d.ts +33 -33
- package/es/pagination/src/Pagination.js +1 -1
- package/es/pagination/styles/light.d.ts +3 -3
- 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 +31 -8
- package/es/popselect/src/Popselect.js +8 -6
- package/es/popselect/src/PopselectPanel.d.ts +2 -5
- package/es/popselect/src/PopselectPanel.js +4 -2
- package/es/progress/src/Circle.d.ts +19 -3
- package/es/progress/src/Circle.js +41 -22
- package/es/progress/src/Progress.d.ts +15 -6
- package/es/progress/src/Progress.js +44 -30
- package/es/progress/src/styles/index.cssr.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.js +1 -1
- package/es/select/index.d.ts +2 -0
- package/es/select/src/Select.d.ts +71 -54
- package/es/select/src/Select.js +82 -47
- package/es/select/src/interface.d.ts +2 -0
- package/es/select/styles/light.d.ts +3 -3
- 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 +3 -1
- package/es/tag/src/Tag.js +61 -41
- package/es/tag/src/styles/index.cssr.js +5 -17
- package/es/tag/styles/index.d.ts +1 -1
- package/es/tag/styles/index.js +1 -1
- package/es/tag/styles/rtl.d.ts +2 -5
- package/es/tag/styles/rtl.js +1 -1
- 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/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/src/utils.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +46 -44
- package/es/tree-select/src/TreeSelect.js +8 -5
- package/es/tree-select/styles/light.d.ts +3 -3
- package/es/typography/src/a.js +1 -1
- package/es/typography/src/blockquote.js +1 -1
- package/es/typography/src/create-header.js +1 -1
- 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/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 +11 -6
- package/lib/_internal/select-menu/src/SelectMenu.js +47 -22
- package/lib/_internal/selection/src/Selection.d.ts +42 -29
- package/lib/_internal/selection/src/Selection.js +99 -92
- package/lib/_internal/selection/src/interface.d.ts +2 -2
- package/lib/_internal/selection/src/styles/index.cssr.js +15 -30
- package/lib/_internal/selection/styles/dark.js +3 -3
- package/lib/_internal/selection/styles/light.d.ts +6 -6
- package/lib/_internal/selection/styles/light.js +3 -3
- package/lib/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/lib/_internal/wave/src/Wave.js +1 -1
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +3 -2
- package/lib/_mixins/use-config.js +2 -2
- package/lib/_mixins/use-css-vars-class.d.ts +11 -2
- package/lib/_mixins/use-css-vars-class.js +50 -22
- 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/css/color-to-class.d.ts +1 -0
- package/lib/_utils/css/color-to-class.js +7 -0
- package/lib/_utils/css/format-length.d.ts +2 -2
- package/lib/_utils/css/format-length.js +2 -1
- package/lib/_utils/css/index.d.ts +2 -1
- package/lib/_utils/css/index.js +4 -5
- package/lib/_utils/cssr/index.d.ts +1 -2
- package/lib/_utils/cssr/index.js +1 -15
- package/lib/_utils/index.d.ts +2 -2
- package/lib/_utils/index.js +6 -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 +21 -2
- package/lib/affix/src/Affix.js +1 -1
- package/lib/alert/src/Alert.js +1 -1
- package/lib/anchor/src/AnchorAdapter.js +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +16 -1
- 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.js +1 -1
- package/lib/breadcrumb/src/Breadcrumb.js +1 -1
- package/lib/button/src/Button.d.ts +4 -2
- package/lib/button/src/Button.js +268 -243
- package/lib/button/src/ButtonGroup.js +1 -1
- package/lib/button/src/styles/button.cssr.js +1 -0
- package/lib/button/styles/index.d.ts +1 -1
- package/lib/button/styles/index.js +1 -1
- package/lib/button/styles/rtl.d.ts +2 -5
- package/lib/button/styles/rtl.js +2 -1
- package/lib/calendar/src/Calendar.js +1 -1
- package/lib/card/src/Card.d.ts +8 -2
- package/lib/card/src/Card.js +43 -39
- package/lib/card/styles/index.d.ts +1 -1
- package/lib/card/styles/index.js +1 -1
- package/lib/card/styles/rtl.d.ts +2 -5
- package/lib/card/styles/rtl.js +2 -1
- 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 +36 -34
- package/lib/cascader/src/Cascader.js +6 -6
- package/lib/cascader/src/CascaderMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderOption.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/lib/cascader/styles/light.d.ts +3 -3
- package/lib/checkbox/src/Checkbox.js +1 -1
- package/lib/checkbox/src/styles/index.cssr.js +12 -12
- 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 +33 -33
- package/lib/data-table/src/DataTable.js +1 -1
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/lib/data-table/src/TableParts/Body.d.ts +6 -6
- package/lib/data-table/src/TableParts/Cell.d.ts +12 -12
- package/lib/data-table/src/TableParts/Header.d.ts +6 -6
- 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/data-table/styles/light.d.ts +3 -3
- 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 +1 -1
- 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 +27 -60
- package/lib/dialog/src/Dialog.js +5 -32
- package/lib/dialog/src/DialogEnvironment.d.ts +8 -9
- package/lib/dialog/src/DialogEnvironment.js +6 -24
- package/lib/dialog/src/DialogProvider.d.ts +3 -5
- 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 +7 -16
- 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 +1 -1
- package/lib/form/src/FormItem.js +5 -4
- package/lib/form/src/FormItemCol.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- 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.js +4 -4
- package/lib/global-style/src/GlobalStyle.js +2 -2
- 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 +56 -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/Image.d.ts +1 -1
- package/lib/image/src/ImagePreview.js +1 -1
- package/lib/input/src/Input.d.ts +6 -1
- 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 +2 -1
- 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/locales/common/deDE.js +13 -15
- package/lib/locales/common/enGB.d.ts +109 -0
- package/lib/locales/common/enGB.js +111 -0
- package/lib/locales/common/eo.d.ts +109 -0
- package/lib/locales/common/eo.js +111 -0
- package/lib/locales/common/jaJP.js +12 -14
- package/lib/locales/common/plPL.d.ts +3 -0
- package/lib/locales/common/plPL.js +111 -0
- package/lib/locales/date/enGB.d.ts +3 -0
- package/lib/locales/date/enGB.js +11 -0
- package/lib/locales/date/eo.d.ts +3 -0
- package/lib/locales/date/eo.js +11 -0
- package/lib/locales/date/plPL.d.ts +3 -0
- package/lib/locales/date/plPL.js +11 -0
- package/lib/locales/index.d.ts +6 -0
- package/lib/locales/index.js +13 -1
- 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 +16 -1
- package/lib/mention/src/Mention.js +7 -3
- package/lib/menu/src/Menu.d.ts +3 -5
- 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 +5 -3
- package/lib/modal/src/BodyWrapper.js +3 -3
- package/lib/modal/src/Modal.d.ts +7 -4
- package/lib/modal/src/Modal.js +3 -3
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/presetProps.js +2 -2
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/src/Notification.d.ts +1 -2
- 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 +3 -4
- package/lib/notification/src/NotificationEnvironment.js +4 -23
- package/lib/notification/src/NotificationProvider.d.ts +10 -6
- 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.d.ts +33 -33
- package/lib/pagination/src/Pagination.js +1 -1
- package/lib/pagination/styles/light.d.ts +3 -3
- 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 +31 -8
- package/lib/popselect/src/Popselect.js +8 -6
- package/lib/popselect/src/PopselectPanel.d.ts +2 -5
- package/lib/popselect/src/PopselectPanel.js +4 -2
- package/lib/progress/src/Circle.d.ts +19 -3
- package/lib/progress/src/Circle.js +40 -21
- package/lib/progress/src/Progress.d.ts +15 -6
- package/lib/progress/src/Progress.js +43 -29
- package/lib/progress/src/styles/index.cssr.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.js +1 -1
- package/lib/select/index.d.ts +2 -0
- package/lib/select/src/Select.d.ts +71 -54
- package/lib/select/src/Select.js +82 -47
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/select/styles/light.d.ts +3 -3
- 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 +3 -1
- package/lib/tag/src/Tag.js +59 -39
- package/lib/tag/src/styles/index.cssr.js +5 -17
- package/lib/tag/styles/index.d.ts +1 -1
- package/lib/tag/styles/index.js +1 -1
- package/lib/tag/styles/rtl.d.ts +2 -5
- package/lib/tag/styles/rtl.js +2 -1
- 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/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/src/utils.js +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +46 -44
- package/lib/tree-select/src/TreeSelect.js +8 -5
- package/lib/tree-select/styles/light.d.ts +3 -3
- package/lib/typography/src/a.js +1 -1
- package/lib/typography/src/blockquote.js +1 -1
- package/lib/typography/src/create-header.js +1 -1
- 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/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -9
- package/volar.d.ts +1 -0
- package/web-types.json +452 -220
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VNodeChild, ExtractPropTypes,
|
|
1
|
+
import { VNodeChild, ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
2
2
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
3
|
import type { MessageOptions, MessageType } from './types';
|
|
4
4
|
declare type ContentType = string | (() => VNodeChild);
|
|
@@ -10,7 +10,6 @@ export interface MessageApiInjection {
|
|
|
10
10
|
loading: (content: ContentType, options?: MessageOptions) => MessageReactive;
|
|
11
11
|
destroyAll: () => void;
|
|
12
12
|
}
|
|
13
|
-
export declare const messageApiInjectionKey: import("vue").InjectionKey<MessageApiInjection>;
|
|
14
13
|
export interface MessageReactive {
|
|
15
14
|
content?: ContentType;
|
|
16
15
|
duration?: number;
|
|
@@ -185,11 +184,7 @@ declare const messageProviderProps: {
|
|
|
185
184
|
}, any>>>;
|
|
186
185
|
};
|
|
187
186
|
export declare type MessageProviderProps = ExtractPublicPropTypes<typeof messageProviderProps>;
|
|
188
|
-
declare type MessageProviderSetupProps = ExtractPropTypes<typeof messageProviderProps>;
|
|
189
|
-
export declare const messageProviderInjectionKey: import("vue").InjectionKey<{
|
|
190
|
-
props: MessageProviderSetupProps;
|
|
191
|
-
mergedClsPrefixRef: Ref<string>;
|
|
192
|
-
}>;
|
|
187
|
+
export declare type MessageProviderSetupProps = ExtractPropTypes<typeof messageProviderProps>;
|
|
193
188
|
declare const _default: import("vue").DefineComponent<{
|
|
194
189
|
to: PropType<string | HTMLElement>;
|
|
195
190
|
duration: {
|
|
@@ -353,7 +348,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
353
348
|
}, any>>>;
|
|
354
349
|
}, {
|
|
355
350
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
356
|
-
messageRefs: Ref<{
|
|
351
|
+
messageRefs: import("vue").Ref<{
|
|
357
352
|
[x: string]: {
|
|
358
353
|
key: string;
|
|
359
354
|
hide: () => void;
|
|
@@ -367,7 +362,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
367
362
|
destroy: () => void;
|
|
368
363
|
};
|
|
369
364
|
}>;
|
|
370
|
-
messageList: Ref<{
|
|
365
|
+
messageList: import("vue").Ref<{
|
|
371
366
|
key: string;
|
|
372
367
|
content?: ContentType | undefined;
|
|
373
368
|
duration?: number | undefined;
|
|
@@ -3,13 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.messageProviderInjectionKey = exports.messageApiInjectionKey = void 0;
|
|
7
6
|
const vue_1 = require("vue");
|
|
8
7
|
const seemly_1 = require("seemly");
|
|
9
8
|
const _utils_1 = require("../../_utils");
|
|
10
9
|
const _mixins_1 = require("../../_mixins");
|
|
11
10
|
const MessageEnvironment_1 = __importDefault(require("./MessageEnvironment"));
|
|
12
|
-
|
|
11
|
+
const context_1 = require("./context");
|
|
13
12
|
const messageProviderProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { to: [String, Object], duration: {
|
|
14
13
|
type: Number,
|
|
15
14
|
default: 3000
|
|
@@ -17,7 +16,6 @@ const messageProviderProps = Object.assign(Object.assign({}, _mixins_1.useTheme.
|
|
|
17
16
|
type: String,
|
|
18
17
|
default: 'top'
|
|
19
18
|
}, closable: Boolean, containerStyle: [String, Object] });
|
|
20
|
-
exports.messageProviderInjectionKey = (0, _utils_1.createInjectionKey)('n-message-provider');
|
|
21
19
|
exports.default = (0, vue_1.defineComponent)({
|
|
22
20
|
name: 'MessageProvider',
|
|
23
21
|
props: messageProviderProps,
|
|
@@ -43,11 +41,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
43
41
|
},
|
|
44
42
|
destroyAll
|
|
45
43
|
};
|
|
46
|
-
(0, vue_1.provide)(
|
|
44
|
+
(0, vue_1.provide)(context_1.messageProviderInjectionKey, {
|
|
47
45
|
props,
|
|
48
46
|
mergedClsPrefixRef
|
|
49
47
|
});
|
|
50
|
-
(0, vue_1.provide)(
|
|
48
|
+
(0, vue_1.provide)(context_1.messageApiInjectionKey, api);
|
|
51
49
|
function create(content, options) {
|
|
52
50
|
const key = (0, seemly_1.createId)();
|
|
53
51
|
const messageReactive = (0, vue_1.reactive)(Object.assign(Object.assign({}, options), { content,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import type { MessageApiInjection, MessageProviderSetupProps } from './MessageProvider';
|
|
3
|
+
export declare const messageApiInjectionKey: import("vue").InjectionKey<MessageApiInjection>;
|
|
4
|
+
export declare const messageProviderInjectionKey: import("vue").InjectionKey<{
|
|
5
|
+
props: MessageProviderSetupProps;
|
|
6
|
+
mergedClsPrefixRef: Ref<string>;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.messageProviderInjectionKey = exports.messageApiInjectionKey = void 0;
|
|
4
|
+
const _utils_1 = require("../../_utils");
|
|
5
|
+
exports.messageApiInjectionKey = (0, _utils_1.createInjectionKey)('n-message-api');
|
|
6
|
+
exports.messageProviderInjectionKey = (0, _utils_1.createInjectionKey)('n-message-provider');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VNodeChild } from 'vue';
|
|
2
|
-
import { MessageSetupProps } from './message-props';
|
|
2
|
+
import type { MessageSetupProps } from './message-props';
|
|
3
3
|
export declare type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading';
|
|
4
4
|
export declare type RenderMessageProps = Pick<MessageSetupProps, 'closable' | 'content' | 'icon' | 'onClose' | 'type'>;
|
|
5
5
|
export declare type MessageRenderMessage = (props: RenderMessageProps) => VNodeChild;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useMessage = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const _utils_1 = require("../../_utils");
|
|
6
|
-
const
|
|
6
|
+
const context_1 = require("./context");
|
|
7
7
|
function useMessage() {
|
|
8
|
-
const api = (0, vue_1.inject)(
|
|
8
|
+
const api = (0, vue_1.inject)(context_1.messageApiInjectionKey, null);
|
|
9
9
|
if (api === null) {
|
|
10
10
|
(0, _utils_1.throwError)('use-message', 'No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A.');
|
|
11
11
|
}
|
|
@@ -49,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
50
50
|
contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
51
51
|
headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
52
|
+
headerExtraStyle: PropType<string | import("vue").CSSProperties>;
|
|
52
53
|
footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
53
54
|
embedded: BooleanConstructor;
|
|
54
55
|
segmented: {
|
|
@@ -65,7 +66,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
65
66
|
type: BooleanConstructor;
|
|
66
67
|
required: true;
|
|
67
68
|
};
|
|
68
|
-
preset: PropType<"dialog" | "
|
|
69
|
+
preset: PropType<"dialog" | "confirm" | "card">;
|
|
69
70
|
displayDirective: {
|
|
70
71
|
type: PropType<"show" | "if">;
|
|
71
72
|
required: true;
|
|
@@ -751,6 +752,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
751
752
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
752
753
|
contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
753
754
|
headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
755
|
+
headerExtraStyle: PropType<string | import("vue").CSSProperties>;
|
|
754
756
|
footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
755
757
|
embedded: BooleanConstructor;
|
|
756
758
|
segmented: {
|
|
@@ -767,7 +769,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
767
769
|
type: BooleanConstructor;
|
|
768
770
|
required: true;
|
|
769
771
|
};
|
|
770
|
-
preset: PropType<"dialog" | "
|
|
772
|
+
preset: PropType<"dialog" | "confirm" | "card">;
|
|
771
773
|
displayDirective: {
|
|
772
774
|
type: PropType<"show" | "if">;
|
|
773
775
|
required: true;
|
|
@@ -785,8 +787,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
785
787
|
size: "small" | "medium" | "large" | "huge";
|
|
786
788
|
autoFocus: boolean;
|
|
787
789
|
loading: boolean;
|
|
788
|
-
showIcon: boolean;
|
|
789
790
|
bordered: boolean;
|
|
791
|
+
showIcon: boolean;
|
|
790
792
|
closable: boolean;
|
|
791
793
|
hoverable: boolean;
|
|
792
794
|
embedded: boolean;
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const vue_1 = require("vue");
|
|
4
4
|
const vdirs_1 = require("vdirs");
|
|
5
5
|
const vueuc_1 = require("vueuc");
|
|
6
|
+
const dialogProps_1 = require("../../dialog/src/dialogProps");
|
|
6
7
|
const Dialog_1 = require("../../dialog/src/Dialog");
|
|
7
8
|
const Card_1 = require("../../card/src/Card");
|
|
8
9
|
const interface_1 = require("../../drawer/src/interface");
|
|
9
10
|
const interface_2 = require("../../popover/src/interface");
|
|
10
11
|
const _internal_1 = require("../../_internal");
|
|
11
|
-
const dialog_1 = require("../../dialog");
|
|
12
12
|
const card_1 = require("../../card");
|
|
13
13
|
const _utils_1 = require("../../_utils");
|
|
14
14
|
const interface_3 = require("./interface");
|
|
@@ -168,10 +168,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
168
168
|
var _a;
|
|
169
169
|
return ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition", appear: (_a = this.appear) !== null && _a !== void 0 ? _a : this.isMounted, onEnter: handleEnter, onAfterEnter: this.onAfterEnter, onAfterLeave: handleAfterLeave, onBeforeLeave: handleBeforeLeave }, {
|
|
170
170
|
default: () => (0, vue_1.withDirectives)((this.preset === 'confirm' ||
|
|
171
|
-
this.preset === 'dialog' ? ((0, vue_1.h)(
|
|
171
|
+
this.preset === 'dialog' ? ((0, vue_1.h)(Dialog_1.NDialog, Object.assign({}, this.$attrs, { class: [
|
|
172
172
|
`${mergedClsPrefix}-modal`,
|
|
173
173
|
this.$attrs.class
|
|
174
|
-
], ref: "bodyRef", theme: this.mergedTheme.peers.Dialog, themeOverrides: this.mergedTheme.peerOverrides.Dialog }, (0, _utils_1.keep)(this.$props,
|
|
174
|
+
], ref: "bodyRef", theme: this.mergedTheme.peers.Dialog, themeOverrides: this.mergedTheme.peerOverrides.Dialog }, (0, _utils_1.keep)(this.$props, dialogProps_1.dialogPropKeys), { "aria-modal": "true" }), $slots)) : this.preset === 'card' ? ((0, vue_1.h)(card_1.NCard, Object.assign({}, this.$attrs, { ref: "bodyRef", class: [
|
|
175
175
|
`${mergedClsPrefix}-modal`,
|
|
176
176
|
this.$attrs.class
|
|
177
177
|
], theme: this.mergedTheme.peers.Card, themeOverrides: this.mergedTheme.peerOverrides.Card }, (0, _utils_1.keep)(this.$props, Card_1.cardBasePropKeys), { "aria-modal": "true", role: "dialog" }), $slots)) : (childNode)), [
|
package/lib/modal/src/Modal.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ declare const modalProps: {
|
|
|
43
43
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
44
44
|
contentStyle: PropType<string | CSSProperties>;
|
|
45
45
|
headerStyle: PropType<string | CSSProperties>;
|
|
46
|
+
headerExtraStyle: PropType<string | CSSProperties>;
|
|
46
47
|
footerStyle: PropType<string | CSSProperties>;
|
|
47
48
|
embedded: BooleanConstructor;
|
|
48
49
|
segmented: {
|
|
@@ -64,7 +65,7 @@ declare const modalProps: {
|
|
|
64
65
|
type: BooleanConstructor;
|
|
65
66
|
default: boolean;
|
|
66
67
|
};
|
|
67
|
-
preset: PropType<"dialog" | "
|
|
68
|
+
preset: PropType<"dialog" | "confirm" | "card">;
|
|
68
69
|
to: PropType<string | HTMLElement>;
|
|
69
70
|
displayDirective: {
|
|
70
71
|
type: PropType<"show" | "if">;
|
|
@@ -954,6 +955,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
954
955
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
955
956
|
contentStyle: PropType<string | CSSProperties>;
|
|
956
957
|
headerStyle: PropType<string | CSSProperties>;
|
|
958
|
+
headerExtraStyle: PropType<string | CSSProperties>;
|
|
957
959
|
footerStyle: PropType<string | CSSProperties>;
|
|
958
960
|
embedded: BooleanConstructor;
|
|
959
961
|
segmented: {
|
|
@@ -975,7 +977,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
975
977
|
type: BooleanConstructor;
|
|
976
978
|
default: boolean;
|
|
977
979
|
};
|
|
978
|
-
preset: PropType<"dialog" | "
|
|
980
|
+
preset: PropType<"dialog" | "confirm" | "card">;
|
|
979
981
|
to: PropType<string | HTMLElement>;
|
|
980
982
|
displayDirective: {
|
|
981
983
|
type: PropType<"show" | "if">;
|
|
@@ -1883,6 +1885,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1883
1885
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
1884
1886
|
contentStyle: PropType<string | CSSProperties>;
|
|
1885
1887
|
headerStyle: PropType<string | CSSProperties>;
|
|
1888
|
+
headerExtraStyle: PropType<string | CSSProperties>;
|
|
1886
1889
|
footerStyle: PropType<string | CSSProperties>;
|
|
1887
1890
|
embedded: BooleanConstructor;
|
|
1888
1891
|
segmented: {
|
|
@@ -1904,7 +1907,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1904
1907
|
type: BooleanConstructor;
|
|
1905
1908
|
default: boolean;
|
|
1906
1909
|
};
|
|
1907
|
-
preset: PropType<"dialog" | "
|
|
1910
|
+
preset: PropType<"dialog" | "confirm" | "card">;
|
|
1908
1911
|
to: PropType<string | HTMLElement>;
|
|
1909
1912
|
displayDirective: {
|
|
1910
1913
|
type: PropType<"show" | "if">;
|
|
@@ -2758,8 +2761,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2758
2761
|
dialog: boolean;
|
|
2759
2762
|
autoFocus: boolean;
|
|
2760
2763
|
loading: boolean;
|
|
2761
|
-
showIcon: boolean;
|
|
2762
2764
|
bordered: boolean;
|
|
2765
|
+
showIcon: boolean;
|
|
2763
2766
|
closable: boolean;
|
|
2764
2767
|
displayDirective: "show" | "if";
|
|
2765
2768
|
hoverable: boolean;
|
package/lib/modal/src/Modal.js
CHANGED
|
@@ -7,7 +7,7 @@ const vue_1 = require("vue");
|
|
|
7
7
|
const vdirs_1 = require("vdirs");
|
|
8
8
|
const vooks_1 = require("vooks");
|
|
9
9
|
const vueuc_1 = require("vueuc");
|
|
10
|
-
const
|
|
10
|
+
const context_1 = require("../../dialog/src/context");
|
|
11
11
|
const _mixins_1 = require("../../_mixins");
|
|
12
12
|
const _utils_1 = require("../../_utils");
|
|
13
13
|
const styles_1 = require("../styles");
|
|
@@ -67,12 +67,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
67
67
|
}
|
|
68
68
|
const containerRef = (0, vue_1.ref)(null);
|
|
69
69
|
const { mergedClsPrefixRef, namespaceRef } = (0, _mixins_1.useConfig)(props);
|
|
70
|
-
const themeRef = (0, _mixins_1.useTheme)('Modal', '
|
|
70
|
+
const themeRef = (0, _mixins_1.useTheme)('Modal', '-modal', index_cssr_1.default, styles_1.modalLight, props, mergedClsPrefixRef);
|
|
71
71
|
const clickedRef = (0, vooks_1.useClicked)(64);
|
|
72
72
|
const clickedPositionRef = (0, vooks_1.useClickPosition)();
|
|
73
73
|
const isMountedRef = (0, vooks_1.useIsMounted)();
|
|
74
74
|
const NDialogProvider = props.dialog
|
|
75
|
-
? (0, vue_1.inject)(
|
|
75
|
+
? (0, vue_1.inject)(context_1.dialogProviderInjectionKey, null)
|
|
76
76
|
: null;
|
|
77
77
|
function doUpdateShow(show) {
|
|
78
78
|
const { onUpdateShow, 'onUpdate:show': _onUpdateShow, onHide } = props;
|
|
@@ -25,6 +25,7 @@ declare const presetProps: {
|
|
|
25
25
|
onClose: import("vue").PropType<() => void>;
|
|
26
26
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
27
27
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
28
|
+
headerExtraStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
28
29
|
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
29
30
|
embedded: BooleanConstructor;
|
|
30
31
|
segmented: {
|
|
@@ -38,5 +39,5 @@ declare const presetProps: {
|
|
|
38
39
|
hoverable: BooleanConstructor;
|
|
39
40
|
role: StringConstructor;
|
|
40
41
|
};
|
|
41
|
-
declare const presetPropsKeys: ("type" | "content" | "size" | "icon" | "title" | "role" | "action" | "positiveText" | "negativeText" | "loading" | "
|
|
42
|
+
declare const presetPropsKeys: ("type" | "content" | "size" | "icon" | "title" | "role" | "action" | "positiveText" | "negativeText" | "loading" | "bordered" | "showIcon" | "contentStyle" | "onClose" | "closable" | "iconPlacement" | "hoverable" | "headerStyle" | "headerExtraStyle" | "footerStyle" | "embedded" | "segmented" | "onPositiveClick" | "onNegativeClick")[];
|
|
42
43
|
export { presetProps, presetPropsKeys };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.presetPropsKeys = exports.presetProps = void 0;
|
|
4
|
-
const
|
|
4
|
+
const dialogProps_1 = require("../../dialog/src/dialogProps");
|
|
5
5
|
const Card_1 = require("../../card/src/Card");
|
|
6
6
|
const _utils_1 = require("../../_utils");
|
|
7
|
-
const presetProps = Object.assign(Object.assign({}, Card_1.cardBaseProps),
|
|
7
|
+
const presetProps = Object.assign(Object.assign({}, Card_1.cardBaseProps), dialogProps_1.dialogProps);
|
|
8
8
|
exports.presetProps = presetProps;
|
|
9
9
|
const presetPropsKeys = (0, _utils_1.keysOf)(presetProps);
|
|
10
10
|
exports.presetPropsKeys = presetPropsKeys;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as NNotificationProvider } from './src/NotificationProvider';
|
|
2
|
-
export type { NotificationProviderProps, NotificationProviderInst, NotificationApiInjection as NotificationApi, NotificationOptions, NotificationReactive } from './src/NotificationProvider';
|
|
2
|
+
export type { NotificationProviderProps, NotificationProviderInst, NotificationApiInjection as NotificationApi, NotificationOptions, NotificationReactive, NotificationPlacement, NotificationType } from './src/NotificationProvider';
|
|
3
3
|
export { useNotification } from './src/use-notification';
|
|
@@ -20,7 +20,7 @@ export declare const notificationProps: {
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
export declare const notificationPropKeys: ("type" | "meta" | "content" | "description" | "title" | "action" | "avatar" | "onClose" | "closable")[];
|
|
23
|
-
declare const
|
|
23
|
+
export declare const Notification: import("vue").DefineComponent<{
|
|
24
24
|
readonly closable: {
|
|
25
25
|
readonly type: BooleanConstructor;
|
|
26
26
|
readonly default: true;
|
|
@@ -92,4 +92,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
92
|
type: "default" | "error" | "info" | "success" | "warning";
|
|
93
93
|
closable: boolean;
|
|
94
94
|
}>;
|
|
95
|
-
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.notificationPropKeys = exports.notificationProps = void 0;
|
|
3
|
+
exports.Notification = exports.notificationPropKeys = exports.notificationProps = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const seemly_1 = require("seemly");
|
|
6
|
+
const icons_1 = require("../../_internal/icons");
|
|
6
7
|
const _utils_1 = require("../../_utils");
|
|
7
8
|
const _internal_1 = require("../../_internal");
|
|
8
|
-
const
|
|
9
|
-
const NotificationProvider_1 = require("./NotificationProvider");
|
|
9
|
+
const context_1 = require("./context");
|
|
10
10
|
const iconMap = {
|
|
11
11
|
info: (0, vue_1.h)(icons_1.InfoIcon, null),
|
|
12
12
|
success: (0, vue_1.h)(icons_1.SuccessIcon, null),
|
|
@@ -24,8 +24,6 @@ exports.notificationProps = {
|
|
|
24
24
|
default: 'default'
|
|
25
25
|
},
|
|
26
26
|
avatar: Function,
|
|
27
|
-
// BUG
|
|
28
|
-
// Wired Case, can't be set to [String, Function] as PropType<string | (() => VNodeChild)>,
|
|
29
27
|
title: [String, Function],
|
|
30
28
|
description: [String, Function],
|
|
31
29
|
content: [String, Function],
|
|
@@ -37,12 +35,12 @@ exports.notificationProps = {
|
|
|
37
35
|
}
|
|
38
36
|
};
|
|
39
37
|
exports.notificationPropKeys = (0, _utils_1.keysOf)(exports.notificationProps);
|
|
40
|
-
exports.
|
|
38
|
+
exports.Notification = (0, vue_1.defineComponent)({
|
|
41
39
|
name: 'Notification',
|
|
42
40
|
props: exports.notificationProps,
|
|
43
41
|
setup(props) {
|
|
44
42
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
45
|
-
const { mergedClsPrefixRef, mergedThemeRef } = (0, vue_1.inject)(
|
|
43
|
+
const { mergedClsPrefixRef, mergedThemeRef } = (0, vue_1.inject)(context_1.notificationProviderInjectionKey);
|
|
46
44
|
return {
|
|
47
45
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
48
46
|
showAvatar: (0, vue_1.computed)(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
declare const
|
|
2
|
+
export declare const NotificationContainer: import("vue").DefineComponent<{
|
|
3
3
|
scrollable: {
|
|
4
4
|
type: BooleanConstructor;
|
|
5
5
|
required: true;
|
|
@@ -162,4 +162,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
162
162
|
required: true;
|
|
163
163
|
};
|
|
164
164
|
}>>, {}>;
|
|
165
|
-
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationContainer = void 0;
|
|
3
4
|
const vue_1 = require("vue");
|
|
4
5
|
const _internal_1 = require("../../_internal");
|
|
5
|
-
const
|
|
6
|
-
exports.
|
|
6
|
+
const context_1 = require("./context");
|
|
7
|
+
exports.NotificationContainer = (0, vue_1.defineComponent)({
|
|
7
8
|
name: 'NotificationContainer',
|
|
8
9
|
props: {
|
|
9
10
|
scrollable: {
|
|
@@ -17,7 +18,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
17
18
|
},
|
|
18
19
|
setup() {
|
|
19
20
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
20
|
-
const { mergedThemeRef, mergedClsPrefixRef } = (0, vue_1.inject)(
|
|
21
|
+
const { mergedThemeRef, mergedClsPrefixRef } = (0, vue_1.inject)(context_1.notificationProviderInjectionKey);
|
|
21
22
|
return {
|
|
22
23
|
mergedTheme: mergedThemeRef,
|
|
23
24
|
mergedClsPrefix: mergedClsPrefixRef
|
|
@@ -26,7 +26,7 @@ export declare const notificationEnvOptions: {
|
|
|
26
26
|
readonly meta: PropType<string | (() => import("vue").VNodeChild)>;
|
|
27
27
|
readonly action: PropType<string | (() => import("vue").VNodeChild)>;
|
|
28
28
|
};
|
|
29
|
-
declare const
|
|
29
|
+
export declare const NotificationEnvironment: import("vue").DefineComponent<{
|
|
30
30
|
internalKey: {
|
|
31
31
|
type: StringConstructor;
|
|
32
32
|
required: true;
|
|
@@ -36,7 +36,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
36
|
required: true;
|
|
37
37
|
};
|
|
38
38
|
duration: NumberConstructor;
|
|
39
|
-
onClose: PropType<() => any>;
|
|
39
|
+
onClose: PropType<() => Promise<boolean> | boolean | any>;
|
|
40
40
|
onLeave: PropType<() => void>;
|
|
41
41
|
onAfterEnter: PropType<() => void>;
|
|
42
42
|
onAfterLeave: PropType<() => void>;
|
|
@@ -76,7 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
76
|
required: true;
|
|
77
77
|
};
|
|
78
78
|
duration: NumberConstructor;
|
|
79
|
-
onClose: PropType<() => any>;
|
|
79
|
+
onClose: PropType<() => Promise<boolean> | boolean | any>;
|
|
80
80
|
onLeave: PropType<() => void>;
|
|
81
81
|
onAfterEnter: PropType<() => void>;
|
|
82
82
|
onAfterLeave: PropType<() => void>;
|
|
@@ -101,4 +101,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
101
|
type: "default" | "error" | "info" | "success" | "warning";
|
|
102
102
|
closable: boolean;
|
|
103
103
|
}>;
|
|
104
|
-
export default _default;
|
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.notificationEnvOptions = void 0;
|
|
3
|
+
exports.NotificationEnvironment = exports.notificationEnvOptions = void 0;
|
|
23
4
|
const vue_1 = require("vue");
|
|
24
5
|
const _utils_1 = require("../../_utils");
|
|
25
|
-
const Notification_1 =
|
|
6
|
+
const Notification_1 = require("./Notification");
|
|
26
7
|
exports.notificationEnvOptions = Object.assign(Object.assign({}, Notification_1.notificationProps), { duration: Number, onClose: Function, onLeave: Function, onAfterEnter: Function, onAfterLeave: Function,
|
|
27
8
|
/** @deprecated */
|
|
28
9
|
onHide: Function,
|
|
@@ -30,7 +11,7 @@ exports.notificationEnvOptions = Object.assign(Object.assign({}, Notification_1.
|
|
|
30
11
|
onAfterShow: Function,
|
|
31
12
|
/** @deprecated */
|
|
32
13
|
onAfterHide: Function });
|
|
33
|
-
exports.
|
|
14
|
+
exports.NotificationEnvironment = (0, vue_1.defineComponent)({
|
|
34
15
|
name: 'NotificationEnvironment',
|
|
35
16
|
props: Object.assign(Object.assign({}, exports.notificationEnvOptions), {
|
|
36
17
|
// private
|
|
@@ -125,7 +106,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
125
106
|
// convert to any since Element is not compitable with HTMLElement
|
|
126
107
|
onBeforeEnter: this.handleBeforeEnter, onAfterEnter: this.handleAfterEnter, onBeforeLeave: this.handleBeforeLeave, onLeave: this.handleLeave, onAfterLeave: this.handleAfterLeave }, {
|
|
127
108
|
default: () => {
|
|
128
|
-
return this.show ? ((0, vue_1.h)(Notification_1.
|
|
109
|
+
return this.show ? ((0, vue_1.h)(Notification_1.Notification, Object.assign({}, (0, _utils_1.keep)(this.$props, Notification_1.notificationPropKeys), { onClose: this.handleClose }))) : null;
|
|
129
110
|
}
|
|
130
111
|
}));
|
|
131
112
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { PropType, ExtractPropTypes, Ref } from 'vue';
|
|
1
|
+
import { PropType, ExtractPropTypes, Ref, CSSProperties } from 'vue';
|
|
2
2
|
import type { MergedTheme } from '../../_mixins';
|
|
3
3
|
import { ExtractPublicPropTypes, Mutable } from '../../_utils';
|
|
4
4
|
import { NotificationTheme } from '../styles';
|
|
5
5
|
import { notificationEnvOptions } from './NotificationEnvironment';
|
|
6
|
+
export declare type NotificationPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
6
7
|
export declare type NotificationOptions = Partial<ExtractPropTypes<typeof notificationEnvOptions>>;
|
|
7
8
|
export interface NotificationProviderInjection {
|
|
8
9
|
mergedClsPrefixRef: Ref<string>;
|
|
9
10
|
mergedThemeRef: Ref<MergedTheme<NotificationTheme>>;
|
|
10
11
|
}
|
|
11
|
-
export declare const notificationProviderInjectionKey: import("vue").InjectionKey<NotificationProviderInjection>;
|
|
12
12
|
declare type Create = (options: NotificationOptions) => NotificationReactive;
|
|
13
13
|
declare type TypedCreate = (options: Omit<NotificationOptions, 'type'>) => NotificationReactive;
|
|
14
14
|
export interface NotificationApiInjection {
|
|
@@ -23,6 +23,7 @@ export interface NotificationApiInjection {
|
|
|
23
23
|
}
|
|
24
24
|
export declare type NotificationProviderInst = NotificationApiInjection;
|
|
25
25
|
export declare const notificationApiInjectionKey: import("vue").InjectionKey<NotificationApiInjection>;
|
|
26
|
+
export declare type NotificationType = 'info' | 'success' | 'warning' | 'error';
|
|
26
27
|
export declare type NotificationReactive = {
|
|
27
28
|
readonly key: string;
|
|
28
29
|
readonly destroy: () => void;
|
|
@@ -35,6 +36,7 @@ interface NotificationRef {
|
|
|
35
36
|
hide: () => void;
|
|
36
37
|
}
|
|
37
38
|
declare const notificationProviderProps: {
|
|
39
|
+
containerStyle: PropType<string | CSSProperties>;
|
|
38
40
|
to: PropType<string | HTMLElement>;
|
|
39
41
|
scrollable: {
|
|
40
42
|
type: BooleanConstructor;
|
|
@@ -42,7 +44,7 @@ declare const notificationProviderProps: {
|
|
|
42
44
|
};
|
|
43
45
|
max: NumberConstructor;
|
|
44
46
|
placement: {
|
|
45
|
-
type: PropType<
|
|
47
|
+
type: PropType<NotificationPlacement>;
|
|
46
48
|
default: string;
|
|
47
49
|
};
|
|
48
50
|
theme: PropType<import("../../_mixins").Theme<"Notification", {
|
|
@@ -135,6 +137,7 @@ declare const notificationProviderProps: {
|
|
|
135
137
|
};
|
|
136
138
|
export declare type NotificationProviderProps = ExtractPublicPropTypes<typeof notificationProviderProps>;
|
|
137
139
|
declare const _default: import("vue").DefineComponent<{
|
|
140
|
+
containerStyle: PropType<string | CSSProperties>;
|
|
138
141
|
to: PropType<string | HTMLElement>;
|
|
139
142
|
scrollable: {
|
|
140
143
|
type: BooleanConstructor;
|
|
@@ -142,7 +145,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
142
145
|
};
|
|
143
146
|
max: NumberConstructor;
|
|
144
147
|
placement: {
|
|
145
|
-
type: PropType<
|
|
148
|
+
type: PropType<NotificationPlacement>;
|
|
146
149
|
default: string;
|
|
147
150
|
};
|
|
148
151
|
theme: PropType<import("../../_mixins").Theme<"Notification", {
|
|
@@ -267,6 +270,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
267
270
|
open: (options: NotificationOptions) => NotificationReactive;
|
|
268
271
|
destroyAll: () => void;
|
|
269
272
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
273
|
+
containerStyle: PropType<string | CSSProperties>;
|
|
270
274
|
to: PropType<string | HTMLElement>;
|
|
271
275
|
scrollable: {
|
|
272
276
|
type: BooleanConstructor;
|
|
@@ -274,7 +278,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
274
278
|
};
|
|
275
279
|
max: NumberConstructor;
|
|
276
280
|
placement: {
|
|
277
|
-
type: PropType<
|
|
281
|
+
type: PropType<NotificationPlacement>;
|
|
278
282
|
default: string;
|
|
279
283
|
};
|
|
280
284
|
theme: PropType<import("../../_mixins").Theme<"Notification", {
|
|
@@ -365,7 +369,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
365
369
|
}, any>;
|
|
366
370
|
}>>>;
|
|
367
371
|
}>>, {
|
|
368
|
-
placement:
|
|
372
|
+
placement: NotificationPlacement;
|
|
369
373
|
scrollable: boolean;
|
|
370
374
|
}>;
|
|
371
375
|
export default _default;
|
|
@@ -3,19 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.notificationApiInjectionKey =
|
|
6
|
+
exports.notificationApiInjectionKey = void 0;
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-dynamic-delete */
|
|
8
8
|
const vue_1 = require("vue");
|
|
9
9
|
const seemly_1 = require("seemly");
|
|
10
10
|
const _mixins_1 = require("../../_mixins");
|
|
11
11
|
const _utils_1 = require("../../_utils");
|
|
12
12
|
const styles_1 = require("../styles");
|
|
13
|
-
const NotificationContainer_1 =
|
|
14
|
-
const NotificationEnvironment_1 =
|
|
13
|
+
const NotificationContainer_1 = require("./NotificationContainer");
|
|
14
|
+
const NotificationEnvironment_1 = require("./NotificationEnvironment");
|
|
15
|
+
const context_1 = require("./context");
|
|
15
16
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
16
|
-
exports.notificationProviderInjectionKey = (0, _utils_1.createInjectionKey)('n-notification-provider');
|
|
17
17
|
exports.notificationApiInjectionKey = (0, _utils_1.createInjectionKey)('n-notification-api');
|
|
18
|
-
const notificationProviderProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { to: [String, Object], scrollable: {
|
|
18
|
+
const notificationProviderProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { containerStyle: [String, Object], to: [String, Object], scrollable: {
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: true
|
|
21
21
|
}, max: Number, placement: {
|
|
@@ -69,7 +69,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
69
69
|
leavingKeySet.delete(key);
|
|
70
70
|
notificationListRef.value.splice(notificationListRef.value.findIndex((notification) => notification.key === key), 1);
|
|
71
71
|
}
|
|
72
|
-
const themeRef = (0, _mixins_1.useTheme)('Notification', '
|
|
72
|
+
const themeRef = (0, _mixins_1.useTheme)('Notification', '-notification', index_cssr_1.default, styles_1.notificationLight, props, mergedClsPrefixRef);
|
|
73
73
|
const api = {
|
|
74
74
|
create,
|
|
75
75
|
info: apis[0],
|
|
@@ -80,7 +80,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
80
80
|
destroyAll
|
|
81
81
|
};
|
|
82
82
|
(0, vue_1.provide)(exports.notificationApiInjectionKey, api);
|
|
83
|
-
(0, vue_1.provide)(
|
|
83
|
+
(0, vue_1.provide)(context_1.notificationProviderInjectionKey, {
|
|
84
84
|
mergedClsPrefixRef,
|
|
85
85
|
mergedThemeRef: themeRef
|
|
86
86
|
});
|
|
@@ -105,10 +105,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
105
105
|
return ((0, vue_1.h)(vue_1.Fragment, null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 :
|
|
106
106
|
_b.call(_a),
|
|
107
107
|
this.notificationList.length ? ((0, vue_1.h)(vue_1.Teleport, { to: (_c = this.to) !== null && _c !== void 0 ? _c : 'body' },
|
|
108
|
-
(0, vue_1.h)(NotificationContainer_1.
|
|
108
|
+
(0, vue_1.h)(NotificationContainer_1.NotificationContainer, { style: this.containerStyle, scrollable: this.scrollable, placement: this.placement }, {
|
|
109
109
|
default: () => {
|
|
110
110
|
return this.notificationList.map((notification) => {
|
|
111
|
-
return ((0, vue_1.h)(NotificationEnvironment_1.
|
|
111
|
+
return ((0, vue_1.h)(NotificationEnvironment_1.NotificationEnvironment, Object.assign({ ref: ((inst) => {
|
|
112
112
|
const refKey = notification.key;
|
|
113
113
|
if (inst === null) {
|
|
114
114
|
delete this.notificationRefs[refKey];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.notificationProviderInjectionKey = void 0;
|
|
4
|
+
const _utils_1 = require("../../_utils");
|
|
5
|
+
exports.notificationProviderInjectionKey = (0, _utils_1.createInjectionKey)('n-notification-provider');
|