naive-ui 2.25.5 → 2.25.8
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/scrollbar/src/ScrollBar.d.ts +1 -0
- package/es/_internal/select-menu/src/SelectMenu.d.ts +1 -0
- package/es/button/src/styles/button-rtl.cssr.js +2 -2
- package/es/cascader/src/Cascader.d.ts +10 -0
- package/es/cascader/src/CascaderMenu.d.ts +1 -0
- package/es/cascader/src/CascaderOption.d.ts +1 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +1 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/es/cascader/styles/light.d.ts +1 -0
- package/es/checkbox/src/Checkbox.d.ts +12 -0
- package/es/checkbox/src/Checkbox.js +14 -7
- package/es/checkbox/src/styles/index.cssr.js +16 -8
- package/es/checkbox/src/styles/rtl.cssr.d.ts +2 -0
- package/es/checkbox/src/styles/rtl.cssr.js +4 -0
- package/es/checkbox/styles/index.d.ts +1 -0
- package/es/checkbox/styles/index.js +1 -0
- package/es/checkbox/styles/light.d.ts +1 -0
- package/es/checkbox/styles/light.js +2 -2
- package/es/checkbox/styles/rtl.d.ts +2 -0
- package/es/checkbox/styles/rtl.js +5 -0
- package/es/code/src/Code.js +3 -1
- package/es/collapse/src/Collapse.d.ts +1 -0
- package/es/collapse/src/Collapse.js +9 -2
- package/es/collapse/src/CollapseItem.d.ts +1 -0
- package/es/collapse/src/CollapseItem.js +8 -3
- package/es/collapse/src/styles/rtl.cssr.d.ts +2 -0
- package/es/collapse/src/styles/rtl.cssr.js +15 -0
- package/es/collapse/styles/index.d.ts +1 -0
- package/es/collapse/styles/index.js +1 -0
- package/es/collapse/styles/rtl.d.ts +2 -0
- package/es/collapse/styles/rtl.js +5 -0
- package/es/collapse-transition/src/CollapseTransition.d.ts +3 -1
- package/es/collapse-transition/src/CollapseTransition.js +27 -14
- package/es/config-provider/src/ConfigProvider.js +6 -0
- package/es/config-provider/src/internal-interface.d.ts +1 -0
- package/es/data-table/src/DataTable.d.ts +20 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
- package/es/data-table/src/TableParts/Body.d.ts +3 -0
- package/es/data-table/src/TableParts/Cell.d.ts +4 -0
- package/es/data-table/src/TableParts/Header.d.ts +2 -0
- package/es/data-table/styles/light.d.ts +2 -0
- package/es/date-picker/src/DatePicker.d.ts +7 -2
- package/es/date-picker/src/DatePicker.js +80 -68
- package/es/date-picker/src/panel/date.d.ts +6 -0
- package/es/date-picker/src/panel/date.js +7 -2
- package/es/date-picker/src/panel/daterange.d.ts +4 -0
- package/es/date-picker/src/panel/daterange.js +7 -2
- package/es/date-picker/src/panel/datetime.d.ts +6 -0
- package/es/date-picker/src/panel/datetime.js +7 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +4 -0
- package/es/date-picker/src/panel/datetimerange.js +7 -2
- package/es/date-picker/src/panel/month.d.ts +6 -0
- package/es/date-picker/src/panel/month.js +4 -2
- package/es/date-picker/src/panel/panelHeader.d.ts +10 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +4 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
- package/es/date-picker/src/panel/use-panel-common.js +3 -1
- package/es/drawer/src/Drawer.d.ts +3 -1
- package/es/drawer/src/Drawer.js +39 -27
- package/es/dropdown/src/Dropdown.d.ts +7 -5
- package/es/dropdown/src/Dropdown.js +59 -52
- package/es/form/src/FormItem.d.ts +3 -1
- package/es/form/src/FormItem.js +40 -33
- package/es/form/src/FormItemRow.js +1 -1
- package/es/gradient-text/src/GradientText.d.ts +3 -1
- package/es/gradient-text/src/GradientText.js +23 -15
- package/es/icon/src/Icon.d.ts +3 -5
- package/es/icon/src/Icon.js +29 -19
- package/es/image/src/ImagePreview.d.ts +3 -1
- package/es/image/src/ImagePreview.js +28 -15
- package/es/input/src/Input.d.ts +4 -1
- package/es/input/src/Input.js +27 -6
- package/es/input/src/InputGroupLabel.d.ts +3 -1
- package/es/input/src/InputGroupLabel.js +26 -19
- package/es/input/src/styles/input.cssr.js +1 -0
- package/es/input/src/styles/rtl.cssr.d.ts +2 -0
- package/es/input/src/styles/rtl.cssr.js +16 -0
- package/es/input/styles/index.d.ts +1 -0
- package/es/input/styles/index.js +1 -0
- package/es/input/styles/rtl.d.ts +2 -0
- package/es/input/styles/rtl.js +5 -0
- package/es/input-number/src/InputNumber.d.ts +1 -0
- package/es/input-number/src/InputNumber.js +8 -3
- package/es/input-number/src/styles/rtl.cssr.d.ts +2 -0
- package/es/input-number/src/styles/rtl.cssr.js +4 -0
- package/es/input-number/styles/index.d.ts +1 -0
- package/es/input-number/styles/index.js +1 -0
- package/es/input-number/styles/rtl.d.ts +2 -0
- package/es/input-number/styles/rtl.js +8 -0
- package/es/layout/src/Layout.d.ts +2 -0
- package/es/layout/src/LayoutContent.d.ts +1 -0
- package/es/layout/src/LayoutSider.d.ts +1 -0
- package/es/list/src/List.d.ts +3 -1
- package/es/list/src/List.js +27 -19
- package/es/loading-bar/src/LoadingBar.d.ts +3 -1
- package/es/loading-bar/src/LoadingBar.js +29 -15
- package/es/log/src/Log.d.ts +1 -0
- package/es/message/src/Message.d.ts +12 -1
- package/es/message/src/Message.js +57 -40
- package/es/message/src/MessageEnvironment.d.ts +9 -0
- package/es/message/src/MessageEnvironment.js +1 -1
- package/es/message/src/MessageProvider.d.ts +67 -0
- package/es/message/src/MessageProvider.js +3 -0
- package/es/message/src/message-props.d.ts +4 -0
- package/es/message/src/message-props.js +4 -0
- package/es/message/src/styles/index.cssr.js +2 -1
- package/es/message/src/types.d.ts +3 -1
- package/es/message/styles/light.d.ts +7 -0
- package/es/message/styles/light.js +1 -1
- package/es/modal/src/BodyWrapper.d.ts +1 -0
- package/es/notification/src/Notification.d.ts +3 -1
- package/es/notification/src/Notification.js +44 -32
- package/es/notification/src/NotificationProvider.d.ts +1 -0
- package/es/notification/src/NotificationProvider.js +1 -0
- package/es/popconfirm/src/Popconfirm.d.ts +3 -2
- package/es/popconfirm/src/Popconfirm.js +2 -1
- package/es/popconfirm/src/PopconfirmPanel.d.ts +3 -1
- package/es/popconfirm/src/PopconfirmPanel.js +32 -25
- package/es/popconfirm/src/interface.d.ts +2 -0
- package/es/popover/src/PopoverBody.d.ts +4 -0
- package/es/popover/src/PopoverBody.js +3 -2
- package/es/popover/src/styles/index.cssr.js +49 -29
- package/es/radio/src/Radio.d.ts +7 -0
- package/es/radio/src/Radio.js +14 -7
- package/es/radio/src/RadioGroup.d.ts +9 -0
- package/es/radio/src/styles/radio.cssr.js +16 -9
- package/es/radio/styles/dark.js +2 -2
- package/es/radio/styles/light.d.ts +1 -0
- package/es/radio/styles/light.js +2 -2
- package/es/scrollbar/src/ScrollBar.d.ts +1 -0
- package/es/select/src/Select.d.ts +3 -1
- package/es/select/src/Select.js +31 -23
- package/es/slider/src/Slider.d.ts +6 -2
- package/es/slider/src/Slider.js +74 -51
- package/es/steps/src/Step.d.ts +3 -1
- package/es/steps/src/Step.js +32 -20
- package/es/styles.d.ts +4 -4
- package/es/styles.js +4 -4
- package/es/time-picker/src/Panel.js +4 -4
- package/es/time-picker/src/TimePicker.d.ts +12 -4
- package/es/time-picker/src/TimePicker.js +90 -35
- package/es/timeline/src/Timeline.d.ts +9 -9
- package/es/timeline/src/TimelineItem.d.ts +4 -2
- package/es/timeline/src/TimelineItem.js +34 -20
- package/es/timeline/styles/_common.d.ts +1 -1
- package/es/timeline/styles/_common.js +1 -1
- package/es/timeline/styles/light.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +10 -0
- package/es/transfer/src/TransferFilter.d.ts +1 -0
- package/es/transfer/src/TransferList.d.ts +2 -0
- package/es/transfer/src/TransferListItem.d.ts +1 -0
- package/es/transfer/styles/light.d.ts +1 -0
- package/es/tree/src/Tree.d.ts +16 -3
- package/es/tree/src/Tree.js +50 -28
- package/es/tree/src/TreeNodeCheckbox.d.ts +1 -0
- package/es/tree/styles/light.d.ts +1 -0
- package/es/tree-select/src/TreeSelect.d.ts +23 -10
- package/es/tree-select/src/TreeSelect.js +26 -17
- package/es/tree-select/styles/light.d.ts +1 -0
- package/es/upload/src/Upload.d.ts +3 -1
- package/es/upload/src/Upload.js +23 -13
- package/es/upload/src/UploadFileList.js +8 -3
- package/es/upload/src/interface.d.ts +3 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +1 -0
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +1 -0
- package/lib/button/src/styles/button-rtl.cssr.js +2 -2
- package/lib/cascader/src/Cascader.d.ts +10 -0
- package/lib/cascader/src/CascaderMenu.d.ts +1 -0
- package/lib/cascader/src/CascaderOption.d.ts +1 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +1 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/lib/cascader/styles/light.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.d.ts +12 -0
- package/lib/checkbox/src/Checkbox.js +14 -7
- package/lib/checkbox/src/styles/index.cssr.js +16 -8
- package/lib/checkbox/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/checkbox/src/styles/rtl.cssr.js +11 -0
- package/lib/checkbox/styles/index.d.ts +1 -0
- package/lib/checkbox/styles/index.js +3 -1
- package/lib/checkbox/styles/light.d.ts +1 -0
- package/lib/checkbox/styles/light.js +2 -2
- package/lib/checkbox/styles/rtl.d.ts +2 -0
- package/lib/checkbox/styles/rtl.js +11 -0
- package/lib/code/src/Code.js +3 -1
- package/lib/collapse/src/Collapse.d.ts +1 -0
- package/lib/collapse/src/Collapse.js +9 -2
- package/lib/collapse/src/CollapseItem.d.ts +1 -0
- package/lib/collapse/src/CollapseItem.js +7 -2
- package/lib/collapse/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/collapse/src/styles/rtl.cssr.js +22 -0
- package/lib/collapse/styles/index.d.ts +1 -0
- package/lib/collapse/styles/index.js +3 -1
- package/lib/collapse/styles/rtl.d.ts +2 -0
- package/lib/collapse/styles/rtl.js +11 -0
- package/lib/collapse-transition/src/CollapseTransition.d.ts +3 -1
- package/lib/collapse-transition/src/CollapseTransition.js +26 -13
- package/lib/config-provider/src/ConfigProvider.js +6 -0
- package/lib/config-provider/src/internal-interface.d.ts +1 -0
- package/lib/data-table/src/DataTable.d.ts +20 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +2 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +2 -0
- package/lib/data-table/src/TableParts/Body.d.ts +3 -0
- package/lib/data-table/src/TableParts/Cell.d.ts +4 -0
- package/lib/data-table/src/TableParts/Header.d.ts +2 -0
- package/lib/data-table/styles/light.d.ts +2 -0
- package/lib/date-picker/src/DatePicker.d.ts +7 -2
- package/lib/date-picker/src/DatePicker.js +79 -67
- package/lib/date-picker/src/panel/date.d.ts +6 -0
- package/lib/date-picker/src/panel/date.js +7 -2
- package/lib/date-picker/src/panel/daterange.d.ts +4 -0
- package/lib/date-picker/src/panel/daterange.js +7 -2
- package/lib/date-picker/src/panel/datetime.d.ts +6 -0
- package/lib/date-picker/src/panel/datetime.js +7 -2
- package/lib/date-picker/src/panel/datetimerange.d.ts +4 -0
- package/lib/date-picker/src/panel/datetimerange.js +7 -2
- package/lib/date-picker/src/panel/month.d.ts +6 -0
- package/lib/date-picker/src/panel/month.js +4 -2
- package/lib/date-picker/src/panel/panelHeader.d.ts +10 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +4 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
- package/lib/date-picker/src/panel/use-panel-common.js +3 -1
- package/lib/drawer/src/Drawer.d.ts +4 -1
- package/lib/drawer/src/Drawer.js +38 -26
- package/lib/dropdown/src/Dropdown.d.ts +7 -5
- package/lib/dropdown/src/Dropdown.js +58 -51
- package/lib/form/src/FormItem.d.ts +3 -1
- package/lib/form/src/FormItem.js +39 -32
- package/lib/form/src/FormItemRow.js +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +3 -1
- package/lib/gradient-text/src/GradientText.js +22 -14
- package/lib/icon/src/Icon.d.ts +3 -5
- package/lib/icon/src/Icon.js +28 -18
- package/lib/image/src/ImagePreview.d.ts +3 -1
- package/lib/image/src/ImagePreview.js +27 -14
- package/lib/input/src/Input.d.ts +4 -1
- package/lib/input/src/Input.js +27 -6
- package/lib/input/src/InputGroupLabel.d.ts +3 -1
- package/lib/input/src/InputGroupLabel.js +25 -18
- package/lib/input/src/styles/input.cssr.js +1 -0
- package/lib/input/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/input/src/styles/rtl.cssr.js +23 -0
- package/lib/input/styles/index.d.ts +1 -0
- package/lib/input/styles/index.js +3 -1
- package/lib/input/styles/rtl.d.ts +2 -0
- package/lib/input/styles/rtl.js +11 -0
- package/lib/input-number/src/InputNumber.d.ts +1 -0
- package/lib/input-number/src/InputNumber.js +8 -3
- package/lib/input-number/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/input-number/src/styles/rtl.cssr.js +11 -0
- package/lib/input-number/styles/index.d.ts +1 -0
- package/lib/input-number/styles/index.js +3 -1
- package/lib/input-number/styles/rtl.d.ts +2 -0
- package/lib/input-number/styles/rtl.js +14 -0
- package/lib/layout/src/Layout.d.ts +2 -0
- package/lib/layout/src/LayoutContent.d.ts +1 -0
- package/lib/layout/src/LayoutSider.d.ts +1 -0
- package/lib/list/src/List.d.ts +3 -1
- package/lib/list/src/List.js +26 -18
- package/lib/loading-bar/src/LoadingBar.d.ts +3 -1
- package/lib/loading-bar/src/LoadingBar.js +28 -14
- package/lib/log/src/Log.d.ts +1 -0
- package/lib/message/src/Message.d.ts +12 -1
- package/lib/message/src/Message.js +56 -39
- package/lib/message/src/MessageEnvironment.d.ts +9 -0
- package/lib/message/src/MessageEnvironment.js +1 -1
- package/lib/message/src/MessageProvider.d.ts +67 -0
- package/lib/message/src/MessageProvider.js +3 -0
- package/lib/message/src/message-props.d.ts +4 -0
- package/lib/message/src/message-props.js +4 -0
- package/lib/message/src/styles/index.cssr.js +2 -1
- package/lib/message/src/types.d.ts +3 -1
- package/lib/message/styles/light.d.ts +7 -0
- package/lib/message/styles/light.js +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +1 -0
- package/lib/notification/src/Notification.d.ts +3 -1
- package/lib/notification/src/Notification.js +44 -32
- package/lib/notification/src/NotificationProvider.d.ts +1 -0
- package/lib/notification/src/NotificationProvider.js +1 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +3 -2
- package/lib/popconfirm/src/Popconfirm.js +2 -1
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +3 -1
- package/lib/popconfirm/src/PopconfirmPanel.js +30 -23
- package/lib/popconfirm/src/interface.d.ts +2 -0
- package/lib/popover/src/PopoverBody.d.ts +4 -0
- package/lib/popover/src/PopoverBody.js +3 -2
- package/lib/popover/src/styles/index.cssr.js +50 -29
- package/lib/radio/src/Radio.d.ts +7 -0
- package/lib/radio/src/Radio.js +13 -6
- package/lib/radio/src/RadioGroup.d.ts +9 -0
- package/lib/radio/src/styles/radio.cssr.js +16 -9
- package/lib/radio/styles/dark.js +2 -2
- package/lib/radio/styles/light.d.ts +1 -0
- package/lib/radio/styles/light.js +2 -2
- package/lib/scrollbar/src/ScrollBar.d.ts +1 -0
- package/lib/select/src/Select.d.ts +3 -1
- package/lib/select/src/Select.js +30 -22
- package/lib/slider/src/Slider.d.ts +6 -2
- package/lib/slider/src/Slider.js +73 -50
- package/lib/steps/src/Step.d.ts +3 -1
- package/lib/steps/src/Step.js +32 -20
- package/lib/styles.d.ts +4 -4
- package/lib/styles.js +6 -2
- package/lib/time-picker/src/Panel.js +4 -4
- package/lib/time-picker/src/TimePicker.d.ts +12 -4
- package/lib/time-picker/src/TimePicker.js +89 -34
- package/lib/timeline/src/Timeline.d.ts +9 -9
- package/lib/timeline/src/TimelineItem.d.ts +4 -2
- package/lib/timeline/src/TimelineItem.js +34 -20
- package/lib/timeline/styles/_common.d.ts +1 -1
- package/lib/timeline/styles/_common.js +1 -1
- package/lib/timeline/styles/light.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +10 -0
- package/lib/transfer/src/TransferFilter.d.ts +1 -0
- package/lib/transfer/src/TransferList.d.ts +2 -0
- package/lib/transfer/src/TransferListItem.d.ts +1 -0
- package/lib/transfer/styles/light.d.ts +1 -0
- package/lib/tree/src/Tree.d.ts +16 -3
- package/lib/tree/src/Tree.js +49 -27
- package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -0
- package/lib/tree/styles/light.d.ts +1 -0
- package/lib/tree-select/src/TreeSelect.d.ts +23 -10
- package/lib/tree-select/src/TreeSelect.js +25 -16
- package/lib/tree-select/styles/light.d.ts +1 -0
- package/lib/upload/src/Upload.d.ts +3 -1
- package/lib/upload/src/Upload.js +22 -12
- package/lib/upload/src/UploadFileList.js +8 -3
- package/lib/upload/src/interface.d.ts +3 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, h, defineComponent, mergeProps, watchEffect } from 'vue';
|
|
2
|
-
import { useConfig, useTheme } from '../../_mixins';
|
|
2
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
3
3
|
import { warnOnce } from '../../_utils';
|
|
4
4
|
import style from './styles/index.cssr';
|
|
5
5
|
import { collapseTransitionLight } from '../styles';
|
|
@@ -8,7 +8,7 @@ const collapseProps = Object.assign(Object.assign({}, useTheme.props), { show: {
|
|
|
8
8
|
type: Boolean,
|
|
9
9
|
default: true
|
|
10
10
|
}, appear: Boolean,
|
|
11
|
-
// The collapsed is implemented
|
|
11
|
+
// The collapsed is implemented with mistake, collapsed=true would make it show
|
|
12
12
|
// However there's no possibility to change so I just let it deprecated and use
|
|
13
13
|
// `show` prop instead.
|
|
14
14
|
/** @deprecated */
|
|
@@ -28,7 +28,7 @@ export default defineComponent({
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
const { mergedClsPrefixRef } = useConfig(props);
|
|
31
|
+
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
32
32
|
const mergedThemeRef = useTheme('CollapseTransition', '-collapse-transition', style, collapseTransitionLight, props, mergedClsPrefixRef);
|
|
33
33
|
const mergedShowRef = computed(() => {
|
|
34
34
|
if (props.collapsed !== undefined) {
|
|
@@ -37,26 +37,39 @@ export default defineComponent({
|
|
|
37
37
|
}
|
|
38
38
|
return props.show;
|
|
39
39
|
});
|
|
40
|
+
const cssVarsRef = computed(() => {
|
|
41
|
+
const { self: { bezier } } = mergedThemeRef.value;
|
|
42
|
+
return {
|
|
43
|
+
'--n-bezier': bezier
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
const themeClassHandle = inlineThemeDisabled
|
|
47
|
+
? useThemeClass('collapse-transition', undefined, cssVarsRef, props)
|
|
48
|
+
: undefined;
|
|
40
49
|
return {
|
|
41
50
|
mergedShow: mergedShowRef,
|
|
42
51
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
43
|
-
cssVars:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'--n-bezier': bezier
|
|
47
|
-
};
|
|
48
|
-
})
|
|
52
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
53
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
54
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
49
55
|
};
|
|
50
56
|
},
|
|
51
57
|
render() {
|
|
52
58
|
return (h(NFadeInExpandTransition, { appear: this.appear }, {
|
|
53
|
-
default: () =>
|
|
54
|
-
|
|
59
|
+
default: () => {
|
|
60
|
+
var _a;
|
|
61
|
+
if (!this.mergedShow)
|
|
62
|
+
return;
|
|
63
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
64
|
+
return h('div', // Don't use jsx since it would cause useless spread in each rendering
|
|
55
65
|
mergeProps({
|
|
56
|
-
class:
|
|
66
|
+
class: [
|
|
67
|
+
`${this.mergedClsPrefix}-collapse-transition`,
|
|
68
|
+
this.themeClass
|
|
69
|
+
],
|
|
57
70
|
style: this.cssVars
|
|
58
|
-
}, this.$attrs), this.$slots)
|
|
59
|
-
|
|
71
|
+
}, this.$attrs), this.$slots);
|
|
72
|
+
}
|
|
60
73
|
}));
|
|
61
74
|
}
|
|
62
75
|
});
|
|
@@ -107,6 +107,7 @@ export default defineComponent({
|
|
|
107
107
|
return NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedClsPrefixRef.value;
|
|
108
108
|
});
|
|
109
109
|
const mergedRtlRef = computed(() => {
|
|
110
|
+
var _a;
|
|
110
111
|
const { rtl } = props;
|
|
111
112
|
if (rtl === undefined) {
|
|
112
113
|
return NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef.value;
|
|
@@ -114,6 +115,11 @@ export default defineComponent({
|
|
|
114
115
|
const rtlEnabledState = {};
|
|
115
116
|
for (const rtlInfo of rtl) {
|
|
116
117
|
rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);
|
|
118
|
+
(_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
|
|
119
|
+
if (!(peerRtlInfo.name in rtlEnabledState)) {
|
|
120
|
+
rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
117
123
|
}
|
|
118
124
|
return rtlEnabledState;
|
|
119
125
|
});
|
|
@@ -211,6 +211,7 @@ export interface GlobalIconConfig {
|
|
|
211
211
|
export interface RtlItem {
|
|
212
212
|
name: keyof GlobalThemeWithoutCommon;
|
|
213
213
|
style: CNode;
|
|
214
|
+
peers?: RtlItem[];
|
|
214
215
|
}
|
|
215
216
|
export declare type RtlProp = RtlItem[];
|
|
216
217
|
export declare type RtlEnabledState = Partial<Record<keyof GlobalThemeWithoutCommon, RtlItem>>;
|
|
@@ -341,6 +341,7 @@ export declare const dataTableProps: {
|
|
|
341
341
|
rippleDuration: string;
|
|
342
342
|
}, any>;
|
|
343
343
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
344
|
+
labelLineHeight: string;
|
|
344
345
|
fontSizeSmall: string;
|
|
345
346
|
fontSizeMedium: string;
|
|
346
347
|
fontSizeLarge: string;
|
|
@@ -369,6 +370,7 @@ export declare const dataTableProps: {
|
|
|
369
370
|
labelPadding: string;
|
|
370
371
|
}, any>;
|
|
371
372
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
373
|
+
labelLineHeight: string;
|
|
372
374
|
buttonHeightSmall: string;
|
|
373
375
|
buttonHeightMedium: string;
|
|
374
376
|
buttonHeightLarge: string;
|
|
@@ -942,6 +944,7 @@ export declare const dataTableProps: {
|
|
|
942
944
|
rippleDuration: string;
|
|
943
945
|
}, any>;
|
|
944
946
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
947
|
+
labelLineHeight: string;
|
|
945
948
|
fontSizeSmall: string;
|
|
946
949
|
fontSizeMedium: string;
|
|
947
950
|
fontSizeLarge: string;
|
|
@@ -970,6 +973,7 @@ export declare const dataTableProps: {
|
|
|
970
973
|
labelPadding: string;
|
|
971
974
|
}, any>;
|
|
972
975
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
976
|
+
labelLineHeight: string;
|
|
973
977
|
buttonHeightSmall: string;
|
|
974
978
|
buttonHeightMedium: string;
|
|
975
979
|
buttonHeightLarge: string;
|
|
@@ -1543,6 +1547,7 @@ export declare const dataTableProps: {
|
|
|
1543
1547
|
rippleDuration: string;
|
|
1544
1548
|
}, any>;
|
|
1545
1549
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1550
|
+
labelLineHeight: string;
|
|
1546
1551
|
fontSizeSmall: string;
|
|
1547
1552
|
fontSizeMedium: string;
|
|
1548
1553
|
fontSizeLarge: string;
|
|
@@ -1571,6 +1576,7 @@ export declare const dataTableProps: {
|
|
|
1571
1576
|
labelPadding: string;
|
|
1572
1577
|
}, any>;
|
|
1573
1578
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
1579
|
+
labelLineHeight: string;
|
|
1574
1580
|
buttonHeightSmall: string;
|
|
1575
1581
|
buttonHeightMedium: string;
|
|
1576
1582
|
buttonHeightLarge: string;
|
|
@@ -2232,6 +2238,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2232
2238
|
rippleDuration: string;
|
|
2233
2239
|
}, any>;
|
|
2234
2240
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
2241
|
+
labelLineHeight: string;
|
|
2235
2242
|
fontSizeSmall: string;
|
|
2236
2243
|
fontSizeMedium: string;
|
|
2237
2244
|
fontSizeLarge: string;
|
|
@@ -2260,6 +2267,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2260
2267
|
labelPadding: string;
|
|
2261
2268
|
}, any>;
|
|
2262
2269
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
2270
|
+
labelLineHeight: string;
|
|
2263
2271
|
buttonHeightSmall: string;
|
|
2264
2272
|
buttonHeightMedium: string;
|
|
2265
2273
|
buttonHeightLarge: string;
|
|
@@ -2833,6 +2841,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2833
2841
|
rippleDuration: string;
|
|
2834
2842
|
}, any>;
|
|
2835
2843
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
2844
|
+
labelLineHeight: string;
|
|
2836
2845
|
fontSizeSmall: string;
|
|
2837
2846
|
fontSizeMedium: string;
|
|
2838
2847
|
fontSizeLarge: string;
|
|
@@ -2861,6 +2870,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2861
2870
|
labelPadding: string;
|
|
2862
2871
|
}, any>;
|
|
2863
2872
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
2873
|
+
labelLineHeight: string;
|
|
2864
2874
|
buttonHeightSmall: string;
|
|
2865
2875
|
buttonHeightMedium: string;
|
|
2866
2876
|
buttonHeightLarge: string;
|
|
@@ -3434,6 +3444,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3434
3444
|
rippleDuration: string;
|
|
3435
3445
|
}, any>;
|
|
3436
3446
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
3447
|
+
labelLineHeight: string;
|
|
3437
3448
|
fontSizeSmall: string;
|
|
3438
3449
|
fontSizeMedium: string;
|
|
3439
3450
|
fontSizeLarge: string;
|
|
@@ -3462,6 +3473,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3462
3473
|
labelPadding: string;
|
|
3463
3474
|
}, any>;
|
|
3464
3475
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
3476
|
+
labelLineHeight: string;
|
|
3465
3477
|
buttonHeightSmall: string;
|
|
3466
3478
|
buttonHeightMedium: string;
|
|
3467
3479
|
buttonHeightLarge: string;
|
|
@@ -4153,6 +4165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4153
4165
|
rippleDuration: string;
|
|
4154
4166
|
}, any>;
|
|
4155
4167
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
4168
|
+
labelLineHeight: string;
|
|
4156
4169
|
fontSizeSmall: string;
|
|
4157
4170
|
fontSizeMedium: string;
|
|
4158
4171
|
fontSizeLarge: string;
|
|
@@ -4181,6 +4194,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4181
4194
|
labelPadding: string;
|
|
4182
4195
|
}, any>;
|
|
4183
4196
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
4197
|
+
labelLineHeight: string;
|
|
4184
4198
|
buttonHeightSmall: string;
|
|
4185
4199
|
buttonHeightMedium: string;
|
|
4186
4200
|
buttonHeightLarge: string;
|
|
@@ -5134,6 +5148,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5134
5148
|
rippleDuration: string;
|
|
5135
5149
|
}, any>;
|
|
5136
5150
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
5151
|
+
labelLineHeight: string;
|
|
5137
5152
|
fontSizeSmall: string;
|
|
5138
5153
|
fontSizeMedium: string;
|
|
5139
5154
|
fontSizeLarge: string;
|
|
@@ -5162,6 +5177,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5162
5177
|
labelPadding: string;
|
|
5163
5178
|
}, any>;
|
|
5164
5179
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
5180
|
+
labelLineHeight: string;
|
|
5165
5181
|
buttonHeightSmall: string;
|
|
5166
5182
|
buttonHeightMedium: string;
|
|
5167
5183
|
buttonHeightLarge: string;
|
|
@@ -5735,6 +5751,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5735
5751
|
rippleDuration: string;
|
|
5736
5752
|
}, any>;
|
|
5737
5753
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
5754
|
+
labelLineHeight: string;
|
|
5738
5755
|
fontSizeSmall: string;
|
|
5739
5756
|
fontSizeMedium: string;
|
|
5740
5757
|
fontSizeLarge: string;
|
|
@@ -5763,6 +5780,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5763
5780
|
labelPadding: string;
|
|
5764
5781
|
}, any>;
|
|
5765
5782
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
5783
|
+
labelLineHeight: string;
|
|
5766
5784
|
buttonHeightSmall: string;
|
|
5767
5785
|
buttonHeightMedium: string;
|
|
5768
5786
|
buttonHeightLarge: string;
|
|
@@ -6336,6 +6354,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6336
6354
|
rippleDuration: string;
|
|
6337
6355
|
}, any>;
|
|
6338
6356
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
6357
|
+
labelLineHeight: string;
|
|
6339
6358
|
fontSizeSmall: string;
|
|
6340
6359
|
fontSizeMedium: string;
|
|
6341
6360
|
fontSizeLarge: string;
|
|
@@ -6364,6 +6383,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6364
6383
|
labelPadding: string;
|
|
6365
6384
|
}, any>;
|
|
6366
6385
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
6386
|
+
labelLineHeight: string;
|
|
6367
6387
|
buttonHeightSmall: string;
|
|
6368
6388
|
buttonHeightMedium: string;
|
|
6369
6389
|
buttonHeightLarge: string;
|
|
@@ -369,6 +369,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
369
369
|
rippleDuration: string;
|
|
370
370
|
}, any>;
|
|
371
371
|
Checkbox: import("../../../_mixins").Theme<"Checkbox", {
|
|
372
|
+
labelLineHeight: string;
|
|
372
373
|
fontSizeSmall: string;
|
|
373
374
|
fontSizeMedium: string;
|
|
374
375
|
fontSizeLarge: string;
|
|
@@ -397,6 +398,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
397
398
|
labelPadding: string;
|
|
398
399
|
}, any>;
|
|
399
400
|
Radio: import("../../../_mixins").Theme<"Radio", {
|
|
401
|
+
labelLineHeight: string;
|
|
400
402
|
buttonHeightSmall: string;
|
|
401
403
|
buttonHeightMedium: string;
|
|
402
404
|
buttonHeightLarge: string;
|
|
@@ -394,6 +394,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
394
394
|
rippleDuration: string;
|
|
395
395
|
}, any>;
|
|
396
396
|
Checkbox: import("../../../_mixins").Theme<"Checkbox", {
|
|
397
|
+
labelLineHeight: string;
|
|
397
398
|
fontSizeSmall: string;
|
|
398
399
|
fontSizeMedium: string;
|
|
399
400
|
fontSizeLarge: string;
|
|
@@ -422,6 +423,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
422
423
|
labelPadding: string;
|
|
423
424
|
}, any>;
|
|
424
425
|
Radio: import("../../../_mixins").Theme<"Radio", {
|
|
426
|
+
labelLineHeight: string;
|
|
425
427
|
buttonHeightSmall: string;
|
|
426
428
|
buttonHeightMedium: string;
|
|
427
429
|
buttonHeightLarge: string;
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
}>;
|
|
14
14
|
componentId: string;
|
|
15
15
|
scrollbarInstRef: import("vue").Ref<{
|
|
16
|
+
$el: HTMLElement;
|
|
16
17
|
containerRef: HTMLElement | null;
|
|
17
18
|
contentRef: HTMLElement | null;
|
|
18
19
|
containerScrollTop: number;
|
|
@@ -390,6 +391,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
390
391
|
rippleDuration: string;
|
|
391
392
|
}, any>;
|
|
392
393
|
Checkbox: import("../../../_mixins").Theme<"Checkbox", {
|
|
394
|
+
labelLineHeight: string;
|
|
393
395
|
fontSizeSmall: string;
|
|
394
396
|
fontSizeMedium: string;
|
|
395
397
|
fontSizeLarge: string;
|
|
@@ -418,6 +420,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
418
420
|
labelPadding: string;
|
|
419
421
|
}, any>;
|
|
420
422
|
Radio: import("../../../_mixins").Theme<"Radio", {
|
|
423
|
+
labelLineHeight: string;
|
|
421
424
|
buttonHeightSmall: string;
|
|
422
425
|
buttonHeightMedium: string;
|
|
423
426
|
buttonHeightLarge: string;
|
|
@@ -374,6 +374,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
374
374
|
rippleDuration: string;
|
|
375
375
|
}, any>;
|
|
376
376
|
Checkbox: import("../../../_mixins").Theme<"Checkbox", {
|
|
377
|
+
labelLineHeight: string;
|
|
377
378
|
fontSizeSmall: string;
|
|
378
379
|
fontSizeMedium: string;
|
|
379
380
|
fontSizeLarge: string;
|
|
@@ -402,6 +403,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
402
403
|
labelPadding: string;
|
|
403
404
|
}, any>;
|
|
404
405
|
Radio: import("../../../_mixins").Theme<"Radio", {
|
|
406
|
+
labelLineHeight: string;
|
|
405
407
|
buttonHeightSmall: string;
|
|
406
408
|
buttonHeightMedium: string;
|
|
407
409
|
buttonHeightLarge: string;
|
|
@@ -1345,6 +1347,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1345
1347
|
rippleDuration: string;
|
|
1346
1348
|
}, any>;
|
|
1347
1349
|
Checkbox: import("../../../_mixins").Theme<"Checkbox", {
|
|
1350
|
+
labelLineHeight: string;
|
|
1348
1351
|
fontSizeSmall: string;
|
|
1349
1352
|
fontSizeMedium: string;
|
|
1350
1353
|
fontSizeLarge: string;
|
|
@@ -1373,6 +1376,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1373
1376
|
labelPadding: string;
|
|
1374
1377
|
}, any>;
|
|
1375
1378
|
Radio: import("../../../_mixins").Theme<"Radio", {
|
|
1379
|
+
labelLineHeight: string;
|
|
1376
1380
|
buttonHeightSmall: string;
|
|
1377
1381
|
buttonHeightMedium: string;
|
|
1378
1382
|
buttonHeightLarge: string;
|
|
@@ -381,6 +381,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
381
381
|
rippleDuration: string;
|
|
382
382
|
}, any>;
|
|
383
383
|
Checkbox: import("../../../_mixins").Theme<"Checkbox", {
|
|
384
|
+
labelLineHeight: string;
|
|
384
385
|
fontSizeSmall: string;
|
|
385
386
|
fontSizeMedium: string;
|
|
386
387
|
fontSizeLarge: string;
|
|
@@ -409,6 +410,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
409
410
|
labelPadding: string;
|
|
410
411
|
}, any>;
|
|
411
412
|
Radio: import("../../../_mixins").Theme<"Radio", {
|
|
413
|
+
labelLineHeight: string;
|
|
412
414
|
buttonHeightSmall: string;
|
|
413
415
|
buttonHeightMedium: string;
|
|
414
416
|
buttonHeightLarge: string;
|
|
@@ -303,6 +303,7 @@ declare const dataTableLight: import("../../_mixins").Theme<"DataTable", {
|
|
|
303
303
|
rippleDuration: string;
|
|
304
304
|
}, any>;
|
|
305
305
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
306
|
+
labelLineHeight: string;
|
|
306
307
|
fontSizeSmall: string;
|
|
307
308
|
fontSizeMedium: string;
|
|
308
309
|
fontSizeLarge: string;
|
|
@@ -331,6 +332,7 @@ declare const dataTableLight: import("../../_mixins").Theme<"DataTable", {
|
|
|
331
332
|
labelPadding: string;
|
|
332
333
|
}, any>;
|
|
333
334
|
Radio: import("../../_mixins").Theme<"Radio", {
|
|
335
|
+
labelLineHeight: string;
|
|
334
336
|
buttonHeightSmall: string;
|
|
335
337
|
buttonHeightMedium: string;
|
|
336
338
|
buttonHeightLarge: string;
|
|
@@ -3804,6 +3804,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3804
3804
|
panelInstRef: Ref<{
|
|
3805
3805
|
$el: HTMLElement;
|
|
3806
3806
|
monthScrollRef?: {
|
|
3807
|
+
$el: HTMLElement;
|
|
3807
3808
|
containerRef: HTMLElement | null;
|
|
3808
3809
|
contentRef: HTMLElement | null;
|
|
3809
3810
|
containerScrollTop: number;
|
|
@@ -4873,7 +4874,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4873
4874
|
'--n-bezier': string;
|
|
4874
4875
|
'--n-icon-color': string;
|
|
4875
4876
|
'--n-icon-color-disabled': string;
|
|
4876
|
-
}
|
|
4877
|
+
}> | undefined;
|
|
4878
|
+
triggerThemeClass: Ref<string> | undefined;
|
|
4879
|
+
triggerOnRender: (() => void) | undefined;
|
|
4877
4880
|
cssVars: import("vue").ComputedRef<{
|
|
4878
4881
|
'--n-bezier': string;
|
|
4879
4882
|
'--n-panel-border-radius': string;
|
|
@@ -4918,7 +4921,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4918
4921
|
'--n-arrow-color': string;
|
|
4919
4922
|
'--n-icon-color': string;
|
|
4920
4923
|
'--n-icon-color-disabled': string;
|
|
4921
|
-
}
|
|
4924
|
+
}> | undefined;
|
|
4925
|
+
themeClass: Ref<string> | undefined;
|
|
4926
|
+
onRender: (() => void) | undefined;
|
|
4922
4927
|
focus: () => void;
|
|
4923
4928
|
blur: () => void;
|
|
4924
4929
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
@@ -6,7 +6,7 @@ import { useIsMounted, useMergedState } from 'vooks';
|
|
|
6
6
|
import { happensIn } from 'seemly';
|
|
7
7
|
import { NInput } from '../../input';
|
|
8
8
|
import { NBaseIcon } from '../../_internal';
|
|
9
|
-
import { useFormItem, useTheme, useConfig, useLocale } from '../../_mixins';
|
|
9
|
+
import { useFormItem, useTheme, useConfig, useLocale, useThemeClass } from '../../_mixins';
|
|
10
10
|
import { DateIcon, ToIcon } from '../../_internal/icons';
|
|
11
11
|
import { warn, call, useAdjustedTo, createKey, warnOnce } from '../../_utils';
|
|
12
12
|
import { datePickerLight } from '../styles';
|
|
@@ -52,7 +52,7 @@ export default defineComponent({
|
|
|
52
52
|
const { localeRef, dateLocaleRef } = useLocale('DatePicker');
|
|
53
53
|
const formItem = useFormItem(props);
|
|
54
54
|
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
|
|
55
|
-
const { mergedComponentPropsRef, mergedClsPrefixRef, mergedBorderedRef, namespaceRef } = useConfig(props);
|
|
55
|
+
const { mergedComponentPropsRef, mergedClsPrefixRef, mergedBorderedRef, namespaceRef, inlineThemeDisabled } = useConfig(props);
|
|
56
56
|
const panelInstRef = ref(null);
|
|
57
57
|
const triggerElRef = ref(null);
|
|
58
58
|
const inputInstRef = ref(null);
|
|
@@ -486,6 +486,76 @@ export default defineComponent({
|
|
|
486
486
|
(_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.blur();
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
|
+
const triggerCssVarsRef = computed(() => {
|
|
490
|
+
const { common: { cubicBezierEaseInOut }, self: { iconColor, iconColorDisabled } } = themeRef.value;
|
|
491
|
+
return {
|
|
492
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
493
|
+
'--n-icon-color': iconColor,
|
|
494
|
+
'--n-icon-color-disabled': iconColorDisabled
|
|
495
|
+
};
|
|
496
|
+
});
|
|
497
|
+
const triggerThemeClassHandle = inlineThemeDisabled
|
|
498
|
+
? useThemeClass('date-picker-trigger', undefined, triggerCssVarsRef, props)
|
|
499
|
+
: undefined;
|
|
500
|
+
const cssVarsRef = computed(() => {
|
|
501
|
+
const { type } = props;
|
|
502
|
+
const { common: { cubicBezierEaseInOut }, self: { calendarTitleFontSize, calendarDaysFontSize, itemFontSize, itemTextColor, itemColorDisabled, itemColorIncluded, itemColorHover, itemColorActive, itemBorderRadius, itemTextColorDisabled, itemTextColorActive, panelColor, panelTextColor, arrowColor, calendarTitleTextColor, panelActionDividerColor, panelHeaderDividerColor, calendarDaysDividerColor, panelBoxShadow, panelBorderRadius, calendarTitleFontWeight, panelExtraFooterPadding, panelActionPadding, itemSize, itemCellWidth, itemCellHeight, scrollItemWidth, scrollItemHeight, calendarTitlePadding, calendarTitleHeight, calendarDaysHeight, calendarDaysTextColor, arrowSize, panelHeaderPadding, calendarDividerColor, calendarTitleGridTempateColumns, iconColor, iconColorDisabled, scrollItemBorderRadius, calendarTitleColorHover, [createKey('calendarLeftPadding', type)]: calendarLeftPadding, [createKey('calendarRightPadding', type)]: calendarRightPadding } } = themeRef.value;
|
|
503
|
+
return {
|
|
504
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
505
|
+
'--n-panel-border-radius': panelBorderRadius,
|
|
506
|
+
'--n-panel-color': panelColor,
|
|
507
|
+
'--n-panel-box-shadow': panelBoxShadow,
|
|
508
|
+
'--n-panel-text-color': panelTextColor,
|
|
509
|
+
// panel header
|
|
510
|
+
'--n-panel-header-padding': panelHeaderPadding,
|
|
511
|
+
'--n-panel-header-divider-color': panelHeaderDividerColor,
|
|
512
|
+
// panel calendar
|
|
513
|
+
'--n-calendar-left-padding': calendarLeftPadding,
|
|
514
|
+
'--n-calendar-right-padding': calendarRightPadding,
|
|
515
|
+
'--n-calendar-title-color-hover': calendarTitleColorHover,
|
|
516
|
+
'--n-calendar-title-height': calendarTitleHeight,
|
|
517
|
+
'--n-calendar-title-padding': calendarTitlePadding,
|
|
518
|
+
'--n-calendar-title-font-size': calendarTitleFontSize,
|
|
519
|
+
'--n-calendar-title-font-weight': calendarTitleFontWeight,
|
|
520
|
+
'--n-calendar-title-text-color': calendarTitleTextColor,
|
|
521
|
+
'--n-calendar-title-grid-template-columns': calendarTitleGridTempateColumns,
|
|
522
|
+
'--n-calendar-days-height': calendarDaysHeight,
|
|
523
|
+
'--n-calendar-days-divider-color': calendarDaysDividerColor,
|
|
524
|
+
'--n-calendar-days-font-size': calendarDaysFontSize,
|
|
525
|
+
'--n-calendar-days-text-color': calendarDaysTextColor,
|
|
526
|
+
'--n-calendar-divider-color': calendarDividerColor,
|
|
527
|
+
// panel action
|
|
528
|
+
'--n-panel-action-padding': panelActionPadding,
|
|
529
|
+
'--n-panel-extra-footer-padding': panelExtraFooterPadding,
|
|
530
|
+
'--n-panel-action-divider-color': panelActionDividerColor,
|
|
531
|
+
// panel item
|
|
532
|
+
'--n-item-font-size': itemFontSize,
|
|
533
|
+
'--n-item-border-radius': itemBorderRadius,
|
|
534
|
+
'--n-item-size': itemSize,
|
|
535
|
+
'--n-item-cell-width': itemCellWidth,
|
|
536
|
+
'--n-item-cell-height': itemCellHeight,
|
|
537
|
+
'--n-item-text-color': itemTextColor,
|
|
538
|
+
'--n-item-color-included': itemColorIncluded,
|
|
539
|
+
'--n-item-color-disabled': itemColorDisabled,
|
|
540
|
+
'--n-item-color-hover': itemColorHover,
|
|
541
|
+
'--n-item-color-active': itemColorActive,
|
|
542
|
+
'--n-item-text-color-disabled': itemTextColorDisabled,
|
|
543
|
+
'--n-item-text-color-active': itemTextColorActive,
|
|
544
|
+
// scroll item
|
|
545
|
+
'--n-scroll-item-width': scrollItemWidth,
|
|
546
|
+
'--n-scroll-item-height': scrollItemHeight,
|
|
547
|
+
'--n-scroll-item-border-radius': scrollItemBorderRadius,
|
|
548
|
+
// panel arrow
|
|
549
|
+
'--n-arrow-size': arrowSize,
|
|
550
|
+
'--n-arrow-color': arrowColor,
|
|
551
|
+
// icon in trigger
|
|
552
|
+
'--n-icon-color': iconColor,
|
|
553
|
+
'--n-icon-color-disabled': iconColorDisabled
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
const themeClassHandle = inlineThemeDisabled
|
|
557
|
+
? useThemeClass('date-picker', undefined, cssVarsRef, props)
|
|
558
|
+
: undefined;
|
|
489
559
|
return Object.assign(Object.assign({}, exposedMethods), { mergedStatus: mergedStatusRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, namespace: namespaceRef, uncontrolledValue: uncontrolledValueRef, pendingValue: pendingValueRef, panelInstRef,
|
|
490
560
|
triggerElRef,
|
|
491
561
|
inputInstRef, isMounted: useIsMounted(), displayTime: singleInputValueRef, displayStartTime: rangeStartInputValueRef, displayEndTime: rangeEndInputValueRef, mergedShow: mergedShowRef, adjustedTo: useAdjustedTo(props), isRange: isRangeRef, localizedStartPlaceholder: localizedStartPlaceholderRef, localizedEndPlaceholder: localizedEndPlaceholderRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, localizedPlacehoder: localizedPlacehoderRef, isValueInvalid: uniVaidation.isValueInvalidRef, isStartValueInvalid: dualValidation.isStartValueInvalidRef, isEndValueInvalid: dualValidation.isEndValueInvalidRef, handleClickOutside,
|
|
@@ -501,72 +571,11 @@ export default defineComponent({
|
|
|
501
571
|
handleRangeUpdateValue,
|
|
502
572
|
handleSingleUpdateValue,
|
|
503
573
|
handlePanelUpdateValue,
|
|
504
|
-
handlePanelConfirm, mergedTheme: themeRef, actions: mergedActionsRef, triggerCssVars:
|
|
505
|
-
const { common: { cubicBezierEaseInOut }, self: { iconColor, iconColorDisabled } } = themeRef.value;
|
|
506
|
-
return {
|
|
507
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
508
|
-
'--n-icon-color': iconColor,
|
|
509
|
-
'--n-icon-color-disabled': iconColorDisabled
|
|
510
|
-
};
|
|
511
|
-
}), cssVars: computed(() => {
|
|
512
|
-
const { type } = props;
|
|
513
|
-
const { common: { cubicBezierEaseInOut }, self: { calendarTitleFontSize, calendarDaysFontSize, itemFontSize, itemTextColor, itemColorDisabled, itemColorIncluded, itemColorHover, itemColorActive, itemBorderRadius, itemTextColorDisabled, itemTextColorActive, panelColor, panelTextColor, arrowColor, calendarTitleTextColor, panelActionDividerColor, panelHeaderDividerColor, calendarDaysDividerColor, panelBoxShadow, panelBorderRadius, calendarTitleFontWeight, panelExtraFooterPadding, panelActionPadding, itemSize, itemCellWidth, itemCellHeight, scrollItemWidth, scrollItemHeight, calendarTitlePadding, calendarTitleHeight, calendarDaysHeight, calendarDaysTextColor, arrowSize, panelHeaderPadding, calendarDividerColor, calendarTitleGridTempateColumns, iconColor, iconColorDisabled, scrollItemBorderRadius, calendarTitleColorHover, [createKey('calendarLeftPadding', type)]: calendarLeftPadding, [createKey('calendarRightPadding', type)]: calendarRightPadding } } = themeRef.value;
|
|
514
|
-
return {
|
|
515
|
-
'--n-bezier': cubicBezierEaseInOut,
|
|
516
|
-
'--n-panel-border-radius': panelBorderRadius,
|
|
517
|
-
'--n-panel-color': panelColor,
|
|
518
|
-
'--n-panel-box-shadow': panelBoxShadow,
|
|
519
|
-
'--n-panel-text-color': panelTextColor,
|
|
520
|
-
// panel header
|
|
521
|
-
'--n-panel-header-padding': panelHeaderPadding,
|
|
522
|
-
'--n-panel-header-divider-color': panelHeaderDividerColor,
|
|
523
|
-
// panel calendar
|
|
524
|
-
'--n-calendar-left-padding': calendarLeftPadding,
|
|
525
|
-
'--n-calendar-right-padding': calendarRightPadding,
|
|
526
|
-
'--n-calendar-title-color-hover': calendarTitleColorHover,
|
|
527
|
-
'--n-calendar-title-height': calendarTitleHeight,
|
|
528
|
-
'--n-calendar-title-padding': calendarTitlePadding,
|
|
529
|
-
'--n-calendar-title-font-size': calendarTitleFontSize,
|
|
530
|
-
'--n-calendar-title-font-weight': calendarTitleFontWeight,
|
|
531
|
-
'--n-calendar-title-text-color': calendarTitleTextColor,
|
|
532
|
-
'--n-calendar-title-grid-template-columns': calendarTitleGridTempateColumns,
|
|
533
|
-
'--n-calendar-days-height': calendarDaysHeight,
|
|
534
|
-
'--n-calendar-days-divider-color': calendarDaysDividerColor,
|
|
535
|
-
'--n-calendar-days-font-size': calendarDaysFontSize,
|
|
536
|
-
'--n-calendar-days-text-color': calendarDaysTextColor,
|
|
537
|
-
'--n-calendar-divider-color': calendarDividerColor,
|
|
538
|
-
// panel action
|
|
539
|
-
'--n-panel-action-padding': panelActionPadding,
|
|
540
|
-
'--n-panel-extra-footer-padding': panelExtraFooterPadding,
|
|
541
|
-
'--n-panel-action-divider-color': panelActionDividerColor,
|
|
542
|
-
// panel item
|
|
543
|
-
'--n-item-font-size': itemFontSize,
|
|
544
|
-
'--n-item-border-radius': itemBorderRadius,
|
|
545
|
-
'--n-item-size': itemSize,
|
|
546
|
-
'--n-item-cell-width': itemCellWidth,
|
|
547
|
-
'--n-item-cell-height': itemCellHeight,
|
|
548
|
-
'--n-item-text-color': itemTextColor,
|
|
549
|
-
'--n-item-color-included': itemColorIncluded,
|
|
550
|
-
'--n-item-color-disabled': itemColorDisabled,
|
|
551
|
-
'--n-item-color-hover': itemColorHover,
|
|
552
|
-
'--n-item-color-active': itemColorActive,
|
|
553
|
-
'--n-item-text-color-disabled': itemTextColorDisabled,
|
|
554
|
-
'--n-item-text-color-active': itemTextColorActive,
|
|
555
|
-
// scroll item
|
|
556
|
-
'--n-scroll-item-width': scrollItemWidth,
|
|
557
|
-
'--n-scroll-item-height': scrollItemHeight,
|
|
558
|
-
'--n-scroll-item-border-radius': scrollItemBorderRadius,
|
|
559
|
-
// panel arrow
|
|
560
|
-
'--n-arrow-size': arrowSize,
|
|
561
|
-
'--n-arrow-color': arrowColor,
|
|
562
|
-
// icon in trigger
|
|
563
|
-
'--n-icon-color': iconColor,
|
|
564
|
-
'--n-icon-color-disabled': iconColorDisabled
|
|
565
|
-
};
|
|
566
|
-
}) });
|
|
574
|
+
handlePanelConfirm, mergedTheme: themeRef, actions: mergedActionsRef, triggerCssVars: inlineThemeDisabled ? undefined : triggerCssVarsRef, triggerThemeClass: triggerThemeClassHandle === null || triggerThemeClassHandle === void 0 ? void 0 : triggerThemeClassHandle.themeClass, triggerOnRender: triggerThemeClassHandle === null || triggerThemeClassHandle === void 0 ? void 0 : triggerThemeClassHandle.onRender, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
567
575
|
},
|
|
568
576
|
render() {
|
|
569
|
-
const { clearable } = this;
|
|
577
|
+
const { clearable, triggerOnRender } = this;
|
|
578
|
+
triggerOnRender === null || triggerOnRender === void 0 ? void 0 : triggerOnRender();
|
|
570
579
|
const commonInputProps = {
|
|
571
580
|
bordered: this.mergedBordered,
|
|
572
581
|
size: this.mergedSize,
|
|
@@ -593,13 +602,16 @@ export default defineComponent({
|
|
|
593
602
|
actions: this.actions,
|
|
594
603
|
shortcuts: this.shortcuts,
|
|
595
604
|
style: this.cssVars,
|
|
596
|
-
defaultTime: this.defaultTime
|
|
605
|
+
defaultTime: this.defaultTime,
|
|
606
|
+
themeClass: this.themeClass,
|
|
607
|
+
onRender: this.onRender
|
|
597
608
|
};
|
|
598
609
|
const { mergedClsPrefix } = this;
|
|
599
610
|
return (h("div", { ref: "triggerElRef", class: [
|
|
600
611
|
`${mergedClsPrefix}-date-picker`,
|
|
601
612
|
this.mergedDisabled && `${mergedClsPrefix}-date-picker--disabled`,
|
|
602
|
-
this.isRange && `${mergedClsPrefix}-date-picker--range
|
|
613
|
+
this.isRange && `${mergedClsPrefix}-date-picker--range`,
|
|
614
|
+
this.triggerThemeClass
|
|
603
615
|
], style: this.triggerCssVars, onKeydown: this.handleKeyDown },
|
|
604
616
|
h(VBinder, null, {
|
|
605
617
|
default: () => [
|
|
@@ -28,6 +28,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
readonly type: import("vue").PropType<import("../interface").OnPanelUpdateValue>;
|
|
29
29
|
readonly required: true;
|
|
30
30
|
};
|
|
31
|
+
readonly themeClass: StringConstructor;
|
|
32
|
+
readonly onRender: import("vue").PropType<(() => void) | undefined>;
|
|
31
33
|
}, {
|
|
32
34
|
handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
|
|
33
35
|
handleDateInputBlur: () => void;
|
|
@@ -43,6 +45,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
45
|
[name: string]: import("vue").Slot | undefined;
|
|
44
46
|
}>;
|
|
45
47
|
monthScrollRef: import("vue").Ref<{
|
|
48
|
+
$el: HTMLElement;
|
|
46
49
|
containerRef: HTMLElement | null;
|
|
47
50
|
contentRef: HTMLElement | null;
|
|
48
51
|
containerScrollTop: number;
|
|
@@ -59,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
62
|
scrollTo: import("vueuc/lib/virtual-list/src/VirtualList").ScrollTo;
|
|
60
63
|
} | null>;
|
|
61
64
|
scrollbarInstRef: import("vue").Ref<{
|
|
65
|
+
$el: HTMLElement;
|
|
62
66
|
containerRef: HTMLElement | null;
|
|
63
67
|
contentRef: HTMLElement | null;
|
|
64
68
|
containerScrollTop: number;
|
|
@@ -1202,6 +1206,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1202
1206
|
readonly type: import("vue").PropType<import("../interface").OnPanelUpdateValue>;
|
|
1203
1207
|
readonly required: true;
|
|
1204
1208
|
};
|
|
1209
|
+
readonly themeClass: StringConstructor;
|
|
1210
|
+
readonly onRender: import("vue").PropType<(() => void) | undefined>;
|
|
1205
1211
|
}>>, {
|
|
1206
1212
|
value: import("../interface").Value | null;
|
|
1207
1213
|
active: boolean;
|
|
@@ -27,8 +27,13 @@ export default defineComponent({
|
|
|
27
27
|
},
|
|
28
28
|
render() {
|
|
29
29
|
var _a, _b, _c;
|
|
30
|
-
const { mergedClsPrefix, mergedTheme, shortcuts } = this;
|
|
31
|
-
|
|
30
|
+
const { mergedClsPrefix, mergedTheme, shortcuts, onRender } = this;
|
|
31
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
32
|
+
return (h("div", { ref: "selfRef", tabindex: 0, class: [
|
|
33
|
+
`${mergedClsPrefix}-date-panel`,
|
|
34
|
+
`${mergedClsPrefix}-date-panel--date`,
|
|
35
|
+
this.themeClass
|
|
36
|
+
], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
|
|
32
37
|
h("div", { class: `${mergedClsPrefix}-date-panel-calendar` },
|
|
33
38
|
h("div", { class: `${mergedClsPrefix}-date-panel-month` },
|
|
34
39
|
h("div", { class: `${mergedClsPrefix}-date-panel-month__fast-prev`, onClick: this.prevYear },
|