naive-ui 2.25.2 → 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 -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 +6 -6
- 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.js +2 -2
- 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/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/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 +77 -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 +7 -7
- 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.js +2 -2
- 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/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/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 +77 -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
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
10
|
value: true
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const icon_switch_cssr_1 = __importDefault(require("../../../_styles/transitions/icon-switch.cssr"));
|
|
14
14
|
|
|
15
15
|
const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
16
16
|
// --n-bezier
|
|
@@ -30,6 +30,7 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
30
30
|
// --n-box-shadow-focus
|
|
31
31
|
// --n-loading-color
|
|
32
32
|
// --n-text-color
|
|
33
|
+
// --n-icon-color
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
exports.default = (0, cssr_1.cB)('switch', `
|
|
@@ -62,7 +63,7 @@ exports.default = (0, cssr_1.cB)('switch', `
|
|
|
62
63
|
font-size: calc(var(--n-button-width) - 4px);
|
|
63
64
|
color: var(--n-loading-color);
|
|
64
65
|
transition: color .3s var(--n-bezier);
|
|
65
|
-
`, [(0,
|
|
66
|
+
`, [(0, icon_switch_cssr_1.default)({
|
|
66
67
|
originalTransform: 'translateX(-50%) translateY(-50%)'
|
|
67
68
|
})]), (0, cssr_1.cE)('checked, unchecked', `
|
|
68
69
|
transition: color .3s var(--n-bezier);
|
|
@@ -88,7 +89,7 @@ exports.default = (0, cssr_1.cB)('switch', `
|
|
|
88
89
|
borderRadius: 'calc(var(--n-rail-height) / 2)'
|
|
89
90
|
}, [(0, cssr_1.cE)('button', {
|
|
90
91
|
borderRadius: 'calc(var(--n-button-height) / 2)'
|
|
91
|
-
})])]), (0, cssr_1.cNotM)('disabled', [(0, cssr_1.cM)('pressed', [(0, cssr_1.cE)('rail', [(0, cssr_1.cE)('button', {
|
|
92
|
+
})])]), (0, cssr_1.cNotM)('disabled', [(0, cssr_1.cNotM)('icon', [(0, cssr_1.cM)('pressed', [(0, cssr_1.cE)('rail', [(0, cssr_1.cE)('button', {
|
|
92
93
|
maxWidth: 'var(--n-button-width-pressed)'
|
|
93
94
|
})])]), (0, cssr_1.cE)('rail', [(0, cssr_1.c)('&:active', [(0, cssr_1.cE)('button', {
|
|
94
95
|
maxWidth: 'var(--n-button-width-pressed)'
|
|
@@ -96,7 +97,7 @@ exports.default = (0, cssr_1.cB)('switch', `
|
|
|
96
97
|
left: 'calc(100% - var(--n-offset) - var(--n-button-width-pressed))'
|
|
97
98
|
})])]), (0, cssr_1.cE)('rail', [(0, cssr_1.c)('&:active', [(0, cssr_1.cE)('button', {
|
|
98
99
|
left: 'calc(100% - var(--n-offset) - var(--n-button-width-pressed))'
|
|
99
|
-
})])])])]), (0, cssr_1.cM)('active', [(0, cssr_1.cE)('rail', [(0, cssr_1.cE)('button', {
|
|
100
|
+
})])])])])]), (0, cssr_1.cM)('active', [(0, cssr_1.cE)('rail', [(0, cssr_1.cE)('button', {
|
|
100
101
|
left: 'calc(100% - (var(--n-rail-height) + var(--n-button-width)) / 2)'
|
|
101
102
|
})])]), (0, cssr_1.cE)('rail', `
|
|
102
103
|
overflow: hidden;
|
|
@@ -109,7 +110,21 @@ exports.default = (0, cssr_1.cB)('switch', `
|
|
|
109
110
|
background .3s var(--n-bezier),
|
|
110
111
|
box-shadow .3s var(--n-bezier);
|
|
111
112
|
background-color: var(--n-rail-color);
|
|
112
|
-
`, [(0, cssr_1.cE)('button', `
|
|
113
|
+
`, [(0, cssr_1.cE)('button-icon', `
|
|
114
|
+
color: var(--n-icon-color);
|
|
115
|
+
transition: color .3s var(--n-bezier);
|
|
116
|
+
font-size: calc(var(--n-button-height) - 4px);
|
|
117
|
+
position: absolute;
|
|
118
|
+
left: 0;
|
|
119
|
+
right: 0;
|
|
120
|
+
top: 0;
|
|
121
|
+
bottom: 0;
|
|
122
|
+
display: flex;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
line-height: 1;
|
|
126
|
+
`, [(0, icon_switch_cssr_1.default)()]), (0, cssr_1.cE)('button', `
|
|
127
|
+
align-items: center;
|
|
113
128
|
top: var(--n-offset);
|
|
114
129
|
left: var(--n-offset);
|
|
115
130
|
height: var(--n-button-width);
|
|
@@ -128,9 +143,7 @@ exports.default = (0, cssr_1.cB)('switch', `
|
|
|
128
143
|
opacity .3s var(--n-bezier),
|
|
129
144
|
max-width .3s var(--n-bezier),
|
|
130
145
|
box-shadow .3s var(--n-bezier);
|
|
131
|
-
`)]), (0, cssr_1.cM)('active', [(0, cssr_1.cE)('rail',
|
|
132
|
-
backgroundColor: 'var(--n-rail-color-active)'
|
|
133
|
-
})]), (0, cssr_1.cM)('disabled', [(0, cssr_1.cE)('rail', `
|
|
146
|
+
`)]), (0, cssr_1.cM)('active', [(0, cssr_1.cE)('rail', 'background-color: var(--n-rail-color-active);')]), (0, cssr_1.cM)('disabled', [(0, cssr_1.cE)('rail', `
|
|
134
147
|
cursor: not-allowed;
|
|
135
148
|
opacity: .5;
|
|
136
149
|
`)]), (0, cssr_1.cM)('loading', [(0, cssr_1.cE)('rail', `
|
|
@@ -10,9 +10,9 @@ const switchDark = {
|
|
|
10
10
|
name: 'Switch',
|
|
11
11
|
common: common_1.commonDark,
|
|
12
12
|
self(vars) {
|
|
13
|
-
const { primaryColorSuppl, opacityDisabled, borderRadius, primaryColor, textColor2 } = vars;
|
|
13
|
+
const { primaryColorSuppl, opacityDisabled, borderRadius, primaryColor, textColor2, baseColor } = vars;
|
|
14
14
|
const railOverlayColor = 'rgba(255, 255, 255, .20)';
|
|
15
|
-
return Object.assign(Object.assign({}, _common_1.default), { textColor: textColor2, loadingColor: primaryColorSuppl, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColorSuppl, buttonBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 8px 0 ${(0, seemly_1.changeColor)(primaryColor, { alpha: 0.3 })}` });
|
|
15
|
+
return Object.assign(Object.assign({}, _common_1.default), { iconColor: baseColor, textColor: textColor2, loadingColor: primaryColorSuppl, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColorSuppl, buttonBoxShadow: '0px 2px 4px 0 rgba(0, 0, 0, 0.4)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 8px 0 ${(0, seemly_1.changeColor)(primaryColor, { alpha: 0.3 })}` });
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
exports.default = switchDark;
|
|
@@ -7,9 +7,9 @@ const seemly_1 = require("seemly");
|
|
|
7
7
|
const _common_1 = __importDefault(require("./_common"));
|
|
8
8
|
const common_1 = require("../../_styles/common");
|
|
9
9
|
const self = (vars) => {
|
|
10
|
-
const { primaryColor, opacityDisabled, borderRadius } = vars;
|
|
10
|
+
const { primaryColor, opacityDisabled, borderRadius, textColor3 } = vars;
|
|
11
11
|
const railOverlayColor = 'rgba(0, 0, 0, .14)';
|
|
12
|
-
return Object.assign(Object.assign({}, _common_1.default), { textColor: 'white', loadingColor: primaryColor, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColor, buttonBoxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 0 2px ${(0, seemly_1.changeColor)(primaryColor, { alpha: 0.2 })}` });
|
|
12
|
+
return Object.assign(Object.assign({}, _common_1.default), { iconColor: textColor3, textColor: 'white', loadingColor: primaryColor, opacityDisabled, railColor: railOverlayColor, railColorActive: primaryColor, buttonBoxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)', buttonColor: '#FFF', railBorderRadiusSmall: borderRadius, railBorderRadiusMedium: borderRadius, railBorderRadiusLarge: borderRadius, buttonBorderRadiusSmall: borderRadius, buttonBorderRadiusMedium: borderRadius, buttonBorderRadiusLarge: borderRadius, boxShadowFocus: `0 0 0 2px ${(0, seemly_1.changeColor)(primaryColor, { alpha: 0.2 })}` });
|
|
13
13
|
};
|
|
14
14
|
const switchLight = {
|
|
15
15
|
name: 'Switch',
|
package/lib/table/src/Table.d.ts
CHANGED
|
@@ -232,7 +232,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
232
232
|
'--n-td-color-striped': string;
|
|
233
233
|
'--n-td-color-striped-modal': string;
|
|
234
234
|
'--n-td-color-striped-popover': string;
|
|
235
|
-
}
|
|
235
|
+
}> | undefined;
|
|
236
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
237
|
+
onRender: (() => void) | undefined;
|
|
236
238
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
237
239
|
bordered: {
|
|
238
240
|
type: BooleanConstructor;
|
package/lib/table/src/Table.js
CHANGED
|
@@ -25,43 +25,54 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
25
25
|
name: 'Table',
|
|
26
26
|
props: tableProps,
|
|
27
27
|
setup(props) {
|
|
28
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
28
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
29
29
|
const themeRef = (0, _mixins_1.useTheme)('Table', '-table', index_cssr_1.default, styles_1.tableLight, props, mergedClsPrefixRef);
|
|
30
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
31
|
+
const { size } = props;
|
|
32
|
+
const { self: { borderColor, tdColor, tdColorModal, tdColorPopover, thColor, thColorModal, thColorPopover, thTextColor, tdTextColor, borderRadius, thFontWeight, lineHeight, borderColorModal, borderColorPopover, tdColorStriped, tdColorStripedModal, tdColorStripedPopover, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('tdPadding', size)]: tdPadding, [(0, _utils_1.createKey)('thPadding', size)]: thPadding }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
33
|
+
return {
|
|
34
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
35
|
+
'--n-td-color': tdColor,
|
|
36
|
+
'--n-td-color-modal': tdColorModal,
|
|
37
|
+
'--n-td-color-popover': tdColorPopover,
|
|
38
|
+
'--n-td-text-color': tdTextColor,
|
|
39
|
+
'--n-border-color': borderColor,
|
|
40
|
+
'--n-border-color-modal': borderColorModal,
|
|
41
|
+
'--n-border-color-popover': borderColorPopover,
|
|
42
|
+
'--n-border-radius': borderRadius,
|
|
43
|
+
'--n-font-size': fontSize,
|
|
44
|
+
'--n-th-color': thColor,
|
|
45
|
+
'--n-th-color-modal': thColorModal,
|
|
46
|
+
'--n-th-color-popover': thColorPopover,
|
|
47
|
+
'--n-th-font-weight': thFontWeight,
|
|
48
|
+
'--n-th-text-color': thTextColor,
|
|
49
|
+
'--n-line-height': lineHeight,
|
|
50
|
+
'--n-td-padding': tdPadding,
|
|
51
|
+
'--n-th-padding': thPadding,
|
|
52
|
+
'--n-td-color-striped': tdColorStriped,
|
|
53
|
+
'--n-td-color-striped-modal': tdColorStripedModal,
|
|
54
|
+
'--n-td-color-striped-popover': tdColorStripedPopover
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
const themeClassHandle = inlineThemeDisabled
|
|
58
|
+
? (0, _mixins_1.useThemeClass)('table', (0, vue_1.computed)(() => {
|
|
59
|
+
return props.size[0];
|
|
60
|
+
}), cssVarsRef, props)
|
|
61
|
+
: undefined;
|
|
30
62
|
return {
|
|
31
63
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
32
|
-
cssVars:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
37
|
-
'--n-td-color': tdColor,
|
|
38
|
-
'--n-td-color-modal': tdColorModal,
|
|
39
|
-
'--n-td-color-popover': tdColorPopover,
|
|
40
|
-
'--n-td-text-color': tdTextColor,
|
|
41
|
-
'--n-border-color': borderColor,
|
|
42
|
-
'--n-border-color-modal': borderColorModal,
|
|
43
|
-
'--n-border-color-popover': borderColorPopover,
|
|
44
|
-
'--n-border-radius': borderRadius,
|
|
45
|
-
'--n-font-size': fontSize,
|
|
46
|
-
'--n-th-color': thColor,
|
|
47
|
-
'--n-th-color-modal': thColorModal,
|
|
48
|
-
'--n-th-color-popover': thColorPopover,
|
|
49
|
-
'--n-th-font-weight': thFontWeight,
|
|
50
|
-
'--n-th-text-color': thTextColor,
|
|
51
|
-
'--n-line-height': lineHeight,
|
|
52
|
-
'--n-td-padding': tdPadding,
|
|
53
|
-
'--n-th-padding': thPadding,
|
|
54
|
-
'--n-td-color-striped': tdColorStriped,
|
|
55
|
-
'--n-td-color-striped-modal': tdColorStripedModal,
|
|
56
|
-
'--n-td-color-striped-popover': tdColorStripedPopover
|
|
57
|
-
};
|
|
58
|
-
})
|
|
64
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
65
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
66
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
59
67
|
};
|
|
60
68
|
},
|
|
61
69
|
render() {
|
|
70
|
+
var _a;
|
|
62
71
|
const { mergedClsPrefix } = this;
|
|
72
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
63
73
|
return ((0, vue_1.h)("table", { class: [
|
|
64
74
|
`${mergedClsPrefix}-table`,
|
|
75
|
+
this.themeClass,
|
|
65
76
|
{
|
|
66
77
|
[`${mergedClsPrefix}-table--bottom-bordered`]: this.bottomBordered,
|
|
67
78
|
[`${mergedClsPrefix}-table--bordered`]: this.bordered,
|
|
@@ -76,7 +76,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('table', `
|
|
|
76
76
|
border: 1px solid var(--n-merged-border-color);
|
|
77
77
|
border-radius: var(--n-border-radius);
|
|
78
78
|
`, [(0, cssr_1.c)('tr', [(0, cssr_1.c)('&:last-child', [(0, cssr_1.c)('td', `
|
|
79
|
-
border-bottom:
|
|
79
|
+
border-bottom: 0 solid var(--n-merged-border-color);
|
|
80
80
|
`)])])]), (0, cssr_1.cM)('single-line', [(0, cssr_1.c)('th', `
|
|
81
81
|
border-right: none;
|
|
82
82
|
`), (0, cssr_1.c)('td', `
|
package/lib/tabs/src/Tabs.d.ts
CHANGED
|
@@ -494,29 +494,31 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
494
494
|
handleScroll: import("lodash").DebouncedFunc<(e: Event) => void>;
|
|
495
495
|
handleTabsResize: import("lodash").DebouncedFunc<(entry: ResizeObserverEntry) => void>;
|
|
496
496
|
cssVars: import("vue").ComputedRef<{
|
|
497
|
-
'--bezier': string;
|
|
498
|
-
'--color-segment': string;
|
|
499
|
-
'--bar-color': string;
|
|
500
|
-
'--tab-font-size': string;
|
|
501
|
-
'--tab-text-color': string;
|
|
502
|
-
'--tab-text-color-active': string;
|
|
503
|
-
'--tab-text-color-disabled': string;
|
|
504
|
-
'--tab-text-color-hover': string;
|
|
505
|
-
'--pane-text-color': string;
|
|
506
|
-
'--tab-border-color': string;
|
|
507
|
-
'--tab-border-radius': string;
|
|
508
|
-
'--close-color': string;
|
|
509
|
-
'--close-color-hover': string;
|
|
510
|
-
'--close-color-pressed': string;
|
|
511
|
-
'--tab-color': string;
|
|
512
|
-
'--tab-font-weight': string;
|
|
513
|
-
'--tab-font-weight-active': string;
|
|
514
|
-
'--tab-padding': string;
|
|
515
|
-
'--tab-gap': string;
|
|
516
|
-
'--pane-padding': string;
|
|
517
|
-
'--font-weight-strong': string;
|
|
518
|
-
'--tab-color-segment': string;
|
|
519
|
-
}
|
|
497
|
+
'--n-bezier': string;
|
|
498
|
+
'--n-color-segment': string;
|
|
499
|
+
'--n-bar-color': string;
|
|
500
|
+
'--n-tab-font-size': string;
|
|
501
|
+
'--n-tab-text-color': string;
|
|
502
|
+
'--n-tab-text-color-active': string;
|
|
503
|
+
'--n-tab-text-color-disabled': string;
|
|
504
|
+
'--n-tab-text-color-hover': string;
|
|
505
|
+
'--n-pane-text-color': string;
|
|
506
|
+
'--n-tab-border-color': string;
|
|
507
|
+
'--n-tab-border-radius': string;
|
|
508
|
+
'--n-close-color': string;
|
|
509
|
+
'--n-close-color-hover': string;
|
|
510
|
+
'--n-close-color-pressed': string;
|
|
511
|
+
'--n-tab-color': string;
|
|
512
|
+
'--n-tab-font-weight': string;
|
|
513
|
+
'--n-tab-font-weight-active': string;
|
|
514
|
+
'--n-tab-padding': string;
|
|
515
|
+
'--n-tab-gap': string;
|
|
516
|
+
'--n-pane-padding': string;
|
|
517
|
+
'--n-font-weight-strong': string;
|
|
518
|
+
'--n-tab-color-segment': string;
|
|
519
|
+
}> | undefined;
|
|
520
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
521
|
+
onRender: (() => void) | undefined;
|
|
520
522
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
521
523
|
readonly value: PropType<string | number>;
|
|
522
524
|
readonly defaultValue: PropType<string | number>;
|
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
|
}
|