@central-design-system/components 3.0.0-alpha.1 → 3.0.0-alpha.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.
Files changed (74) hide show
  1. package/dist/cds.css +1 -1
  2. package/dist/cds.d.ts +9 -3
  3. package/dist/cds.es.js +6646 -3569
  4. package/dist/cds.umd.js +1 -1
  5. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +64 -0
  6. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +54 -0
  7. package/dist/components/CdsBreadcrumbs/index.d.ts +2 -0
  8. package/dist/components/CdsButton/CdsButton.vue.d.ts +13 -13
  9. package/dist/components/CdsButton/index.d.ts +1 -0
  10. package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +56 -24
  11. package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +34 -12
  12. package/dist/components/CdsCheckbox/index.d.ts +2 -0
  13. package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +2515 -0
  14. package/dist/components/CdsCombobox/composable/highlight.d.ts +12 -0
  15. package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +276 -0
  16. package/dist/components/CdsDatePicker/composable/calendar.d.ts +315 -0
  17. package/dist/components/CdsDatePicker/composable/index.d.ts +1 -0
  18. package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +22 -6
  19. package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +2334 -0
  20. package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +54 -0
  21. package/dist/components/CdsForm/CdsForm.vue.d.ts +13 -3
  22. package/dist/components/CdsGrid/CdsCol.vue.d.ts +1 -1
  23. package/dist/components/CdsIcon/CdsIcon.vue.d.ts +3 -3
  24. package/dist/components/CdsInput/CdsInput.vue.d.ts +29 -23
  25. package/dist/components/CdsLink/CdsLink.vue.d.ts +10 -3
  26. package/dist/components/CdsLink/index.d.ts +1 -0
  27. package/dist/components/CdsList/CdsList.vue.d.ts +47 -6
  28. package/dist/components/CdsList/CdsListGroup.vue.d.ts +8 -8
  29. package/dist/components/CdsList/CdsListItem.vue.d.ts +28 -25
  30. package/dist/components/CdsLoader/CdsLoader.vue.d.ts +1 -1
  31. package/dist/components/CdsMenu/CdsMenu.vue.d.ts +127 -28
  32. package/dist/components/CdsMenu/index.d.ts +1 -0
  33. package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +46 -23
  34. package/dist/components/CdsOverlay/index.d.ts +1 -0
  35. package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +42 -14
  36. package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +42 -14
  37. package/dist/components/CdsSelect/CdsSelect.vue.d.ts +165 -86
  38. package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +23 -18
  39. package/dist/components/CdsStages/CdsStages.vue.d.ts +2 -2
  40. package/dist/components/CdsTag/CdsTag.vue.d.ts +11 -6
  41. package/dist/components/CdsTag/index.d.ts +1 -0
  42. package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +171 -87
  43. package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +195 -70
  44. package/dist/components/CdsTextInput/index.d.ts +1 -0
  45. package/dist/components/index.d.ts +7 -1
  46. package/dist/composable/color.d.ts +4 -2
  47. package/dist/composable/datetime.d.ts +76 -0
  48. package/dist/composable/delay.d.ts +1 -1
  49. package/dist/composable/field.d.ts +4 -3
  50. package/dist/composable/filter.d.ts +52 -0
  51. package/dist/composable/form.d.ts +2 -0
  52. package/dist/composable/hidration.d.ts +2 -1
  53. package/dist/composable/icon.d.ts +2 -2
  54. package/dist/composable/index.d.ts +6 -0
  55. package/dist/composable/input.d.ts +5 -3
  56. package/dist/composable/items.d.ts +2 -0
  57. package/dist/composable/lazy.d.ts +12 -2
  58. package/dist/composable/menu.d.ts +37 -0
  59. package/dist/composable/overlay.d.ts +8 -9
  60. package/dist/composable/router.d.ts +3 -0
  61. package/dist/composable/select.d.ts +86 -0
  62. package/dist/composable/title.d.ts +21 -0
  63. package/dist/composable/validation.d.ts +0 -8
  64. package/dist/locale/index.d.ts +12 -0
  65. package/dist/locale/ru.d.ts +3 -0
  66. package/dist/transitions/index.d.ts +150 -0
  67. package/dist/utils/anchor.d.ts +1 -1
  68. package/dist/utils/cache.d.ts +4 -0
  69. package/dist/utils/date.d.ts +181 -0
  70. package/dist/utils/helpers.d.ts +68 -19
  71. package/dist/utils/index.d.ts +2 -0
  72. package/package.json +3 -2
  73. package/src/scss/modules/_transition.scss +102 -0
  74. package/src/scss/themes/index.ts +1 -1
