@wot-ui/ui 1.0.0 → 2.0.0-alpha.3
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/LICENSE +21 -0
- package/README.md +134 -0
- package/attributes.json +1 -0
- package/changelog.md +53 -0
- package/common/AbortablePromise.ts +28 -0
- package/common/canvasHelper.ts +49 -0
- package/common/clickoutside.ts +25 -0
- package/common/event.ts +8 -0
- package/common/formatDate.ts +68 -0
- package/common/interceptor.ts +43 -0
- package/common/props.ts +53 -0
- package/common/util.ts +836 -0
- package/components/wd-action-sheet/index.scss +232 -0
- package/components/wd-action-sheet/types.ts +155 -0
- package/components/wd-action-sheet/wd-action-sheet.vue +176 -0
- package/components/wd-avatar/index.scss +150 -0
- package/components/wd-avatar/types.ts +98 -0
- package/components/wd-avatar/wd-avatar.vue +184 -0
- package/components/wd-avatar-group/index.scss +11 -0
- package/components/wd-avatar-group/types.ts +61 -0
- package/components/wd-avatar-group/wd-avatar-group.vue +115 -0
- package/components/wd-backtop/index.scss +67 -0
- package/components/wd-backtop/types.ts +66 -0
- package/components/wd-backtop/wd-backtop.vue +57 -0
- package/components/wd-badge/index.scss +116 -0
- package/components/wd-badge/types.ts +94 -0
- package/components/wd-badge/wd-badge.vue +78 -0
- package/components/wd-button/index.scss +436 -0
- package/components/wd-button/types.ts +204 -0
- package/components/wd-button/wd-button.vue +210 -0
- package/components/wd-calendar/index.scss +97 -0
- package/components/wd-calendar/types.ts +221 -0
- package/components/wd-calendar/wd-calendar.vue +339 -0
- package/components/wd-calendar-view/index.scss +41 -0
- package/components/wd-calendar-view/month/index.scss +144 -0
- package/components/wd-calendar-view/month/month.vue +389 -0
- package/components/wd-calendar-view/month/types.ts +70 -0
- package/components/wd-calendar-view/monthPanel/index.scss +84 -0
- package/components/wd-calendar-view/monthPanel/month-panel.vue +541 -0
- package/components/wd-calendar-view/monthPanel/types.ts +151 -0
- package/components/wd-calendar-view/types.ts +166 -0
- package/components/wd-calendar-view/utils.ts +318 -0
- package/components/wd-calendar-view/wd-calendar-view.vue +117 -0
- package/components/wd-calendar-view/year/index.scss +148 -0
- package/components/wd-calendar-view/year/types.ts +74 -0
- package/components/wd-calendar-view/year/year.vue +206 -0
- package/components/wd-calendar-view/yearPanel/index.scss +42 -0
- package/components/wd-calendar-view/yearPanel/types.ts +96 -0
- package/components/wd-calendar-view/yearPanel/year-panel.vue +249 -0
- package/components/wd-card/index.scss +104 -0
- package/components/wd-card/types.ts +47 -0
- package/components/wd-card/wd-card.vue +38 -0
- package/components/wd-cascader/index.scss +154 -0
- package/components/wd-cascader/types.ts +191 -0
- package/components/wd-cascader/wd-cascader.vue +589 -0
- package/components/wd-cell/index.scss +244 -0
- package/components/wd-cell/types.ts +205 -0
- package/components/wd-cell/wd-cell.vue +172 -0
- package/components/wd-cell-group/index.scss +53 -0
- package/components/wd-cell-group/types.ts +97 -0
- package/components/wd-cell-group/wd-cell-group.vue +48 -0
- package/components/wd-checkbox/index.scss +166 -0
- package/components/wd-checkbox/types.ts +118 -0
- package/components/wd-checkbox/wd-checkbox.vue +216 -0
- package/components/wd-checkbox-group/index.scss +5 -0
- package/components/wd-checkbox-group/types.ts +93 -0
- package/components/wd-checkbox-group/wd-checkbox-group.vue +148 -0
- package/components/wd-circle/index.scss +28 -0
- package/components/wd-circle/types.ts +54 -0
- package/components/wd-circle/wd-circle.vue +306 -0
- package/components/wd-col/index.scss +5 -0
- package/components/wd-col/types.ts +16 -0
- package/components/wd-col/wd-col.vue +83 -0
- package/components/wd-collapse/index.scss +71 -0
- package/components/wd-collapse/types.ts +68 -0
- package/components/wd-collapse/wd-collapse.vue +165 -0
- package/components/wd-collapse-item/index.scss +86 -0
- package/components/wd-collapse-item/types.ts +62 -0
- package/components/wd-collapse-item/wd-collapse-item.vue +184 -0
- package/components/wd-config-provider/index.scss +10 -0
- package/components/wd-config-provider/types.ts +2063 -0
- package/components/wd-config-provider/wd-config-provider.vue +61 -0
- package/components/wd-count-down/index.scss +16 -0
- package/components/wd-count-down/types.ts +58 -0
- package/components/wd-count-down/utils.ts +52 -0
- package/components/wd-count-down/wd-count-down.vue +62 -0
- package/components/wd-count-to/index.scss +25 -0
- package/components/wd-count-to/types.ts +121 -0
- package/components/wd-count-to/wd-count-to.vue +126 -0
- package/components/wd-curtain/index.scss +96 -0
- package/components/wd-curtain/types.ts +82 -0
- package/components/wd-curtain/wd-curtain.vue +172 -0
- package/components/wd-datetime-picker/index.scss +133 -0
- package/components/wd-datetime-picker/types.ts +198 -0
- package/components/wd-datetime-picker/wd-datetime-picker.vue +526 -0
- package/components/wd-datetime-picker-view/types.ts +171 -0
- package/components/wd-datetime-picker-view/util.ts +30 -0
- package/components/wd-datetime-picker-view/wd-datetime-picker-view.vue +402 -0
- package/components/wd-dialog/index.scss +281 -0
- package/components/wd-dialog/index.ts +168 -0
- package/components/wd-dialog/types.ts +452 -0
- package/components/wd-dialog/wd-dialog.vue +586 -0
- package/components/wd-divider/index.scss +122 -0
- package/components/wd-divider/types.ts +50 -0
- package/components/wd-divider/wd-divider.vue +54 -0
- package/components/wd-drop-menu/index.scss +90 -0
- package/components/wd-drop-menu/types.ts +38 -0
- package/components/wd-drop-menu/wd-drop-menu.vue +168 -0
- package/components/wd-drop-menu-item/index.scss +96 -0
- package/components/wd-drop-menu-item/types.ts +93 -0
- package/components/wd-drop-menu-item/wd-drop-menu-item.vue +205 -0
- package/components/wd-empty/index.scss +46 -0
- package/components/wd-empty/types.ts +37 -0
- package/components/wd-empty/wd-empty.vue +47 -0
- package/components/wd-fab/index.scss +124 -0
- package/components/wd-fab/types.ts +119 -0
- package/components/wd-fab/wd-fab.vue +322 -0
- package/components/wd-floating-panel/index.scss +73 -0
- package/components/wd-floating-panel/type.ts +32 -0
- package/components/wd-floating-panel/wd-floating-panel.vue +142 -0
- package/components/wd-form/adapters/zod.ts +56 -0
- package/components/wd-form/types.ts +147 -0
- package/components/wd-form/wd-form.vue +121 -0
- package/components/wd-form-item/index.scss +26 -0
- package/components/wd-form-item/types.ts +134 -0
- package/components/wd-form-item/wd-form-item.vue +182 -0
- package/components/wd-gap/index.scss +9 -0
- package/components/wd-gap/types.ts +26 -0
- package/components/wd-gap/wd-gap.vue +38 -0
- package/components/wd-grid/index.scss +11 -0
- package/components/wd-grid/types.ts +97 -0
- package/components/wd-grid/wd-grid.vue +48 -0
- package/components/wd-grid-item/index.scss +187 -0
- package/components/wd-grid-item/types.ts +98 -0
- package/components/wd-grid-item/wd-grid-item.vue +295 -0
- package/components/wd-icon/index.scss +46 -0
- package/components/wd-icon/types.ts +44 -0
- package/components/wd-icon/wd-icon.vue +66 -0
- package/components/wd-image-preview/index.scss +94 -0
- package/components/wd-image-preview/index.ts +95 -0
- package/components/wd-image-preview/types.ts +165 -0
- package/components/wd-image-preview/wd-image-preview.vue +233 -0
- package/components/wd-img/index.scss +82 -0
- package/components/wd-img/types.ts +96 -0
- package/components/wd-img/wd-img.vue +91 -0
- package/components/wd-img-cropper/index.scss +259 -0
- package/components/wd-img-cropper/types.ts +101 -0
- package/components/wd-img-cropper/wd-img-cropper.vue +653 -0
- package/components/wd-index-anchor/index.scss +34 -0
- package/components/wd-index-anchor/type.ts +9 -0
- package/components/wd-index-anchor/wd-index-anchor.vue +55 -0
- package/components/wd-index-bar/index.scss +68 -0
- package/components/wd-index-bar/type.ts +23 -0
- package/components/wd-index-bar/wd-index-bar.vue +157 -0
- package/components/wd-input/index.scss +129 -0
- package/components/wd-input/types.ts +165 -0
- package/components/wd-input/wd-input.vue +237 -0
- package/components/wd-input-number/index.scss +233 -0
- package/components/wd-input-number/types.ts +131 -0
- package/components/wd-input-number/wd-input-number.vue +473 -0
- package/components/wd-keyboard/constants.ts +81 -0
- package/components/wd-keyboard/index.scss +104 -0
- package/components/wd-keyboard/key/index.scss +103 -0
- package/components/wd-keyboard/key/index.vue +84 -0
- package/components/wd-keyboard/key/types.ts +44 -0
- package/components/wd-keyboard/types.ts +138 -0
- package/components/wd-keyboard/wd-keyboard.vue +236 -0
- package/components/wd-loading/index.scss +205 -0
- package/components/wd-loading/types.ts +61 -0
- package/components/wd-loading/wd-loading.vue +70 -0
- package/components/wd-loadmore/index.scss +62 -0
- package/components/wd-loadmore/types.ts +42 -0
- package/components/wd-loadmore/wd-loadmore.vue +68 -0
- package/components/wd-navbar/index.scss +96 -0
- package/components/wd-navbar/types.ts +74 -0
- package/components/wd-navbar/wd-navbar.vue +136 -0
- package/components/wd-navbar-capsule/index.scss +70 -0
- package/components/wd-navbar-capsule/types.ts +11 -0
- package/components/wd-navbar-capsule/wd-navbar-capsule.vue +48 -0
- package/components/wd-notice-bar/index.scss +94 -0
- package/components/wd-notice-bar/types.ts +97 -0
- package/components/wd-notice-bar/wd-notice-bar.vue +270 -0
- package/components/wd-notify/index.scss +114 -0
- package/components/wd-notify/index.ts +63 -0
- package/components/wd-notify/types.ts +130 -0
- package/components/wd-notify/wd-notify.vue +162 -0
- package/components/wd-overlay/index.scss +14 -0
- package/components/wd-overlay/types.ts +42 -0
- package/components/wd-overlay/wd-overlay.vue +55 -0
- package/components/wd-pagination/index.scss +71 -0
- package/components/wd-pagination/types.ts +69 -0
- package/components/wd-pagination/wd-pagination.vue +118 -0
- package/components/wd-password-input/index.scss +134 -0
- package/components/wd-password-input/types.ts +42 -0
- package/components/wd-password-input/wd-password-input.vue +51 -0
- package/components/wd-picker/index.scss +72 -0
- package/components/wd-picker/types.ts +141 -0
- package/components/wd-picker/wd-picker.vue +220 -0
- package/components/wd-picker-view/index.scss +93 -0
- package/components/wd-picker-view/types.ts +145 -0
- package/components/wd-picker-view/useSelection.ts +385 -0
- package/components/wd-picker-view/wd-picker-view.vue +227 -0
- package/components/wd-popover/index.scss +117 -0
- package/components/wd-popover/types.ts +106 -0
- package/components/wd-popover/wd-popover.vue +212 -0
- package/components/wd-popup/index.scss +89 -0
- package/components/wd-popup/types.ts +110 -0
- package/components/wd-popup/wd-popup.vue +174 -0
- package/components/wd-progress/index.scss +155 -0
- package/components/wd-progress/types.ts +94 -0
- package/components/wd-progress/wd-progress.vue +249 -0
- package/components/wd-radio/index.scss +189 -0
- package/components/wd-radio/types.ts +64 -0
- package/components/wd-radio/wd-radio.vue +164 -0
- package/components/wd-radio-group/index.scss +5 -0
- package/components/wd-radio-group/types.ts +70 -0
- package/components/wd-radio-group/wd-radio-group.vue +53 -0
- package/components/wd-rate/index.scss +57 -0
- package/components/wd-rate/types.ts +86 -0
- package/components/wd-rate/wd-rate.vue +168 -0
- package/components/wd-resize/index.scss +31 -0
- package/components/wd-resize/types.ts +14 -0
- package/components/wd-resize/wd-resize.vue +157 -0
- package/components/wd-root-portal/wd-root-portal.vue +77 -0
- package/components/wd-row/index.scss +6 -0
- package/components/wd-row/types.ts +36 -0
- package/components/wd-row/wd-row.vue +88 -0
- package/components/wd-search/index.scss +171 -0
- package/components/wd-search/types.ts +107 -0
- package/components/wd-search/wd-search.vue +198 -0
- package/components/wd-segmented/index.scss +155 -0
- package/components/wd-segmented/types.ts +81 -0
- package/components/wd-segmented/wd-segmented.vue +169 -0
- package/components/wd-select-picker/index.scss +72 -0
- package/components/wd-select-picker/types.ts +72 -0
- package/components/wd-select-picker/wd-select-picker.vue +371 -0
- package/components/wd-sidebar/index.scss +25 -0
- package/components/wd-sidebar/types.ts +34 -0
- package/components/wd-sidebar/wd-sidebar.vue +57 -0
- package/components/wd-sidebar-item/index.scss +91 -0
- package/components/wd-sidebar-item/types.ts +28 -0
- package/components/wd-sidebar-item/wd-sidebar-item.vue +118 -0
- package/components/wd-signature/index.scss +42 -0
- package/components/wd-signature/types.ts +295 -0
- package/components/wd-signature/wd-signature.vue +664 -0
- package/components/wd-skeleton/index.scss +112 -0
- package/components/wd-skeleton/types.ts +124 -0
- package/components/wd-skeleton/wd-skeleton.vue +110 -0
- package/components/wd-slide-verify/index.scss +112 -0
- package/components/wd-slide-verify/types.ts +98 -0
- package/components/wd-slide-verify/wd-slide-verify.vue +222 -0
- package/components/wd-slider/index.scss +485 -0
- package/components/wd-slider/types.ts +166 -0
- package/components/wd-slider/wd-slider.vue +529 -0
- package/components/wd-sort-button/index.scss +126 -0
- package/components/wd-sort-button/types.ts +68 -0
- package/components/wd-sort-button/wd-sort-button.vue +67 -0
- package/components/wd-step/index.scss +366 -0
- package/components/wd-step/types.ts +43 -0
- package/components/wd-step/wd-step.vue +181 -0
- package/components/wd-steps/index.scss +7 -0
- package/components/wd-steps/types.ts +50 -0
- package/components/wd-steps/wd-steps.vue +39 -0
- package/components/wd-sticky/index.scss +9 -0
- package/components/wd-sticky/types.ts +13 -0
- package/components/wd-sticky/wd-sticky.vue +192 -0
- package/components/wd-sticky-box/index.scss +6 -0
- package/components/wd-sticky-box/types.ts +20 -0
- package/components/wd-sticky-box/wd-sticky-box.vue +157 -0
- package/components/wd-swipe-action/index.scss +22 -0
- package/components/wd-swipe-action/types.ts +87 -0
- package/components/wd-swipe-action/wd-swipe-action.vue +320 -0
- package/components/wd-swiper/index.scss +69 -0
- package/components/wd-swiper/types.ts +275 -0
- package/components/wd-swiper/wd-swiper.vue +332 -0
- package/components/wd-swiper-nav/index.scss +179 -0
- package/components/wd-swiper-nav/types.ts +42 -0
- package/components/wd-swiper-nav/wd-swiper-nav.vue +42 -0
- package/components/wd-switch/index.scss +177 -0
- package/components/wd-switch/types.ts +93 -0
- package/components/wd-switch/wd-switch.vue +107 -0
- package/components/wd-tab/index.scss +16 -0
- package/components/wd-tab/types.ts +45 -0
- package/components/wd-tab/wd-tab.vue +99 -0
- package/components/wd-tabbar/index.scss +71 -0
- package/components/wd-tabbar/types.ts +79 -0
- package/components/wd-tabbar/wd-tabbar.vue +109 -0
- package/components/wd-tabbar-item/index.scss +50 -0
- package/components/wd-tabbar-item/types.ts +45 -0
- package/components/wd-tabbar-item/wd-tabbar-item.vue +101 -0
- package/components/wd-table/index.scss +128 -0
- package/components/wd-table/types.ts +160 -0
- package/components/wd-table/wd-table.vue +331 -0
- package/components/wd-table-column/index.scss +15 -0
- package/components/wd-table-column/types.ts +81 -0
- package/components/wd-table-column/wd-table-column.vue +198 -0
- package/components/wd-tabs/index.scss +332 -0
- package/components/wd-tabs/types.ts +155 -0
- package/components/wd-tabs/wd-tabs.vue +508 -0
- package/components/wd-tag/index.scss +325 -0
- package/components/wd-tag/types.ts +90 -0
- package/components/wd-tag/wd-tag.vue +158 -0
- package/components/wd-text/index.scss +52 -0
- package/components/wd-text/types.ts +107 -0
- package/components/wd-text/wd-text.vue +141 -0
- package/components/wd-textarea/index.scss +112 -0
- package/components/wd-textarea/types.ts +151 -0
- package/components/wd-textarea/wd-textarea.vue +212 -0
- package/components/wd-toast/index.scss +92 -0
- package/components/wd-toast/index.ts +97 -0
- package/components/wd-toast/types.ts +190 -0
- package/components/wd-toast/wd-toast.vue +158 -0
- package/components/wd-tooltip/index.scss +77 -0
- package/components/wd-tooltip/types.ts +105 -0
- package/components/wd-tooltip/wd-tooltip.vue +169 -0
- package/components/wd-tour/index.scss +106 -0
- package/components/wd-tour/types.ts +268 -0
- package/components/wd-tour/wd-tour.vue +518 -0
- package/components/wd-transition/index.scss +67 -0
- package/components/wd-transition/types.ts +106 -0
- package/components/wd-transition/wd-transition.vue +238 -0
- package/components/wd-upload/index.scss +204 -0
- package/components/wd-upload/types.ts +390 -0
- package/components/wd-upload/wd-upload.vue +565 -0
- package/components/wd-video-preview/index.scss +54 -0
- package/components/wd-video-preview/index.ts +64 -0
- package/components/wd-video-preview/types.ts +66 -0
- package/components/wd-video-preview/wd-video-preview.vue +141 -0
- package/components/wd-watermark/index.scss +21 -0
- package/components/wd-watermark/types.ts +130 -0
- package/components/wd-watermark/wd-watermark.vue +718 -0
- package/components/wot-ui/wot-ui.vue +5 -0
- package/composables/index.ts +12 -0
- package/composables/useCell.ts +34 -0
- package/composables/useChildren.ts +120 -0
- package/composables/useConfigProvider.ts +45 -0
- package/composables/useCountDown.ts +138 -0
- package/composables/useDeviceInfo.ts +136 -0
- package/composables/useLockScroll.ts +37 -0
- package/composables/useParent.ts +51 -0
- package/composables/usePopover.ts +212 -0
- package/composables/useQueue.ts +52 -0
- package/composables/useRaf.ts +37 -0
- package/composables/useTouch.ts +43 -0
- package/composables/useTranslate.ts +12 -0
- package/composables/useUpload.ts +366 -0
- package/global.d.ts +106 -0
- package/index.ts +11 -0
- package/locale/index.ts +32 -0
- package/locale/lang/ar-SA.ts +150 -0
- package/locale/lang/de-DE.ts +150 -0
- package/locale/lang/en-US.ts +150 -0
- package/locale/lang/es-ES.ts +150 -0
- package/locale/lang/fr-FR.ts +150 -0
- package/locale/lang/ja-JP.ts +150 -0
- package/locale/lang/ko-KR.ts +150 -0
- package/locale/lang/pt-PT.ts +150 -0
- package/locale/lang/ru-RU.ts +150 -0
- package/locale/lang/th-TH.ts +150 -0
- package/locale/lang/tr-TR.ts +155 -0
- package/locale/lang/ug-CN.ts +154 -0
- package/locale/lang/vi-VN.ts +89 -0
- package/locale/lang/zh-CN.ts +154 -0
- package/locale/lang/zh-HK.ts +78 -0
- package/locale/lang/zh-TW.ts +78 -0
- package/package.json +1 -11
- package/styles/iconfont/iconfont.scss +1243 -0
- package/styles/mixin/_config.scss +7 -0
- package/styles/mixin/_function.scss +44 -0
- package/styles/mixin/_mixin.scss +473 -0
- package/styles/theme/base/color.scss +210 -0
- package/styles/theme/base/font.scss +13 -0
- package/styles/theme/base/index.scss +8 -0
- package/styles/theme/base/insets.scss +32 -0
- package/styles/theme/base/number.scss +36 -0
- package/styles/theme/base/opacity.scss +9 -0
- package/styles/theme/base/radius.scss +13 -0
- package/styles/theme/base/stroke.scss +9 -0
- package/styles/theme/base/typography.scss +44 -0
- package/styles/theme/dark.scss +101 -0
- package/styles/theme/index.scss +16 -0
- package/styles/theme/light.scss +101 -0
- package/styles/variable.scss +472 -0
- package/tags.json +1 -0
- package/web-types.json +1 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="`wd-calendar ${customClass}`" :style="customStyle">
|
|
3
|
+
<wd-action-sheet
|
|
4
|
+
v-model="pickerShow"
|
|
5
|
+
:duration="duration"
|
|
6
|
+
:close-on-click-modal="closeOnClickModal"
|
|
7
|
+
:safe-area-inset-bottom="safeAreaInsetBottom"
|
|
8
|
+
:z-index="zIndex"
|
|
9
|
+
:root-portal="rootPortal"
|
|
10
|
+
:title="title || translate('title')"
|
|
11
|
+
custom-class="wd-calendar__popup"
|
|
12
|
+
@close="close"
|
|
13
|
+
@after-enter="handleOpened"
|
|
14
|
+
@after-leave="handleClosed"
|
|
15
|
+
>
|
|
16
|
+
<view class="wd-calendar__header">
|
|
17
|
+
<view v-if="showTypeSwitch" class="wd-calendar__tabs">
|
|
18
|
+
<wd-tabs ref="calendarTabs" v-model="currentTab" @change="handleTypeChange">
|
|
19
|
+
<wd-tab :title="translate('day')" :name="translate('day')" />
|
|
20
|
+
<wd-tab :title="translate('week')" :name="translate('week')" />
|
|
21
|
+
<wd-tab :title="translate('month')" :name="translate('month')" />
|
|
22
|
+
</wd-tabs>
|
|
23
|
+
</view>
|
|
24
|
+
<view v-if="shortcuts.length > 0" class="wd-calendar__shortcuts">
|
|
25
|
+
<wd-tag
|
|
26
|
+
v-for="(item, index) in shortcuts"
|
|
27
|
+
:key="index"
|
|
28
|
+
:custom-class="`wd-calendar__tag ${index === shortcuts.length - 1 ? 'is-last-tag' : ''}`"
|
|
29
|
+
:type="activeShortcutIndex === index ? 'primary' : 'default'"
|
|
30
|
+
:variant="activeShortcutIndex === index ? 'dark' : 'light'"
|
|
31
|
+
@click="handleShortcutClick(index)"
|
|
32
|
+
>
|
|
33
|
+
{{ item.text }}
|
|
34
|
+
</wd-tag>
|
|
35
|
+
</view>
|
|
36
|
+
</view>
|
|
37
|
+
<view
|
|
38
|
+
v-if="inited"
|
|
39
|
+
:class="`wd-calendar__view ${currentType.indexOf('range') > -1 ? 'is-range' : ''} ${showConfirm ? 'is-show-confirm' : ''}`"
|
|
40
|
+
>
|
|
41
|
+
<view v-if="isRange(currentType)" class="wd-calendar__range">
|
|
42
|
+
<view :class="`wd-calendar__range-item ${!calendarValue || !isArray(calendarValue) || !calendarValue[0] ? 'is-placeholder' : ''}`">
|
|
43
|
+
{{ rangeLabel[0] }}
|
|
44
|
+
</view>
|
|
45
|
+
<view class="wd-calendar__range-separator"></view>
|
|
46
|
+
<view :class="`wd-calendar__range-item ${!calendarValue || !isArray(calendarValue) || !calendarValue[1] ? 'is-placeholder' : ''}`">
|
|
47
|
+
{{ rangeLabel[1] }}
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
<wd-calendar-view
|
|
51
|
+
ref="calendarViewRef"
|
|
52
|
+
v-model="calendarValue"
|
|
53
|
+
:type="currentType"
|
|
54
|
+
:min-date="minDate"
|
|
55
|
+
:max-date="maxDate"
|
|
56
|
+
:first-day-of-week="firstDayOfWeek"
|
|
57
|
+
:formatter="formatter"
|
|
58
|
+
:panel-height="panelHeight"
|
|
59
|
+
:max-range="maxRange"
|
|
60
|
+
:range-prompt="rangePrompt"
|
|
61
|
+
:allow-same-day="allowSameDay"
|
|
62
|
+
:default-time="defaultTime"
|
|
63
|
+
:time-filter="timeFilter"
|
|
64
|
+
:hide-second="hideSecond"
|
|
65
|
+
:show-panel-title="showPanelTitle"
|
|
66
|
+
:immediate-change="immediateChange"
|
|
67
|
+
:switch-mode="switchMode"
|
|
68
|
+
@change="handleChange"
|
|
69
|
+
/>
|
|
70
|
+
</view>
|
|
71
|
+
<view v-if="showConfirm" class="wd-calendar__confirm">
|
|
72
|
+
<slot name="confirm-left"></slot>
|
|
73
|
+
<view class="wd-calendar__confirm-btn-wrapper">
|
|
74
|
+
<wd-button size="large" block :disabled="confirmBtnDisabled" @click="handleConfirm">{{ confirmText || translate('confirm') }}</wd-button>
|
|
75
|
+
</view>
|
|
76
|
+
<slot name="confirm-right"></slot>
|
|
77
|
+
</view>
|
|
78
|
+
</wd-action-sheet>
|
|
79
|
+
</view>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script lang="ts">
|
|
83
|
+
export default {
|
|
84
|
+
name: 'wd-calendar',
|
|
85
|
+
options: {
|
|
86
|
+
addGlobalClass: true,
|
|
87
|
+
// #ifndef MP-TOUTIAO
|
|
88
|
+
virtualHost: true,
|
|
89
|
+
// #endif
|
|
90
|
+
styleIsolation: 'shared'
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<script lang="ts" setup>
|
|
96
|
+
import { ref, computed, watch } from 'vue'
|
|
97
|
+
import wdIcon from '../wd-icon/wd-icon.vue'
|
|
98
|
+
import wdCalendarView from '../wd-calendar-view/wd-calendar-view.vue'
|
|
99
|
+
import wdActionSheet from '../wd-action-sheet/wd-action-sheet.vue'
|
|
100
|
+
import wdButton from '../wd-button/wd-button.vue'
|
|
101
|
+
import wdTabs from '../wd-tabs/wd-tabs.vue'
|
|
102
|
+
import wdTab from '../wd-tab/wd-tab.vue'
|
|
103
|
+
import wdTag from '../wd-tag/wd-tag.vue'
|
|
104
|
+
import { callInterceptor } from '../../common/interceptor'
|
|
105
|
+
import { formatDate } from '../../common/formatDate'
|
|
106
|
+
import { deepClone, isArray, isEqual, padZero, pause } from '../../common/util'
|
|
107
|
+
import { getWeekNumber, isRange } from '../wd-calendar-view/utils'
|
|
108
|
+
import { useTranslate } from '../../composables/useTranslate'
|
|
109
|
+
import { calendarProps, type CalendarExpose } from './types'
|
|
110
|
+
import type { CalendarType } from '../wd-calendar-view/types'
|
|
111
|
+
|
|
112
|
+
const props = defineProps(calendarProps)
|
|
113
|
+
const emit = defineEmits(['cancel', 'change', 'update:modelValue', 'confirm', 'open', 'update:visible'])
|
|
114
|
+
const { translate } = useTranslate('calendar')
|
|
115
|
+
|
|
116
|
+
const pickerShow = ref<boolean>(false)
|
|
117
|
+
const calendarValue = ref<null | number | number[]>(null)
|
|
118
|
+
const lastCalendarValue = ref<null | number | number[]>(null)
|
|
119
|
+
const confirmBtnDisabled = ref<boolean>(true)
|
|
120
|
+
const currentTab = ref<number>(0)
|
|
121
|
+
const lastTab = ref<number>(0)
|
|
122
|
+
const currentType = ref<CalendarType>('date')
|
|
123
|
+
const lastCurrentType = ref<CalendarType>()
|
|
124
|
+
const inited = ref<boolean>(false)
|
|
125
|
+
const calendarViewRef = ref()
|
|
126
|
+
const calendarTabs = ref()
|
|
127
|
+
const isConfirming = ref<boolean>(false)
|
|
128
|
+
/** 当前激活的快捷选项索引,-1 表示无激活项 */
|
|
129
|
+
const activeShortcutIndex = ref<number>(-1)
|
|
130
|
+
|
|
131
|
+
const formatRange = (value: number, rangeType: 'start' | 'end', type: CalendarType) => {
|
|
132
|
+
switch (type) {
|
|
133
|
+
case 'daterange':
|
|
134
|
+
if (!value) {
|
|
135
|
+
return rangeType === 'end' ? translate('endTime') : translate('startTime')
|
|
136
|
+
}
|
|
137
|
+
return formatDate(value, translate('dateFormat'))
|
|
138
|
+
case 'datetimerange':
|
|
139
|
+
if (!value) {
|
|
140
|
+
return rangeType === 'end' ? translate('endTime') : translate('startTime')
|
|
141
|
+
}
|
|
142
|
+
return formatDate(value, translate('timeFormat'))
|
|
143
|
+
case 'weekrange': {
|
|
144
|
+
if (!value) {
|
|
145
|
+
return rangeType === 'end' ? translate('endWeek') : translate('startWeek')
|
|
146
|
+
}
|
|
147
|
+
const date = new Date(value)
|
|
148
|
+
const year = date.getFullYear()
|
|
149
|
+
const week = getWeekNumber(value)
|
|
150
|
+
return translate('weekFormat', year, padZero(week))
|
|
151
|
+
}
|
|
152
|
+
case 'monthrange':
|
|
153
|
+
if (!value) {
|
|
154
|
+
return rangeType === 'end' ? translate('endMonth') : translate('startMonth')
|
|
155
|
+
}
|
|
156
|
+
return formatDate(value, translate('monthFormat'))
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const rangeLabel = computed(() => {
|
|
161
|
+
const [start, end] = deepClone(isArray(calendarValue.value) ? calendarValue.value : [])
|
|
162
|
+
return [start, end].map((item, index) => {
|
|
163
|
+
return (props.innerDisplayFormat || formatRange)(item, index === 0 ? 'start' : 'end', currentType.value)
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
watch(
|
|
168
|
+
() => props.modelValue,
|
|
169
|
+
(val, oldVal) => {
|
|
170
|
+
if (isEqual(val, oldVal)) return
|
|
171
|
+
calendarValue.value = deepClone(val)
|
|
172
|
+
confirmBtnDisabled.value = getConfirmBtnStatus(val)
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
immediate: true
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
watch(
|
|
180
|
+
() => props.type,
|
|
181
|
+
(newValue) => {
|
|
182
|
+
if (props.showTypeSwitch) {
|
|
183
|
+
const tabs = ['date', 'week', 'month']
|
|
184
|
+
const rangeTabs = ['daterange', 'weekrange', 'monthrange']
|
|
185
|
+
|
|
186
|
+
const index = newValue.indexOf('range') > -1 ? rangeTabs.indexOf(newValue) || 0 : tabs.indexOf(newValue)
|
|
187
|
+
currentTab.value = index
|
|
188
|
+
}
|
|
189
|
+
currentType.value = deepClone(newValue)
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
deep: true,
|
|
193
|
+
immediate: true
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
watch(
|
|
198
|
+
() => props.visible,
|
|
199
|
+
(val) => {
|
|
200
|
+
pickerShow.value = val
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
immediate: true
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
function handleOpened() {
|
|
208
|
+
if (props.showTypeSwitch) {
|
|
209
|
+
calendarTabs.value && calendarTabs.value.scrollIntoView()
|
|
210
|
+
calendarTabs.value && calendarTabs.value.updateLineStyle(false)
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function handleClosed() {
|
|
215
|
+
if (isConfirming.value) {
|
|
216
|
+
isConfirming.value = false
|
|
217
|
+
} else {
|
|
218
|
+
calendarValue.value = deepClone(lastCalendarValue.value)
|
|
219
|
+
currentTab.value = lastTab.value
|
|
220
|
+
currentType.value = lastCurrentType.value || 'date'
|
|
221
|
+
confirmBtnDisabled.value = getConfirmBtnStatus(lastCalendarValue.value)
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
watch(pickerShow, async (val) => {
|
|
226
|
+
emit('update:visible', val)
|
|
227
|
+
if (val) {
|
|
228
|
+
inited.value = true
|
|
229
|
+
lastCalendarValue.value = deepClone(calendarValue.value)
|
|
230
|
+
lastTab.value = currentTab.value
|
|
231
|
+
lastCurrentType.value = currentType.value
|
|
232
|
+
|
|
233
|
+
await pause()
|
|
234
|
+
scrollIntoView()
|
|
235
|
+
emit('open')
|
|
236
|
+
} else {
|
|
237
|
+
if (!isConfirming.value) {
|
|
238
|
+
emit('cancel')
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
function scrollIntoView() {
|
|
244
|
+
calendarViewRef.value && calendarViewRef.value.scrollIntoView()
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// 对外暴露方法
|
|
248
|
+
function open() {
|
|
249
|
+
pickerShow.value = true
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// 对外暴露方法
|
|
253
|
+
function close() {
|
|
254
|
+
pickerShow.value = false
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function handleTypeChange({ index }: { index: number }) {
|
|
258
|
+
const tabs = ['date', 'week', 'month']
|
|
259
|
+
const rangeTabs = ['daterange', 'weekrange', 'monthrange']
|
|
260
|
+
const type = props.type.indexOf('range') > -1 ? rangeTabs[index] : tabs[index]
|
|
261
|
+
currentTab.value = index
|
|
262
|
+
currentType.value = type as CalendarType
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function getConfirmBtnStatus(value: number | number[] | null) {
|
|
266
|
+
let confirmBtnDisabled = false
|
|
267
|
+
// 范围选择未选择满,或者多日期选择未选择日期,按钮置灰不可点击
|
|
268
|
+
if (
|
|
269
|
+
(props.type.indexOf('range') > -1 && (!isArray(value) || !value[0] || !value[1] || !value)) ||
|
|
270
|
+
(props.type === 'dates' && (!isArray(value) || value.length === 0 || !value)) ||
|
|
271
|
+
!value
|
|
272
|
+
) {
|
|
273
|
+
confirmBtnDisabled = true
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return confirmBtnDisabled
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function handleChange({ value }: { value: number | number[] | null }) {
|
|
280
|
+
calendarValue.value = deepClone(value)
|
|
281
|
+
confirmBtnDisabled.value = getConfirmBtnStatus(value)
|
|
282
|
+
// 用户手动切换日期时重置快捷选项激活状态
|
|
283
|
+
activeShortcutIndex.value = -1
|
|
284
|
+
|
|
285
|
+
emit('change', {
|
|
286
|
+
value
|
|
287
|
+
})
|
|
288
|
+
|
|
289
|
+
if (!props.showConfirm && !confirmBtnDisabled.value) {
|
|
290
|
+
handleConfirm()
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function handleConfirm() {
|
|
295
|
+
callInterceptor(props.beforeConfirm, {
|
|
296
|
+
args: [calendarValue.value],
|
|
297
|
+
done: onConfirm
|
|
298
|
+
})
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function onConfirm() {
|
|
302
|
+
isConfirming.value = true
|
|
303
|
+
pickerShow.value = false
|
|
304
|
+
lastCurrentType.value = currentType.value
|
|
305
|
+
emit('update:modelValue', calendarValue.value)
|
|
306
|
+
emit('confirm', {
|
|
307
|
+
value: calendarValue.value,
|
|
308
|
+
type: currentType.value
|
|
309
|
+
})
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function handleShortcutClick(index: number) {
|
|
313
|
+
// 设置激活的快捷选项
|
|
314
|
+
activeShortcutIndex.value = index
|
|
315
|
+
|
|
316
|
+
if (props.onShortcutsClick && typeof props.onShortcutsClick === 'function') {
|
|
317
|
+
calendarValue.value = deepClone(
|
|
318
|
+
props.onShortcutsClick({
|
|
319
|
+
item: props.shortcuts[index],
|
|
320
|
+
index
|
|
321
|
+
})
|
|
322
|
+
)
|
|
323
|
+
confirmBtnDisabled.value = getConfirmBtnStatus(calendarValue.value)
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (!props.showConfirm) {
|
|
327
|
+
handleConfirm()
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
defineExpose<CalendarExpose>({
|
|
332
|
+
close,
|
|
333
|
+
open
|
|
334
|
+
})
|
|
335
|
+
</script>
|
|
336
|
+
|
|
337
|
+
<style lang="scss">
|
|
338
|
+
@use './index.scss';
|
|
339
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use '../../styles/variable.scss' as *;
|
|
2
|
+
|
|
3
|
+
$calendar-view-panel-title-font-size: var(--wot-calendar-view-panel-title-font-size, $typography-body-size-main) !default; // 面板标题字号
|
|
4
|
+
$calendar-view-panel-title-line-height: var(--wot-calendar-view-panel-title-line-height, $typography-body-line--height-size-main) !default; // 面板标题行高
|
|
5
|
+
$calendar-view-panel-title-color: var(--wot-calendar-view-panel-title-color, $text-main) !default; // 面板标题文字颜色
|
|
6
|
+
$calendar-view-panel-title-padding: var(--wot-calendar-view-panel-title-padding, $padding-extra-tight $padding-loose) !default; // 面板标题内边距
|
|
7
|
+
$calendar-view-panel-title-font-weight: var(--wot-calendar-view-panel-title-font-weight, $font-weight-medium) !default; // 面板标题字重
|
|
8
|
+
$calendar-view-panel-title-margin: var(--wot-calendar-view-panel-title-margin, $spacing-super-tight $spacing-zero) !default; // 面板标题外边距
|
|
9
|
+
$calendar-view-weeks-padding: var(--wot-calendar-view-weeks-padding, $padding-tight $spacing-loose) !default; // 星期栏内边距
|
|
10
|
+
$calendar-view-week-color: var(--wot-calendar-view-week-color, $text-secondary) !default; // 星期文字颜色
|
|
11
|
+
$calendar-view-week-font-size: var(--wot-calendar-view-week-font-size, $typography-body-size-main) !default; // 星期文字字号
|
|
12
|
+
$calendar-view-week-line-height: var(--wot-calendar-view-week-line-height, $typography-body-line--height-size-main) !default; // 星期文字行高
|
|
13
|
+
$calendar-view-day-font-size: var(--wot-calendar-view-day-font-size, $typography-body-size-extra-large) !default; // 日期单元字号
|
|
14
|
+
$calendar-view-day-color: var(--wot-calendar-view-day-color, $text-main) !default; // 日期单元文字颜色
|
|
15
|
+
$calendar-view-day-font-weight: var(--wot-calendar-view-day-font-weight, $font-weight-medium) !default; // 日期单元字重
|
|
16
|
+
$calendar-view-day-height: var(--wot-calendar-view-day-height, $n-60) !default; // 日期单元高度
|
|
17
|
+
$calendar-view-month-width: var(--wot-calendar-view-month-width, $n-60) !default; // 月份单元宽度
|
|
18
|
+
$calendar-view-month-height: var(--wot-calendar-view-month-height, $n-60) !default; // 月份单元高度
|
|
19
|
+
$calendar-view-month-font-weight: var(--wot-calendar-view-month-font-weight, $font-weight-medium) !default; // 月份单元字重
|
|
20
|
+
$calendar-view-color-active: var(--wot-calendar-view-color-active, $primary-6) !default; // 激活态颜色
|
|
21
|
+
$calendar-view-color-selected: var(--wot-calendar-view-color-selected, $text-white) !default; // 选中态文字颜色
|
|
22
|
+
$calendar-view-color-disabled: var(--wot-calendar-view-color-disabled, $text-disabled) !default; // 禁用态文字颜色
|
|
23
|
+
$calendar-view-range-bg: var(--wot-calendar-view-range-bg, $primary-2) !default; // 区间态背景色
|
|
24
|
+
$calendar-view-range-color: var(--wot-calendar-view-range-color, $text-main) !default; // 区间态文字颜色
|
|
25
|
+
$calendar-view-border-radius-active: var(--wot-calendar-view-border-radius-active, $radius-main) !default; // 激活态圆角
|
|
26
|
+
$calendar-view-info-font-size: var(--wot-calendar-view-info-font-size, $typography-label-size-extra-small) !default; // 顶部/底部辅助信息字号
|
|
27
|
+
$calendar-view-info-line-height: var(--wot-calendar-view-info-line-height, $typography-label-line--height-size-extra-small) !default; // 顶部/底部辅助信息行高
|
|
28
|
+
$calendar-view-info-position: var(--wot-calendar-view-info-position, $spacing-extra-tight) !default; // 顶部/底部辅助信息偏移位置
|
|
29
|
+
$calendar-view-item-margin-bottom: var(--wot-calendar-view-item-margin-bottom, $spacing-super-tight) !default; // 日期/月份单元底部间距
|
|
30
|
+
$calendar-view-item-padding: var(--wot-calendar-view-item-padding, $padding-zero $spacing-loose) !default; // 日期/月份容器内边距
|
|
31
|
+
$calendar-view-time-picker-font-size: var(--wot-calendar-view-time-picker-font-size, $typography-body-size-extra-large) !default; // 时间选择器字号
|
|
32
|
+
$calendar-view-time-picker-color: var(--wot-calendar-view-time-picker-color, $text-main) !default; // 时间选择器文字颜色
|
|
33
|
+
$calendar-view-time-picker-bg: var(--wot-calendar-view-time-picker-bg, $filled-content) !default; // 时间选择器背景色
|
|
34
|
+
$calendar-view-time-label-height: var(--wot-calendar-view-time-label-height, $n-44) !default; // 时间标签高度
|
|
35
|
+
$calendar-view-time-label-border: var(--wot-calendar-view-time-label-border, $stroke-main solid $border-main) !default; // 时间标签分隔边框
|
|
36
|
+
$calendar-view-controls-padding: var(--wot-calendar-view-controls-padding, $padding-loose) !default; // 面板控制栏内边距
|
|
37
|
+
$calendar-view-control-icon-color: var(--wot-calendar-view-control-icon-color, $icon-secondary) !default; // 控制栏图标颜色
|
|
38
|
+
$calendar-view-control-icon-size: var(--wot-calendar-view-control-icon-size, $n-20) !default; // 控制栏图标尺寸
|
|
39
|
+
$calendar-view-control-icon-spacing: var(--wot-calendar-view-control-icon-spacing, $spacing-extra-loose) !default; // 控制栏图标间距
|
|
40
|
+
$calendar-view-control-color-disabled: var(--wot-calendar-view-control-color-disabled, $icon-disabled) !default; // 控制栏禁用图标颜色
|
|
41
|
+
$calendar-view-time-box-shadow: var(--wot-calendar-view-time-box-shadow, $n-0 (-$n-4) $n-8 $n-0 $opac-1_02) !default; // 时间选择区域阴影
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
@use '../../../styles/mixin/mixin.scss' as *;
|
|
2
|
+
@use '../index.scss' as *;
|
|
3
|
+
|
|
4
|
+
@include b(month) {
|
|
5
|
+
@include e(title) {
|
|
6
|
+
font-size: $calendar-view-panel-title-font-size;
|
|
7
|
+
line-height: $calendar-view-panel-title-line-height;
|
|
8
|
+
color: $calendar-view-panel-title-color;
|
|
9
|
+
padding: $calendar-view-panel-title-padding;
|
|
10
|
+
font-weight: $calendar-view-panel-title-font-weight;
|
|
11
|
+
margin: $calendar-view-panel-title-margin;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@include e(days) {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
font-size: $calendar-view-day-font-size;
|
|
18
|
+
color: $calendar-view-day-color;
|
|
19
|
+
padding: $calendar-view-item-padding;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include e(day) {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: calc(100% / 7);
|
|
25
|
+
height: $calendar-view-day-height;
|
|
26
|
+
line-height: $calendar-view-day-height;
|
|
27
|
+
font-weight: $calendar-view-day-font-weight;
|
|
28
|
+
margin-bottom: $calendar-view-item-margin-bottom;
|
|
29
|
+
text-align: center;
|
|
30
|
+
|
|
31
|
+
@include when(disabled) {
|
|
32
|
+
.wd-month__day-text {
|
|
33
|
+
color: $calendar-view-color-disabled;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include when(current) {
|
|
38
|
+
color: $calendar-view-color-active;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include when(selected, multiple-selected) {
|
|
42
|
+
.wd-month__day-container {
|
|
43
|
+
border-radius: $calendar-view-border-radius-active;
|
|
44
|
+
background: $calendar-view-color-active;
|
|
45
|
+
color: $calendar-view-color-selected;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include when(middle) {
|
|
50
|
+
.wd-month__day-container {
|
|
51
|
+
background: $calendar-view-range-bg;
|
|
52
|
+
color: $calendar-view-range-color;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
@include when(multiple-middle) {
|
|
56
|
+
.wd-month__day-container {
|
|
57
|
+
background: $calendar-view-color-active;
|
|
58
|
+
color: $calendar-view-color-selected;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@include when(start) {
|
|
63
|
+
&::after {
|
|
64
|
+
position: absolute;
|
|
65
|
+
content: '';
|
|
66
|
+
height: $calendar-view-day-height;
|
|
67
|
+
top: 0;
|
|
68
|
+
right: 0;
|
|
69
|
+
left: 50%;
|
|
70
|
+
background: $calendar-view-range-bg;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.is-without-end::after {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.wd-month__day-container {
|
|
78
|
+
background: $calendar-view-color-active;
|
|
79
|
+
color: $calendar-view-color-selected;
|
|
80
|
+
border-radius: $calendar-view-border-radius-active 0 0 $calendar-view-border-radius-active;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@include when(end) {
|
|
85
|
+
&::after {
|
|
86
|
+
position: absolute;
|
|
87
|
+
content: '';
|
|
88
|
+
height: $calendar-view-day-height;
|
|
89
|
+
top: 0;
|
|
90
|
+
left: 0;
|
|
91
|
+
right: 50%;
|
|
92
|
+
background: $calendar-view-range-bg;
|
|
93
|
+
z-index: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.wd-month__day-container {
|
|
97
|
+
background: $calendar-view-color-active;
|
|
98
|
+
color: $calendar-view-color-selected;
|
|
99
|
+
border-radius: 0 $calendar-view-border-radius-active $calendar-view-border-radius-active 0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include when(same) {
|
|
104
|
+
.wd-month__day-container {
|
|
105
|
+
background: $calendar-view-color-active;
|
|
106
|
+
color: $calendar-view-color-selected;
|
|
107
|
+
border-radius: $calendar-view-border-radius-active;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@include when(last-row){
|
|
112
|
+
margin-bottom: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@include e(day-container) {
|
|
117
|
+
position: relative;
|
|
118
|
+
z-index: 2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@include e(day-text) {
|
|
122
|
+
font-weight: $calendar-view-day-font-weight;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@include e(day-top) {
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: $calendar-view-info-position;
|
|
128
|
+
left: 0;
|
|
129
|
+
right: 0;
|
|
130
|
+
line-height: $calendar-view-info-line-height;
|
|
131
|
+
font-size: $calendar-view-info-font-size;
|
|
132
|
+
text-align: center;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@include e(day-bottom) {
|
|
136
|
+
position: absolute;
|
|
137
|
+
bottom: $calendar-view-info-position;
|
|
138
|
+
left: 0;
|
|
139
|
+
right: 0;
|
|
140
|
+
line-height: $calendar-view-info-line-height;
|
|
141
|
+
font-size: $calendar-view-info-font-size;
|
|
142
|
+
text-align: center;
|
|
143
|
+
}
|
|
144
|
+
}
|