naive-ui 2.24.4 → 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 +37 -16
- package/es/color-picker/src/ColorPicker.js +14 -7
- package/es/color-picker/src/ColorPickerTrigger.d.ts +3 -0
- package/es/color-picker/src/ColorPickerTrigger.js +7 -3
- 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 +2 -1
- 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 +13 -1
- package/es/date-picker/src/DatePicker.js +8 -7
- package/es/date-picker/src/panel/date.d.ts +1 -0
- package/es/date-picker/src/panel/daterange.d.ts +1 -0
- package/es/date-picker/src/panel/datetime.d.ts +1 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +1 -0
- package/es/date-picker/src/panel/month.d.ts +1 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +2 -0
- package/es/date-picker/src/panel/panelHeader.js +7 -3
- package/es/date-picker/src/panel/use-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/es/date-picker/src/styles/index.cssr.js +13 -2
- package/es/date-picker/styles/light.d.ts +2 -0
- package/es/date-picker/styles/light.js +1 -1
- 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 -32
- 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 +16 -33
- package/es/dynamic-input/src/DynamicInput.js +73 -36
- 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 +4 -3
- package/es/icon/src/Icon.js +6 -6
- 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 +6 -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/locales/common/jaJP.js +12 -14
- 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 +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/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/theme-editor/src/ThemeEditor.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/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 +37 -16
- package/lib/color-picker/src/ColorPicker.js +15 -8
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +3 -0
- package/lib/color-picker/src/ColorPickerTrigger.js +8 -4
- 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 +2 -1
- 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 +13 -1
- package/lib/date-picker/src/DatePicker.js +8 -7
- package/lib/date-picker/src/panel/date.d.ts +1 -0
- package/lib/date-picker/src/panel/daterange.d.ts +1 -0
- package/lib/date-picker/src/panel/datetime.d.ts +1 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +1 -0
- package/lib/date-picker/src/panel/month.d.ts +1 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +2 -0
- package/lib/date-picker/src/panel/panelHeader.js +7 -3
- package/lib/date-picker/src/panel/use-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/lib/date-picker/src/styles/index.cssr.js +13 -2
- package/lib/date-picker/styles/light.d.ts +2 -0
- package/lib/date-picker/styles/light.js +1 -1
- 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 -33
- 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 +16 -33
- package/lib/dynamic-input/src/DynamicInput.js +70 -33
- 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 +4 -3
- package/lib/icon/src/Icon.js +6 -5
- 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 +5 -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/locales/common/jaJP.js +12 -14
- 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 +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/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/theme-editor/src/ThemeEditor.js +1 -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/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 +11 -12
- package/volar.d.ts +1 -0
- package/web-types.json +443 -220
|
@@ -2,15 +2,13 @@ import { Fragment, h, ref, Teleport, defineComponent, provide, nextTick } from '
|
|
|
2
2
|
import { useIsMounted } from 'vooks';
|
|
3
3
|
import { useConfig, useTheme } from '../../_mixins';
|
|
4
4
|
import NLoadingBar from './LoadingBar';
|
|
5
|
-
import {
|
|
5
|
+
import { loadingBarApiInjectionKey, loadingBarProviderInjectionKey } from './context';
|
|
6
6
|
const loadingBarProps = Object.assign(Object.assign({}, useTheme.props), { to: {
|
|
7
7
|
type: [String, Object],
|
|
8
8
|
default: undefined
|
|
9
9
|
}, loadingBarStyle: {
|
|
10
10
|
type: Object
|
|
11
11
|
} });
|
|
12
|
-
export const loadingBarProviderInjectionKey = createInjectionKey('n-loading-bar');
|
|
13
|
-
export const loadingBarApiInjectionKey = createInjectionKey('n-loading-bar-api');
|
|
14
12
|
export default defineComponent({
|
|
15
13
|
name: 'LoadingBarProvider',
|
|
16
14
|
props: loadingBarProps,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import type { LoadingBarProviderSetupProps } from './LoadingBarProvider';
|
|
3
|
+
export declare const loadingBarProviderInjectionKey: import("vue").InjectionKey<{
|
|
4
|
+
props: LoadingBarProviderSetupProps;
|
|
5
|
+
mergedClsPrefixRef: Ref<string>;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const loadingBarApiInjectionKey: import("vue").InjectionKey<import("./LoadingBarProvider").LoadingBarInst>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject } from 'vue';
|
|
2
|
-
import { loadingBarApiInjectionKey } from './
|
|
2
|
+
import { loadingBarApiInjectionKey } from './context';
|
|
3
3
|
import { throwError } from '../../_utils';
|
|
4
4
|
export function useLoadingBar() {
|
|
5
5
|
const loadingBar = inject(loadingBarApiInjectionKey, null);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const jaJP = {
|
|
2
2
|
name: 'ja-JP',
|
|
3
3
|
global: {
|
|
4
|
-
undo: '
|
|
5
|
-
redo: '
|
|
4
|
+
undo: '元に戻す',
|
|
5
|
+
redo: 'やり直す',
|
|
6
6
|
confirm: 'OK'
|
|
7
7
|
},
|
|
8
8
|
Popconfirm: {
|
|
@@ -35,9 +35,8 @@ const jaJP = {
|
|
|
35
35
|
datePlaceholder: '日付を選択',
|
|
36
36
|
datetimePlaceholder: '選択',
|
|
37
37
|
monthPlaceholder: '月を選択',
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
quarterPlaceholder: 'Select Quarter',
|
|
38
|
+
yearPlaceholder: '年を選択',
|
|
39
|
+
quarterPlaceholder: '四半期を選択',
|
|
41
40
|
startDatePlaceholder: '開始日',
|
|
42
41
|
endDatePlaceholder: '終了日',
|
|
43
42
|
startDatetimePlaceholder: '開始時間',
|
|
@@ -69,7 +68,7 @@ const jaJP = {
|
|
|
69
68
|
now: '現在'
|
|
70
69
|
},
|
|
71
70
|
Pagination: {
|
|
72
|
-
goto: '',
|
|
71
|
+
goto: 'ページジャンプ',
|
|
73
72
|
selectionSuffix: 'ページ'
|
|
74
73
|
},
|
|
75
74
|
DynamicTags: {
|
|
@@ -97,15 +96,14 @@ const jaJP = {
|
|
|
97
96
|
export: 'エクスポート',
|
|
98
97
|
restore: 'デフォルト'
|
|
99
98
|
},
|
|
100
|
-
// TODO: translation
|
|
101
99
|
Image: {
|
|
102
|
-
tipPrevious: '
|
|
103
|
-
tipNext: '
|
|
104
|
-
tipCounterclockwise: '
|
|
105
|
-
tipClockwise: '
|
|
106
|
-
tipZoomOut: '
|
|
107
|
-
tipZoomIn: '
|
|
108
|
-
tipClose: '
|
|
100
|
+
tipPrevious: '前の画像 (←)',
|
|
101
|
+
tipNext: '次の画像 (→)',
|
|
102
|
+
tipCounterclockwise: '左に回転',
|
|
103
|
+
tipClockwise: '右に回転',
|
|
104
|
+
tipZoomOut: '縮小',
|
|
105
|
+
tipZoomIn: '拡大',
|
|
106
|
+
tipClose: '閉じる (Esc)'
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
109
|
export default jaJP;
|
package/es/log/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as NLog } from './src/Log';
|
|
2
|
-
export type { LogProps } from './src/Log';
|
|
2
|
+
export type { LogProps, LogInst } from './src/Log';
|
package/es/log/src/Log.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
2
|
import { PropType, Ref } from 'vue';
|
|
3
3
|
import type { Hljs } from '../../_mixins';
|
|
4
|
-
import { ExtractPublicPropTypes } from '../../_utils';
|
|
4
|
+
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
5
5
|
export interface LogInjection {
|
|
6
6
|
trimRef: Ref<boolean>;
|
|
7
7
|
languageRef: Ref<string | undefined>;
|
|
8
8
|
highlightRef: Ref<boolean>;
|
|
9
9
|
mergedHljsRef: Ref<Hljs | undefined>;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export interface LogInst {
|
|
12
|
+
scrollTo: ((options: {
|
|
13
|
+
slient?: boolean;
|
|
14
|
+
position: 'top' | 'bottom';
|
|
15
|
+
}) => void) & ((options: {
|
|
16
|
+
slient?: boolean;
|
|
17
|
+
top: number;
|
|
18
|
+
}) => void);
|
|
19
|
+
}
|
|
12
20
|
declare const logProps: {
|
|
13
21
|
readonly loading: BooleanConstructor;
|
|
14
22
|
readonly trim: BooleanConstructor;
|
|
@@ -391,16 +399,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
391
399
|
}>;
|
|
392
400
|
styleHeight: import("vue").ComputedRef<string>;
|
|
393
401
|
mergedLines: import("vue").ComputedRef<string[]>;
|
|
394
|
-
scrollTo: {
|
|
395
|
-
(options: {
|
|
396
|
-
slient?: boolean;
|
|
397
|
-
position: 'top' | 'bottom';
|
|
398
|
-
}): void;
|
|
399
|
-
(options: {
|
|
400
|
-
slient?: boolean;
|
|
401
|
-
top: number;
|
|
402
|
-
}): void;
|
|
403
|
-
};
|
|
404
402
|
scrollToTop: (slient?: boolean) => void;
|
|
405
403
|
scrollToBottom: (slient?: boolean) => void;
|
|
406
404
|
handleWheel: import("lodash").DebouncedFunc<(e: WheelEvent) => void>;
|
|
@@ -413,6 +411,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
413
411
|
'--n-loader-text-color': string;
|
|
414
412
|
'--n-loading-color': string;
|
|
415
413
|
}>;
|
|
414
|
+
scrollTo: ((options: {
|
|
415
|
+
slient?: boolean | undefined;
|
|
416
|
+
position: "bottom" | "top";
|
|
417
|
+
}) => void) & ((options: {
|
|
418
|
+
slient?: boolean | undefined;
|
|
419
|
+
top: number;
|
|
420
|
+
}) => void);
|
|
416
421
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
417
422
|
readonly loading: BooleanConstructor;
|
|
418
423
|
readonly trim: BooleanConstructor;
|
package/es/log/src/Log.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { h, Transition, defineComponent, computed, provide, nextTick, ref, toRef } from 'vue';
|
|
2
2
|
import { throttle } from 'lodash-es';
|
|
3
3
|
import { useTheme, useHljs, useConfig } from '../../_mixins';
|
|
4
|
-
import {
|
|
4
|
+
import { warn } from '../../_utils';
|
|
5
5
|
import { NScrollbar } from '../../_internal';
|
|
6
6
|
import { NCode } from '../../code';
|
|
7
7
|
import { logLight } from '../styles';
|
|
8
8
|
import NLogLoader from './LogLoader';
|
|
9
9
|
import NLogLine from './LogLine';
|
|
10
|
+
import { logInjectionKey } from './context';
|
|
10
11
|
import style from './styles/index.cssr';
|
|
11
|
-
export const logInjectionKey = createInjectionKey('n-log');
|
|
12
12
|
const logProps = Object.assign(Object.assign({}, useTheme.props), { loading: Boolean, trim: Boolean, log: String, fontSize: {
|
|
13
13
|
type: Number,
|
|
14
14
|
default: 14
|
|
@@ -38,8 +38,7 @@ export default defineComponent({
|
|
|
38
38
|
return props.language !== undefined;
|
|
39
39
|
});
|
|
40
40
|
const styleHeightRef = computed(() => {
|
|
41
|
-
|
|
42
|
-
return `calc(${props.rows * lineHeight}px)`;
|
|
41
|
+
return `calc(${Math.round(props.rows * props.lineHeight * props.fontSize)}px)`;
|
|
43
42
|
});
|
|
44
43
|
const mergedLinesRef = computed(() => {
|
|
45
44
|
const { log } = props;
|
|
@@ -49,7 +48,7 @@ export default defineComponent({
|
|
|
49
48
|
return props.lines;
|
|
50
49
|
});
|
|
51
50
|
const scrollbarRef = ref(null);
|
|
52
|
-
const themeRef = useTheme('Log', '
|
|
51
|
+
const themeRef = useTheme('Log', '-log', style, logLight, props, mergedClsPrefixRef);
|
|
53
52
|
function handleScroll(e) {
|
|
54
53
|
const container = e.target;
|
|
55
54
|
const content = container.firstElementChild;
|
|
@@ -145,18 +144,13 @@ export default defineComponent({
|
|
|
145
144
|
trimRef: toRef(props, 'trim'),
|
|
146
145
|
highlightRef
|
|
147
146
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
styleHeight: styleHeightRef,
|
|
153
|
-
mergedLines: mergedLinesRef,
|
|
154
|
-
scrollTo,
|
|
155
|
-
scrollToTop,
|
|
147
|
+
const exportedMethods = {
|
|
148
|
+
scrollTo
|
|
149
|
+
};
|
|
150
|
+
return Object.assign(Object.assign({}, exportedMethods), { mergedClsPrefix: mergedClsPrefixRef, scrollbarRef, mergedTheme: themeRef, styleHeight: styleHeightRef, mergedLines: mergedLinesRef, scrollToTop,
|
|
156
151
|
scrollToBottom,
|
|
157
152
|
handleWheel,
|
|
158
|
-
handleScroll,
|
|
159
|
-
cssVars: computed(() => {
|
|
153
|
+
handleScroll, cssVars: computed(() => {
|
|
160
154
|
const { self: { loaderFontSize, loaderTextColor, loaderColor, loaderBorder, loadingColor }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
161
155
|
return {
|
|
162
156
|
'--n-bezier': cubicBezierEaseInOut,
|
|
@@ -166,8 +160,7 @@ export default defineComponent({
|
|
|
166
160
|
'--n-loader-text-color': loaderTextColor,
|
|
167
161
|
'--n-loading-color': loadingColor
|
|
168
162
|
};
|
|
169
|
-
})
|
|
170
|
-
};
|
|
163
|
+
}) });
|
|
171
164
|
},
|
|
172
165
|
render() {
|
|
173
166
|
const { mergedClsPrefix, mergedTheme } = this;
|
package/es/log/src/LogLine.js
CHANGED
|
@@ -12,10 +12,9 @@ export default cB('log', `
|
|
|
12
12
|
position: relative;
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
transition: border-color .3s var(--n-bezier);
|
|
15
|
-
`, [
|
|
16
|
-
margin: 0;
|
|
15
|
+
`, [c('pre', `
|
|
17
16
|
white-space: pre-wrap;
|
|
18
|
-
|
|
17
|
+
word-break: break-word;
|
|
19
18
|
margin: 0;
|
|
20
19
|
`), cB('log-loader', `
|
|
21
20
|
transition:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
|
+
import { FollowerPlacement } from 'vueuc';
|
|
3
4
|
import { RenderLabel } from '../../_internal/select-menu/src/interface';
|
|
4
5
|
import type { Size as InputSize } from '../../input/src/interface';
|
|
5
6
|
import type { SelectBaseOption, SelectGroupOption, SelectIgnoredOption } from '../../select/src/interface';
|
|
@@ -46,6 +47,10 @@ declare const mentionProps: {
|
|
|
46
47
|
readonly type: StringConstructor;
|
|
47
48
|
readonly default: "";
|
|
48
49
|
};
|
|
50
|
+
readonly placement: {
|
|
51
|
+
readonly type: PropType<FollowerPlacement>;
|
|
52
|
+
readonly default: "bottom-start";
|
|
53
|
+
};
|
|
49
54
|
readonly size: PropType<InputSize>;
|
|
50
55
|
readonly 'onUpdate:value': PropType<MaybeArray<(value: string) => void>>;
|
|
51
56
|
readonly renderLabel: PropType<RenderLabel>;
|
|
@@ -446,6 +451,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
446
451
|
readonly type: StringConstructor;
|
|
447
452
|
readonly default: "";
|
|
448
453
|
};
|
|
454
|
+
readonly placement: {
|
|
455
|
+
readonly type: PropType<FollowerPlacement>;
|
|
456
|
+
readonly default: "bottom-start";
|
|
457
|
+
};
|
|
449
458
|
readonly size: PropType<InputSize>;
|
|
450
459
|
readonly 'onUpdate:value': PropType<MaybeArray<(value: string) => void>>;
|
|
451
460
|
readonly renderLabel: PropType<RenderLabel>;
|
|
@@ -808,6 +817,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
808
817
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
809
818
|
mergedBordered: import("vue").ComputedRef<boolean>;
|
|
810
819
|
mergedSize: import("vue").ComputedRef<"small" | "medium" | "large" | "tiny">;
|
|
820
|
+
mergedStatus: import("vue").ComputedRef<import("../../form/src/interface").FormValidationStatus | undefined>;
|
|
811
821
|
mergedTheme: import("vue").ComputedRef<{
|
|
812
822
|
common: {
|
|
813
823
|
baseColor: string;
|
|
@@ -1136,6 +1146,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1136
1146
|
readonly type: StringConstructor;
|
|
1137
1147
|
readonly default: "";
|
|
1138
1148
|
};
|
|
1149
|
+
readonly placement: {
|
|
1150
|
+
readonly type: PropType<FollowerPlacement>;
|
|
1151
|
+
readonly default: "bottom-start";
|
|
1152
|
+
};
|
|
1139
1153
|
readonly size: PropType<InputSize>;
|
|
1140
1154
|
readonly 'onUpdate:value': PropType<MaybeArray<(value: string) => void>>;
|
|
1141
1155
|
readonly renderLabel: PropType<RenderLabel>;
|
|
@@ -1500,9 +1514,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1500
1514
|
disabled: boolean;
|
|
1501
1515
|
placeholder: string;
|
|
1502
1516
|
to: string | boolean | HTMLElement;
|
|
1503
|
-
loading: boolean;
|
|
1504
|
-
bordered: boolean | undefined;
|
|
1505
1517
|
options: MentionOption[];
|
|
1518
|
+
bordered: boolean | undefined;
|
|
1519
|
+
loading: boolean;
|
|
1520
|
+
placement: FollowerPlacement;
|
|
1506
1521
|
defaultValue: string;
|
|
1507
1522
|
internalDebug: boolean;
|
|
1508
1523
|
}>;
|
|
@@ -38,6 +38,9 @@ const mentionProps = Object.assign(Object.assign({}, useTheme.props), { to: useA
|
|
|
38
38
|
}, placeholder: {
|
|
39
39
|
type: String,
|
|
40
40
|
default: ''
|
|
41
|
+
}, placement: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: 'bottom-start'
|
|
41
44
|
}, size: String, 'onUpdate:value': [Array, Function], renderLabel: Function, onUpdateValue: [Array, Function], onSearch: Function, onSelect: Function, onFocus: Function, onBlur: Function,
|
|
42
45
|
// private
|
|
43
46
|
internalDebug: Boolean });
|
|
@@ -46,7 +49,7 @@ export default defineComponent({
|
|
|
46
49
|
props: mentionProps,
|
|
47
50
|
setup(props) {
|
|
48
51
|
const { namespaceRef, mergedClsPrefixRef, mergedBorderedRef } = useConfig(props);
|
|
49
|
-
const themeRef = useTheme('Mention', '
|
|
52
|
+
const themeRef = useTheme('Mention', '-mention', style, mentionLight, props, mergedClsPrefixRef);
|
|
50
53
|
const formItem = useFormItem(props);
|
|
51
54
|
const inputInstRef = ref(null);
|
|
52
55
|
const cursorRef = ref(null);
|
|
@@ -279,6 +282,7 @@ export default defineComponent({
|
|
|
279
282
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
280
283
|
mergedBordered: mergedBorderedRef,
|
|
281
284
|
mergedSize: formItem.mergedSizeRef,
|
|
285
|
+
mergedStatus: formItem.mergedStatusRef,
|
|
282
286
|
mergedTheme: themeRef,
|
|
283
287
|
treeMate: treeMateRef,
|
|
284
288
|
selectMenuInstRef,
|
|
@@ -308,7 +312,7 @@ export default defineComponent({
|
|
|
308
312
|
render() {
|
|
309
313
|
const { mergedTheme, mergedClsPrefix, $slots } = this;
|
|
310
314
|
return (h("div", { class: `${mergedClsPrefix}-mention` },
|
|
311
|
-
h(NInput, { themeOverrides: mergedTheme.peerOverrides.Input, theme: mergedTheme.peers.Input, size: this.mergedSize, autosize: this.autosize, type: this.type, ref: "inputInstRef", placeholder: this.placeholder, onMousedown: this.handleInputMouseDown, onUpdateValue: this.handleInputUpdateValue, onKeydown: this.handleInputKeyDown, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, bordered: this.mergedBordered, disabled: this.disabled, value: this.mergedValue }),
|
|
315
|
+
h(NInput, { status: this.mergedStatus, themeOverrides: mergedTheme.peerOverrides.Input, theme: mergedTheme.peers.Input, size: this.mergedSize, autosize: this.autosize, type: this.type, ref: "inputInstRef", placeholder: this.placeholder, onMousedown: this.handleInputMouseDown, onUpdateValue: this.handleInputUpdateValue, onKeydown: this.handleInputKeyDown, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, bordered: this.mergedBordered, disabled: this.disabled, value: this.mergedValue }),
|
|
312
316
|
h(VBinder, null, {
|
|
313
317
|
default: () => [
|
|
314
318
|
h(VTarget, null, {
|
|
@@ -326,7 +330,7 @@ export default defineComponent({
|
|
|
326
330
|
return h("div", { style: style, ref: "cursorRef" });
|
|
327
331
|
}
|
|
328
332
|
}),
|
|
329
|
-
h(VFollower, { ref: "followerRef", placement:
|
|
333
|
+
h(VFollower, { ref: "followerRef", placement: this.placement, show: this.showMenu, containerClass: this.namespace, to: this.adjustedTo, teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey }, {
|
|
330
334
|
default: () => (h(Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted }, {
|
|
331
335
|
default: () => {
|
|
332
336
|
const { mergedTheme } = this;
|
package/es/menu/src/Menu.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes, VNodeChild } from 'vue';
|
|
2
2
|
import { Key } from 'treemate';
|
|
3
3
|
import type { MaybeArray } from '../../_utils';
|
|
4
|
-
import { MenuInjection } from './use-menu-child';
|
|
5
4
|
import { MenuOption, MenuGroupOption, MenuIgnoredOption, MenuMixedOption, OnUpdateValue, OnUpdateKeys } from './interface';
|
|
6
5
|
import { FollowerPlacement } from 'vueuc';
|
|
7
6
|
import { DropdownProps } from '../../dropdown';
|
|
@@ -277,7 +276,6 @@ declare const menuProps: {
|
|
|
277
276
|
};
|
|
278
277
|
export declare type MenuSetupProps = ExtractPropTypes<typeof menuProps>;
|
|
279
278
|
export declare type MenuProps = Partial<MenuSetupProps>;
|
|
280
|
-
export declare const menuInjectionKey: import("vue").InjectionKey<MenuInjection>;
|
|
281
279
|
declare const _default: import("vue").DefineComponent<{
|
|
282
280
|
readonly options: {
|
|
283
281
|
readonly type: PropType<MenuMixedOption[]>;
|
|
@@ -578,7 +576,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
578
576
|
errorColor: string;
|
|
579
577
|
errorColorHover: string;
|
|
580
578
|
errorColorPressed: string;
|
|
581
|
-
errorColorSuppl: string;
|
|
579
|
+
errorColorSuppl: string;
|
|
582
580
|
textColorBase: string;
|
|
583
581
|
textColor1: string;
|
|
584
582
|
textColor2: string;
|
|
@@ -1020,9 +1018,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1020
1018
|
}>>, {
|
|
1021
1019
|
mode: "horizontal" | "vertical";
|
|
1022
1020
|
disabled: boolean;
|
|
1021
|
+
options: MenuMixedOption[];
|
|
1023
1022
|
keyField: string;
|
|
1024
1023
|
iconSize: number;
|
|
1025
|
-
options: MenuMixedOption[];
|
|
1026
1024
|
defaultValue: Key | null;
|
|
1027
1025
|
indent: number;
|
|
1028
1026
|
labelField: string;
|
package/es/menu/src/Menu.js
CHANGED
|
@@ -2,12 +2,13 @@ import { h, ref, toRef, computed, defineComponent, provide, inject, watchEffect
|
|
|
2
2
|
import { createTreeMate } from 'treemate';
|
|
3
3
|
import { useCompitable, useMergedState } from 'vooks';
|
|
4
4
|
import { useConfig, useTheme } from '../../_mixins';
|
|
5
|
-
import { call
|
|
5
|
+
import { call } from '../../_utils';
|
|
6
6
|
import { itemRenderer } from './utils';
|
|
7
7
|
import { menuLight } from '../styles';
|
|
8
8
|
import style from './styles/index.cssr';
|
|
9
9
|
import { layoutSiderInjectionKey } from '../../layout/src/interface';
|
|
10
10
|
import { useCheckDeprecated } from './useCheckDeprecated';
|
|
11
|
+
import { menuInjectionKey } from './context';
|
|
11
12
|
const menuProps = Object.assign(Object.assign({}, useTheme.props), { options: {
|
|
12
13
|
type: Array,
|
|
13
14
|
default: () => []
|
|
@@ -52,7 +53,6 @@ const menuProps = Object.assign(Object.assign({}, useTheme.props), { options: {
|
|
|
52
53
|
}, dropdownProps: Object, accordion: Boolean,
|
|
53
54
|
// deprecated
|
|
54
55
|
items: Array, onOpenNamesChange: [Function, Array], onSelect: [Function, Array], onExpandedNamesChange: [Function, Array], expandedNames: Array, defaultExpandedNames: Array });
|
|
55
|
-
export const menuInjectionKey = createInjectionKey('n-menu');
|
|
56
56
|
export default defineComponent({
|
|
57
57
|
name: 'Menu',
|
|
58
58
|
props: menuProps,
|
|
@@ -61,7 +61,7 @@ export default defineComponent({
|
|
|
61
61
|
useCheckDeprecated(props);
|
|
62
62
|
}
|
|
63
63
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
64
|
-
const themeRef = useTheme('Menu', '
|
|
64
|
+
const themeRef = useTheme('Menu', '-menu', style, menuLight, props, mergedClsPrefixRef);
|
|
65
65
|
const layoutSider = inject(layoutSiderInjectionKey, null);
|
|
66
66
|
const mergedCollapsedRef = computed(() => {
|
|
67
67
|
var _a;
|
|
@@ -21,7 +21,7 @@ export declare const menuItemProps: {
|
|
|
21
21
|
readonly title: PropType<string | (() => import("vue").VNodeChild)>;
|
|
22
22
|
readonly extra: PropType<string | (() => import("vue").VNodeChild)>;
|
|
23
23
|
};
|
|
24
|
-
declare const
|
|
24
|
+
export declare const NMenuOption: import("vue").DefineComponent<{
|
|
25
25
|
readonly tmNode: {
|
|
26
26
|
readonly type: PropType<TmNode>;
|
|
27
27
|
readonly required: true;
|
|
@@ -268,4 +268,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
268
268
|
disabled: boolean;
|
|
269
269
|
isGroup: boolean;
|
|
270
270
|
}>;
|
|
271
|
-
export default _default;
|
|
@@ -9,7 +9,7 @@ export const menuItemProps = Object.assign(Object.assign({}, useMenuChildProps),
|
|
|
9
9
|
type: Object,
|
|
10
10
|
required: true
|
|
11
11
|
}, disabled: Boolean, icon: Function, onClick: Function });
|
|
12
|
-
export
|
|
12
|
+
export const NMenuOption = defineComponent({
|
|
13
13
|
name: 'MenuOption',
|
|
14
14
|
props: menuItemProps,
|
|
15
15
|
setup(props) {
|
|
@@ -2,7 +2,7 @@ import { computed, defineComponent, h, inject } from 'vue';
|
|
|
2
2
|
import { ChevronDownFilledIcon } from '../../_internal/icons';
|
|
3
3
|
import { render } from '../../_utils';
|
|
4
4
|
import { NBaseIcon } from '../../_internal';
|
|
5
|
-
import { menuInjectionKey } from './
|
|
5
|
+
import { menuInjectionKey } from './context';
|
|
6
6
|
export default defineComponent({
|
|
7
7
|
name: 'MenuOptionContent',
|
|
8
8
|
props: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import type { MenuOptionGroupInjection } from './use-menu-child';
|
|
3
2
|
import { TmNode } from './interface';
|
|
4
3
|
export declare const menuItemGroupProps: {
|
|
5
4
|
readonly tmNodes: {
|
|
@@ -19,8 +18,7 @@ export declare const menuItemGroupProps: {
|
|
|
19
18
|
readonly title: PropType<string | (() => import("vue").VNodeChild)>;
|
|
20
19
|
readonly extra: PropType<string | (() => import("vue").VNodeChild)>;
|
|
21
20
|
};
|
|
22
|
-
export declare const
|
|
23
|
-
declare const _default: import("vue").DefineComponent<{
|
|
21
|
+
export declare const NMenuOptionGroup: import("vue").DefineComponent<{
|
|
24
22
|
readonly tmNodes: {
|
|
25
23
|
readonly type: PropType<TmNode[]>;
|
|
26
24
|
readonly required: true;
|
|
@@ -58,4 +56,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
56
|
root: boolean;
|
|
59
57
|
isGroup: boolean;
|
|
60
58
|
}>;
|
|
61
|
-
export default _default;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { h, defineComponent, provide, Fragment, inject } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { render } from '../../_utils';
|
|
3
3
|
import { useMenuChild } from './use-menu-child';
|
|
4
4
|
import { useMenuChildProps } from './use-menu-child-props';
|
|
5
|
+
// eslint-disable-next-line import/no-cycle
|
|
5
6
|
import { itemRenderer } from './utils';
|
|
6
|
-
import { submenuInjectionKey } from './
|
|
7
|
-
import { menuInjectionKey } from './Menu';
|
|
7
|
+
import { submenuInjectionKey, menuInjectionKey, menuItemGroupInjectionKey } from './context';
|
|
8
8
|
export const menuItemGroupProps = Object.assign(Object.assign({}, useMenuChildProps), { tmNodes: {
|
|
9
9
|
type: Array,
|
|
10
10
|
required: true
|
|
11
11
|
} });
|
|
12
|
-
export const
|
|
13
|
-
export default defineComponent({
|
|
12
|
+
export const NMenuOptionGroup = defineComponent({
|
|
14
13
|
name: 'MenuOptionGroup',
|
|
15
14
|
props: menuItemGroupProps,
|
|
16
15
|
setup(props) {
|
package/es/menu/src/Submenu.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropType, VNodeChild } from 'vue';
|
|
2
|
-
import type { SubmenuInjection } from './use-menu-child';
|
|
3
2
|
import { MenuMixedOption, TmNode } from './interface';
|
|
4
3
|
export declare const submenuProps: {
|
|
5
4
|
readonly rawNodes: {
|
|
@@ -33,8 +32,7 @@ export declare const submenuProps: {
|
|
|
33
32
|
readonly title: PropType<string | (() => VNodeChild)>;
|
|
34
33
|
readonly extra: PropType<string | (() => VNodeChild)>;
|
|
35
34
|
};
|
|
36
|
-
export declare const
|
|
37
|
-
declare const _default: import("vue").DefineComponent<{
|
|
35
|
+
export declare const NSubmenu: import("vue").DefineComponent<{
|
|
38
36
|
readonly rawNodes: {
|
|
39
37
|
readonly type: PropType<MenuMixedOption[]>;
|
|
40
38
|
readonly default: () => never[];
|
|
@@ -122,4 +120,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
120
|
tmNodes: TmNode[];
|
|
123
121
|
rawNodes: MenuMixedOption[];
|
|
124
122
|
}>;
|
|
125
|
-
export default _default;
|
package/es/menu/src/Submenu.js
CHANGED
|
@@ -3,11 +3,11 @@ import { useMemo } from 'vooks';
|
|
|
3
3
|
import { NFadeInExpandTransition } from '../../_internal';
|
|
4
4
|
import { NDropdown } from '../../dropdown';
|
|
5
5
|
import NMenuOptionContent from './MenuOptionContent';
|
|
6
|
+
// eslint-disable-next-line import/no-cycle
|
|
6
7
|
import { itemRenderer } from './utils';
|
|
7
8
|
import { useMenuChild } from './use-menu-child';
|
|
8
9
|
import { useMenuChildProps } from './use-menu-child-props';
|
|
9
|
-
import { menuItemGroupInjectionKey } from './
|
|
10
|
-
import { createInjectionKey } from '../../_utils';
|
|
10
|
+
import { menuItemGroupInjectionKey, submenuInjectionKey } from './context';
|
|
11
11
|
export const submenuProps = Object.assign(Object.assign({}, useMenuChildProps), { rawNodes: {
|
|
12
12
|
type: Array,
|
|
13
13
|
default: () => []
|
|
@@ -21,8 +21,7 @@ export const submenuProps = Object.assign(Object.assign({}, useMenuChildProps),
|
|
|
21
21
|
type: Boolean,
|
|
22
22
|
default: false
|
|
23
23
|
}, icon: Function, onClick: Function });
|
|
24
|
-
export const
|
|
25
|
-
export default defineComponent({
|
|
24
|
+
export const NSubmenu = defineComponent({
|
|
26
25
|
name: 'Submenu',
|
|
27
26
|
props: submenuProps,
|
|
28
27
|
setup(props) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MenuInjection, MenuOptionGroupInjection, SubmenuInjection } from './use-menu-child';
|
|
2
|
+
export declare const menuInjectionKey: import("vue").InjectionKey<MenuInjection>;
|
|
3
|
+
export declare const submenuInjectionKey: import("vue").InjectionKey<SubmenuInjection>;
|
|
4
|
+
export declare const menuItemGroupInjectionKey: import("vue").InjectionKey<MenuOptionGroupInjection>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { inject, computed } from 'vue';
|
|
2
|
-
import { menuInjectionKey } from './
|
|
3
|
-
import { menuItemGroupInjectionKey } from './MenuOptionGroup';
|
|
4
|
-
import { submenuInjectionKey } from './Submenu';
|
|
2
|
+
import { menuInjectionKey, submenuInjectionKey, menuItemGroupInjectionKey } from './context';
|
|
5
3
|
const ICON_MARGIN_RIGHT = 8;
|
|
6
4
|
export function useMenuChild(props) {
|
|
7
5
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MenuSetupProps } from './Menu';
|
|
1
|
+
import type { MenuSetupProps } from './Menu';
|
|
2
2
|
export declare function useCheckDeprecated(props: MenuSetupProps): void;
|
package/es/menu/src/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
import type { TreeNode } from 'treemate';
|
|
3
3
|
import { MenuOption, MenuGroupOption, MenuIgnoredOption, MenuMixedOption } from './interface';
|
|
4
|
-
import { MenuSetupProps } from './Menu';
|
|
4
|
+
import type { MenuSetupProps } from './Menu';
|
|
5
5
|
export declare function isIgnoredNode(rawNode: MenuMixedOption): rawNode is MenuIgnoredOption;
|
|
6
6
|
export declare function isDividerNode(rawNode: MenuMixedOption): rawNode is MenuIgnoredOption;
|
|
7
7
|
export declare function itemRenderer(tmNode: TreeNode<MenuOption, MenuGroupOption, MenuIgnoredOption>, menuProps: MenuSetupProps): VNode | undefined;
|
package/es/menu/src/utils.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { h } from 'vue';
|
|
2
2
|
import { keep, keysOf } from '../../_utils';
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
3
|
+
// eslint-disable-next-line import/no-cycle
|
|
4
|
+
import { NMenuOptionGroup, menuItemGroupProps } from './MenuOptionGroup';
|
|
5
|
+
// eslint-disable-next-line import/no-cycle
|
|
6
|
+
import { NSubmenu, submenuProps } from './Submenu';
|
|
7
|
+
import { NMenuOption, menuItemProps } from './MenuOption';
|
|
6
8
|
import NMenuDivider from './MenuDivider';
|
|
7
9
|
const groupPropKeys = keysOf(menuItemGroupProps);
|
|
8
10
|
const itemPropKeys = keysOf(menuItemProps);
|