@sdata/web-vue 4.4.1 → 4.4.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/dist/sd.css +20 -5
- package/dist/sd.min.css +2 -2
- package/es/_utils/global-config.js +9 -5
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +5 -8
- package/es/anchor/utils.d.ts +1 -1
- package/es/anchor/utils.js +6 -1
- package/es/auto-complete/auto-complete.vue.d.ts +6 -6
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +22 -6
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/avatar/style/index.css +1 -1
- package/es/avatar/style/index.scss +2 -1
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +59 -42
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +22 -22
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +66 -66
- package/es/basic-crud-table/index.d.ts +198 -198
- package/es/bloom-menu/bloom-menu.vue.d.ts +1 -1
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +16 -3
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +32 -18
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/core/config.js +4 -1
- package/es/calendar/core/events.js +22 -2
- package/es/calendar/default-theme.scss +1 -1
- package/es/calendar/style/index.css +2 -2
- package/es/carousel/carousel.vue.d.ts +5 -1
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +55 -12
- package/es/carousel/index.d.ts +15 -3
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/checkbox/checkbox.vue.d.ts +2 -0
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +12 -6
- package/es/checkbox/index.d.ts +6 -0
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +13 -5
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/hooks/use-control-block.d.ts +1 -1
- package/es/color-picker/hooks/use-control-block.js +6 -6
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +7 -6
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +3 -0
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +23 -8
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +16 -7
- package/es/drawer/drawer.vue.d.ts +2 -2
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +5 -12
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-panel.vue.d.ts +0 -9
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +0 -4
- package/es/dropdown/dropdown.vue.d.ts +16 -3
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +24 -3
- package/es/dropdown/index.d.ts +25 -0
- package/es/dropdown/interface.d.ts +2 -0
- package/es/ellipsis/ellipsis.vue.d.ts +2 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +37 -8
- package/es/ellipsis/index.d.ts +3 -0
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +3 -0
- package/es/empty/empty.vue.d.ts +9 -8
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +9 -6
- package/es/file-previewer/file-previewer.vue.d.ts +0 -3
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +3 -6
- package/es/file-previewer/index.d.ts +0 -9
- package/es/form/context.d.ts +1 -2
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -6
- package/es/form/form.vue.d.ts +3 -3
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +5 -7
- package/es/form/index.d.ts +6 -6
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/grid/hook/use-responsive-state.js +15 -4
- package/es/grid/hook/use-responsive-value.js +3 -2
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-components.d.ts +1 -1
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/{icon-faceBook-circle-fill → icon-facebook-circle-fill}/index.d.ts +5 -5
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/icon/index.d.ts +1 -1
- package/es/icon.js +1162 -300
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/index.css +20 -5
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +25 -11
- package/es/input-mask/mask-engine.d.ts +4 -0
- package/es/input-mask/mask-engine.js +12 -1
- package/es/input-number/index.d.ts +15 -0
- package/es/input-number/input-number.vue.d.ts +9 -0
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +47 -14
- package/es/json-form/index.d.ts +11 -11
- package/es/json-form/json-form-item.vue.d.ts +3 -6
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +14 -15
- package/es/json-form/json-form.vue.d.ts +7 -10
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +17 -16
- package/es/json-form/style/index.css +15 -0
- package/es/json-form/style/index.scss +21 -0
- package/es/json-form/types.d.ts +1 -0
- package/es/json-form/utils.d.ts +1 -1
- package/es/json-form/utils.js +20 -13
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +1 -0
- package/es/layout/hooks/use-has-sider.js +23 -2
- package/es/layout/interface.d.ts +1 -1
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/locale/interface.d.ts +7 -0
- package/es/locale/lang/en-us.js +5 -0
- package/es/locale/lang/zh-cn.js +5 -0
- package/es/mention/index.d.ts +15 -0
- package/es/mention/mention.vue.d.ts +10 -1
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +16 -9
- package/es/message/index.js +1 -1
- package/es/modal/index.js +9 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +15 -16
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +27 -3
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +15 -3
- package/es/notification/index.js +5 -2
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +27 -8
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/pagination/page-item-ellipsis.vue.d.ts +9 -0
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +19 -3
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +10 -0
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +4 -11
- package/es/popover/index.d.ts +2 -0
- package/es/popover/popover.vue.d.ts +4 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +10 -3
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +1 -0
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +1 -2
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +10 -10
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +16 -13
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +2 -0
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +20 -9
- package/es/slider/utils.js +1 -1
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +7 -0
- package/es/statistic/index.d.ts +0 -3
- package/es/statistic/statistic.vue.d.ts +0 -2
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +0 -5
- package/es/style/icon.scss +2 -2
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tag/index.d.ts +8 -8
- package/es/tag/tag.vue.d.ts +4 -4
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +1 -2
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +14 -8
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +10 -3
- package/es/trigger/index.d.ts +0 -6
- package/es/trigger/interface.d.ts +1 -2
- package/es/trigger/trigger.vue.d.ts +0 -2
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +0 -4
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +1 -0
- package/es/typography/interface.d.ts +0 -4
- package/es/typography/utils/getInnerText.js +11 -10
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +7 -5
- package/es/upload/utils.d.ts +1 -2
- package/es/verification-code/index.d.ts +12 -3
- package/es/verification-code/verification-code.vue.d.ts +6 -1
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +29 -5
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +4 -2
- package/json/vetur-attributes.json +22 -10
- package/json/vetur-tags.json +10 -4
- package/json/web-types.json +43 -17
- package/package.json +1 -1
- /package/es/icon/{icon-faceBook-circle-fill/icon-faceBook-circle-fill.vue.d.ts → icon-facebook-circle-fill/icon-facebook-circle-fill.vue.d.ts} +0 -0
|
@@ -5,7 +5,7 @@ import { useI18n } from "../locale/index.js";
|
|
|
5
5
|
import Trigger from "../trigger/index.js";
|
|
6
6
|
import Button from "../button/index.js";
|
|
7
7
|
import IconPlus from "../icon/icon-plus/index.js";
|
|
8
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useTemplateRef, watch, withCtx } from "vue";
|
|
8
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
9
9
|
import { shift } from "@floating-ui/vue";
|
|
10
10
|
import { Motion, useReducedMotion } from "motion-v";
|
|
11
11
|
//#region components/bloom-menu/bloom-menu.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -40,6 +40,7 @@ var bloom_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
40
40
|
const emit = __emit;
|
|
41
41
|
const prefixCls = getPrefixCls("bloom-menu");
|
|
42
42
|
const { t } = useI18n();
|
|
43
|
+
const slots = useSlots();
|
|
43
44
|
const triggerButtonRef = useTemplateRef("triggerButton");
|
|
44
45
|
const panelRootRef = useTemplateRef("panelRoot");
|
|
45
46
|
const internalOpen = shallowRef(__props.defaultOpen);
|
|
@@ -131,7 +132,10 @@ var bloom_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
131
132
|
function getTriggerElement(event) {
|
|
132
133
|
var _triggerButtonRef$val;
|
|
133
134
|
if ((event === null || event === void 0 ? void 0 : event.currentTarget) instanceof HTMLElement) return event.currentTarget;
|
|
134
|
-
|
|
135
|
+
const buttonEl = (_triggerButtonRef$val = triggerButtonRef.value) === null || _triggerButtonRef$val === void 0 ? void 0 : _triggerButtonRef$val.$el;
|
|
136
|
+
if (!slots.trigger) return buttonEl;
|
|
137
|
+
const slotRoot = buttonEl === null || buttonEl === void 0 ? void 0 : buttonEl.querySelector(`:scope .${prefixCls}-trigger-content > *`);
|
|
138
|
+
return slotRoot !== null && slotRoot !== void 0 ? slotRoot : buttonEl;
|
|
135
139
|
}
|
|
136
140
|
function captureTriggerStyle(event) {
|
|
137
141
|
const element = getTriggerElement(event);
|
|
@@ -157,12 +161,18 @@ var bloom_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
157
161
|
}
|
|
158
162
|
function handlePopupVisibleChange(visible) {
|
|
159
163
|
if (visible) {
|
|
164
|
+
popupVisible.value = true;
|
|
165
|
+
window.clearTimeout(closeTimer);
|
|
160
166
|
captureTriggerStyle();
|
|
161
167
|
setOpen(true);
|
|
162
168
|
} else {
|
|
163
169
|
var _panelRootRef$value;
|
|
164
170
|
if (document.activeElement instanceof HTMLElement && ((_panelRootRef$value = panelRootRef.value) === null || _panelRootRef$value === void 0 ? void 0 : _panelRootRef$value.contains(document.activeElement))) focusTrigger();
|
|
165
171
|
setOpen(false);
|
|
172
|
+
if (__props.modelValue !== void 0 && isOpen.value) {
|
|
173
|
+
popupVisible.value = false;
|
|
174
|
+
window.clearTimeout(closeTimer);
|
|
175
|
+
}
|
|
166
176
|
}
|
|
167
177
|
}
|
|
168
178
|
let closeTimer = 0;
|
|
@@ -184,6 +194,9 @@ var bloom_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
184
194
|
setOpen(false);
|
|
185
195
|
if (restoreFocus) nextTick(focusTrigger);
|
|
186
196
|
}
|
|
197
|
+
function closeHeaderSlot() {
|
|
198
|
+
close(true);
|
|
199
|
+
}
|
|
187
200
|
function focusPanel(attempt = 0) {
|
|
188
201
|
nextTick(() => {
|
|
189
202
|
var _panelRootRef$value2, _panelRootRef$value3;
|
|
@@ -271,7 +284,7 @@ var bloom_menu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
271
284
|
transition: contentTransition.value,
|
|
272
285
|
class: normalizeClass(`${unref(prefixCls)}-content`)
|
|
273
286
|
}, {
|
|
274
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-header`) }, [renderSlot(_ctx.$slots, "header", { close }, () => {
|
|
287
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-header`) }, [renderSlot(_ctx.$slots, "header", { close: closeHeaderSlot }, () => {
|
|
275
288
|
var _props$closeAriaLabel;
|
|
276
289
|
return [createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-title`) }, toDisplayString(__props.title), 3), createVNode(unref(Button), {
|
|
277
290
|
type: "text",
|
|
@@ -269,12 +269,19 @@ var border_beam_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
269
269
|
}
|
|
270
270
|
__expose({ flowFrom });
|
|
271
271
|
let mutationObserver = null;
|
|
272
|
+
function getSlotElement() {
|
|
273
|
+
const el = wrapperRef.value;
|
|
274
|
+
if (!el) return null;
|
|
275
|
+
for (const child of Array.from(el.children)) {
|
|
276
|
+
if (child.hasAttribute("data-beam-bloom") || child.hasAttribute("data-beam-flow")) continue;
|
|
277
|
+
return child;
|
|
278
|
+
}
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
272
281
|
onMounted(() => {
|
|
273
282
|
const detect = () => {
|
|
274
283
|
if (props.borderRadius != null) return;
|
|
275
|
-
const
|
|
276
|
-
if (!el) return;
|
|
277
|
-
const child = el.firstElementChild;
|
|
284
|
+
const child = getSlotElement();
|
|
278
285
|
if (!child) return;
|
|
279
286
|
const computed = getComputedStyle(child);
|
|
280
287
|
const raw = parseFloat(computed.borderTopLeftRadius);
|
|
@@ -287,18 +294,17 @@ var border_beam_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
287
294
|
mutationObserver = new MutationObserver(detect);
|
|
288
295
|
mutationObserver.observe(el, {
|
|
289
296
|
childList: true,
|
|
290
|
-
subtree: false
|
|
297
|
+
subtree: false,
|
|
298
|
+
attributes: true,
|
|
299
|
+
attributeFilter: ["class", "style"]
|
|
300
|
+
});
|
|
301
|
+
const child = getSlotElement();
|
|
302
|
+
if (child) mutationObserver.observe(child, {
|
|
303
|
+
attributes: true,
|
|
304
|
+
attributeFilter: ["class", "style"]
|
|
291
305
|
});
|
|
292
306
|
});
|
|
293
307
|
});
|
|
294
|
-
onUnmounted(() => {
|
|
295
|
-
clearFlowTimer();
|
|
296
|
-
mutationObserver === null || mutationObserver === void 0 || mutationObserver.disconnect();
|
|
297
|
-
});
|
|
298
|
-
watch(() => props.active, (active) => {
|
|
299
|
-
if (active && !isActive.value && !isFading.value) isActive.value = true;
|
|
300
|
-
else if (!active && isActive.value && !isFading.value) isFading.value = true;
|
|
301
|
-
});
|
|
302
308
|
let intersectionCleanup = null;
|
|
303
309
|
onMounted(() => {
|
|
304
310
|
const el = wrapperRef.value;
|
|
@@ -309,6 +315,14 @@ var border_beam_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
309
315
|
observer.observe(el);
|
|
310
316
|
intersectionCleanup = () => observer.disconnect();
|
|
311
317
|
});
|
|
318
|
+
onUnmounted(() => {
|
|
319
|
+
clearFlowTimer();
|
|
320
|
+
mutationObserver === null || mutationObserver === void 0 || mutationObserver.disconnect();
|
|
321
|
+
});
|
|
322
|
+
watch(() => props.active, (active) => {
|
|
323
|
+
if (active && !isActive.value && !isFading.value) isActive.value = true;
|
|
324
|
+
else if (!active && isActive.value && !isFading.value) isFading.value = true;
|
|
325
|
+
});
|
|
312
326
|
onUnmounted(() => {
|
|
313
327
|
intersectionCleanup === null || intersectionCleanup === void 0 || intersectionCleanup();
|
|
314
328
|
});
|
|
@@ -323,15 +337,14 @@ var border_beam_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
323
337
|
};
|
|
324
338
|
return;
|
|
325
339
|
}
|
|
326
|
-
|
|
327
|
-
if (!el) return;
|
|
340
|
+
if (!wrapperRef.value) return;
|
|
328
341
|
const REF_WIDTH = 350;
|
|
329
342
|
const REF_HEIGHT = 140;
|
|
330
343
|
const MIN_SCALE = .35;
|
|
331
344
|
const MAX_SCALE = 4;
|
|
332
345
|
const clamp = (value) => Math.max(MIN_SCALE, Math.min(MAX_SCALE, value));
|
|
333
346
|
const measure = () => {
|
|
334
|
-
const child =
|
|
347
|
+
const child = getSlotElement();
|
|
335
348
|
if (!child) return;
|
|
336
349
|
const rect = child.getBoundingClientRect();
|
|
337
350
|
if (!rect.width || !rect.height) return;
|
|
@@ -345,7 +358,7 @@ var border_beam_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
345
358
|
nextTick(() => {
|
|
346
359
|
measure();
|
|
347
360
|
if (typeof ResizeObserver === "undefined") return;
|
|
348
|
-
const child =
|
|
361
|
+
const child = getSlotElement();
|
|
349
362
|
if (!child) return;
|
|
350
363
|
const ro = new ResizeObserver(measure);
|
|
351
364
|
ro.observe(child);
|
|
@@ -356,12 +369,13 @@ var border_beam_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
356
369
|
onMounted(() => setupPulseGlowScale());
|
|
357
370
|
onUnmounted(() => resizeObserverCleanup === null || resizeObserverCleanup === void 0 ? void 0 : resizeObserverCleanup());
|
|
358
371
|
function handleAnimationEnd(e) {
|
|
372
|
+
if (e.pseudoElement) return;
|
|
359
373
|
const animationName = e.animationName || "";
|
|
360
|
-
if (animationName
|
|
374
|
+
if (animationName === `beam-fade-out-${id}`) {
|
|
361
375
|
isActive.value = false;
|
|
362
376
|
isFading.value = false;
|
|
363
377
|
emit("deactivate");
|
|
364
|
-
} else if (animationName
|
|
378
|
+
} else if (animationName === `beam-fade-in-${id}`) emit("activate");
|
|
365
379
|
}
|
|
366
380
|
const resolvedTheme = computed(() => resolveTheme(props.theme, systemTheme.value));
|
|
367
381
|
const themeConfig = computed(() => sizeThemePresets[props.size][resolvedTheme.value]);
|
|
@@ -41,7 +41,7 @@ var breadcrumb_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
41
41
|
if (breadcrumbCtx && breadcrumbCtx.needHide) return props.index === 1;
|
|
42
42
|
return false;
|
|
43
43
|
});
|
|
44
|
-
const showSeparator = computed(() => breadcrumbCtx ? props.index < breadcrumbCtx.total - 1 :
|
|
44
|
+
const showSeparator = computed(() => breadcrumbCtx ? props.index < breadcrumbCtx.total - 1 : false);
|
|
45
45
|
const handleVisibleChange = (visible) => {
|
|
46
46
|
dropdownVisible.value = visible;
|
|
47
47
|
};
|
|
@@ -66,9 +66,9 @@ var breadcrumb_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
66
66
|
"popup-visible": dropdownVisible.value,
|
|
67
67
|
onPopupVisibleChange: handleVisibleChange
|
|
68
68
|
}, __props.dropdownProps), {
|
|
69
|
-
content: withCtx(() => [_ctx.$slots.droplist ? renderSlot(_ctx.$slots, "droplist", {}, void 0, void 0, 0) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.droplist, (item) => {
|
|
69
|
+
content: withCtx(() => [_ctx.$slots.droplist ? renderSlot(_ctx.$slots, "droplist", {}, void 0, void 0, 0) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.droplist, (item, dIndex) => {
|
|
70
70
|
return openBlock(), createBlock(unref(dropdown_option_default), {
|
|
71
|
-
key: item.path
|
|
71
|
+
key: `${dIndex}-${item.path}`,
|
|
72
72
|
value: item.path
|
|
73
73
|
}, {
|
|
74
74
|
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
@@ -147,7 +147,7 @@ var cell_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
147
147
|
switch (view.id) {
|
|
148
148
|
case "day": return "";
|
|
149
149
|
case "days":
|
|
150
|
-
if (config.availableViews.days.rows > 1) dateUtils.formatDate(props.start, "D");
|
|
150
|
+
if (config.availableViews.days.rows > 1) return dateUtils.formatDate(props.start, "D");
|
|
151
151
|
return "";
|
|
152
152
|
case "week": return "";
|
|
153
153
|
case "month": return dateUtils.formatDate(props.start, "D");
|
|
@@ -271,7 +271,7 @@ var event_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
271
271
|
key: 0,
|
|
272
272
|
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => event.delete(3), ["stop"])),
|
|
273
273
|
class: normalizeClass(`${unref(prefixCls)}__event-delete`)
|
|
274
|
-
},
|
|
274
|
+
}, toDisplayString(unref(calendar).texts.deleteEvent), 3)) : createCommentVNode("", true)]),
|
|
275
275
|
_: 1
|
|
276
276
|
}, 8, ["name"])
|
|
277
277
|
], 16, _hoisted_1);
|
|
@@ -409,7 +409,10 @@ export const useConfig = (calendar, props, attrs) => {
|
|
|
409
409
|
};
|
|
410
410
|
if (props.editableEvents === true) return defaults;
|
|
411
411
|
if (props.editableEvents === false)
|
|
412
|
-
return Object.keys(defaults).
|
|
412
|
+
return Object.keys(defaults).reduce((obj, key) => {
|
|
413
|
+
obj[key] = false;
|
|
414
|
+
return obj;
|
|
415
|
+
}, {});
|
|
413
416
|
return { ...defaults, ...props.editableEvents };
|
|
414
417
|
});
|
|
415
418
|
|
|
@@ -511,6 +511,24 @@ export const useEvents = (calendar) => {
|
|
|
511
511
|
const excludeSet = new Set(excludeIds);
|
|
512
512
|
const eventsArray = [];
|
|
513
513
|
|
|
514
|
+
// Mirror isEventInRange: for all-day (or timeless) events, expand the end to the end of day so
|
|
515
|
+
// a same-day all-day event is not collapsed onto its start instant. An end exactly at midnight
|
|
516
|
+
// counts as the end of the PREVIOUS day (1ms convention, see buildEventsIndex), so it is kept
|
|
517
|
+
// out of the midnight day itself.
|
|
518
|
+
const getEventRangeTimestamps = (event) => {
|
|
519
|
+
const allDayOrTimeless = event.allDay || !config.time;
|
|
520
|
+
if (!allDayOrTimeless) {
|
|
521
|
+
return { eventStart: event.start.getTime(), eventEnd: event.end.getTime() };
|
|
522
|
+
}
|
|
523
|
+
const eventStart = new Date(event.start).setHours(0, 0, 0, 0);
|
|
524
|
+
const endMidnight = new Date(event.end).setHours(0, 0, 0, 0);
|
|
525
|
+
const eventEnd =
|
|
526
|
+
event.end.getTime() === endMidnight && !dateUtils.isSameDate(event.start, event.end)
|
|
527
|
+
? endMidnight - 1 // Ends at next midnight: effectively ends the previous day.
|
|
528
|
+
: new Date(event.end).setHours(23, 59, 59, 999);
|
|
529
|
+
return { eventStart, eventEnd };
|
|
530
|
+
};
|
|
531
|
+
|
|
514
532
|
// If there are less than 100 events, we can use a simple loop to find events in the range.
|
|
515
533
|
if (totalEvents <= 100) {
|
|
516
534
|
for (const event of Object.values(byId)) {
|
|
@@ -520,7 +538,8 @@ export const useEvents = (calendar) => {
|
|
|
520
538
|
if (config.allDayEvents && ((allDay && !event.allDay) || (!allDay && event.allDay)))
|
|
521
539
|
continue;
|
|
522
540
|
// Accept events that overlap the range.
|
|
523
|
-
|
|
541
|
+
const { eventStart, eventEnd } = getEventRangeTimestamps(event);
|
|
542
|
+
if (eventEnd > rangeStartTimestamp && eventStart < rangeEndTimestamp)
|
|
524
543
|
eventsArray.push(event);
|
|
525
544
|
}
|
|
526
545
|
return eventsArray;
|
|
@@ -559,7 +578,8 @@ export const useEvents = (calendar) => {
|
|
|
559
578
|
if (background === false && e.background) continue;
|
|
560
579
|
if (config.allDayEvents && ((allDay && !e.allDay) || (!allDay && e.allDay))) continue;
|
|
561
580
|
// Accept events that overlap the range.
|
|
562
|
-
|
|
581
|
+
const { eventStart, eventEnd } = getEventRangeTimestamps(e);
|
|
582
|
+
if (eventEnd > rangeStartTimestamp && eventStart < rangeEndTimestamp)
|
|
563
583
|
eventsArray.push(e);
|
|
564
584
|
}
|
|
565
585
|
}
|
|
@@ -438,7 +438,7 @@ $calendar-css-prefix: string.unquote('--#{global.$prefix}-calendar');
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
.#{$calendar-prefix-cls}__cell--out-of-
|
|
441
|
+
.#{$calendar-prefix-cls}__cell--out-of-range .#{$calendar-prefix-cls}__cell-date {
|
|
442
442
|
opacity: 0.4;
|
|
443
443
|
}
|
|
444
444
|
|
|
@@ -676,8 +676,8 @@
|
|
|
676
676
|
[sd-theme=light] [class$=-calendar--default-theme]:is(.sd-calendar--sm, .sd-calendar--lg) .sd-calendar__scrollable--month-view .sd-calendar__cell--selected .sd-calendar__cell-date {
|
|
677
677
|
background-color: color-mix(in srgb, var(--sd-calendar-primary-color) 40%, transparent);
|
|
678
678
|
}
|
|
679
|
-
.sd-calendar--default-theme .sd-calendar__cell--out-of-
|
|
680
|
-
[class$=-calendar--default-theme] .sd-calendar__cell--out-of-
|
|
679
|
+
.sd-calendar--default-theme .sd-calendar__cell--out-of-range .sd-calendar__cell-date,
|
|
680
|
+
[class$=-calendar--default-theme] .sd-calendar__cell--out-of-range .sd-calendar__cell-date {
|
|
681
681
|
opacity: 0.4;
|
|
682
682
|
}
|
|
683
683
|
.sd-calendar--default-theme .sd-calendar__scrollable--month-view .sd-calendar__cell-events,
|
|
@@ -51,7 +51,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
51
51
|
type: StringConstructor;
|
|
52
52
|
default: string;
|
|
53
53
|
};
|
|
54
|
-
}>, {
|
|
54
|
+
}>, {
|
|
55
|
+
prev: () => void;
|
|
56
|
+
next: () => void;
|
|
57
|
+
goTo: (index: number) => void;
|
|
58
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
55
59
|
change: (_index: number, _prevIndex: number, _isManual: boolean) => void;
|
|
56
60
|
"update:current": (_index: number) => void;
|
|
57
61
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -7,7 +7,7 @@ import { useChildrenComponents } from "../_hooks/use-children-components.js";
|
|
|
7
7
|
import { carouselInjectionKey } from "./context.js";
|
|
8
8
|
import carousel_arrow_default from "./carousel-arrow.js";
|
|
9
9
|
import carousel_indicator_default from "./carousel-indicator.js";
|
|
10
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, openBlock, provide, reactive, ref, toHandlers, toRef, unref, useSlots, watchEffect } from "vue";
|
|
10
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, openBlock, provide, reactive, ref, toHandlers, toRef, unref, useSlots, watch, watchEffect } from "vue";
|
|
11
11
|
//#region components/carousel/carousel.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var _hoisted_1 = ["aria-label"];
|
|
13
13
|
var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Carousel" }), {}, {
|
|
@@ -67,7 +67,7 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
67
67
|
"update:current": (_index) => true,
|
|
68
68
|
"change": (_index, _prevIndex, _isManual) => true
|
|
69
69
|
},
|
|
70
|
-
setup(__props, { emit: __emit }) {
|
|
70
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
71
71
|
const DEFAULT_AUTO_PLAY = {
|
|
72
72
|
interval: 3e3,
|
|
73
73
|
hoverToPause: true
|
|
@@ -89,6 +89,9 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
89
89
|
let animationTimer = 0;
|
|
90
90
|
const { children, components } = useChildrenComponents("CarouselItem");
|
|
91
91
|
const innerIndex = ref(props.defaultCurrent - 1);
|
|
92
|
+
watch(() => props.current, (val) => {
|
|
93
|
+
if (isNumber(val) && components.value.length > 0) innerIndex.value = getValidIndex(val - 1, components.value.length);
|
|
94
|
+
});
|
|
92
95
|
const mergedIndexes = computed(() => {
|
|
93
96
|
const childrenLength = components.value.length;
|
|
94
97
|
const mergedIndex = isNumber(props.current) ? getValidIndex(props.current - 1, childrenLength) : innerIndex.value;
|
|
@@ -109,23 +112,35 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
109
112
|
moveSpeed: toRef(props, "moveSpeed")
|
|
110
113
|
});
|
|
111
114
|
provide(carouselInjectionKey, carouselContext);
|
|
112
|
-
const
|
|
113
|
-
if (intervalTimer)
|
|
115
|
+
const clearIntervalTimer = () => {
|
|
116
|
+
if (intervalTimer) {
|
|
117
|
+
window.clearInterval(intervalTimer);
|
|
118
|
+
intervalTimer = 0;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const clearAnimationTimer = () => {
|
|
122
|
+
if (animationTimer) {
|
|
123
|
+
window.clearTimeout(animationTimer);
|
|
124
|
+
animationTimer = 0;
|
|
125
|
+
}
|
|
114
126
|
};
|
|
115
127
|
watchEffect(() => {
|
|
116
128
|
const { interval } = computedAutoPlay.value || {};
|
|
117
129
|
const { mergedNextIndex } = mergedIndexes.value;
|
|
118
130
|
const shouldInterval = components.value.length > 1 && !isPause.value && Boolean(interval);
|
|
119
|
-
|
|
131
|
+
clearIntervalTimer();
|
|
120
132
|
if (shouldInterval) intervalTimer = window.setInterval(() => slideTo({ targetIndex: mergedNextIndex }), interval);
|
|
121
133
|
});
|
|
122
|
-
onBeforeUnmount(
|
|
134
|
+
onBeforeUnmount(() => {
|
|
135
|
+
clearIntervalTimer();
|
|
136
|
+
clearAnimationTimer();
|
|
137
|
+
});
|
|
123
138
|
function getValidIndex(index, length) {
|
|
124
139
|
const indexNumber = +index;
|
|
125
140
|
return typeof indexNumber === "number" && !Number.isNaN(indexNumber) ? (indexNumber + length) % length : index;
|
|
126
141
|
}
|
|
127
142
|
function slideTo({ targetIndex, isNegative = false, isManual = false }) {
|
|
128
|
-
if (!animationTimer && targetIndex !==
|
|
143
|
+
if (!animationTimer && targetIndex !== innerIndex.value) {
|
|
129
144
|
previousIndex.value = innerIndex.value;
|
|
130
145
|
innerIndex.value = targetIndex;
|
|
131
146
|
slideDirection.value = isNegative ? "negative" : "positive";
|
|
@@ -145,11 +160,15 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
145
160
|
targetIndex: mergedIndexes.value.mergedNextIndex,
|
|
146
161
|
isManual: true
|
|
147
162
|
});
|
|
148
|
-
const onSelect = (index) =>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
163
|
+
const onSelect = (index) => {
|
|
164
|
+
const count = components.value.length;
|
|
165
|
+
if (!count) return;
|
|
166
|
+
slideTo({
|
|
167
|
+
targetIndex: index,
|
|
168
|
+
isNegative: (index - mergedIndexes.value.mergedIndex + count) % count * 2 > count,
|
|
169
|
+
isManual: true
|
|
170
|
+
});
|
|
171
|
+
};
|
|
153
172
|
const onKeydown = (event) => {
|
|
154
173
|
if (event.key === KEYBOARD_KEY.ARROW_RIGHT || event.key === KEYBOARD_KEY.ARROW_DOWN) {
|
|
155
174
|
event.preventDefault();
|
|
@@ -181,6 +200,30 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
181
200
|
children.value = (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
182
201
|
return children.value;
|
|
183
202
|
};
|
|
203
|
+
/**
|
|
204
|
+
* @zh 切换到上一张
|
|
205
|
+
* @en Go to the previous slide
|
|
206
|
+
*/
|
|
207
|
+
const prev = () => onPreviousClick();
|
|
208
|
+
/**
|
|
209
|
+
* @zh 切换到下一张
|
|
210
|
+
* @en Go to the next slide
|
|
211
|
+
*/
|
|
212
|
+
const next = () => onNextClick();
|
|
213
|
+
/**
|
|
214
|
+
* @zh 切换到指定 slide(从 1 开始,与 current/change 的序号一致)
|
|
215
|
+
* @en Go to the given slide (1-based, consistent with current/change)
|
|
216
|
+
*/
|
|
217
|
+
const goTo = (index) => {
|
|
218
|
+
const count = components.value.length;
|
|
219
|
+
if (!count) return;
|
|
220
|
+
onSelect(getValidIndex(index - 1, count));
|
|
221
|
+
};
|
|
222
|
+
__expose({
|
|
223
|
+
prev,
|
|
224
|
+
next,
|
|
225
|
+
goTo
|
|
226
|
+
});
|
|
184
227
|
return (_ctx, _cache) => {
|
|
185
228
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
186
229
|
class: cls.value,
|
package/es/carousel/index.d.ts
CHANGED
|
@@ -57,7 +57,11 @@ declare const Carousel: {
|
|
|
57
57
|
}>> & Readonly<{
|
|
58
58
|
onChange?: ((_index: number, _prevIndex: number, _isManual: boolean) => any) | undefined;
|
|
59
59
|
"onUpdate:current"?: ((_index: number) => any) | undefined;
|
|
60
|
-
}>, {
|
|
60
|
+
}>, {
|
|
61
|
+
prev: () => void;
|
|
62
|
+
next: () => void;
|
|
63
|
+
goTo: (index: number) => void;
|
|
64
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
61
65
|
change: (_index: number, _prevIndex: number, _isManual: boolean) => void;
|
|
62
66
|
"update:current": (_index: number) => void;
|
|
63
67
|
}, import("vue").PublicProps, {
|
|
@@ -133,7 +137,11 @@ declare const Carousel: {
|
|
|
133
137
|
}>> & Readonly<{
|
|
134
138
|
onChange?: ((_index: number, _prevIndex: number, _isManual: boolean) => any) | undefined;
|
|
135
139
|
"onUpdate:current"?: ((_index: number) => any) | undefined;
|
|
136
|
-
}>, {
|
|
140
|
+
}>, {
|
|
141
|
+
prev: () => void;
|
|
142
|
+
next: () => void;
|
|
143
|
+
goTo: (index: number) => void;
|
|
144
|
+
}, {}, {}, {}, {
|
|
137
145
|
trigger: import("./interface").CarouselTriggerEvent;
|
|
138
146
|
showArrow: import("./interface").CarouselArrowType;
|
|
139
147
|
arrowClass: string;
|
|
@@ -203,7 +211,11 @@ declare const Carousel: {
|
|
|
203
211
|
}>> & Readonly<{
|
|
204
212
|
onChange?: ((_index: number, _prevIndex: number, _isManual: boolean) => any) | undefined;
|
|
205
213
|
"onUpdate:current"?: ((_index: number) => any) | undefined;
|
|
206
|
-
}>, {
|
|
214
|
+
}>, {
|
|
215
|
+
prev: () => void;
|
|
216
|
+
next: () => void;
|
|
217
|
+
goTo: (index: number) => void;
|
|
218
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
207
219
|
change: (_index: number, _prevIndex: number, _isManual: boolean) => void;
|
|
208
220
|
"update:current": (_index: number) => void;
|
|
209
221
|
}, string, {
|
|
@@ -94,7 +94,10 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
94
94
|
fieldNames: _fieldNames,
|
|
95
95
|
valueKey
|
|
96
96
|
});
|
|
97
|
-
}, {
|
|
97
|
+
}, {
|
|
98
|
+
immediate: true,
|
|
99
|
+
deep: true
|
|
100
|
+
});
|
|
98
101
|
const computedValueMap = computed(() => {
|
|
99
102
|
var _props$modelValue;
|
|
100
103
|
const values = getValidValues((_props$modelValue = props.modelValue) !== null && _props$modelValue !== void 0 ? _props$modelValue : _value.value, {
|
|
@@ -153,8 +156,8 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
153
156
|
addLazyLoadOptions,
|
|
154
157
|
slots,
|
|
155
158
|
valueMap: computedValueMap,
|
|
156
|
-
expandTrigger
|
|
157
|
-
ellipsis
|
|
159
|
+
expandTrigger,
|
|
160
|
+
ellipsis
|
|
158
161
|
}));
|
|
159
162
|
const handleKeyDown = getKeyDownHandler(/* @__PURE__ */ new Map([
|
|
160
163
|
[KEYBOARD_KEY.ENTER, (_ev) => {
|
|
@@ -24,7 +24,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
24
24
|
onChange?: ((value: CheckboxModelValue, ev: Event) => any) | undefined;
|
|
25
25
|
"onUpdate:modelValue"?: ((value: CheckboxModelValue) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
+
value: CheckboxValue;
|
|
27
28
|
disabled: boolean;
|
|
29
|
+
modelValue: CheckboxModelValue;
|
|
28
30
|
defaultChecked: boolean;
|
|
29
31
|
indeterminate: boolean;
|
|
30
32
|
uninjectGroupContext: boolean;
|
|
@@ -17,16 +17,22 @@ var _hoisted_2 = [
|
|
|
17
17
|
var checkbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Checkbox" }), {}, {
|
|
18
18
|
__name: "checkbox",
|
|
19
19
|
props: {
|
|
20
|
-
modelValue: {
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: [Boolean, Array],
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
21
24
|
defaultChecked: {
|
|
22
25
|
type: Boolean,
|
|
23
26
|
default: false
|
|
24
27
|
},
|
|
25
|
-
value: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
value: {
|
|
29
|
+
type: [
|
|
30
|
+
String,
|
|
31
|
+
Number,
|
|
32
|
+
Boolean
|
|
33
|
+
],
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
30
36
|
disabled: {
|
|
31
37
|
type: Boolean,
|
|
32
38
|
default: false
|
package/es/checkbox/index.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ declare const Checkbox: {
|
|
|
18
18
|
change: (value: boolean | (string | number | boolean)[], ev: Event) => any;
|
|
19
19
|
"update:modelValue": (value: boolean | (string | number | boolean)[]) => any;
|
|
20
20
|
}, import("vue").PublicProps, {
|
|
21
|
+
value: string | number | boolean;
|
|
21
22
|
disabled: boolean;
|
|
23
|
+
modelValue: boolean | (string | number | boolean)[];
|
|
22
24
|
defaultChecked: boolean;
|
|
23
25
|
indeterminate: boolean;
|
|
24
26
|
uninjectGroupContext: boolean;
|
|
@@ -41,7 +43,9 @@ declare const Checkbox: {
|
|
|
41
43
|
onChange?: ((value: boolean | (string | number | boolean)[], ev: Event) => any) | undefined;
|
|
42
44
|
"onUpdate:modelValue"?: ((value: boolean | (string | number | boolean)[]) => any) | undefined;
|
|
43
45
|
}>, {}, {}, {}, {}, {
|
|
46
|
+
value: string | number | boolean;
|
|
44
47
|
disabled: boolean;
|
|
48
|
+
modelValue: boolean | (string | number | boolean)[];
|
|
45
49
|
defaultChecked: boolean;
|
|
46
50
|
indeterminate: boolean;
|
|
47
51
|
uninjectGroupContext: boolean;
|
|
@@ -64,7 +68,9 @@ declare const Checkbox: {
|
|
|
64
68
|
change: (value: boolean | (string | number | boolean)[], ev: Event) => any;
|
|
65
69
|
"update:modelValue": (value: boolean | (string | number | boolean)[]) => any;
|
|
66
70
|
}, string, {
|
|
71
|
+
value: string | number | boolean;
|
|
67
72
|
disabled: boolean;
|
|
73
|
+
modelValue: boolean | (string | number | boolean)[];
|
|
68
74
|
defaultChecked: boolean;
|
|
69
75
|
indeterminate: boolean;
|
|
70
76
|
uninjectGroupContext: boolean;
|
|
@@ -7,7 +7,7 @@ import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.j
|
|
|
7
7
|
import Input from "../input/index.js";
|
|
8
8
|
import { formatColorState, getColorBackground, getColorObject, normalizeFormat, parseColorState } from "./utils.js";
|
|
9
9
|
import panel_default from "./panel.js";
|
|
10
|
-
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderSlot, toRef, unref, withCtx } from "vue";
|
|
10
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderSlot, toRef, unref, watch, withCtx } from "vue";
|
|
11
11
|
import { createReusableTemplate } from "@vueuse/core";
|
|
12
12
|
//#region components/color-picker/color-picker.vue?vue&type=script&setup=true&lang.ts
|
|
13
13
|
var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ColorPicker" }), {}, {
|
|
@@ -100,7 +100,9 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
100
100
|
return (_configProvider$color = configProvider === null || configProvider === void 0 || (_configProvider$color2 = configProvider.colorPicker) === null || _configProvider$color2 === void 0 ? void 0 : _configProvider$color2.swatchColors) !== null && _configProvider$color !== void 0 ? _configProvider$color : [];
|
|
101
101
|
});
|
|
102
102
|
const colorState = computed(() => parseColorState(mergedValue.value, props.colorModes));
|
|
103
|
+
const inputDraft = ref(null);
|
|
103
104
|
const triggerInputValue = computed(() => {
|
|
105
|
+
if (inputDraft.value !== null) return inputDraft.value;
|
|
104
106
|
if (!mergedValue.value) return "";
|
|
105
107
|
return formatColorState(colorState.value, normalizedFormat.value, mergedEnableAlpha.value);
|
|
106
108
|
});
|
|
@@ -129,6 +131,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
129
131
|
if (!props.disabled) emitChange(value, trigger);
|
|
130
132
|
};
|
|
131
133
|
const handleClear = (event) => {
|
|
134
|
+
inputDraft.value = null;
|
|
132
135
|
syncValue("");
|
|
133
136
|
emit("clear", { e: event });
|
|
134
137
|
emit("change", "", {
|
|
@@ -137,13 +140,17 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
137
140
|
});
|
|
138
141
|
};
|
|
139
142
|
const handleTriggerInputChange = (value) => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
143
|
+
inputDraft.value = null;
|
|
144
|
+
if (!value) return;
|
|
144
145
|
const nextState = parseColorState(value, props.colorModes);
|
|
145
146
|
handleColorChange(formatColorState(nextState, normalizedFormat.value, mergedEnableAlpha.value), "input");
|
|
146
147
|
};
|
|
148
|
+
const handleTriggerInput = (value) => {
|
|
149
|
+
inputDraft.value = value;
|
|
150
|
+
};
|
|
151
|
+
watch(mergedValue, () => {
|
|
152
|
+
inputDraft.value = null;
|
|
153
|
+
});
|
|
147
154
|
const onPopupVisibleChange = (visible) => {
|
|
148
155
|
popupVisible.value = visible;
|
|
149
156
|
emit("popup-visible-change", visible, triggerInputValue.value);
|
|
@@ -228,6 +235,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
228
235
|
"aria-haspopup": "dialog",
|
|
229
236
|
"aria-expanded": popupVisible.value
|
|
230
237
|
},
|
|
238
|
+
onInput: handleTriggerInput,
|
|
231
239
|
onChange: handleTriggerInputChange,
|
|
232
240
|
onClear: handleClear
|
|
233
241
|
}), {
|
|
@@ -28,7 +28,7 @@ var control_bar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
28
28
|
const rgb = computed(() => props.color.rgb);
|
|
29
29
|
const [DefineHandler, ReuseHandler] = createReusableTemplate();
|
|
30
30
|
const { blockRef, handlerRef, onMouseDown } = useControlBlock({
|
|
31
|
-
value: [props.x, 0],
|
|
31
|
+
value: () => [props.x, 0],
|
|
32
32
|
onChange: (pos) => {
|
|
33
33
|
var _props$onChange;
|
|
34
34
|
return (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, pos[0]);
|