@central-design-system/components 3.0.0-alpha.11 → 3.0.0-alpha.13
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 +12 -1
- package/dist/cds.es.js +6373 -4956
- package/dist/cds.umd.js +3 -3
- package/dist/components/CdsButton/CdsButton.vue.d.ts +80 -29
- package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +1 -1
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +62 -62
- package/dist/components/CdsContainer/CdsContainer.vue.d.ts +219 -0
- package/dist/components/CdsContainer/CdsContainerItem.vue.d.ts +69 -0
- package/dist/components/CdsContainer/index.d.ts +2 -0
- package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +1 -1
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +62 -62
- package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +119 -0
- package/dist/components/CdsExpandablePanel/CdsExpandablePanelContent.vue.d.ts +15 -0
- package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +55 -0
- package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +115 -0
- package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +31 -0
- package/dist/components/CdsExpandablePanel/composable/expandablePanels.d.ts +16 -0
- package/dist/components/CdsExpandablePanel/composable/index.d.ts +1 -0
- package/dist/components/CdsExpandablePanel/index.d.ts +4 -0
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +3 -3
- package/dist/components/CdsInput/CdsInput.vue.d.ts +10 -10
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
- package/dist/components/CdsList/CdsListItem.vue.d.ts +10 -10
- package/dist/components/CdsModal/CdsModal.vue.d.ts +781 -0
- package/dist/components/CdsModal/index.d.ts +1 -0
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +36 -36
- package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +162 -0
- package/dist/components/CdsSlideGroup/CdsSlideGroupItem.vue.d.ts +43 -0
- package/dist/components/CdsSlideGroup/index.d.ts +2 -0
- package/dist/components/CdsSlideGroup/utils/calculate.d.ts +14 -0
- package/dist/components/CdsSlideGroup/utils/index.d.ts +1 -0
- package/dist/components/CdsTable/CdsTable.vue.d.ts +2 -2
- package/dist/components/CdsTable/components/Table/InternalTable.d.ts +2 -2
- package/dist/components/CdsTable/components/TableProvider.d.ts +2 -2
- package/dist/components/CdsTable/composable/scroll.d.ts +4608 -0
- package/dist/components/CdsTabs/CdsTab.vue.d.ts +132 -0
- package/dist/components/CdsTabs/CdsTabs.vue.d.ts +216 -0
- package/dist/components/CdsTabs/index.d.ts +2 -0
- package/dist/components/CdsTabs/shared.d.ts +3 -0
- package/dist/components/CdsTabs/utils/helpers.d.ts +2 -0
- package/dist/components/CdsTabs/utils/index.d.ts +1 -0
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +36 -36
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +36 -36
- package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +1 -1
- package/dist/components/index.d.ts +17 -1
- package/dist/composable/align.d.ts +17 -0
- package/dist/composable/field.d.ts +2 -2
- package/dist/composable/group.d.ts +139 -0
- package/dist/composable/icon.d.ts +2 -2
- package/dist/composable/index.d.ts +3 -0
- package/dist/composable/resizeObserver.d.ts +1 -1
- package/dist/composable/ssrBoot.d.ts +6 -0
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/touch/index.d.ts +46 -0
- package/dist/globals.d.ts +5 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/transitions/index.d.ts +61 -0
- package/dist/transitions/modalTransition.d.ts +8 -0
- package/dist/utils/dom/anchor.d.ts +1 -1
- package/dist/utils/helpers.d.ts +9 -2
- package/package.json +3 -3
- package/src/scss/modules/_reset.scss +5 -0
- package/src/scss/modules/_transition.scss +48 -1
- package/src/scss/themes/index.ts +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare type TAlign = typeof allowedAlign[number];
|
|
3
|
+
export declare const allowedAlign: string[];
|
|
4
|
+
export interface IAlignProps {
|
|
5
|
+
align: TAlign;
|
|
6
|
+
}
|
|
7
|
+
export declare const makeAlignProps: <Defaults extends {
|
|
8
|
+
align?: unknown;
|
|
9
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
10
|
+
/**
|
|
11
|
+
* Выравнивание
|
|
12
|
+
*/
|
|
13
|
+
align: {
|
|
14
|
+
type: PropType<string>;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
}, Defaults>;
|
|
@@ -73,7 +73,7 @@ export declare const makeFieldProps: <Defaults extends {
|
|
|
73
73
|
* Иконка внутри элемента перед значением поля
|
|
74
74
|
*/
|
|
75
75
|
prependInnerIcon: {
|
|
76
|
-
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
76
|
+
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "checkbox-fill" | "checkbox" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
77
77
|
default: undefined;
|
|
78
78
|
validator: (value: TCdsIconsName) => boolean;
|
|
79
79
|
};
|
|
@@ -81,7 +81,7 @@ export declare const makeFieldProps: <Defaults extends {
|
|
|
81
81
|
* Иконка внутри элемента после значения поля
|
|
82
82
|
*/
|
|
83
83
|
appendInnerIcon: {
|
|
84
|
-
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
84
|
+
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "checkbox-fill" | "checkbox" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
85
85
|
default: undefined;
|
|
86
86
|
validator: (value: TCdsIconsName) => boolean;
|
|
87
87
|
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { ComponentInternalInstance, ComputedRef, ExtractPropTypes, InjectionKey, PropType, Ref } from 'vue';
|
|
2
|
+
import type { IDisabledProps } from '../composable';
|
|
3
|
+
export interface IGroupItem {
|
|
4
|
+
id: number;
|
|
5
|
+
value: Ref<unknown>;
|
|
6
|
+
disabled: Ref<boolean | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export interface IGroupProps {
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
modelValue: unknown;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
required?: boolean | 'force';
|
|
13
|
+
max?: number;
|
|
14
|
+
selectedClass: string | undefined;
|
|
15
|
+
'onUpdate:modelValue': ((val: unknown) => void) | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface IGroupProvide {
|
|
18
|
+
selected: Ref<Readonly<number[]>>;
|
|
19
|
+
selectedClass: Ref<string | undefined>;
|
|
20
|
+
items: ComputedRef<{
|
|
21
|
+
id: number;
|
|
22
|
+
value: unknown;
|
|
23
|
+
disabled: boolean | undefined;
|
|
24
|
+
}[]>;
|
|
25
|
+
disabled: Ref<boolean | undefined>;
|
|
26
|
+
register: (item: IGroupItem, instance: ComponentInternalInstance) => void;
|
|
27
|
+
unregister: (id: number) => void;
|
|
28
|
+
select: (id: number, value: boolean) => void;
|
|
29
|
+
isSelected: (id: number) => boolean;
|
|
30
|
+
prev: () => void;
|
|
31
|
+
next: () => void;
|
|
32
|
+
getItemIndex: (value: unknown) => number;
|
|
33
|
+
}
|
|
34
|
+
export interface IGroupItemProvide {
|
|
35
|
+
id: number;
|
|
36
|
+
isSelected: Ref<boolean>;
|
|
37
|
+
selectedClass: Ref<(string | undefined)[] | false>;
|
|
38
|
+
value: Ref<unknown>;
|
|
39
|
+
disabled: Ref<boolean | undefined>;
|
|
40
|
+
group: IGroupProvide;
|
|
41
|
+
select: (value: boolean) => void;
|
|
42
|
+
toggle: () => void;
|
|
43
|
+
}
|
|
44
|
+
export declare const makeGroupProps: <Defaults extends {
|
|
45
|
+
modelValue?: unknown;
|
|
46
|
+
multiple?: unknown;
|
|
47
|
+
required?: unknown;
|
|
48
|
+
max?: unknown;
|
|
49
|
+
selectedClass?: unknown;
|
|
50
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
51
|
+
/**
|
|
52
|
+
* Значение v-model
|
|
53
|
+
*/
|
|
54
|
+
modelValue: {
|
|
55
|
+
type: null;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Множественный выбор
|
|
60
|
+
*/
|
|
61
|
+
multiple: {
|
|
62
|
+
type: PropType<boolean>;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Обязательно должен быть выбран хотя бы один элемент
|
|
67
|
+
*/
|
|
68
|
+
required: {
|
|
69
|
+
type: PropType<boolean | "force">;
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Максимально допустимое количество выбранных элементов
|
|
74
|
+
*/
|
|
75
|
+
max: {
|
|
76
|
+
type: PropType<number>;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Классы для выбранных элементов
|
|
81
|
+
*/
|
|
82
|
+
selectedClass: {
|
|
83
|
+
type: PropType<string>;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
86
|
+
}, Defaults>;
|
|
87
|
+
export interface IGroupItemProps extends ExtractPropTypes<ReturnType<typeof makeGroupItemProps>> {
|
|
88
|
+
disabled: IDisabledProps['disabled'];
|
|
89
|
+
'onGroup:selected': ((value: {
|
|
90
|
+
value: boolean;
|
|
91
|
+
}) => void) | undefined;
|
|
92
|
+
}
|
|
93
|
+
export declare const makeGroupItemProps: <Defaults extends {
|
|
94
|
+
value?: unknown;
|
|
95
|
+
selectedClass?: unknown;
|
|
96
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
97
|
+
/**
|
|
98
|
+
* Значение элемента
|
|
99
|
+
*/
|
|
100
|
+
value: {
|
|
101
|
+
type: null;
|
|
102
|
+
default: undefined;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Классы для выбранных элементов
|
|
106
|
+
*/
|
|
107
|
+
selectedClass: {
|
|
108
|
+
type: PropType<string>;
|
|
109
|
+
default: undefined;
|
|
110
|
+
};
|
|
111
|
+
}, Defaults>;
|
|
112
|
+
export interface ISlideGroupProps extends ExtractPropTypes<ReturnType<typeof makeSlideGroupProps>> {
|
|
113
|
+
disabled: IDisabledProps['disabled'];
|
|
114
|
+
'onGroup:selected': ((value: {
|
|
115
|
+
value: boolean;
|
|
116
|
+
}) => void) | undefined;
|
|
117
|
+
}
|
|
118
|
+
export declare const makeSlideGroupProps: <Defaults extends {
|
|
119
|
+
centerActive?: unknown;
|
|
120
|
+
showArrows?: unknown;
|
|
121
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
122
|
+
/**
|
|
123
|
+
* Принудительно центрировать активный элемент
|
|
124
|
+
*/
|
|
125
|
+
centerActive: {
|
|
126
|
+
type: PropType<boolean>;
|
|
127
|
+
default: boolean;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Показывать стрелки для переключения между элементами
|
|
131
|
+
*/
|
|
132
|
+
showArrows: {
|
|
133
|
+
type: PropType<string | boolean>;
|
|
134
|
+
validator: (value: any) => boolean;
|
|
135
|
+
};
|
|
136
|
+
}, Defaults>;
|
|
137
|
+
export declare function useGroupItem(props: IGroupItemProps, injectKey: InjectionKey<IGroupProvide>, required?: true): IGroupItemProvide;
|
|
138
|
+
export declare function useGroupItem(props: IGroupItemProps, injectKey: InjectionKey<IGroupProvide>, required: false): IGroupItemProvide | null;
|
|
139
|
+
export declare function useGroup(props: IGroupProps, injectKey: InjectionKey<IGroupProvide>): IGroupProvide;
|
|
@@ -22,7 +22,7 @@ export declare const makeIconProps: <Defaults extends {
|
|
|
22
22
|
* Иконка в начале элемента
|
|
23
23
|
*/
|
|
24
24
|
prependIcon: {
|
|
25
|
-
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
25
|
+
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "checkbox-fill" | "checkbox" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
26
26
|
default: undefined;
|
|
27
27
|
validator: (value: TCdsIconsName) => boolean;
|
|
28
28
|
};
|
|
@@ -30,7 +30,7 @@ export declare const makeIconProps: <Defaults extends {
|
|
|
30
30
|
* Иконка в конце элемента
|
|
31
31
|
*/
|
|
32
32
|
appendIcon: {
|
|
33
|
-
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
33
|
+
type: PropType<"link" | "filters" | "search" | "add" | "alert-fill" | "alert" | "analog" | "arrow-down" | "arrow-left-bottom" | "arrow-left-top" | "arrow-left" | "arrow-right-bottom" | "arrow-right-top" | "arrow-right" | "arrow-up" | "arrows-vertical" | "calendar" | "card-bank" | "category" | "check-fill" | "check" | "checkbox-fill" | "checkbox" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chocolate-menu" | "clock" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "list-search" | "list" | "loader" | "location" | "locked" | "login" | "logout" | "menu" | "minus" | "notification" | "overflow-menu-horizontal" | "overflow-menu-vertical" | "password" | "pin" | "plus" | "printer" | "question-fill" | "question" | "refresh" | "remove" | "sandglass" | "save" | "settings" | "shopping-cart" | "sort-date" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
34
34
|
default: undefined;
|
|
35
35
|
validator: (value: TCdsIconsName) => boolean;
|
|
36
36
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './align';
|
|
1
2
|
export * from './text';
|
|
2
3
|
export * from './title';
|
|
3
4
|
export * from './link';
|
|
@@ -39,3 +40,5 @@ export * from './refs';
|
|
|
39
40
|
export * from './display';
|
|
40
41
|
export * from './state';
|
|
41
42
|
export * from './locale';
|
|
43
|
+
export * from './group';
|
|
44
|
+
export * from './ssrBoot';
|
|
@@ -3,5 +3,5 @@ interface IUseResizeObserver {
|
|
|
3
3
|
resizeRef: Ref<HTMLElement | undefined>;
|
|
4
4
|
contentRect: DeepReadonly<Ref<DOMRectReadOnly | undefined>>;
|
|
5
5
|
}
|
|
6
|
-
export declare function useResizeObserver(callback?: ResizeObserverCallback): IUseResizeObserver;
|
|
6
|
+
export declare function useResizeObserver(callback?: ResizeObserverCallback, box?: 'content' | 'border'): IUseResizeObserver;
|
|
7
7
|
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { DirectiveBinding } from 'vue';
|
|
2
|
+
export interface ITouchHandlers {
|
|
3
|
+
start?: (wrapperEvent: {
|
|
4
|
+
originalEvent: TouchEvent;
|
|
5
|
+
} & ITouchData) => void;
|
|
6
|
+
end?: (wrapperEvent: {
|
|
7
|
+
originalEvent: TouchEvent;
|
|
8
|
+
} & ITouchData) => void;
|
|
9
|
+
move?: (wrapperEvent: {
|
|
10
|
+
originalEvent: TouchEvent;
|
|
11
|
+
} & ITouchData) => void;
|
|
12
|
+
left?: (wrapper: ITouchData) => void;
|
|
13
|
+
right?: (wrapper: ITouchData) => void;
|
|
14
|
+
up?: (wrapper: ITouchData) => void;
|
|
15
|
+
down?: (wrapper: ITouchData) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface ITouchData {
|
|
18
|
+
touchstartX: number;
|
|
19
|
+
touchstartY: number;
|
|
20
|
+
touchmoveX: number;
|
|
21
|
+
touchmoveY: number;
|
|
22
|
+
touchendX: number;
|
|
23
|
+
touchendY: number;
|
|
24
|
+
offsetX: number;
|
|
25
|
+
offsetY: number;
|
|
26
|
+
}
|
|
27
|
+
export declare type TTouchWrapper = ITouchHandlers & ITouchData;
|
|
28
|
+
export interface ITouchValue extends ITouchHandlers {
|
|
29
|
+
parent?: boolean;
|
|
30
|
+
options?: AddEventListenerOptions;
|
|
31
|
+
}
|
|
32
|
+
export interface ITouchStoredHandlers {
|
|
33
|
+
touchstart: (event: TouchEvent) => void;
|
|
34
|
+
touchend: (event: TouchEvent) => void;
|
|
35
|
+
touchmove: (event: TouchEvent) => void;
|
|
36
|
+
}
|
|
37
|
+
export interface ITouchDirectiveBinding extends Omit<DirectiveBinding, 'value'> {
|
|
38
|
+
value?: ITouchValue;
|
|
39
|
+
}
|
|
40
|
+
declare function mounted(el: HTMLElement, binding: ITouchDirectiveBinding): void;
|
|
41
|
+
declare function unmounted(el: HTMLElement, binding: ITouchDirectiveBinding): void;
|
|
42
|
+
export declare const Touch: {
|
|
43
|
+
mounted: typeof mounted;
|
|
44
|
+
unmounted: typeof unmounted;
|
|
45
|
+
};
|
|
46
|
+
export default Touch;
|
package/dist/globals.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ITouchStoredHandlers } from './directives/touch';
|
|
2
|
+
|
|
1
3
|
declare global {
|
|
2
4
|
interface HTMLCollection {
|
|
3
5
|
[Symbol.iterator](): IterableIterator<Element>;
|
|
@@ -12,6 +14,9 @@ declare global {
|
|
|
12
14
|
}
|
|
13
15
|
| undefined
|
|
14
16
|
> & { lastMousedownWasOutside: boolean };
|
|
17
|
+
_touchHandlers?: {
|
|
18
|
+
[_uid: number]: ITouchStoredHandlers;
|
|
19
|
+
};
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
export const __VUE_OPTIONS_API__: boolean | undefined;
|
package/dist/locale/index.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ import type { TDateLocale } from '../utils';
|
|
|
3
3
|
export interface ILocale {
|
|
4
4
|
table: NTable.ILocale;
|
|
5
5
|
date: TDateLocale;
|
|
6
|
+
container: {
|
|
7
|
+
prev?: string;
|
|
8
|
+
next?: string;
|
|
9
|
+
};
|
|
6
10
|
}
|
|
7
11
|
export declare const availableLocale: readonly ["ru", "en"];
|
|
8
12
|
export declare type TAvailableLocale = typeof availableLocale[number];
|
|
@@ -12,6 +12,7 @@ export declare const CdsTransitionExpandX: import("vue").DefineComponent<{
|
|
|
12
12
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
mode: import("vue").Prop<"default" | "in-out" | "out-in", "default" | "in-out" | "out-in">;
|
|
14
14
|
}>>, {}>;
|
|
15
|
+
export { CdsTransitionModal } from './modalTransition';
|
|
15
16
|
export declare const CdsTransitionFade: import("vue").DefineComponent<{
|
|
16
17
|
group: import("vue").PropType<boolean>;
|
|
17
18
|
hideOnLeave: import("vue").PropType<boolean>;
|
|
@@ -252,3 +253,63 @@ export declare const CdsTransitionScale: import("vue").DefineComponent<{
|
|
|
252
253
|
mode: string;
|
|
253
254
|
origin: string;
|
|
254
255
|
}>;
|
|
256
|
+
export declare const CdsTransitionModalBottom: import("vue").DefineComponent<{
|
|
257
|
+
group: import("vue").PropType<boolean>;
|
|
258
|
+
hideOnLeave: import("vue").PropType<boolean>;
|
|
259
|
+
leaveAbsolute: import("vue").PropType<boolean>;
|
|
260
|
+
mode: {
|
|
261
|
+
type: import("vue").PropType<string>;
|
|
262
|
+
default: string | undefined;
|
|
263
|
+
};
|
|
264
|
+
origin: {
|
|
265
|
+
type: import("vue").PropType<string>;
|
|
266
|
+
default: string;
|
|
267
|
+
};
|
|
268
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
269
|
+
[key: string]: any;
|
|
270
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
271
|
+
group: import("vue").PropType<boolean>;
|
|
272
|
+
hideOnLeave: import("vue").PropType<boolean>;
|
|
273
|
+
leaveAbsolute: import("vue").PropType<boolean>;
|
|
274
|
+
mode: {
|
|
275
|
+
type: import("vue").PropType<string>;
|
|
276
|
+
default: string | undefined;
|
|
277
|
+
};
|
|
278
|
+
origin: {
|
|
279
|
+
type: import("vue").PropType<string>;
|
|
280
|
+
default: string;
|
|
281
|
+
};
|
|
282
|
+
}>>, {
|
|
283
|
+
mode: string;
|
|
284
|
+
origin: string;
|
|
285
|
+
}>;
|
|
286
|
+
export declare const CdsTransitionModalTop: import("vue").DefineComponent<{
|
|
287
|
+
group: import("vue").PropType<boolean>;
|
|
288
|
+
hideOnLeave: import("vue").PropType<boolean>;
|
|
289
|
+
leaveAbsolute: import("vue").PropType<boolean>;
|
|
290
|
+
mode: {
|
|
291
|
+
type: import("vue").PropType<string>;
|
|
292
|
+
default: string | undefined;
|
|
293
|
+
};
|
|
294
|
+
origin: {
|
|
295
|
+
type: import("vue").PropType<string>;
|
|
296
|
+
default: string;
|
|
297
|
+
};
|
|
298
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
299
|
+
[key: string]: any;
|
|
300
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
301
|
+
group: import("vue").PropType<boolean>;
|
|
302
|
+
hideOnLeave: import("vue").PropType<boolean>;
|
|
303
|
+
leaveAbsolute: import("vue").PropType<boolean>;
|
|
304
|
+
mode: {
|
|
305
|
+
type: import("vue").PropType<string>;
|
|
306
|
+
default: string | undefined;
|
|
307
|
+
};
|
|
308
|
+
origin: {
|
|
309
|
+
type: import("vue").PropType<string>;
|
|
310
|
+
default: string;
|
|
311
|
+
};
|
|
312
|
+
}>>, {
|
|
313
|
+
mode: string;
|
|
314
|
+
origin: string;
|
|
315
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export declare const CdsTransitionModal: import("vue").DefineComponent<{
|
|
3
|
+
target: PropType<HTMLElement>;
|
|
4
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
target: PropType<HTMLElement>;
|
|
8
|
+
}>>, {}>;
|
|
@@ -19,5 +19,5 @@ export declare function toPhysical(str: 'center' | Tblock | Tinline): "top" | "b
|
|
|
19
19
|
export declare function flipSide(anchor: ParsedAnchor): ParsedAnchor;
|
|
20
20
|
export declare function flipAlign(anchor: ParsedAnchor): ParsedAnchor;
|
|
21
21
|
export declare function flipCorner(anchor: ParsedAnchor): ParsedAnchor;
|
|
22
|
-
export declare function getAxis(anchor: ParsedAnchor): "
|
|
22
|
+
export declare function getAxis(anchor: ParsedAnchor): "y" | "x";
|
|
23
23
|
export {};
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentPublicInstance, ComputedGetter, PropType, Ref, ToRefs, VNodeProps, AllowedComponentProps, Component } from 'vue';
|
|
1
|
+
import type { ComponentPublicInstance, ComponentInternalInstance, ComputedGetter, InjectionKey, PropType, Ref, ToRefs, VNodeProps, VNodeChild, AllowedComponentProps, Component } from 'vue';
|
|
2
2
|
import type { TItemKey } from '../composable';
|
|
3
3
|
export declare const keyNames: Readonly<{
|
|
4
4
|
enter: "Enter";
|
|
@@ -33,6 +33,8 @@ export declare const classesStates: Readonly<{
|
|
|
33
33
|
readonly: "cds-state-readonly";
|
|
34
34
|
dragging: "cds-state-dragging";
|
|
35
35
|
}>;
|
|
36
|
+
export declare function keys<O extends {}>(o: O): (keyof O)[];
|
|
37
|
+
export declare function has<T extends string>(obj: object, key: T[]): obj is Record<T, unknown>;
|
|
36
38
|
export declare function isString(value: any): boolean;
|
|
37
39
|
export declare function isArray(value: any): boolean;
|
|
38
40
|
export declare function isSymbol(value: any): boolean;
|
|
@@ -80,7 +82,8 @@ export declare function deepEqual(a: any, b: any): boolean;
|
|
|
80
82
|
* Wrap value in array if it's not already an array
|
|
81
83
|
* @param value
|
|
82
84
|
*/
|
|
83
|
-
|
|
85
|
+
declare type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
86
|
+
export declare function wrapInArray<T>(value: T | T[] | null | undefined): T extends readonly any[] ? IfAny<T, T[], T> : NonNullable<T>[];
|
|
84
87
|
/**
|
|
85
88
|
* Get the nested value of an object at a given path.
|
|
86
89
|
* @param obj
|
|
@@ -141,6 +144,10 @@ export declare function padStart(string: number | string, targetLength: number,
|
|
|
141
144
|
export declare function pad(n: string | number, length?: number): string;
|
|
142
145
|
export declare function refElement<T extends Record<string, any> | undefined>(obj: T): Exclude<T, ComponentPublicInstance> | HTMLElement;
|
|
143
146
|
export declare function omit<T extends object, K extends keyof T>(obj: T, fields: K[]): Omit<T, K>;
|
|
147
|
+
export declare function findChildrenWithProvide(key: InjectionKey<any> | symbol, vnode?: VNodeChild | {
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}): ComponentInternalInstance[];
|
|
150
|
+
export declare function focusableChildren(el: Element): HTMLElement[];
|
|
144
151
|
/**
|
|
145
152
|
* Types
|
|
146
153
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@central-design-system/components",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.13",
|
|
4
4
|
"description": "Central Design System on the Vue 3.0 and TypeScript",
|
|
5
5
|
"author": "magersoft",
|
|
6
6
|
"license": "ISC",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"types": "./dist/cds.d.ts",
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "rimraf dist &&
|
|
30
|
-
"type-check": "npx vue-tsc --noEmit -p tsconfig.json --composite false",
|
|
29
|
+
"build": "rimraf dist && npm run type-check && vite build",
|
|
30
|
+
"type-check": "npx vue-tsc --noEmit -p tsconfig.build.json --composite false",
|
|
31
31
|
"bump": "npx bumpp",
|
|
32
32
|
"publish:alpha": "npm publish --tag next"
|
|
33
33
|
},
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
@import '../mixins/motion';
|
|
2
2
|
|
|
3
3
|
$standard-easing: map-get(map-get($easing, 'ease-in-out'), 'basic');
|
|
4
|
-
$
|
|
4
|
+
$decelerated-easing: map-get(map-get($easing, 'ease-out'), 'basic');
|
|
5
|
+
$accelerated-easing: map-get(map-get($easing, 'ease-in'), 'basic');
|
|
6
|
+
|
|
5
7
|
$accent-easting: map-get(map-get($easing, 'ease-in-out'), 'accent');
|
|
8
|
+
|
|
9
|
+
$standard-duration: $cds-duration-fast + ms;
|
|
6
10
|
$accent-duration: $cds-duration-normal + ms;
|
|
7
11
|
|
|
8
12
|
@mixin transition-default() {
|
|
@@ -154,3 +158,46 @@ $accent-duration: $cds-duration-normal + ms;
|
|
|
154
158
|
}
|
|
155
159
|
}
|
|
156
160
|
|
|
161
|
+
.modal-transition,
|
|
162
|
+
.modal-transition-bottom,
|
|
163
|
+
.modal-transition-top {
|
|
164
|
+
&-enter-active {
|
|
165
|
+
transition-duration: 225ms !important;
|
|
166
|
+
transition-timing-function: $decelerated-easing !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&-leave-active {
|
|
170
|
+
transition-duration: 125ms !important;
|
|
171
|
+
transition-timing-function: $accelerated-easing !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&-enter-active,
|
|
175
|
+
&-leave-active {
|
|
176
|
+
transition-property: transform, opacity !important;
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.modal-transition {
|
|
182
|
+
&-enter-from, &-leave-to {
|
|
183
|
+
transform: scale(0.9);
|
|
184
|
+
opacity: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&-enter-to, &-leave-from {
|
|
188
|
+
opacity: 1;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.modal-transition-bottom {
|
|
193
|
+
&-enter-from, &-leave-to {
|
|
194
|
+
transform: translateY(calc(50vh + 50%));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.modal-transition-top {
|
|
199
|
+
&-enter-from, &-leave-to {
|
|
200
|
+
transform: translateY(calc(-50vh - 50%));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|