@uzum-tech/ui 1.1.5 → 1.2.1

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.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +310 -353
  3. package/dist/index.prod.js +2 -2
  4. package/es/_utils/uzum/warn.js +3 -3
  5. package/es/alert/src/Alert.js +1 -1
  6. package/es/alert/src/styles/index.cssr.js +1 -1
  7. package/es/date-picker/src/DatePicker.d.ts +1 -0
  8. package/es/date-picker/src/DatePicker.js +10 -8
  9. package/es/date-picker/src/config.d.ts +1 -1
  10. package/es/date-picker/src/config.js +1 -1
  11. package/es/date-picker/src/interface.d.ts +7 -5
  12. package/es/date-picker/src/panel/date.d.ts +23 -8
  13. package/es/date-picker/src/panel/date.js +43 -18
  14. package/es/date-picker/src/panel/daterange.d.ts +18 -7
  15. package/es/date-picker/src/panel/daterange.js +95 -43
  16. package/es/date-picker/src/panel/datetime.d.ts +3 -1
  17. package/es/date-picker/src/panel/datetimerange.d.ts +2 -0
  18. package/es/date-picker/src/panel/panelHeader.d.ts +28 -7
  19. package/es/date-picker/src/panel/panelHeader.js +37 -13
  20. package/es/date-picker/src/panel/panelMonth.d.ts +16 -8
  21. package/es/date-picker/src/panel/panelMonth.js +8 -4
  22. package/es/date-picker/src/panel/panelMonthContent.d.ts +3 -1
  23. package/es/date-picker/src/panel/panelMonthContent.js +2 -5
  24. package/es/date-picker/src/panel/panelYear.d.ts +16 -8
  25. package/es/date-picker/src/panel/panelYear.js +8 -4
  26. package/es/date-picker/src/panel/panelYearContent.d.ts +3 -1
  27. package/es/date-picker/src/panel/panelYearContent.js +2 -1
  28. package/es/date-picker/src/panel/use-calendar.d.ts +4 -3
  29. package/es/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
  30. package/es/date-picker/src/panel/use-panel-common.d.ts +2 -0
  31. package/es/date-picker/src/panel/use-panel-common.js +1 -0
  32. package/es/date-picker/src/styles/index.cssr.js +12 -10
  33. package/es/date-picker/src/utils.d.ts +3 -1
  34. package/es/date-picker/src/utils.js +13 -1
  35. package/es/grid/src/Grid.js +1 -1
  36. package/es/preset.d.ts +2 -2
  37. package/es/preset.js +3 -3
  38. package/es/version.d.ts +1 -1
  39. package/es/version.js +1 -1
  40. package/lib/_utils/uzum/warn.js +3 -3
  41. package/lib/alert/src/Alert.js +1 -1
  42. package/lib/alert/src/styles/index.cssr.js +1 -1
  43. package/lib/date-picker/src/DatePicker.d.ts +1 -0
  44. package/lib/date-picker/src/DatePicker.js +9 -7
  45. package/lib/date-picker/src/config.d.ts +1 -1
  46. package/lib/date-picker/src/config.js +1 -1
  47. package/lib/date-picker/src/interface.d.ts +7 -5
  48. package/lib/date-picker/src/panel/date.d.ts +23 -8
  49. package/lib/date-picker/src/panel/date.js +42 -17
  50. package/lib/date-picker/src/panel/daterange.d.ts +18 -7
  51. package/lib/date-picker/src/panel/daterange.js +94 -42
  52. package/lib/date-picker/src/panel/datetime.d.ts +3 -1
  53. package/lib/date-picker/src/panel/datetimerange.d.ts +2 -0
  54. package/lib/date-picker/src/panel/panelHeader.d.ts +28 -7
  55. package/lib/date-picker/src/panel/panelHeader.js +37 -13
  56. package/lib/date-picker/src/panel/panelMonth.d.ts +16 -8
  57. package/lib/date-picker/src/panel/panelMonth.js +8 -4
  58. package/lib/date-picker/src/panel/panelMonthContent.d.ts +3 -1
  59. package/lib/date-picker/src/panel/panelMonthContent.js +2 -5
  60. package/lib/date-picker/src/panel/panelYear.d.ts +16 -8
  61. package/lib/date-picker/src/panel/panelYear.js +8 -4
  62. package/lib/date-picker/src/panel/panelYearContent.d.ts +3 -1
  63. package/lib/date-picker/src/panel/panelYearContent.js +2 -1
  64. package/lib/date-picker/src/panel/use-calendar.d.ts +4 -3
  65. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
  66. package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -0
  67. package/lib/date-picker/src/panel/use-panel-common.js +1 -0
  68. package/lib/date-picker/src/styles/index.cssr.js +12 -10
  69. package/lib/date-picker/src/utils.d.ts +3 -1
  70. package/lib/date-picker/src/utils.js +14 -1
  71. package/lib/grid/src/Grid.js +1 -1
  72. package/lib/preset.d.ts +2 -2
  73. package/lib/preset.js +3 -3
  74. package/lib/version.d.ts +1 -1
  75. package/lib/version.js +1 -1
  76. package/package.json +5 -6
  77. package/web-types.json +9 -9
  78. package/es/date-picker/src/panel/monthrange.d.ts +0 -1303
  79. package/es/date-picker/src/panel/monthrange.js +0 -117
  80. package/lib/date-picker/src/panel/monthrange.d.ts +0 -1303
  81. package/lib/date-picker/src/panel/monthrange.js +0 -119
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<{
8
8
  };
