2b3ba8f7fdf2e222c6ef7222f68e72ed9e3b11ed48d8d2897924b3ff53b9b6e6855e07955d9527ecf250f578725f204685378936247092fbdac2a9c101a74c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. import { defineComponent, useAttrs, inject, ref, computed, watch, nextTick, unref, onBeforeUnmount, provide, openBlock, createBlock, mergeProps, withCtx, normalizeClass, normalizeStyle, withModifiers, resolveDynamicComponent, createCommentVNode, renderSlot, createElementVNode, toDisplayString } from 'vue';
  2. import { onClickOutside, unrefElement } from '@vueuse/core';
  3. import { ElInput } from '../../../input/index.mjs';
  4. import { ElIcon } from '../../../icon/index.mjs';
  5. import { ElTooltip } from '../../../tooltip/index.mjs';
  6. import { Clock, Calendar } from '@element-plus/icons-vue';
  7. import { valueEquals, dayOrDaysToDate } from '../utils.mjs';
  8. import { PICKER_POPPER_OPTIONS_INJECTION_KEY, PICKER_BASE_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY } from '../constants.mjs';
  9. import { useCommonPicker } from '../composables/use-common-picker.mjs';
  10. import { timePickerDefaultProps } from './props.mjs';
  11. import PickerRangeTrigger from './picker-range-trigger.mjs';
  12. import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
  13. import { useEmptyValues } from '../../../../hooks/use-empty-values/index.mjs';
  14. import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../../constants/event.mjs';
  15. import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
  16. import { useFormItem } from '../../../form/src/hooks/use-form-item.mjs';
  17. import { useFormDisabled, useFormSize } from '../../../form/src/hooks/use-form-common-props.mjs';
  18. import { useFocusController } from '../../../../hooks/use-focus-controller/index.mjs';
  19. import { debugWarn } from '../../../../utils/error.mjs';
  20. import { isArray, NOOP } from '@vue/shared';
  21. import { EVENT_CODE } from '../../../../constants/aria.mjs';
  22. const __default__ = defineComponent({
  23. name: "Picker"
  24. });
  25. const _sfc_main = /* @__PURE__ */ defineComponent({
  26. ...__default__,
  27. props: timePickerDefaultProps,
  28. emits: [
  29. UPDATE_MODEL_EVENT,
  30. CHANGE_EVENT,
  31. "focus",
  32. "blur",
  33. "clear",
  34. "calendar-change",
  35. "panel-change",
  36. "visible-change",
  37. "keydown"
  38. ],
  39. setup(__props, { expose, emit }) {
  40. const props = __props;
  41. const attrs = useAttrs();
  42. const nsDate = useNamespace("date");
  43. const nsInput = useNamespace("input");
  44. const nsRange = useNamespace("range");
  45. const { formItem } = useFormItem();
  46. const elPopperOptions = inject(PICKER_POPPER_OPTIONS_INJECTION_KEY, {});
  47. const emptyValues = useEmptyValues(props, null);
  48. const refPopper = ref();
  49. const inputRef = ref();
  50. const valueOnOpen = ref(null);
  51. let hasJustTabExitedInput = false;
  52. const pickerDisabled = useFormDisabled();
  53. const commonPicker = useCommonPicker(props, emit);
  54. const {
  55. parsedValue,
  56. pickerActualVisible,
  57. userInput,
  58. pickerVisible,
  59. pickerOptions,
  60. valueIsEmpty,
  61. emitInput,
  62. onPick,
  63. onSetPickerOption,
  64. onCalendarChange,
  65. onPanelChange
  66. } = commonPicker;
  67. const { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, {
  68. disabled: pickerDisabled,
  69. beforeFocus() {
  70. return props.readonly;
  71. },
  72. afterFocus() {
  73. pickerVisible.value = true;
  74. },
  75. beforeBlur(event) {
  76. var _a;
  77. return !hasJustTabExitedInput && ((_a = refPopper.value) == null ? void 0 : _a.isFocusInsideContent(event));
  78. },
  79. afterBlur() {
  80. handleChange();
  81. pickerVisible.value = false;
  82. hasJustTabExitedInput = false;
  83. props.validateEvent && (formItem == null ? void 0 : formItem.validate("blur").catch((err) => debugWarn()));
  84. }
  85. });
  86. const hovering = ref(false);
  87. const rangeInputKls = computed(() => [
  88. nsDate.b("editor"),
  89. nsDate.bm("editor", props.type),
  90. nsInput.e("wrapper"),
  91. nsDate.is("disabled", pickerDisabled.value),
  92. nsDate.is("active", pickerVisible.value),
  93. nsRange.b("editor"),
  94. pickerSize ? nsRange.bm("editor", pickerSize.value) : "",
  95. attrs.class
  96. ]);
  97. const clearIconKls = computed(() => [
  98. nsInput.e("icon"),
  99. nsRange.e("close-icon"),
  100. !showClearBtn.value ? nsRange.e("close-icon--hidden") : ""
  101. ]);
  102. watch(pickerVisible, (val) => {
  103. if (!val) {
  104. userInput.value = null;
  105. nextTick(() => {
  106. emitChange(props.modelValue);
  107. });
  108. } else {
  109. nextTick(() => {
  110. if (val) {
  111. valueOnOpen.value = props.modelValue;
  112. }
  113. });
  114. }
  115. });
  116. const emitChange = (val, isClear) => {
  117. if (isClear || !valueEquals(val, valueOnOpen.value)) {
  118. emit(CHANGE_EVENT, val);
  119. isClear && (valueOnOpen.value = val);
  120. props.validateEvent && (formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn()));
  121. }
  122. };
  123. const emitKeydown = (e) => {
  124. emit("keydown", e);
  125. };
  126. const refInput = computed(() => {
  127. if (inputRef.value) {
  128. return Array.from(inputRef.value.$el.querySelectorAll("input"));
  129. }
  130. return [];
  131. });
  132. const setSelectionRange = (start, end, pos) => {
  133. const _inputs = refInput.value;
  134. if (!_inputs.length)
  135. return;
  136. if (!pos || pos === "min") {
  137. _inputs[0].setSelectionRange(start, end);
  138. _inputs[0].focus();
  139. } else if (pos === "max") {
  140. _inputs[1].setSelectionRange(start, end);
  141. _inputs[1].focus();
  142. }
  143. };
  144. const onBeforeShow = () => {
  145. pickerActualVisible.value = true;
  146. };
  147. const onShow = () => {
  148. emit("visible-change", true);
  149. };
  150. const onHide = () => {
  151. pickerActualVisible.value = false;
  152. pickerVisible.value = false;
  153. emit("visible-change", false);
  154. };
  155. const handleOpen = () => {
  156. pickerVisible.value = true;
  157. };
  158. const handleClose = () => {
  159. pickerVisible.value = false;
  160. };
  161. const displayValue = computed(() => {
  162. if (!pickerOptions.value.panelReady)
  163. return "";
  164. const formattedValue = formatDayjsToString(parsedValue.value);
  165. if (isArray(userInput.value)) {
  166. return [
  167. userInput.value[0] || formattedValue && formattedValue[0] || "",
  168. userInput.value[1] || formattedValue && formattedValue[1] || ""
  169. ];
  170. } else if (userInput.value !== null) {
  171. return userInput.value;
  172. }
  173. if (!isTimePicker.value && valueIsEmpty.value)
  174. return "";
  175. if (!pickerVisible.value && valueIsEmpty.value)
  176. return "";
  177. if (formattedValue) {
  178. return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value ? formattedValue.join(", ") : formattedValue;
  179. }
  180. return "";
  181. });
  182. const isTimeLikePicker = computed(() => props.type.includes("time"));
  183. const isTimePicker = computed(() => props.type.startsWith("time"));
  184. const isDatesPicker = computed(() => props.type === "dates");
  185. const isMonthsPicker = computed(() => props.type === "months");
  186. const isYearsPicker = computed(() => props.type === "years");
  187. const triggerIcon = computed(() => props.prefixIcon || (isTimeLikePicker.value ? Clock : Calendar));
  188. const showClearBtn = computed(() => props.clearable && !pickerDisabled.value && !props.readonly && !valueIsEmpty.value && (hovering.value || isFocused.value));
  189. const onClearIconClick = (event) => {
  190. if (props.readonly || pickerDisabled.value)
  191. return;
  192. if (showClearBtn.value) {
  193. event.stopPropagation();
  194. if (pickerOptions.value.handleClear) {
  195. pickerOptions.value.handleClear();
  196. } else {
  197. emitInput(emptyValues.valueOnClear.value);
  198. }
  199. emitChange(emptyValues.valueOnClear.value, true);
  200. onHide();
  201. }
  202. emit("clear");
  203. };
  204. const onMouseDownInput = async (event) => {
  205. var _a;
  206. if (props.readonly || pickerDisabled.value)
  207. return;
  208. if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || isFocused.value) {
  209. pickerVisible.value = true;
  210. }
  211. };
  212. const onMouseEnter = () => {
  213. if (props.readonly || pickerDisabled.value)
  214. return;
  215. if (!valueIsEmpty.value && props.clearable) {
  216. hovering.value = true;
  217. }
  218. };
  219. const onMouseLeave = () => {
  220. hovering.value = false;
  221. };
  222. const onTouchStartInput = (event) => {
  223. var _a;
  224. if (props.readonly || pickerDisabled.value)
  225. return;
  226. if (((_a = event.touches[0].target) == null ? void 0 : _a.tagName) !== "INPUT" || isFocused.value) {
  227. pickerVisible.value = true;
  228. }
  229. };
  230. const isRangeInput = computed(() => {
  231. return props.type.includes("range");
  232. });
  233. const pickerSize = useFormSize();
  234. const popperEl = computed(() => {
  235. var _a, _b;
  236. return (_b = (_a = unref(refPopper)) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
  237. });
  238. const stophandle = onClickOutside(inputRef, (e) => {
  239. const unrefedPopperEl = unref(popperEl);
  240. const inputEl = unrefElement(inputRef);
  241. if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || inputEl && e.composedPath().includes(inputEl))
  242. return;
  243. pickerVisible.value = false;
  244. });
  245. onBeforeUnmount(() => {
  246. stophandle == null ? void 0 : stophandle();
  247. });
  248. const handleChange = () => {
  249. if (userInput.value) {
  250. const value = parseUserInputToDayjs(displayValue.value);
  251. if (value) {
  252. if (isValidValue(value)) {
  253. emitInput(dayOrDaysToDate(value));
  254. userInput.value = null;
  255. }
  256. }
  257. }
  258. if (userInput.value === "") {
  259. emitInput(emptyValues.valueOnClear.value);
  260. emitChange(emptyValues.valueOnClear.value, true);
  261. userInput.value = null;
  262. }
  263. };
  264. const parseUserInputToDayjs = (value) => {
  265. if (!value)
  266. return null;
  267. return pickerOptions.value.parseUserInput(value);
  268. };
  269. const formatDayjsToString = (value) => {
  270. if (!value)
  271. return null;
  272. return pickerOptions.value.formatToString(value);
  273. };
  274. const isValidValue = (value) => {
  275. return pickerOptions.value.isValidValue(value);
  276. };
  277. const handleKeydownInput = async (event) => {
  278. if (props.readonly || pickerDisabled.value)
  279. return;
  280. const { code } = event;
  281. emitKeydown(event);
  282. if (code === EVENT_CODE.esc) {
  283. if (pickerVisible.value === true) {
  284. pickerVisible.value = false;
  285. event.preventDefault();
  286. event.stopPropagation();
  287. }
  288. return;
  289. }
  290. if (code === EVENT_CODE.down) {
  291. if (pickerOptions.value.handleFocusPicker) {
  292. event.preventDefault();
  293. event.stopPropagation();
  294. }
  295. if (pickerVisible.value === false) {
  296. pickerVisible.value = true;
  297. await nextTick();
  298. }
  299. if (pickerOptions.value.handleFocusPicker) {
  300. pickerOptions.value.handleFocusPicker();
  301. return;
  302. }
  303. }
  304. if (code === EVENT_CODE.tab) {
  305. hasJustTabExitedInput = true;
  306. return;
  307. }
  308. if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {
  309. if (userInput.value === null || userInput.value === "" || isValidValue(parseUserInputToDayjs(displayValue.value))) {
  310. handleChange();
  311. pickerVisible.value = false;
  312. }
  313. event.stopPropagation();
  314. return;
  315. }
  316. if (userInput.value) {
  317. event.stopPropagation();
  318. return;
  319. }
  320. if (pickerOptions.value.handleKeydownInput) {
  321. pickerOptions.value.handleKeydownInput(event);
  322. }
  323. };
  324. const onUserInput = (e) => {
  325. userInput.value = e;
  326. if (!pickerVisible.value) {
  327. pickerVisible.value = true;
  328. }
  329. };
  330. const handleStartInput = (event) => {
  331. const target = event.target;
  332. if (userInput.value) {
  333. userInput.value = [target.value, userInput.value[1]];
  334. } else {
  335. userInput.value = [target.value, null];
  336. }
  337. };
  338. const handleEndInput = (event) => {
  339. const target = event.target;
  340. if (userInput.value) {
  341. userInput.value = [userInput.value[0], target.value];
  342. } else {
  343. userInput.value = [null, target.value];
  344. }
  345. };
  346. const handleStartChange = () => {
  347. var _a;
  348. const values = userInput.value;
  349. const value = parseUserInputToDayjs(values && values[0]);
  350. const parsedVal = unref(parsedValue);
  351. if (value && value.isValid()) {
  352. userInput.value = [
  353. formatDayjsToString(value),
  354. ((_a = displayValue.value) == null ? void 0 : _a[1]) || null
  355. ];
  356. const newValue = [value, parsedVal && (parsedVal[1] || null)];
  357. if (isValidValue(newValue)) {
  358. emitInput(dayOrDaysToDate(newValue));
  359. userInput.value = null;
  360. }
  361. }
  362. };
  363. const handleEndChange = () => {
  364. var _a;
  365. const values = unref(userInput);
  366. const value = parseUserInputToDayjs(values && values[1]);
  367. const parsedVal = unref(parsedValue);
  368. if (value && value.isValid()) {
  369. userInput.value = [
  370. ((_a = unref(displayValue)) == null ? void 0 : _a[0]) || null,
  371. formatDayjsToString(value)
  372. ];
  373. const newValue = [parsedVal && parsedVal[0], value];
  374. if (isValidValue(newValue)) {
  375. emitInput(dayOrDaysToDate(newValue));
  376. userInput.value = null;
  377. }
  378. }
  379. };
  380. const focus = () => {
  381. var _a;
  382. (_a = inputRef.value) == null ? void 0 : _a.focus();
  383. };
  384. const blur = () => {
  385. var _a;
  386. (_a = inputRef.value) == null ? void 0 : _a.blur();
  387. };
  388. provide(PICKER_BASE_INJECTION_KEY, {
  389. props,
  390. emptyValues
  391. });
  392. provide(ROOT_COMMON_PICKER_INJECTION_KEY, commonPicker);
  393. expose({
  394. focus,
  395. blur,
  396. handleOpen,
  397. handleClose,
  398. onPick
  399. });
  400. return (_ctx, _cache) => {
  401. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  402. ref_key: "refPopper",
  403. ref: refPopper,
  404. visible: unref(pickerVisible),
  405. effect: "light",
  406. pure: "",
  407. trigger: "click"
  408. }, _ctx.$attrs, {
  409. role: "dialog",
  410. teleported: "",
  411. transition: `${unref(nsDate).namespace.value}-zoom-in-top`,
  412. "popper-class": [`${unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass],
  413. "popper-style": _ctx.popperStyle,
  414. "popper-options": unref(elPopperOptions),
  415. "fallback-placements": _ctx.fallbackPlacements,
  416. "gpu-acceleration": false,
  417. placement: _ctx.placement,
  418. "stop-popper-mouse-event": false,
  419. "hide-after": 0,
  420. persistent: "",
  421. onBeforeShow,
  422. onShow,
  423. onHide
  424. }), {
  425. default: withCtx(() => [
  426. !unref(isRangeInput) ? (openBlock(), createBlock(unref(ElInput), {
  427. key: 0,
  428. id: _ctx.id,
  429. ref_key: "inputRef",
  430. ref: inputRef,
  431. "container-role": "combobox",
  432. "model-value": unref(displayValue),
  433. name: _ctx.name,
  434. size: unref(pickerSize),
  435. disabled: unref(pickerDisabled),
  436. placeholder: _ctx.placeholder,
  437. class: normalizeClass([
  438. unref(nsDate).b("editor"),
  439. unref(nsDate).bm("editor", _ctx.type),
  440. unref(nsDate).is("focus", unref(pickerVisible)),
  441. _ctx.$attrs.class
  442. ]),
  443. style: normalizeStyle(_ctx.$attrs.style),
  444. readonly: !_ctx.editable || _ctx.readonly || unref(isDatesPicker) || unref(isMonthsPicker) || unref(isYearsPicker) || _ctx.type === "week",
  445. "aria-label": _ctx.ariaLabel,
  446. tabindex: _ctx.tabindex,
  447. "validate-event": false,
  448. onInput: onUserInput,
  449. onFocus: unref(handleFocus),
  450. onBlur: unref(handleBlur),
  451. onKeydown: handleKeydownInput,
  452. onChange: handleChange,
  453. onMousedown: onMouseDownInput,
  454. onMouseenter: onMouseEnter,
  455. onMouseleave: onMouseLeave,
  456. onTouchstartPassive: onTouchStartInput,
  457. onClick: withModifiers(() => {
  458. }, ["stop"])
  459. }, {
  460. prefix: withCtx(() => [
  461. unref(triggerIcon) ? (openBlock(), createBlock(unref(ElIcon), {
  462. key: 0,
  463. class: normalizeClass(unref(nsInput).e("icon")),
  464. onMousedown: withModifiers(onMouseDownInput, ["prevent"]),
  465. onTouchstartPassive: onTouchStartInput
  466. }, {
  467. default: withCtx(() => [
  468. (openBlock(), createBlock(resolveDynamicComponent(unref(triggerIcon))))
  469. ]),
  470. _: 1
  471. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)
  472. ]),
  473. suffix: withCtx(() => [
  474. unref(showClearBtn) && _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  475. key: 0,
  476. class: normalizeClass(`${unref(nsInput).e("icon")} clear-icon`),
  477. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  478. onClick: onClearIconClick
  479. }, {
  480. default: withCtx(() => [
  481. (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
  482. ]),
  483. _: 1
  484. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)
  485. ]),
  486. _: 1
  487. }, 8, ["id", "model-value", "name", "size", "disabled", "placeholder", "class", "style", "readonly", "aria-label", "tabindex", "onFocus", "onBlur", "onClick"])) : (openBlock(), createBlock(PickerRangeTrigger, {
  488. key: 1,
  489. id: _ctx.id,
  490. ref_key: "inputRef",
  491. ref: inputRef,
  492. "model-value": unref(displayValue),
  493. name: _ctx.name,
  494. disabled: unref(pickerDisabled),
  495. readonly: !_ctx.editable || _ctx.readonly,
  496. "start-placeholder": _ctx.startPlaceholder,
  497. "end-placeholder": _ctx.endPlaceholder,
  498. class: normalizeClass(unref(rangeInputKls)),
  499. style: normalizeStyle(_ctx.$attrs.style),
  500. "aria-label": _ctx.ariaLabel,
  501. tabindex: _ctx.tabindex,
  502. autocomplete: "off",
  503. role: "combobox",
  504. onClick: onMouseDownInput,
  505. onFocus: unref(handleFocus),
  506. onBlur: unref(handleBlur),
  507. onStartInput: handleStartInput,
  508. onStartChange: handleStartChange,
  509. onEndInput: handleEndInput,
  510. onEndChange: handleEndChange,
  511. onMousedown: onMouseDownInput,
  512. onMouseenter: onMouseEnter,
  513. onMouseleave: onMouseLeave,
  514. onTouchstartPassive: onTouchStartInput,
  515. onKeydown: handleKeydownInput
  516. }, {
  517. prefix: withCtx(() => [
  518. unref(triggerIcon) ? (openBlock(), createBlock(unref(ElIcon), {
  519. key: 0,
  520. class: normalizeClass([unref(nsInput).e("icon"), unref(nsRange).e("icon")])
  521. }, {
  522. default: withCtx(() => [
  523. (openBlock(), createBlock(resolveDynamicComponent(unref(triggerIcon))))
  524. ]),
  525. _: 1
  526. }, 8, ["class"])) : createCommentVNode("v-if", true)
  527. ]),
  528. "range-separator": withCtx(() => [
  529. renderSlot(_ctx.$slots, "range-separator", {}, () => [
  530. createElementVNode("span", {
  531. class: normalizeClass(unref(nsRange).b("separator"))
  532. }, toDisplayString(_ctx.rangeSeparator), 3)
  533. ])
  534. ]),
  535. suffix: withCtx(() => [
  536. _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  537. key: 0,
  538. class: normalizeClass(unref(clearIconKls)),
  539. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  540. onClick: onClearIconClick
  541. }, {
  542. default: withCtx(() => [
  543. (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
  544. ]),
  545. _: 1
  546. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)
  547. ]),
  548. _: 3
  549. }, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"]))
  550. ]),
  551. content: withCtx(() => [
  552. renderSlot(_ctx.$slots, "default", {
  553. visible: unref(pickerVisible),
  554. actualVisible: unref(pickerActualVisible),
  555. parsedValue: unref(parsedValue),
  556. format: _ctx.format,
  557. dateFormat: _ctx.dateFormat,
  558. timeFormat: _ctx.timeFormat,
  559. unlinkPanels: _ctx.unlinkPanels,
  560. type: _ctx.type,
  561. defaultValue: _ctx.defaultValue,
  562. showNow: _ctx.showNow,
  563. showConfirm: _ctx.showConfirm,
  564. showFooter: _ctx.showFooter,
  565. showWeekNumber: _ctx.showWeekNumber,
  566. onPick: unref(onPick),
  567. onSelectRange: setSelectionRange,
  568. onSetPickerOption: unref(onSetPickerOption),
  569. onCalendarChange: unref(onCalendarChange),
  570. onPanelChange: unref(onPanelChange),
  571. onMousedown: withModifiers(() => {
  572. }, ["stop"])
  573. })
  574. ]),
  575. _: 3
  576. }, 16, ["visible", "transition", "popper-class", "popper-style", "popper-options", "fallback-placements", "placement"]);
  577. };
  578. }
  579. });
  580. var CommonPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "picker.vue"]]);
  581. export { CommonPicker as default };
  582. //# sourceMappingURL=picker.mjs.map