yc-design-vue 2.2.6 → 2.2.9

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