naive-ui 2.25.0 → 2.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/clear/src/Clear.d.ts +0 -1
- package/es/_internal/clear/src/Clear.js +1 -3
- package/es/_internal/icons/replaceable.d.ts +1 -1
- package/es/_internal/icons/replaceable.js +5 -4
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +13 -1
- package/es/_internal/scrollbar/src/ScrollBar.js +35 -16
- package/es/_internal/select-menu/src/SelectMenu.d.ts +22 -18
- package/es/_internal/select-menu/src/SelectMenu.js +13 -10
- package/es/_internal/selection/src/Selection.d.ts +31 -26
- package/es/_internal/selection/src/Selection.js +79 -68
- package/es/_internal/selection/styles/dark.js +3 -3
- package/es/_internal/selection/styles/light.d.ts +6 -6
- package/es/_internal/selection/styles/light.js +3 -3
- 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 +6 -2
- package/es/_mixins/use-css-vars-class.js +31 -15
- package/es/_mixins/use-form-item.d.ts +1 -1
- package/es/_utils/css/color-to-class.d.ts +1 -0
- package/es/_utils/css/color-to-class.js +3 -0
- package/es/_utils/css/format-length.d.ts +2 -2
- package/es/_utils/css/format-length.js +1 -2
- package/es/_utils/css/index.d.ts +2 -1
- package/es/_utils/css/index.js +2 -1
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/resolve-slot.d.ts +5 -2
- package/es/_utils/vue/resolve-slot.js +4 -4
- package/es/alert/src/Alert.d.ts +7 -5
- package/es/alert/src/Alert.js +36 -21
- package/es/anchor/src/AnchorAdapter.js +9 -3
- package/es/auto-complete/src/AutoComplete.d.ts +4 -2
- 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 +16 -41
- 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 +8 -6
- package/es/button/src/Button.js +20 -21
- package/es/button/styles/index.d.ts +1 -1
- package/es/button/styles/index.js +1 -1
- package/es/button/styles/rtl.d.ts +2 -5
- package/es/button/styles/rtl.js +1 -1
- package/es/calendar/src/Calendar.d.ts +3 -1
- package/es/calendar/src/Calendar.js +37 -30
- package/es/card/src/Card.d.ts +3 -1
- package/es/card/src/Card.js +57 -43
- package/es/card/styles/index.d.ts +1 -1
- package/es/card/styles/index.js +1 -1
- package/es/card/styles/rtl.d.ts +2 -5
- package/es/card/styles/rtl.js +1 -1
- package/es/carousel/src/Carousel.d.ts +3 -1
- package/es/carousel/src/Carousel.js +29 -20
- package/es/cascader/src/Cascader.d.ts +46 -31
- package/es/cascader/src/Cascader.js +53 -31
- package/es/cascader/src/CascaderMenu.d.ts +3 -3
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderOption.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.js +2 -1
- package/es/cascader/src/CascaderSubmenu.d.ts +4 -3
- package/es/cascader/src/interface.d.ts +1 -0
- package/es/cascader/styles/light.d.ts +3 -3
- 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 +17 -17
- 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 +77 -75
- package/es/data-table/src/DataTable.js +54 -48
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/es/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/es/data-table/src/HeaderButton/SortButton.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +7 -6
- package/es/data-table/src/TableParts/Body.js +4 -2
- package/es/data-table/src/TableParts/Cell.d.ts +12 -12
- package/es/data-table/src/TableParts/Header.d.ts +6 -6
- package/es/data-table/src/interface.d.ts +1 -1
- package/es/data-table/src/use-table-data.js +19 -7
- package/es/data-table/styles/light.d.ts +3 -3
- 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 +15 -2
- 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 +7 -5
- package/es/dialog/src/Dialog.js +57 -56
- package/es/dialog/src/DialogEnvironment.d.ts +5 -5
- package/es/dialog/src/DialogEnvironment.js +1 -1
- package/es/dialog/src/DialogProvider.d.ts +2 -2
- package/es/dialog/src/dialogProps.d.ts +2 -2
- package/es/divider/src/Divider.d.ts +3 -1
- package/es/divider/src/Divider.js +20 -11
- package/es/dynamic-input/src/DynamicInput.js +2 -2
- package/es/dynamic-tags/src/DynamicTags.d.ts +7 -5
- 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.d.ts +4 -4
- package/es/form/src/FormItem.js +1 -2
- package/es/form/src/FormItemCol.d.ts +3 -3
- package/es/form/src/FormItemGridItem.d.ts +5 -5
- package/es/form/src/FormItemRow.d.ts +3 -3
- package/es/form/src/utils.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/grid/src/Grid.js +2 -2
- package/es/icon-wrapper/src/IconWrapper.js +6 -6
- package/es/image/src/Image.d.ts +1 -1
- package/es/input/src/Input.d.ts +7 -4
- 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 +7 -18
- package/es/input-number/src/InputNumber.js +79 -20
- package/es/layout/src/Layout.d.ts +8 -2
- package/es/layout/src/Layout.js +17 -10
- package/es/layout/src/LayoutContent.d.ts +4 -1
- package/es/layout/src/LayoutFooter.d.ts +3 -1
- package/es/layout/src/LayoutFooter.js +28 -19
- package/es/layout/src/LayoutHeader.d.ts +3 -1
- package/es/layout/src/LayoutHeader.js +28 -19
- package/es/layout/src/LayoutSider.d.ts +4 -0
- package/es/layout/src/LayoutSider.js +37 -29
- package/es/locales/common/deDE.js +13 -15
- package/es/locales/common/enGB.d.ts +109 -0
- package/es/locales/common/enGB.js +109 -0
- package/es/locales/common/eo.d.ts +109 -0
- package/es/locales/common/eo.js +109 -0
- package/es/locales/common/esAR.js +2 -2
- package/es/locales/common/frFR.js +8 -9
- package/es/locales/common/plPL.d.ts +3 -0
- package/es/locales/common/plPL.js +109 -0
- package/es/locales/common/skSK.d.ts +3 -0
- package/es/locales/common/skSK.js +110 -0
- package/es/locales/date/enGB.d.ts +3 -0
- package/es/locales/date/enGB.js +6 -0
- package/es/locales/date/eo.d.ts +3 -0
- package/es/locales/date/eo.js +6 -0
- package/es/locales/date/plPL.d.ts +3 -0
- package/es/locales/date/plPL.js +6 -0
- package/es/locales/date/skSK.d.ts +3 -0
- package/es/locales/date/skSK.js +6 -0
- package/es/locales/index.d.ts +8 -0
- package/es/locales/index.js +8 -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 +1 -1
- package/es/mention/src/interface.d.ts +4 -0
- package/es/menu/src/Menu.d.ts +4 -2
- package/es/menu/src/Menu.js +68 -63
- package/es/modal/src/BodyWrapper.d.ts +7 -6
- package/es/modal/src/Modal.d.ts +19 -22
- package/es/modal/src/Modal.js +41 -32
- package/es/modal/src/presetProps.d.ts +2 -2
- package/es/notification/src/Notification.d.ts +4 -4
- package/es/notification/src/NotificationEnvironment.d.ts +4 -4
- package/es/notification/src/NotificationProvider.d.ts +1 -1
- 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 +46 -34
- package/es/pagination/src/Pagination.js +59 -52
- package/es/pagination/styles/light.d.ts +3 -3
- package/es/popover/src/PopoverBody.js +10 -4
- package/es/progress/src/Circle.d.ts +19 -3
- package/es/progress/src/Circle.js +41 -22
- package/es/progress/src/Progress.d.ts +14 -5
- package/es/progress/src/Progress.js +45 -25
- package/es/progress/src/styles/index.cssr.js +1 -1
- 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 +8 -6
- 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 +45 -31
- package/es/select/src/Select.js +14 -8
- package/es/select/styles/light.d.ts +3 -3
- package/es/spin/src/Spin.d.ts +3 -1
- package/es/spin/src/Spin.js +31 -21
- package/es/statistic/src/Statistic.d.ts +3 -1
- package/es/statistic/src/Statistic.js +29 -21
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/switch/src/Switch.d.ts +13 -1
- package/es/switch/src/Switch.js +85 -60
- package/es/switch/src/styles/index.cssr.js +21 -8
- package/es/switch/styles/dark.js +2 -2
- package/es/switch/styles/light.d.ts +1 -0
- package/es/switch/styles/light.js +2 -2
- package/es/table/src/Table.d.ts +3 -1
- package/es/table/src/Table.js +40 -29
- package/es/table/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/Tabs.d.ts +25 -23
- package/es/tabs/src/Tabs.js +50 -44
- package/es/tabs/src/styles/index.cssr.js +77 -77
- package/es/tag/src/Tag.d.ts +7 -5
- package/es/tag/src/Tag.js +59 -42
- package/es/tag/src/common-props.d.ts +1 -1
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/tag/styles/index.d.ts +1 -1
- package/es/tag/styles/index.js +1 -1
- package/es/tag/styles/rtl.d.ts +2 -5
- package/es/tag/styles/rtl.js +1 -1
- 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/timeline/src/TimelineItem.d.ts +4 -4
- 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/src/utils.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +43 -30
- package/es/tree-select/src/TreeSelect.js +6 -2
- package/es/tree-select/styles/light.d.ts +3 -3
- 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 +7 -5
- package/es/typography/src/create-header.js +25 -16
- package/es/typography/src/headers.d.ts +36 -24
- 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/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadProgress.d.ts +2 -2
- 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 -18
- package/lib/_internal/select-menu/src/SelectMenu.js +12 -9
- package/lib/_internal/selection/src/Selection.d.ts +31 -26
- package/lib/_internal/selection/src/Selection.js +78 -67
- package/lib/_internal/selection/styles/dark.js +3 -3
- package/lib/_internal/selection/styles/light.d.ts +6 -6
- package/lib/_internal/selection/styles/light.js +3 -3
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +2 -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 +6 -2
- package/lib/_mixins/use-css-vars-class.js +33 -17
- package/lib/_mixins/use-form-item.d.ts +1 -1
- package/lib/_utils/css/color-to-class.d.ts +1 -0
- package/lib/_utils/css/color-to-class.js +7 -0
- package/lib/_utils/css/format-length.d.ts +2 -2
- package/lib/_utils/css/format-length.js +2 -1
- package/lib/_utils/css/index.d.ts +2 -1
- package/lib/_utils/css/index.js +4 -5
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/vue/resolve-slot.d.ts +5 -2
- package/lib/_utils/vue/resolve-slot.js +4 -4
- package/lib/alert/src/Alert.d.ts +7 -5
- package/lib/alert/src/Alert.js +34 -19
- package/lib/anchor/src/AnchorAdapter.js +8 -2
- package/lib/auto-complete/src/AutoComplete.d.ts +4 -2
- 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 +16 -41
- 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 +8 -6
- package/lib/button/src/Button.js +18 -19
- package/lib/button/styles/index.d.ts +1 -1
- package/lib/button/styles/index.js +1 -1
- package/lib/button/styles/rtl.d.ts +2 -5
- package/lib/button/styles/rtl.js +2 -1
- package/lib/calendar/src/Calendar.d.ts +3 -1
- package/lib/calendar/src/Calendar.js +36 -29
- package/lib/card/src/Card.d.ts +3 -1
- package/lib/card/src/Card.js +55 -41
- package/lib/card/styles/index.d.ts +1 -1
- package/lib/card/styles/index.js +1 -1
- package/lib/card/styles/rtl.d.ts +2 -5
- package/lib/card/styles/rtl.js +2 -1
- package/lib/carousel/src/Carousel.d.ts +3 -1
- package/lib/carousel/src/Carousel.js +27 -18
- package/lib/cascader/src/Cascader.d.ts +46 -31
- package/lib/cascader/src/Cascader.js +52 -30
- package/lib/cascader/src/CascaderMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderOption.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.js +2 -1
- package/lib/cascader/src/CascaderSubmenu.d.ts +4 -3
- package/lib/cascader/src/interface.d.ts +1 -0
- package/lib/cascader/styles/light.d.ts +3 -3
- 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 +17 -17
- 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 +77 -75
- package/lib/data-table/src/DataTable.js +53 -47
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/FilterButton.js +3 -2
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/SortButton.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +7 -6
- package/lib/data-table/src/TableParts/Body.js +3 -1
- package/lib/data-table/src/TableParts/Cell.d.ts +12 -12
- package/lib/data-table/src/TableParts/Header.d.ts +6 -6
- package/lib/data-table/src/interface.d.ts +1 -1
- package/lib/data-table/src/use-table-data.js +19 -7
- package/lib/data-table/styles/light.d.ts +3 -3
- 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 +15 -2
- 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 +7 -5
- package/lib/dialog/src/Dialog.js +55 -54
- package/lib/dialog/src/DialogEnvironment.d.ts +5 -5
- package/lib/dialog/src/DialogEnvironment.js +1 -1
- package/lib/dialog/src/DialogProvider.d.ts +2 -2
- package/lib/dialog/src/dialogProps.d.ts +2 -2
- package/lib/divider/src/Divider.d.ts +3 -1
- package/lib/divider/src/Divider.js +19 -10
- package/lib/dynamic-input/src/DynamicInput.js +2 -2
- package/lib/dynamic-tags/src/DynamicTags.d.ts +7 -5
- 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.d.ts +4 -4
- package/lib/form/src/FormItem.js +1 -2
- package/lib/form/src/FormItemCol.d.ts +3 -3
- package/lib/form/src/FormItemGridItem.d.ts +5 -5
- package/lib/form/src/FormItemRow.d.ts +3 -3
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/grid/src/Grid.js +2 -2
- package/lib/icon-wrapper/src/IconWrapper.js +5 -5
- package/lib/image/src/Image.d.ts +1 -1
- package/lib/input/src/Input.d.ts +7 -4
- 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 +7 -18
- package/lib/input-number/src/InputNumber.js +76 -17
- package/lib/layout/src/Layout.d.ts +8 -2
- package/lib/layout/src/Layout.js +16 -9
- package/lib/layout/src/LayoutContent.d.ts +4 -1
- package/lib/layout/src/LayoutFooter.d.ts +3 -1
- package/lib/layout/src/LayoutFooter.js +27 -18
- package/lib/layout/src/LayoutHeader.d.ts +3 -1
- package/lib/layout/src/LayoutHeader.js +27 -18
- package/lib/layout/src/LayoutSider.d.ts +4 -0
- package/lib/layout/src/LayoutSider.js +36 -28
- package/lib/locales/common/deDE.js +13 -15
- package/lib/locales/common/enGB.d.ts +109 -0
- package/lib/locales/common/enGB.js +111 -0
- package/lib/locales/common/eo.d.ts +109 -0
- package/lib/locales/common/eo.js +111 -0
- package/lib/locales/common/esAR.js +2 -2
- package/lib/locales/common/frFR.js +8 -9
- package/lib/locales/common/plPL.d.ts +3 -0
- package/lib/locales/common/plPL.js +111 -0
- package/lib/locales/common/skSK.d.ts +3 -0
- package/lib/locales/common/skSK.js +112 -0
- package/lib/locales/date/enGB.d.ts +3 -0
- package/lib/locales/date/enGB.js +11 -0
- package/lib/locales/date/eo.d.ts +3 -0
- package/lib/locales/date/eo.js +11 -0
- package/lib/locales/date/plPL.d.ts +3 -0
- package/lib/locales/date/plPL.js +11 -0
- package/lib/locales/date/skSK.d.ts +3 -0
- package/lib/locales/date/skSK.js +11 -0
- package/lib/locales/index.d.ts +8 -0
- package/lib/locales/index.js +17 -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 +1 -1
- package/lib/mention/src/interface.d.ts +4 -0
- package/lib/menu/src/Menu.d.ts +4 -2
- package/lib/menu/src/Menu.js +67 -62
- package/lib/modal/src/BodyWrapper.d.ts +7 -6
- package/lib/modal/src/Modal.d.ts +19 -22
- package/lib/modal/src/Modal.js +40 -31
- package/lib/modal/src/presetProps.d.ts +2 -2
- package/lib/notification/src/Notification.d.ts +4 -4
- package/lib/notification/src/NotificationEnvironment.d.ts +4 -4
- package/lib/notification/src/NotificationProvider.d.ts +1 -1
- 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 +46 -34
- package/lib/pagination/src/Pagination.js +58 -51
- package/lib/pagination/styles/light.d.ts +3 -3
- package/lib/popover/src/PopoverBody.js +9 -3
- package/lib/progress/src/Circle.d.ts +19 -3
- package/lib/progress/src/Circle.js +40 -21
- package/lib/progress/src/Progress.d.ts +14 -5
- package/lib/progress/src/Progress.js +44 -24
- package/lib/progress/src/styles/index.cssr.js +1 -1
- 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 +8 -6
- 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 +45 -31
- package/lib/select/src/Select.js +14 -8
- package/lib/select/styles/light.d.ts +3 -3
- package/lib/spin/src/Spin.d.ts +3 -1
- package/lib/spin/src/Spin.js +30 -20
- package/lib/statistic/src/Statistic.d.ts +3 -1
- package/lib/statistic/src/Statistic.js +28 -20
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +9 -7
- package/lib/switch/src/Switch.d.ts +13 -1
- package/lib/switch/src/Switch.js +81 -56
- package/lib/switch/src/styles/index.cssr.js +21 -8
- package/lib/switch/styles/dark.js +2 -2
- package/lib/switch/styles/light.d.ts +1 -0
- package/lib/switch/styles/light.js +2 -2
- package/lib/table/src/Table.d.ts +3 -1
- package/lib/table/src/Table.js +39 -28
- package/lib/table/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/Tabs.d.ts +25 -23
- package/lib/tabs/src/Tabs.js +48 -42
- package/lib/tabs/src/styles/index.cssr.js +77 -77
- package/lib/tag/src/Tag.d.ts +7 -5
- package/lib/tag/src/Tag.js +57 -40
- package/lib/tag/src/common-props.d.ts +1 -1
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/tag/styles/index.d.ts +1 -1
- package/lib/tag/styles/index.js +1 -1
- package/lib/tag/styles/rtl.d.ts +2 -5
- package/lib/tag/styles/rtl.js +2 -1
- 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/timeline/src/TimelineItem.d.ts +4 -4
- 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/src/utils.js +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +43 -30
- package/lib/tree-select/src/TreeSelect.js +6 -2
- package/lib/tree-select/styles/light.d.ts +3 -3
- 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 +7 -5
- package/lib/typography/src/create-header.js +24 -15
- package/lib/typography/src/headers.d.ts +36 -24
- 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/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadProgress.d.ts +2 -2
- 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 +9 -10
- package/volar.d.ts +1 -0
- package/web-types.json +279 -29
|
@@ -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
|
@@ -440,7 +440,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
440
440
|
'--n-font-size': string;
|
|
441
441
|
'--n-title-font-size': string;
|
|
442
442
|
'--n-close-size': string;
|
|
443
|
-
}
|
|
443
|
+
}> | undefined;
|
|
444
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
445
|
+
onRender: (() => void) | undefined;
|
|
444
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<{
|
|
445
447
|
title: StringConstructor;
|
|
446
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 { useConfig, useTheme } from '../../_mixins';
|
|
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,50 +44,60 @@ export default defineComponent({
|
|
|
44
44
|
if (onClose)
|
|
45
45
|
call(onClose);
|
|
46
46
|
};
|
|
47
|
-
const { mergedClsPrefixRef,
|
|
47
|
+
const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = useConfig(props);
|
|
48
48
|
const themeRef = useTheme('Card', '-card', style, cardLight, props, mergedClsPrefixRef);
|
|
49
|
-
const rtlEnabledRef = useRtl('Card',
|
|
49
|
+
const rtlEnabledRef = useRtl('Card', mergedRtlRef, mergedClsPrefixRef);
|
|
50
|
+
const cssVarsRef = computed(() => {
|
|
51
|
+
const { size } = props;
|
|
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;
|
|
53
|
+
const { top: paddingTop, left: paddingLeft, bottom: paddingBottom } = getPadding(padding);
|
|
54
|
+
return {
|
|
55
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
56
|
+
'--n-border-radius': borderRadius,
|
|
57
|
+
'--n-color': props.embedded ? colorEmbedded : color,
|
|
58
|
+
'--n-color-modal': colorModal,
|
|
59
|
+
'--n-color-popover': colorPopover,
|
|
60
|
+
'--n-color-target': colorTarget,
|
|
61
|
+
'--n-text-color': textColor,
|
|
62
|
+
'--n-line-height': lineHeight,
|
|
63
|
+
'--n-action-color': actionColor,
|
|
64
|
+
'--n-title-text-color': titleTextColor,
|
|
65
|
+
'--n-title-font-weight': titleFontWeight,
|
|
66
|
+
'--n-close-color': closeColor,
|
|
67
|
+
'--n-close-color-hover': closeColorHover,
|
|
68
|
+
'--n-close-color-pressed': closeColorPressed,
|
|
69
|
+
'--n-border-color': borderColor,
|
|
70
|
+
'--n-box-shadow': boxShadow,
|
|
71
|
+
// size
|
|
72
|
+
'--n-padding-top': paddingTop,
|
|
73
|
+
'--n-padding-bottom': paddingBottom,
|
|
74
|
+
'--n-padding-left': paddingLeft,
|
|
75
|
+
'--n-font-size': fontSize,
|
|
76
|
+
'--n-title-font-size': titleFontSize,
|
|
77
|
+
'--n-close-size': closeSize
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
const themeClassHandle = inlineThemeDisabled
|
|
81
|
+
? useThemeClass('card', computed(() => {
|
|
82
|
+
return props.size[0];
|
|
83
|
+
}), cssVarsRef, props)
|
|
84
|
+
: undefined;
|
|
50
85
|
return {
|
|
51
86
|
rtlEnabled: rtlEnabledRef,
|
|
52
87
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
53
88
|
mergedTheme: themeRef,
|
|
54
89
|
handleCloseClick,
|
|
55
|
-
cssVars:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const { top: paddingTop, left: paddingLeft, bottom: paddingBottom } = getPadding(padding);
|
|
59
|
-
return {
|
|
60
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
61
|
-
'--n-border-radius': borderRadius,
|
|
62
|
-
'--n-color': props.embedded ? colorEmbedded : color,
|
|
63
|
-
'--n-color-modal': colorModal,
|
|
64
|
-
'--n-color-popover': colorPopover,
|
|
65
|
-
'--n-color-target': colorTarget,
|
|
66
|
-
'--n-text-color': textColor,
|
|
67
|
-
'--n-line-height': lineHeight,
|
|
68
|
-
'--n-action-color': actionColor,
|
|
69
|
-
'--n-title-text-color': titleTextColor,
|
|
70
|
-
'--n-title-font-weight': titleFontWeight,
|
|
71
|
-
'--n-close-color': closeColor,
|
|
72
|
-
'--n-close-color-hover': closeColorHover,
|
|
73
|
-
'--n-close-color-pressed': closeColorPressed,
|
|
74
|
-
'--n-border-color': borderColor,
|
|
75
|
-
'--n-box-shadow': boxShadow,
|
|
76
|
-
// size
|
|
77
|
-
'--n-padding-top': paddingTop,
|
|
78
|
-
'--n-padding-bottom': paddingBottom,
|
|
79
|
-
'--n-padding-left': paddingLeft,
|
|
80
|
-
'--n-font-size': fontSize,
|
|
81
|
-
'--n-title-font-size': titleFontSize,
|
|
82
|
-
'--n-close-size': closeSize
|
|
83
|
-
};
|
|
84
|
-
})
|
|
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
|
|
85
93
|
};
|
|
86
94
|
},
|
|
87
95
|
render() {
|
|
88
|
-
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, $slots } = this;
|
|
96
|
+
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, $slots } = this;
|
|
97
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
89
98
|
return (h("div", { class: [
|
|
90
99
|
`${mergedClsPrefix}-card`,
|
|
100
|
+
this.themeClass,
|
|
91
101
|
{
|
|
92
102
|
[`${mergedClsPrefix}-card--rtl`]: rtlEnabled,
|
|
93
103
|
[`${mergedClsPrefix}-card--content${typeof segmented !== 'boolean' && segmented.content === 'soft'
|
|
@@ -101,13 +111,17 @@ export default defineComponent({
|
|
|
101
111
|
[`${mergedClsPrefix}-card--hoverable`]: hoverable
|
|
102
112
|
}
|
|
103
113
|
], style: this.cssVars, role: this.role },
|
|
104
|
-
$slots.cover
|
|
105
|
-
$slots.header
|
|
106
|
-
h("div", { class: `${mergedClsPrefix}-card-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
$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)))));
|
|
112
126
|
}
|
|
113
127
|
});
|
package/es/card/styles/index.js
CHANGED
package/es/card/styles/rtl.d.ts
CHANGED
package/es/card/styles/rtl.js
CHANGED
|
@@ -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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, defineComponent, ref, provide, cloneVNode, computed, onBeforeUnmount, watch, withDirectives, vShow, Transition, toRef, nextTick, onMounted, watchEffect, onUpdated } from 'vue';
|
|
2
2
|
import { VResizeObserver } from 'vueuc';
|
|
3
3
|
import { on, off } from 'evtd';
|
|
4
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
5
|
-
import { flatten, keep } from '../../_utils';
|
|
4
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
5
|
+
import { flatten, keep, resolveSlotWithProps } from '../../_utils';
|
|
6
6
|
import { carouselLight } from '../styles';
|
|
7
7
|
import { calculateSize, getNextIndex, getPrevIndex, getDisplayIndex, getRealIndex, isTouchEvent, clampValue, resolveSpeed } from './utils';
|
|
8
8
|
import NCarouselDots from './CarouselDots';
|
|
@@ -59,7 +59,7 @@ export default defineComponent({
|
|
|
59
59
|
name: 'Carousel',
|
|
60
60
|
props: carouselProps,
|
|
61
61
|
setup(props) {
|
|
62
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
62
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
63
63
|
// Dom
|
|
64
64
|
const selfElRef = ref(null);
|
|
65
65
|
const slidesElsRef = ref([]);
|
|
@@ -672,25 +672,30 @@ export default defineComponent({
|
|
|
672
672
|
next: next
|
|
673
673
|
};
|
|
674
674
|
const themeRef = useTheme('Carousel', '-carousel', style, carouselLight, props, mergedClsPrefixRef);
|
|
675
|
+
const cssVarsRef = computed(() => {
|
|
676
|
+
const { common: { cubicBezierEaseInOut }, self: { dotSize, dotColor, dotColorActive, dotColorFocus, dotLineWidth, dotLineWidthActive, arrowColor } } = themeRef.value;
|
|
677
|
+
return {
|
|
678
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
679
|
+
'--n-dot-color': dotColor,
|
|
680
|
+
'--n-dot-color-focus': dotColorFocus,
|
|
681
|
+
'--n-dot-color-active': dotColorActive,
|
|
682
|
+
'--n-dot-size': dotSize,
|
|
683
|
+
'--n-dot-line-width': dotLineWidth,
|
|
684
|
+
'--n-dot-line-width-active': dotLineWidthActive,
|
|
685
|
+
'--n-arrow-color': arrowColor
|
|
686
|
+
};
|
|
687
|
+
});
|
|
688
|
+
const themeClassHandle = inlineThemeDisabled
|
|
689
|
+
? useThemeClass('carousel', undefined, cssVarsRef, props)
|
|
690
|
+
: undefined;
|
|
675
691
|
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,
|
|
676
692
|
handleTransitionEnd,
|
|
677
693
|
handleMousewheel,
|
|
678
694
|
handleResize,
|
|
679
|
-
handleSlideResize, isActive: isDisplayActive }, caroulseSlotProps), caroulseExposedMethod), { cssVars:
|
|
680
|
-
const { common: { cubicBezierEaseInOut }, self: { dotSize, dotColor, dotColorActive, dotColorFocus, dotLineWidth, dotLineWidthActive, arrowColor } } = themeRef.value;
|
|
681
|
-
return {
|
|
682
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
683
|
-
'--n-dot-color': dotColor,
|
|
684
|
-
'--n-dot-color-focus': dotColorFocus,
|
|
685
|
-
'--n-dot-color-active': dotColorActive,
|
|
686
|
-
'--n-dot-size': dotSize,
|
|
687
|
-
'--n-dot-line-width': dotLineWidth,
|
|
688
|
-
'--n-dot-line-width-active': dotLineWidthActive,
|
|
689
|
-
'--n-arrow-color': arrowColor
|
|
690
|
-
};
|
|
691
|
-
}) });
|
|
695
|
+
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 });
|
|
692
696
|
},
|
|
693
697
|
render() {
|
|
698
|
+
var _a;
|
|
694
699
|
const { mergedClsPrefix, showArrow, userWantsControl, draggable, touchable, slideStyles, dotType, dotPlacement, transitionProps = {}, arrowSlotProps, dotSlotProps, $slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot } } = this;
|
|
695
700
|
const children = (defaultSlot && flatten(defaultSlot())) || [];
|
|
696
701
|
let slides = filterCarouselItem(children);
|
|
@@ -712,7 +717,9 @@ export default defineComponent({
|
|
|
712
717
|
default: () => slide
|
|
713
718
|
})));
|
|
714
719
|
}
|
|
720
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
715
721
|
return (h("div", { ref: "selfElRef", class: [
|
|
722
|
+
this.themeClass,
|
|
716
723
|
`${mergedClsPrefix}-carousel`,
|
|
717
724
|
this.direction === 'vertical' &&
|
|
718
725
|
`${mergedClsPrefix}-carousel--vertical`,
|
|
@@ -730,11 +737,13 @@ export default defineComponent({
|
|
|
730
737
|
: slides))
|
|
731
738
|
}),
|
|
732
739
|
this.showDots &&
|
|
733
|
-
(dotsSlot
|
|
734
|
-
|
|
735
|
-
|
|
740
|
+
resolveSlotWithProps(dotsSlot, dotSlotProps, () => [
|
|
741
|
+
dotSlotProps.total > 1 && (h(NCarouselDots, { key: dotType + dotPlacement, total: dotSlotProps.total, currentIndex: dotSlotProps.currentIndex, dotType: dotType, trigger: this.trigger, keyboard: this.keyboard }))
|
|
742
|
+
]),
|
|
736
743
|
showArrow &&
|
|
737
|
-
(arrowSlot
|
|
744
|
+
resolveSlotWithProps(arrowSlot, arrowSlotProps, () => [
|
|
745
|
+
h(NCarouselArrow, null)
|
|
746
|
+
])));
|
|
738
747
|
}
|
|
739
748
|
});
|
|
740
749
|
function filterCarouselItem(vnodes, carouselItems = []) {
|