@central-design-system/components 3.0.0-beta.2 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cds.css +1 -1
- package/dist/cds.es.js +3684 -3639
- package/dist/cds.umd.js +3 -3
- package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +29 -20
- package/dist/components/CdsButton/CdsButton.vue.d.ts +14 -14
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +72 -70
- package/dist/components/CdsContainer/CdsContainer.vue.d.ts +18 -18
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +101 -104
- package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +3 -3
- package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +10 -10
- package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +10 -10
- package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +2 -2
- 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/CdsNotification/CdsNotification.vue.d.ts +13 -13
- package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +13 -13
- package/dist/components/CdsNotification/composable/notification.d.ts +3 -3
- package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +11 -11
- package/dist/components/CdsPagination/CdsPagination.vue.d.ts +1 -1
- package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +10 -10
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +34 -34
- package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +18 -18
- package/dist/components/CdsSteps/CdsSteps.vue.d.ts +18 -18
- package/dist/components/CdsTable/components/Table/InternalTable.d.ts +1 -1
- package/dist/components/CdsTabs/CdsTab.vue.d.ts +10 -10
- package/dist/components/CdsTabs/CdsTabs.vue.d.ts +18 -18
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +34 -34
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +50 -50
- package/dist/components/CdsUploader/CdsUploader.vue.d.ts +25 -25
- package/dist/components/CdsUploader/components/AjaxUploader.d.ts +15 -15
- package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +15 -15
- package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +15 -15
- package/dist/components/CdsUploader/composable/upload.d.ts +6 -6
- package/dist/composable/field.d.ts +2 -2
- package/dist/composable/icon.d.ts +2 -2
- package/dist/composable/select.d.ts +12 -2
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/intersect/index.d.ts +19 -0
- package/dist/globals.d.ts +8 -0
- package/dist/utils/date/date.d.ts +12 -12
- package/dist/utils/helpers.d.ts +6 -0
- package/package.json +1 -1
- package/src/scss/themes/index.ts +1 -1
|
@@ -22,7 +22,7 @@ export declare const makeIconProps: <Defaults extends {
|
|
|
22
22
|
* Иконка в начале элемента
|
|
23
23
|
*/
|
|
24
24
|
prependIcon: {
|
|
25
|
-
type: PropType<"search" | "link" | "list" | "filters" | "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" | "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" | "source" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
25
|
+
type: PropType<"search" | "link" | "list" | "filters" | "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" | "chocholate-menu" | "chocolate-menu" | "clock" | "collapse" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "expand" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "insert" | "list-search" | "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" | "source" | "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<"search" | "link" | "list" | "filters" | "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" | "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" | "source" | "star-fill" | "star" | "telegram" | "timer" | "tool" | "truck" | "unlocked" | "upload" | "user-avatar" | "user-group" | "visibility-off" | "visibility-on" | "vk" | "winner" | "workspace" | "youtube">;
|
|
33
|
+
type: PropType<"search" | "link" | "list" | "filters" | "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" | "chocholate-menu" | "chocolate-menu" | "clock" | "collapse" | "comment" | "company" | "compare" | "copy" | "data-cards" | "delete" | "directory" | "doc-download" | "doc" | "download" | "draggable" | "edit" | "enter" | "error-fill" | "error" | "expand" | "external" | "facebook-fill" | "facebook" | "flag" | "funnel" | "globe" | "infinity" | "info-fill" | "info" | "insert" | "list-search" | "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" | "source" | "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
|
};
|
|
@@ -15,6 +15,7 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
15
15
|
hideSelected?: unknown;
|
|
16
16
|
hideNoData?: unknown;
|
|
17
17
|
isSelectAll?: unknown;
|
|
18
|
+
ellipsis?: unknown;
|
|
18
19
|
listProps?: unknown;
|
|
19
20
|
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
20
21
|
/**
|
|
@@ -52,6 +53,13 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
52
53
|
type: PropType<boolean>;
|
|
53
54
|
default: boolean;
|
|
54
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Отображать элементы выбранного списка в одну строку
|
|
58
|
+
*/
|
|
59
|
+
ellipsis: {
|
|
60
|
+
type: PropType<boolean>;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
55
63
|
/**
|
|
56
64
|
* Свойства для списка
|
|
57
65
|
*/
|
|
@@ -115,7 +123,7 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
115
123
|
};
|
|
116
124
|
itemValue: {
|
|
117
125
|
/**
|
|
118
|
-
*
|
|
126
|
+
* Отображать элементы выбранного списка в одну строку
|
|
119
127
|
*/
|
|
120
128
|
type: PropType<import("./items").TItemKey>;
|
|
121
129
|
default: string;
|
|
@@ -141,7 +149,9 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
141
149
|
"onUpdate:opened"?: ((value: unknown[]) => any) | undefined;
|
|
142
150
|
"onClick:open"?: ((value: {
|
|
143
151
|
id: unknown;
|
|
144
|
-
value: boolean;
|
|
152
|
+
value: boolean; /**
|
|
153
|
+
* Свойства для списка
|
|
154
|
+
*/
|
|
145
155
|
path: unknown[];
|
|
146
156
|
event: Event;
|
|
147
157
|
}) => any) | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DirectiveBinding } from 'vue';
|
|
2
|
+
declare type ObserveHandler = (isIntersecting: boolean, entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;
|
|
3
|
+
export interface ObserverDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
|
|
4
|
+
value?: ObserveHandler | {
|
|
5
|
+
handler: ObserveHandler;
|
|
6
|
+
options?: IntersectionObserverInit;
|
|
7
|
+
};
|
|
8
|
+
modifiers: {
|
|
9
|
+
once?: boolean;
|
|
10
|
+
quiet?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare function mounted(el: HTMLElement, binding: ObserverDirectiveBinding): void;
|
|
14
|
+
declare function unmounted(el: HTMLElement, binding: ObserverDirectiveBinding): void;
|
|
15
|
+
export declare const Intersect: {
|
|
16
|
+
mounted: typeof mounted;
|
|
17
|
+
unmounted: typeof unmounted;
|
|
18
|
+
};
|
|
19
|
+
export default Intersect;
|
package/dist/globals.d.ts
CHANGED
|
@@ -17,6 +17,14 @@ declare global {
|
|
|
17
17
|
_touchHandlers?: {
|
|
18
18
|
[_uid: number]: ITouchStoredHandlers;
|
|
19
19
|
};
|
|
20
|
+
_observe?: Record<
|
|
21
|
+
number,
|
|
22
|
+
| {
|
|
23
|
+
init: boolean;
|
|
24
|
+
observer: IntersectionObserver;
|
|
25
|
+
}
|
|
26
|
+
| undefined
|
|
27
|
+
>;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
export const __VUE_OPTIONS_API__: boolean | undefined;
|
|
@@ -30,21 +30,21 @@ export declare type TDateLocale = {
|
|
|
30
30
|
* @param __forcedYear
|
|
31
31
|
* @param __forcedTimezoneOffset
|
|
32
32
|
*/
|
|
33
|
-
export declare function formatDate(value: any, mask: string, dateLocale
|
|
33
|
+
export declare function formatDate(value: any, mask: string, dateLocale?: TDateLocale, __forcedYear?: number, __forcedTimezoneOffset?: number): string | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Set a specific year, month and day to a date.
|
|
36
36
|
* @param date
|
|
37
37
|
* @param rawModified
|
|
38
38
|
* @param utc
|
|
39
39
|
*/
|
|
40
|
-
export declare function adjustDate(date: Date, rawModified: IRawDate, utc
|
|
40
|
+
export declare function adjustDate(date: Date, rawModified: IRawDate, utc?: boolean): Date;
|
|
41
41
|
/**
|
|
42
42
|
* Parse any string into a date object based on the format passed.
|
|
43
43
|
* @param str
|
|
44
44
|
* @param mask
|
|
45
45
|
* @param dateLocale
|
|
46
46
|
*/
|
|
47
|
-
export declare function extractDate(str: string, mask: string, dateLocale
|
|
47
|
+
export declare function extractDate(str: string, mask: string, dateLocale?: TDateLocale): Date;
|
|
48
48
|
/**
|
|
49
49
|
* Split date by mask.
|
|
50
50
|
* @param str
|
|
@@ -57,13 +57,13 @@ export declare function splitDate(str?: string | any, mask?: string, dateLocale?
|
|
|
57
57
|
* Check a date string for validity.
|
|
58
58
|
* @param date
|
|
59
59
|
*/
|
|
60
|
-
export declare function
|
|
60
|
+
export declare function isValidDate(date: any): boolean;
|
|
61
61
|
/**
|
|
62
62
|
* The following method is just a wrapper to help you in cases where you just need current time but with a different year, or month, or second etc.
|
|
63
63
|
* @param modified
|
|
64
64
|
* @param utc
|
|
65
65
|
*/
|
|
66
|
-
export declare function buildDate(modified: IRawDate, utc
|
|
66
|
+
export declare function buildDate(modified: IRawDate, utc?: boolean): Date;
|
|
67
67
|
/**
|
|
68
68
|
* Get the day number in week for a given date.
|
|
69
69
|
* @param date
|
|
@@ -86,10 +86,10 @@ export declare function getDayOfYear(date: Date): number | undefined;
|
|
|
86
86
|
* @param to
|
|
87
87
|
* @param opts
|
|
88
88
|
*/
|
|
89
|
-
export declare function isBetweenDates(date: Date, from: Date, to: Date, opts
|
|
90
|
-
onlyDate
|
|
91
|
-
inclusiveFrom
|
|
92
|
-
inclusiveTo
|
|
89
|
+
export declare function isBetweenDates(date: Date, from: Date, to: Date, opts?: {
|
|
90
|
+
onlyDate?: boolean;
|
|
91
|
+
inclusiveFrom?: boolean;
|
|
92
|
+
inclusiveTo?: boolean;
|
|
93
93
|
}): boolean;
|
|
94
94
|
/**
|
|
95
95
|
* Add a given date/time unit from a given date.
|
|
@@ -164,11 +164,11 @@ export declare function daysInMonth(date: Date): number;
|
|
|
164
164
|
* Cloning date object.
|
|
165
165
|
* @param date
|
|
166
166
|
*/
|
|
167
|
-
export declare function
|
|
167
|
+
export declare function cloneDate(date: Date): Date;
|
|
168
168
|
declare const _default: {
|
|
169
169
|
formatDate: typeof formatDate;
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
cloneDate: typeof cloneDate;
|
|
171
|
+
isValidDate: typeof isValidDate;
|
|
172
172
|
buildDate: typeof buildDate;
|
|
173
173
|
getDayOfWeek: typeof getDayOfWeek;
|
|
174
174
|
getWeekOfYear: typeof getWeekOfYear;
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -163,6 +163,12 @@ export declare function matchesSelector<T>(el: T | Element | undefined, selector
|
|
|
163
163
|
* @param delay
|
|
164
164
|
*/
|
|
165
165
|
export declare function debounce(fn: Function, delay: number): (...args: any[]) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Pluralize a word based on a number.
|
|
168
|
+
* @param n
|
|
169
|
+
* @param opts
|
|
170
|
+
*/
|
|
171
|
+
export declare function plurals(n: number, opts: string[]): string;
|
|
166
172
|
export declare function noop(): void;
|
|
167
173
|
/**
|
|
168
174
|
* Types
|
package/package.json
CHANGED