@koi-design/uxd-ui 14.0.2 → 14.0.4
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/components/Alert/Alert.mjs +10 -24
- package/es/components/Alert/Alert.mjs.map +1 -1
- package/es/components/Alert/Alert.type.d.ts +5 -7
- package/es/components/Alert/Alert.type.mjs +4 -7
- package/es/components/Alert/Alert.type.mjs.map +1 -1
- package/es/components/Alert/Alert.vue.d.ts +5 -15
- package/es/components/Alert/index.d.ts +9 -27
- package/es/components/Alert/index.mjs +1 -1
- package/es/components/Badge/Badge.mjs +3 -5
- package/es/components/Badge/Badge.mjs.map +1 -1
- package/es/components/Calendar/Calendar.vue.d.ts +2 -2
- package/es/components/Calendar/index.d.ts +6 -6
- package/es/components/DatePicker/DatePicker.vue.d.ts +14 -14
- package/es/components/DatePicker/Panel/DatePickerPanel.vue.d.ts +4 -4
- package/es/components/DatePicker/Panel/DateRangePanel.vue.d.ts +6 -6
- package/es/components/DatePicker/Panel/RangePart.vue.d.ts +2 -2
- package/es/components/DatePicker/Trigger/DateRangeInput.vue.d.ts +4 -4
- package/es/components/DatePicker/index.d.ts +28 -28
- package/es/components/Drawer/Drawer.d.ts +9 -0
- package/es/components/Drawer/Drawer.mjs +10 -8
- package/es/components/Drawer/Drawer.mjs.map +1 -1
- package/es/components/Drawer/Drawer.type.d.ts +4 -0
- package/es/components/Drawer/Drawer.type.mjs +4 -0
- package/es/components/Drawer/Drawer.type.mjs.map +1 -1
- package/es/components/Drawer/index.d.ts +15 -0
- package/es/components/Mask/Mask.d.ts +2 -1
- package/es/components/Mask/Mask.mjs +6 -2
- package/es/components/Mask/Mask.mjs.map +1 -1
- package/es/components/Mask/index.d.ts +5 -2
- package/es/components/Menu/MenuItem.vue.d.ts +33 -33
- package/es/components/Menu/index.d.ts +33 -33
- package/es/components/Message/Message.mjs +4 -3
- package/es/components/Message/Message.mjs.map +1 -1
- package/es/components/Message/Message.type.d.ts +1 -0
- package/es/components/Notice/Notice.mjs +15 -13
- package/es/components/Notice/Notice.mjs.map +1 -1
- package/es/components/Notice/Notice.type.d.ts +3 -2
- package/es/components/Notification/Notice.mjs +1 -5
- package/es/components/Notification/Notice.mjs.map +1 -1
- package/es/components/Notification/Notification.mjs.map +1 -1
- package/es/components/Rate/Rate.vue.d.ts +33 -33
- package/es/components/Rate/index.d.ts +66 -66
- package/es/components/Slider/Slider.d.ts +0 -20
- package/es/components/Slider/Slider.mjs +1 -2
- package/es/components/Slider/Slider.mjs.map +1 -1
- package/es/components/Slider/Slider.type.d.ts +0 -9
- package/es/components/Slider/Slider.type.mjs +0 -13
- package/es/components/Slider/Slider.type.mjs.map +1 -1
- package/es/components/Slider/index.d.ts +0 -33
- package/es/components/Statistic/Statistic.vue.d.ts +33 -33
- package/es/components/Statistic/index.d.ts +66 -66
- package/es/components/Table/BaseTable.vue.d.ts +132 -132
- package/es/components/Table/BodyTable.vue.d.ts +132 -132
- package/es/components/Table/HeadTable.vue.d.ts +132 -132
- package/es/components/Table/Table.vue.d.ts +264 -264
- package/es/components/Table/TableBox.vue.d.ts +264 -264
- package/es/components/Table/tableUnits/ExpandRows.vue.d.ts +33 -33
- package/es/components/Table/tableUnits/FilterDropdown.vue.d.ts +66 -66
- package/es/components/Table/tableUnits/SelectionCheckAll.vue.d.ts +66 -66
- package/es/components/Table/tableUnits/TableBody.vue.d.ts +66 -66
- package/es/components/Table/tableUnits/TableCell.vue.d.ts +33 -33
- package/es/components/Table/tableUnits/TableHeader.vue.d.ts +66 -66
- package/es/components/Table/tableUnits/TableHeaderRow.vue.d.ts +66 -66
- package/es/components/Table/tableUnits/TableRow.vue.d.ts +33 -33
- package/es/components/Tag/Tag.mjs +6 -9
- package/es/components/Tag/Tag.mjs.map +1 -1
- package/es/components/Tag/Tag.type.d.ts +0 -4
- package/es/components/Tag/Tag.type.mjs +0 -4
- package/es/components/Tag/Tag.type.mjs.map +1 -1
- package/es/components/Tag/Tag.vue.d.ts +7 -20
- package/es/components/Tag/index.d.ts +21 -48
- package/es/components/ThemePanel/ThemePanel.vue.d.ts +33 -33
- package/es/components/ThemePanel/index.d.ts +66 -66
- package/es/components/TimePicker/Panel/TimeRangePane.vue.d.ts +4 -4
- package/es/components/TimePicker/TimePicker.vue.d.ts +12 -12
- package/es/components/TimePicker/Trigger/TimeRangeInput.vue.d.ts +4 -4
- package/es/components/TimePicker/index.d.ts +28 -28
- package/es/components/Tooltip/Tooltip.mjs +84 -8
- package/es/components/Tooltip/Tooltip.mjs.map +1 -1
- package/es/components/Tooltip/Tooltip.type.d.ts +2 -2
- package/es/components/Tooltip/Tooltip.type.mjs +1 -3
- package/es/components/Tooltip/Tooltip.type.mjs.map +1 -1
- package/es/components/Tooltip/Tooltip.vue.d.ts +13 -13
- package/es/components/Tooltip/index.d.ts +33 -33
- package/es/components/TreeSelect/TreeSelect.vue.d.ts +1 -1
- package/es/components/TreeSelect/index.d.ts +3 -3
- package/es/components/index.mjs +1 -1
- package/es/index.mjs +1 -1
- package/lib/components/Alert/Alert.js +9 -23
- package/lib/components/Alert/Alert.js.map +1 -1
- package/lib/components/Alert/Alert.type.d.ts +5 -7
- package/lib/components/Alert/Alert.type.js +4 -6
- package/lib/components/Alert/Alert.type.js.map +1 -1
- package/lib/components/Alert/Alert.vue.d.ts +5 -15
- package/lib/components/Alert/index.d.ts +9 -27
- package/lib/components/Alert/index.js +1 -0
- package/lib/components/Alert/index.js.map +1 -1
- package/lib/components/Badge/Badge.js +3 -5
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Calendar/Calendar.vue.d.ts +2 -2
- package/lib/components/Calendar/index.d.ts +6 -6
- package/lib/components/DatePicker/DatePicker.vue.d.ts +14 -14
- package/lib/components/DatePicker/Panel/DatePickerPanel.vue.d.ts +4 -4
- package/lib/components/DatePicker/Panel/DateRangePanel.vue.d.ts +6 -6
- package/lib/components/DatePicker/Panel/RangePart.vue.d.ts +2 -2
- package/lib/components/DatePicker/Trigger/DateRangeInput.vue.d.ts +4 -4
- package/lib/components/DatePicker/index.d.ts +28 -28
- package/lib/components/Drawer/Drawer.d.ts +9 -0
- package/lib/components/Drawer/Drawer.js +10 -8
- package/lib/components/Drawer/Drawer.js.map +1 -1
- package/lib/components/Drawer/Drawer.type.d.ts +4 -0
- package/lib/components/Drawer/Drawer.type.js +4 -0
- package/lib/components/Drawer/Drawer.type.js.map +1 -1
- package/lib/components/Drawer/index.d.ts +15 -0
- package/lib/components/Mask/Mask.d.ts +2 -1
- package/lib/components/Mask/Mask.js +6 -2
- package/lib/components/Mask/Mask.js.map +1 -1
- package/lib/components/Mask/index.d.ts +5 -2
- package/lib/components/Menu/MenuItem.vue.d.ts +33 -33
- package/lib/components/Menu/index.d.ts +33 -33
- package/lib/components/Message/Message.js +4 -3
- package/lib/components/Message/Message.js.map +1 -1
- package/lib/components/Message/Message.type.d.ts +1 -0
- package/lib/components/Notice/Notice.js +15 -13
- package/lib/components/Notice/Notice.js.map +1 -1
- package/lib/components/Notice/Notice.type.d.ts +3 -2
- package/lib/components/Notification/Notice.js +1 -5
- package/lib/components/Notification/Notice.js.map +1 -1
- package/lib/components/Notification/Notification.js.map +1 -1
- package/lib/components/Rate/Rate.vue.d.ts +33 -33
- package/lib/components/Rate/index.d.ts +66 -66
- package/lib/components/Slider/Slider.d.ts +0 -20
- package/lib/components/Slider/Slider.js +1 -2
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.type.d.ts +0 -9
- package/lib/components/Slider/Slider.type.js +0 -13
- package/lib/components/Slider/Slider.type.js.map +1 -1
- package/lib/components/Slider/index.d.ts +0 -33
- package/lib/components/Statistic/Statistic.vue.d.ts +33 -33
- package/lib/components/Statistic/index.d.ts +66 -66
- package/lib/components/Table/BaseTable.vue.d.ts +132 -132
- package/lib/components/Table/BodyTable.vue.d.ts +132 -132
- package/lib/components/Table/HeadTable.vue.d.ts +132 -132
- package/lib/components/Table/Table.vue.d.ts +264 -264
- package/lib/components/Table/TableBox.vue.d.ts +264 -264
- package/lib/components/Table/tableUnits/ExpandRows.vue.d.ts +33 -33
- package/lib/components/Table/tableUnits/FilterDropdown.vue.d.ts +66 -66
- package/lib/components/Table/tableUnits/SelectionCheckAll.vue.d.ts +66 -66
- package/lib/components/Table/tableUnits/TableBody.vue.d.ts +66 -66
- package/lib/components/Table/tableUnits/TableCell.vue.d.ts +33 -33
- package/lib/components/Table/tableUnits/TableHeader.vue.d.ts +66 -66
- package/lib/components/Table/tableUnits/TableHeaderRow.vue.d.ts +66 -66
- package/lib/components/Table/tableUnits/TableRow.vue.d.ts +33 -33
- package/lib/components/Tag/Tag.js +6 -9
- package/lib/components/Tag/Tag.js.map +1 -1
- package/lib/components/Tag/Tag.type.d.ts +0 -4
- package/lib/components/Tag/Tag.type.js +0 -4
- package/lib/components/Tag/Tag.type.js.map +1 -1
- package/lib/components/Tag/Tag.vue.d.ts +7 -20
- package/lib/components/Tag/index.d.ts +21 -48
- package/lib/components/ThemePanel/ThemePanel.vue.d.ts +33 -33
- package/lib/components/ThemePanel/index.d.ts +66 -66
- package/lib/components/TimePicker/Panel/TimeRangePane.vue.d.ts +4 -4
- package/lib/components/TimePicker/TimePicker.vue.d.ts +12 -12
- package/lib/components/TimePicker/Trigger/TimeRangeInput.vue.d.ts +4 -4
- package/lib/components/TimePicker/index.d.ts +28 -28
- package/lib/components/Tooltip/Tooltip.js +84 -8
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.type.d.ts +2 -2
- package/lib/components/Tooltip/Tooltip.type.js +1 -3
- package/lib/components/Tooltip/Tooltip.type.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.vue.d.ts +13 -13
- package/lib/components/Tooltip/index.d.ts +33 -33
- package/lib/components/TreeSelect/TreeSelect.vue.d.ts +1 -1
- package/lib/components/TreeSelect/index.d.ts +3 -3
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/alert/index.css +1 -1
- package/styles/components/alert/index.less +51 -48
- package/styles/components/alert/var.less +8 -42
- package/styles/components/autoComplete/index.css +1 -1
- package/styles/components/avatar/index.css +1 -1
- package/styles/components/badge/index.css +1 -1
- package/styles/components/badge/index.less +14 -48
- package/styles/components/badge/var.less +7 -17
- package/styles/components/button/index.css +1 -1
- package/styles/components/carousel/index.css +1 -1
- package/styles/components/cascader/index.css +1 -1
- package/styles/components/datePicker/index.css +1 -1
- package/styles/components/drawer/index.css +1 -1
- package/styles/components/drawer/index.less +43 -49
- package/styles/components/drawer/var.less +7 -20
- package/styles/components/form/index.css +1 -1
- package/styles/components/icon/index.css +1 -1
- package/styles/components/input/index.css +1 -1
- package/styles/components/inputNumber/index.css +1 -1
- package/styles/components/link/index.css +1 -1
- package/styles/components/mentions/index.css +1 -1
- package/styles/components/message/index.css +1 -1
- package/styles/components/message/index.less +63 -30
- package/styles/components/message/var.less +6 -27
- package/styles/components/modal/index.css +1 -1
- package/styles/components/notice/index.css +1 -1
- package/styles/components/notice/index.less +93 -49
- package/styles/components/notice/var.less +10 -33
- package/styles/components/select/index.css +1 -1
- package/styles/components/slider/index.css +1 -1
- package/styles/components/slider/index.less +36 -156
- package/styles/components/slider/var.less +5 -33
- package/styles/components/spin/index.css +1 -1
- package/styles/components/tag/index.css +1 -1
- package/styles/components/tag/index.less +12 -25
- package/styles/components/tag/var.less +26 -84
- package/styles/components/timePicker/index.css +1 -1
- package/styles/components/tooltip/index.css +1 -1
- package/styles/components/tooltip/index.less +3 -55
- package/styles/components/tooltip/var.less +15 -14
- package/styles/cssVariable.css +1 -1
- package/styles/cssVariable.less +8 -10
- package/styles/index.css +1 -1
- package/styles/mixins/index.less +0 -1
- package/types/components/Alert/Alert.type.d.ts +5 -7
- package/types/components/Alert/Alert.vue.d.ts +5 -15
- package/types/components/Alert/index.d.ts +9 -27
- package/types/components/Calendar/Calendar.vue.d.ts +2 -2
- package/types/components/Calendar/index.d.ts +6 -6
- package/types/components/DatePicker/DatePicker.vue.d.ts +14 -14
- package/types/components/DatePicker/Panel/DatePickerPanel.vue.d.ts +4 -4
- package/types/components/DatePicker/Panel/DateRangePanel.vue.d.ts +6 -6
- package/types/components/DatePicker/Panel/RangePart.vue.d.ts +2 -2
- package/types/components/DatePicker/Trigger/DateRangeInput.vue.d.ts +4 -4
- package/types/components/DatePicker/index.d.ts +28 -28
- package/types/components/Drawer/Drawer.d.ts +9 -0
- package/types/components/Drawer/Drawer.type.d.ts +4 -0
- package/types/components/Drawer/index.d.ts +15 -0
- package/types/components/Mask/Mask.d.ts +2 -1
- package/types/components/Mask/index.d.ts +5 -2
- package/types/components/Menu/MenuItem.vue.d.ts +33 -33
- package/types/components/Menu/index.d.ts +33 -33
- package/types/components/Message/Message.type.d.ts +1 -0
- package/types/components/Notice/Notice.type.d.ts +3 -2
- package/types/components/Rate/Rate.vue.d.ts +33 -33
- package/types/components/Rate/index.d.ts +66 -66
- package/types/components/Slider/Slider.d.ts +0 -20
- package/types/components/Slider/Slider.type.d.ts +0 -9
- package/types/components/Slider/index.d.ts +0 -33
- package/types/components/Statistic/Statistic.vue.d.ts +33 -33
- package/types/components/Statistic/index.d.ts +66 -66
- package/types/components/Table/BaseTable.vue.d.ts +132 -132
- package/types/components/Table/BodyTable.vue.d.ts +132 -132
- package/types/components/Table/HeadTable.vue.d.ts +132 -132
- package/types/components/Table/Table.vue.d.ts +264 -264
- package/types/components/Table/TableBox.vue.d.ts +264 -264
- package/types/components/Table/tableUnits/ExpandRows.vue.d.ts +33 -33
- package/types/components/Table/tableUnits/FilterDropdown.vue.d.ts +66 -66
- package/types/components/Table/tableUnits/SelectionCheckAll.vue.d.ts +66 -66
- package/types/components/Table/tableUnits/TableBody.vue.d.ts +66 -66
- package/types/components/Table/tableUnits/TableCell.vue.d.ts +33 -33
- package/types/components/Table/tableUnits/TableHeader.vue.d.ts +66 -66
- package/types/components/Table/tableUnits/TableHeaderRow.vue.d.ts +66 -66
- package/types/components/Table/tableUnits/TableRow.vue.d.ts +33 -33
- package/types/components/Tag/Tag.type.d.ts +0 -4
- package/types/components/Tag/Tag.vue.d.ts +7 -20
- package/types/components/Tag/index.d.ts +21 -48
- package/types/components/ThemePanel/ThemePanel.vue.d.ts +33 -33
- package/types/components/ThemePanel/index.d.ts +66 -66
- package/types/components/TimePicker/Panel/TimeRangePane.vue.d.ts +4 -4
- package/types/components/TimePicker/TimePicker.vue.d.ts +12 -12
- package/types/components/TimePicker/Trigger/TimeRangeInput.vue.d.ts +4 -4
- package/types/components/TimePicker/index.d.ts +28 -28
- package/types/components/Tooltip/Tooltip.type.d.ts +2 -2
- package/types/components/Tooltip/Tooltip.vue.d.ts +13 -13
- package/types/components/Tooltip/index.d.ts +33 -33
- package/types/components/TreeSelect/TreeSelect.vue.d.ts +1 -1
- package/types/components/TreeSelect/index.d.ts +3 -3
- package/uxd-ui.css +1 -1
- package/uxd-ui.esm.min.mjs +6 -6
- package/uxd-ui.esm.mjs +152 -103
- package/uxd-ui.umd.js +151 -101
- package/uxd-ui.umd.min.js +6 -6
- package/styles/mixins/close.less +0 -12
|
@@ -64,7 +64,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
64
64
|
(value: number): Dayjs;
|
|
65
65
|
};
|
|
66
66
|
day: {
|
|
67
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
67
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
68
68
|
(value: number): Dayjs;
|
|
69
69
|
};
|
|
70
70
|
hour: {
|
|
@@ -153,7 +153,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
153
153
|
(value: number): Dayjs;
|
|
154
154
|
};
|
|
155
155
|
day: {
|
|
156
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
156
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
157
157
|
(value: number): Dayjs;
|
|
158
158
|
};
|
|
159
159
|
hour: {
|
|
@@ -243,7 +243,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
243
243
|
(value: number): Dayjs;
|
|
244
244
|
};
|
|
245
245
|
day: {
|
|
246
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
246
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
247
247
|
(value: number): Dayjs;
|
|
248
248
|
};
|
|
249
249
|
hour: {
|
|
@@ -332,7 +332,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
332
332
|
(value: number): Dayjs;
|
|
333
333
|
};
|
|
334
334
|
day: {
|
|
335
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
335
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
336
336
|
(value: number): Dayjs;
|
|
337
337
|
};
|
|
338
338
|
hour: {
|
|
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
80
80
|
(value: number): Dayjs;
|
|
81
81
|
};
|
|
82
82
|
day: {
|
|
83
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
83
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
84
84
|
(value: number): Dayjs;
|
|
85
85
|
};
|
|
86
86
|
hour: {
|
|
@@ -169,7 +169,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
169
169
|
(value: number): Dayjs;
|
|
170
170
|
};
|
|
171
171
|
day: {
|
|
172
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
172
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
173
173
|
(value: number): Dayjs;
|
|
174
174
|
};
|
|
175
175
|
hour: {
|
|
@@ -259,7 +259,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
259
259
|
(value: number): Dayjs;
|
|
260
260
|
};
|
|
261
261
|
day: {
|
|
262
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
262
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
263
263
|
(value: number): Dayjs;
|
|
264
264
|
};
|
|
265
265
|
hour: {
|
|
@@ -348,7 +348,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
348
348
|
(value: number): Dayjs;
|
|
349
349
|
};
|
|
350
350
|
day: {
|
|
351
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
351
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
352
352
|
(value: number): Dayjs;
|
|
353
353
|
};
|
|
354
354
|
hour: {
|
|
@@ -582,7 +582,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
582
582
|
(value: number): Dayjs;
|
|
583
583
|
};
|
|
584
584
|
day: {
|
|
585
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
585
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
586
586
|
(value: number): Dayjs;
|
|
587
587
|
};
|
|
588
588
|
hour: {
|
|
@@ -671,7 +671,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
671
671
|
(value: number): Dayjs;
|
|
672
672
|
};
|
|
673
673
|
day: {
|
|
674
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
674
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
675
675
|
(value: number): Dayjs;
|
|
676
676
|
};
|
|
677
677
|
hour: {
|
|
@@ -75,7 +75,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
75
75
|
(value: number): Dayjs;
|
|
76
76
|
};
|
|
77
77
|
day: {
|
|
78
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
78
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
79
79
|
(value: number): Dayjs;
|
|
80
80
|
};
|
|
81
81
|
hour: {
|
|
@@ -164,7 +164,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
164
164
|
(value: number): Dayjs;
|
|
165
165
|
};
|
|
166
166
|
day: {
|
|
167
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
167
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
168
168
|
(value: number): Dayjs;
|
|
169
169
|
};
|
|
170
170
|
hour: {
|
|
@@ -65,7 +65,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
65
65
|
(value: number): import("dayjs").Dayjs;
|
|
66
66
|
};
|
|
67
67
|
day: {
|
|
68
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
68
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
69
69
|
(value: number): import("dayjs").Dayjs;
|
|
70
70
|
};
|
|
71
71
|
hour: {
|
|
@@ -154,7 +154,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
154
154
|
(value: number): import("dayjs").Dayjs;
|
|
155
155
|
};
|
|
156
156
|
day: {
|
|
157
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
157
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
158
158
|
(value: number): import("dayjs").Dayjs;
|
|
159
159
|
};
|
|
160
160
|
hour: {
|
|
@@ -244,7 +244,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
244
244
|
(value: number): import("dayjs").Dayjs;
|
|
245
245
|
};
|
|
246
246
|
day: {
|
|
247
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
247
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
248
248
|
(value: number): import("dayjs").Dayjs;
|
|
249
249
|
};
|
|
250
250
|
hour: {
|
|
@@ -333,7 +333,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
333
333
|
(value: number): import("dayjs").Dayjs;
|
|
334
334
|
};
|
|
335
335
|
day: {
|
|
336
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
336
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
337
337
|
(value: number): import("dayjs").Dayjs;
|
|
338
338
|
};
|
|
339
339
|
hour: {
|
|
@@ -657,7 +657,7 @@ export declare const UDatePicker: {
|
|
|
657
657
|
(value: number): import("dayjs").Dayjs;
|
|
658
658
|
};
|
|
659
659
|
day: {
|
|
660
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
660
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
661
661
|
(value: number): import("dayjs").Dayjs;
|
|
662
662
|
};
|
|
663
663
|
hour: {
|
|
@@ -746,7 +746,7 @@ export declare const UDatePicker: {
|
|
|
746
746
|
(value: number): import("dayjs").Dayjs;
|
|
747
747
|
};
|
|
748
748
|
day: {
|
|
749
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
749
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
750
750
|
(value: number): import("dayjs").Dayjs;
|
|
751
751
|
};
|
|
752
752
|
hour: {
|
|
@@ -836,7 +836,7 @@ export declare const UDatePicker: {
|
|
|
836
836
|
(value: number): import("dayjs").Dayjs;
|
|
837
837
|
};
|
|
838
838
|
day: {
|
|
839
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
839
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
840
840
|
(value: number): import("dayjs").Dayjs;
|
|
841
841
|
};
|
|
842
842
|
hour: {
|
|
@@ -925,7 +925,7 @@ export declare const UDatePicker: {
|
|
|
925
925
|
(value: number): import("dayjs").Dayjs;
|
|
926
926
|
};
|
|
927
927
|
day: {
|
|
928
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
928
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
929
929
|
(value: number): import("dayjs").Dayjs;
|
|
930
930
|
};
|
|
931
931
|
hour: {
|
|
@@ -1264,7 +1264,7 @@ export declare const UDatePicker: {
|
|
|
1264
1264
|
(value: number): import("dayjs").Dayjs;
|
|
1265
1265
|
};
|
|
1266
1266
|
day: {
|
|
1267
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
1267
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
1268
1268
|
(value: number): import("dayjs").Dayjs;
|
|
1269
1269
|
};
|
|
1270
1270
|
hour: {
|
|
@@ -1353,7 +1353,7 @@ export declare const UDatePicker: {
|
|
|
1353
1353
|
(value: number): import("dayjs").Dayjs;
|
|
1354
1354
|
};
|
|
1355
1355
|
day: {
|
|
1356
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
1356
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
1357
1357
|
(value: number): import("dayjs").Dayjs;
|
|
1358
1358
|
};
|
|
1359
1359
|
hour: {
|
|
@@ -1443,7 +1443,7 @@ export declare const UDatePicker: {
|
|
|
1443
1443
|
(value: number): import("dayjs").Dayjs;
|
|
1444
1444
|
};
|
|
1445
1445
|
day: {
|
|
1446
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
1446
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
1447
1447
|
(value: number): import("dayjs").Dayjs;
|
|
1448
1448
|
};
|
|
1449
1449
|
hour: {
|
|
@@ -1532,7 +1532,7 @@ export declare const UDatePicker: {
|
|
|
1532
1532
|
(value: number): import("dayjs").Dayjs;
|
|
1533
1533
|
};
|
|
1534
1534
|
day: {
|
|
1535
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
1535
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
1536
1536
|
(value: number): import("dayjs").Dayjs;
|
|
1537
1537
|
};
|
|
1538
1538
|
hour: {
|
|
@@ -4433,7 +4433,7 @@ export declare const UDatePicker: {
|
|
|
4433
4433
|
(value: number): import("dayjs").Dayjs;
|
|
4434
4434
|
};
|
|
4435
4435
|
day: {
|
|
4436
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
4436
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
4437
4437
|
(value: number): import("dayjs").Dayjs;
|
|
4438
4438
|
};
|
|
4439
4439
|
hour: {
|
|
@@ -4522,7 +4522,7 @@ export declare const UDatePicker: {
|
|
|
4522
4522
|
(value: number): import("dayjs").Dayjs;
|
|
4523
4523
|
};
|
|
4524
4524
|
day: {
|
|
4525
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
4525
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
4526
4526
|
(value: number): import("dayjs").Dayjs;
|
|
4527
4527
|
};
|
|
4528
4528
|
hour: {
|
|
@@ -4612,7 +4612,7 @@ export declare const UDatePicker: {
|
|
|
4612
4612
|
(value: number): import("dayjs").Dayjs;
|
|
4613
4613
|
};
|
|
4614
4614
|
day: {
|
|
4615
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
4615
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
4616
4616
|
(value: number): import("dayjs").Dayjs;
|
|
4617
4617
|
};
|
|
4618
4618
|
hour: {
|
|
@@ -4701,7 +4701,7 @@ export declare const UDatePicker: {
|
|
|
4701
4701
|
(value: number): import("dayjs").Dayjs;
|
|
4702
4702
|
};
|
|
4703
4703
|
day: {
|
|
4704
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
4704
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
4705
4705
|
(value: number): import("dayjs").Dayjs;
|
|
4706
4706
|
};
|
|
4707
4707
|
hour: {
|
|
@@ -4935,7 +4935,7 @@ export declare const UDatePicker: {
|
|
|
4935
4935
|
(value: number): import("dayjs").Dayjs;
|
|
4936
4936
|
};
|
|
4937
4937
|
day: {
|
|
4938
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
4938
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
4939
4939
|
(value: number): import("dayjs").Dayjs;
|
|
4940
4940
|
};
|
|
4941
4941
|
hour: {
|
|
@@ -5024,7 +5024,7 @@ export declare const UDatePicker: {
|
|
|
5024
5024
|
(value: number): import("dayjs").Dayjs;
|
|
5025
5025
|
};
|
|
5026
5026
|
day: {
|
|
5027
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
5027
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
5028
5028
|
(value: number): import("dayjs").Dayjs;
|
|
5029
5029
|
};
|
|
5030
5030
|
hour: {
|
|
@@ -7906,7 +7906,7 @@ export declare const UDatePicker: {
|
|
|
7906
7906
|
(value: number): import("dayjs").Dayjs;
|
|
7907
7907
|
};
|
|
7908
7908
|
day: {
|
|
7909
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
7909
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
7910
7910
|
(value: number): import("dayjs").Dayjs;
|
|
7911
7911
|
};
|
|
7912
7912
|
hour: {
|
|
@@ -7995,7 +7995,7 @@ export declare const UDatePicker: {
|
|
|
7995
7995
|
(value: number): import("dayjs").Dayjs;
|
|
7996
7996
|
};
|
|
7997
7997
|
day: {
|
|
7998
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
7998
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
7999
7999
|
(value: number): import("dayjs").Dayjs;
|
|
8000
8000
|
};
|
|
8001
8001
|
hour: {
|
|
@@ -8085,7 +8085,7 @@ export declare const UDatePicker: {
|
|
|
8085
8085
|
(value: number): import("dayjs").Dayjs;
|
|
8086
8086
|
};
|
|
8087
8087
|
day: {
|
|
8088
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
8088
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
8089
8089
|
(value: number): import("dayjs").Dayjs;
|
|
8090
8090
|
};
|
|
8091
8091
|
hour: {
|
|
@@ -8174,7 +8174,7 @@ export declare const UDatePicker: {
|
|
|
8174
8174
|
(value: number): import("dayjs").Dayjs;
|
|
8175
8175
|
};
|
|
8176
8176
|
day: {
|
|
8177
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
8177
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
8178
8178
|
(value: number): import("dayjs").Dayjs;
|
|
8179
8179
|
};
|
|
8180
8180
|
hour: {
|
|
@@ -8513,7 +8513,7 @@ export declare const UDatePicker: {
|
|
|
8513
8513
|
(value: number): import("dayjs").Dayjs;
|
|
8514
8514
|
};
|
|
8515
8515
|
day: {
|
|
8516
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
8516
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
8517
8517
|
(value: number): import("dayjs").Dayjs;
|
|
8518
8518
|
};
|
|
8519
8519
|
hour: {
|
|
@@ -8602,7 +8602,7 @@ export declare const UDatePicker: {
|
|
|
8602
8602
|
(value: number): import("dayjs").Dayjs;
|
|
8603
8603
|
};
|
|
8604
8604
|
day: {
|
|
8605
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
8605
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
8606
8606
|
(value: number): import("dayjs").Dayjs;
|
|
8607
8607
|
};
|
|
8608
8608
|
hour: {
|
|
@@ -8692,7 +8692,7 @@ export declare const UDatePicker: {
|
|
|
8692
8692
|
(value: number): import("dayjs").Dayjs;
|
|
8693
8693
|
};
|
|
8694
8694
|
day: {
|
|
8695
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
8695
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
8696
8696
|
(value: number): import("dayjs").Dayjs;
|
|
8697
8697
|
};
|
|
8698
8698
|
hour: {
|
|
@@ -8781,7 +8781,7 @@ export declare const UDatePicker: {
|
|
|
8781
8781
|
(value: number): import("dayjs").Dayjs;
|
|
8782
8782
|
};
|
|
8783
8783
|
day: {
|
|
8784
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
8784
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
8785
8785
|
(value: number): import("dayjs").Dayjs;
|
|
8786
8786
|
};
|
|
8787
8787
|
hour: {
|
|
@@ -11682,7 +11682,7 @@ export declare const UDatePicker: {
|
|
|
11682
11682
|
(value: number): import("dayjs").Dayjs;
|
|
11683
11683
|
};
|
|
11684
11684
|
day: {
|
|
11685
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
11685
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
11686
11686
|
(value: number): import("dayjs").Dayjs;
|
|
11687
11687
|
};
|
|
11688
11688
|
hour: {
|
|
@@ -11771,7 +11771,7 @@ export declare const UDatePicker: {
|
|
|
11771
11771
|
(value: number): import("dayjs").Dayjs;
|
|
11772
11772
|
};
|
|
11773
11773
|
day: {
|
|
11774
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
11774
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
11775
11775
|
(value: number): import("dayjs").Dayjs;
|
|
11776
11776
|
};
|
|
11777
11777
|
hour: {
|
|
@@ -11861,7 +11861,7 @@ export declare const UDatePicker: {
|
|
|
11861
11861
|
(value: number): import("dayjs").Dayjs;
|
|
11862
11862
|
};
|
|
11863
11863
|
day: {
|
|
11864
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
11864
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
11865
11865
|
(value: number): import("dayjs").Dayjs;
|
|
11866
11866
|
};
|
|
11867
11867
|
hour: {
|
|
@@ -11950,7 +11950,7 @@ export declare const UDatePicker: {
|
|
|
11950
11950
|
(value: number): import("dayjs").Dayjs;
|
|
11951
11951
|
};
|
|
11952
11952
|
day: {
|
|
11953
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
11953
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
11954
11954
|
(value: number): import("dayjs").Dayjs;
|
|
11955
11955
|
};
|
|
11956
11956
|
hour: {
|
|
@@ -12184,7 +12184,7 @@ export declare const UDatePicker: {
|
|
|
12184
12184
|
(value: number): import("dayjs").Dayjs;
|
|
12185
12185
|
};
|
|
12186
12186
|
day: {
|
|
12187
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
12187
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
12188
12188
|
(value: number): import("dayjs").Dayjs;
|
|
12189
12189
|
};
|
|
12190
12190
|
hour: {
|
|
@@ -12273,7 +12273,7 @@ export declare const UDatePicker: {
|
|
|
12273
12273
|
(value: number): import("dayjs").Dayjs;
|
|
12274
12274
|
};
|
|
12275
12275
|
day: {
|
|
12276
|
-
(): 0 | 2 | 1 | 4 | 3 | 5
|
|
12276
|
+
(): 0 | 2 | 1 | 6 | 4 | 3 | 5;
|
|
12277
12277
|
(value: number): import("dayjs").Dayjs;
|
|
12278
12278
|
};
|
|
12279
12279
|
hour: {
|
|
@@ -27,6 +27,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
default: string;
|
|
29
29
|
};
|
|
30
|
+
description: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
30
34
|
closable: {
|
|
31
35
|
type: BooleanConstructor;
|
|
32
36
|
default: boolean;
|
|
@@ -105,6 +109,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
105
109
|
type: StringConstructor;
|
|
106
110
|
default: string;
|
|
107
111
|
};
|
|
112
|
+
description: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
108
116
|
closable: {
|
|
109
117
|
type: BooleanConstructor;
|
|
110
118
|
default: boolean;
|
|
@@ -156,6 +164,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
156
164
|
"onUpdate:visible"?: (v: boolean) => any;
|
|
157
165
|
"onAfter-visible-change"?: (v: boolean) => any;
|
|
158
166
|
}>, {
|
|
167
|
+
description: string;
|
|
159
168
|
visible: boolean;
|
|
160
169
|
title: string;
|
|
161
170
|
size: "default" | "large";
|
|
@@ -226,20 +226,22 @@ var Drawer = defineComponent({
|
|
|
226
226
|
const renderDrawer = lazyRender(() => {
|
|
227
227
|
const renderConrent = () => {
|
|
228
228
|
var _a;
|
|
229
|
-
return createVNode(Fragment, null, [createVNode("
|
|
230
|
-
"ref": headerRef,
|
|
231
|
-
"class": `${prefixCls.value}-header`,
|
|
232
|
-
"style": props.headerStyle
|
|
233
|
-
}, [createVNode("h2", {
|
|
234
|
-
"class": `${prefixCls.value}-header-title`
|
|
235
|
-
}, [slots.title ? slots.title() : props.title]), props.closable && createVNode("button", {
|
|
229
|
+
return createVNode(Fragment, null, [props.closable && createVNode("button", {
|
|
236
230
|
"class": `${prefixCls.value}-close`,
|
|
237
231
|
"onClick": () => handleClose("close")
|
|
238
232
|
}, [createVNode(UIcon, {
|
|
239
233
|
"class": `${prefixCls.value}-close-icon`
|
|
240
234
|
}, {
|
|
241
235
|
default: () => [createVNode(X, null, null)]
|
|
242
|
-
})])
|
|
236
|
+
})]), createVNode("div", {
|
|
237
|
+
"ref": headerRef,
|
|
238
|
+
"class": `${prefixCls.value}-header`,
|
|
239
|
+
"style": props.headerStyle
|
|
240
|
+
}, [createVNode("h2", {
|
|
241
|
+
"class": `${prefixCls.value}-header-title`
|
|
242
|
+
}, [slots.title ? slots.title() : props.title]), props.description && createVNode("p", {
|
|
243
|
+
"class": `${prefixCls.value}-header-description`
|
|
244
|
+
}, [props.description])]), createVNode("div", {
|
|
243
245
|
"class": `${prefixCls.value}-body`,
|
|
244
246
|
"style": {
|
|
245
247
|
...props.bodyStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.mjs","sources":["../../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import {\n defineComponent,\n watch,\n computed,\n ref,\n provide,\n inject,\n // onMounted,\n onBeforeUnmount,\n onActivated,\n onDeactivated,\n nextTick,\n Teleport,\n Transition,\n onMounted\n} from 'vue';\nimport type { CSSProperties } from 'vue';\nimport { X } from 'lucide-vue-next';\nimport UIcon from '@uxd-ui/components/Icon';\nimport Mask from '../Mask';\nimport KeyCode from '../../utils/KeyCode';\nimport { useGlobalConfig, useLazyRender, useShouldRender } from '../base/hooks';\nimport { setBodyStyle, isValid } from '../../utils';\nimport { drawerProps, drawerEmits, type ChangeTranslateFunction, type DrawerCloseType } from './Drawer.type';\n\nlet visibleCount = 0;\nconst drawerGlobalZIndex = 1000;\n\nexport default defineComponent({\n name: 'UDrawer',\n inheritAttrs: false,\n props: drawerProps,\n emits: drawerEmits,\n setup(props, { emit, attrs, slots }) {\n let openStatus = false;\n let shouldReopen = false;\n const { prefixCls } = useGlobalConfig('drawer');\n const selfVisible = ref(props.visible);\n const zIndex = ref<number>(drawerGlobalZIndex);\n const animationEnd = ref(false);\n const isMounted = ref(false);\n\n const wrapRef = ref<HTMLElement | null>(null);\n const headerRef = ref<HTMLElement | null>(null);\n const footerRef = ref<HTMLElement | null>(null);\n\n const lazyRender = useLazyRender(() => props.visible || !props.lazyRender);\n\n const open = () => {\n if (!openStatus) {\n if (props.zIndex !== undefined) {\n zIndex.value = +props.zIndex;\n }\n openStatus = true;\n // zIndex.value = ++drawerGlobalZIndex;\n }\n };\n\n watch(\n () => props.visible,\n (val) => {\n selfVisible.value = val;\n if (val && !openStatus) {\n open();\n if (attrs.tabindex === 0) {\n nextTick(() => {\n wrapRef.value?.focus();\n });\n }\n }\n if (!val && openStatus) {\n openStatus = false;\n }\n }\n );\n\n const handleClose = (type: DrawerCloseType) => {\n selfVisible.value = false;\n openStatus = false;\n emit('update:visible', false);\n emit('close', type);\n };\n\n /**\n * @param {*}\n * @return {*}\n * @description mask close method\n */\n const handleMaskClose = () => {\n if (props.maskClosable) {\n handleClose('mask');\n }\n };\n\n /**\n * In case drawer might has child drawer component,\n * we need to translate parent drawer to tell them apart\n */\n const drawerLevel = ref(1);\n\n const changeTrans = (val: boolean) => {\n if (val) {\n drawerLevel.value += 1;\n } else if (drawerLevel.value > 1) {\n drawerLevel.value -= 1;\n }\n };\n\n provide('changeParentTrans', changeTrans);\n\n const changeParentTrans = inject<ChangeTranslateFunction | null>('changeParentTrans', null);\n\n const changeBodyOverflow = (val: boolean) => {\n if (visibleCount > 0 && val) {\n setBodyStyle(true);\n } else if (!visibleCount) {\n setBodyStyle(false);\n }\n };\n\n const bodyHeight = ref<string>('');\n\n const calcBodyHeight = () => {\n const headerFooter = Number(headerRef.value?.offsetHeight || 0) + Number(footerRef.value?.offsetHeight || 0);\n bodyHeight.value = `calc(100% - ${headerFooter}px)`;\n };\n\n const observer = new MutationObserver(calcBodyHeight);\n\n let init = false;\n watch(\n selfVisible,\n (val) => {\n if (changeParentTrans) {\n changeParentTrans(val);\n }\n if (props.parentDom === 'body') {\n if (val) {\n visibleCount += 1;\n } else if (init) {\n visibleCount -= 1;\n }\n if (init) {\n changeBodyOverflow(val);\n }\n }\n init = true;\n if (val) {\n nextTick(() => {\n calcBodyHeight();\n const config = { attributes: true, childList: true, subtree: true };\n if (wrapRef.value) {\n observer.observe(wrapRef.value as any, config);\n }\n });\n } else {\n observer.disconnect();\n }\n },\n { immediate: true }\n );\n\n const toDom = computed(() => {\n if (!props.parentDom) {\n return 'body';\n }\n if (typeof props.parentDom === 'function') {\n return props.parentDom() || 'body';\n }\n return props.parentDom;\n });\n\n const positionStyle = computed(() => {\n const style: CSSProperties = {};\n if (toDom.value !== 'body') {\n style.position = 'absolute';\n }\n return style;\n });\n\n const wrapStyle = computed(() => {\n const style: CSSProperties = {\n zIndex: zIndex.value\n };\n\n if (isValid(props.duration)) {\n style.transitionDuration = `${props.duration}s`;\n }\n\n const place = props.placement;\n let translate = 'none';\n let widthStyle: number | undefined = props.width;\n let heightStyle: number | undefined = props.height;\n if (place === 'left' || place === 'right') {\n translate = `translate(${place === 'left' ? 180 : -180}px, 0)`;\n heightStyle = undefined;\n }\n\n if (place === 'top' || place === 'bottom') {\n translate = `translateY(${place === 'top' ? 180 : -180}px)`;\n widthStyle = undefined;\n }\n\n style.width = widthStyle && `${widthStyle}px`;\n style.height = heightStyle && `${heightStyle}px`;\n style.transform = drawerLevel.value > 1 ? translate : undefined;\n style.zIndex = zIndex.value;\n\n return style;\n });\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onBeforeUnmount(() => {\n observer.disconnect();\n if (changeParentTrans && selfVisible.value) {\n changeParentTrans(false);\n }\n if (props.parentDom === 'body') {\n if (selfVisible.value) {\n visibleCount = visibleCount > 0 ? visibleCount - 1 : visibleCount;\n changeBodyOverflow(false);\n }\n }\n });\n\n onActivated(() => {\n if (shouldReopen) {\n emit('update:visible', true);\n shouldReopen = false;\n }\n });\n\n onDeactivated(() => {\n observer.disconnect();\n if (selfVisible.value) {\n handleClose('close');\n shouldReopen = true;\n }\n });\n\n /**\n * @param {event} e\n * @return {*}\n * @description handle key down event, to close drawer\n */\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.keyCode === KeyCode.ESC && props.escClosable) {\n handleClose('esc');\n }\n };\n\n /**\n * @param {*}\n * @return {*}\n * @description after transition animation end, invoke callback and desdroy wrap\n */\n const handleAnimationEnd = () => {\n // if (wrapRef.value === e.target && e.animationName.match(/^drawerSlide/)) {\n // emit('after-visible-change', selfVisible.value);\n // animationEnd.value = !selfVisible.value;\n // }\n emit('after-visible-change', selfVisible.value);\n animationEnd.value = !selfVisible.value;\n };\n\n const renderMask = () => {\n if (props.showMask) {\n return (\n <Mask\n show={props.visible}\n zIndex={zIndex.value - 1}\n duration={props.duration}\n customStyle={{ ...props.maskStyle, ...positionStyle.value }}\n class={props.maskClass}\n onClick={handleMaskClose}\n />\n );\n }\n };\n\n const renderDrawer = lazyRender(() => {\n const renderConrent = () => (\n <>\n <div ref={headerRef} class={`${prefixCls.value}-header`} style={props.headerStyle}>\n <h2 class={`${prefixCls.value}-header-title`}>{slots.title ? slots.title() : props.title}</h2>\n {props.closable && (\n <button class={`${prefixCls.value}-close`} onClick={() => handleClose('close')}>\n <UIcon class={`${prefixCls.value}-close-icon`}>\n <X />\n </UIcon>\n </button>\n )}\n </div>\n <div class={`${prefixCls.value}-body`} style={{ ...props.bodyStyle, height: bodyHeight.value }}>\n {slots.default?.()}\n </div>\n {slots.footer ? (\n <div ref={footerRef} class={`${prefixCls.value}-footer`} style={props.footerStyle}>\n {slots.footer()}\n </div>\n ) : null}\n </>\n );\n\n return (\n <div\n v-show={selfVisible.value}\n ref={wrapRef}\n class={[prefixCls.value, props.className, `${prefixCls.value}-${props.placement}`, `${prefixCls.value}-${props.size}`]}\n style={{ ...wrapStyle.value, ...positionStyle.value }}\n {...attrs}\n tabindex={-1}\n onKeydown={handleKeyDown}\n >\n {useShouldRender(props.visible, props.destroyOnClose, animationEnd.value, renderConrent)}\n </div>\n );\n });\n\n return () =>\n isMounted.value ? (\n <Teleport to={toDom.value}>\n <Transition\n v-slots={{ default: renderDrawer }}\n name={props.transition || `drawer-slide-${props.placement}`}\n appear={props.transitionAppear}\n onAfterEnter={handleAnimationEnd}\n onAfterLeave={handleAnimationEnd}\n />\n {renderMask()}\n </Teleport>\n ) : null;\n }\n});\n"],"names":["visibleCount","drawerGlobalZIndex","defineComponent","name","inheritAttrs","props","drawerProps","emits","drawerEmits","setup","emit","attrs","slots","openStatus","shouldReopen","prefixCls","useGlobalConfig","selfVisible","ref","visible","zIndex","animationEnd","isMounted","wrapRef","headerRef","footerRef","lazyRender","useLazyRender","open","undefined","value","watch","val","tabindex","nextTick","focus","handleClose","type","handleMaskClose","maskClosable","drawerLevel","changeTrans","provide","changeParentTrans","inject","changeBodyOverflow","setBodyStyle","bodyHeight","calcBodyHeight","headerFooter","Number","offsetHeight","observer","MutationObserver","init","parentDom","config","attributes","childList","subtree","observe","disconnect","immediate","toDom","computed","positionStyle","style","position","wrapStyle","isValid","duration","transitionDuration","place","placement","translate","widthStyle","width","heightStyle","height","transform","onMounted","onBeforeUnmount","onActivated","onDeactivated","handleKeyDown","e","keyCode","KeyCode","ESC","escClosable","handleAnimationEnd","renderMask","showMask","_createVNode","Mask","maskStyle","maskClass","renderDrawer","renderConrent","_Fragment","headerStyle","title","closable","onClick","UIcon","default","X","bodyStyle","footer","footerStyle","_withDirectives","_mergeProps","className","size","useShouldRender","destroyOnClose","_vShow","Teleport","Transition","transition","transitionAppear"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAIA,eAAe;AACnB,MAAMC,qBAAqB;AAE3B,aAAeC,gBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOC;AAAAA,EACPC,OAAOC;AAAAA,EACPC,MAAMJ,OAAO;AAAA,IAAEK;AAAAA,IAAMC;AAAAA,IAAOC;AAAAA,KAAS;AACnC,QAAIC,aAAa;AACjB,QAAIC,eAAe;AACnB,UAAM;AAAA,MAAEC;AAAAA,QAAcC,gBAAgB,QAAQ;AAC9C,UAAMC,cAAcC,IAAIb,MAAMc,OAAO;AACrC,UAAMC,SAASF,IAAYjB,kBAAkB;AAC7C,UAAMoB,eAAeH,IAAI,KAAK;AAC9B,UAAMI,YAAYJ,IAAI,KAAK;AAE3B,UAAMK,UAAUL,IAAwB,IAAI;AAC5C,UAAMM,YAAYN,IAAwB,IAAI;AAC9C,UAAMO,YAAYP,IAAwB,IAAI;AAE9C,UAAMQ,aAAaC,cAAc,MAAMtB,MAAMc,WAAW,CAACd,MAAMqB,UAAU;AAEzE,UAAME,OAAOA,MAAM;AACjB,UAAI,CAACf,YAAY;AACf,YAAIR,MAAMe,WAAWS,QAAW;AAC9BT,iBAAOU,QAAQ,CAACzB,MAAMe;AAAAA;AAExBP,qBAAa;AAAA;AAEf;AAGFkB,UACE,MAAM1B,MAAMc,SACXa,SAAQ;AACPf,kBAAYa,QAAQE;A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gBAAgB9F,aAAaS,OAAOoE,aAAa,CAAC,MAAAkB,OARhFnG,YAAYa,KAAK;KAW9B;AAED,WAAO,MACLR,UAAUQ,QAAK+D,YAAAwB;MAAA,MACCtD,MAAMjC;AAAAA;MAAK2E,SAAAA,OAAAZ,YAAAyB;QAAA,QAGfjH,MAAMkH,cAAc,gBAAgBlH,MAAMoE;AAAAA,QAAW,UACnDpE,MAAMmH;AAAAA,QAAgB,gBAChB9B;AAAAA,QAAkB,gBAClBA;AAAAA,SAJL;AAAA,QAAEe,SAASR;AAAAA,OAAc,GAMnCN,YAAY;AAAA,SAEb;AAAA;AAEV,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"Drawer.mjs","sources":["../../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import {\n defineComponent,\n watch,\n computed,\n ref,\n provide,\n inject,\n // onMounted,\n onBeforeUnmount,\n onActivated,\n onDeactivated,\n nextTick,\n Teleport,\n Transition,\n onMounted\n} from 'vue';\nimport type { CSSProperties } from 'vue';\nimport { X } from 'lucide-vue-next';\nimport UIcon from '@uxd-ui/components/Icon';\nimport Mask from '../Mask';\nimport KeyCode from '../../utils/KeyCode';\nimport { useGlobalConfig, useLazyRender, useShouldRender } from '../base/hooks';\nimport { setBodyStyle, isValid } from '../../utils';\nimport { drawerProps, drawerEmits, type ChangeTranslateFunction, type DrawerCloseType } from './Drawer.type';\n\nlet visibleCount = 0;\nconst drawerGlobalZIndex = 1000;\n\nexport default defineComponent({\n name: 'UDrawer',\n inheritAttrs: false,\n props: drawerProps,\n emits: drawerEmits,\n setup(props, { emit, attrs, slots }) {\n let openStatus = false;\n let shouldReopen = false;\n const { prefixCls } = useGlobalConfig('drawer');\n const selfVisible = ref(props.visible);\n const zIndex = ref<number>(drawerGlobalZIndex);\n const animationEnd = ref(false);\n const isMounted = ref(false);\n\n const wrapRef = ref<HTMLElement | null>(null);\n const headerRef = ref<HTMLElement | null>(null);\n const footerRef = ref<HTMLElement | null>(null);\n\n const lazyRender = useLazyRender(() => props.visible || !props.lazyRender);\n\n const open = () => {\n if (!openStatus) {\n if (props.zIndex !== undefined) {\n zIndex.value = +props.zIndex;\n }\n openStatus = true;\n // zIndex.value = ++drawerGlobalZIndex;\n }\n };\n\n watch(\n () => props.visible,\n (val) => {\n selfVisible.value = val;\n if (val && !openStatus) {\n open();\n if (attrs.tabindex === 0) {\n nextTick(() => {\n wrapRef.value?.focus();\n });\n }\n }\n if (!val && openStatus) {\n openStatus = false;\n }\n }\n );\n\n const handleClose = (type: DrawerCloseType) => {\n selfVisible.value = false;\n openStatus = false;\n emit('update:visible', false);\n emit('close', type);\n };\n\n /**\n * @param {*}\n * @return {*}\n * @description mask close method\n */\n const handleMaskClose = () => {\n if (props.maskClosable) {\n handleClose('mask');\n }\n };\n\n /**\n * In case drawer might has child drawer component,\n * we need to translate parent drawer to tell them apart\n */\n const drawerLevel = ref(1);\n\n const changeTrans = (val: boolean) => {\n if (val) {\n drawerLevel.value += 1;\n } else if (drawerLevel.value > 1) {\n drawerLevel.value -= 1;\n }\n };\n\n provide('changeParentTrans', changeTrans);\n\n const changeParentTrans = inject<ChangeTranslateFunction | null>('changeParentTrans', null);\n\n const changeBodyOverflow = (val: boolean) => {\n if (visibleCount > 0 && val) {\n setBodyStyle(true);\n } else if (!visibleCount) {\n setBodyStyle(false);\n }\n };\n\n const bodyHeight = ref<string>('');\n\n const calcBodyHeight = () => {\n const headerFooter = Number(headerRef.value?.offsetHeight || 0) + Number(footerRef.value?.offsetHeight || 0);\n bodyHeight.value = `calc(100% - ${headerFooter}px)`;\n };\n\n const observer = new MutationObserver(calcBodyHeight);\n\n let init = false;\n watch(\n selfVisible,\n (val) => {\n if (changeParentTrans) {\n changeParentTrans(val);\n }\n if (props.parentDom === 'body') {\n if (val) {\n visibleCount += 1;\n } else if (init) {\n visibleCount -= 1;\n }\n if (init) {\n changeBodyOverflow(val);\n }\n }\n init = true;\n if (val) {\n nextTick(() => {\n calcBodyHeight();\n const config = { attributes: true, childList: true, subtree: true };\n if (wrapRef.value) {\n observer.observe(wrapRef.value as any, config);\n }\n });\n } else {\n observer.disconnect();\n }\n },\n { immediate: true }\n );\n\n const toDom = computed(() => {\n if (!props.parentDom) {\n return 'body';\n }\n if (typeof props.parentDom === 'function') {\n return props.parentDom() || 'body';\n }\n return props.parentDom;\n });\n\n const positionStyle = computed(() => {\n const style: CSSProperties = {};\n if (toDom.value !== 'body') {\n style.position = 'absolute';\n }\n return style;\n });\n\n const wrapStyle = computed(() => {\n const style: CSSProperties = {\n zIndex: zIndex.value\n };\n\n if (isValid(props.duration)) {\n style.transitionDuration = `${props.duration}s`;\n }\n\n const place = props.placement;\n let translate = 'none';\n let widthStyle: number | undefined = props.width;\n let heightStyle: number | undefined = props.height;\n if (place === 'left' || place === 'right') {\n translate = `translate(${place === 'left' ? 180 : -180}px, 0)`;\n heightStyle = undefined;\n }\n\n if (place === 'top' || place === 'bottom') {\n translate = `translateY(${place === 'top' ? 180 : -180}px)`;\n widthStyle = undefined;\n }\n\n style.width = widthStyle && `${widthStyle}px`;\n style.height = heightStyle && `${heightStyle}px`;\n style.transform = drawerLevel.value > 1 ? translate : undefined;\n style.zIndex = zIndex.value;\n\n return style;\n });\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onBeforeUnmount(() => {\n observer.disconnect();\n if (changeParentTrans && selfVisible.value) {\n changeParentTrans(false);\n }\n if (props.parentDom === 'body') {\n if (selfVisible.value) {\n visibleCount = visibleCount > 0 ? visibleCount - 1 : visibleCount;\n changeBodyOverflow(false);\n }\n }\n });\n\n onActivated(() => {\n if (shouldReopen) {\n emit('update:visible', true);\n shouldReopen = false;\n }\n });\n\n onDeactivated(() => {\n observer.disconnect();\n if (selfVisible.value) {\n handleClose('close');\n shouldReopen = true;\n }\n });\n\n /**\n * @param {event} e\n * @return {*}\n * @description handle key down event, to close drawer\n */\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.keyCode === KeyCode.ESC && props.escClosable) {\n handleClose('esc');\n }\n };\n\n /**\n * @param {*}\n * @return {*}\n * @description after transition animation end, invoke callback and desdroy wrap\n */\n const handleAnimationEnd = () => {\n // if (wrapRef.value === e.target && e.animationName.match(/^drawerSlide/)) {\n // emit('after-visible-change', selfVisible.value);\n // animationEnd.value = !selfVisible.value;\n // }\n emit('after-visible-change', selfVisible.value);\n animationEnd.value = !selfVisible.value;\n };\n\n const renderMask = () => {\n if (props.showMask) {\n return (\n <Mask\n show={props.visible}\n zIndex={zIndex.value - 1}\n duration={props.duration}\n customStyle={{ ...props.maskStyle, ...positionStyle.value }}\n class={props.maskClass}\n onClick={handleMaskClose}\n />\n );\n }\n };\n\n const renderDrawer = lazyRender(() => {\n const renderConrent = () => (\n <>\n {props.closable && (\n <button class={`${prefixCls.value}-close`} onClick={() => handleClose('close')}>\n <UIcon class={`${prefixCls.value}-close-icon`}>\n <X />\n </UIcon>\n </button>\n )}\n <div ref={headerRef} class={`${prefixCls.value}-header`} style={props.headerStyle}>\n <h2 class={`${prefixCls.value}-header-title`}>{slots.title ? slots.title() : props.title}</h2>\n {props.description && <p class={`${prefixCls.value}-header-description`}>{props.description}</p>}\n </div>\n <div class={`${prefixCls.value}-body`} style={{ ...props.bodyStyle, height: bodyHeight.value }}>\n {slots.default?.()}\n </div>\n {slots.footer ? (\n <div ref={footerRef} class={`${prefixCls.value}-footer`} style={props.footerStyle}>\n {slots.footer()}\n </div>\n ) : null}\n </>\n );\n\n return (\n <div\n v-show={selfVisible.value}\n ref={wrapRef}\n class={[prefixCls.value, props.className, `${prefixCls.value}-${props.placement}`, `${prefixCls.value}-${props.size}`]}\n style={{ ...wrapStyle.value, ...positionStyle.value }}\n {...attrs}\n tabindex={-1}\n onKeydown={handleKeyDown}\n >\n {useShouldRender(props.visible, props.destroyOnClose, animationEnd.value, renderConrent)}\n </div>\n );\n });\n\n return () =>\n isMounted.value ? (\n <Teleport to={toDom.value}>\n <Transition\n v-slots={{ default: renderDrawer }}\n name={props.transition || `drawer-slide-${props.placement}`}\n appear={props.transitionAppear}\n onAfterEnter={handleAnimationEnd}\n onAfterLeave={handleAnimationEnd}\n />\n {renderMask()}\n </Teleport>\n ) : null;\n }\n});\n"],"names":["visibleCount","drawerGlobalZIndex","defineComponent","name","inheritAttrs","props","drawerProps","emits","drawerEmits","setup","emit","attrs","slots","openStatus","shouldReopen","prefixCls","useGlobalConfig","selfVisible","ref","visible","zIndex","animationEnd","isMounted","wrapRef","headerRef","footerRef","lazyRender","useLazyRender","open","undefined","value","watch","val","tabindex","nextTick","focus","handleClose","type","handleMaskClose","maskClosable","drawerLevel","changeTrans","provide","changeParentTrans","inject","changeBodyOverflow","setBodyStyle","bodyHeight","calcBodyHeight","headerFooter","Number","offsetHeight","observer","MutationObserver","init","parentDom","config","attributes","childList","subtree","observe","disconnect","immediate","toDom","computed","positionStyle","style","position","wrapStyle","isValid","duration","transitionDuration","place","placement","translate","widthStyle","width","heightStyle","height","transform","onMounted","onBeforeUnmount","onActivated","onDeactivated","handleKeyDown","e","keyCode","KeyCode","ESC","escClosable","handleAnimationEnd","renderMask","showMask","_createVNode","Mask","maskStyle","maskClass","renderDrawer","renderConrent","_Fragment","closable","onClick","UIcon","default","X","headerStyle","title","description","bodyStyle","footer","footerStyle","_withDirectives","_mergeProps","className","size","useShouldRender","destroyOnClose","_vShow","Teleport","Transition","transition","transitionAppear"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAIA,eAAe;AACnB,MAAMC,qBAAqB;AAE3B,aAAeC,gBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOC;AAAAA,EACPC,OAAOC;AAAAA,EACPC,MAAMJ,OAAO;AAAA,IAAEK;AAAAA,IAAMC;AAAAA,IAAOC;AAAAA,KAAS;AACnC,QAAIC,aAAa;AACjB,QAAIC,eAAe;AACnB,UAAM;AAAA,MAAEC;AAAAA,QAAcC,gBAAgB,QAAQ;AAC9C,UAAMC,cAAcC,IAAIb,MAAMc,OAAO;AACrC,UAAMC,SAASF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AW9B,QAAQ/B,WAAWjB;AAAAA;AAAM,aAC1FlB,WAAM2F,YAAN3F,8BAAiB,IAEnBA,MAAMiG,SAAMhB;UAAA,OACDpE;AAAAA,UAAS,SAAS,GAAGV,UAAUe;AAAAA,UAAc,SAASzB,MAAMyG;AAAAA,YACnElG,MAAMiG,QAAQ,KAEf,IAAI;;AAIZ,aAAAE,eAAAlB,mBAAAmB;QAAA,OAGSzF;AAAAA,QAAO,SACL,CAACR,UAAUe,OAAOzB,MAAM4G,WAAW,GAAGlG,UAAUe,SAASzB,MAAMoE,aAAa,GAAG1D,UAAUe,SAASzB,MAAM6G,MAAM;AAAA,QAAC,SAC/G;AAAA,UAAE,GAAG9C,UAAUtC;AAAAA,UAAO,GAAGmC,cAAcnC;AAAAA;AAAM,SAChDnB;QAAK,YACC;AAAA,QAAE,aACDyE;AAAAA,WAEV+B,gBAAgB9G,MAAMc,SAASd,MAAM+G,gBAAgB/F,aAAaS,OAAOoE,aAAa,CAAC,MAAAmB,OARhFpG,YAAYa,KAAK;KAW9B;AAED,WAAO,MACLR,UAAUQ,QAAK+D,YAAAyB;MAAA,MACCvD,MAAMjC;AAAAA;MAAKyE,SAAAA,OAAAV,YAAA0B;QAAA,QAGflH,MAAMmH,cAAc,gBAAgBnH,MAAMoE;AAAAA,QAAW,UACnDpE,MAAMoH;AAAAA,QAAgB,gBAChB/B;AAAAA,QAAkB,gBAClBA;AAAAA,SAJL;AAAA,QAAEa,SAASN;AAAAA,OAAc,GAMnCN,YAAY;AAAA,SAEb;AAAA;AAEV,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.type.mjs","sources":["../../../../src/components/Drawer/Drawer.type.ts"],"sourcesContent":["import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';\nimport { oneOf } from '../../utils/propsValidators';\nimport type Drawer from './Drawer';\n\nexport type ParentDom = string | (() => HTMLElement | string | null);\nexport const drawerPlacement = ['top', 'right', 'bottom', 'left'] as const;\nexport type DrawerPlacement = (typeof drawerPlacement)[number];\nexport const drawerSize = ['default', 'large'] as const;\nexport type DrawerSize = (typeof drawerSize)[number];\n\nexport type ChangeTranslateFunction = (val: boolean) => void;\n\nexport const drawerProps = {\n parentDom: {\n type: [String, Function] as PropType<ParentDom>,\n default: 'body'\n },\n className: String,\n visible: {\n type: Boolean,\n default: false\n },\n placement: {\n type: String as PropType<DrawerPlacement>,\n validator: oneOf(drawerPlacement),\n default: 'right'\n },\n size: {\n type: String as PropType<DrawerSize>,\n validator: oneOf(drawerSize),\n default: 'default'\n },\n maskClosable: {\n type: Boolean,\n default: true\n },\n title: {\n type: String,\n default: ''\n },\n closable: {\n type: Boolean,\n default: true\n },\n showMask: {\n type: Boolean,\n default: true\n },\n maskClass: String,\n maskStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n headerStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n bodyStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n footerStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n width: Number,\n height: Number,\n zIndex: Number,\n duration: Number,\n escClosable: {\n type: Boolean,\n default: true\n },\n destroyOnClose: {\n type: Boolean,\n default: true\n },\n transition: String,\n transitionAppear: {\n type: Boolean,\n default: true\n },\n lazyRender: {\n type: Boolean,\n default: true\n }\n};\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>;\n\nexport const drawerCloseType = ['esc', 'mask', 'close'] as const;\nexport type DrawerCloseType = (typeof drawerCloseType)[number];\n\nexport const drawerEmits = {\n 'update:visible': (v: boolean) => typeof v === 'boolean',\n close: (type: DrawerCloseType) => drawerCloseType.includes(type),\n 'after-visible-change': (v: boolean) => typeof v === 'boolean'\n};\n\nexport type DrawerEmits = typeof drawerEmits;\n\nexport type DrawerInstanceType = InstanceType<typeof Drawer>;\n"],"names":[],"mappings":";;MAKa,kBAAkB,CAAC,OAAO,SAAS,UAAU,MAAM;MAEnD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,EACzB,kBAAkB,CAAC,MAAe,OAAO,MAAM;AAAA,EAC/C,OAAO,CAAC,SAA0B,gBAAgB,SAAS,IAAI;AAAA,EAC/D,wBAAwB,CAAC,MAAe,OAAO,MAAM;AACvD;;;;"}
|
|
1
|
+
{"version":3,"file":"Drawer.type.mjs","sources":["../../../../src/components/Drawer/Drawer.type.ts"],"sourcesContent":["import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';\nimport { oneOf } from '../../utils/propsValidators';\nimport type Drawer from './Drawer';\n\nexport type ParentDom = string | (() => HTMLElement | string | null);\nexport const drawerPlacement = ['top', 'right', 'bottom', 'left'] as const;\nexport type DrawerPlacement = (typeof drawerPlacement)[number];\nexport const drawerSize = ['default', 'large'] as const;\nexport type DrawerSize = (typeof drawerSize)[number];\n\nexport type ChangeTranslateFunction = (val: boolean) => void;\n\nexport const drawerProps = {\n parentDom: {\n type: [String, Function] as PropType<ParentDom>,\n default: 'body'\n },\n className: String,\n visible: {\n type: Boolean,\n default: false\n },\n placement: {\n type: String as PropType<DrawerPlacement>,\n validator: oneOf(drawerPlacement),\n default: 'right'\n },\n size: {\n type: String as PropType<DrawerSize>,\n validator: oneOf(drawerSize),\n default: 'default'\n },\n maskClosable: {\n type: Boolean,\n default: true\n },\n title: {\n type: String,\n default: ''\n },\n description: {\n type: String,\n default: ''\n },\n closable: {\n type: Boolean,\n default: true\n },\n showMask: {\n type: Boolean,\n default: true\n },\n maskClass: String,\n maskStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n headerStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n bodyStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n footerStyle: {\n type: Object as PropType<CSSProperties>,\n default: () => ({})\n },\n width: Number,\n height: Number,\n zIndex: Number,\n duration: Number,\n escClosable: {\n type: Boolean,\n default: true\n },\n destroyOnClose: {\n type: Boolean,\n default: true\n },\n transition: String,\n transitionAppear: {\n type: Boolean,\n default: true\n },\n lazyRender: {\n type: Boolean,\n default: true\n }\n};\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>;\n\nexport const drawerCloseType = ['esc', 'mask', 'close'] as const;\nexport type DrawerCloseType = (typeof drawerCloseType)[number];\n\nexport const drawerEmits = {\n 'update:visible': (v: boolean) => typeof v === 'boolean',\n close: (type: DrawerCloseType) => drawerCloseType.includes(type),\n 'after-visible-change': (v: boolean) => typeof v === 'boolean'\n};\n\nexport type DrawerEmits = typeof drawerEmits;\n\nexport type DrawerInstanceType = InstanceType<typeof Drawer>;\n"],"names":[],"mappings":";;MAKa,kBAAkB,CAAC,OAAO,SAAS,UAAU,MAAM;MAEnD,aAAa,CAAC,WAAW,OAAO;MAKhC,cAAc;AAAA,EACzB,WAAW;AAAA,IACT,MAAM,CAAC,QAAQ,QAAQ;AAAA,IACvB,SAAS;AAAA;AACX,EACA,WAAW;AAAA,EACX,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,WAAW,MAAM,eAAe;AAAA,IAChC,SAAS;AAAA;AACX,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,WAAW,MAAM,UAAU;AAAA,IAC3B,SAAS;AAAA;AACX,EACA,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,WAAW;AAAA,EACX,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS,OAAO;AAAC;AACnB,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS,OAAO;AAAC;AACnB,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,SAAS,OAAO;AAAC;AACnB,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS,OAAO;AAAC;AACnB,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,YAAY;AAAA,EACZ,kBAAkB;AAAA,IAChB,MAAM;AAAA,IACN,SAAS;AAAA;AACX,EACA,YAAY;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA;AAEb;MAIa,kBAAkB,CAAC,OAAO,QAAQ,OAAO;MAGzC,cAAc;AAAA,EACzB,kBAAkB,CAAC,MAAe,OAAO,MAAM;AAAA,EAC/C,OAAO,CAAC,SAA0B,gBAAgB,SAAS,IAAI;AAAA,EAC/D,wBAAwB,CAAC,MAAe,OAAO,MAAM;AACvD;;;;"}
|
|
@@ -27,6 +27,10 @@ export declare const UDrawer: {
|
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
default: string;
|
|
29
29
|
};
|
|
30
|
+
description: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
30
34
|
closable: {
|
|
31
35
|
type: BooleanConstructor;
|
|
32
36
|
default: boolean;
|
|
@@ -84,6 +88,7 @@ export declare const UDrawer: {
|
|
|
84
88
|
}, import("vue").PublicProps, {
|
|
85
89
|
closable: boolean;
|
|
86
90
|
size: "default" | "large";
|
|
91
|
+
description: string;
|
|
87
92
|
visible: boolean;
|
|
88
93
|
placement: "top" | "bottom" | "right" | "left";
|
|
89
94
|
title: string;
|
|
@@ -133,6 +138,10 @@ export declare const UDrawer: {
|
|
|
133
138
|
type: StringConstructor;
|
|
134
139
|
default: string;
|
|
135
140
|
};
|
|
141
|
+
description: {
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
136
145
|
closable: {
|
|
137
146
|
type: BooleanConstructor;
|
|
138
147
|
default: boolean;
|
|
@@ -186,6 +195,7 @@ export declare const UDrawer: {
|
|
|
186
195
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
187
196
|
closable: boolean;
|
|
188
197
|
size: "default" | "large";
|
|
198
|
+
description: string;
|
|
189
199
|
visible: boolean;
|
|
190
200
|
placement: "top" | "bottom" | "right" | "left";
|
|
191
201
|
title: string;
|
|
@@ -232,6 +242,10 @@ export declare const UDrawer: {
|
|
|
232
242
|
type: StringConstructor;
|
|
233
243
|
default: string;
|
|
234
244
|
};
|
|
245
|
+
description: {
|
|
246
|
+
type: StringConstructor;
|
|
247
|
+
default: string;
|
|
248
|
+
};
|
|
235
249
|
closable: {
|
|
236
250
|
type: BooleanConstructor;
|
|
237
251
|
default: boolean;
|
|
@@ -289,6 +303,7 @@ export declare const UDrawer: {
|
|
|
289
303
|
}, string, {
|
|
290
304
|
closable: boolean;
|
|
291
305
|
size: "default" | "large";
|
|
306
|
+
description: string;
|
|
292
307
|
visible: boolean;
|
|
293
308
|
placement: "top" | "bottom" | "right" | "left";
|
|
294
309
|
title: string;
|
|
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
58
58
|
default: string;
|
|
59
59
|
validator: (value: any) => boolean;
|
|
60
60
|
};
|
|
61
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "after-show-mask-change"[], "after-show-mask-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "after-show-mask-change")[], "click" | "after-show-mask-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
show: BooleanConstructor;
|
|
63
63
|
zIndex: (StringConstructor | NumberConstructor)[];
|
|
64
64
|
duration: (StringConstructor | NumberConstructor)[];
|
|
@@ -86,6 +86,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
86
86
|
validator: (value: any) => boolean;
|
|
87
87
|
};
|
|
88
88
|
}>> & Readonly<{
|
|
89
|
+
onClick?: (...args: any[]) => any;
|
|
89
90
|
"onAfter-show-mask-change"?: (...args: any[]) => any;
|
|
90
91
|
}>, {
|
|
91
92
|
show: boolean;
|