@topvisor/ui 0.0.41 → 0.0.43
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/.chunks/datepicker-92744062.es.js +275 -0
- package/.chunks/datepicker-92744062.es.js.map +1 -0
- package/.chunks/datepicker-a9226b0f.amd.js +234 -0
- package/.chunks/datepicker-a9226b0f.amd.js.map +1 -0
- package/.chunks/{forms-7f061546.es.js → forms-727cc6aa.es.js} +51 -47
- package/.chunks/forms-727cc6aa.es.js.map +1 -0
- package/.chunks/forms-771091d4.amd.js +3 -0
- package/.chunks/forms-771091d4.amd.js.map +1 -0
- package/.chunks/{popup-05538243.es.js → popup-a622fe31.es.js} +429 -427
- package/.chunks/popup-a622fe31.es.js.map +1 -0
- package/.chunks/popup-de28e508.amd.js +377 -0
- package/.chunks/popup-de28e508.amd.js.map +1 -0
- package/README.md +80 -80
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/build/cssModules.d.ts +13 -0
- package/build/plugin/amdFix.d.ts +8 -0
- package/build/plugin/autoloadCSS.d.ts +19 -0
- package/build/rollup.config.d.ts +15 -0
- package/common/common.d.ts +1 -0
- package/core/core.amd.js +1 -1
- package/core/core.d.ts +3 -0
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.d.ts +1 -0
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.d.ts +1 -0
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.d.ts +1 -0
- package/formsExt/formsExt.js +1 -1
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2945
- package/icomoon/fonts/Topvisor-2.svg +232 -232
- package/icomoon/style.css +647 -647
- package/package.json +19 -19
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.d.ts +1 -0
- package/popup/popup.js +17 -17
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.d.ts +1 -0
- package/popup/worker.js +3 -2
- package/popup/worker.js.map +1 -1
- package/src/components/common/common.d.ts +0 -0
- package/src/components/common/icon/icon.d.ts +4 -0
- package/src/components/component.d.ts +25 -0
- package/src/components/forms/avatar/avatar.d.ts +29 -0
- package/src/components/forms/avatar/avatar.stories.d.ts +59 -0
- package/src/components/forms/avatar/avatar.vue.d.ts +26 -0
- package/src/components/forms/button/button.d.ts +40 -0
- package/src/components/forms/button/button.stories.d.ts +313 -0
- package/src/components/forms/button/button.vue.d.ts +39 -0
- package/src/components/forms/checkbox/checkbox.d.ts +22 -0
- package/src/components/forms/checkbox/checkbox.stories.d.ts +176 -0
- package/src/components/forms/checkbox/checkbox.vue.d.ts +23 -0
- package/src/components/forms/controlLabel/controlLabel.d.ts +4 -0
- package/src/components/forms/controlLabel/controlLabel.stories.d.ts +97 -0
- package/src/components/forms/controlLabel/controlLabel.vue.d.ts +19 -0
- package/src/components/forms/forms.d.ts +12 -0
- package/src/components/forms/helpers.d.ts +10 -0
- package/src/components/forms/hint/hint.d.ts +8 -0
- package/src/components/forms/hint/hint.stories.d.ts +138 -0
- package/src/components/forms/hint/hint.vue.d.ts +12 -0
- package/src/components/forms/input/input.d.ts +26 -0
- package/src/components/forms/input/input.stories.d.ts +255 -0
- package/src/components/forms/input/input.vue.d.ts +40 -0
- package/src/components/forms/inputDate/datepicker.d.ts +5 -0
- package/src/components/forms/inputDate/inputDate.d.ts +3 -0
- package/src/components/forms/inputDate/inputDate.stories.d.ts +108 -0
- package/src/components/forms/inputDate/inputDate.vue.d.ts +30 -0
- package/src/components/forms/inputRange/inputRange.d.ts +2 -0
- package/src/components/forms/inputRange/inputRange.stories.d.ts +405 -0
- package/src/components/forms/inputRange/inputRange.vue.d.ts +10 -0
- package/src/components/forms/radio/radio.d.ts +14 -0
- package/src/components/forms/radio/radio.stories.d.ts +168 -0
- package/src/components/forms/radio/radio.vue.d.ts +23 -0
- package/src/components/forms/select/select.d.ts +31 -0
- package/src/components/forms/select/select.stories.d.ts +83 -0
- package/src/components/forms/select/select.vue.d.ts +30 -0
- package/src/components/forms/select/stories/exampleOptions.d.ts +4 -0
- package/src/components/forms/switcher/switcher.d.ts +21 -0
- package/src/components/forms/switcher/switcher.stories.d.ts +163 -0
- package/src/components/forms/switcher/switcher.vue.d.ts +23 -0
- package/src/components/forms/textarea/textarea.d.ts +33 -0
- package/src/components/forms/textarea/textarea.stories.d.ts +88 -0
- package/src/components/forms/textarea/textarea.vue.d.ts +33 -0
- package/src/components/formsExt/editArea/editArea.d.ts +20 -0
- package/src/components/formsExt/editArea/editArea.stories.d.ts +140 -0
- package/src/components/formsExt/editArea/editArea.vue.d.ts +38 -0
- package/src/components/formsExt/editInput/editInput.d.ts +16 -0
- package/src/components/formsExt/editInput/editInput.stories.d.ts +129 -0
- package/src/components/formsExt/editInput/editInput.vue.d.ts +23 -0
- package/src/components/formsExt/formsExt.d.ts +3 -0
- package/src/components/formsExt/radioGroup/radioGroup.d.ts +22 -0
- package/src/components/formsExt/radioGroup/radioGroup.stories.d.ts +64 -0
- package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +30 -0
- package/src/components/helpersStories.d.ts +28 -0
- package/src/components/popup/popup/listItem.vue.d.ts +36 -0
- package/src/components/popup/popup/opener.vue.d.ts +39 -0
- package/src/components/popup/popup/popup.d.ts +79 -0
- package/src/components/popup/popup/popup.stories.d.ts +742 -0
- package/src/components/popup/popup/popup.vue.d.ts +52 -0
- package/src/components/popup/popup.d.ts +3 -0
- package/src/components/popup/worker.d.ts +2 -0
- package/src/components/tabs/tabs/content.vue.d.ts +19 -0
- package/src/components/tabs/tabs/tab.vue.d.ts +19 -0
- package/src/components/tabs/tabs/tabs.d.ts +19 -0
- package/src/components/tabs/tabs/tabs.stories.d.ts +774 -0
- package/src/components/tabs/tabs/tabs.vue.d.ts +21 -0
- package/src/components/tabs/tabs.d.ts +3 -0
- package/src/core/base/Colors.stories.d.ts +19 -0
- package/src/core/base/Layout.stories.d.ts +19 -0
- package/src/core/base/Properties.stories.d.ts +19 -0
- package/src/core/core/core.d.ts +58 -0
- package/src/core/core/events.d.ts +20 -0
- package/src/core/core/options.d.ts +13 -0
- package/src/core/core/page.d.ts +10 -0
- package/src/core/core/state.d.ts +34 -0
- package/src/core/directives/tooltip.d.ts +7 -0
- package/src/core/theme/Colors.stories.d.ts +19 -0
- package/src/core/theme/Properties.stories.d.ts +19 -0
- package/src/core/utils/date.d.ts +27 -0
- package/src/core/utils/device.d.ts +13 -0
- package/src/core/utils/dom.d.ts +98 -0
- package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.stories.d.ts" +6 -0
- package/src/d.d.ts +4 -0
- package/src/resources/styles/core/core.d.ts +0 -0
- package/src/resources/styles/themes/dark.d.ts +0 -0
- package/src/resources/styles/themes/light.d.ts +0 -0
- package/src/storybook/components/icomoon.d.ts +2 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.d.ts +1 -0
- package/tabs/tabs.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.d.ts +3 -0
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.d.ts +3 -0
- package/utils/device.js +1 -1
- package/utils/dom.amd.js +1 -1
- package/utils/dom.d.ts +3 -0
- package/utils/dom.js +1 -1
- package/.chunks/datepicker-7f54fd80.es.js +0 -275
- package/.chunks/datepicker-7f54fd80.es.js.map +0 -1
- package/.chunks/datepicker-858c1cb6.amd.js +0 -234
- package/.chunks/datepicker-858c1cb6.amd.js.map +0 -1
- package/.chunks/forms-7f061546.es.js.map +0 -1
- package/.chunks/forms-b9e5edd2.amd.js +0 -3
- package/.chunks/forms-b9e5edd2.amd.js.map +0 -1
- package/.chunks/popup-05538243.es.js.map +0 -1
- package/.chunks/popup-a531e9ad.amd.js +0 -377
- package/.chunks/popup-a531e9ad.amd.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Props } from './tabs';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>, {
|
|
3
|
+
buttons?(_: {}): any;
|
|
4
|
+
header?(_: {}): any;
|
|
5
|
+
contents?(_: {}): any;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: import('vue').PropType<T[K]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
component: import("vue").DefineComponent<{
|
|
3
|
+
style: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
style: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>>, {}, {}>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Colors: {
|
|
15
|
+
args: {
|
|
16
|
+
style: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
component: import("vue").DefineComponent<{
|
|
3
|
+
style: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
style: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>>, {}, {}>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Layout: {
|
|
15
|
+
args: {
|
|
16
|
+
style: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
component: import("vue").DefineComponent<{
|
|
3
|
+
style: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
style: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>>, {}, {}>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Properties: {
|
|
15
|
+
args: {
|
|
16
|
+
style: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import Page from '../../core/core/page';
|
|
2
|
+
declare class Core {
|
|
3
|
+
/**
|
|
4
|
+
* Настройки словаря
|
|
5
|
+
*/
|
|
6
|
+
static L: {
|
|
7
|
+
Not_date: string;
|
|
8
|
+
};
|
|
9
|
+
static page: any;
|
|
10
|
+
static Page: typeof Page;
|
|
11
|
+
static options: {
|
|
12
|
+
widthForMobile: number;
|
|
13
|
+
dateFormat: string;
|
|
14
|
+
gmt: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
static state: {
|
|
17
|
+
isMobile: boolean;
|
|
18
|
+
isMobileUA: boolean;
|
|
19
|
+
isRetina: boolean;
|
|
20
|
+
isApp: boolean;
|
|
21
|
+
isLandscape: boolean;
|
|
22
|
+
isPortrait: boolean;
|
|
23
|
+
size: number;
|
|
24
|
+
dateFormat: string;
|
|
25
|
+
gmt: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
static matchMediaIsMobile?: MediaQueryList;
|
|
28
|
+
/**
|
|
29
|
+
* Добавить на страницу стили, используется для загрузки стилей из js
|
|
30
|
+
*
|
|
31
|
+
* Условная загрузка стилей m и pc отключена в пользу производительсности, стили грузятся всегда, но применяются по условию
|
|
32
|
+
* @param style - css стили в строке
|
|
33
|
+
* @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.options.widthForMobile
|
|
34
|
+
*/
|
|
35
|
+
static appendStyle(style: string, type?: '' | 'm' | 'pc'): void;
|
|
36
|
+
/**
|
|
37
|
+
* Установить как плагин в прилоежнии Vue
|
|
38
|
+
* Core.state является общим для всех приложений Vue на странице
|
|
39
|
+
* Core.options является общим для всех приложений Vue на странице
|
|
40
|
+
* @param app - Vue App
|
|
41
|
+
* @param {typeof options} options - параметры UI
|
|
42
|
+
*/
|
|
43
|
+
static install(app: any, options: typeof this.options): void;
|
|
44
|
+
static installDirectives(app: any): void;
|
|
45
|
+
/**
|
|
46
|
+
* Установить конфигурацию UI
|
|
47
|
+
* @param {typeof options} options
|
|
48
|
+
*/
|
|
49
|
+
static defineOptions(options: typeof this.options): void;
|
|
50
|
+
static setState(): void;
|
|
51
|
+
static onResize(): void;
|
|
52
|
+
static setStateByWindowSize(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Сохранить информацию об устройстве в cookie
|
|
55
|
+
*/
|
|
56
|
+
static saveToCookie(): void;
|
|
57
|
+
}
|
|
58
|
+
export default Core;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type TopEvent = Event & {
|
|
2
|
+
topEvent: {
|
|
3
|
+
widthDiff: number;
|
|
4
|
+
hightDiff: number;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Добавить обработчик на событие изменения размеров экрана
|
|
9
|
+
* вызов таких обработчиков будет опмизирован и объединен в одно событие
|
|
10
|
+
*/
|
|
11
|
+
declare function addOnReize(listener: (this: Element, ev: TopEvent) => any): void;
|
|
12
|
+
/**
|
|
13
|
+
* Удаление обработчика на событие изменений размеров экрана
|
|
14
|
+
*/
|
|
15
|
+
declare function removeOnResize(listener: (this: Element, ev: TopEvent) => any): void;
|
|
16
|
+
declare const _default: {
|
|
17
|
+
addOnReize: typeof addOnReize;
|
|
18
|
+
removeOnResize: typeof removeOnResize;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Конфигурация UI
|
|
3
|
+
* Можно переопределить при подклчюении UI во Vue приложение через app.use(Core, options)
|
|
4
|
+
*/
|
|
5
|
+
declare const options: {
|
|
6
|
+
widthForMobile: number;
|
|
7
|
+
dateFormat: string;
|
|
8
|
+
/**
|
|
9
|
+
* Для Москвы: +0300
|
|
10
|
+
*/
|
|
11
|
+
gmt: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
export default options;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare class Page {
|
|
2
|
+
/**
|
|
3
|
+
* Вставить css стили на страницу с автоматическим определением media
|
|
4
|
+
* @param fileNames - список ссылок на css файлы
|
|
5
|
+
* @param props - атрибуты <link>
|
|
6
|
+
*/
|
|
7
|
+
static addCss(fileNames: Array<String>, props?: any): void;
|
|
8
|
+
static _addCss(fileNames: Array<String>, props: any): void;
|
|
9
|
+
}
|
|
10
|
+
export default Page;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State UI для взаимодейсвтиями с приложениями Vue
|
|
3
|
+
*/
|
|
4
|
+
declare const state: {
|
|
5
|
+
/**
|
|
6
|
+
* Device by size
|
|
7
|
+
* @see widthForMobile
|
|
8
|
+
*/
|
|
9
|
+
isMobile: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Device by user agent
|
|
12
|
+
*/
|
|
13
|
+
isMobileUA: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* true, если плотность пикселей экрана больше 1
|
|
16
|
+
*/
|
|
17
|
+
isRetina: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* true, елси это приложение
|
|
20
|
+
*/
|
|
21
|
+
isApp: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* true при горизонтальном расположении устройства
|
|
24
|
+
*/
|
|
25
|
+
isLandscape: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* true при вертикальном расположении устройства
|
|
28
|
+
*/
|
|
29
|
+
isPortrait: boolean;
|
|
30
|
+
size: number;
|
|
31
|
+
dateFormat: string;
|
|
32
|
+
gmt: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
export default state;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DirectiveBinding, VNode } from 'vue';
|
|
2
|
+
declare const tooltip: {
|
|
3
|
+
mounted(el: VNode, binding: DirectiveBinding, vnode: VNode): void;
|
|
4
|
+
updated(el: VNode, binding: DirectiveBinding, vnode: VNode, _prevVnode: VNode): void;
|
|
5
|
+
unmounted(el: VNode, binding: DirectiveBinding, vnode: VNode): void;
|
|
6
|
+
};
|
|
7
|
+
export default tooltip;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
component: import("vue").DefineComponent<{
|
|
3
|
+
style: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
style: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>>, {}, {}>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Colors: {
|
|
15
|
+
args: {
|
|
16
|
+
style: any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
component: import("vue").DefineComponent<{
|
|
3
|
+
style: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
style: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>>, {}, {}>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Properties: {
|
|
15
|
+
args: {
|
|
16
|
+
style: any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare class UtilsDate {
|
|
2
|
+
/**
|
|
3
|
+
* Получить объект Date из строки
|
|
4
|
+
* @param date - строка с датой
|
|
5
|
+
*/
|
|
6
|
+
static stringToDate(date: string): Date;
|
|
7
|
+
/**
|
|
8
|
+
* Перевод миллисекунд (UTC) в дату-строку (время локальное)
|
|
9
|
+
* @param {?number} ms
|
|
10
|
+
* @param {?boolean} useFormat
|
|
11
|
+
*/
|
|
12
|
+
static ms2Date(ms: number, useFormat?: boolean): string;
|
|
13
|
+
/**
|
|
14
|
+
* Перевод даты в формат пользователя
|
|
15
|
+
* @param {string} date - строка в формате Y-m-d H:i:s
|
|
16
|
+
* @param {0|1|2|3} time - 0: только дата, 1: дата и часы, 2: дата и часы с минутами, 3: дата и часы с минутами и секундами
|
|
17
|
+
* @param {string} emptyValue - значение, которое надо вернуть, если дата не указана
|
|
18
|
+
*/
|
|
19
|
+
static dateFormat(date: string, time?: 0 | 1 | 2 | 3, emptyValue?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Перевод даты из формата пользователя в системный формат
|
|
22
|
+
* @param {string} date - строка в формате Y-m-d H:i:s
|
|
23
|
+
* @param {string} emptyValue - значение, которое надо вернуть, если дата не указана
|
|
24
|
+
*/
|
|
25
|
+
static dateUnformat(date: string, emptyValue?: string): string;
|
|
26
|
+
}
|
|
27
|
+
export default UtilsDate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare class Device {
|
|
2
|
+
static isRetina(): boolean;
|
|
3
|
+
static isMobile(): boolean;
|
|
4
|
+
static isApp(): boolean;
|
|
5
|
+
static isMacOS(): boolean;
|
|
6
|
+
static isSafari(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Вернуть текст для обозначения клавиши Ctrl / Command в зависимости от OS
|
|
9
|
+
* @returns {'Ctrl'|'⌘'}
|
|
10
|
+
*/
|
|
11
|
+
static getCommandKeyLabel(): 'Ctrl' | '⌘';
|
|
12
|
+
}
|
|
13
|
+
export default Device;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Функции для работы с работы с Document Object Model (DOM)
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Создать элемент
|
|
6
|
+
* @param {string} tagName
|
|
7
|
+
* @param {any} attrs - атрибуты
|
|
8
|
+
* @param {Element[]} elsChildrens
|
|
9
|
+
* @returns {Element} - созданный элемент
|
|
10
|
+
*/
|
|
11
|
+
declare function genEl(tagName: string, attrs: any, ...elsChildrens: Element[]): Element;
|
|
12
|
+
/**
|
|
13
|
+
* Проверить видимость элемента
|
|
14
|
+
* @param {?Element} el
|
|
15
|
+
* @returns boolean - вернет true, если элемент считается видимым
|
|
16
|
+
*/
|
|
17
|
+
declare function isVisible(el?: Element): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Получить координаты элемента относительно документа
|
|
20
|
+
* @param {Element} el
|
|
21
|
+
* @returns {{top: number, left: number}} - координаты элемента относительно документа
|
|
22
|
+
*/
|
|
23
|
+
declare function offset(el: Element): {
|
|
24
|
+
top: number;
|
|
25
|
+
left: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Получить значение css свойства элемента
|
|
29
|
+
* @param {Element} el
|
|
30
|
+
* @param {string} property - имя свойства
|
|
31
|
+
* @return {string} - значение css стиля
|
|
32
|
+
*/
|
|
33
|
+
declare function css(el: Element, property: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Обернуть элемент и вернуть только что созданный элемент
|
|
36
|
+
* @param {Element} el - элемент, который требуется обернуть
|
|
37
|
+
* @param {string} tagName - имя тега элемента, в который треубется обернуть элемент
|
|
38
|
+
* @returns {Element}
|
|
39
|
+
*/
|
|
40
|
+
declare function wrap(el: Element, tagName: string): Element;
|
|
41
|
+
/**
|
|
42
|
+
* Найти и вернуть первый видимый элемент
|
|
43
|
+
* @param {?Document|Element} el - корневой элемент поиска
|
|
44
|
+
* @param selectors - см. параметр selectors в Document.querySelectorAll()
|
|
45
|
+
* @returns {Element|null}
|
|
46
|
+
*/
|
|
47
|
+
declare function querySelectorVisible(el: Element, selectors: string): Element | null;
|
|
48
|
+
/**
|
|
49
|
+
* Найти и вернуть последний видимый элемент
|
|
50
|
+
* @param {?Document|Element} el - корневой элемент поиска
|
|
51
|
+
* @param selectors - см. параметр selectors в Document.querySelectorAll()
|
|
52
|
+
* @returns {Element|null}
|
|
53
|
+
*/
|
|
54
|
+
declare function querySelectorVisibleLast(el: Element, selectors: string): Element | null;
|
|
55
|
+
/**
|
|
56
|
+
* Найти видимые элементы
|
|
57
|
+
* @param {?Document|Element} el - корневой элемент поиска
|
|
58
|
+
* @param selectors - см. параметр selectors в Document.querySelectorAll()
|
|
59
|
+
* @returns {Element[]} - обратите внимание, возвращается не NodeList[], а Element[]
|
|
60
|
+
*/
|
|
61
|
+
declare function querySelectorAllVisible(el: Element, selectors: string): Element[];
|
|
62
|
+
/**
|
|
63
|
+
* Найти элементы и вернуть в виде массива
|
|
64
|
+
* @param {?Document|Element} el - корневой элемент поиска
|
|
65
|
+
* @param selectors - см. параметр selectors в Document.querySelectorAll()
|
|
66
|
+
* @returns {Element[]}
|
|
67
|
+
*/
|
|
68
|
+
declare function querySelectorAllArray(el: Element, selectors: string): Element[];
|
|
69
|
+
/**
|
|
70
|
+
* Хранилище данных элемента
|
|
71
|
+
* @param {Element} el
|
|
72
|
+
* @param {string} contextName - контекст, обычно используется имя компонента
|
|
73
|
+
* @param {?object | null} contextData - установить объект с данными, предыдущие данные будут заменены, установите null для удаления данных
|
|
74
|
+
* @returns {?object} - вернет объект контекста или undefined, если данные контекста не найдены
|
|
75
|
+
*/
|
|
76
|
+
declare function storage(el?: Element & {
|
|
77
|
+
topData?: any;
|
|
78
|
+
}, contextName?: string, contextData?: object | null | undefined): object | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Очистить хранилище элемента
|
|
81
|
+
*/
|
|
82
|
+
declare function storageClear(el?: Element & {
|
|
83
|
+
topData?: any;
|
|
84
|
+
}): void;
|
|
85
|
+
declare const _default: {
|
|
86
|
+
genEl: typeof genEl;
|
|
87
|
+
isVisible: typeof isVisible;
|
|
88
|
+
offset: typeof offset;
|
|
89
|
+
css: typeof css;
|
|
90
|
+
wrap: typeof wrap;
|
|
91
|
+
querySelectorVisible: typeof querySelectorVisible;
|
|
92
|
+
querySelectorVisibleLast: typeof querySelectorVisibleLast;
|
|
93
|
+
querySelectorAllVisible: typeof querySelectorAllVisible;
|
|
94
|
+
querySelectorAllArray: typeof querySelectorAllArray;
|
|
95
|
+
storage: typeof storage;
|
|
96
|
+
storageClear: typeof storageClear;
|
|
97
|
+
};
|
|
98
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const meta: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
4
|
+
};
|
|
5
|
+
export declare const Default: {};
|
|
6
|
+
export default meta;
|
package/src/d.d.ts
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/tabs/tabs.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","exports","vue","../.chunks/forms-
|
|
1
|
+
define(["require","exports","vue","../.chunks/forms-771091d4.amd"],function(l,s,t,n){"use strict";l(["../core/core.amd"],o=>{const e=["../assets/tabs.css"].map(a=>l.toUrl(a));o.Page.addCss(e)});const c={class:t.normalizeClass({"top-tabs":!0})},d={key:0,class:"top-tabs_header"},b={class:"top-tabs_contents"},p=t.defineComponent({__name:"tabs",props:{id:{}},setup(o){return(e,a)=>(t.openBlock(),t.createElementBlock("div",c,[t.renderSlot(e.$slots,"buttons"),e.$slots.header?(t.openBlock(),t.createElementBlock("div",d,[t.renderSlot(e.$slots,"header")])):t.createCommentVNode("",!0),t.createElementVNode("div",b,[t.renderSlot(e.$slots,"contents")])]))}}),r={$style:{"top-tabs":"top-tabs","top-tabs_header":"top-tabs_header","top-tabs_contents":"top-tabs_contents","top-tabs_tabInput":"top-tabs_tabInput","top-tabs_content":"top-tabs_content"}},_=n._export_sfc(p,[["__cssModules",r]]),i=["id","name","value","checked","disabled"],m=["for"],$=t.defineComponent({__name:"tab",props:{tabsId:{},name:{},title:{},active:{type:Boolean},disabled:{type:Boolean}},setup(o){return(e,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("input",{type:"radio",class:"top-tabs_tabInput top-unvisible",id:e.tabsId+e.name,name:e.tabsId,value:e.name,checked:e.active,disabled:e.disabled},null,8,i),t.createElementVNode("label",{class:t.normalizeClass({"top-tabs_tabLabel":!0,"top-forms-focusable":!0,"top-disabled":e.disabled}),for:e.tabsId+e.name},[t.renderSlot(e.$slots,"default")],10,m)],64))}}),f={$style:{"top-tabs_tabLabel":"top-tabs_tabLabel","top-tabs_tabInput":"top-tabs_tabInput","top-disabled":"top-disabled"}},u=n._export_sfc($,[["__cssModules",f]]),h=["data-tabs-name"],y=t.defineComponent({__name:"content",props:{name:{}},setup(o){return(e,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"top-tabs_content":!0}),"data-tabs-name":e.name},[t.renderSlot(e.$slots,"default")],8,h))}}),k={$style:{"top-tabs_content":"top-tabs_content"}},B=n._export_sfc(y,[["__cssModules",k]]);s.Tabs=_,s.TabsContent=B,s.TabsTab=u,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=tabs.amd.js.map
|
package/tabs/tabs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../src/components/tabs/tabs'
|
package/tabs/tabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as l, openBlock as o, createElementBlock as n, renderSlot as s, createCommentVNode as c, createElementVNode as b, normalizeClass as p, Fragment as r } from "vue";
|
|
2
|
-
import { _ as d } from "../.chunks/forms-
|
|
2
|
+
import { _ as d } from "../.chunks/forms-727cc6aa.es.js";
|
|
3
3
|
import("../core/core.js").then((e) => {
|
|
4
4
|
const t = ["../assets/tabs.css"].map((a) => import.meta.resolve(a));
|
|
5
5
|
e.default.Page.addCss(t);
|
package/utils/date.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","../.chunks/forms-
|
|
1
|
+
define(["require","../.chunks/forms-771091d4.amd","vue"],function(i,u,e){"use strict";if(typeof e>"u")var e=window.Vue;return u.UtilsDate});
|
|
2
2
|
//# sourceMappingURL=date.amd.js.map
|
package/utils/date.d.ts
ADDED
package/utils/date.js
CHANGED
package/utils/device.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","../.chunks/forms-
|
|
1
|
+
define(["require","../.chunks/forms-771091d4.amd","vue"],function(i,u,e){"use strict";if(typeof e>"u")var e=window.Vue;return u.Device});
|
|
2
2
|
//# sourceMappingURL=device.amd.js.map
|
package/utils/device.js
CHANGED
package/utils/dom.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(["require","../.chunks/forms-
|
|
1
|
+
define(["require","../.chunks/forms-771091d4.amd","vue"],function(r,u,e){"use strict";if(typeof e>"u")var e=window.Vue;return u.DOM});
|
|
2
2
|
//# sourceMappingURL=dom.amd.js.map
|
package/utils/dom.d.ts
ADDED
package/utils/dom.js
CHANGED