@moubing/bing-ui 0.11.2 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +300 -171
  2. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  3. package/dist/bing-ui.css +1 -1
  4. package/dist/components/BingAnimatedText/BingAnimatedText.js +7 -0
  5. package/dist/components/BingAnimatedText/BingAnimatedText.vue_vue_type_script_setup_true_lang.js +194 -0
  6. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.js +7 -0
  7. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue_vue_type_script_setup_true_lang.js +244 -0
  8. package/dist/components/BingAutocomplete/BingAutocomplete.js +7 -0
  9. package/dist/components/BingAutocomplete/BingAutocomplete.vue.d.ts +4 -4
  10. package/dist/components/BingAutocomplete/BingAutocomplete.vue_vue_type_script_setup_true_lang.js +560 -0
  11. package/dist/components/BingButton/BingButton.js +7 -0
  12. package/dist/components/BingButton/BingButton.vue.d.ts +2 -2
  13. package/dist/components/BingButton/BingButton.vue_vue_type_script_setup_true_lang.js +200 -0
  14. package/dist/components/BingCard/BingCard.js +7 -0
  15. package/dist/components/BingCard/BingCard.vue_vue_type_script_setup_true_lang.js +481 -0
  16. package/dist/components/BingCarouselTransition/BingCarouselTransition.js +7 -0
  17. package/dist/components/BingCarouselTransition/BingCarouselTransition.vue_vue_type_script_setup_true_lang.js +174 -0
  18. package/dist/components/BingCheckbox/BingCheckbox.js +7 -0
  19. package/dist/components/BingCheckbox/BingCheckbox.vue.d.ts +4 -4
  20. package/dist/components/BingCheckbox/BingCheckbox.vue_vue_type_script_setup_true_lang.js +233 -0
  21. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.context.js +4 -0
  22. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.js +7 -0
  23. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue.d.ts +4 -4
  24. package/dist/components/BingCheckboxGroup/BingCheckboxGroup.vue_vue_type_script_setup_true_lang.js +105 -0
  25. package/dist/components/BingCodeBlock/BingCodeBlock.highlight.js +78 -0
  26. package/dist/components/BingCodeBlock/BingCodeBlock.js +7 -0
  27. package/dist/components/BingCodeBlock/BingCodeBlock.vue_vue_type_script_setup_true_lang.js +347 -0
  28. package/dist/components/BingColorPicker/BingColorPicker.js +7 -0
  29. package/dist/components/BingColorPicker/BingColorPicker.utils.d.ts +70 -0
  30. package/dist/components/BingColorPicker/BingColorPicker.utils.js +265 -0
  31. package/dist/components/BingColorPicker/BingColorPicker.vue.d.ts +7 -7
  32. package/dist/components/BingColorPicker/BingColorPicker.vue_vue_type_script_setup_true_lang.js +540 -0
  33. package/dist/components/BingColorPicker/BingColorPickerFormatEditor.js +7 -0
  34. package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue.d.ts +27 -0
  35. package/dist/components/BingColorPicker/BingColorPickerFormatEditor.vue_vue_type_script_setup_true_lang.js +142 -0
  36. package/dist/components/BingColorPicker/BingColorPickerSpectrum.js +7 -0
  37. package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue.d.ts +26 -0
  38. package/dist/components/BingColorPicker/BingColorPickerSpectrum.vue_vue_type_script_setup_true_lang.js +168 -0
  39. package/dist/components/BingConfigProvider/BingConfigProvider.js +5 -0
  40. package/dist/components/BingConfigProvider/BingConfigProvider.types.d.ts +5 -0
  41. package/dist/components/BingConfigProvider/BingConfigProvider.vue.d.ts +18 -0
  42. package/dist/components/BingConfigProvider/BingConfigProvider.vue_vue_type_script_setup_true_lang.js +18 -0
  43. package/dist/components/BingConfigProvider/index.d.ts +3 -0
  44. package/dist/components/BingCursor/BingCursor.controller.js +240 -0
  45. package/dist/components/BingCursor/BingCursor.js +7 -0
  46. package/dist/components/BingCursor/BingCursor.native.js +20 -0
  47. package/dist/components/BingCursor/BingCursor.presets.js +60 -0
  48. package/dist/components/BingCursor/BingCursor.shapes.js +83 -0
  49. package/dist/components/BingCursor/BingCursor.styleSource.js +83 -0
  50. package/dist/components/BingCursor/BingCursor.vue_vue_type_script_setup_true_lang.js +73 -0
  51. package/dist/components/BingDatePicker/BingDatePicker.js +7 -0
  52. package/dist/components/BingDatePicker/BingDatePicker.utils.d.ts +26 -0
  53. package/dist/components/BingDatePicker/BingDatePicker.utils.js +137 -0
  54. package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +14 -14
  55. package/dist/components/BingDatePicker/BingDatePicker.vue_vue_type_script_setup_true_lang.js +804 -0
  56. package/dist/components/BingDatePicker/BingDatePickerCalendar.js +7 -0
  57. package/dist/components/BingDatePicker/BingDatePickerCalendar.vue.d.ts +37 -0
  58. package/dist/components/BingDatePicker/BingDatePickerCalendar.vue_vue_type_script_setup_true_lang.js +248 -0
  59. package/dist/components/BingDatePicker/BingDatePickerTimePanel.js +7 -0
  60. package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue.d.ts +26 -0
  61. package/dist/components/BingDatePicker/BingDatePickerTimePanel.vue_vue_type_script_setup_true_lang.js +97 -0
  62. package/dist/components/BingDeckTransition/BingDeckTransition.js +7 -0
  63. package/dist/components/BingDeckTransition/BingDeckTransition.vue_vue_type_script_setup_true_lang.js +187 -0
  64. package/dist/components/BingDialog/BingDialog.js +7 -0
  65. package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -5
  66. package/dist/components/BingDialog/BingDialog.vue_vue_type_script_setup_true_lang.js +558 -0
  67. package/dist/components/BingDropDown/BingDropDown.context.js +4 -0
  68. package/dist/components/BingDropDown/BingDropDown.js +7 -0
  69. package/dist/components/BingDropDown/BingDropDown.vue.d.ts +1 -2
  70. package/dist/components/BingDropDown/BingDropDown.vue_vue_type_script_setup_true_lang.js +649 -0
  71. package/dist/components/BingDropDown/BingDropDownItem.js +7 -0
  72. package/dist/components/BingDropDown/BingDropDownItem.vue.d.ts +1 -1
  73. package/dist/components/BingDropDown/BingDropDownItem.vue_vue_type_script_setup_true_lang.js +308 -0
  74. package/dist/components/BingFilePreview/BingFilePreview.js +7 -0
  75. package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +4 -5
  76. package/dist/components/BingFilePreview/BingFilePreview.vue_vue_type_script_setup_true_lang.js +589 -0
  77. package/dist/components/BingForm/BingForm.context.js +7 -0
  78. package/dist/components/BingForm/BingForm.js +7 -0
  79. package/dist/components/BingForm/BingForm.vue.d.ts +0 -1
  80. package/dist/components/BingForm/BingForm.vue_vue_type_script_setup_true_lang.js +300 -0
  81. package/dist/components/BingForm/formFocus.js +13 -0
  82. package/dist/components/BingForm/formTabOrder.js +27 -0
  83. package/dist/components/BingForm/useFormControl.d.ts +1 -1
  84. package/dist/components/BingForm/useFormControl.js +24 -0
  85. package/dist/components/BingForm/useFormNextHint.js +135 -0
  86. package/dist/components/BingFormItem/BingFormItem.js +7 -0
  87. package/dist/components/BingFormItem/BingFormItem.vue.d.ts +1 -1
  88. package/dist/components/BingFormItem/BingFormItem.vue_vue_type_script_setup_true_lang.js +252 -0
  89. package/dist/components/BingIcon/BingIcon.js +7 -0
  90. package/dist/components/BingIcon/BingIcon.vue_vue_type_script_setup_true_lang.js +48 -0
  91. package/dist/components/BingImage/BingImage.js +7 -0
  92. package/dist/components/BingImage/BingImage.vue_vue_type_script_setup_true_lang.js +244 -0
  93. package/dist/components/BingImagePreview/BingImagePreview.js +7 -0
  94. package/dist/components/BingImagePreview/BingImagePreview.vue.d.ts +4 -5
  95. package/dist/components/BingImagePreview/BingImagePreview.vue_vue_type_script_setup_true_lang.js +699 -0
  96. package/dist/components/BingInput/BingInput.js +7 -0
  97. package/dist/components/BingInput/BingInput.vue.d.ts +6 -6
  98. package/dist/components/BingInput/BingInput.vue_vue_type_script_setup_true_lang.js +311 -0
  99. package/dist/components/BingRadio/BingRadio.js +7 -0
  100. package/dist/components/BingRadio/BingRadio.vue.d.ts +4 -4
  101. package/dist/components/BingRadio/BingRadio.vue_vue_type_script_setup_true_lang.js +170 -0
  102. package/dist/components/BingRadioGroup/BingRadioGroup.context.js +4 -0
  103. package/dist/components/BingRadioGroup/BingRadioGroup.js +7 -0
  104. package/dist/components/BingRadioGroup/BingRadioGroup.vue.d.ts +4 -4
  105. package/dist/components/BingRadioGroup/BingRadioGroup.vue_vue_type_script_setup_true_lang.js +125 -0
  106. package/dist/components/BingResizable/BingResizable.js +7 -0
  107. package/dist/components/BingResizable/BingResizable.vue.d.ts +1 -1
  108. package/dist/components/BingResizable/BingResizable.vue_vue_type_script_setup_true_lang.js +555 -0
  109. package/dist/components/BingScrollbar/BingScrollbar.js +7 -0
  110. package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -2
  111. package/dist/components/BingScrollbar/BingScrollbar.vue_vue_type_script_setup_true_lang.js +398 -0
  112. package/dist/components/BingSelect/BingSelect.js +7 -0
  113. package/dist/components/BingSelect/BingSelect.vue.d.ts +7 -7
  114. package/dist/components/BingSelect/BingSelect.vue_vue_type_script_setup_true_lang.js +1066 -0
  115. package/dist/components/BingSlider/BingSlider.js +7 -0
  116. package/dist/components/BingSlider/BingSlider.vue.d.ts +6 -6
  117. package/dist/components/BingSlider/BingSlider.vue_vue_type_script_setup_true_lang.js +130 -0
  118. package/dist/components/BingSortableList/BingSortableList.js +7 -0
  119. package/dist/components/BingSortableList/BingSortableList.vue_vue_type_script_setup_true_lang.js +334 -0
  120. package/dist/components/BingSortableList/BingSortableListItem.js +7 -0
  121. package/dist/components/BingSortableList/BingSortableListItem.vue_vue_type_script_setup_true_lang.js +76 -0
  122. package/dist/components/BingSplitPane/BingSplitPane.js +7 -0
  123. package/dist/components/BingSplitPane/BingSplitPane.vue_vue_type_script_setup_true_lang.js +167 -0
  124. package/dist/components/BingTable/BingTable.js +7 -0
  125. package/dist/components/BingTable/BingTable.measurements.js +72 -0
  126. package/dist/components/BingTable/BingTable.vue.d.ts +1 -2
  127. package/dist/components/BingTable/BingTable.vue_vue_type_script_setup_true_lang.js +1416 -0
  128. package/dist/components/BingTable/BingTableCellValue.js +7 -0
  129. package/dist/components/BingTable/BingTableCellValue.vue_vue_type_script_setup_true_lang.js +68 -0
  130. package/dist/components/BingTable/BingTableHeaderCell.js +5 -0
  131. package/dist/components/BingTable/BingTableHeaderCell.vue_vue_type_script_setup_true_lang.js +45 -0
  132. package/dist/components/BingTable/BingTableHeaderContent.js +7 -0
  133. package/dist/components/BingTable/BingTableHeaderContent.vue_vue_type_script_setup_true_lang.js +110 -0
  134. package/dist/components/BingTable/useTableColumns.js +126 -0
  135. package/dist/components/BingTableColumnControls/BingTableColumnControls.js +7 -0
  136. package/dist/components/BingTableColumnControls/BingTableColumnControls.vue.d.ts +1 -1
  137. package/dist/components/BingTableColumnControls/BingTableColumnControls.vue_vue_type_script_setup_true_lang.js +251 -0
  138. package/dist/components/BingTabs/BingTabs.js +7 -0
  139. package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -3
  140. package/dist/components/BingTabs/BingTabs.vue_vue_type_script_setup_true_lang.js +320 -0
  141. package/dist/components/BingTag/BingTag.js +7 -0
  142. package/dist/components/BingTag/BingTag.vue.d.ts +0 -1
  143. package/dist/components/BingTag/BingTag.vue_vue_type_script_setup_true_lang.js +65 -0
  144. package/dist/components/BingTextarea/BingTextarea.js +7 -0
  145. package/dist/components/BingTextarea/BingTextarea.vue.d.ts +6 -6
  146. package/dist/components/BingTextarea/BingTextarea.vue_vue_type_script_setup_true_lang.js +243 -0
  147. package/dist/components/BingToast/BingToast.js +7 -0
  148. package/dist/components/BingToast/BingToast.service.js +132 -0
  149. package/dist/components/BingToast/BingToast.types.d.ts +1 -1
  150. package/dist/components/BingToast/BingToast.types.js +19 -0
  151. package/dist/components/BingToast/BingToast.vue.d.ts +0 -1
  152. package/dist/components/BingToast/BingToast.vue_vue_type_script_setup_true_lang.js +307 -0
  153. package/dist/components/BingTooltip/BingTooltip.js +7 -0
  154. package/dist/components/BingTooltip/BingTooltip.shared.js +14 -0
  155. package/dist/components/BingTooltip/BingTooltip.vue.d.ts +4 -5
  156. package/dist/components/BingTooltip/BingTooltip.vue_vue_type_script_setup_true_lang.js +572 -0
  157. package/dist/components/BingTreeSelect/BingTreeSelect.js +7 -0
  158. package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +7 -7
  159. package/dist/components/BingTreeSelect/BingTreeSelect.vue_vue_type_script_setup_true_lang.js +1274 -0
  160. package/dist/components/index.d.ts +1 -0
  161. package/dist/icons/LICENSE-lucide.txt +39 -0
  162. package/dist/icons/createIcon.d.ts +8 -0
  163. package/dist/icons/createIcon.js +36 -0
  164. package/dist/icons/icons.d.ts +51 -0
  165. package/dist/icons/icons.js +252 -0
  166. package/dist/icons/index.d.ts +3 -0
  167. package/dist/index.js +48 -0
  168. package/dist/motion/clickParticles.d.ts +1 -1
  169. package/dist/motion/clickParticles2.js +66 -0
  170. package/dist/motion/index.d.ts +1 -1
  171. package/dist/motion/index.js +17 -0
  172. package/dist/motion/liquidHover.js +36 -0
  173. package/dist/motion/optionDetailMotion.d.ts +7 -1
  174. package/dist/motion/optionDetailMotion.js +74 -0
  175. package/dist/motion/panelMotion.js +19 -0
  176. package/dist/motion/reducedMotion.d.ts +16 -0
  177. package/dist/motion/reducedMotion.js +28 -0
  178. package/dist/motion/selectPanelMotion.js +115 -0
  179. package/dist/motion/smoothScroll.d.ts +2 -0
  180. package/dist/motion/smoothScroll.js +276 -0
  181. package/dist/motion/useClickFeedback.js +47 -0
  182. package/dist/motion/useTextControlCaret.js +136 -0
  183. package/dist/utils/clipboard.d.ts +9 -0
  184. package/dist/utils/clipboard.js +16 -0
  185. package/dist/utils/config.d.ts +42 -0
  186. package/dist/utils/config.js +37 -0
  187. package/dist/utils/controlAttrs.js +37 -0
  188. package/dist/utils/floating.d.ts +86 -0
  189. package/dist/utils/floating.js +99 -0
  190. package/dist/utils/glass.js +25 -0
  191. package/dist/utils/overlay.js +94 -0
  192. package/dist/utils/scrollLock.js +44 -0
  193. package/dist/utils/search.d.ts +16 -0
  194. package/dist/utils/search.js +23 -0
  195. package/dist/utils/useClientReady.js +10 -0
  196. package/dist/utils/useDeferredBlurValidation.d.ts +18 -0
  197. package/dist/utils/useDeferredBlurValidation.js +34 -0
  198. package/dist/utils/useKeyboardScrollSync.d.ts +11 -0
  199. package/dist/utils/useKeyboardScrollSync.js +28 -0
  200. package/dist/utils/useOptionDetailPanel.d.ts +50 -0
  201. package/dist/utils/useOptionDetailPanel.js +180 -0
  202. package/dist/utils/useOutsidePointerDown.d.ts +8 -0
  203. package/dist/utils/useOutsidePointerDown.js +17 -0
  204. package/dist/utils/useSearchShortcutFocus.d.ts +18 -0
  205. package/dist/utils/useSearchShortcutFocus.js +47 -0
  206. package/dist/utils/useVirtualList.d.ts +42 -0
  207. package/dist/utils/useVirtualList.js +74 -0
  208. package/package.json +15 -9
  209. package/dist/bing-ui.es.js +0 -31278
  210. package/dist/bing-ui.umd.js +0 -229
