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
|
@@ -13,25 +13,32 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
13
13
|
alias: ['El'],
|
|
14
14
|
props: elementProps,
|
|
15
15
|
setup(props) {
|
|
16
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
16
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
17
17
|
const themeRef = (0, _mixins_1.useTheme)('Element', '-element', undefined, styles_1.elementLight, props, mergedClsPrefixRef);
|
|
18
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
19
|
+
const { common } = themeRef.value;
|
|
20
|
+
return Object.keys(common).reduce((prevValue, key) => {
|
|
21
|
+
prevValue[`--${(0, lodash_1.kebabCase)(key)}`] = common[key];
|
|
22
|
+
return prevValue;
|
|
23
|
+
}, {});
|
|
24
|
+
});
|
|
25
|
+
const themeClassHandle = inlineThemeDisabled
|
|
26
|
+
? (0, _mixins_1.useThemeClass)('element', undefined, cssVarsRef, props)
|
|
27
|
+
: undefined;
|
|
18
28
|
return {
|
|
19
29
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
20
|
-
cssVars:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
prevValue[`--${(0, lodash_1.kebabCase)(key)}`] = common[key];
|
|
24
|
-
return prevValue;
|
|
25
|
-
}, {});
|
|
26
|
-
})
|
|
30
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
31
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
32
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
27
33
|
};
|
|
28
34
|
},
|
|
29
35
|
render() {
|
|
30
36
|
var _a;
|
|
31
|
-
const { tag, mergedClsPrefix, cssVars, $slots } = this;
|
|
37
|
+
const { tag, mergedClsPrefix, cssVars, themeClass, onRender, $slots } = this;
|
|
38
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
32
39
|
return (0, vue_1.h)(tag, {
|
|
33
40
|
role: 'none',
|
|
34
|
-
class: `${mergedClsPrefix}-element`,
|
|
41
|
+
class: [`${mergedClsPrefix}-element`, themeClass],
|
|
35
42
|
style: cssVars
|
|
36
43
|
}, (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots));
|
|
37
44
|
}
|
package/lib/empty/src/Empty.d.ts
CHANGED
|
@@ -121,7 +121,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
121
121
|
'--n-text-color': string;
|
|
122
122
|
'--n-icon-color': string;
|
|
123
123
|
'--n-extra-text-color': string;
|
|
124
|
-
}
|
|
124
|
+
}> | undefined;
|
|
125
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
126
|
+
onRender: (() => void) | undefined;
|
|
125
127
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
126
128
|
description: StringConstructor;
|
|
127
129
|
showDescription: {
|
package/lib/empty/src/Empty.js
CHANGED
|
@@ -25,7 +25,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
25
25
|
name: 'Empty',
|
|
26
26
|
props: emptyProps,
|
|
27
27
|
setup(props) {
|
|
28
|
-
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
28
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
29
29
|
const themeRef = (0, _mixins_1.useTheme)('Empty', '-empty', index_cssr_1.default, styles_1.emptyLight, props, mergedClsPrefixRef);
|
|
30
30
|
const { localeRef } = (0, _mixins_1.useLocale)('Empty');
|
|
31
31
|
const NConfigProvider = (0, vue_1.inject)(context_1.configProviderInjectionKey, null);
|
|
@@ -38,29 +38,41 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
38
38
|
return ((_b = (_a = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef.value) === null || _a === void 0 ? void 0 : _a.Empty) === null || _b === void 0 ? void 0 : _b.renderIcon) ||
|
|
39
39
|
(() => (0, vue_1.h)(icons_1.EmptyIcon, null));
|
|
40
40
|
});
|
|
41
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
42
|
+
const { size } = props;
|
|
43
|
+
const { common: { cubicBezierEaseInOut }, self: { [(0, _utils_1.createKey)('iconSize', size)]: iconSize, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, textColor, iconColor, extraTextColor } } = themeRef.value;
|
|
44
|
+
return {
|
|
45
|
+
'--n-icon-size': iconSize,
|
|
46
|
+
'--n-font-size': fontSize,
|
|
47
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
48
|
+
'--n-text-color': textColor,
|
|
49
|
+
'--n-icon-color': iconColor,
|
|
50
|
+
'--n-extra-text-color': extraTextColor
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const themeClassHandle = inlineThemeDisabled
|
|
54
|
+
? (0, _mixins_1.useThemeClass)('empty', (0, vue_1.computed)(() => {
|
|
55
|
+
let hash = '';
|
|
56
|
+
const { size } = props;
|
|
57
|
+
hash += size[0];
|
|
58
|
+
return hash;
|
|
59
|
+
}), cssVarsRef, props)
|
|
60
|
+
: undefined;
|
|
41
61
|
return {
|
|
42
62
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
43
63
|
mergedRenderIcon: mergedRenderIconRef,
|
|
44
64
|
localizedDescription: (0, vue_1.computed)(() => {
|
|
45
65
|
return mergedDescriptionRef.value || localeRef.value.description;
|
|
46
66
|
}),
|
|
47
|
-
cssVars:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
'--n-icon-size': iconSize,
|
|
52
|
-
'--n-font-size': fontSize,
|
|
53
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
54
|
-
'--n-text-color': textColor,
|
|
55
|
-
'--n-icon-color': iconColor,
|
|
56
|
-
'--n-extra-text-color': extraTextColor
|
|
57
|
-
};
|
|
58
|
-
})
|
|
67
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
68
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
69
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
59
70
|
};
|
|
60
71
|
},
|
|
61
72
|
render() {
|
|
62
|
-
const { $slots, mergedClsPrefix } = this;
|
|
63
|
-
|
|
73
|
+
const { $slots, mergedClsPrefix, onRender } = this;
|
|
74
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
75
|
+
return ((0, vue_1.h)("div", { class: [`${mergedClsPrefix}-empty`, this.themeClass], style: this.cssVars },
|
|
64
76
|
this.showIcon ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-empty__icon` }, $slots.icon ? ($slots.icon()) : ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: mergedClsPrefix }, { default: this.mergedRenderIcon })))) : null,
|
|
65
77
|
this.showDescription ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-empty__description` }, $slots.default ? $slots.default() : this.localizedDescription)) : null,
|
|
66
78
|
$slots.extra ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-empty__extra` }, $slots.extra())) : null));
|
package/lib/form/src/FormItem.js
CHANGED
|
@@ -167,8 +167,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
167
167
|
options.first = props.first;
|
|
168
168
|
}
|
|
169
169
|
const { value: rules } = mergedRulesRef;
|
|
170
|
-
|
|
171
|
-
const value = NForm ? (0, lodash_1.get)(NForm.props.model, path, null) : undefined;
|
|
170
|
+
const value = NForm ? (0, lodash_1.get)(NForm.props.model, path || '') : undefined;
|
|
172
171
|
const activeRules = (!trigger
|
|
173
172
|
? rules
|
|
174
173
|
: rules.filter((rule) => {
|
package/lib/grid/src/Grid.js
CHANGED
|
@@ -40,10 +40,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
40
40
|
inheritAttrs: false,
|
|
41
41
|
props: gridProps,
|
|
42
42
|
setup(props) {
|
|
43
|
-
const { mergedClsPrefixRef,
|
|
43
|
+
const { mergedClsPrefixRef, mergedBreakpointsRef } = (0, _mixins_1.useConfig)(props);
|
|
44
44
|
const numRegex = /^\d+$/;
|
|
45
45
|
const widthRef = (0, vue_1.ref)(undefined);
|
|
46
|
-
const breakpointsRef = (0, vooks_1.useBreakpoints)((
|
|
46
|
+
const breakpointsRef = (0, vooks_1.useBreakpoints)((mergedBreakpointsRef === null || mergedBreakpointsRef === void 0 ? void 0 : mergedBreakpointsRef.value) || config_1.defaultBreakpoints);
|
|
47
47
|
const isResponsiveRef = (0, vooks_1.useMemo)(() => {
|
|
48
48
|
if (props.itemResponsive)
|
|
49
49
|
return true;
|
|
@@ -21,8 +21,7 @@ exports.NIconWrapper = (0, vue_1.defineComponent)({
|
|
|
21
21
|
props: iconWrapperProps,
|
|
22
22
|
setup(props, { slots }) {
|
|
23
23
|
const themeRef = (0, _mixins_1.useTheme)('IconWrapper', '-icon-wrapper', index_cssr_1.default, styles_1.iconWrapperLight, props);
|
|
24
|
-
const { mergedClsPrefixRef,
|
|
25
|
-
const { disableInlineTheme } = NConfigProvider || {};
|
|
24
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
26
25
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
27
26
|
const { common: { cubicBezierEaseInOut }, self: { color, iconColor } } = themeRef.value;
|
|
28
27
|
return {
|
|
@@ -31,16 +30,15 @@ exports.NIconWrapper = (0, vue_1.defineComponent)({
|
|
|
31
30
|
'--n-icon-color': iconColor
|
|
32
31
|
};
|
|
33
32
|
});
|
|
34
|
-
const themeClassHandle =
|
|
33
|
+
const themeClassHandle = inlineThemeDisabled
|
|
35
34
|
? (0, _mixins_1.useThemeClass)('icon-wrapper', undefined, cssVarsRef, props)
|
|
36
|
-
:
|
|
35
|
+
: undefined;
|
|
37
36
|
return () => {
|
|
38
|
-
var _a, _b;
|
|
39
37
|
const size = (0, _utils_1.formatLength)(props.size);
|
|
40
|
-
|
|
38
|
+
themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender();
|
|
41
39
|
return ((0, vue_1.h)("div", { class: [
|
|
42
40
|
`${mergedClsPrefixRef.value}-icon-wrapper`,
|
|
43
|
-
|
|
41
|
+
themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value
|
|
44
42
|
], style: [
|
|
45
43
|
cssVarsRef === null || cssVarsRef === void 0 ? void 0 : cssVarsRef.value,
|
|
46
44
|
{
|
package/lib/input/src/Input.d.ts
CHANGED
|
@@ -552,6 +552,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
552
552
|
containerScrollTop: number;
|
|
553
553
|
syncUnifiedContainer: () => void;
|
|
554
554
|
scrollTo: import("../../_internal/scrollbar/src/ScrollBar").ScrollTo;
|
|
555
|
+
scrollBy: import("../../_internal/scrollbar/src/ScrollBar").ScrollBy;
|
|
555
556
|
sync: () => void;
|
|
556
557
|
handleMouseEnterWrapper: () => void;
|
|
557
558
|
handleMouseLeaveWrapper: () => void;
|
|
@@ -633,8 +634,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
633
634
|
iconColorDisabled: string;
|
|
634
635
|
opacity1: string;
|
|
635
636
|
opacity2: string;
|
|
636
|
-
opacity3: string;
|
|
637
|
-
opacity4: string;
|
|
637
|
+
opacity3: string;
|
|
638
|
+
opacity4: string; /** private */
|
|
638
639
|
opacity5: string;
|
|
639
640
|
dividerColor: string;
|
|
640
641
|
borderColor: string;
|
|
@@ -814,7 +815,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
814
815
|
'--n-icon-color-pressed': string;
|
|
815
816
|
'--n-icon-color-disabled': string;
|
|
816
817
|
'--n-suffix-text-color': string;
|
|
817
|
-
}
|
|
818
|
+
}> | undefined;
|
|
819
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
820
|
+
onRender: (() => void) | undefined;
|
|
818
821
|
isCompositing: import("vue").Ref<boolean>;
|
|
819
822
|
blur: () => void;
|
|
820
823
|
focus: () => void;
|
package/lib/input/src/Input.js
CHANGED
|
@@ -66,7 +66,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const { mergedClsPrefixRef, mergedBorderedRef } = (0, _mixins_1.useConfig)(props);
|
|
69
|
+
const { mergedClsPrefixRef, mergedBorderedRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
70
70
|
const themeRef = (0, _mixins_1.useTheme)('Input', '-input', input_cssr_1.default, styles_1.inputLight, props, mergedClsPrefixRef);
|
|
71
71
|
// dom refs
|
|
72
72
|
const wrapperElRef = (0, vue_1.ref)(null);
|
|
@@ -633,6 +633,69 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
633
633
|
deactivate,
|
|
634
634
|
activate
|
|
635
635
|
};
|
|
636
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
637
|
+
const { value: size } = mergedSizeRef;
|
|
638
|
+
const { common: { cubicBezierEaseInOut }, self: { color, borderRadius, textColor, caretColor, caretColorError, caretColorWarning, textDecorationColor, border, borderDisabled, borderHover, borderFocus, placeholderColor, placeholderColorDisabled, lineHeightTextarea, colorDisabled, colorFocus, textColorDisabled, boxShadowFocus, iconSize, colorFocusWarning, boxShadowFocusWarning, borderWarning, borderFocusWarning, borderHoverWarning, colorFocusError, boxShadowFocusError, borderError, borderFocusError, borderHoverError, clearSize, clearColor, clearColorHover, clearColorPressed, iconColor, iconColorDisabled, suffixTextColor, countTextColor, iconColorHover, iconColorPressed, loadingColor, loadingColorError, loadingColorWarning, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('height', size)]: height } } = themeRef.value;
|
|
639
|
+
const { left: paddingLeft, right: paddingRight } = (0, seemly_1.getPadding)(padding);
|
|
640
|
+
return {
|
|
641
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
642
|
+
'--n-count-text-color': countTextColor,
|
|
643
|
+
'--n-color': color,
|
|
644
|
+
'--n-font-size': fontSize,
|
|
645
|
+
'--n-border-radius': borderRadius,
|
|
646
|
+
'--n-height': height,
|
|
647
|
+
'--n-padding-left': paddingLeft,
|
|
648
|
+
'--n-padding-right': paddingRight,
|
|
649
|
+
'--n-text-color': textColor,
|
|
650
|
+
'--n-caret-color': caretColor,
|
|
651
|
+
'--n-text-decoration-color': textDecorationColor,
|
|
652
|
+
'--n-border': border,
|
|
653
|
+
'--n-border-disabled': borderDisabled,
|
|
654
|
+
'--n-border-hover': borderHover,
|
|
655
|
+
'--n-border-focus': borderFocus,
|
|
656
|
+
'--n-placeholder-color': placeholderColor,
|
|
657
|
+
'--n-placeholder-color-disabled': placeholderColorDisabled,
|
|
658
|
+
'--n-icon-size': iconSize,
|
|
659
|
+
'--n-line-height-textarea': lineHeightTextarea,
|
|
660
|
+
'--n-color-disabled': colorDisabled,
|
|
661
|
+
'--n-color-focus': colorFocus,
|
|
662
|
+
'--n-text-color-disabled': textColorDisabled,
|
|
663
|
+
'--n-box-shadow-focus': boxShadowFocus,
|
|
664
|
+
'--n-loading-color': loadingColor,
|
|
665
|
+
// form warning
|
|
666
|
+
'--n-caret-color-warning': caretColorWarning,
|
|
667
|
+
'--n-color-focus-warning': colorFocusWarning,
|
|
668
|
+
'--n-box-shadow-focus-warning': boxShadowFocusWarning,
|
|
669
|
+
'--n-border-warning': borderWarning,
|
|
670
|
+
'--n-border-focus-warning': borderFocusWarning,
|
|
671
|
+
'--n-border-hover-warning': borderHoverWarning,
|
|
672
|
+
'--n-loading-color-warning': loadingColorWarning,
|
|
673
|
+
// form error
|
|
674
|
+
'--n-caret-color-error': caretColorError,
|
|
675
|
+
'--n-color-focus-error': colorFocusError,
|
|
676
|
+
'--n-box-shadow-focus-error': boxShadowFocusError,
|
|
677
|
+
'--n-border-error': borderError,
|
|
678
|
+
'--n-border-focus-error': borderFocusError,
|
|
679
|
+
'--n-border-hover-error': borderHoverError,
|
|
680
|
+
'--n-loading-color-error': loadingColorError,
|
|
681
|
+
// clear-button
|
|
682
|
+
'--n-clear-color': clearColor,
|
|
683
|
+
'--n-clear-size': clearSize,
|
|
684
|
+
'--n-clear-color-hover': clearColorHover,
|
|
685
|
+
'--n-clear-color-pressed': clearColorPressed,
|
|
686
|
+
'--n-icon-color': iconColor,
|
|
687
|
+
'--n-icon-color-hover': iconColorHover,
|
|
688
|
+
'--n-icon-color-pressed': iconColorPressed,
|
|
689
|
+
'--n-icon-color-disabled': iconColorDisabled,
|
|
690
|
+
'--n-suffix-text-color': suffixTextColor
|
|
691
|
+
};
|
|
692
|
+
});
|
|
693
|
+
const themeClassHandle = inlineThemeDisabled
|
|
694
|
+
? (0, _mixins_1.useThemeClass)('input', (0, vue_1.computed)(() => {
|
|
695
|
+
const { value: size } = mergedSizeRef;
|
|
696
|
+
return size[0];
|
|
697
|
+
}), cssVarsRef, props)
|
|
698
|
+
: undefined;
|
|
636
699
|
return Object.assign(Object.assign({}, exposedProps), {
|
|
637
700
|
// DOM ref
|
|
638
701
|
wrapperElRef,
|
|
@@ -664,69 +727,14 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
664
727
|
handleWrapperKeyDown,
|
|
665
728
|
handleTextAreaMirrorResize, getTextareaScrollContainer: () => {
|
|
666
729
|
return textareaElRef.value;
|
|
667
|
-
}, mergedTheme: themeRef, cssVars:
|
|
668
|
-
const { value: size } = mergedSizeRef;
|
|
669
|
-
const { common: { cubicBezierEaseInOut }, self: { color, borderRadius, textColor, caretColor, caretColorError, caretColorWarning, textDecorationColor, border, borderDisabled, borderHover, borderFocus, placeholderColor, placeholderColorDisabled, lineHeightTextarea, colorDisabled, colorFocus, textColorDisabled, boxShadowFocus, iconSize, colorFocusWarning, boxShadowFocusWarning, borderWarning, borderFocusWarning, borderHoverWarning, colorFocusError, boxShadowFocusError, borderError, borderFocusError, borderHoverError, clearSize, clearColor, clearColorHover, clearColorPressed, iconColor, iconColorDisabled, suffixTextColor, countTextColor, iconColorHover, iconColorPressed, loadingColor, loadingColorError, loadingColorWarning, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('height', size)]: height } } = themeRef.value;
|
|
670
|
-
const { left: paddingLeft, right: paddingRight } = (0, seemly_1.getPadding)(padding);
|
|
671
|
-
return {
|
|
672
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
673
|
-
'--n-count-text-color': countTextColor,
|
|
674
|
-
'--n-color': color,
|
|
675
|
-
'--n-font-size': fontSize,
|
|
676
|
-
'--n-border-radius': borderRadius,
|
|
677
|
-
'--n-height': height,
|
|
678
|
-
'--n-padding-left': paddingLeft,
|
|
679
|
-
'--n-padding-right': paddingRight,
|
|
680
|
-
'--n-text-color': textColor,
|
|
681
|
-
'--n-caret-color': caretColor,
|
|
682
|
-
'--n-text-decoration-color': textDecorationColor,
|
|
683
|
-
'--n-border': border,
|
|
684
|
-
'--n-border-disabled': borderDisabled,
|
|
685
|
-
'--n-border-hover': borderHover,
|
|
686
|
-
'--n-border-focus': borderFocus,
|
|
687
|
-
'--n-placeholder-color': placeholderColor,
|
|
688
|
-
'--n-placeholder-color-disabled': placeholderColorDisabled,
|
|
689
|
-
'--n-icon-size': iconSize,
|
|
690
|
-
'--n-line-height-textarea': lineHeightTextarea,
|
|
691
|
-
'--n-color-disabled': colorDisabled,
|
|
692
|
-
'--n-color-focus': colorFocus,
|
|
693
|
-
'--n-text-color-disabled': textColorDisabled,
|
|
694
|
-
'--n-box-shadow-focus': boxShadowFocus,
|
|
695
|
-
'--n-loading-color': loadingColor,
|
|
696
|
-
// form warning
|
|
697
|
-
'--n-caret-color-warning': caretColorWarning,
|
|
698
|
-
'--n-color-focus-warning': colorFocusWarning,
|
|
699
|
-
'--n-box-shadow-focus-warning': boxShadowFocusWarning,
|
|
700
|
-
'--n-border-warning': borderWarning,
|
|
701
|
-
'--n-border-focus-warning': borderFocusWarning,
|
|
702
|
-
'--n-border-hover-warning': borderHoverWarning,
|
|
703
|
-
'--n-loading-color-warning': loadingColorWarning,
|
|
704
|
-
// form error
|
|
705
|
-
'--n-caret-color-error': caretColorError,
|
|
706
|
-
'--n-color-focus-error': colorFocusError,
|
|
707
|
-
'--n-box-shadow-focus-error': boxShadowFocusError,
|
|
708
|
-
'--n-border-error': borderError,
|
|
709
|
-
'--n-border-focus-error': borderFocusError,
|
|
710
|
-
'--n-border-hover-error': borderHoverError,
|
|
711
|
-
'--n-loading-color-error': loadingColorError,
|
|
712
|
-
// clear-button
|
|
713
|
-
'--n-clear-color': clearColor,
|
|
714
|
-
'--n-clear-size': clearSize,
|
|
715
|
-
'--n-clear-color-hover': clearColorHover,
|
|
716
|
-
'--n-clear-color-pressed': clearColorPressed,
|
|
717
|
-
'--n-icon-color': iconColor,
|
|
718
|
-
'--n-icon-color-hover': iconColorHover,
|
|
719
|
-
'--n-icon-color-pressed': iconColorPressed,
|
|
720
|
-
'--n-icon-color-disabled': iconColorDisabled,
|
|
721
|
-
'--n-suffix-text-color': suffixTextColor
|
|
722
|
-
};
|
|
723
|
-
}) });
|
|
730
|
+
}, mergedTheme: themeRef, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
724
731
|
},
|
|
725
732
|
render() {
|
|
726
|
-
|
|
727
|
-
|
|
733
|
+
const { mergedClsPrefix, mergedStatus, themeClass, onRender, $slots } = this;
|
|
734
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
728
735
|
return ((0, vue_1.h)("div", { ref: "wrapperElRef", class: [
|
|
729
736
|
`${mergedClsPrefix}-input`,
|
|
737
|
+
themeClass,
|
|
730
738
|
mergedStatus && `${mergedClsPrefix}-input--${mergedStatus}-status`,
|
|
731
739
|
{
|
|
732
740
|
[`${mergedClsPrefix}-input--disabled`]: this.mergedDisabled,
|
|
@@ -742,9 +750,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
742
750
|
? 0
|
|
743
751
|
: undefined, onFocus: this.handleWrapperFocus, onBlur: this.handleWrapperBlur, onClick: this.handleClick, onMousedown: this.handleMouseDown, onMouseenter: this.handleMouseEnter, onMouseleave: this.handleMouseLeave, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd, onKeyup: this.onKeyup, onKeydown: this.handleWrapperKeyDown },
|
|
744
752
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input-wrapper` },
|
|
745
|
-
(0, _utils_1.resolveWrappedSlot)($slots.prefix, (children) =>
|
|
746
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__prefix` }, children)
|
|
747
|
-
]),
|
|
753
|
+
(0, _utils_1.resolveWrappedSlot)($slots.prefix, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__prefix` }, children))),
|
|
748
754
|
this.type === 'textarea' ? ((0, vue_1.h)(_internal_1.NScrollbar, { ref: "textareaScrollbarInstRef", class: `${mergedClsPrefix}-input__textarea`, container: this.getTextareaScrollContainer, triggerDisplayManually: true, useUnifiedContainer: true }, {
|
|
749
755
|
default: () => {
|
|
750
756
|
return ((0, vue_1.h)(vue_1.Fragment, null,
|
|
@@ -768,22 +774,26 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
768
774
|
(0, vue_1.h)("span", null, this.mergedPlaceholder[0]))) : null,
|
|
769
775
|
this.autosize ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__input-mirror`, key: "mirror", ref: "inputMirrorElRef" }, "\u00A0")) : null)),
|
|
770
776
|
!this.pair &&
|
|
771
|
-
($slots.suffix
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
777
|
+
(0, _utils_1.resolveWrappedSlot)($slots.suffix, (children) => {
|
|
778
|
+
return children ||
|
|
779
|
+
this.clearable ||
|
|
780
|
+
this.showCount ||
|
|
781
|
+
this.mergedShowPasswordOn ||
|
|
782
|
+
this.loading !== undefined ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__suffix` }, [
|
|
783
|
+
(0, _utils_1.resolveWrappedSlot)($slots.clear, (children) => {
|
|
784
|
+
return ((this.clearable || children) && ((0, vue_1.h)(_internal_1.NBaseClear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { default: () => children })));
|
|
785
|
+
}),
|
|
786
|
+
!this.internalLoadingBeforeSuffix ? children : null,
|
|
787
|
+
this.loading !== undefined ? ((0, vue_1.h)(_internal_1.NBaseSuffix, { clsPrefix: mergedClsPrefix, loading: this.loading, showArrow: false, showClear: false, style: this.cssVars })) : null,
|
|
788
|
+
this.internalLoadingBeforeSuffix ? children : null,
|
|
789
|
+
this.showCount && this.type !== 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, {
|
|
790
|
+
default: (props) => { var _a; return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); }
|
|
791
|
+
})) : null,
|
|
792
|
+
this.mergedShowPasswordOn && this.type === 'password' ? ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-input__eye`, onMousedown: this.handlePasswordToggleMousedown, onClick: this.handlePasswordToggleClick }, {
|
|
793
|
+
default: () => this.passwordVisible ? (0, vue_1.h)(icons_1.EyeIcon, null) : (0, vue_1.h)(icons_1.EyeOffIcon, null)
|
|
794
|
+
})) : null
|
|
795
|
+
])) : null;
|
|
796
|
+
})),
|
|
787
797
|
this.pair ? ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-input__separator` }, (0, _utils_1.resolveSlot)($slots.separator, () => [this.separator]))) : null,
|
|
788
798
|
this.pair ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input-wrapper` },
|
|
789
799
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__input` },
|
|
@@ -792,10 +802,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
792
802
|
: undefined, readonly: this.readonly, style: this.textDecorationStyle[1], onBlur: this.handleInputBlur, onFocus: this.handleInputFocus, onInput: (e) => this.handleInput(e, 1), onChange: (e) => this.handleChange(e, 1) }),
|
|
793
803
|
this.showPlaceholder2 ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__placeholder` },
|
|
794
804
|
(0, vue_1.h)("span", null, this.mergedPlaceholder[1]))) : null),
|
|
795
|
-
(0,
|
|
796
|
-
this.clearable && ((0, vue_1.h)(
|
|
797
|
-
|
|
798
|
-
|
|
805
|
+
(0, _utils_1.resolveWrappedSlot)($slots.suffix, (children) => {
|
|
806
|
+
return ((this.clearable || children) && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__suffix` }, [
|
|
807
|
+
this.clearable && ((0, vue_1.h)(_internal_1.NBaseClear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { default: () => { var _a; return (_a = $slots.clear) === null || _a === void 0 ? void 0 : _a.call($slots); } })),
|
|
808
|
+
children
|
|
809
|
+
])));
|
|
810
|
+
}))) : null,
|
|
799
811
|
this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__border` })) : null,
|
|
800
812
|
this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__state-border` })) : null,
|
|
801
813
|
this.showCount && this.type === 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, { default: (props) => { var _a; return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); } })) : null));
|
|
@@ -193,10 +193,10 @@ exports.default = (0, cssr_1.cB)('input', `
|
|
|
193
193
|
color: var(--n-icon-color-hover);
|
|
194
194
|
`), (0, cssr_1.c)('&:active', `
|
|
195
195
|
color: var(--n-icon-color-pressed);
|
|
196
|
-
`)]), (0, cssr_1.cM)('focus', 'background-color: var(--n-color-focus);', [(0, cssr_1.cE)('state-border', `
|
|
196
|
+
`)]), (0, cssr_1.c)('&:hover', [(0, cssr_1.cE)('state-border', 'border: var(--n-border-hover);')]), (0, cssr_1.cM)('focus', 'background-color: var(--n-color-focus);', [(0, cssr_1.cE)('state-border', `
|
|
197
197
|
border: var(--n-border-focus);
|
|
198
198
|
box-shadow: var(--n-box-shadow-focus);
|
|
199
|
-
`)])
|
|
199
|
+
`)])]), (0, cssr_1.cE)('border, state-border', `
|
|
200
200
|
box-sizing: border-box;
|
|
201
201
|
position: absolute;
|
|
202
202
|
left: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import
|
|
2
|
+
import { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
3
3
|
import type { OnUpdateValue } from './interface';
|
|
4
4
|
declare const inputNumberProps: {
|
|
5
5
|
loading: {
|
|
@@ -50,11 +50,7 @@ declare const inputNumberProps: {
|
|
|
50
50
|
onFocus: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
51
51
|
onBlur: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
52
52
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
53
|
-
onChange:
|
|
54
|
-
type: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
55
|
-
validator: () => boolean;
|
|
56
|
-
default: undefined;
|
|
57
|
-
};
|
|
53
|
+
onChange: PropType<MaybeArray<OnUpdateValue>>;
|
|
58
54
|
theme: PropType<import("../../_mixins").Theme<"InputNumber", {
|
|
59
55
|
iconColorDisabled: string;
|
|
60
56
|
}, {
|
|
@@ -910,11 +906,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
910
906
|
onFocus: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
911
907
|
onBlur: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
912
908
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
913
|
-
onChange:
|
|
914
|
-
type: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
915
|
-
validator: () => boolean;
|
|
916
|
-
default: undefined;
|
|
917
|
-
};
|
|
909
|
+
onChange: PropType<MaybeArray<OnUpdateValue>>;
|
|
918
910
|
theme: PropType<import("../../_mixins").Theme<"InputNumber", {
|
|
919
911
|
iconColorDisabled: string;
|
|
920
912
|
}, {
|
|
@@ -1755,6 +1747,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1755
1747
|
handleMouseDown: (e: MouseEvent) => void;
|
|
1756
1748
|
handleAddClick: () => void;
|
|
1757
1749
|
handleMinusClick: () => void;
|
|
1750
|
+
handleAddMousedown: () => void;
|
|
1751
|
+
handleMinusMousedown: () => void;
|
|
1758
1752
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
1759
1753
|
handleUpdateDisplayedValue: (value: string) => void;
|
|
1760
1754
|
mergedTheme: import("vue").ComputedRef<{
|
|
@@ -2203,11 +2197,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2203
2197
|
onFocus: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
2204
2198
|
onBlur: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
2205
2199
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
2206
|
-
onChange:
|
|
2207
|
-
type: PropType<MaybeArray<OnUpdateValue> | undefined>;
|
|
2208
|
-
validator: () => boolean;
|
|
2209
|
-
default: undefined;
|
|
2210
|
-
};
|
|
2200
|
+
onChange: PropType<MaybeArray<OnUpdateValue>>;
|
|
2211
2201
|
theme: PropType<import("../../_mixins").Theme<"InputNumber", {
|
|
2212
2202
|
iconColorDisabled: string;
|
|
2213
2203
|
}, {
|
|
@@ -3016,7 +3006,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3016
3006
|
readonly: boolean;
|
|
3017
3007
|
disabled: boolean | undefined;
|
|
3018
3008
|
step: string | number;
|
|
3019
|
-
onChange: MaybeArray<OnUpdateValue> | undefined;
|
|
3020
3009
|
loading: boolean;
|
|
3021
3010
|
bordered: boolean | undefined;
|
|
3022
3011
|
clearable: boolean;
|