x-next 1.1.0 → 1.2.0

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 (188) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/_hooks/use-form-item.d.ts +5 -0
  3. package/dist/_hooks/use-picker-focus.d.ts +17 -0
  4. package/dist/components/_components/feedback-icon/index.vue.d.ts +4 -4
  5. package/dist/components/_components/picker/input-range.vue.d.ts +10 -6
  6. package/dist/components/_components/picker/input.vue.d.ts +9 -5
  7. package/dist/components/alert/Alert.vue.d.ts +5 -5
  8. package/dist/components/alert/index.d.ts +10 -10
  9. package/dist/components/date-picker/DatePanel.vue.d.ts +5 -0
  10. package/dist/components/date-picker/DatePicker.vue.d.ts +36 -16
  11. package/dist/components/date-picker/index.d.ts +77 -33
  12. package/dist/components/dialog/Dialog.d.ts +1 -1
  13. package/dist/components/dialog/index.d.ts +3 -3
  14. package/dist/components/drawer/index.d.ts +3 -3
  15. package/dist/components/drawer/src/Drawer.vue.d.ts +1 -1
  16. package/dist/components/dropdown/Dropdown.vue.d.ts +3 -3
  17. package/dist/components/dropdown/DropdownButton.vue.d.ts +4 -4
  18. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +4 -4
  19. package/dist/components/dropdown/index.d.ts +22 -22
  20. package/dist/components/form/FormItem.vue.d.ts +12 -4
  21. package/dist/components/form/context.d.ts +6 -0
  22. package/dist/components/form/form-item-label.vue.d.ts +4 -4
  23. package/dist/components/form/form-item-message.vue.d.ts +2 -0
  24. package/dist/components/form/index.d.ts +30 -8
  25. package/dist/components/form/interface.d.ts +2 -2
  26. package/dist/components/form-input/InputPassword.vue.d.ts +20 -2
  27. package/dist/components/form-input/index.d.ts +22 -4
  28. package/dist/components/form-select/Select.d.ts +3 -3
  29. package/dist/components/form-select/index.d.ts +6 -6
  30. package/dist/components/form-slider/Slider.vue.d.ts +10 -3
  31. package/dist/components/form-slider/index.d.ts +26 -6
  32. package/dist/components/form-slider/slider-button.vue.d.ts +4 -3
  33. package/dist/components/form-switch/Switch.vue.d.ts +2 -1
  34. package/dist/components/form-switch/index.d.ts +5 -2
  35. package/dist/components/form-textarea/Textarea.vue.d.ts +2 -2
  36. package/dist/components/form-textarea/index.d.ts +5 -5
  37. package/dist/components/image/Image.vue.d.ts +10 -9
  38. package/dist/components/image/ImagePreview.vue.d.ts +8 -7
  39. package/dist/components/image/ImagePreviewAction.d.ts +3 -3
  40. package/dist/components/image/ImagePreviewGroup.vue.d.ts +8 -7
  41. package/dist/components/image/index.d.ts +59 -52
  42. package/dist/components/image/preview-arrow.vue.d.ts +2 -2
  43. package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
  44. package/dist/components/layout/LayoutSidebar.vue.d.ts +2 -2
  45. package/dist/components/layout/index.d.ts +4 -4
  46. package/dist/components/link/Link.vue.d.ts +2 -2
  47. package/dist/components/link/index.d.ts +4 -4
  48. package/dist/components/menu/Menu.d.ts +2 -2
  49. package/dist/components/menu/base-menu.vue.d.ts +2 -2
  50. package/dist/components/menu/index.d.ts +4 -4
  51. package/dist/components/menu/sub-menu-pop.vue.d.ts +5 -5
  52. package/dist/components/message/index.d.ts +17 -17
  53. package/dist/components/message/message.vue.d.ts +8 -8
  54. package/dist/components/notification/Notification.d.ts +1 -1
  55. package/dist/components/notification/index.d.ts +3 -3
  56. package/dist/components/pagination/page-item-ellipsis.vue.d.ts +1 -1
  57. package/dist/components/pagination/page-item-step.vue.d.ts +2 -2
  58. package/dist/components/pagination/page-options.vue.d.ts +6 -6
  59. package/dist/components/popconfirm/src/popup.vue.d.ts +1 -1
  60. package/dist/components/popover/Popover.d.ts +1 -1
  61. package/dist/components/popover/index.d.ts +3 -3
  62. package/dist/components/popup/Popup.d.ts +1 -1
  63. package/dist/components/popup/index.d.ts +3 -3
  64. package/dist/components/progress/Progress.vue.d.ts +4 -4
  65. package/dist/components/progress/circle.vue.d.ts +2 -2
  66. package/dist/components/progress/index.d.ts +8 -8
  67. package/dist/components/progress/line.vue.d.ts +1 -1
  68. package/dist/components/progress/steps.vue.d.ts +1 -1
  69. package/dist/components/steps/Step.vue.d.ts +2 -2
  70. package/dist/components/steps/index.d.ts +4 -4
  71. package/dist/components/tabs/Tabs.d.ts +1 -1
  72. package/dist/components/tabs/index.d.ts +3 -3
  73. package/dist/components/tabs/tabs-tab.vue.d.ts +1 -1
  74. package/dist/components/tag/Tag.vue.d.ts +2 -2
  75. package/dist/components/tag/index.d.ts +4 -4
  76. package/dist/components/time-picker/TimeColumn.vue.d.ts +3 -0
  77. package/dist/components/time-picker/TimePanel.vue.d.ts +3 -0
  78. package/dist/components/time-picker/TimePicker.vue.d.ts +33 -17
  79. package/dist/components/time-picker/index.d.ts +73 -36
  80. package/dist/components/time-range-selector/TimeRangeSelector.vue.d.ts +8 -0
  81. package/dist/components/time-range-selector/index.d.ts +22 -0
  82. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  83. package/dist/components/tooltip/index.d.ts +3 -3
  84. package/dist/components/trigger/Trigger.d.ts +1 -1
  85. package/dist/components/trigger/index.d.ts +3 -3
  86. package/dist/es/_hooks/use-form-item.js +36 -10
  87. package/dist/es/_hooks/use-picker-focus.js +57 -0
  88. package/dist/es/_utils/constant.js +17 -5
  89. package/dist/es/components/_components/picker/input-range.vue.js +45 -55
  90. package/dist/es/components/_components/picker/input-range.vue2.js +105 -70
  91. package/dist/es/components/_components/picker/input.vue.js +22 -25
  92. package/dist/es/components/_components/picker/input.vue2.js +58 -43
  93. package/dist/es/components/_components/select-view/select-view.js +67 -66
  94. package/dist/es/components/date-picker/DatePanel.vue.js +102 -94
  95. package/dist/es/components/date-picker/DatePanel.vue2.js +97 -44
  96. package/dist/es/components/date-picker/DatePicker.vue.js +71 -58
  97. package/dist/es/components/date-picker/DatePicker.vue2.js +285 -231
  98. package/dist/es/components/dialog/Dialog.js +154 -132
  99. package/dist/es/components/form/Form.vue2.js +113 -101
  100. package/dist/es/components/form/FormItem.vue.js +26 -22
  101. package/dist/es/components/form/FormItem.vue2.js +162 -125
  102. package/dist/es/components/form/form-item-message.vue.js +31 -24
  103. package/dist/es/components/form/form-item-message.vue2.js +4 -2
  104. package/dist/es/components/form-checkbox/Checkbox.js +75 -71
  105. package/dist/es/components/form-checkbox/CheckboxGroup.js +43 -38
  106. package/dist/es/components/form-input/Input.js +83 -79
  107. package/dist/es/components/form-input/InputPassword.vue.js +19 -16
  108. package/dist/es/components/form-input/InputPassword.vue2.js +39 -29
  109. package/dist/es/components/form-input/InputSearch.js +47 -37
  110. package/dist/es/components/form-input-number/InputNumber.js +134 -133
  111. package/dist/es/components/form-input-tag/InputTag.js +173 -162
  112. package/dist/es/components/form-radio/Radio.js +74 -71
  113. package/dist/es/components/form-radio/RadioGroup.js +55 -49
  114. package/dist/es/components/form-select/Select.js +99 -98
  115. package/dist/es/components/form-slider/Slider.vue.js +28 -28
  116. package/dist/es/components/form-slider/Slider.vue2.js +139 -132
  117. package/dist/es/components/form-slider/slider-button.vue.js +6 -6
  118. package/dist/es/components/form-slider/slider-button.vue2.js +39 -34
  119. package/dist/es/components/form-switch/Switch.vue.js +9 -9
  120. package/dist/es/components/form-switch/Switch.vue2.js +81 -74
  121. package/dist/es/components/form-textarea/Textarea.vue2.js +123 -108
  122. package/dist/es/components/image/Image.vue2.js +77 -76
  123. package/dist/es/components/image/ImagePreview.vue.js +13 -12
  124. package/dist/es/components/image/ImagePreview.vue2.js +141 -136
  125. package/dist/es/components/image/ImagePreviewGroup.vue.js +1 -1
  126. package/dist/es/components/image/ImagePreviewGroup.vue2.js +82 -83
  127. package/dist/es/components/rate/Rate.js +106 -103
  128. package/dist/es/components/time-picker/TimeColumn.vue.js +34 -23
  129. package/dist/es/components/time-picker/TimeColumn.vue2.js +37 -28
  130. package/dist/es/components/time-picker/TimePicker.vue.js +83 -64
  131. package/dist/es/components/time-picker/TimePicker.vue2.js +192 -156
  132. package/dist/es/components/time-range-selector/TimeRangeSelector.vue.js +327 -193
  133. package/dist/es/locale/en-US.js +6 -0
  134. package/dist/es/locale/zh-CN.js +6 -0
  135. package/dist/es/style.css +1 -1
  136. package/dist/icons/_self/down.d.ts +1 -1
  137. package/dist/icons/_self/dropdown/more.d.ts +1 -1
  138. package/dist/icons/_self/empty-better.d.ts +1 -1
  139. package/dist/icons/_self/empty.d.ts +1 -1
  140. package/dist/icons/_self/eye-invisible.d.ts +1 -1
  141. package/dist/icons/_self/eye.d.ts +1 -1
  142. package/dist/icons/_self/full-screen.d.ts +1 -1
  143. package/dist/icons/_self/left.d.ts +1 -1
  144. package/dist/icons/_self/menu/down.d.ts +1 -1
  145. package/dist/icons/_self/minus.d.ts +1 -1
  146. package/dist/icons/_self/more-dot.d.ts +1 -1
  147. package/dist/icons/_self/next.d.ts +1 -1
  148. package/dist/icons/_self/original-size.d.ts +1 -1
  149. package/dist/icons/_self/plus.d.ts +1 -1
  150. package/dist/icons/_self/prev.d.ts +1 -1
  151. package/dist/icons/_self/question-message.d.ts +1 -1
  152. package/dist/icons/_self/right.d.ts +1 -1
  153. package/dist/icons/_self/rotate-left.d.ts +1 -1
  154. package/dist/icons/_self/rotate-right.d.ts +1 -1
  155. package/dist/icons/_self/search.d.ts +1 -1
  156. package/dist/icons/_self/up.d.ts +1 -1
  157. package/dist/icons/_self/zoom-in.d.ts +1 -1
  158. package/dist/icons/_self/zoom-out.d.ts +1 -1
  159. package/dist/icons/_ui/alone-left.d.ts +1 -1
  160. package/dist/icons/_ui/alone-margin-left.d.ts +1 -1
  161. package/dist/icons/_ui/alone-margin-right.d.ts +1 -1
  162. package/dist/icons/_ui/alone-right.d.ts +1 -1
  163. package/dist/icons/_ui/calendar.d.ts +1 -1
  164. package/dist/icons/_ui/time.d.ts +1 -1
  165. package/dist/icons/animation/animation-loading.d.ts +1 -1
  166. package/dist/icons/default/check-circle-fill.d.ts +1 -1
  167. package/dist/icons/default/check.d.ts +1 -1
  168. package/dist/icons/default/close-circle-fill.d.ts +1 -1
  169. package/dist/icons/default/close.d.ts +1 -1
  170. package/dist/icons/default/exclamation-circle-fill.d.ts +1 -1
  171. package/dist/icons/default/exclamation.d.ts +1 -1
  172. package/dist/icons/default/filter.d.ts +1 -1
  173. package/dist/icons/default/info-circle-fill.d.ts +1 -1
  174. package/dist/icons/default/link.d.ts +1 -1
  175. package/dist/icons/default/logo-simple.d.ts +1 -1
  176. package/dist/icons/default/minus-circle-fill.d.ts +1 -1
  177. package/dist/icons/icon.d.ts +2 -2
  178. package/dist/icons/index.d.ts +3 -3
  179. package/dist/index.cjs +4 -4
  180. package/dist/index.umd.js +4 -4
  181. package/dist/locale/interface.d.ts +6 -0
  182. package/dist/style/base.css +1 -1
  183. package/dist/style/date-picker.css +1 -1
  184. package/dist/style/form.css +1 -1
  185. package/dist/style/image.css +1 -1
  186. package/dist/style/time-range-selector.css +1 -1
  187. package/dist/style.css +1 -1
  188. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- import { defineComponent as w, ref as V, watch as o, computed as u } from "vue";