@@ -0,0 +1,804 @@
1
+ import { useConfigZIndex as e } from "../../utils/config.js";
2
+ import { useReducedMotion as t } from "../../motion/reducedMotion.js";
3
+ import { useClickFeedback as n } from "../../motion/useClickFeedback.js";
4
+ import { isolateFormControls as r, useFormControl as i } from "../BingForm/useFormControl.js";
5
+ import a from "../BingButton/BingButton.js";
6
+ import { CalendarDays as ee, Check as te, ChevronDown as ne, Clock3 as re, X as ie } from "../../icons/icons.js";
7
+ import ae from "../BingIcon/BingIcon.js";
8
+ import { compactSmoothScrollOptions as oe, resolveComponentSmoothScroll as se } from "../../motion/smoothScroll.js";
9
+ import ce from "../BingScrollbar/BingScrollbar.js";
10
+ import { useOverlay as le } from "../../utils/overlay.js";
11
+ import { useClientReady as ue } from "../../utils/useClientReady.js";
12
+ import { createGlassCssVariables as de, defaultGlassEffect as o } from "../../utils/glass.js";
13
+ import { computeFloatingPosition as fe, useFloatingAutoUpdate as pe } from "../../utils/floating.js";
14
+ import { getPanelHiddenTransform as me, panelEnterMotion as he, panelLeaveMotion as ge } from "../../motion/panelMotion.js";
15
+ import { compareTypedValue as _e, createShortcuts as ve, defaultValueFormats as ye, normalizeForType as be, parseDateValue as xe } from "./BingDatePicker.utils.js";
16
+ import Se from "./BingDatePickerCalendar.js";
17
+ import Ce from "./BingDatePickerTimePanel.js";
18
+ import { Fragment as we, Teleport as Te, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as Ee, createVNode as f, defineComponent as De, nextTick as p, normalizeClass as m, normalizeStyle as Oe, onBeforeUnmount as ke, openBlock as h, ref as g, renderList as Ae, toDisplayString as _, unref as v, watch as je, withCtx as y, withDirectives as Me, withModifiers as Ne } from "vue";
19
+ import { gsap as b } from "gsap";
20
+ import x from "dayjs";
21
+ //#region src/components/BingDatePicker/BingDatePicker.vue?vue&type=script&setup=true&lang.ts
22
+ var Pe = [
23
+ "id",
24
+ "disabled",
25
+ "aria-label",
26
+ "aria-expanded",
27
+ "aria-invalid",
28
+ "aria-describedby"
29
+ ], Fe = {
30
+ key: 1,
31
+ class: "bing-date-picker__range-value"
32
+ }, Ie = { class: "bing-date-picker__shortcut-text" }, Le = { class: "bing-date-picker__main" }, Re = {
33
+ key: 0,
34
+ class: "bing-date-picker__range-tabs"
35
+ }, ze = {
36
+ key: 0,
37
+ class: "bing-date-picker__footer"
38
+ }, Be = /* @__PURE__ */ De({
39
+ __name: "BingDatePicker",
40
+ props: {
41
+ id: { default: void 0 },
42
+ modelValue: { default: null },
43
+ type: { default: "date" },
44
+ range: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ placeholder: { default: void 0 },
49
+ startPlaceholder: { default: "开始" },
50
+ endPlaceholder: { default: "结束" },
51
+ disabled: {
52
+ type: Boolean,
53
+ default: void 0
54
+ },
55
+ clearable: {
56
+ type: Boolean,
57
+ default: !0
58
+ },
59
+ size: { default: void 0 },
60
+ block: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ minWidth: { default: 220 },
65
+ format: { default: void 0 },
66
+ valueFormat: { default: void 0 },
67
+ locale: { default: "zh-CN" },
68
+ firstDayOfWeek: { default: 1 },
69
+ min: { default: void 0 },
70
+ max: { default: void 0 },
71
+ disabledDate: {
72
+ type: Function,
73
+ default: void 0
74
+ },
75
+ disabledTime: {
76
+ type: Function,
77
+ default: void 0
78
+ },
79
+ hourStep: { default: 1 },
80
+ minuteStep: { default: 1 },
81
+ secondStep: { default: 1 },
82
+ smoothScroll: {
83
+ type: [Boolean, Object],
84
+ default: !0
85
+ },
86
+ showShortcuts: {
87
+ type: Boolean,
88
+ default: !0
89
+ },
90
+ panelMaxHeight: { default: 420 },
91
+ ariaLabel: { default: void 0 },
92
+ ariaDescribedby: { default: void 0 },
93
+ status: { default: void 0 },
94
+ glass: {
95
+ type: Boolean,
96
+ default: o.glass
97
+ },
98
+ glassBlur: { default: void 0 },
99
+ glassOpacity: { default: void 0 },
100
+ glassSaturation: { default: void 0 }
101
+ },
102
+ emits: [
103
+ "update:modelValue",
104
+ "change",
105
+ "clear",
106
+ "open",
107
+ "close",
108
+ "confirm",
109
+ "cancel"
110
+ ],
111
+ setup(o, { expose: De, emit: Be }) {
112
+ let Ve = t(), { vClickFeedback: He, playClickFeedback: Ue } = n(), S = o, C = Be, We = ue(), { formItem: w, resolvedId: Ge, resolvedSize: Ke, resolvedDisabled: T, resolvedStatus: qe, resolvedAriaDescribedby: Je } = i(S);
113
+ r();
114
+ let E = g(null), D = g(null), Ye = g(null), Xe = g(null), Ze = g(null), O = g(!1), k = g(!1), A = g(!1), j = g(x().startOf("month")), M = g(x().year()), Qe = g("calendar"), N = g("start"), P = g(null), F = g(null), I = g(null), L = g(null), R = g({
115
+ left: 0,
116
+ placement: "bottom",
117
+ top: 0,
118
+ width: 0
119
+ }), z = !1, B, V, H, $e = s(() => S.valueFormat ?? ye[S.type]), U = s(() => S.format ?? $e.value), et = s(() => S.type === "date" || S.type === "datetime"), tt = s(() => S.type === "datetime" || S.type === "time"), nt = s(() => S.range || S.type === "datetime" || S.type === "time"), rt = s(() => se(S.smoothScroll, oe, {
120
+ keyboard: !1,
121
+ respectReducedMotion: !0,
122
+ smoothTouchpad: !1
123
+ })), it = s(() => K(S.min)), at = s(() => K(S.max)), ot = s(() => de("bing-date-picker", {
124
+ glass: S.glass,
125
+ glassBlur: S.glassBlur,
126
+ glassOpacity: S.glassOpacity,
127
+ glassSaturation: S.glassSaturation
128
+ })), st = s(() => ({
129
+ "--bing-date-picker-min-width": Pt(S.minWidth),
130
+ ...ot.value
131
+ })), ct = pe(dn, { enabled: () => O.value }), lt = e("datePicker"), W = le({
132
+ open: () => k.value,
133
+ elements: () => [
134
+ E.value,
135
+ D.value,
136
+ Xe.value
137
+ ],
138
+ zIndex: () => lt.value,
139
+ onEscape: () => an()
140
+ }), G = s(() => {
141
+ if (typeof window > "u" || !R.value.width) return !1;
142
+ let { left: e, width: t } = R.value;
143
+ return e - 124 < 8 && e + t + 124 > window.innerWidth - 8;
144
+ }), ut = s(() => ({
145
+ zIndex: W.zIndex.value,
146
+ left: `${R.value.left}px`,
147
+ top: `${R.value.top}px`,
148
+ width: `${R.value.width}px`,
149
+ maxHeight: `min(${Pt(S.panelMaxHeight)}, calc(100vh - 24px))`,
150
+ ...ot.value
151
+ })), dt = s(() => {
152
+ let e = R.value.left - 116 - 8, t = R.value.left + R.value.width + 8;
153
+ return {
154
+ left: `${e >= 8 || typeof window > "u" ? e : Ft(t, 8, Math.max(8, window.innerWidth - 116 - 8))}px`,
155
+ position: "fixed",
156
+ top: `${R.value.top}px`,
157
+ zIndex: W.zIndex.value,
158
+ ...ot.value
159
+ };
160
+ }), ft = s(() => [
161
+ "bing-date-picker",
162
+ `bing-date-picker--${Ke.value}`,
163
+ `bing-date-picker--${S.type}`,
164
+ `bing-date-picker--status-${qe.value}`,
165
+ {
166
+ "is-open": O.value,
167
+ "is-closing": A.value,
168
+ "is-range": S.range,
169
+ "is-disabled": T.value,
170
+ "is-invalid": qe.value === "error",
171
+ "is-block": S.block || !!w,
172
+ "has-value": mt.value,
173
+ "has-clear-action": S.clearable && mt.value && !T.value
174
+ }
175
+ ]), pt = s(() => [
176
+ "bing-date-picker__panel",
177
+ `bing-date-picker__panel--${S.type}`,
178
+ `is-placement-${R.value.placement}`,
179
+ {
180
+ "is-range": S.range,
181
+ "is-closing": A.value
182
+ }
183
+ ]), mt = s(() => S.range ? Array.isArray(S.modelValue) && S.modelValue.filter(Boolean).length > 0 : typeof S.modelValue == "string" && S.modelValue.length > 0), ht = s(() => S.range ? Array.isArray(S.modelValue) ? S.modelValue.map((e) => K(e)?.format(U.value) ?? "").filter(Boolean).join(" - ") : "" : typeof S.modelValue == "string" ? K(S.modelValue)?.format(U.value) ?? S.modelValue : ""), gt = s(() => Array.isArray(S.modelValue) ? K(S.modelValue[0])?.format(U.value) ?? S.modelValue[0] : ""), _t = s(() => Array.isArray(S.modelValue) ? K(S.modelValue[1])?.format(U.value) ?? S.modelValue[1] : "");
184
+ function vt() {
185
+ Ye.value?.stop(), Ze.value?.stop();
186
+ }
187
+ function yt() {
188
+ Ze.value?.scrollToCurrent();
189
+ }
190
+ let bt = s(() => S.range ? (N.value === "start" ? I.value : L.value) ?? It() : F.value ?? It()), xt = s(() => nt.value ? S.range ? !!(I.value && L.value && !Z(I.value, "start") && !Z(L.value, "end") && (S.type !== "time" || !Rt(I.value, L.value))) : !!(F.value && !Z(F.value, "start")) : !0), St = s(() => ve(S.type, S.range)), Ct = s(() => S.type === "year" || Qe.value === "year" ? "year" : S.type === "month" ? "month" : "date"), wt = s(() => S.type !== "year" && S.type !== "time");
191
+ function Tt(e) {
192
+ return e.filter((e) => e != null);
193
+ }
194
+ function Et() {
195
+ B?.kill(), B = void 0;
196
+ }
197
+ function Dt() {
198
+ return Tt([D.value, Xe.value]);
199
+ }
200
+ function Ot(e = !1) {
201
+ let t = Dt();
202
+ V?.kill(), V = void 0, e && t.length && b.set(t, { clearProps: "opacity,visibility,transform,transformOrigin" });
203
+ }
204
+ function kt(e = !1) {
205
+ let t = Dt();
206
+ H?.kill(), H = void 0, e && t.length && b.set(t, { clearProps: "opacity,visibility,transform,transformOrigin" });
207
+ }
208
+ function At() {
209
+ let e = Dt().filter((e) => e === D.value || !G.value);
210
+ if (e.length) {
211
+ if (Ot(), b.killTweensOf(e), Ve()) {
212
+ b.set(e, { clearProps: "opacity,visibility,transform,transformOrigin" });
213
+ return;
214
+ }
215
+ b.set(e, {
216
+ opacity: 0,
217
+ ...me(R.value.placement)
218
+ }), V = b.timeline({
219
+ defaults: {
220
+ ...he,
221
+ overwrite: !0
222
+ },
223
+ onComplete: () => {
224
+ V = void 0, b.set(e, { clearProps: "opacity,visibility,transform,transformOrigin" });
225
+ }
226
+ }), V.to(e, {
227
+ opacity: 1,
228
+ scale: 1,
229
+ x: 0,
230
+ y: 0
231
+ });
232
+ }
233
+ }
234
+ function jt(e) {
235
+ kt(!0), k.value = !1, A.value = !1, P.value = null, e && p(() => E.value?.focus());
236
+ }
237
+ function Mt(e) {
238
+ let t = Dt().filter((e) => e === D.value || !G.value);
239
+ if (!t.length || Ve()) {
240
+ jt(e);
241
+ return;
242
+ }
243
+ let n = me(R.value.placement);
244
+ kt(), b.killTweensOf(t), b.set(t, { transformOrigin: n.transformOrigin }), H = b.timeline({
245
+ defaults: {
246
+ ...ge,
247
+ overwrite: !0
248
+ },
249
+ onComplete: () => jt(e)
250
+ }), H.to(t, {
251
+ autoAlpha: 0,
252
+ ...n
253
+ });
254
+ }
255
+ async function Nt(e) {
256
+ await p();
257
+ let t = D.value;
258
+ if (!t || !O.value || A.value || e <= 0) return;
259
+ let n = t.querySelector(".bing-date-picker__view"), r = Tt([t, n]);
260
+ Et(), b.killTweensOf(r), b.set(t, { clearProps: "height,overflow" });
261
+ let i = t.getBoundingClientRect().height;
262
+ if (!(i <= 0)) {
263
+ if (Ve()) {
264
+ b.set(r, { clearProps: "height,overflow,opacity,visibility,transform,transformOrigin" });
265
+ return;
266
+ }
267
+ b.set(t, {
268
+ height: e,
269
+ overflow: "hidden"
270
+ }), n && b.set(n, {
271
+ autoAlpha: 0,
272
+ scale: .985,
273
+ transformOrigin: "50% 0%",
274
+ y: 8
275
+ }), B = b.timeline({
276
+ defaults: {
277
+ ease: "power3.out",
278
+ overwrite: !0
279
+ },
280
+ onComplete: () => {
281
+ B = void 0, b.set(t, { clearProps: "height,overflow" }), n && b.set(n, { clearProps: "opacity,visibility,transform,transformOrigin" });
282
+ }
283
+ }), B.to(t, {
284
+ duration: Math.abs(i - e) > 1 ? .22 : .01,
285
+ height: i
286
+ }, 0), n && B.to(n, {
287
+ autoAlpha: 1,
288
+ duration: .2,
289
+ scale: 1,
290
+ y: 0
291
+ }, .03);
292
+ }
293
+ }
294
+ je(() => [S.type, S.modelValue], () => {
295
+ O.value || qt();
296
+ }, { immediate: !0 }), je(Ct, (e, t) => {
297
+ if (!t || !O.value || !D.value) return;
298
+ let n = D.value.getBoundingClientRect().height;
299
+ Nt(n);
300
+ }), je(N, () => {
301
+ !O.value || !tt.value || (vt(), p(yt));
302
+ });
303
+ function Pt(e) {
304
+ return typeof e == "number" ? `${e}px` : e;
305
+ }
306
+ function Ft(e, t, n) {
307
+ return n < t ? t : Math.min(n, Math.max(t, e));
308
+ }
309
+ function It() {
310
+ return q(x());
311
+ }
312
+ function K(e) {
313
+ return xe(e, S.type, $e.value);
314
+ }
315
+ function q(e) {
316
+ return be(e, S.type);
317
+ }
318
+ function J(e) {
319
+ return q(e).format($e.value);
320
+ }
321
+ function Lt(e) {
322
+ let t = null;
323
+ if (Array.isArray(e)) {
324
+ let n = K(e[0]), r = K(e[1]);
325
+ t = n && r ? [n, r] : null;
326
+ } else typeof e == "string" && (t = K(e));
327
+ return {
328
+ value: e,
329
+ parsedValue: t,
330
+ type: S.type,
331
+ range: S.range
332
+ };
333
+ }
334
+ function Y(e, t, n = "start") {
335
+ return _e(e, t, S.type, n);
336
+ }
337
+ function X(e, t) {
338
+ return Y(e, t) < 0;
339
+ }
340
+ function Rt(e, t) {
341
+ return Y(e, t) > 0;
342
+ }
343
+ function zt(e) {
344
+ let t = it.value, n = at.value;
345
+ return !!(t && Y(e, t) < 0 || n && Y(e, n) > 0);
346
+ }
347
+ function Bt(e, t) {
348
+ let n = it.value, r = at.value;
349
+ return !!(n && e.endOf(t).isBefore(n) || r && e.startOf(t).isAfter(r));
350
+ }
351
+ function Z(e, t = N.value) {
352
+ return !!(!e || zt(e) || S.type !== "time" && S.disabledDate?.(e, {
353
+ type: S.type,
354
+ range: S.range,
355
+ role: t
356
+ }) || tt.value && Vt(e, t));
357
+ }
358
+ function Vt(e, t) {
359
+ return [
360
+ "hour",
361
+ "minute",
362
+ "second"
363
+ ].some((n) => Gt(n, e[n](), t, e));
364
+ }
365
+ function Ht(e) {
366
+ if (S.type === "datetime") {
367
+ if (Bt(e, "day")) return !0;
368
+ } else if (zt(e)) return !0;
369
+ return !!S.disabledDate?.(e, {
370
+ type: S.type,
371
+ range: S.range,
372
+ role: N.value
373
+ });
374
+ }
375
+ function Ut(e) {
376
+ return !!(Bt(e, "month") || S.disabledDate?.(e, {
377
+ type: S.type,
378
+ range: S.range,
379
+ role: N.value
380
+ }));
381
+ }
382
+ function Wt(e) {
383
+ return !!(Bt(e, "year") || S.disabledDate?.(e, {
384
+ type: S.type,
385
+ range: S.range,
386
+ role: N.value
387
+ }));
388
+ }
389
+ function Gt(e, t, n = N.value, r = bt.value) {
390
+ let i = r[e](t);
391
+ return zt(i) ? !0 : !!S.disabledTime?.(i, {
392
+ type: S.type,
393
+ range: S.range,
394
+ role: n,
395
+ unit: e,
396
+ value: t
397
+ });
398
+ }
399
+ function Kt(e) {
400
+ let t = S.range ? N.value === "start" ? I.value : L.value : F.value;
401
+ return S.type !== "datetime" || !t ? q(e) : q(e.hour(t.hour()).minute(t.minute()).second(t.second()));
402
+ }
403
+ function qt() {
404
+ if (Qe.value = "calendar", S.range) {
405
+ let e = Array.isArray(S.modelValue) ? S.modelValue : null;
406
+ I.value = e ? K(e[0]) : null, L.value = e ? K(e[1]) : null, F.value = null, N.value = I.value && !L.value ? "end" : "start", Jt(I.value ?? L.value ?? x());
407
+ return;
408
+ }
409
+ F.value = typeof S.modelValue == "string" ? K(S.modelValue) : null, I.value = null, L.value = null, Jt(F.value ?? x());
410
+ }
411
+ function Jt(e) {
412
+ j.value = e.startOf("month"), M.value = e.year();
413
+ }
414
+ function Yt() {
415
+ return S.range ? [I.value, L.value] : [F.value];
416
+ }
417
+ function Xt(e, t, n) {
418
+ return n ? e.startOf(n).valueOf() - t.startOf(n).valueOf() : Y(e, t);
419
+ }
420
+ function Zt(e, t) {
421
+ return Yt().some((n) => n && Xt(n, e, t) === 0);
422
+ }
423
+ function Qt(e, t) {
424
+ let n = I.value, r = L.value ?? P.value;
425
+ if (!S.range || !n || !r) return !1;
426
+ let i = X(n, r) ? n : r, a = X(n, r) ? r : n;
427
+ return t ? !e.endOf(t).isBefore(i) && !e.startOf(t).isAfter(a) : !X(e, i) && !Rt(e, a);
428
+ }
429
+ function Q(e, t = !1) {
430
+ let n = Lt(e);
431
+ C("update:modelValue", e), C("change", n), w?.handleControlChange(), t && C("confirm", n);
432
+ }
433
+ function $t(e) {
434
+ Q(J(e)), $(!0);
435
+ }
436
+ function en(e) {
437
+ let t = Kt(e);
438
+ if (!(et.value && Ht(t)) && !(S.type === "month" && Ut(t)) && !(S.type === "year" && Wt(t))) {
439
+ if (!S.range) {
440
+ F.value = t, nt.value || $t(t);
441
+ return;
442
+ }
443
+ if (!I.value || L.value) {
444
+ I.value = t, L.value = null, N.value = "end";
445
+ return;
446
+ }
447
+ X(t, I.value) ? (L.value = I.value, I.value = t) : L.value = t, N.value = "end";
448
+ }
449
+ }
450
+ function tn(e) {
451
+ if (!Sn(e)) {
452
+ if (S.type === "year") {
453
+ en(e);
454
+ return;
455
+ }
456
+ M.value = e.year(), j.value = j.value.year(e.year()), Qe.value = "calendar";
457
+ }
458
+ }
459
+ function nn(e, t) {
460
+ if (Gt(e, t)) return;
461
+ vt();
462
+ let n = bt.value[e](t);
463
+ if (S.range) {
464
+ if (N.value === "start") {
465
+ I.value = q(n);
466
+ return;
467
+ }
468
+ L.value = q(n);
469
+ return;
470
+ }
471
+ F.value = q(n);
472
+ }
473
+ function rn() {
474
+ if (xt.value) {
475
+ if (S.range && I.value && L.value) {
476
+ let e = X(I.value, L.value) ? I.value : L.value, t = X(I.value, L.value) ? L.value : I.value;
477
+ Q([J(e), J(t)], !0), $(!0);
478
+ return;
479
+ }
480
+ !S.range && F.value && (Q(J(F.value), !0), $(!0));
481
+ }
482
+ }
483
+ function an() {
484
+ C("cancel"), qt(), $(!0);
485
+ }
486
+ function on() {
487
+ !S.clearable || T.value || !mt.value || (C("clear"), Q(null), qt());
488
+ }
489
+ function sn() {
490
+ E.value?.focus();
491
+ }
492
+ function cn() {
493
+ E.value?.blur();
494
+ }
495
+ function ln(e) {
496
+ return S.type === "time" ? 260 : S.type === "datetime" ? Math.max(e, S.range ? 560 : 536) : Math.max(e, S.range ? 320 : 280);
497
+ }
498
+ function un() {
499
+ return D.value?.offsetHeight ? D.value.offsetHeight : S.type === "time" ? S.range ? 370 : 320 : S.type === "month" || S.type === "year" ? S.range ? 360 : 300 : S.type === "datetime" ? S.range ? 460 : 410 : S.range ? 430 : 382;
500
+ }
501
+ function dn() {
502
+ let e = E.value;
503
+ if (!e || typeof window > "u") return;
504
+ let t = e.getBoundingClientRect(), n = Math.min(ln(t.width), Math.max(1, window.innerWidth - 24)), { side: r, left: i, top: a } = fe({
505
+ anchor: t,
506
+ floating: {
507
+ width: n,
508
+ height: un()
509
+ },
510
+ side: "bottom",
511
+ gap: 8,
512
+ padding: 12
513
+ });
514
+ R.value = {
515
+ left: i,
516
+ placement: r,
517
+ top: a,
518
+ width: n
519
+ };
520
+ }
521
+ je(G, () => {
522
+ k.value && p(ct.schedule);
523
+ });
524
+ function fn() {
525
+ T.value || O.value || (kt(!0), A.value = !1, qt(), k.value = !0, O.value = !0, yn(), ct.start(), C("open"), p(async () => {
526
+ dn(), await p(), dn(), yt(), At(), D.value?.focus();
527
+ }));
528
+ }
529
+ function $(e = !1) {
530
+ O.value && (Et(), Ot(), vt(), O.value = !1, A.value = !0, P.value = null, bn(), ct.dispose(), C("close"), Mt(e));
531
+ }
532
+ function pn() {
533
+ if (O.value) {
534
+ $(!0);
535
+ return;
536
+ }
537
+ fn();
538
+ }
539
+ function mn(e) {
540
+ e.stopPropagation(), E.value?.focus(), pn();
541
+ }
542
+ function hn(e) {
543
+ if (!T.value && !(e.key === "Escape" && (e.defaultPrevented || !W.isTop(e)))) {
544
+ if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
545
+ e.preventDefault(), Ue(e, E.value), fn();
546
+ return;
547
+ }
548
+ e.key === "Escape" && (e.preventDefault(), an());
549
+ }
550
+ }
551
+ function gn(e) {
552
+ if (!(e.key === "Escape" && (e.defaultPrevented || !W.isTop(e)))) {
553
+ if (e.key === "Escape") {
554
+ e.preventDefault(), an();
555
+ return;
556
+ }
557
+ e.key === "Enter" && nt.value && (e.preventDefault(), xt.value && Ue(e, D.value?.querySelector(".bing-date-picker__footer .bing-button:last-child")), rn());
558
+ }
559
+ }
560
+ function _n(e) {
561
+ O.value || D.value?.contains(e.relatedTarget) || w?.handleControlBlur();
562
+ }
563
+ function vn(e) {
564
+ let t = e.target;
565
+ !(t instanceof Node) || W.contains(t) || !E.value?.contains(t) && !D.value?.contains(t) && !Xe.value?.contains(t) && ($(), w?.handleControlBlur());
566
+ }
567
+ function yn() {
568
+ z || typeof window > "u" || (window.addEventListener("pointerdown", vn, !0), z = !0);
569
+ }
570
+ function bn() {
571
+ !z || typeof window > "u" || (window.removeEventListener("pointerdown", vn, !0), z = !1);
572
+ }
573
+ function xn() {
574
+ wt.value && (Qe.value = "year", M.value = Ct.value === "month" ? M.value : j.value.year());
575
+ }
576
+ function Sn(e) {
577
+ return S.type === "year" ? Wt(e) : Bt(e, "year");
578
+ }
579
+ function Cn(e) {
580
+ return `应用快捷选项: ${e.label}`;
581
+ }
582
+ function wn(e) {
583
+ if (Array.isArray(e.value)) {
584
+ let [t, n] = e.value.map((e) => q(e));
585
+ if (Z(t, "start") || Z(n, "end")) return;
586
+ Q([J(t), J(n)], !0), $(!0);
587
+ return;
588
+ }
589
+ let t = q(e.value);
590
+ Z(t, "start") || (Q(J(t), !0), $(!0));
591
+ }
592
+ return ke(() => {
593
+ Et(), Ot(), kt(), vt(), bn(), ct.dispose();
594
+ }), De({
595
+ focus: sn,
596
+ blur: cn,
597
+ openPanel: fn,
598
+ closePanel: () => $(),
599
+ clear: on
600
+ }), (e, t) => (h(), u("div", {
601
+ class: m(ft.value),
602
+ style: Oe(st.value)
603
+ }, [
604
+ Me((h(), u("button", {
605
+ id: v(Ge),
606
+ ref_key: "triggerRef",
607
+ ref: E,
608
+ class: "bing-date-picker__trigger",
609
+ type: "button",
610
+ disabled: v(T),
611
+ "aria-label": o.ariaLabel,
612
+ "aria-expanded": O.value,
613
+ "aria-invalid": v(qe) === "error" || void 0,
614
+ "aria-describedby": v(Je),
615
+ onClick: pn,
616
+ onKeydown: hn,
617
+ onBlur: _n
618
+ }, [f(ae, {
619
+ class: "bing-date-picker__leading-icon",
620
+ icon: o.type === "time" ? v(re) : v(ee),
621
+ size: "sm"
622
+ }, null, 8, ["icon"]), o.range ? (h(), u("span", Fe, [
623
+ d("span", { class: m({ "is-placeholder": !gt.value }) }, _(gt.value || o.startPlaceholder), 3),
624
+ t[8] ||= d("span", { class: "bing-date-picker__range-separator" }, "-", -1),
625
+ d("span", { class: m({ "is-placeholder": !_t.value }) }, _(_t.value || o.endPlaceholder), 3)
626
+ ])) : (h(), u("span", {
627
+ key: 0,
628
+ class: m(["bing-date-picker__value", { "is-placeholder": !ht.value }])
629
+ }, _(ht.value || o.placeholder || "请选择日期"), 3))], 40, Pe)), [[v(He)]]),
630
+ o.clearable && mt.value && !v(T) ? (h(), c(a, {
631
+ key: 0,
632
+ variant: "ghost",
633
+ size: "xs",
634
+ rounded: "sm",
635
+ throttle: !1,
636
+ class: "bing-date-picker__clear",
637
+ "aria-label": "清空已选日期",
638
+ onClick: Ne(on, ["stop"]),
639
+ onKeydown: t[0] ||= Ne(() => {}, ["stop"])
640
+ }, {
641
+ prefix: y(() => [f(ae, {
642
+ icon: v(ie),
643
+ size: "sm",
644
+ "stroke-width": 1.75
645
+ }, null, 8, ["icon"])]),
646
+ _: 1
647
+ })) : l("", !0),
648
+ f(a, {
649
+ variant: "ghost",
650
+ size: "xs",
651
+ rounded: "sm",
652
+ throttle: !1,
653
+ class: "bing-date-picker__chevron",
654
+ tabindex: "-1",
655
+ "aria-hidden": "true",
656
+ disabled: v(T),
657
+ onClick: mn
658
+ }, {
659
+ prefix: y(() => [f(ae, {
660
+ icon: v(ne),
661
+ size: "sm",
662
+ "stroke-width": 1.75
663
+ }, null, 8, ["icon"])]),
664
+ _: 1
665
+ }, 8, ["disabled"]),
666
+ v(We) ? (h(), c(Te, {
667
+ key: 1,
668
+ to: "body"
669
+ }, [k.value ? (h(), u("div", {
670
+ key: 0,
671
+ ref_key: "panelRef",
672
+ ref: D,
673
+ class: m(pt.value),
674
+ style: Oe(ut.value),
675
+ tabindex: "-1",
676
+ onKeydown: gn
677
+ }, [
678
+ (h(), c(Te, {
679
+ to: "body",
680
+ disabled: G.value
681
+ }, [o.showShortcuts && St.value.length ? (h(), u("div", {
682
+ key: 0,
683
+ ref_key: "shortcutRailRef",
684
+ ref: Xe,
685
+ class: m(["bing-date-picker__shortcut-rail", {
686
+ "is-closing": A.value,
687
+ "is-inline": G.value
688
+ }]),
689
+ style: Oe(G.value ? void 0 : dt.value),
690
+ "aria-label": "日期快捷选项",
691
+ onPointerdown: t[1] ||= Ne(() => {}, ["stop"]),
692
+ onClick: t[2] ||= Ne(() => {}, ["stop"])
693
+ }, [(h(!0), u(we, null, Ae(St.value, (e) => (h(), c(a, {
694
+ key: e.label,
695
+ class: "bing-date-picker__shortcut",
696
+ variant: "tertiary",
697
+ size: "xs",
698
+ rounded: "md",
699
+ "text-effect": "none",
700
+ "text-shine": "none",
701
+ throttle: !1,
702
+ "aria-label": Cn(e),
703
+ onClick: (t) => wn(e)
704
+ }, {
705
+ default: y(() => [d("span", Ie, _(e.text), 1)]),
706
+ _: 2
707
+ }, 1032, ["aria-label", "onClick"]))), 128))], 38)) : l("", !0)], 8, ["disabled"])),
708
+ f(ce, {
709
+ ref_key: "mainScrollRef",
710
+ ref: Ye,
711
+ class: "bing-date-picker__main-scroll",
712
+ smooth: rt.value,
713
+ focusable: !1,
714
+ horizontal: ""
715
+ }, {
716
+ default: y(() => [d("div", Le, [
717
+ o.range ? (h(), u("div", Re, [Me((h(), u("button", {
718
+ class: m(["bing-date-picker__range-tab", { "is-active": N.value === "start" }]),
719
+ type: "button",
720
+ onClick: t[3] ||= (e) => N.value = "start"
721
+ }, [Ee(_(I.value?.format(U.value) || o.startPlaceholder), 1)], 2)), [[v(He)]]), Me((h(), u("button", {
722
+ class: m(["bing-date-picker__range-tab", { "is-active": N.value === "end" }]),
723
+ type: "button",
724
+ onClick: t[4] ||= (e) => N.value = "end"
725
+ }, [Ee(_(L.value?.format(U.value) || o.endPlaceholder), 1)], 2)), [[v(He)]])])) : l("", !0),
726
+ o.type === "time" ? l("", !0) : (h(), c(Se, {
727
+ key: 1,
728
+ month: j.value,
729
+ "onUpdate:month": t[5] ||= (e) => j.value = e,
730
+ year: M.value,
731
+ "onUpdate:year": t[6] ||= (e) => M.value = e,
732
+ type: o.type,
733
+ panel: Ct.value,
734
+ locale: o.locale,
735
+ "first-day-of-week": o.firstDayOfWeek,
736
+ "can-switch-year": wt.value,
737
+ "is-selected": Zt,
738
+ "is-in-range": Qt,
739
+ "is-date-disabled": Ht,
740
+ "is-month-disabled": Ut,
741
+ "is-year-disabled": Sn,
742
+ onHover: t[7] ||= (e) => P.value = e,
743
+ onSelect: en,
744
+ onSelectYear: tn,
745
+ onOpenYear: xn
746
+ }, null, 8, [
747
+ "month",
748
+ "year",
749
+ "type",
750
+ "panel",
751
+ "locale",
752
+ "first-day-of-week",
753
+ "can-switch-year"
754
+ ])),
755
+ tt.value ? (h(), c(Ce, {
756
+ key: 2,
757
+ ref_key: "timePanelRef",
758
+ ref: Ze,
759
+ value: bt.value,
760
+ compact: o.type === "time",
761
+ "hour-step": o.hourStep,
762
+ "minute-step": o.minuteStep,
763
+ "second-step": o.secondStep,
764
+ smooth: rt.value,
765
+ "is-disabled": Gt,
766
+ onSelect: nn
767
+ }, null, 8, [
768
+ "value",
769
+ "compact",
770
+ "hour-step",
771
+ "minute-step",
772
+ "second-step",
773
+ "smooth"
774
+ ])) : l("", !0)
775
+ ])]),
776
+ _: 1
777
+ }, 8, ["smooth"]),
778
+ nt.value ? (h(), u("footer", ze, [f(a, {
779
+ variant: "ghost",
780
+ size: "sm",
781
+ throttle: !1,
782
+ onClick: an
783
+ }, {
784
+ default: y(() => [...t[9] ||= [Ee("取消", -1)]]),
785
+ _: 1
786
+ }), f(a, {
787
+ size: "sm",
788
+ throttle: !1,
789
+ disabled: !xt.value,
790
+ onClick: rn
791
+ }, {
792
+ prefix: y(() => [f(ae, {
793
+ icon: v(te),
794
+ size: "xs"
795
+ }, null, 8, ["icon"])]),
796
+ default: y(() => [t[10] ||= Ee(" 确定 ", -1)]),
797
+ _: 1
798
+ }, 8, ["disabled"])])) : l("", !0)
799
+ ], 38)) : l("", !0)])) : l("", !0)
800
+ ], 6));
801
+ }
802
+ });
803
+ //#endregion
804
+ export { Be as default };