@central-design-system/components 3.0.0-beta.2 → 3.0.0-beta.21
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 +4 -2
- package/dist/cds.es.js +10713 -9313
- package/dist/cds.umd.js +7 -3
- package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +97 -37
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +36 -12
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +11 -0
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +14 -3
- package/dist/components/CdsButton/CdsButton.vue.d.ts +37 -26
- package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +68 -3
- package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +13 -0
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +270 -126
- package/dist/components/CdsContainer/CdsContainer.vue.d.ts +41 -24
- package/dist/components/CdsContainer/context.d.ts +1 -1
- package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +66 -0
- package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +212 -0
- package/dist/components/CdsContentSwitcher/index.d.ts +2 -0
- package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +12 -1
- package/dist/components/CdsDatePicker/composable/calendar.d.ts +2 -2
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +16 -4
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +228 -127
- package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +4 -4
- package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +13 -13
- package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +10 -10
- package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +17 -6
- package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +3 -3
- package/dist/components/CdsFooter/CdsFooter.vue.d.ts +23 -3
- package/dist/components/CdsForm/CdsForm.vue.d.ts +11 -0
- package/dist/components/CdsGrid/composable/column.d.ts +1 -1
- package/dist/components/CdsGrid/composable/subgrid.d.ts +1 -1
- package/dist/components/CdsGrid/mode/CSSGrid.d.ts +1 -1
- package/dist/components/CdsGrid/mode/FlexGrid.d.ts +1 -1
- package/dist/components/CdsHeader/CdsHeader.vue.d.ts +23 -3
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +27 -3
- package/dist/components/CdsInput/CdsInput.vue.d.ts +26 -21
- package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +3 -3
- package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +3 -3
- package/dist/components/CdsLayout/CdsLayout.vue.d.ts +12 -1
- package/dist/components/CdsLayout/context.d.ts +1 -1
- package/dist/components/CdsLink/CdsLink.vue.d.ts +15 -3
- package/dist/components/CdsList/CdsList.vue.d.ts +31 -19
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
- package/dist/components/CdsList/CdsListItem.vue.d.ts +12 -12
- package/dist/components/CdsList/composable/list.d.ts +1 -1
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +12 -0
- package/dist/components/CdsMenu/CdsMenu.vue.d.ts +18 -7
- package/dist/components/CdsModal/CdsModal.vue.d.ts +14 -3
- package/dist/components/CdsNotification/CdsNotification.vue.d.ts +38 -27
- package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +33 -22
- package/dist/components/CdsNotification/composable/notification.d.ts +4 -4
- package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +11 -5
- package/dist/components/CdsOverlay/composable/activator.d.ts +1 -1
- package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +16 -16
- package/dist/components/CdsOverlay/constants.d.ts +2 -0
- package/dist/components/CdsPagination/CdsPagination.vue.d.ts +12 -1
- package/dist/components/CdsProgress/CdsProgress.vue.d.ts +12 -1
- package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +26 -11
- package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +13 -0
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +81 -61
- package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +30 -8
- package/dist/components/CdsSkeletonLoader/CdsSkeletonLoader.vue.d.ts +11 -0
- package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +19 -19
- package/dist/components/CdsStages/CdsStages.vue.d.ts +13 -1
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +20 -8
- package/dist/components/CdsSteps/CdsSteps.vue.d.ts +30 -23
- package/dist/components/CdsSteps/CdsStepsItem.vue.d.ts +3 -3
- package/dist/components/CdsSteps/context.d.ts +1 -1
- package/dist/components/CdsTable/CdsTable.vue.d.ts +96 -37
- package/dist/components/CdsTable/components/Footer/Footer.d.ts +1 -1
- package/dist/components/CdsTable/components/Header/DragHandle.d.ts +1 -1
- package/dist/components/CdsTable/components/Table/InternalTable.d.ts +60 -24
- package/dist/components/CdsTable/components/TableProvider.d.ts +71 -24
- package/dist/components/CdsTable/composable/filter.d.ts +1 -1
- package/dist/components/CdsTable/composable/flat.d.ts +1 -1
- package/dist/components/CdsTable/composable/pagination.d.ts +1 -1
- package/dist/components/CdsTable/composable/scroll.d.ts +4607 -0
- package/dist/components/CdsTable/composable/selection.d.ts +1 -1
- package/dist/components/CdsTable/composable/sorter.d.ts +1 -1
- package/dist/components/CdsTable/composable/sticky.d.ts +1 -1
- package/dist/components/CdsTable/composable/table.d.ts +32 -14
- package/dist/components/CdsTable/constants.d.ts +1 -0
- package/dist/components/CdsTable/context/summary.d.ts +1 -1
- package/dist/components/CdsTable/context/table.d.ts +1 -1
- package/dist/components/CdsTable/interface.d.ts +4 -4
- package/dist/components/CdsTable/utils/index.d.ts +1 -0
- package/dist/components/CdsTable/utils/vnode.d.ts +10 -0
- package/dist/components/CdsTabs/CdsTab.vue.d.ts +13 -13
- package/dist/components/CdsTabs/CdsTabs.vue.d.ts +50 -39
- package/dist/components/CdsTag/CdsTag.vue.d.ts +15 -3
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +101 -89
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +93 -57
- package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +11 -0
- package/dist/components/CdsTimePicker/composable/time.d.ts +2 -2
- package/dist/components/CdsToggle/CdsToggle.vue.d.ts +13 -8
- package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +53 -0
- package/dist/components/CdsTooltip/CdsTooltip.vue.d.ts +21 -10
- package/dist/components/CdsUploader/CdsUploader.vue.d.ts +61 -40
- package/dist/components/CdsUploader/components/AjaxUploader.d.ts +15 -15
- package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +40 -22
- package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +39 -21
- package/dist/components/CdsUploader/composable/upload.d.ts +25 -15
- package/dist/components/CdsUploader/index.d.ts +1 -0
- package/dist/components/CdsUploader/interface.d.ts +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/composable/appearance.d.ts +2 -2
- package/dist/composable/datetime.d.ts +4 -4
- package/dist/composable/delay.d.ts +2 -2
- package/dist/composable/direction.d.ts +1 -1
- package/dist/composable/domObserver.d.ts +5 -0
- package/dist/composable/field.d.ts +7 -5
- package/dist/composable/filter.d.ts +30 -0
- package/dist/composable/form.d.ts +2 -2
- package/dist/composable/group.d.ts +3 -3
- package/dist/composable/icon.d.ts +3 -3
- package/dist/composable/index.d.ts +5 -1
- package/dist/composable/invertColor.d.ts +19 -0
- package/dist/composable/layout.d.ts +20 -20
- package/dist/composable/loading.d.ts +2 -2
- package/dist/composable/menu.d.ts +1 -1
- package/dist/composable/nested/nested.d.ts +2 -2
- package/dist/{components/CdsDropdown/composable → composable}/scrolling.d.ts +2 -2
- package/dist/composable/select.d.ts +36 -8
- package/dist/composable/size.d.ts +1 -1
- package/dist/composable/tag.d.ts +0 -3
- package/dist/composable/text.d.ts +2 -2
- package/dist/composable/theme.d.ts +82 -0
- package/dist/composable/transparent.d.ts +19 -0
- package/dist/composable/validation.d.ts +2 -2
- package/dist/composable/variant.d.ts +1 -1
- package/dist/create.d.ts +5 -1
- 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/locale/index.d.ts +1 -1
- package/dist/themes/b2b.d.ts +26 -0
- package/dist/themes/cds.d.ts +26 -0
- package/dist/themes/dark.d.ts +26 -0
- package/dist/themes/index.d.ts +5 -0
- package/dist/themes/promo.d.ts +26 -0
- package/dist/themes/themes.d.ts +10 -0
- package/dist/utils/colors.d.ts +368 -0
- package/dist/utils/colorsUtils/APCA.d.ts +7 -0
- package/dist/utils/colorsUtils/index.d.ts +1 -0
- package/dist/utils/colorsUtils/transformCIELAB.d.ts +3 -0
- package/dist/utils/colorsUtils/transformSRGB.d.ts +3 -0
- package/dist/utils/colorsUtils/utils.d.ts +41 -0
- package/dist/utils/date/date.d.ts +12 -12
- package/dist/utils/helpers.d.ts +30 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/propsFactory.d.ts +1 -1
- package/nuxt.js +2 -1
- package/package.json +1 -1
- package/src/scss/modules/grid/_css-grid.scss +12 -19
- package/src/scss/modules/grid/_flex-grid.scss +9 -5
- package/src/scss/modules/grid/_mixins.scss +27 -33
- package/src/scss/themes/b2b/tokens.json +104 -104
- package/src/scss/themes/cds/tokens.json +104 -104
- package/src/scss/themes/index.ts +1 -1
- package/src/scss/utility/display.scss +56 -5
- package/src/scss/utility/flexbox.scss +26 -28
- package/src/scss/utility/index.scss +1 -2
- package/src/scss/utility/layout.scss +65 -3
- package/src/scss/utility/spacing.scss +46 -86
- package/src/scss/utility/typography.scss +48 -1
- package/src/scss/utility/variables/display.scss +10 -0
- package/src/scss/utility/variables/exports/_display.scss +7 -0
- package/src/scss/utility/variables/exports/_flex.scss +13 -0
- package/src/scss/utility/variables/exports/_overflow.scss +7 -0
- package/src/scss/utility/variables/exports/_position.scss +7 -0
- package/src/scss/utility/variables/exports/_spacing.scss +14 -0
- package/src/scss/utility/variables/exports/_typography.scss +22 -0
- package/src/scss/utility/variables/exports/_visibility.scss +7 -0
- package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
- package/src/scss/utility/variables/flex.scss +140 -0
- package/src/scss/utility/variables/index.scss +12 -0
- package/src/scss/utility/variables/overflow.scss +6 -0
- package/src/scss/utility/variables/position.scss +7 -0
- package/src/scss/utility/variables/spacing.scss +37 -0
- package/src/scss/utility/{variables.scss → variables/typography.scss} +48 -71
- package/src/scss/utility/variables/visibility.scss +5 -0
- package/src/scss/utility/variables/widthHeight.scss +69 -0
- package/dist/components/CdsDropdown/composable/index.d.ts +0 -1
- package/dist/composable/dark.d.ts +0 -19
- package/dist/plugins/index.d.ts +0 -2
- package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
- package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
-
import type { EventProp } from '../utils';
|
|
3
1
|
import type { TCdsIconsName } from '@central-design-system/icons';
|
|
2
|
+
import type { EventProp } from '../utils';
|
|
3
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
4
4
|
export declare type TFieldTypes = typeof allowedFieldType[number];
|
|
5
5
|
export interface IFieldProps {
|
|
6
6
|
active: boolean;
|
|
@@ -9,11 +9,13 @@ export interface IFieldProps {
|
|
|
9
9
|
suffix: string | undefined;
|
|
10
10
|
prependInnerIcon: TCdsIconsName | undefined;
|
|
11
11
|
appendInnerIcon: TCdsIconsName | undefined;
|
|
12
|
-
type: TFieldTypes
|
|
12
|
+
type: TFieldTypes;
|
|
13
|
+
role: string | undefined;
|
|
13
14
|
placeholder: string | undefined;
|
|
14
15
|
counter: boolean;
|
|
15
16
|
limit: number | undefined;
|
|
16
17
|
clearable: boolean;
|
|
18
|
+
persistentClearable: boolean;
|
|
17
19
|
'onClick:appendInner': EventProp | undefined;
|
|
18
20
|
'onClick:prependInner': EventProp | undefined;
|
|
19
21
|
}
|
|
@@ -75,7 +77,7 @@ export declare const makeFieldProps: <Defaults extends {
|
|
|
75
77
|
* Иконка внутри элемента перед значением поля
|
|
76
78
|
*/
|
|
77
79
|
prependInnerIcon: {
|
|
78
|
-
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">;
|
|
80
|
+
type: PropType<"search" | "link" | "list" | "filters" | "add" | "administrator" | "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">;
|
|
79
81
|
default: undefined;
|
|
80
82
|
validator: (value: TCdsIconsName) => boolean;
|
|
81
83
|
};
|
|
@@ -83,7 +85,7 @@ export declare const makeFieldProps: <Defaults extends {
|
|
|
83
85
|
* Иконка внутри элемента после значения поля
|
|
84
86
|
*/
|
|
85
87
|
appendInnerIcon: {
|
|
86
|
-
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">;
|
|
88
|
+
type: PropType<"search" | "link" | "list" | "filters" | "add" | "administrator" | "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">;
|
|
87
89
|
default: undefined;
|
|
88
90
|
validator: (value: TCdsIconsName) => boolean;
|
|
89
91
|
};
|
|
@@ -21,22 +21,44 @@ export declare const makeFilterProps: <Defaults extends {
|
|
|
21
21
|
filterMode?: unknown;
|
|
22
22
|
noFilter?: unknown;
|
|
23
23
|
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
24
|
+
/**
|
|
25
|
+
* Функция, используемая для фильтрации элементов списка.
|
|
26
|
+
* Вызывается для каждого фильтруемого ключа и для каждого элемента списка.
|
|
27
|
+
* Первый аргумент - это фильтруемое значение, второй - поисковой запрос, а третий - внутренний объект элемента списка.
|
|
28
|
+
* Функция должна возвращать true если элемент должен быть включен в результаты фильтрации, или индекс соответствия в значении, если он должен быть включен с выделенным результатом.
|
|
29
|
+
*/
|
|
24
30
|
customFilter: {
|
|
25
31
|
type: PropType<TFilterFunction>;
|
|
26
32
|
default: null;
|
|
27
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Функция, используемая для определенных ключей внутри объекта элемента списка. customFilter не будет учитывать элементы с указанным customKeyFilter
|
|
36
|
+
*/
|
|
28
37
|
customKeyFilter: {
|
|
29
38
|
type: PropType<TFilterKeyFunctions>;
|
|
30
39
|
default: null;
|
|
31
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Массив ключей, по которым будет производиться фильтрация
|
|
43
|
+
*/
|
|
32
44
|
filterKeys: {
|
|
33
45
|
type: PropType<TFilterKeys>;
|
|
34
46
|
default: string;
|
|
35
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Управляет объединением результатов customFilter и customKeyFilter. Все варианты применяют customFilter только к элементам, не указанным в customKeyFilter.
|
|
50
|
+
* - 'some' - имеется хотя бы одно совпадение либо с customFilter, либо с customKeyFilter
|
|
51
|
+
* - 'every' - все элементы соответствуют либо customFilter, либо customKeyFilter
|
|
52
|
+
* - 'union' - имеется хотя бы одно совпадение из customFilter и все совпадения из customKeyFilter
|
|
53
|
+
* - 'intersection' - имеется хотя бы одно совпадение из customFilter и все совпадения из customKeyFilter
|
|
54
|
+
*/
|
|
36
55
|
filterMode: {
|
|
37
56
|
type: PropType<TFilterMode>;
|
|
38
57
|
default: string;
|
|
39
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Не применяйте фильтрацию при поиске. Полезно, когда данные фильтруются на стороне сервера
|
|
61
|
+
*/
|
|
40
62
|
noFilter: {
|
|
41
63
|
type: PropType<boolean>;
|
|
42
64
|
default: boolean;
|
|
@@ -45,6 +67,14 @@ export declare const makeFilterProps: <Defaults extends {
|
|
|
45
67
|
export declare function useFilter<T extends IInternalItem>(props: IFilterProps, items: MaybeRef<T[]>, query: Ref<string | number | undefined> | (() => string | undefined), options?: {
|
|
46
68
|
transform?: (item: T) => {};
|
|
47
69
|
}): IUseFilter<T>;
|
|
70
|
+
export declare function defaultFilter(value: string, query: string): TFilterMath;
|
|
71
|
+
export declare function filterItems(items: readonly (readonly [item: IInternalItem, transformed: {}])[] | readonly IInternalItem[], query: string, options: Omit<IFilterProps, 'customFilter'> & {
|
|
72
|
+
default?: TFilterFunction;
|
|
73
|
+
}): TFilteredItems[];
|
|
74
|
+
declare type TFilteredItems = {
|
|
75
|
+
index: number;
|
|
76
|
+
matches: Record<string, TFilterMath>;
|
|
77
|
+
};
|
|
48
78
|
declare type TFilterFunction = (value: string, query: string, item?: any) => TFilterMath;
|
|
49
79
|
declare type TFilterKeyFunctions = Record<string, TFilterFunction>;
|
|
50
80
|
declare type TFilterKeys = string | string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
|
-
import type { Ref, ComputedRef, PropType } from 'vue';
|
|
3
2
|
import type { IValidationProps } from './validation';
|
|
3
|
+
import type { Ref, ComputedRef, PropType } from 'vue';
|
|
4
4
|
export interface IFormProvide {
|
|
5
5
|
register: (item: {
|
|
6
6
|
id: number | string;
|
|
@@ -23,7 +23,7 @@ export interface IFormProps {
|
|
|
23
23
|
readonly: boolean;
|
|
24
24
|
firstFail: boolean;
|
|
25
25
|
modelValue: boolean | null;
|
|
26
|
-
validateOn
|
|
26
|
+
validateOn: IValidationProps['validateOn'];
|
|
27
27
|
}
|
|
28
28
|
interface IFormField {
|
|
29
29
|
id: number | string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { ComponentInternalInstance, ComputedRef, ExtractPropTypes, InjectionKey, PropType, Ref } from 'vue';
|
|
2
1
|
import type { IDisabledProps } from '../composable';
|
|
2
|
+
import type { ComponentInternalInstance, ComputedRef, ExtractPropTypes, InjectionKey, PropType, Ref } from 'vue';
|
|
3
3
|
export interface IGroupItem {
|
|
4
4
|
id: number;
|
|
5
5
|
value: Ref<unknown>;
|
|
6
6
|
disabled: Ref<boolean | undefined>;
|
|
7
7
|
}
|
|
8
8
|
export interface IGroupProps {
|
|
9
|
-
disabled
|
|
9
|
+
disabled?: boolean;
|
|
10
10
|
modelValue: unknown;
|
|
11
11
|
multiple?: boolean;
|
|
12
12
|
required?: boolean | 'force';
|
|
13
13
|
max?: number;
|
|
14
14
|
selectedClass: string | undefined;
|
|
15
|
-
'onUpdate:modelValue'
|
|
15
|
+
'onUpdate:modelValue'?: ((val: unknown) => void) | undefined;
|
|
16
16
|
}
|
|
17
17
|
export interface IGroupProvide {
|
|
18
18
|
selected: Ref<Readonly<number[]>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventProp } from '../utils';
|
|
2
|
-
import type { PropType, ComputedRef } from 'vue';
|
|
3
2
|
import type { TCdsIconsName } from '@central-design-system/icons';
|
|
3
|
+
import type { PropType, ComputedRef } from 'vue';
|
|
4
4
|
export interface IIconProps {
|
|
5
5
|
prependIcon: TCdsIconsName | undefined;
|
|
6
6
|
appendIcon: TCdsIconsName | undefined;
|
|
@@ -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" | "administrator" | "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" | "administrator" | "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
|
};
|
|
@@ -8,7 +8,7 @@ export * from './appearance';
|
|
|
8
8
|
export * from './size';
|
|
9
9
|
export * from './disabled';
|
|
10
10
|
export * from './readonly';
|
|
11
|
-
export * from './
|
|
11
|
+
export * from './invertColor';
|
|
12
12
|
export * from './color';
|
|
13
13
|
export * from './status';
|
|
14
14
|
export * from './tag';
|
|
@@ -45,3 +45,7 @@ export * from './group';
|
|
|
45
45
|
export * from './ssrBoot';
|
|
46
46
|
export * from './variant';
|
|
47
47
|
export * from './layout';
|
|
48
|
+
export * from './theme';
|
|
49
|
+
export * from './domObserver';
|
|
50
|
+
export * from './transparent';
|
|
51
|
+
export * from './scrolling';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
export interface IInvertColorProps {
|
|
3
|
+
invertColor: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IUseInvertColor {
|
|
6
|
+
invertColorClasses: ComputedRef<string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const makeInvertColor: <Defaults extends {
|
|
9
|
+
invertColor?: unknown;
|
|
10
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
11
|
+
/**
|
|
12
|
+
* Инвертирует цветовую схему компонента
|
|
13
|
+
*/
|
|
14
|
+
invertColor: {
|
|
15
|
+
type: PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}, Defaults>;
|
|
19
|
+
export declare function useInvertColor(props: IInvertColorProps, name: string): IUseInvertColor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ILayoutContextProps } from '../components/CdsLayout/context';
|
|
3
|
+
import type { PropType, Ref, ComputedRef } from 'vue';
|
|
3
4
|
export interface ILayoutProps {
|
|
4
5
|
modelValue: boolean;
|
|
5
6
|
reveal: boolean;
|
|
@@ -8,6 +9,22 @@ export interface ILayoutProps {
|
|
|
8
9
|
elevated: boolean;
|
|
9
10
|
height: string | number;
|
|
10
11
|
}
|
|
12
|
+
export interface IUseLayout {
|
|
13
|
+
layout: ILayoutContextProps;
|
|
14
|
+
size: Ref<number>;
|
|
15
|
+
revealed: Ref<boolean>;
|
|
16
|
+
fixed: Ref<boolean>;
|
|
17
|
+
windowHeight: Ref<number>;
|
|
18
|
+
containerHeight: ComputedRef<number>;
|
|
19
|
+
offset: ComputedRef<number>;
|
|
20
|
+
hidden: ComputedRef<boolean>;
|
|
21
|
+
revealOnFocus: ComputedRef<boolean>;
|
|
22
|
+
classes: ComputedRef<Record<string, boolean>>;
|
|
23
|
+
style: Ref<CSSProperties>;
|
|
24
|
+
updateLocal: (prop: Ref, value: any) => void;
|
|
25
|
+
updateRevealed: () => void;
|
|
26
|
+
onResize: (rect: Pick<DOMRectReadOnly, 'width' | 'height'>) => void;
|
|
27
|
+
}
|
|
11
28
|
export declare const makeLayoutProps: <Defaults extends {
|
|
12
29
|
modelValue?: unknown;
|
|
13
30
|
reveal?: unknown;
|
|
@@ -59,21 +76,4 @@ export declare const makeLayoutProps: <Defaults extends {
|
|
|
59
76
|
default: number;
|
|
60
77
|
};
|
|
61
78
|
}, Defaults>;
|
|
62
|
-
export declare function useLayout(props: ILayoutProps, componentName: string, view?: 'H' | 'F'):
|
|
63
|
-
layout: import("../components/CdsLayout/context").ILayoutContextProps;
|
|
64
|
-
size: Ref<number>;
|
|
65
|
-
revealed: Ref<boolean>;
|
|
66
|
-
fixed: import("vue").ComputedRef<boolean>;
|
|
67
|
-
windowHeight: Ref<number>;
|
|
68
|
-
containerHeight: import("vue").ComputedRef<number>;
|
|
69
|
-
offset: import("vue").ComputedRef<number>;
|
|
70
|
-
hidden: import("vue").ComputedRef<boolean>;
|
|
71
|
-
revealOnFocus: import("vue").ComputedRef<boolean>;
|
|
72
|
-
classes: import("vue").ComputedRef<{
|
|
73
|
-
[x: string]: boolean;
|
|
74
|
-
}>;
|
|
75
|
-
style: import("vue").ComputedRef<CSSProperties>;
|
|
76
|
-
updateLocal: (prop: Ref, value: any) => void;
|
|
77
|
-
updateRevealed: () => void;
|
|
78
|
-
onResize: ({ height }: Pick<DOMRectReadOnly, 'width' | 'height'>) => void;
|
|
79
|
-
};
|
|
79
|
+
export declare function useLayout(props: ILayoutProps, componentName: string, view?: 'H' | 'F'): IUseLayout;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ILoadingProps {
|
|
3
3
|
loading: boolean;
|
|
4
4
|
}
|
|
5
5
|
export interface IUseLoading {
|
|
@@ -17,4 +17,4 @@ export declare const makeLoadingProps: <Defaults extends {
|
|
|
17
17
|
default: boolean;
|
|
18
18
|
};
|
|
19
19
|
}, Defaults>;
|
|
20
|
-
export declare function useLoading(props:
|
|
20
|
+
export declare function useLoading(props: ILoadingProps): IUseLoading;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Ref, InjectionKey, PropType, SetupContext } from 'vue';
|
|
2
|
-
import type { TSelectStrategyProp } from './selectStrategies';
|
|
3
1
|
import type { TOpenStrategyProp } from './openStrategies';
|
|
2
|
+
import type { TSelectStrategyProp } from './selectStrategies';
|
|
3
|
+
import type { Ref, InjectionKey, PropType, SetupContext } from 'vue';
|
|
4
4
|
export declare type TNestedProvide = {
|
|
5
5
|
id: Ref<unknown>;
|
|
6
6
|
isGroupActivator?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { CdsList } from '
|
|
3
|
-
import { CdsTextInput } from '
|
|
2
|
+
import { CdsList } from '../components/CdsList';
|
|
3
|
+
import { CdsTextInput } from '../components/CdsTextInput';
|
|
4
4
|
export declare function useScrolling(listRef: Ref<typeof CdsList | undefined>, textFieldRef: Ref<typeof CdsTextInput | undefined>): {
|
|
5
5
|
onListScroll: (event: Event) => void;
|
|
6
6
|
onListKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MaybePick } from '../utils';
|
|
2
|
-
import type { PropType, ComputedRef, Ref } from 'vue';
|
|
3
2
|
import type { IInternalItem, IUseItems } from './items';
|
|
3
|
+
import type { TCdsIconsName } from '@central-design-system/icons';
|
|
4
|
+
import type { PropType, ComputedRef, Ref } from 'vue';
|
|
4
5
|
export interface ISelectProps {
|
|
5
6
|
multiple: boolean;
|
|
6
7
|
openOnClear: boolean;
|
|
@@ -15,7 +16,9 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
15
16
|
hideSelected?: unknown;
|
|
16
17
|
hideNoData?: unknown;
|
|
17
18
|
isSelectAll?: unknown;
|
|
19
|
+
ellipsis?: unknown;
|
|
18
20
|
listProps?: unknown;
|
|
21
|
+
menuIcon?: unknown;
|
|
19
22
|
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
20
23
|
/**
|
|
21
24
|
* Множественный выбор элементов
|
|
@@ -52,6 +55,13 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
52
55
|
type: PropType<boolean>;
|
|
53
56
|
default: boolean;
|
|
54
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Отображать элементы выбранного списка в одну строку
|
|
60
|
+
*/
|
|
61
|
+
ellipsis: {
|
|
62
|
+
type: PropType<boolean>;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
55
65
|
/**
|
|
56
66
|
* Свойства для списка
|
|
57
67
|
*/
|
|
@@ -66,12 +76,19 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
66
76
|
tag: string;
|
|
67
77
|
size: NonNullable<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
68
78
|
disabled: boolean;
|
|
69
|
-
|
|
79
|
+
invertColor: boolean;
|
|
80
|
+
transparent: boolean;
|
|
70
81
|
required: boolean;
|
|
71
82
|
selectStrategy: NonNullable<import("./nested/selectStrategies").TSelectStrategyProp>;
|
|
72
83
|
openStrategy: NonNullable<import("./nested/openStrategies").TOpenStrategyProp>;
|
|
84
|
+
theme: string;
|
|
73
85
|
lines: false | "one" | "two" | "three";
|
|
74
86
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
87
|
+
theme: {
|
|
88
|
+
type: PropType<string>;
|
|
89
|
+
available: readonly ["cds", "b2b", "promo", "dark"];
|
|
90
|
+
default: undefined;
|
|
91
|
+
};
|
|
75
92
|
selectStrategy: {
|
|
76
93
|
type: PropType<NonNullable<import("./nested/selectStrategies").TSelectStrategyProp>>;
|
|
77
94
|
default: NonNullable<import("./nested/selectStrategies").TSelectStrategyProp>;
|
|
@@ -83,7 +100,11 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
83
100
|
opened: PropType<unknown[]>;
|
|
84
101
|
selected: PropType<unknown[]>;
|
|
85
102
|
required: BooleanConstructor;
|
|
86
|
-
|
|
103
|
+
transparent: {
|
|
104
|
+
type: PropType<boolean>;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
invertColor: {
|
|
87
108
|
type: PropType<boolean>;
|
|
88
109
|
default: boolean;
|
|
89
110
|
};
|
|
@@ -114,9 +135,6 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
114
135
|
default: string;
|
|
115
136
|
};
|
|
116
137
|
itemValue: {
|
|
117
|
-
/**
|
|
118
|
-
* Свойства для списка
|
|
119
|
-
*/
|
|
120
138
|
type: PropType<import("./items").TItemKey>;
|
|
121
139
|
default: string;
|
|
122
140
|
};
|
|
@@ -126,7 +144,9 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
126
144
|
};
|
|
127
145
|
itemProps: {
|
|
128
146
|
type: PropType<import("./items").TItemKey>;
|
|
129
|
-
default: string;
|
|
147
|
+
default: string; /**
|
|
148
|
+
* Иконка выпадающего меню
|
|
149
|
+
*/
|
|
130
150
|
};
|
|
131
151
|
returnObject: {
|
|
132
152
|
type: PropType<boolean>;
|
|
@@ -151,9 +171,17 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
151
171
|
path: unknown[];
|
|
152
172
|
event: Event;
|
|
153
173
|
}) => any) | undefined;
|
|
154
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "items" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "tag" | "size" | "disabled" | "
|
|
174
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "items" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "tag" | "size" | "disabled" | "invertColor" | "transparent" | "required" | "selectStrategy" | "openStrategy" | "theme" | "lines">, keyof import("vue").VNodeProps | keyof import("vue").AllowedComponentProps>>;
|
|
155
175
|
default: undefined;
|
|
156
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* Иконка выпадающего меню
|
|
179
|
+
*/
|
|
180
|
+
menuIcon: {
|
|
181
|
+
type: PropType<"search" | "link" | "list" | "filters" | "add" | "administrator" | "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">;
|
|
182
|
+
default: string;
|
|
183
|
+
validator: (value: TCdsIconsName) => boolean;
|
|
184
|
+
};
|
|
157
185
|
}, Defaults>;
|
|
158
186
|
export declare function useSelect(props: ISelectProps, items: ComputedRef<IInternalItem[]> | Ref<IInternalItem[]>, transformIn: IUseItems['transformIn'], transformOut: IUseItems['transformOut']): {
|
|
159
187
|
model: Ref<readonly IInternalItem<any>[]> & {
|
package/dist/composable/tag.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType, ComputedRef } from 'vue';
|
|
2
2
|
export interface ITextProps {
|
|
3
|
-
text: string | undefined;
|
|
3
|
+
text: string | number | undefined;
|
|
4
4
|
}
|
|
5
5
|
export interface IUseText {
|
|
6
6
|
hasText: ComputedRef<boolean>;
|
|
@@ -12,7 +12,7 @@ export declare const makeTextProps: <Defaults extends {
|
|
|
12
12
|
* Текст
|
|
13
13
|
*/
|
|
14
14
|
text: {
|
|
15
|
-
type: PropType<string>;
|
|
15
|
+
type: PropType<string | number>;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
18
|
}, Defaults>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import type { TThemes } from '../themes';
|
|
3
|
+
import type { App, DeepReadonly, InjectionKey, PropType, Ref } from 'vue';
|
|
4
|
+
declare type DeepPartial<T> = T extends object ? {
|
|
5
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
6
|
+
} : T;
|
|
7
|
+
export declare type IThemeOptions = false | {
|
|
8
|
+
cspNonce?: string;
|
|
9
|
+
defaultTheme?: TThemes | string;
|
|
10
|
+
variations?: false | VariationOptions;
|
|
11
|
+
themes?: Record<string, ThemeDefinition>;
|
|
12
|
+
};
|
|
13
|
+
export declare type ThemeDefinition = DeepPartial<InternalThemeDefinition>;
|
|
14
|
+
export declare type TTheme = typeof availableTheme[number];
|
|
15
|
+
export interface Colors extends BaseColors, OnColors {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
}
|
|
18
|
+
interface VariationOptions {
|
|
19
|
+
colors: string[];
|
|
20
|
+
lighten: number;
|
|
21
|
+
darken: number;
|
|
22
|
+
}
|
|
23
|
+
interface InternalThemeDefinition {
|
|
24
|
+
dark: boolean;
|
|
25
|
+
colors: Colors;
|
|
26
|
+
variables: Record<string, string | number>;
|
|
27
|
+
}
|
|
28
|
+
interface BaseColors {
|
|
29
|
+
background: string;
|
|
30
|
+
surface: string;
|
|
31
|
+
primary: string;
|
|
32
|
+
secondary: string;
|
|
33
|
+
success: string;
|
|
34
|
+
warning: string;
|
|
35
|
+
info: string;
|
|
36
|
+
error: string;
|
|
37
|
+
}
|
|
38
|
+
interface OnColors {
|
|
39
|
+
'on-background': string;
|
|
40
|
+
'on-surface': string;
|
|
41
|
+
'on-primary': string;
|
|
42
|
+
'on-secondary': string;
|
|
43
|
+
'on-success': string;
|
|
44
|
+
'on-warning': string;
|
|
45
|
+
'on-info': string;
|
|
46
|
+
'on-error': string;
|
|
47
|
+
}
|
|
48
|
+
export interface ThemeInstance {
|
|
49
|
+
readonly isDisabled: boolean;
|
|
50
|
+
readonly themes: Ref<Record<string, InternalThemeDefinition>>;
|
|
51
|
+
readonly name: Readonly<Ref<string>>;
|
|
52
|
+
readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
|
|
53
|
+
readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>;
|
|
54
|
+
readonly themeClasses: Readonly<ComputedRef<string | undefined>>;
|
|
55
|
+
readonly styles: Readonly<ComputedRef<string>>;
|
|
56
|
+
readonly global: {
|
|
57
|
+
readonly name: Ref<string>;
|
|
58
|
+
readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export declare const ThemeSymbol: InjectionKey<ThemeInstance>;
|
|
62
|
+
export declare const availableTheme: readonly ["cds", "b2b", "promo", "dark"];
|
|
63
|
+
export declare const makeThemeProps: <Defaults extends {
|
|
64
|
+
theme?: unknown;
|
|
65
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
66
|
+
/**
|
|
67
|
+
* Тема
|
|
68
|
+
*/
|
|
69
|
+
theme: {
|
|
70
|
+
type: PropType<string>;
|
|
71
|
+
available: readonly ["cds", "b2b", "promo", "dark"];
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
}, Defaults>;
|
|
75
|
+
export declare function createTheme(options?: IThemeOptions): ThemeInstance & {
|
|
76
|
+
install: (app: App) => void;
|
|
77
|
+
};
|
|
78
|
+
export declare function provideTheme(props: {
|
|
79
|
+
theme?: string;
|
|
80
|
+
}): ThemeInstance;
|
|
81
|
+
export declare function useTheme(): ThemeInstance;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
export interface ITransparentProps {
|
|
3
|
+
transparent: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IUseTransparentProps {
|
|
6
|
+
transparentClasses: ComputedRef<string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const makeTransparentProps: <Defaults extends {
|
|
9
|
+
transparent?: unknown;
|
|
10
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
11
|
+
/**
|
|
12
|
+
* Позволяет использовать компонент на прозрачном фоне
|
|
13
|
+
*/
|
|
14
|
+
transparent: {
|
|
15
|
+
type: PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}, Defaults>;
|
|
19
|
+
export declare function useTransparent(props: ITransparentProps, name: string): IUseTransparentProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PropType, ComputedRef, Ref } from 'vue';
|
|
2
1
|
import type { MaybeRef } from '../utils';
|
|
2
|
+
import type { PropType, ComputedRef, Ref } from 'vue';
|
|
3
3
|
export declare type TValidationResult = string | boolean;
|
|
4
4
|
export declare type TValidationRule = TValidationResult | PromiseLike<TValidationResult> | ((value: any) => TValidationResult) | ((value: any) => PromiseLike<TValidationResult>);
|
|
5
5
|
export declare type TValidationOn = typeof allowedValidationOn[number];
|
|
@@ -102,7 +102,7 @@ export declare const makeValidationProps: <Defaults extends {
|
|
|
102
102
|
default: undefined;
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
105
|
-
* Убирает слот для сообщений об
|
|
105
|
+
* Убирает слот для сообщений об ошибках
|
|
106
106
|
*/
|
|
107
107
|
hideMessages: {
|
|
108
108
|
type: PropType<boolean>;
|
package/dist/create.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ILocale, TAvailableLocale } from './locale';
|
|
2
|
+
import type { IDisplayOptions, IThemeOptions } from './composable';
|
|
2
3
|
import type { App } from 'vue';
|
|
3
|
-
import type { IDisplayOptions } from './composable';
|
|
4
4
|
export interface ICdsOptions {
|
|
5
5
|
components?: Record<string, any>;
|
|
6
6
|
directives?: Record<string, any>;
|
|
7
7
|
icons?: Record<string, any>;
|
|
8
8
|
illustrations?: Record<string, any>;
|
|
9
9
|
display?: IDisplayOptions;
|
|
10
|
+
theme?: IThemeOptions;
|
|
10
11
|
cssGrid?: boolean;
|
|
11
12
|
ssr?: boolean;
|
|
12
13
|
locale?: TAvailableLocale | ILocale;
|
|
@@ -19,5 +20,8 @@ interface NuxtApp {
|
|
|
19
20
|
export declare function createCds(options?: ICdsOptions): {
|
|
20
21
|
install: (app: App & NuxtApp) => void;
|
|
21
22
|
display: import("./composable").IDisplayInstance;
|
|
23
|
+
theme: import("./composable").ThemeInstance & {
|
|
24
|
+
install: (app: App<any>) => void;
|
|
25
|
+
};
|
|
22
26
|
};
|
|
23
27
|
export {};
|