naive-ui 2.25.2 → 2.25.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/clear/src/Clear.d.ts +0 -1
- package/es/_internal/clear/src/Clear.js +1 -3
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/icons/replaceable.js +5 -4
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/es/_internal/scrollbar/src/ScrollBar.js +35 -16
- package/es/_internal/select-menu/src/SelectMenu.d.ts +22 -23
- package/es/_internal/select-menu/src/SelectMenu.js +10 -16
- package/es/_internal/selection/src/Selection.d.ts +5 -5
- package/es/_internal/selection/src/Selection.js +20 -7
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-config.d.ts +6 -3
- package/es/_mixins/use-config.js +5 -1
- package/es/_mixins/use-css-vars-class.d.ts +1 -4
- package/es/_mixins/use-css-vars-class.js +8 -7
- package/es/_utils/vue/resolve-slot.d.ts +5 -2
- package/es/_utils/vue/resolve-slot.js +4 -3
- package/es/alert/src/Alert.d.ts +3 -1
- package/es/alert/src/Alert.js +36 -21
- package/es/anchor/src/AnchorAdapter.js +9 -3
- package/es/auto-complete/src/AutoComplete.d.ts +3 -1
- package/es/auto-complete/src/AutoComplete.js +28 -15
- package/es/avatar/src/Avatar.d.ts +3 -1
- package/es/avatar/src/Avatar.js +70 -35
- package/es/back-top/src/BackTop.d.ts +12 -49
- package/es/back-top/src/BackTop.js +60 -58
- package/es/badge/src/Badge.d.ts +12 -37
- package/es/badge/src/Badge.js +41 -31
- package/es/breadcrumb/src/Breadcrumb.d.ts +3 -1
- package/es/breadcrumb/src/Breadcrumb.js +24 -16
- package/es/button/src/Button.d.ts +7 -6
- package/es/button/src/Button.js +31 -21
- package/es/calendar/src/Calendar.d.ts +3 -1
- package/es/calendar/src/Calendar.js +37 -30
- package/es/card/src/Card.d.ts +2 -2
- package/es/card/src/Card.js +27 -16
- package/es/carousel/src/Carousel.d.ts +3 -1
- package/es/carousel/src/Carousel.js +29 -20
- package/es/cascader/src/Cascader.d.ts +16 -1
- package/es/cascader/src/Cascader.js +53 -31
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderSelectMenu.js +2 -1
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/es/cascader/src/interface.d.ts +1 -0
- package/es/checkbox/src/Checkbox.d.ts +6 -4
- package/es/checkbox/src/Checkbox.js +41 -32
- package/es/checkbox/src/styles/index.cssr.js +7 -7
- package/es/code/src/Code.d.ts +3 -1
- package/es/code/src/Code.js +33 -27
- package/es/collapse/src/Collapse.d.ts +3 -1
- package/es/collapse/src/Collapse.js +24 -16
- package/es/color-picker/src/ColorPicker.d.ts +3 -1
- package/es/color-picker/src/ColorPicker.js +20 -7
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +4 -4
- package/es/config-provider/src/ConfigProvider.js +3 -3
- package/es/config-provider/src/internal-interface.d.ts +3 -1
- package/es/countdown/src/Countdown.d.ts +0 -3
- package/es/countdown/src/Countdown.js +0 -1
- package/es/data-table/src/DataTable.d.ts +43 -41
- package/es/data-table/src/DataTable.js +54 -48
- package/es/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/es/data-table/src/HeaderButton/SortButton.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +4 -2
- package/es/data-table/src/interface.d.ts +1 -1
- package/es/data-table/src/use-table-data.js +19 -7
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/DatePicker.js +2 -2
- package/es/date-picker/src/panel/date.d.ts +2 -0
- package/es/date-picker/src/panel/datetime.d.ts +2 -0
- package/es/date-picker/src/panel/month.d.ts +2 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +4 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -0
- package/es/descriptions/src/Descriptions.d.ts +14 -1
- package/es/descriptions/src/Descriptions.js +45 -28
- package/es/descriptions/src/styles/index.cssr.js +2 -1
- package/es/descriptions/styles/light.d.ts +1 -0
- package/es/descriptions/styles/light.js +2 -2
- package/es/dialog/src/Dialog.d.ts +3 -1
- package/es/dialog/src/Dialog.js +57 -56
- package/es/dialog/src/DialogEnvironment.js +1 -1
- package/es/divider/src/Divider.d.ts +3 -1
- package/es/divider/src/Divider.js +20 -11
- package/es/dynamic-input/src/DynamicInput.d.ts +3 -1
- package/es/dynamic-input/src/DynamicInput.js +18 -11
- package/es/dynamic-tags/src/DynamicTags.d.ts +3 -1
- package/es/dynamic-tags/src/DynamicTags.js +17 -10
- package/es/element/src/Element.d.ts +3 -1
- package/es/element/src/Element.js +18 -11
- package/es/empty/src/Empty.d.ts +3 -1
- package/es/empty/src/Empty.js +28 -16
- package/es/form/src/FormItem.js +1 -2
- package/es/grid/src/Grid.js +2 -2
- package/es/icon-wrapper/src/IconWrapper.js +6 -8
- package/es/input/src/Input.d.ts +6 -3
- package/es/input/src/Input.js +96 -84
- package/es/input/src/styles/input.cssr.js +2 -2
- package/es/input-number/src/InputNumber.d.ts +6 -17
- package/es/input-number/src/InputNumber.js +79 -20
- package/es/layout/src/Layout.d.ts +8 -2
- package/es/layout/src/Layout.js +17 -10
- package/es/layout/src/LayoutContent.d.ts +4 -1
- package/es/layout/src/LayoutFooter.d.ts +3 -1
- package/es/layout/src/LayoutFooter.js +28 -19
- package/es/layout/src/LayoutHeader.d.ts +3 -1
- package/es/layout/src/LayoutHeader.js +28 -19
- package/es/layout/src/LayoutSider.d.ts +4 -0
- package/es/layout/src/LayoutSider.js +37 -29
- package/es/legacy-grid/src/styles/index.cssr.js +1 -1
- package/es/locales/common/esAR.js +2 -2
- package/es/locales/common/frFR.js +8 -9
- package/es/locales/common/skSK.d.ts +3 -0
- package/es/locales/common/skSK.js +110 -0
- package/es/locales/date/skSK.d.ts +3 -0
- package/es/locales/date/skSK.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +4 -1
- package/es/log/src/Log.js +20 -15
- package/es/mention/index.d.ts +1 -1
- package/es/mention/src/Mention.d.ts +3 -1
- package/es/mention/src/Mention.js +20 -10
- package/es/mention/src/interface.d.ts +4 -0
- package/es/menu/src/Menu.d.ts +3 -1
- package/es/menu/src/Menu.js +68 -63
- package/es/modal/src/BodyWrapper.d.ts +1 -0
- package/es/modal/src/Modal.d.ts +11 -14
- package/es/modal/src/Modal.js +41 -32
- package/es/notification/src/styles/index.cssr.js +6 -5
- package/es/page-header/src/PageHeader.d.ts +3 -1
- package/es/page-header/src/PageHeader.js +27 -18
- package/es/pagination/src/Pagination.d.ts +13 -1
- package/es/pagination/src/Pagination.js +59 -52
- package/es/popover/src/PopoverBody.js +10 -4
- package/es/progress/src/Progress.d.ts +2 -2
- package/es/progress/src/Progress.js +12 -6
- package/es/radio/src/Radio.d.ts +3 -1
- package/es/radio/src/Radio.js +32 -23
- package/es/radio/src/RadioGroup.d.ts +3 -1
- package/es/radio/src/RadioGroup.js +31 -22
- package/es/rate/src/Rate.d.ts +3 -1
- package/es/rate/src/Rate.js +44 -23
- package/es/result/src/Result.d.ts +4 -2
- package/es/result/src/Result.js +36 -19
- package/es/scrollbar/src/ScrollBar.d.ts +12 -1
- package/es/scrollbar/src/ScrollBar.js +4 -0
- package/es/select/src/Select.d.ts +1 -1
- package/es/select/src/Select.js +5 -4
- package/es/spin/src/Spin.d.ts +3 -1
- package/es/spin/src/Spin.js +31 -21
- package/es/statistic/src/Statistic.d.ts +3 -1
- package/es/statistic/src/Statistic.js +29 -21
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/switch/src/Switch.d.ts +13 -1
- package/es/switch/src/Switch.js +85 -60
- package/es/switch/src/styles/index.cssr.js +21 -8
- package/es/switch/styles/dark.js +2 -2
- package/es/switch/styles/light.d.ts +1 -0
- package/es/switch/styles/light.js +2 -2
- package/es/table/src/Table.d.ts +3 -1
- package/es/table/src/Table.js +40 -29
- package/es/table/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/Tabs.d.ts +25 -23
- package/es/tabs/src/Tabs.js +50 -44
- package/es/tabs/src/styles/index.cssr.js +79 -77
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/tag/src/Tag.js +8 -11
- package/es/theme-editor/src/ThemeEditor.js +4 -3
- package/es/themes/dark.js +3 -1
- package/es/themes/light.js +3 -1
- package/es/thing/src/Thing.js +10 -3
- package/es/time-picker/src/TimePicker.d.ts +4 -0
- package/es/transfer/src/TransferList.d.ts +1 -0
- package/es/tree/src/Tree.d.ts +1 -0
- package/es/tree/src/Tree.js +8 -4
- package/es/tree-select/src/TreeSelect.d.ts +13 -0
- package/es/tree-select/src/TreeSelect.js +6 -2
- package/es/typography/src/a.d.ts +3 -1
- package/es/typography/src/a.js +18 -10
- package/es/typography/src/blockquote.d.ts +3 -1
- package/es/typography/src/blockquote.js +21 -12
- package/es/typography/src/create-header.d.ts +3 -1
- package/es/typography/src/create-header.js +25 -16
- package/es/typography/src/headers.d.ts +18 -6
- package/es/typography/src/hr.d.ts +3 -1
- package/es/typography/src/hr.js +18 -10
- package/es/typography/src/ol.d.ts +3 -1
- package/es/typography/src/ol.js +23 -14
- package/es/typography/src/p.d.ts +3 -1
- package/es/typography/src/p.js +23 -15
- package/es/typography/src/text.d.ts +3 -1
- package/es/typography/src/text.js +31 -23
- package/es/typography/src/ul.d.ts +3 -1
- package/es/typography/src/ul.js +23 -14
- package/es/upload/src/interface.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/watermark/index.d.ts +2 -0
- package/es/watermark/index.js +1 -0
- package/es/watermark/src/Watermark.d.ts +285 -0
- package/es/watermark/src/Watermark.js +159 -0
- package/es/watermark/src/styles/index.cssr.d.ts +2 -0
- package/es/watermark/src/styles/index.cssr.js +14 -0
- package/es/watermark/styles/dark.d.ts +3 -0
- package/es/watermark/styles/dark.js +12 -0
- package/es/watermark/styles/index.d.ts +3 -0
- package/es/watermark/styles/index.js +2 -0
- package/es/watermark/styles/light.d.ts +5 -0
- package/es/watermark/styles/light.js +13 -0
- package/lib/_internal/clear/src/Clear.d.ts +0 -1
- package/lib/_internal/clear/src/Clear.js +0 -2
- package/lib/_internal/icons/replaceable.d.ts +1 -1
- package/lib/_internal/icons/replaceable.js +4 -3
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/lib/_internal/scrollbar/src/ScrollBar.js +34 -15
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +22 -23
- package/lib/_internal/select-menu/src/SelectMenu.js +9 -15
- package/lib/_internal/selection/src/Selection.d.ts +5 -5
- package/lib/_internal/selection/src/Selection.js +19 -6
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +1 -2
- package/lib/_mixins/use-config.d.ts +6 -3
- package/lib/_mixins/use-config.js +5 -1
- package/lib/_mixins/use-css-vars-class.d.ts +1 -4
- package/lib/_mixins/use-css-vars-class.js +9 -8
- package/lib/_utils/vue/resolve-slot.d.ts +5 -2
- package/lib/_utils/vue/resolve-slot.js +4 -3
- package/lib/alert/src/Alert.d.ts +3 -1
- package/lib/alert/src/Alert.js +34 -19
- package/lib/anchor/src/AnchorAdapter.js +8 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -1
- package/lib/auto-complete/src/AutoComplete.js +27 -14
- package/lib/avatar/src/Avatar.d.ts +3 -1
- package/lib/avatar/src/Avatar.js +68 -33
- package/lib/back-top/src/BackTop.d.ts +12 -49
- package/lib/back-top/src/BackTop.js +57 -55
- package/lib/badge/src/Badge.d.ts +12 -37
- package/lib/badge/src/Badge.js +39 -29
- package/lib/breadcrumb/src/Breadcrumb.d.ts +3 -1
- package/lib/breadcrumb/src/Breadcrumb.js +23 -15
- package/lib/button/src/Button.d.ts +7 -6
- package/lib/button/src/Button.js +29 -19
- package/lib/calendar/src/Calendar.d.ts +3 -1
- package/lib/calendar/src/Calendar.js +36 -29
- package/lib/card/src/Card.d.ts +2 -2
- package/lib/card/src/Card.js +25 -14
- package/lib/carousel/src/Carousel.d.ts +3 -1
- package/lib/carousel/src/Carousel.js +27 -18
- package/lib/cascader/src/Cascader.d.ts +16 -1
- package/lib/cascader/src/Cascader.js +52 -30
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderSelectMenu.js +2 -1
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/lib/cascader/src/interface.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.d.ts +6 -4
- package/lib/checkbox/src/Checkbox.js +40 -31
- package/lib/checkbox/src/styles/index.cssr.js +7 -7
- package/lib/code/src/Code.d.ts +3 -1
- package/lib/code/src/Code.js +32 -26
- package/lib/collapse/src/Collapse.d.ts +3 -1
- package/lib/collapse/src/Collapse.js +23 -15
- package/lib/color-picker/src/ColorPicker.d.ts +3 -1
- package/lib/color-picker/src/ColorPicker.js +19 -6
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +4 -4
- package/lib/config-provider/src/ConfigProvider.js +3 -3
- package/lib/config-provider/src/internal-interface.d.ts +3 -1
- package/lib/countdown/src/Countdown.d.ts +0 -3
- package/lib/countdown/src/Countdown.js +0 -1
- package/lib/data-table/src/DataTable.d.ts +43 -41
- package/lib/data-table/src/DataTable.js +53 -47
- package/lib/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/lib/data-table/src/HeaderButton/SortButton.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +3 -1
- package/lib/data-table/src/interface.d.ts +1 -1
- package/lib/data-table/src/use-table-data.js +19 -7
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/DatePicker.js +2 -2
- package/lib/date-picker/src/panel/date.d.ts +2 -0
- package/lib/date-picker/src/panel/datetime.d.ts +2 -0
- package/lib/date-picker/src/panel/month.d.ts +2 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +4 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -0
- package/lib/descriptions/src/Descriptions.d.ts +14 -1
- package/lib/descriptions/src/Descriptions.js +44 -27
- package/lib/descriptions/src/styles/index.cssr.js +2 -1
- package/lib/descriptions/styles/light.d.ts +1 -0
- package/lib/descriptions/styles/light.js +2 -2
- package/lib/dialog/src/Dialog.d.ts +3 -1
- package/lib/dialog/src/Dialog.js +55 -54
- package/lib/dialog/src/DialogEnvironment.js +1 -1
- package/lib/divider/src/Divider.d.ts +3 -1
- package/lib/divider/src/Divider.js +19 -10
- package/lib/dynamic-input/src/DynamicInput.d.ts +3 -1
- package/lib/dynamic-input/src/DynamicInput.js +17 -10
- package/lib/dynamic-tags/src/DynamicTags.d.ts +3 -1
- package/lib/dynamic-tags/src/DynamicTags.js +16 -9
- package/lib/element/src/Element.d.ts +3 -1
- package/lib/element/src/Element.js +17 -10
- package/lib/empty/src/Empty.d.ts +3 -1
- package/lib/empty/src/Empty.js +27 -15
- package/lib/form/src/FormItem.js +1 -2
- package/lib/grid/src/Grid.js +2 -2
- package/lib/icon-wrapper/src/IconWrapper.js +5 -7
- package/lib/input/src/Input.d.ts +6 -3
- package/lib/input/src/Input.js +95 -83
- package/lib/input/src/styles/input.cssr.js +2 -2
- package/lib/input-number/src/InputNumber.d.ts +6 -17
- package/lib/input-number/src/InputNumber.js +76 -17
- package/lib/layout/src/Layout.d.ts +8 -2
- package/lib/layout/src/Layout.js +16 -9
- package/lib/layout/src/LayoutContent.d.ts +4 -1
- package/lib/layout/src/LayoutFooter.d.ts +3 -1
- package/lib/layout/src/LayoutFooter.js +27 -18
- package/lib/layout/src/LayoutHeader.d.ts +3 -1
- package/lib/layout/src/LayoutHeader.js +27 -18
- package/lib/layout/src/LayoutSider.d.ts +4 -0
- package/lib/layout/src/LayoutSider.js +36 -28
- package/lib/legacy-grid/src/styles/index.cssr.js +1 -1
- package/lib/locales/common/esAR.js +2 -2
- package/lib/locales/common/frFR.js +8 -9
- package/lib/locales/common/skSK.d.ts +3 -0
- package/lib/locales/common/skSK.js +112 -0
- package/lib/locales/date/skSK.d.ts +3 -0
- package/lib/locales/date/skSK.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/log/src/Log.d.ts +4 -1
- package/lib/log/src/Log.js +19 -14
- package/lib/mention/index.d.ts +1 -1
- package/lib/mention/src/Mention.d.ts +3 -1
- package/lib/mention/src/Mention.js +19 -9
- package/lib/mention/src/interface.d.ts +4 -0
- package/lib/menu/src/Menu.d.ts +3 -1
- package/lib/menu/src/Menu.js +67 -62
- package/lib/modal/src/BodyWrapper.d.ts +1 -0
- package/lib/modal/src/Modal.d.ts +11 -14
- package/lib/modal/src/Modal.js +40 -31
- package/lib/notification/src/styles/index.cssr.js +6 -5
- package/lib/page-header/src/PageHeader.d.ts +3 -1
- package/lib/page-header/src/PageHeader.js +26 -17
- package/lib/pagination/src/Pagination.d.ts +13 -1
- package/lib/pagination/src/Pagination.js +58 -51
- package/lib/popover/src/PopoverBody.js +9 -3
- package/lib/progress/src/Progress.d.ts +2 -2
- package/lib/progress/src/Progress.js +11 -5
- package/lib/radio/src/Radio.d.ts +3 -1
- package/lib/radio/src/Radio.js +31 -22
- package/lib/radio/src/RadioGroup.d.ts +3 -1
- package/lib/radio/src/RadioGroup.js +30 -21
- package/lib/rate/src/Rate.d.ts +3 -1
- package/lib/rate/src/Rate.js +42 -21
- package/lib/result/src/Result.d.ts +4 -2
- package/lib/result/src/Result.js +35 -18
- package/lib/scrollbar/src/ScrollBar.d.ts +12 -1
- package/lib/scrollbar/src/ScrollBar.js +4 -0
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/select/src/Select.js +5 -4
- package/lib/spin/src/Spin.d.ts +3 -1
- package/lib/spin/src/Spin.js +30 -20
- package/lib/statistic/src/Statistic.d.ts +3 -1
- package/lib/statistic/src/Statistic.js +28 -20
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +9 -7
- package/lib/switch/src/Switch.d.ts +13 -1
- package/lib/switch/src/Switch.js +81 -56
- package/lib/switch/src/styles/index.cssr.js +21 -8
- package/lib/switch/styles/dark.js +2 -2
- package/lib/switch/styles/light.d.ts +1 -0
- package/lib/switch/styles/light.js +2 -2
- package/lib/table/src/Table.d.ts +3 -1
- package/lib/table/src/Table.js +39 -28
- package/lib/table/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/Tabs.d.ts +25 -23
- package/lib/tabs/src/Tabs.js +48 -42
- package/lib/tabs/src/styles/index.cssr.js +79 -77
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/tag/src/Tag.js +7 -10
- package/lib/theme-editor/src/ThemeEditor.js +2 -1
- package/lib/themes/dark.js +3 -1
- package/lib/themes/light.js +3 -1
- package/lib/thing/src/Thing.js +9 -2
- package/lib/time-picker/src/TimePicker.d.ts +4 -0
- package/lib/transfer/src/TransferList.d.ts +1 -0
- package/lib/tree/src/Tree.d.ts +1 -0
- package/lib/tree/src/Tree.js +8 -4
- package/lib/tree-select/src/TreeSelect.d.ts +13 -0
- package/lib/tree-select/src/TreeSelect.js +6 -2
- package/lib/typography/src/a.d.ts +3 -1
- package/lib/typography/src/a.js +17 -9
- package/lib/typography/src/blockquote.d.ts +3 -1
- package/lib/typography/src/blockquote.js +20 -11
- package/lib/typography/src/create-header.d.ts +3 -1
- package/lib/typography/src/create-header.js +24 -15
- package/lib/typography/src/headers.d.ts +18 -6
- package/lib/typography/src/hr.d.ts +3 -1
- package/lib/typography/src/hr.js +17 -9
- package/lib/typography/src/ol.d.ts +3 -1
- package/lib/typography/src/ol.js +22 -13
- package/lib/typography/src/p.d.ts +3 -1
- package/lib/typography/src/p.js +22 -14
- package/lib/typography/src/text.d.ts +3 -1
- package/lib/typography/src/text.js +30 -22
- package/lib/typography/src/ul.d.ts +3 -1
- package/lib/typography/src/ul.js +22 -13
- package/lib/upload/src/interface.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/index.d.ts +2 -0
- package/lib/watermark/index.js +8 -0
- package/lib/watermark/src/Watermark.d.ts +285 -0
- package/lib/watermark/src/Watermark.js +164 -0
- package/lib/watermark/src/styles/index.cssr.d.ts +2 -0
- package/lib/watermark/src/styles/index.cssr.js +21 -0
- package/lib/watermark/styles/dark.d.ts +3 -0
- package/lib/watermark/styles/dark.js +14 -0
- package/lib/watermark/styles/index.d.ts +3 -0
- package/lib/watermark/styles/index.js +10 -0
- package/lib/watermark/styles/light.d.ts +5 -0
- package/lib/watermark/styles/light.js +15 -0
- package/package.json +8 -9
- package/volar.d.ts +1 -0
- package/web-types.json +252 -29
package/lib/badge/src/Badge.js
CHANGED
|
@@ -9,27 +9,18 @@ const _internal_1 = require("../../_internal");
|
|
|
9
9
|
const _utils_1 = require("../../_utils");
|
|
10
10
|
const styles_1 = require("../styles");
|
|
11
11
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
12
|
-
const badgeProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { value: [String, Number], max: Number, dot: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}, type: {
|
|
12
|
+
const badgeProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { value: [String, Number], max: Number, dot: Boolean, type: {
|
|
16
13
|
type: String,
|
|
17
14
|
default: 'default'
|
|
18
15
|
}, show: {
|
|
19
16
|
type: Boolean,
|
|
20
17
|
default: true
|
|
21
|
-
}, showZero:
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
}, processing: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false
|
|
27
|
-
}, color: String });
|
|
18
|
+
}, showZero: Boolean, processing: Boolean, color: String });
|
|
28
19
|
exports.default = (0, vue_1.defineComponent)({
|
|
29
20
|
name: 'Badge',
|
|
30
21
|
props: badgeProps,
|
|
31
22
|
setup(props) {
|
|
32
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
23
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
33
24
|
const themeRef = (0, _mixins_1.useTheme)('Badge', '-badge', index_cssr_1.default, styles_1.badgeLight, props, mergedClsPrefixRef);
|
|
34
25
|
const appearedRef = (0, vue_1.ref)(false);
|
|
35
26
|
const handleAfterEnter = () => {
|
|
@@ -47,37 +38,56 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
47
38
|
if (showBadgeRef.value)
|
|
48
39
|
appearedRef.value = true;
|
|
49
40
|
});
|
|
41
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
42
|
+
const { type, color: propColor } = props;
|
|
43
|
+
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self: { [(0, _utils_1.createKey)('color', type)]: color, fontFamily, fontSize } } = themeRef.value;
|
|
44
|
+
return {
|
|
45
|
+
'--n-font-size': fontSize,
|
|
46
|
+
'--n-font-family': fontFamily,
|
|
47
|
+
'--n-color': propColor || color,
|
|
48
|
+
'--n-ripple-color': propColor || color,
|
|
49
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
50
|
+
'--n-ripple-bezier': cubicBezierEaseOut
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const themeClassHandle = inlineThemeDisabled
|
|
54
|
+
? (0, _mixins_1.useThemeClass)('badge', (0, vue_1.computed)(() => {
|
|
55
|
+
let hash = '';
|
|
56
|
+
const { type, color } = props;
|
|
57
|
+
if (type) {
|
|
58
|
+
hash += type[0];
|
|
59
|
+
}
|
|
60
|
+
if (color) {
|
|
61
|
+
hash += (0, _utils_1.color2Class)(color);
|
|
62
|
+
}
|
|
63
|
+
return hash;
|
|
64
|
+
}), cssVarsRef, props)
|
|
65
|
+
: undefined;
|
|
50
66
|
return {
|
|
51
67
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
52
|
-
appeared:
|
|
68
|
+
appeared: appearedRef,
|
|
53
69
|
showBadge: showBadgeRef,
|
|
54
70
|
handleAfterEnter,
|
|
55
71
|
handleAfterLeave,
|
|
56
|
-
cssVars:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
'--n-font-size': fontSize,
|
|
61
|
-
'--n-font-family': fontFamily,
|
|
62
|
-
'--n-color': propColor || color,
|
|
63
|
-
'--n-ripple-color': propColor || color,
|
|
64
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
65
|
-
'--n-ripple-bezier': cubicBezierEaseOut
|
|
66
|
-
};
|
|
67
|
-
})
|
|
72
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
73
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
74
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
68
75
|
};
|
|
69
76
|
},
|
|
70
77
|
render() {
|
|
71
78
|
var _a;
|
|
72
|
-
const { mergedClsPrefix, $slots } = this;
|
|
79
|
+
const { mergedClsPrefix, onRender, themeClass, $slots } = this;
|
|
80
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
81
|
+
const children = (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);
|
|
73
82
|
return ((0, vue_1.h)("div", { class: [
|
|
74
83
|
`${mergedClsPrefix}-badge`,
|
|
84
|
+
themeClass,
|
|
75
85
|
{
|
|
76
86
|
[`${mergedClsPrefix}-badge--dot`]: this.dot,
|
|
77
|
-
[`${mergedClsPrefix}-badge--as-is`]:
|
|
87
|
+
[`${mergedClsPrefix}-badge--as-is`]: !children
|
|
78
88
|
}
|
|
79
|
-
], style: this.cssVars },
|
|
80
|
-
|
|
89
|
+
], style: this.cssVars },
|
|
90
|
+
children,
|
|
81
91
|
(0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition", onAfterEnter: this.handleAfterEnter, onAfterLeave: this.handleAfterLeave }, {
|
|
82
92
|
default: () => this.showBadge ? ((0, vue_1.h)("sup", { class: `${mergedClsPrefix}-badge-sup`, title: (0, _utils_1.getTitleAttribute)(this.value) },
|
|
83
93
|
!this.dot ? ((0, vue_1.h)(_internal_1.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;
|
|
@@ -18,31 +18,39 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
18
18
|
name: 'Breadcrumb',
|
|
19
19
|
props: breadcrumbProps,
|
|
20
20
|
setup(props) {
|
|
21
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
21
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
22
22
|
const themeRef = (0, _mixins_1.useTheme)('Breadcrumb', '-breadcrumb', index_cssr_1.default, styles_1.breadcrumbLight, props, mergedClsPrefixRef);
|
|
23
23
|
(0, vue_1.provide)(exports.breadcrumbInjectionKey, {
|
|
24
24
|
separatorRef: (0, vue_1.toRef)(props, 'separator'),
|
|
25
25
|
mergedClsPrefixRef
|
|
26
26
|
});
|
|
27
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
28
|
+
const { common: { cubicBezierEaseInOut }, self: { separatorColor, itemTextColor, itemTextColorHover, itemTextColorPressed, itemTextColorActive, fontSize, fontWeightActive } } = themeRef.value;
|
|
29
|
+
return {
|
|
30
|
+
'--n-font-size': fontSize,
|
|
31
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
32
|
+
'--n-item-text-color': itemTextColor,
|
|
33
|
+
'--n-item-text-color-hover': itemTextColorHover,
|
|
34
|
+
'--n-item-text-color-pressed': itemTextColorPressed,
|
|
35
|
+
'--n-item-text-color-active': itemTextColorActive,
|
|
36
|
+
'--n-separator-color': separatorColor,
|
|
37
|
+
'--n-font-weight-active': fontWeightActive
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const themeClassHandle = inlineThemeDisabled
|
|
41
|
+
? (0, _mixins_1.useThemeClass)('breadcrumb', undefined, cssVarsRef, props)
|
|
42
|
+
: undefined;
|
|
27
43
|
return {
|
|
28
44
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
29
|
-
cssVars:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'--n-font-size': fontSize,
|
|
33
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
34
|
-
'--n-item-text-color': itemTextColor,
|
|
35
|
-
'--n-item-text-color-hover': itemTextColorHover,
|
|
36
|
-
'--n-item-text-color-pressed': itemTextColorPressed,
|
|
37
|
-
'--n-item-text-color-active': itemTextColorActive,
|
|
38
|
-
'--n-separator-color': separatorColor,
|
|
39
|
-
'--n-font-weight-active': fontWeightActive
|
|
40
|
-
};
|
|
41
|
-
})
|
|
45
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
46
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
47
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
42
48
|
};
|
|
43
49
|
},
|
|
44
50
|
render() {
|
|
45
|
-
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
53
|
+
return ((0, vue_1.h)("nav", { class: [`${this.mergedClsPrefix}-breadcrumb`, this.themeClass], style: this.cssVars, "aria-label": "Breadcrumb" },
|
|
46
54
|
(0, vue_1.h)("ul", null, this.$slots)));
|
|
47
55
|
}
|
|
48
56
|
});
|
|
@@ -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/lib/button/src/Button.js
CHANGED
|
@@ -135,10 +135,9 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
135
135
|
const handleBlur = () => {
|
|
136
136
|
enterPressedRef.value = false;
|
|
137
137
|
};
|
|
138
|
-
const { mergedClsPrefixRef,
|
|
138
|
+
const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = (0, _mixins_1.useConfig)(props);
|
|
139
139
|
const themeRef = (0, _mixins_1.useTheme)('Button', '-button', button_cssr_1.default, styles_1.buttonLight, props, mergedClsPrefixRef);
|
|
140
|
-
const rtlEnabledRef = (0, use_rtl_1.default)('Button',
|
|
141
|
-
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
140
|
+
const rtlEnabledRef = (0, use_rtl_1.default)('Button', mergedRtlRef, mergedClsPrefixRef);
|
|
142
141
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
143
142
|
const theme = themeRef.value;
|
|
144
143
|
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self } = theme;
|
|
@@ -366,7 +365,7 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
366
365
|
};
|
|
367
366
|
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);
|
|
368
367
|
});
|
|
369
|
-
const themeClassHandle =
|
|
368
|
+
const themeClassHandle = inlineThemeDisabled
|
|
370
369
|
? (0, _mixins_1.useThemeClass)('button', (0, vue_1.computed)(() => {
|
|
371
370
|
let hash = '';
|
|
372
371
|
const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props;
|
|
@@ -397,13 +396,22 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
397
396
|
hash += 'm' + type[0];
|
|
398
397
|
return hash;
|
|
399
398
|
}), cssVarsRef, props)
|
|
400
|
-
:
|
|
401
|
-
return
|
|
402
|
-
|
|
399
|
+
: undefined;
|
|
400
|
+
return {
|
|
401
|
+
selfElRef,
|
|
402
|
+
waveElRef,
|
|
403
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
404
|
+
mergedFocusable: mergedFocusableRef,
|
|
405
|
+
mergedSize: mergedSizeRef,
|
|
406
|
+
showBorder: showBorderRef,
|
|
407
|
+
enterPressed: enterPressedRef,
|
|
408
|
+
rtlEnabled: rtlEnabledRef,
|
|
409
|
+
handleMousedown,
|
|
403
410
|
handleKeydown,
|
|
404
411
|
handleBlur,
|
|
405
412
|
handleKeyup,
|
|
406
|
-
handleClick,
|
|
413
|
+
handleClick,
|
|
414
|
+
customColorCssVars: (0, vue_1.computed)(() => {
|
|
407
415
|
const { color } = props;
|
|
408
416
|
if (!color)
|
|
409
417
|
return null;
|
|
@@ -415,11 +423,16 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
415
423
|
'--n-border-color-focus': hoverColor,
|
|
416
424
|
'--n-border-color-disabled': color
|
|
417
425
|
};
|
|
418
|
-
}),
|
|
426
|
+
}),
|
|
427
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
428
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
429
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
430
|
+
};
|
|
419
431
|
},
|
|
420
432
|
render() {
|
|
421
|
-
const {
|
|
433
|
+
const { mergedClsPrefix, tag: Component, onRender } = this;
|
|
422
434
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
435
|
+
const children = (0, _utils_1.resolveWrappedSlot)(this.$slots.default, (children) => children && ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-button__content` }, children)));
|
|
423
436
|
return ((0, vue_1.h)(Component, { ref: "selfElRef", class: [
|
|
424
437
|
this.themeClass,
|
|
425
438
|
`${mergedClsPrefix}-button`,
|
|
@@ -435,19 +448,16 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
435
448
|
this.loading && `${mergedClsPrefix}-button--loading`,
|
|
436
449
|
this.ghost && `${mergedClsPrefix}-button--ghost` // required for button group border collapse
|
|
437
450
|
], 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 },
|
|
438
|
-
|
|
451
|
+
this.iconPlacement === 'right' && children,
|
|
439
452
|
(0, vue_1.h)(_internal_1.NFadeInExpandTransition, { width: true }, {
|
|
440
|
-
default: () =>
|
|
441
|
-
margin:
|
|
453
|
+
default: () => (0, _utils_1.resolveWrappedSlot)(this.$slots.icon, (children) => (this.loading || children) && ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-button__icon`, style: {
|
|
454
|
+
margin: (0, _utils_1.isSlotEmpty)(this.$slots.default) ? '0' : ''
|
|
442
455
|
} },
|
|
443
456
|
(0, vue_1.h)(_internal_1.NIconSwitchTransition, null, {
|
|
444
|
-
default: () => {
|
|
445
|
-
|
|
446
|
-
return this.loading ? ((0, vue_1.h)(_internal_1.NBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 })) : ((0, vue_1.h)("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, (_a = $slots.icon) === null || _a === void 0 ? void 0 : _a.call($slots)));
|
|
447
|
-
}
|
|
448
|
-
}))) : null
|
|
457
|
+
default: () => this.loading ? ((0, vue_1.h)(_internal_1.NBaseLoading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 })) : ((0, vue_1.h)("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, children))
|
|
458
|
+
}))))
|
|
449
459
|
}),
|
|
450
|
-
|
|
460
|
+
this.iconPlacement === 'left' && children,
|
|
451
461
|
!this.text ? ((0, vue_1.h)(_internal_1.NBaseWave, { ref: "waveElRef", clsPrefix: mergedClsPrefix })) : null,
|
|
452
462
|
this.showBorder ? ((0, vue_1.h)("div", { "aria-hidden": true, class: `${mergedClsPrefix}-button__border`, style: this.customColorCssVars })) : null,
|
|
453
463
|
this.showBorder ? ((0, vue_1.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;
|
|
@@ -22,7 +22,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
22
22
|
name: 'Calendar',
|
|
23
23
|
props: calendarProps,
|
|
24
24
|
setup(props) {
|
|
25
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
25
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
26
26
|
const themeRef = (0, _mixins_1.useTheme)('Calendar', '-calendar', index_cssr_1.default, styles_1.calendarLight, props, mergedClsPrefixRef);
|
|
27
27
|
const { localeRef, dateLocaleRef } = (0, _mixins_1.useLocale)('DatePicker');
|
|
28
28
|
const now = Date.now();
|
|
@@ -74,6 +74,35 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
74
74
|
}
|
|
75
75
|
monthTsRef.value = newMonthTs;
|
|
76
76
|
}
|
|
77
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
78
|
+
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;
|
|
79
|
+
return {
|
|
80
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
81
|
+
'--n-border-color': borderColor,
|
|
82
|
+
'--n-border-color-modal': borderColorModal,
|
|
83
|
+
'--n-border-color-popover': borderColorPopover,
|
|
84
|
+
'--n-border-radius': borderRadius,
|
|
85
|
+
'--n-text-color': textColor,
|
|
86
|
+
'--n-title-font-weight': titleFontWeight,
|
|
87
|
+
'--n-title-font-size': titleFontSize,
|
|
88
|
+
'--n-title-text-color': titleTextColor,
|
|
89
|
+
'--n-day-text-color': dayTextColor,
|
|
90
|
+
'--n-font-size': fontSize,
|
|
91
|
+
'--n-line-height': lineHeight,
|
|
92
|
+
'--n-date-color-current': dateColorCurrent,
|
|
93
|
+
'--n-date-text-color-current': dateTextColorCurrent,
|
|
94
|
+
'--n-cell-color': cellColor,
|
|
95
|
+
'--n-cell-color-modal': cellColorModal,
|
|
96
|
+
'--n-cell-color-popover': cellColorPopover,
|
|
97
|
+
'--n-cell-color-hover': cellColorHover,
|
|
98
|
+
'--n-cell-color-hover-modal': cellColorHoverModal,
|
|
99
|
+
'--n-cell-color-hover-popover': cellColorHoverPopover,
|
|
100
|
+
'--n-bar-color': barColor
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
const themeClassHandle = inlineThemeDisabled
|
|
104
|
+
? (0, _mixins_1.useThemeClass)('calendar', undefined, cssVarsRef, props)
|
|
105
|
+
: undefined;
|
|
77
106
|
return {
|
|
78
107
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
79
108
|
locale: localeRef,
|
|
@@ -89,43 +118,21 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
89
118
|
handlePrevClick,
|
|
90
119
|
handleNextClick,
|
|
91
120
|
mergedTheme: themeRef,
|
|
92
|
-
cssVars:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
96
|
-
'--n-border-color': borderColor,
|
|
97
|
-
'--n-border-color-modal': borderColorModal,
|
|
98
|
-
'--n-border-color-popover': borderColorPopover,
|
|
99
|
-
'--n-border-radius': borderRadius,
|
|
100
|
-
'--n-text-color': textColor,
|
|
101
|
-
'--n-title-font-weight': titleFontWeight,
|
|
102
|
-
'--n-title-font-size': titleFontSize,
|
|
103
|
-
'--n-title-text-color': titleTextColor,
|
|
104
|
-
'--n-day-text-color': dayTextColor,
|
|
105
|
-
'--n-font-size': fontSize,
|
|
106
|
-
'--n-line-height': lineHeight,
|
|
107
|
-
'--n-date-color-current': dateColorCurrent,
|
|
108
|
-
'--n-date-text-color-current': dateTextColorCurrent,
|
|
109
|
-
'--n-cell-color': cellColor,
|
|
110
|
-
'--n-cell-color-modal': cellColorModal,
|
|
111
|
-
'--n-cell-color-popover': cellColorPopover,
|
|
112
|
-
'--n-cell-color-hover': cellColorHover,
|
|
113
|
-
'--n-cell-color-hover-modal': cellColorHoverModal,
|
|
114
|
-
'--n-cell-color-hover-popover': cellColorHoverPopover,
|
|
115
|
-
'--n-bar-color': barColor
|
|
116
|
-
};
|
|
117
|
-
})
|
|
121
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
122
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
123
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
118
124
|
};
|
|
119
125
|
},
|
|
120
126
|
render() {
|
|
121
|
-
const { isDateDisabled, mergedClsPrefix, monthTs, cssVars, mergedValue, mergedTheme, $slots, locale: { monthBeforeYear, today }, dateLocale: { locale }, handleTodayClick, handlePrevClick, handleNextClick } = this;
|
|
127
|
+
const { isDateDisabled, mergedClsPrefix, monthTs, cssVars, mergedValue, mergedTheme, $slots, locale: { monthBeforeYear, today }, dateLocale: { locale }, handleTodayClick, handlePrevClick, handleNextClick, onRender } = this;
|
|
128
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
122
129
|
const normalizedValue = mergedValue && (0, date_fns_1.startOfDay)(mergedValue).valueOf();
|
|
123
130
|
const localeMonth = (0, date_fns_1.format)(monthTs, 'MMMM', { locale });
|
|
124
131
|
const year = (0, date_fns_1.getYear)(monthTs);
|
|
125
132
|
const title = monthBeforeYear
|
|
126
133
|
? `${localeMonth} ${year}`
|
|
127
134
|
: `${year} ${localeMonth}`;
|
|
128
|
-
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-calendar`, style: cssVars },
|
|
135
|
+
return ((0, vue_1.h)("div", { class: [`${mergedClsPrefix}-calendar`, this.themeClass], style: cssVars },
|
|
129
136
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-calendar-header` },
|
|
130
137
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-calendar-header__title` }, title),
|
|
131
138
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-calendar-header__extra` },
|
package/lib/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/lib/card/src/Card.js
CHANGED
|
@@ -50,10 +50,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
50
50
|
if (onClose)
|
|
51
51
|
(0, _utils_1.call)(onClose);
|
|
52
52
|
};
|
|
53
|
-
const { mergedClsPrefixRef,
|
|
54
|
-
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
53
|
+
const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = (0, _mixins_1.useConfig)(props);
|
|
55
54
|
const themeRef = (0, _mixins_1.useTheme)('Card', '-card', index_cssr_1.default, styles_1.cardLight, props, mergedClsPrefixRef);
|
|
56
|
-
const rtlEnabledRef = (0, use_rtl_1.default)('Card',
|
|
55
|
+
const rtlEnabledRef = (0, use_rtl_1.default)('Card', mergedRtlRef, mergedClsPrefixRef);
|
|
57
56
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
58
57
|
const { size } = props;
|
|
59
58
|
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, closeColor, closeColorHover, closeColorPressed, lineHeight, closeSize, boxShadow, colorPopover, colorEmbedded, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
@@ -84,12 +83,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
84
83
|
'--n-close-size': closeSize
|
|
85
84
|
};
|
|
86
85
|
});
|
|
87
|
-
const themeClassHandle =
|
|
86
|
+
const themeClassHandle = inlineThemeDisabled
|
|
88
87
|
? (0, _mixins_1.useThemeClass)('card', (0, vue_1.computed)(() => {
|
|
89
88
|
return props.size[0];
|
|
90
89
|
}), cssVarsRef, props)
|
|
91
|
-
:
|
|
92
|
-
return
|
|
90
|
+
: undefined;
|
|
91
|
+
return {
|
|
92
|
+
rtlEnabled: rtlEnabledRef,
|
|
93
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
94
|
+
mergedTheme: themeRef,
|
|
95
|
+
handleCloseClick,
|
|
96
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
97
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
98
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
99
|
+
};
|
|
93
100
|
},
|
|
94
101
|
render() {
|
|
95
102
|
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, $slots } = this;
|
|
@@ -110,13 +117,17 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
110
117
|
[`${mergedClsPrefix}-card--hoverable`]: hoverable
|
|
111
118
|
}
|
|
112
119
|
], style: this.cssVars, role: this.role },
|
|
113
|
-
$slots.cover
|
|
114
|
-
|
|
115
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
$slots.
|
|
120
|
+
(0, _utils_1.resolveWrappedSlot)($slots.cover, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-cover`, role: "none" }, children))),
|
|
121
|
+
(0, _utils_1.resolveWrappedSlot)($slots.header, (children) => {
|
|
122
|
+
return children || this.title || this.closable ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header`, style: this.headerStyle },
|
|
123
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header__main`, role: "heading" }, children || [this.title]),
|
|
124
|
+
(0, _utils_1.resolveWrappedSlot)($slots['header-extra'], (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header__extra`, style: this.headerExtraStyle }, children))),
|
|
125
|
+
this.closable ? ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-card-header__close`, onClick: this.handleCloseClick })) : null)) : null;
|
|
126
|
+
}),
|
|
127
|
+
(0, _utils_1.resolveWrappedSlot)($slots.default, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card__content`, style: this.contentStyle, role: "none" }, children))),
|
|
128
|
+
(0, _utils_1.resolveWrappedSlot)($slots.footer, (children) => children && [
|
|
129
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card__footer`, style: this.footerStyle, role: "none" }, children)
|
|
130
|
+
]),
|
|
131
|
+
(0, _utils_1.resolveWrappedSlot)($slots.action, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card__action`, role: "none" }, children)))));
|
|
121
132
|
}
|
|
122
133
|
});
|
|
@@ -195,7 +195,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
195
|
'--n-dot-line-width': string;
|
|
196
196
|
'--n-dot-line-width-active': string;
|
|
197
197
|
'--n-arrow-color': string;
|
|
198
|
-
}
|
|
198
|
+
}> | undefined;
|
|
199
|
+
themeClass: Ref<string> | undefined;
|
|
200
|
+
onRender: (() => void) | undefined;
|
|
199
201
|
getCurrentIndex: () => number;
|
|
200
202
|
to: (index: number) => void;
|
|
201
203
|
prev: () => void;
|
|
@@ -64,7 +64,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
64
64
|
name: 'Carousel',
|
|
65
65
|
props: carouselProps,
|
|
66
66
|
setup(props) {
|
|
67
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
67
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
68
68
|
// Dom
|
|
69
69
|
const selfElRef = (0, vue_1.ref)(null);
|
|
70
70
|
const slidesElsRef = (0, vue_1.ref)([]);
|
|
@@ -677,25 +677,30 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
677
677
|
next: next
|
|
678
678
|
};
|
|
679
679
|
const themeRef = (0, _mixins_1.useTheme)('Carousel', '-carousel', index_cssr_1.default, styles_1.carouselLight, props, mergedClsPrefixRef);
|
|
680
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
681
|
+
const { common: { cubicBezierEaseInOut }, self: { dotSize, dotColor, dotColorActive, dotColorFocus, dotLineWidth, dotLineWidthActive, arrowColor } } = themeRef.value;
|
|
682
|
+
return {
|
|
683
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
684
|
+
'--n-dot-color': dotColor,
|
|
685
|
+
'--n-dot-color-focus': dotColorFocus,
|
|
686
|
+
'--n-dot-color-active': dotColorActive,
|
|
687
|
+
'--n-dot-size': dotSize,
|
|
688
|
+
'--n-dot-line-width': dotLineWidth,
|
|
689
|
+
'--n-dot-line-width-active': dotLineWidthActive,
|
|
690
|
+
'--n-arrow-color': arrowColor
|
|
691
|
+
};
|
|
692
|
+
});
|
|
693
|
+
const themeClassHandle = inlineThemeDisabled
|
|
694
|
+
? (0, _mixins_1.useThemeClass)('carousel', undefined, cssVarsRef, props)
|
|
695
|
+
: undefined;
|
|
680
696
|
return Object.assign(Object.assign(Object.assign({ mergedClsPrefix: mergedClsPrefixRef, selfElRef, slideVNodes: slideVNodesRef, duplicatedable: duplicatedableRef, userWantsControl: userWantsControlRef, autoSlideSize: autoSlideSizeRef, displayIndex: displayIndexRef, realIndex: realIndexRef, slideStyles: slideStylesRef, translateStyle: translateStyleRef, handleTouchstart,
|
|
681
697
|
handleTransitionEnd,
|
|
682
698
|
handleMousewheel,
|
|
683
699
|
handleResize,
|
|
684
|
-
handleSlideResize, isActive: isDisplayActive }, caroulseSlotProps), caroulseExposedMethod), { cssVars:
|
|
685
|
-
const { common: { cubicBezierEaseInOut }, self: { dotSize, dotColor, dotColorActive, dotColorFocus, dotLineWidth, dotLineWidthActive, arrowColor } } = themeRef.value;
|
|
686
|
-
return {
|
|
687
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
688
|
-
'--n-dot-color': dotColor,
|
|
689
|
-
'--n-dot-color-focus': dotColorFocus,
|
|
690
|
-
'--n-dot-color-active': dotColorActive,
|
|
691
|
-
'--n-dot-size': dotSize,
|
|
692
|
-
'--n-dot-line-width': dotLineWidth,
|
|
693
|
-
'--n-dot-line-width-active': dotLineWidthActive,
|
|
694
|
-
'--n-arrow-color': arrowColor
|
|
695
|
-
};
|
|
696
|
-
}) });
|
|
700
|
+
handleSlideResize, isActive: isDisplayActive }, caroulseSlotProps), caroulseExposedMethod), { cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
697
701
|
},
|
|
698
702
|
render() {
|
|
703
|
+
var _a;
|
|
699
704
|
const { mergedClsPrefix, showArrow, userWantsControl, draggable, touchable, slideStyles, dotType, dotPlacement, transitionProps = {}, arrowSlotProps, dotSlotProps, $slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot } } = this;
|
|
700
705
|
const children = (defaultSlot && (0, _utils_1.flatten)(defaultSlot())) || [];
|
|
701
706
|
let slides = filterCarouselItem(children);
|
|
@@ -717,7 +722,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
717
722
|
default: () => slide
|
|
718
723
|
})));
|
|
719
724
|
}
|
|
725
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
720
726
|
return ((0, vue_1.h)("div", { ref: "selfElRef", class: [
|
|
727
|
+
this.themeClass,
|
|
721
728
|
`${mergedClsPrefix}-carousel`,
|
|
722
729
|
this.direction === 'vertical' &&
|
|
723
730
|
`${mergedClsPrefix}-carousel--vertical`,
|
|
@@ -735,11 +742,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
735
742
|
: slides))
|
|
736
743
|
}),
|
|
737
744
|
this.showDots &&
|
|
738
|
-
(dotsSlot
|
|
739
|
-
|
|
740
|
-
|
|
745
|
+
(0, _utils_1.resolveSlotWithProps)(dotsSlot, dotSlotProps, () => [
|
|
746
|
+
dotSlotProps.total > 1 && ((0, vue_1.h)(CarouselDots_1.default, { key: dotType + dotPlacement, total: dotSlotProps.total, currentIndex: dotSlotProps.currentIndex, dotType: dotType, trigger: this.trigger, keyboard: this.keyboard }))
|
|
747
|
+
]),
|
|
741
748
|
showArrow &&
|
|
742
|
-
(
|
|
749
|
+
(0, _utils_1.resolveSlotWithProps)(arrowSlot, arrowSlotProps, () => [
|
|
750
|
+
(0, vue_1.h)(CarouselArrow_1.default, null)
|
|
751
|
+
])));
|
|
743
752
|
}
|
|
744
753
|
});
|
|
745
754
|
function filterCarouselItem(vnodes, carouselItems = []) {
|