naive-ui 2.25.0 → 2.25.3
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.d.ts +0 -1
- package/es/_internal/clear/src/Clear.js +1 -3
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/icons/replaceable.js +5 -4
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/es/_internal/scrollbar/src/ScrollBar.js +35 -16
- package/es/_internal/select-menu/src/SelectMenu.d.ts +22 -18
- package/es/_internal/select-menu/src/SelectMenu.js +13 -10
- package/es/_internal/selection/src/Selection.d.ts +31 -26
- package/es/_internal/selection/src/Selection.js +79 -68
- 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/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-config.d.ts +6 -3
- package/es/_mixins/use-config.js +5 -1
- package/es/_mixins/use-css-vars-class.d.ts +6 -2
- package/es/_mixins/use-css-vars-class.js +31 -15
- package/es/_mixins/use-form-item.d.ts +1 -1
- 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/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/resolve-slot.d.ts +5 -2
- package/es/_utils/vue/resolve-slot.js +4 -4
- package/es/alert/src/Alert.d.ts +7 -5
- package/es/alert/src/Alert.js +36 -21
- package/es/anchor/src/AnchorAdapter.js +9 -3
- package/es/auto-complete/src/AutoComplete.d.ts +4 -2
- package/es/auto-complete/src/AutoComplete.js +28 -15
- package/es/avatar/src/Avatar.d.ts +3 -1
- package/es/avatar/src/Avatar.js +70 -35
- package/es/back-top/src/BackTop.d.ts +12 -49
- package/es/back-top/src/BackTop.js +60 -58
- package/es/badge/src/Badge.d.ts +16 -41
- package/es/badge/src/Badge.js +41 -31
- package/es/breadcrumb/src/Breadcrumb.d.ts +3 -1
- package/es/breadcrumb/src/Breadcrumb.js +24 -16
- package/es/button/src/Button.d.ts +8 -6
- package/es/button/src/Button.js +20 -21
- 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.d.ts +3 -1
- package/es/calendar/src/Calendar.js +37 -30
- package/es/card/src/Card.d.ts +3 -1
- package/es/card/src/Card.js +57 -43
- 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.d.ts +3 -1
- package/es/carousel/src/Carousel.js +29 -20
- package/es/cascader/src/Cascader.d.ts +46 -31
- package/es/cascader/src/Cascader.js +53 -31
- package/es/cascader/src/CascaderMenu.d.ts +3 -3
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderOption.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.js +2 -1
- package/es/cascader/src/CascaderSubmenu.d.ts +4 -3
- package/es/cascader/src/interface.d.ts +1 -0
- package/es/cascader/styles/light.d.ts +3 -3
- package/es/checkbox/src/Checkbox.d.ts +6 -4
- package/es/checkbox/src/Checkbox.js +41 -32
- package/es/checkbox/src/styles/index.cssr.js +17 -17
- package/es/code/src/Code.d.ts +3 -1
- package/es/code/src/Code.js +33 -27
- package/es/collapse/src/Collapse.d.ts +3 -1
- package/es/collapse/src/Collapse.js +24 -16
- package/es/color-picker/src/ColorPicker.d.ts +3 -1
- package/es/color-picker/src/ColorPicker.js +20 -7
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +4 -4
- package/es/config-provider/src/ConfigProvider.js +3 -3
- package/es/config-provider/src/internal-interface.d.ts +3 -1
- package/es/countdown/src/Countdown.d.ts +0 -3
- package/es/countdown/src/Countdown.js +0 -1
- package/es/data-table/src/DataTable.d.ts +77 -75
- package/es/data-table/src/DataTable.js +54 -48
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/es/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/es/data-table/src/HeaderButton/SortButton.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +7 -6
- package/es/data-table/src/TableParts/Body.js +4 -2
- 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 +1 -1
- package/es/data-table/src/use-table-data.js +19 -7
- package/es/data-table/styles/light.d.ts +3 -3
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +2 -0
- package/es/date-picker/src/panel/datetime.d.ts +2 -0
- package/es/date-picker/src/panel/month.d.ts +2 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +4 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -0
- package/es/descriptions/src/Descriptions.d.ts +15 -2
- package/es/descriptions/src/Descriptions.js +45 -28
- package/es/descriptions/src/styles/index.cssr.js +2 -1
- package/es/descriptions/styles/light.d.ts +1 -0
- package/es/descriptions/styles/light.js +2 -2
- package/es/dialog/src/Dialog.d.ts +7 -5
- package/es/dialog/src/Dialog.js +57 -56
- package/es/dialog/src/DialogEnvironment.d.ts +5 -5
- package/es/dialog/src/DialogEnvironment.js +1 -1
- package/es/dialog/src/DialogProvider.d.ts +2 -2
- package/es/dialog/src/dialogProps.d.ts +2 -2
- package/es/divider/src/Divider.d.ts +3 -1
- package/es/divider/src/Divider.js +20 -11
- package/es/dynamic-input/src/DynamicInput.js +2 -2
- package/es/dynamic-tags/src/DynamicTags.d.ts +7 -5
- package/es/dynamic-tags/src/DynamicTags.js +17 -10
- package/es/element/src/Element.d.ts +3 -1
- package/es/element/src/Element.js +18 -11
- package/es/empty/src/Empty.d.ts +3 -1
- package/es/empty/src/Empty.js +28 -16
- package/es/form/src/FormItem.d.ts +4 -4
- package/es/form/src/FormItem.js +1 -2
- package/es/form/src/FormItemCol.d.ts +3 -3
- package/es/form/src/FormItemGridItem.d.ts +5 -5
- package/es/form/src/FormItemRow.d.ts +3 -3
- package/es/form/src/utils.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/grid/src/Grid.js +2 -2
- package/es/icon-wrapper/src/IconWrapper.js +6 -6
- package/es/image/src/Image.d.ts +1 -1
- package/es/input/src/Input.d.ts +7 -4
- package/es/input/src/Input.js +96 -84
- package/es/input/src/styles/input.cssr.js +2 -2
- package/es/input-number/src/InputNumber.d.ts +7 -18
- package/es/input-number/src/InputNumber.js +79 -20
- package/es/layout/src/Layout.d.ts +8 -2
- package/es/layout/src/Layout.js +17 -10
- package/es/layout/src/LayoutContent.d.ts +4 -1
- package/es/layout/src/LayoutFooter.d.ts +3 -1
- package/es/layout/src/LayoutFooter.js +28 -19
- package/es/layout/src/LayoutHeader.d.ts +3 -1
- package/es/layout/src/LayoutHeader.js +28 -19
- package/es/layout/src/LayoutSider.d.ts +4 -0
- package/es/layout/src/LayoutSider.js +37 -29
- 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/esAR.js +2 -2
- package/es/locales/common/frFR.js +8 -9
- package/es/locales/common/plPL.d.ts +3 -0
- package/es/locales/common/plPL.js +109 -0
- package/es/locales/common/skSK.d.ts +3 -0
- package/es/locales/common/skSK.js +110 -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/date/skSK.d.ts +3 -0
- package/es/locales/date/skSK.js +6 -0
- package/es/locales/index.d.ts +8 -0
- package/es/locales/index.js +8 -0
- package/es/log/src/Log.d.ts +4 -1
- package/es/log/src/Log.js +20 -15
- package/es/mention/index.d.ts +1 -1
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/mention/src/interface.d.ts +4 -0
- package/es/menu/src/Menu.d.ts +4 -2
- package/es/menu/src/Menu.js +68 -63
- package/es/modal/src/BodyWrapper.d.ts +7 -6
- package/es/modal/src/Modal.d.ts +19 -22
- package/es/modal/src/Modal.js +41 -32
- package/es/modal/src/presetProps.d.ts +2 -2
- package/es/notification/src/Notification.d.ts +4 -4
- package/es/notification/src/NotificationEnvironment.d.ts +4 -4
- package/es/notification/src/NotificationProvider.d.ts +1 -1
- package/es/notification/src/styles/index.cssr.js +6 -5
- package/es/page-header/src/PageHeader.d.ts +3 -1
- package/es/page-header/src/PageHeader.js +27 -18
- package/es/pagination/src/Pagination.d.ts +46 -34
- package/es/pagination/src/Pagination.js +59 -52
- package/es/pagination/styles/light.d.ts +3 -3
- package/es/popover/src/PopoverBody.js +10 -4
- package/es/progress/src/Circle.d.ts +19 -3
- package/es/progress/src/Circle.js +41 -22
- package/es/progress/src/Progress.d.ts +14 -5
- package/es/progress/src/Progress.js +45 -25
- package/es/progress/src/styles/index.cssr.js +1 -1
- package/es/radio/src/Radio.d.ts +3 -1
- package/es/radio/src/Radio.js +32 -23
- package/es/radio/src/RadioGroup.d.ts +3 -1
- package/es/radio/src/RadioGroup.js +31 -22
- package/es/rate/src/Rate.d.ts +3 -1
- package/es/rate/src/Rate.js +44 -23
- package/es/result/src/Result.d.ts +8 -6
- package/es/result/src/Result.js +36 -19
- package/es/scrollbar/src/ScrollBar.d.ts +12 -1
- package/es/scrollbar/src/ScrollBar.js +4 -0
- package/es/select/src/Select.d.ts +45 -31
- package/es/select/src/Select.js +14 -8
- package/es/select/styles/light.d.ts +3 -3
- package/es/spin/src/Spin.d.ts +3 -1
- package/es/spin/src/Spin.js +31 -21
- package/es/statistic/src/Statistic.d.ts +3 -1
- package/es/statistic/src/Statistic.js +29 -21
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/switch/src/Switch.d.ts +13 -1
- package/es/switch/src/Switch.js +85 -60
- package/es/switch/src/styles/index.cssr.js +21 -8
- package/es/switch/styles/dark.js +2 -2
- package/es/switch/styles/light.d.ts +1 -0
- package/es/switch/styles/light.js +2 -2
- package/es/table/src/Table.d.ts +3 -1
- package/es/table/src/Table.js +40 -29
- package/es/table/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/Tabs.d.ts +25 -23
- package/es/tabs/src/Tabs.js +50 -44
- package/es/tabs/src/styles/index.cssr.js +77 -77
- package/es/tag/src/Tag.d.ts +7 -5
- package/es/tag/src/Tag.js +59 -42
- package/es/tag/src/common-props.d.ts +1 -1
- package/es/tag/src/styles/index.cssr.js +1 -1
- 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/theme-editor/src/ThemeEditor.js +4 -3
- package/es/themes/dark.js +3 -1
- package/es/themes/light.js +3 -1
- package/es/thing/src/Thing.js +10 -3
- package/es/time-picker/src/TimePicker.d.ts +4 -0
- package/es/timeline/src/TimelineItem.d.ts +4 -4
- package/es/transfer/src/TransferList.d.ts +1 -0
- package/es/tree/src/Tree.d.ts +1 -0
- package/es/tree/src/Tree.js +8 -4
- package/es/tree/src/utils.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +43 -30
- package/es/tree-select/src/TreeSelect.js +6 -2
- package/es/tree-select/styles/light.d.ts +3 -3
- package/es/typography/src/a.d.ts +3 -1
- package/es/typography/src/a.js +18 -10
- package/es/typography/src/blockquote.d.ts +3 -1
- package/es/typography/src/blockquote.js +21 -12
- package/es/typography/src/create-header.d.ts +7 -5
- package/es/typography/src/create-header.js +25 -16
- package/es/typography/src/headers.d.ts +36 -24
- package/es/typography/src/hr.d.ts +3 -1
- package/es/typography/src/hr.js +18 -10
- package/es/typography/src/ol.d.ts +3 -1
- package/es/typography/src/ol.js +23 -14
- package/es/typography/src/p.d.ts +3 -1
- package/es/typography/src/p.js +23 -15
- package/es/typography/src/text.d.ts +3 -1
- package/es/typography/src/text.js +31 -23
- package/es/typography/src/ul.d.ts +3 -1
- package/es/typography/src/ul.js +23 -14
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadProgress.d.ts +2 -2
- package/es/upload/src/interface.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/watermark/index.d.ts +2 -0
- package/es/watermark/index.js +1 -0
- package/es/watermark/src/Watermark.d.ts +285 -0
- package/es/watermark/src/Watermark.js +159 -0
- package/es/watermark/src/styles/index.cssr.d.ts +2 -0
- package/es/watermark/src/styles/index.cssr.js +14 -0
- package/es/watermark/styles/dark.d.ts +3 -0
- package/es/watermark/styles/dark.js +12 -0
- package/es/watermark/styles/index.d.ts +3 -0
- package/es/watermark/styles/index.js +2 -0
- package/es/watermark/styles/light.d.ts +5 -0
- package/es/watermark/styles/light.js +13 -0
- package/lib/_internal/clear/src/Clear.d.ts +0 -1
- package/lib/_internal/clear/src/Clear.js +0 -2
- package/lib/_internal/icons/replaceable.d.ts +1 -1
- package/lib/_internal/icons/replaceable.js +4 -3
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/lib/_internal/scrollbar/src/ScrollBar.js +34 -15
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +22 -18
- package/lib/_internal/select-menu/src/SelectMenu.js +12 -9
- package/lib/_internal/selection/src/Selection.d.ts +31 -26
- package/lib/_internal/selection/src/Selection.js +78 -67
- 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/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +2 -2
- package/lib/_mixins/use-config.d.ts +6 -3
- package/lib/_mixins/use-config.js +5 -1
- package/lib/_mixins/use-css-vars-class.d.ts +6 -2
- package/lib/_mixins/use-css-vars-class.js +33 -17
- package/lib/_mixins/use-form-item.d.ts +1 -1
- 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/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/vue/resolve-slot.d.ts +5 -2
- package/lib/_utils/vue/resolve-slot.js +4 -4
- package/lib/alert/src/Alert.d.ts +7 -5
- package/lib/alert/src/Alert.js +34 -19
- package/lib/anchor/src/AnchorAdapter.js +8 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +4 -2
- package/lib/auto-complete/src/AutoComplete.js +27 -14
- package/lib/avatar/src/Avatar.d.ts +3 -1
- package/lib/avatar/src/Avatar.js +68 -33
- package/lib/back-top/src/BackTop.d.ts +12 -49
- package/lib/back-top/src/BackTop.js +57 -55
- package/lib/badge/src/Badge.d.ts +16 -41
- package/lib/badge/src/Badge.js +39 -29
- package/lib/breadcrumb/src/Breadcrumb.d.ts +3 -1
- package/lib/breadcrumb/src/Breadcrumb.js +23 -15
- package/lib/button/src/Button.d.ts +8 -6
- package/lib/button/src/Button.js +18 -19
- 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.d.ts +3 -1
- package/lib/calendar/src/Calendar.js +36 -29
- package/lib/card/src/Card.d.ts +3 -1
- package/lib/card/src/Card.js +55 -41
- 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.d.ts +3 -1
- package/lib/carousel/src/Carousel.js +27 -18
- package/lib/cascader/src/Cascader.d.ts +46 -31
- package/lib/cascader/src/Cascader.js +52 -30
- package/lib/cascader/src/CascaderMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderOption.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.js +2 -1
- package/lib/cascader/src/CascaderSubmenu.d.ts +4 -3
- package/lib/cascader/src/interface.d.ts +1 -0
- package/lib/cascader/styles/light.d.ts +3 -3
- package/lib/checkbox/src/Checkbox.d.ts +6 -4
- package/lib/checkbox/src/Checkbox.js +40 -31
- package/lib/checkbox/src/styles/index.cssr.js +17 -17
- package/lib/code/src/Code.d.ts +3 -1
- package/lib/code/src/Code.js +32 -26
- package/lib/collapse/src/Collapse.d.ts +3 -1
- package/lib/collapse/src/Collapse.js +23 -15
- package/lib/color-picker/src/ColorPicker.d.ts +3 -1
- package/lib/color-picker/src/ColorPicker.js +19 -6
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +4 -4
- package/lib/config-provider/src/ConfigProvider.js +3 -3
- package/lib/config-provider/src/internal-interface.d.ts +3 -1
- package/lib/countdown/src/Countdown.d.ts +0 -3
- package/lib/countdown/src/Countdown.js +0 -1
- package/lib/data-table/src/DataTable.d.ts +77 -75
- package/lib/data-table/src/DataTable.js +53 -47
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/SortButton.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +7 -6
- package/lib/data-table/src/TableParts/Body.js +3 -1
- 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 +1 -1
- package/lib/data-table/src/use-table-data.js +19 -7
- package/lib/data-table/styles/light.d.ts +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/panel/date.d.ts +2 -0
- package/lib/date-picker/src/panel/datetime.d.ts +2 -0
- package/lib/date-picker/src/panel/month.d.ts +2 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +4 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -0
- package/lib/descriptions/src/Descriptions.d.ts +15 -2
- package/lib/descriptions/src/Descriptions.js +44 -27
- package/lib/descriptions/src/styles/index.cssr.js +2 -1
- package/lib/descriptions/styles/light.d.ts +1 -0
- package/lib/descriptions/styles/light.js +2 -2
- package/lib/dialog/src/Dialog.d.ts +7 -5
- package/lib/dialog/src/Dialog.js +55 -54
- package/lib/dialog/src/DialogEnvironment.d.ts +5 -5
- package/lib/dialog/src/DialogEnvironment.js +1 -1
- package/lib/dialog/src/DialogProvider.d.ts +2 -2
- package/lib/dialog/src/dialogProps.d.ts +2 -2
- package/lib/divider/src/Divider.d.ts +3 -1
- package/lib/divider/src/Divider.js +19 -10
- package/lib/dynamic-input/src/DynamicInput.js +2 -2
- package/lib/dynamic-tags/src/DynamicTags.d.ts +7 -5
- package/lib/dynamic-tags/src/DynamicTags.js +16 -9
- package/lib/element/src/Element.d.ts +3 -1
- package/lib/element/src/Element.js +17 -10
- package/lib/empty/src/Empty.d.ts +3 -1
- package/lib/empty/src/Empty.js +27 -15
- package/lib/form/src/FormItem.d.ts +4 -4
- package/lib/form/src/FormItem.js +1 -2
- package/lib/form/src/FormItemCol.d.ts +3 -3
- package/lib/form/src/FormItemGridItem.d.ts +5 -5
- package/lib/form/src/FormItemRow.d.ts +3 -3
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/grid/src/Grid.js +2 -2
- package/lib/icon-wrapper/src/IconWrapper.js +5 -5
- package/lib/image/src/Image.d.ts +1 -1
- package/lib/input/src/Input.d.ts +7 -4
- package/lib/input/src/Input.js +95 -83
- package/lib/input/src/styles/input.cssr.js +2 -2
- package/lib/input-number/src/InputNumber.d.ts +7 -18
- package/lib/input-number/src/InputNumber.js +76 -17
- package/lib/layout/src/Layout.d.ts +8 -2
- package/lib/layout/src/Layout.js +16 -9
- package/lib/layout/src/LayoutContent.d.ts +4 -1
- package/lib/layout/src/LayoutFooter.d.ts +3 -1
- package/lib/layout/src/LayoutFooter.js +27 -18
- package/lib/layout/src/LayoutHeader.d.ts +3 -1
- package/lib/layout/src/LayoutHeader.js +27 -18
- package/lib/layout/src/LayoutSider.d.ts +4 -0
- package/lib/layout/src/LayoutSider.js +36 -28
- 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/esAR.js +2 -2
- package/lib/locales/common/frFR.js +8 -9
- package/lib/locales/common/plPL.d.ts +3 -0
- package/lib/locales/common/plPL.js +111 -0
- package/lib/locales/common/skSK.d.ts +3 -0
- package/lib/locales/common/skSK.js +112 -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/date/skSK.d.ts +3 -0
- package/lib/locales/date/skSK.js +11 -0
- package/lib/locales/index.d.ts +8 -0
- package/lib/locales/index.js +17 -1
- package/lib/log/src/Log.d.ts +4 -1
- package/lib/log/src/Log.js +19 -14
- package/lib/mention/index.d.ts +1 -1
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/mention/src/interface.d.ts +4 -0
- package/lib/menu/src/Menu.d.ts +4 -2
- package/lib/menu/src/Menu.js +67 -62
- package/lib/modal/src/BodyWrapper.d.ts +7 -6
- package/lib/modal/src/Modal.d.ts +19 -22
- package/lib/modal/src/Modal.js +40 -31
- package/lib/modal/src/presetProps.d.ts +2 -2
- package/lib/notification/src/Notification.d.ts +4 -4
- package/lib/notification/src/NotificationEnvironment.d.ts +4 -4
- package/lib/notification/src/NotificationProvider.d.ts +1 -1
- package/lib/notification/src/styles/index.cssr.js +6 -5
- package/lib/page-header/src/PageHeader.d.ts +3 -1
- package/lib/page-header/src/PageHeader.js +26 -17
- package/lib/pagination/src/Pagination.d.ts +46 -34
- package/lib/pagination/src/Pagination.js +58 -51
- package/lib/pagination/styles/light.d.ts +3 -3
- package/lib/popover/src/PopoverBody.js +9 -3
- package/lib/progress/src/Circle.d.ts +19 -3
- package/lib/progress/src/Circle.js +40 -21
- package/lib/progress/src/Progress.d.ts +14 -5
- package/lib/progress/src/Progress.js +44 -24
- package/lib/progress/src/styles/index.cssr.js +1 -1
- package/lib/radio/src/Radio.d.ts +3 -1
- package/lib/radio/src/Radio.js +31 -22
- package/lib/radio/src/RadioGroup.d.ts +3 -1
- package/lib/radio/src/RadioGroup.js +30 -21
- package/lib/rate/src/Rate.d.ts +3 -1
- package/lib/rate/src/Rate.js +42 -21
- package/lib/result/src/Result.d.ts +8 -6
- package/lib/result/src/Result.js +35 -18
- package/lib/scrollbar/src/ScrollBar.d.ts +12 -1
- package/lib/scrollbar/src/ScrollBar.js +4 -0
- package/lib/select/src/Select.d.ts +45 -31
- package/lib/select/src/Select.js +14 -8
- package/lib/select/styles/light.d.ts +3 -3
- package/lib/spin/src/Spin.d.ts +3 -1
- package/lib/spin/src/Spin.js +30 -20
- package/lib/statistic/src/Statistic.d.ts +3 -1
- package/lib/statistic/src/Statistic.js +28 -20
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +9 -7
- package/lib/switch/src/Switch.d.ts +13 -1
- package/lib/switch/src/Switch.js +81 -56
- package/lib/switch/src/styles/index.cssr.js +21 -8
- package/lib/switch/styles/dark.js +2 -2
- package/lib/switch/styles/light.d.ts +1 -0
- package/lib/switch/styles/light.js +2 -2
- package/lib/table/src/Table.d.ts +3 -1
- package/lib/table/src/Table.js +39 -28
- package/lib/table/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/Tabs.d.ts +25 -23
- package/lib/tabs/src/Tabs.js +48 -42
- package/lib/tabs/src/styles/index.cssr.js +77 -77
- package/lib/tag/src/Tag.d.ts +7 -5
- package/lib/tag/src/Tag.js +57 -40
- package/lib/tag/src/common-props.d.ts +1 -1
- package/lib/tag/src/styles/index.cssr.js +1 -1
- 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/theme-editor/src/ThemeEditor.js +2 -1
- package/lib/themes/dark.js +3 -1
- package/lib/themes/light.js +3 -1
- package/lib/thing/src/Thing.js +9 -2
- package/lib/time-picker/src/TimePicker.d.ts +4 -0
- package/lib/timeline/src/TimelineItem.d.ts +4 -4
- package/lib/transfer/src/TransferList.d.ts +1 -0
- package/lib/tree/src/Tree.d.ts +1 -0
- package/lib/tree/src/Tree.js +8 -4
- package/lib/tree/src/utils.js +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +43 -30
- package/lib/tree-select/src/TreeSelect.js +6 -2
- package/lib/tree-select/styles/light.d.ts +3 -3
- package/lib/typography/src/a.d.ts +3 -1
- package/lib/typography/src/a.js +17 -9
- package/lib/typography/src/blockquote.d.ts +3 -1
- package/lib/typography/src/blockquote.js +20 -11
- package/lib/typography/src/create-header.d.ts +7 -5
- package/lib/typography/src/create-header.js +24 -15
- package/lib/typography/src/headers.d.ts +36 -24
- package/lib/typography/src/hr.d.ts +3 -1
- package/lib/typography/src/hr.js +17 -9
- package/lib/typography/src/ol.d.ts +3 -1
- package/lib/typography/src/ol.js +22 -13
- package/lib/typography/src/p.d.ts +3 -1
- package/lib/typography/src/p.js +22 -14
- package/lib/typography/src/text.d.ts +3 -1
- package/lib/typography/src/text.js +30 -22
- package/lib/typography/src/ul.d.ts +3 -1
- package/lib/typography/src/ul.js +22 -13
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadProgress.d.ts +2 -2
- package/lib/upload/src/interface.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/index.d.ts +2 -0
- package/lib/watermark/index.js +8 -0
- package/lib/watermark/src/Watermark.d.ts +285 -0
- package/lib/watermark/src/Watermark.js +164 -0
- package/lib/watermark/src/styles/index.cssr.d.ts +2 -0
- package/lib/watermark/src/styles/index.cssr.js +21 -0
- package/lib/watermark/styles/dark.d.ts +3 -0
- package/lib/watermark/styles/dark.js +14 -0
- package/lib/watermark/styles/index.d.ts +3 -0
- package/lib/watermark/styles/index.js +10 -0
- package/lib/watermark/styles/light.d.ts +5 -0
- package/lib/watermark/styles/light.js +15 -0
- package/package.json +9 -10
- package/volar.d.ts +1 -0
- package/web-types.json +279 -29
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
declare const watermarkProps: {
|
|
4
|
+
readonly debug: BooleanConstructor;
|
|
5
|
+
readonly cross: BooleanConstructor;
|
|
6
|
+
readonly fullscreen: BooleanConstructor;
|
|
7
|
+
readonly width: {
|
|
8
|
+
readonly type: NumberConstructor;
|
|
9
|
+
readonly default: 32;
|
|
10
|
+
};
|
|
11
|
+
readonly height: {
|
|
12
|
+
readonly type: NumberConstructor;
|
|
13
|
+
readonly default: 32;
|
|
14
|
+
};
|
|
15
|
+
readonly zIndex: {
|
|
16
|
+
readonly type: NumberConstructor;
|
|
17
|
+
readonly default: 10;
|
|
18
|
+
};
|
|
19
|
+
readonly xGap: {
|
|
20
|
+
readonly type: NumberConstructor;
|
|
21
|
+
readonly default: 0;
|
|
22
|
+
};
|
|
23
|
+
readonly yGap: {
|
|
24
|
+
readonly type: NumberConstructor;
|
|
25
|
+
readonly default: 0;
|
|
26
|
+
};
|
|
27
|
+
readonly yOffset: {
|
|
28
|
+
readonly type: NumberConstructor;
|
|
29
|
+
readonly default: 0;
|
|
30
|
+
};
|
|
31
|
+
readonly xOffset: {
|
|
32
|
+
readonly type: NumberConstructor;
|
|
33
|
+
readonly default: 0;
|
|
34
|
+
};
|
|
35
|
+
readonly rotate: {
|
|
36
|
+
readonly type: NumberConstructor;
|
|
37
|
+
readonly default: 0;
|
|
38
|
+
};
|
|
39
|
+
readonly image: StringConstructor;
|
|
40
|
+
readonly imageOpacity: {
|
|
41
|
+
readonly type: NumberConstructor;
|
|
42
|
+
readonly default: 1;
|
|
43
|
+
};
|
|
44
|
+
readonly imageHeight: NumberConstructor;
|
|
45
|
+
readonly imageWidth: NumberConstructor;
|
|
46
|
+
readonly content: StringConstructor;
|
|
47
|
+
readonly selectable: {
|
|
48
|
+
readonly type: BooleanConstructor;
|
|
49
|
+
readonly default: true;
|
|
50
|
+
};
|
|
51
|
+
readonly fontSize: {
|
|
52
|
+
readonly type: NumberConstructor;
|
|
53
|
+
readonly default: 14;
|
|
54
|
+
};
|
|
55
|
+
readonly fontFamily: StringConstructor;
|
|
56
|
+
readonly fontStyle: {
|
|
57
|
+
readonly type: PropType<"normal" | "italic" | "oblique" | `oblique ${number}deg`>;
|
|
58
|
+
readonly default: "normal";
|
|
59
|
+
};
|
|
60
|
+
readonly fontVariant: {
|
|
61
|
+
readonly type: StringConstructor;
|
|
62
|
+
readonly default: "";
|
|
63
|
+
};
|
|
64
|
+
readonly fontWeight: {
|
|
65
|
+
readonly type: NumberConstructor;
|
|
66
|
+
readonly default: 400;
|
|
67
|
+
};
|
|
68
|
+
readonly fontColor: {
|
|
69
|
+
readonly type: StringConstructor;
|
|
70
|
+
readonly default: "rgba(128, 128, 128, .3)";
|
|
71
|
+
};
|
|
72
|
+
readonly fontStretch: {
|
|
73
|
+
readonly type: StringConstructor;
|
|
74
|
+
readonly default: "";
|
|
75
|
+
};
|
|
76
|
+
readonly lineHeight: {
|
|
77
|
+
readonly type: NumberConstructor;
|
|
78
|
+
readonly default: 14;
|
|
79
|
+
};
|
|
80
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Watermark", {
|
|
81
|
+
fontFamily: string;
|
|
82
|
+
}, unknown>>;
|
|
83
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Watermark", {
|
|
84
|
+
fontFamily: string;
|
|
85
|
+
}, unknown>>>;
|
|
86
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Watermark", {
|
|
87
|
+
fontFamily: string;
|
|
88
|
+
}, unknown>>>;
|
|
89
|
+
};
|
|
90
|
+
export declare type WatermarkProps = ExtractPublicPropTypes<typeof watermarkProps>;
|
|
91
|
+
declare const _default: import("vue").DefineComponent<{
|
|
92
|
+
readonly debug: BooleanConstructor;
|
|
93
|
+
readonly cross: BooleanConstructor;
|
|
94
|
+
readonly fullscreen: BooleanConstructor;
|
|
95
|
+
readonly width: {
|
|
96
|
+
readonly type: NumberConstructor;
|
|
97
|
+
readonly default: 32;
|
|
98
|
+
};
|
|
99
|
+
readonly height: {
|
|
100
|
+
readonly type: NumberConstructor;
|
|
101
|
+
readonly default: 32;
|
|
102
|
+
};
|
|
103
|
+
readonly zIndex: {
|
|
104
|
+
readonly type: NumberConstructor;
|
|
105
|
+
readonly default: 10;
|
|
106
|
+
};
|
|
107
|
+
readonly xGap: {
|
|
108
|
+
readonly type: NumberConstructor;
|
|
109
|
+
readonly default: 0;
|
|
110
|
+
};
|
|
111
|
+
readonly yGap: {
|
|
112
|
+
readonly type: NumberConstructor;
|
|
113
|
+
readonly default: 0;
|
|
114
|
+
};
|
|
115
|
+
readonly yOffset: {
|
|
116
|
+
readonly type: NumberConstructor;
|
|
117
|
+
readonly default: 0;
|
|
118
|
+
};
|
|
119
|
+
readonly xOffset: {
|
|
120
|
+
readonly type: NumberConstructor;
|
|
121
|
+
readonly default: 0;
|
|
122
|
+
};
|
|
123
|
+
readonly rotate: {
|
|
124
|
+
readonly type: NumberConstructor;
|
|
125
|
+
readonly default: 0;
|
|
126
|
+
};
|
|
127
|
+
readonly image: StringConstructor;
|
|
128
|
+
readonly imageOpacity: {
|
|
129
|
+
readonly type: NumberConstructor;
|
|
130
|
+
readonly default: 1;
|
|
131
|
+
};
|
|
132
|
+
readonly imageHeight: NumberConstructor;
|
|
133
|
+
readonly imageWidth: NumberConstructor;
|
|
134
|
+
readonly content: StringConstructor;
|
|
135
|
+
readonly selectable: {
|
|
136
|
+
readonly type: BooleanConstructor;
|
|
137
|
+
readonly default: true;
|
|
138
|
+
};
|
|
139
|
+
readonly fontSize: {
|
|
140
|
+
readonly type: NumberConstructor;
|
|
141
|
+
readonly default: 14;
|
|
142
|
+
};
|
|
143
|
+
readonly fontFamily: StringConstructor;
|
|
144
|
+
readonly fontStyle: {
|
|
145
|
+
readonly type: PropType<"normal" | "italic" | "oblique" | `oblique ${number}deg`>;
|
|
146
|
+
readonly default: "normal";
|
|
147
|
+
};
|
|
148
|
+
readonly fontVariant: {
|
|
149
|
+
readonly type: StringConstructor;
|
|
150
|
+
readonly default: "";
|
|
151
|
+
};
|
|
152
|
+
readonly fontWeight: {
|
|
153
|
+
readonly type: NumberConstructor;
|
|
154
|
+
readonly default: 400;
|
|
155
|
+
};
|
|
156
|
+
readonly fontColor: {
|
|
157
|
+
readonly type: StringConstructor;
|
|
158
|
+
readonly default: "rgba(128, 128, 128, .3)";
|
|
159
|
+
};
|
|
160
|
+
readonly fontStretch: {
|
|
161
|
+
readonly type: StringConstructor;
|
|
162
|
+
readonly default: "";
|
|
163
|
+
};
|
|
164
|
+
readonly lineHeight: {
|
|
165
|
+
readonly type: NumberConstructor;
|
|
166
|
+
readonly default: 14;
|
|
167
|
+
};
|
|
168
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Watermark", {
|
|
169
|
+
fontFamily: string;
|
|
170
|
+
}, unknown>>;
|
|
171
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Watermark", {
|
|
172
|
+
fontFamily: string;
|
|
173
|
+
}, unknown>>>;
|
|
174
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Watermark", {
|
|
175
|
+
fontFamily: string;
|
|
176
|
+
}, unknown>>>;
|
|
177
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
178
|
+
readonly debug: BooleanConstructor;
|
|
179
|
+
readonly cross: BooleanConstructor;
|
|
180
|
+
readonly fullscreen: BooleanConstructor;
|
|
181
|
+
readonly width: {
|
|
182
|
+
readonly type: NumberConstructor;
|
|
183
|
+
readonly default: 32;
|
|
184
|
+
};
|
|
185
|
+
readonly height: {
|
|
186
|
+
readonly type: NumberConstructor;
|
|
187
|
+
readonly default: 32;
|
|
188
|
+
};
|
|
189
|
+
readonly zIndex: {
|
|
190
|
+
readonly type: NumberConstructor;
|
|
191
|
+
readonly default: 10;
|
|
192
|
+
};
|
|
193
|
+
readonly xGap: {
|
|
194
|
+
readonly type: NumberConstructor;
|
|
195
|
+
readonly default: 0;
|
|
196
|
+
};
|
|
197
|
+
readonly yGap: {
|
|
198
|
+
readonly type: NumberConstructor;
|
|
199
|
+
readonly default: 0;
|
|
200
|
+
};
|
|
201
|
+
readonly yOffset: {
|
|
202
|
+
readonly type: NumberConstructor;
|
|
203
|
+
readonly default: 0;
|
|
204
|
+
};
|
|
205
|
+
readonly xOffset: {
|
|
206
|
+
readonly type: NumberConstructor;
|
|
207
|
+
readonly default: 0;
|
|
208
|
+
};
|
|
209
|
+
readonly rotate: {
|
|
210
|
+
readonly type: NumberConstructor;
|
|
211
|
+
readonly default: 0;
|
|
212
|
+
};
|
|
213
|
+
readonly image: StringConstructor;
|
|
214
|
+
readonly imageOpacity: {
|
|
215
|
+
readonly type: NumberConstructor;
|
|
216
|
+
readonly default: 1;
|
|
217
|
+
};
|
|
218
|
+
readonly imageHeight: NumberConstructor;
|
|
219
|
+
readonly imageWidth: NumberConstructor;
|
|
220
|
+
readonly content: StringConstructor;
|
|
221
|
+
readonly selectable: {
|
|
222
|
+
readonly type: BooleanConstructor;
|
|
223
|
+
readonly default: true;
|
|
224
|
+
};
|
|
225
|
+
readonly fontSize: {
|
|
226
|
+
readonly type: NumberConstructor;
|
|
227
|
+
readonly default: 14;
|
|
228
|
+
};
|
|
229
|
+
readonly fontFamily: StringConstructor;
|
|
230
|
+
readonly fontStyle: {
|
|
231
|
+
readonly type: PropType<"normal" | "italic" | "oblique" | `oblique ${number}deg`>;
|
|
232
|
+
readonly default: "normal";
|
|
233
|
+
};
|
|
234
|
+
readonly fontVariant: {
|
|
235
|
+
readonly type: StringConstructor;
|
|
236
|
+
readonly default: "";
|
|
237
|
+
};
|
|
238
|
+
readonly fontWeight: {
|
|
239
|
+
readonly type: NumberConstructor;
|
|
240
|
+
readonly default: 400;
|
|
241
|
+
};
|
|
242
|
+
readonly fontColor: {
|
|
243
|
+
readonly type: StringConstructor;
|
|
244
|
+
readonly default: "rgba(128, 128, 128, .3)";
|
|
245
|
+
};
|
|
246
|
+
readonly fontStretch: {
|
|
247
|
+
readonly type: StringConstructor;
|
|
248
|
+
readonly default: "";
|
|
249
|
+
};
|
|
250
|
+
readonly lineHeight: {
|
|
251
|
+
readonly type: NumberConstructor;
|
|
252
|
+
readonly default: 14;
|
|
253
|
+
};
|
|
254
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Watermark", {
|
|
255
|
+
fontFamily: string;
|
|
256
|
+
}, unknown>>;
|
|
257
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Watermark", {
|
|
258
|
+
fontFamily: string;
|
|
259
|
+
}, unknown>>>;
|
|
260
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Watermark", {
|
|
261
|
+
fontFamily: string;
|
|
262
|
+
}, unknown>>>;
|
|
263
|
+
}>>, {
|
|
264
|
+
fontSize: number;
|
|
265
|
+
fontStretch: string;
|
|
266
|
+
fontStyle: "normal" | "italic" | "oblique" | `oblique ${number}deg`;
|
|
267
|
+
fontVariant: string;
|
|
268
|
+
fontWeight: number;
|
|
269
|
+
height: number;
|
|
270
|
+
lineHeight: number;
|
|
271
|
+
rotate: number;
|
|
272
|
+
width: number;
|
|
273
|
+
zIndex: number;
|
|
274
|
+
cross: boolean;
|
|
275
|
+
xGap: number;
|
|
276
|
+
yGap: number;
|
|
277
|
+
selectable: boolean;
|
|
278
|
+
fullscreen: boolean;
|
|
279
|
+
debug: boolean;
|
|
280
|
+
yOffset: number;
|
|
281
|
+
xOffset: number;
|
|
282
|
+
imageOpacity: number;
|
|
283
|
+
fontColor: string;
|
|
284
|
+
}>;
|
|
285
|
+
export default _default;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { h, defineComponent, ref, watchEffect } from 'vue';
|
|
2
|
+
import { onFontsReady } from 'vooks';
|
|
3
|
+
import { useConfig, useTheme } from '../../_mixins';
|
|
4
|
+
import { warnOnce } from '../../_utils';
|
|
5
|
+
import { watermarkLight } from '../styles';
|
|
6
|
+
import style from './styles/index.cssr';
|
|
7
|
+
function getRatio(context) {
|
|
8
|
+
if (!context) {
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
|
11
|
+
const backingStore = context.backingStorePixelRatio ||
|
|
12
|
+
context.webkitBackingStorePixelRatio ||
|
|
13
|
+
context.mozBackingStorePixelRatio ||
|
|
14
|
+
context.msBackingStorePixelRatio ||
|
|
15
|
+
context.oBackingStorePixelRatio ||
|
|
16
|
+
context.backingStorePixelRatio ||
|
|
17
|
+
1;
|
|
18
|
+
return (window.devicePixelRatio || 1) / backingStore;
|
|
19
|
+
}
|
|
20
|
+
const watermarkProps = Object.assign(Object.assign({}, useTheme.props), { debug: Boolean, cross: Boolean, fullscreen: Boolean, width: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 32
|
|
23
|
+
}, height: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 32
|
|
26
|
+
}, zIndex: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 10
|
|
29
|
+
}, xGap: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 0
|
|
32
|
+
}, yGap: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 0
|
|
35
|
+
}, yOffset: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: 0
|
|
38
|
+
}, xOffset: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 0
|
|
41
|
+
}, rotate: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 0
|
|
44
|
+
}, image: String, imageOpacity: { type: Number, default: 1 }, imageHeight: Number, imageWidth: Number, content: String, selectable: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true
|
|
47
|
+
}, fontSize: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 14
|
|
50
|
+
}, fontFamily: String, fontStyle: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'normal'
|
|
53
|
+
}, fontVariant: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: ''
|
|
56
|
+
}, fontWeight: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 400
|
|
59
|
+
}, fontColor: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'rgba(128, 128, 128, .3)'
|
|
62
|
+
}, fontStretch: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
65
|
+
}, lineHeight: {
|
|
66
|
+
type: Number,
|
|
67
|
+
default: 14
|
|
68
|
+
} });
|
|
69
|
+
export default defineComponent({
|
|
70
|
+
name: 'Watermark',
|
|
71
|
+
props: watermarkProps,
|
|
72
|
+
setup(props, { slots }) {
|
|
73
|
+
const { mergedClsPrefixRef } = useConfig(props);
|
|
74
|
+
const themeRef = useTheme('Watermark', '-watermark', style, watermarkLight, props);
|
|
75
|
+
const base64UrlRef = ref('');
|
|
76
|
+
const canvas = document.createElement('canvas');
|
|
77
|
+
const ctx = canvas.getContext('2d');
|
|
78
|
+
const fontsReadyRef = ref(false);
|
|
79
|
+
onFontsReady(() => (fontsReadyRef.value = true));
|
|
80
|
+
watchEffect(() => {
|
|
81
|
+
void fontsReadyRef.value;
|
|
82
|
+
const ratio = getRatio(ctx);
|
|
83
|
+
const { xGap, yGap, width, height, yOffset, xOffset, rotate, image, content, fontColor, fontStyle, fontVariant, fontStretch, fontWeight, fontFamily, fontSize, lineHeight, debug } = props;
|
|
84
|
+
const canvasWidth = (xGap + width) * ratio;
|
|
85
|
+
const canvasHeight = (yGap + height) * ratio;
|
|
86
|
+
const canvasOffsetLeft = xOffset * ratio;
|
|
87
|
+
const canvasOffsetTop = yOffset * ratio;
|
|
88
|
+
canvas.width = canvasWidth;
|
|
89
|
+
canvas.height = canvasHeight;
|
|
90
|
+
if (ctx) {
|
|
91
|
+
ctx.translate(0, 0);
|
|
92
|
+
const markWidth = width * ratio;
|
|
93
|
+
const markHeight = height * ratio;
|
|
94
|
+
if (debug) {
|
|
95
|
+
ctx.strokeStyle = 'grey';
|
|
96
|
+
ctx.strokeRect(0, 0, markWidth, markHeight);
|
|
97
|
+
}
|
|
98
|
+
ctx.rotate(rotate * (Math.PI / 180));
|
|
99
|
+
if (image) {
|
|
100
|
+
const img = new Image();
|
|
101
|
+
img.crossOrigin = 'anonymous';
|
|
102
|
+
img.referrerPolicy = 'no-referrer';
|
|
103
|
+
img.src = image;
|
|
104
|
+
img.onload = () => {
|
|
105
|
+
ctx.globalAlpha = props.imageOpacity;
|
|
106
|
+
const { imageWidth, imageHeight } = props;
|
|
107
|
+
ctx.drawImage(img, canvasOffsetLeft, canvasOffsetTop, (props.imageWidth ||
|
|
108
|
+
(imageHeight
|
|
109
|
+
? (img.width * imageHeight) / img.height
|
|
110
|
+
: img.width)) * ratio, (props.imageHeight ||
|
|
111
|
+
(imageWidth
|
|
112
|
+
? (img.height * imageWidth) / img.width
|
|
113
|
+
: img.height)) * ratio);
|
|
114
|
+
base64UrlRef.value = canvas.toDataURL();
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
else if (content) {
|
|
118
|
+
if (debug) {
|
|
119
|
+
ctx.strokeStyle = 'green';
|
|
120
|
+
ctx.strokeRect(0, 0, markWidth, markHeight);
|
|
121
|
+
}
|
|
122
|
+
ctx.font = `${fontStyle} ${fontVariant} ${fontWeight} ${fontStretch} ${fontSize * ratio}px/${lineHeight * ratio}px ${fontFamily || themeRef.value.self.fontFamily}`;
|
|
123
|
+
ctx.fillStyle = fontColor;
|
|
124
|
+
ctx.fillText(content, canvasOffsetLeft, canvasOffsetTop + lineHeight * ratio);
|
|
125
|
+
base64UrlRef.value = canvas.toDataURL();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
warnOnce('watermark', 'Canvas is not supported in the browser.');
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return () => {
|
|
133
|
+
var _a;
|
|
134
|
+
const watarmarkNode = (h("div", { class: [
|
|
135
|
+
`${mergedClsPrefixRef.value}-watermark`,
|
|
136
|
+
props.fullscreen &&
|
|
137
|
+
`${mergedClsPrefixRef.value}-watermark--fullscreen`
|
|
138
|
+
], style: {
|
|
139
|
+
zIndex: props.zIndex,
|
|
140
|
+
backgroundSize: `${props.xGap + props.width}px`,
|
|
141
|
+
backgroundPosition: props.cross
|
|
142
|
+
? `${props.width / 2}px ${props.height / 2}px, 0 0`
|
|
143
|
+
: '',
|
|
144
|
+
backgroundImage: props.cross
|
|
145
|
+
? `url(${base64UrlRef.value}), url(${base64UrlRef.value})`
|
|
146
|
+
: `url(${base64UrlRef.value})`
|
|
147
|
+
} }));
|
|
148
|
+
if (props.fullscreen)
|
|
149
|
+
return watarmarkNode;
|
|
150
|
+
return (h("div", { class: [
|
|
151
|
+
`${mergedClsPrefixRef.value}-watermark-container`,
|
|
152
|
+
props.selectable &&
|
|
153
|
+
`${mergedClsPrefixRef.value}-watermark-container--selectable`
|
|
154
|
+
] }, (_a = slots.default) === null || _a === void 0 ? void 0 :
|
|
155
|
+
_a.call(slots),
|
|
156
|
+
watarmarkNode));
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { c, cB, cNotM, cM } from '../../../_utils/cssr';
|
|
2
|
+
export default c([cB('watermark-container', `
|
|
3
|
+
position: relative;
|
|
4
|
+
`, [cNotM('selectable', 'user-select: none;')]), cB('watermark', `
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
background-repeat: repeat;
|
|
12
|
+
`, [cM('fullscreen', `
|
|
13
|
+
position: fixed;
|
|
14
|
+
`)])]);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { commonLight } from '../../_styles/common';
|
|
2
|
+
import { createTheme } from '../../_mixins';
|
|
3
|
+
const watermarkLight = createTheme({
|
|
4
|
+
name: 'Watermark',
|
|
5
|
+
common: commonLight,
|
|
6
|
+
self(vars) {
|
|
7
|
+
const { fontFamily } = vars;
|
|
8
|
+
return {
|
|
9
|
+
fontFamily
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export default watermarkLight;
|
|
@@ -7,7 +7,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
show: BooleanConstructor;
|
|
8
8
|
onClear: PropType<(e: MouseEvent) => void>;
|
|
9
9
|
}, {
|
|
10
|
-
NConfigProvider: import("../../../config-provider/src/internal-interface").ConfigProviderInjection | null;
|
|
11
10
|
handleMouseDown(e: MouseEvent): void;
|
|
12
11
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
12
|
clsPrefix: {
|
|
@@ -21,9 +21,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
21
21
|
},
|
|
22
22
|
setup(props) {
|
|
23
23
|
(0, _mixins_1.useStyle)('-base-clear', index_cssr_1.default, (0, vue_1.toRef)(props, 'clsPrefix'));
|
|
24
|
-
const { NConfigProvider } = (0, _mixins_1.useConfig)();
|
|
25
24
|
return {
|
|
26
|
-
NConfigProvider,
|
|
27
25
|
handleMouseDown(e) {
|
|
28
26
|
e.preventDefault();
|
|
29
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GlobalIconConfig } from '../../config-provider';
|
|
1
|
+
import type { GlobalIconConfig } from '../../config-provider/src/internal-interface';
|
|
2
2
|
export declare function replaceable(name: keyof GlobalIconConfig, icon: JSX.Element): import("vue").DefineComponent<{}, () => import("vue").VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -3,16 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.replaceable = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const vue_1 = require("vue");
|
|
6
|
-
const
|
|
6
|
+
const context_1 = require("../../config-provider/src/context");
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
8
8
|
function replaceable(name, icon) {
|
|
9
9
|
return (0, vue_1.defineComponent)({
|
|
10
10
|
name: (0, lodash_1.upperFirst)(name),
|
|
11
11
|
setup() {
|
|
12
|
-
|
|
12
|
+
var _a;
|
|
13
|
+
const mergedIconsRef = (_a = (0, vue_1.inject)(context_1.configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedIconsRef;
|
|
13
14
|
return () => {
|
|
14
15
|
var _a;
|
|
15
|
-
const iconOverride = (_a =
|
|
16
|
+
const iconOverride = (_a = mergedIconsRef === null || mergedIconsRef === void 0 ? void 0 : mergedIconsRef.value) === null || _a === void 0 ? void 0 : _a[name];
|
|
16
17
|
return iconOverride ? iconOverride() : icon;
|
|
17
18
|
};
|
|
18
19
|
}
|
|
@@ -25,9 +25,18 @@ export interface ScrollTo {
|
|
|
25
25
|
debounce?: boolean;
|
|
26
26
|
}): void;
|
|
27
27
|
}
|
|
28
|
+
export interface ScrollBy {
|
|
29
|
+
(x: number, y: number): void;
|
|
30
|
+
(options: {
|
|
31
|
+
left?: number;
|
|
32
|
+
top?: number;
|
|
33
|
+
behavior?: ScrollBehavior;
|
|
34
|
+
}): void;
|
|
35
|
+
}
|
|
28
36
|
export interface ScrollbarInstMethods {
|
|
29
37
|
syncUnifiedContainer: () => void;
|
|
30
38
|
scrollTo: ScrollTo;
|
|
39
|
+
scrollBy: ScrollBy;
|
|
31
40
|
sync: () => void;
|
|
32
41
|
handleMouseEnterWrapper: () => void;
|
|
33
42
|
handleMouseLeaveWrapper: () => void;
|
|
@@ -149,9 +158,12 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
149
158
|
'--n-scrollbar-border-radius': string;
|
|
150
159
|
'--n-scrollbar-width': string;
|
|
151
160
|
'--n-scrollbar-height': string;
|
|
152
|
-
}
|
|
161
|
+
}> | undefined;
|
|
162
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
163
|
+
onRender: (() => void) | undefined;
|
|
153
164
|
syncUnifiedContainer: () => void;
|
|
154
165
|
scrollTo: ScrollTo;
|
|
166
|
+
scrollBy: ScrollBy;
|
|
155
167
|
sync: () => void;
|
|
156
168
|
handleMouseEnterWrapper: () => void;
|
|
157
169
|
handleMouseLeaveWrapper: () => void;
|