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,10 +1,12 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { FormValidationStatus } from '../form/src/interface';
|
|
2
3
|
declare type FormItemSize = 'small' | 'medium' | 'large';
|
|
3
4
|
declare type AllowedSize = 'tiny' | 'small' | 'medium' | 'large' | 'huge' | number;
|
|
4
5
|
export interface FormItemInjection {
|
|
5
6
|
path: Ref<string | undefined>;
|
|
6
7
|
disabled: Ref<boolean>;
|
|
7
8
|
mergedSize: ComputedRef<FormItemSize>;
|
|
9
|
+
mergedValidationStatus: ComputedRef<FormValidationStatus | undefined>;
|
|
8
10
|
restoreValidation: () => void;
|
|
9
11
|
handleContentBlur: () => void;
|
|
10
12
|
handleContentFocus: () => void;
|
|
@@ -20,10 +22,12 @@ interface UseFormItemOptions<T> {
|
|
|
20
22
|
interface UseFormItemProps<T> {
|
|
21
23
|
size?: T;
|
|
22
24
|
disabled?: boolean;
|
|
25
|
+
status?: FormValidationStatus;
|
|
23
26
|
}
|
|
24
27
|
export interface UseFormItem<T> {
|
|
25
28
|
mergedSizeRef: ComputedRef<T>;
|
|
26
29
|
mergedDisabledRef: ComputedRef<boolean>;
|
|
30
|
+
mergedStatusRef: ComputedRef<FormValidationStatus | undefined>;
|
|
27
31
|
nTriggerFormBlur: () => void;
|
|
28
32
|
nTriggerFormChange: () => void;
|
|
29
33
|
nTriggerFormFocus: () => void;
|
|
@@ -33,6 +33,12 @@ function useFormItem(props, { defaultSize = 'medium', mergedSize, mergedDisabled
|
|
|
33
33
|
}
|
|
34
34
|
return false;
|
|
35
35
|
});
|
|
36
|
+
const mergedStatusRef = (0, vue_1.computed)(() => {
|
|
37
|
+
const { status } = props;
|
|
38
|
+
if (status)
|
|
39
|
+
return status;
|
|
40
|
+
return NFormItem === null || NFormItem === void 0 ? void 0 : NFormItem.mergedValidationStatus.value;
|
|
41
|
+
});
|
|
36
42
|
(0, vue_1.onBeforeUnmount)(() => {
|
|
37
43
|
if (NFormItem) {
|
|
38
44
|
NFormItem.restoreValidation();
|
|
@@ -41,6 +47,7 @@ function useFormItem(props, { defaultSize = 'medium', mergedSize, mergedDisabled
|
|
|
41
47
|
return {
|
|
42
48
|
mergedSizeRef,
|
|
43
49
|
mergedDisabledRef,
|
|
50
|
+
mergedStatusRef,
|
|
44
51
|
nTriggerFormBlur() {
|
|
45
52
|
if (NFormItem) {
|
|
46
53
|
NFormItem.handleContentBlur();
|
package/lib/_mixins/use-hljs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const vue_1 = require("vue");
|
|
4
|
-
const
|
|
4
|
+
const context_1 = require("../config-provider/src/context");
|
|
5
5
|
const _utils_1 = require("../_utils");
|
|
6
6
|
function useHljs(props, shouldHighlightRef) {
|
|
7
|
-
const NConfigProvider = (0, vue_1.inject)(
|
|
7
|
+
const NConfigProvider = (0, vue_1.inject)(context_1.configProviderInjectionKey, null);
|
|
8
8
|
if (process.env.NODE_ENV !== 'production') {
|
|
9
9
|
const warnHljs = () => {
|
|
10
10
|
if (!props.hljs && !(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedHljsRef.value)) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const vue_1 = require("vue");
|
|
4
4
|
const locales_1 = require("../locales");
|
|
5
|
-
const
|
|
5
|
+
const context_1 = require("../config-provider/src/context");
|
|
6
6
|
function useLocale(ns) {
|
|
7
|
-
const { mergedLocaleRef, mergedDateLocaleRef } = (0, vue_1.inject)(
|
|
7
|
+
const { mergedLocaleRef, mergedDateLocaleRef } = (0, vue_1.inject)(context_1.configProviderInjectionKey, null) || {};
|
|
8
8
|
const localeRef = (0, vue_1.computed)(() => {
|
|
9
9
|
var _a, _b;
|
|
10
10
|
return (_b = (_a = mergedLocaleRef === null || mergedLocaleRef === void 0 ? void 0 : mergedLocaleRef.value) === null || _a === void 0 ? void 0 : _a[ns]) !== null && _b !== void 0 ? _b : locales_1.enUS[ns];
|
package/lib/_mixins/use-style.js
CHANGED
|
@@ -42,7 +42,7 @@ export declare type MergedTheme<T> = T extends Theme<unknown, infer V, infer W>
|
|
|
42
42
|
peers: W;
|
|
43
43
|
peerOverrides: ExtractMergedPeerOverrides<T>;
|
|
44
44
|
} : T;
|
|
45
|
-
declare function useTheme<N, T, R>(resolveId: Exclude<keyof GlobalTheme, 'common'>, mountId: string, style: CNode | undefined, defaultTheme: Theme<N, T, R>, props: UseThemeProps<Theme<N, T, R>>, clsPrefixRef?: Ref<string | undefined>): ComputedRef<MergedTheme<Theme<N, T, R>>>;
|
|
45
|
+
declare function useTheme<N, T, R>(resolveId: Exclude<keyof GlobalTheme, 'common' | 'name'>, mountId: string, style: CNode | undefined, defaultTheme: Theme<N, T, R>, props: UseThemeProps<Theme<N, T, R>>, clsPrefixRef?: Ref<string | undefined>): ComputedRef<MergedTheme<Theme<N, T, R>>>;
|
|
46
46
|
declare namespace useTheme {
|
|
47
47
|
var props: {
|
|
48
48
|
readonly theme: ObjectConstructor;
|
package/lib/_mixins/use-theme.js
CHANGED
|
@@ -9,7 +9,7 @@ const vue_1 = require("vue");
|
|
|
9
9
|
const lodash_1 = require("lodash");
|
|
10
10
|
const vue3_ssr_1 = require("@css-render/vue3-ssr");
|
|
11
11
|
const index_cssr_1 = __importDefault(require("../_styles/global/index.cssr"));
|
|
12
|
-
const
|
|
12
|
+
const context_1 = require("../config-provider/src/context");
|
|
13
13
|
const common_1 = require("./common");
|
|
14
14
|
function createTheme(theme) {
|
|
15
15
|
return theme;
|
|
@@ -30,7 +30,7 @@ function useTheme(resolveId, mountId, style, defaultTheme, props, clsPrefixRef)
|
|
|
30
30
|
ssr: ssrAdapter
|
|
31
31
|
});
|
|
32
32
|
index_cssr_1.default.mount({
|
|
33
|
-
id: '
|
|
33
|
+
id: 'n-global',
|
|
34
34
|
head: true,
|
|
35
35
|
anchorMetaName: common_1.cssrAnchorMetaName,
|
|
36
36
|
ssr: ssrAdapter
|
|
@@ -43,7 +43,7 @@ function useTheme(resolveId, mountId, style, defaultTheme, props, clsPrefixRef)
|
|
|
43
43
|
(0, vue_1.onBeforeMount)(mountStyle);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
const NConfigProvider = (0, vue_1.inject)(
|
|
46
|
+
const NConfigProvider = (0, vue_1.inject)(context_1.configProviderInjectionKey, null);
|
|
47
47
|
const mergedThemeRef = (0, vue_1.computed)(() => {
|
|
48
48
|
var _a;
|
|
49
49
|
// keep props to make theme overrideable
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function color2Class(color: string): string;
|
|
@@ -3,5 +3,5 @@ interface FormatLengthOptions {
|
|
|
3
3
|
offset?: number;
|
|
4
4
|
attachPx?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare function formatLength<T extends number | string | null | undefined | any>(length: T, { c, offset, attachPx }?: FormatLengthOptions): T extends null ? null : T extends undefined ? undefined : T extends string | number ? string : T;
|
|
7
|
-
export
|
|
6
|
+
export declare function formatLength<T extends number | string | null | undefined | any>(length: T, { c, offset, attachPx }?: FormatLengthOptions): T extends null ? null : T extends undefined ? undefined : T extends string | number ? string : T;
|
|
7
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatLength = void 0;
|
|
3
4
|
const pureNumberRegex = /^(\d|\.)+$/;
|
|
4
5
|
const numberRegex = /(\d|\.)+/;
|
|
5
6
|
function formatLength(length, { c = 1, offset = 0, attachPx = true } = {}) {
|
|
@@ -30,4 +31,4 @@ function formatLength(length, { c = 1, offset = 0, attachPx = true } = {}) {
|
|
|
30
31
|
}
|
|
31
32
|
return length;
|
|
32
33
|
}
|
|
33
|
-
exports.
|
|
34
|
+
exports.formatLength = formatLength;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { formatLength } from './format-length';
|
|
2
|
+
export { color2Class } from './color-to-class';
|
package/lib/_utils/css/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.formatLength = void 0;
|
|
3
|
+
exports.color2Class = exports.formatLength = void 0;
|
|
7
4
|
var format_length_1 = require("./format-length");
|
|
8
|
-
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return
|
|
5
|
+
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return format_length_1.formatLength; } });
|
|
6
|
+
var color_to_class_1 = require("./color-to-class");
|
|
7
|
+
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return color_to_class_1.color2Class; } });
|
|
@@ -3,10 +3,9 @@ declare const namespace = "n";
|
|
|
3
3
|
declare const prefix: string;
|
|
4
4
|
declare const c: import("css-render").createCNode<import("css-render").CSelector>, find: import("css-render").CFindTarget;
|
|
5
5
|
declare const cB: import("css-render").createCNode<string | import("css-render").CLazySelector<string>>, cE: import("css-render").createCNode<string | import("css-render").CLazySelector<string>>, cM: import("css-render").createCNode<string | import("css-render").CLazySelector<string>>, cNotM: import("css-render").createCNode<string | import("css-render").CLazySelector<string>>;
|
|
6
|
-
declare function insideFormItem(status: string | null, style: CNode): CNode;
|
|
7
6
|
declare function insideModal(style: CNode): CNode;
|
|
8
7
|
declare function insidePopover(style: CNode): CNode;
|
|
9
8
|
declare function asModal(style: CProperties): CNode;
|
|
10
9
|
declare const cCB: typeof cB;
|
|
11
|
-
export { c, cB, cE, cM, cNotM, cCB,
|
|
10
|
+
export { c, cB, cE, cM, cNotM, cCB, insideModal, insidePopover, asModal, prefix, namespace, find };
|
|
12
11
|
export { createKey } from './create-key';
|
package/lib/_utils/cssr/index.js
CHANGED
|
@@ -3,7 +3,7 @@ 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.createKey = exports.find = exports.namespace = exports.prefix = exports.asModal = exports.insidePopover = exports.insideModal = exports.
|
|
6
|
+
exports.createKey = exports.find = exports.namespace = exports.prefix = exports.asModal = exports.insidePopover = exports.insideModal = exports.cCB = exports.cNotM = exports.cM = exports.cE = exports.cB = exports.c = void 0;
|
|
7
7
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
8
8
|
const css_render_1 = __importDefault(require("css-render"));
|
|
9
9
|
const plugin_bem_1 = __importDefault(require("@css-render/plugin-bem"));
|
|
@@ -28,20 +28,6 @@ exports.cB = cB;
|
|
|
28
28
|
exports.cE = cE;
|
|
29
29
|
exports.cM = cM;
|
|
30
30
|
exports.cNotM = cNotM;
|
|
31
|
-
function insideFormItem(status, style) {
|
|
32
|
-
if (status === null)
|
|
33
|
-
return style;
|
|
34
|
-
return c([
|
|
35
|
-
({ props: { bPrefix } }) => c(`${bPrefix || prefix}form-item`, [
|
|
36
|
-
c(`${bPrefix || prefix}form-item-blank`, [
|
|
37
|
-
c(`&${bPrefix || prefix}form-item-blank${modifierPrefix}${status}`, [
|
|
38
|
-
style
|
|
39
|
-
])
|
|
40
|
-
])
|
|
41
|
-
])
|
|
42
|
-
]);
|
|
43
|
-
}
|
|
44
|
-
exports.insideFormItem = insideFormItem;
|
|
45
31
|
function insideModal(style) {
|
|
46
32
|
return c(({ props: { bPrefix } }) => `${bPrefix || prefix}modal, ${bPrefix || prefix}drawer`, [style]);
|
|
47
33
|
}
|
package/lib/_utils/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, getFirstSlotVNode, createDataKey, createRefSetter, createInjectionKey } from './vue';
|
|
1
|
+
export { call, keep, omit, flatten, getSlot, getVNodeChildren, keysOf, render, getFirstSlotVNode, createDataKey, createRefSetter, createInjectionKey, resolveSlot, resolveSlotWithProps, resolveWrappedSlot, isSlotEmpty } from './vue';
|
|
2
2
|
export type { MaybeArray } from './vue';
|
|
3
3
|
export { warn, warnOnce, throwError, smallerSize, largerSize, getTitleAttribute } from './naive';
|
|
4
4
|
export type { ExtractPublicPropTypes, ExtractInternalPropTypes, Mutable } from './naive';
|
|
5
|
-
export { formatLength } from './css';
|
|
5
|
+
export { formatLength, color2Class } from './css';
|
|
6
6
|
export { createKey } from './cssr';
|
|
7
7
|
export * from './composable';
|
package/lib/_utils/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createKey = exports.formatLength = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
13
|
+
exports.createKey = exports.color2Class = exports.formatLength = exports.getTitleAttribute = exports.largerSize = exports.smallerSize = exports.throwError = exports.warnOnce = exports.warn = exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.getVNodeChildren = exports.getSlot = exports.flatten = exports.omit = exports.keep = exports.call = void 0;
|
|
14
14
|
var vue_1 = require("./vue");
|
|
15
15
|
Object.defineProperty(exports, "call", { enumerable: true, get: function () { return vue_1.call; } });
|
|
16
16
|
Object.defineProperty(exports, "keep", { enumerable: true, get: function () { return vue_1.keep; } });
|
|
@@ -24,6 +24,10 @@ Object.defineProperty(exports, "getFirstSlotVNode", { enumerable: true, get: fun
|
|
|
24
24
|
Object.defineProperty(exports, "createDataKey", { enumerable: true, get: function () { return vue_1.createDataKey; } });
|
|
25
25
|
Object.defineProperty(exports, "createRefSetter", { enumerable: true, get: function () { return vue_1.createRefSetter; } });
|
|
26
26
|
Object.defineProperty(exports, "createInjectionKey", { enumerable: true, get: function () { return vue_1.createInjectionKey; } });
|
|
27
|
+
Object.defineProperty(exports, "resolveSlot", { enumerable: true, get: function () { return vue_1.resolveSlot; } });
|
|
28
|
+
Object.defineProperty(exports, "resolveSlotWithProps", { enumerable: true, get: function () { return vue_1.resolveSlotWithProps; } });
|
|
29
|
+
Object.defineProperty(exports, "resolveWrappedSlot", { enumerable: true, get: function () { return vue_1.resolveWrappedSlot; } });
|
|
30
|
+
Object.defineProperty(exports, "isSlotEmpty", { enumerable: true, get: function () { return vue_1.isSlotEmpty; } });
|
|
27
31
|
var naive_1 = require("./naive");
|
|
28
32
|
Object.defineProperty(exports, "warn", { enumerable: true, get: function () { return naive_1.warn; } });
|
|
29
33
|
Object.defineProperty(exports, "warnOnce", { enumerable: true, get: function () { return naive_1.warnOnce; } });
|
|
@@ -33,6 +37,7 @@ Object.defineProperty(exports, "largerSize", { enumerable: true, get: function (
|
|
|
33
37
|
Object.defineProperty(exports, "getTitleAttribute", { enumerable: true, get: function () { return naive_1.getTitleAttribute; } });
|
|
34
38
|
var css_1 = require("./css");
|
|
35
39
|
Object.defineProperty(exports, "formatLength", { enumerable: true, get: function () { return css_1.formatLength; } });
|
|
40
|
+
Object.defineProperty(exports, "color2Class", { enumerable: true, get: function () { return css_1.color2Class; } });
|
|
36
41
|
var cssr_1 = require("./cssr");
|
|
37
42
|
Object.defineProperty(exports, "createKey", { enumerable: true, get: function () { return cssr_1.createKey; } });
|
|
38
43
|
__exportStar(require("./composable"), exports);
|
|
@@ -10,5 +10,5 @@ export { getFirstSlotVNode } from './get-first-slot-vnode';
|
|
|
10
10
|
export { createDataKey } from './create-data-key';
|
|
11
11
|
export { createRefSetter } from './create-ref-setter';
|
|
12
12
|
export { createInjectionKey } from './create-injection-key';
|
|
13
|
-
export { resolveSlot } from './resolve-slot';
|
|
13
|
+
export { resolveSlot, resolveWrappedSlot, resolveSlotWithProps, isSlotEmpty } from './resolve-slot';
|
|
14
14
|
export type { MaybeArray } from './call';
|
package/lib/_utils/vue/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.call = exports.flatten = exports.omit = exports.keep = exports.getVNodeChildren = exports.getSlot = void 0;
|
|
3
|
+
exports.isSlotEmpty = exports.resolveSlotWithProps = exports.resolveWrappedSlot = exports.resolveSlot = exports.createInjectionKey = exports.createRefSetter = exports.createDataKey = exports.getFirstSlotVNode = exports.render = exports.keysOf = exports.call = exports.flatten = exports.omit = exports.keep = exports.getVNodeChildren = exports.getSlot = void 0;
|
|
4
4
|
var get_slot_1 = require("./get-slot");
|
|
5
5
|
Object.defineProperty(exports, "getSlot", { enumerable: true, get: function () { return get_slot_1.getSlot; } });
|
|
6
6
|
var get_v_node_children_1 = require("./get-v-node-children");
|
|
@@ -27,3 +27,6 @@ var create_injection_key_1 = require("./create-injection-key");
|
|
|
27
27
|
Object.defineProperty(exports, "createInjectionKey", { enumerable: true, get: function () { return create_injection_key_1.createInjectionKey; } });
|
|
28
28
|
var resolve_slot_1 = require("./resolve-slot");
|
|
29
29
|
Object.defineProperty(exports, "resolveSlot", { enumerable: true, get: function () { return resolve_slot_1.resolveSlot; } });
|
|
30
|
+
Object.defineProperty(exports, "resolveWrappedSlot", { enumerable: true, get: function () { return resolve_slot_1.resolveWrappedSlot; } });
|
|
31
|
+
Object.defineProperty(exports, "resolveSlotWithProps", { enumerable: true, get: function () { return resolve_slot_1.resolveSlotWithProps; } });
|
|
32
|
+
Object.defineProperty(exports, "isSlotEmpty", { enumerable: true, get: function () { return resolve_slot_1.isSlotEmpty; } });
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import { Slot,
|
|
2
|
-
|
|
1
|
+
import { Slot, VNodeArrayChildren } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* We shouldn't use the following functions with slot flags `_: 1, 2, 3`
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveSlot(slot: Slot | undefined, fallback: () => VNodeArrayChildren): VNodeArrayChildren;
|
|
6
|
+
export declare function resolveSlotWithProps<T>(slot: Slot | undefined, props: T, fallback: (props: T) => VNodeArrayChildren): VNodeArrayChildren;
|
|
7
|
+
export declare function resolveWrappedSlot(slot: Slot | undefined, wrapper: (children: VNodeArrayChildren) => VNodeArrayChildren): VNodeArrayChildren | null;
|
|
8
|
+
export declare function isSlotEmpty(slot: Slot | undefined): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveSlot = void 0;
|
|
3
|
+
exports.isSlotEmpty = exports.resolveWrappedSlot = exports.resolveSlotWithProps = exports.resolveSlot = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
function ensureValidVNode(vnodes) {
|
|
6
6
|
return vnodes.some((child) => {
|
|
@@ -10,7 +10,8 @@ function ensureValidVNode(vnodes) {
|
|
|
10
10
|
if (child.type === vue_1.Comment) {
|
|
11
11
|
return false;
|
|
12
12
|
}
|
|
13
|
-
if (child.type === vue_1.Fragment &&
|
|
13
|
+
if (child.type === vue_1.Fragment &&
|
|
14
|
+
!ensureValidVNode(child.children)) {
|
|
14
15
|
return false;
|
|
15
16
|
}
|
|
16
17
|
return true;
|
|
@@ -18,7 +19,25 @@ function ensureValidVNode(vnodes) {
|
|
|
18
19
|
? vnodes
|
|
19
20
|
: null;
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* We shouldn't use the following functions with slot flags `_: 1, 2, 3`
|
|
24
|
+
*/
|
|
21
25
|
function resolveSlot(slot, fallback) {
|
|
22
26
|
return (slot && ensureValidVNode(slot())) || fallback();
|
|
23
27
|
}
|
|
24
28
|
exports.resolveSlot = resolveSlot;
|
|
29
|
+
function resolveSlotWithProps(slot, props, fallback) {
|
|
30
|
+
return (slot && ensureValidVNode(slot(props))) || fallback(props);
|
|
31
|
+
}
|
|
32
|
+
exports.resolveSlotWithProps = resolveSlotWithProps;
|
|
33
|
+
function resolveWrappedSlot(slot, wrapper) {
|
|
34
|
+
const children = slot && ensureValidVNode(slot());
|
|
35
|
+
if (children)
|
|
36
|
+
return wrapper(children);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
exports.resolveWrappedSlot = resolveWrappedSlot;
|
|
40
|
+
function isSlotEmpty(slot) {
|
|
41
|
+
return !(slot && ensureValidVNode(slot()));
|
|
42
|
+
}
|
|
43
|
+
exports.isSlotEmpty = isSlotEmpty;
|
package/lib/affix/src/Affix.js
CHANGED
|
@@ -58,7 +58,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
58
58
|
props: exports.affixProps,
|
|
59
59
|
setup(props) {
|
|
60
60
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
61
|
-
(0, _mixins_1.useStyle)('
|
|
61
|
+
(0, _mixins_1.useStyle)('-affix', index_cssr_1.default, mergedClsPrefixRef);
|
|
62
62
|
let scrollTarget = null;
|
|
63
63
|
const stickToTopRef = (0, vue_1.ref)(false);
|
|
64
64
|
const stickToBottomRef = (0, vue_1.ref)(false);
|
package/lib/alert/src/Alert.js
CHANGED
|
@@ -42,7 +42,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
42
42
|
props: alertProps,
|
|
43
43
|
setup(props) {
|
|
44
44
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
45
|
-
const themeRef = (0, _mixins_1.useTheme)('Alert', '
|
|
45
|
+
const themeRef = (0, _mixins_1.useTheme)('Alert', '-alert', index_cssr_1.default, styles_1.alertLight, props, mergedClsPrefixRef);
|
|
46
46
|
const cssVars = (0, vue_1.computed)(() => {
|
|
47
47
|
const { common: { cubicBezierEaseInOut }, self } = themeRef.value;
|
|
48
48
|
const { fontSize, borderRadius, titleFontWeight, lineHeight, iconSize, iconMargin, closeSize, closeMargin, padding } = self;
|
|
@@ -36,7 +36,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
36
36
|
props: anchorProps,
|
|
37
37
|
setup(props, { slots }) {
|
|
38
38
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
39
|
-
const themeRef = (0, _mixins_1.useTheme)('Anchor', '
|
|
39
|
+
const themeRef = (0, _mixins_1.useTheme)('Anchor', '-anchor', index_cssr_1.default, styles_1.anchorLight, props, mergedClsPrefixRef);
|
|
40
40
|
const anchorRef = (0, vue_1.ref)(null);
|
|
41
41
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
42
42
|
const { self: { railColor, linkColor, railColorActive, linkTextColor, linkTextColorHover, linkTextColorPressed, linkTextColorActive, linkFontSize, railWidth, linkPadding, borderRadius }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType, InputHTMLAttributes } from 'vue';
|
|
2
2
|
import { TreeNode } from 'treemate';
|
|
3
|
+
import { FollowerPlacement } from 'vueuc';
|
|
3
4
|
import { RenderOption, RenderLabel } from '../../_internal/select-menu/src/interface';
|
|
4
5
|
import { MaybeArray } from '../../_utils';
|
|
5
6
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
@@ -31,6 +32,10 @@ declare const autoCompleteProps: {
|
|
|
31
32
|
readonly default: undefined;
|
|
32
33
|
};
|
|
33
34
|
readonly placeholder: StringConstructor;
|
|
35
|
+
readonly placement: {
|
|
36
|
+
readonly type: PropType<FollowerPlacement>;
|
|
37
|
+
readonly default: "bottom-start";
|
|
38
|
+
};
|
|
34
39
|
readonly value: StringConstructor;
|
|
35
40
|
readonly blurAfterSelect: BooleanConstructor;
|
|
36
41
|
readonly clearAfterSelect: BooleanConstructor;
|
|
@@ -426,6 +431,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
426
431
|
readonly default: undefined;
|
|
427
432
|
};
|
|
428
433
|
readonly placeholder: StringConstructor;
|
|
434
|
+
readonly placement: {
|
|
435
|
+
readonly type: PropType<FollowerPlacement>;
|
|
436
|
+
readonly default: "bottom-start";
|
|
437
|
+
};
|
|
429
438
|
readonly value: StringConstructor;
|
|
430
439
|
readonly blurAfterSelect: BooleanConstructor;
|
|
431
440
|
readonly clearAfterSelect: BooleanConstructor;
|
|
@@ -809,6 +818,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
809
818
|
mergedSize: import("vue").ComputedRef<"small" | "medium" | "large">;
|
|
810
819
|
mergedDisabled: import("vue").ComputedRef<boolean>;
|
|
811
820
|
active: import("vue").ComputedRef<boolean>;
|
|
821
|
+
mergedStatus: import("vue").ComputedRef<import("../../form/src/interface").FormValidationStatus | undefined>;
|
|
812
822
|
handleClear: () => void;
|
|
813
823
|
handleFocus: (e: FocusEvent) => void;
|
|
814
824
|
handleBlur: (e: FocusEvent) => void;
|
|
@@ -1101,6 +1111,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1101
1111
|
readonly default: undefined;
|
|
1102
1112
|
};
|
|
1103
1113
|
readonly placeholder: StringConstructor;
|
|
1114
|
+
readonly placement: {
|
|
1115
|
+
readonly type: PropType<FollowerPlacement>;
|
|
1116
|
+
readonly default: "bottom-start";
|
|
1117
|
+
};
|
|
1104
1118
|
readonly value: StringConstructor;
|
|
1105
1119
|
readonly blurAfterSelect: BooleanConstructor;
|
|
1106
1120
|
readonly clearAfterSelect: BooleanConstructor;
|
|
@@ -1471,10 +1485,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1471
1485
|
}>>, {
|
|
1472
1486
|
disabled: boolean | undefined;
|
|
1473
1487
|
to: string | boolean | HTMLElement;
|
|
1488
|
+
options: AutoCompleteOptions;
|
|
1474
1489
|
loading: boolean;
|
|
1475
1490
|
bordered: boolean | undefined;
|
|
1491
|
+
placement: FollowerPlacement;
|
|
1476
1492
|
clearable: boolean;
|
|
1477
|
-
options: AutoCompleteOptions;
|
|
1478
1493
|
defaultValue: string | null;
|
|
1479
1494
|
blurAfterSelect: boolean;
|
|
1480
1495
|
clearAfterSelect: boolean;
|
|
@@ -31,7 +31,10 @@ const autoCompleteProps = Object.assign(Object.assign({}, _mixins_1.useTheme.pro
|
|
|
31
31
|
}, disabled: {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: undefined
|
|
34
|
-
}, placeholder: String,
|
|
34
|
+
}, placeholder: String, placement: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'bottom-start'
|
|
37
|
+
}, value: String, blurAfterSelect: Boolean, clearAfterSelect: Boolean, getShow: Function, inputProps: Object, renderOption: Function, renderLabel: Function, size: String, options: {
|
|
35
38
|
type: Array,
|
|
36
39
|
default: () => []
|
|
37
40
|
}, zIndex: Number, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onSelect: [Function, Array], onBlur: [Function, Array], onFocus: [Function, Array],
|
|
@@ -50,7 +53,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
50
53
|
}
|
|
51
54
|
const { mergedBorderedRef, namespaceRef, mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
52
55
|
const formItem = (0, _mixins_1.useFormItem)(props);
|
|
53
|
-
const { mergedSizeRef, mergedDisabledRef } = formItem;
|
|
56
|
+
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
|
|
54
57
|
const triggerElRef = (0, vue_1.ref)(null);
|
|
55
58
|
const menuInstRef = (0, vue_1.ref)(null);
|
|
56
59
|
const uncontrolledValueRef = (0, vue_1.ref)(props.defaultValue);
|
|
@@ -58,7 +61,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
58
61
|
const mergedValueRef = (0, vooks_1.useMergedState)(controlledValueRef, uncontrolledValueRef);
|
|
59
62
|
const canBeActivatedRef = (0, vue_1.ref)(false);
|
|
60
63
|
const isComposingRef = (0, vue_1.ref)(false);
|
|
61
|
-
const themeRef = (0, _mixins_1.useTheme)('AutoComplete', '
|
|
64
|
+
const themeRef = (0, _mixins_1.useTheme)('AutoComplete', '-auto-complete', index_cssr_1.default, styles_1.autoCompleteLight, props, mergedClsPrefixRef);
|
|
62
65
|
const selectOptionsRef = (0, vue_1.computed)(() => {
|
|
63
66
|
return (0, utils_2.mapAutoCompleteOptionsToSelectOptions)(props.options);
|
|
64
67
|
});
|
|
@@ -196,6 +199,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
196
199
|
mergedSize: mergedSizeRef,
|
|
197
200
|
mergedDisabled: mergedDisabledRef,
|
|
198
201
|
active: activeRef,
|
|
202
|
+
mergedStatus: mergedStatusRef,
|
|
199
203
|
handleClear,
|
|
200
204
|
handleFocus,
|
|
201
205
|
handleBlur,
|
|
@@ -235,13 +239,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
235
239
|
});
|
|
236
240
|
}
|
|
237
241
|
const { mergedTheme } = this;
|
|
238
|
-
return ((0, vue_1.h)(input_1.NInput, { theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, bordered: this.mergedBordered, value: this.mergedValue, placeholder: this.placeholder, size: this.mergedSize, disabled: this.mergedDisabled, clearable: this.clearable, loading: this.loading, inputProps: this.inputProps, onClear: this.handleClear, onFocus: this.handleFocus, onUpdateValue: this.handleInput, onBlur: this.handleBlur }, {
|
|
242
|
+
return ((0, vue_1.h)(input_1.NInput, { status: this.mergedStatus, theme: mergedTheme.peers.Input, themeOverrides: mergedTheme.peerOverrides.Input, bordered: this.mergedBordered, value: this.mergedValue, placeholder: this.placeholder, size: this.mergedSize, disabled: this.mergedDisabled, clearable: this.clearable, loading: this.loading, inputProps: this.inputProps, onClear: this.handleClear, onFocus: this.handleFocus, onUpdateValue: this.handleInput, onBlur: this.handleBlur }, {
|
|
239
243
|
suffix: this.$slots.suffix,
|
|
240
244
|
prefix: this.$slots.prefix
|
|
241
245
|
}));
|
|
242
246
|
}
|
|
243
247
|
}),
|
|
244
|
-
(0, vue_1.h)(vueuc_1.VFollower, { show: this.active, to: this.adjustedTo, containerClass: this.namespace, zIndex: this.zIndex, teleportDisabled: this.adjustedTo === _utils_1.useAdjustedTo.tdkey, placement:
|
|
248
|
+
(0, vue_1.h)(vueuc_1.VFollower, { show: this.active, to: this.adjustedTo, containerClass: this.namespace, zIndex: this.zIndex, teleportDisabled: this.adjustedTo === _utils_1.useAdjustedTo.tdkey, placement: this.placement, width: "target" }, {
|
|
245
249
|
default: () => ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted }, {
|
|
246
250
|
default: () => this.active
|
|
247
251
|
? (0, vue_1.withDirectives)((0, vue_1.h)(_internal_1.NInternalSelectMenu, { clsPrefix: mergedClsPrefix, ref: "menuInstRef", theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides
|
package/lib/avatar/src/Avatar.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.avatarProps = void 0;
|
|
7
7
|
const vue_1 = require("vue");
|
|
8
8
|
const vueuc_1 = require("vueuc");
|
|
9
|
-
const
|
|
9
|
+
const context_1 = require("./context");
|
|
10
10
|
const Tag_1 = require("../../tag/src/Tag");
|
|
11
11
|
const _mixins_1 = require("../../_mixins");
|
|
12
12
|
const styles_1 = require("../styles");
|
|
@@ -49,7 +49,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
const NAvatarGroup = (0, vue_1.inject)(
|
|
52
|
+
const NAvatarGroup = (0, vue_1.inject)(context_1.avatarGroupInjectionKey, null);
|
|
53
53
|
const mergedSizeRef = (0, vue_1.computed)(() => {
|
|
54
54
|
const { size } = props;
|
|
55
55
|
if (size)
|
|
@@ -59,7 +59,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
59
59
|
return avatarGroupSize;
|
|
60
60
|
return 'medium';
|
|
61
61
|
});
|
|
62
|
-
const themeRef = (0, _mixins_1.useTheme)('Avatar', '
|
|
62
|
+
const themeRef = (0, _mixins_1.useTheme)('Avatar', '-avatar', index_cssr_1.default, styles_1.avatarLight, props, mergedClsPrefixRef);
|
|
63
63
|
const TagInjection = (0, vue_1.inject)(Tag_1.tagInjectionKey, null);
|
|
64
64
|
const mergedRoundRef = (0, vue_1.computed)(() => {
|
|
65
65
|
if (NAvatarGroup)
|
|
@@ -7,7 +7,6 @@ export interface AvatarGroupInjection {
|
|
|
7
7
|
interface AvatarOption {
|
|
8
8
|
src: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const avatarGroupInjectionKey: import("vue").InjectionKey<AvatarGroupInjection>;
|
|
11
10
|
declare const avatarGroupProps: {
|
|
12
11
|
readonly max: NumberConstructor;
|
|
13
12
|
readonly maxStyle: PropType<string | CSSProperties>;
|
|
@@ -3,13 +3,11 @@ 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.avatarGroupInjectionKey = void 0;
|
|
7
6
|
const vue_1 = require("vue");
|
|
8
7
|
const Avatar_1 = __importDefault(require("./Avatar"));
|
|
9
8
|
const _mixins_1 = require("../../_mixins");
|
|
10
|
-
const _utils_1 = require("../../_utils");
|
|
11
9
|
const avatar_group_cssr_1 = __importDefault(require("./styles/avatar-group.cssr"));
|
|
12
|
-
|
|
10
|
+
const context_1 = require("./context");
|
|
13
11
|
const avatarGroupProps = {
|
|
14
12
|
max: Number,
|
|
15
13
|
maxStyle: [Object, String],
|
|
@@ -25,8 +23,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
25
23
|
props: avatarGroupProps,
|
|
26
24
|
setup(props) {
|
|
27
25
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
28
|
-
(0, _mixins_1.useStyle)('
|
|
29
|
-
(0, vue_1.provide)(
|
|
26
|
+
(0, _mixins_1.useStyle)('-avatar-group', avatar_group_cssr_1.default, mergedClsPrefixRef);
|
|
27
|
+
(0, vue_1.provide)(context_1.avatarGroupInjectionKey, props);
|
|
30
28
|
const restOptionsRef = (0, vue_1.computed)(() => {
|
|
31
29
|
const { max } = props;
|
|
32
30
|
if (max === undefined)
|
|
@@ -96,7 +96,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
96
96
|
(_b = props.onHide) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
const themeRef = (0, _mixins_1.useTheme)('BackTop', '
|
|
99
|
+
const themeRef = (0, _mixins_1.useTheme)('BackTop', '-back-top', index_cssr_1.default, styles_1.backTopLight, props, mergedClsPrefixRef);
|
|
100
100
|
function init() {
|
|
101
101
|
var _a;
|
|
102
102
|
if (scrollListenerRegistered)
|
package/lib/badge/src/Badge.js
CHANGED
|
@@ -30,7 +30,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
30
30
|
props: badgeProps,
|
|
31
31
|
setup(props) {
|
|
32
32
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
33
|
-
const themeRef = (0, _mixins_1.useTheme)('Badge', '
|
|
33
|
+
const themeRef = (0, _mixins_1.useTheme)('Badge', '-badge', index_cssr_1.default, styles_1.badgeLight, props, mergedClsPrefixRef);
|
|
34
34
|
const appearedRef = (0, vue_1.ref)(false);
|
|
35
35
|
const handleAfterEnter = () => {
|
|
36
36
|
appearedRef.value = true;
|
|
@@ -19,7 +19,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
19
19
|
props: breadcrumbProps,
|
|
20
20
|
setup(props) {
|
|
21
21
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
22
|
-
const themeRef = (0, _mixins_1.useTheme)('Breadcrumb', '
|
|
22
|
+
const themeRef = (0, _mixins_1.useTheme)('Breadcrumb', '-breadcrumb', index_cssr_1.default, styles_1.breadcrumbLight, props, mergedClsPrefixRef);
|
|
23
23
|
(0, vue_1.provide)(exports.breadcrumbInjectionKey, {
|
|
24
24
|
separatorRef: (0, vue_1.toRef)(props, 'separator'),
|
|
25
25
|
mergedClsPrefixRef
|
|
@@ -1320,6 +1320,8 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1320
1320
|
rippleDuration: string;
|
|
1321
1321
|
}, any>>>;
|
|
1322
1322
|
}, {
|
|
1323
|
+
themeClass?: import("vue").Ref<string> | undefined;
|
|
1324
|
+
onRender?: (() => void) | undefined;
|
|
1323
1325
|
selfElRef: import("vue").Ref<HTMLElement | null>;
|
|
1324
1326
|
waveElRef: import("vue").Ref<{
|
|
1325
1327
|
play: () => void;
|
|
@@ -1366,13 +1368,13 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1366
1368
|
'--n-text-color-pressed': string;
|
|
1367
1369
|
'--n-text-color-focus': string;
|
|
1368
1370
|
'--n-text-color-disabled': string;
|
|
1369
|
-
|
|
1371
|
+
'font-weight': string;
|
|
1370
1372
|
'--n-bezier': string;
|
|
1371
1373
|
'--n-bezier-ease-out': string;
|
|
1372
1374
|
'--n-ripple-duration': string;
|
|
1373
1375
|
'--n-opacity-disabled': string;
|
|
1374
1376
|
'--n-wave-opacity': string;
|
|
1375
|
-
}
|
|
1377
|
+
}> | undefined;
|
|
1376
1378
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1377
1379
|
readonly color: StringConstructor;
|
|
1378
1380
|
readonly textColor: StringConstructor;
|