@uzum-tech/ui 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5789 -1014
- package/dist/index.prod.js +12 -3
- package/es/_internal/scrollbar/src/Scrollbar.js +19 -38
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/cascader/src/Cascader.d.ts +1 -1
- package/es/chat/index.d.ts +1 -1
- package/es/chat/src/Chat.d.ts +233 -11
- package/es/chat/src/Chat.js +73 -22
- package/es/chat/src/ChatParts/ChatAttachment.js +14 -12
- package/es/chat/src/ChatParts/MainArea.d.ts +1 -0
- package/es/chat/src/ChatParts/MainArea.js +95 -57
- package/es/chat/src/ChatParts/Sidebar.d.ts +920 -0
- package/es/chat/src/ChatParts/Sidebar.js +63 -12
- package/es/chat/src/interface.d.ts +24 -3
- package/es/chat/src/styles/index.cssr.js +13 -2
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/crop/index.d.ts +3 -0
- package/es/crop/index.js +1 -0
- package/es/crop/src/Crop.d.ts +222 -0
- package/es/crop/src/Crop.js +157 -0
- package/es/crop/src/interface.d.ts +6 -0
- package/es/crop/src/interface.js +7 -0
- package/es/crop/src/styles/index.cssr.d.ts +2 -0
- package/es/crop/src/styles/index.cssr.js +333 -0
- package/es/crop/styles/_common.d.ts +4 -0
- package/es/crop/styles/_common.js +3 -0
- package/es/crop/styles/dark.d.ts +3 -0
- package/es/crop/styles/dark.js +9 -0
- package/es/crop/styles/index.d.ts +3 -0
- package/es/crop/styles/index.js +2 -0
- package/es/crop/styles/light.d.ts +14 -0
- package/es/crop/styles/light.js +14 -0
- package/es/date-picker/src/DatePicker.d.ts +1308 -43
- package/es/date-picker/src/DatePicker.js +54 -29
- package/es/date-picker/src/interface.d.ts +1 -0
- package/es/date-picker/src/panel/date.d.ts +141 -0
- package/es/date-picker/src/panel/daterange.d.ts +141 -0
- package/es/date-picker/src/panel/datetime.d.ts +141 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +141 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +283 -1
- package/es/date-picker/src/panel/panelMonthContent.d.ts +141 -0
- package/es/date-picker/src/panel/panelYear.d.ts +283 -1
- package/es/date-picker/src/panel/panelYearContent.d.ts +141 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +141 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +141 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +141 -0
- package/es/date-picker/styles/dark.js +3 -1
- package/es/date-picker/styles/light.d.ts +123 -0
- package/es/date-picker/styles/light.js +3 -1
- package/es/descriptions/src/Descriptions.d.ts +30 -0
- package/es/descriptions/src/Descriptions.js +18 -10
- package/es/dynamic-tags/src/DynamicTags.d.ts +30 -0
- package/es/dynamic-tags/styles/light.d.ts +3 -0
- package/es/infinite-scroll/src/InfiniteScroll.js +3 -6
- package/es/input/src/Input.d.ts +1 -1
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +1 -1
- package/es/locales/common/arDZ.js +2 -0
- package/es/locales/common/deDE.js +2 -0
- package/es/locales/common/enGB.js +2 -0
- package/es/locales/common/enUS.d.ts +2 -0
- package/es/locales/common/enUS.js +2 -0
- package/es/locales/common/eo.js +2 -0
- package/es/locales/common/esAR.js +2 -0
- package/es/locales/common/faIR.js +2 -0
- package/es/locales/common/frFR.js +2 -0
- package/es/locales/common/idID.js +2 -0
- package/es/locales/common/itIT.js +2 -0
- package/es/locales/common/jaJP.js +2 -0
- package/es/locales/common/koKR.js +2 -0
- package/es/locales/common/nbNO.js +2 -0
- package/es/locales/common/nlNL.js +2 -0
- package/es/locales/common/plPL.js +2 -0
- package/es/locales/common/ptBR.js +2 -0
- package/es/locales/common/ruRU.js +2 -0
- package/es/locales/common/skSK.js +2 -0
- package/es/locales/common/svSE.js +2 -0
- package/es/locales/common/thTH.js +2 -0
- package/es/locales/common/trTR.js +2 -0
- package/es/locales/common/ukUA.js +2 -0
- package/es/locales/common/viVN.js +2 -0
- package/es/locales/common/zhCN.js +2 -0
- package/es/locales/common/zhTW.js +2 -0
- package/es/modal-fullscreen/index.d.ts +2 -0
- package/es/modal-fullscreen/index.js +1 -0
- package/es/modal-fullscreen/src/ModalFull.d.ts +953 -0
- package/es/modal-fullscreen/src/ModalFull.js +250 -0
- package/es/modal-fullscreen/src/interface.d.ts +0 -0
- package/es/modal-fullscreen/src/interface.js +1 -0
- package/es/modal-fullscreen/src/styles/index.cssr.d.ts +2 -0
- package/es/modal-fullscreen/src/styles/index.cssr.js +85 -0
- package/es/modal-fullscreen/styles/_common.d.ts +12 -0
- package/es/modal-fullscreen/styles/_common.js +11 -0
- package/es/modal-fullscreen/styles/dark.d.ts +3 -0
- package/es/modal-fullscreen/styles/dark.js +14 -0
- package/es/modal-fullscreen/styles/index.d.ts +3 -0
- package/es/modal-fullscreen/styles/index.js +2 -0
- package/es/modal-fullscreen/styles/light.d.ts +100 -0
- package/es/modal-fullscreen/styles/light.js +19 -0
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/select/src/Select.d.ts +1 -1
- package/es/slider/src/Slider.d.ts +1 -1
- package/es/switch/src/Switch.d.ts +1 -1
- package/es/tag/index.d.ts +2 -0
- package/es/tag/index.js +1 -0
- package/es/tag/src/Tag.d.ts +40 -0
- package/es/tag/src/Tag.js +3 -0
- package/es/tag/src/TagGroup.d.ts +644 -0
- package/es/tag/src/TagGroup.js +109 -0
- package/es/tag/src/styles/index.cssr.d.ts +1 -0
- package/es/tag/src/styles/index.cssr.js +8 -1
- package/es/tag/styles/light.d.ts +3 -0
- package/es/tag/styles/light.js +5 -0
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/time-picker/src/TimePicker.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +1 -1
- package/es/virtual-list/index.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +19 -38
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/cascader/src/Cascader.d.ts +1 -1
- package/lib/chat/index.d.ts +1 -1
- package/lib/chat/src/Chat.d.ts +233 -11
- package/lib/chat/src/Chat.js +73 -22
- package/lib/chat/src/ChatParts/ChatAttachment.js +14 -12
- package/lib/chat/src/ChatParts/MainArea.d.ts +1 -0
- package/lib/chat/src/ChatParts/MainArea.js +94 -56
- package/lib/chat/src/ChatParts/Sidebar.d.ts +920 -0
- package/lib/chat/src/ChatParts/Sidebar.js +62 -11
- package/lib/chat/src/interface.d.ts +24 -3
- package/lib/chat/src/styles/index.cssr.js +13 -2
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/crop/index.d.ts +3 -0
- package/lib/crop/index.js +9 -0
- package/lib/crop/src/Crop.d.ts +222 -0
- package/lib/crop/src/Crop.js +163 -0
- package/lib/crop/src/interface.d.ts +6 -0
- package/lib/crop/src/interface.js +10 -0
- package/lib/crop/src/styles/index.cssr.d.ts +2 -0
- package/lib/crop/src/styles/index.cssr.js +338 -0
- package/lib/crop/styles/_common.d.ts +4 -0
- package/lib/crop/styles/_common.js +5 -0
- package/lib/crop/styles/dark.d.ts +3 -0
- package/lib/crop/styles/dark.js +11 -0
- package/lib/crop/styles/index.d.ts +3 -0
- package/lib/crop/styles/index.js +10 -0
- package/lib/crop/styles/light.d.ts +14 -0
- package/lib/crop/styles/light.js +21 -0
- package/lib/date-picker/src/DatePicker.d.ts +1308 -43
- package/lib/date-picker/src/DatePicker.js +53 -28
- package/lib/date-picker/src/interface.d.ts +1 -0
- package/lib/date-picker/src/panel/date.d.ts +141 -0
- package/lib/date-picker/src/panel/daterange.d.ts +141 -0
- package/lib/date-picker/src/panel/datetime.d.ts +141 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +141 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +283 -1
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +141 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +283 -1
- package/lib/date-picker/src/panel/panelYearContent.d.ts +141 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +141 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +141 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +141 -0
- package/lib/date-picker/styles/dark.js +3 -1
- package/lib/date-picker/styles/light.d.ts +123 -0
- package/lib/date-picker/styles/light.js +3 -1
- package/lib/descriptions/src/Descriptions.d.ts +30 -0
- package/lib/descriptions/src/Descriptions.js +18 -10
- package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -0
- package/lib/dynamic-tags/styles/light.d.ts +3 -0
- package/lib/infinite-scroll/src/InfiniteScroll.js +3 -6
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +1 -1
- package/lib/locales/common/arDZ.js +2 -0
- package/lib/locales/common/deDE.js +2 -0
- package/lib/locales/common/enGB.js +2 -0
- package/lib/locales/common/enUS.d.ts +2 -0
- package/lib/locales/common/enUS.js +2 -0
- package/lib/locales/common/eo.js +2 -0
- package/lib/locales/common/esAR.js +2 -0
- package/lib/locales/common/faIR.js +2 -0
- package/lib/locales/common/frFR.js +2 -0
- package/lib/locales/common/idID.js +2 -0
- package/lib/locales/common/itIT.js +2 -0
- package/lib/locales/common/jaJP.js +2 -0
- package/lib/locales/common/koKR.js +2 -0
- package/lib/locales/common/nbNO.js +2 -0
- package/lib/locales/common/nlNL.js +2 -0
- package/lib/locales/common/plPL.js +2 -0
- package/lib/locales/common/ptBR.js +2 -0
- package/lib/locales/common/ruRU.js +2 -0
- package/lib/locales/common/skSK.js +2 -0
- package/lib/locales/common/svSE.js +2 -0
- package/lib/locales/common/thTH.js +2 -0
- package/lib/locales/common/trTR.js +2 -0
- package/lib/locales/common/ukUA.js +2 -0
- package/lib/locales/common/viVN.js +2 -0
- package/lib/locales/common/zhCN.js +2 -0
- package/lib/locales/common/zhTW.js +2 -0
- package/lib/modal-fullscreen/index.d.ts +2 -0
- package/lib/modal-fullscreen/index.js +9 -0
- package/lib/modal-fullscreen/src/ModalFull.d.ts +953 -0
- package/lib/modal-fullscreen/src/ModalFull.js +256 -0
- package/lib/modal-fullscreen/src/interface.d.ts +0 -0
- package/lib/modal-fullscreen/src/interface.js +1 -0
- package/lib/modal-fullscreen/src/styles/index.cssr.d.ts +2 -0
- package/lib/modal-fullscreen/src/styles/index.cssr.js +90 -0
- package/lib/modal-fullscreen/styles/_common.d.ts +12 -0
- package/lib/modal-fullscreen/styles/_common.js +13 -0
- package/lib/modal-fullscreen/styles/dark.d.ts +3 -0
- package/lib/modal-fullscreen/styles/dark.js +16 -0
- package/lib/modal-fullscreen/styles/index.d.ts +3 -0
- package/lib/modal-fullscreen/styles/index.js +10 -0
- package/lib/modal-fullscreen/styles/light.d.ts +100 -0
- package/lib/modal-fullscreen/styles/light.js +26 -0
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/slider/src/Slider.d.ts +1 -1
- package/lib/switch/src/Switch.d.ts +1 -1
- package/lib/tag/index.d.ts +2 -0
- package/lib/tag/index.js +3 -1
- package/lib/tag/src/Tag.d.ts +40 -0
- package/lib/tag/src/Tag.js +3 -0
- package/lib/tag/src/TagGroup.d.ts +644 -0
- package/lib/tag/src/TagGroup.js +112 -0
- package/lib/tag/src/styles/index.cssr.d.ts +1 -0
- package/lib/tag/src/styles/index.cssr.js +9 -1
- package/lib/tag/styles/light.d.ts +3 -0
- package/lib/tag/styles/light.js +5 -0
- package/lib/themes/dark.js +5 -1
- package/lib/themes/light.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +1 -1
- package/lib/virtual-list/index.js +2 -2
- package/package.json +4 -3
- package/volar.d.ts +4 -0
- package/web-types.json +472 -4
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { zindexable } from 'vdirs';
|
|
2
|
+
import { h, ref, vShow, toRef, watch, computed, nextTick, Transition, withDirectives, defineComponent } from 'vue';
|
|
3
|
+
import { VFocusTrap, VLazyTeleport } from 'vueuc';
|
|
4
|
+
import { useClicked, useClickPosition, useIsMounted } from 'vooks';
|
|
5
|
+
import { call, eventEffectNotPerformed, resolveWrappedSlot, useIsComposing } from '../../_utils';
|
|
6
|
+
import { useConfig, useTheme, useThemeClass } from '../../_mixins';
|
|
7
|
+
import { modalFullscreenLight } from '../styles';
|
|
8
|
+
import style from './styles/index.cssr';
|
|
9
|
+
import { UBaseClose, UScrollbar } from '../../_internal';
|
|
10
|
+
import { UFlex } from '../../flex';
|
|
11
|
+
import { UText } from '../../typography';
|
|
12
|
+
export const modalFullscreenProps = Object.assign(Object.assign({}, useTheme.props), { to: [String, Object], show: Boolean, zIndex: Number, title: String, subtitle: String, backgroundImage: String, fixed: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
}, displayDirective: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'if'
|
|
18
|
+
}, transformOrigin: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'mouse'
|
|
21
|
+
}, autoFocus: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
}, trapFocus: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
}, closeOnEsc: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
}, blockScroll: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true
|
|
33
|
+
},
|
|
34
|
+
// events
|
|
35
|
+
onEsc: Function, onClose: Function, onAfterEnter: Function, onBeforeLeave: Function, onAfterLeave: Function, onUpdateShow: [Function, Array], 'onUpdate:show': [Function, Array] });
|
|
36
|
+
export default defineComponent({
|
|
37
|
+
name: 'ModalFullscreen',
|
|
38
|
+
inheritAttrs: false,
|
|
39
|
+
props: modalFullscreenProps,
|
|
40
|
+
setup(props) {
|
|
41
|
+
const isDisplayed = ref(props.show);
|
|
42
|
+
const containerRef = ref(null);
|
|
43
|
+
const scrollbarRef = ref(null);
|
|
44
|
+
const isClicked = useClicked(64);
|
|
45
|
+
const clickPosition = useClickPosition();
|
|
46
|
+
const isComposing = useIsComposing();
|
|
47
|
+
const isMounted = useIsMounted();
|
|
48
|
+
const transformOriginXRef = ref(null);
|
|
49
|
+
const transformOriginYRef = ref(null);
|
|
50
|
+
const { mergedClsPrefixRef, namespaceRef, inlineThemeDisabled } = useConfig(props);
|
|
51
|
+
const themeRef = useTheme('ModalFullscreen', '-modal-fullscreen', style, modalFullscreenLight, props, mergedClsPrefixRef);
|
|
52
|
+
const updateShow = (show) => {
|
|
53
|
+
const { onUpdateShow, 'onUpdate:show': _onUpdateShow } = props;
|
|
54
|
+
if (onUpdateShow)
|
|
55
|
+
call(onUpdateShow, show);
|
|
56
|
+
if (_onUpdateShow)
|
|
57
|
+
call(_onUpdateShow, show);
|
|
58
|
+
};
|
|
59
|
+
const handleCloseClick = () => {
|
|
60
|
+
const { onClose } = props;
|
|
61
|
+
if (onClose) {
|
|
62
|
+
void Promise.resolve(onClose()).then((value) => {
|
|
63
|
+
if (value === false)
|
|
64
|
+
return;
|
|
65
|
+
updateShow(false);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
updateShow(false);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const handleBeforeLeave = (element) => {
|
|
73
|
+
element.style.transformOrigin = styleTransformOrigin();
|
|
74
|
+
const { onBeforeLeave } = props;
|
|
75
|
+
if (onBeforeLeave)
|
|
76
|
+
call(onBeforeLeave);
|
|
77
|
+
};
|
|
78
|
+
const handleAfterLeave = () => {
|
|
79
|
+
isDisplayed.value = false;
|
|
80
|
+
transformOriginXRef.value = null;
|
|
81
|
+
transformOriginYRef.value = null;
|
|
82
|
+
const { onAfterLeave } = props;
|
|
83
|
+
if (onAfterLeave)
|
|
84
|
+
call(onAfterLeave);
|
|
85
|
+
};
|
|
86
|
+
const handleEsc = (event) => {
|
|
87
|
+
var _a;
|
|
88
|
+
(_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
89
|
+
if (props.show && props.closeOnEsc && eventEffectNotPerformed(event)) {
|
|
90
|
+
!isComposing.value && updateShow(false);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const getMousePosition = () => {
|
|
94
|
+
if (isClicked.value) {
|
|
95
|
+
return clickPosition.value;
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
};
|
|
99
|
+
const styleTransformOrigin = () => {
|
|
100
|
+
if (props.transformOrigin === 'center') {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
103
|
+
const { value: transformOriginX } = transformOriginXRef;
|
|
104
|
+
const { value: transformOriginY } = transformOriginYRef;
|
|
105
|
+
if (transformOriginX === null || transformOriginY === null) {
|
|
106
|
+
return '';
|
|
107
|
+
}
|
|
108
|
+
else if (scrollbarRef.value) {
|
|
109
|
+
const scrollTop = scrollbarRef.value.containerScrollTop;
|
|
110
|
+
return `${transformOriginX}px ${transformOriginY + scrollTop}px`;
|
|
111
|
+
}
|
|
112
|
+
return '';
|
|
113
|
+
};
|
|
114
|
+
const syncTransformOrigin = (element) => {
|
|
115
|
+
if (props.transformOrigin === 'center') {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const mousePosition = getMousePosition();
|
|
119
|
+
if (!mousePosition) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!scrollbarRef.value)
|
|
123
|
+
return;
|
|
124
|
+
const scrollTop = scrollbarRef.value.containerScrollTop;
|
|
125
|
+
const { offsetLeft, offsetTop } = element;
|
|
126
|
+
if (mousePosition) {
|
|
127
|
+
const top = mousePosition.y;
|
|
128
|
+
const left = mousePosition.x;
|
|
129
|
+
transformOriginXRef.value = -(offsetLeft - left);
|
|
130
|
+
transformOriginYRef.value = -(offsetTop - top - scrollTop);
|
|
131
|
+
}
|
|
132
|
+
element.style.transformOrigin = styleTransformOrigin();
|
|
133
|
+
};
|
|
134
|
+
const handleEnter = (element) => {
|
|
135
|
+
void nextTick(() => {
|
|
136
|
+
syncTransformOrigin(element);
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
const cssVarsRef = computed(() => {
|
|
140
|
+
const { common: { cubicBezierEaseOut }, self: { modalBg, headerBg, bodyBg, footerBg, textColor, closeMargin, closeSize, closeIconSize, closeBorderRadius, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed, subtitleColor, headerPadding, bodyPadding, footerPadding } } = themeRef.value;
|
|
141
|
+
return {
|
|
142
|
+
'--u-bezier-ease-out': cubicBezierEaseOut,
|
|
143
|
+
'--u-text-color': textColor,
|
|
144
|
+
'--u-close-margin': closeMargin,
|
|
145
|
+
'--u-close-size': closeSize,
|
|
146
|
+
'--u-close-icon-size': closeIconSize,
|
|
147
|
+
'--u-close-border-radius': closeBorderRadius,
|
|
148
|
+
'--u-close-color-hover': closeColorHover,
|
|
149
|
+
'--u-close-color-pressed': closeColorPressed,
|
|
150
|
+
'--u-close-icon-color': closeIconColor,
|
|
151
|
+
'--u-close-icon-color-hover': closeIconColorHover,
|
|
152
|
+
'--u-close-icon-color-pressed': closeIconColorPressed,
|
|
153
|
+
'--u-header-padding': headerPadding,
|
|
154
|
+
'--u-subtitle-color': subtitleColor,
|
|
155
|
+
'--u-body-padding': bodyPadding,
|
|
156
|
+
'--u-footer-padding': footerPadding,
|
|
157
|
+
'--u-modal-bg': props.backgroundImage
|
|
158
|
+
? `url(${props.backgroundImage})`
|
|
159
|
+
: modalBg,
|
|
160
|
+
'--u-header-bg': headerBg,
|
|
161
|
+
'--u-body-bg': bodyBg,
|
|
162
|
+
'--u-footer-bg': footerBg
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
const themeClassHandle = inlineThemeDisabled
|
|
166
|
+
? useThemeClass('theme-class', undefined, cssVarsRef, props)
|
|
167
|
+
: undefined;
|
|
168
|
+
watch(toRef(props, 'show'), (value) => {
|
|
169
|
+
if (value)
|
|
170
|
+
isDisplayed.value = true;
|
|
171
|
+
});
|
|
172
|
+
return {
|
|
173
|
+
containerRef,
|
|
174
|
+
scrollbarRef,
|
|
175
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
176
|
+
namespace: namespaceRef,
|
|
177
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
178
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
179
|
+
themeRef,
|
|
180
|
+
isMounted,
|
|
181
|
+
isDisplayed,
|
|
182
|
+
handleEnter,
|
|
183
|
+
handleBeforeLeave,
|
|
184
|
+
handleAfterLeave,
|
|
185
|
+
handleEsc,
|
|
186
|
+
handleCloseClick,
|
|
187
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
188
|
+
};
|
|
189
|
+
},
|
|
190
|
+
render() {
|
|
191
|
+
const { mergedClsPrefix, isDisplayed, handleEnter, handleBeforeLeave, handleAfterLeave, handleEsc, handleCloseClick } = this;
|
|
192
|
+
const headerLeftSlot = resolveWrappedSlot(this.$slots.headerLeft, (children) => children);
|
|
193
|
+
const bodySlot = resolveWrappedSlot(this.$slots.body || this.$slots.default, (children) => children);
|
|
194
|
+
const footerSlot = resolveWrappedSlot(this.$slots.footer, (children) => children);
|
|
195
|
+
return (h(VLazyTeleport, { to: this.to, show: this.show }, {
|
|
196
|
+
default: () => {
|
|
197
|
+
var _a;
|
|
198
|
+
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
199
|
+
return withDirectives(h("div", { role: "none", ref: "containerRef", class: [
|
|
200
|
+
`${mergedClsPrefix}-modal-container`,
|
|
201
|
+
this.themeClass,
|
|
202
|
+
this.namespace
|
|
203
|
+
], style: this.cssVars }, this.displayDirective === 'show' || isDisplayed || this.show
|
|
204
|
+
? withDirectives(h("div", { role: "none", class: `${mergedClsPrefix}-modal-body-wrapper` },
|
|
205
|
+
h(UScrollbar, { ref: "scrollbarRef", theme: this.themeRef.peers.Scrollbar, themeOverrides: this.themeRef.peerOverrides.Scrollbar, contentClass: `${mergedClsPrefix}-modal-scroll-content` }, {
|
|
206
|
+
default: () => (h(VFocusTrap, { disabled: !this.trapFocus, active: this.show, onEsc: handleEsc, autoFocus: this.autoFocus }, {
|
|
207
|
+
default: () => (h(Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted, onEnter: handleEnter, onAfterEnter: this.onAfterEnter, onAfterLeave: handleAfterLeave, onBeforeLeave: handleBeforeLeave }, {
|
|
208
|
+
default: () => {
|
|
209
|
+
const dirs = [
|
|
210
|
+
[vShow, this.show]
|
|
211
|
+
];
|
|
212
|
+
return withDirectives(h("div", { class: `${mergedClsPrefix}-modal` },
|
|
213
|
+
h(UFlex, { vertical: true, size: [0, 0], class: [
|
|
214
|
+
`${mergedClsPrefix}-modal-content`,
|
|
215
|
+
this.fixed &&
|
|
216
|
+
`${mergedClsPrefix}-modal-content--fixed`
|
|
217
|
+
] },
|
|
218
|
+
h(UFlex, { align: "center", size: [0, 0], wrap: false, class: `${mergedClsPrefix}-modal-header` },
|
|
219
|
+
h("div", { class: `${mergedClsPrefix}-modal-header__left` }, headerLeftSlot),
|
|
220
|
+
h("div", { class: `${mergedClsPrefix}-modal-header__center` },
|
|
221
|
+
this.title ? (h(UText, { variant: "body-l-semi-bold", class: `${mergedClsPrefix}-modal-header__title` }, this.title)) : null,
|
|
222
|
+
this.subtitle ? (h(UText, { variant: "body-m-medium", class: `${mergedClsPrefix}-modal-header__subtitle` }, this.subtitle)) : null),
|
|
223
|
+
h("div", { class: `${mergedClsPrefix}-modal-header__right` },
|
|
224
|
+
h(UBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-modal__close`, onClick: handleCloseClick }))),
|
|
225
|
+
h("div", { class: `${mergedClsPrefix}-modal-body` }, bodySlot),
|
|
226
|
+
h("div", { class: `${mergedClsPrefix}-modal-footer` }, footerSlot))), dirs);
|
|
227
|
+
}
|
|
228
|
+
}))
|
|
229
|
+
}))
|
|
230
|
+
})), [
|
|
231
|
+
[
|
|
232
|
+
vShow,
|
|
233
|
+
this.displayDirective === 'if' ||
|
|
234
|
+
isDisplayed ||
|
|
235
|
+
this.show
|
|
236
|
+
]
|
|
237
|
+
])
|
|
238
|
+
: null), [
|
|
239
|
+
[
|
|
240
|
+
zindexable,
|
|
241
|
+
{
|
|
242
|
+
zIndex: this.zIndex,
|
|
243
|
+
enabled: this.show
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
]);
|
|
247
|
+
}
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { cB, c, cE, cM } from '../../../_utils/cssr';
|
|
2
|
+
import { fadeInScaleUpTransition } from '../../../_styles/transitions/fade-in-scale-up.cssr';
|
|
3
|
+
// vars:
|
|
4
|
+
// --u-bezier-ease-out
|
|
5
|
+
// --u-text-color
|
|
6
|
+
// --u-close-border-radius
|
|
7
|
+
// --u-close-margin
|
|
8
|
+
// --u-close-size
|
|
9
|
+
// --u-close-color-hover
|
|
10
|
+
// --u-close-color-pressed
|
|
11
|
+
// --u-close-icon-color
|
|
12
|
+
// --u-close-icon-color-hover
|
|
13
|
+
// --u-close-icon-color-pressed
|
|
14
|
+
// --u-header-padding
|
|
15
|
+
// --u-subtitle-color
|
|
16
|
+
// --u-body-padding
|
|
17
|
+
// --u-footer-padding
|
|
18
|
+
// --u-modal-bg
|
|
19
|
+
// --u-header-bg
|
|
20
|
+
// --u-body-bg
|
|
21
|
+
// --u-footer-bg
|
|
22
|
+
export default c([cB('modal-container', `
|
|
23
|
+
position: fixed;
|
|
24
|
+
left: 0;
|
|
25
|
+
top: 0;
|
|
26
|
+
height: 0;
|
|
27
|
+
width: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
`), cB('modal-body-wrapper', `
|
|
30
|
+
position: fixed;
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
top: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
overflow: visible;
|
|
36
|
+
`, [cB('modal-scroll-content', `
|
|
37
|
+
min-height: 100%;
|
|
38
|
+
position: relative;
|
|
39
|
+
`)]), cB('modal', `
|
|
40
|
+
position: relative;
|
|
41
|
+
color: var(--u-text-color);
|
|
42
|
+
margin: auto;
|
|
43
|
+
width: 100vw;
|
|
44
|
+
height: 100vh;
|
|
45
|
+
background: var(--u-modal-bg);
|
|
46
|
+
background-repeat: no-repeat;
|
|
47
|
+
background-size: cover;
|
|
48
|
+
`, [fadeInScaleUpTransition({
|
|
49
|
+
duration: '.25s',
|
|
50
|
+
enterScale: '.5'
|
|
51
|
+
}), cE('close', `
|
|
52
|
+
margin: var(--u-close-margin);
|
|
53
|
+
transition:
|
|
54
|
+
background-color .3s var(--u-bezier),
|
|
55
|
+
color .3s var(--u-bezier);
|
|
56
|
+
z-index: 1;
|
|
57
|
+
`)]), cB('modal-content', `
|
|
58
|
+
height: 100%;
|
|
59
|
+
`, [cM('fixed', '', [cB('modal-header', `
|
|
60
|
+
flex: 0 0 auto;
|
|
61
|
+
`), cB('modal-body', `
|
|
62
|
+
flex: 1 1 100%;
|
|
63
|
+
`), cB('modal-footer', `
|
|
64
|
+
flex: 0 0 auto;
|
|
65
|
+
`)])]), cB('modal-body', `
|
|
66
|
+
padding: var(--u-body-padding);
|
|
67
|
+
background: var(--u-body-bg);
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
`), cB('modal-footer', `
|
|
70
|
+
padding: var(--u-footer-padding);
|
|
71
|
+
background: var(--u-footer-bg);
|
|
72
|
+
`), cB('modal-header', `
|
|
73
|
+
padding: var(--u-header-padding);
|
|
74
|
+
background: var(--u-header-bg);
|
|
75
|
+
`, [cE('left', `
|
|
76
|
+
flex: 0 1 50%;
|
|
77
|
+
`), cE('center', `
|
|
78
|
+
flex: 0 0 auto;
|
|
79
|
+
text-align: center;
|
|
80
|
+
`), cE('right', `
|
|
81
|
+
flex: 0 1 50%;
|
|
82
|
+
`), cE('title', `
|
|
83
|
+
`), cE('subtitle', `
|
|
84
|
+
color: var(--u-subtitle-color)
|
|
85
|
+
`)])]);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
headerPadding: string;
|
|
3
|
+
bodyPadding: string;
|
|
4
|
+
footerPadding: string;
|
|
5
|
+
headerBg: string;
|
|
6
|
+
bodyBg: string;
|
|
7
|
+
footerBg: string;
|
|
8
|
+
closeMargin: string;
|
|
9
|
+
closeMarginIconTop: string;
|
|
10
|
+
closeBorderRadius: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
headerPadding: '12px 32px',
|
|
3
|
+
bodyPadding: '24px 40px',
|
|
4
|
+
footerPadding: '12px 40px',
|
|
5
|
+
headerBg: 'transparent',
|
|
6
|
+
bodyBg: 'transparent',
|
|
7
|
+
footerBg: 'transparent',
|
|
8
|
+
closeMargin: '0 0 0 auto',
|
|
9
|
+
closeMarginIconTop: '16px 16px 0',
|
|
10
|
+
closeBorderRadius: '100px'
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { scrollbarDark } from '../../_internal/scrollbar/styles';
|
|
2
|
+
import { cardDark } from '../../card/styles';
|
|
3
|
+
import { commonDark } from '../../_styles/common';
|
|
4
|
+
import { self } from './light';
|
|
5
|
+
const modalFullscreenDark = {
|
|
6
|
+
name: 'ModalFullscreen',
|
|
7
|
+
common: commonDark,
|
|
8
|
+
peers: {
|
|
9
|
+
Scrollbar: scrollbarDark,
|
|
10
|
+
Card: cardDark
|
|
11
|
+
},
|
|
12
|
+
self
|
|
13
|
+
};
|
|
14
|
+
export default modalFullscreenDark;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { ThemeCommonVars } from '../../_styles/common';
|
|
2
|
+
export declare const self: (vars: ThemeCommonVars) => {
|
|
3
|
+
modalBg: string;
|
|
4
|
+
textColor: string;
|
|
5
|
+
closeColorHover: string;
|
|
6
|
+
closeColorPressed: string;
|
|
7
|
+
closeIconColor: string;
|
|
8
|
+
closeIconColorHover: string;
|
|
9
|
+
closeIconColorPressed: string;
|
|
10
|
+
closeIconSize: string;
|
|
11
|
+
closeSize: string;
|
|
12
|
+
subtitleColor: string;
|
|
13
|
+
headerPadding: string;
|
|
14
|
+
bodyPadding: string;
|
|
15
|
+
footerPadding: string;
|
|
16
|
+
headerBg: string;
|
|
17
|
+
bodyBg: string;
|
|
18
|
+
footerBg: string;
|
|
19
|
+
closeMargin: string;
|
|
20
|
+
closeMarginIconTop: string;
|
|
21
|
+
closeBorderRadius: string;
|
|
22
|
+
};
|
|
23
|
+
export type ModalFullscreenThemeVars = ReturnType<typeof self>;
|
|
24
|
+
declare const modalFullscreenLight: import("../../_mixins").Theme<"ModalFullscreen", {
|
|
25
|
+
modalBg: string;
|
|
26
|
+
textColor: string;
|
|
27
|
+
closeColorHover: string;
|
|
28
|
+
closeColorPressed: string;
|
|
29
|
+
closeIconColor: string;
|
|
30
|
+
closeIconColorHover: string;
|
|
31
|
+
closeIconColorPressed: string;
|
|
32
|
+
closeIconSize: string;
|
|
33
|
+
closeSize: string;
|
|
34
|
+
subtitleColor: string;
|
|
35
|
+
headerPadding: string;
|
|
36
|
+
bodyPadding: string;
|
|
37
|
+
footerPadding: string;
|
|
38
|
+
headerBg: string;
|
|
39
|
+
bodyBg: string;
|
|
40
|
+
footerBg: string;
|
|
41
|
+
closeMargin: string;
|
|
42
|
+
closeMarginIconTop: string;
|
|
43
|
+
closeBorderRadius: string;
|
|
44
|
+
}, {
|
|
45
|
+
Scrollbar: import("../../_mixins").Theme<"Scrollbar", {
|
|
46
|
+
height: string;
|
|
47
|
+
width: string;
|
|
48
|
+
borderRadius: string;
|
|
49
|
+
color: string;
|
|
50
|
+
colorHover: string;
|
|
51
|
+
railInsetHorizontalBottom: string;
|
|
52
|
+
railInsetHorizontalTop: string;
|
|
53
|
+
railInsetVerticalRight: string;
|
|
54
|
+
railInsetVerticalLeft: string;
|
|
55
|
+
railColor: string;
|
|
56
|
+
}, any>;
|
|
57
|
+
Card: import("../../_mixins").Theme<"Card", {
|
|
58
|
+
titleFontSizeSmall: string;
|
|
59
|
+
titleFontSizeMedium: string;
|
|
60
|
+
titleFontSizeLarge: string;
|
|
61
|
+
titleFontSizeHuge: string;
|
|
62
|
+
titleLineHeightSmall: string;
|
|
63
|
+
titleLineHeightMedium: string;
|
|
64
|
+
titleLineHeightLarge: string;
|
|
65
|
+
titleLineHeightHuge: string;
|
|
66
|
+
titleFontWeight: string;
|
|
67
|
+
fontSizeSmall: string;
|
|
68
|
+
fontSizeMedium: string;
|
|
69
|
+
fontSizeLarge: string;
|
|
70
|
+
fontSizeHuge: string;
|
|
71
|
+
lineHeightSmall: string;
|
|
72
|
+
lineHeightMedium: string;
|
|
73
|
+
lineHeightLarge: string;
|
|
74
|
+
lineHeightHuge: string;
|
|
75
|
+
fontWeight: string;
|
|
76
|
+
closeIconSize: string;
|
|
77
|
+
closeSize: string;
|
|
78
|
+
color: string;
|
|
79
|
+
colorTarget: string;
|
|
80
|
+
colorEmbedded: string;
|
|
81
|
+
textColor: string;
|
|
82
|
+
titleTextColor: string;
|
|
83
|
+
borderColor: string;
|
|
84
|
+
actionColor: string;
|
|
85
|
+
closeColorHover: string;
|
|
86
|
+
closeColorPressed: string;
|
|
87
|
+
closeIconColor: string;
|
|
88
|
+
closeIconColorHover: string;
|
|
89
|
+
closeIconColorPressed: string;
|
|
90
|
+
closeBorderRadius: string;
|
|
91
|
+
boxShadow: string;
|
|
92
|
+
borderRadius: string;
|
|
93
|
+
paddingSmall: string;
|
|
94
|
+
paddingMedium: string;
|
|
95
|
+
paddingLarge: string;
|
|
96
|
+
paddingHuge: string;
|
|
97
|
+
}, any>;
|
|
98
|
+
}>;
|
|
99
|
+
export default modalFullscreenLight;
|
|
100
|
+
export type ModalFullscreenTheme = typeof modalFullscreenLight;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { scrollbarLight } from '../../_internal/scrollbar/styles';
|
|
2
|
+
import { cardLight } from '../../card/styles';
|
|
3
|
+
import { commonLight } from '../../_styles/common';
|
|
4
|
+
import { createTheme } from '../../_mixins';
|
|
5
|
+
import commonVars from './_common';
|
|
6
|
+
export const self = (vars) => {
|
|
7
|
+
const { containerPrimary, textPrimary, transparencySecondary, elementsQuinary, elementsDarkQuinary, elementsSenary, iconMedium, closeMedium, textSecondary } = vars;
|
|
8
|
+
return Object.assign(Object.assign({}, commonVars), { modalBg: containerPrimary, textColor: textPrimary, closeColorHover: transparencySecondary, closeColorPressed: transparencySecondary, closeIconColor: elementsQuinary, closeIconColorHover: elementsDarkQuinary, closeIconColorPressed: elementsSenary, closeIconSize: iconMedium, closeSize: closeMedium, subtitleColor: textSecondary });
|
|
9
|
+
};
|
|
10
|
+
const modalFullscreenLight = createTheme({
|
|
11
|
+
name: 'ModalFullscreen',
|
|
12
|
+
common: commonLight,
|
|
13
|
+
peers: {
|
|
14
|
+
Scrollbar: scrollbarLight,
|
|
15
|
+
Card: cardLight
|
|
16
|
+
},
|
|
17
|
+
self
|
|
18
|
+
});
|
|
19
|
+
export default modalFullscreenLight;
|
package/es/rate/src/Rate.d.ts
CHANGED
|
@@ -147,8 +147,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
147
147
|
}, any>>>;
|
|
148
148
|
}>>, {
|
|
149
149
|
readonly size: number | "small" | "medium" | "large";
|
|
150
|
-
readonly clearable: boolean;
|
|
151
150
|
readonly defaultValue: number | null;
|
|
151
|
+
readonly clearable: boolean;
|
|
152
152
|
readonly readonly: boolean;
|
|
153
153
|
readonly count: number;
|
|
154
154
|
readonly allowHalf: boolean;
|
|
@@ -2448,6 +2448,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2448
2448
|
readonly showArrow: boolean;
|
|
2449
2449
|
readonly displayDirective: "show" | "if";
|
|
2450
2450
|
readonly placement: FollowerPlacement;
|
|
2451
|
+
readonly defaultValue: Value | null;
|
|
2451
2452
|
readonly secondary: boolean;
|
|
2452
2453
|
readonly filterable: boolean;
|
|
2453
2454
|
readonly clearable: boolean;
|
|
@@ -2455,7 +2456,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2455
2456
|
readonly ignoreComposition: boolean;
|
|
2456
2457
|
readonly counter: boolean;
|
|
2457
2458
|
readonly keyboard: boolean;
|
|
2458
|
-
readonly defaultValue: Value | null;
|
|
2459
2459
|
readonly options: SelectMixedOption[];
|
|
2460
2460
|
readonly clearFilterAfterSelect: boolean;
|
|
2461
2461
|
readonly remote: boolean;
|
|
@@ -501,9 +501,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
501
501
|
readonly to: string | boolean | HTMLElement;
|
|
502
502
|
readonly range: boolean;
|
|
503
503
|
readonly tooltip: boolean;
|
|
504
|
+
readonly defaultValue: number | number[];
|
|
504
505
|
readonly max: number;
|
|
505
506
|
readonly keyboard: boolean;
|
|
506
|
-
readonly defaultValue: number | number[];
|
|
507
507
|
readonly min: number;
|
|
508
508
|
readonly showTooltip: boolean | undefined;
|
|
509
509
|
}, {}>;
|
|
@@ -519,9 +519,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
519
519
|
readonly loading: boolean;
|
|
520
520
|
readonly size: "small" | "medium" | "large";
|
|
521
521
|
readonly round: boolean;
|
|
522
|
+
readonly defaultValue: string | number | boolean;
|
|
522
523
|
readonly checkedValue: string | number | boolean;
|
|
523
524
|
readonly uncheckedValue: string | number | boolean;
|
|
524
|
-
readonly defaultValue: string | number | boolean;
|
|
525
525
|
readonly rubberBand: boolean;
|
|
526
526
|
}, {}>;
|
|
527
527
|
export default _default;
|
package/es/tag/index.d.ts
CHANGED
package/es/tag/index.js
CHANGED