naive-ui 2.25.2 → 2.25.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/clear/src/Clear.d.ts +0 -1
- package/es/_internal/clear/src/Clear.js +1 -3
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/icons/replaceable.js +5 -4
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/es/_internal/scrollbar/src/ScrollBar.js +35 -16
- package/es/_internal/select-menu/src/SelectMenu.d.ts +22 -23
- package/es/_internal/select-menu/src/SelectMenu.js +10 -16
- package/es/_internal/selection/src/Selection.d.ts +5 -5
- package/es/_internal/selection/src/Selection.js +20 -7
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-config.d.ts +6 -3
- package/es/_mixins/use-config.js +5 -1
- package/es/_mixins/use-css-vars-class.d.ts +1 -4
- package/es/_mixins/use-css-vars-class.js +8 -7
- package/es/_utils/vue/resolve-slot.d.ts +5 -2
- package/es/_utils/vue/resolve-slot.js +4 -3
- package/es/alert/src/Alert.d.ts +3 -1
- package/es/alert/src/Alert.js +36 -21
- package/es/anchor/src/AnchorAdapter.js +9 -3
- package/es/auto-complete/src/AutoComplete.d.ts +3 -1
- package/es/auto-complete/src/AutoComplete.js +28 -15
- package/es/avatar/src/Avatar.d.ts +3 -1
- package/es/avatar/src/Avatar.js +70 -35
- package/es/back-top/src/BackTop.d.ts +12 -49
- package/es/back-top/src/BackTop.js +60 -58
- package/es/badge/src/Badge.d.ts +12 -37
- package/es/badge/src/Badge.js +41 -31
- package/es/breadcrumb/src/Breadcrumb.d.ts +3 -1
- package/es/breadcrumb/src/Breadcrumb.js +24 -16
- package/es/button/src/Button.d.ts +7 -6
- package/es/button/src/Button.js +31 -21
- package/es/calendar/src/Calendar.d.ts +3 -1
- package/es/calendar/src/Calendar.js +37 -30
- package/es/card/src/Card.d.ts +2 -2
- package/es/card/src/Card.js +27 -16
- package/es/carousel/src/Carousel.d.ts +3 -1
- package/es/carousel/src/Carousel.js +29 -20
- package/es/cascader/src/Cascader.d.ts +16 -1
- package/es/cascader/src/Cascader.js +53 -31
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderSelectMenu.js +2 -1
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/es/cascader/src/interface.d.ts +1 -0
- package/es/checkbox/src/Checkbox.d.ts +6 -4
- package/es/checkbox/src/Checkbox.js +41 -32
- package/es/checkbox/src/styles/index.cssr.js +7 -7
- package/es/code/src/Code.d.ts +3 -1
- package/es/code/src/Code.js +33 -27
- package/es/collapse/src/Collapse.d.ts +3 -1
- package/es/collapse/src/Collapse.js +24 -16
- package/es/color-picker/src/ColorPicker.d.ts +3 -1
- package/es/color-picker/src/ColorPicker.js +20 -7
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +4 -4
- package/es/config-provider/src/ConfigProvider.js +3 -3
- package/es/config-provider/src/internal-interface.d.ts +3 -1
- package/es/countdown/src/Countdown.d.ts +0 -3
- package/es/countdown/src/Countdown.js +0 -1
- package/es/data-table/src/DataTable.d.ts +43 -41
- package/es/data-table/src/DataTable.js +54 -48
- package/es/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/es/data-table/src/HeaderButton/SortButton.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +4 -2
- package/es/data-table/src/interface.d.ts +1 -1
- package/es/data-table/src/use-table-data.js +19 -7
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +2 -0
- package/es/date-picker/src/panel/datetime.d.ts +2 -0
- package/es/date-picker/src/panel/month.d.ts +2 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +4 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -0
- package/es/descriptions/src/Descriptions.d.ts +14 -1
- package/es/descriptions/src/Descriptions.js +45 -28
- package/es/descriptions/src/styles/index.cssr.js +2 -1
- package/es/descriptions/styles/light.d.ts +1 -0
- package/es/descriptions/styles/light.js +2 -2
- package/es/dialog/src/Dialog.d.ts +3 -1
- package/es/dialog/src/Dialog.js +57 -56
- package/es/dialog/src/DialogEnvironment.js +1 -1
- package/es/divider/src/Divider.d.ts +3 -1
- package/es/divider/src/Divider.js +20 -11
- package/es/dynamic-input/src/DynamicInput.d.ts +3 -1
- package/es/dynamic-input/src/DynamicInput.js +18 -11
- package/es/dynamic-tags/src/DynamicTags.d.ts +3 -1
- package/es/dynamic-tags/src/DynamicTags.js +17 -10
- package/es/element/src/Element.d.ts +3 -1
- package/es/element/src/Element.js +18 -11
- package/es/empty/src/Empty.d.ts +3 -1
- package/es/empty/src/Empty.js +28 -16
- package/es/form/src/FormItem.js +1 -2
- package/es/grid/src/Grid.js +2 -2
- package/es/icon-wrapper/src/IconWrapper.js +6 -8
- package/es/input/src/Input.d.ts +6 -3
- package/es/input/src/Input.js +96 -84
- package/es/input/src/styles/input.cssr.js +2 -2
- package/es/input-number/src/InputNumber.d.ts +6 -17
- package/es/input-number/src/InputNumber.js +79 -20
- package/es/layout/src/Layout.d.ts +8 -2
- package/es/layout/src/Layout.js +17 -10
- package/es/layout/src/LayoutContent.d.ts +4 -1
- package/es/layout/src/LayoutFooter.d.ts +3 -1
- package/es/layout/src/LayoutFooter.js +28 -19
- package/es/layout/src/LayoutHeader.d.ts +3 -1
- package/es/layout/src/LayoutHeader.js +28 -19
- package/es/layout/src/LayoutSider.d.ts +4 -0
- package/es/layout/src/LayoutSider.js +37 -29
- package/es/legacy-grid/src/styles/index.cssr.js +1 -1
- package/es/locales/common/esAR.js +2 -2
- package/es/locales/common/frFR.js +8 -9
- package/es/locales/common/skSK.d.ts +3 -0
- package/es/locales/common/skSK.js +110 -0
- package/es/locales/date/skSK.d.ts +3 -0
- package/es/locales/date/skSK.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +4 -1
- package/es/log/src/Log.js +20 -15
- package/es/mention/index.d.ts +1 -1
- package/es/mention/src/Mention.d.ts +3 -1
- package/es/mention/src/Mention.js +20 -10
- package/es/mention/src/interface.d.ts +4 -0
- package/es/menu/src/Menu.d.ts +3 -1
- package/es/menu/src/Menu.js +68 -63
- package/es/modal/src/BodyWrapper.d.ts +1 -0
- package/es/modal/src/Modal.d.ts +11 -14
- package/es/modal/src/Modal.js +41 -32
- package/es/notification/src/styles/index.cssr.js +6 -5
- package/es/page-header/src/PageHeader.d.ts +3 -1
- package/es/page-header/src/PageHeader.js +27 -18
- package/es/pagination/src/Pagination.d.ts +13 -1
- package/es/pagination/src/Pagination.js +59 -52
- package/es/popover/src/PopoverBody.js +10 -4
- package/es/progress/src/Progress.d.ts +2 -2
- package/es/progress/src/Progress.js +12 -6
- package/es/radio/src/Radio.d.ts +3 -1
- package/es/radio/src/Radio.js +32 -23
- package/es/radio/src/RadioGroup.d.ts +3 -1
- package/es/radio/src/RadioGroup.js +31 -22
- package/es/rate/src/Rate.d.ts +3 -1
- package/es/rate/src/Rate.js +44 -23
- package/es/result/src/Result.d.ts +4 -2
- package/es/result/src/Result.js +36 -19
- package/es/scrollbar/src/ScrollBar.d.ts +12 -1
- package/es/scrollbar/src/ScrollBar.js +4 -0
- package/es/select/src/Select.d.ts +1 -1
- package/es/select/src/Select.js +5 -4
- package/es/spin/src/Spin.d.ts +3 -1
- package/es/spin/src/Spin.js +31 -21
- package/es/statistic/src/Statistic.d.ts +3 -1
- package/es/statistic/src/Statistic.js +29 -21
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/switch/src/Switch.d.ts +13 -1
- package/es/switch/src/Switch.js +85 -60
- package/es/switch/src/styles/index.cssr.js +21 -8
- package/es/switch/styles/dark.js +2 -2
- package/es/switch/styles/light.d.ts +1 -0
- package/es/switch/styles/light.js +2 -2
- package/es/table/src/Table.d.ts +3 -1
- package/es/table/src/Table.js +40 -29
- package/es/table/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/Tabs.d.ts +25 -23
- package/es/tabs/src/Tabs.js +50 -44
- package/es/tabs/src/styles/index.cssr.js +79 -77
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/tag/src/Tag.js +8 -11
- package/es/theme-editor/src/ThemeEditor.js +4 -3
- package/es/themes/dark.js +3 -1
- package/es/themes/light.js +3 -1
- package/es/thing/src/Thing.js +10 -3
- package/es/time-picker/src/TimePicker.d.ts +4 -0
- package/es/transfer/src/TransferList.d.ts +1 -0
- package/es/tree/src/Tree.d.ts +1 -0
- package/es/tree/src/Tree.js +8 -4
- package/es/tree-select/src/TreeSelect.d.ts +13 -0
- package/es/tree-select/src/TreeSelect.js +6 -2
- package/es/typography/src/a.d.ts +3 -1
- package/es/typography/src/a.js +18 -10
- package/es/typography/src/blockquote.d.ts +3 -1
- package/es/typography/src/blockquote.js +21 -12
- package/es/typography/src/create-header.d.ts +3 -1
- package/es/typography/src/create-header.js +25 -16
- package/es/typography/src/headers.d.ts +18 -6
- package/es/typography/src/hr.d.ts +3 -1
- package/es/typography/src/hr.js +18 -10
- package/es/typography/src/ol.d.ts +3 -1
- package/es/typography/src/ol.js +23 -14
- package/es/typography/src/p.d.ts +3 -1
- package/es/typography/src/p.js +23 -15
- package/es/typography/src/text.d.ts +3 -1
- package/es/typography/src/text.js +31 -23
- package/es/typography/src/ul.d.ts +3 -1
- package/es/typography/src/ul.js +23 -14
- package/es/upload/src/interface.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/watermark/index.d.ts +2 -0
- package/es/watermark/index.js +1 -0
- package/es/watermark/src/Watermark.d.ts +285 -0
- package/es/watermark/src/Watermark.js +159 -0
- package/es/watermark/src/styles/index.cssr.d.ts +2 -0
- package/es/watermark/src/styles/index.cssr.js +14 -0
- package/es/watermark/styles/dark.d.ts +3 -0
- package/es/watermark/styles/dark.js +12 -0
- package/es/watermark/styles/index.d.ts +3 -0
- package/es/watermark/styles/index.js +2 -0
- package/es/watermark/styles/light.d.ts +5 -0
- package/es/watermark/styles/light.js +13 -0
- package/lib/_internal/clear/src/Clear.d.ts +0 -1
- package/lib/_internal/clear/src/Clear.js +0 -2
- package/lib/_internal/icons/replaceable.d.ts +1 -1
- package/lib/_internal/icons/replaceable.js +4 -3
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/lib/_internal/scrollbar/src/ScrollBar.js +34 -15
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +22 -23
- package/lib/_internal/select-menu/src/SelectMenu.js +9 -15
- package/lib/_internal/selection/src/Selection.d.ts +5 -5
- package/lib/_internal/selection/src/Selection.js +19 -6
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +1 -2
- package/lib/_mixins/use-config.d.ts +6 -3
- package/lib/_mixins/use-config.js +5 -1
- package/lib/_mixins/use-css-vars-class.d.ts +1 -4
- package/lib/_mixins/use-css-vars-class.js +9 -8
- package/lib/_utils/vue/resolve-slot.d.ts +5 -2
- package/lib/_utils/vue/resolve-slot.js +4 -3
- package/lib/alert/src/Alert.d.ts +3 -1
- package/lib/alert/src/Alert.js +34 -19
- package/lib/anchor/src/AnchorAdapter.js +8 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -1
- package/lib/auto-complete/src/AutoComplete.js +27 -14
- package/lib/avatar/src/Avatar.d.ts +3 -1
- package/lib/avatar/src/Avatar.js +68 -33
- package/lib/back-top/src/BackTop.d.ts +12 -49
- package/lib/back-top/src/BackTop.js +57 -55
- package/lib/badge/src/Badge.d.ts +12 -37
- package/lib/badge/src/Badge.js +39 -29
- package/lib/breadcrumb/src/Breadcrumb.d.ts +3 -1
- package/lib/breadcrumb/src/Breadcrumb.js +23 -15
- package/lib/button/src/Button.d.ts +7 -6
- package/lib/button/src/Button.js +29 -19
- package/lib/calendar/src/Calendar.d.ts +3 -1
- package/lib/calendar/src/Calendar.js +36 -29
- package/lib/card/src/Card.d.ts +2 -2
- package/lib/card/src/Card.js +25 -14
- package/lib/carousel/src/Carousel.d.ts +3 -1
- package/lib/carousel/src/Carousel.js +27 -18
- package/lib/cascader/src/Cascader.d.ts +16 -1
- package/lib/cascader/src/Cascader.js +52 -30
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderSelectMenu.js +2 -1
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/lib/cascader/src/interface.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.d.ts +6 -4
- package/lib/checkbox/src/Checkbox.js +40 -31
- package/lib/checkbox/src/styles/index.cssr.js +7 -7
- package/lib/code/src/Code.d.ts +3 -1
- package/lib/code/src/Code.js +32 -26
- package/lib/collapse/src/Collapse.d.ts +3 -1
- package/lib/collapse/src/Collapse.js +23 -15
- package/lib/color-picker/src/ColorPicker.d.ts +3 -1
- package/lib/color-picker/src/ColorPicker.js +19 -6
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +4 -4
- package/lib/config-provider/src/ConfigProvider.js +3 -3
- package/lib/config-provider/src/internal-interface.d.ts +3 -1
- package/lib/countdown/src/Countdown.d.ts +0 -3
- package/lib/countdown/src/Countdown.js +0 -1
- package/lib/data-table/src/DataTable.d.ts +43 -41
- package/lib/data-table/src/DataTable.js +53 -47
- package/lib/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/lib/data-table/src/HeaderButton/SortButton.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +3 -1
- package/lib/data-table/src/interface.d.ts +1 -1
- package/lib/data-table/src/use-table-data.js +19 -7
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/panel/date.d.ts +2 -0
- package/lib/date-picker/src/panel/datetime.d.ts +2 -0
- package/lib/date-picker/src/panel/month.d.ts +2 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +4 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -0
- package/lib/descriptions/src/Descriptions.d.ts +14 -1
- package/lib/descriptions/src/Descriptions.js +44 -27
- package/lib/descriptions/src/styles/index.cssr.js +2 -1
- package/lib/descriptions/styles/light.d.ts +1 -0
- package/lib/descriptions/styles/light.js +2 -2
- package/lib/dialog/src/Dialog.d.ts +3 -1
- package/lib/dialog/src/Dialog.js +55 -54
- package/lib/dialog/src/DialogEnvironment.js +1 -1
- package/lib/divider/src/Divider.d.ts +3 -1
- package/lib/divider/src/Divider.js +19 -10
- package/lib/dynamic-input/src/DynamicInput.d.ts +3 -1
- package/lib/dynamic-input/src/DynamicInput.js +17 -10
- package/lib/dynamic-tags/src/DynamicTags.d.ts +3 -1
- package/lib/dynamic-tags/src/DynamicTags.js +16 -9
- package/lib/element/src/Element.d.ts +3 -1
- package/lib/element/src/Element.js +17 -10
- package/lib/empty/src/Empty.d.ts +3 -1
- package/lib/empty/src/Empty.js +27 -15
- package/lib/form/src/FormItem.js +1 -2
- package/lib/grid/src/Grid.js +2 -2
- package/lib/icon-wrapper/src/IconWrapper.js +5 -7
- package/lib/input/src/Input.d.ts +6 -3
- package/lib/input/src/Input.js +95 -83
- package/lib/input/src/styles/input.cssr.js +2 -2
- package/lib/input-number/src/InputNumber.d.ts +6 -17
- package/lib/input-number/src/InputNumber.js +76 -17
- package/lib/layout/src/Layout.d.ts +8 -2
- package/lib/layout/src/Layout.js +16 -9
- package/lib/layout/src/LayoutContent.d.ts +4 -1
- package/lib/layout/src/LayoutFooter.d.ts +3 -1
- package/lib/layout/src/LayoutFooter.js +27 -18
- package/lib/layout/src/LayoutHeader.d.ts +3 -1
- package/lib/layout/src/LayoutHeader.js +27 -18
- package/lib/layout/src/LayoutSider.d.ts +4 -0
- package/lib/layout/src/LayoutSider.js +36 -28
- package/lib/legacy-grid/src/styles/index.cssr.js +1 -1
- package/lib/locales/common/esAR.js +2 -2
- package/lib/locales/common/frFR.js +8 -9
- package/lib/locales/common/skSK.d.ts +3 -0
- package/lib/locales/common/skSK.js +112 -0
- package/lib/locales/date/skSK.d.ts +3 -0
- package/lib/locales/date/skSK.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/log/src/Log.d.ts +4 -1
- package/lib/log/src/Log.js +19 -14
- package/lib/mention/index.d.ts +1 -1
- package/lib/mention/src/Mention.d.ts +3 -1
- package/lib/mention/src/Mention.js +19 -9
- package/lib/mention/src/interface.d.ts +4 -0
- package/lib/menu/src/Menu.d.ts +3 -1
- package/lib/menu/src/Menu.js +67 -62
- package/lib/modal/src/BodyWrapper.d.ts +1 -0
- package/lib/modal/src/Modal.d.ts +11 -14
- package/lib/modal/src/Modal.js +40 -31
- package/lib/notification/src/styles/index.cssr.js +6 -5
- package/lib/page-header/src/PageHeader.d.ts +3 -1
- package/lib/page-header/src/PageHeader.js +26 -17
- package/lib/pagination/src/Pagination.d.ts +13 -1
- package/lib/pagination/src/Pagination.js +58 -51
- package/lib/popover/src/PopoverBody.js +9 -3
- package/lib/progress/src/Progress.d.ts +2 -2
- package/lib/progress/src/Progress.js +11 -5
- package/lib/radio/src/Radio.d.ts +3 -1
- package/lib/radio/src/Radio.js +31 -22
- package/lib/radio/src/RadioGroup.d.ts +3 -1
- package/lib/radio/src/RadioGroup.js +30 -21
- package/lib/rate/src/Rate.d.ts +3 -1
- package/lib/rate/src/Rate.js +42 -21
- package/lib/result/src/Result.d.ts +4 -2
- package/lib/result/src/Result.js +35 -18
- package/lib/scrollbar/src/ScrollBar.d.ts +12 -1
- package/lib/scrollbar/src/ScrollBar.js +4 -0
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/select/src/Select.js +5 -4
- package/lib/spin/src/Spin.d.ts +3 -1
- package/lib/spin/src/Spin.js +30 -20
- package/lib/statistic/src/Statistic.d.ts +3 -1
- package/lib/statistic/src/Statistic.js +28 -20
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +9 -7
- package/lib/switch/src/Switch.d.ts +13 -1
- package/lib/switch/src/Switch.js +81 -56
- package/lib/switch/src/styles/index.cssr.js +21 -8
- package/lib/switch/styles/dark.js +2 -2
- package/lib/switch/styles/light.d.ts +1 -0
- package/lib/switch/styles/light.js +2 -2
- package/lib/table/src/Table.d.ts +3 -1
- package/lib/table/src/Table.js +39 -28
- package/lib/table/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/Tabs.d.ts +25 -23
- package/lib/tabs/src/Tabs.js +48 -42
- package/lib/tabs/src/styles/index.cssr.js +79 -77
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/tag/src/Tag.js +7 -10
- package/lib/theme-editor/src/ThemeEditor.js +2 -1
- package/lib/themes/dark.js +3 -1
- package/lib/themes/light.js +3 -1
- package/lib/thing/src/Thing.js +9 -2
- package/lib/time-picker/src/TimePicker.d.ts +4 -0
- package/lib/transfer/src/TransferList.d.ts +1 -0
- package/lib/tree/src/Tree.d.ts +1 -0
- package/lib/tree/src/Tree.js +8 -4
- package/lib/tree-select/src/TreeSelect.d.ts +13 -0
- package/lib/tree-select/src/TreeSelect.js +6 -2
- package/lib/typography/src/a.d.ts +3 -1
- package/lib/typography/src/a.js +17 -9
- package/lib/typography/src/blockquote.d.ts +3 -1
- package/lib/typography/src/blockquote.js +20 -11
- package/lib/typography/src/create-header.d.ts +3 -1
- package/lib/typography/src/create-header.js +24 -15
- package/lib/typography/src/headers.d.ts +18 -6
- package/lib/typography/src/hr.d.ts +3 -1
- package/lib/typography/src/hr.js +17 -9
- package/lib/typography/src/ol.d.ts +3 -1
- package/lib/typography/src/ol.js +22 -13
- package/lib/typography/src/p.d.ts +3 -1
- package/lib/typography/src/p.js +22 -14
- package/lib/typography/src/text.d.ts +3 -1
- package/lib/typography/src/text.js +30 -22
- package/lib/typography/src/ul.d.ts +3 -1
- package/lib/typography/src/ul.js +22 -13
- package/lib/upload/src/interface.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/index.d.ts +2 -0
- package/lib/watermark/index.js +8 -0
- package/lib/watermark/src/Watermark.d.ts +285 -0
- package/lib/watermark/src/Watermark.js +164 -0
- package/lib/watermark/src/styles/index.cssr.d.ts +2 -0
- package/lib/watermark/src/styles/index.cssr.js +21 -0
- package/lib/watermark/styles/dark.d.ts +3 -0
- package/lib/watermark/styles/dark.js +14 -0
- package/lib/watermark/styles/index.d.ts +3 -0
- package/lib/watermark/styles/index.js +10 -0
- package/lib/watermark/styles/light.d.ts +5 -0
- package/lib/watermark/styles/light.js +15 -0
- package/package.json +8 -9
- package/volar.d.ts +1 -0
- package/web-types.json +252 -29
package/es/badge/src/Badge.d.ts
CHANGED
|
@@ -3,10 +3,7 @@ import type { ExtractPublicPropTypes } from '../../_utils';
|
|
|
3
3
|
declare const badgeProps: {
|
|
4
4
|
readonly value: PropType<string | number>;
|
|
5
5
|
readonly max: NumberConstructor;
|
|
6
|
-
readonly dot:
|
|
7
|
-
readonly type: BooleanConstructor;
|
|
8
|
-
readonly default: false;
|
|
9
|
-
};
|
|
6
|
+
readonly dot: BooleanConstructor;
|
|
10
7
|
readonly type: {
|
|
11
8
|
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
12
9
|
readonly default: "default";
|
|
@@ -15,14 +12,8 @@ declare const badgeProps: {
|
|
|
15
12
|
readonly type: BooleanConstructor;
|
|
16
13
|
readonly default: true;
|
|
17
14
|
};
|
|
18
|
-
readonly showZero:
|
|
19
|
-
|
|
20
|
-
readonly default: false;
|
|
21
|
-
};
|
|
22
|
-
readonly processing: {
|
|
23
|
-
readonly type: BooleanConstructor;
|
|
24
|
-
readonly default: false;
|
|
25
|
-
};
|
|
15
|
+
readonly showZero: BooleanConstructor;
|
|
16
|
+
readonly processing: BooleanConstructor;
|
|
26
17
|
readonly color: StringConstructor;
|
|
27
18
|
readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
|
|
28
19
|
color: string;
|
|
@@ -56,10 +47,7 @@ export declare type BadgeProps = ExtractPublicPropTypes<typeof badgeProps>;
|
|
|
56
47
|
declare const _default: import("vue").DefineComponent<{
|
|
57
48
|
readonly value: PropType<string | number>;
|
|
58
49
|
readonly max: NumberConstructor;
|
|
59
|
-
readonly dot:
|
|
60
|
-
readonly type: BooleanConstructor;
|
|
61
|
-
readonly default: false;
|
|
62
|
-
};
|
|
50
|
+
readonly dot: BooleanConstructor;
|
|
63
51
|
readonly type: {
|
|
64
52
|
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
65
53
|
readonly default: "default";
|
|
@@ -68,14 +56,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
56
|
readonly type: BooleanConstructor;
|
|
69
57
|
readonly default: true;
|
|
70
58
|
};
|
|
71
|
-
readonly showZero:
|
|
72
|
-
|
|
73
|
-
readonly default: false;
|
|
74
|
-
};
|
|
75
|
-
readonly processing: {
|
|
76
|
-
readonly type: BooleanConstructor;
|
|
77
|
-
readonly default: false;
|
|
78
|
-
};
|
|
59
|
+
readonly showZero: BooleanConstructor;
|
|
60
|
+
readonly processing: BooleanConstructor;
|
|
79
61
|
readonly color: StringConstructor;
|
|
80
62
|
readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
|
|
81
63
|
color: string;
|
|
@@ -117,14 +99,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
117
99
|
'--n-ripple-color': string;
|
|
118
100
|
'--n-bezier': string;
|
|
119
101
|
'--n-ripple-bezier': string;
|
|
120
|
-
}
|
|
102
|
+
}> | undefined;
|
|
103
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
104
|
+
onRender: (() => void) | undefined;
|
|
121
105
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
122
106
|
readonly value: PropType<string | number>;
|
|
123
107
|
readonly max: NumberConstructor;
|
|
124
|
-
readonly dot:
|
|
125
|
-
readonly type: BooleanConstructor;
|
|
126
|
-
readonly default: false;
|
|
127
|
-
};
|
|
108
|
+
readonly dot: BooleanConstructor;
|
|
128
109
|
readonly type: {
|
|
129
110
|
readonly type: PropType<"default" | "error" | "info" | "success" | "warning">;
|
|
130
111
|
readonly default: "default";
|
|
@@ -133,14 +114,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
114
|
readonly type: BooleanConstructor;
|
|
134
115
|
readonly default: true;
|
|
135
116
|
};
|
|
136
|
-
readonly showZero:
|
|
137
|
-
|
|
138
|
-
readonly default: false;
|
|
139
|
-
};
|
|
140
|
-
readonly processing: {
|
|
141
|
-
readonly type: BooleanConstructor;
|
|
142
|
-
readonly default: false;
|
|
143
|
-
};
|
|
117
|
+
readonly showZero: BooleanConstructor;
|
|
118
|
+
readonly processing: BooleanConstructor;
|
|
144
119
|
readonly color: StringConstructor;
|
|
145
120
|
readonly theme: PropType<import("../../_mixins").Theme<"Badge", {
|
|
146
121
|
color: string;
|
package/es/badge/src/Badge.js
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
import { h, computed, onMounted, ref, defineComponent, Transition } from 'vue';
|
|
2
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
2
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
3
3
|
import { NBaseSlotMachine, NBaseWave } from '../../_internal';
|
|
4
|
-
import { createKey, getTitleAttribute } from '../../_utils';
|
|
4
|
+
import { color2Class, createKey, getTitleAttribute } from '../../_utils';
|
|
5
5
|
import { badgeLight } from '../styles';
|
|
6
6
|
import style from './styles/index.cssr';
|
|
7
|
-
const badgeProps = Object.assign(Object.assign({}, useTheme.props), { value: [String, Number], max: Number, dot: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: false
|
|
10
|
-
}, type: {
|
|
7
|
+
const badgeProps = Object.assign(Object.assign({}, useTheme.props), { value: [String, Number], max: Number, dot: Boolean, type: {
|
|
11
8
|
type: String,
|
|
12
9
|
default: 'default'
|
|
13
10
|
}, show: {
|
|
14
11
|
type: Boolean,
|
|
15
12
|
default: true
|
|
16
|
-
}, showZero:
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false
|
|
19
|
-
}, processing: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: false
|
|
22
|
-
}, color: String });
|
|
13
|
+
}, showZero: Boolean, processing: Boolean, color: String });
|
|
23
14
|
export default defineComponent({
|
|
24
15
|
name: 'Badge',
|
|
25
16
|
props: badgeProps,
|
|
26
17
|
setup(props) {
|
|
27
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
18
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
28
19
|
const themeRef = useTheme('Badge', '-badge', style, badgeLight, props, mergedClsPrefixRef);
|
|
29
20
|
const appearedRef = ref(false);
|
|
30
21
|
const handleAfterEnter = () => {
|
|
@@ -42,37 +33,56 @@ export default defineComponent({
|
|
|
42
33
|
if (showBadgeRef.value)
|
|
43
34
|
appearedRef.value = true;
|
|
44
35
|
});
|
|
36
|
+
const cssVarsRef = computed(() => {
|
|
37
|
+
const { type, color: propColor } = props;
|
|
38
|
+
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self: { [createKey('color', type)]: color, fontFamily, fontSize } } = themeRef.value;
|
|
39
|
+
return {
|
|
40
|
+
'--n-font-size': fontSize,
|
|
41
|
+
'--n-font-family': fontFamily,
|
|
42
|
+
'--n-color': propColor || color,
|
|
43
|
+
'--n-ripple-color': propColor || color,
|
|
44
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
45
|
+
'--n-ripple-bezier': cubicBezierEaseOut
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const themeClassHandle = inlineThemeDisabled
|
|
49
|
+
? useThemeClass('badge', computed(() => {
|
|
50
|
+
let hash = '';
|
|
51
|
+
const { type, color } = props;
|
|
52
|
+
if (type) {
|
|
53
|
+
hash += type[0];
|
|
54
|
+
}
|
|
55
|
+
if (color) {
|
|
56
|
+
hash += color2Class(color);
|
|
57
|
+
}
|
|
58
|
+
return hash;
|
|
59
|
+
}), cssVarsRef, props)
|
|
60
|
+
: undefined;
|
|
45
61
|
return {
|
|
46
62
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
47
|
-
appeared:
|
|
63
|
+
appeared: appearedRef,
|
|
48
64
|
showBadge: showBadgeRef,
|
|
49
65
|
handleAfterEnter,
|
|
50
66
|
handleAfterLeave,
|
|
51
|
-
cssVars:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
'--n-font-size': fontSize,
|
|
56
|
-
'--n-font-family': fontFamily,
|
|
57
|
-
'--n-color': propColor || color,
|
|
58
|
-
'--n-ripple-color': propColor || color,
|
|
59
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
60
|
-
'--n-ripple-bezier': cubicBezierEaseOut
|
|
61
|
-
};
|
|
62
|
-
})
|
|
67
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
68
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
69
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
63
70
|
};
|
|
64
71
|
},
|
|
65
72
|
render() {
|
|
66
73
|
var _a;
|
|
67
|
-
const { mergedClsPrefix, $slots } = this;
|
|
74
|
+
const { mergedClsPrefix, onRender, themeClass, $slots } = this;
|
|
75
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
76
|
+
const children = (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);
|
|
68
77
|
return (h("div", { class: [
|
|
69
78
|
`${mergedClsPrefix}-badge`,
|
|
79
|
+
themeClass,
|
|
70
80
|
{
|
|
71
81
|
[`${mergedClsPrefix}-badge--dot`]: this.dot,
|
|
72
|
-
[`${mergedClsPrefix}-badge--as-is`]:
|
|
82
|
+
[`${mergedClsPrefix}-badge--as-is`]: !children
|
|
73
83
|
}
|
|
74
|
-
], style: this.cssVars },
|
|
75
|
-
|
|
84
|
+
], style: this.cssVars },
|
|
85
|
+
children,
|
|
76
86
|
h(Transition, { name: "fade-in-scale-up-transition", onAfterEnter: this.handleAfterEnter, onAfterLeave: this.handleAfterLeave }, {
|
|
77
87
|
default: () => this.showBadge ? (h("sup", { class: `${mergedClsPrefix}-badge-sup`, title: getTitleAttribute(this.value) },
|
|
78
88
|
!this.dot ? (h(NBaseSlotMachine, { clsPrefix: mergedClsPrefix, appeared: this.appeared, max: this.max, value: this.value })) : null,
|
|
@@ -82,7 +82,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
82
|
'--n-item-text-color-active': string;
|
|
83
83
|
'--n-separator-color': string;
|
|
84
84
|
'--n-font-weight-active': string;
|
|
85
|
-
}
|
|
85
|
+
}> | undefined;
|
|
86
|
+
themeClass: Ref<string> | undefined;
|
|
87
|
+
onRender: (() => void) | undefined;
|
|
86
88
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
89
|
readonly separator: {
|
|
88
90
|
readonly type: StringConstructor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, computed, defineComponent, provide, toRef } from 'vue';
|
|
2
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
2
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
3
3
|
import { breadcrumbLight } from '../styles';
|
|
4
4
|
import style from './styles/index.cssr';
|
|
5
5
|
import { createInjectionKey } from '../../_utils';
|
|
@@ -12,31 +12,39 @@ export default defineComponent({
|
|
|
12
12
|
name: 'Breadcrumb',
|
|
13
13
|
props: breadcrumbProps,
|
|
14
14
|
setup(props) {
|
|
15
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
15
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
16
16
|
const themeRef = useTheme('Breadcrumb', '-breadcrumb', style, breadcrumbLight, props, mergedClsPrefixRef);
|
|
17
17
|
provide(breadcrumbInjectionKey, {
|
|
18
18
|
separatorRef: toRef(props, 'separator'),
|
|
19
19
|
mergedClsPrefixRef
|
|
20
20
|
});
|
|
21
|
+
const cssVarsRef = computed(() => {
|
|
22
|
+
const { common: { cubicBezierEaseInOut }, self: { separatorColor, itemTextColor, itemTextColorHover, itemTextColorPressed, itemTextColorActive, fontSize, fontWeightActive } } = themeRef.value;
|
|
23
|
+
return {
|
|
24
|
+
'--n-font-size': fontSize,
|
|
25
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
26
|
+
'--n-item-text-color': itemTextColor,
|
|
27
|
+
'--n-item-text-color-hover': itemTextColorHover,
|
|
28
|
+
'--n-item-text-color-pressed': itemTextColorPressed,
|
|
29
|
+
'--n-item-text-color-active': itemTextColorActive,
|
|
30
|
+
'--n-separator-color': separatorColor,
|
|
31
|
+
'--n-font-weight-active': fontWeightActive
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const themeClassHandle = inlineThemeDisabled
|
|
35
|
+
? useThemeClass('breadcrumb', undefined, cssVarsRef, props)
|
|
36
|
+
: undefined;
|
|
21
37
|
return {
|
|
22
38
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
23
|
-
cssVars:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'--n-font-size': fontSize,
|
|
27
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
28
|
-
'--n-item-text-color': itemTextColor,
|
|
29
|
-
'--n-item-text-color-hover': itemTextColorHover,
|
|
30
|
-
'--n-item-text-color-pressed': itemTextColorPressed,
|
|
31
|
-
'--n-item-text-color-active': itemTextColorActive,
|
|
32
|
-
'--n-separator-color': separatorColor,
|
|
33
|
-
'--n-font-weight-active': fontWeightActive
|
|
34
|
-
};
|
|
35
|
-
})
|
|
39
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
40
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
41
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
36
42
|
};
|
|
37
43
|
},
|
|
38
44
|
render() {
|
|
39
|
-
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
47
|
+
return (h("nav", { class: [`${this.mergedClsPrefix}-breadcrumb`, this.themeClass], style: this.cssVars, "aria-label": "Breadcrumb" },
|
|
40
48
|
h("ul", null, this.$slots)));
|
|
41
49
|
}
|
|
42
50
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType, ButtonHTMLAttributes } from 'vue';
|
|
1
|
+
import { PropType, ButtonHTMLAttributes, ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
3
3
|
import type { Type, Size } from './interface';
|
|
4
4
|
declare const buttonProps: {
|
|
@@ -1320,8 +1320,6 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1320
1320
|
rippleDuration: string;
|
|
1321
1321
|
}, any>>>;
|
|
1322
1322
|
}, {
|
|
1323
|
-
themeClass?: import("vue").Ref<string> | undefined;
|
|
1324
|
-
onRender?: (() => void) | undefined;
|
|
1325
1323
|
selfElRef: import("vue").Ref<HTMLElement | null>;
|
|
1326
1324
|
waveElRef: import("vue").Ref<{
|
|
1327
1325
|
play: () => void;
|
|
@@ -1375,7 +1373,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1375
1373
|
'--n-opacity-disabled': string;
|
|
1376
1374
|
'--n-wave-opacity': string;
|
|
1377
1375
|
}> | undefined;
|
|
1378
|
-
|
|
1376
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
1377
|
+
onRender: (() => void) | undefined;
|
|
1378
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
1379
1379
|
readonly color: StringConstructor;
|
|
1380
1380
|
readonly textColor: StringConstructor;
|
|
1381
1381
|
readonly text: BooleanConstructor;
|
|
@@ -2055,8 +2055,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
2055
2055
|
attrType: "button" | "reset" | "submit";
|
|
2056
2056
|
internalAutoFocus: boolean;
|
|
2057
2057
|
}>;
|
|
2058
|
-
declare type
|
|
2059
|
-
declare type
|
|
2058
|
+
declare type InternalButtonProps = ExtractPropTypes<typeof buttonProps>;
|
|
2059
|
+
declare type NativeButtonProps = Omit<ButtonHTMLAttributes, keyof InternalButtonProps>;
|
|
2060
|
+
declare type MergedProps = Partial<InternalButtonProps & NativeButtonProps>;
|
|
2060
2061
|
export default Button;
|
|
2061
2062
|
export declare const XButton: new () => {
|
|
2062
2063
|
$props: MergedProps;
|
package/es/button/src/Button.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, ref, computed, inject, onMounted, defineComponent, watchEffect } from 'vue';
|
|
2
2
|
import { useMemo } from 'vooks';
|
|
3
3
|
import { createHoverColor, createPressedColor } from '../../_utils/color/index';
|
|
4
|
-
import {
|
|
4
|
+
import { useConfig, useFormItem, useTheme, useThemeClass } from '../../_mixins';
|
|
5
5
|
import { NFadeInExpandTransition, NIconSwitchTransition, NBaseLoading, NBaseWave } from '../../_internal';
|
|
6
|
-
import { call, color2Class, createKey, warnOnce } from '../../_utils';
|
|
6
|
+
import { call, color2Class, createKey, isSlotEmpty, resolveWrappedSlot, warnOnce } from '../../_utils';
|
|
7
7
|
import { buttonLight } from '../styles';
|
|
8
8
|
import { buttonGroupInjectionKey } from './ButtonGroup';
|
|
9
9
|
import style from './styles/button.cssr';
|
|
@@ -129,10 +129,9 @@ const Button = defineComponent({
|
|
|
129
129
|
const handleBlur = () => {
|
|
130
130
|
enterPressedRef.value = false;
|
|
131
131
|
};
|
|
132
|
-
const { mergedClsPrefixRef,
|
|
132
|
+
const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = useConfig(props);
|
|
133
133
|
const themeRef = useTheme('Button', '-button', style, buttonLight, props, mergedClsPrefixRef);
|
|
134
|
-
const rtlEnabledRef = useRtl('Button',
|
|
135
|
-
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
134
|
+
const rtlEnabledRef = useRtl('Button', mergedRtlRef, mergedClsPrefixRef);
|
|
136
135
|
const cssVarsRef = computed(() => {
|
|
137
136
|
const theme = themeRef.value;
|
|
138
137
|
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self } = theme;
|
|
@@ -360,7 +359,7 @@ const Button = defineComponent({
|
|
|
360
359
|
};
|
|
361
360
|
return Object.assign(Object.assign(Object.assign(Object.assign({ '--n-bezier': cubicBezierEaseInOut, '--n-bezier-ease-out': cubicBezierEaseOut, '--n-ripple-duration': rippleDuration, '--n-opacity-disabled': opacityDisabled, '--n-wave-opacity': waveOpacity }, fontProps), colorProps), borderProps), sizeProps);
|
|
362
361
|
});
|
|
363
|
-
const themeClassHandle =
|
|
362
|
+
const themeClassHandle = inlineThemeDisabled
|
|
364
363
|
? useThemeClass('button', computed(() => {
|
|
365
364
|
let hash = '';
|
|
366
365
|
const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props;
|
|
@@ -391,13 +390,22 @@ const Button = defineComponent({
|
|
|
391
390
|
hash += 'm' + type[0];
|
|
392
391
|
return hash;
|
|
393
392
|
}), cssVarsRef, props)
|
|
394
|
-
:
|
|
395
|
-
return
|
|
396
|
-
|
|
393
|
+
: undefined;
|
|
394
|
+
return {
|
|
395
|
+
selfElRef,
|
|
396
|
+
waveElRef,
|
|
397
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
398
|
+
mergedFocusable: mergedFocusableRef,
|
|
399
|
+
mergedSize: mergedSizeRef,
|
|
400
|
+
showBorder: showBorderRef,
|
|
401
|
+
enterPressed: enterPressedRef,
|
|
402
|
+
rtlEnabled: rtlEnabledRef,
|
|
403
|
+
handleMousedown,
|
|
397
404
|
handleKeydown,
|
|
398
405
|
handleBlur,
|
|
399
406
|
handleKeyup,
|
|
400
|
-
handleClick,
|
|
407
|
+
handleClick,
|
|
408
|
+
customColorCssVars: computed(() => {
|
|
401
409
|
const { color } = props;
|
|
402
410
|
if (!color)
|
|
403
411
|
return null;
|
|
@@ -409,11 +417,16 @@ const Button = defineComponent({
|
|
|
409
417
|
'--n-border-color-focus': hoverColor,
|
|
410
418
|
'--n-border-color-disabled': color
|
|
411
419
|
};
|
|
412
|
-
}),
|
|
420
|
+
}),
|
|
421
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
422
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
423
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
424
|
+
};
|
|
413
425
|
},
|
|
414
426
|
render() {
|
|
415
|
-
const {
|
|
427
|
+
const { mergedClsPrefix, tag: Component, onRender } = this;
|
|
416
428
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
429
|
+
const children = resolveWrappedSlot(this.$slots.default, (children) => children && (h("span", { class: `${mergedClsPrefix}-button__content` }, children)));
|
|
417
430
|
return (h(Component, { ref: "selfElRef", class: [
|
|
418
431
|
this.themeClass,
|
|
419
432
|
`${mergedClsPrefix}-button`,
|
|
@@ -429,19 +442,16 @@ const Button = defineComponent({
|
|
|
429
442
|
this.loading && `${mergedClsPrefix}-button--loading`,
|
|
430
443
|
this.ghost && `${mergedClsPrefix}-button--ghost` // required for button group border collapse
|
|
431
444
|
], tabindex: this.mergedFocusable ? 0 : -1, type: this.attrType, style: this.cssVars, disabled: this.disabled, onClick: this.handleClick, onBlur: this.handleBlur, onMousedown: this.handleMousedown, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown },
|
|
432
|
-
|
|
445
|
+
this.iconPlacement === 'right' && children,
|
|
433
446
|
h(NFadeInExpandTransition, { width: true }, {
|
|
434
|
-
default: () =>
|
|
435
|
-
margin:
|
|
447
|
+
default: () => resolveWrappedSlot(this.$slots.icon, (children) => (this.loading || children) && (h("span", { class: `${mergedClsPrefix}-button__icon`, style: {
|
|
448
|
+
margin: isSlotEmpty(this.$slots.default) ? '0' : ''
|
|
436
449
|
} },
|
|
437
450
|
h(NIconSwitchTransition, null, {
|
|
438
|
-
default: () => {
|
|
439
|
-
|
|
440
|
-
return this.loading ? (h(NBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 })) : (h("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, (_a = $slots.icon) === null || _a === void 0 ? void 0 : _a.call($slots)));
|
|
441
|
-
}
|
|
442
|
-
}))) : null
|
|
451
|
+
default: () => this.loading ? (h(NBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 })) : (h("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, children))
|
|
452
|
+
}))))
|
|
443
453
|
}),
|
|
444
|
-
|
|
454
|
+
this.iconPlacement === 'left' && children,
|
|
445
455
|
!this.text ? (h(NBaseWave, { ref: "waveElRef", clsPrefix: mergedClsPrefix })) : null,
|
|
446
456
|
this.showBorder ? (h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-button__border`, style: this.customColorCssVars })) : null,
|
|
447
457
|
this.showBorder ? (h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-button__state-border`, style: this.customColorCssVars })) : null));
|
|
@@ -1785,7 +1785,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1785
1785
|
'--n-cell-color-hover-modal': string;
|
|
1786
1786
|
'--n-cell-color-hover-popover': string;
|
|
1787
1787
|
'--n-bar-color': string;
|
|
1788
|
-
}
|
|
1788
|
+
}> | undefined;
|
|
1789
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
1790
|
+
onRender: (() => void) | undefined;
|
|
1789
1791
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1790
1792
|
readonly isDateDisabled: PropType<(date: number) => boolean | undefined>;
|
|
1791
1793
|
readonly value: NumberConstructor;
|
|
@@ -6,7 +6,7 @@ import { ChevronLeftIcon, ChevronRightIcon } from '../../_internal/icons';
|
|
|
6
6
|
import { NBaseIcon } from '../../_internal';
|
|
7
7
|
import { call } from '../../_utils';
|
|
8
8
|
import { NButton, NButtonGroup } from '../../button';
|
|
9
|
-
import { useConfig, useLocale, useTheme } from '../../_mixins';
|
|
9
|
+
import { useConfig, useLocale, useTheme, useThemeClass } from '../../_mixins';
|
|
10
10
|
import { calendarLight } from '../styles';
|
|
11
11
|
import style from './styles/index.cssr';
|
|
12
12
|
const calendarProps = Object.assign(Object.assign({}, useTheme.props), { isDateDisabled: Function, value: Number, defaultValue: {
|
|
@@ -17,7 +17,7 @@ export default defineComponent({
|
|
|
17
17
|
name: 'Calendar',
|
|
18
18
|
props: calendarProps,
|
|
19
19
|
setup(props) {
|
|
20
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
20
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
21
21
|
const themeRef = useTheme('Calendar', '-calendar', style, calendarLight, props, mergedClsPrefixRef);
|
|
22
22
|
const { localeRef, dateLocaleRef } = useLocale('DatePicker');
|
|
23
23
|
const now = Date.now();
|
|
@@ -69,6 +69,35 @@ export default defineComponent({
|
|
|
69
69
|
}
|
|
70
70
|
monthTsRef.value = newMonthTs;
|
|
71
71
|
}
|
|
72
|
+
const cssVarsRef = computed(() => {
|
|
73
|
+
const { common: { cubicBezierEaseInOut }, self: { borderColor, borderColorModal, borderColorPopover, borderRadius, titleFontSize, textColor, titleFontWeight, titleTextColor, dayTextColor, fontSize, lineHeight, dateColorCurrent, dateTextColorCurrent, cellColorHover, cellColor, cellColorModal, barColor, cellColorPopover, cellColorHoverModal, cellColorHoverPopover } } = themeRef.value;
|
|
74
|
+
return {
|
|
75
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
76
|
+
'--n-border-color': borderColor,
|
|
77
|
+
'--n-border-color-modal': borderColorModal,
|
|
78
|
+
'--n-border-color-popover': borderColorPopover,
|
|
79
|
+
'--n-border-radius': borderRadius,
|
|
80
|
+
'--n-text-color': textColor,
|
|
81
|
+
'--n-title-font-weight': titleFontWeight,
|
|
82
|
+
'--n-title-font-size': titleFontSize,
|
|
83
|
+
'--n-title-text-color': titleTextColor,
|
|
84
|
+
'--n-day-text-color': dayTextColor,
|
|
85
|
+
'--n-font-size': fontSize,
|
|
86
|
+
'--n-line-height': lineHeight,
|
|
87
|
+
'--n-date-color-current': dateColorCurrent,
|
|
88
|
+
'--n-date-text-color-current': dateTextColorCurrent,
|
|
89
|
+
'--n-cell-color': cellColor,
|
|
90
|
+
'--n-cell-color-modal': cellColorModal,
|
|
91
|
+
'--n-cell-color-popover': cellColorPopover,
|
|
92
|
+
'--n-cell-color-hover': cellColorHover,
|
|
93
|
+
'--n-cell-color-hover-modal': cellColorHoverModal,
|
|
94
|
+
'--n-cell-color-hover-popover': cellColorHoverPopover,
|
|
95
|
+
'--n-bar-color': barColor
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
const themeClassHandle = inlineThemeDisabled
|
|
99
|
+
? useThemeClass('calendar', undefined, cssVarsRef, props)
|
|
100
|
+
: undefined;
|
|
72
101
|
return {
|
|
73
102
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
74
103
|
locale: localeRef,
|
|
@@ -84,43 +113,21 @@ export default defineComponent({
|
|
|
84
113
|
handlePrevClick,
|
|
85
114
|
handleNextClick,
|
|
86
115
|
mergedTheme: themeRef,
|
|
87
|
-
cssVars:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
91
|
-
'--n-border-color': borderColor,
|
|
92
|
-
'--n-border-color-modal': borderColorModal,
|
|
93
|
-
'--n-border-color-popover': borderColorPopover,
|
|
94
|
-
'--n-border-radius': borderRadius,
|
|
95
|
-
'--n-text-color': textColor,
|
|
96
|
-
'--n-title-font-weight': titleFontWeight,
|
|
97
|
-
'--n-title-font-size': titleFontSize,
|
|
98
|
-
'--n-title-text-color': titleTextColor,
|
|
99
|
-
'--n-day-text-color': dayTextColor,
|
|
100
|
-
'--n-font-size': fontSize,
|
|
101
|
-
'--n-line-height': lineHeight,
|
|
102
|
-
'--n-date-color-current': dateColorCurrent,
|
|
103
|
-
'--n-date-text-color-current': dateTextColorCurrent,
|
|
104
|
-
'--n-cell-color': cellColor,
|
|
105
|
-
'--n-cell-color-modal': cellColorModal,
|
|
106
|
-
'--n-cell-color-popover': cellColorPopover,
|
|
107
|
-
'--n-cell-color-hover': cellColorHover,
|
|
108
|
-
'--n-cell-color-hover-modal': cellColorHoverModal,
|
|
109
|
-
'--n-cell-color-hover-popover': cellColorHoverPopover,
|
|
110
|
-
'--n-bar-color': barColor
|
|
111
|
-
};
|
|
112
|
-
})
|
|
116
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
117
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
118
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
113
119
|
};
|
|
114
120
|
},
|
|
115
121
|
render() {
|
|
116
|
-
const { isDateDisabled, mergedClsPrefix, monthTs, cssVars, mergedValue, mergedTheme, $slots, locale: { monthBeforeYear, today }, dateLocale: { locale }, handleTodayClick, handlePrevClick, handleNextClick } = this;
|
|
122
|
+
const { isDateDisabled, mergedClsPrefix, monthTs, cssVars, mergedValue, mergedTheme, $slots, locale: { monthBeforeYear, today }, dateLocale: { locale }, handleTodayClick, handlePrevClick, handleNextClick, onRender } = this;
|
|
123
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
117
124
|
const normalizedValue = mergedValue && startOfDay(mergedValue).valueOf();
|
|
118
125
|
const localeMonth = format(monthTs, 'MMMM', { locale });
|
|
119
126
|
const year = getYear(monthTs);
|
|
120
127
|
const title = monthBeforeYear
|
|
121
128
|
? `${localeMonth} ${year}`
|
|
122
129
|
: `${year} ${localeMonth}`;
|
|
123
|
-
return (h("div", { class: `${mergedClsPrefix}-calendar`, style: cssVars },
|
|
130
|
+
return (h("div", { class: [`${mergedClsPrefix}-calendar`, this.themeClass], style: cssVars },
|
|
124
131
|
h("div", { class: `${mergedClsPrefix}-calendar-header` },
|
|
125
132
|
h("div", { class: `${mergedClsPrefix}-calendar-header__title` }, title),
|
|
126
133
|
h("div", { class: `${mergedClsPrefix}-calendar-header__extra` },
|
package/es/card/src/Card.d.ts
CHANGED
|
@@ -274,8 +274,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
274
274
|
closeSize: string;
|
|
275
275
|
}, any>>>;
|
|
276
276
|
}, {
|
|
277
|
-
themeClass?: import("vue").Ref<string> | undefined;
|
|
278
|
-
onRender?: (() => void) | undefined;
|
|
279
277
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
280
278
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
281
279
|
mergedTheme: import("vue").ComputedRef<{
|
|
@@ -443,6 +441,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
443
441
|
'--n-title-font-size': string;
|
|
444
442
|
'--n-close-size': string;
|
|
445
443
|
}> | undefined;
|
|
444
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
445
|
+
onRender: (() => void) | undefined;
|
|
446
446
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
447
447
|
title: StringConstructor;
|
|
448
448
|
contentStyle: PropType<string | CSSProperties>;
|
package/es/card/src/Card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, defineComponent, computed } from 'vue';
|
|
2
2
|
import { getPadding } from 'seemly';
|
|
3
|
-
import {
|
|
4
|
-
import { call, createKey, keysOf } from '../../_utils';
|
|
3
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
4
|
+
import { call, createKey, keysOf, resolveWrappedSlot } from '../../_utils';
|
|
5
5
|
import { NBaseClose } from '../../_internal';
|
|
6
6
|
import { cardLight } from '../styles';
|
|
7
7
|
import style from './styles/index.cssr';
|
|
@@ -44,10 +44,9 @@ export default defineComponent({
|
|
|
44
44
|
if (onClose)
|
|
45
45
|
call(onClose);
|
|
46
46
|
};
|
|
47
|
-
const { mergedClsPrefixRef,
|
|
48
|
-
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
47
|
+
const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = useConfig(props);
|
|
49
48
|
const themeRef = useTheme('Card', '-card', style, cardLight, props, mergedClsPrefixRef);
|
|
50
|
-
const rtlEnabledRef = useRtl('Card',
|
|
49
|
+
const rtlEnabledRef = useRtl('Card', mergedRtlRef, mergedClsPrefixRef);
|
|
51
50
|
const cssVarsRef = computed(() => {
|
|
52
51
|
const { size } = props;
|
|
53
52
|
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, closeColor, closeColorHover, closeColorPressed, lineHeight, closeSize, boxShadow, colorPopover, colorEmbedded, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
@@ -78,12 +77,20 @@ export default defineComponent({
|
|
|
78
77
|
'--n-close-size': closeSize
|
|
79
78
|
};
|
|
80
79
|
});
|
|
81
|
-
const themeClassHandle =
|
|
80
|
+
const themeClassHandle = inlineThemeDisabled
|
|
82
81
|
? useThemeClass('card', computed(() => {
|
|
83
82
|
return props.size[0];
|
|
84
83
|
}), cssVarsRef, props)
|
|
85
|
-
:
|
|
86
|
-
return
|
|
84
|
+
: undefined;
|
|
85
|
+
return {
|
|
86
|
+
rtlEnabled: rtlEnabledRef,
|
|
87
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
88
|
+
mergedTheme: themeRef,
|
|
89
|
+
handleCloseClick,
|
|
90
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
91
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
92
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
93
|
+
};
|
|
87
94
|
},
|
|
88
95
|
render() {
|
|
89
96
|
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, $slots } = this;
|
|
@@ -104,13 +111,17 @@ export default defineComponent({
|
|
|
104
111
|
[`${mergedClsPrefix}-card--hoverable`]: hoverable
|
|
105
112
|
}
|
|
106
113
|
], style: this.cssVars, role: this.role },
|
|
107
|
-
$slots.cover
|
|
108
|
-
$slots.header
|
|
109
|
-
h("div", { class: `${mergedClsPrefix}-card-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
$slots.
|
|
114
|
+
resolveWrappedSlot($slots.cover, (children) => children && (h("div", { class: `${mergedClsPrefix}-card-cover`, role: "none" }, children))),
|
|
115
|
+
resolveWrappedSlot($slots.header, (children) => {
|
|
116
|
+
return children || this.title || this.closable ? (h("div", { class: `${mergedClsPrefix}-card-header`, style: this.headerStyle },
|
|
117
|
+
h("div", { class: `${mergedClsPrefix}-card-header__main`, role: "heading" }, children || [this.title]),
|
|
118
|
+
resolveWrappedSlot($slots['header-extra'], (children) => children && (h("div", { class: `${mergedClsPrefix}-card-header__extra`, style: this.headerExtraStyle }, children))),
|
|
119
|
+
this.closable ? (h(NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-card-header__close`, onClick: this.handleCloseClick })) : null)) : null;
|
|
120
|
+
}),
|
|
121
|
+
resolveWrappedSlot($slots.default, (children) => children && (h("div", { class: `${mergedClsPrefix}-card__content`, style: this.contentStyle, role: "none" }, children))),
|
|
122
|
+
resolveWrappedSlot($slots.footer, (children) => children && [
|
|
123
|
+
h("div", { class: `${mergedClsPrefix}-card__footer`, style: this.footerStyle, role: "none" }, children)
|
|
124
|
+
]),
|
|
125
|
+
resolveWrappedSlot($slots.action, (children) => children && (h("div", { class: `${mergedClsPrefix}-card__action`, role: "none" }, children)))));
|
|
115
126
|
}
|
|
116
127
|
});
|