2
- import { getClassNameMixin as k } from "../../_utils/config.js";
3
- import { useLocale as g } from "../../locale/index.js";
4
- import { getWeekdayLabels as b, getHeaderLabel as D, createDateCells as L, moveViewDate as P, normalizePanelValue as i } from "./utils.js";
5
- import { dayjs as c } from "../../_utils/date.js";
6
- const z = w({
1
+ import { defineComponent as K, ref as L, watch as B, computed as i, nextTick as F } from "vue";
2
+ import { getClassNameMixin as Q } from "../../_utils/config.js";
3
+ import { useLocale as Y } from "../../locale/index.js";
4
+ import { getWeekdayLabels as G, getHeaderLabel as J, createDateCells as X, moveViewDate as M, normalizePanelValue as g } from "./utils.js";
5
+ import { dayjs as R } from "../../_utils/date.js";
6
+ const ne = K({
7
7
  name: "DatePanel",
8
8
  props: {
9
9
  mode: {
@@ -69,27 +69,27 @@ const z = w({
69
69
  confirm: () => !0,
70
70
  cancel: () => !0
71
71
  },
72
- setup(e, { emit: n }) {
73
- const f = k("date-picker"), { t: l, locale: r } = g(), t = V(e.viewDate || e.value || e.rangeValue[0] || c());
74
- o(
72
+ setup(e, { emit: s }) {
73
+ const x = Q("date-picker"), { t: o, locale: P } = Y(), d = L(e.viewDate || e.value || e.rangeValue[0] || R()), W = L(), v = L("");
74
+ B(
75
75
  () => e.viewDate,
76
- (a) => {
77
- a && (t.value = a);
76
+ (t) => {
77
+ t && (d.value = t);
78
78
  }
79
- ), o(
79
+ ), B(
80
80
  () => [e.value, e.rangeValue[0], e.rangeValue[1], e.mode],
81
81
  () => {
82
82
  if (e.viewDate) return;
83
- const a = e.value || e.rangeValue[0] || e.rangeValue[1];
84
- a && (t.value = a);
83
+ const t = e.value || e.rangeValue[0] || e.rangeValue[1];
84
+ t && (d.value = t);
85
85
  }
86
86
  );
87
- const s = u(
88
- () => b(e.dayStartOfWeek, r.value.datePicker)
89
- ), m = u(() => D(t.value, e.mode)), y = u(() => e.mode === "month" ? l("datePicker.thisMonth") : e.mode === "year" ? l("datePicker.thisYear") : e.mode === "quarter" ? l("datePicker.thisQuarter") : e.mode === "week" ? l("datePicker.thisWeek") : l("datePicker.today")), v = u(
90
- () => L({
87
+ const H = i(
88
+ () => G(e.dayStartOfWeek, P.value.datePicker)
89
+ ), _ = i(() => J(d.value, e.mode)), N = i(() => e.mode === "month" ? o("datePicker.thisMonth") : e.mode === "year" ? o("datePicker.thisYear") : e.mode === "quarter" ? o("datePicker.thisQuarter") : e.mode === "week" ? o("datePicker.thisWeek") : o("datePicker.today")), r = i(
90
+ () => X({
91
91
  mode: e.mode,
92
- viewDate: t.value,
92
+ viewDate: d.value,
93
93
  selectedValue: e.value,
94
94
  rangeValue: e.rangeValue,
95
95
  previewRangeValue: e.previewRangeValue,
@@ -97,40 +97,93 @@ const z = w({
97
97
  hideNotInViewDates: e.hideNotInViewDates,
98
98
  disabledDate: e.disabledDate,
99
99
  showLunar: e.showLunar,
100
- locale: r.value.datePicker
100
+ locale: P.value.datePicker
101
101
  })
102
- ), d = (a) => {
103
- t.value = a, n("view-date-change", a);
102
+ ), c = i(
103
+ () => e.mode === "date" || e.mode === "week" ? 7 : e.mode === "quarter" ? 2 : 3
104
+ ), T = i(() => {
105
+ const t = e.mode === "week" ? 8 : c.value;
106
+ return Array.from(
107
+ { length: Math.ceil(r.value.length / t) },
108
+ (a, l) => r.value.slice(l * t, (l + 1) * t)
109
+ );
110
+ }), k = (t) => !t.isWeekLabel && !t.disabled && t.inView, U = i(() => {
111
+ const t = r.value.filter(k);
112
+ return t.find((a) => a.title === v.value) ?? t.find((a) => a.selected || a.rangeStart || a.rangeEnd) ?? t.find((a) => a.today && !a.outView) ?? t.find((a) => !a.outView) ?? t[0];
113
+ }), j = () => {
114
+ F(() => {
115
+ var t, a;
116
+ (a = (t = W.value) == null ? void 0 : t.querySelector('[role="gridcell"][tabindex="0"]')) == null || a.focus();
117
+ });
118
+ }, y = (t) => {
119
+ d.value = t, s("view-date-change", t);
120
+ }, q = (t, a = !1) => {
121
+ y(M(d.value, e.mode, t, a)), v.value = "";
122
+ }, E = (t, a) => {
123
+ var C;
124
+ if (!k(a)) return;
125
+ const l = t.key;
126
+ if (![
127
+ "ArrowLeft",
128
+ "ArrowRight",
129
+ "ArrowUp",
130
+ "ArrowDown",
131
+ "Home",
132
+ "End",
133
+ "PageUp",
134
+ "PageDown"
135
+ ].includes(l))
136
+ return;
137
+ t.preventDefault();
138
+ const m = e.mode === "date" || e.mode === "week" ? "day" : e.mode === "year" ? "year" : "month", S = e.mode === "quarter" ? 3 : 1;
139
+ let f = l === "ArrowLeft" ? -1 : l === "ArrowRight" ? 1 : l === "ArrowUp" ? -c.value : c.value, n = a.value, w;
140
+ if (l === "Home" || l === "End") {
141
+ const u = r.value.filter((D) => !D.isWeekLabel), b = u.findIndex((D) => D.title === a.title), V = Math.floor(b / c.value) * c.value, O = Math.min(V + c.value - 1, u.length - 1);
142
+ n = u[l === "Home" ? V : O].value, w = u[l === "Home" ? O : V].value, f = l === "Home" ? 1 : -1;
143
+ } else l === "PageUp" || l === "PageDown" ? (f = l === "PageUp" ? -1 : 1, n = M(a.value, e.mode, f, t.shiftKey)) : n = n.add(f * S, m);
144
+ for (let u = 0; u < 366; u++) {
145
+ const b = g(n, e.mode);
146
+ if (!((C = e.disabledDate) != null && C.call(e, b.toDate()))) break;
147
+ if (n = n.add(f * S, m), w && (f > 0 ? n.isAfter(w, m) : n.isBefore(w, m)) || u === 365) return;
148
+ }
149
+ y(n);
150
+ const h = r.value.find(
151
+ (u) => !u.isWeekLabel && u.value.isSame(n, m)
152
+ );
153
+ h && k(h) && (v.value = h.title, A(h), j());
154
+ }, I = () => {
155
+ e.mode === "date" && y(d.value.startOf("year"));
156
+ }, z = (t) => {
157
+ t.isWeekLabel || t.disabled || !t.inView || s("select", g(t.value, e.mode, e.dayStartOfWeek));
158
+ }, A = (t) => {
159
+ t.isWeekLabel || t.disabled || !t.inView || s("cell-mouse-enter", g(t.value, e.mode, e.dayStartOfWeek));
104
160
  };
105
161
  return {
106
- t: l,
107
- className: f,
108
- cells: v,
109
- headerLabel: m,
110
- todayLabel: y,
111
- weekdayLabels: s,
112
- movePanel: (a, h = !1) => {
113
- d(P(t.value, e.mode, a, h));
114
- },
115
- zoomHeader: () => {
116
- e.mode === "date" && d(t.value.startOf("year"));
117
- },
118
- handleSelect: (a) => {
119
- a.isWeekLabel || a.disabled || !a.inView || n("select", i(a.value, e.mode, e.dayStartOfWeek));
120
- },
121
- handleCellMouseEnter: (a) => {
122
- a.isWeekLabel || a.disabled || !a.inView || n("cell-mouse-enter", i(a.value, e.mode, e.dayStartOfWeek));
123
- },
162
+ t: o,
163
+ className: x,
164
+ cells: r,
165
+ cellRows: T,
166
+ panelRef: W,
167
+ activeTitle: v,
168
+ activeCell: U,
169
+ handleCellKeydown: E,
170
+ headerLabel: _,
171
+ todayLabel: N,
172
+ weekdayLabels: H,
173
+ movePanel: q,
174
+ zoomHeader: I,
175
+ handleSelect: z,
176
+ handleCellMouseEnter: A,
124
177
  handleCellMouseLeave: () => {
125
- n("cell-mouse-leave");
178
+ s("cell-mouse-leave");
126
179
  },
127
180
  selectToday: () => {
128
- const a = c();
129
- n("select", i(a, e.mode, e.dayStartOfWeek)), d(a);
181
+ const t = R();
182
+ s("select", g(t, e.mode, e.dayStartOfWeek)), y(t);
130
183
  }
131
184
  };
132
185
  }
133
186
  });
134
187
  export {
135
- z as default
188
+ ne as default
136
189
  };
@@ -1,10 +1,10 @@
1
1
  import L from "./DatePicker.vue2.js";
2
- import { resolveComponent as g, openBlock as o, createBlock as y, mergeProps as f, withCtx as t, withKeys as v, withModifiers as S, createSlots as h, renderSlot as u, createVNode as p, createElementVNode as i, normalizeClass as n, createElementBlock as s, createCommentVNode as d, Fragment as $, renderList as R, toDisplayString as m } from "vue";
2
+ import { resolveComponent as g, openBlock as o, createBlock as P, mergeProps as f, withCtx as t, withKeys as v, withModifiers as R, createSlots as h, renderSlot as u, createVNode as p, createElementVNode as i, normalizeClass as l, createElementBlock as s, createCommentVNode as d, Fragment as S, renderList as $, toDisplayString as m } from "vue";
3
3
  import B from "../../_virtual/_plugin-vue_export-helper.js";
4
- const z = ["onClick"];
5
- function O(e, l, K, W, A, H) {
6
- const w = g("IconCalendar"), M = g("DateRangeInput"), I = g("DateInput"), C = g("DatePanel"), P = g("TimePanel"), E = g("Trigger");
7
- return o(), y(E, f({
4
+ const K = ["id", "aria-label"], z = ["onClick"];
5
+ function O(e, n, W, A, H, j) {
6
+ const y = g("IconCalendar"), I = g("DateRangeInput"), M = g("DateInput"), C = g("DatePanel"), b = g("TimePanel"), E = g("Trigger");
7
+ return o(), P(E, f({
8
8
  trigger: "click",
9
9
  "animation-name": "x-fade-in",
10
10
  "auto-fit-transform-origin": "",
@@ -19,10 +19,17 @@ function O(e, l, K, W, A, H) {
19
19
  "content-class": e.className.element("popup")
20
20
  }, e.triggerProps, { onPopupVisibleChange: e.handlePopupVisibleChange }), {
21
21
  content: t(() => {
22
- var k, b, D;
22
+ var w, k, D;
23
23
  return [
24
24
  i("div", {
25
- class: n([
25
+ ref: "popupRef",
26
+ id: e.panelId,
27
+ role: "dialog",
28
+ "aria-label": e.t("common.date"),
29
+ tabindex: "-1",
30
+ onKeydown: n[10] || (n[10] = (...a) => e.handlePanelKeydown && e.handlePanelKeydown(...a)),
31
+ onFocusout: n[11] || (n[11] = (...a) => e.handlePopupFocusout && e.handlePopupFocusout(...a)),
32
+ class: l([
26
33
  e.className.element("popup-inner"),
27
34
  {
28
35
  [e.className.modifier("popup-range")]: e.isRange,
@@ -32,7 +39,7 @@ function O(e, l, K, W, A, H) {
32
39
  }, [
33
40
  e.isRange && (!e.isDateTime || e.rangePanelMode === "date") ? (o(), s("div", {
34
41
  key: 0,
35
- class: n(e.className.element("panels"))
42
+ class: l(e.className.element("panels"))
36
43
  }, [
37
44
  p(C, {
38
45
  mode: e.mode,
@@ -50,7 +57,7 @@ function O(e, l, K, W, A, H) {
50
57
  onSelect: e.handlePanelSelect,
51
58
  onCellMouseEnter: e.handlePanelCellMouseEnter,
52
59
  onCellMouseLeave: e.handlePanelCellMouseLeave,
53
- onViewDateChange: l[0] || (l[0] = (a) => e.handleRangeViewDateChange(a, 0)),
60
+ onViewDateChange: n[0] || (n[0] = (a) => e.handleRangeViewDateChange(a, 0)),
54
61
  onCancel: e.handleEsc
55
62
  }, h({ _: 2 }, [
56
63
  e.$slots.cell ? {
@@ -80,7 +87,7 @@ function O(e, l, K, W, A, H) {
80
87
  onSelect: e.handlePanelSelect,
81
88
  onCellMouseEnter: e.handlePanelCellMouseEnter,
82
89
  onCellMouseLeave: e.handlePanelCellMouseLeave,
83
- onViewDateChange: l[1] || (l[1] = (a) => e.handleRangeViewDateChange(a, 1)),
90
+ onViewDateChange: n[1] || (n[1] = (a) => e.handleRangeViewDateChange(a, 1)),
84
91
  onCancel: e.handleEsc
85
92
  }, h({ _: 2 }, [
86
93
  e.$slots.cell ? {
@@ -97,25 +104,25 @@ function O(e, l, K, W, A, H) {
97
104
  ], 2)) : d("", !0),
98
105
  e.isRange && e.isDateTime && e.rangePanelMode === "time" ? (o(), s("div", {
99
106
  key: 1,
100
- class: n(e.className.element("range-time-panel"))
107
+ class: l(e.className.element("range-time-panel"))
101
108
  }, [
102
- (o(), s($, null, R(2, (a, r) => {
103
- var N, V, T;
109
+ (o(), s(S, null, $(2, (a, r) => {
110
+ var V, N, T;
104
111
  return i("div", {
105
112
  key: r,
106
- class: n([
113
+ class: l([
107
114
  e.className.element("range-time-column"),
108
115
  { [e.className.is("active")]: e.focusedIndex === r }
109
116
  ])
110
117
  }, [
111
118
  i("div", {
112
- class: n(e.className.element("time-title"))
119
+ class: l(e.className.element("time-title"))
113
120
  }, m(e.t("datePicker.selectTime")), 3),
114
- p(P, f({
121
+ p(b, f({
115
122
  value: e.rangePanelValue[r],
116
123
  format: e.timeFormat,
117
- "use12-hours": (N = e.timePickerProps) == null ? void 0 : N.use12Hours,
118
- step: (V = e.timePickerProps) == null ? void 0 : V.step
124
+ "use12-hours": (V = e.timePickerProps) == null ? void 0 : V.use12Hours,
125
+ step: (N = e.timePickerProps) == null ? void 0 : N.step
119
126
  }, { ref_for: !0 }, e.getDisabledTimeProps(e.rangePanelValue[r], r === 0 ? "start" : "end"), {
120
127
  "hide-disabled-options": (T = e.timePickerProps) == null ? void 0 : T.hideDisabledOptions,
121
128
  "hide-footer": "",
@@ -126,9 +133,7 @@ function O(e, l, K, W, A, H) {
126
133
  ], 2)) : d("", !0),
127
134
  e.isRange ? d("", !0) : (o(), s("div", {
128
135
  key: 2,
129
- class: n([
130
- { [e.className.element("datetime-body")]: e.isDateTime }
131
- ])
136
+ class: l([{ [e.className.element("datetime-body")]: e.isDateTime }])
132
137
  }, [
133
138
  p(C, {
134
139
  mode: e.mode,
@@ -172,102 +177,102 @@ function O(e, l, K, W, A, H) {
172
177
  ]), 1032, ["mode", "value", "range-value", "preview-range-value", "is-range", "view-date", "day-start-of-week", "disabled-date", "show-lunar", "hide-not-in-view-dates", "shortcuts", "show-today", "show-confirm-btn", "onSelect", "onCellMouseEnter", "onCellMouseLeave", "onViewDateChange", "onShortcut", "onConfirm", "onCancel"]),
173
178
  e.isDateTime ? (o(), s("div", {
174
179
  key: 0,
175
- class: n(e.className.element("time-side"))
180
+ class: l(e.className.element("time-side"))
176
181
  }, [
177
182
  i("div", {
178
- class: n(e.className.element("time-title"))
183
+ class: l(e.className.element("time-title"))
179
184
  }, m(e.t("datePicker.selectTime")), 3),
180
- p(P, f({
185
+ p(b, f({
181
186
  value: e.singlePanelValue,
182
187
  format: e.timeFormat,
183
- "use12-hours": (k = e.timePickerProps) == null ? void 0 : k.use12Hours,
184
- step: (b = e.timePickerProps) == null ? void 0 : b.step
188
+ "use12-hours": (w = e.timePickerProps) == null ? void 0 : w.use12Hours,
189
+ step: (k = e.timePickerProps) == null ? void 0 : k.step
185
190
  }, e.getDisabledTimeProps(e.singlePanelValue), {
186
191
  "hide-disabled-options": (D = e.timePickerProps) == null ? void 0 : D.hideDisabledOptions,
187
192
  "hide-footer": "",
188
- onSelect: l[2] || (l[2] = (a) => e.handleTimeSelect(a))
193
+ onSelect: n[2] || (n[2] = (a) => e.handleTimeSelect(a))
189
194
  }), null, 16, ["value", "format", "use12-hours", "step", "hide-disabled-options"])
190
195
  ], 2)) : d("", !0)
191
196
  ], 2)),
192
197
  !e.isRange && e.isDateTime && (e.showToday || e.needConfirm) ? (o(), s("div", {
193
198
  key: 3,
194
- class: n(e.className.element("datetime-footer"))
199
+ class: l(e.className.element("datetime-footer"))
195
200
  }, [
196
201
  e.showToday ? (o(), s("button", {
197
202
  key: 0,
198
203
  type: "button",
199
- class: n([e.className.element("footer-btn"), e.className.element("today")]),
200
- onClick: l[3] || (l[3] = (...a) => e.handleToday && e.handleToday(...a))
204
+ class: l([e.className.element("footer-btn"), e.className.element("today")]),
205
+ onClick: n[3] || (n[3] = (...a) => e.handleToday && e.handleToday(...a))
201
206
  }, m(e.t("datePicker.today")), 3)) : d("", !0),
202
207
  e.needConfirm ? (o(), s("button", {
203
208
  key: 1,
204
209
  type: "button",
205
- class: n([e.className.element("footer-btn"), e.className.element("confirm")]),
206
- onClick: l[4] || (l[4] = (...a) => e.handleConfirm && e.handleConfirm(...a))
210
+ class: l([e.className.element("footer-btn"), e.className.element("confirm")]),
211
+ onClick: n[4] || (n[4] = (...a) => e.handleConfirm && e.handleConfirm(...a))
207
212
  }, m(e.t("datePicker.ok")), 3)) : d("", !0)
208
213
  ], 2)) : d("", !0),
209
214
  e.isRange && e.isDateTime ? (o(), s("div", {
210
215
  key: 4,
211
- class: n(e.className.element("range-datetime-footer"))
216
+ class: l(e.className.element("range-datetime-footer"))
212
217
  }, [
213
218
  i("button", {
214
219
  type: "button",
215
- class: n([
220
+ class: l([
216
221
  e.className.element("range-datetime-item"),
217
222
  { [e.className.is("active")]: e.rangePanelMode === "date" }
218
223
  ]),
219
- onClick: l[5] || (l[5] = (a) => e.openRangeDatePanel(0))
224
+ onClick: n[5] || (n[5] = (a) => e.openRangeDatePanel(0))
220
225
  }, [
221
226
  i("span", null, m(e.formatTimeDate(e.rangePanelValue[0])), 1)
222
227
  ], 2),
223
228
  i("button", {
224
229
  type: "button",
225
- class: n([
230
+ class: l([
226
231
  e.className.element("range-datetime-item"),
227
232
  { [e.className.is("active")]: e.rangePanelMode === "time" }
228
233
  ]),
229
- onClick: l[6] || (l[6] = (a) => e.openRangeTimePanel(0))
234
+ onClick: n[6] || (n[6] = (a) => e.openRangeTimePanel(0))
230
235
  }, [
231
236
  i("strong", null, m(e.formatTimeValue(e.rangePanelValue[0])), 1)
232
237
  ], 2),
233
238
  i("button", {
234
239
  type: "button",
235
- class: n([
240
+ class: l([
236
241
  e.className.element("range-datetime-item"),
237
242
  { [e.className.is("active")]: e.rangePanelMode === "date" }
238
243
  ]),
239
- onClick: l[7] || (l[7] = (a) => e.openRangeDatePanel(1))
244
+ onClick: n[7] || (n[7] = (a) => e.openRangeDatePanel(1))
240
245
  }, [
241
246
  i("span", null, m(e.formatTimeDate(e.rangePanelValue[1])), 1)
242
247
  ], 2),
243
248
  i("button", {
244
249
  type: "button",
245
- class: n([
250
+ class: l([
246
251
  e.className.element("range-datetime-item"),
247
252
  { [e.className.is("active")]: e.rangePanelMode === "time" }
248
253
  ]),
249
- onClick: l[8] || (l[8] = (a) => e.openRangeTimePanel(1))
254
+ onClick: n[8] || (n[8] = (a) => e.openRangeTimePanel(1))
250
255
  }, [
251
256
  i("strong", null, m(e.formatTimeValue(e.rangePanelValue[1])), 1)
252
257
  ], 2)
253
258
  ], 2)) : d("", !0),
254
259
  e.isRange && (e.shortcuts.length || e.$slots.extra || e.needConfirm) ? (o(), s("div", {
255
260
  key: 5,
256
- class: n(e.className.element("range-footer"))
261
+ class: l(e.className.element("range-footer"))
257
262
  }, [
258
263
  e.shortcuts.length || e.$slots.extra ? (o(), s("div", {
259
264
  key: 0,
260
- class: n(e.className.element("range-shortcuts"))
265
+ class: l(e.className.element("range-shortcuts"))
261
266
  }, [
262
- (o(!0), s($, null, R(e.shortcuts, (a) => (o(), s("button", {
267
+ (o(!0), s(S, null, $(e.shortcuts, (a) => (o(), s("button", {
263
268
  key: String(a.label),
264
269
  type: "button",
265
- class: n(e.className.element("shortcut")),
270
+ class: l(e.className.element("shortcut")),
266
271
  onClick: (r) => e.handleShortcut(a)
267
272
  }, m(a.label), 11, z))), 128)),
268
273
  e.$slots.extra ? (o(), s("div", {
269
274
  key: 0,
270
- class: n(e.className.element("extra"))
275
+ class: l(e.className.element("extra"))
271
276
  }, [
272
277
  u(e.$slots, "extra")
273
278
  ], 2)) : d("", !0)
@@ -275,18 +280,22 @@ function O(e, l, K, W, A, H) {
275
280
  e.needConfirm ? (o(), s("button", {
276
281
  key: 1,
277
282
  type: "button",
278
- class: n([e.className.element("footer-btn"), e.className.element("confirm")]),
279
- onClick: l[9] || (l[9] = (...a) => e.handleConfirm && e.handleConfirm(...a))
283
+ class: l([e.className.element("footer-btn"), e.className.element("confirm")]),
284
+ onClick: n[9] || (n[9] = (...a) => e.handleConfirm && e.handleConfirm(...a))
280
285
  }, m(e.t("datePicker.ok")), 3)) : d("", !0)
281
286
  ], 2)) : d("", !0)
282
- ], 2)
287
+ ], 42, K)
283
288
  ];
284
289
  }),
285
290
  default: t(() => [
286
- e.isRange ? (o(), y(M, f({
291
+ e.isRange ? (o(), P(I, f({
287
292
  key: 0,
288
293
  ref: "inputRef"
289
294
  }, e.inputAttrs, {
295
+ role: "combobox",
296
+ "aria-haspopup": "dialog",
297
+ "aria-expanded": e.mergedPopupVisible,
298
+ "aria-controls": e.mergedPopupVisible ? e.panelId : void 0,
290
299
  class: [
291
300
  e.className.block,
292
301
  e.className.modifier("range"),
@@ -314,12 +323,12 @@ function O(e, l, K, W, A, H) {
314
323
  onBlur: e.handleBlur,
315
324
  onKeydown: [
316
325
  v(e.handleEsc, ["esc"]),
317
- v(S(e.openPanel, ["prevent"]), ["down"])
326
+ v(R(e.openPanel, ["prevent"]), ["down"])
318
327
  ]
319
328
  }), h({
320
329
  "suffix-icon": t(() => [
321
330
  u(e.$slots, "suffix-icon", {}, () => [
322
- p(w)
331
+ p(y)
323
332
  ])
324
333
  ]),
325
334
  _: 2
@@ -338,10 +347,14 @@ function O(e, l, K, W, A, H) {
338
347
  ]),
339
348
  key: "1"
340
349
  } : void 0
341
- ]), 1040, ["class", "style", "value", "input-value", "focused", "focused-index", "format", "size", "disabled", "readonly", "error", "allow-clear", "placeholder", "onFocusedIndexChange", "onChange", "onPressEnter", "onClear", "onFocus", "onBlur", "onKeydown"])) : (o(), y(I, f({
350
+ ]), 1040, ["aria-expanded", "aria-controls", "class", "style", "value", "input-value", "focused", "focused-index", "format", "size", "disabled", "readonly", "error", "allow-clear", "placeholder", "onFocusedIndexChange", "onChange", "onPressEnter", "onClear", "onFocus", "onBlur", "onKeydown"])) : (o(), P(M, f({
342
351
  key: 1,
343
352
  ref: "inputRef"
344
353
  }, e.inputAttrs, {
354
+ role: "combobox",
355
+ "aria-haspopup": "dialog",
356
+ "aria-expanded": e.mergedPopupVisible,
357
+ "aria-controls": e.mergedPopupVisible ? e.panelId : void 0,
345
358
  class: [e.className.block, e.attrs.class],
346
359
  style: e.attrs.style,
347
360
  value: e.singleInputValue,
@@ -362,12 +375,12 @@ function O(e, l, K, W, A, H) {
362
375
  onBlur: e.handleBlur,
363
376
  onKeydown: [
364
377
  v(e.handleEsc, ["esc"]),
365
- v(S(e.openPanel, ["prevent"]), ["down"])
378
+ v(R(e.openPanel, ["prevent"]), ["down"])
366
379
  ]
367
380
  }), h({
368
381
  "suffix-icon": t(() => [
369
382
  u(e.$slots, "suffix-icon", {}, () => [
370
- p(w)
383
+ p(y)
371
384
  ])
372
385
  ]),
373
386
  _: 2
@@ -379,12 +392,12 @@ function O(e, l, K, W, A, H) {
379
392
  ]),
380
393
  key: "0"
381
394
  } : void 0
382
- ]), 1040, ["class", "style", "value", "input-value", "focused", "format", "size", "disabled", "readonly", "error", "allow-clear", "placeholder", "onChange", "onPressEnter", "onClear", "onFocus", "onBlur", "onKeydown"]))
395
+ ]), 1040, ["aria-expanded", "aria-controls", "class", "style", "value", "input-value", "focused", "format", "size", "disabled", "readonly", "error", "allow-clear", "placeholder", "onChange", "onPressEnter", "onClear", "onFocus", "onBlur", "onKeydown"]))
383
396
  ]),
384
397
  _: 3
385
398
  }, 16, ["position", "disabled", "popup-visible", "unmount-on-close", "popup-container", "content-class", "onPopupVisibleChange"]);
386
399
  }
387
- const J = /* @__PURE__ */ B(L, [["render", O]]);
400
+ const Q = /* @__PURE__ */ B(L, [["render", O]]);
388
401
  export {
389
- J as default
402
+ Q as default
390
403
  };