@@ -0,0 +1 @@
1
+ export { default as CdsTextInput } from './CdsTextInput.vue';
@@ -1,12 +1,18 @@
1
1
  /**
2
2
  * Automatically generated by CDS CLI
3
- * Generated on 4/24/2023, 2:59:08 PM
3
+ * Generated on 5/10/2023, 7:16:03 PM
4
4
  **/
5
5
  export { default as CdsBadge } from './CdsBadge/CdsBadge.vue';
6
+ export { default as CdsBreadcrumbs } from './CdsBreadcrumbs/CdsBreadcrumbs.vue';
7
+ export { default as CdsBreadcrumbsItem } from './CdsBreadcrumbs/CdsBreadcrumbsItem.vue';
6
8
  export { default as CdsButton } from './CdsButton/CdsButton.vue';
7
9
  export { default as CdsCheckbox } from './CdsCheckbox/CdsCheckbox.vue';
8
10
  export { default as CdsCheckboxGroup } from './CdsCheckbox/CdsCheckboxGroup.vue';
11
+ export { default as CdsCombobox } from './CdsCombobox/CdsCombobox.vue';
12
+ export { default as CdsDatePicker } from './CdsDatePicker/CdsDatePicker.vue';
9
13
  export { default as CdsDrawer } from './CdsDrawer/CdsDrawer.vue';
14
+ export { default as CdsDropdown } from './CdsDropdown/CdsDropdown.vue';
15
+ export { default as CdsEmptyState } from './CdsEmptyState/CdsEmptyState.vue';
10
16
  export { default as CdsForm } from './CdsForm/CdsForm.vue';
11
17
  export { default as CdsCol } from './CdsGrid/CdsCol.vue';
12
18
  export { default as CdsGrid } from './CdsGrid/CdsGrid.vue';
@@ -1,4 +1,4 @@
1
- import { ComputedRef, PropType } from 'vue';
1
+ import type { ComputedRef, PropType } from 'vue';
2
2
  export declare type TColor = typeof allowedColor[number];
