yc-design-vue 2.2.6 → 2.2.7

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 (96) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/style.css +1 -1
  3. package/es/Anchor/Anchor.vue.d.ts +1 -1
  4. package/es/Anchor/index.d.ts +3 -3
  5. package/es/DatePicker/{YcDatePicker.vue.d.ts → DatePicker.vue.d.ts} +2 -2
  6. package/es/DatePicker/DatePicker.vue.js +334 -0
  7. package/es/DatePicker/DatePicker.vue3.js +5 -0
  8. package/es/DatePicker/{YcMonthPicker.vue.js → MonthPicker.vue.js} +75 -69
  9. package/es/DatePicker/MonthPicker.vue3.js +5 -0
  10. package/es/DatePicker/WeekPicker.vue.js +301 -0
  11. package/es/DatePicker/WeekPicker.vue3.js +5 -0
  12. package/es/DatePicker/{YcYearPicker.vue.js → YearPicker.vue.js} +57 -54
  13. package/es/DatePicker/YearPicker.vue3.js +5 -0
  14. package/es/DatePicker/component/PickerPanel.vue.d.ts +2 -0
  15. package/es/DatePicker/component/PickerPanel.vue.js +26 -29
  16. package/es/DatePicker/hooks/useContext.js +1 -1
  17. package/es/DatePicker/hooks/userPicker.d.ts +2 -0
  18. package/es/DatePicker/hooks/userPicker.js +26 -2
  19. package/es/DatePicker/index.css +3 -3
  20. package/es/DatePicker/index.d.ts +7 -7
  21. package/es/DatePicker/index.js +8 -8
  22. package/es/DatePicker/type.d.ts +5 -5
  23. package/es/TimePicker/TimePicker.vue.d.ts +5 -98
  24. package/es/TimePicker/TimePicker.vue.js +20 -15
  25. package/es/TimePicker/TimePickerPanel.vue.d.ts +1 -3
  26. package/es/TimePicker/TimePickerPanel.vue.js +89 -56
  27. package/es/TimePicker/hooks/useContext.d.ts +6 -0
  28. package/es/TimePicker/hooks/useContext.js +9 -0
  29. package/es/TimePicker/index.css +1 -1
  30. package/es/TimePicker/index.d.ts +10 -49
  31. package/es/TimePicker/type.d.ts +3 -0
  32. package/es/Transfer/TransferPanel.vue.js +1 -1
  33. package/es/Upload/UploadFileList.vue.js +1 -1
  34. package/es/Upload/UploadPictureCard.vue.js +1 -1
  35. package/es/_shared/icons/IconDelete.vue.js +1 -24
  36. package/es/_shared/icons/IconDelete.vue2.js +24 -1
  37. package/es/index.d.ts +6 -6
  38. package/es/index.js +4 -4
  39. package/es/style.css +1 -1
  40. package/lib/Anchor/Anchor.vue.d.ts +1 -1
  41. package/lib/Anchor/index.d.ts +3 -3
  42. package/lib/DatePicker/{YcDatePicker.vue.d.ts → DatePicker.vue.d.ts} +2 -2
  43. package/lib/DatePicker/DatePicker.vue.js +1 -0
  44. package/lib/DatePicker/DatePicker.vue3.js +1 -0
  45. package/lib/DatePicker/MonthPicker.vue.js +1 -0
  46. package/lib/DatePicker/MonthPicker.vue3.js +1 -0
  47. package/lib/DatePicker/WeekPicker.vue.js +1 -0
  48. package/lib/DatePicker/WeekPicker.vue3.js +1 -0
  49. package/lib/DatePicker/YearPicker.vue.js +1 -0
  50. package/lib/DatePicker/{YcDatePicker.vue3.js → YearPicker.vue3.js} +1 -1
  51. package/lib/DatePicker/component/PickerPanel.vue.d.ts +2 -0
  52. package/lib/DatePicker/component/PickerPanel.vue.js +1 -1
  53. package/lib/DatePicker/hooks/useContext.js +1 -1
  54. package/lib/DatePicker/hooks/userPicker.d.ts +2 -0
  55. package/lib/DatePicker/hooks/userPicker.js +1 -1
  56. package/lib/DatePicker/index.css +3 -3
  57. package/lib/DatePicker/index.d.ts +7 -7
  58. package/lib/DatePicker/index.js +1 -1
  59. package/lib/DatePicker/type.d.ts +5 -5
  60. package/lib/TimePicker/TimePicker.vue.d.ts +5 -98
  61. package/lib/TimePicker/TimePicker.vue.js +1 -1
  62. package/lib/TimePicker/TimePickerPanel.vue.d.ts +1 -3
  63. package/lib/TimePicker/TimePickerPanel.vue.js +1 -1
  64. package/lib/TimePicker/hooks/useContext.d.ts +6 -0
  65. package/lib/TimePicker/hooks/useContext.js +1 -1
  66. package/lib/TimePicker/index.css +1 -1
  67. package/lib/TimePicker/index.d.ts +10 -49
  68. package/lib/TimePicker/type.d.ts +3 -0
  69. package/lib/Transfer/TransferPanel.vue.js +1 -1
  70. package/lib/Upload/UploadFileList.vue.js +1 -1
  71. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  72. package/lib/_shared/icons/IconDelete.vue.js +1 -1
  73. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  74. package/lib/index.d.ts +6 -6
  75. package/lib/index.js +1 -1
  76. package/lib/style.css +1 -1
  77. package/package.json +1 -1
  78. package/es/DatePicker/YcDatePicker.vue.js +0 -298
  79. package/es/DatePicker/YcDatePicker.vue3.js +0 -5
  80. package/es/DatePicker/YcMonthPicker.vue3.js +0 -5
  81. package/es/DatePicker/YcWeekPicker.vue.js +0 -295
  82. package/es/DatePicker/YcWeekPicker.vue3.js +0 -5
  83. package/es/DatePicker/YcYearPicker.vue3.js +0 -5
  84. package/lib/DatePicker/YcDatePicker.vue.js +0 -1
  85. package/lib/DatePicker/YcMonthPicker.vue.js +0 -1
  86. package/lib/DatePicker/YcMonthPicker.vue3.js +0 -1
  87. package/lib/DatePicker/YcWeekPicker.vue.js +0 -1
  88. package/lib/DatePicker/YcWeekPicker.vue3.js +0 -1
  89. package/lib/DatePicker/YcYearPicker.vue.js +0 -1
  90. package/lib/DatePicker/YcYearPicker.vue3.js +0 -1
  91. package/{lib/DatePicker/YcMonthPicker.vue.d.ts → es/DatePicker/MonthPicker.vue.d.ts} +1 -1
  92. package/{lib/DatePicker/YcWeekPicker.vue.d.ts → es/DatePicker/WeekPicker.vue.d.ts} +1 -1
  93. package/es/DatePicker/{YcYearPicker.vue.d.ts → YearPicker.vue.d.ts} +1 -1
  94. package/{es/DatePicker/YcMonthPicker.vue.d.ts → lib/DatePicker/MonthPicker.vue.d.ts} +1 -1
  95. package/{es/DatePicker/YcWeekPicker.vue.d.ts → lib/DatePicker/WeekPicker.vue.d.ts} +1 -1
  96. package/lib/DatePicker/{YcYearPicker.vue.d.ts → YearPicker.vue.d.ts} +1 -1
