@central-design-system/components 3.0.0-alpha.0 → 3.0.0-alpha.2
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/cds.css +1 -1
- package/dist/cds.d.ts +26 -3
- package/dist/cds.es.js +7821 -1449
- package/dist/cds.umd.js +1 -1
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +64 -0
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +54 -0
- package/dist/components/CdsBreadcrumbs/index.d.ts +2 -0
- package/dist/components/CdsButton/CdsButton.vue.d.ts +13 -13
- package/dist/components/CdsButton/index.d.ts +1 -0
- package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +238 -0
- package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +227 -0
- package/dist/components/CdsCheckbox/index.d.ts +2 -0
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +2454 -0
- package/dist/components/CdsCombobox/composable/highlight.d.ts +12 -0
- package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +246 -0
- package/dist/components/CdsDatePicker/composable/calendar.d.ts +315 -0
- package/dist/components/CdsDatePicker/composable/index.d.ts +1 -0
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +4 -4
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +2317 -0
- package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +54 -0
- package/dist/components/CdsForm/CdsForm.vue.d.ts +99 -0
- package/dist/components/CdsGrid/CdsCol.vue.d.ts +1 -1
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +4 -4
- package/dist/components/CdsInput/CdsInput.vue.d.ts +219 -0
- package/dist/components/CdsInput/CdsInputCounter.vue.d.ts +39 -0
- package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +26 -0
- package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +32 -0
- package/dist/components/CdsInput/CdsInputMessages.vue.d.ts +221 -0
- package/dist/components/CdsInput/index.d.ts +5 -0
- package/dist/components/CdsLink/CdsLink.vue.d.ts +1 -1
- package/dist/components/CdsLink/index.d.ts +1 -0
- package/dist/components/CdsList/CdsList.vue.d.ts +20 -24
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
- package/dist/components/CdsList/CdsListItem.vue.d.ts +27 -24
- package/dist/components/CdsList/composable/focus.d.ts +12 -0
- package/dist/components/CdsList/composable/index.d.ts +1 -0
- package/dist/components/CdsList/composable/list.d.ts +1 -1
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +1 -1
- package/dist/components/CdsMenu/CdsMenu.vue.d.ts +681 -0
- package/dist/components/CdsMenu/index.d.ts +1 -0
- package/dist/components/CdsMenu/shared.d.ts +10 -0
- package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +337 -0
- package/dist/components/CdsOverlay/composable/activator.d.ts +81 -0
- package/dist/components/CdsOverlay/composable/index.d.ts +6 -0
- package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +75 -0
- package/dist/components/CdsOverlay/composable/scrim.d.ts +8 -0
- package/dist/components/CdsOverlay/composable/scrollStrategies.d.ts +33 -0
- package/dist/components/CdsOverlay/composable/stack.d.ts +9 -0
- package/dist/components/CdsOverlay/composable/teleport.d.ts +6 -0
- package/dist/components/CdsOverlay/index.d.ts +1 -0
- package/dist/components/CdsOverlay/utils/index.d.ts +2 -0
- package/dist/components/CdsOverlay/utils/point.d.ts +20 -0
- package/dist/components/CdsOverlay/utils/requestNewFrame.d.ts +5 -0
- package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +223 -0
- package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +222 -0
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +722 -0
- package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +56 -0
- package/dist/components/CdsStages/CdsStages.vue.d.ts +102 -0
- package/dist/components/CdsTag/CdsTag.vue.d.ts +2 -4
- package/dist/components/CdsTag/index.d.ts +1 -0
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +723 -0
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +660 -0
- package/dist/components/CdsTextInput/index.d.ts +1 -0
- package/dist/components/index.d.ts +24 -1
- package/dist/composable/color.d.ts +4 -2
- package/dist/composable/datetime.d.ts +76 -0
- package/dist/composable/delay.d.ts +29 -0
- package/dist/composable/dimensions.d.ts +47 -0
- package/dist/composable/direction.d.ts +24 -0
- package/dist/composable/field.d.ts +139 -0
- package/dist/composable/filter.d.ts +52 -0
- package/dist/composable/focus.d.ts +19 -9
- package/dist/composable/form.d.ts +128 -0
- package/dist/composable/hidration.d.ts +2 -0
- package/dist/composable/icon.d.ts +29 -4
- package/dist/composable/index.d.ts +18 -0
- package/dist/composable/input.d.ts +99 -0
- package/dist/composable/items.d.ts +12 -9
- package/dist/composable/lazy.d.ts +21 -0
- package/dist/composable/link.d.ts +1 -2
- package/dist/composable/loading.d.ts +1 -0
- package/dist/composable/menu.d.ts +37 -0
- package/dist/composable/nested/nested.d.ts +2 -2
- package/dist/composable/overlay.d.ts +98 -0
- package/dist/composable/router.d.ts +3 -0
- package/dist/composable/scopeId.d.ts +5 -0
- package/dist/composable/select.d.ts +86 -0
- package/dist/composable/title.d.ts +21 -0
- package/dist/composable/transition.d.ts +22 -0
- package/dist/composable/validation.d.ts +128 -0
- package/dist/directives/click-outside/index.d.ts +14 -0
- package/dist/directives/index.d.ts +1 -2
- package/dist/globals.d.ts +16 -0
- package/dist/locale/index.d.ts +12 -0
- package/dist/locale/ru.d.ts +3 -0
- package/dist/transitions/createTransition.d.ts +31 -2
- package/dist/transitions/index.d.ts +240 -0
- package/dist/utils/anchor.d.ts +23 -0
- package/dist/utils/animation.d.ts +6 -0
- package/dist/utils/box.d.ts +26 -0
- package/dist/utils/cache.d.ts +4 -0
- package/dist/utils/date.d.ts +181 -0
- package/dist/utils/dom.d.ts +6 -0
- package/dist/utils/getScrollParent.d.ts +3 -0
- package/dist/utils/globals.d.ts +4 -0
- package/dist/utils/helpers.d.ts +93 -20
- package/dist/utils/index.d.ts +8 -0
- package/package.json +5 -4
- package/src/scss/mixins/layout/_shadow.scss +4 -0
- package/src/scss/mixins/layout/index.scss +1 -0
- package/src/scss/modules/_transition.scss +133 -3
- package/src/scss/themes/index.ts +1 -1
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export declare const componentName = "CdsOverlay";
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
transition: {
|
|
5
|
+
type: PropType<string | boolean | (import("vue").TransitionProps & {
|
|
6
|
+
component?: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | undefined;
|
|
7
|
+
})>;
|
|
8
|
+
default: string;
|
|
9
|
+
validator: (value: unknown) => boolean;
|
|
10
|
+
};
|
|
11
|
+
eager: {
|
|
12
|
+
type: PropType<boolean>;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
scrollStrategy: {
|
|
16
|
+
type: PropType<"none" | "close" | "block" | "reposition" | ((data: import("./composable").IScrollStrategyData, props: import("./composable").IScrollStrategyProps, scope: import("vue").EffectScope) => void)>;
|
|
17
|
+
default: string;
|
|
18
|
+
validator: (value: any) => boolean;
|
|
19
|
+
};
|
|
20
|
+
locationStrategy: {
|
|
21
|
+
type: PropType<"static" | "connected" | ((data: import("./composable").ILocationStrategyData, props: import("./composable").ILocationStrategyProps, contentStyles: import("vue").Ref<Record<string, string>>) => {
|
|
22
|
+
updateLocation: (event: Event) => void;
|
|
23
|
+
} | undefined)>;
|
|
24
|
+
default: string;
|
|
25
|
+
validator: (value: any) => boolean;
|
|
26
|
+
};
|
|
27
|
+
location: {
|
|
28
|
+
type: PropType<import('../../utils').TAnchor>;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
origin: {
|
|
32
|
+
type: PropType<import('../../utils').TAnchor | "auto" | "overlap">;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
offset: {
|
|
36
|
+
type: PropType<string | number | number[]>;
|
|
37
|
+
default: null;
|
|
38
|
+
};
|
|
39
|
+
height: {
|
|
40
|
+
type: PropType<string | number>;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
maxHeight: {
|
|
44
|
+
type: PropType<string | number>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
maxWidth: {
|
|
48
|
+
type: PropType<string | number>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
minHeight: {
|
|
52
|
+
type: PropType<string | number>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
minWidth: {
|
|
56
|
+
type: PropType<string | number>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
width: {
|
|
60
|
+
type: PropType<string | number>; /**
|
|
61
|
+
* Применяет position: absolute к содержимому оверлея
|
|
62
|
+
*/
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
closeDelay: {
|
|
66
|
+
type: PropType<string | number>;
|
|
67
|
+
default: null;
|
|
68
|
+
};
|
|
69
|
+
openDelay: {
|
|
70
|
+
type: PropType<string | number>;
|
|
71
|
+
default: null;
|
|
72
|
+
};
|
|
73
|
+
activator: {
|
|
74
|
+
type: PropType<string | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | Element>; /**
|
|
75
|
+
* Событие, которое срабатывает при клике вне оверлея.
|
|
76
|
+
*/
|
|
77
|
+
default: null;
|
|
78
|
+
};
|
|
79
|
+
activatorProps: {
|
|
80
|
+
type: PropType<Record<string, any>>;
|
|
81
|
+
default: () => {};
|
|
82
|
+
};
|
|
83
|
+
openOnClick: {
|
|
84
|
+
type: PropType<boolean | undefined>;
|
|
85
|
+
default: undefined;
|
|
86
|
+
};
|
|
87
|
+
openOnHover: {
|
|
88
|
+
type: PropType<boolean>;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
openOnFocus: {
|
|
92
|
+
type: PropType<boolean | undefined>;
|
|
93
|
+
default: undefined;
|
|
94
|
+
};
|
|
95
|
+
closeOnContentClick: {
|
|
96
|
+
type: PropType<boolean>;
|
|
97
|
+
default: boolean;
|
|
98
|
+
};
|
|
99
|
+
attach: {
|
|
100
|
+
type: PropType<string | boolean | Element>;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
contained: {
|
|
104
|
+
type: PropType<boolean>;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
disabled: {
|
|
108
|
+
type: PropType<boolean>;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
persistent: {
|
|
112
|
+
type: PropType<boolean>;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
scrim: {
|
|
116
|
+
type: PropType<string | boolean>;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
modelValue: {
|
|
120
|
+
type: PropType<boolean>;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
closeOnBack: {
|
|
124
|
+
type: PropType<boolean>;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
zIndex: {
|
|
128
|
+
type: PropType<string | number>;
|
|
129
|
+
default: number;
|
|
130
|
+
};
|
|
131
|
+
contentClasses: {
|
|
132
|
+
type: PropType<string | string[] | Record<string, boolean>>;
|
|
133
|
+
default: null;
|
|
134
|
+
};
|
|
135
|
+
contentProps: {
|
|
136
|
+
type: PropType<Record<string, unknown>>;
|
|
137
|
+
default: () => {};
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Применяет position: absolute к содержимому оверлея
|
|
141
|
+
*/
|
|
142
|
+
absolute: {
|
|
143
|
+
type: PropType<boolean>;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
146
|
+
}, {
|
|
147
|
+
activatorEl: import("vue").Ref<HTMLElement | undefined>;
|
|
148
|
+
contentEl: import("vue").Ref<HTMLElement | undefined>;
|
|
149
|
+
globalTop: Readonly<import("vue").Ref<boolean>>;
|
|
150
|
+
localTop: import("vue").ComputedRef<boolean>;
|
|
151
|
+
updateLocation: import("vue").Ref<((event: Event) => void) | undefined>;
|
|
152
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "click:outside" | "afterLeave")[], "update:modelValue" | "click:outside" | "afterLeave", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
153
|
+
transition: {
|
|
154
|
+
type: PropType<string | boolean | (import("vue").TransitionProps & {
|
|
155
|
+
component?: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | undefined;
|
|
156
|
+
})>;
|
|
157
|
+
default: string;
|
|
158
|
+
validator: (value: unknown) => boolean;
|
|
159
|
+
};
|
|
160
|
+
eager: {
|
|
161
|
+
type: PropType<boolean>;
|
|
162
|
+
default: boolean;
|
|
163
|
+
};
|
|
164
|
+
scrollStrategy: {
|
|
165
|
+
type: PropType<"none" | "close" | "block" | "reposition" | ((data: import("./composable").IScrollStrategyData, props: import("./composable").IScrollStrategyProps, scope: import("vue").EffectScope) => void)>;
|
|
166
|
+
default: string;
|
|
167
|
+
validator: (value: any) => boolean;
|
|
168
|
+
};
|
|
169
|
+
locationStrategy: {
|
|
170
|
+
type: PropType<"static" | "connected" | ((data: import("./composable").ILocationStrategyData, props: import("./composable").ILocationStrategyProps, contentStyles: import("vue").Ref<Record<string, string>>) => {
|
|
171
|
+
updateLocation: (event: Event) => void;
|
|
172
|
+
} | undefined)>;
|
|
173
|
+
default: string;
|
|
174
|
+
validator: (value: any) => boolean;
|
|
175
|
+
};
|
|
176
|
+
location: {
|
|
177
|
+
type: PropType<import('../../utils').TAnchor>;
|
|
178
|
+
default: string;
|
|
179
|
+
};
|
|
180
|
+
origin: {
|
|
181
|
+
type: PropType<import('../../utils').TAnchor | "auto" | "overlap">;
|
|
182
|
+
default: string;
|
|
183
|
+
};
|
|
184
|
+
offset: {
|
|
185
|
+
type: PropType<string | number | number[]>;
|
|
186
|
+
default: null;
|
|
187
|
+
};
|
|
188
|
+
height: {
|
|
189
|
+
type: PropType<string | number>;
|
|
190
|
+
default: string;
|
|
191
|
+
};
|
|
192
|
+
maxHeight: {
|
|
193
|
+
type: PropType<string | number>;
|
|
194
|
+
default: string;
|
|
195
|
+
};
|
|
196
|
+
maxWidth: {
|
|
197
|
+
type: PropType<string | number>;
|
|
198
|
+
default: string;
|
|
199
|
+
};
|
|
200
|
+
minHeight: {
|
|
201
|
+
type: PropType<string | number>;
|
|
202
|
+
default: string;
|
|
203
|
+
};
|
|
204
|
+
minWidth: {
|
|
205
|
+
type: PropType<string | number>;
|
|
206
|
+
default: string;
|
|
207
|
+
};
|
|
208
|
+
width: {
|
|
209
|
+
type: PropType<string | number>; /**
|
|
210
|
+
* Применяет position: absolute к содержимому оверлея
|
|
211
|
+
*/
|
|
212
|
+
default: string;
|
|
213
|
+
};
|
|
214
|
+
closeDelay: {
|
|
215
|
+
type: PropType<string | number>;
|
|
216
|
+
default: null;
|
|
217
|
+
};
|
|
218
|
+
openDelay: {
|
|
219
|
+
type: PropType<string | number>;
|
|
220
|
+
default: null;
|
|
221
|
+
};
|
|
222
|
+
activator: {
|
|
223
|
+
type: PropType<string | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | Element>; /**
|
|
224
|
+
* Событие, которое срабатывает при клике вне оверлея.
|
|
225
|
+
*/
|
|
226
|
+
default: null;
|
|
227
|
+
};
|
|
228
|
+
activatorProps: {
|
|
229
|
+
type: PropType<Record<string, any>>;
|
|
230
|
+
default: () => {};
|
|
231
|
+
};
|
|
232
|
+
openOnClick: {
|
|
233
|
+
type: PropType<boolean | undefined>;
|
|
234
|
+
default: undefined;
|
|
235
|
+
};
|
|
236
|
+
openOnHover: {
|
|
237
|
+
type: PropType<boolean>;
|
|
238
|
+
default: boolean;
|
|
239
|
+
};
|
|
240
|
+
openOnFocus: {
|
|
241
|
+
type: PropType<boolean | undefined>;
|
|
242
|
+
default: undefined;
|
|
243
|
+
};
|
|
244
|
+
closeOnContentClick: {
|
|
245
|
+
type: PropType<boolean>;
|
|
246
|
+
default: boolean;
|
|
247
|
+
};
|
|
248
|
+
attach: {
|
|
249
|
+
type: PropType<string | boolean | Element>;
|
|
250
|
+
default: boolean;
|
|
251
|
+
};
|
|
252
|
+
contained: {
|
|
253
|
+
type: PropType<boolean>;
|
|
254
|
+
default: boolean;
|
|
255
|
+
};
|
|
256
|
+
disabled: {
|
|
257
|
+
type: PropType<boolean>;
|
|
258
|
+
default: boolean;
|
|
259
|
+
};
|
|
260
|
+
persistent: {
|
|
261
|
+
type: PropType<boolean>;
|
|
262
|
+
default: boolean;
|
|
263
|
+
};
|
|
264
|
+
scrim: {
|
|
265
|
+
type: PropType<string | boolean>;
|
|
266
|
+
default: boolean;
|
|
267
|
+
};
|
|
268
|
+
modelValue: {
|
|
269
|
+
type: PropType<boolean>;
|
|
270
|
+
default: boolean;
|
|
271
|
+
};
|
|
272
|
+
closeOnBack: {
|
|
273
|
+
type: PropType<boolean>;
|
|
274
|
+
default: boolean;
|
|
275
|
+
};
|
|
276
|
+
zIndex: {
|
|
277
|
+
type: PropType<string | number>;
|
|
278
|
+
default: number;
|
|
279
|
+
};
|
|
280
|
+
contentClasses: {
|
|
281
|
+
type: PropType<string | string[] | Record<string, boolean>>;
|
|
282
|
+
default: null;
|
|
283
|
+
};
|
|
284
|
+
contentProps: {
|
|
285
|
+
type: PropType<Record<string, unknown>>;
|
|
286
|
+
default: () => {};
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Применяет position: absolute к содержимому оверлея
|
|
290
|
+
*/
|
|
291
|
+
absolute: {
|
|
292
|
+
type: PropType<boolean>;
|
|
293
|
+
default: boolean;
|
|
294
|
+
};
|
|
295
|
+
}>> & {
|
|
296
|
+
onAfterLeave?: ((...args: any[]) => any) | undefined;
|
|
297
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
298
|
+
"onClick:outside"?: ((...args: any[]) => any) | undefined;
|
|
299
|
+
}, {
|
|
300
|
+
disabled: boolean;
|
|
301
|
+
location: import('../../utils').TAnchor;
|
|
302
|
+
transition: string | boolean | (import("vue").TransitionProps & {
|
|
303
|
+
component?: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | undefined;
|
|
304
|
+
});
|
|
305
|
+
origin: import('../../utils').TAnchor | "auto" | "overlap";
|
|
306
|
+
modelValue: boolean;
|
|
307
|
+
attach: string | boolean | Element;
|
|
308
|
+
contained: boolean;
|
|
309
|
+
persistent: boolean;
|
|
310
|
+
scrim: string | boolean;
|
|
311
|
+
closeOnBack: boolean;
|
|
312
|
+
zIndex: string | number;
|
|
313
|
+
contentClasses: string | string[] | Record<string, boolean>;
|
|
314
|
+
contentProps: Record<string, unknown>;
|
|
315
|
+
activator: string | import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | Element;
|
|
316
|
+
activatorProps: Record<string, any>;
|
|
317
|
+
openOnClick: boolean | undefined;
|
|
318
|
+
openOnHover: boolean;
|
|
319
|
+
openOnFocus: boolean | undefined;
|
|
320
|
+
closeOnContentClick: boolean;
|
|
321
|
+
closeDelay: string | number;
|
|
322
|
+
openDelay: string | number;
|
|
323
|
+
locationStrategy: "static" | "connected" | ((data: import("./composable").ILocationStrategyData, props: import("./composable").ILocationStrategyProps, contentStyles: import("vue").Ref<Record<string, string>>) => {
|
|
324
|
+
updateLocation: (event: Event) => void;
|
|
325
|
+
} | undefined);
|
|
326
|
+
offset: string | number | number[];
|
|
327
|
+
scrollStrategy: "none" | "close" | "block" | "reposition" | ((data: import("./composable").IScrollStrategyData, props: import("./composable").IScrollStrategyProps, scope: import("vue").EffectScope) => void);
|
|
328
|
+
eager: boolean;
|
|
329
|
+
height: string | number;
|
|
330
|
+
maxHeight: string | number;
|
|
331
|
+
maxWidth: string | number;
|
|
332
|
+
minHeight: string | number;
|
|
333
|
+
minWidth: string | number;
|
|
334
|
+
width: string | number;
|
|
335
|
+
absolute: boolean;
|
|
336
|
+
}>;
|
|
337
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import type { ComponentPublicInstance, PropType, Ref } from 'vue';
|
|
3
|
+
import type { IDelayProps } from '../../../composable';
|
|
4
|
+
export interface IActivatorProps extends IDelayProps {
|
|
5
|
+
activator: 'parent' | string | Element | ComponentPublicInstance;
|
|
6
|
+
activatorProps: Record<string, any>;
|
|
7
|
+
openOnClick: boolean | undefined;
|
|
8
|
+
openOnHover: boolean;
|
|
9
|
+
openOnFocus: boolean | undefined;
|
|
10
|
+
closeOnContentClick: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface IUseActivator {
|
|
13
|
+
activatorEl: Ref<HTMLElement | undefined>;
|
|
14
|
+
activatorRef: Ref<HTMLElement | undefined>;
|
|
15
|
+
activatorEvents: ComputedRef<Partial<TAvailableEvents>>;
|
|
16
|
+
contentEvents: ComputedRef<Partial<TAvailableEvents>>;
|
|
17
|
+
scrimEvents: ComputedRef<Partial<TAvailableEvents>>;
|
|
18
|
+
}
|
|
19
|
+
declare type TAvailableEvents = {
|
|
20
|
+
click: (event: MouseEvent) => void;
|
|
21
|
+
mouseenter: (event: MouseEvent) => void;
|
|
22
|
+
mouseleave: (event: MouseEvent) => void;
|
|
23
|
+
focus: (event: FocusEvent) => void;
|
|
24
|
+
blur: (event: FocusEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare const makeActivatorProps: <Defaults extends {
|
|
27
|
+
activator?: unknown;
|
|
28
|
+
activatorProps?: unknown;
|
|
29
|
+
openOnClick?: unknown;
|
|
30
|
+
openOnHover?: unknown;
|
|
31
|
+
openOnFocus?: unknown;
|
|
32
|
+
closeOnContentClick?: unknown;
|
|
33
|
+
} = {}>(defaults?: Defaults | undefined) => import('../../../utils').AppendDefault<{
|
|
34
|
+
/**
|
|
35
|
+
* Элемент, который будет активировать компонент
|
|
36
|
+
*/
|
|
37
|
+
activator: {
|
|
38
|
+
type: PropType<string | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | Element>;
|
|
39
|
+
default: null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Свойства для элемента активатора
|
|
43
|
+
*/
|
|
44
|
+
activatorProps: {
|
|
45
|
+
type: PropType<Record<string, any>>;
|
|
46
|
+
default: () => {};
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Показать компонент по клику на активатор
|
|
50
|
+
*/
|
|
51
|
+
openOnClick: {
|
|
52
|
+
type: PropType<boolean | undefined>;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Показать компонент по наведению на активатор
|
|
57
|
+
*/
|
|
58
|
+
openOnHover: {
|
|
59
|
+
type: PropType<boolean>;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Показать компонент по фокусу на активатор
|
|
64
|
+
*/
|
|
65
|
+
openOnFocus: {
|
|
66
|
+
type: PropType<boolean | undefined>;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Скрыть компонент по клику на контент
|
|
71
|
+
*/
|
|
72
|
+
closeOnContentClick: {
|
|
73
|
+
type: PropType<boolean>;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
}, Defaults>;
|
|
77
|
+
export declare function useActivator(props: IActivatorProps, { isActive, isTop }: {
|
|
78
|
+
isActive: Ref<boolean>;
|
|
79
|
+
isTop: Ref<boolean>;
|
|
80
|
+
}): IUseActivator;
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Box, TAnchor } from '../../../utils';
|
|
2
|
+
import type { PropType, Ref } from 'vue';
|
|
3
|
+
export interface ILocationStrategyData {
|
|
4
|
+
contentEl: Ref<HTMLElement | undefined>;
|
|
5
|
+
activatorEl: Ref<HTMLElement | undefined>;
|
|
6
|
+
isActive: Ref<boolean>;
|
|
7
|
+
}
|
|
8
|
+
declare type TLocationStrategyFn = (data: ILocationStrategyData, props: ILocationStrategyProps, contentStyles: Ref<Record<string, string>>) => undefined | {
|
|
9
|
+
updateLocation: (event: Event) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const locationStrategies: {
|
|
12
|
+
static: typeof staticLocationStrategy;
|
|
13
|
+
connected: typeof connectedLocationStrategy;
|
|
14
|
+
};
|
|
15
|
+
export interface ILocationStrategyProps {
|
|
16
|
+
locationStrategy: keyof typeof locationStrategies | TLocationStrategyFn;
|
|
17
|
+
location: TAnchor;
|
|
18
|
+
origin: TAnchor | 'auto' | 'overlap';
|
|
19
|
+
offset?: number | string | number[];
|
|
20
|
+
maxHeight: number | string;
|
|
21
|
+
maxWidth: number | string;
|
|
22
|
+
minHeight: number | string;
|
|
23
|
+
minWidth: number | string;
|
|
24
|
+
}
|
|
25
|
+
export interface IUseLocationStrategies {
|
|
26
|
+
contentStyles: Ref<Record<string, string>>;
|
|
27
|
+
updateLocation: Ref<((event: Event) => void) | undefined>;
|
|
28
|
+
}
|
|
29
|
+
export declare const makeLocationStrategyProps: <Defaults extends {
|
|
30
|
+
locationStrategy?: unknown;
|
|
31
|
+
location?: unknown;
|
|
32
|
+
origin?: unknown;
|
|
33
|
+
offset?: unknown;
|
|
34
|
+
} = {}>(defaults?: Defaults | undefined) => import('../../../utils').AppendDefault<{
|
|
35
|
+
/**
|
|
36
|
+
* Стратегия позиционирования компонента
|
|
37
|
+
*/
|
|
38
|
+
locationStrategy: {
|
|
39
|
+
type: PropType<"static" | "connected" | TLocationStrategyFn>;
|
|
40
|
+
default: string;
|
|
41
|
+
validator: (value: any) => boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Выравнивание компонент по краям top, bottom, left, right. Можно комбинировать, например, top left
|
|
45
|
+
*/
|
|
46
|
+
location: {
|
|
47
|
+
type: PropType<TAnchor>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
origin: {
|
|
51
|
+
type: PropType<TAnchor | "auto" | "overlap">;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Отступы компонента от активатора
|
|
56
|
+
*/
|
|
57
|
+
offset: {
|
|
58
|
+
type: PropType<string | number | number[]>;
|
|
59
|
+
default: null;
|
|
60
|
+
};
|
|
61
|
+
}, Defaults>;
|
|
62
|
+
export declare function useLocationStrategies(props: ILocationStrategyProps, data: ILocationStrategyData): IUseLocationStrategies;
|
|
63
|
+
declare function staticLocationStrategy(): {
|
|
64
|
+
updateLocation: () => void;
|
|
65
|
+
};
|
|
66
|
+
declare function connectedLocationStrategy(data: ILocationStrategyData, props: ILocationStrategyProps, contentStyles: Ref<Record<string, string>>): {
|
|
67
|
+
updateLocation: () => {
|
|
68
|
+
available: {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
};
|
|
72
|
+
contentBox: Box;
|
|
73
|
+
} | undefined;
|
|
74
|
+
};
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { EffectScope, PropType, Ref } from 'vue';
|
|
2
|
+
export interface IScrollStrategyData {
|
|
3
|
+
root: Ref<HTMLElement | undefined>;
|
|
4
|
+
contentEl: Ref<HTMLElement | undefined>;
|
|
5
|
+
activatorEl: Ref<HTMLElement | undefined>;
|
|
6
|
+
isActive: Ref<boolean>;
|
|
7
|
+
updateLocation: Ref<((event: Event) => void) | undefined>;
|
|
8
|
+
}
|
|
9
|
+
declare type TScrollStrategyFn = (data: IScrollStrategyData, props: IScrollStrategyProps, scope: EffectScope) => void;
|
|
10
|
+
declare const scrollStrategies: {
|
|
11
|
+
none: null;
|
|
12
|
+
close: typeof closeScrollStrategy;
|
|
13
|
+
block: typeof blockScrollStrategy;
|
|
14
|
+
reposition: typeof repositionScrollStrategy;
|
|
15
|
+
};
|
|
16
|
+
export interface IScrollStrategyProps {
|
|
17
|
+
scrollStrategy: keyof typeof scrollStrategies | TScrollStrategyFn;
|
|
18
|
+
contained: boolean | undefined;
|
|
19
|
+
}
|
|
20
|
+
export declare const makeScrollStrategyProps: <Defaults extends {
|
|
21
|
+
scrollStrategy?: unknown;
|
|
22
|
+
} = {}>(defaults?: Defaults | undefined) => import('../../../utils').AppendDefault<{
|
|
23
|
+
scrollStrategy: {
|
|
24
|
+
type: PropType<"none" | "close" | "block" | "reposition" | TScrollStrategyFn>;
|
|
25
|
+
default: string;
|
|
26
|
+
validator: (value: any) => boolean;
|
|
27
|
+
};
|
|
28
|
+
}, Defaults>;
|
|
29
|
+
export declare function useScrollStrategies(props: IScrollStrategyProps, data: IScrollStrategyData): void;
|
|
30
|
+
declare function closeScrollStrategy(data: IScrollStrategyData): void;
|
|
31
|
+
declare function blockScrollStrategy(data: IScrollStrategyData, props: IScrollStrategyProps): void;
|
|
32
|
+
declare function repositionScrollStrategy(data: IScrollStrategyData, props: IScrollStrategyProps, scope: EffectScope): void;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
export interface IUseStack {
|
|
3
|
+
globalTop: Readonly<Ref<boolean>>;
|
|
4
|
+
localTop: ComputedRef<boolean>;
|
|
5
|
+
stackStyles: ComputedRef<{
|
|
6
|
+
zIndex: number;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useStack(isActive: Readonly<Ref<boolean>>, zIndex: Readonly<Ref<string | number>>, disableGlobalStack?: boolean): IUseStack;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
export interface IUseTeleport {
|
|
4
|
+
teleportTarget: ComputedRef<Element | undefined>;
|
|
5
|
+
}
|
|
6
|
+
export declare function useTeleport(target: Ref<boolean | string | Element>, overlayContainerClassName: string): IUseTeleport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CdsOverlay } from './CdsOverlay.vue';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Box, ParsedAnchor } from '../../../utils';
|
|
2
|
+
declare type Point = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
declare class As<T extends string> {
|
|
7
|
+
private as;
|
|
8
|
+
}
|
|
9
|
+
declare type ElementPoint = Point & As<'element'>;
|
|
10
|
+
declare type ViewportPoint = Point & As<'viewport'>;
|
|
11
|
+
declare type Offset = Point & As<'offset'>;
|
|
12
|
+
/** Convert a point in local space to viewport space */
|
|
13
|
+
export declare function elementToViewport(point: ElementPoint, offset: Offset | Box): ViewportPoint;
|
|
14
|
+
/** Convert a point in viewport space to local space */
|
|
15
|
+
export declare function viewportToElement(point: ViewportPoint, offset: Offset | Box): ElementPoint;
|
|
16
|
+
/** Get the difference between two points */
|
|
17
|
+
export declare function getOffset<T extends Point>(a: T, b: T): Offset;
|
|
18
|
+
/** Convert an anchor object to a point in local space */
|
|
19
|
+
export declare function anchorToPoint(anchor: ParsedAnchor, box: Box): ViewportPoint;
|
|
20
|
+
export {};
|