3
3
  export declare type IColorProps = {
4
4
  color: TColor | undefined;
@@ -10,11 +10,13 @@ export declare const allowedColor: readonly ["yellow", "light-blue", "blue", "de
10
10
  export declare const makeColorProps: <Defaults extends {
11
11
  color?: unknown;
12
12
  } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
13
+ /**
14
+ * Цвет
15
+ */
13
16
  color: {
14
17
  type: PropType<"yellow" | "light-blue" | "blue" | "deep-purple" | "purple" | "pink">;
15
18
  available: readonly ["yellow", "light-blue", "blue", "deep-purple", "purple", "pink"];
16
19
  default: undefined;
17
- description: string;
18
20
  validator: (value: TColor) => boolean;
19
21
  };
20
22
  }, Defaults>;
@@ -0,0 +1,76 @@
1
+ import type { IRawDate, TDateLocale } from '../utils';
2
+ import type { ComputedRef, PropType } from 'vue';
3
+ export interface IDatetimeProps {
4
+ modelValue: string | TDatetimeValueRange | Array<string | TDatetimeValueRange>;
5
+ mask: string;
6
+ locale: TDateLocale;
7
+ readonly: boolean;
8
+ disabled: boolean;
9
+ }
10
+ export interface IUseDatetime {
11
+ editable: ComputedRef<boolean>;
12
+ tabindex: ComputedRef<number>;
13
+ getCurrentDate: (dateOnly?: boolean) => IRawDate;
14
+ getShortDate: (date: IRawDate) => Partial<IRawDate>;
15
+ getLocale: () => TDateLocale;
16
+ getMask: () => string;
17
+ decodeString: (date: string) => IRawDate;
18
+ }
19
+ export declare type TDatetimeValueRange = {
20
+ from: string | IRawDate;
21
+ to: string | IRawDate;
22
+ target?: string | IRawDate;
23
+ };
24
+ export declare const makeDatetimeProps: <Defaults extends {
25
+ modelValue?: unknown;
26
+ mask?: unknown;
27
+ locale?: unknown;
28
+ readonly?: unknown;
29
+ disabled?: unknown;
30
+ } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
31
+ /**
32
+ * Значение модели
33
+ */
34
+ modelValue: {
35
+ type: PropType<string | TDatetimeValueRange | (string | TDatetimeValueRange)[]>;
36
+ default: null;
37
+ };
38
+ /**
39
+ * Формат даты/времени
40
+ */
41
+ mask: {
42
+ type: PropType<string>;
43
+ default: string;
44
+ };
45
+ /**
46
+ * Локализация компонента
47
+ */
48
+ locale: {
49
+ type: PropType<{
50
+ days: string[];
51
+ daysShort: string[];
52
+ months: string[];
53
+ monthsLong: string[];
54
+ monthsShort: string[];
55
+ firstDayOfWeek: number;
56
+ format24h: boolean;
57
+ pluralDay: (day?: number | undefined) => string;
58
+ }>;
59
+ default: null;
60
+ };
61
+ /**
62
+ * Только для чтения
63
+ */
64
+ readonly: {
65
+ type: PropType<boolean>;
66
+ default: boolean;
67
+ };
68
+ /**
69
+ * Заблокированный
70
+ */
71
+ disabled: {
72
+ type: PropType<boolean>;
73
+ default: boolean;
74
+ };
75
+ }, Defaults>;
76
+ export declare function useDatetime(props: IDatetimeProps): IUseDatetime;
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import type { PropType } from 'vue';
2
2
  export interface IDelayProps {
3
3
  closeDelay: number | string;
4
4
  openDelay: number | string;
@@ -12,6 +12,7 @@ export interface IFieldProps {
12
12
  type: TFieldTypes | undefined;
13
13
  placeholder: string | undefined;
14
14
  counter: boolean;
15
+ limit: number | undefined;
15
16
  clearable: boolean;
16
17
  'onClick:appendInner': EventProp | undefined;
17
18
  'onClick:prependInner': EventProp | undefined;
@@ -72,7 +73,7 @@ export declare const makeFieldProps: <Defaults extends {
72
73
  * Иконка внутри элемента перед значением поля
73
74
  */
74
75
  prependInnerIcon: {
75
- type: PropType<"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" | "filters" | "flag" | "globe" | "infinity" | "info-fill" | "info" | "link" | "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" | "search" | "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" | "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" | "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
77
  default: undefined;
77
78
  validator: (value: TCdsIconsName) => boolean;
78
79
  };
@@ -80,7 +81,7 @@ export declare const makeFieldProps: <Defaults extends {
80
81
  * Иконка внутри элемента после значения поля
81
82
  */
82
83
  appendInnerIcon: {
83
- type: PropType<"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" | "filters" | "flag" | "globe" | "infinity" | "info-fill" | "info" | "link" | "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" | "search" | "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" | "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" | "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
85
  default: undefined;
85
86
  validator: (value: TCdsIconsName) => boolean;
86
87
  };
@@ -88,7 +89,7 @@ export declare const makeFieldProps: <Defaults extends {
88
89
  * Тип поля
89
90
  */
90
91
  type: {
91
- type: PropType<"number" | "password" | "text" | "email" | "tel" | "url">;
92
+ type: PropType<"number" | "text" | "password" | "email" | "tel" | "url">;
92
93
  default: string;
93
94
  validator: (value: TFieldTypes) => boolean;
94
95
  };
@@ -0,0 +1,52 @@
1
+ import type { IInternalItem } from './items';
2
+ import type { MaybeRef } from '../utils';
3
+ import type { PropType, Ref } from 'vue';
4
+ export declare type TFilterMath = boolean | number | [number, number] | [number, number][];
5
+ export interface IFilterProps {
6
+ customFilter?: TFilterFunction;
7
+ customKeyFilter?: TFilterKeyFunctions;
8
+ filterKeys?: TFilterKeys;
9
+ filterMode?: TFilterMode;
10
+ noFilter?: boolean;
11
+ }
12
+ export interface IUseFilter<T> {
13
+ getMatches: (item: T) => Record<string, TFilterMath> | undefined;
14
+ filteredItems: Ref<T[]>;
15
+ filteredMatches: Ref<Map<unknown, Record<string, TFilterMath>>>;
16
+ }
17
+ export declare const makeFilterProps: <Defaults extends {
18
+ customFilter?: unknown;
19
+ customKeyFilter?: unknown;
20
+ filterKeys?: unknown;
21
+ filterMode?: unknown;
22
+ noFilter?: unknown;
23
+ } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
24
+ customFilter: {
25
+ type: PropType<TFilterFunction>;
26
+ default: null;
27
+ };
28
+ customKeyFilter: {
29
+ type: PropType<TFilterKeyFunctions>;
30
+ default: null;
31
+ };
32
+ filterKeys: {
33
+ type: PropType<TFilterKeys>;
34
+ default: string;
35
+ };
36
+ filterMode: {
37
+ type: PropType<TFilterMode>;
38
+ default: string;
39
+ };
40
+ noFilter: {
41
+ type: PropType<boolean>;
42
+ default: boolean;
43
+ };
44
+ }, Defaults>;
45
+ export declare function useFilter<T extends IInternalItem>(props: IFilterProps, items: MaybeRef<T[]>, query: Ref<string | number | undefined>, options?: {
46
+ filterKeys?: MaybeRef<TFilterKeys>;
47
+ }): IUseFilter<T>;
48
+ declare type TFilterFunction = (value: string, query: string, item?: any) => TFilterMath;
49
+ declare type TFilterKeyFunctions = Record<string, TFilterFunction>;
50
+ declare type TFilterKeys = string | string[];
51
+ declare type TFilterMode = 'some' | 'every' | 'union' | 'intersection';
52
+ export {};
@@ -17,6 +17,8 @@ export interface IFormProvide {
17
17
  validateOn: Ref<IFormProps['validateOn']>;
18
18
  }
19
19
  export interface IFormProps {
20
+ label: string;
21
+ description: string;
20
22
  disabled: boolean;
21
23
  readonly: boolean;
22
24
  firstFail: boolean;
@@ -1 +1,2 @@
1
- export declare function useHydration(): import("vue").Ref<boolean>;
1
+ import type { Ref } from 'vue';
2
+ export declare function useHydration(): Ref<boolean>;
@@ -22,7 +22,7 @@ export declare const makeIconProps: <Defaults extends {
22
22
  * Иконка в начале элемента
23
23
  */
24
24
  prependIcon: {
25
- type: PropType<"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" | "filters" | "flag" | "globe" | "infinity" | "info-fill" | "info" | "link" | "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" | "search" | "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" | "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" | "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<"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" | "filters" | "flag" | "globe" | "infinity" | "info-fill" | "info" | "link" | "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" | "search" | "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" | "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" | "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,4 +1,5 @@
1
1
  export * from './text';
2
+ export * from './title';
2
3
  export * from './link';
3
4
  export * from './icon';
4
5
  export * from './loading';
@@ -27,3 +28,8 @@ export * from './delay';
27
28
  export * from './dimensions';
28
29
  export * from './hidration';
29
30
  export * from './scopeId';
31
+ export * from './router';
32
+ export * from './select';
33
+ export * from './filter';
34
+ export * from './menu';
35
+ export * from './datetime';
@@ -16,6 +16,8 @@ export interface IInputProps {
16
16
  label: string | undefined;
17
17
  description: string | undefined;
18
18
  value: any;
19
+ messages: string[] | string;
20
+ persistentMessages: boolean;
19
21
  }
20
22
  export interface IUseInput {
21
23
  id: ComputedRef<string>;
@@ -74,9 +76,9 @@ export declare const makeInputProps: <Defaults extends {
74
76
  };
75
77
  }, Defaults>;
76
78
  export declare function useInput(props: IInputProps, slots: Record<string, unknown>, name?: string): IUseInput;
77
- export declare function useFilteredInputProps(props: Record<string, unknown>, exclude: string[]): {
78
- inputProps: Ref<{}>;
79
- excludedProps: Ref<{}>;
79
+ export declare function useFilteredInputProps<T extends Record<string, unknown>>(props: T, exclude: string[]): {
80
+ inputProps: [Partial<T>] extends [Ref<any>] ? Ref<any> & Partial<T> : Ref<import("vue").UnwrapRef<Partial<T>>>;
81
+ excludedProps: [Partial<T>] extends [Ref<any>] ? Ref<any> & Partial<T> : Ref<import("vue").UnwrapRef<Partial<T>>>;
80
82
  };
81
83
  export declare function useFilteredInputAttrs(attrs: Record<string, unknown>): {
82
84
  rootAttrs: Ref<{}>;
@@ -22,6 +22,8 @@ export interface IItemsProps {
22
22
  export interface IUseItems {
23
23
  items: ComputedRef<IInternalItem[]>;
24
24
  itemsProps: string[];
25
+ transformIn: (value: any[]) => IInternalItem[];
26
+ transformOut: (value: any[]) => any[];
25
27
  }
26
28
  export declare const makeItemsProps: <Defaults extends {
27
29
  items?: unknown;
@@ -1,5 +1,4 @@
1
- import { ComputedRef } from 'vue';
2
- import type { Ref } from 'vue';
1
+ import type { Ref, ComputedRef, PropType } from 'vue';
3
2
  export interface ILazyProps {
4
3
  eager: boolean;
5
4
  }
@@ -8,4 +7,15 @@ export interface IUseLazy {
8
7
  hasContent: ComputedRef<boolean>;
9
8
  onAfterLeave: () => void;
10
9
  }
10
+ export declare const makeLazyProps: <Defaults extends {
11
+ eager?: unknown;
12
+ } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
13
+ /**
14
+ * Принудительно рендерит контент компонента в DOM, даже если компонент скрыт. Полезно для SEO оптимизации.
15
+ */
16
+ eager: {
17
+ type: PropType<boolean>;
18
+ default: boolean;
19
+ };
20
+ }, Defaults>;
11
21
  export declare function useLazy(props: ILazyProps, active: Ref<boolean>): IUseLazy;
@@ -0,0 +1,37 @@
1
+ import type { Ref, PropType, WritableComputedRef } from 'vue';
2
+ import type { IDisabledProps } from './disabled';
3
+ export interface IMenuProps extends IDisabledProps {
4
+ menu: boolean | undefined;
5
+ }
6
+ export interface IUseMenu<MenuRef> {
7
+ internalMenu: WritableComputedRef<boolean | undefined>;
8
+ menuRef: Ref<MenuRef | undefined>;
9
+ }
10
+ export declare const makeMenuProps: <Defaults extends {
11
+ menu?: unknown;
12
+ menuProps?: unknown;
13
+ menuHeight?: unknown;
14
+ } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
15
+ /**
16
+ * Состояние выпадающего меню (открыто/закрыто)
17
+ */
18
+ menu: {
19
+ type: PropType<boolean | undefined>;
20
+ default: undefined;
21
+ };
22
+ /**
23
+ * Свойства для компонент CdsMenu
24
+ */
25
+ menuProps: {
26
+ type: PropType<any>;
27
+ default: null;
28
+ };
29
+ /**
30
+ * Максимальная высота выпадающего меню (10rem по умолчанию)
31
+ */
32
+ menuHeight: {
33
+ type: PropType<string | number>;
34
+ default: number;
35
+ };
36
+ }, Defaults>;
37
+ export declare function useMenu<MenuRef>(props: IMenuProps): IUseMenu<MenuRef>;
@@ -2,7 +2,6 @@ import { PropType } from 'vue';
2
2
  export interface IOverlayProps {
3
3
  attach: boolean | string | Element | undefined;
4
4
  contained: boolean | undefined;
5
- eager: boolean | undefined;
6
5
  disabled: boolean | undefined;
7
6
  persistent: boolean | undefined;
8
7
  scrim: boolean | string | undefined;
@@ -14,11 +13,11 @@ export interface IOverlayProps {
14
13
  export declare const makeOverlayProps: <Defaults extends {
15
14
  attach?: unknown;
16
15
  contained?: unknown;
17
- eager?: unknown;
18
16
  disabled?: unknown;
19
17
  persistent?: unknown;
20
18
  scrim?: unknown;
21
19
  modelValue?: unknown;
20
+ closeOnBack?: unknown;
22
21
  zIndex?: unknown;
23
22
  contentClasses?: unknown;
24
23
  contentProps?: unknown;
@@ -40,13 +39,6 @@ export declare const makeOverlayProps: <Defaults extends {
40
39
  type: PropType<boolean>;
41
40
  default: boolean;
42
41
  };
43
- /**
44
- * Принудительно рендерит контент компонента в DOM, даже если компонент скрыт. Полезно для SEO оптимизации.
45
- */
46
- eager: {
47
- type: PropType<boolean>;
48
- default: boolean;
49
- };
50
42
  /**
51
43
  * Блокирует возможность клика или фокуса всплывающего компонента
52
44
  */
@@ -75,6 +67,13 @@ export declare const makeOverlayProps: <Defaults extends {
75
67
  type: PropType<boolean>;
76
68
  default: boolean;
77
69
  };
70
+ /**
71
+ * Закрывать ли компонент при навигации назад
72
+ */
73
+ closeOnBack: {
74
+ type: PropType<boolean>;
75
+ default: boolean;
76
+ };
78
77
  /**
79
78
  * Значение z-index для оверлея
80
79
  */
@@ -0,0 +1,3 @@
1
+ import type { NavigationGuardNext, Router } from 'vue-router';
2
+ export declare function useRouter(): Router | undefined;
3
+ export declare function useBackButton(router: Router | undefined, cb: (next: NavigationGuardNext) => void): void;
@@ -0,0 +1,86 @@
1
+ import { MaybePick } from '../utils';
2
+ import type { PropType, ComputedRef, Ref } from 'vue';
3
+ import type { IInternalItem, IUseItems } from './items';
4
+ export interface ISelectProps {
5
+ multiple: boolean;
6
+ openOnClear: boolean;
7
+ hideSelected: boolean;
8
+ noDataText: string;
9
+ hideNoData: boolean;
10
+ isSelectAll: boolean;
11
+ selectAllText: string;
12
+ modelValue: any;
13
+ }
14
+ export declare const makeSelectProps: <Defaults extends {
15
+ multiple?: unknown;
16
+ openOnClear?: unknown;
17
+ hideSelected?: unknown;
18
+ noDataText?: unknown;
19
+ hideNoData?: unknown;
20
+ isSelectAll?: unknown;
21
+ selectAllText?: unknown;
22
+ } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
23
+ /**
24
+ * Множественный выбор элементов
25
+ */
26
+ multiple: {
27
+ type: PropType<boolean>;
28
+ default: boolean;
29
+ };
30
+ /**
31
+ * Открывать при очистке поля ввода
32
+ */
33
+ openOnClear: {
34
+ type: PropType<boolean>;
35
+ default: boolean;
36
+ };
37
+ /**
38
+ * Скрывать выбранные элементы из списка
39
+ */
40
+ hideSelected: {
41
+ type: PropType<boolean>;
42
+ default: boolean;
43
+ };
44
+ /**
45
+ * Текст, который будет отображаться, если нет данных
46
+ */
47
+ noDataText: {
48
+ type: PropType<string>;
49
+ default: string;
50
+ };
51
+ /**
52
+ * Скрывать отображаемый текст, если нет данных
53
+ */
54
+ hideNoData: {
55
+ type: PropType<boolean>;
56
+ default: boolean;
57
+ };
58
+ /**
59
+ * Добавляет возможность выбора всех элементов. Только для мультивыбора (multiple)
60
+ */
61
+ isSelectAll: {
62
+ type: PropType<boolean>;
63
+ default: boolean;
64
+ };
65
+ /**
66
+ * Текст для выбора всех элементов
67
+ */
68
+ selectAllText: {
69
+ type: PropType<string>;
70
+ default: string;
71
+ };
72
+ }, Defaults>;
73
+ export declare function useSelect(props: ISelectProps, items: ComputedRef<IInternalItem[]> | Ref<IInternalItem[]>, transformIn: IUseItems['transformIn'], transformOut: IUseItems['transformOut']): {
74
+ model: Ref<readonly IInternalItem<any>[]> & {
75
+ readonly externalValue: any;
76
+ };
77
+ selections: ComputedRef<IInternalItem<any>[]>;
78
+ selected: ComputedRef<any[]>;
79
+ selectedAll: ComputedRef<boolean>;
80
+ selectedIndeterminate: ComputedRef<boolean>;
81
+ selectStrategy: ComputedRef<"independent" | "single-independent">;
82
+ displayItems: ComputedRef<IInternalItem<any>[]>;
83
+ };
84
+ export declare function useFilteredSelectProps<Props extends Record<string, unknown>>(props: Props, filteredProps: Partial<Props>, excludes: Extract<keyof MaybePick<Props, Extract<keyof Props, string>>, string>[]): {
85
+ inputProps: [Partial<Props>] extends [Ref<any>] ? Ref<any> & Partial<Props> : Ref<import("vue").UnwrapRef<Partial<Props>>>;
86
+ };
@@ -0,0 +1,21 @@
1
+ import type { ComputedRef, PropType } from 'vue';
2
+ export interface ITitleProps {
3
+ title: string;
4
+ }
5
+ export interface IUseTitle {
6
+ }
7
+ export interface IUseTitle {
8
+ hasTitle: ComputedRef<boolean>;
9
+ }
10
+ export declare const makeTitleProps: <Defaults extends {
11
+ title?: unknown;
12
+ } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
13
+ /**
14
+ * Заголовок
15
+ */
16
+ title: {
17
+ type: PropType<string>;
18
+ default: string;
19
+ };
20
+ }, Defaults>;
21
+ export declare function useTitle(props: ITitleProps, slots: Record<string, unknown>): IUseTitle;
@@ -38,7 +38,6 @@ export declare const makeValidationProps: <Defaults extends {
38
38
  errorMessages?: unknown;
39
39
  maxErrors?: unknown;
40
40
  name?: unknown;
41
- label?: unknown;
42
41
  readonly?: unknown;
43
42
  rules?: unknown;
44
43
  modelValue?: unknown;
@@ -81,13 +80,6 @@ export declare const makeValidationProps: <Defaults extends {
81
80
  type: PropType<string | undefined>;
82
81
  default: undefined;
83
82
  };
84
- /**
85
- * Лейбл поля
86
- */
87
- label: {
88
- type: PropType<string | undefined>;
89
- default: undefined;
90
- };
91
83
  /**
92
84
  * Только для чтения
93
85
  */
@@ -0,0 +1,12 @@
1
+ export interface ILocale {
2
+ date: {
3
+ days: string[];
4
+ daysShort: string[];
5
+ months: string[];
6
+ monthsLong: string[];
7
+ monthsShort: string[];
8
+ firstDayOfWeek: number;
9
+ format24h: boolean;
10
+ pluralDay: (day?: number) => string;
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ import type { ILocale } from './';
2
+ declare const _default: ILocale;
3
+ export default _default;