naive-ui 2.25.2 → 2.25.5
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 -23
- package/es/_internal/select-menu/src/SelectMenu.js +10 -16
- package/es/_internal/selection/src/Selection.d.ts +5 -5
- package/es/_internal/selection/src/Selection.js +20 -7
- 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 +1 -4
- package/es/_mixins/use-css-vars-class.js +8 -7
- package/es/_utils/vue/resolve-slot.d.ts +5 -2
- package/es/_utils/vue/resolve-slot.js +4 -3
- package/es/alert/src/Alert.d.ts +3 -1
- package/es/alert/src/Alert.js +36 -21
- package/es/anchor/src/AnchorAdapter.js +9 -3
- package/es/auto-complete/src/AutoComplete.d.ts +3 -1
- 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 +12 -37
- 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 +7 -6
- package/es/button/src/Button.js +31 -21
- package/es/calendar/src/Calendar.d.ts +3 -1
- package/es/calendar/src/Calendar.js +37 -30
- package/es/card/src/Card.d.ts +2 -2
- package/es/card/src/Card.js +27 -16
- package/es/carousel/src/Carousel.d.ts +3 -1
- package/es/carousel/src/Carousel.js +29 -20
- package/es/cascader/src/Cascader.d.ts +16 -1
- package/es/cascader/src/Cascader.js +53 -31
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderSelectMenu.js +2 -1
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/es/cascader/src/interface.d.ts +1 -0
- 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 +7 -7
- 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 +43 -41
- package/es/data-table/src/DataTable.js +54 -48
- package/es/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/es/data-table/src/HeaderButton/SortButton.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +4 -2
- package/es/data-table/src/interface.d.ts +1 -1
- package/es/data-table/src/use-table-data.js +19 -7
- 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 +14 -1
- 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 +3 -1
- package/es/dialog/src/Dialog.js +57 -56
- package/es/dialog/src/DialogEnvironment.js +1 -1
- package/es/divider/src/Divider.d.ts +3 -1
- package/es/divider/src/Divider.js +20 -11
- package/es/dynamic-input/src/DynamicInput.d.ts +3 -1
- package/es/dynamic-input/src/DynamicInput.js +18 -11
- package/es/dynamic-tags/src/DynamicTags.d.ts +3 -1
- 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.js +1 -2
- package/es/grid/src/Grid.js +2 -2
- package/es/icon-wrapper/src/IconWrapper.js +6 -8
- package/es/input/src/Input.d.ts +6 -3
- 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 +6 -17
- 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/legacy-grid/src/styles/index.cssr.js +1 -1
- package/es/locales/common/esAR.js +2 -2
- package/es/locales/common/frFR.js +8 -9
- package/es/locales/common/skSK.d.ts +3 -0
- package/es/locales/common/skSK.js +110 -0
- package/es/locales/date/skSK.d.ts +3 -0
- package/es/locales/date/skSK.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +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 +3 -1
- package/es/mention/src/Mention.js +20 -10
- package/es/mention/src/interface.d.ts +4 -0
- package/es/menu/src/Menu.d.ts +3 -1
- package/es/menu/src/Menu.js +68 -63
- package/es/modal/src/BodyWrapper.d.ts +1 -0
- package/es/modal/src/Modal.d.ts +11 -14
- package/es/modal/src/Modal.js +41 -32
- 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 +13 -1
- package/es/pagination/src/Pagination.js +59 -52
- package/es/popover/src/PopoverBody.js +10 -4
- package/es/progress/src/Progress.d.ts +2 -2
- package/es/progress/src/Progress.js +12 -6
- 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 +4 -2
- 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 +1 -1
- package/es/select/src/Select.js +5 -4
- 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 +79 -77
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/tag/src/Tag.js +8 -11
- 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/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-select/src/TreeSelect.d.ts +13 -0
- package/es/tree-select/src/TreeSelect.js +6 -2
- 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 +3 -1
- package/es/typography/src/create-header.js +25 -16
- package/es/typography/src/headers.d.ts +18 -6
- 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/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 -23
- package/lib/_internal/select-menu/src/SelectMenu.js +9 -15
- package/lib/_internal/selection/src/Selection.d.ts +5 -5
- package/lib/_internal/selection/src/Selection.js +19 -6
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +1 -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 +1 -4
- package/lib/_mixins/use-css-vars-class.js +9 -8
- package/lib/_utils/vue/resolve-slot.d.ts +5 -2
- package/lib/_utils/vue/resolve-slot.js +4 -3
- package/lib/alert/src/Alert.d.ts +3 -1
- package/lib/alert/src/Alert.js +34 -19
- package/lib/anchor/src/AnchorAdapter.js +8 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -1
- 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 +12 -37
- 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 +7 -6
- package/lib/button/src/Button.js +29 -19
- package/lib/calendar/src/Calendar.d.ts +3 -1
- package/lib/calendar/src/Calendar.js +36 -29
- package/lib/card/src/Card.d.ts +2 -2
- package/lib/card/src/Card.js +25 -14
- package/lib/carousel/src/Carousel.d.ts +3 -1
- package/lib/carousel/src/Carousel.js +27 -18
- package/lib/cascader/src/Cascader.d.ts +16 -1
- package/lib/cascader/src/Cascader.js +52 -30
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderSelectMenu.js +2 -1
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/lib/cascader/src/interface.d.ts +1 -0
- 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 +7 -7
- 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 +43 -41
- package/lib/data-table/src/DataTable.js +53 -47
- package/lib/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/lib/data-table/src/HeaderButton/SortButton.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +3 -1
- package/lib/data-table/src/interface.d.ts +1 -1
- package/lib/data-table/src/use-table-data.js +19 -7
- 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 +14 -1
- 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 +3 -1
- package/lib/dialog/src/Dialog.js +55 -54
- package/lib/dialog/src/DialogEnvironment.js +1 -1
- package/lib/divider/src/Divider.d.ts +3 -1
- package/lib/divider/src/Divider.js +19 -10
- package/lib/dynamic-input/src/DynamicInput.d.ts +3 -1
- package/lib/dynamic-input/src/DynamicInput.js +17 -10
- package/lib/dynamic-tags/src/DynamicTags.d.ts +3 -1
- 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.js +1 -2
- package/lib/grid/src/Grid.js +2 -2
- package/lib/icon-wrapper/src/IconWrapper.js +5 -7
- package/lib/input/src/Input.d.ts +6 -3
- 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 +6 -17
- 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/legacy-grid/src/styles/index.cssr.js +1 -1
- package/lib/locales/common/esAR.js +2 -2
- package/lib/locales/common/frFR.js +8 -9
- package/lib/locales/common/skSK.d.ts +3 -0
- package/lib/locales/common/skSK.js +112 -0
- package/lib/locales/date/skSK.d.ts +3 -0
- package/lib/locales/date/skSK.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -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 +3 -1
- package/lib/mention/src/Mention.js +19 -9
- package/lib/mention/src/interface.d.ts +4 -0
- package/lib/menu/src/Menu.d.ts +3 -1
- package/lib/menu/src/Menu.js +67 -62
- package/lib/modal/src/BodyWrapper.d.ts +1 -0
- package/lib/modal/src/Modal.d.ts +11 -14
- package/lib/modal/src/Modal.js +40 -31
- 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 +13 -1
- package/lib/pagination/src/Pagination.js +58 -51
- package/lib/popover/src/PopoverBody.js +9 -3
- package/lib/progress/src/Progress.d.ts +2 -2
- package/lib/progress/src/Progress.js +11 -5
- 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 +4 -2
- 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 +1 -1
- package/lib/select/src/Select.js +5 -4
- 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 +79 -77
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/tag/src/Tag.js +7 -10
- 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/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-select/src/TreeSelect.d.ts +13 -0
- package/lib/tree-select/src/TreeSelect.js +6 -2
- 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 +3 -1
- package/lib/typography/src/create-header.js +24 -15
- package/lib/typography/src/headers.d.ts +18 -6
- 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/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 +8 -9
- package/volar.d.ts +1 -0
- package/web-types.json +252 -29
package/lib/tabs/src/Tabs.js
CHANGED
|
@@ -43,7 +43,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
46
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
47
47
|
const themeRef = (0, _mixins_1.useTheme)('Tabs', '-tabs', index_cssr_1.default, styles_1.tabsLight, props, mergedClsPrefixRef);
|
|
48
48
|
const tabsElRef = (0, vue_1.ref)(null);
|
|
49
49
|
const barElRef = (0, vue_1.ref)(null);
|
|
@@ -246,50 +246,57 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
246
246
|
updateCurrentBarStyle();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
250
|
+
const { value: size } = compitableSizeRef;
|
|
251
|
+
const { type } = props;
|
|
252
|
+
const typeSuffix = {
|
|
253
|
+
card: 'Card',
|
|
254
|
+
bar: 'Bar',
|
|
255
|
+
line: 'Line',
|
|
256
|
+
segment: 'Segment'
|
|
257
|
+
}[type];
|
|
258
|
+
const sizeType = `${size}${typeSuffix}`;
|
|
259
|
+
const { self: { barColor, closeColor, closeColorHover, closeColorPressed, tabColor, tabBorderColor, paneTextColor, tabFontWeight, tabBorderRadius, tabFontWeightActive, colorSegment, fontWeightStrong, tabColorSegment, [(0, _utils_1.createKey)('panePadding', size)]: panePadding, [(0, _utils_1.createKey)('tabPadding', sizeType)]: tabPadding, [(0, _utils_1.createKey)('tabGap', sizeType)]: tabGap, [(0, _utils_1.createKey)('tabTextColor', type)]: tabTextColor, [(0, _utils_1.createKey)('tabTextColorActive', type)]: tabTextColorActive, [(0, _utils_1.createKey)('tabTextColorHover', type)]: tabTextColorHover, [(0, _utils_1.createKey)('tabTextColorDisabled', type)]: tabTextColorDisabled, [(0, _utils_1.createKey)('tabFontSize', size)]: tabFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
260
|
+
return {
|
|
261
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
262
|
+
'--n-color-segment': colorSegment,
|
|
263
|
+
'--n-bar-color': barColor,
|
|
264
|
+
'--n-tab-font-size': tabFontSize,
|
|
265
|
+
'--n-tab-text-color': tabTextColor,
|
|
266
|
+
'--n-tab-text-color-active': tabTextColorActive,
|
|
267
|
+
'--n-tab-text-color-disabled': tabTextColorDisabled,
|
|
268
|
+
'--n-tab-text-color-hover': tabTextColorHover,
|
|
269
|
+
'--n-pane-text-color': paneTextColor,
|
|
270
|
+
'--n-tab-border-color': tabBorderColor,
|
|
271
|
+
'--n-tab-border-radius': tabBorderRadius,
|
|
272
|
+
'--n-close-color': closeColor,
|
|
273
|
+
'--n-close-color-hover': closeColorHover,
|
|
274
|
+
'--n-close-color-pressed': closeColorPressed,
|
|
275
|
+
'--n-tab-color': tabColor,
|
|
276
|
+
'--n-tab-font-weight': tabFontWeight,
|
|
277
|
+
'--n-tab-font-weight-active': tabFontWeightActive,
|
|
278
|
+
'--n-tab-padding': tabPadding,
|
|
279
|
+
'--n-tab-gap': tabGap,
|
|
280
|
+
'--n-pane-padding': panePadding,
|
|
281
|
+
'--n-font-weight-strong': fontWeightStrong,
|
|
282
|
+
'--n-tab-color-segment': tabColorSegment
|
|
283
|
+
};
|
|
284
|
+
});
|
|
285
|
+
const themeClassHandle = inlineThemeDisabled
|
|
286
|
+
? (0, _mixins_1.useThemeClass)('tabs', (0, vue_1.computed)(() => {
|
|
287
|
+
return `${compitableSizeRef.value[0]}${props.type[0]}`;
|
|
288
|
+
}), cssVarsRef, props)
|
|
289
|
+
: undefined;
|
|
249
290
|
return Object.assign({ mergedClsPrefix: mergedClsPrefixRef, mergedValue: mergedValueRef, renderedNames: new Set(), tabsElRef,
|
|
250
291
|
barElRef,
|
|
251
292
|
addTabInstRef,
|
|
252
293
|
xScrollInstRef,
|
|
253
294
|
scrollWrapperElRef, addTabFixed: addTabFixedRef, tabWrapperStyle: tabWrapperStyleRef, handleNavResize, mergedSize: compitableSizeRef, handleScroll,
|
|
254
|
-
handleTabsResize, cssVars:
|
|
255
|
-
const { value: size } = compitableSizeRef;
|
|
256
|
-
const { type } = props;
|
|
257
|
-
const typeSuffix = {
|
|
258
|
-
card: 'Card',
|
|
259
|
-
bar: 'Bar',
|
|
260
|
-
line: 'Line',
|
|
261
|
-
segment: 'Segment'
|
|
262
|
-
}[type];
|
|
263
|
-
const sizeType = `${size}${typeSuffix}`;
|
|
264
|
-
const { self: { barColor, closeColor, closeColorHover, closeColorPressed, tabColor, tabBorderColor, paneTextColor, tabFontWeight, tabBorderRadius, tabFontWeightActive, colorSegment, fontWeightStrong, tabColorSegment, [(0, _utils_1.createKey)('panePadding', size)]: panePadding, [(0, _utils_1.createKey)('tabPadding', sizeType)]: tabPadding, [(0, _utils_1.createKey)('tabGap', sizeType)]: tabGap, [(0, _utils_1.createKey)('tabTextColor', type)]: tabTextColor, [(0, _utils_1.createKey)('tabTextColorActive', type)]: tabTextColorActive, [(0, _utils_1.createKey)('tabTextColorHover', type)]: tabTextColorHover, [(0, _utils_1.createKey)('tabTextColorDisabled', type)]: tabTextColorDisabled, [(0, _utils_1.createKey)('tabFontSize', size)]: tabFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
265
|
-
return {
|
|
266
|
-
'--bezier': cubicBezierEaseInOut,
|
|
267
|
-
'--color-segment': colorSegment,
|
|
268
|
-
'--bar-color': barColor,
|
|
269
|
-
'--tab-font-size': tabFontSize,
|
|
270
|
-
'--tab-text-color': tabTextColor,
|
|
271
|
-
'--tab-text-color-active': tabTextColorActive,
|
|
272
|
-
'--tab-text-color-disabled': tabTextColorDisabled,
|
|
273
|
-
'--tab-text-color-hover': tabTextColorHover,
|
|
274
|
-
'--pane-text-color': paneTextColor,
|
|
275
|
-
'--tab-border-color': tabBorderColor,
|
|
276
|
-
'--tab-border-radius': tabBorderRadius,
|
|
277
|
-
'--close-color': closeColor,
|
|
278
|
-
'--close-color-hover': closeColorHover,
|
|
279
|
-
'--close-color-pressed': closeColorPressed,
|
|
280
|
-
'--tab-color': tabColor,
|
|
281
|
-
'--tab-font-weight': tabFontWeight,
|
|
282
|
-
'--tab-font-weight-active': tabFontWeightActive,
|
|
283
|
-
'--tab-padding': tabPadding,
|
|
284
|
-
'--tab-gap': tabGap,
|
|
285
|
-
'--pane-padding': panePadding,
|
|
286
|
-
'--font-weight-strong': fontWeightStrong,
|
|
287
|
-
'--tab-color-segment': tabColorSegment
|
|
288
|
-
};
|
|
289
|
-
}) }, exposedMethods);
|
|
295
|
+
handleTabsResize, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }, exposedMethods);
|
|
290
296
|
},
|
|
291
297
|
render() {
|
|
292
|
-
const { mergedClsPrefix, type, addTabFixed, addable, mergedSize, $slots: { default: defaultSlot, prefix: prefixSlot, suffix: suffixSlot } } = this;
|
|
298
|
+
const { mergedClsPrefix, type, addTabFixed, addable, mergedSize, onRender, $slots: { default: defaultSlot, prefix: prefixSlot, suffix: suffixSlot } } = this;
|
|
299
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
293
300
|
const tabPaneChildren = defaultSlot
|
|
294
301
|
? (0, _utils_1.flatten)(defaultSlot()).filter((v) => {
|
|
295
302
|
return v.type.__TAB_PANE__ === true;
|
|
@@ -301,13 +308,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
301
308
|
})
|
|
302
309
|
: [];
|
|
303
310
|
const showPane = !tabChildren.length;
|
|
304
|
-
const prefix = prefixSlot ? prefixSlot() : null;
|
|
305
|
-
const suffix = suffixSlot ? suffixSlot() : null;
|
|
306
311
|
const isCard = type === 'card';
|
|
307
312
|
const isSegment = type === 'segment';
|
|
308
313
|
const mergedJustifyContent = !isCard && !isSegment && this.justifyContent;
|
|
309
314
|
return ((0, vue_1.h)("div", { class: [
|
|
310
315
|
`${mergedClsPrefix}-tabs`,
|
|
316
|
+
this.themeClass,
|
|
311
317
|
`${mergedClsPrefix}-tabs--${type}-type`,
|
|
312
318
|
`${mergedClsPrefix}-tabs--${mergedSize}-size`,
|
|
313
319
|
mergedJustifyContent && `${mergedClsPrefix}-tabs--flex`
|
|
@@ -320,7 +326,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
320
326
|
`${mergedClsPrefix}-tabs-nav--${type}-type`,
|
|
321
327
|
`${mergedClsPrefix}-tabs-nav`
|
|
322
328
|
] },
|
|
323
|
-
|
|
329
|
+
(0, _utils_1.resolveWrappedSlot)(prefixSlot, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tabs-nav__prefix` }, children))),
|
|
324
330
|
isSegment ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tabs-rail` }, showPane
|
|
325
331
|
? tabPaneChildren.map((tabPaneVNode, index) => {
|
|
326
332
|
return ((0, vue_1.h)(Tab_1.default, Object.assign({}, tabPaneVNode.props, { internalCreatedByPane: true, internalLeftPadded: index !== 0 }), tabPaneVNode.children
|
|
@@ -381,7 +387,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
381
387
|
addTabFixed && addable && isCard
|
|
382
388
|
? createAddTag(addable, true)
|
|
383
389
|
: null,
|
|
384
|
-
|
|
390
|
+
(0, _utils_1.resolveWrappedSlot)(suffixSlot, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tabs-nav__suffix` }, children)))),
|
|
385
391
|
showPane &&
|
|
386
392
|
filterMapTabPanes(tabPaneChildren, this.mergedValue, this.renderedNames)));
|
|
387
393
|
}
|
|
@@ -5,42 +5,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
8
|
-
// --bezier
|
|
9
|
-
// --close-color
|
|
10
|
-
// --close-color-hover
|
|
11
|
-
// --close-color-pressed
|
|
12
|
-
// --bar-color
|
|
13
|
-
// --tab-font-size
|
|
14
|
-
// --tab-text-color
|
|
15
|
-
// --tab-text-color-active
|
|
16
|
-
// --tab-text-color-disabled
|
|
17
|
-
// --tab-text-color-hover
|
|
18
|
-
// --pane-text-color
|
|
19
|
-
// --tab-border-color
|
|
20
|
-
// --tab-border-radius
|
|
21
|
-
// --tab-color
|
|
22
|
-
// --tab-font-weight
|
|
23
|
-
// --tab-font-weight-active
|
|
24
|
-
// --tab-gap
|
|
25
|
-
// --tab-padding
|
|
26
|
-
// --pane-padding
|
|
27
|
-
// --color-segment
|
|
28
|
-
// --font-weight-strong
|
|
29
|
-
// --tab-color-segment
|
|
8
|
+
// --n-bezier
|
|
9
|
+
// --n-close-color
|
|
10
|
+
// --n-close-color-hover
|
|
11
|
+
// --n-close-color-pressed
|
|
12
|
+
// --n-bar-color
|
|
13
|
+
// --n-tab-font-size
|
|
14
|
+
// --n-tab-text-color
|
|
15
|
+
// --n-tab-text-color-active
|
|
16
|
+
// --n-tab-text-color-disabled
|
|
17
|
+
// --n-tab-text-color-hover
|
|
18
|
+
// --n-pane-text-color
|
|
19
|
+
// --n-tab-border-color
|
|
20
|
+
// --n-tab-border-radius
|
|
21
|
+
// --n-tab-color
|
|
22
|
+
// --n-tab-font-weight
|
|
23
|
+
// --n-tab-font-weight-active
|
|
24
|
+
// --n-tab-gap
|
|
25
|
+
// --n-tab-padding
|
|
26
|
+
// --n-pane-padding
|
|
27
|
+
// --n-color-segment
|
|
28
|
+
// --n-font-weight-strong
|
|
29
|
+
// --n-tab-color-segment
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
exports.default = (0, cssr_1.cB)('tabs', `
|
|
33
33
|
box-sizing: border-box;
|
|
34
34
|
width: 100%;
|
|
35
35
|
transition:
|
|
36
|
-
background-color .3s var(--bezier),
|
|
37
|
-
border-color .3s var(--bezier);
|
|
36
|
+
background-color .3s var(--n-bezier),
|
|
37
|
+
border-color .3s var(--n-bezier);
|
|
38
38
|
`, [(0, cssr_1.cB)('tabs-rail', `
|
|
39
39
|
padding: 3px;
|
|
40
|
-
border-radius: var(--tab-border-radius);
|
|
40
|
+
border-radius: var(--n-tab-border-radius);
|
|
41
41
|
width: 100%;
|
|
42
|
-
background-color: var(--color-segment);
|
|
43
|
-
transition: background-color .3s var(--bezier);
|
|
42
|
+
background-color: var(--n-color-segment);
|
|
43
|
+
transition: background-color .3s var(--n-bezier);
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
46
46
|
`, [(0, cssr_1.cB)('tabs-tab-wrapper', `
|
|
@@ -51,18 +51,18 @@ exports.default = (0, cssr_1.cB)('tabs', `
|
|
|
51
51
|
justify-content: center;
|
|
52
52
|
`, [(0, cssr_1.cB)('tabs-tab', `
|
|
53
53
|
overflow: hidden;
|
|
54
|
-
border-radius: var(--tab-border-radius);
|
|
54
|
+
border-radius: var(--n-tab-border-radius);
|
|
55
55
|
width: 100%;
|
|
56
56
|
display: flex;
|
|
57
57
|
align-items: center;
|
|
58
58
|
justify-content: center;
|
|
59
59
|
`, [(0, cssr_1.cM)('active', `
|
|
60
|
-
font-weight: var(--font-weight-strong);
|
|
61
|
-
color: var(--tab-text-color-active);
|
|
62
|
-
background-color: var(--tab-color-segment);
|
|
60
|
+
font-weight: var(--n-font-weight-strong);
|
|
61
|
+
color: var(--n-tab-text-color-active);
|
|
62
|
+
background-color: var(--n-tab-color-segment);
|
|
63
63
|
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
|
|
64
64
|
`), (0, cssr_1.c)('&:hover', `
|
|
65
|
-
color: var(--tab-text-color-hover);
|
|
65
|
+
color: var(--n-tab-text-color-hover);
|
|
66
66
|
`)])])]), (0, cssr_1.cM)('flex', [(0, cssr_1.cB)('tabs-nav', {
|
|
67
67
|
width: '100%'
|
|
68
68
|
}, [(0, cssr_1.cB)('tabs-wrapper', {
|
|
@@ -73,7 +73,7 @@ exports.default = (0, cssr_1.cB)('tabs', `
|
|
|
73
73
|
box-sizing: border-box;
|
|
74
74
|
line-height: 1.5;
|
|
75
75
|
display: flex;
|
|
76
|
-
transition: border-color .3s var(--bezier);
|
|
76
|
+
transition: border-color .3s var(--n-bezier);
|
|
77
77
|
`, [(0, cssr_1.cE)('prefix, suffix', `
|
|
78
78
|
display: flex;
|
|
79
79
|
align-items: center;
|
|
@@ -86,7 +86,7 @@ exports.default = (0, cssr_1.cB)('tabs', `
|
|
|
86
86
|
`)]), (0, cssr_1.cM)('shadow-after', [(0, cssr_1.c)('&::after', `
|
|
87
87
|
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
88
88
|
`)]), (0, cssr_1.c)('&::before, &::after', `
|
|
89
|
-
transition: box-shadow .3s var(--bezier);
|
|
89
|
+
transition: box-shadow .3s var(--n-bezier);
|
|
90
90
|
pointer-events: none;
|
|
91
91
|
content: "";
|
|
92
92
|
position: absolute;
|
|
@@ -101,6 +101,8 @@ exports.default = (0, cssr_1.cB)('tabs', `
|
|
|
101
101
|
`)]), (0, cssr_1.cB)('tabs-nav-scroll-content', `
|
|
102
102
|
display: flex;
|
|
103
103
|
position: relative;
|
|
104
|
+
min-width: 100%;
|
|
105
|
+
width: fit-content;
|
|
104
106
|
`), (0, cssr_1.cB)('tabs-wrapper', `
|
|
105
107
|
display: inline-flex;
|
|
106
108
|
flex-wrap: nowrap;
|
|
@@ -116,21 +118,21 @@ exports.default = (0, cssr_1.cB)('tabs', `
|
|
|
116
118
|
flex-wrap: nowrap;
|
|
117
119
|
display: inline-flex;
|
|
118
120
|
align-items: center;
|
|
119
|
-
color: var(--tab-text-color);
|
|
120
|
-
font-size: var(--tab-font-size);
|
|
121
|
+
color: var(--n-tab-text-color);
|
|
122
|
+
font-size: var(--n-tab-font-size);
|
|
121
123
|
background-clip: padding-box;
|
|
122
|
-
padding: var(--tab-padding);
|
|
124
|
+
padding: var(--n-tab-padding);
|
|
123
125
|
transition:
|
|
124
|
-
box-shadow .3s var(--bezier),
|
|
125
|
-
color .3s var(--bezier),
|
|
126
|
-
background-color .3s var(--bezier),
|
|
127
|
-
border-color .3s var(--bezier);
|
|
126
|
+
box-shadow .3s var(--n-bezier),
|
|
127
|
+
color .3s var(--n-bezier),
|
|
128
|
+
background-color .3s var(--n-bezier),
|
|
129
|
+
border-color .3s var(--n-bezier);
|
|
128
130
|
`, [(0, cssr_1.cM)('disabled', {
|
|
129
131
|
cursor: 'not-allowed'
|
|
130
132
|
}), (0, cssr_1.cE)('close', `
|
|
131
133
|
margin-left: 8px;
|
|
132
134
|
font-size: 14px;
|
|
133
|
-
transition: color .3s var(--bezier);
|
|
135
|
+
transition: color .3s var(--n-bezier);
|
|
134
136
|
`), (0, cssr_1.cE)('label', `
|
|
135
137
|
display: flex;
|
|
136
138
|
align-items: center;
|
|
@@ -139,77 +141,77 @@ exports.default = (0, cssr_1.cB)('tabs', `
|
|
|
139
141
|
bottom: 0;
|
|
140
142
|
height: 2px;
|
|
141
143
|
border-radius: 1px;
|
|
142
|
-
background-color: var(--bar-color);
|
|
144
|
+
background-color: var(--n-bar-color);
|
|
143
145
|
transition:
|
|
144
|
-
left .2s var(--bezier),
|
|
145
|
-
max-width .2s var(--bezier),
|
|
146
|
-
background-color .3s var(--bezier);
|
|
146
|
+
left .2s var(--n-bezier),
|
|
147
|
+
max-width .2s var(--n-bezier),
|
|
148
|
+
background-color .3s var(--n-bezier);
|
|
147
149
|
`, [(0, cssr_1.cM)('transition-disabled', `
|
|
148
150
|
transition: none;
|
|
149
151
|
`), (0, cssr_1.cM)('disabled', `
|
|
150
|
-
background-color: var(--tab-text-color-disabled)
|
|
152
|
+
background-color: var(--n-tab-text-color-disabled)
|
|
151
153
|
`)]), (0, cssr_1.cB)('tab-pane', `
|
|
152
|
-
color: var(--pane-text-color);
|
|
154
|
+
color: var(--n-pane-text-color);
|
|
153
155
|
width: 100%;
|
|
154
|
-
padding: var(--pane-padding);
|
|
156
|
+
padding: var(--n-pane-padding);
|
|
155
157
|
transition:
|
|
156
|
-
color .3s var(--bezier),
|
|
157
|
-
background-color .3s var(--bezier);
|
|
158
|
+
color .3s var(--n-bezier),
|
|
159
|
+
background-color .3s var(--n-bezier);
|
|
158
160
|
`), (0, cssr_1.cB)('tabs-tab-pad', `
|
|
159
|
-
width: var(--tab-gap);
|
|
161
|
+
width: var(--n-tab-gap);
|
|
160
162
|
flex-grow: 0;
|
|
161
163
|
flex-shrink: 0;
|
|
162
164
|
`), (0, cssr_1.cM)('line-type, bar-type', [(0, cssr_1.cB)('tabs-tab', `
|
|
163
|
-
font-weight: var(--tab-font-weight-active);
|
|
165
|
+
font-weight: var(--n-tab-font-weight-active);
|
|
164
166
|
box-sizing: border-box;
|
|
165
167
|
vertical-align: bottom;
|
|
166
168
|
`, [(0, cssr_1.c)('&:hover', {
|
|
167
|
-
color: 'var(--tab-text-color-hover)'
|
|
169
|
+
color: 'var(--n-tab-text-color-hover)'
|
|
168
170
|
}), (0, cssr_1.cM)('active', {
|
|
169
|
-
color: 'var(--tab-text-color-active)'
|
|
171
|
+
color: 'var(--n-tab-text-color-active)'
|
|
170
172
|
}), (0, cssr_1.cM)('disabled', {
|
|
171
|
-
color: 'var(--tab-text-color-disabled)'
|
|
173
|
+
color: 'var(--n-tab-text-color-disabled)'
|
|
172
174
|
})])]), (0, cssr_1.cB)('tabs-nav', [(0, cssr_1.cM)('line-type', [(0, cssr_1.cE)('prefix, suffix', `
|
|
173
|
-
transition: border-color .3s var(--bezier);
|
|
174
|
-
border-bottom: 1px solid var(--tab-border-color);
|
|
175
|
+
transition: border-color .3s var(--n-bezier);
|
|
176
|
+
border-bottom: 1px solid var(--n-tab-border-color);
|
|
175
177
|
`), (0, cssr_1.cB)('tabs-nav-scroll-content', `
|
|
176
|
-
transition: border-color .3s var(--bezier);
|
|
177
|
-
border-bottom: 1px solid var(--tab-border-color);
|
|
178
|
+
transition: border-color .3s var(--n-bezier);
|
|
179
|
+
border-bottom: 1px solid var(--n-tab-border-color);
|
|
178
180
|
`), (0, cssr_1.cB)('tabs-bar', `
|
|
179
181
|
border-radius: 0;
|
|
180
182
|
bottom: -1px;
|
|
181
183
|
`)]), (0, cssr_1.cM)('card-type', [(0, cssr_1.cE)('prefix, suffix', `
|
|
182
|
-
transition: border-color .3s var(--bezier);
|
|
183
|
-
border-bottom: 1px solid var(--tab-border-color);
|
|
184
|
+
transition: border-color .3s var(--n-bezier);
|
|
185
|
+
border-bottom: 1px solid var(--n-tab-border-color);
|
|
184
186
|
`), (0, cssr_1.cB)('tabs-pad', `
|
|
185
187
|
flex-grow: 1;
|
|
186
|
-
transition: border-color .3s var(--bezier);
|
|
187
|
-
border-bottom: 1px solid var(--tab-border-color);
|
|
188
|
+
transition: border-color .3s var(--n-bezier);
|
|
189
|
+
border-bottom: 1px solid var(--n-tab-border-color);
|
|
188
190
|
`), (0, cssr_1.cB)('tabs-tab-pad', `
|
|
189
|
-
transition: border-color .3s var(--bezier);
|
|
190
|
-
border-bottom: 1px solid var(--tab-border-color);
|
|
191
|
+
transition: border-color .3s var(--n-bezier);
|
|
192
|
+
border-bottom: 1px solid var(--n-tab-border-color);
|
|
191
193
|
`), (0, cssr_1.cB)('tabs-tab', `
|
|
192
|
-
font-weight: var(--tab-font-weight);
|
|
193
|
-
border: 1px solid var(--tab-border-color);
|
|
194
|
-
border-top-left-radius: var(--tab-border-radius);
|
|
195
|
-
border-top-right-radius: var(--tab-border-radius);
|
|
196
|
-
background-color: var(--tab-color);
|
|
194
|
+
font-weight: var(--n-tab-font-weight);
|
|
195
|
+
border: 1px solid var(--n-tab-border-color);
|
|
196
|
+
border-top-left-radius: var(--n-tab-border-radius);
|
|
197
|
+
border-top-right-radius: var(--n-tab-border-radius);
|
|
198
|
+
background-color: var(--n-tab-color);
|
|
197
199
|
box-sizing: border-box;
|
|
198
200
|
position: relative;
|
|
199
201
|
vertical-align: bottom;
|
|
200
202
|
display: flex;
|
|
201
203
|
justify-content: space-between;
|
|
202
|
-
font-size: var(--tab-font-size);
|
|
203
|
-
color: var(--tab-text-color);
|
|
204
|
+
font-size: var(--n-tab-font-size);
|
|
205
|
+
color: var(--n-tab-text-color);
|
|
204
206
|
`, [(0, cssr_1.cM)('addable', `
|
|
205
207
|
padding-left: 8px;
|
|
206
208
|
padding-right: 8px;
|
|
207
209
|
font-size: 16px;
|
|
208
210
|
`, [(0, cssr_1.cNotM)('disabled', [(0, cssr_1.c)('&:hover', `
|
|
209
|
-
color: var(--tab-text-color-hover);
|
|
211
|
+
color: var(--n-tab-text-color-hover);
|
|
210
212
|
`)])]), (0, cssr_1.cM)('closable', 'padding-right: 6px;'), (0, cssr_1.cM)('active', `
|
|
211
213
|
border-bottom: 1px solid #0000;
|
|
212
214
|
background-color: #0000;
|
|
213
|
-
font-weight: var(--tab-font-weight-active);
|
|
214
|
-
color: var(--tab-text-color-active);
|
|
215
|
-
`), (0, cssr_1.cM)('disabled', 'color: var(--tab-text-color-disabled);')]), (0, cssr_1.cB)('tabs-scroll-padding', 'border-bottom: 1px solid var(--tab-border-color);')])])]);
|
|
215
|
+
font-weight: var(--n-tab-font-weight-active);
|
|
216
|
+
color: var(--n-tab-text-color-active);
|
|
217
|
+
`), (0, cssr_1.cM)('disabled', 'color: var(--n-tab-text-color-disabled);')]), (0, cssr_1.cB)('tabs-scroll-padding', 'border-bottom: 1px solid var(--n-tab-border-color);')])])]);
|
package/lib/tag/src/Tag.d.ts
CHANGED
|
@@ -451,8 +451,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
451
451
|
closeMarginRtl: string;
|
|
452
452
|
}, any>>>;
|
|
453
453
|
}, {
|
|
454
|
-
themeClass?: Ref<string> | undefined;
|
|
455
|
-
onRender?: (() => void) | undefined;
|
|
456
454
|
rtlEnabled: Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
457
455
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
458
456
|
contentRef: Ref<HTMLElement | null>;
|
|
@@ -488,6 +486,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
488
486
|
'--n-text-color-hover-checkable': string;
|
|
489
487
|
'--n-text-color-pressed-checkable': string;
|
|
490
488
|
}> | undefined;
|
|
489
|
+
themeClass: Ref<string> | undefined;
|
|
490
|
+
onRender: (() => void) | undefined;
|
|
491
491
|
setTextContent: (textContent: string) => void;
|
|
492
492
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
493
493
|
bordered: {
|
package/lib/tag/src/Tag.js
CHANGED
|
@@ -35,7 +35,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
35
35
|
props: tagProps,
|
|
36
36
|
setup(props) {
|
|
37
37
|
const contentRef = (0, vue_1.ref)(null);
|
|
38
|
-
const { mergedBorderedRef, mergedClsPrefixRef,
|
|
38
|
+
const { mergedBorderedRef, mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = (0, _mixins_1.useConfig)(props);
|
|
39
39
|
const themeRef = (0, _mixins_1.useTheme)('Tag', '-tag', index_cssr_1.default, styles_1.tagLight, props, mergedClsPrefixRef);
|
|
40
40
|
(0, vue_1.provide)(exports.tagInjectionKey, {
|
|
41
41
|
roundRef: (0, vue_1.toRef)(props, 'round')
|
|
@@ -71,8 +71,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
71
71
|
value.textContent = textContent;
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
const rtlEnabledRef = (0, use_rtl_1.default)('Tag',
|
|
75
|
-
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
74
|
+
const rtlEnabledRef = (0, use_rtl_1.default)('Tag', mergedRtlRef, mergedClsPrefixRef);
|
|
76
75
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
77
76
|
const { type, size, color: { color, textColor } = {} } = props;
|
|
78
77
|
const { common: { cubicBezierEaseInOut }, self: { padding, closeMargin, closeMarginRtl, borderRadius, opacityDisabled, textColorCheckable, textColorHoverCheckable, textColorPressedCheckable, textColorChecked, colorCheckable, colorHoverCheckable, colorPressedCheckable, colorChecked, colorCheckedHover, colorCheckedPressed, [(0, _utils_1.createKey)('closeSize', size)]: closeSize, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('height', size)]: height, [(0, _utils_1.createKey)('color', type)]: typedColor, [(0, _utils_1.createKey)('textColor', type)]: typeTextColor, [(0, _utils_1.createKey)('border', type)]: border, [(0, _utils_1.createKey)('closeColor', type)]: closeColor, [(0, _utils_1.createKey)('closeColorHover', type)]: closeColorHover, [(0, _utils_1.createKey)('closeColorPressed', type)]: closeColorPressed } } = themeRef.value;
|
|
@@ -106,7 +105,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
106
105
|
'--n-text-color-pressed-checkable': textColorPressedCheckable
|
|
107
106
|
};
|
|
108
107
|
});
|
|
109
|
-
const themeClassHandle =
|
|
108
|
+
const themeClassHandle = inlineThemeDisabled
|
|
110
109
|
? (0, _mixins_1.useThemeClass)('tag', (0, vue_1.computed)(() => {
|
|
111
110
|
let hash = '';
|
|
112
111
|
const { type, size, color: { color, textColor } = {} } = props;
|
|
@@ -120,9 +119,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
120
119
|
}
|
|
121
120
|
return hash;
|
|
122
121
|
}), cssVarsRef, props)
|
|
123
|
-
:
|
|
124
|
-
return Object.assign(Object.assign(
|
|
125
|
-
handleCloseClick, cssVars:
|
|
122
|
+
: undefined;
|
|
123
|
+
return Object.assign(Object.assign({}, tagPublicMethods), { rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, contentRef, mergedBordered: mergedBorderedRef, handleClick,
|
|
124
|
+
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 });
|
|
126
125
|
},
|
|
127
126
|
render() {
|
|
128
127
|
var _a, _b;
|
|
@@ -139,9 +138,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
139
138
|
[`${mergedClsPrefix}-tag--round`]: this.round
|
|
140
139
|
}
|
|
141
140
|
], style: this.cssVars, onClick: this.handleClick, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave },
|
|
142
|
-
(0, _utils_1.resolveWrappedSlot)($slots.avatar, (children) =>
|
|
143
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-tag__avatar` }, children)
|
|
144
|
-
]),
|
|
141
|
+
(0, _utils_1.resolveWrappedSlot)($slots.avatar, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tag__avatar` }, children))),
|
|
145
142
|
(0, vue_1.h)("span", { class: `${mergedClsPrefix}-tag__content`, ref: "contentRef" }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)),
|
|
146
143
|
!this.checkable && this.closable ? ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-tag__close`, disabled: this.disabled, onClick: this.handleCloseClick })) : null,
|
|
147
144
|
!this.checkable && this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-tag__border`, style: { borderColor } })) : null));
|
|
@@ -4,6 +4,7 @@ const vue_1 = require("vue");
|
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const light_1 = require("../../themes/light");
|
|
6
6
|
const config_provider_1 = require("../../config-provider");
|
|
7
|
+
const context_1 = require("../../config-provider/src/context");
|
|
7
8
|
const popover_1 = require("../../popover");
|
|
8
9
|
const _internal_1 = require("../../_internal");
|
|
9
10
|
const collapse_1 = require("../../collapse");
|
|
@@ -33,7 +34,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
33
34
|
inheritAttrs: false,
|
|
34
35
|
setup() {
|
|
35
36
|
const fileInputRef = (0, vue_1.ref)(null);
|
|
36
|
-
const
|
|
37
|
+
const NConfigProvider = (0, vue_1.inject)(context_1.configProviderInjectionKey, null);
|
|
37
38
|
const theme = (0, vue_1.computed)(() => {
|
|
38
39
|
var _a, _b, _c, _d;
|
|
39
40
|
const mergedTheme = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || light_1.lightTheme;
|
package/lib/themes/dark.js
CHANGED
|
@@ -77,6 +77,7 @@ const styles_72 = require("../tree-select/styles");
|
|
|
77
77
|
const styles_73 = require("../typography/styles");
|
|
78
78
|
const styles_74 = require("../tree/styles");
|
|
79
79
|
const styles_75 = require("../upload/styles");
|
|
80
|
+
const styles_76 = require("../watermark/styles");
|
|
80
81
|
exports.darkTheme = {
|
|
81
82
|
name: 'dark',
|
|
82
83
|
common: common_1.commonDark,
|
|
@@ -154,5 +155,6 @@ exports.darkTheme = {
|
|
|
154
155
|
Tree: styles_74.treeDark,
|
|
155
156
|
TreeSelect: styles_72.treeSelectDark,
|
|
156
157
|
Typography: styles_73.typographyDark,
|
|
157
|
-
Upload: styles_75.uploadDark
|
|
158
|
+
Upload: styles_75.uploadDark,
|
|
159
|
+
Watermark: styles_76.watermarkDark
|
|
158
160
|
};
|
package/lib/themes/light.js
CHANGED
|
@@ -79,6 +79,7 @@ const styles_72 = require("../typography/styles");
|
|
|
79
79
|
const styles_73 = require("../tree/styles");
|
|
80
80
|
const styles_74 = require("../tree-select/styles");
|
|
81
81
|
const styles_75 = require("../upload/styles");
|
|
82
|
+
const styles_76 = require("../watermark/styles");
|
|
82
83
|
exports.lightTheme = {
|
|
83
84
|
name: 'light',
|
|
84
85
|
common: common_1.commonLight,
|
|
@@ -156,5 +157,6 @@ exports.lightTheme = {
|
|
|
156
157
|
Tree: styles_73.treeLight,
|
|
157
158
|
TreeSelect: styles_74.treeSelectLight,
|
|
158
159
|
Typography: styles_72.typographyLight,
|
|
159
|
-
Upload: styles_75.uploadLight
|
|
160
|
+
Upload: styles_75.uploadLight,
|
|
161
|
+
Watermark: styles_76.watermarkLight
|
|
160
162
|
};
|
package/lib/thing/src/Thing.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
15
15
|
name: 'Thing',
|
|
16
16
|
props: thingProps,
|
|
17
17
|
setup(props, { slots }) {
|
|
18
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
18
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
19
19
|
const themeRef = (0, _mixins_1.useTheme)('Thing', '-thing', index_cssr_1.default, styles_1.thingLight, props, mergedClsPrefixRef);
|
|
20
20
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
21
21
|
const { self: { titleTextColor, textColor, titleFontWeight, fontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
@@ -27,9 +27,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
27
27
|
'--n-title-text-color': titleTextColor
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
|
+
const themeClassHandle = inlineThemeDisabled
|
|
31
|
+
? (0, _mixins_1.useThemeClass)('thing', undefined, cssVarsRef, props)
|
|
32
|
+
: undefined;
|
|
30
33
|
return () => {
|
|
34
|
+
var _a;
|
|
31
35
|
const { value: mergedClsPrefix } = mergedClsPrefixRef;
|
|
32
|
-
|
|
36
|
+
(_a = themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender) === null || _a === void 0 ? void 0 : _a.call(themeClassHandle);
|
|
37
|
+
return ((0, vue_1.h)("div", { class: [`${mergedClsPrefix}-thing`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass], style: inlineThemeDisabled
|
|
38
|
+
? undefined
|
|
39
|
+
: cssVarsRef.value },
|
|
33
40
|
slots.avatar && props.contentIndented ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-avatar` }, slots.avatar())) : null,
|
|
34
41
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-thing-main` },
|
|
35
42
|
!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;
|
|
@@ -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/lib/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/lib/tree/src/Tree.js
CHANGED
|
@@ -185,16 +185,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
185
185
|
const controlledSelectedKeysRef = (0, vue_1.toRef)(props, 'selectedKeys');
|
|
186
186
|
const mergedSelectedKeysRef = (0, vooks_1.useMergedState)(controlledSelectedKeysRef, uncontrolledSelectedKeysRef);
|
|
187
187
|
const uncontrolledExpandedKeysRef = (0, vue_1.ref)([]);
|
|
188
|
-
const initUncontrolledExpandedKeys = () => {
|
|
188
|
+
const initUncontrolledExpandedKeys = (keys) => {
|
|
189
189
|
uncontrolledExpandedKeysRef.value = props.defaultExpandAll
|
|
190
190
|
? dataTreeMateRef.value.getNonLeafKeys()
|
|
191
|
-
:
|
|
191
|
+
: keys === undefined
|
|
192
|
+
? props.defaultExpandedKeys
|
|
193
|
+
: keys;
|
|
192
194
|
};
|
|
193
195
|
if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultExpandedKeys')) {
|
|
194
|
-
|
|
196
|
+
// if watching defaultExpandedKeys, we use access props.defaultExpandedKeys inside initiator
|
|
197
|
+
(0, vue_1.watchEffect)(() => initUncontrolledExpandedKeys(undefined));
|
|
195
198
|
}
|
|
196
199
|
else {
|
|
197
|
-
|
|
200
|
+
// We by default watchEffect since if defaultExpandAll is true, we should remain tree expand if data changes
|
|
201
|
+
(0, vue_1.watchEffect)(() => initUncontrolledExpandedKeys(props.defaultExpandedKeys));
|
|
198
202
|
}
|
|
199
203
|
const controlledExpandedKeysRef = (0, vue_1.toRef)(props, 'expandedKeys');
|
|
200
204
|
const mergedExpandedKeysRef = (0, vooks_1.useMergedState)(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);
|