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
package/es/tag/src/Tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, defineComponent, computed, ref, provide, toRef } from 'vue';
|
|
2
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
2
|
+
import { useConfig, useThemeClass, useTheme } from '../../_mixins';
|
|
3
3
|
import { NBaseClose } from '../../_internal';
|
|
4
|
-
import { warn, createKey, call, createInjectionKey } from '../../_utils';
|
|
4
|
+
import { warn, createKey, call, createInjectionKey, color2Class, resolveWrappedSlot } from '../../_utils';
|
|
5
5
|
import { tagLight } from '../styles';
|
|
6
6
|
import commonProps from './common-props';
|
|
7
7
|
import style from './styles/index.cssr';
|
|
@@ -29,7 +29,7 @@ export default defineComponent({
|
|
|
29
29
|
props: tagProps,
|
|
30
30
|
setup(props) {
|
|
31
31
|
const contentRef = ref(null);
|
|
32
|
-
const { mergedBorderedRef, mergedClsPrefixRef,
|
|
32
|
+
const { mergedBorderedRef, mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props);
|
|
33
33
|
const themeRef = useTheme('Tag', '-tag', style, tagLight, props, mergedClsPrefixRef);
|
|
34
34
|
provide(tagInjectionKey, {
|
|
35
35
|
roundRef: toRef(props, 'round')
|
|
@@ -65,46 +65,65 @@ export default defineComponent({
|
|
|
65
65
|
value.textContent = textContent;
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
const rtlEnabledRef = useRtl('Tag',
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const rtlEnabledRef = useRtl('Tag', mergedRtlRef, mergedClsPrefixRef);
|
|
69
|
+
const cssVarsRef = computed(() => {
|
|
70
|
+
const { type, size, color: { color, textColor } = {} } = props;
|
|
71
|
+
const { common: { cubicBezierEaseInOut }, self: { padding, closeMargin, closeMarginRtl, borderRadius, opacityDisabled, textColorCheckable, textColorHoverCheckable, textColorPressedCheckable, textColorChecked, colorCheckable, colorHoverCheckable, colorPressedCheckable, colorChecked, colorCheckedHover, colorCheckedPressed, [createKey('closeSize', size)]: closeSize, [createKey('fontSize', size)]: fontSize, [createKey('height', size)]: height, [createKey('color', type)]: typedColor, [createKey('textColor', type)]: typeTextColor, [createKey('border', type)]: border, [createKey('closeColor', type)]: closeColor, [createKey('closeColorHover', type)]: closeColorHover, [createKey('closeColorPressed', type)]: closeColorPressed } } = themeRef.value;
|
|
72
|
+
return {
|
|
73
|
+
'--n-avatar-size-override': `calc(${height} - 8px)`,
|
|
74
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
75
|
+
'--n-border-radius': borderRadius,
|
|
76
|
+
'--n-border': border,
|
|
77
|
+
'--n-close-color': closeColor,
|
|
78
|
+
'--n-close-color-hover': closeColorHover,
|
|
79
|
+
'--n-close-color-pressed': closeColorPressed,
|
|
80
|
+
'--n-close-color-disabled': closeColor,
|
|
81
|
+
'--n-close-margin': closeMargin,
|
|
82
|
+
'--n-close-margin-rtl': closeMarginRtl,
|
|
83
|
+
'--n-close-size': closeSize,
|
|
84
|
+
'--n-color': color || typedColor,
|
|
85
|
+
'--n-color-checkable': colorCheckable,
|
|
86
|
+
'--n-color-checked': colorChecked,
|
|
87
|
+
'--n-color-checked-hover': colorCheckedHover,
|
|
88
|
+
'--n-color-checked-pressed': colorCheckedPressed,
|
|
89
|
+
'--n-color-hover-checkable': colorHoverCheckable,
|
|
90
|
+
'--n-color-pressed-checkable': colorPressedCheckable,
|
|
91
|
+
'--n-font-size': fontSize,
|
|
92
|
+
'--n-height': height,
|
|
93
|
+
'--n-opacity-disabled': opacityDisabled,
|
|
94
|
+
'--n-padding': padding,
|
|
95
|
+
'--n-text-color': textColor || typeTextColor,
|
|
96
|
+
'--n-text-color-checkable': textColorCheckable,
|
|
97
|
+
'--n-text-color-checked': textColorChecked,
|
|
98
|
+
'--n-text-color-hover-checkable': textColorHoverCheckable,
|
|
99
|
+
'--n-text-color-pressed-checkable': textColorPressedCheckable
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
const themeClassHandle = inlineThemeDisabled
|
|
103
|
+
? useThemeClass('tag', computed(() => {
|
|
104
|
+
let hash = '';
|
|
71
105
|
const { type, size, color: { color, textColor } = {} } = props;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
'--n-color': color || typedColor,
|
|
86
|
-
'--n-color-checkable': colorCheckable,
|
|
87
|
-
'--n-color-checked': colorChecked,
|
|
88
|
-
'--n-color-checked-hover': colorCheckedHover,
|
|
89
|
-
'--n-color-checked-pressed': colorCheckedPressed,
|
|
90
|
-
'--n-color-hover-checkable': colorHoverCheckable,
|
|
91
|
-
'--n-color-pressed-checkable': colorPressedCheckable,
|
|
92
|
-
'--n-font-size': fontSize,
|
|
93
|
-
'--n-height': height,
|
|
94
|
-
'--n-opacity-disabled': opacityDisabled,
|
|
95
|
-
'--n-padding': padding,
|
|
96
|
-
'--n-text-color': textColor || typeTextColor,
|
|
97
|
-
'--n-text-color-checkable': textColorCheckable,
|
|
98
|
-
'--n-text-color-checked': textColorChecked,
|
|
99
|
-
'--n-text-color-hover-checkable': textColorHoverCheckable,
|
|
100
|
-
'--n-text-color-pressed-checkable': textColorPressedCheckable
|
|
101
|
-
};
|
|
102
|
-
}) });
|
|
106
|
+
hash += type[0];
|
|
107
|
+
hash += size[0];
|
|
108
|
+
if (color) {
|
|
109
|
+
hash += `a${color2Class(color)}`;
|
|
110
|
+
}
|
|
111
|
+
if (textColor) {
|
|
112
|
+
hash += `b${color2Class(textColor)}`;
|
|
113
|
+
}
|
|
114
|
+
return hash;
|
|
115
|
+
}), cssVarsRef, props)
|
|
116
|
+
: undefined;
|
|
117
|
+
return Object.assign(Object.assign({}, tagPublicMethods), { rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, contentRef, mergedBordered: mergedBorderedRef, handleClick,
|
|
118
|
+
handleCloseClick, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
103
119
|
},
|
|
104
120
|
render() {
|
|
105
|
-
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const { mergedClsPrefix, rtlEnabled, color: { borderColor } = {}, onRender, $slots } = this;
|
|
123
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
106
124
|
return (h("div", { class: [
|
|
107
125
|
`${mergedClsPrefix}-tag`,
|
|
126
|
+
this.themeClass,
|
|
108
127
|
{
|
|
109
128
|
[`${mergedClsPrefix}-tag--rtl`]: rtlEnabled,
|
|
110
129
|
[`${mergedClsPrefix}-tag--disabled`]: this.disabled,
|
|
@@ -113,10 +132,8 @@ export default defineComponent({
|
|
|
113
132
|
[`${mergedClsPrefix}-tag--round`]: this.round
|
|
114
133
|
}
|
|
115
134
|
], style: this.cssVars, onClick: this.handleClick, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave },
|
|
116
|
-
$slots.avatar && (h("div", { class: `${mergedClsPrefix}-tag__avatar` },
|
|
117
|
-
|
|
118
|
-
})),
|
|
119
|
-
h("span", { class: `${mergedClsPrefix}-tag__content`, ref: "contentRef" }, this.$slots),
|
|
135
|
+
resolveWrappedSlot($slots.avatar, (children) => children && (h("div", { class: `${mergedClsPrefix}-tag__avatar` }, children))),
|
|
136
|
+
h("span", { class: `${mergedClsPrefix}-tag__content`, ref: "contentRef" }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)),
|
|
120
137
|
!this.checkable && this.closable ? (h(NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-tag__close`, disabled: this.disabled, onClick: this.handleCloseClick })) : null,
|
|
121
138
|
!this.checkable && this.mergedBordered ? (h("div", { class: `${mergedClsPrefix}-tag__border`, style: { borderColor } })) : null));
|
|
122
139
|
}
|
|
@@ -7,7 +7,7 @@ export interface TagColor {
|
|
|
7
7
|
declare const _default: {
|
|
8
8
|
readonly color: PropType<TagColor>;
|
|
9
9
|
readonly type: {
|
|
10
|
-
readonly type: PropType<"default" | "
|
|
10
|
+
readonly type: PropType<"default" | "error" | "info" | "success" | "warning" | "primary">;
|
|
11
11
|
readonly default: "default";
|
|
12
12
|
};
|
|
13
13
|
readonly round: BooleanConstructor;
|
|
@@ -78,5 +78,5 @@ export default cB('tag', `
|
|
|
78
78
|
background-color: var(--n-color-checkable);
|
|
79
79
|
`, [cNotM('disabled', [c('&:hover', 'background-color: var(--n-color-hover-checkable);', [cNotM('checked', 'color: var(--n-text-color-hover-checkable);')]), c('&:active', 'background-color: var(--n-color-pressed-checkable);', [cNotM('checked', 'color: var(--n-text-color-pressed-checkable);')])]), cM('checked', `
|
|
80
80
|
color: var(--n-text-color-checked);
|
|
81
|
-
background-color:
|
|
81
|
+
background-color: var(--n-color-checked);
|
|
82
82
|
`, [cNotM('disabled', [c('&:hover', 'background-color: var(--n-color-checked-hover);'), c('&:active', 'background-color: var(--n-color-checked-pressed);')])])])]);
|
package/es/tag/styles/index.d.ts
CHANGED
package/es/tag/styles/index.js
CHANGED
package/es/tag/styles/rtl.d.ts
CHANGED
package/es/tag/styles/rtl.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { h, computed, defineComponent, ref, Fragment, toRaw, watch } from 'vue';
|
|
1
|
+
import { h, computed, defineComponent, ref, Fragment, toRaw, watch, inject } from 'vue';
|
|
2
2
|
import { cloneDeep, merge } from 'lodash-es';
|
|
3
3
|
import { lightTheme } from '../../themes/light';
|
|
4
4
|
import { NConfigProvider } from '../../config-provider';
|
|
5
|
+
import { configProviderInjectionKey } from '../../config-provider/src/context';
|
|
5
6
|
import { NPopover } from '../../popover';
|
|
6
7
|
import { NScrollbar } from '../../_internal';
|
|
7
8
|
import { NCollapse, NCollapseItem } from '../../collapse';
|
|
8
9
|
import { NInput } from '../../input';
|
|
9
10
|
import { NSpace } from '../../space';
|
|
10
|
-
import {
|
|
11
|
+
import { useLocale } from '../../_mixins';
|
|
11
12
|
import { NElement } from '../../element';
|
|
12
13
|
import { NDivider } from '../../divider';
|
|
13
14
|
import { NButton } from '../../button';
|
|
@@ -31,7 +32,7 @@ export default defineComponent({
|
|
|
31
32
|
inheritAttrs: false,
|
|
32
33
|
setup() {
|
|
33
34
|
const fileInputRef = ref(null);
|
|
34
|
-
const
|
|
35
|
+
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
35
36
|
const theme = computed(() => {
|
|
36
37
|
var _a, _b, _c, _d;
|
|
37
38
|
const mergedTheme = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || lightTheme;
|
package/es/themes/dark.js
CHANGED
|
@@ -74,6 +74,7 @@ import { treeSelectDark } from '../tree-select/styles';
|
|
|
74
74
|
import { typographyDark } from '../typography/styles';
|
|
75
75
|
import { treeDark } from '../tree/styles';
|
|
76
76
|
import { uploadDark } from '../upload/styles';
|
|
77
|
+
import { watermarkDark } from '../watermark/styles';
|
|
77
78
|
export const darkTheme = {
|
|
78
79
|
name: 'dark',
|
|
79
80
|
common: commonDark,
|
|
@@ -151,5 +152,6 @@ export const darkTheme = {
|
|
|
151
152
|
Tree: treeDark,
|
|
152
153
|
TreeSelect: treeSelectDark,
|
|
153
154
|
Typography: typographyDark,
|
|
154
|
-
Upload: uploadDark
|
|
155
|
+
Upload: uploadDark,
|
|
156
|
+
Watermark: watermarkDark
|
|
155
157
|
};
|
package/es/themes/light.js
CHANGED
|
@@ -76,6 +76,7 @@ import { typographyLight } from '../typography/styles';
|
|
|
76
76
|
import { treeLight } from '../tree/styles';
|
|
77
77
|
import { treeSelectLight } from '../tree-select/styles';
|
|
78
78
|
import { uploadLight } from '../upload/styles';
|
|
79
|
+
import { watermarkLight } from '../watermark/styles';
|
|
79
80
|
export const lightTheme = {
|
|
80
81
|
name: 'light',
|
|
81
82
|
common: commonLight,
|
|
@@ -153,5 +154,6 @@ export const lightTheme = {
|
|
|
153
154
|
Tree: treeLight,
|
|
154
155
|
TreeSelect: treeSelectLight,
|
|
155
156
|
Typography: typographyLight,
|
|
156
|
-
Upload: uploadLight
|
|
157
|
+
Upload: uploadLight,
|
|
158
|
+
Watermark: watermarkLight
|
|
157
159
|
};
|
package/es/thing/src/Thing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, defineComponent, computed, Fragment } from 'vue';
|
|
2
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
2
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
3
3
|
import { thingLight } from '../styles';
|
|
4
4
|
import style from './styles/index.cssr';
|
|
5
5
|
const thingProps = Object.assign(Object.assign({}, useTheme.props), { title: String, titleExtra: String, description: String, content: String, contentIndented: {
|
|
@@ -10,7 +10,7 @@ export default defineComponent({
|
|
|
10
10
|
name: 'Thing',
|
|
11
11
|
props: thingProps,
|
|
12
12
|
setup(props, { slots }) {
|
|
13
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
13
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
14
14
|
const themeRef = useTheme('Thing', '-thing', style, thingLight, props, mergedClsPrefixRef);
|
|
15
15
|
const cssVarsRef = computed(() => {
|
|
16
16
|
const { self: { titleTextColor, textColor, titleFontWeight, fontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
@@ -22,9 +22,16 @@ export default defineComponent({
|
|
|
22
22
|
'--n-title-text-color': titleTextColor
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
|
+
const themeClassHandle = inlineThemeDisabled
|
|
26
|
+
? useThemeClass('thing', undefined, cssVarsRef, props)
|
|
27
|
+
: undefined;
|
|
25
28
|
return () => {
|
|
29
|
+
var _a;
|
|
26
30
|
const { value: mergedClsPrefix } = mergedClsPrefixRef;
|
|
27
|
-
|
|
31
|
+
(_a = themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender) === null || _a === void 0 ? void 0 : _a.call(themeClassHandle);
|
|
32
|
+
return (h("div", { class: [`${mergedClsPrefix}-thing`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass], style: inlineThemeDisabled
|
|
33
|
+
? undefined
|
|
34
|
+
: cssVarsRef.value },
|
|
28
35
|
slots.avatar && props.contentIndented ? (h("div", { class: `${mergedClsPrefix}-thing-avatar` }, slots.avatar())) : null,
|
|
29
36
|
h("div", { class: `${mergedClsPrefix}-thing-main` },
|
|
30
37
|
!props.contentIndented &&
|
|
@@ -1885,6 +1885,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1885
1885
|
containerScrollTop: number;
|
|
1886
1886
|
syncUnifiedContainer: () => void;
|
|
1887
1887
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
1888
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
1888
1889
|
sync: () => void;
|
|
1889
1890
|
handleMouseEnterWrapper: () => void;
|
|
1890
1891
|
handleMouseLeaveWrapper: () => void;
|
|
@@ -1895,6 +1896,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1895
1896
|
containerScrollTop: number;
|
|
1896
1897
|
syncUnifiedContainer: () => void;
|
|
1897
1898
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
1899
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
1898
1900
|
sync: () => void;
|
|
1899
1901
|
handleMouseEnterWrapper: () => void;
|
|
1900
1902
|
handleMouseLeaveWrapper: () => void;
|
|
@@ -1905,6 +1907,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1905
1907
|
containerScrollTop: number;
|
|
1906
1908
|
syncUnifiedContainer: () => void;
|
|
1907
1909
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
1910
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
1908
1911
|
sync: () => void;
|
|
1909
1912
|
handleMouseEnterWrapper: () => void;
|
|
1910
1913
|
handleMouseLeaveWrapper: () => void;
|
|
@@ -1915,6 +1918,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1915
1918
|
containerScrollTop: number;
|
|
1916
1919
|
syncUnifiedContainer: () => void;
|
|
1917
1920
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
1921
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
1918
1922
|
sync: () => void;
|
|
1919
1923
|
handleMouseEnterWrapper: () => void;
|
|
1920
1924
|
handleMouseLeaveWrapper: () => void;
|
|
@@ -6,7 +6,7 @@ declare const timelineItemProps: {
|
|
|
6
6
|
content: StringConstructor;
|
|
7
7
|
color: StringConstructor;
|
|
8
8
|
type: {
|
|
9
|
-
type: PropType<"default" | "
|
|
9
|
+
type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
content: StringConstructor;
|
|
18
18
|
color: StringConstructor;
|
|
19
19
|
type: {
|
|
20
|
-
type: PropType<"default" | "
|
|
20
|
+
type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
}, {
|
|
@@ -42,10 +42,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
42
|
content: StringConstructor;
|
|
43
43
|
color: StringConstructor;
|
|
44
44
|
type: {
|
|
45
|
-
type: PropType<"default" | "
|
|
45
|
+
type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
46
46
|
default: string;
|
|
47
47
|
};
|
|
48
48
|
}>>, {
|
|
49
|
-
type: "default" | "
|
|
49
|
+
type: "default" | "error" | "info" | "success" | "warning";
|
|
50
50
|
}>;
|
|
51
51
|
export default _default;
|
|
@@ -504,6 +504,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
504
504
|
containerScrollTop: number;
|
|
505
505
|
syncUnifiedContainer: () => void;
|
|
506
506
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
507
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
507
508
|
sync: () => void;
|
|
508
509
|
handleMouseEnterWrapper: () => void;
|
|
509
510
|
handleMouseLeaveWrapper: () => void;
|
package/es/tree/src/Tree.d.ts
CHANGED
|
@@ -957,6 +957,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
957
957
|
containerScrollTop: number;
|
|
958
958
|
syncUnifiedContainer: () => void;
|
|
959
959
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
960
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
960
961
|
sync: () => void;
|
|
961
962
|
handleMouseEnterWrapper: () => void;
|
|
962
963
|
handleMouseLeaveWrapper: () => void;
|
package/es/tree/src/Tree.js
CHANGED
|
@@ -178,16 +178,20 @@ export default defineComponent({
|
|
|
178
178
|
const controlledSelectedKeysRef = toRef(props, 'selectedKeys');
|
|
179
179
|
const mergedSelectedKeysRef = useMergedState(controlledSelectedKeysRef, uncontrolledSelectedKeysRef);
|
|
180
180
|
const uncontrolledExpandedKeysRef = ref([]);
|
|
181
|
-
const initUncontrolledExpandedKeys = () => {
|
|
181
|
+
const initUncontrolledExpandedKeys = (keys) => {
|
|
182
182
|
uncontrolledExpandedKeysRef.value = props.defaultExpandAll
|
|
183
183
|
? dataTreeMateRef.value.getNonLeafKeys()
|
|
184
|
-
:
|
|
184
|
+
: keys === undefined
|
|
185
|
+
? props.defaultExpandedKeys
|
|
186
|
+
: keys;
|
|
185
187
|
};
|
|
186
188
|
if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultExpandedKeys')) {
|
|
187
|
-
|
|
189
|
+
// if watching defaultExpandedKeys, we use access props.defaultExpandedKeys inside initiator
|
|
190
|
+
watchEffect(() => initUncontrolledExpandedKeys(undefined));
|
|
188
191
|
}
|
|
189
192
|
else {
|
|
190
|
-
|
|
193
|
+
// We by default watchEffect since if defaultExpandAll is true, we should remain tree expand if data changes
|
|
194
|
+
watchEffect(() => initUncontrolledExpandedKeys(props.defaultExpandedKeys));
|
|
191
195
|
}
|
|
192
196
|
const controlledExpandedKeysRef = toRef(props, 'expandedKeys');
|
|
193
197
|
const mergedExpandedKeysRef = useMergedState(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);
|
package/es/tree/src/utils.js
CHANGED
|
@@ -31,7 +31,7 @@ export function keysWithFilter(nodes, pattern, keyField, childrenField, filter)
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
const emptyImage = null;
|
|
34
|
-
if (typeof window !== 'undefined') {
|
|
34
|
+
if (typeof window !== 'undefined' && Image) {
|
|
35
35
|
const emptyImage = new Image();
|
|
36
36
|
emptyImage.src =
|
|
37
37
|
'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
|