naive-ui 2.25.5 → 2.25.6
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 -24
- 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 -24
- 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
|
@@ -42,6 +42,7 @@ export interface ScrollbarInstMethods {
|
|
|
42
42
|
handleMouseLeaveWrapper: () => void;
|
|
43
43
|
}
|
|
44
44
|
export interface ScrollbarInst extends ScrollbarInstMethods {
|
|
45
|
+
$el: HTMLElement;
|
|
45
46
|
containerRef: HTMLElement | null;
|
|
46
47
|
contentRef: HTMLElement | null;
|
|
47
48
|
containerScrollTop: number;
|
|
@@ -390,6 +390,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
390
390
|
scrollTo: import("vueuc/lib/virtual-list/src/VirtualList").ScrollTo;
|
|
391
391
|
} | null>;
|
|
392
392
|
scrollbarRef: import("vue").Ref<{
|
|
393
|
+
$el: HTMLElement;
|
|
393
394
|
containerRef: HTMLElement | null;
|
|
394
395
|
contentRef: HTMLElement | null;
|
|
395
396
|
containerScrollTop: number;
|
|
@@ -2,9 +2,9 @@ import { cB, cM, cE, c } from '../../../_utils/cssr';
|
|
|
2
2
|
export default cB('button', [cM('rtl', `
|
|
3
3
|
direction: rtl;
|
|
4
4
|
`, [cE('icon', {
|
|
5
|
-
margin: 'var(--icon-margin)',
|
|
5
|
+
margin: 'var(--n-icon-margin)',
|
|
6
6
|
marginRight: 0
|
|
7
7
|
}), cE('content', [c('~', [cE('icon', {
|
|
8
|
-
margin: 'var(--icon-margin)',
|
|
8
|
+
margin: 'var(--n-icon-margin)',
|
|
9
9
|
marginLeft: 0
|
|
10
10
|
})])])])]);
|
|
@@ -235,6 +235,7 @@ declare const cascaderProps: {
|
|
|
235
235
|
colorHover: string;
|
|
236
236
|
}, any>;
|
|
237
237
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
238
|
+
labelLineHeight: string;
|
|
238
239
|
fontSizeSmall: string;
|
|
239
240
|
fontSizeMedium: string;
|
|
240
241
|
fontSizeLarge: string;
|
|
@@ -419,6 +420,7 @@ declare const cascaderProps: {
|
|
|
419
420
|
colorHover: string;
|
|
420
421
|
}, any>;
|
|
421
422
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
423
|
+
labelLineHeight: string;
|
|
422
424
|
fontSizeSmall: string;
|
|
423
425
|
fontSizeMedium: string;
|
|
424
426
|
fontSizeLarge: string;
|
|
@@ -603,6 +605,7 @@ declare const cascaderProps: {
|
|
|
603
605
|
colorHover: string;
|
|
604
606
|
}, any>;
|
|
605
607
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
608
|
+
labelLineHeight: string;
|
|
606
609
|
fontSizeSmall: string;
|
|
607
610
|
fontSizeMedium: string;
|
|
608
611
|
fontSizeLarge: string;
|
|
@@ -877,6 +880,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
877
880
|
colorHover: string;
|
|
878
881
|
}, any>;
|
|
879
882
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
883
|
+
labelLineHeight: string;
|
|
880
884
|
fontSizeSmall: string;
|
|
881
885
|
fontSizeMedium: string;
|
|
882
886
|
fontSizeLarge: string;
|
|
@@ -1061,6 +1065,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1061
1065
|
colorHover: string;
|
|
1062
1066
|
}, any>;
|
|
1063
1067
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1068
|
+
labelLineHeight: string;
|
|
1064
1069
|
fontSizeSmall: string;
|
|
1065
1070
|
fontSizeMedium: string;
|
|
1066
1071
|
fontSizeLarge: string;
|
|
@@ -1245,6 +1250,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1245
1250
|
colorHover: string;
|
|
1246
1251
|
}, any>;
|
|
1247
1252
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1253
|
+
labelLineHeight: string;
|
|
1248
1254
|
fontSizeSmall: string;
|
|
1249
1255
|
fontSizeMedium: string;
|
|
1250
1256
|
fontSizeLarge: string;
|
|
@@ -1595,6 +1601,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1595
1601
|
colorHover: string;
|
|
1596
1602
|
}, any>;
|
|
1597
1603
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1604
|
+
labelLineHeight: string;
|
|
1598
1605
|
fontSizeSmall: string;
|
|
1599
1606
|
fontSizeMedium: string;
|
|
1600
1607
|
fontSizeLarge: string;
|
|
@@ -1947,6 +1954,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1947
1954
|
colorHover: string;
|
|
1948
1955
|
}, any>;
|
|
1949
1956
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
1957
|
+
labelLineHeight: string;
|
|
1950
1958
|
fontSizeSmall: string;
|
|
1951
1959
|
fontSizeMedium: string;
|
|
1952
1960
|
fontSizeLarge: string;
|
|
@@ -2131,6 +2139,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2131
2139
|
colorHover: string;
|
|
2132
2140
|
}, any>;
|
|
2133
2141
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
2142
|
+
labelLineHeight: string;
|
|
2134
2143
|
fontSizeSmall: string;
|
|
2135
2144
|
fontSizeMedium: string;
|
|
2136
2145
|
fontSizeLarge: string;
|
|
@@ -2315,6 +2324,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2315
2324
|
colorHover: string;
|
|
2316
2325
|
}, any>;
|
|
2317
2326
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
2327
|
+
labelLineHeight: string;
|
|
2318
2328
|
fontSizeSmall: string;
|
|
2319
2329
|
fontSizeMedium: string;
|
|
2320
2330
|
fontSizeLarge: string;
|
|
@@ -291,6 +291,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
291
291
|
colorHover: string;
|
|
292
292
|
}, any>;
|
|
293
293
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
294
|
+
labelLineHeight: string;
|
|
294
295
|
fontSizeSmall: string;
|
|
295
296
|
fontSizeMedium: string;
|
|
296
297
|
fontSizeLarge: string;
|
|
@@ -267,6 +267,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
267
267
|
colorHover: string;
|
|
268
268
|
}, any>;
|
|
269
269
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
270
|
+
labelLineHeight: string;
|
|
270
271
|
fontSizeSmall: string;
|
|
271
272
|
fontSizeMedium: string;
|
|
272
273
|
fontSizeLarge: string;
|
|
@@ -279,6 +279,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
279
279
|
colorHover: string;
|
|
280
280
|
}, any>;
|
|
281
281
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
282
|
+
labelLineHeight: string;
|
|
282
283
|
fontSizeSmall: string;
|
|
283
284
|
fontSizeMedium: string;
|
|
284
285
|
fontSizeLarge: string;
|
|
@@ -260,6 +260,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
260
260
|
colorHover: string;
|
|
261
261
|
}, any>;
|
|
262
262
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
263
|
+
labelLineHeight: string;
|
|
263
264
|
fontSizeSmall: string;
|
|
264
265
|
fontSizeMedium: string;
|
|
265
266
|
fontSizeLarge: string;
|
|
@@ -359,6 +360,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
359
360
|
};
|
|
360
361
|
}>;
|
|
361
362
|
scrollbarInstRef: import("vue").Ref<{
|
|
363
|
+
$el: HTMLElement;
|
|
362
364
|
containerRef: HTMLElement | null;
|
|
363
365
|
contentRef: HTMLElement | null;
|
|
364
366
|
containerScrollTop: number;
|
|
@@ -160,6 +160,7 @@ declare const cascaderLight: import("../../_mixins").Theme<"Cascader", {
|
|
|
160
160
|
colorHover: string;
|
|
161
161
|
}, any>;
|
|
162
162
|
Checkbox: import("../../_mixins").Theme<"Checkbox", {
|
|
163
|
+
labelLineHeight: string;
|
|
163
164
|
fontSizeSmall: string;
|
|
164
165
|
fontSizeMedium: string;
|
|
165
166
|
fontSizeLarge: string;
|
|
@@ -35,6 +35,7 @@ declare const checkboxProps: {
|
|
|
35
35
|
privateInsideTable: BooleanConstructor;
|
|
36
36
|
onChange: PropType<MaybeArray<OnUpdateChecked>>;
|
|
37
37
|
theme: PropType<import("../../_mixins").Theme<"Checkbox", {
|
|
38
|
+
labelLineHeight: string;
|
|
38
39
|
fontSizeSmall: string;
|
|
39
40
|
fontSizeMedium: string;
|
|
40
41
|
fontSizeLarge: string;
|
|
@@ -63,6 +64,7 @@ declare const checkboxProps: {
|
|
|
63
64
|
labelPadding: string;
|
|
64
65
|
}, any>>;
|
|
65
66
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Checkbox", {
|
|
67
|
+
labelLineHeight: string;
|
|
66
68
|
fontSizeSmall: string;
|
|
67
69
|
fontSizeMedium: string;
|
|
68
70
|
fontSizeLarge: string;
|
|
@@ -91,6 +93,7 @@ declare const checkboxProps: {
|
|
|
91
93
|
labelPadding: string;
|
|
92
94
|
}, any>>>;
|
|
93
95
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Checkbox", {
|
|
96
|
+
labelLineHeight: string;
|
|
94
97
|
fontSizeSmall: string;
|
|
95
98
|
fontSizeMedium: string;
|
|
96
99
|
fontSizeLarge: string;
|
|
@@ -154,6 +157,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
154
157
|
privateInsideTable: BooleanConstructor;
|
|
155
158
|
onChange: PropType<MaybeArray<OnUpdateChecked>>;
|
|
156
159
|
theme: PropType<import("../../_mixins").Theme<"Checkbox", {
|
|
160
|
+
labelLineHeight: string;
|
|
157
161
|
fontSizeSmall: string;
|
|
158
162
|
fontSizeMedium: string;
|
|
159
163
|
fontSizeLarge: string;
|
|
@@ -182,6 +186,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
182
186
|
labelPadding: string;
|
|
183
187
|
}, any>>;
|
|
184
188
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Checkbox", {
|
|
189
|
+
labelLineHeight: string;
|
|
185
190
|
fontSizeSmall: string;
|
|
186
191
|
fontSizeMedium: string;
|
|
187
192
|
fontSizeLarge: string;
|
|
@@ -210,6 +215,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
210
215
|
labelPadding: string;
|
|
211
216
|
}, any>>>;
|
|
212
217
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Checkbox", {
|
|
218
|
+
labelLineHeight: string;
|
|
213
219
|
fontSizeSmall: string;
|
|
214
220
|
fontSizeMedium: string;
|
|
215
221
|
fontSizeLarge: string;
|
|
@@ -238,6 +244,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
238
244
|
labelPadding: string;
|
|
239
245
|
}, any>>>;
|
|
240
246
|
}, import("../../_mixins/use-form-item").UseFormItem<"small" | "medium" | "large"> & CheckboxInst & {
|
|
247
|
+
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
241
248
|
selfRef: import("vue").Ref<HTMLDivElement | null>;
|
|
242
249
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
243
250
|
mergedDisabled: import("vue").ComputedRef<boolean>;
|
|
@@ -347,6 +354,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
347
354
|
name: "common";
|
|
348
355
|
};
|
|
349
356
|
self: {
|
|
357
|
+
labelLineHeight: string;
|
|
350
358
|
fontSizeSmall: string;
|
|
351
359
|
fontSizeMedium: string;
|
|
352
360
|
fontSizeLarge: string;
|
|
@@ -384,6 +392,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
384
392
|
handleKeyUp: (e: KeyboardEvent) => void;
|
|
385
393
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
386
394
|
cssVars: import("vue").ComputedRef<{
|
|
395
|
+
'--n-label-line-height': string;
|
|
387
396
|
'--n-size': string;
|
|
388
397
|
'--n-bezier': string;
|
|
389
398
|
'--n-border-radius': string;
|
|
@@ -444,6 +453,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
444
453
|
privateInsideTable: BooleanConstructor;
|
|
445
454
|
onChange: PropType<MaybeArray<OnUpdateChecked>>;
|
|
446
455
|
theme: PropType<import("../../_mixins").Theme<"Checkbox", {
|
|
456
|
+
labelLineHeight: string;
|
|
447
457
|
fontSizeSmall: string;
|
|
448
458
|
fontSizeMedium: string;
|
|
449
459
|
fontSizeLarge: string;
|
|
@@ -472,6 +482,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
472
482
|
labelPadding: string;
|
|
473
483
|
}, any>>;
|
|
474
484
|
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Checkbox", {
|
|
485
|
+
labelLineHeight: string;
|
|
475
486
|
fontSizeSmall: string;
|
|
476
487
|
fontSizeMedium: string;
|
|
477
488
|
fontSizeLarge: string;
|
|
@@ -500,6 +511,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
500
511
|
labelPadding: string;
|
|
501
512
|
}, any>>>;
|
|
502
513
|
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Checkbox", {
|
|
514
|
+
labelLineHeight: string;
|
|
503
515
|
fontSizeSmall: string;
|
|
504
516
|
fontSizeMedium: string;
|
|
505
517
|
fontSizeLarge: string;
|
|
@@ -10,6 +10,7 @@ import CheckMark from './CheckMark';
|
|
|
10
10
|
import LineMark from './LineMark';
|
|
11
11
|
import { checkboxGroupInjectionKey } from './CheckboxGroup';
|
|
12
12
|
import style from './styles/index.cssr';
|
|
13
|
+
import useRtl from '../../_mixins/use-rtl';
|
|
13
14
|
const checkboxProps = Object.assign(Object.assign({}, useTheme.props), { size: String, checked: {
|
|
14
15
|
type: [Boolean, String, Number],
|
|
15
16
|
default: undefined
|
|
@@ -45,7 +46,7 @@ export default defineComponent({
|
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
const selfRef = ref(null);
|
|
48
|
-
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
49
|
+
const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props);
|
|
49
50
|
const formItem = useFormItem(props, {
|
|
50
51
|
mergedSize(NFormItem) {
|
|
51
52
|
const { size } = props;
|
|
@@ -162,10 +163,12 @@ export default defineComponent({
|
|
|
162
163
|
(_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.blur();
|
|
163
164
|
}
|
|
164
165
|
};
|
|
166
|
+
const rtlEnabledRef = useRtl('Checkbox', mergedRtlRef, mergedClsPrefixRef);
|
|
165
167
|
const cssVarsRef = computed(() => {
|
|
166
168
|
const { value: mergedSize } = mergedSizeRef;
|
|
167
|
-
const { common: { cubicBezierEaseInOut }, self: { borderRadius, color, colorChecked, colorDisabled, colorTableHeader, colorTableHeaderModal, colorTableHeaderPopover, checkMarkColor, checkMarkColorDisabled, border, borderFocus, borderDisabled, borderChecked, boxShadowFocus, textColor, textColorDisabled, checkMarkColorDisabledChecked, colorDisabledChecked, borderDisabledChecked, labelPadding, [createKey('fontSize', mergedSize)]: fontSize, [createKey('size', mergedSize)]: size } } = themeRef.value;
|
|
169
|
+
const { common: { cubicBezierEaseInOut }, self: { borderRadius, color, colorChecked, colorDisabled, colorTableHeader, colorTableHeaderModal, colorTableHeaderPopover, checkMarkColor, checkMarkColorDisabled, border, borderFocus, borderDisabled, borderChecked, boxShadowFocus, textColor, textColorDisabled, checkMarkColorDisabledChecked, colorDisabledChecked, borderDisabledChecked, labelPadding, labelLineHeight, [createKey('fontSize', mergedSize)]: fontSize, [createKey('size', mergedSize)]: size } } = themeRef.value;
|
|
168
170
|
return {
|
|
171
|
+
'--n-label-line-height': labelLineHeight,
|
|
169
172
|
'--n-size': size,
|
|
170
173
|
'--n-bezier': cubicBezierEaseInOut,
|
|
171
174
|
'--n-border-radius': borderRadius,
|
|
@@ -195,6 +198,7 @@ export default defineComponent({
|
|
|
195
198
|
? useThemeClass('checkbox', computed(() => mergedSizeRef.value[0]), cssVarsRef, props)
|
|
196
199
|
: undefined;
|
|
197
200
|
return Object.assign(formItem, exposedMethods, {
|
|
201
|
+
rtlEnabled: rtlEnabledRef,
|
|
198
202
|
selfRef,
|
|
199
203
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
200
204
|
mergedDisabled: mergedDisabledRef,
|
|
@@ -216,6 +220,7 @@ export default defineComponent({
|
|
|
216
220
|
return (h("div", { ref: "selfRef", class: [
|
|
217
221
|
`${mergedClsPrefix}-checkbox`,
|
|
218
222
|
this.themeClass,
|
|
223
|
+
this.rtlEnabled && `${mergedClsPrefix}-checkbox--rtl`,
|
|
219
224
|
renderedChecked && `${mergedClsPrefix}-checkbox--checked`,
|
|
220
225
|
mergedDisabled && `${mergedClsPrefix}-checkbox--disabled`,
|
|
221
226
|
indeterminate && `${mergedClsPrefix}-checkbox--indeterminate`,
|
|
@@ -227,11 +232,13 @@ export default defineComponent({
|
|
|
227
232
|
once: true
|
|
228
233
|
});
|
|
229
234
|
} },
|
|
230
|
-
h("div", { class: `${mergedClsPrefix}-checkbox-box` },
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
+
h("div", { class: `${mergedClsPrefix}-checkbox-box-wrapper` },
|
|
236
|
+
"\u00A0",
|
|
237
|
+
h("div", { class: `${mergedClsPrefix}-checkbox-box` },
|
|
238
|
+
h(NIconSwitchTransition, null, {
|
|
239
|
+
default: () => this.indeterminate ? (h("div", { key: "indeterminate", class: `${mergedClsPrefix}-checkbox-icon` }, LineMark)) : (h("div", { key: "check", class: `${mergedClsPrefix}-checkbox-icon` }, CheckMark))
|
|
240
|
+
}),
|
|
241
|
+
h("div", { class: `${mergedClsPrefix}-checkbox-box__border` }))),
|
|
235
242
|
label !== null || $slots.default ? (h("span", { class: `${mergedClsPrefix}-checkbox__label`, id: labelId }, $slots.default ? $slots.default() : label)) : null));
|
|
236
243
|
}
|
|
237
244
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c, cB, cE, cM, insideModal, insidePopover } from '../../../_utils/cssr';
|
|
2
2
|
import iconSwitchTransition from '../../../_styles/transitions/icon-switch.cssr'; // vars:
|
|
3
|
+
// --n-label-line-height
|
|
3
4
|
// --n-bezier
|
|
4
5
|
// --n-size
|
|
5
6
|
// --n-border
|
|
@@ -24,14 +25,14 @@ import iconSwitchTransition from '../../../_styles/transitions/icon-switch.cssr'
|
|
|
24
25
|
// --n-label-padding
|
|
25
26
|
|
|
26
27
|
export default c([cB('checkbox', `
|
|
27
|
-
line-height:
|
|
28
|
+
line-height: var(--n-label-line-height);
|
|
28
29
|
font-size: var(--n-font-size);
|
|
29
30
|
outline: none;
|
|
30
31
|
cursor: pointer;
|
|
31
32
|
display: inline-flex;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
flex-wrap: nowrap;
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
word-break: break-word;
|
|
35
36
|
--n-merged-color-table: var(--n-color-table);
|
|
36
37
|
`, [c('&:hover', [cB('checkbox-box', [cE('border', {
|
|
37
38
|
border: 'var(--n-border-checked)'
|
|
@@ -77,16 +78,23 @@ c('.check-icon', `
|
|
|
77
78
|
fill: 'var(--n-check-mark-color-disabled)'
|
|
78
79
|
})])]), cE('label', {
|
|
79
80
|
color: 'var(--n-text-color-disabled)'
|
|
80
|
-
})]), cB('checkbox-box', `
|
|
81
|
+
})]), cB('checkbox-box-wrapper', `
|
|
82
|
+
position: relative;
|
|
83
|
+
width: var(--n-size);
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
flex-grow: 0;
|
|
86
|
+
`), cB('checkbox-box', `
|
|
87
|
+
position: absolute;
|
|
88
|
+
left: 0;
|
|
89
|
+
top: 50%;
|
|
90
|
+
transform: translateY(-50%);
|
|
81
91
|
height: var(--n-size);
|
|
82
92
|
width: var(--n-size);
|
|
83
93
|
display: inline-block;
|
|
84
94
|
box-sizing: border-box;
|
|
85
95
|
border-radius: var(--n-border-radius);
|
|
86
96
|
background-color: var(--n-color);
|
|
87
|
-
|
|
88
|
-
transition:
|
|
89
|
-
background-color 0.3s var(--n-bezier);
|
|
97
|
+
transition: background-color 0.3s var(--n-bezier);
|
|
90
98
|
`, [cE('border', `
|
|
91
99
|
transition:
|
|
92
100
|
border-color .3s var(--n-bezier),
|
|
@@ -2,8 +2,8 @@ import { changeColor } from 'seemly';
|
|
|
2
2
|
import { commonLight } from '../../_styles/common';
|
|
3
3
|
import commonVariables from './_common';
|
|
4
4
|
export const self = (vars) => {
|
|
5
|
-
const { baseColor, inputColorDisabled, cardColor, modalColor, popoverColor, textColorDisabled, borderColor, primaryColor, textColor2, fontSizeSmall, fontSizeMedium, fontSizeLarge, borderRadiusSmall } = vars;
|
|
6
|
-
return Object.assign(Object.assign({}, commonVariables), { fontSizeSmall,
|
|
5
|
+
const { baseColor, inputColorDisabled, cardColor, modalColor, popoverColor, textColorDisabled, borderColor, primaryColor, textColor2, fontSizeSmall, fontSizeMedium, fontSizeLarge, borderRadiusSmall, lineHeight } = vars;
|
|
6
|
+
return Object.assign(Object.assign({}, commonVariables), { labelLineHeight: lineHeight, fontSizeSmall,
|
|
7
7
|
fontSizeMedium,
|
|
8
8
|
fontSizeLarge, borderRadius: borderRadiusSmall, color: baseColor, colorChecked: primaryColor, colorDisabled: inputColorDisabled, colorDisabledChecked: inputColorDisabled, colorTableHeader: cardColor, colorTableHeaderModal: modalColor, colorTableHeaderPopover: popoverColor, checkMarkColor: baseColor, checkMarkColorDisabled: textColorDisabled, checkMarkColorDisabledChecked: textColorDisabled, border: `1px solid ${borderColor}`, borderDisabled: `1px solid ${borderColor}`, borderDisabledChecked: `1px solid ${borderColor}`, borderChecked: `1px solid ${primaryColor}`, borderFocus: `1px solid ${primaryColor}`, boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`, textColor: textColor2, textColorDisabled: textColorDisabled });
|
|
9
9
|
};
|
package/es/code/src/Code.js
CHANGED
|
@@ -92,7 +92,9 @@ export default defineComponent({
|
|
|
92
92
|
};
|
|
93
93
|
});
|
|
94
94
|
const themeClassHandle = inlineThemeDisabled
|
|
95
|
-
? useThemeClass('code',
|
|
95
|
+
? useThemeClass('code', computed(() => {
|
|
96
|
+
return `${props.internalFontSize || 'a'}`;
|
|
97
|
+
}), cssVarsRef, props)
|
|
96
98
|
: undefined;
|
|
97
99
|
return {
|
|
98
100
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -119,6 +119,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
119
119
|
arrowColor: string;
|
|
120
120
|
}, any>>>;
|
|
121
121
|
}, {
|
|
122
|
+
rtlEnabled: Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
122
123
|
mergedTheme: import("vue").ComputedRef<{
|
|
123
124
|
common: {
|
|
124
125
|
baseColor: string;
|
|
@@ -4,6 +4,7 @@ import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
|
4
4
|
import { call, createInjectionKey, warn } from '../../_utils';
|
|
5
5
|
import { collapseLight } from '../styles';
|
|
6
6
|
import style from './styles/index.cssr';
|
|
7
|
+
import useRtl from '../../_mixins/use-rtl';
|
|
7
8
|
const collapseProps = Object.assign(Object.assign({}, useTheme.props), { defaultExpandedNames: {
|
|
8
9
|
type: [Array, String],
|
|
9
10
|
default: null
|
|
@@ -33,7 +34,7 @@ export default defineComponent({
|
|
|
33
34
|
name: 'Collapse',
|
|
34
35
|
props: collapseProps,
|
|
35
36
|
setup(props, { slots }) {
|
|
36
|
-
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
37
|
+
const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props);
|
|
37
38
|
const uncontrolledExpandedNamesRef = ref(props.defaultExpandedNames);
|
|
38
39
|
const controlledExpandedNamesRef = computed(() => props.expandedNames);
|
|
39
40
|
const mergedExpandedNamesRef = useMergedState(controlledExpandedNamesRef, uncontrolledExpandedNamesRef);
|
|
@@ -98,6 +99,7 @@ export default defineComponent({
|
|
|
98
99
|
slots,
|
|
99
100
|
toggleItem
|
|
100
101
|
});
|
|
102
|
+
const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);
|
|
101
103
|
const cssVarsRef = computed(() => {
|
|
102
104
|
const { common: { cubicBezierEaseInOut }, self: { titleFontWeight, dividerColor, titleTextColor, textColor, arrowColor, fontSize, titleFontSize } } = themeRef.value;
|
|
103
105
|
return {
|
|
@@ -115,6 +117,7 @@ export default defineComponent({
|
|
|
115
117
|
? useThemeClass('collapse', undefined, cssVarsRef, props)
|
|
116
118
|
: undefined;
|
|
117
119
|
return {
|
|
120
|
+
rtlEnabled: rtlEnabledRef,
|
|
118
121
|
mergedTheme: themeRef,
|
|
119
122
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
120
123
|
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
@@ -125,6 +128,10 @@ export default defineComponent({
|
|
|
125
128
|
render() {
|
|
126
129
|
var _a;
|
|
127
130
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
128
|
-
return (h("div", { class: [
|
|
131
|
+
return (h("div", { class: [
|
|
132
|
+
`${this.mergedClsPrefix}-collapse`,
|
|
133
|
+
this.rtlEnabled && `${this.mergedClsPrefix}-collapse--rtl`,
|
|
134
|
+
this.themeClass
|
|
135
|
+
], style: this.cssVars }, this.$slots));
|
|
129
136
|
}
|
|
130
137
|
});
|
|
@@ -11,6 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
readonly name: PropType<string | number>;
|
|
12
12
|
readonly displayDirective: PropType<"show" | "if">;
|
|
13
13
|
}, {
|
|
14
|
+
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
14
15
|
collapseSlots: Readonly<{
|
|
15
16
|
[name: string]: import("vue").Slot | undefined;
|
|
16
17
|
}>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { h, defineComponent, inject, computed } from 'vue';
|
|
2
2
|
import { createId } from 'seemly';
|
|
3
3
|
import { useMemo } from 'vooks';
|
|
4
|
-
import { ChevronRightIcon as
|
|
4
|
+
import { ChevronRightIcon as ArrowRightIcon, ChevronLeftIcon as ArrowLeftIcon } from '../../_internal/icons';
|
|
5
5
|
import { NBaseIcon } from '../../_internal';
|
|
6
6
|
import { throwError } from '../../_utils';
|
|
7
7
|
import { collapseInjectionKey } from './Collapse';
|
|
8
8
|
import NCollapseItemContent from './CollapseItemContent';
|
|
9
|
+
import useRtl from '../../_mixins/use-rtl';
|
|
10
|
+
import { useConfig } from '../../_mixins';
|
|
9
11
|
const collapseItemProps = {
|
|
10
12
|
title: String,
|
|
11
13
|
name: [String, Number],
|
|
@@ -15,6 +17,7 @@ export default defineComponent({
|
|
|
15
17
|
name: 'CollapseItem',
|
|
16
18
|
props: collapseItemProps,
|
|
17
19
|
setup(props) {
|
|
20
|
+
const { mergedRtlRef } = useConfig(props);
|
|
18
21
|
const randomName = createId();
|
|
19
22
|
const mergedNameRef = useMemo(() => {
|
|
20
23
|
var _a;
|
|
@@ -37,7 +40,9 @@ export default defineComponent({
|
|
|
37
40
|
}
|
|
38
41
|
return true;
|
|
39
42
|
});
|
|
43
|
+
const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);
|
|
40
44
|
return {
|
|
45
|
+
rtlEnabled: rtlEnabledRef,
|
|
41
46
|
collapseSlots,
|
|
42
47
|
randomName,
|
|
43
48
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -78,8 +83,8 @@ export default defineComponent({
|
|
|
78
83
|
] },
|
|
79
84
|
h("div", { class: `${mergedClsPrefix}-collapse-item__header-main`, onClick: this.handleClick },
|
|
80
85
|
arrowPlacement === 'right' && headerNode,
|
|
81
|
-
h("div", { class: `${mergedClsPrefix}-collapse-item-arrow
|
|
82
|
-
default: (_a = collapseSlots.expandIcon) !== null && _a !== void 0 ? _a : (() => h(
|
|
86
|
+
h("div", { class: `${mergedClsPrefix}-collapse-item-arrow`, key: this.rtlEnabled ? 0 : 1 }, arrowSlot ? (arrowSlot({ collapsed })) : (h(NBaseIcon, { clsPrefix: mergedClsPrefix }, {
|
|
87
|
+
default: (_a = collapseSlots.expandIcon) !== null && _a !== void 0 ? _a : (() => this.rtlEnabled ? (h(ArrowLeftIcon, null)) : (h(ArrowRightIcon, null)))
|
|
83
88
|
}))),
|
|
84
89
|
arrowPlacement === 'left' && headerNode),
|
|
85
90
|
headerExtraSlot && (h("div", { class: `${mergedClsPrefix}-collapse-item__header-extra`, onClick: this.handleClick }, { default: headerExtraSlot }))),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cB, cE, cM } from '../../../_utils/cssr';
|
|
2
|
+
export default cB('collapse', [cM('rtl', `
|
|
3
|
+
direction: rtl;
|
|
4
|
+
`, [cB('collapse-item', [cB('collapse-item', {
|
|
5
|
+
marginRight: '32px',
|
|
6
|
+
marginLeft: 0
|
|
7
|
+
}), cM('left-arrow-placement', [cE('header', [cB('collapse-item-arrow', {
|
|
8
|
+
marginRight: 0,
|
|
9
|
+
marginLeft: '4px'
|
|
10
|
+
})])]), cM('right-arrow-placement', [cE('header', [cB('collapse-item-arrow', {
|
|
11
|
+
marginLeft: 0,
|
|
12
|
+
marginRight: '4px'
|
|
13
|
+
})])]), cM('active', [cE('header', [cM('active', [cB('collapse-item-arrow', {
|
|
14
|
+
transform: 'rotate(-90deg)'
|
|
15
|
+
})])])])])])]);
|
|
@@ -47,7 +47,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
47
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
48
48
|
cssVars: import("vue").ComputedRef<{
|
|
49
49
|
'--n-bezier': string;
|
|
50
|
-
}
|
|
50
|
+
}> | undefined;
|
|
51
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
52
|
+
onRender: (() => void) | undefined;
|
|
51
53
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
54
|
readonly show: {
|
|
53
55
|
readonly type: BooleanConstructor;
|