@@ -10,10 +10,10 @@ declare function __VLS_template(): {
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<AnchorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AnchorProps> & Readonly<{}>, {
12
12
  smooth: boolean;
13
+ scrollContainer: import('..').TargetContainer;
13
14
  boundary: number | "center" | "end" | "start" | "nearest";
14
15
  changeHash: boolean;
15
16
  lineLess: boolean;
16
- scrollContainer: import('..').TargetContainer;
17
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
18
  listRef: HTMLDivElement;
19
19
  }, HTMLDivElement>;
@@ -7,10 +7,10 @@ export * from './type';
7
7
  declare const Anchor: {
8
8
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').AnchorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
9
9
  smooth: boolean;
10
+ scrollContainer: import('..').TargetContainer;
10
11
  boundary: number | "center" | "end" | "start" | "nearest";
11
12
  changeHash: boolean;
12
13
  lineLess: boolean;
13
- scrollContainer: import('..').TargetContainer;
14
14
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
15
15
  listRef: HTMLDivElement;
16
16
  }, HTMLDivElement, import('vue').ComponentProvideOptions, {
@@ -22,20 +22,20 @@ declare const Anchor: {
22
22
  Defaults: {};
23
23
  }, Readonly<import('./type').AnchorProps> & Readonly<{}>, {}, {}, {}, {}, {
24
24
  smooth: boolean;
25
+ scrollContainer: import('..').TargetContainer;
25
26
  boundary: number | "center" | "end" | "start" | "nearest";
26
27
  changeHash: boolean;
27
28
  lineLess: boolean;
28
- scrollContainer: import('..').TargetContainer;
29
29
  }>;
30
30
  __isFragment?: never;
31
31
  __isTeleport?: never;
32
32
  __isSuspense?: never;
33
33
  } & import('vue').ComponentOptionsBase<Readonly<import('./type').AnchorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
34
34
  smooth: boolean;
35
+ scrollContainer: import('..').TargetContainer;
35
36
  boundary: number | "center" | "end" | "start" | "nearest";
36
37
  changeHash: boolean;
37
38
  lineLess: boolean;
38
- scrollContainer: import('..').TargetContainer;
39
39
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
40
40
  $slots: Readonly<import('./type').AnchorSlots> & import('./type').AnchorSlots;
41
41
  }) & {
@@ -45,9 +45,10 @@ declare const __VLS_component: import('vue').DefineComponent<DatePickerProps, {}
45
45
  readonly: boolean;
46
46
  triggerProps: import('..').TriggerProps;
47
47
  format: string;
48
+ hideTrigger: boolean;
48
49
  dayStartOfWeek: import('./type').DayStartOfWeek;
49
50
  showTime: boolean;
50
- timePickerProps: import('..').TimePickerProps;
51
+ timePickerProps: import('../TimePicker').TimePickerProps;
51
52
  showNowBtn: boolean;
52
53
  pickerValue: import('./type').DatePickerValue;
53
54
  defaultPickerValue: import('./type').DatePickerValue;
@@ -59,7 +60,6 @@ declare const __VLS_component: import('vue').DefineComponent<DatePickerProps, {}
59
60
  shortcuts: import('./type').ShortcutType[];
60
61
  previewShortcut: boolean;
61
62
  disabledInput: boolean;
62
- hideTrigger: boolean;
63
63
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
64
64
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
65
65
  export default _default;
@@ -0,0 +1,334 @@
1
+ import { defineComponent, useSlots, ref, watch, createElementBlock, openBlock, Fragment, createVNode, createBlock, unref, withCtx, createSlots, createElementVNode, createCommentVNode, renderSlot, renderList, toDisplayString, mergeProps, isRef, normalizeStyle, normalizeClass } from "vue";
2
+ import usePicker from "./hooks/userPicker.js";
3
+ import "../node_modules/b-tween/dist/b-tween.es.js";
4
+ import dayjs from "../node_modules/dayjs/dayjs.min.js";
5
+ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
+ import "../_shared/utils/dom.js";
7
+ import "../_shared/utils/locale.js";
8
+ import "../_shared/utils/time.js";
9
+ import _sfc_main$6 from "./component/PickerCell.vue.js";
10
+ /* empty css */
11
+ import _sfc_main$4 from "./component/PickerHeader.vue.js";
12
+ /* empty css */
13
+ import _sfc_main$5 from "./component/PickerWeekHeader.vue.js";
14
+ /* empty css */
15
+ import _sfc_main$1 from "./component/PickerPanel.vue.js";
16
+ /* empty css */
17
+ import _sfc_main$7 from "./component/PickerInput.vue.js";
18
+ /* empty css */
19
+ import _sfc_main$2 from "./YearPicker.vue.js";
20
+ /* empty css */
21
+ import _sfc_main$3 from "./MonthPicker.vue.js";
22
+ /* empty css */
23
+ import TimePicker from "../TimePicker/index.js";
24
+ const _hoisted_1 = {
25
+ key: 2,
26
+ class: "yc-panel-date"
27
+ };
28
+ const _hoisted_2 = { class: "yc-panel-date-inner" };
29
+ const _hoisted_3 = { class: "yc-picker-body" };
30
+ const _hoisted_4 = {
31
+ key: 0,
32
+ class: "yc-panel-date-timepicker"
33
+ };
34
+ const _hoisted_5 = { class: "yc-panel-date-timepicker-title" };
35
+ const _sfc_main = /* @__PURE__ */ defineComponent({
36
+ ...{
37
+ name: "DatePicker",
38
+ inheritAttrs: false
39
+ },
40
+ __name: "DatePicker",
41
+ props: {
42
+ modelValue: { default: void 0 },
43
+ defaultValue: { default: "" },
44
+ dayStartOfWeek: { default: 0 },
45
+ showTime: { type: Boolean, default: false },
46
+ timePickerProps: { default: () => ({}) },
47
+ showNowBtn: { type: Boolean, default: false },
48
+ locale: { default: () => ({}) },
49
+ hideTrigger: { type: Boolean, default: false },
50
+ allowClear: { type: Boolean, default: false },
51
+ readonly: { type: Boolean, default: false },
52
+ error: { type: Boolean, default: false },
53
+ size: { default: void 0 },
54
+ shortcuts: { default: () => [] },
55
+ shortcutsPosition: { default: "bottom" },
56
+ position: { default: "bl" },
57
+ popupVisible: { type: Boolean, default: void 0 },
58
+ defaultPopupVisible: { type: Boolean, default: false },
59
+ triggerProps: { default: () => ({}) },
60
+ unmountOnClose: { type: Boolean, default: false },
61
+ placeholder: { default: "" },
62
+ disabled: { type: Boolean, default: false },
63
+ disabledDate: { type: Function, default: void 0 },
64
+ disabledTime: {},
65
+ pickerValue: { default: void 0 },
66
+ defaultPickerValue: { default: "" },
67
+ popupContainer: { default: void 0 },
68
+ valueFormat: { default: (props) => {
69
+ return props.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
70
+ } },
71
+ format: { default: (props) => {
72
+ return props.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
73
+ } },
74
+ previewShortcut: { type: Boolean, default: true },
75
+ showConfirmBtn: { type: Boolean, default: false },
76
+ disabledInput: { type: Boolean, default: false },
77
+ abbreviation: { type: Boolean, default: true }
78
+ },
79
+ emits: ["update:modelValue", "update:popupVisible", "update:pickerValue", "change", "select", "ok", "picker-value-change", "popup-visible-change", "clear", "select-shortcut"],
80
+ setup(__props, { emit: __emit }) {
81
+ const $slots = useSlots();
82
+ const props = __props;
83
+ const emits = __emit;
84
+ const {
85
+ computedValue,
86
+ timePickerValue,
87
+ locale,
88
+ abbreviation,
89
+ dayStartOfWeek,
90
+ curMonth,
91
+ curYear,
92
+ showMonthPicker,
93
+ showYearPicker,
94
+ valueFormat,
95
+ DefinePanel,
96
+ ReusePanel,
97
+ t,
98
+ getDateFromFormat,
99
+ isCellInView,
100
+ isToday,
101
+ isSelected,
102
+ getDaysOfMonth,
103
+ handleConfirm,
104
+ handleSelect,
105
+ handleShortcut,
106
+ handleNowClick
107
+ } = usePicker({
108
+ props,
109
+ emits
110
+ });
111
+ const dayData = ref([]);
112
+ const handleDateChange = (dateType, type) => {
113
+ if (dateType == "year") {
114
+ curYear.value = type == "pre" ? curYear.value - 1 : curYear.value + 1;
115
+ dayData.value = getDaysOfMonth(
116
+ curYear.value,
117
+ curMonth.value,
118
+ dayStartOfWeek.value
119
+ );
120
+ } else {
121
+ const base = dayjs().set("year", curYear.value).set("month", curMonth.value);
122
+ const date = type == "pre" ? base.subtract(1, "month") : base.add(1, "month");
123
+ curYear.value = date.year();
124
+ curMonth.value = date.month();
125
+ dayData.value = getDaysOfMonth(
126
+ curYear.value,
127
+ curMonth.value,
128
+ dayStartOfWeek.value
129
+ );
130
+ }
131
+ };
132
+ watch(
133
+ () => computedValue.value,
134
+ (val) => {
135
+ const date = val ? getDateFromFormat(val) : /* @__PURE__ */ new Date();
136
+ curYear.value = date.getFullYear();
137
+ curMonth.value = date.getMonth();
138
+ dayData.value = getDaysOfMonth(
139
+ curYear.value,
140
+ curMonth.value,
141
+ dayStartOfWeek.value
142
+ );
143
+ },
144
+ {
145
+ immediate: true
146
+ }
147
+ );
148
+ return (_ctx, _cache) => {
149
+ return openBlock(), createElementBlock(Fragment, null, [
150
+ createVNode(unref(DefinePanel), null, {
151
+ default: withCtx(() => [
152
+ createVNode(_sfc_main$1, {
153
+ locale: unref(locale),
154
+ "preview-shortcut": _ctx.previewShortcut,
155
+ shortcuts: _ctx.shortcuts,
156
+ "shortcuts-position": _ctx.shortcutsPosition,
157
+ "confirm-btn-disabled": !unref(computedValue),
158
+ "show-confirm-btn": _ctx.showConfirmBtn,
159
+ "show-footer": !unref(showYearPicker) && !unref(showMonthPicker),
160
+ "show-now": "",
161
+ onConfirm: unref(handleConfirm),
162
+ onShortcutSelect: unref(handleShortcut),
163
+ onNowClick: unref(handleNowClick)
164
+ }, createSlots({
165
+ default: withCtx(() => {
166
+ var _a, _b, _c, _d, _e, _f, _g;
167
+ return [
168
+ unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$2, {
169
+ key: 0,
170
+ "model-value": `${unref(curYear)}`,
171
+ "hide-trigger": "",
172
+ "value-format": "YYYY",
173
+ onChange: _cache[0] || (_cache[0] = (_, date) => {
174
+ curYear.value = date.getFullYear();
175
+ dayData.value = unref(getDaysOfMonth)(unref(curYear), unref(curMonth), unref(dayStartOfWeek));
176
+ showYearPicker.value = false;
177
+ })
178
+ }, null, 8, ["model-value"])) : unref(showMonthPicker) ? (openBlock(), createBlock(_sfc_main$3, {
179
+ key: 1,
180
+ "model-value": `${unref(curYear)}-${unref(curMonth) + 1 < 10 ? `0${unref(curMonth) + 1}` : unref(curMonth) + 1}`,
181
+ "hide-trigger": "",
182
+ "value-format": "YYYY-MM",
183
+ onChange: _cache[1] || (_cache[1] = (_, date) => {
184
+ curMonth.value = date.getMonth();
185
+ dayData.value = unref(getDaysOfMonth)(unref(curYear), unref(curMonth), unref(dayStartOfWeek));
186
+ showMonthPicker.value = false;
187
+ })
188
+ }, null, 8, ["model-value"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
189
+ createElementVNode("div", _hoisted_2, [
190
+ createVNode(_sfc_main$4, {
191
+ type: "date",
192
+ year: unref(curYear),
193
+ month: unref(curMonth),
194
+ onPrevClick: _cache[2] || (_cache[2] = ($event) => handleDateChange("month", "pre")),
195
+ onNextClick: _cache[3] || (_cache[3] = ($event) => handleDateChange("month", "next")),
196
+ onPrevDoubleClick: _cache[4] || (_cache[4] = ($event) => handleDateChange("year", "pre")),
197
+ onNextDoubleClick: _cache[5] || (_cache[5] = ($event) => handleDateChange("year", "next")),
198
+ onYearClick: _cache[6] || (_cache[6] = ($event) => showYearPicker.value = true),
199
+ onMonthClick: _cache[7] || (_cache[7] = ($event) => showMonthPicker.value = true)
200
+ }, createSlots({ _: 2 }, [
201
+ $slots["icon-prev"] ? {
202
+ name: "icon-prev-double",
203
+ fn: withCtx(() => [
204
+ renderSlot(_ctx.$slots, "icon-next")
205
+ ]),
206
+ key: "0"
207
+ } : void 0,
208
+ $slots["icon-next"] ? {
209
+ name: "icon-next-double",
210
+ fn: withCtx(() => [
211
+ renderSlot(_ctx.$slots, "icon-next")
212
+ ]),
213
+ key: "1"
214
+ } : void 0,
215
+ $slots["icon-prev-double"] ? {
216
+ name: "icon-prev-double",
217
+ fn: withCtx(() => [
218
+ renderSlot(_ctx.$slots, "icon-next-double")
219
+ ]),
220
+ key: "2"
221
+ } : void 0,
222
+ $slots["icon-next-double"] ? {
223
+ name: "icon-next-double",
224
+ fn: withCtx(() => [
225
+ renderSlot(_ctx.$slots, "icon-next-double")
226
+ ]),
227
+ key: "3"
228
+ } : void 0
229
+ ]), 1032, ["year", "month"]),
230
+ createVNode(_sfc_main$5, {
231
+ locale: unref(locale),
232
+ abbreviation: unref(abbreviation),
233
+ "day-start-of-week": unref(dayStartOfWeek)
234
+ }, null, 8, ["locale", "abbreviation", "day-start-of-week"]),
235
+ createElementVNode("div", _hoisted_3, [
236
+ (openBlock(true), createElementBlock(Fragment, null, renderList(dayData.value, (row, i) => {
237
+ return openBlock(), createElementBlock("div", {
238
+ key: i,
239
+ class: "yc-picker-row"
240
+ }, [
241
+ (openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ label, value: date }, k) => {
242
+ var _a2;
243
+ return openBlock(), createBlock(_sfc_main$6, {
244
+ key: k,
245
+ value: label,
246
+ "cell-in-view": unref(isCellInView)(date, "date"),
247
+ "is-today": unref(isToday)(date, "date"),
248
+ "is-selected": unref(isSelected)(date, "date"),
249
+ disabled: (_a2 = _ctx.disabledDate) == null ? void 0 : _a2.call(_ctx, date),
250
+ onClick: ($event) => unref(handleSelect)(date)
251
+ }, createSlots({ _: 2 }, [
252
+ $slots.cell ? {
253
+ name: "cell",
254
+ fn: withCtx(() => [
255
+ renderSlot(_ctx.$slots, "cell", { date })
256
+ ]),
257
+ key: "0"
258
+ } : void 0
259
+ ]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
260
+ }), 128))
261
+ ]);
262
+ }), 128))
263
+ ])
264
+ ]),
265
+ _ctx.showTime ? (openBlock(), createElementBlock("div", _hoisted_4, [
266
+ createElementVNode("div", _hoisted_5, toDisplayString(((_a = unref(locale)) == null ? void 0 : _a["datePicker.selectTime"]) || unref(t)("datePicker.selectTime")), 1),
267
+ createVNode(unref(TimePicker), mergeProps(_ctx.timePickerProps, {
268
+ modelValue: unref(timePickerValue),
269
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(timePickerValue) ? timePickerValue.value = $event : null),
270
+ format: unref(valueFormat),
271
+ scrollbar: false,
272
+ "disabled-hours": (_c = (_b = _ctx.disabledTime) == null ? void 0 : _b.call(_ctx, unref(getDateFromFormat)(unref(computedValue)))) == null ? void 0 : _c.disabledHours,
273
+ "disabled-minutes": (_e = (_d = _ctx.disabledTime) == null ? void 0 : _d.call(_ctx, unref(getDateFromFormat)(unref(computedValue)))) == null ? void 0 : _e.disabledMinutes,
274
+ "disabled-seconds": (_g = (_f = _ctx.disabledTime) == null ? void 0 : _f.call(_ctx, unref(getDateFromFormat)(unref(computedValue)))) == null ? void 0 : _g.disabledSeconds,
275
+ "hide-trigger": "",
276
+ "disable-confirm": ""
277
+ }), null, 16, ["modelValue", "format", "disabled-hours", "disabled-minutes", "disabled-seconds"])
278
+ ])) : createCommentVNode("", true)
279
+ ]))
280
+ ];
281
+ }),
282
+ _: 2
283
+ }, [
284
+ $slots.extra ? {
285
+ name: "extra",
286
+ fn: withCtx(() => [
287
+ renderSlot(_ctx.$slots, "extra")
288
+ ]),
289
+ key: "0"
290
+ } : void 0
291
+ ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect", "onNowClick"])
292
+ ]),
293
+ _: 3
294
+ }),
295
+ !_ctx.hideTrigger ? (openBlock(), createBlock(_sfc_main$7, {
296
+ key: 0,
297
+ class: normalizeClass(_ctx.$attrs.class),
298
+ style: normalizeStyle(_ctx.$attrs.style),
299
+ type: _ctx.showTime ? "time" : "date"
300
+ }, createSlots({
301
+ content: withCtx(() => [
302
+ createVNode(unref(ReusePanel))
303
+ ]),
304
+ _: 2
305
+ }, [
306
+ $slots.default ? {
307
+ name: "trigger",
308
+ fn: withCtx(() => [
309
+ renderSlot(_ctx.$slots, "default")
310
+ ]),
311
+ key: "0"
312
+ } : void 0,
313
+ $slots["suffix-icon"] ? {
314
+ name: "suffix-icon",
315
+ fn: withCtx(() => [
316
+ renderSlot(_ctx.$slots, "suffix-icon")
317
+ ]),
318
+ key: "1"
319
+ } : void 0,
320
+ $slots.prefix ? {
321
+ name: "prefix",
322
+ fn: withCtx(() => [
323
+ renderSlot(_ctx.$slots, "prefix")
324
+ ]),
325
+ key: "2"
326
+ } : void 0
327
+ ]), 1032, ["class", "style", "type"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
328
+ ], 64);
329
+ };
330
+ }
331
+ });
332
+ export {
333
+ _sfc_main as default
334
+ };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./DatePicker.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -4,20 +4,24 @@ import _sfc_main$3 from "./component/PickerHeader.vue.js";
4
4
  /* empty css */
5
5
  import _sfc_main$4 from "./component/PickerCell.vue.js";
6
6
  /* empty css */
7
- import _sfc_main$2 from "./component/PickerPanel.vue.js";
7
+ import _sfc_main$1 from "./component/PickerPanel.vue.js";
8
8
  /* empty css */
9
9
  import _sfc_main$5 from "./component/PickerInput.vue.js";
10
10
  /* empty css */
11
- import _sfc_main$1 from "./YcYearPicker.vue.js";
12
- /* empty css */
13
- const _hoisted_1 = { class: "yc-panel-month" };
14
- const _hoisted_2 = { class: "yc-picker-body" };
11
+ import _sfc_main$2 from "./YearPicker.vue.js";
12
+ /* empty css */
13
+ const _hoisted_1 = {
14
+ key: 1,
15
+ class: "yc-panel-month"
16
+ };
17
+ const _hoisted_2 = { class: "yc-panel-month-inner" };
18
+ const _hoisted_3 = { class: "yc-picker-body" };
15
19
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
20
  ...{
17
21
  name: "MonthPicker",
18
22
  inheritAttrs: false
19
23
  },
20
- __name: "YcMonthPicker",
24
+ __name: "MonthPicker",
21
25
  props: {
22
26
  modelValue: { default: void 0 },
23
27
  defaultValue: { default: "" },
@@ -106,80 +110,82 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
110
  return openBlock(), createElementBlock(Fragment, null, [
107
111
  createVNode(unref(DefinePanel), null, {
108
112
  default: withCtx(() => [
109
- unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$1, {
110
- key: 0,
111
- "model-value": `${unref(curYear)}`,
112
- "hide-trigger": "",
113
- "value-format": "YYYY",
114
- onChange: _cache[0] || (_cache[0] = (_, date) => {
115
- curYear.value = date.getFullYear();
116
- showYearPicker.value = false;
117
- })
118
- }, null, 8, ["model-value"])) : (openBlock(), createBlock(_sfc_main$2, {
119
- key: 1,
113
+ createVNode(_sfc_main$1, {
120
114
  locale: unref(locale),
121
115
  "preview-shortcut": _ctx.previewShortcut,
122
116
  shortcuts: _ctx.shortcuts,
123
117
  "shortcuts-position": _ctx.shortcutsPosition,
124
118
  "confirm-btn-disabled": !unref(computedValue),
125
119
  "show-confirm-btn": _ctx.showConfirmBtn,
120
+ "show-footer": !unref(showYearPicker),
126
121
  onConfirm: unref(handleConfirm),
127
122
  onShortcutSelect: unref(handleShortcut)
128
123
  }, createSlots({
129
124
  default: withCtx(() => [
130
- createElementVNode("div", _hoisted_1, [
131
- createVNode(_sfc_main$3, {
132
- year: unref(curYear),
133
- type: "month",
134
- onYearClick: _cache[1] || (_cache[1] = ($event) => showYearPicker.value = true),
135
- onPrevDoubleClick: _cache[2] || (_cache[2] = ($event) => curYear.value--),
136
- onNextDoubleClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
137
- }, createSlots({ _: 2 }, [
138
- $slots["icon-prev-double"] ? {
139
- name: "icon-prev-double",
140
- fn: withCtx(() => [
141
- renderSlot(_ctx.$slots, "icon-next-double")
142
- ]),
143
- key: "0"
144
- } : void 0,
145
- $slots["icon-next-double"] ? {
146
- name: "icon-next-double",
147
- fn: withCtx(() => [
148
- renderSlot(_ctx.$slots, "icon-next-double")
149
- ]),
150
- key: "1"
151
- } : void 0
152
- ]), 1032, ["year"]),
125
+ unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$2, {
126
+ key: 0,
127
+ "model-value": `${unref(curYear)}`,
128
+ "hide-trigger": "",
129
+ "value-format": "YYYY",
130
+ onChange: _cache[0] || (_cache[0] = (_, date) => {
131
+ curYear.value = date.getFullYear();
132
+ showYearPicker.value = false;
133
+ })
134
+ }, null, 8, ["model-value"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
153
135
  createElementVNode("div", _hoisted_2, [
154
- (openBlock(true), createElementBlock(Fragment, null, renderList(monthData.value, (row, i) => {
155
- return openBlock(), createElementBlock("div", {
156
- key: i,
157
- class: "yc-picker-row"
158
- }, [
159
- (openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ value: date, label }, k) => {
160
- var _a;
161
- return openBlock(), createBlock(_sfc_main$4, {
162
- key: k,
163
- value: label,
164
- "cell-in-view": unref(isCellInView)(date, "month"),
165
- "is-today": unref(isToday)(date, "month"),
166
- "is-selected": unref(isSelected)(date, "month"),
167
- disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
168
- onClick: ($event) => unref(handleSelect)(date)
169
- }, createSlots({ _: 2 }, [
170
- $slots.cell ? {
171
- name: "cell",
172
- fn: withCtx(() => [
173
- renderSlot(_ctx.$slots, "cell", { date })
174
- ]),
175
- key: "0"
176
- } : void 0
177
- ]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
178
- }), 128))
179
- ]);
180
- }), 128))
136
+ createVNode(_sfc_main$3, {
137
+ year: unref(curYear),
138
+ type: "month",
139
+ onYearClick: _cache[1] || (_cache[1] = ($event) => showYearPicker.value = true),
140
+ onPrevDoubleClick: _cache[2] || (_cache[2] = ($event) => curYear.value--),
141
+ onNextDoubleClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
142
+ }, createSlots({ _: 2 }, [
143
+ $slots["icon-prev-double"] ? {
144
+ name: "icon-prev-double",
145
+ fn: withCtx(() => [
146
+ renderSlot(_ctx.$slots, "icon-next-double")
147
+ ]),
148
+ key: "0"
149
+ } : void 0,
150
+ $slots["icon-next-double"] ? {
151
+ name: "icon-next-double",
152
+ fn: withCtx(() => [
153
+ renderSlot(_ctx.$slots, "icon-next-double")
154
+ ]),
155
+ key: "1"
156
+ } : void 0
157
+ ]), 1032, ["year"]),
158
+ createElementVNode("div", _hoisted_3, [
159
+ (openBlock(true), createElementBlock(Fragment, null, renderList(monthData.value, (row, i) => {
160
+ return openBlock(), createElementBlock("div", {
161
+ key: i,
162
+ class: "yc-picker-row"
163
+ }, [
164
+ (openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ value: date, label }, k) => {
165
+ var _a;
166
+ return openBlock(), createBlock(_sfc_main$4, {
167
+ key: k,
168
+ value: label,
169
+ "cell-in-view": unref(isCellInView)(date, "month"),
170
+ "is-today": unref(isToday)(date, "month"),
171
+ "is-selected": unref(isSelected)(date, "month"),
172
+ disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
173
+ onClick: ($event) => unref(handleSelect)(date)
174
+ }, createSlots({ _: 2 }, [
175
+ $slots.cell ? {
176
+ name: "cell",
177
+ fn: withCtx(() => [
178
+ renderSlot(_ctx.$slots, "cell", { date })
179
+ ]),
180
+ key: "0"
181
+ } : void 0
182
+ ]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
183
+ }), 128))
184
+ ]);
185
+ }), 128))
186
+ ])
181
187
  ])
182
- ])
188
+ ]))
183
189
  ]),
184
190
  _: 2
185
191
  }, [
@@ -190,7 +196,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
190
196
  ]),
191
197
  key: "0"
192
198
  } : void 0
193
- ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "onConfirm", "onShortcutSelect"]))
199
+ ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect"])
194
200
  ]),
195
201
  _: 3
196
202
  }),
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./MonthPicker.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };