hys-ui 0.2.0 → 0.4.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.
- package/CHANGELOG.md +59 -0
- package/README.md +68 -59
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +227 -60
- package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
- package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
- package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
- package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
- package/dist/components/HysCascader/HysCascader.vue.js +2 -2
- package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
- package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +1092 -142
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +491 -85
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysSearch/HysSearch.vue.js +5 -82
- package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +755 -590
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
- package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
- package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
- package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1416 -1127
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +291 -63
- package/dist/components/HysTour/HysTour3.vue.js +5 -0
- package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
- package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
- package/dist/components/HysTree/HysTree.vue.js +2 -2
- package/dist/components/HysTree/HysTree2.vue.js +195 -184
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/buttonGroup.js +12 -0
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/floatingPosition.js +18 -0
- package/dist/composables/mentionDocument.js +79 -0
- package/dist/composables/mentionEditor.js +58 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/selectOptions.js +44 -38
- package/dist/composables/splitPaneSizes.js +58 -0
- package/dist/composables/table.js +128 -105
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +19 -17
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +118 -80
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useMentionCaret.js +81 -0
- package/dist/composables/useMentionList.js +81 -0
- package/dist/composables/useMentionModel.js +90 -0
- package/dist/composables/useMentionOptions.js +421 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useSplitPaneDrag.js +52 -0
- package/dist/composables/useSplitPaneStorage.js +38 -0
- package/dist/composables/useTable.js +344 -312
- package/dist/composables/useTableSticky.js +79 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTourLayout.js +129 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/config.js +11 -11
- package/dist/index.js +175 -153
- package/dist/internal/MultiSplitPane.vue.js +305 -0
- package/dist/internal/MultiSplitPane2.vue.js +4 -0
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
- package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
- package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +3 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -39
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +19 -5
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
- package/dist/types/components/HysTable/HysTable.vue.d.ts +1742 -5
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -8
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
- package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +3 -0
- package/dist/types/composables/avatar.d.ts +3 -0
- package/dist/types/composables/buttonGroup.d.ts +9 -0
- package/dist/types/composables/cascader.d.ts +3 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +3 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/floatingPosition.d.ts +14 -0
- package/dist/types/composables/formContext.d.ts +2 -0
- package/dist/types/composables/mention.d.ts +284 -0
- package/dist/types/composables/mentionDocument.d.ts +15 -0
- package/dist/types/composables/mentionEditor.d.ts +7 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +185 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/selectOptions.d.ts +7 -0
- package/dist/types/composables/splitPaneSizes.d.ts +11 -0
- package/dist/types/composables/table.d.ts +119 -6
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/tour.d.ts +68 -0
- package/dist/types/composables/transfer.d.ts +7 -0
- package/dist/types/composables/tree.d.ts +3 -0
- package/dist/types/composables/treeSelect.d.ts +3 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +1 -1
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +22 -3
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useMentionCaret.d.ts +6 -0
- package/dist/types/composables/useMentionList.d.ts +23 -0
- package/dist/types/composables/useMentionModel.d.ts +14 -0
- package/dist/types/composables/useMentionOptions.d.ts +26 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
- package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
- package/dist/types/composables/useTable.d.ts +7 -3
- package/dist/types/composables/useTableSticky.d.ts +22 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTourLayout.d.ts +33 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +53 -3
- package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +3 -2
- package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
- package/dist/components/HysTour/HysTour2.vue.js +0 -4
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as sa, ref as B, useId as da, computed as u, watch as ae, onDeactivated as ca, openBlock as r, createElementBlock as s, mergeProps as Le, unref as b, renderSlot as S, createElementVNode as C, toDisplayString as g, Fragment as W, createVNode as $, createBlock as Y, createCommentVNode as p, withCtx as R, createTextVNode as le, normalizeStyle as ke, Transition as va, normalizeClass as se, renderList as K, withModifiers as de, Teleport as ya, nextTick as ge } from "vue";
|
|
2
|
+
import ma from "../../motion/PopupMotion.js";
|
|
3
|
+
import { ChevronsLeft as ha, ChevronLeft as fa, ChevronRight as ba, ChevronsRight as pa, LoaderCircle as ka, X as ga } from "lucide-vue-next";
|
|
3
4
|
import q from "../HysButton/HysButton.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useHysRootAttrs as
|
|
7
|
-
import { useMotion as
|
|
8
|
-
import { useFloating as
|
|
9
|
-
import { calendarDay as _e, civilDay as f, calendarParts as k, calendarWeeks as
|
|
10
|
-
const
|
|
5
|
+
import Pe from "../HysSelect/HysSelect.vue.js";
|
|
6
|
+
import wa from "../HysSegmented/HysSegmented.vue.js";
|
|
7
|
+
import { useHysRootAttrs as Ca } from "../../config.js";
|
|
8
|
+
import { useMotion as Da } from "../../motion/useMotion.js";
|
|
9
|
+
import { useFloating as xa } from "../../composables/useFloating.js";
|
|
10
|
+
import { calendarDay as _e, civilDay as f, calendarParts as k, calendarWeeks as Ma, calendarISO as U, calendarEvents as $a, calendarWeek as Ta, calendarDate as we, calendarFormat as Sa, calendarShift as L } from "../../composables/calendar.js";
|
|
11
|
+
const Va = ["aria-busy", "aria-label"], za = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "hys-ui-calendar-header"
|
|
13
|
-
},
|
|
14
|
+
}, Aa = {
|
|
14
15
|
class: "hys-ui-calendar-title",
|
|
15
16
|
"aria-live": "polite"
|
|
16
|
-
},
|
|
17
|
+
}, Na = {
|
|
17
18
|
key: 0,
|
|
18
19
|
class: "hys-ui-calendar-controls"
|
|
19
|
-
},
|
|
20
|
+
}, Ba = { class: "hys-ui-calendar-navigation" }, Fa = {
|
|
20
21
|
key: 0,
|
|
21
22
|
class: "hys-ui-calendar-loading",
|
|
22
23
|
role: "status"
|
|
23
|
-
},
|
|
24
|
+
}, Wa = ["data-calendar-panel"], Ra = ["aria-label", "aria-readonly"], La = {
|
|
24
25
|
key: 0,
|
|
25
26
|
role: "columnheader"
|
|
26
|
-
},
|
|
27
|
+
}, Pa = {
|
|
27
28
|
key: 0,
|
|
28
29
|
role: "rowheader",
|
|
29
30
|
class: "hys-ui-calendar-week-number"
|
|
30
|
-
},
|
|
31
|
+
}, _a = ["data-date", "aria-selected", "aria-current", "aria-disabled", "aria-label", "tabindex", "onFocus", "onKeydown", "onClick"], Ea = { class: "hys-ui-calendar-day-heading" }, Ha = ["disabled", "aria-pressed", "aria-readonly", "onClick"], Ka = {
|
|
31
32
|
key: 0,
|
|
32
33
|
class: "hys-ui-calendar-events"
|
|
33
|
-
},
|
|
34
|
+
}, Ua = ["tabindex", "disabled", "title", "onClick"], Oa = { key: 0 }, Ia = ["tabindex", "disabled", "aria-expanded", "onClick"], ja = ["aria-label", "aria-readonly"], Ya = ["data-month", "aria-selected", "aria-disabled", "tabindex", "onFocus", "onKeydown", "onClick"], qa = ["disabled", "aria-pressed", "onClick"], Xa = {
|
|
34
35
|
key: 0,
|
|
35
36
|
class: "hys-ui-calendar-month-count"
|
|
36
|
-
},
|
|
37
|
+
}, Za = {
|
|
37
38
|
key: 1,
|
|
38
39
|
class: "hys-ui-calendar-footer"
|
|
39
|
-
},
|
|
40
|
+
}, Ga = ["id", "aria-label"], Ja = { class: "hys-ui-calendar-popup-events" }, Qa = ["disabled", "onClick"], el = { key: 0 }, al = { key: 0 }, vl = /* @__PURE__ */ sa({
|
|
40
41
|
__name: "HysCalendar",
|
|
41
42
|
props: {
|
|
43
|
+
popupTransition: {},
|
|
44
|
+
popupTransitionDuration: {},
|
|
42
45
|
modelValue: {},
|
|
43
46
|
defaultValue: {},
|
|
44
47
|
valueType: {},
|
|
@@ -70,8 +73,8 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
70
73
|
ariaLabel: {}
|
|
71
74
|
},
|
|
72
75
|
emits: ["update:modelValue", "update:mode", "change", "select", "panelChange", "event", "more"],
|
|
73
|
-
setup(m, { expose:
|
|
74
|
-
const o = m, F =
|
|
76
|
+
setup(m, { expose: Ee, emit: He }) {
|
|
77
|
+
const o = m, F = He, Ce = Ca(), te = B(), Ke = da(), O = _e(/* @__PURE__ */ new Date()), X = f(1, 0, 1), Z = f(9999, 11, 31), V = (e) => _e(e, o.valueFormat), x = (e) => {
|
|
75
78
|
const [a, l, t] = e.split("-").map(Number);
|
|
76
79
|
return f(a, l - 1, t);
|
|
77
80
|
}, ce = V(o.modelValue ?? o.defaultValue) ?? O, De = B(ce), D = B(ce), N = B(ce), xe = B(o.defaultMode), z = u(
|
|
@@ -127,7 +130,7 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
127
130
|
);
|
|
128
131
|
});
|
|
129
132
|
function A(e) {
|
|
130
|
-
return o.valueType === "date" || o.valueType === void 0 && (o.modelValue instanceof Date || o.defaultValue instanceof Date) ? we(e) :
|
|
133
|
+
return o.valueType === "date" || o.valueType === void 0 && (o.modelValue instanceof Date || o.defaultValue instanceof Date) ? we(e) : Sa(e, o.valueFormat);
|
|
131
134
|
}
|
|
132
135
|
const re = u(() => {
|
|
133
136
|
if (!o.validRange) return [X, Z];
|
|
@@ -140,19 +143,19 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
140
143
|
const l = k(e), t = k(a);
|
|
141
144
|
if (!((t.year - l.year) * 12 + t.month - l.month > 1))
|
|
142
145
|
return [e, a];
|
|
143
|
-
}),
|
|
146
|
+
}), T = u(() => {
|
|
144
147
|
const e = d.value;
|
|
145
148
|
if (c.value === "year")
|
|
146
149
|
return [f(e.year, 0, 1), f(e.year, 11, 31)];
|
|
147
150
|
const [a, l] = w.value ?? [
|
|
148
151
|
f(e.year, e.month, 1),
|
|
149
152
|
f(e.year, e.month + 1, 0)
|
|
150
|
-
], [t, n] =
|
|
153
|
+
], [t, n] = Ma(a, l, ne.value);
|
|
151
154
|
return [t, o.fixedWeeks && !w.value ? t + 41 : n];
|
|
152
155
|
}), ve = u(() => [
|
|
153
|
-
U(
|
|
154
|
-
U(
|
|
155
|
-
]), { effectiveMotion: Ie } =
|
|
156
|
+
U(T.value[0]),
|
|
157
|
+
U(T.value[1])
|
|
158
|
+
]), { effectiveMotion: Ie } = Da(), $e = B("next"), Te = u(
|
|
156
159
|
() => d.value.year * 12 + (c.value === "year" ? 0 : d.value.month)
|
|
157
160
|
), ye = u(
|
|
158
161
|
() => w.value ? "range:" + ve.value.join(":") : c.value + ":" + Te.value
|
|
@@ -179,9 +182,9 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
179
182
|
e.setAttribute("aria-hidden", "true"), e.inert = !0;
|
|
180
183
|
}
|
|
181
184
|
const Ve = u(
|
|
182
|
-
() =>
|
|
185
|
+
() => $a(o.events ?? [], ...T.value)
|
|
183
186
|
);
|
|
184
|
-
function
|
|
187
|
+
function P(e) {
|
|
185
188
|
var t;
|
|
186
189
|
const [a, l] = re.value;
|
|
187
190
|
return e < X || e > Z || e < a || e > l || !!((t = o.disabledDate) != null && t.call(o, U(e))) || !!w.value && (e < w.value[0] || e > w.value[1]);
|
|
@@ -194,24 +197,24 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
194
197
|
type: l < t ? "prev-month" : l > t ? "next-month" : "current-month",
|
|
195
198
|
isSelected: z.value === e,
|
|
196
199
|
isToday: O === e,
|
|
197
|
-
disabled: !!v.value ||
|
|
200
|
+
disabled: !!v.value || P(e),
|
|
198
201
|
events: Ve.value.dates.get(e) ?? []
|
|
199
202
|
};
|
|
200
203
|
}
|
|
201
204
|
const me = u(
|
|
202
205
|
() => Array.from(
|
|
203
|
-
{ length:
|
|
204
|
-
(e, a) => ze(
|
|
206
|
+
{ length: T.value[1] - T.value[0] + 1 },
|
|
207
|
+
(e, a) => ze(T.value[0] + a)
|
|
205
208
|
)
|
|
206
209
|
), Xe = u(
|
|
207
210
|
() => Array.from({ length: me.value.length / 7 }, (e, a) => ({
|
|
208
|
-
number:
|
|
211
|
+
number: Ta(T.value[0] + a * 7),
|
|
209
212
|
days: me.value.slice(a * 7, a * 7 + 7)
|
|
210
213
|
}))
|
|
211
214
|
);
|
|
212
215
|
function Ze(e) {
|
|
213
216
|
const a = f(d.value.year, e, 1), l = f(d.value.year, e + 1, 0);
|
|
214
|
-
for (let t = a; t <= l; t++) if (!
|
|
217
|
+
for (let t = a; t <= l; t++) if (!P(t)) return !1;
|
|
215
218
|
return !0;
|
|
216
219
|
}
|
|
217
220
|
const G = u(
|
|
@@ -227,16 +230,16 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
227
230
|
events: Ve.value.months.get(d.value.year * 12 + a) ?? []
|
|
228
231
|
};
|
|
229
232
|
})
|
|
230
|
-
),
|
|
233
|
+
), ie = u(
|
|
231
234
|
() => w.value ? `${U(w.value[0])} — ${U(w.value[1])}` : c.value === "year" ? `${d.value.year}${I.value ? "年" : ""}` : I.value ? `${d.value.year}年${d.value.month + 1}月` : oe({ year: "numeric", month: "long" }).format(
|
|
232
235
|
new Date(D.value * 864e5)
|
|
233
236
|
)
|
|
234
237
|
), Ge = u(() => {
|
|
235
238
|
const e = d.value.year, a = Math.max(1, e - 100), l = Math.min(9999, e + 100);
|
|
236
239
|
return Array.from({ length: l - a + 1 }, (t, n) => {
|
|
237
|
-
var
|
|
240
|
+
var i;
|
|
238
241
|
return {
|
|
239
|
-
label: ((
|
|
242
|
+
label: ((i = o.formatter) == null ? void 0 : i.call(o, a + n, "year")) ?? `${a + n}${I.value ? "年" : ""}`,
|
|
240
243
|
value: a + n
|
|
241
244
|
};
|
|
242
245
|
});
|
|
@@ -251,9 +254,9 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
251
254
|
), he = u(() => {
|
|
252
255
|
var a, l, t, n;
|
|
253
256
|
const e = me.value.filter(
|
|
254
|
-
(
|
|
257
|
+
(i) => !i.disabled && (o.showAdjacentDays || i.type === "current-month" || w.value)
|
|
255
258
|
);
|
|
256
|
-
return ((a = e.find((
|
|
259
|
+
return ((a = e.find((i) => V(i.day) === N.value)) == null ? void 0 : a.day) ?? ((l = e.find((i) => i.isSelected)) == null ? void 0 : l.day) ?? ((t = e.find((i) => i.type === "current-month")) == null ? void 0 : t.day) ?? ((n = e[0]) == null ? void 0 : n.day);
|
|
257
260
|
}), Qe = u(() => {
|
|
258
261
|
var a, l, t;
|
|
259
262
|
const e = k(N.value).month + 1;
|
|
@@ -266,17 +269,17 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
266
269
|
Math.floor(Number.isFinite(o.maxEvents) ? o.maxEvents : 3)
|
|
267
270
|
)
|
|
268
271
|
)
|
|
269
|
-
), Ae = B(), fe = B(), M = B(), { open: Ne, style:
|
|
272
|
+
), Ae = B(), fe = B(), M = B(), { placement: ea, open: Ne, style: aa, show: la, close: ta } = xa(Ae, fe, {
|
|
270
273
|
placement: "bottom-start",
|
|
271
274
|
width: () => 320,
|
|
272
275
|
closeOnTab: !0
|
|
273
276
|
});
|
|
274
|
-
function
|
|
275
|
-
|
|
277
|
+
function _() {
|
|
278
|
+
ta(), M.value = void 0;
|
|
276
279
|
}
|
|
277
280
|
ae([() => o.modelValue, () => o.valueFormat], () => {
|
|
278
281
|
const e = V(o.modelValue);
|
|
279
|
-
e !== void 0 && (D.value = e, N.value = e),
|
|
282
|
+
e !== void 0 && (D.value = e, N.value = e), _();
|
|
280
283
|
}), ae(
|
|
281
284
|
[
|
|
282
285
|
() => o.mode,
|
|
@@ -285,37 +288,37 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
285
288
|
v,
|
|
286
289
|
() => o.readonly
|
|
287
290
|
],
|
|
288
|
-
|
|
291
|
+
_
|
|
289
292
|
), ae(
|
|
290
293
|
() => o.events,
|
|
291
294
|
() => {
|
|
292
295
|
M.value && (M.value = ze(x(M.value.day)));
|
|
293
296
|
},
|
|
294
297
|
{ deep: !0 }
|
|
295
|
-
),
|
|
296
|
-
function
|
|
297
|
-
const l = k(e), t = f(l.year, a === "year" ? 0 : l.month, 1), n = f(l.year, a === "year" ? 12 : l.month + 1, 0), [
|
|
298
|
-
return e >= X && e <= Z && n >=
|
|
298
|
+
), ca(_);
|
|
299
|
+
function E(e, a = c.value) {
|
|
300
|
+
const l = k(e), t = f(l.year, a === "year" ? 0 : l.month, 1), n = f(l.year, a === "year" ? 12 : l.month + 1, 0), [i, h] = re.value;
|
|
301
|
+
return e >= X && e <= Z && n >= i && t <= h;
|
|
299
302
|
}
|
|
300
303
|
ae(
|
|
301
304
|
[re, () => o.modelValue],
|
|
302
305
|
() => {
|
|
303
306
|
const [e, a] = re.value;
|
|
304
|
-
e <= a && !
|
|
307
|
+
e <= a && !E(D.value) && (D.value = Math.max(e, Math.min(a, D.value)), N.value = D.value, _());
|
|
305
308
|
},
|
|
306
309
|
{ immediate: !0 }
|
|
307
310
|
);
|
|
308
311
|
function j(e) {
|
|
309
|
-
if (v.value || w.value || !
|
|
312
|
+
if (v.value || w.value || !E(e)) return !1;
|
|
310
313
|
const a = k(D.value), l = k(e);
|
|
311
|
-
return D.value = e, N.value = e,
|
|
314
|
+
return D.value = e, N.value = e, _(), (a.year !== l.year || a.month !== l.month) && F("panelChange", A(e), c.value), !0;
|
|
312
315
|
}
|
|
313
316
|
function Be(e) {
|
|
314
317
|
const a = V(e);
|
|
315
318
|
return a === void 0 ? !1 : j(a);
|
|
316
319
|
}
|
|
317
320
|
function J(e) {
|
|
318
|
-
return e === "today" ? O :
|
|
321
|
+
return e === "today" ? O : L(
|
|
319
322
|
D.value,
|
|
320
323
|
e === "prev-month" ? -1 : e === "next-month" ? 1 : e === "prev-year" ? -12 : 12
|
|
321
324
|
);
|
|
@@ -324,42 +327,42 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
324
327
|
return j(J(e));
|
|
325
328
|
}
|
|
326
329
|
function be(e) {
|
|
327
|
-
return v.value || w.value || !["month", "year"].includes(e) ? !1 : (e === c.value || (o.mode === void 0 && (xe.value = e), F("update:mode", e), F("panelChange", A(D.value), e),
|
|
330
|
+
return v.value || w.value || !["month", "year"].includes(e) ? !1 : (e === c.value || (o.mode === void 0 && (xe.value = e), F("update:mode", e), F("panelChange", A(D.value), e), _()), !0);
|
|
328
331
|
}
|
|
329
332
|
async function Q(e, a = "date") {
|
|
330
|
-
if (v.value || o.readonly ||
|
|
333
|
+
if (v.value || o.readonly || P(e)) return !1;
|
|
331
334
|
const l = A(e), t = z.value;
|
|
332
335
|
return o.modelValue === void 0 && (De.value = e), F("update:modelValue", l), F("select", A(e), { source: a }), t !== e && F("change", A(e)), o.range || j(e), N.value = e, await ge(), z.value === e;
|
|
333
336
|
}
|
|
334
|
-
function
|
|
337
|
+
function na(e) {
|
|
335
338
|
const a = V(e);
|
|
336
339
|
return a === void 0 ? Promise.resolve(!1) : Q(a, "customize");
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function pe(e) {
|
|
339
342
|
if (v.value || e.disabled) return;
|
|
340
343
|
const a = x(e.day), l = f(d.value.year, e.month, 0), t = z.value ?? a, n = k(t);
|
|
341
|
-
let
|
|
344
|
+
let i = Math.max(
|
|
342
345
|
a,
|
|
343
346
|
Math.min(
|
|
344
347
|
l,
|
|
345
|
-
|
|
348
|
+
L(
|
|
346
349
|
t,
|
|
347
350
|
(d.value.year - n.year) * 12 + e.month - 1 - n.month
|
|
348
351
|
)
|
|
349
352
|
)
|
|
350
353
|
);
|
|
351
|
-
if (
|
|
352
|
-
for (
|
|
353
|
-
Q(
|
|
354
|
+
if (P(i))
|
|
355
|
+
for (i = a; i <= l && P(i); ) i++;
|
|
356
|
+
Q(i, "month");
|
|
354
357
|
}
|
|
355
358
|
function Fe(e, a) {
|
|
356
359
|
!v.value && !e.disabled && F("event", e.id, e, a);
|
|
357
360
|
}
|
|
358
|
-
async function
|
|
361
|
+
async function oa(e, a) {
|
|
359
362
|
var l, t;
|
|
360
|
-
v.value || (Ae.value = a.currentTarget, M.value = e, F("more", e.day, e.events),
|
|
363
|
+
v.value || (Ae.value = a.currentTarget, M.value = e, F("more", e.day, e.events), la(), await ge(), (t = (l = fe.value) == null ? void 0 : l.querySelector("button")) == null || t.focus());
|
|
361
364
|
}
|
|
362
|
-
function
|
|
365
|
+
function ra(e, a) {
|
|
363
366
|
a.target.closest(
|
|
364
367
|
'button,a,input,select,textarea,[contenteditable="true"],[role="button"]'
|
|
365
368
|
) || Q(e);
|
|
@@ -376,27 +379,27 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
376
379
|
let t;
|
|
377
380
|
const n = getComputedStyle(te.value).direction === "rtl" ? -1 : 1;
|
|
378
381
|
if (e.key === "Enter" || e.key === " ") {
|
|
379
|
-
e.preventDefault(), l ?
|
|
382
|
+
e.preventDefault(), l ? pe(G.value[k(a).month]) : await Q(a, "keyboard");
|
|
380
383
|
return;
|
|
381
384
|
}
|
|
382
|
-
if (e.key === "ArrowLeft" && (t = l ?
|
|
385
|
+
if (e.key === "ArrowLeft" && (t = l ? L(a, -n) : a - n), e.key === "ArrowRight" && (t = l ? L(a, n) : a + n), e.key === "ArrowUp" && (t = l ? L(a, -3) : a - 7), e.key === "ArrowDown" && (t = l ? L(a, 3) : a + 7), e.key === "Home" && (t = l ? f(d.value.year, 0, 1) : a - (k(a).weekday - ne.value + 7) % 7), e.key === "End" && (t = l ? f(d.value.year, 11, 1) : a + (ne.value + 6 - k(a).weekday + 7) % 7), (e.key === "PageUp" || e.key === "PageDown") && (t = L(
|
|
383
386
|
a,
|
|
384
387
|
(e.key === "PageUp" ? -1 : 1) * (e.shiftKey || l ? 12 : 1)
|
|
385
|
-
)), t === void 0 || (e.preventDefault(), t < X || t > Z || o.range && (t <
|
|
388
|
+
)), t === void 0 || (e.preventDefault(), t < X || t > Z || o.range && (t < T.value[0] || t > T.value[1])))
|
|
386
389
|
return;
|
|
387
|
-
const
|
|
390
|
+
const i = e.key === "Home" ? 1 : e.key === "End" ? -1 : t >= a ? 1 : -1;
|
|
388
391
|
for (let h = 0; h < (l ? 12 : 366); h++) {
|
|
389
392
|
const ee = k(t);
|
|
390
393
|
if (l ? !Array.from(
|
|
391
394
|
{ length: k(f(ee.year, ee.month + 1, 0)).day },
|
|
392
|
-
(
|
|
393
|
-
).every(
|
|
395
|
+
(ia, ua) => t - ee.day + 1 + ua
|
|
396
|
+
).every(P) : !P(t))
|
|
394
397
|
break;
|
|
395
|
-
if (t = l ?
|
|
398
|
+
if (t = l ? L(t, i) : t + i, t < X || t > Z || o.range && (t < T.value[0] || t > T.value[1]) || h === (l ? 11 : 365)) return;
|
|
396
399
|
}
|
|
397
400
|
!o.range && !j(t) || (N.value = t, await We());
|
|
398
401
|
}
|
|
399
|
-
return
|
|
402
|
+
return Ee({
|
|
400
403
|
element: te,
|
|
401
404
|
selectedDay: u(
|
|
402
405
|
() => z.value === void 0 ? void 0 : A(z.value)
|
|
@@ -404,15 +407,15 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
404
407
|
panelValue: u(() => A(D.value)),
|
|
405
408
|
currentMode: c,
|
|
406
409
|
visibleRange: ve,
|
|
407
|
-
pickDay:
|
|
410
|
+
pickDay: na,
|
|
408
411
|
selectDate: H,
|
|
409
412
|
showMonth: Be,
|
|
410
413
|
setMode: be,
|
|
411
414
|
focus: We
|
|
412
|
-
}), (e, a) => (r(),
|
|
415
|
+
}), (e, a) => (r(), s("section", Le({
|
|
413
416
|
ref_key: "element",
|
|
414
417
|
ref: te
|
|
415
|
-
},
|
|
418
|
+
}, b(Ce), {
|
|
416
419
|
class: ["hys-ui-calendar", {
|
|
417
420
|
"hys-ui-calendar--card": !m.fullscreen,
|
|
418
421
|
"hys-ui-calendar--disabled": m.disabled
|
|
@@ -420,19 +423,19 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
420
423
|
"aria-busy": m.loading || void 0,
|
|
421
424
|
"aria-label": m.ariaLabel || y.value.label
|
|
422
425
|
}), [
|
|
423
|
-
m.showHeader ? (r(),
|
|
424
|
-
|
|
425
|
-
date:
|
|
426
|
+
m.showHeader ? (r(), s("header", za, [
|
|
427
|
+
S(e.$slots, "header", {
|
|
428
|
+
date: ie.value,
|
|
426
429
|
value: A(D.value),
|
|
427
430
|
mode: c.value,
|
|
428
431
|
selectDate: H,
|
|
429
432
|
showMonth: Be,
|
|
430
433
|
setMode: be
|
|
431
434
|
}, () => [
|
|
432
|
-
C("strong",
|
|
433
|
-
w.value ?
|
|
434
|
-
m.controllerType === "select" ? (r(),
|
|
435
|
-
|
|
435
|
+
C("strong", Aa, g(ie.value), 1),
|
|
436
|
+
w.value ? p("", !0) : (r(), s("div", Na, [
|
|
437
|
+
m.controllerType === "select" ? (r(), s(W, { key: 0 }, [
|
|
438
|
+
$(Pe, {
|
|
436
439
|
"model-value": d.value.year,
|
|
437
440
|
options: Ge.value,
|
|
438
441
|
filterable: "",
|
|
@@ -440,9 +443,9 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
440
443
|
disabled: v.value,
|
|
441
444
|
"aria-label": y.value.year,
|
|
442
445
|
class: "hys-ui-calendar-year-select",
|
|
443
|
-
"onUpdate:modelValue": a[0] || (a[0] = (l) => j(
|
|
446
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => j(b(f)(Number(l), d.value.month, 1)))
|
|
444
447
|
}, null, 8, ["model-value", "options", "disabled", "aria-label"]),
|
|
445
|
-
c.value === "month" ? (r(), Y(
|
|
448
|
+
c.value === "month" ? (r(), Y(Pe, {
|
|
446
449
|
key: 0,
|
|
447
450
|
"model-value": d.value.month,
|
|
448
451
|
options: Je.value,
|
|
@@ -450,27 +453,27 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
450
453
|
disabled: v.value,
|
|
451
454
|
"aria-label": y.value.month,
|
|
452
455
|
class: "hys-ui-calendar-month-select",
|
|
453
|
-
"onUpdate:modelValue": a[1] || (a[1] = (l) => j(
|
|
454
|
-
}, null, 8, ["model-value", "options", "disabled", "aria-label"])) :
|
|
455
|
-
], 64)) :
|
|
456
|
-
C("div",
|
|
456
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => j(b(f)(d.value.year, Number(l), 1)))
|
|
457
|
+
}, null, 8, ["model-value", "options", "disabled", "aria-label"])) : p("", !0)
|
|
458
|
+
], 64)) : p("", !0),
|
|
459
|
+
C("div", Ba, [
|
|
457
460
|
m.controllerType === "button" && c.value === "month" ? (r(), Y(q, {
|
|
458
461
|
key: 0,
|
|
459
462
|
size: "sm",
|
|
460
463
|
variant: "ghost",
|
|
461
|
-
disabled: v.value || !
|
|
464
|
+
disabled: v.value || !E(J("prev-year")),
|
|
462
465
|
"aria-label": y.value.previous + y.value.year,
|
|
463
466
|
onClick: a[2] || (a[2] = (l) => H("prev-year"))
|
|
464
467
|
}, {
|
|
465
|
-
default:
|
|
466
|
-
|
|
468
|
+
default: R(() => [
|
|
469
|
+
$(b(ha), { size: 16 })
|
|
467
470
|
]),
|
|
468
471
|
_: 1
|
|
469
|
-
}, 8, ["disabled", "aria-label"])) :
|
|
470
|
-
|
|
472
|
+
}, 8, ["disabled", "aria-label"])) : p("", !0),
|
|
473
|
+
$(q, {
|
|
471
474
|
size: "sm",
|
|
472
475
|
variant: "ghost",
|
|
473
|
-
disabled: v.value || !
|
|
476
|
+
disabled: v.value || !E(
|
|
474
477
|
J(
|
|
475
478
|
c.value === "year" ? "prev-year" : "prev-month"
|
|
476
479
|
)
|
|
@@ -478,8 +481,8 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
478
481
|
"aria-label": y.value.previous + (c.value === "year" ? y.value.year : y.value.month),
|
|
479
482
|
onClick: a[3] || (a[3] = (l) => H(c.value === "year" ? "prev-year" : "prev-month"))
|
|
480
483
|
}, {
|
|
481
|
-
default:
|
|
482
|
-
|
|
484
|
+
default: R(() => [
|
|
485
|
+
$(b(fa), { size: 16 })
|
|
483
486
|
]),
|
|
484
487
|
_: 1
|
|
485
488
|
}, 8, ["disabled", "aria-label"]),
|
|
@@ -487,18 +490,18 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
487
490
|
key: 1,
|
|
488
491
|
size: "sm",
|
|
489
492
|
variant: "secondary",
|
|
490
|
-
disabled: v.value || !
|
|
493
|
+
disabled: v.value || !E(b(O)),
|
|
491
494
|
onClick: a[4] || (a[4] = (l) => H("today"))
|
|
492
495
|
}, {
|
|
493
|
-
default:
|
|
494
|
-
le(
|
|
496
|
+
default: R(() => [
|
|
497
|
+
le(g(y.value.today), 1)
|
|
495
498
|
]),
|
|
496
499
|
_: 1
|
|
497
|
-
}, 8, ["disabled"])) :
|
|
498
|
-
|
|
500
|
+
}, 8, ["disabled"])) : p("", !0),
|
|
501
|
+
$(q, {
|
|
499
502
|
size: "sm",
|
|
500
503
|
variant: "ghost",
|
|
501
|
-
disabled: v.value || !
|
|
504
|
+
disabled: v.value || !E(
|
|
502
505
|
J(
|
|
503
506
|
c.value === "year" ? "next-year" : "next-month"
|
|
504
507
|
)
|
|
@@ -506,8 +509,8 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
506
509
|
"aria-label": y.value.next + (c.value === "year" ? y.value.year : y.value.month),
|
|
507
510
|
onClick: a[5] || (a[5] = (l) => H(c.value === "year" ? "next-year" : "next-month"))
|
|
508
511
|
}, {
|
|
509
|
-
default:
|
|
510
|
-
|
|
512
|
+
default: R(() => [
|
|
513
|
+
$(b(ba), { size: 16 })
|
|
511
514
|
]),
|
|
512
515
|
_: 1
|
|
513
516
|
}, 8, ["disabled", "aria-label"]),
|
|
@@ -515,17 +518,17 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
515
518
|
key: 2,
|
|
516
519
|
size: "sm",
|
|
517
520
|
variant: "ghost",
|
|
518
|
-
disabled: v.value || !
|
|
521
|
+
disabled: v.value || !E(J("next-year")),
|
|
519
522
|
"aria-label": y.value.next + y.value.year,
|
|
520
523
|
onClick: a[6] || (a[6] = (l) => H("next-year"))
|
|
521
524
|
}, {
|
|
522
|
-
default:
|
|
523
|
-
|
|
525
|
+
default: R(() => [
|
|
526
|
+
$(b(pa), { size: 16 })
|
|
524
527
|
]),
|
|
525
528
|
_: 1
|
|
526
|
-
}, 8, ["disabled", "aria-label"])) :
|
|
529
|
+
}, 8, ["disabled", "aria-label"])) : p("", !0)
|
|
527
530
|
]),
|
|
528
|
-
m.showModeSwitch ? (r(), Y(
|
|
531
|
+
m.showModeSwitch ? (r(), Y(wa, {
|
|
529
532
|
key: 1,
|
|
530
533
|
"model-value": c.value,
|
|
531
534
|
options: [
|
|
@@ -536,58 +539,58 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
536
539
|
disabled: v.value,
|
|
537
540
|
"aria-label": I.value ? "日历视图" : "Calendar view",
|
|
538
541
|
"onUpdate:modelValue": a[7] || (a[7] = (l) => be(l))
|
|
539
|
-
}, null, 8, ["model-value", "options", "disabled", "aria-label"])) :
|
|
542
|
+
}, null, 8, ["model-value", "options", "disabled", "aria-label"])) : p("", !0)
|
|
540
543
|
]))
|
|
541
544
|
], !0)
|
|
542
|
-
])) :
|
|
545
|
+
])) : p("", !0),
|
|
543
546
|
C("div", {
|
|
544
547
|
class: "hys-ui-calendar-body",
|
|
545
|
-
style:
|
|
548
|
+
style: ke({ "--hys-ui-calendar-duration": Se.value + "ms" })
|
|
546
549
|
}, [
|
|
547
|
-
m.loading ? (r(),
|
|
548
|
-
|
|
549
|
-
|
|
550
|
+
m.loading ? (r(), s("div", Fa, [
|
|
551
|
+
S(e.$slots, "loading", {}, () => [
|
|
552
|
+
$(b(ka), {
|
|
550
553
|
size: 22,
|
|
551
554
|
class: "hys-ui-calendar-spinner"
|
|
552
555
|
}),
|
|
553
|
-
le(
|
|
556
|
+
le(g(y.value.loading), 1)
|
|
554
557
|
], !0)
|
|
555
|
-
])) :
|
|
556
|
-
|
|
558
|
+
])) : p("", !0),
|
|
559
|
+
$(va, {
|
|
557
560
|
name: Ye.value,
|
|
558
561
|
css: je.value,
|
|
559
562
|
onBeforeLeave: qe
|
|
560
563
|
}, {
|
|
561
|
-
default:
|
|
562
|
-
(r(),
|
|
564
|
+
default: R(() => [
|
|
565
|
+
(r(), s("div", {
|
|
563
566
|
key: ye.value,
|
|
564
567
|
class: "hys-ui-calendar-page",
|
|
565
568
|
"data-calendar-panel": ye.value
|
|
566
569
|
}, [
|
|
567
|
-
c.value === "month" ? (r(),
|
|
570
|
+
c.value === "month" ? (r(), s("div", {
|
|
568
571
|
key: 0,
|
|
569
572
|
role: "grid",
|
|
570
|
-
"aria-label":
|
|
573
|
+
"aria-label": ie.value,
|
|
571
574
|
"aria-readonly": m.readonly || void 0,
|
|
572
575
|
class: "hys-ui-calendar-grid"
|
|
573
576
|
}, [
|
|
574
577
|
C("div", {
|
|
575
578
|
role: "row",
|
|
576
|
-
class:
|
|
579
|
+
class: se(["hys-ui-calendar-weekdays", { "hys-ui-calendar--weeks": m.showWeekNumbers }])
|
|
577
580
|
}, [
|
|
578
|
-
m.showWeekNumbers ? (r(),
|
|
579
|
-
(r(!0),
|
|
581
|
+
m.showWeekNumbers ? (r(), s("span", La, g(y.value.week), 1)) : p("", !0),
|
|
582
|
+
(r(!0), s(W, null, K(Oe.value, (l) => (r(), s("span", {
|
|
580
583
|
key: l,
|
|
581
584
|
role: "columnheader"
|
|
582
|
-
},
|
|
585
|
+
}, g(l), 1))), 128))
|
|
583
586
|
], 2),
|
|
584
|
-
(r(!0),
|
|
587
|
+
(r(!0), s(W, null, K(Xe.value, (l, t) => (r(), s("div", {
|
|
585
588
|
key: t,
|
|
586
589
|
role: "row",
|
|
587
|
-
class:
|
|
590
|
+
class: se(["hys-ui-calendar-week", { "hys-ui-calendar--weeks": m.showWeekNumbers }])
|
|
588
591
|
}, [
|
|
589
|
-
m.showWeekNumbers ? (r(),
|
|
590
|
-
(r(!0),
|
|
592
|
+
m.showWeekNumbers ? (r(), s("span", Pa, g(l.number), 1)) : p("", !0),
|
|
593
|
+
(r(!0), s(W, null, K(l.days, (n) => (r(), s("div", {
|
|
591
594
|
key: n.day,
|
|
592
595
|
role: "gridcell",
|
|
593
596
|
"data-date": n.day,
|
|
@@ -596,22 +599,22 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
596
599
|
"aria-disabled": n.disabled || void 0,
|
|
597
600
|
"aria-label": Ue.value.format(new Date(x(n.day) * 864e5)),
|
|
598
601
|
tabindex: n.day === he.value ? 0 : -1,
|
|
599
|
-
class:
|
|
602
|
+
class: se(["hys-ui-calendar-cell", {
|
|
600
603
|
"hys-ui-calendar-cell--outside": n.type !== "current-month" && !w.value,
|
|
601
604
|
"hys-ui-calendar-cell--selected": n.isSelected,
|
|
602
605
|
"hys-ui-calendar-cell--today": n.isToday,
|
|
603
606
|
"hys-ui-calendar-cell--disabled": n.disabled,
|
|
604
607
|
"hys-ui-calendar-cell--hidden": !m.showAdjacentDays && n.type !== "current-month" && !w.value
|
|
605
608
|
}]),
|
|
606
|
-
onFocus: (
|
|
607
|
-
onKeydown: (
|
|
608
|
-
onClick: (
|
|
609
|
+
onFocus: (i) => N.value = x(n.day),
|
|
610
|
+
onKeydown: (i) => Re(i, x(n.day)),
|
|
611
|
+
onClick: (i) => ra(x(n.day), i)
|
|
609
612
|
}, [
|
|
610
|
-
|
|
613
|
+
S(e.$slots, "date-full-cell", {
|
|
611
614
|
date: n.date,
|
|
612
615
|
data: n
|
|
613
616
|
}, () => {
|
|
614
|
-
var
|
|
617
|
+
var i;
|
|
615
618
|
return [
|
|
616
619
|
C("div", Ea, [
|
|
617
620
|
C("button", {
|
|
@@ -623,81 +626,81 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
623
626
|
class: "hys-ui-calendar-day",
|
|
624
627
|
onClick: de((h) => Q(x(n.day)), ["stop"])
|
|
625
628
|
}, [
|
|
626
|
-
|
|
629
|
+
S(e.$slots, "date", {
|
|
627
630
|
date: n.day,
|
|
628
|
-
day:
|
|
631
|
+
day: b(k)(x(n.day)).day
|
|
629
632
|
}, () => [
|
|
630
|
-
le(
|
|
633
|
+
le(g(w.value ? n.day.slice(5).replace("-", "/") : b(k)(x(n.day)).day), 1)
|
|
631
634
|
], !0)
|
|
632
|
-
], 8,
|
|
635
|
+
], 8, Ha)
|
|
633
636
|
]),
|
|
634
|
-
|
|
637
|
+
S(e.$slots, "date-cell", {
|
|
635
638
|
date: n.date,
|
|
636
639
|
data: n
|
|
637
640
|
}, void 0, !0),
|
|
638
|
-
n.events.length ? (r(),
|
|
639
|
-
(r(!0),
|
|
641
|
+
n.events.length ? (r(), s("div", Ka, [
|
|
642
|
+
(r(!0), s(W, null, K(n.events.slice(0, ue.value), (h, ee) => (r(), s("button", {
|
|
640
643
|
key: h.id + ":" + ee,
|
|
641
644
|
type: "button",
|
|
642
645
|
tabindex: n.day === he.value ? 0 : -1,
|
|
643
646
|
class: "hys-ui-calendar-event",
|
|
644
647
|
disabled: v.value || h.disabled,
|
|
645
648
|
title: [h.time, h.title, h.description].filter(Boolean).join(" · "),
|
|
646
|
-
onClick: de((
|
|
649
|
+
onClick: de((ia) => Fe(h, n.day), ["stop"])
|
|
647
650
|
}, [
|
|
648
|
-
|
|
651
|
+
S(e.$slots, "event", {
|
|
649
652
|
event: h,
|
|
650
653
|
date: n.day
|
|
651
654
|
}, () => [
|
|
652
655
|
C("span", {
|
|
653
656
|
class: "hys-ui-calendar-dot",
|
|
654
|
-
style:
|
|
657
|
+
style: ke({ background: h.color })
|
|
655
658
|
}, null, 4),
|
|
656
|
-
h.time ? (r(),
|
|
657
|
-
C("span", null,
|
|
659
|
+
h.time ? (r(), s("time", Oa, g(h.time), 1)) : p("", !0),
|
|
660
|
+
C("span", null, g(h.title), 1)
|
|
658
661
|
], !0)
|
|
659
|
-
], 8,
|
|
660
|
-
n.events.length > ue.value ? (r(),
|
|
662
|
+
], 8, Ua))), 128)),
|
|
663
|
+
n.events.length > ue.value ? (r(), s("button", {
|
|
661
664
|
key: 0,
|
|
662
665
|
type: "button",
|
|
663
666
|
tabindex: n.day === he.value ? 0 : -1,
|
|
664
667
|
disabled: v.value,
|
|
665
668
|
class: "hys-ui-calendar-more",
|
|
666
|
-
"aria-expanded":
|
|
667
|
-
onClick: de((h) =>
|
|
669
|
+
"aria-expanded": b(Ne) && ((i = M.value) == null ? void 0 : i.day) === n.day,
|
|
670
|
+
onClick: de((h) => oa(n, h), ["stop"])
|
|
668
671
|
}, [
|
|
669
|
-
|
|
672
|
+
S(e.$slots, "more", {
|
|
670
673
|
date: n.day,
|
|
671
674
|
count: n.events.length - ue.value
|
|
672
675
|
}, () => [
|
|
673
|
-
le("+" +
|
|
676
|
+
le("+" + g(n.events.length - ue.value) + " " + g(y.value.more), 1)
|
|
674
677
|
], !0)
|
|
675
|
-
], 8,
|
|
676
|
-
])) :
|
|
678
|
+
], 8, Ia)) : p("", !0)
|
|
679
|
+
])) : p("", !0)
|
|
677
680
|
];
|
|
678
681
|
}, !0)
|
|
679
|
-
], 42,
|
|
682
|
+
], 42, _a))), 128))
|
|
680
683
|
], 2))), 128))
|
|
681
|
-
], 8,
|
|
684
|
+
], 8, Ra)) : (r(), s("div", {
|
|
682
685
|
key: 1,
|
|
683
686
|
role: "grid",
|
|
684
|
-
"aria-label":
|
|
687
|
+
"aria-label": ie.value,
|
|
685
688
|
"aria-readonly": m.readonly || void 0,
|
|
686
689
|
class: "hys-ui-calendar-year-grid"
|
|
687
690
|
}, [
|
|
688
|
-
(r(),
|
|
691
|
+
(r(), s(W, null, K(4, (l) => C("div", {
|
|
689
692
|
key: l,
|
|
690
693
|
role: "row",
|
|
691
694
|
class: "hys-ui-calendar-month-row"
|
|
692
695
|
}, [
|
|
693
|
-
(r(!0),
|
|
696
|
+
(r(!0), s(W, null, K(G.value.slice((l - 1) * 3, l * 3), (t) => (r(), s("div", {
|
|
694
697
|
key: t.month,
|
|
695
698
|
role: "gridcell",
|
|
696
699
|
"data-month": t.month,
|
|
697
700
|
"aria-selected": t.isSelected,
|
|
698
701
|
"aria-disabled": t.disabled || void 0,
|
|
699
702
|
tabindex: t.month === Qe.value ? 0 : -1,
|
|
700
|
-
class:
|
|
703
|
+
class: se(["hys-ui-calendar-cell hys-ui-calendar-month", {
|
|
701
704
|
"hys-ui-calendar-cell--selected": t.isSelected,
|
|
702
705
|
"hys-ui-calendar-cell--today": t.isToday,
|
|
703
706
|
"hys-ui-calendar-cell--disabled": t.disabled
|
|
@@ -706,9 +709,9 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
706
709
|
onKeydown: (n) => Re(n, x(t.day), !0),
|
|
707
710
|
onClick: (n) => !n.target.closest(
|
|
708
711
|
"button,a,input,[contenteditable]"
|
|
709
|
-
) &&
|
|
712
|
+
) && pe(t)
|
|
710
713
|
}, [
|
|
711
|
-
|
|
714
|
+
S(e.$slots, "month-full-cell", {
|
|
712
715
|
date: t.date,
|
|
713
716
|
data: t
|
|
714
717
|
}, () => [
|
|
@@ -718,88 +721,97 @@ const Ta = ["aria-busy", "aria-label"], Sa = {
|
|
|
718
721
|
disabled: t.disabled,
|
|
719
722
|
class: "hys-ui-calendar-day",
|
|
720
723
|
"aria-pressed": t.isSelected,
|
|
721
|
-
onClick: de((n) =>
|
|
722
|
-
},
|
|
724
|
+
onClick: de((n) => pe(t), ["stop"])
|
|
725
|
+
}, g(Me.value.format(
|
|
723
726
|
new Date(x(t.day) * 864e5)
|
|
724
|
-
)), 9,
|
|
725
|
-
|
|
727
|
+
)), 9, qa),
|
|
728
|
+
S(e.$slots, "month-cell", {
|
|
726
729
|
date: t.date,
|
|
727
730
|
data: t
|
|
728
731
|
}, () => [
|
|
729
|
-
t.events.length ? (r(),
|
|
732
|
+
t.events.length ? (r(), s("span", Xa, g(t.events.length) + " " + g(I.value ? "项日程" : "events"), 1)) : p("", !0)
|
|
730
733
|
], !0)
|
|
731
734
|
], !0)
|
|
732
|
-
], 42,
|
|
735
|
+
], 42, Ya))), 128))
|
|
733
736
|
])), 64))
|
|
734
|
-
], 8,
|
|
735
|
-
], 8,
|
|
737
|
+
], 8, ja))
|
|
738
|
+
], 8, Wa))
|
|
736
739
|
]),
|
|
737
740
|
_: 3
|
|
738
741
|
}, 8, ["name", "css"])
|
|
739
742
|
], 4),
|
|
740
|
-
e.$slots.footer ? (r(),
|
|
741
|
-
|
|
743
|
+
e.$slots.footer ? (r(), s("footer", Za, [
|
|
744
|
+
S(e.$slots, "footer", {
|
|
742
745
|
selected: z.value === void 0 ? void 0 : A(z.value),
|
|
743
746
|
value: A(D.value),
|
|
744
747
|
mode: c.value,
|
|
745
748
|
visibleRange: ve.value
|
|
746
749
|
}, void 0, !0)
|
|
747
|
-
])) :
|
|
748
|
-
(r(), Y(
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
750
|
+
])) : p("", !0),
|
|
751
|
+
(r(), Y(ya, { to: "body" }, [
|
|
752
|
+
$(b(ma), {
|
|
753
|
+
"popup-transition": o.popupTransition,
|
|
754
|
+
"popup-transition-duration": o.popupTransitionDuration,
|
|
755
|
+
placement: b(ea)
|
|
756
|
+
}, {
|
|
757
|
+
default: R(() => [
|
|
758
|
+
b(Ne) && M.value ? (r(), s("div", Le({
|
|
759
|
+
key: 0,
|
|
760
|
+
id: b(Ke) + "-events",
|
|
761
|
+
ref_key: "popup",
|
|
762
|
+
ref: fe
|
|
763
|
+
}, b(Ce), {
|
|
764
|
+
role: "dialog",
|
|
765
|
+
"aria-label": M.value.day + " " + y.value.more,
|
|
766
|
+
class: "hys-ui-calendar-popup hys-ui-floating-surface",
|
|
767
|
+
style: b(aa)
|
|
768
|
+
}), [
|
|
769
|
+
C("header", null, [
|
|
770
|
+
C("strong", null, g(M.value.day), 1),
|
|
771
|
+
$(q, {
|
|
772
|
+
variant: "ghost",
|
|
773
|
+
size: "sm",
|
|
774
|
+
"aria-label": y.value.close,
|
|
775
|
+
onClick: _
|
|
776
|
+
}, {
|
|
777
|
+
default: R(() => [
|
|
778
|
+
$(b(ga), { size: 15 })
|
|
779
|
+
]),
|
|
780
|
+
_: 1
|
|
781
|
+
}, 8, ["aria-label"])
|
|
770
782
|
]),
|
|
771
|
-
|
|
772
|
-
|
|
783
|
+
C("div", Ja, [
|
|
784
|
+
(r(!0), s(W, null, K(M.value.events, (l, t) => (r(), s("button", {
|
|
785
|
+
key: l.id + ":" + t,
|
|
786
|
+
type: "button",
|
|
787
|
+
class: "hys-ui-calendar-event",
|
|
788
|
+
disabled: v.value || l.disabled,
|
|
789
|
+
onClick: (n) => Fe(l, M.value.day)
|
|
790
|
+
}, [
|
|
791
|
+
S(e.$slots, "event", {
|
|
792
|
+
event: l,
|
|
793
|
+
date: M.value.day
|
|
794
|
+
}, () => [
|
|
795
|
+
C("span", {
|
|
796
|
+
class: "hys-ui-calendar-dot",
|
|
797
|
+
style: ke({ background: l.color })
|
|
798
|
+
}, null, 4),
|
|
799
|
+
l.time ? (r(), s("time", el, g(l.time), 1)) : p("", !0),
|
|
800
|
+
C("span", null, [
|
|
801
|
+
le(g(l.title), 1),
|
|
802
|
+
l.description ? (r(), s("small", al, g(l.description), 1)) : p("", !0)
|
|
803
|
+
])
|
|
804
|
+
], !0)
|
|
805
|
+
], 8, Qa))), 128))
|
|
806
|
+
])
|
|
807
|
+
], 16, Ga)) : p("", !0)
|
|
773
808
|
]),
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
key: l.id + ":" + t,
|
|
777
|
-
type: "button",
|
|
778
|
-
class: "hys-ui-calendar-event",
|
|
779
|
-
disabled: v.value || l.disabled,
|
|
780
|
-
onClick: (n) => Fe(l, M.value.day)
|
|
781
|
-
}, [
|
|
782
|
-
T(e.$slots, "event", {
|
|
783
|
-
event: l,
|
|
784
|
-
date: M.value.day
|
|
785
|
-
}, () => [
|
|
786
|
-
C("span", {
|
|
787
|
-
class: "hys-ui-calendar-dot",
|
|
788
|
-
style: pe({ background: l.color })
|
|
789
|
-
}, null, 4),
|
|
790
|
-
l.time ? (r(), i("time", Ja, p(l.time), 1)) : b("", !0),
|
|
791
|
-
C("span", null, [
|
|
792
|
-
le(p(l.title), 1),
|
|
793
|
-
l.description ? (r(), i("small", Qa, p(l.description), 1)) : b("", !0)
|
|
794
|
-
])
|
|
795
|
-
], !0)
|
|
796
|
-
], 8, Ga))), 128))
|
|
797
|
-
])
|
|
798
|
-
], 16, Xa)) : b("", !0)
|
|
809
|
+
_: 3
|
|
810
|
+
}, 8, ["popup-transition", "popup-transition-duration", "placement"])
|
|
799
811
|
]))
|
|
800
|
-
], 16,
|
|
812
|
+
], 16, Va));
|
|
801
813
|
}
|
|
802
814
|
});
|
|
803
815
|
export {
|
|
804
|
-
|
|
816
|
+
vl as default
|
|
805
817
|
};
|