9
9
  readonly active: BooleanConstructor;
10
10
  readonly dateFormat: StringConstructor;
11
+ readonly type: import("vue").PropType<import("../config").DatePickerType>;
11
12
  readonly timeFormat: {
12
13
  readonly type: StringConstructor;
13
14
  readonly value: "HH:mm:ss";
@@ -1261,6 +1262,7 @@ declare const _default: import("vue").DefineComponent<{
1261
1262
  };
1262
1263
  readonly active: BooleanConstructor;
1263
1264
  readonly dateFormat: StringConstructor;
1265
+ readonly type: import("vue").PropType<import("../config").DatePickerType>;
1264
1266
  readonly timeFormat: {
1265
1267
  readonly type: StringConstructor;
1266
1268
  readonly value: "HH:mm:ss";
@@ -1,4 +1,6 @@
1
1
  import { PropType } from 'vue';
2
+ import { OnPanelUpdateValue, PanelValue } from '../interface';
3
+ import { DateCommonItem } from '../utils';
2
4
  declare const _default: import("vue").DefineComponent<{
3
5
  mergedClsPrefix: {
4
6
  type: StringConstructor;
@@ -13,15 +15,24 @@ declare const _default: import("vue").DefineComponent<{
13
15
  type: StringConstructor;
14
16
  required: true;
15
17
  };
16
- onUpdateValue: {
17
- type: PropType<(value: number) => void>;
18
- required: true;
18
+ isMonth: {
19
+ type: BooleanConstructor;
20
+ value: boolean;
21
+ };
22
+ isYear: {
23
+ type: BooleanConstructor;
24
+ value: boolean;
19
25
  };
26
+ onUpdateValue: PropType<OnPanelUpdateValue>;
27
+ onUpdateMonth: PropType<OnPanelUpdateValue>;
28
+ onUpdateYear: PropType<OnPanelUpdateValue>;
20
29
  }, {
21
30
  monthPanelIsActive: import("vue").Ref<boolean>;
22
31
  yearPanelIsActive: import("vue").Ref<boolean>;
23
32
  onUpdateMonthPanelIsActive: (value: boolean) => void;
24
33
  onUpdateYearPanelIsActive: (value: boolean) => void;
34
+ handleUpdateMonth: (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
35
+ handleUpdateYear: (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
25
36
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
37
  mergedClsPrefix: {
27
38
  type: StringConstructor;
@@ -36,9 +47,19 @@ declare const _default: import("vue").DefineComponent<{
36
47
  type: StringConstructor;
37
48
  required: true;
38
49
  };
39
- onUpdateValue: {
40
- type: PropType<(value: number) => void>;
41
- required: true;
50
+ isMonth: {
51
+ type: BooleanConstructor;
52
+ value: boolean;
53
+ };
54
+ isYear: {
55
+ type: BooleanConstructor;
56
+ value: boolean;
42
57
  };
43
- }>>, {}, {}>;
58
+ onUpdateValue: PropType<OnPanelUpdateValue>;
59
+ onUpdateMonth: PropType<OnPanelUpdateValue>;
60
+ onUpdateYear: PropType<OnPanelUpdateValue>;
61
+ }>>, {
62
+ isMonth: boolean;
63
+ isYear: boolean;
64
+ }, {}>;
44
65
  export default _default;
@@ -21,14 +21,21 @@ exports.default = (0, vue_1.defineComponent)({
21
21
  type: String,
22
22
  required: true
23
23
  },
24
- onUpdateValue: {
25
- type: Function,
26
- required: true
27
- }
24
+ isMonth: {
25
+ type: Boolean,
26
+ value: false
27
+ },
28
+ isYear: {
29
+ type: Boolean,
30
+ value: false
31
+ },
32
+ onUpdateValue: Function,
33
+ onUpdateMonth: Function,
34
+ onUpdateYear: Function
28
35
  },
29
- setup() {
30
- const monthPanelIsActive = (0, vue_1.ref)(false);
31
- const yearPanelIsActive = (0, vue_1.ref)(false);
36
+ setup(props) {
37
+ const monthPanelIsActive = (0, vue_1.ref)(props.isMonth);
38
+ const yearPanelIsActive = (0, vue_1.ref)(props.isYear);
32
39
  function onUpdateMonthPanelIsActive(value) {
33
40
  monthPanelIsActive.value = value;
34
41
  if (value)
@@ -36,20 +43,37 @@ exports.default = (0, vue_1.defineComponent)({
36
43
  }
37
44
  function onUpdateYearPanelIsActive(value) {
38
45
  yearPanelIsActive.value = value;
39
- if (value)
46
+ if (value && !props.isMonth)
40
47
  monthPanelIsActive.value = false;
41
48
  }
49
+ function handleUpdateMonth(value, doUpdate, item) {
50
+ var _a, _b;
51
+ (_a = props.onUpdateMonth) === null || _a === void 0 ? void 0 : _a.call(props, value, doUpdate, item);
52
+ (_b = props.onUpdateValue) === null || _b === void 0 ? void 0 : _b.call(props, value, doUpdate, item);
53
+ }
54
+ function handleUpdateYear(value, doUpdate, item) {
55
+ var _a, _b;
56
+ (_a = props.onUpdateYear) === null || _a === void 0 ? void 0 : _a.call(props, value, doUpdate, item);
57
+ (_b = props.onUpdateValue) === null || _b === void 0 ? void 0 : _b.call(props, value, doUpdate, item);
58
+ }
42
59
  return {
43
60
  monthPanelIsActive,
44
61
  yearPanelIsActive,
45
62
  onUpdateMonthPanelIsActive,
46
- onUpdateYearPanelIsActive
63
+ onUpdateYearPanelIsActive,
64
+ handleUpdateMonth,
65
+ handleUpdateYear
47
66
  };
48
67
  },
49
68
  render() {
50
- const { mergedClsPrefix } = this;
51
- return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month` },
52
- (0, vue_1.h)(panelMonth_1.default, { panelActive: this.monthPanelIsActive, value: this.value, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, onUpdatePanelActive: this.onUpdateMonthPanelIsActive, onUpdateValue: this.onUpdateValue }),
53
- (0, vue_1.h)(panelYear_1.default, { panelActive: this.yearPanelIsActive, value: this.value, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, onUpdatePanelActive: this.onUpdateYearPanelIsActive, onUpdateValue: this.onUpdateValue })));
69
+ const { mergedClsPrefix, isYear } = this;
70
+ return ((0, vue_1.h)("div", { class: [
71
+ `${mergedClsPrefix}-date-panel-month`,
72
+ {
73
+ [`${mergedClsPrefix}-date-panel-month--justify-end`]: isYear
74
+ }
75
+ ] },
76
+ isYear ? null : ((0, vue_1.h)(panelMonth_1.default, { panelActive: this.monthPanelIsActive, value: this.value, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, disabled: this.isMonth, onUpdatePanelActive: this.onUpdateMonthPanelIsActive, onUpdateValue: this.handleUpdateMonth })),
77
+ (0, vue_1.h)(panelYear_1.default, { panelActive: this.yearPanelIsActive, value: this.value, mergedClsPrefix: mergedClsPrefix, calendarMonth: this.calendarMonth, calendarYear: this.calendarYear, disabled: this.isYear, onUpdatePanelActive: this.onUpdateYearPanelIsActive, onUpdateValue: this.handleUpdateYear })));
54
78
  }
55
79
  });
@@ -1,4 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
+ import { OnPanelUpdateValue, PanelValue } from '../interface';
3
+ import { DateCommonItem } from '../utils';
2
4
  declare const _default: import("vue").DefineComponent<{
3
5
  panelActive: BooleanConstructor;
4
6
  mergedClsPrefix: {
@@ -14,8 +16,9 @@ declare const _default: import("vue").DefineComponent<{
14
16
  type: StringConstructor;
15
17
  required: true;
16
18
  };
19
+ disabled: BooleanConstructor;
17
20
  onUpdateValue: {
18
- type: PropType<(value: number) => void>;
21
+ type: PropType<OnPanelUpdateValue>;
19
22
  required: true;
20
23
  };
21
24
  onUpdatePanelActive: PropType<(value: boolean) => void>;
@@ -30,6 +33,7 @@ declare const _default: import("vue").DefineComponent<{
30
33
  actions?: string[] | undefined;
31
34
  panel?: boolean | undefined;
32
35
  useAsQuickJump?: boolean | undefined;
36
+ readonly type?: import("../config").DatePickerType | undefined;
33
37
  key?: string | number | symbol | undefined;
34
38
  style?: unknown;
35
39
  class?: unknown;
@@ -80,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
80
84
  readonly onTabOut?: Function | undefined;
81
85
  readonly onClose?: import("../interface").OnClose | undefined;
82
86
  readonly onClear?: Function | undefined;
83
- readonly onUpdateValue: import("../interface").OnPanelUpdateValue;
87
+ readonly onUpdateValue: OnPanelUpdateValue;
84
88
  readonly onConfirm?: ((value: import("../interface").Value | null) => void) | undefined;
85
89
  readonly timeFormat?: string | undefined;
86
90
  readonly shortcuts?: import("../interface").Shortcuts | undefined;
@@ -107,6 +111,7 @@ declare const _default: import("vue").DefineComponent<{
107
111
  };
108
112
  active: BooleanConstructor;
109
113
  dateFormat: StringConstructor;
114
+ type: PropType<import("../config").DatePickerType>;
110
115
  timeFormat: {
111
116
  readonly type: StringConstructor;
112
117
  readonly value: "HH:mm:ss";
@@ -122,7 +127,7 @@ declare const _default: import("vue").DefineComponent<{
122
127
  onClose: PropType<import("../interface").OnClose>;
123
128
  onTabOut: FunctionConstructor;
124
129
  onUpdateValue: {
125
- readonly type: PropType<import("../interface").OnPanelUpdateValue>;
130
+ readonly type: PropType<OnPanelUpdateValue>;
126
131
  readonly required: true;
127
132
  };
128
133
  themeClass: StringConstructor;
@@ -132,7 +137,7 @@ declare const _default: import("vue").DefineComponent<{
132
137
  renderItem: (item: import("../utils").MonthItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
133
138
  [key: string]: any;
134
139
  }>;
135
- handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
140
+ handleDateClick: (dateItem: DateCommonItem) => void;
136
141
  handleDateInputBlur: () => void;
137
142
  handleDateInput: (value: string) => void;
138
143
  handleTimePickerChange: (value: number | null) => void;
@@ -1350,6 +1355,7 @@ declare const _default: import("vue").DefineComponent<{
1350
1355
  };
1351
1356
  active: BooleanConstructor;
1352
1357
  dateFormat: StringConstructor;
1358
+ type: PropType<import("../config").DatePickerType>;
1353
1359
  timeFormat: {
1354
1360
  readonly type: StringConstructor;
1355
1361
  readonly value: "HH:mm:ss";
@@ -1365,7 +1371,7 @@ declare const _default: import("vue").DefineComponent<{
1365
1371
  onClose: PropType<import("../interface").OnClose>;
1366
1372
  onTabOut: FunctionConstructor;
1367
1373
  onUpdateValue: {
1368
- readonly type: PropType<import("../interface").OnPanelUpdateValue>;
1374
+ readonly type: PropType<OnPanelUpdateValue>;
1369
1375
  readonly required: true;
1370
1376
  };
1371
1377
  themeClass: StringConstructor;
@@ -1375,7 +1381,7 @@ declare const _default: import("vue").DefineComponent<{
1375
1381
  renderItem: (item: import("../utils").MonthItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1376
1382
  [key: string]: any;
1377
1383
  }>;
1378
- handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
1384
+ handleDateClick: (dateItem: DateCommonItem) => void;
1379
1385
  handleDateInputBlur: () => void;
1380
1386
  handleDateInput: (value: string) => void;
1381
1387
  handleTimePickerChange: (value: number | null) => void;
@@ -2561,7 +2567,7 @@ declare const _default: import("vue").DefineComponent<{
2561
2567
  handleSingleShortcutClick: (shortcut: number | [number, number] | (() => number) | readonly [number, number] | (() => [number, number] | readonly [number, number])) => void;
2562
2568
  }> & {} & import("vue").ComponentCustomProperties & {}) | null>;
2563
2569
  handleHeaderClick: () => void;
2564
- handleUpdateValue: (value: number) => void;
2570
+ handleUpdateValue: (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
2565
2571
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2566
2572
  panelActive: BooleanConstructor;
2567
2573
  mergedClsPrefix: {
@@ -2577,12 +2583,14 @@ declare const _default: import("vue").DefineComponent<{
2577
2583
  type: StringConstructor;
2578
2584
  required: true;
2579
2585
  };
2586
+ disabled: BooleanConstructor;
2580
2587
  onUpdateValue: {
2581
- type: PropType<(value: number) => void>;
2588
+ type: PropType<OnPanelUpdateValue>;
2582
2589
  required: true;
2583
2590
  };
2584
2591
  onUpdatePanelActive: PropType<(value: boolean) => void>;
2585
2592
  }>>, {
2593
+ disabled: boolean;
2586
2594
  panelActive: boolean;
2587
2595
  }, {}>;
2588
2596
  export default _default;
@@ -23,6 +23,7 @@ exports.default = (0, vue_1.defineComponent)({
23
23
  type: String,
24
24
  required: true
25
25
  },
26
+ disabled: Boolean,
26
27
  onUpdateValue: {
27
28
  type: Function,
28
29
  required: true
@@ -39,10 +40,12 @@ exports.default = (0, vue_1.defineComponent)({
39
40
  }
40
41
  });
41
42
  function handleHeaderClick() {
43
+ if (props.disabled)
44
+ return;
42
45
  showRef.value = !showRef.value;
43
46
  }
44
- function handleUpdateValue(value) {
45
- props.onUpdateValue(value);
47
+ function handleUpdateValue(value, doUpdate, item) {
48
+ props.onUpdateValue(value, doUpdate, item);
46
49
  handleHeaderClick();
47
50
  }
48
51
  return {
@@ -53,11 +56,12 @@ exports.default = (0, vue_1.defineComponent)({
53
56
  };
54
57
  },
55
58
  render() {
56
- const { mergedClsPrefix } = this;
59
+ const { mergedClsPrefix, disabled } = this;
57
60
  return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month__month-year` },
58
61
  (0, vue_1.h)("div", { class: [
59
62
  `${mergedClsPrefix}-date-panel-month__text`,
60
- this.show && `${mergedClsPrefix}-date-panel-month__text--active`
63
+ this.show && `${mergedClsPrefix}-date-panel-month__text--active`,
64
+ disabled && `${mergedClsPrefix}-date-panel-month__text--disabled`
61
65
  ], onClick: this.handleHeaderClick },
62
66
  this.calendarMonth,
63
67
  (0, vue_1.h)(_internal_1.UBaseIcon, { class: `${mergedClsPrefix}-date-panel-month__icon`, clsPrefix: mergedClsPrefix }, {
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  };
15
15
  active: BooleanConstructor;
16
16
  dateFormat: StringConstructor;
17
+ type: import("vue").PropType<import("../config").DatePickerType>;
17
18
  timeFormat: {
18
19
  readonly type: StringConstructor;
19
20
  readonly value: "HH:mm:ss";
@@ -37,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
37
38
  panel: BooleanConstructor;
38
39
  }, {
39
40
  renderItem: (item: MonthItem, i: number, mergedClsPrefix: string) => VNode;
40
- handleDateClick: (dateItem: import("../utils").DateItem | MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
41
+ handleDateClick: (dateItem: import("../utils").DateCommonItem) => void;
41
42
  handleDateInputBlur: () => void;
42
43
  handleDateInput: (value: string) => void;
43
44
  handleTimePickerChange: (value: number | null) => void;
@@ -1235,6 +1236,7 @@ declare const _default: import("vue").DefineComponent<{
1235
1236
  };
1236
1237
  active: BooleanConstructor;
1237
1238
  dateFormat: StringConstructor;
1239
+ type: import("vue").PropType<import("../config").DatePickerType>;
1238
1240
  timeFormat: {
1239
1241
  readonly type: StringConstructor;
1240
1242
  readonly value: "HH:mm:ss";
@@ -32,7 +32,7 @@ exports.default = (0, vue_1.defineComponent)({
32
32
  useAsQuickJump
33
33
  ? handleQuickMonthClick(item, (value) => {
34
34
  ;
35
- props.onUpdateValue(value, false);
35
+ props.onUpdateValue(value, false, item);
36
36
  })
37
37
  : handleDateClick(item);
38
38
  } }, getRenderContent(item)));
@@ -51,10 +51,7 @@ exports.default = (0, vue_1.defineComponent)({
51
51
  this.themeClass
52
52
  ], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
53
53
  (0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month-calendar` }, {
54
- default: () => [
55
- this.monthArray.map((item, i) => renderItem(item, i, mergedClsPrefix)),
56
- (0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month-calendar__padding` })
57
- ]
54
+ default: () => this.monthArray.map((item, i) => renderItem(item, i, mergedClsPrefix))
58
55
  }),
59
56
  (0, vue_1.h)(_internal_1.UBaseFocusDetector, { onFocus: this.handleFocusDetectorFocus })));
60
57
  }
@@ -1,4 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
+ import { OnPanelUpdateValue, PanelValue } from '../interface';
3
+ import { DateCommonItem } from '../utils';
2
4
  declare const _default: import("vue").DefineComponent<{
3
5
  panelActive: BooleanConstructor;
4
6
  mergedClsPrefix: {
@@ -14,8 +16,9 @@ declare const _default: import("vue").DefineComponent<{
14
16
  type: StringConstructor;
15
17
  required: true;
16
18
  };
19
+ disabled: BooleanConstructor;
17
20
  onUpdateValue: {
18
- type: PropType<(value: number) => void>;
21
+ type: PropType<OnPanelUpdateValue>;
19
22
  required: true;
20
23
  };
21
24
  onUpdatePanelActive: PropType<(value: boolean) => void>;
@@ -30,6 +33,7 @@ declare const _default: import("vue").DefineComponent<{
30
33
  actions?: string[] | undefined;
31
34
  panel?: boolean | undefined;
32
35
  useAsQuickJump?: boolean | undefined;
36
+ readonly type?: import("../config").DatePickerType | undefined;
33
37
  key?: string | number | symbol | undefined;
34
38
  style?: unknown;
35
39
  class?: unknown;
@@ -80,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
80
84
  readonly onTabOut?: Function | undefined;
81
85
  readonly onClose?: import("../interface").OnClose | undefined;
82
86
  readonly onClear?: Function | undefined;
83
- readonly onUpdateValue: import("../interface").OnPanelUpdateValue;
87
+ readonly onUpdateValue: OnPanelUpdateValue;
84
88
  readonly onConfirm?: ((value: import("../interface").Value | null) => void) | undefined;
85
89
  readonly timeFormat?: string | undefined;
86
90
  readonly shortcuts?: import("../interface").Shortcuts | undefined;
@@ -107,6 +111,7 @@ declare const _default: import("vue").DefineComponent<{
107
111
  };
108
112
  active: BooleanConstructor;
109
113
  dateFormat: StringConstructor;
114
+ type: PropType<import("../config").DatePickerType>;
110
115
  timeFormat: {
111
116
  readonly type: StringConstructor;
112
117
  readonly value: "HH:mm:ss";
@@ -122,7 +127,7 @@ declare const _default: import("vue").DefineComponent<{
122
127
  onClose: PropType<import("../interface").OnClose>;
123
128
  onTabOut: FunctionConstructor;
124
129
  onUpdateValue: {
125
- readonly type: PropType<import("../interface").OnPanelUpdateValue>;
130
+ readonly type: PropType<OnPanelUpdateValue>;
126
131
  readonly required: true;
127
132
  };
128
133
  themeClass: StringConstructor;
@@ -132,7 +137,7 @@ declare const _default: import("vue").DefineComponent<{
132
137
  renderItem: (item: import("../utils").YearItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
133
138
  [key: string]: any;
134
139
  }>;
135
- handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
140
+ handleDateClick: (dateItem: DateCommonItem) => void;
136
141
  handleDateInputBlur: () => void;
137
142
  handleDateInput: (value: string) => void;
138
143
  handleTimePickerChange: (value: number | null) => void;
@@ -1350,6 +1355,7 @@ declare const _default: import("vue").DefineComponent<{
1350
1355
  };
1351
1356
  active: BooleanConstructor;
1352
1357
  dateFormat: StringConstructor;
1358
+ type: PropType<import("../config").DatePickerType>;
1353
1359
  timeFormat: {
1354
1360
  readonly type: StringConstructor;
1355
1361
  readonly value: "HH:mm:ss";
@@ -1365,7 +1371,7 @@ declare const _default: import("vue").DefineComponent<{
1365
1371
  onClose: PropType<import("../interface").OnClose>;
1366
1372
  onTabOut: FunctionConstructor;
1367
1373
  onUpdateValue: {
1368
- readonly type: PropType<import("../interface").OnPanelUpdateValue>;
1374
+ readonly type: PropType<OnPanelUpdateValue>;
1369
1375
  readonly required: true;
1370
1376
  };
1371
1377
  themeClass: StringConstructor;
@@ -1375,7 +1381,7 @@ declare const _default: import("vue").DefineComponent<{
1375
1381
  renderItem: (item: import("../utils").YearItem, i: number, mergedClsPrefix: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1376
1382
  [key: string]: any;
1377
1383
  }>;
1378
- handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | import("../utils").YearItem | import("../utils").QuarterItem) => void;
1384
+ handleDateClick: (dateItem: DateCommonItem) => void;
1379
1385
  handleDateInputBlur: () => void;
1380
1386
  handleDateInput: (value: string) => void;
1381
1387
  handleTimePickerChange: (value: number | null) => void;
@@ -2561,7 +2567,7 @@ declare const _default: import("vue").DefineComponent<{
2561
2567
  handleSingleShortcutClick: (shortcut: number | [number, number] | (() => number) | readonly [number, number] | (() => [number, number] | readonly [number, number])) => void;
2562
2568
  }> & {} & import("vue").ComponentCustomProperties & {}) | null>;
2563
2569
  handleHeaderClick: () => void;
2564
- handleUpdateValue: (value: number) => void;
2570
+ handleUpdateValue: (value: PanelValue, doUpdate: boolean, item?: DateCommonItem) => void;
2565
2571
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2566
2572
  panelActive: BooleanConstructor;
2567
2573
  mergedClsPrefix: {
@@ -2577,12 +2583,14 @@ declare const _default: import("vue").DefineComponent<{
2577
2583
  type: StringConstructor;
2578
2584
  required: true;
2579
2585
  };
2586
+ disabled: BooleanConstructor;
2580
2587
  onUpdateValue: {
2581
- type: PropType<(value: number) => void>;
2588
+ type: PropType<OnPanelUpdateValue>;
2582
2589
  required: true;
2583
2590
  };
2584
2591
  onUpdatePanelActive: PropType<(value: boolean) => void>;
2585
2592
  }>>, {
2593
+ disabled: boolean;
2586
2594
  panelActive: boolean;
2587
2595
  }, {}>;
2588
2596
  export default _default;
@@ -23,6 +23,7 @@ exports.default = (0, vue_1.defineComponent)({
23
23
  type: String,
24
24
  required: true
25
25
  },
26
+ disabled: Boolean,
26
27
  onUpdateValue: {
27
28
  type: Function,
28
29
  required: true
@@ -39,10 +40,12 @@ exports.default = (0, vue_1.defineComponent)({
39
40
  }
40
41
  });
41
42
  function handleHeaderClick() {
43
+ if (props.disabled)
44
+ return;
42
45
  showRef.value = !showRef.value;
43
46
  }
44
- function handleUpdateValue(value) {
45
- props.onUpdateValue(value);
47
+ function handleUpdateValue(value, doUpdate, item) {
48
+ props.onUpdateValue(value, doUpdate, item);
46
49
  handleHeaderClick();
47
50
  }
48
51
  return {
@@ -53,11 +56,12 @@ exports.default = (0, vue_1.defineComponent)({
53
56
  };
54
57
  },
55
58
  render() {
56
- const { mergedClsPrefix } = this;
59
+ const { mergedClsPrefix, disabled } = this;
57
60
  return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month__month-year`, ref: "triggerRef" },
58
61
  (0, vue_1.h)("div", { class: [
59
62
  `${mergedClsPrefix}-date-panel-month__text`,
60
- this.show && `${mergedClsPrefix}-date-panel-month__text--active`
63
+ this.show && `${mergedClsPrefix}-date-panel-month__text--active`,
64
+ disabled && `${mergedClsPrefix}-date-panel-month__text--disabled`
61
65
  ], onClick: this.handleHeaderClick },
62
66
  this.calendarYear,
63
67
  (0, vue_1.h)(_internal_1.UBaseIcon, { class: `${mergedClsPrefix}-date-panel-month__icon`, clsPrefix: mergedClsPrefix }, {
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  };
15
15
  active: BooleanConstructor;
16
16
  dateFormat: StringConstructor;
17
+ type: import("vue").PropType<import("../config").DatePickerType>;
17
18
  timeFormat: {
18
19
  readonly type: StringConstructor;
19
20
  readonly value: "HH:mm:ss";
@@ -37,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
37
38
  panel: BooleanConstructor;
38
39
  }, {
39
40
  renderItem: (item: YearItem, i: number, mergedClsPrefix: string) => VNode;
40
- handleDateClick: (dateItem: import("../utils").DateItem | import("../utils").MonthItem | YearItem | import("../utils").QuarterItem) => void;
41
+ handleDateClick: (dateItem: import("../utils").DateCommonItem) => void;
41
42
  handleDateInputBlur: () => void;
42
43
  handleDateInput: (value: string) => void;
43
44
  handleTimePickerChange: (value: number | null) => void;
@@ -1247,6 +1248,7 @@ declare const _default: import("vue").DefineComponent<{
1247
1248
  };
1248
1249
  active: BooleanConstructor;
1249
1250
  dateFormat: StringConstructor;
1251
+ type: import("vue").PropType<import("../config").DatePickerType>;
1250
1252
  timeFormat: {
1251
1253
  readonly type: StringConstructor;
1252
1254
  readonly value: "HH:mm:ss";
@@ -29,7 +29,7 @@ exports.default = (0, vue_1.defineComponent)({
29
29
  useAsQuickJump
30
30
  ? handleQuickMonthClick(item, (value) => {
31
31
  ;
32
- props.onUpdateValue(value, false);
32
+ props.onUpdateValue(value, false, item);
33
33
  })
34
34
  : handleDateClick(item);
35
35
  } }, getRenderContent(item)));
@@ -45,6 +45,7 @@ exports.default = (0, vue_1.defineComponent)({
45
45
  return ((0, vue_1.h)("div", { ref: "selfRef", tabindex: 0, class: [
46
46
  `${mergedClsPrefix}-date-panel`,
47
47
  `${mergedClsPrefix}-date-panel--month`,
48
+ `${mergedClsPrefix}-date-panel--year`,
48
49
  this.themeClass
49
50
  ], onFocus: this.handlePanelFocus, onKeydown: this.handlePanelKeyDown },
50
51
  (0, vue_1.h)(_internal_1.UScrollbar, { ref: "yearScrollbarRef", theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar, horizontalRailStyle: { zIndex: 1 }, verticalRailStyle: { zIndex: 1 } }, {
@@ -2,7 +2,7 @@ import { type ExtractPropTypes, type PropType } from 'vue';
2
2
  import type { VirtualListInst } from 'vueuc';
3
3
  import type { ScrollbarInst } from '../../../_internal';
4
4
  import type { Shortcuts } from '../interface';
5
- import type { DateItem, MonthItem, YearItem, QuarterItem } from '../utils';
5
+ import type { MonthItem, YearItem, QuarterItem, DateCommonItem } from '../utils';
6
6
  declare const useCalendarProps: {
7
7
  readonly actions: {
8
8
  readonly type: PropType<string[]>;
@@ -10,6 +10,7 @@ declare const useCalendarProps: {
10
10
  };
11
11
  readonly active: BooleanConstructor;
12
12
  readonly dateFormat: StringConstructor;
13
+ readonly type: PropType<import("../config").DatePickerType>;
13
14
  readonly timeFormat: {
14
15
  readonly type: StringConstructor;
15
16
  readonly value: "HH:mm:ss";
@@ -33,7 +34,7 @@ declare const useCalendarProps: {
33
34
  readonly panel: BooleanConstructor;
34
35
  };
35
36
  declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, type: 'date' | 'datetime' | 'month' | 'year' | 'quarter'): {
36
- handleDateClick: (dateItem: DateItem | MonthItem | YearItem | QuarterItem) => void;
37
+ handleDateClick: (dateItem: DateCommonItem) => void;
37
38
  handleDateInputBlur: () => void;
38
39
  handleDateInput: (value: string) => void;
39
40
  handleTimePickerChange: (value: number | null) => void;
@@ -1201,7 +1202,7 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
1201
1202
  isHourDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsHourDisabled | undefined>;
1202
1203
  isMinuteDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsMinuteDisabled | undefined>;
1203
1204
  isSecondDisabled: import("vue").ComputedRef<import("../../../time-picker/src/interface").IsSecondDisabled | undefined>;
1204
- dateArray: import("vue").ComputedRef<DateItem[]>;
1205
+ dateArray: import("vue").ComputedRef<import("../utils").DateItem[]>;
1205
1206
  monthArray: import("vue").ComputedRef<MonthItem[]>;
1206
1207
  yearArray: import("vue").ComputedRef<YearItem[]>;
1207
1208
  quarterArray: import("vue").ComputedRef<QuarterItem[]>;
@@ -13,6 +13,7 @@ declare const useDualCalendarProps: {
13
13
  };
14
14
  readonly active: BooleanConstructor;
15
15
  readonly dateFormat: StringConstructor;
16
+ readonly type: import("vue").PropType<import("../config").DatePickerType>;
16
17
  readonly timeFormat: {
17
18
  readonly type: StringConstructor;
18
19
  readonly value: "HH:mm:ss";
@@ -1,8 +1,10 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type Value, type OnPanelUpdateValue, type OnClose, type Shortcuts, type DefaultTime } from '../interface';
3
+ import { DatePickerType } from '../config';
3
4
  declare const usePanelCommonProps: {
4
5
  readonly active: BooleanConstructor;
5
6
  readonly dateFormat: StringConstructor;
7
+ readonly type: PropType<DatePickerType>;
6
8
  readonly timeFormat: {
7
9
  readonly type: StringConstructor;
8
10
  readonly value: "HH:mm:ss";
@@ -8,6 +8,7 @@ const TIME_FORMAT = 'HH:mm:ss';
8
8
  const usePanelCommonProps = {
9
9
  active: Boolean,
10
10
  dateFormat: String,
11
+ type: String,
11
12
  timeFormat: {
12
13
  type: String,
13
14
  value: TIME_FORMAT
@@ -173,6 +173,8 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
173
173
  margin: 0,
174
174
  padding: '15px 16px',
175
175
  boxSizing: 'border-box'
176
+ }), (0, cssr_1.cM)('year', {
177
+ zIndex: '2'
176
178
  }), (0, cssr_1.cB)('date-panel-footer', {
177
179
  gridArea: 'footer'
178
180
  }), (0, cssr_1.cB)('date-panel-actions', {
@@ -195,21 +197,20 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
195
197
  zIndex: 1
196
198
  })]), (0, cssr_1.c)('~ .u-date-panel-calendar', {
197
199
  paddingTop: '16px'
198
- })]), (0, cssr_1.cB)('date-panel-month', {
200
+ })]), (0, cssr_1.cB)('date-panel-placeholder', {
201
+ width: '266px',
202
+ height: '250px'
203
+ }), (0, cssr_1.cB)('date-panel-month', {
199
204
  boxSizing: 'border-box',
200
205
  display: 'flex',
201
206
  alignItems: 'center',
202
207
  justifyContent: 'space-between',
203
208
  padding: 'var(--u-calendar-title-padding)',
204
209
  height: 'var(--u-calendar-title-height)'
205
- }, [(0, cssr_1.cE)('icon', `
210
+ }, [(0, cssr_1.cM)('justify-end', {
211
+ justifyContent: 'end'
212
+ }), (0, cssr_1.cE)('icon', `
206
213
  font-size: var(--u-arrow-size);
207
- `), (0, cssr_1.cE)('prev, next, fast-prev, fast-next', `
208
- line-height: 0;
209
- cursor: pointer;
210
- width: var(--u-arrow-size);
211
- height: var(--u-arrow-size);
212
- color: var(--u-arrow-color);
213
214
  `), (0, cssr_1.cE)('month-year', {
214
215
  userSelect: 'none',
215
216
  '-webkit-user-select': 'none'
@@ -222,10 +223,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
222
223
  padding: 6px 8px;
223
224
  text-align: center;
224
225
  color: var(--u-calendar-title-text-color);
225
- cursor: pointer;
226
226
  transition: .3s var(--u-bezier);
227
227
  border-radius: var(--u-panel-border-radius);
228
- `, [(0, cssr_1.c)('.u-icon', {
228
+ `, [(0, cssr_1.cNotM)('disabled', {
229
+ cursor: 'pointer'
230
+ }), (0, cssr_1.c)('.u-icon', {
229
231
  width: '24px',
230
232
  transition: 'transform .3s var(--u-bezier)'
231
233
  }), (0, cssr_1.cM)('active', `