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
|
@@ -28,7 +28,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
28
28
|
props: scrollbarProps,
|
|
29
29
|
inheritAttrs: false,
|
|
30
30
|
setup(props) {
|
|
31
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
31
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
32
32
|
// dom ref
|
|
33
33
|
const wrapperRef = (0, vue_1.ref)(null);
|
|
34
34
|
const containerRef = (0, vue_1.ref)(null);
|
|
@@ -181,6 +181,19 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
181
181
|
scrollToPosition(0, 0, 0, false, behavior);
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
+
const scrollBy = (options, y) => {
|
|
185
|
+
if (!props.scrollable)
|
|
186
|
+
return;
|
|
187
|
+
const { value: container } = mergedContainerRef;
|
|
188
|
+
if (!container)
|
|
189
|
+
return;
|
|
190
|
+
if (typeof options === 'object') {
|
|
191
|
+
container.scrollBy(options);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
container.scrollBy(options, y || 0);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
184
197
|
function scrollToPosition(left, top, elSize, debounce, behavior) {
|
|
185
198
|
const { value: container } = mergedContainerRef;
|
|
186
199
|
if (!container)
|
|
@@ -461,8 +474,23 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
461
474
|
(0, evtd_1.off)('mouseup', window, handleYScrollMouseUp, true);
|
|
462
475
|
});
|
|
463
476
|
const themeRef = (0, _mixins_1.useTheme)('Scrollbar', '-scrollbar', index_cssr_1.default, styles_1.scrollbarLight, props, mergedClsPrefixRef);
|
|
477
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
478
|
+
const { common: { cubicBezierEaseInOut, scrollbarBorderRadius, scrollbarHeight, scrollbarWidth }, self: { color, colorHover } } = themeRef.value;
|
|
479
|
+
return {
|
|
480
|
+
'--n-scrollbar-bezier': cubicBezierEaseInOut,
|
|
481
|
+
'--n-scrollbar-color': color,
|
|
482
|
+
'--n-scrollbar-color-hover': colorHover,
|
|
483
|
+
'--n-scrollbar-border-radius': scrollbarBorderRadius,
|
|
484
|
+
'--n-scrollbar-width': scrollbarWidth,
|
|
485
|
+
'--n-scrollbar-height': scrollbarHeight
|
|
486
|
+
};
|
|
487
|
+
});
|
|
488
|
+
const themeClassHandle = inlineThemeDisabled
|
|
489
|
+
? (0, _mixins_1.useThemeClass)('scrollbar', undefined, cssVarsRef, props)
|
|
490
|
+
: undefined;
|
|
464
491
|
const exposedMethods = {
|
|
465
492
|
scrollTo,
|
|
493
|
+
scrollBy,
|
|
466
494
|
sync,
|
|
467
495
|
syncUnifiedContainer,
|
|
468
496
|
handleMouseEnterWrapper,
|
|
@@ -477,17 +505,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
477
505
|
handleContentResize,
|
|
478
506
|
handleContainerResize,
|
|
479
507
|
handleYScrollMouseDown,
|
|
480
|
-
handleXScrollMouseDown, cssVars:
|
|
481
|
-
const { common: { cubicBezierEaseInOut, scrollbarBorderRadius, scrollbarHeight, scrollbarWidth }, self: { color, colorHover } } = themeRef.value;
|
|
482
|
-
return {
|
|
483
|
-
'--n-scrollbar-bezier': cubicBezierEaseInOut,
|
|
484
|
-
'--n-scrollbar-color': color,
|
|
485
|
-
'--n-scrollbar-color-hover': colorHover,
|
|
486
|
-
'--n-scrollbar-border-radius': scrollbarBorderRadius,
|
|
487
|
-
'--n-scrollbar-width': scrollbarWidth,
|
|
488
|
-
'--n-scrollbar-height': scrollbarHeight
|
|
489
|
-
};
|
|
490
|
-
}) });
|
|
508
|
+
handleXScrollMouseDown, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
491
509
|
},
|
|
492
510
|
render() {
|
|
493
511
|
var _a;
|
|
@@ -495,11 +513,12 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
495
513
|
if (!this.scrollable)
|
|
496
514
|
return (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);
|
|
497
515
|
const createChildren = () => {
|
|
498
|
-
var _a;
|
|
516
|
+
var _a, _b;
|
|
517
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
499
518
|
return (0, vue_1.h)('div', (0, vue_1.mergeProps)(this.$attrs, {
|
|
500
519
|
role: 'none',
|
|
501
520
|
ref: 'wrapperRef',
|
|
502
|
-
class: `${mergedClsPrefix}-scrollbar`,
|
|
521
|
+
class: [`${mergedClsPrefix}-scrollbar`, this.themeClass],
|
|
503
522
|
style: this.cssVars,
|
|
504
523
|
onMouseenter: triggerDisplayManually
|
|
505
524
|
? undefined
|
|
@@ -508,7 +527,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
508
527
|
? undefined
|
|
509
528
|
: this.handleMouseLeaveWrapper
|
|
510
529
|
}), [
|
|
511
|
-
this.container ? ((
|
|
530
|
+
this.container ? ((_b = $slots.default) === null || _b === void 0 ? void 0 : _b.call($slots)) : ((0, vue_1.h)("div", { role: "none", ref: "containerRef", class: [
|
|
512
531
|
`${mergedClsPrefix}-scrollbar-container`,
|
|
513
532
|
this.containerClass
|
|
514
533
|
], style: this.containerStyle, onScroll: this.handleScroll, onWheel: this.onWheel },
|
|
@@ -51,7 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
51
|
type: BooleanConstructor;
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
inlineThemeDisabled: BooleanConstructor;
|
|
55
55
|
onToggle: PropType<(tmNode: TreeNode<SelectOption>) => void>;
|
|
56
56
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
57
57
|
optionFontSizeSmall: string;
|
|
@@ -210,8 +210,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
210
210
|
}, any>;
|
|
211
211
|
}>>>;
|
|
212
212
|
}, {
|
|
213
|
-
themeClass?: import("vue").Ref<string> | undefined;
|
|
214
|
-
onRender?: (() => void) | undefined;
|
|
215
213
|
selfRef: import("vue").Ref<HTMLElement | null>;
|
|
216
214
|
getPendingTmNode: () => TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>> | null;
|
|
217
215
|
prev: () => void;
|
|
@@ -397,11 +395,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
397
395
|
containerScrollTop: number;
|
|
398
396
|
syncUnifiedContainer: () => void;
|
|
399
397
|
scrollTo: import("../../scrollbar/src/ScrollBar").ScrollTo;
|
|
398
|
+
scrollBy: import("../../scrollbar/src/ScrollBar").ScrollBy;
|
|
400
399
|
sync: () => void;
|
|
401
400
|
handleMouseEnterWrapper: () => void;
|
|
402
401
|
handleMouseLeaveWrapper: () => void;
|
|
403
402
|
} | null>;
|
|
404
|
-
|
|
403
|
+
itemSize: import("vue").ComputedRef<number>;
|
|
404
|
+
padding: import("vue").ComputedRef<import("seemly").Margin>;
|
|
405
|
+
flattenedNodes: import("vue").ComputedRef<TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectGroupOption, SelectIgnoredOption>[]>;
|
|
406
|
+
empty: import("vue").ComputedRef<boolean>;
|
|
407
|
+
virtualListContainer(): HTMLElement;
|
|
408
|
+
virtualListContent(): HTMLElement;
|
|
409
|
+
doScroll: (e: Event) => void;
|
|
410
|
+
handleFocusin: (e: FocusEvent) => void;
|
|
411
|
+
handleFocusout: (e: FocusEvent) => void;
|
|
412
|
+
handleKeyUp: (e: KeyboardEvent) => void;
|
|
413
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
414
|
+
handleMouseDown: (e: MouseEvent) => void;
|
|
415
|
+
handleVirtualListResize: () => void;
|
|
416
|
+
handleVirtualListScroll: (e: Event) => void;
|
|
417
|
+
cssVars: {
|
|
405
418
|
'--n-height': string;
|
|
406
419
|
'--n-action-divider-color': string;
|
|
407
420
|
'--n-action-text-color': string;
|
|
@@ -423,23 +436,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
423
436
|
'--n-option-padding-left': string;
|
|
424
437
|
'--n-loading-color': string;
|
|
425
438
|
'--n-loading-size': string;
|
|
426
|
-
} |
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
itemSize: import("vue").ComputedRef<number>;
|
|
430
|
-
padding: import("vue").ComputedRef<import("seemly").Margin>;
|
|
431
|
-
flattenedNodes: import("vue").ComputedRef<TreeNode<import("../../../select/src/interface").SelectBaseOption<string | number, string | ((option: import("../../../select/src/interface").SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>, SelectGroupOption, SelectIgnoredOption>[]>;
|
|
432
|
-
empty: import("vue").ComputedRef<boolean>;
|
|
433
|
-
virtualListContainer(): HTMLElement;
|
|
434
|
-
virtualListContent(): HTMLElement;
|
|
435
|
-
doScroll: (e: Event) => void;
|
|
436
|
-
handleFocusin: (e: FocusEvent) => void;
|
|
437
|
-
handleFocusout: (e: FocusEvent) => void;
|
|
438
|
-
handleKeyUp: (e: KeyboardEvent) => void;
|
|
439
|
-
handleKeyDown: (e: KeyboardEvent) => void;
|
|
440
|
-
handleMouseDown: (e: MouseEvent) => void;
|
|
441
|
-
handleVirtualListResize: () => void;
|
|
442
|
-
handleVirtualListScroll: (e: Event) => void;
|
|
439
|
+
} | undefined;
|
|
440
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
441
|
+
onRender: (() => void) | undefined;
|
|
443
442
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
444
443
|
clsPrefix: {
|
|
445
444
|
type: StringConstructor;
|
|
@@ -489,7 +488,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
489
488
|
type: BooleanConstructor;
|
|
490
489
|
default: boolean;
|
|
491
490
|
};
|
|
492
|
-
|
|
491
|
+
inlineThemeDisabled: BooleanConstructor;
|
|
493
492
|
onToggle: PropType<(tmNode: TreeNode<SelectOption>) => void>;
|
|
494
493
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelectMenu", {
|
|
495
494
|
optionFontSizeSmall: string;
|
|
@@ -654,7 +653,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
654
653
|
multiple: boolean;
|
|
655
654
|
focusable: boolean;
|
|
656
655
|
loading: boolean;
|
|
657
|
-
|
|
656
|
+
inlineThemeDisabled: boolean;
|
|
658
657
|
scrollable: boolean;
|
|
659
658
|
autoPending: boolean;
|
|
660
659
|
virtualScroll: boolean;
|
|
@@ -47,7 +47,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
47
47
|
}, loading: Boolean, focusable: Boolean, renderLabel: Function, renderOption: Function, onMousedown: Function, onScroll: Function, onFocus: Function, onBlur: Function, onKeyup: Function, onKeydown: Function, onTabOut: Function, onMouseenter: Function, onMouseleave: Function, resetMenuOnOptionsChange: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: true
|
|
50
|
-
},
|
|
50
|
+
}, inlineThemeDisabled: Boolean,
|
|
51
51
|
// deprecated
|
|
52
52
|
onToggle: Function }),
|
|
53
53
|
setup(props) {
|
|
@@ -262,24 +262,18 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
262
262
|
'--n-loading-size': loadingSize
|
|
263
263
|
};
|
|
264
264
|
});
|
|
265
|
-
const {
|
|
266
|
-
const themeClassHandle =
|
|
265
|
+
const { inlineThemeDisabled } = props;
|
|
266
|
+
const themeClassHandle = inlineThemeDisabled
|
|
267
267
|
? (0, _mixins_1.useThemeClass)('internal-select-menu', (0, vue_1.computed)(() => props.size[0]), cssVarsRef, props)
|
|
268
|
-
:
|
|
269
|
-
const styleRef = (0, vue_1.computed)(() => {
|
|
270
|
-
return [
|
|
271
|
-
{ width: (0, _utils_1.formatLength)(props.width) },
|
|
272
|
-
disableInlineTheme ? undefined : cssVarsRef.value
|
|
273
|
-
];
|
|
274
|
-
});
|
|
268
|
+
: undefined;
|
|
275
269
|
const exposedProps = {
|
|
276
270
|
selfRef,
|
|
277
271
|
next,
|
|
278
272
|
prev,
|
|
279
273
|
getPendingTmNode
|
|
280
274
|
};
|
|
281
|
-
return Object.assign(
|
|
282
|
-
scrollbarRef,
|
|
275
|
+
return Object.assign({ mergedTheme: themeRef, virtualListRef,
|
|
276
|
+
scrollbarRef, itemSize: itemSizeRef, padding: paddingRef, flattenedNodes: flattenedNodesRef, empty: emptyRef, virtualListContainer() {
|
|
283
277
|
const { value } = virtualListRef;
|
|
284
278
|
return value === null || value === void 0 ? void 0 : value.listElRef;
|
|
285
279
|
},
|
|
@@ -294,7 +288,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
294
288
|
handleKeyDown,
|
|
295
289
|
handleMouseDown,
|
|
296
290
|
handleVirtualListResize,
|
|
297
|
-
handleVirtualListScroll
|
|
291
|
+
handleVirtualListScroll, cssVars: inlineThemeDisabled ? undefined : cssVarsRef.value, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }, exposedProps);
|
|
298
292
|
},
|
|
299
293
|
render() {
|
|
300
294
|
const { $slots, virtualScroll, clsPrefix, mergedTheme, themeClass, onRender } = this;
|
|
@@ -303,7 +297,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
303
297
|
`${clsPrefix}-base-select-menu`,
|
|
304
298
|
themeClass,
|
|
305
299
|
this.multiple && `${clsPrefix}-base-select-menu--multiple`
|
|
306
|
-
], style: this.
|
|
300
|
+
], style: [{ width: (0, _utils_1.formatLength)(this.width) }, this.cssVars], onFocusin: this.handleFocusin, onFocusout: this.handleFocusout, onKeyup: this.handleKeyUp, onKeydown: this.handleKeyDown, onMousedown: this.handleMouseDown, onMouseenter: this.onMouseenter, onMouseleave: this.onMouseleave },
|
|
307
301
|
this.loading ? ((0, vue_1.h)("div", { class: `${clsPrefix}-base-select-menu__loading` },
|
|
308
302
|
(0, vue_1.h)(loading_1.default, { clsPrefix: clsPrefix, strokeWidth: 20 }))) : !this.empty ? ((0, vue_1.h)(scrollbar_1.NScrollbar, { ref: "scrollbarRef", theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, scrollable: this.scrollable, container: virtualScroll ? this.virtualListContainer : undefined, content: virtualScroll ? this.virtualListContent : undefined, onScroll: virtualScroll ? undefined : this.doScroll }, {
|
|
309
303
|
default: () => {
|
|
@@ -319,7 +313,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
319
313
|
})) : ((0, vue_1.h)("div", { class: `${clsPrefix}-base-select-menu__empty` }, (0, _utils_1.resolveSlot)($slots.empty, () => [
|
|
320
314
|
(0, vue_1.h)(empty_1.NEmpty, { theme: mergedTheme.peers.Empty, themeOverrides: mergedTheme.peerOverrides.Empty })
|
|
321
315
|
]))),
|
|
322
|
-
(0, _utils_1.resolveWrappedSlot)($slots.action, (children) => [
|
|
316
|
+
(0, _utils_1.resolveWrappedSlot)($slots.action, (children) => children && [
|
|
323
317
|
(0, vue_1.h)("div", { class: `${clsPrefix}-base-select-menu__action`, "data-action": true, key: "action" }, children),
|
|
324
318
|
(0, vue_1.h)(focus_detector_1.default, { onFocus: this.onTabOut, key: "focus-detector" })
|
|
325
319
|
])));
|
|
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
onPatternBlur: PropType<(e: FocusEvent) => void>;
|
|
64
64
|
renderLabel: PropType<RenderLabel>;
|
|
65
65
|
status: PropType<FormValidationStatus>;
|
|
66
|
-
|
|
66
|
+
inlineThemeDisabled: BooleanConstructor;
|
|
67
67
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
|
|
68
68
|
fontSizeTiny: string;
|
|
69
69
|
fontSizeSmall: string;
|
|
@@ -272,8 +272,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
272
272
|
}, any>;
|
|
273
273
|
}>>>;
|
|
274
274
|
}, {
|
|
275
|
-
themeClass?: import("vue").Ref<string> | undefined;
|
|
276
|
-
onRender?: (() => void) | undefined;
|
|
277
275
|
mergedTheme: import("vue").ComputedRef<{
|
|
278
276
|
common: {
|
|
279
277
|
baseColor: string;
|
|
@@ -549,6 +547,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
549
547
|
'--n-clear-color-pressed': string;
|
|
550
548
|
'--n-arrow-size': string;
|
|
551
549
|
}> | undefined;
|
|
550
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
551
|
+
onRender: (() => void) | undefined;
|
|
552
552
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
553
553
|
clsPrefix: {
|
|
554
554
|
type: StringConstructor;
|
|
@@ -602,7 +602,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
602
602
|
onPatternBlur: PropType<(e: FocusEvent) => void>;
|
|
603
603
|
renderLabel: PropType<RenderLabel>;
|
|
604
604
|
status: PropType<FormValidationStatus>;
|
|
605
|
-
|
|
605
|
+
inlineThemeDisabled: BooleanConstructor;
|
|
606
606
|
theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
|
|
607
607
|
fontSizeTiny: string;
|
|
608
608
|
fontSizeSmall: string;
|
|
@@ -819,7 +819,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
819
819
|
autofocus: boolean;
|
|
820
820
|
loading: boolean;
|
|
821
821
|
bordered: boolean | undefined;
|
|
822
|
-
|
|
822
|
+
inlineThemeDisabled: boolean;
|
|
823
823
|
showArrow: boolean;
|
|
824
824
|
selectedOption: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)> | null;
|
|
825
825
|
selectedOptions: SelectBaseOption<string | number, string | ((option: SelectBaseOption<string | number, string | any>, selected: boolean) => import("vue").VNodeChild)>[] | null;
|
|
@@ -36,7 +36,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
36
36
|
}, loading: Boolean, autofocus: Boolean, showArrow: {
|
|
37
37
|
type: Boolean,
|
|
38
38
|
default: true
|
|
39
|
-
}, inputProps: Object, focused: Boolean, renderTag: Function, onKeyup: Function, onKeydown: Function, onClick: Function, onBlur: Function, onFocus: Function, onDeleteOption: Function, maxTagCount: [String, Number], onClear: Function, onPatternInput: Function, onPatternFocus: Function, onPatternBlur: Function, renderLabel: Function, status: String,
|
|
39
|
+
}, inputProps: Object, focused: Boolean, renderTag: Function, onKeyup: Function, onKeydown: Function, onClick: Function, onBlur: Function, onFocus: Function, onDeleteOption: Function, maxTagCount: [String, Number], onClear: Function, onPatternInput: Function, onPatternFocus: Function, onPatternBlur: Function, renderLabel: Function, status: String, inlineThemeDisabled: Boolean }),
|
|
40
40
|
setup(props) {
|
|
41
41
|
const patternInputMirrorRef = (0, vue_1.ref)(null);
|
|
42
42
|
const patternInputRef = (0, vue_1.ref)(null);
|
|
@@ -303,7 +303,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
303
303
|
props.disabled || patternInputFocusedRef.value ? -1 : 0;
|
|
304
304
|
});
|
|
305
305
|
});
|
|
306
|
-
const {
|
|
306
|
+
const { inlineThemeDisabled } = props;
|
|
307
307
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
308
308
|
const { size } = props;
|
|
309
309
|
const { common: { cubicBezierEaseInOut }, self: { borderRadius, color, placeholderColor, textColor, paddingSingle, paddingMultiple, caretColor, colorDisabled, textColorDisabled, placeholderColorDisabled, colorActive, boxShadowFocus, boxShadowActive, boxShadowHover, border, borderFocus, borderHover, borderActive, arrowColor, arrowColorDisabled, loadingColor,
|
|
@@ -367,12 +367,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
367
367
|
'--n-arrow-size': arrowSize
|
|
368
368
|
};
|
|
369
369
|
});
|
|
370
|
-
const themeClassHandle =
|
|
370
|
+
const themeClassHandle = inlineThemeDisabled
|
|
371
371
|
? (0, _mixins_1.useThemeClass)('internal-selection', (0, vue_1.computed)(() => {
|
|
372
372
|
return props.size[0];
|
|
373
373
|
}), cssVarsRef, props)
|
|
374
|
-
:
|
|
375
|
-
return
|
|
374
|
+
: undefined;
|
|
375
|
+
return {
|
|
376
|
+
mergedTheme: themeRef,
|
|
377
|
+
mergedClearable: mergedClearableRef,
|
|
378
|
+
patternInputFocused: patternInputFocusedRef,
|
|
379
|
+
filterablePlaceholder: filterablePlaceholderRef,
|
|
380
|
+
label: labelRef,
|
|
381
|
+
selected: selectedRef,
|
|
382
|
+
showTagsPanel: showTagsPopoverRef,
|
|
383
|
+
isCompositing: isCompositingRef,
|
|
376
384
|
// dom ref
|
|
377
385
|
counterRef,
|
|
378
386
|
counterWrapperRef,
|
|
@@ -406,7 +414,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
406
414
|
blurInput,
|
|
407
415
|
updateCounter,
|
|
408
416
|
getCounter,
|
|
409
|
-
getTail,
|
|
417
|
+
getTail,
|
|
418
|
+
renderLabel: props.renderLabel,
|
|
419
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
420
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
421
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
422
|
+
};
|
|
410
423
|
},
|
|
411
424
|
render() {
|
|
412
425
|
const { status, multiple, size, disabled, filterable, maxTagCount, bordered, clsPrefix, onRender, renderTag, renderLabel } = this;
|
package/lib/_mixins/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export { default as useLocale } from './use-locale';
|
|
|
6
6
|
export { default as useStyle } from './use-style';
|
|
7
7
|
export { default as useHljs } from './use-hljs';
|
|
8
8
|
export type { Hljs } from './use-hljs';
|
|
9
|
-
export { useThemeClass
|
|
9
|
+
export { useThemeClass } from './use-css-vars-class';
|
package/lib/_mixins/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.useThemeClass = exports.useHljs = exports.useStyle = exports.useLocale = exports.defaultClsPrefix = exports.useConfig = exports.createTheme = exports.useTheme = exports.useFormItem = void 0;
|
|
7
7
|
var use_form_item_1 = require("./use-form-item");
|
|
8
8
|
Object.defineProperty(exports, "useFormItem", { enumerable: true, get: function () { return __importDefault(use_form_item_1).default; } });
|
|
9
9
|
var use_theme_1 = require("./use-theme");
|
|
@@ -20,4 +20,3 @@ var use_hljs_1 = require("./use-hljs");
|
|
|
20
20
|
Object.defineProperty(exports, "useHljs", { enumerable: true, get: function () { return __importDefault(use_hljs_1).default; } });
|
|
21
21
|
var use_css_vars_class_1 = require("./use-css-vars-class");
|
|
22
22
|
Object.defineProperty(exports, "useThemeClass", { enumerable: true, get: function () { return use_css_vars_class_1.useThemeClass; } });
|
|
23
|
-
Object.defineProperty(exports, "emptyThemeClassHandle", { enumerable: true, get: function () { return use_css_vars_class_1.emptyThemeClassHandle; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
2
|
-
import type {
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { RtlEnabledState, GlobalComponentConfig, Breakpoints } from '../config-provider/src/internal-interface';
|
|
3
3
|
declare type UseConfigProps = Readonly<{
|
|
4
4
|
bordered?: boolean;
|
|
5
5
|
[key: string]: unknown;
|
|
@@ -8,9 +8,12 @@ export declare const defaultClsPrefix = "n";
|
|
|
8
8
|
export default function useConfig(props?: UseConfigProps, options?: {
|
|
9
9
|
defaultBordered?: boolean;
|
|
10
10
|
}): {
|
|
11
|
-
|
|
11
|
+
inlineThemeDisabled: boolean | undefined;
|
|
12
|
+
mergedRtlRef: Ref<RtlEnabledState | undefined> | undefined;
|
|
12
13
|
mergedBorderedRef: ComputedRef<boolean>;
|
|
13
14
|
mergedClsPrefixRef: ComputedRef<string>;
|
|
15
|
+
mergedBreakpointsRef: Ref<Breakpoints> | undefined;
|
|
16
|
+
mergedComponentPropsRef: Ref<GlobalComponentConfig | undefined> | undefined;
|
|
14
17
|
namespaceRef: ComputedRef<string | undefined>;
|
|
15
18
|
};
|
|
16
19
|
export {};
|
|
@@ -9,7 +9,11 @@ function useConfig(props = {}, options = {
|
|
|
9
9
|
}) {
|
|
10
10
|
const NConfigProvider = (0, vue_1.inject)(context_1.configProviderInjectionKey, null);
|
|
11
11
|
return {
|
|
12
|
-
NConfigProvider,
|
|
12
|
+
// NConfigProvider,
|
|
13
|
+
inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
|
|
14
|
+
mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
|
|
15
|
+
mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
|
|
16
|
+
mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
|
|
13
17
|
mergedBorderedRef: (0, vue_1.computed)(() => {
|
|
14
18
|
var _a, _b;
|
|
15
19
|
const { bordered } = props;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
export declare function useThemeClass(componentName: string, hashRef: Ref<string> | undefined, cssVarsRef: ComputedRef<Record<string, string>> | undefined, props: {
|
|
3
3
|
themeOverrides?: unknown;
|
|
4
|
+
builtinThemeOverrides?: unknown;
|
|
4
5
|
}): {
|
|
5
6
|
themeClass: Ref<string>;
|
|
6
7
|
onRender: () => void;
|
|
7
8
|
};
|
|
8
|
-
export declare const emptyThemeClassHandle: {
|
|
9
|
-
themeClass?: Ref<string>;
|
|
10
|
-
onRender?: () => void;
|
|
11
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useThemeClass = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const css_render_1 = require("css-render");
|
|
6
6
|
const vue3_ssr_1 = require("@css-render/vue3-ssr");
|
|
@@ -23,8 +23,12 @@ function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
|
23
23
|
finalThemeHash += '-' + themeHash;
|
|
24
24
|
if (hashValue)
|
|
25
25
|
finalThemeHash += '-' + hashValue;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const { themeOverrides, builtinThemeOverrides } = props;
|
|
27
|
+
if (themeOverrides) {
|
|
28
|
+
finalThemeHash += '-' + (0, css_render_1.hash)(JSON.stringify(themeOverrides));
|
|
29
|
+
}
|
|
30
|
+
if (builtinThemeOverrides) {
|
|
31
|
+
finalThemeHash += '-' + (0, css_render_1.hash)(JSON.stringify(builtinThemeOverrides));
|
|
28
32
|
}
|
|
29
33
|
themeClassRef.value = finalThemeHash;
|
|
30
34
|
renderCallback = () => {
|
|
@@ -51,7 +55,3 @@ function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
57
|
exports.useThemeClass = useThemeClass;
|
|
54
|
-
exports.emptyThemeClassHandle = {
|
|
55
|
-
themeClass: undefined,
|
|
56
|
-
onRender: undefined
|
|
57
|
-
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Slot, VNodeArrayChildren } from 'vue';
|
|
1
|
+
import { Slot, VNodeArrayChildren, VNodeChild } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* We shouldn't use the following functions with slot flags `_: 1, 2, 3`
|
|
4
4
|
*/
|
|
5
5
|
export declare function resolveSlot(slot: Slot | undefined, fallback: () => VNodeArrayChildren): VNodeArrayChildren;
|
|
6
6
|
export declare function resolveSlotWithProps<T>(slot: Slot | undefined, props: T, fallback: (props: T) => VNodeArrayChildren): VNodeArrayChildren;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Resolve slot with wrapper if content exists, no fallback
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveWrappedSlot(slot: Slot | undefined, wrapper: (children: VNodeArrayChildren | null) => VNodeChild): VNodeChild;
|
|
8
11
|
export declare function isSlotEmpty(slot: Slot | undefined): boolean;
|
|
@@ -30,11 +30,12 @@ function resolveSlotWithProps(slot, props, fallback) {
|
|
|
30
30
|
return (slot && ensureValidVNode(slot(props))) || fallback(props);
|
|
31
31
|
}
|
|
32
32
|
exports.resolveSlotWithProps = resolveSlotWithProps;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve slot with wrapper if content exists, no fallback
|
|
35
|
+
*/
|
|
33
36
|
function resolveWrappedSlot(slot, wrapper) {
|
|
34
37
|
const children = slot && ensureValidVNode(slot());
|
|
35
|
-
|
|
36
|
-
return wrapper(children);
|
|
37
|
-
return null;
|
|
38
|
+
return wrapper(children || null);
|
|
38
39
|
}
|
|
39
40
|
exports.resolveWrappedSlot = resolveWrappedSlot;
|
|
40
41
|
function isSlotEmpty(slot) {
|
package/lib/alert/src/Alert.d.ts
CHANGED
|
@@ -548,7 +548,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
548
548
|
'--n-padding': string;
|
|
549
549
|
'--n-icon-margin-left': string;
|
|
550
550
|
'--n-icon-margin-right': string;
|
|
551
|
-
}
|
|
551
|
+
}> | undefined;
|
|
552
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
553
|
+
onRender: (() => void) | undefined;
|
|
552
554
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
553
555
|
title: {
|
|
554
556
|
type: StringConstructor;
|
package/lib/alert/src/Alert.js
CHANGED
|
@@ -41,9 +41,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
41
41
|
inheritAttrs: false,
|
|
42
42
|
props: alertProps,
|
|
43
43
|
setup(props) {
|
|
44
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
44
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
45
45
|
const themeRef = (0, _mixins_1.useTheme)('Alert', '-alert', index_cssr_1.default, styles_1.alertLight, props, mergedClsPrefixRef);
|
|
46
|
-
const
|
|
46
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
47
47
|
const { common: { cubicBezierEaseInOut }, self } = themeRef.value;
|
|
48
48
|
const { fontSize, borderRadius, titleFontWeight, lineHeight, iconSize, iconMargin, closeSize, closeMargin, padding } = self;
|
|
49
49
|
const { type } = props;
|
|
@@ -71,6 +71,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
71
71
|
'--n-icon-margin-right': right
|
|
72
72
|
};
|
|
73
73
|
});
|
|
74
|
+
const themeClassHandle = inlineThemeDisabled
|
|
75
|
+
? (0, _mixins_1.useThemeClass)('alert', (0, vue_1.computed)(() => {
|
|
76
|
+
return props.type[0];
|
|
77
|
+
}), cssVarsRef, props)
|
|
78
|
+
: undefined;
|
|
74
79
|
const visibleRef = (0, vue_1.ref)(true);
|
|
75
80
|
const doAfterLeave = () => {
|
|
76
81
|
const { onAfterLeave, onAfterHide // deprecated
|
|
@@ -97,16 +102,21 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
97
102
|
handleCloseClick,
|
|
98
103
|
handleAfterLeave,
|
|
99
104
|
mergedTheme: themeRef,
|
|
100
|
-
cssVars
|
|
105
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
106
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
107
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
101
108
|
};
|
|
102
109
|
},
|
|
103
110
|
render() {
|
|
111
|
+
var _a;
|
|
112
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
104
113
|
return ((0, vue_1.h)(_internal_1.NFadeInExpandTransition, { onAfterLeave: this.handleAfterLeave }, {
|
|
105
114
|
default: () => {
|
|
106
115
|
const { mergedClsPrefix, $slots } = this;
|
|
107
116
|
const attrs = {
|
|
108
117
|
class: [
|
|
109
118
|
`${mergedClsPrefix}-alert`,
|
|
119
|
+
this.themeClass,
|
|
110
120
|
this.showIcon && `${mergedClsPrefix}-alert--show-icon`
|
|
111
121
|
],
|
|
112
122
|
style: this.cssVars,
|
|
@@ -114,24 +124,29 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
114
124
|
};
|
|
115
125
|
return this.visible ? ((0, vue_1.h)("div", Object.assign({}, (0, vue_1.mergeProps)(this.$attrs, attrs)),
|
|
116
126
|
this.closable && ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-alert__close`, onClick: this.handleCloseClick })),
|
|
117
|
-
this.showIcon && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert__icon`, "aria-hidden": "true" },
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
this.showIcon && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert__icon`, "aria-hidden": "true" }, (0, _utils_1.resolveSlot)($slots.icon, () => [
|
|
128
|
+
(0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: mergedClsPrefix }, {
|
|
129
|
+
default: () => {
|
|
130
|
+
switch (this.type) {
|
|
131
|
+
case 'success':
|
|
132
|
+
return (0, vue_1.h)(icons_1.SuccessIcon, null);
|
|
133
|
+
case 'info':
|
|
134
|
+
return (0, vue_1.h)(icons_1.InfoIcon, null);
|
|
135
|
+
case 'warning':
|
|
136
|
+
return (0, vue_1.h)(icons_1.WarningIcon, null);
|
|
137
|
+
case 'error':
|
|
138
|
+
return (0, vue_1.h)(icons_1.ErrorIcon, null);
|
|
139
|
+
default:
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
130
142
|
}
|
|
131
|
-
}
|
|
132
|
-
|
|
143
|
+
})
|
|
144
|
+
]))),
|
|
133
145
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert-body` },
|
|
134
|
-
|
|
146
|
+
(0, _utils_1.resolveWrappedSlot)($slots.header, (children) => {
|
|
147
|
+
const mergedChildren = children || this.title;
|
|
148
|
+
return mergedChildren ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert-body__title` }, mergedChildren)) : null;
|
|
149
|
+
}),
|
|
135
150
|
$slots.default && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-alert-body__content` }, $slots))))) : null;
|
|
136
151
|
}
|
|
137
152
|
}));
|
|
@@ -35,7 +35,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
35
35
|
name: 'Anchor',
|
|
36
36
|
props: anchorProps,
|
|
37
37
|
setup(props, { slots }) {
|
|
38
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
38
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
39
39
|
const themeRef = (0, _mixins_1.useTheme)('Anchor', '-anchor', index_cssr_1.default, styles_1.anchorLight, props, mergedClsPrefixRef);
|
|
40
40
|
const anchorRef = (0, vue_1.ref)(null);
|
|
41
41
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
@@ -55,13 +55,19 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
55
55
|
'--n-rail-width': railWidth
|
|
56
56
|
};
|
|
57
57
|
});
|
|
58
|
+
const themeClassHandle = inlineThemeDisabled
|
|
59
|
+
? (0, _mixins_1.useThemeClass)('anchor', undefined, cssVarsRef, props)
|
|
60
|
+
: undefined;
|
|
58
61
|
return {
|
|
59
62
|
scrollTo(href) {
|
|
60
63
|
var _a;
|
|
61
64
|
(_a = anchorRef.value) === null || _a === void 0 ? void 0 : _a.setActiveHref(href);
|
|
62
65
|
},
|
|
63
66
|
renderAnchor: () => {
|
|
64
|
-
|
|
67
|
+
themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender();
|
|
68
|
+
return ((0, vue_1.h)(BaseAnchor_1.default, Object.assign({ ref: anchorRef, style: inlineThemeDisabled
|
|
69
|
+
? undefined
|
|
70
|
+
: cssVarsRef.value, class: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value }, (0, _utils_1.keep)(props, BaseAnchor_1.baseAnchorPropKeys), { mergedClsPrefix: mergedClsPrefixRef.value }), slots));
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
73
|
},
|