@central-design-system/components 3.0.0-beta.2 → 3.0.0-beta.4

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.
Files changed (52) hide show
  1. package/dist/cds.css +1 -1
  2. package/dist/cds.d.ts +2 -0
  3. package/dist/cds.es.js +4333 -4210
  4. package/dist/cds.umd.js +3 -3
  5. package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +29 -20
  6. package/dist/components/CdsButton/CdsButton.vue.d.ts +14 -14
  7. package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +72 -70
  8. package/dist/components/CdsContainer/CdsContainer.vue.d.ts +18 -18
  9. package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +55 -0
  10. package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +212 -0
  11. package/dist/components/CdsContentSwitcher/index.d.ts +2 -0
  12. package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +101 -104
  13. package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +3 -3
  14. package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +10 -10
  15. package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +10 -10
  16. package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +2 -2
  17. package/dist/components/CdsIcon/CdsIcon.vue.d.ts +3 -3
  18. package/dist/components/CdsInput/CdsInput.vue.d.ts +10 -10
  19. package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
  20. package/dist/components/CdsList/CdsListItem.vue.d.ts +10 -10
  21. package/dist/components/CdsNotification/CdsNotification.vue.d.ts +13 -13
  22. package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +13 -13
  23. package/dist/components/CdsNotification/composable/notification.d.ts +3 -3
  24. package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +11 -11
  25. package/dist/components/CdsPagination/CdsPagination.vue.d.ts +1 -1
  26. package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +10 -10
  27. package/dist/components/CdsSelect/CdsSelect.vue.d.ts +34 -34
  28. package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +18 -18
  29. package/dist/components/CdsSteps/CdsSteps.vue.d.ts +18 -18
  30. package/dist/components/CdsTable/components/Table/InternalTable.d.ts +1 -1
  31. package/dist/components/CdsTabs/CdsTab.vue.d.ts +10 -10
  32. package/dist/components/CdsTabs/CdsTabs.vue.d.ts +35 -35
  33. package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +34 -34
  34. package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +50 -50
  35. package/dist/components/CdsUploader/CdsUploader.vue.d.ts +25 -25
  36. package/dist/components/CdsUploader/components/AjaxUploader.d.ts +15 -15
  37. package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +15 -15
  38. package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +15 -15
  39. package/dist/components/CdsUploader/composable/upload.d.ts +6 -6
  40. package/dist/components/index.d.ts +3 -0
  41. package/dist/composable/field.d.ts +2 -2
  42. package/dist/composable/icon.d.ts +2 -2
  43. package/dist/composable/select.d.ts +12 -2
  44. package/dist/composable/tag.d.ts +0 -3
  45. package/dist/directives/index.d.ts +1 -0
  46. package/dist/directives/intersect/index.d.ts +19 -0
  47. package/dist/globals.d.ts +8 -0
  48. package/dist/utils/date/date.d.ts +12 -12
  49. package/dist/utils/helpers.d.ts +6 -0
  50. package/package.json +1 -1
  51. package/src/scss/modules/grid/_mixins.scss +4 -2
  52. 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;
@@ -1,7 +1,4 @@
1
1
  import type { PropType } from 'vue';
2
- export interface ITagProps {
3
- tag: string;
4
- }
5
2
  export declare const makeTagProps: <Defaults extends {
6
3
  tag?: unknown;
7
4
  } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
@@ -1,2 +1,3 @@
1
1
  export { ClickOutside } from './click-outside';
2
2
  export { Touch } from './touch';
3
+ export { Intersect } from './intersect';
@@ -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: TDateLocale, __forcedYear: number, __forcedTimezoneOffset: number): string | undefined;
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: boolean): Date;
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: TDateLocale): Date;
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 isValid(date: any): boolean;
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: boolean): Date;
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: boolean;
91
- inclusiveFrom: boolean;
92
- inclusiveTo: boolean;
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 clone(date: Date): Date;
167
+ export declare function cloneDate(date: Date): Date;
168
168
  declare const _default: {
169
169
  formatDate: typeof formatDate;
170
- clone: typeof clone;
171
- isValid: typeof isValid;
170
+ cloneDate: typeof cloneDate;
171
+ isValidDate: typeof isValidDate;
172
172
  buildDate: typeof buildDate;
173
173
  getDayOfWeek: typeof getDayOfWeek;
174
174
  getWeekOfYear: typeof getWeekOfYear;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@central-design-system/components",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "Central Design System on the Vue 3.0 and TypeScript",
5
5
  "author": "magersoft",
6
6
  "license": "ISC",
@@ -188,10 +188,12 @@
188
188
 
189
189
  .#{$prefix}-col-auto,
190
190
  .#{$prefix}-col#{$infix}-auto {
191
- width: auto;
191
+ @include -make-col-ready($gutter);
192
+
192
193
  // Reset earlier grid tiers
194
+ width: auto;
193
195
  max-width: 100%;
194
- flex: 1 0 0;
196
+ flex: 0 0 auto;
195
197
  }
196
198
 
197
199
  @for $i from 0 through $columns {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Automatically generated by CDS CLI
3
- * Generated on 10/9/2023, 12:35:35 PM
3
+ * Generated on 10/18/2023, 11:05:39 AM
4
4
  **/
5
5
 
6
6
  /**