naive-ui 2.34.4 → 2.36.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/README.md +2 -0
- package/README.zh-CN.md +2 -0
- package/dist/index.js +47537 -44859
- package/dist/index.prod.js +2 -2
- package/es/_internal/clear/src/Clear.d.ts +1 -1
- package/es/_internal/clear/src/Clear.js +2 -0
- package/es/_internal/close/src/Close.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/es/_internal/focus-detector/src/FocusDetector.d.ts +1 -1
- package/es/_internal/icon/src/Icon.d.ts +1 -1
- package/es/_internal/icon-switch-transition/src/IconSwitchTransition.d.ts +1 -1
- package/es/_internal/icons/Add.d.ts +1 -1
- package/es/_internal/icons/ArrowBack.d.ts +1 -1
- package/es/_internal/icons/ArrowDown.d.ts +1 -1
- package/es/_internal/icons/ArrowUp.d.ts +1 -1
- package/es/_internal/icons/Attach.d.ts +1 -1
- package/es/_internal/icons/Backward.d.ts +1 -1
- package/es/_internal/icons/Cancel.d.ts +1 -1
- package/es/_internal/icons/Checkmark.d.ts +1 -1
- package/es/_internal/icons/ChevronDown.d.ts +1 -1
- package/es/_internal/icons/ChevronDownFilled.d.ts +1 -1
- package/es/_internal/icons/ChevronLeft.d.ts +1 -1
- package/es/_internal/icons/ChevronRight.d.ts +1 -1
- package/es/_internal/icons/Clear.d.ts +1 -1
- package/es/_internal/icons/Close.d.ts +1 -1
- package/es/_internal/icons/Date.d.ts +1 -1
- package/es/_internal/icons/Download.d.ts +1 -1
- package/es/_internal/icons/Empty.d.ts +1 -1
- package/es/_internal/icons/Error.d.ts +1 -1
- package/es/_internal/icons/Eye.d.ts +1 -1
- package/es/_internal/icons/EyeOff.d.ts +1 -1
- package/es/_internal/icons/FastBackward.d.ts +1 -1
- package/es/_internal/icons/FastForward.d.ts +1 -1
- package/es/_internal/icons/File.d.ts +1 -1
- package/es/_internal/icons/Filter.d.ts +1 -1
- package/es/_internal/icons/Forward.d.ts +1 -1
- package/es/_internal/icons/Info.d.ts +1 -1
- package/es/_internal/icons/More.d.ts +1 -1
- package/es/_internal/icons/Photo.d.ts +1 -1
- package/es/_internal/icons/Remove.d.ts +1 -1
- package/es/_internal/icons/ResizeSmall.d.ts +1 -1
- package/es/_internal/icons/Retry.d.ts +1 -1
- package/es/_internal/icons/RotateClockwise.d.ts +1 -1
- package/es/_internal/icons/RotateCounterclockwise.d.ts +1 -1
- package/es/_internal/icons/Search.d.ts +1 -1
- package/es/_internal/icons/Success.d.ts +1 -1
- package/es/_internal/icons/Switcher.d.ts +1 -1
- package/es/_internal/icons/Time.d.ts +1 -1
- package/es/_internal/icons/To.d.ts +1 -1
- package/es/_internal/icons/Trash.d.ts +1 -1
- package/es/_internal/icons/Warning.d.ts +1 -1
- package/es/_internal/icons/ZoomIn.d.ts +1 -1
- package/es/_internal/icons/ZoomOut.d.ts +1 -1
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/loading/src/Loading.d.ts +1 -1
- package/es/_internal/menu-mask/src/MenuMask.d.ts +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/es/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/es/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -1
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/es/_internal/select-menu/src/SelectMenu.js +2 -1
- package/es/_internal/select-menu/src/SelectOption.d.ts +1 -1
- package/es/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/es/_internal/selection/src/Selection.d.ts +5 -2
- package/es/_internal/selection/src/Selection.js +17 -7
- package/es/_internal/slot-machine/src/SlotMachine.d.ts +1 -1
- package/es/_internal/slot-machine/src/SlotMachineNumber.d.ts +1 -1
- package/es/_internal/suffix/src/Suffix.d.ts +1 -1
- package/es/_internal/wave/src/Wave.d.ts +1 -1
- package/es/_mixins/use-config.d.ts +2 -1
- package/es/_mixins/use-config.js +10 -5
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_mixins/use-style.d.ts +1 -1
- package/es/_mixins/use-style.js +1 -1
- package/es/_styles/common/_common.js +1 -1
- package/es/_styles/common/light.js +2 -2
- package/es/_utils/composable/use-collection.d.ts +1 -1
- package/es/_utils/composable/use-collection.js +2 -0
- package/es/_utils/css/color-to-class.js +1 -1
- package/es/_utils/cssr/index.d.ts +1 -1
- package/es/_utils/vue/wrapper.d.ts +1 -1
- package/es/affix/src/Affix.d.ts +4 -4
- package/es/affix/src/Affix.js +4 -2
- package/es/alert/src/Alert.d.ts +2 -2
- package/es/alert/src/Alert.js +7 -1
- package/es/alert/src/styles/index.cssr.js +4 -0
- package/es/anchor/src/AnchorAdapter.d.ts +2 -2
- package/es/anchor/src/BaseAnchor.d.ts +1 -1
- package/es/anchor/src/BaseAnchor.js +3 -1
- package/es/anchor/src/Link.d.ts +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +3 -3
- package/es/auto-complete/src/interface.d.ts +2 -1
- package/es/avatar/src/Avatar.d.ts +2 -2
- package/es/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/es/back-top/src/BackTop.d.ts +2 -2
- package/es/badge/src/Badge.d.ts +2 -2
- package/es/breadcrumb/src/Breadcrumb.d.ts +2 -2
- package/es/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/es/button/src/Button.d.ts +3 -3
- package/es/button/src/Button.js +2 -2
- package/es/button-group/src/ButtonGroup.d.ts +2 -2
- package/es/calendar/src/Calendar.d.ts +2 -2
- package/es/card/src/Card.d.ts +23 -7
- package/es/card/src/Card.js +12 -5
- package/es/carousel/src/Carousel.d.ts +7 -7
- package/es/carousel/src/Carousel.js +8 -3
- package/es/carousel/src/CarouselArrow.d.ts +2 -2
- package/es/carousel/src/CarouselContext.js +3 -1
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/carousel/src/CarouselDots.js +7 -1
- package/es/carousel/src/CarouselItem.d.ts +2 -2
- package/es/cascader/src/Cascader.d.ts +3 -2
- package/es/cascader/src/CascaderMenu.d.ts +1 -1
- package/es/cascader/src/CascaderOption.d.ts +1 -1
- package/es/cascader/src/CascaderSelectMenu.d.ts +2 -2
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -1
- package/es/checkbox/src/Checkbox.d.ts +8 -8
- package/es/checkbox/src/Checkbox.js +10 -3
- package/es/checkbox/src/CheckboxGroup.d.ts +2 -2
- package/es/checkbox/src/styles/index.cssr.js +9 -11
- package/es/code/src/Code.d.ts +2 -2
- package/es/collapse/src/Collapse.d.ts +2 -2
- package/es/collapse/src/CollapseItem.d.ts +2 -2
- package/es/collapse/src/CollapseItemContent.d.ts +1 -1
- package/es/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/es/color-picker/src/AlphaSlider.d.ts +1 -1
- package/es/color-picker/src/ColorInput.d.ts +1 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +2 -2
- package/es/color-picker/src/ColorPicker.js +6 -2
- package/es/color-picker/src/ColorPickerSwatches.d.ts +1 -1
- package/es/color-picker/src/ColorPickerSwatches.js +9 -4
- package/es/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/es/color-picker/src/ColorPreview.d.ts +1 -1
- package/es/color-picker/src/HueSlider.d.ts +1 -1
- package/es/color-picker/src/Pallete.d.ts +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +3 -0
- package/es/config-provider/src/ConfigProvider.d.ts +21 -8
- package/es/config-provider/src/ConfigProvider.js +4 -2
- package/es/config-provider/src/config.js +5 -5
- package/es/config-provider/src/internal-interface.d.ts +5 -1
- package/es/countdown/src/Countdown.d.ts +1 -1
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/src/DataTable.d.ts +5 -5
- package/es/data-table/src/DataTable.js +2 -7
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +1 -1
- package/es/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/es/data-table/src/HeaderButton/RenderSorter.d.ts +1 -1
- package/es/data-table/src/HeaderButton/ResizeButton.d.ts +1 -1
- package/es/data-table/src/HeaderButton/ResizeButton.js +1 -0
- package/es/data-table/src/HeaderButton/SortButton.d.ts +1 -1
- package/es/data-table/src/MainTable.d.ts +1 -1
- package/es/data-table/src/MainTable.js +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +5 -6
- package/es/data-table/src/TableParts/Body.js +22 -15
- package/es/data-table/src/TableParts/BodyCheckbox.d.ts +1 -1
- package/es/data-table/src/TableParts/BodyRadio.d.ts +1 -1
- package/es/data-table/src/TableParts/Cell.d.ts +1 -1
- package/es/data-table/src/TableParts/Cell.js +5 -1
- package/es/data-table/src/TableParts/ExpandTrigger.d.ts +1 -1
- package/es/data-table/src/TableParts/ExpandTrigger.js +3 -1
- package/es/data-table/src/TableParts/Header.d.ts +1 -3
- package/es/data-table/src/TableParts/Header.js +6 -12
- package/es/data-table/src/TableParts/SelectionMenu.d.ts +1 -1
- package/es/data-table/src/interface.d.ts +3 -5
- package/es/data-table/src/styles/index.cssr.js +2 -0
- package/es/data-table/src/use-scroll.d.ts +1 -2
- package/es/data-table/src/use-scroll.js +21 -13
- package/es/date-picker/src/DatePicker.d.ts +2 -2
- package/es/date-picker/src/panel/date.d.ts +4 -4
- package/es/date-picker/src/panel/date.js +3 -1
- package/es/date-picker/src/panel/daterange.d.ts +4 -4
- package/es/date-picker/src/panel/daterange.js +10 -2
- package/es/date-picker/src/panel/datetime.d.ts +4 -4
- package/es/date-picker/src/panel/datetime.js +3 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +4 -4
- package/es/date-picker/src/panel/datetimerange.js +16 -4
- package/es/date-picker/src/panel/month.d.ts +4 -4
- package/es/date-picker/src/panel/month.js +4 -1
- package/es/date-picker/src/panel/monthrange.d.ts +4 -4
- package/es/date-picker/src/panel/panelHeader.d.ts +722 -752
- package/es/date-picker/src/panel/use-calendar.d.ts +3 -3
- package/es/date-picker/src/panel/use-calendar.js +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +3 -3
- package/es/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/es/date-picker/src/styles/index.cssr.js +1 -0
- package/es/date-picker/src/utils.js +1 -6
- package/es/date-picker/styles/_common.js +1 -1
- package/es/descriptions/src/Descriptions.d.ts +8 -2
- package/es/descriptions/src/Descriptions.js +28 -8
- package/es/descriptions/src/DescriptionsItem.d.ts +7 -1
- package/es/descriptions/src/DescriptionsItem.js +2 -0
- package/es/dialog/src/Dialog.d.ts +2 -2
- package/es/dialog/src/Dialog.js +6 -2
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +4 -4
- package/es/dialog/src/DialogProvider.js +3 -1
- package/es/dialog/src/dialogProps.d.ts +1 -1
- package/es/discrete/src/InjectionExtractor.d.ts +1 -1
- package/es/divider/src/Divider.d.ts +2 -2
- package/es/drawer/src/Drawer.d.ts +15 -2
- package/es/drawer/src/Drawer.js +2 -2
- package/es/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/es/drawer/src/DrawerBodyWrapper.js +25 -1
- package/es/drawer/src/DrawerContent.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +20 -2
- package/es/dropdown/src/Dropdown.js +1 -1
- package/es/dropdown/src/DropdownDivider.d.ts +1 -1
- package/es/dropdown/src/DropdownGroup.d.ts +1 -1
- package/es/dropdown/src/DropdownGroupHeader.d.ts +1 -1
- package/es/dropdown/src/DropdownMenu.d.ts +1 -1
- package/es/dropdown/src/DropdownMenu.js +4 -1
- package/es/dropdown/src/DropdownOption.d.ts +6 -5
- package/es/dropdown/src/DropdownOption.js +2 -4
- package/es/dropdown/src/DropdownRenderOption.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +5 -2
- package/es/dynamic-input/src/DynamicInput.js +21 -9
- package/es/dynamic-input/src/InputPreset.d.ts +1 -1
- package/es/dynamic-input/src/PairPreset.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +8 -2
- package/es/dynamic-tags/src/DynamicTags.js +6 -4
- package/es/element/src/Element.d.ts +2 -2
- package/es/ellipsis/index.d.ts +1 -0
- package/es/ellipsis/index.js +1 -0
- package/es/ellipsis/src/Ellipsis.d.ts +3 -1
- package/es/ellipsis/src/Ellipsis.js +5 -4
- package/es/ellipsis/src/PerformantEllipsis.d.ts +164 -0
- package/es/ellipsis/src/PerformantEllipsis.js +52 -0
- package/es/empty/src/Empty.d.ts +2 -2
- package/es/equation/index.d.ts +1 -0
- package/es/equation/src/Equation.d.ts +6 -4
- package/es/form/src/Form.d.ts +2 -2
- package/es/form/src/Form.js +3 -1
- package/es/form/src/FormItem.d.ts +3 -3
- package/es/form/src/FormItemCol.d.ts +1 -1
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- package/es/form/src/FormItemRow.d.ts +1 -1
- package/es/form/src/utils.d.ts +1 -1
- package/es/global-style/src/GlobalStyle.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/grid/src/Grid.d.ts +2 -2
- package/es/grid/src/Grid.js +6 -3
- package/es/grid/src/GridItem.d.ts +1 -1
- package/es/icon/src/Icon.d.ts +2 -2
- package/es/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/es/image/src/Image.d.ts +8 -2
- package/es/image/src/ImageGroup.d.ts +8 -2
- package/es/image/src/ImageGroup.js +8 -2
- package/es/image/src/ImagePreview.d.ts +8 -3
- package/es/image/src/ImagePreview.js +10 -1
- package/es/image/src/icons.d.ts +1 -0
- package/es/image/src/icons.js +2 -0
- package/es/image/src/interface.d.ts +7 -5
- package/es/image/src/interface.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/input/src/Input.d.ts +19 -9
- package/es/input/src/Input.js +30 -8
- package/es/input/src/InputGroup.d.ts +2 -2
- package/es/input/src/InputGroupLabel.d.ts +2 -2
- package/es/input/src/WordCount.d.ts +1 -1
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +3 -2
- package/es/input-number/src/InputNumber.js +2 -1
- package/es/input-number/src/interface.d.ts +1 -0
- package/es/layout/src/Layout.d.ts +10 -4
- package/es/layout/src/Layout.js +8 -1
- package/es/layout/src/LayoutContent.d.ts +4 -2
- package/es/layout/src/LayoutFooter.d.ts +2 -2
- package/es/layout/src/LayoutHeader.d.ts +2 -2
- package/es/layout/src/LayoutSider.d.ts +11 -2
- package/es/layout/src/LayoutSider.js +12 -3
- package/es/layout/src/ToggleBar.d.ts +1 -1
- package/es/layout/src/ToggleButton.d.ts +1 -1
- package/es/legacy-grid/src/Col.d.ts +1 -1
- package/es/legacy-grid/src/Row.d.ts +2 -2
- package/es/legacy-grid/src/styles/index.cssr.js +2 -3
- package/es/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/es/legacy-transfer/src/Transfer.d.ts +2 -2
- package/es/legacy-transfer/src/TransferFilter.d.ts +1 -1
- package/es/legacy-transfer/src/TransferHeader.d.ts +1 -1
- package/es/legacy-transfer/src/TransferList.d.ts +1 -1
- package/es/legacy-transfer/src/TransferListItem.d.ts +1 -1
- package/es/list/src/List.d.ts +2 -2
- package/es/list/src/ListItem.d.ts +1 -1
- package/es/loading-bar/src/LoadingBar.d.ts +4 -2
- package/es/loading-bar/src/LoadingBar.js +21 -12
- package/es/loading-bar/src/LoadingBarProvider.d.ts +4 -1
- package/es/loading-bar/src/LoadingBarProvider.js +2 -2
- package/es/locales/common/arDZ.js +1 -0
- package/es/locales/common/deDE.js +1 -0
- package/es/locales/common/enGB.js +1 -0
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.js +1 -0
- package/es/locales/common/eo.js +1 -0
- package/es/locales/common/esAR.js +1 -0
- package/es/locales/common/faIR.js +1 -0
- package/es/locales/common/frFR.js +2 -1
- package/es/locales/common/idID.js +1 -0
- package/es/locales/common/itIT.js +1 -0
- package/es/locales/common/jaJP.js +1 -0
- package/es/locales/common/koKR.js +1 -0
- package/es/locales/common/nbNO.js +1 -0
- package/es/locales/common/nlNL.js +1 -0
- package/es/locales/common/plPL.js +1 -0
- package/es/locales/common/ptBR.js +15 -17
- package/es/locales/common/ruRU.js +1 -0
- package/es/locales/common/skSK.js +1 -0
- package/es/locales/common/svSE.d.ts +3 -0
- package/es/locales/common/svSE.js +121 -0
- package/es/locales/common/thTH.js +1 -0
- package/es/locales/common/trTR.js +1 -0
- package/es/locales/common/ukUA.js +1 -0
- package/es/locales/common/viVN.js +1 -0
- package/es/locales/common/zhCN.js +1 -0
- package/es/locales/common/zhTW.js +18 -17
- package/es/locales/date/svSE.d.ts +3 -0
- package/es/locales/date/svSE.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +11 -11
- package/es/log/src/Log.js +12 -12
- package/es/log/src/LogLine.d.ts +1 -1
- package/es/log/src/LogLoader.d.ts +1 -1
- package/es/mention/src/Mention.d.ts +4 -4
- package/es/mention/src/utils.js +4 -4
- package/es/menu/src/Menu.d.ts +32 -15
- package/es/menu/src/Menu.js +101 -7
- package/es/menu/src/MenuDivider.d.ts +1 -1
- package/es/menu/src/MenuOption.d.ts +1 -1
- package/es/menu/src/MenuOptionContent.d.ts +4 -1
- package/es/menu/src/MenuOptionContent.js +7 -2
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/Submenu.d.ts +24 -13
- package/es/menu/src/Submenu.js +9 -8
- package/es/menu/src/context.d.ts +2 -2
- package/es/menu/src/interface.d.ts +1 -0
- package/es/menu/src/styles/index.cssr.js +8 -4
- package/es/menu/src/use-menu-child.js +5 -5
- package/es/message/src/Message.d.ts +2 -2
- package/es/message/src/MessageEnvironment.d.ts +1 -1
- package/es/message/src/MessageProvider.d.ts +9 -6
- package/es/message/src/MessageProvider.js +3 -2
- package/es/modal/src/BodyWrapper.d.ts +12 -4
- package/es/modal/src/Modal.d.ts +18 -6
- package/es/modal/src/presetProps.d.ts +5 -1
- package/es/notification/src/Notification.d.ts +1 -1
- package/es/notification/src/NotificationContainer.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationEnvironment.js +1 -1
- package/es/notification/src/NotificationProvider.d.ts +5 -2
- package/es/notification/src/NotificationProvider.js +2 -2
- package/es/number-animation/src/NumberAnimation.d.ts +1 -1
- package/es/page-header/src/PageHeader.d.ts +2 -2
- package/es/pagination/src/Pagination.d.ts +2 -2
- package/es/pagination/src/Pagination.js +3 -1
- package/es/popconfirm/src/Popconfirm.d.ts +22 -3
- package/es/popconfirm/src/Popconfirm.js +13 -5
- package/es/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/es/popover/src/Popover.d.ts +25 -1
- package/es/popover/src/Popover.js +10 -4
- package/es/popover/src/PopoverBody.d.ts +23 -2
- package/es/popover/src/PopoverBody.js +26 -10
- package/es/popover/src/interface.d.ts +4 -1
- package/es/popselect/src/Popselect.d.ts +19 -1
- package/es/popselect/src/Popselect.js +2 -1
- package/es/popselect/src/PopselectPanel.d.ts +2 -2
- package/es/popselect/src/PopselectPanel.js +1 -0
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/Line.d.ts +1 -1
- package/es/progress/src/Line.js +1 -3
- package/es/progress/src/MultipleCircle.d.ts +1 -1
- package/es/progress/src/Progress.d.ts +3 -3
- package/es/qr-code/index.d.ts +2 -0
- package/es/qr-code/index.js +1 -0
- package/es/qr-code/src/QrCode.d.ts +154 -0
- package/es/qr-code/src/QrCode.js +146 -0
- package/es/qr-code/src/qrcodegen.d.ts +94 -0
- package/es/qr-code/src/qrcodegen.js +948 -0
- package/es/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/es/qr-code/src/styles/index.cssr.js +8 -0
- package/es/qr-code/styles/dark.d.ts +3 -0
- package/es/qr-code/styles/dark.js +11 -0
- package/es/qr-code/styles/index.d.ts +3 -0
- package/es/qr-code/styles/index.js +2 -0
- package/es/qr-code/styles/light.d.ts +9 -0
- package/es/qr-code/styles/light.js +12 -0
- package/es/radio/src/Radio.d.ts +173 -34
- package/es/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.d.ts +3 -3
- package/es/radio/src/RadioButton.js +3 -3
- package/es/radio/src/RadioGroup.d.ts +3 -2
- package/es/radio/src/RadioGroup.js +2 -1
- package/es/radio/src/styles/radio-group.cssr.js +1 -0
- package/es/radio/src/use-radio.d.ts +3 -3
- package/es/radio/src/use-radio.js +1 -1
- package/es/rate/src/Rate.d.ts +2 -2
- package/es/result/src/Result.d.ts +3 -3
- package/es/scrollbar/src/Scrollbar.d.ts +1 -1
- package/es/scrollbar/src/Scrollbar.js +2 -0
- package/es/select/src/Select.d.ts +7 -4
- package/es/select/src/Select.js +17 -3
- package/es/select/src/interface.d.ts +2 -0
- package/es/skeleton/src/Skeleton.d.ts +2 -2
- package/es/skeleton/src/Skeleton.js +4 -7
- package/es/slider/src/Slider.d.ts +8 -2
- package/es/slider/src/Slider.js +19 -4
- package/es/slider/src/utils.d.ts +2 -2
- package/es/slider/src/utils.js +6 -4
- package/es/space/src/Space.d.ts +5 -2
- package/es/space/src/Space.js +3 -3
- package/es/spin/src/Spin.d.ts +13 -4
- package/es/spin/src/Spin.js +26 -7
- package/es/split/index.d.ts +2 -0
- package/es/split/index.js +1 -0
- package/es/split/src/Split.d.ts +135 -0
- package/es/split/src/Split.js +145 -0
- package/es/split/src/styles/index.cssr.d.ts +2 -0
- package/es/split/src/styles/index.cssr.js +25 -0
- package/es/split/styles/dark.d.ts +3 -0
- package/es/split/styles/dark.js +6 -0
- package/es/split/styles/index.d.ts +3 -0
- package/es/split/styles/index.js +2 -0
- package/es/split/styles/light.d.ts +9 -0
- package/es/split/styles/light.js +13 -0
- package/es/statistic/src/Statistic.d.ts +2 -2
- package/es/steps/src/Step.d.ts +2 -2
- package/es/steps/src/Steps.d.ts +3 -3
- package/es/steps/src/styles/index.cssr.js +1 -0
- package/es/switch/src/Switch.d.ts +2 -2
- package/es/table/src/Table.d.ts +2 -2
- package/es/table/src/Tbody.d.ts +1 -1
- package/es/table/src/Td.d.ts +1 -1
- package/es/table/src/Th.d.ts +1 -1
- package/es/table/src/Thead.d.ts +1 -1
- package/es/table/src/Tr.d.ts +1 -1
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tab.js +3 -1
- package/es/tabs/src/TabPane.d.ts +1 -1
- package/es/tabs/src/Tabs.d.ts +13 -13
- package/es/tabs/src/Tabs.js +15 -2
- package/es/tabs/src/styles/index.cssr.js +12 -2
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/theme-editor/src/MaximizeIcon.d.ts +1 -1
- package/es/theme-editor/src/MinimizeIcon.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.d.ts +3 -3
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/thing/src/Thing.d.ts +7 -1
- package/es/thing/src/Thing.js +13 -4
- package/es/time/src/Time.d.ts +1 -1
- package/es/time/src/Time.js +1 -1
- package/es/time-picker/src/Panel.d.ts +1 -1
- package/es/time-picker/src/PanelCol.d.ts +1 -1
- package/es/time-picker/src/PanelCol.js +5 -1
- package/es/time-picker/src/TimePicker.d.ts +2 -2
- package/es/time-picker/src/TimePicker.js +1 -1
- package/es/timeline/src/Timeline.d.ts +1 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/tooltip/src/Tooltip.d.ts +19 -1
- package/es/transfer/src/Transfer.d.ts +8 -2
- package/es/transfer/src/Transfer.js +2 -2
- package/es/transfer/src/TransferFilter.d.ts +1 -1
- package/es/transfer/src/TransferHeader.d.ts +5 -1
- package/es/transfer/src/TransferHeader.js +6 -2
- package/es/transfer/src/TransferList.d.ts +1 -1
- package/es/transfer/src/TransferListItem.d.ts +1 -1
- package/es/tree/index.d.ts +1 -0
- package/es/tree/index.js +1 -0
- package/es/tree/src/MotionWrapper.d.ts +1 -1
- package/es/tree/src/Tree.d.ts +59 -5
- package/es/tree/src/Tree.js +32 -19
- package/es/tree/src/TreeNode.d.ts +6 -2
- package/es/tree/src/TreeNode.js +72 -25
- package/es/tree/src/TreeNodeCheckbox.d.ts +13 -1
- package/es/tree/src/TreeNodeCheckbox.js +9 -8
- package/es/tree/src/TreeNodeContent.d.ts +1 -1
- package/es/tree/src/TreeNodeSwitcher.d.ts +19 -2
- package/es/tree/src/TreeNodeSwitcher.js +12 -6
- package/es/tree/src/interface.d.ts +2 -0
- package/es/tree/src/styles/index.cssr.js +47 -51
- package/es/tree/src/utils.d.ts +1 -0
- package/es/tree/src/utils.js +12 -0
- package/es/tree/styles/light.d.ts +8 -0
- package/es/tree/styles/light.js +6 -2
- package/es/tree-select/src/TreeSelect.d.ts +49 -3
- package/es/tree-select/src/TreeSelect.js +5 -3
- package/es/tree-select/src/interface.d.ts +2 -0
- package/es/tree-select/styles/light.d.ts +4 -0
- package/es/typography/src/a.d.ts +2 -2
- package/es/typography/src/blockquote.d.ts +2 -2
- package/es/typography/src/create-header.d.ts +2 -2
- package/es/typography/src/headers.d.ts +12 -12
- package/es/typography/src/hr.d.ts +2 -2
- package/es/typography/src/li.d.ts +1 -1
- package/es/typography/src/ol.d.ts +2 -2
- package/es/typography/src/p.d.ts +2 -2
- package/es/typography/src/text.d.ts +2 -2
- package/es/typography/src/ul.d.ts +2 -2
- package/es/upload/src/Upload.d.ts +11 -5
- package/es/upload/src/Upload.js +8 -3
- package/es/upload/src/UploadDragger.d.ts +1 -1
- package/es/upload/src/UploadFile.d.ts +2 -2
- package/es/upload/src/UploadFileList.d.ts +1 -1
- package/es/upload/src/UploadFileList.js +3 -2
- package/es/upload/src/UploadProgress.d.ts +1 -1
- package/es/upload/src/UploadTrigger.d.ts +1 -1
- package/es/upload/src/UploadTrigger.js +3 -2
- package/es/upload/src/interface.d.ts +5 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +2 -0
- package/es/virtual-list/index.js +1 -0
- package/es/virtual-list/src/VirtualList.d.ts +146 -0
- package/es/virtual-list/src/VirtualList.js +102 -0
- package/es/watermark/src/Watermark.d.ts +1 -1
- package/es/watermark/src/Watermark.js +7 -0
- package/lib/_internal/clear/src/Clear.d.ts +1 -1
- package/lib/_internal/clear/src/Clear.js +2 -0
- package/lib/_internal/close/src/Close.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.d.ts +1 -1
- package/lib/_internal/fade-in-expand-transition/src/FadeInExpandTransition.js +1 -0
- package/lib/_internal/focus-detector/src/FocusDetector.d.ts +1 -1
- package/lib/_internal/icon/src/Icon.d.ts +1 -1
- package/lib/_internal/icon-switch-transition/src/IconSwitchTransition.d.ts +1 -1
- package/lib/_internal/icons/Add.d.ts +1 -1
- package/lib/_internal/icons/ArrowBack.d.ts +1 -1
- package/lib/_internal/icons/ArrowDown.d.ts +1 -1
- package/lib/_internal/icons/ArrowUp.d.ts +1 -1
- package/lib/_internal/icons/Attach.d.ts +1 -1
- package/lib/_internal/icons/Backward.d.ts +1 -1
- package/lib/_internal/icons/Cancel.d.ts +1 -1
- package/lib/_internal/icons/Checkmark.d.ts +1 -1
- package/lib/_internal/icons/ChevronDown.d.ts +1 -1
- package/lib/_internal/icons/ChevronDownFilled.d.ts +1 -1
- package/lib/_internal/icons/ChevronLeft.d.ts +1 -1
- package/lib/_internal/icons/ChevronRight.d.ts +1 -1
- package/lib/_internal/icons/Clear.d.ts +1 -1
- package/lib/_internal/icons/Close.d.ts +1 -1
- package/lib/_internal/icons/Date.d.ts +1 -1
- package/lib/_internal/icons/Download.d.ts +1 -1
- package/lib/_internal/icons/Empty.d.ts +1 -1
- package/lib/_internal/icons/Error.d.ts +1 -1
- package/lib/_internal/icons/Eye.d.ts +1 -1
- package/lib/_internal/icons/EyeOff.d.ts +1 -1
- package/lib/_internal/icons/FastBackward.d.ts +1 -1
- package/lib/_internal/icons/FastForward.d.ts +1 -1
- package/lib/_internal/icons/File.d.ts +1 -1
- package/lib/_internal/icons/Filter.d.ts +1 -1
- package/lib/_internal/icons/Forward.d.ts +1 -1
- package/lib/_internal/icons/Info.d.ts +1 -1
- package/lib/_internal/icons/More.d.ts +1 -1
- package/lib/_internal/icons/Photo.d.ts +1 -1
- package/lib/_internal/icons/Remove.d.ts +1 -1
- package/lib/_internal/icons/ResizeSmall.d.ts +1 -1
- package/lib/_internal/icons/Retry.d.ts +1 -1
- package/lib/_internal/icons/RotateClockwise.d.ts +1 -1
- package/lib/_internal/icons/RotateCounterclockwise.d.ts +1 -1
- package/lib/_internal/icons/Search.d.ts +1 -1
- package/lib/_internal/icons/Success.d.ts +1 -1
- package/lib/_internal/icons/Switcher.d.ts +1 -1
- package/lib/_internal/icons/Time.d.ts +1 -1
- package/lib/_internal/icons/To.d.ts +1 -1
- package/lib/_internal/icons/Trash.d.ts +1 -1
- package/lib/_internal/icons/Warning.d.ts +1 -1
- package/lib/_internal/icons/ZoomIn.d.ts +1 -1
- package/lib/_internal/icons/ZoomOut.d.ts +1 -1
- package/lib/_internal/icons/replaceable.d.ts +1 -1
- package/lib/_internal/loading/src/Loading.d.ts +1 -1
- package/lib/_internal/menu-mask/src/MenuMask.d.ts +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/lib/_internal/scrollbar/src/Scrollbar.js +11 -6
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +1 -0
- package/lib/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/lib/_internal/select-menu/src/SelectMenu.js +2 -1
- package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -1
- package/lib/_internal/select-menu/src/styles/index.cssr.js +8 -0
- package/lib/_internal/selection/src/Selection.d.ts +5 -2
- package/lib/_internal/selection/src/Selection.js +17 -7
- package/lib/_internal/slot-machine/src/SlotMachine.d.ts +1 -1
- package/lib/_internal/slot-machine/src/SlotMachineNumber.d.ts +1 -1
- package/lib/_internal/suffix/src/Suffix.d.ts +1 -1
- package/lib/_internal/wave/src/Wave.d.ts +1 -1
- package/lib/_mixins/use-config.d.ts +2 -1
- package/lib/_mixins/use-config.js +11 -5
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_mixins/use-style.d.ts +1 -1
- package/lib/_mixins/use-style.js +1 -1
- package/lib/_styles/common/_common.js +1 -1
- package/lib/_styles/common/light.js +2 -2
- package/lib/_utils/composable/use-collection.d.ts +1 -1
- package/lib/_utils/composable/use-collection.js +2 -0
- package/lib/_utils/css/color-to-class.js +1 -1
- package/lib/_utils/cssr/index.d.ts +1 -1
- package/lib/_utils/vue/wrapper.d.ts +1 -1
- package/lib/affix/src/Affix.d.ts +4 -4
- package/lib/affix/src/Affix.js +4 -2
- package/lib/alert/src/Alert.d.ts +2 -2
- package/lib/alert/src/Alert.js +7 -1
- package/lib/alert/src/styles/index.cssr.js +4 -0
- package/lib/anchor/src/AnchorAdapter.d.ts +2 -2
- package/lib/anchor/src/BaseAnchor.d.ts +1 -1
- package/lib/anchor/src/BaseAnchor.js +3 -1
- package/lib/anchor/src/Link.d.ts +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -3
- package/lib/auto-complete/src/interface.d.ts +2 -1
- package/lib/avatar/src/Avatar.d.ts +2 -2
- package/lib/avatar-group/src/AvatarGroup.d.ts +2 -2
- package/lib/back-top/src/BackTop.d.ts +2 -2
- package/lib/badge/src/Badge.d.ts +2 -2
- package/lib/breadcrumb/src/Breadcrumb.d.ts +2 -2
- package/lib/breadcrumb/src/BreadcrumbItem.d.ts +1 -1
- package/lib/button/src/Button.d.ts +3 -3
- package/lib/button/src/Button.js +2 -2
- package/lib/button-group/src/ButtonGroup.d.ts +2 -2
- package/lib/calendar/src/Calendar.d.ts +2 -2
- package/lib/card/src/Card.d.ts +23 -7
- package/lib/card/src/Card.js +12 -5
- package/lib/carousel/src/Carousel.d.ts +7 -7
- package/lib/carousel/src/Carousel.js +8 -3
- package/lib/carousel/src/CarouselArrow.d.ts +2 -2
- package/lib/carousel/src/CarouselContext.js +3 -1
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/carousel/src/CarouselDots.js +7 -1
- package/lib/carousel/src/CarouselItem.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +3 -2
- package/lib/cascader/src/CascaderMenu.d.ts +1 -1
- package/lib/cascader/src/CascaderOption.d.ts +1 -1
- package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -2
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -1
- package/lib/checkbox/src/Checkbox.d.ts +8 -8
- package/lib/checkbox/src/Checkbox.js +9 -2
- package/lib/checkbox/src/CheckboxGroup.d.ts +2 -2
- package/lib/checkbox/src/styles/index.cssr.js +9 -11
- package/lib/code/src/Code.d.ts +2 -2
- package/lib/collapse/src/Collapse.d.ts +2 -2
- package/lib/collapse/src/CollapseItem.d.ts +2 -2
- package/lib/collapse/src/CollapseItemContent.d.ts +1 -1
- package/lib/collapse-transition/src/CollapseTransition.d.ts +2 -2
- package/lib/color-picker/src/AlphaSlider.d.ts +1 -1
- package/lib/color-picker/src/ColorInput.d.ts +1 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +2 -2
- package/lib/color-picker/src/ColorPicker.js +6 -2
- package/lib/color-picker/src/ColorPickerSwatches.d.ts +1 -1
- package/lib/color-picker/src/ColorPickerSwatches.js +9 -4
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +1 -1
- package/lib/color-picker/src/ColorPreview.d.ts +1 -1
- package/lib/color-picker/src/HueSlider.d.ts +1 -1
- package/lib/color-picker/src/Pallete.d.ts +1 -1
- package/lib/components.d.ts +3 -0
- package/lib/components.js +3 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +21 -8
- package/lib/config-provider/src/ConfigProvider.js +4 -2
- package/lib/config-provider/src/config.js +5 -5
- package/lib/config-provider/src/internal-interface.d.ts +5 -1
- package/lib/countdown/src/Countdown.d.ts +1 -1
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/src/DataTable.d.ts +5 -5
- package/lib/data-table/src/DataTable.js +1 -6
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/RenderSorter.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/ResizeButton.d.ts +1 -1
- package/lib/data-table/src/HeaderButton/ResizeButton.js +1 -0
- package/lib/data-table/src/HeaderButton/SortButton.d.ts +1 -1
- package/lib/data-table/src/MainTable.d.ts +1 -1
- package/lib/data-table/src/MainTable.js +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +5 -6
- package/lib/data-table/src/TableParts/Body.js +22 -15
- package/lib/data-table/src/TableParts/BodyCheckbox.d.ts +1 -1
- package/lib/data-table/src/TableParts/BodyRadio.d.ts +1 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +1 -1
- package/lib/data-table/src/TableParts/Cell.js +9 -2
- package/lib/data-table/src/TableParts/ExpandTrigger.d.ts +1 -1
- package/lib/data-table/src/TableParts/ExpandTrigger.js +3 -1
- package/lib/data-table/src/TableParts/Header.d.ts +1 -3
- package/lib/data-table/src/TableParts/Header.js +6 -12
- package/lib/data-table/src/TableParts/SelectionMenu.d.ts +1 -1
- package/lib/data-table/src/interface.d.ts +3 -5
- package/lib/data-table/src/styles/index.cssr.js +2 -0
- package/lib/data-table/src/use-scroll.d.ts +1 -2
- package/lib/data-table/src/use-scroll.js +21 -13
- package/lib/date-picker/src/DatePicker.d.ts +2 -2
- package/lib/date-picker/src/panel/date.d.ts +4 -4
- package/lib/date-picker/src/panel/date.js +3 -1
- package/lib/date-picker/src/panel/daterange.d.ts +4 -4
- package/lib/date-picker/src/panel/daterange.js +10 -2
- package/lib/date-picker/src/panel/datetime.d.ts +4 -4
- package/lib/date-picker/src/panel/datetime.js +3 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +4 -4
- package/lib/date-picker/src/panel/datetimerange.js +16 -4
- package/lib/date-picker/src/panel/month.d.ts +4 -4
- package/lib/date-picker/src/panel/month.js +4 -1
- package/lib/date-picker/src/panel/monthrange.d.ts +4 -4
- package/lib/date-picker/src/panel/panelHeader.d.ts +722 -752
- package/lib/date-picker/src/panel/use-calendar.d.ts +3 -3
- package/lib/date-picker/src/panel/use-calendar.js +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +3 -3
- package/lib/date-picker/src/panel/use-dual-calendar.js +4 -4
- package/lib/date-picker/src/styles/index.cssr.js +1 -0
- package/lib/date-picker/src/utils.js +1 -6
- package/lib/date-picker/styles/_common.js +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +8 -2
- package/lib/descriptions/src/Descriptions.js +28 -8
- package/lib/descriptions/src/DescriptionsItem.d.ts +7 -1
- package/lib/descriptions/src/DescriptionsItem.js +2 -0
- package/lib/dialog/src/Dialog.d.ts +2 -2
- package/lib/dialog/src/Dialog.js +6 -2
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +4 -4
- package/lib/dialog/src/DialogProvider.js +3 -1
- package/lib/dialog/src/dialogProps.d.ts +1 -1
- package/lib/discrete/src/InjectionExtractor.d.ts +1 -1
- package/lib/divider/src/Divider.d.ts +2 -2
- package/lib/drawer/src/Drawer.d.ts +15 -2
- package/lib/drawer/src/Drawer.js +2 -2
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +9 -1
- package/lib/drawer/src/DrawerBodyWrapper.js +25 -1
- package/lib/drawer/src/DrawerContent.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +20 -2
- package/lib/dropdown/src/Dropdown.js +1 -1
- package/lib/dropdown/src/DropdownDivider.d.ts +1 -1
- package/lib/dropdown/src/DropdownGroup.d.ts +1 -1
- package/lib/dropdown/src/DropdownGroupHeader.d.ts +1 -1
- package/lib/dropdown/src/DropdownMenu.d.ts +1 -1
- package/lib/dropdown/src/DropdownMenu.js +4 -1
- package/lib/dropdown/src/DropdownOption.d.ts +6 -5
- package/lib/dropdown/src/DropdownOption.js +2 -4
- package/lib/dropdown/src/DropdownRenderOption.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +5 -2
- package/lib/dynamic-input/src/DynamicInput.js +21 -9
- package/lib/dynamic-input/src/InputPreset.d.ts +1 -1
- package/lib/dynamic-input/src/PairPreset.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +8 -2
- package/lib/dynamic-tags/src/DynamicTags.js +6 -4
- package/lib/element/src/Element.d.ts +2 -2
- package/lib/ellipsis/index.d.ts +1 -0
- package/lib/ellipsis/index.js +3 -1
- package/lib/ellipsis/src/Ellipsis.d.ts +3 -1
- package/lib/ellipsis/src/Ellipsis.js +5 -2
- package/lib/ellipsis/src/PerformantEllipsis.d.ts +164 -0
- package/lib/ellipsis/src/PerformantEllipsis.js +81 -0
- package/lib/empty/src/Empty.d.ts +2 -2
- package/lib/equation/index.d.ts +1 -0
- package/lib/equation/src/Equation.d.ts +6 -4
- package/lib/form/src/Form.d.ts +2 -2
- package/lib/form/src/Form.js +3 -1
- package/lib/form/src/FormItem.d.ts +3 -3
- package/lib/form/src/FormItemCol.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- package/lib/form/src/FormItemRow.d.ts +1 -1
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/global-style/src/GlobalStyle.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/grid/src/Grid.d.ts +2 -2
- package/lib/grid/src/Grid.js +6 -3
- package/lib/grid/src/GridItem.d.ts +1 -1
- package/lib/icon/src/Icon.d.ts +2 -2
- package/lib/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/lib/image/src/Image.d.ts +8 -2
- package/lib/image/src/ImageGroup.d.ts +8 -2
- package/lib/image/src/ImageGroup.js +8 -2
- package/lib/image/src/ImagePreview.d.ts +8 -3
- package/lib/image/src/ImagePreview.js +9 -0
- package/lib/image/src/icons.d.ts +1 -0
- package/lib/image/src/icons.js +3 -1
- package/lib/image/src/interface.d.ts +7 -5
- package/lib/image/src/interface.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/input/src/Input.d.ts +19 -9
- package/lib/input/src/Input.js +30 -8
- package/lib/input/src/InputGroup.d.ts +2 -2
- package/lib/input/src/InputGroupLabel.d.ts +2 -2
- package/lib/input/src/WordCount.d.ts +1 -1
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +3 -2
- package/lib/input-number/src/InputNumber.js +2 -1
- package/lib/input-number/src/interface.d.ts +1 -0
- package/lib/layout/src/Layout.d.ts +10 -4
- package/lib/layout/src/Layout.js +8 -1
- package/lib/layout/src/LayoutContent.d.ts +4 -2
- package/lib/layout/src/LayoutFooter.d.ts +2 -2
- package/lib/layout/src/LayoutHeader.d.ts +2 -2
- package/lib/layout/src/LayoutSider.d.ts +11 -2
- package/lib/layout/src/LayoutSider.js +12 -3
- package/lib/layout/src/ToggleBar.d.ts +1 -1
- package/lib/layout/src/ToggleButton.d.ts +1 -1
- package/lib/legacy-grid/src/Col.d.ts +1 -1
- package/lib/legacy-grid/src/Row.d.ts +2 -2
- package/lib/legacy-grid/src/styles/index.cssr.js +2 -3
- package/lib/legacy-grid/src/styles/rtl.cssr.js +2 -3
- package/lib/legacy-transfer/src/Transfer.d.ts +2 -2
- package/lib/legacy-transfer/src/TransferFilter.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferHeader.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferList.d.ts +1 -1
- package/lib/legacy-transfer/src/TransferListItem.d.ts +1 -1
- package/lib/list/src/List.d.ts +2 -2
- package/lib/list/src/ListItem.d.ts +1 -1
- package/lib/loading-bar/src/LoadingBar.d.ts +4 -2
- package/lib/loading-bar/src/LoadingBar.js +21 -12
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +4 -1
- package/lib/loading-bar/src/LoadingBarProvider.js +2 -2
- package/lib/locales/common/arDZ.js +1 -0
- package/lib/locales/common/deDE.js +1 -0
- package/lib/locales/common/enGB.js +1 -0
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +1 -0
- package/lib/locales/common/eo.js +1 -0
- package/lib/locales/common/esAR.js +1 -0
- package/lib/locales/common/faIR.js +1 -0
- package/lib/locales/common/frFR.js +2 -1
- package/lib/locales/common/idID.js +1 -0
- package/lib/locales/common/itIT.js +1 -0
- package/lib/locales/common/jaJP.js +1 -0
- package/lib/locales/common/koKR.js +1 -0
- package/lib/locales/common/nbNO.js +1 -0
- package/lib/locales/common/nlNL.js +1 -0
- package/lib/locales/common/plPL.js +1 -0
- package/lib/locales/common/ptBR.js +15 -17
- package/lib/locales/common/ruRU.js +1 -0
- package/lib/locales/common/skSK.js +1 -0
- package/lib/locales/common/svSE.d.ts +3 -0
- package/lib/locales/common/svSE.js +123 -0
- package/lib/locales/common/thTH.js +1 -0
- package/lib/locales/common/trTR.js +1 -0
- package/lib/locales/common/ukUA.js +1 -0
- package/lib/locales/common/viVN.js +1 -0
- package/lib/locales/common/zhCN.js +1 -0
- package/lib/locales/common/zhTW.js +18 -17
- package/lib/locales/date/svSE.d.ts +3 -0
- package/lib/locales/date/svSE.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +6 -1
- package/lib/log/src/Log.d.ts +11 -11
- package/lib/log/src/Log.js +12 -12
- package/lib/log/src/LogLine.d.ts +1 -1
- package/lib/log/src/LogLoader.d.ts +1 -1
- package/lib/mention/src/Mention.d.ts +4 -4
- package/lib/mention/src/utils.js +4 -4
- package/lib/menu/src/Menu.d.ts +32 -15
- package/lib/menu/src/Menu.js +101 -7
- package/lib/menu/src/MenuDivider.d.ts +1 -1
- package/lib/menu/src/MenuOption.d.ts +1 -1
- package/lib/menu/src/MenuOptionContent.d.ts +4 -1
- package/lib/menu/src/MenuOptionContent.js +7 -2
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/Submenu.d.ts +24 -13
- package/lib/menu/src/Submenu.js +9 -8
- package/lib/menu/src/context.d.ts +2 -2
- package/lib/menu/src/interface.d.ts +1 -0
- package/lib/menu/src/styles/index.cssr.js +8 -4
- package/lib/menu/src/use-menu-child.js +5 -5
- package/lib/message/src/Message.d.ts +2 -2
- package/lib/message/src/MessageEnvironment.d.ts +1 -1
- package/lib/message/src/MessageProvider.d.ts +9 -6
- package/lib/message/src/MessageProvider.js +3 -2
- package/lib/modal/src/BodyWrapper.d.ts +12 -4
- package/lib/modal/src/Modal.d.ts +18 -6
- package/lib/modal/src/presetProps.d.ts +5 -1
- package/lib/notification/src/Notification.d.ts +1 -1
- package/lib/notification/src/NotificationContainer.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationEnvironment.js +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +5 -2
- package/lib/notification/src/NotificationProvider.js +2 -2
- package/lib/number-animation/src/NumberAnimation.d.ts +1 -1
- package/lib/page-header/src/PageHeader.d.ts +2 -2
- package/lib/pagination/src/Pagination.d.ts +2 -2
- package/lib/pagination/src/Pagination.js +3 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +22 -3
- package/lib/popconfirm/src/Popconfirm.js +13 -5
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/lib/popover/src/Popover.d.ts +25 -1
- package/lib/popover/src/Popover.js +10 -4
- package/lib/popover/src/PopoverBody.d.ts +23 -2
- package/lib/popover/src/PopoverBody.js +26 -10
- package/lib/popover/src/interface.d.ts +4 -1
- package/lib/popselect/src/Popselect.d.ts +19 -1
- package/lib/popselect/src/Popselect.js +2 -1
- package/lib/popselect/src/PopselectPanel.d.ts +2 -2
- package/lib/popselect/src/PopselectPanel.js +1 -0
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/Line.d.ts +1 -1
- package/lib/progress/src/Line.js +1 -3
- package/lib/progress/src/MultipleCircle.d.ts +1 -1
- package/lib/progress/src/Progress.d.ts +3 -3
- package/lib/qr-code/index.d.ts +2 -0
- package/lib/qr-code/index.js +9 -0
- package/lib/qr-code/src/QrCode.d.ts +154 -0
- package/lib/qr-code/src/QrCode.js +152 -0
- package/lib/qr-code/src/qrcodegen.d.ts +94 -0
- package/lib/qr-code/src/qrcodegen.js +949 -0
- package/lib/qr-code/src/styles/index.cssr.d.ts +2 -0
- package/lib/qr-code/src/styles/index.cssr.js +13 -0
- package/lib/qr-code/styles/dark.d.ts +3 -0
- package/lib/qr-code/styles/dark.js +13 -0
- package/lib/qr-code/styles/index.d.ts +3 -0
- package/lib/qr-code/styles/index.js +10 -0
- package/lib/qr-code/styles/light.d.ts +9 -0
- package/lib/qr-code/styles/light.js +14 -0
- package/lib/radio/src/Radio.d.ts +173 -34
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/RadioButton.d.ts +3 -3
- package/lib/radio/src/RadioButton.js +2 -2
- package/lib/radio/src/RadioGroup.d.ts +3 -2
- package/lib/radio/src/RadioGroup.js +2 -1
- package/lib/radio/src/styles/radio-group.cssr.js +1 -0
- package/lib/radio/src/use-radio.d.ts +3 -3
- package/lib/radio/src/use-radio.js +2 -2
- package/lib/rate/src/Rate.d.ts +2 -2
- package/lib/result/src/Result.d.ts +3 -3
- package/lib/scrollbar/src/Scrollbar.d.ts +1 -1
- package/lib/scrollbar/src/Scrollbar.js +2 -0
- package/lib/select/src/Select.d.ts +7 -4
- package/lib/select/src/Select.js +17 -3
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/skeleton/src/Skeleton.d.ts +2 -2
- package/lib/skeleton/src/Skeleton.js +3 -6
- package/lib/slider/src/Slider.d.ts +8 -2
- package/lib/slider/src/Slider.js +19 -4
- package/lib/slider/src/utils.d.ts +2 -2
- package/lib/slider/src/utils.js +5 -3
- package/lib/space/src/Space.d.ts +5 -2
- package/lib/space/src/Space.js +3 -3
- package/lib/spin/src/Spin.d.ts +13 -4
- package/lib/spin/src/Spin.js +25 -6
- package/lib/split/index.d.ts +2 -0
- package/lib/split/index.js +9 -0
- package/lib/split/src/Split.d.ts +135 -0
- package/lib/split/src/Split.js +151 -0
- package/lib/split/src/styles/index.cssr.d.ts +2 -0
- package/lib/split/src/styles/index.cssr.js +30 -0
- package/lib/split/styles/dark.d.ts +3 -0
- package/lib/split/styles/dark.js +8 -0
- package/lib/split/styles/index.d.ts +3 -0
- package/lib/split/styles/index.js +10 -0
- package/lib/split/styles/light.d.ts +9 -0
- package/lib/split/styles/light.js +17 -0
- package/lib/statistic/src/Statistic.d.ts +2 -2
- package/lib/steps/src/Step.d.ts +2 -2
- package/lib/steps/src/Steps.d.ts +3 -3
- package/lib/steps/src/styles/index.cssr.js +1 -0
- package/lib/switch/src/Switch.d.ts +2 -2
- package/lib/table/src/Table.d.ts +2 -2
- package/lib/table/src/Tbody.d.ts +1 -1
- package/lib/table/src/Td.d.ts +1 -1
- package/lib/table/src/Th.d.ts +1 -1
- package/lib/table/src/Thead.d.ts +1 -1
- package/lib/table/src/Tr.d.ts +1 -1
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tab.js +3 -1
- package/lib/tabs/src/TabPane.d.ts +1 -1
- package/lib/tabs/src/Tabs.d.ts +13 -13
- package/lib/tabs/src/Tabs.js +15 -2
- package/lib/tabs/src/styles/index.cssr.js +12 -2
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/theme-editor/src/MaximizeIcon.d.ts +1 -1
- package/lib/theme-editor/src/MinimizeIcon.d.ts +1 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +3 -3
- package/lib/themes/dark.js +56 -52
- package/lib/themes/light.js +56 -52
- package/lib/thing/src/Thing.d.ts +7 -1
- package/lib/thing/src/Thing.js +13 -4
- package/lib/time/src/Time.d.ts +1 -1
- package/lib/time/src/Time.js +1 -1
- package/lib/time-picker/src/Panel.d.ts +1 -1
- package/lib/time-picker/src/PanelCol.d.ts +1 -1
- package/lib/time-picker/src/PanelCol.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +2 -2
- package/lib/time-picker/src/TimePicker.js +1 -1
- package/lib/timeline/src/Timeline.d.ts +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +19 -1
- package/lib/transfer/src/Transfer.d.ts +8 -2
- package/lib/transfer/src/Transfer.js +2 -2
- package/lib/transfer/src/TransferFilter.d.ts +1 -1
- package/lib/transfer/src/TransferHeader.d.ts +5 -1
- package/lib/transfer/src/TransferHeader.js +6 -2
- package/lib/transfer/src/TransferList.d.ts +1 -1
- package/lib/transfer/src/TransferListItem.d.ts +1 -1
- package/lib/tree/index.d.ts +1 -0
- package/lib/tree/index.js +3 -1
- package/lib/tree/src/MotionWrapper.d.ts +1 -1
- package/lib/tree/src/Tree.d.ts +59 -5
- package/lib/tree/src/Tree.js +31 -18
- package/lib/tree/src/TreeNode.d.ts +6 -2
- package/lib/tree/src/TreeNode.js +72 -25
- package/lib/tree/src/TreeNodeCheckbox.d.ts +13 -1
- package/lib/tree/src/TreeNodeCheckbox.js +9 -8
- package/lib/tree/src/TreeNodeContent.d.ts +1 -1
- package/lib/tree/src/TreeNodeSwitcher.d.ts +19 -2
- package/lib/tree/src/TreeNodeSwitcher.js +12 -6
- package/lib/tree/src/interface.d.ts +2 -0
- package/lib/tree/src/styles/index.cssr.js +47 -51
- package/lib/tree/src/utils.d.ts +1 -0
- package/lib/tree/src/utils.js +15 -1
- package/lib/tree/styles/light.d.ts +8 -0
- package/lib/tree/styles/light.js +6 -2
- package/lib/tree-select/src/TreeSelect.d.ts +49 -3
- package/lib/tree-select/src/TreeSelect.js +5 -3
- package/lib/tree-select/src/interface.d.ts +2 -0
- package/lib/tree-select/styles/light.d.ts +4 -0
- package/lib/typography/src/a.d.ts +2 -2
- package/lib/typography/src/blockquote.d.ts +2 -2
- package/lib/typography/src/create-header.d.ts +2 -2
- package/lib/typography/src/headers.d.ts +12 -12
- package/lib/typography/src/hr.d.ts +2 -2
- package/lib/typography/src/li.d.ts +1 -1
- package/lib/typography/src/ol.d.ts +2 -2
- package/lib/typography/src/p.d.ts +2 -2
- package/lib/typography/src/text.d.ts +2 -2
- package/lib/typography/src/ul.d.ts +2 -2
- package/lib/upload/src/Upload.d.ts +11 -5
- package/lib/upload/src/Upload.js +8 -3
- package/lib/upload/src/UploadDragger.d.ts +1 -1
- package/lib/upload/src/UploadFile.d.ts +2 -2
- package/lib/upload/src/UploadFileList.d.ts +1 -1
- package/lib/upload/src/UploadFileList.js +3 -2
- package/lib/upload/src/UploadProgress.d.ts +1 -1
- package/lib/upload/src/UploadTrigger.d.ts +1 -1
- package/lib/upload/src/UploadTrigger.js +3 -2
- package/lib/upload/src/interface.d.ts +5 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +2 -0
- package/lib/virtual-list/index.js +9 -0
- package/lib/virtual-list/src/VirtualList.d.ts +146 -0
- package/lib/virtual-list/src/VirtualList.js +105 -0
- package/lib/watermark/src/Watermark.d.ts +1 -1
- package/lib/watermark/src/Watermark.js +7 -0
- package/package.json +69 -69
- package/volar.d.ts +5 -0
- package/web-types.json +917 -32
|
@@ -10,14 +10,14 @@ import { formatLength, isSlotEmpty, resolveWrappedSlot, useAdjustedTo, isJsdom }
|
|
|
10
10
|
import { popoverLight } from '../styles';
|
|
11
11
|
import { popoverBodyInjectionKey } from './interface';
|
|
12
12
|
import style from './styles/index.cssr';
|
|
13
|
-
export const popoverBodyProps = Object.assign(Object.assign({}, useTheme.props), { to: useAdjustedTo.propTo, show: Boolean, trigger: String, showArrow: Boolean, delay: Number, duration: Number, raw: Boolean, arrowPointToCenter: Boolean, arrowStyle: [String, Object], displayDirective: String, x: Number, y: Number, flip: Boolean, overlap: Boolean, placement: String, width: [Number, String], keepAliveOnHover: Boolean, scrollable: Boolean, contentStyle: [Object, String], headerStyle: [Object, String], footerStyle: [Object, String],
|
|
13
|
+
export const popoverBodyProps = Object.assign(Object.assign({}, useTheme.props), { to: useAdjustedTo.propTo, show: Boolean, trigger: String, showArrow: Boolean, delay: Number, duration: Number, raw: Boolean, arrowPointToCenter: Boolean, arrowClass: String, arrowStyle: [String, Object], arrowWrapperClass: String, arrowWrapperStyle: [String, Object], displayDirective: String, x: Number, y: Number, flip: Boolean, overlap: Boolean, placement: String, width: [Number, String], keepAliveOnHover: Boolean, scrollable: Boolean, contentClass: String, contentStyle: [Object, String], headerClass: String, headerStyle: [Object, String], footerClass: String, footerStyle: [Object, String],
|
|
14
14
|
// private
|
|
15
15
|
internalDeactivateImmediately: Boolean, animated: Boolean, onClickoutside: Function, internalTrapFocus: Boolean, internalOnAfterLeave: Function,
|
|
16
16
|
// deprecated
|
|
17
17
|
minWidth: Number, maxWidth: Number });
|
|
18
|
-
export const renderArrow = ({ arrowStyle, clsPrefix }) => {
|
|
19
|
-
return (h("div", { key: "__popover-arrow__", class: `${clsPrefix}-popover-arrow-wrapper
|
|
20
|
-
h("div", { class: `${clsPrefix}-popover-arrow`, style: arrowStyle })));
|
|
18
|
+
export const renderArrow = ({ arrowClass, arrowStyle, arrowWrapperClass, arrowWrapperStyle, clsPrefix }) => {
|
|
19
|
+
return (h("div", { key: "__popover-arrow__", style: arrowWrapperStyle, class: [`${clsPrefix}-popover-arrow-wrapper`, arrowWrapperClass] },
|
|
20
|
+
h("div", { class: [`${clsPrefix}-popover-arrow`, arrowClass], style: arrowStyle })));
|
|
21
21
|
};
|
|
22
22
|
export default defineComponent({
|
|
23
23
|
name: 'PopoverBody',
|
|
@@ -27,6 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
const { namespaceRef, mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
28
28
|
const themeRef = useTheme('Popover', '-popover', style, popoverLight, props, mergedClsPrefixRef);
|
|
29
29
|
const followerRef = ref(null);
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/non-nullable-type-assertion-style
|
|
30
31
|
const NPopover = inject('NPopover');
|
|
31
32
|
const bodyRef = ref(null);
|
|
32
33
|
const followerEnabledRef = ref(props.show);
|
|
@@ -176,25 +177,40 @@ export default defineComponent({
|
|
|
176
177
|
const { internalTrapFocus } = props;
|
|
177
178
|
const hasHeaderOrFooter = !isSlotEmpty(slots.header) || !isSlotEmpty(slots.footer);
|
|
178
179
|
const renderContentInnerNode = () => {
|
|
179
|
-
var _a;
|
|
180
|
+
var _a, _b;
|
|
180
181
|
const body = hasHeaderOrFooter ? (h(Fragment, null,
|
|
181
182
|
resolveWrappedSlot(slots.header, (children) => {
|
|
182
|
-
return children ? (h("div", { class:
|
|
183
|
+
return children ? (h("div", { class: [
|
|
184
|
+
`${mergedClsPrefix}-popover__header`,
|
|
185
|
+
props.headerClass
|
|
186
|
+
], style: props.headerStyle }, children)) : null;
|
|
183
187
|
}),
|
|
184
188
|
resolveWrappedSlot(slots.default, (children) => {
|
|
185
|
-
return children ? (h("div", { class:
|
|
189
|
+
return children ? (h("div", { class: [
|
|
190
|
+
`${mergedClsPrefix}-popover__content`,
|
|
191
|
+
props.contentClass
|
|
192
|
+
], style: props.contentStyle }, slots)) : null;
|
|
186
193
|
}),
|
|
187
194
|
resolveWrappedSlot(slots.footer, (children) => {
|
|
188
|
-
return children ? (h("div", { class:
|
|
189
|
-
|
|
195
|
+
return children ? (h("div", { class: [
|
|
196
|
+
`${mergedClsPrefix}-popover__footer`,
|
|
197
|
+
props.footerClass
|
|
198
|
+
], style: props.footerStyle }, children)) : null;
|
|
199
|
+
}))) : props.scrollable ? ((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) : (h("div", { class: [
|
|
200
|
+
`${mergedClsPrefix}-popover__content`,
|
|
201
|
+
props.contentClass
|
|
202
|
+
], style: props.contentStyle }, slots));
|
|
190
203
|
const maybeScrollableBody = props.scrollable ? (h(NxScrollbar, { contentClass: hasHeaderOrFooter
|
|
191
204
|
? undefined
|
|
192
|
-
: `${mergedClsPrefix}-popover__content`, contentStyle: hasHeaderOrFooter ? undefined : props.contentStyle }, {
|
|
205
|
+
: `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ''}`, contentStyle: hasHeaderOrFooter ? undefined : props.contentStyle }, {
|
|
193
206
|
default: () => body
|
|
194
207
|
})) : (body);
|
|
195
208
|
const arrow = props.showArrow
|
|
196
209
|
? renderArrow({
|
|
210
|
+
arrowClass: props.arrowClass,
|
|
197
211
|
arrowStyle: props.arrowStyle,
|
|
212
|
+
arrowWrapperClass: props.arrowWrapperClass,
|
|
213
|
+
arrowWrapperStyle: props.arrowWrapperStyle,
|
|
198
214
|
clsPrefix: mergedClsPrefix
|
|
199
215
|
})
|
|
200
216
|
: null;
|
|
@@ -4,6 +4,9 @@ export interface PopoverInst {
|
|
|
4
4
|
syncPosition: () => void;
|
|
5
5
|
setShow: (value: boolean) => void;
|
|
6
6
|
}
|
|
7
|
+
export type InternalPopoverInst = PopoverInst & {
|
|
8
|
+
getMergedShow: () => boolean;
|
|
9
|
+
};
|
|
7
10
|
export type PopoverBodyInjection = Ref<HTMLElement | null> | null;
|
|
8
11
|
export declare const popoverBodyInjectionKey: import("vue").InjectionKey<PopoverBodyInjection>;
|
|
9
|
-
export type InternalRenderBody = (className: any, ref: Ref<HTMLElement | null>, style:
|
|
12
|
+
export type InternalRenderBody = (className: any, ref: Ref<HTMLElement | null>, style: CSSProperties[], onMouseenter: (e: MouseEvent) => void, onMouseleave: (e: MouseEvent) => void) => VNode;
|
|
@@ -65,8 +65,12 @@ export declare const popselectProps: {
|
|
|
65
65
|
};
|
|
66
66
|
raw: BooleanConstructor;
|
|
67
67
|
overlap: BooleanConstructor;
|
|
68
|
+
contentClass: StringConstructor;
|
|
68
69
|
contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
70
|
+
arrowClass: StringConstructor;
|
|
69
71
|
arrowStyle: PropType<string | import("vue").CSSProperties>;
|
|
72
|
+
arrowWrapperClass: StringConstructor;
|
|
73
|
+
arrowWrapperStyle: PropType<string | import("vue").CSSProperties>;
|
|
70
74
|
delay: {
|
|
71
75
|
type: NumberConstructor;
|
|
72
76
|
default: number;
|
|
@@ -80,7 +84,9 @@ export declare const popselectProps: {
|
|
|
80
84
|
type: BooleanConstructor;
|
|
81
85
|
default: boolean;
|
|
82
86
|
};
|
|
87
|
+
headerClass: StringConstructor;
|
|
83
88
|
headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
89
|
+
footerClass: StringConstructor;
|
|
84
90
|
footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
85
91
|
internalDeactivateImmediately: BooleanConstructor;
|
|
86
92
|
animated: {
|
|
@@ -384,8 +390,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
384
390
|
};
|
|
385
391
|
raw: BooleanConstructor;
|
|
386
392
|
overlap: BooleanConstructor;
|
|
393
|
+
contentClass: StringConstructor;
|
|
387
394
|
contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
395
|
+
arrowClass: StringConstructor;
|
|
388
396
|
arrowStyle: PropType<string | import("vue").CSSProperties>;
|
|
397
|
+
arrowWrapperClass: StringConstructor;
|
|
398
|
+
arrowWrapperStyle: PropType<string | import("vue").CSSProperties>;
|
|
389
399
|
delay: {
|
|
390
400
|
type: NumberConstructor;
|
|
391
401
|
default: number;
|
|
@@ -399,7 +409,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
399
409
|
type: BooleanConstructor;
|
|
400
410
|
default: boolean;
|
|
401
411
|
};
|
|
412
|
+
headerClass: StringConstructor;
|
|
402
413
|
headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
414
|
+
footerClass: StringConstructor;
|
|
403
415
|
footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
404
416
|
internalDeactivateImmediately: BooleanConstructor;
|
|
405
417
|
animated: {
|
|
@@ -914,8 +926,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
914
926
|
};
|
|
915
927
|
raw: BooleanConstructor;
|
|
916
928
|
overlap: BooleanConstructor;
|
|
929
|
+
contentClass: StringConstructor;
|
|
917
930
|
contentStyle: PropType<string | import("vue").CSSProperties>;
|
|
931
|
+
arrowClass: StringConstructor;
|
|
918
932
|
arrowStyle: PropType<string | import("vue").CSSProperties>;
|
|
933
|
+
arrowWrapperClass: StringConstructor;
|
|
934
|
+
arrowWrapperStyle: PropType<string | import("vue").CSSProperties>;
|
|
919
935
|
delay: {
|
|
920
936
|
type: NumberConstructor;
|
|
921
937
|
default: number;
|
|
@@ -929,7 +945,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
929
945
|
type: BooleanConstructor;
|
|
930
946
|
default: boolean;
|
|
931
947
|
};
|
|
948
|
+
headerClass: StringConstructor;
|
|
932
949
|
headerStyle: PropType<string | import("vue").CSSProperties>;
|
|
950
|
+
footerClass: StringConstructor;
|
|
933
951
|
footerStyle: PropType<string | import("vue").CSSProperties>;
|
|
934
952
|
internalDeactivateImmediately: BooleanConstructor;
|
|
935
953
|
animated: {
|
|
@@ -1196,5 +1214,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1196
1214
|
internalInheritedEventHandlers: import("../../popover/src/Popover").TriggerEventHandlers[];
|
|
1197
1215
|
internalExtraClass: string[];
|
|
1198
1216
|
cancelable: boolean;
|
|
1199
|
-
}>;
|
|
1217
|
+
}, {}>;
|
|
1200
1218
|
export default _default;
|
|
@@ -50,13 +50,14 @@ export default defineComponent({
|
|
|
50
50
|
ref: 'popoverInstRef',
|
|
51
51
|
internalRenderBody: (className, ref, style, onMouseenter, onMouseleave) => {
|
|
52
52
|
const { $attrs } = this;
|
|
53
|
-
return (h(NPopselectPanel, Object.assign({}, $attrs, { class: [$attrs.class, className], style: [$attrs.style, style] }, keep(this.$props, panelPropKeys), { ref: createRefSetter(ref), onMouseenter: mergeEventHandlers([
|
|
53
|
+
return (h(NPopselectPanel, Object.assign({}, $attrs, { class: [$attrs.class, className], style: [$attrs.style, ...style] }, keep(this.$props, panelPropKeys), { ref: createRefSetter(ref), onMouseenter: mergeEventHandlers([
|
|
54
54
|
onMouseenter,
|
|
55
55
|
$attrs.onMouseenter
|
|
56
56
|
]), onMouseleave: mergeEventHandlers([
|
|
57
57
|
onMouseleave,
|
|
58
58
|
$attrs.onMouseleave
|
|
59
59
|
]) }), {
|
|
60
|
+
header: () => { var _a, _b; return (_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
60
61
|
action: () => { var _a, _b; return (_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
61
62
|
empty: () => { var _a, _b; return (_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a); }
|
|
62
63
|
}));
|
|
@@ -270,7 +270,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
270
270
|
} | undefined;
|
|
271
271
|
};
|
|
272
272
|
}>;
|
|
273
|
-
mergedClsPrefix: import("vue").
|
|
273
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
274
274
|
treeMate: import("vue").ComputedRef<import("treemate").TreeMate<SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectGroupOption, SelectIgnoredOption>>;
|
|
275
275
|
handleToggle: (tmNode: TreeNode<SelectBaseOption>) => void;
|
|
276
276
|
handleMenuMousedown: (e: MouseEvent) => void;
|
|
@@ -316,5 +316,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
316
316
|
readonly showCheckmark: boolean;
|
|
317
317
|
readonly virtualScroll: boolean;
|
|
318
318
|
readonly cancelable: boolean;
|
|
319
|
-
}>;
|
|
319
|
+
}, {}>;
|
|
320
320
|
export default _default;
|
|
@@ -156,6 +156,7 @@ export default defineComponent({
|
|
|
156
156
|
var _a;
|
|
157
157
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
158
158
|
return (h(NInternalSelectMenu, { clsPrefix: this.mergedClsPrefix, focusable: true, nodeProps: this.nodeProps, class: [`${this.mergedClsPrefix}-popselect-menu`, this.themeClass], style: this.cssVars, theme: this.mergedTheme.peers.InternalSelectMenu, themeOverrides: this.mergedTheme.peerOverrides.InternalSelectMenu, multiple: this.multiple, treeMate: this.treeMate, size: this.size, value: this.value, virtualScroll: this.virtualScroll, scrollable: this.scrollable, renderLabel: this.renderLabel, onToggle: this.handleToggle, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseenter, onMousedown: this.handleMenuMousedown, showCheckmark: this.showCheckmark }, {
|
|
159
|
+
header: () => { var _a, _b; return ((_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a)) || []; },
|
|
159
160
|
action: () => { var _a, _b; return ((_b = (_a = this.$slots).action) === null || _b === void 0 ? void 0 : _b.call(_a)) || []; },
|
|
160
161
|
empty: () => { var _a, _b; return ((_b = (_a = this.$slots).empty) === null || _b === void 0 ? void 0 : _b.call(_a)) || []; }
|
|
161
162
|
}));
|
package/es/progress/src/Line.js
CHANGED
|
@@ -102,9 +102,7 @@ export default defineComponent({
|
|
|
102
102
|
borderRadius: styleFillBorderRadiusRef.value
|
|
103
103
|
} }, indicatorPlacement === 'inside' ? (h("div", { class: `${clsPrefix}-progress-graph-line-indicator`, style: {
|
|
104
104
|
color: indicatorTextColor
|
|
105
|
-
} },
|
|
106
|
-
percentage,
|
|
107
|
-
unit)) : null)))),
|
|
105
|
+
} }, slots.default ? slots.default() : `${percentage}${unit}`)) : null)))),
|
|
108
106
|
showIndicator && indicatorPlacement === 'outside' ? (h("div", null, slots.default ? (h("div", { class: `${clsPrefix}-progress-custom-content`, style: {
|
|
109
107
|
color: indicatorTextColor
|
|
110
108
|
}, role: "none" }, slots.default())) : status === 'default' ? (h("div", { role: "none", class: `${clsPrefix}-progress-icon ${clsPrefix}-progress-icon--as-text`, style: {
|
|
@@ -240,7 +240,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
240
240
|
lineBgProcessing: string;
|
|
241
241
|
}, any>>>;
|
|
242
242
|
}, {
|
|
243
|
-
mergedClsPrefix: import("vue").
|
|
243
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
244
244
|
mergedIndicatorPlacement: import("vue").ComputedRef<"inside" | "outside">;
|
|
245
245
|
gapDeg: import("vue").ComputedRef<number | undefined>;
|
|
246
246
|
cssVars: import("vue").ComputedRef<{
|
|
@@ -381,8 +381,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
381
381
|
}, any>>>;
|
|
382
382
|
}>>, {
|
|
383
383
|
readonly type: "circle" | "line" | "multiple-circle" | "dashboard";
|
|
384
|
-
readonly strokeWidth: number;
|
|
385
384
|
readonly status: Status;
|
|
385
|
+
readonly strokeWidth: number;
|
|
386
386
|
readonly processing: boolean;
|
|
387
387
|
readonly unit: string;
|
|
388
388
|
readonly indicatorPlacement: "inside" | "outside";
|
|
@@ -390,5 +390,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
390
390
|
readonly viewBoxWidth: number;
|
|
391
391
|
readonly circleGap: number;
|
|
392
392
|
readonly indicatorPosition: "inside" | "outside";
|
|
393
|
-
}>;
|
|
393
|
+
}, {}>;
|
|
394
394
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NQrCode, qrCodeProps } from './src/QrCode';
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
export declare const qrCodeProps: {
|
|
4
|
+
readonly value: StringConstructor;
|
|
5
|
+
readonly color: {
|
|
6
|
+
readonly type: StringConstructor;
|
|
7
|
+
readonly default: "#000";
|
|
8
|
+
};
|
|
9
|
+
readonly backgroundColor: {
|
|
10
|
+
readonly type: StringConstructor;
|
|
11
|
+
readonly default: "#FFF";
|
|
12
|
+
};
|
|
13
|
+
readonly iconSrc: StringConstructor;
|
|
14
|
+
readonly iconSize: {
|
|
15
|
+
readonly type: NumberConstructor;
|
|
16
|
+
readonly default: 40;
|
|
17
|
+
};
|
|
18
|
+
readonly iconBackgroundColor: {
|
|
19
|
+
readonly type: StringConstructor;
|
|
20
|
+
readonly default: "#FFF";
|
|
21
|
+
};
|
|
22
|
+
readonly iconBorderRadius: {
|
|
23
|
+
readonly type: NumberConstructor;
|
|
24
|
+
readonly default: 4;
|
|
25
|
+
};
|
|
26
|
+
readonly size: {
|
|
27
|
+
readonly type: NumberConstructor;
|
|
28
|
+
readonly default: 100;
|
|
29
|
+
};
|
|
30
|
+
readonly padding: {
|
|
31
|
+
readonly type: PropType<string | number>;
|
|
32
|
+
readonly default: 12;
|
|
33
|
+
};
|
|
34
|
+
readonly errorCorrectionLevel: {
|
|
35
|
+
readonly type: StringConstructor;
|
|
36
|
+
readonly default: "M";
|
|
37
|
+
};
|
|
38
|
+
readonly theme: PropType<import("../../_mixins").Theme<"QrCode", {
|
|
39
|
+
borderRadius: string;
|
|
40
|
+
}, any>>;
|
|
41
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"QrCode", {
|
|
42
|
+
borderRadius: string;
|
|
43
|
+
}, any>>>;
|
|
44
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"QrCode", {
|
|
45
|
+
borderRadius: string;
|
|
46
|
+
}, any>>>;
|
|
47
|
+
};
|
|
48
|
+
export type QrCodeProps = ExtractPublicPropTypes<typeof qrCodeProps>;
|
|
49
|
+
declare const _default: import("vue").DefineComponent<{
|
|
50
|
+
readonly value: StringConstructor;
|
|
51
|
+
readonly color: {
|
|
52
|
+
readonly type: StringConstructor;
|
|
53
|
+
readonly default: "#000";
|
|
54
|
+
};
|
|
55
|
+
readonly backgroundColor: {
|
|
56
|
+
readonly type: StringConstructor;
|
|
57
|
+
readonly default: "#FFF";
|
|
58
|
+
};
|
|
59
|
+
readonly iconSrc: StringConstructor;
|
|
60
|
+
readonly iconSize: {
|
|
61
|
+
readonly type: NumberConstructor;
|
|
62
|
+
readonly default: 40;
|
|
63
|
+
};
|
|
64
|
+
readonly iconBackgroundColor: {
|
|
65
|
+
readonly type: StringConstructor;
|
|
66
|
+
readonly default: "#FFF";
|
|
67
|
+
};
|
|
68
|
+
readonly iconBorderRadius: {
|
|
69
|
+
readonly type: NumberConstructor;
|
|
70
|
+
readonly default: 4;
|
|
71
|
+
};
|
|
72
|
+
readonly size: {
|
|
73
|
+
readonly type: NumberConstructor;
|
|
74
|
+
readonly default: 100;
|
|
75
|
+
};
|
|
76
|
+
readonly padding: {
|
|
77
|
+
readonly type: PropType<string | number>;
|
|
78
|
+
readonly default: 12;
|
|
79
|
+
};
|
|
80
|
+
readonly errorCorrectionLevel: {
|
|
81
|
+
readonly type: StringConstructor;
|
|
82
|
+
readonly default: "M";
|
|
83
|
+
};
|
|
84
|
+
readonly theme: PropType<import("../../_mixins").Theme<"QrCode", {
|
|
85
|
+
borderRadius: string;
|
|
86
|
+
}, any>>;
|
|
87
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"QrCode", {
|
|
88
|
+
borderRadius: string;
|
|
89
|
+
}, any>>>;
|
|
90
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"QrCode", {
|
|
91
|
+
borderRadius: string;
|
|
92
|
+
}, any>>>;
|
|
93
|
+
}, {
|
|
94
|
+
canvasRef: import("vue").Ref<HTMLCanvasElement | undefined>;
|
|
95
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
96
|
+
cssVars: import("vue").ComputedRef<{
|
|
97
|
+
'--n-border-radius': string;
|
|
98
|
+
}> | undefined;
|
|
99
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
100
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
101
|
+
readonly value: StringConstructor;
|
|
102
|
+
readonly color: {
|
|
103
|
+
readonly type: StringConstructor;
|
|
104
|
+
readonly default: "#000";
|
|
105
|
+
};
|
|
106
|
+
readonly backgroundColor: {
|
|
107
|
+
readonly type: StringConstructor;
|
|
108
|
+
readonly default: "#FFF";
|
|
109
|
+
};
|
|
110
|
+
readonly iconSrc: StringConstructor;
|
|
111
|
+
readonly iconSize: {
|
|
112
|
+
readonly type: NumberConstructor;
|
|
113
|
+
readonly default: 40;
|
|
114
|
+
};
|
|
115
|
+
readonly iconBackgroundColor: {
|
|
116
|
+
readonly type: StringConstructor;
|
|
117
|
+
readonly default: "#FFF";
|
|
118
|
+
};
|
|
119
|
+
readonly iconBorderRadius: {
|
|
120
|
+
readonly type: NumberConstructor;
|
|
121
|
+
readonly default: 4;
|
|
122
|
+
};
|
|
123
|
+
readonly size: {
|
|
124
|
+
readonly type: NumberConstructor;
|
|
125
|
+
readonly default: 100;
|
|
126
|
+
};
|
|
127
|
+
readonly padding: {
|
|
128
|
+
readonly type: PropType<string | number>;
|
|
129
|
+
readonly default: 12;
|
|
130
|
+
};
|
|
131
|
+
readonly errorCorrectionLevel: {
|
|
132
|
+
readonly type: StringConstructor;
|
|
133
|
+
readonly default: "M";
|
|
134
|
+
};
|
|
135
|
+
readonly theme: PropType<import("../../_mixins").Theme<"QrCode", {
|
|
136
|
+
borderRadius: string;
|
|
137
|
+
}, any>>;
|
|
138
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"QrCode", {
|
|
139
|
+
borderRadius: string;
|
|
140
|
+
}, any>>>;
|
|
141
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"QrCode", {
|
|
142
|
+
borderRadius: string;
|
|
143
|
+
}, any>>>;
|
|
144
|
+
}>>, {
|
|
145
|
+
readonly color: string;
|
|
146
|
+
readonly size: number;
|
|
147
|
+
readonly backgroundColor: string;
|
|
148
|
+
readonly padding: string | number;
|
|
149
|
+
readonly iconSize: number;
|
|
150
|
+
readonly iconBackgroundColor: string;
|
|
151
|
+
readonly iconBorderRadius: number;
|
|
152
|
+
readonly errorCorrectionLevel: string;
|
|
153
|
+
}, {}>;
|
|
154
|
+
export default _default;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { h, ref, defineComponent, watchEffect, computed, onMounted } from 'vue';
|
|
2
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
3
|
+
import style from './styles/index.cssr';
|
|
4
|
+
import { qrcodeLight } from '../styles';
|
|
5
|
+
import qrcodegen from './qrcodegen';
|
|
6
|
+
const ERROR_CORRECTION_LEVEL = {
|
|
7
|
+
L: qrcodegen.QrCode.Ecc.LOW,
|
|
8
|
+
M: qrcodegen.QrCode.Ecc.MEDIUM,
|
|
9
|
+
Q: qrcodegen.QrCode.Ecc.QUARTILE,
|
|
10
|
+
H: qrcodegen.QrCode.Ecc.HIGH
|
|
11
|
+
};
|
|
12
|
+
export const qrCodeProps = Object.assign(Object.assign({}, useTheme.props), { value: String, color: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: '#000'
|
|
15
|
+
}, backgroundColor: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: '#FFF'
|
|
18
|
+
}, iconSrc: String, iconSize: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 40
|
|
21
|
+
}, iconBackgroundColor: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: '#FFF'
|
|
24
|
+
}, iconBorderRadius: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 4
|
|
27
|
+
}, size: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 100
|
|
30
|
+
}, padding: {
|
|
31
|
+
type: [Number, String],
|
|
32
|
+
default: 12
|
|
33
|
+
}, errorCorrectionLevel: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'M'
|
|
36
|
+
} });
|
|
37
|
+
// For retina display
|
|
38
|
+
const UPSCALE_RATIO = 2;
|
|
39
|
+
export default defineComponent({
|
|
40
|
+
name: 'QrCode',
|
|
41
|
+
props: qrCodeProps,
|
|
42
|
+
setup(props) {
|
|
43
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
44
|
+
const themeRef = useTheme('QrCode', '-qr-code', style, qrcodeLight, props, mergedClsPrefixRef);
|
|
45
|
+
const cssVarsRef = computed(() => {
|
|
46
|
+
return {
|
|
47
|
+
'--n-border-radius': themeRef.value.self.borderRadius
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const themeClassHandle = inlineThemeDisabled
|
|
51
|
+
? useThemeClass('qr-code', undefined, cssVarsRef, props)
|
|
52
|
+
: undefined;
|
|
53
|
+
const canvasRef = ref();
|
|
54
|
+
const qr = computed(() => {
|
|
55
|
+
var _a;
|
|
56
|
+
const errorCorrectionLevel = ERROR_CORRECTION_LEVEL[props.errorCorrectionLevel];
|
|
57
|
+
return qrcodegen.QrCode.encodeText((_a = props.value) !== null && _a !== void 0 ? _a : '-', errorCorrectionLevel);
|
|
58
|
+
});
|
|
59
|
+
onMounted(() => {
|
|
60
|
+
const imageLoadedTrigger = ref(0);
|
|
61
|
+
let loadedIcon = null;
|
|
62
|
+
watchEffect(() => {
|
|
63
|
+
void imageLoadedTrigger.value;
|
|
64
|
+
drawCanvas(qr.value, props.size, props.color, props.backgroundColor, loadedIcon
|
|
65
|
+
? {
|
|
66
|
+
icon: loadedIcon,
|
|
67
|
+
iconBorderRadius: props.iconBorderRadius,
|
|
68
|
+
iconSize: props.iconSize,
|
|
69
|
+
iconBackgroundColor: props.iconBackgroundColor
|
|
70
|
+
}
|
|
71
|
+
: null);
|
|
72
|
+
});
|
|
73
|
+
watchEffect(() => {
|
|
74
|
+
const { iconSrc } = props;
|
|
75
|
+
if (iconSrc) {
|
|
76
|
+
let aborted = false;
|
|
77
|
+
const img = new Image();
|
|
78
|
+
img.src = iconSrc;
|
|
79
|
+
img.onload = () => {
|
|
80
|
+
if (aborted)
|
|
81
|
+
return;
|
|
82
|
+
loadedIcon = img;
|
|
83
|
+
imageLoadedTrigger.value++;
|
|
84
|
+
};
|
|
85
|
+
return () => {
|
|
86
|
+
aborted = true;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
function drawCanvas(qr, size, foregroundColor, backgroundColor, iconConfig) {
|
|
92
|
+
const canvas = canvasRef.value;
|
|
93
|
+
if (!canvas)
|
|
94
|
+
return;
|
|
95
|
+
const canvasWidth = size * UPSCALE_RATIO;
|
|
96
|
+
const width = qr.size;
|
|
97
|
+
const scale = canvasWidth / width;
|
|
98
|
+
canvas.width = canvasWidth;
|
|
99
|
+
canvas.height = canvasWidth;
|
|
100
|
+
const ctx = canvas.getContext('2d');
|
|
101
|
+
if (!ctx)
|
|
102
|
+
return;
|
|
103
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
104
|
+
for (let y = 0; y < qr.size; y++) {
|
|
105
|
+
for (let x = 0; x < qr.size; x++) {
|
|
106
|
+
ctx.fillStyle = qr.getModule(x, y) ? foregroundColor : backgroundColor;
|
|
107
|
+
const startX = Math.floor(x * scale);
|
|
108
|
+
const endX = Math.ceil((x + 1) * scale);
|
|
109
|
+
const startY = Math.floor(y * scale);
|
|
110
|
+
const endY = Math.ceil((y + 1) * scale);
|
|
111
|
+
ctx.fillRect(startX, startY, endX - startX, endY - startY);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (iconConfig) {
|
|
115
|
+
const { icon, iconBackgroundColor, iconBorderRadius, iconSize } = iconConfig;
|
|
116
|
+
const finalIconSize = iconSize * UPSCALE_RATIO;
|
|
117
|
+
const centerX = (canvas.width - finalIconSize) / 2;
|
|
118
|
+
const centerY = (canvas.height - finalIconSize) / 2;
|
|
119
|
+
ctx.fillStyle = iconBackgroundColor;
|
|
120
|
+
ctx.beginPath();
|
|
121
|
+
ctx.roundRect(centerX, centerY, finalIconSize, finalIconSize, iconBorderRadius * UPSCALE_RATIO);
|
|
122
|
+
ctx.fill();
|
|
123
|
+
const aspectRatio = icon.width / icon.height;
|
|
124
|
+
const scaledWidth = aspectRatio >= 1 ? finalIconSize : finalIconSize * aspectRatio;
|
|
125
|
+
const scaledHeight = aspectRatio <= 1 ? finalIconSize : finalIconSize / aspectRatio;
|
|
126
|
+
const left = centerX + (finalIconSize - scaledWidth) / 2;
|
|
127
|
+
const top = centerY + (finalIconSize - scaledHeight) / 2;
|
|
128
|
+
ctx.drawImage(icon, left, top, scaledWidth, scaledHeight);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
canvasRef,
|
|
133
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
134
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
135
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
render() {
|
|
139
|
+
const { mergedClsPrefix, backgroundColor, padding, cssVars, themeClass, size } = this;
|
|
140
|
+
return (h("div", { class: [`${mergedClsPrefix}-qr-code`, themeClass], style: Object.assign({ padding: typeof padding === 'number' ? `${padding}px` : padding, backgroundColor }, cssVars) },
|
|
141
|
+
h("canvas", { ref: "canvasRef", style: {
|
|
142
|
+
width: `${size}px`,
|
|
143
|
+
height: `${size}px`
|
|
144
|
+
} })));
|
|
145
|
+
}
|
|
146
|
+
});
|