@central-design-system/components 2.33.0 → 3.0.0-alpha.1
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 -111
- package/dist/cds.d.ts +48 -0
- package/dist/cds.es.js +5454 -0
- package/dist/cds.umd.js +1 -0
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +32 -0
- package/dist/components/CdsButton/CdsButton.vue.d.ts +140 -0
- package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +222 -0
- package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +205 -0
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +179 -0
- package/dist/components/CdsForm/CdsForm.vue.d.ts +99 -0
- package/dist/components/CdsGrid/CdsCol.vue.d.ts +73 -0
- package/dist/components/CdsGrid/CdsGrid.vue.d.ts +55 -0
- package/dist/components/CdsGrid/CdsRow.vue.d.ts +37 -0
- package/dist/components/CdsGrid/composable/column.d.ts +84 -0
- package/dist/components/CdsGrid/composable/grid.d.ts +24 -0
- package/dist/components/CdsGrid/composable/index.d.ts +4 -0
- package/dist/components/CdsGrid/composable/subgrid.d.ts +20 -0
- package/dist/components/CdsGrid/composable/wide.d.ts +12 -0
- package/dist/components/CdsGrid/mode/CSSGrid.d.ts +5 -0
- package/dist/components/CdsGrid/mode/FlexGrid.d.ts +5 -0
- package/dist/components/CdsGrid/types.d.ts +27 -0
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +44 -0
- package/dist/components/CdsIcon/index.d.ts +1 -0
- package/dist/components/CdsInput/CdsInput.vue.d.ts +219 -0
- package/dist/components/CdsInput/CdsInputCounter.vue.d.ts +39 -0
- package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +26 -0
- package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +32 -0
- package/dist/components/CdsInput/CdsInputMessages.vue.d.ts +221 -0
- package/dist/components/CdsInput/index.d.ts +5 -0
- package/dist/components/CdsLink/CdsLink.vue.d.ts +50 -0
- package/dist/components/CdsList/CdsList.vue.d.ts +158 -0
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +125 -0
- package/dist/components/CdsList/CdsListItem.vue.d.ts +178 -0
- package/dist/components/CdsList/composable/depth.d.ts +3 -0
- package/dist/components/CdsList/composable/focus.d.ts +12 -0
- package/dist/components/CdsList/composable/index.d.ts +3 -0
- package/dist/components/CdsList/composable/list.d.ts +19 -0
- package/dist/components/CdsList/index.d.ts +3 -0
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +62 -0
- package/dist/components/CdsLoader/index.d.ts +1 -0
- package/dist/components/CdsMenu/CdsMenu.vue.d.ts +592 -0
- package/dist/components/CdsMenu/shared.d.ts +10 -0
- package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +324 -0
- package/dist/components/CdsOverlay/composable/activator.d.ts +81 -0
- package/dist/components/CdsOverlay/composable/index.d.ts +6 -0
- package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +75 -0
- package/dist/components/CdsOverlay/composable/scrim.d.ts +8 -0
- package/dist/components/CdsOverlay/composable/scrollStrategies.d.ts +33 -0
- package/dist/components/CdsOverlay/composable/stack.d.ts +9 -0
- package/dist/components/CdsOverlay/composable/teleport.d.ts +6 -0
- package/dist/components/CdsOverlay/utils/index.d.ts +2 -0
- package/dist/components/CdsOverlay/utils/point.d.ts +20 -0
- package/dist/components/CdsOverlay/utils/requestNewFrame.d.ts +5 -0
- package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +201 -0
- package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +200 -0
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +664 -0
- package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +61 -0
- package/dist/components/CdsStages/CdsStages.vue.d.ts +102 -0
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +46 -0
- package/dist/components/CdsTag/CdsTag.vue.d.ts +96 -0
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +681 -0
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +600 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/composable/appearance.d.ts +24 -0
- package/dist/composable/color.d.ts +21 -0
- package/dist/composable/dark.d.ts +19 -0
- package/dist/composable/delay.d.ts +29 -0
- package/dist/composable/dimensions.d.ts +47 -0
- package/dist/composable/direction.d.ts +24 -0
- package/dist/composable/disabled.d.ts +19 -0
- package/dist/composable/field.d.ts +138 -0
- package/dist/composable/focus.d.ts +22 -0
- package/dist/composable/form.d.ts +126 -0
- package/dist/composable/hidration.d.ts +1 -0
- package/dist/composable/icon.d.ts +57 -0
- package/dist/composable/index.d.ts +29 -0
- package/dist/composable/input.d.ts +97 -0
- package/dist/composable/items.d.ts +79 -0
- package/dist/composable/lazy.d.ts +11 -0
- package/dist/composable/link.d.ts +35 -0
- package/dist/composable/loading.d.ts +20 -0
- package/dist/composable/nested/nested.d.ts +85 -0
- package/dist/composable/nested/openStrategies.d.ts +25 -0
- package/dist/composable/nested/selectStrategies.d.ts +21 -0
- package/dist/composable/overlay.d.ts +99 -0
- package/dist/composable/proxyModel.d.ts +8 -0
- package/dist/composable/render.d.ts +2 -0
- package/dist/composable/scopeId.d.ts +5 -0
- package/dist/composable/size.d.ts +24 -0
- package/dist/composable/status.d.ts +21 -0
- package/dist/composable/tag.d.ts +16 -0
- package/dist/composable/text.d.ts +17 -0
- package/dist/composable/toggleScope.d.ts +2 -0
- package/dist/composable/transition.d.ts +22 -0
- package/dist/composable/validation.d.ts +136 -0
- package/dist/directives/click-outside/index.d.ts +14 -0
- package/dist/directives/index.d.ts +1 -0
- package/dist/globals.d.ts +16 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/shims-vue.d.ts +24 -0
- package/dist/transitions/createTransition.d.ts +38 -0
- package/dist/transitions/expandTransition.d.ts +19 -0
- package/dist/transitions/index.d.ts +104 -0
- package/dist/types/CdsOptions.d.ts +3 -0
- package/dist/utils/anchor.d.ts +23 -0
- package/dist/utils/animation.d.ts +6 -0
- package/dist/utils/box.d.ts +26 -0
- package/dist/utils/changeCase/lowerCase.d.ts +8 -0
- package/dist/utils/changeCase/noCase.d.ts +10 -0
- package/dist/utils/changeCase/paramCase.d.ts +3 -0
- package/dist/utils/changeCase/pascalCase.d.ts +5 -0
- package/dist/utils/dom.d.ts +6 -0
- package/dist/utils/getCurrentInstance.d.ts +13 -0
- package/dist/utils/getScrollParent.d.ts +3 -0
- package/dist/utils/globals.d.ts +4 -0
- package/dist/utils/helpers.d.ts +73 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/propsFactory.d.ts +52 -0
- package/nuxt.js +13 -0
- package/package.json +37 -80
- package/src/scss/index.scss +10 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_convert.scss +4 -2
- package/src/scss/mixins/layout/_shadow.scss +4 -0
- package/src/scss/mixins/layout/exports/_mini-unit.module.scss +5 -0
- package/src/scss/mixins/layout/exports/_spacing-all.module.scss +3 -0
- package/src/scss/mixins/layout/exports/_spacing-fluid.module.scss +8 -0
- package/src/scss/mixins/layout/exports/_spacing-layout.module.scss +11 -0
- package/src/scss/mixins/layout/exports/_spacing.module.scss +16 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/index.scss +1 -2
- package/{dist/mixins/scss → src/scss/mixins}/typo.scss +0 -67
- package/src/scss/modules/_reset.scss +113 -0
- package/src/scss/modules/_transition.scss +54 -0
- package/src/scss/modules/_typography.scss +36 -0
- package/src/scss/modules/_variables.scss +9 -0
- package/src/scss/modules/grid/_aspect-ratio.scss +62 -0
- package/src/scss/modules/grid/_breakpoint.scss +195 -0
- package/src/scss/modules/grid/_config.scss +88 -0
- package/src/scss/modules/grid/_css-grid.scss +445 -0
- package/src/scss/modules/grid/_flex-grid.scss +39 -0
- package/src/scss/modules/grid/_mixins.scss +307 -0
- package/src/scss/modules/grid/exports/_config.module.scss +9 -0
- package/src/scss/modules/grid/index.scss +5 -0
- package/src/scss/themes/b2b/tokens-map.scss +139 -0
- package/src/scss/themes/b2b/tokens.json +2190 -0
- package/src/scss/themes/cds/tokens-map.scss +138 -0
- package/src/scss/themes/cds/tokens.json +2184 -0
- package/{dist/tokens → src/scss/themes}/cds/variables.css +0 -3
- package/src/scss/themes/index.ts +43 -0
- package/src/scss/utility/display.scss +13 -0
- package/src/scss/utility/flexbox.scss +37 -0
- package/src/scss/utility/generatedFiles/generatedStyles.json +1 -0
- package/src/scss/utility/generatedFiles/generatedStyles.scss +300 -0
- package/src/scss/utility/index.scss +7 -0
- package/src/scss/utility/layout.scss +11 -0
- package/src/scss/utility/lists.scss +76 -0
- package/src/scss/utility/spacing.scss +89 -0
- package/src/scss/utility/typography.scss +16 -0
- package/src/scss/utility/variables.scss +116 -0
- package/README.md +0 -87
- package/build/utils/postInstall.js +0 -20
- package/build/utils/print.js +0 -38
- package/dist/CdsAccordion/index.js +0 -8
- package/dist/CdsAccordion/styles.css +0 -11
- package/dist/CdsBadge/index.js +0 -8
- package/dist/CdsBadge/styles.css +0 -9
- package/dist/CdsBreadcrumbs/index.js +0 -8
- package/dist/CdsBreadcrumbs/styles.css +0 -11
- package/dist/CdsButton/index.js +0 -8
- package/dist/CdsButton/styles.css +0 -11
- package/dist/CdsCheckbox/index.js +0 -8
- package/dist/CdsCheckbox/styles.css +0 -15
- package/dist/CdsCombobox/index.js +0 -8
- package/dist/CdsCombobox/styles.css +0 -15
- package/dist/CdsContainer/index.js +0 -8
- package/dist/CdsContainer/styles.css +0 -11
- package/dist/CdsContentSwitcher/index.js +0 -8
- package/dist/CdsContentSwitcher/styles.css +0 -15
- package/dist/CdsDataTable/index.js +0 -8
- package/dist/CdsDataTable/styles.css +0 -21
- package/dist/CdsDatePicker/index.js +0 -24
- package/dist/CdsDatePicker/styles.css +0 -15
- package/dist/CdsDrawer/index.js +0 -8
- package/dist/CdsDrawer/styles.css +0 -17
- package/dist/CdsDropdown/index.js +0 -8
- package/dist/CdsDropdown/styles.css +0 -15
- package/dist/CdsEmptyState/index.js +0 -8
- package/dist/CdsEmptyState/styles.css +0 -9
- package/dist/CdsFooter/index.js +0 -8
- package/dist/CdsFooter/styles.css +0 -17
- package/dist/CdsForm/index.js +0 -8
- package/dist/CdsForm/styles.css +0 -15
- package/dist/CdsGrid/index.js +0 -8
- package/dist/CdsGrid/styles.css +0 -9
- package/dist/CdsHeader/index.js +0 -8
- package/dist/CdsHeader/styles.css +0 -11
- package/dist/CdsIcon/index.js +0 -8
- package/dist/CdsIcon/styles.css +0 -9
- package/dist/CdsImage/index.js +0 -8
- package/dist/CdsImage/styles.css +0 -9
- package/dist/CdsInput/index.js +0 -8
- package/dist/CdsInput/styles.css +0 -13
- package/dist/CdsLink/index.js +0 -8
- package/dist/CdsLink/styles.css +0 -9
- package/dist/CdsList/index.js +0 -8
- package/dist/CdsList/styles.css +0 -9
- package/dist/CdsLoading/index.js +0 -8
- package/dist/CdsLoading/styles.css +0 -9
- package/dist/CdsModal/index.js +0 -8
- package/dist/CdsModal/styles.css +0 -15
- package/dist/CdsMultiselect/index.js +0 -8
- package/dist/CdsMultiselect/styles.css +0 -17
- package/dist/CdsNotification/index.js +0 -8
- package/dist/CdsNotification/styles.css +0 -21
- package/dist/CdsOverflowMenu/index.js +0 -8
- package/dist/CdsOverflowMenu/styles.css +0 -21
- package/dist/CdsPagination/index.js +0 -8
- package/dist/CdsPagination/styles.css +0 -13
- package/dist/CdsRadioButton/index.js +0 -8
- package/dist/CdsRadioButton/styles.css +0 -15
- package/dist/CdsSearch/index.js +0 -8
- package/dist/CdsSearch/styles.css +0 -19
- package/dist/CdsSelect/index.js +0 -8
- package/dist/CdsSelect/styles.css +0 -15
- package/dist/CdsSidebar/index.js +0 -8
- package/dist/CdsSidebar/styles.css +0 -15
- package/dist/CdsSkeleton/index.js +0 -8
- package/dist/CdsSkeleton/styles.css +0 -9
- package/dist/CdsStages/index.js +0 -8
- package/dist/CdsStages/styles.css +0 -9
- package/dist/CdsStatus/index.js +0 -8
- package/dist/CdsStatus/styles.css +0 -15
- package/dist/CdsSteps/index.js +0 -8
- package/dist/CdsSteps/styles.css +0 -19
- package/dist/CdsTable/index.js +0 -16
- package/dist/CdsTable/styles.css +0 -21
- package/dist/CdsTabs/index.js +0 -8
- package/dist/CdsTabs/styles.css +0 -9
- package/dist/CdsTag/index.js +0 -8
- package/dist/CdsTag/styles.css +0 -11
- package/dist/CdsTextArea/index.js +0 -8
- package/dist/CdsTextArea/styles.css +0 -17
- package/dist/CdsTextInput/index.js +0 -8
- package/dist/CdsTextInput/styles.css +0 -15
- package/dist/CdsToggle/index.js +0 -8
- package/dist/CdsToggle/styles.css +0 -9
- package/dist/CdsTooltip/index.js +0 -8
- package/dist/CdsTooltip/styles.css +0 -13
- package/dist/CdsUploader/index.js +0 -14
- package/dist/CdsUploader/styles.css +0 -25
- package/dist/cds.js +0 -38
- package/dist/cds.min.css +0 -7
- package/dist/cds.min.js +0 -38
- package/dist/index.html +0 -60
- package/dist/mixins/scss/layout/_breakpoint.scss +0 -237
- package/dist/mixins/scss/layout/_key-height.scss +0 -90
- package/dist/mixins/scss/layout/_spacing-export.scss +0 -34
- package/dist/mixins/scss/layout/_utilities.scss +0 -33
- package/dist/types/CdsAccordion.ts +0 -4
- package/dist/types/CdsAccordionItem.ts +0 -10
- package/dist/types/CdsBreadcrumbs.ts +0 -11
- package/dist/types/CdsBreadcrumbsItem.ts +0 -12
- package/dist/types/CdsButton.ts +0 -30
- package/dist/types/CdsCheckbox.ts +0 -20
- package/dist/types/CdsCheckboxGroup.ts +0 -14
- package/dist/types/CdsCol.ts +0 -38
- package/dist/types/CdsCombobox.ts +0 -42
- package/dist/types/CdsContainer.ts +0 -32
- package/dist/types/CdsContentSwitcher.ts +0 -4
- package/dist/types/CdsContentSwitcherButton.ts +0 -21
- package/dist/types/CdsDataTable.ts +0 -48
- package/dist/types/CdsDatePicker.ts +0 -40
- package/dist/types/CdsDrawer.ts +0 -25
- package/dist/types/CdsDrawerGroup.ts +0 -8
- package/dist/types/CdsDrawerItem.ts +0 -12
- package/dist/types/CdsDrawerLabel.ts +0 -4
- package/dist/types/CdsDropdown.ts +0 -14
- package/dist/types/CdsEmptyState.ts +0 -10
- package/dist/types/CdsFooter.ts +0 -17
- package/dist/types/CdsFooterService.ts +0 -16
- package/dist/types/CdsForm.ts +0 -4
- package/dist/types/CdsFormGroup.ts +0 -8
- package/dist/types/CdsFormItem.ts +0 -4
- package/dist/types/CdsGrid.ts +0 -16
- package/dist/types/CdsHeader.ts +0 -27
- package/dist/types/CdsHeaderService.ts +0 -4
- package/dist/types/CdsIcon.ts +0 -6
- package/dist/types/CdsLink.ts +0 -22
- package/dist/types/CdsList.ts +0 -6
- package/dist/types/CdsLoading.ts +0 -14
- package/dist/types/CdsModal.ts +0 -17
- package/dist/types/CdsMultiselect.ts +0 -33
- package/dist/types/CdsNotification.ts +0 -22
- package/dist/types/CdsOverflowMenu.ts +0 -16
- package/dist/types/CdsPagination.ts +0 -12
- package/dist/types/CdsRadioButton.ts +0 -29
- package/dist/types/CdsRow.ts +0 -18
- package/dist/types/CdsSearch.ts +0 -24
- package/dist/types/CdsSelect.ts +0 -37
- package/dist/types/CdsSkeleton.ts +0 -14
- package/dist/types/CdsStages.ts +0 -10
- package/dist/types/CdsStatus.ts +0 -22
- package/dist/types/CdsSteps.ts +0 -22
- package/dist/types/CdsStepsItem.ts +0 -12
- package/dist/types/CdsTable.ts +0 -46
- package/dist/types/CdsTabs.ts +0 -19
- package/dist/types/CdsTabsItem.ts +0 -18
- package/dist/types/CdsTag.ts +0 -20
- package/dist/types/CdsTextArea.ts +0 -26
- package/dist/types/CdsTextInput.ts +0 -32
- package/dist/types/CdsToggle.ts +0 -18
- package/dist/types/CdsTooltip.ts +0 -18
- package/dist/types/CdsTooltipDefinition.ts +0 -16
- package/dist/types/CdsTooltipInteractive.ts +0 -11
- package/dist/types/CdsUploader.ts +0 -44
- package/dist/types/Sidebar.ts +0 -17
- package/dist/types/types.ts +0 -2
- package/dist/utils/convertRemToPx.js +0 -9
- package/dist/utils/deepFind.js +0 -14
- package/dist/utils/expiringStorage.js +0 -28
- package/dist/utils/helpers.js +0 -33
- package/dist/utils/index.js +0 -1
- package/dist/utils/isCorrectTag.js +0 -5
- package/dist/utils/isRightProps.js +0 -5
- package/dist/utils/memoize.js +0 -8
- package/dist/utils/suffixPropName.js +0 -12
- package/dist/utils/test/deepFind.test.js +0 -18
- package/dist/utils/test/isCorrectTag.test.js +0 -9
- package/dist/utils/test/isCorrectTagDataSet.js +0 -51
- package/dist/utils/validationProps.js +0 -7
- /package/{dist/mixins/scss → src/scss/mixins}/layout/_layout.scss +0 -0
- /package/{dist/mixins/scss → src/scss/mixins}/layout/_mini-unit.scss +0 -0
- /package/{dist/mixins/scss → src/scss/mixins}/layout/_spacing.scss +0 -0
- /package/{dist/mixins/scss → src/scss/mixins}/motion.scss +0 -0
- /package/{dist/tokens → src/scss/themes}/b2b/variables.css +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { ComputedRef, PropType, Ref } from 'vue';
|
|
2
|
+
export interface IInputSlot {
|
|
3
|
+
id: ComputedRef<string>;
|
|
4
|
+
isDirty: ComputedRef<boolean>;
|
|
5
|
+
isDisabled: ComputedRef<boolean>;
|
|
6
|
+
isReadonly: ComputedRef<boolean>;
|
|
7
|
+
isPure: Ref<boolean>;
|
|
8
|
+
isValid: ComputedRef<boolean | null>;
|
|
9
|
+
isValidating: Ref<boolean>;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
resetValidation: () => void;
|
|
12
|
+
validate: () => Promise<string[]>;
|
|
13
|
+
}
|
|
14
|
+
export interface IInputProps {
|
|
15
|
+
id: string | undefined;
|
|
16
|
+
label: string | undefined;
|
|
17
|
+
description: string | undefined;
|
|
18
|
+
value: any;
|
|
19
|
+
}
|
|
20
|
+
export interface IUseInput {
|
|
21
|
+
id: ComputedRef<string>;
|
|
22
|
+
hasLabel: ComputedRef<boolean>;
|
|
23
|
+
hasDescription: ComputedRef<boolean>;
|
|
24
|
+
}
|
|
25
|
+
export declare const makeInputProps: <Defaults extends {
|
|
26
|
+
id?: unknown;
|
|
27
|
+
label?: unknown;
|
|
28
|
+
description?: unknown;
|
|
29
|
+
value?: unknown;
|
|
30
|
+
messages?: unknown;
|
|
31
|
+
persistentMessages?: unknown;
|
|
32
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
33
|
+
/**
|
|
34
|
+
* Идентификатор
|
|
35
|
+
*/
|
|
36
|
+
id: {
|
|
37
|
+
type: PropType<string>;
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Лейбл
|
|
42
|
+
*/
|
|
43
|
+
label: {
|
|
44
|
+
type: PropType<string>;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Описание
|
|
49
|
+
*/
|
|
50
|
+
description: {
|
|
51
|
+
type: PropType<string>;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Значение
|
|
56
|
+
*/
|
|
57
|
+
value: {
|
|
58
|
+
type: PropType<any>;
|
|
59
|
+
default: null;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Сообщения подсказки
|
|
63
|
+
*/
|
|
64
|
+
messages: {
|
|
65
|
+
type: PropType<string | string[]>;
|
|
66
|
+
default: () => never[];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Всегда показывать сообщения и подсказки
|
|
70
|
+
*/
|
|
71
|
+
persistentMessages: {
|
|
72
|
+
type: PropType<boolean>;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
}, Defaults>;
|
|
76
|
+
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<{}>;
|
|
80
|
+
};
|
|
81
|
+
export declare function useFilteredInputAttrs(attrs: Record<string, unknown>): {
|
|
82
|
+
rootAttrs: Ref<{}>;
|
|
83
|
+
inputAttrs: Ref<{}>;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Filter attributes that should be applied to
|
|
87
|
+
* the root element of a an input component. Remaining
|
|
88
|
+
* attributes should be passed to the <input> element inside.
|
|
89
|
+
*/
|
|
90
|
+
export declare function filterInputAttrs(attrs: Record<string, unknown>): [yes: Partial<Pick<Record<string, unknown>, any>>, no: Omit<Record<string, unknown>, any>];
|
|
91
|
+
/**
|
|
92
|
+
* Filter props for input controls
|
|
93
|
+
* @param props
|
|
94
|
+
* @param exclude
|
|
95
|
+
*/
|
|
96
|
+
export declare function filterInputProps(props: Record<string, unknown>, exclude: string[]): (Partial<Pick<Record<string, unknown>, string>> | Omit<Record<string, unknown>, string>)[];
|
|
97
|
+
export declare const excludeControls: RegExp;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { PropType, ComputedRef } from 'vue';
|
|
2
|
+
export declare type TItemKey = boolean | string | (string | number)[] | ((item: Record<string, any>, fallback?: any) => any);
|
|
3
|
+
export interface IInternalItem<T = any> {
|
|
4
|
+
title: string;
|
|
5
|
+
value: any;
|
|
6
|
+
props: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
title: string;
|
|
9
|
+
value: any;
|
|
10
|
+
};
|
|
11
|
+
children?: IInternalItem<T>[];
|
|
12
|
+
raw: T;
|
|
13
|
+
}
|
|
14
|
+
export interface IItemsProps {
|
|
15
|
+
items: any[];
|
|
16
|
+
itemTitle: TItemKey;
|
|
17
|
+
itemValue: TItemKey;
|
|
18
|
+
itemChildren: TItemKey;
|
|
19
|
+
itemProps: TItemKey;
|
|
20
|
+
returnObject: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface IUseItems {
|
|
23
|
+
items: ComputedRef<IInternalItem[]>;
|
|
24
|
+
itemsProps: string[];
|
|
25
|
+
}
|
|
26
|
+
export declare const makeItemsProps: <Defaults extends {
|
|
27
|
+
items?: unknown;
|
|
28
|
+
itemTitle?: unknown;
|
|
29
|
+
itemValue?: unknown;
|
|
30
|
+
itemChildren?: unknown;
|
|
31
|
+
itemProps?: unknown;
|
|
32
|
+
returnObject?: unknown;
|
|
33
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
34
|
+
/**
|
|
35
|
+
* Массив списка элементов
|
|
36
|
+
*/
|
|
37
|
+
items: {
|
|
38
|
+
type: PropType<any[]>;
|
|
39
|
+
default: () => never[];
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Ключ для заголовка элемента
|
|
43
|
+
*/
|
|
44
|
+
itemTitle: {
|
|
45
|
+
type: PropType<TItemKey>;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Ключ для значения элемента
|
|
50
|
+
*/
|
|
51
|
+
itemValue: {
|
|
52
|
+
type: PropType<TItemKey>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Ключ для дочерних элементов
|
|
57
|
+
*/
|
|
58
|
+
itemChildren: {
|
|
59
|
+
type: PropType<TItemKey>;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Ключ для дополнительных свойств элемента
|
|
64
|
+
*/
|
|
65
|
+
itemProps: {
|
|
66
|
+
type: PropType<TItemKey>;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Возвращать объект вместо массива
|
|
71
|
+
*/
|
|
72
|
+
returnObject: {
|
|
73
|
+
type: PropType<boolean>;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
}, Defaults>;
|
|
77
|
+
export declare function useItems(props: IItemsProps): IUseItems;
|
|
78
|
+
export declare function transformItem(props: Omit<IItemsProps, 'items'>, item: any): IInternalItem;
|
|
79
|
+
export declare function transformItems(props: Omit<IItemsProps, 'items'>, items: IItemsProps['items']): IInternalItem[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
export interface ILazyProps {
|
|
4
|
+
eager: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IUseLazy {
|
|
7
|
+
isBooted: Ref<boolean>;
|
|
8
|
+
hasContent: ComputedRef<boolean>;
|
|
9
|
+
onAfterLeave: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useLazy(props: ILazyProps, active: Ref<boolean>): IUseLazy;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
import type { RouteLocationRaw, useLink as TUseLink } from 'vue-router';
|
|
3
|
+
export interface ILinkProps {
|
|
4
|
+
href: string | undefined;
|
|
5
|
+
to: RouteLocationRaw | undefined;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IUseLink extends Omit<Partial<ReturnType<typeof TUseLink>>, 'href' | 'isActive'> {
|
|
9
|
+
isActive: ComputedRef<boolean> | undefined;
|
|
10
|
+
isLink: ComputedRef<boolean>;
|
|
11
|
+
href: ComputedRef<string | undefined>;
|
|
12
|
+
to: ComputedRef<RouteLocationRaw | undefined>;
|
|
13
|
+
tag: ComputedRef<string>;
|
|
14
|
+
handleClick: (event: MouseEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const makeLinkProps: <Defaults extends {
|
|
17
|
+
href?: unknown;
|
|
18
|
+
to?: unknown;
|
|
19
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
20
|
+
/**
|
|
21
|
+
* Обычная ссылка
|
|
22
|
+
*/
|
|
23
|
+
href: {
|
|
24
|
+
type: PropType<string>;
|
|
25
|
+
default: undefined;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Ссылка или объект Vue Router
|
|
29
|
+
*/
|
|
30
|
+
to: {
|
|
31
|
+
type: PropType<RouteLocationRaw>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
}, Defaults>;
|
|
35
|
+
export declare function useLink(props: ILinkProps, emit: Function): IUseLink;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
export interface ILoadingProp {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IUseLoading {
|
|
6
|
+
loadingClasses: ComputedRef<string | undefined>;
|
|
7
|
+
hasLoading: ComputedRef<boolean>;
|
|
8
|
+
}
|
|
9
|
+
export declare const makeLoadingProps: <Defaults extends {
|
|
10
|
+
loading?: unknown;
|
|
11
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
12
|
+
/**
|
|
13
|
+
* Состояние загрузки
|
|
14
|
+
*/
|
|
15
|
+
loading: {
|
|
16
|
+
type: PropType<boolean>;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
}, Defaults>;
|
|
20
|
+
export declare function useLoading(props: ILoadingProp): IUseLoading;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Ref, InjectionKey, PropType, SetupContext } from 'vue';
|
|
2
|
+
import type { TSelectStrategyProp } from './selectStrategies';
|
|
3
|
+
import type { TOpenStrategyProp } from './openStrategies';
|
|
4
|
+
declare type TNestedProvide = {
|
|
5
|
+
id: Ref<unknown>;
|
|
6
|
+
isGroupActivator?: boolean;
|
|
7
|
+
root: {
|
|
8
|
+
children: Ref<Map<unknown, unknown[]>>;
|
|
9
|
+
parents: Ref<Map<unknown, unknown>>;
|
|
10
|
+
opened: Ref<Set<unknown>>;
|
|
11
|
+
selected: Ref<Map<unknown, 'on' | 'off' | 'indeterminate'>>;
|
|
12
|
+
selectedValues: Ref<unknown[]>;
|
|
13
|
+
register: (id: unknown, parentId: unknown, isGroup?: boolean) => void;
|
|
14
|
+
unregister: (id: unknown) => void;
|
|
15
|
+
open: (id: unknown, value: boolean, event?: Event) => void;
|
|
16
|
+
select: (id: unknown, value: boolean, event?: Event) => void;
|
|
17
|
+
openOnSelect: (id: unknown, value: boolean, event?: Event) => void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export interface INestedProps {
|
|
21
|
+
selectStrategy: TSelectStrategyProp | undefined;
|
|
22
|
+
openStrategy: TOpenStrategyProp | undefined;
|
|
23
|
+
selected: unknown[] | unknown;
|
|
24
|
+
opened: unknown[] | unknown;
|
|
25
|
+
required: boolean;
|
|
26
|
+
'onUpdate:selected'?: ((val: unknown[]) => void) | undefined;
|
|
27
|
+
'onUpdate:opened'?: ((val: unknown[]) => void) | undefined;
|
|
28
|
+
}
|
|
29
|
+
export declare const NestedKey: InjectionKey<TNestedProvide>;
|
|
30
|
+
export declare const emptyNested: TNestedProvide;
|
|
31
|
+
export declare const makeNestedProps: <Defaults extends {
|
|
32
|
+
selectStrategy?: unknown;
|
|
33
|
+
openStrategy?: unknown;
|
|
34
|
+
opened?: unknown;
|
|
35
|
+
selected?: unknown;
|
|
36
|
+
required?: unknown;
|
|
37
|
+
} = {}>(defaults?: Defaults | undefined) => import('../../utils').AppendDefault<{
|
|
38
|
+
/**
|
|
39
|
+
* Стратегия выбора элементов
|
|
40
|
+
*/
|
|
41
|
+
selectStrategy: PropType<TSelectStrategyProp>;
|
|
42
|
+
/**
|
|
43
|
+
* Стратегия открытия элементов
|
|
44
|
+
*/
|
|
45
|
+
openStrategy: PropType<TOpenStrategyProp>;
|
|
46
|
+
/**
|
|
47
|
+
* Массив открытых элементов
|
|
48
|
+
*/
|
|
49
|
+
opened: PropType<unknown[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Массив выбранных элементов
|
|
52
|
+
*/
|
|
53
|
+
selected: PropType<unknown[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Обязательный выбор
|
|
56
|
+
*/
|
|
57
|
+
required: BooleanConstructor;
|
|
58
|
+
}, Defaults>;
|
|
59
|
+
export declare const useNested: (props: INestedProps, ctx: SetupContext<any[]>) => TNestedProvide['root'];
|
|
60
|
+
export declare const useNestedItem: (id: Ref<unknown>, isGroup: boolean) => {
|
|
61
|
+
id: import("vue").ComputedRef<{}>;
|
|
62
|
+
open: (open: boolean, event: Event) => void;
|
|
63
|
+
openOnSelect: (open: boolean, event?: Event) => void;
|
|
64
|
+
isOpen: import("vue").ComputedRef<boolean>;
|
|
65
|
+
parent: import("vue").ComputedRef<unknown>;
|
|
66
|
+
select: (selected: boolean, event?: Event) => void;
|
|
67
|
+
isSelected: import("vue").ComputedRef<boolean>;
|
|
68
|
+
isIndeterminate: import("vue").ComputedRef<boolean>;
|
|
69
|
+
isLeaf: import("vue").ComputedRef<boolean>;
|
|
70
|
+
isGroupActivator: boolean | undefined;
|
|
71
|
+
root: {
|
|
72
|
+
children: Ref<Map<unknown, unknown[]>>;
|
|
73
|
+
parents: Ref<Map<unknown, unknown>>;
|
|
74
|
+
opened: Ref<Set<unknown>>;
|
|
75
|
+
selected: Ref<Map<unknown, 'on' | 'off' | 'indeterminate'>>;
|
|
76
|
+
selectedValues: Ref<unknown[]>;
|
|
77
|
+
register: (id: unknown, parentId: unknown, isGroup?: boolean) => void;
|
|
78
|
+
unregister: (id: unknown) => void;
|
|
79
|
+
open: (id: unknown, value: boolean, event?: Event) => void;
|
|
80
|
+
select: (id: unknown, value: boolean, event?: Event) => void;
|
|
81
|
+
openOnSelect: (id: unknown, value: boolean, event?: Event) => void;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export declare const useNestedGroupActivator: () => void;
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare type TOpenStrategyFn = (data: {
|
|
2
|
+
id: unknown;
|
|
3
|
+
value: boolean;
|
|
4
|
+
opened: Set<unknown>;
|
|
5
|
+
children: Map<unknown, unknown[]>;
|
|
6
|
+
parents: Map<unknown, unknown>;
|
|
7
|
+
event?: Event;
|
|
8
|
+
}) => Set<unknown>;
|
|
9
|
+
export declare type TOpenSelectStrategyFn = (data: {
|
|
10
|
+
id: unknown;
|
|
11
|
+
value: boolean;
|
|
12
|
+
opened: Set<unknown>;
|
|
13
|
+
selected: Map<unknown, 'on' | 'off' | 'indeterminate'>;
|
|
14
|
+
children: Map<unknown, unknown[]>;
|
|
15
|
+
parents: Map<unknown, unknown>;
|
|
16
|
+
event?: Event;
|
|
17
|
+
}) => Set<unknown> | null;
|
|
18
|
+
export declare type TOpenStrategy = {
|
|
19
|
+
open: TOpenStrategyFn;
|
|
20
|
+
select: TOpenSelectStrategyFn;
|
|
21
|
+
};
|
|
22
|
+
export declare type TOpenStrategyProp = 'single' | 'multiple' | 'list' | TOpenStrategy;
|
|
23
|
+
export declare const singleOpenStrategy: TOpenStrategy;
|
|
24
|
+
export declare const multipleOpenStrategy: TOpenStrategy;
|
|
25
|
+
export declare const listOpenStrategy: TOpenStrategy;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare type TSelectStrategyFn = (data: {
|
|
2
|
+
id: unknown;
|
|
3
|
+
value: boolean;
|
|
4
|
+
selected: Map<unknown, 'on' | 'off' | 'indeterminate'>;
|
|
5
|
+
children: Map<unknown, unknown[]>;
|
|
6
|
+
parents: Map<unknown, unknown>;
|
|
7
|
+
event?: Event;
|
|
8
|
+
}) => Map<unknown, 'on' | 'off' | 'indeterminate'>;
|
|
9
|
+
export declare type TSelectStrategyTransformInFn = (value: unknown[] | undefined, children: Map<unknown, unknown[]>, parents: Map<unknown, unknown>) => Map<unknown, 'on' | 'off' | 'indeterminate'>;
|
|
10
|
+
export declare type TSelectStrategyTransformOutFn = (value: Map<unknown, 'on' | 'off' | 'indeterminate'>, children: Map<unknown, unknown[]>, parents: Map<unknown, unknown>) => unknown[];
|
|
11
|
+
export declare type TSelectStrategy = {
|
|
12
|
+
select: TSelectStrategyFn;
|
|
13
|
+
in: TSelectStrategyTransformInFn;
|
|
14
|
+
out: TSelectStrategyTransformOutFn;
|
|
15
|
+
};
|
|
16
|
+
export declare type TSelectStrategyProp = 'single-leaf' | 'leaf' | 'independent' | 'single-independent' | 'classic' | TSelectStrategyFn;
|
|
17
|
+
export declare const independentSelectStrategy: (required?: boolean) => TSelectStrategy;
|
|
18
|
+
export declare const independentSingleSelectStrategy: (required?: boolean) => TSelectStrategy;
|
|
19
|
+
export declare const leafSelectStrategy: (required?: boolean) => TSelectStrategy;
|
|
20
|
+
export declare const leafSingleSelectStrategy: (required?: boolean) => TSelectStrategy;
|
|
21
|
+
export declare const classicSelectStrategy: (required?: boolean) => TSelectStrategy;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export interface IOverlayProps {
|
|
3
|
+
attach: boolean | string | Element | undefined;
|
|
4
|
+
contained: boolean | undefined;
|
|
5
|
+
eager: boolean | undefined;
|
|
6
|
+
disabled: boolean | undefined;
|
|
7
|
+
persistent: boolean | undefined;
|
|
8
|
+
scrim: boolean | string | undefined;
|
|
9
|
+
modelValue: boolean | undefined;
|
|
10
|
+
zIndex: number | string | undefined;
|
|
11
|
+
contentClasses: string | string[] | Record<string, boolean> | undefined;
|
|
12
|
+
contentProps: Record<string, unknown> | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const makeOverlayProps: <Defaults extends {
|
|
15
|
+
attach?: unknown;
|
|
16
|
+
contained?: unknown;
|
|
17
|
+
eager?: unknown;
|
|
18
|
+
disabled?: unknown;
|
|
19
|
+
persistent?: unknown;
|
|
20
|
+
scrim?: unknown;
|
|
21
|
+
modelValue?: unknown;
|
|
22
|
+
zIndex?: unknown;
|
|
23
|
+
contentClasses?: unknown;
|
|
24
|
+
contentProps?: unknown;
|
|
25
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
26
|
+
/**
|
|
27
|
+
* Указывает, к какому DOM элементу будет прикреплен компонент.
|
|
28
|
+
* По умолчанию прикрепляется к body.
|
|
29
|
+
* Если передана строка, то ищет элемент по querySelector.
|
|
30
|
+
* Если передан объект, то считает его допустимым Node элементом.
|
|
31
|
+
*/
|
|
32
|
+
attach: {
|
|
33
|
+
type: PropType<string | boolean | Element>;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Указывает, что компонент будет прикреплен к родительскому элементу. Подразумевает absolute и attach
|
|
38
|
+
*/
|
|
39
|
+
contained: {
|
|
40
|
+
type: PropType<boolean>;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Принудительно рендерит контент компонента в DOM, даже если компонент скрыт. Полезно для SEO оптимизации.
|
|
45
|
+
*/
|
|
46
|
+
eager: {
|
|
47
|
+
type: PropType<boolean>;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Блокирует возможность клика или фокуса всплывающего компонента
|
|
52
|
+
*/
|
|
53
|
+
disabled: {
|
|
54
|
+
type: PropType<boolean>;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Клик за пределами компонента или esc не будет закрывать его
|
|
59
|
+
*/
|
|
60
|
+
persistent: {
|
|
61
|
+
type: PropType<boolean>;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Фон для компонента. Строкой можно передать цвет фона.
|
|
66
|
+
*/
|
|
67
|
+
scrim: {
|
|
68
|
+
type: PropType<string | boolean>;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Значение v-model. Управляет видимостью компонента.
|
|
73
|
+
*/
|
|
74
|
+
modelValue: {
|
|
75
|
+
type: PropType<boolean>;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Значение z-index для оверлея
|
|
80
|
+
*/
|
|
81
|
+
zIndex: {
|
|
82
|
+
type: PropType<string | number>;
|
|
83
|
+
default: number;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Классы для контента компонента
|
|
87
|
+
*/
|
|
88
|
+
contentClasses: {
|
|
89
|
+
type: PropType<string | string[] | Record<string, boolean>>;
|
|
90
|
+
default: null;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Свойства для контента компонента
|
|
94
|
+
*/
|
|
95
|
+
contentProps: {
|
|
96
|
+
type: PropType<Record<string, unknown>>;
|
|
97
|
+
default: () => {};
|
|
98
|
+
};
|
|
99
|
+
}, Defaults>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
declare type InnerVal<T> = T extends any[] ? Readonly<T> : T;
|
|
3
|
+
export declare function useProxyModel<Props extends object & {
|
|
4
|
+
[key in Prop as `onUpdate:${Prop}`]?: ((val: any) => void) | undefined;
|
|
5
|
+
}, Prop extends Extract<keyof Props, string>, Inner = Props[Prop]>(props: Props, prop: Prop, defaultValue?: Props[Prop], transformIn?: (value?: Props[Prop]) => Inner, transformOut?: (value: Inner) => Props[Prop]): Ref<InnerVal<Inner>> & {
|
|
6
|
+
readonly externalValue: Props[Prop];
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
import type { MaybeRef } from '../utils';
|
|
3
|
+
export declare type TSize = typeof allowedSize[number];
|
|
4
|
+
export interface ISizeProps {
|
|
5
|
+
size: TSize;
|
|
6
|
+
}
|
|
7
|
+
export interface IUseSize {
|
|
8
|
+
sizeClasses: ComputedRef<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare const allowedSize: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
11
|
+
export declare const makeSizeProps: <Defaults extends {
|
|
12
|
+
size?: unknown;
|
|
13
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
14
|
+
/**
|
|
15
|
+
* Размер
|
|
16
|
+
*/
|
|
17
|
+
size: {
|
|
18
|
+
type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
19
|
+
default: string;
|
|
20
|
+
available: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
21
|
+
validator: (value: TSize) => boolean;
|
|
22
|
+
};
|
|
23
|
+
}, Defaults>;
|
|
24
|
+
export declare function useSize(props: MaybeRef<ISizeProps>, name: string): IUseSize;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
export declare type TStatus = typeof allowedStatus[number];
|
|
3
|
+
export interface IStatusProps {
|
|
4
|
+
status: TStatus;
|
|
5
|
+
}
|
|
6
|
+
export interface IUseStatus {
|
|
7
|
+
statusClasses: ComputedRef<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const allowedStatus: readonly ["info", "success", "warning", "error", "progress"];
|
|
10
|
+
export declare const makeStatusProps: <Defaults extends {
|
|
11
|
+
status?: unknown;
|
|
12
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
13
|
+
status: {
|
|
14
|
+
type: PropType<"error" | "info" | "success" | "warning" | "progress">;
|
|
15
|
+
default: string;
|
|
16
|
+
available: readonly ["info", "success", "warning", "error", "progress"];
|
|
17
|
+
description: string;
|
|
18
|
+
validator: (value: TStatus) => boolean;
|
|
19
|
+
};
|
|
20
|
+
}, Defaults>;
|
|
21
|
+
export declare function useStatus(props: IStatusProps, name: string): IUseStatus;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export interface ITagProps {
|
|
3
|
+
tag: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const makeTagProps: <Defaults extends {
|
|
6
|
+
tag?: unknown;
|
|
7
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
8
|
+
/**
|
|
9
|
+
* Пользовательский элемент для отображения
|
|
10
|
+
*/
|
|
11
|
+
tag: {
|
|
12
|
+
type: PropType<string>;
|
|
13
|
+
default: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
}, Defaults>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export interface ITextProps {
|
|
3
|
+
text: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface IUseText {
|
|
6
|
+
}
|
|
7
|
+
export declare const makeTextProps: <Defaults extends {
|
|
8
|
+
text?: unknown;
|
|
9
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
10
|
+
/**
|
|
11
|
+
* Текст
|
|
12
|
+
*/
|
|
13
|
+
text: {
|
|
14
|
+
type: PropType<string>;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
}, Defaults>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue';
|
|
2
|
+
interface ITransitionProps extends TransitionProps {
|
|
3
|
+
transition: string | boolean | (TransitionProps & {
|
|
4
|
+
component?: Component;
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
export declare const makeTransitionProps: <Defaults extends {
|
|
8
|
+
transition?: unknown;
|
|
9
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
10
|
+
/**
|
|
11
|
+
* Анимация компонента
|
|
12
|
+
*/
|
|
13
|
+
transition: {
|
|
14
|
+
type: PropType<string | boolean | (TransitionProps & {
|
|
15
|
+
component?: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | undefined;
|
|
16
|
+
})>;
|
|
17
|
+
default: string;
|
|
18
|
+
validator: (value: unknown) => boolean;
|
|
19
|
+
};
|
|
20
|
+
}, Defaults>;
|
|
21
|
+
export declare const CdsTransition: FunctionalComponent<ITransitionProps>;
|
|
22
|
+
export {};
|