@feugene/granularity 0.41.0 → 0.43.0
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/LICENSE +13 -162
- package/README.md +5 -5
- package/dist/chunks/config-BXRmsn3t.js +172 -0
- package/dist/chunks/config-BXRmsn3t.js.map +1 -0
- package/dist/chunks/{config-BRESvs9g.js → config-Ca8qr8Q3.js} +1 -1
- package/dist/chunks/{config-BRESvs9g.js.map → config-Ca8qr8Q3.js.map} +1 -1
- package/dist/chunks/config-Dg0bSoGw.js +81 -0
- package/dist/chunks/config-Dg0bSoGw.js.map +1 -0
- package/dist/chunks/config-DmED6aJV.js +237 -0
- package/dist/chunks/config-DmED6aJV.js.map +1 -0
- package/dist/chunks/{config-DWL81-aM.js → config-hnoZvcIM.js} +2 -20
- package/dist/chunks/config-hnoZvcIM.js.map +1 -0
- package/dist/chunks/dragSortGeometry-CY-llfrQ.js +87 -0
- package/dist/chunks/dragSortGeometry-CY-llfrQ.js.map +1 -0
- package/dist/chunks/{en-CuuLfNHX.js → en-C_QkUTRL.js} +36 -1
- package/dist/chunks/en-C_QkUTRL.js.map +1 -0
- package/dist/chunks/{es-CsmvfESn.js → es-B4t_3Wnh.js} +3 -3
- package/dist/chunks/{es-CsmvfESn.js.map → es-B4t_3Wnh.js.map} +1 -1
- package/dist/chunks/{es-CSnmrcMw.js → es-DemSEhZE.js} +36 -1
- package/dist/chunks/es-DemSEhZE.js.map +1 -0
- package/dist/chunks/{generated-B95IBXs6.js → generated-VcxJTo_q.js} +210 -0
- package/dist/chunks/generated-VcxJTo_q.js.map +1 -0
- package/dist/chunks/{grKbdStyles-DENu8pUK.js → grKbdStyles-ByMsX-lQ.js} +17 -2
- package/dist/chunks/grKbdStyles-ByMsX-lQ.js.map +1 -0
- package/dist/chunks/{granular-provider-BshNi2la.js → granular-provider-BohXQcNt.js} +8 -2
- package/dist/chunks/granular-provider-BohXQcNt.js.map +1 -0
- package/dist/chunks/{ru-BKWafECI.js → ru-CLUErjhY.js} +36 -1
- package/dist/chunks/ru-CLUErjhY.js.map +1 -0
- package/dist/chunks/scrollOverflow-B_kEdcol.js +31 -0
- package/dist/chunks/scrollOverflow-B_kEdcol.js.map +1 -0
- package/dist/chunks/tones-CRJAaYyg.js +21 -0
- package/dist/chunks/tones-CRJAaYyg.js.map +1 -0
- package/dist/components/GrAffix/chunks/GrAffix-CWtC7yi8.js +272 -0
- package/dist/components/GrAffix/chunks/GrAffix-CWtC7yi8.js.map +1 -0
- package/dist/components/GrAffix/index.js +3 -0
- package/dist/components/GrBreadcrumbs/chunks/{GrBreadcrumbs-DOpwY2EF.js → GrBreadcrumbs-D0qPry_R.js} +4 -1
- package/dist/components/GrBreadcrumbs/chunks/GrBreadcrumbs-D0qPry_R.js.map +1 -0
- package/dist/components/GrBreadcrumbs/index.js +1 -1
- package/dist/components/GrCarousel/chunks/GrCarousel-ByuughtI.js +761 -0
- package/dist/components/GrCarousel/chunks/GrCarousel-ByuughtI.js.map +1 -0
- package/dist/components/GrCarousel/index.js +3 -0
- package/dist/components/GrCarousel/styles.css +1 -0
- package/dist/components/GrColorPicker/chunks/{GrColorPicker-BwzRLs-i.js → GrColorPicker-9mTR-YZ_.js} +1 -1
- package/dist/components/GrColorPicker/chunks/{GrColorPicker-BwzRLs-i.js.map → GrColorPicker-9mTR-YZ_.js.map} +1 -1
- package/dist/components/GrColorPicker/index.js +1 -1
- package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-CnzPuoIM.js → GrCommandPalette-Ha4s3DMT.js} +1 -1
- package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-CnzPuoIM.js.map → GrCommandPalette-Ha4s3DMT.js.map} +1 -1
- package/dist/components/GrCommandPalette/index.js +1 -1
- package/dist/components/GrDataTable/chunks/{GrDataTable-DpyipOFx.js → GrDataTable-xNSmO_I-.js} +9 -4
- package/dist/components/GrDataTable/chunks/GrDataTable-xNSmO_I-.js.map +1 -0
- package/dist/components/GrDataTable/index.js +1 -1
- package/dist/components/GrDelta/chunks/{GrDelta-BpfqebEV.js → GrDelta-CgTvfoIN.js} +0 -0
- package/dist/components/GrDelta/chunks/GrDelta-CgTvfoIN.js.map +1 -0
- package/dist/components/GrDelta/index.js +1 -1
- package/dist/components/GrDescriptionList/chunks/{GrDescriptionList-D8ANFpn_.js → GrDescriptionList-Dz2Jj1if.js} +26 -11
- package/dist/components/GrDescriptionList/chunks/GrDescriptionList-Dz2Jj1if.js.map +1 -0
- package/dist/components/GrDescriptionList/index.js +1 -1
- package/dist/components/GrFilePreview/chunks/{GrFilePreview-PabkLgYX.js → GrFilePreview-2kVOg1C7.js} +40 -5
- package/dist/components/GrFilePreview/chunks/GrFilePreview-2kVOg1C7.js.map +1 -0
- package/dist/components/GrFilePreview/index.js +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-Dd2gJ-j_.js.map → GrImageViewer-DK-iVHHC.js.map} +1 -1
- package/dist/components/GrImageViewer/index.js +1 -1
- package/dist/components/GrInputTag/chunks/{GrInputTag-3Au5HWZL.js → GrInputTag-Ci8AO1ze.js} +5 -2
- package/dist/components/GrInputTag/chunks/GrInputTag-Ci8AO1ze.js.map +1 -0
- package/dist/components/GrInputTag/index.js +1 -1
- package/dist/components/GrJsonViewer/chunks/{GrJsonViewer-CDGOX3C0.js → GrJsonViewer-CwCBMh4h.js} +34 -8
- package/dist/components/GrJsonViewer/chunks/GrJsonViewer-CwCBMh4h.js.map +1 -0
- package/dist/components/GrJsonViewer/index.js +1 -1
- package/dist/components/GrKbd/chunks/{GrKbd-D_a1mPLe.js → GrKbd-BNMeoaLV.js} +1 -1
- package/dist/components/GrKbd/chunks/{GrKbd-D_a1mPLe.js.map → GrKbd-BNMeoaLV.js.map} +1 -1
- package/dist/components/GrKbd/index.js +2 -2
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-BqPydXpK.js → GrNumberInput-CL5QhOmx.js} +5 -2
- package/dist/components/GrNumberInput/chunks/GrNumberInput-CL5QhOmx.js.map +1 -0
- package/dist/components/GrNumberInput/index.js +1 -1
- package/dist/components/GrProgressBar/index.js +1 -1
- package/dist/components/GrSegmented/chunks/{GrSegmented-NKTi9bMG.js → GrSegmented-CuDaKA6S.js} +5 -1
- package/dist/components/GrSegmented/chunks/GrSegmented-CuDaKA6S.js.map +1 -0
- package/dist/components/GrSegmented/index.js +1 -1
- package/dist/components/GrSlider/chunks/{GrSlider-Db-jACXz.js.map → GrSlider-CO8N9SF6.js.map} +1 -1
- package/dist/components/GrSlider/index.js +1 -1
- package/dist/components/GrSortableList/chunks/{GrSortableList-CQCaWivn.js → GrSortableList-NKriuGm_.js} +6 -2
- package/dist/components/GrSortableList/chunks/GrSortableList-NKriuGm_.js.map +1 -0
- package/dist/components/GrSortableList/index.js +1 -1
- package/dist/components/GrSteps/chunks/{GrSteps-DXj7m-WO.js → GrSteps-Cng-Wrjk.js} +5 -1
- package/dist/components/GrSteps/chunks/GrSteps-Cng-Wrjk.js.map +1 -0
- package/dist/components/GrSteps/index.js +1 -1
- package/dist/components/GrTabs/chunks/{GrTabs-DHfv67cp.js → GrTabs-s9RzC1WX.js} +7 -32
- package/dist/components/GrTabs/chunks/GrTabs-s9RzC1WX.js.map +1 -0
- package/dist/components/GrTabs/index.js +1 -1
- package/dist/components/GrTransfer/chunks/GrTransfer-8FA78ny6.js +1368 -0
- package/dist/components/GrTransfer/chunks/GrTransfer-8FA78ny6.js.map +1 -0
- package/dist/components/GrTransfer/index.js +3 -0
- package/dist/components/GrTransfer/styles.css +1 -0
- package/dist/components/GrTree/chunks/{GrTree-BFWFc0Bm.js → GrTree-CkHzgYg1.js} +3 -3
- package/dist/components/GrTree/chunks/{GrTree-BFWFc0Bm.js.map → GrTree-CkHzgYg1.js.map} +1 -1
- package/dist/components/GrTree/index.js +1 -1
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-DJa2lYGe.js → GrTreeSelect-DUsv3_mF.js} +1 -1
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-DJa2lYGe.js.map → GrTreeSelect-DUsv3_mF.js.map} +1 -1
- package/dist/components/GrTreeSelect/index.js +1 -1
- package/dist/composables/useDragSort.js +179 -1
- package/dist/composables/useDragSort.js.map +1 -0
- package/dist/granular-provider-node.js +1 -1
- package/dist/granular-provider.js +1 -1
- package/dist/i18n/all.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.js +32 -28
- package/dist/theme.js +1 -1
- package/dist/tokens.js +1 -1
- package/dist/types/components/GrAffix/GrAffix.vue.d.ts +91 -0
- package/dist/types/components/GrAffix/affixState.d.ts +81 -0
- package/dist/types/components/GrAffix/config.d.ts +1 -0
- package/dist/types/components/GrAffix/grAffixStyles.d.ts +46 -0
- package/dist/types/components/GrAffix/index.d.ts +9 -0
- package/dist/types/components/GrAffix/safelist.d.ts +1 -0
- package/dist/types/components/GrAlert/GrAlert.vue.d.ts +1 -1
- package/dist/types/components/GrBadgeWrap/GrBadgeWrap.vue.d.ts +2 -2
- package/dist/types/components/GrButton/GrButton.vue.d.ts +2 -2
- package/dist/types/components/GrCard/GrCard.vue.d.ts +1 -1
- package/dist/types/components/GrCarousel/GrCarousel.vue.d.ts +151 -0
- package/dist/types/components/GrCarousel/GrCarouselSlide.vue.d.ts +53 -0
- package/dist/types/components/GrCarousel/carouselNavigation.d.ts +57 -0
- package/dist/types/components/GrCarousel/composables/useCarouselAutoplay.d.ts +33 -0
- package/dist/types/components/GrCarousel/composables/useCarouselSwipe.d.ts +20 -0
- package/dist/types/components/GrCarousel/config.d.ts +7 -0
- package/dist/types/components/GrCarousel/defaults.d.ts +13 -0
- package/dist/types/components/GrCarousel/grCarouselContext.d.ts +46 -0
- package/dist/types/components/GrCarousel/grCarouselStyles.d.ts +80 -0
- package/dist/types/components/GrCarousel/index.d.ts +12 -0
- package/dist/types/components/GrCarousel/safelist.d.ts +1 -0
- package/dist/types/components/GrCheckbox/GrCheckbox.vue.d.ts +3 -3
- package/dist/types/components/GrCheckboxGroup/GrCheckboxGroup.vue.d.ts +2 -2
- package/dist/types/components/GrChip/GrChip.vue.d.ts +2 -2
- package/dist/types/components/GrChipGroup/GrChipGroup.vue.d.ts +2 -2
- package/dist/types/components/GrCollapse/GrCollapse.vue.d.ts +1 -1
- package/dist/types/components/GrCollapse/GrCollapseItem.vue.d.ts +1 -1
- package/dist/types/components/GrColorPicker/GrColorPicker.vue.d.ts +3 -3
- package/dist/types/components/GrCommandPalette/GrCommandPalette.vue.d.ts +1 -1
- package/dist/types/components/GrConfirmDialog/GrConfirmDialog.vue.d.ts +1 -1
- package/dist/types/components/GrContextMenu/GrContextMenu.vue.d.ts +2 -2
- package/dist/types/components/GrDialog/GrDialog.vue.d.ts +1 -1
- package/dist/types/components/GrDivider/GrDivider.vue.d.ts +2 -2
- package/dist/types/components/GrDrawer/GrDrawer.vue.d.ts +1 -1
- package/dist/types/components/GrDropdown/GrDropdown.vue.d.ts +3 -3
- package/dist/types/components/GrDropdownMenu/GrDropdownMenu.vue.d.ts +3 -3
- package/dist/types/components/GrDropdownMenu/GrDropdownMenuItem.vue.d.ts +1 -1
- package/dist/types/components/GrEmptyState/GrEmptyState.vue.d.ts +1 -1
- package/dist/types/components/GrFilePreview/GrFilePreview.vue.d.ts +14 -0
- package/dist/types/components/GrFileUpload/GrFileUpload.vue.d.ts +1 -1
- package/dist/types/components/GrFormField/GrFormField.vue.d.ts +3 -3
- package/dist/types/components/GrFormFile/GrFormFile.vue.d.ts +2 -2
- package/dist/types/components/GrFormSection/GrFormSection.vue.d.ts +1 -1
- package/dist/types/components/GrIcon/GrIcon.vue.d.ts +1 -1
- package/dist/types/components/GrImageViewer/GrImageViewer.vue.d.ts +3 -3
- package/dist/types/components/GrInput/GrInput.vue.d.ts +4 -4
- package/dist/types/components/GrInputTag/GrInputTag.vue.d.ts +3 -3
- package/dist/types/components/GrKbd/GrKbd.vue.d.ts +1 -1
- package/dist/types/components/GrKbd/grKbdStyles.d.ts +17 -2
- package/dist/types/components/GrLink/GrLink.vue.d.ts +1 -1
- package/dist/types/components/GrList/GrListItem.vue.d.ts +2 -2
- package/dist/types/components/GrNavbar/GrNavbar.vue.d.ts +2 -2
- package/dist/types/components/GrNumberInput/GrNumberInput.vue.d.ts +3 -3
- package/dist/types/components/GrPagination/GrPagination.vue.d.ts +1 -1
- package/dist/types/components/GrPopover/GrPopover.vue.d.ts +3 -3
- package/dist/types/components/GrPromptDialog/GrPromptDialog.vue.d.ts +3 -3
- package/dist/types/components/GrRadio/GrRadio.vue.d.ts +2 -2
- package/dist/types/components/GrRadioGroup/GrRadioGroup.vue.d.ts +2 -2
- package/dist/types/components/GrRating/GrRating.vue.d.ts +2 -2
- package/dist/types/components/GrSegmented/GrSegmented.vue.d.ts +2 -2
- package/dist/types/components/GrSidebar/GrSidebarItem.vue.d.ts +1 -1
- package/dist/types/components/GrSkeleton/GrSkeleton.vue.d.ts +1 -1
- package/dist/types/components/GrSlider/GrSlider.vue.d.ts +3 -3
- package/dist/types/components/GrSplitter/GrSplitter.vue.d.ts +1 -1
- package/dist/types/components/GrStatistic/GrStatistic.vue.d.ts +2 -2
- package/dist/types/components/GrSwitch/GrSwitch.vue.d.ts +3 -3
- package/dist/types/components/GrTable/GrTable.vue.d.ts +1 -1
- package/dist/types/components/GrTabs/GrTabs.vue.d.ts +1 -1
- package/dist/types/components/GrTextarea/GrTextarea.vue.d.ts +2 -2
- package/dist/types/components/GrTimeline/GrTimelineItem.vue.d.ts +2 -2
- package/dist/types/components/GrToaster/GrToaster.vue.d.ts +1 -1
- package/dist/types/components/GrTooltip/GrTooltip.vue.d.ts +3 -3
- package/dist/types/components/GrTransfer/GrTransfer.vue.d.ts +103 -0
- package/dist/types/components/GrTransfer/config.d.ts +1 -0
- package/dist/types/components/GrTransfer/defaults.d.ts +15 -0
- package/dist/types/components/GrTransfer/grTransferStyles.d.ts +127 -0
- package/dist/types/components/GrTransfer/index.d.ts +11 -0
- package/dist/types/components/GrTransfer/safelist.d.ts +1 -0
- package/dist/types/components/GrTransfer/transferGeometry.d.ts +44 -0
- package/dist/types/components/GrTransfer/transferModel.d.ts +68 -0
- package/dist/types/components/GrTransfer/transferSelection.d.ts +36 -0
- package/dist/types/components/GrTransfer/useTransferDrag.d.ts +48 -0
- package/dist/types/granular-provider/shared.d.ts +3 -0
- package/dist/types/i18n/messages/en.d.ts +70 -0
- package/dist/types/i18n/messages/es.d.ts +70 -0
- package/dist/types/i18n/messages/ru.d.ts +70 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/web-types.json +735 -287
- package/package.json +19 -3
- package/dist/chunks/config-DWL81-aM.js.map +0 -1
- package/dist/chunks/en-CuuLfNHX.js.map +0 -1
- package/dist/chunks/es-CSnmrcMw.js.map +0 -1
- package/dist/chunks/generated-B95IBXs6.js.map +0 -1
- package/dist/chunks/grKbdStyles-DENu8pUK.js.map +0 -1
- package/dist/chunks/granular-provider-BshNi2la.js.map +0 -1
- package/dist/chunks/ru-BKWafECI.js.map +0 -1
- package/dist/chunks/useDragSort-0l47h4yb.js +0 -265
- package/dist/chunks/useDragSort-0l47h4yb.js.map +0 -1
- package/dist/components/GrBreadcrumbs/chunks/GrBreadcrumbs-DOpwY2EF.js.map +0 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-DpyipOFx.js.map +0 -1
- package/dist/components/GrDelta/chunks/GrDelta-BpfqebEV.js.map +0 -1
- package/dist/components/GrDescriptionList/chunks/GrDescriptionList-D8ANFpn_.js.map +0 -1
- package/dist/components/GrFilePreview/chunks/GrFilePreview-PabkLgYX.js.map +0 -1
- package/dist/components/GrInputTag/chunks/GrInputTag-3Au5HWZL.js.map +0 -1
- package/dist/components/GrJsonViewer/chunks/GrJsonViewer-CDGOX3C0.js.map +0 -1
- package/dist/components/GrNumberInput/chunks/GrNumberInput-BqPydXpK.js.map +0 -1
- package/dist/components/GrSegmented/chunks/GrSegmented-NKTi9bMG.js.map +0 -1
- package/dist/components/GrSortableList/chunks/GrSortableList-CQCaWivn.js.map +0 -1
- package/dist/components/GrSteps/chunks/GrSteps-DXj7m-WO.js.map +0 -1
- package/dist/components/GrTabs/chunks/GrTabs-DHfv67cp.js.map +0 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-Dd2gJ-j_.js → GrImageViewer-DK-iVHHC.js} +3 -3
- package/dist/components/GrSlider/chunks/{GrSlider-Db-jACXz.js → GrSlider-CO8N9SF6.js} +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { GrCarouselActivationMode, GrCarouselIndicators } from './grCarouselStyles';
|
|
2
|
+
import type { GrTone } from '../shared/tones';
|
|
3
|
+
export interface GrCarouselProps {
|
|
4
|
+
/** Индекс текущего кадра. Не передан — лента ведёт позицию сама. */
|
|
5
|
+
modelValue?: number;
|
|
6
|
+
/** Запустить показ. Под `prefers-reduced-motion` не стартует — тумблер остаётся. */
|
|
7
|
+
autoplay?: boolean;
|
|
8
|
+
/** Пауза между кадрами, мс. */
|
|
9
|
+
autoplayInterval?: number;
|
|
10
|
+
/** Замкнуть ленту. Выключено — стрелки на краях гаснут. */
|
|
11
|
+
loop?: boolean;
|
|
12
|
+
/** Вид переключателя кадров. `none` меняет и роль самих слайдов. */
|
|
13
|
+
indicators?: GrCarouselIndicators;
|
|
14
|
+
/** Тон текущего переключателя по общей шкале пакета. */
|
|
15
|
+
tone?: GrTone;
|
|
16
|
+
/** Листает ли стрелка по переключателям сразу или только двигает фокус. */
|
|
17
|
+
activationMode?: GrCarouselActivationMode;
|
|
18
|
+
/** Стрелки «назад/вперёд». */
|
|
19
|
+
arrows?: boolean;
|
|
20
|
+
/** Листание протяжкой указателя. */
|
|
21
|
+
swipe?: boolean;
|
|
22
|
+
/** Сделать карусель ориентиром страницы (`role="region"`). */
|
|
23
|
+
landmark?: boolean;
|
|
24
|
+
/** Имя карусели. APG требует его: `aria-roledescription` именем не считается. */
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
/** Имя из заголовка на странице. Сильнее `ariaLabel`. */
|
|
27
|
+
ariaLabelledby?: string;
|
|
28
|
+
prevLabel?: string;
|
|
29
|
+
nextLabel?: string;
|
|
30
|
+
playLabel?: string;
|
|
31
|
+
pauseLabel?: string;
|
|
32
|
+
/** Имя полосы переключателей. */
|
|
33
|
+
indicatorsLabel?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GrCarouselEmits {
|
|
36
|
+
(e: 'update:modelValue', index: number): void;
|
|
37
|
+
}
|
|
38
|
+
type __VLS_Slots = {
|
|
39
|
+
/** Кадры ленты — `GrCarouselSlide`. */
|
|
40
|
+
default?: () => unknown;
|
|
41
|
+
/**
|
|
42
|
+
* Своя иконка кнопки «назад». Заменяет содержимое кнопки, но не её саму:
|
|
43
|
+
* имя, `aria-disabled` и поведение на краю остаются за компонентом.
|
|
44
|
+
*/
|
|
45
|
+
prev?: (props: {
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
}) => unknown;
|
|
48
|
+
/** Своя иконка кнопки «вперёд». */
|
|
49
|
+
next?: (props: {
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
}) => unknown;
|
|
52
|
+
};
|
|
53
|
+
declare function stopAutoplay(): void;
|
|
54
|
+
declare function goTo(index: number): void;
|
|
55
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrCarouselProps>, {
|
|
56
|
+
modelValue: undefined;
|
|
57
|
+
autoplay: boolean;
|
|
58
|
+
autoplayInterval: number;
|
|
59
|
+
loop: boolean;
|
|
60
|
+
indicators: undefined;
|
|
61
|
+
tone: undefined;
|
|
62
|
+
activationMode: undefined;
|
|
63
|
+
arrows: boolean;
|
|
64
|
+
swipe: boolean;
|
|
65
|
+
landmark: boolean;
|
|
66
|
+
ariaLabel: undefined;
|
|
67
|
+
ariaLabelledby: undefined;
|
|
68
|
+
prevLabel: undefined;
|
|
69
|
+
nextLabel: undefined;
|
|
70
|
+
playLabel: undefined;
|
|
71
|
+
pauseLabel: undefined;
|
|
72
|
+
indicatorsLabel: undefined;
|
|
73
|
+
}>>, {
|
|
74
|
+
/** Текущий кадр — единственный способ прочитать позицию без `v-model`. */
|
|
75
|
+
index: import("vue").ComputedRef<number>;
|
|
76
|
+
/** Число кадров: состав живёт в слоте, снаружи его посчитать нечем. */
|
|
77
|
+
count: import("vue").ComputedRef<number>;
|
|
78
|
+
/** Идёт ли показ. Пауза под курсором его не выключает. */
|
|
79
|
+
playing: import("vue").ComputedRef<boolean>;
|
|
80
|
+
next: () => void;
|
|
81
|
+
prev: () => void;
|
|
82
|
+
goTo: typeof goTo;
|
|
83
|
+
play: () => void;
|
|
84
|
+
pause: typeof stopAutoplay;
|
|
85
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
86
|
+
"update:modelValue": (index: number) => void;
|
|
87
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrCarouselProps>, {
|
|
88
|
+
modelValue: undefined;
|
|
89
|
+
autoplay: boolean;
|
|
90
|
+
autoplayInterval: number;
|
|
91
|
+
loop: boolean;
|
|
92
|
+
indicators: undefined;
|
|
93
|
+
tone: undefined;
|
|
94
|
+
activationMode: undefined;
|
|
95
|
+
arrows: boolean;
|
|
96
|
+
swipe: boolean;
|
|
97
|
+
landmark: boolean;
|
|
98
|
+
ariaLabel: undefined;
|
|
99
|
+
ariaLabelledby: undefined;
|
|
100
|
+
prevLabel: undefined;
|
|
101
|
+
nextLabel: undefined;
|
|
102
|
+
playLabel: undefined;
|
|
103
|
+
pauseLabel: undefined;
|
|
104
|
+
indicatorsLabel: undefined;
|
|
105
|
+
}>>> & Readonly<{
|
|
106
|
+
"onUpdate:modelValue"?: ((index: number) => any) | undefined;
|
|
107
|
+
}>, {
|
|
108
|
+
tone: GrTone;
|
|
109
|
+
indicators: GrCarouselIndicators;
|
|
110
|
+
activationMode: GrCarouselActivationMode;
|
|
111
|
+
ariaLabel: string;
|
|
112
|
+
modelValue: number;
|
|
113
|
+
autoplay: boolean;
|
|
114
|
+
autoplayInterval: number;
|
|
115
|
+
loop: boolean;
|
|
116
|
+
arrows: boolean;
|
|
117
|
+
swipe: boolean;
|
|
118
|
+
landmark: boolean;
|
|
119
|
+
ariaLabelledby: string;
|
|
120
|
+
prevLabel: string;
|
|
121
|
+
nextLabel: string;
|
|
122
|
+
playLabel: string;
|
|
123
|
+
pauseLabel: string;
|
|
124
|
+
indicatorsLabel: string;
|
|
125
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
126
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
127
|
+
declare const _default: typeof __VLS_export;
|
|
128
|
+
export default _default;
|
|
129
|
+
type __VLS_TypePropsToOption<T> = {
|
|
130
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
131
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
132
|
+
} : {
|
|
133
|
+
type: import('vue').PropType<T[K]>;
|
|
134
|
+
required: true;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
type __VLS_WithDefaults<P, D> = {
|
|
138
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
139
|
+
default: D[K];
|
|
140
|
+
}> : P[K];
|
|
141
|
+
};
|
|
142
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
143
|
+
new (): {
|
|
144
|
+
$slots: S;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
148
|
+
[K in keyof T]: T[K];
|
|
149
|
+
} : {
|
|
150
|
+
[K in keyof T as K]: T[K];
|
|
151
|
+
}) & {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface GrCarouselSlideProps {
|
|
2
|
+
/** Имя слайда: подпись его переключателя и доступное имя самого кадра. */
|
|
3
|
+
label?: string;
|
|
4
|
+
/** URL миниатюры для `indicators="thumbnails"`. Слот `#thumbnail` сильнее. */
|
|
5
|
+
thumbnail?: string;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/** Содержимое кадра. */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Своя разметка миниатюры. Рендерит её полоса переключателей `GrCarousel`,
|
|
12
|
+
* поэтому `<slot name="thumbnail">` здесь не стоит: узел уезжает наверх при
|
|
13
|
+
* регистрации. Появится он тут — понадобится запись в `DOMAIN_SLOTS` гейта
|
|
14
|
+
* `slotContract.test.ts`.
|
|
15
|
+
*/
|
|
16
|
+
thumbnail?: () => unknown;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrCarouselSlideProps>, {
|
|
19
|
+
label: undefined;
|
|
20
|
+
thumbnail: undefined;
|
|
21
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrCarouselSlideProps>, {
|
|
22
|
+
label: undefined;
|
|
23
|
+
thumbnail: undefined;
|
|
24
|
+
}>>> & Readonly<{}>, {
|
|
25
|
+
label: string;
|
|
26
|
+
thumbnail: string;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_TypePropsToOption<T> = {
|
|
32
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
33
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
34
|
+
} : {
|
|
35
|
+
type: import('vue').PropType<T[K]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_WithDefaults<P, D> = {
|
|
40
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
41
|
+
default: D[K];
|
|
42
|
+
}> : P[K];
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} : {
|
|
52
|
+
[K in keyof T as K]: T[K];
|
|
53
|
+
}) & {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** Сколько пикселей должен пройти указатель, чтобы это считалось листанием. */
|
|
2
|
+
export declare const SWIPE_THRESHOLD_PX = 60;
|
|
3
|
+
/**
|
|
4
|
+
* Во сколько раз горизонталь обязана превысить вертикаль. Ниже этого жест
|
|
5
|
+
* считается вертикальной прокруткой страницы и ленту не двигает: палец редко
|
|
6
|
+
* идёт строго по оси, и без фильтра карусель перехватывала бы скролл.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SWIPE_AXIS_RATIO = 1.5;
|
|
9
|
+
/**
|
|
10
|
+
* Доля ширины вьюпорта, начиная с которой жест засчитывается. Работает вместе
|
|
11
|
+
* с {@link SWIPE_THRESHOLD_PX} по максимуму: 60px на герое шириной 1200px —
|
|
12
|
+
* это нервно, а на узкой карточке доля выродилась бы в пару пикселей.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SWIPE_THRESHOLD_RATIO = 0.15;
|
|
15
|
+
/** Во сколько раз вязче идёт лента, когда листать в эту сторону уже некуда. */
|
|
16
|
+
export declare const SWIPE_RESISTANCE = 4;
|
|
17
|
+
/**
|
|
18
|
+
* Логическое направление жеста: `1` — вперёд, `-1` — назад, `0` — не свайп.
|
|
19
|
+
*
|
|
20
|
+
* `dx` физический, в пикселях экрана; разворот под RTL — забота вызывающего,
|
|
21
|
+
* модуль про направление письма не знает. Палец, ушедший влево, листает вперёд:
|
|
22
|
+
* содержимое едет за пальцем, как в нативной прокрутке.
|
|
23
|
+
*
|
|
24
|
+
* Отдельным модулем, потому что в jsdom раскладки нет и через смонтированный
|
|
25
|
+
* компонент ни одна ветка не проверяется — тот же довод, что у
|
|
26
|
+
* {@link resolveScrollOverflow}.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveSwipeDirection(dx: number, dy: number, threshold?: number): -1 | 0 | 1;
|
|
29
|
+
/**
|
|
30
|
+
* Порог жеста для ленты шириной `width`. При нулевой ширине — а в jsdom она
|
|
31
|
+
* всегда нулевая — вырождается в пиксельный минимум, и жест остаётся
|
|
32
|
+
* проверяемым.
|
|
33
|
+
*/
|
|
34
|
+
export declare function swipeThresholdFor(width: number): number;
|
|
35
|
+
/** Смещение ленты за пальцем: за краем — вязкое, иначе один в один. */
|
|
36
|
+
export declare function resistOffset(delta: number, atEdge: boolean): number;
|
|
37
|
+
/**
|
|
38
|
+
* Индекс, зажатый в границы ленты. Пустая лента даёт `0`: слайда с таким
|
|
39
|
+
* номером нет, но отрицательный индекс уехал бы в CSS-переменную трека.
|
|
40
|
+
*/
|
|
41
|
+
export declare function clampIndex(index: number, count: number): number;
|
|
42
|
+
/**
|
|
43
|
+
* Шаг по ленте. Без `loop` на краю возвращает тот же индекс — вызывающий по
|
|
44
|
+
* этому признаку и гасит стрелку, отдельного предиката не нужно.
|
|
45
|
+
*/
|
|
46
|
+
export declare function stepIndex(index: number, delta: number, count: number, loop: boolean): number;
|
|
47
|
+
/**
|
|
48
|
+
* Насколько прокрутить полосу переключателей, чтобы кадр был виден.
|
|
49
|
+
*
|
|
50
|
+
* Считается своей арифметикой, а не `scrollIntoView`: тот прокручивает **всех**
|
|
51
|
+
* предков, включая документ, — и карусель, уехавшая под сгиб, на каждом шаге
|
|
52
|
+
* автопрокрутки утаскивала бы страницу обратно к себе. Здесь двигается только
|
|
53
|
+
* сама полоса.
|
|
54
|
+
*
|
|
55
|
+
* Движение минимальное: элемент уже виден — `scrollLeft` не меняется вовсе.
|
|
56
|
+
*/
|
|
57
|
+
export declare function stripScrollLeft(scrollLeft: number, viewport: number, itemStart: number, itemEnd: number, padding?: number): number;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
export interface UseCarouselAutoplayOptions {
|
|
3
|
+
/** Пауза между слайдами, мс. */
|
|
4
|
+
interval: () => number;
|
|
5
|
+
/** Показ включён: проп задан и его никто не остановил. */
|
|
6
|
+
enabled: () => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Отсчёт приостановлен — курсор над лентой, идёт жест, вкладка в фоне.
|
|
9
|
+
* Это **не** остановка: остаток сохраняется, и по снятию паузы лента
|
|
10
|
+
* досчитывает его, а не начинает интервал заново.
|
|
11
|
+
*/
|
|
12
|
+
paused: () => boolean;
|
|
13
|
+
/** Шаг ленты. */
|
|
14
|
+
advance: () => void;
|
|
15
|
+
}
|
|
16
|
+
export interface UseCarouselAutoplayReturn {
|
|
17
|
+
/** Заведён ли отсчёт прямо сейчас. Пауза его снимает, намерение показа — нет. */
|
|
18
|
+
running: ComputedRef<boolean>;
|
|
19
|
+
/** Забыть остаток и отсчитать интервал заново — после смены слайда извне. */
|
|
20
|
+
restart: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Таймер автопрокрутки с паузой по остатку.
|
|
24
|
+
*
|
|
25
|
+
* Модель взята у `useToast` (`{ handle, remaining, startedAt }`), и `setInterval`
|
|
26
|
+
* здесь не годится принципиально: паузу, сохраняющую остаток, на нём не
|
|
27
|
+
* выразить — курсор, снятый за полсекунды до шага, откладывал бы шаг на полный
|
|
28
|
+
* интервал.
|
|
29
|
+
*
|
|
30
|
+
* Композабл локальный: публичный потребовал бы записей в трёх реестрах пакета,
|
|
31
|
+
* а переиспользовать его сегодня некому.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useCarouselAutoplay(options: UseCarouselAutoplayOptions): UseCarouselAutoplayReturn;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export interface UseCarouselSwipeOptions {
|
|
3
|
+
disabled: () => boolean;
|
|
4
|
+
/** Вьюпорт: у него спрашиваются ширина и направление письма. */
|
|
5
|
+
viewport: () => HTMLElement | null;
|
|
6
|
+
/** Порог пройден. Направление логическое: `1` — вперёд, `-1` — назад. */
|
|
7
|
+
onSwipe: (direction: 1 | -1) => void;
|
|
8
|
+
/** Листать в эту сторону некуда — жест идёт вязко. */
|
|
9
|
+
atEdge: (direction: 1 | -1) => boolean;
|
|
10
|
+
/** Жест начался: показ пора ставить на паузу. */
|
|
11
|
+
onStart?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface UseCarouselSwipeReturn {
|
|
14
|
+
isDragging: Ref<boolean>;
|
|
15
|
+
/** Смещение ленты за указателем, px. Физическое: зеркалит его CSS, не JS. */
|
|
16
|
+
offset: Ref<number>;
|
|
17
|
+
/** Вешается на `@pointerdown` вьюпорта. */
|
|
18
|
+
start: (event: PointerEvent) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useCarouselSwipe(options: UseCarouselSwipeOptions): UseCarouselSwipeReturn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dependencies` пуст намеренно: стрелки и тумблер — обычные `<button>`, а не
|
|
3
|
+
* `GrButton`. Тот связывает `disabled` с нативным атрибутом, а стрелка на краю
|
|
4
|
+
* без `loop` обязана остаться фокусируемой (`aria-disabled`), иначе фокус
|
|
5
|
+
* падает в `<body>` ровно в момент, когда пользователь долистал до конца.
|
|
6
|
+
*/
|
|
7
|
+
export declare const grCarouselConfig: import("@feugene/unocss-preset-granular/contract").GranularComponentDescriptor<"GrCarousel">;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GrTone } from '../shared/tones';
|
|
2
|
+
import type { GrCarouselActivationMode, GrCarouselIndicators } from './grCarouselStyles';
|
|
3
|
+
/** Пропы `GrCarousel`, настраиваемые глобально через `componentDefaults`. */
|
|
4
|
+
export interface GrCarouselConfigurableProps {
|
|
5
|
+
indicators: GrCarouselIndicators;
|
|
6
|
+
activationMode: GrCarouselActivationMode;
|
|
7
|
+
tone: GrTone;
|
|
8
|
+
}
|
|
9
|
+
declare module '../../composables/useGrComponentConfig' {
|
|
10
|
+
interface GrComponentDefaultsRegistry {
|
|
11
|
+
GrCarousel: GrCarouselConfigurableProps;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
/** Что слайд сообщает о себе ленте при регистрации. */
|
|
3
|
+
export interface GrCarouselSlideEntry {
|
|
4
|
+
/** `useId()` слайда. Он же его DOM-id и ключ реестра. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Имя слайда: подпись его переключателя и `aria-label` самого слайда. */
|
|
7
|
+
label: () => string | undefined;
|
|
8
|
+
/** URL миниатюры. */
|
|
9
|
+
thumbnailSrc: () => string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Дал ли слайд свою разметку миниатюры. Геттер, а не снимок: слот, появившийся
|
|
12
|
+
* позже, снимком в `setup` не увиделся бы.
|
|
13
|
+
*/
|
|
14
|
+
hasThumbnail: () => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Своя разметка миниатюры. Рендерит её **полоса переключателей**, а не слайд:
|
|
17
|
+
* узел уезжает наверх ссылкой. Ссылка стабильна — иначе `:is` перемонтировал
|
|
18
|
+
* бы миниатюру на каждый рендер.
|
|
19
|
+
*/
|
|
20
|
+
thumbnail: () => unknown;
|
|
21
|
+
/**
|
|
22
|
+
* Корневой узел. Геттер, а не значение: регистрация идёт в `setup`, когда
|
|
23
|
+
* элемента ещё нет. По нему же восстанавливается порядок слайдов в документе.
|
|
24
|
+
*/
|
|
25
|
+
el: () => HTMLElement | null;
|
|
26
|
+
}
|
|
27
|
+
export interface GrCarouselContext {
|
|
28
|
+
/** Регистрация слайда. Возвращает отписку. */
|
|
29
|
+
register: (entry: GrCarouselSlideEntry) => () => void;
|
|
30
|
+
/** Позиция слайда в ленте; `-1`, пока он не зарегистрирован. */
|
|
31
|
+
indexOf: (id: string) => number;
|
|
32
|
+
isCurrent: (id: string) => boolean;
|
|
33
|
+
total: ComputedRef<number>;
|
|
34
|
+
/**
|
|
35
|
+
* `tabpanel`, когда есть полоса переключателей, иначе `group`. Роль слайда
|
|
36
|
+
* зависит от наличия переключателя, а не от его вида: `tab` требует парного
|
|
37
|
+
* `tabpanel`, и без полосы привязать его было бы не к чему.
|
|
38
|
+
*/
|
|
39
|
+
slideRole: ComputedRef<'tabpanel' | 'group'>;
|
|
40
|
+
slideRoledescription: ComputedRef<string>;
|
|
41
|
+
/** id переключателя для `aria-labelledby` слайда; `undefined` без полосы. */
|
|
42
|
+
tabIdFor: (id: string) => string | undefined;
|
|
43
|
+
/** «N из M» — имя слайда, когда своего `label` у него нет. */
|
|
44
|
+
positionLabel: (id: string) => string;
|
|
45
|
+
}
|
|
46
|
+
export declare const GR_CAROUSEL_CONTEXT: InjectionKey<GrCarouselContext>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { GrTone } from '../shared/tones';
|
|
2
|
+
/**
|
|
3
|
+
* Вид переключателя слайдов. `none` меняет не только внешность, но и роль самих
|
|
4
|
+
* слайдов: без переключателя `tabpanel` не к чему привязать — см. `GrCarousel.vue`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GR_CAROUSEL_INDICATORS: readonly ["dots", "thumbnails", "none"];
|
|
7
|
+
export type GrCarouselIndicators = typeof GR_CAROUSEL_INDICATORS[number];
|
|
8
|
+
/**
|
|
9
|
+
* Текущая точка: заливка **и** обвод вокруг неё.
|
|
10
|
+
*
|
|
11
|
+
* Одной заливки мало: при диаметре в 8 пикселей текущая точка отличалась от
|
|
12
|
+
* соседних только оттенком, а на приглушённом тоне разница почти пропадала.
|
|
13
|
+
* Обвод добавляет второй признак — форму, — и работает там, где цвет не
|
|
14
|
+
* различают.
|
|
15
|
+
*
|
|
16
|
+
* `outline`, а не `ring`: он рисуется вне потока и не требует цвета подложки под
|
|
17
|
+
* зазор, тогда как `ring-offset` пришлось бы красить в фон страницы, которого
|
|
18
|
+
* компонент не знает.
|
|
19
|
+
*/
|
|
20
|
+
export declare function grCarouselDotActiveClass(tone: GrTone): string;
|
|
21
|
+
export declare function grCarouselThumbActiveClass(tone: GrTone): string;
|
|
22
|
+
/** `automatic` — стрелка по индикаторам сразу листает; `manual` — только двигает фокус. */
|
|
23
|
+
export declare const GR_CAROUSEL_ACTIVATION_MODES: readonly ["automatic", "manual"];
|
|
24
|
+
export type GrCarouselActivationMode = typeof GR_CAROUSEL_ACTIVATION_MODES[number];
|
|
25
|
+
export declare const carouselRootBase = "relative w-full";
|
|
26
|
+
export declare const carouselViewportBase = "relative w-full overflow-hidden";
|
|
27
|
+
/**
|
|
28
|
+
* Вертикальная прокрутка страницы остаётся браузеру, горизонталь забирает лента.
|
|
29
|
+
* `select-none` — против выделения текста слайда протяжкой.
|
|
30
|
+
*/
|
|
31
|
+
export declare const carouselViewportSwipeClass = "[touch-action:pan-y] select-none";
|
|
32
|
+
export declare const carouselTrackBase = "flex w-full will-change-transform transition-transform duration-[var(--gr-duration-base)] ease-[var(--gr-ease-out)]";
|
|
33
|
+
export declare const carouselSlideBase = "w-full min-w-0 shrink-0 grow-0 basis-full";
|
|
34
|
+
/**
|
|
35
|
+
* Стрелки лежат поверх произвольного содержимого, поэтому несут собственную
|
|
36
|
+
* подложку: на светлом кадре иконка без неё пропадает. `z-10` — порядок внутри
|
|
37
|
+
* собственного stacking-контекста компонента, а не слой страницы.
|
|
38
|
+
*/
|
|
39
|
+
export declare const carouselControlBase = "absolute top-1/2 z-10 inline-flex h-9 w-9 -translate-y-1/2 items-center justify-center rounded-[var(--gr-radius-full)] border border-[var(--gr-brd)] bg-[var(--gr-carousel-control-bg,var(--gr-bg))] text-[var(--gr-carousel-control-fg,var(--gr-fg))] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)]";
|
|
40
|
+
export declare const carouselControlPositions: {
|
|
41
|
+
readonly prev: "start-2";
|
|
42
|
+
readonly next: "end-2";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Стрелка на краю без `loop` гасится фоном, а не `opacity`: прозрачность
|
|
46
|
+
* разбавляет выверенные на AA токены текста и роняет контраст.
|
|
47
|
+
*/
|
|
48
|
+
export declare const carouselControlStates: {
|
|
49
|
+
readonly idle: "hover:bg-[var(--gr-carousel-control-bg-hover,var(--gr-muted))]";
|
|
50
|
+
readonly disabled: "cursor-not-allowed bg-[var(--gr-muted)] text-[var(--gr-disabled-fg)]";
|
|
51
|
+
};
|
|
52
|
+
/** Тумблер автопрокрутки: тот же хром, что у стрелок, но в углу ленты. */
|
|
53
|
+
export declare const carouselToggleClass = "absolute end-2 top-2 z-10 inline-flex h-8 w-8 items-center justify-center rounded-[var(--gr-radius-full)] border border-[var(--gr-brd)] bg-[var(--gr-carousel-control-bg,var(--gr-bg))] text-[var(--gr-carousel-control-fg,var(--gr-fg))] transition-colors hover:bg-[var(--gr-carousel-control-bg-hover,var(--gr-muted))] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)]";
|
|
54
|
+
export declare const carouselIconClass = "h-4 w-4 shrink-0";
|
|
55
|
+
/**
|
|
56
|
+
* Полоса переключателей прокручивается, а не переносится: перенос увёл бы
|
|
57
|
+
* миниатюры под соседний блок. Своей остановки `Tab` у неё нет — её дети
|
|
58
|
+
* фокусируемы, и вторая остановка была бы лишней (приём `GrTabs`).
|
|
59
|
+
*/
|
|
60
|
+
export declare const carouselIndicatorsBase = "flex max-w-full items-center overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
|
|
61
|
+
export declare const carouselIndicatorsVariants: {
|
|
62
|
+
readonly dots: "justify-center gap-[var(--gr-carousel-gap,0.5rem)] px-1 pt-3.5 pb-1.5";
|
|
63
|
+
readonly thumbnails: "gap-[var(--gr-carousel-gap,0.5rem)] pt-3";
|
|
64
|
+
readonly none: "";
|
|
65
|
+
};
|
|
66
|
+
export declare const carouselIndicatorBase = "shrink-0 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)]";
|
|
67
|
+
export declare const carouselDotBase = "rounded-[var(--gr-radius-full)] h-[var(--gr-carousel-dot-size,0.5rem)] w-[var(--gr-carousel-dot-size,0.5rem)]";
|
|
68
|
+
export declare const carouselDotStates: {
|
|
69
|
+
readonly idle: "bg-[var(--gr-carousel-dot,var(--gr-brd))] hover:bg-[var(--gr-muted-fg)]";
|
|
70
|
+
};
|
|
71
|
+
export declare const carouselThumbBase = "overflow-hidden rounded-[var(--gr-radius-md)] border-2 w-[var(--gr-carousel-thumb-width,4rem)] h-[var(--gr-carousel-thumb-height,2.5rem)]";
|
|
72
|
+
export declare const carouselThumbStates: {
|
|
73
|
+
readonly idle: "border-[var(--gr-brd)] hover:border-[var(--gr-muted-fg)]";
|
|
74
|
+
};
|
|
75
|
+
export declare const carouselThumbImageClass = "h-full w-full object-cover";
|
|
76
|
+
/** Миниатюры не дали — плитка держит ритм полосы номером слайда. */
|
|
77
|
+
export declare const carouselThumbFallbackClass = "flex h-full w-full items-center justify-center bg-[var(--gr-muted)] text-[var(--gr-muted-fg)] text-[length:var(--gr-control-text-xs)] leading-[var(--gr-control-leading-xs)]";
|
|
78
|
+
export declare function grCarouselControlClass(direction: 'prev' | 'next', disabled: boolean): string;
|
|
79
|
+
export declare function grCarouselIndicatorsClass(variant: GrCarouselIndicators): string;
|
|
80
|
+
export declare function grCarouselIndicatorClass(variant: GrCarouselIndicators, active: boolean, tone?: GrTone): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentExposed } from '../shared/instance';
|
|
2
|
+
import type GrCarouselComponent from './GrCarousel.vue';
|
|
3
|
+
export { default } from './GrCarousel.vue';
|
|
4
|
+
export { default as GrCarousel } from './GrCarousel.vue';
|
|
5
|
+
export { default as GrCarouselSlide } from './GrCarouselSlide.vue';
|
|
6
|
+
export { grCarouselConfig } from './config';
|
|
7
|
+
export type { GrCarouselConfigurableProps } from './defaults';
|
|
8
|
+
export type { GrCarouselEmits, GrCarouselProps } from './GrCarousel.vue';
|
|
9
|
+
export type { GrCarouselSlideProps } from './GrCarouselSlide.vue';
|
|
10
|
+
export type { GrCarouselActivationMode, GrCarouselIndicators } from './grCarouselStyles';
|
|
11
|
+
export { grCarouselSafelist } from './safelist';
|
|
12
|
+
export type GrCarouselInstance = ComponentExposed<typeof GrCarouselComponent>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const grCarouselSafelist: string[];
|
|
@@ -78,15 +78,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
78
78
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
79
79
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
readonly: boolean;
|
|
83
|
+
form: string;
|
|
81
84
|
size: GrCheckboxSize;
|
|
82
85
|
labelPosition: GrCheckboxLabelPosition;
|
|
83
86
|
value: string;
|
|
84
|
-
readonly: boolean;
|
|
85
|
-
form: string;
|
|
86
87
|
name: string;
|
|
87
88
|
invalid: boolean;
|
|
88
89
|
id: string;
|
|
89
|
-
disabled: boolean;
|
|
90
90
|
ariaLabel: string;
|
|
91
91
|
modelValue: boolean;
|
|
92
92
|
required: boolean;
|
|
@@ -67,13 +67,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
67
67
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
68
68
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
69
69
|
}>, {
|
|
70
|
-
|
|
70
|
+
disabled: boolean;
|
|
71
71
|
readonly: boolean;
|
|
72
|
+
size: GrCheckboxSize;
|
|
72
73
|
name: string;
|
|
73
74
|
invalid: boolean;
|
|
74
75
|
direction: GrCheckboxGroupDirection;
|
|
75
76
|
options: GrCheckboxGroupOption[];
|
|
76
|
-
disabled: boolean;
|
|
77
77
|
ariaLabel: string;
|
|
78
78
|
required: boolean;
|
|
79
79
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -94,14 +94,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
94
94
|
"onUpdate:selected"?: ((value: boolean) => any) | undefined;
|
|
95
95
|
onRemove?: (() => any) | undefined;
|
|
96
96
|
}>, {
|
|
97
|
+
label: string;
|
|
98
|
+
disabled: boolean;
|
|
97
99
|
tone: GrChipTone;
|
|
98
100
|
closable: boolean;
|
|
99
101
|
size: GrChipSize;
|
|
100
102
|
radius: GrChipRadius;
|
|
101
103
|
dark: boolean;
|
|
102
104
|
value: GrChipValue;
|
|
103
|
-
label: string;
|
|
104
|
-
disabled: boolean;
|
|
105
105
|
selectable: boolean;
|
|
106
106
|
selected: boolean;
|
|
107
107
|
ariaLabel: string;
|
|
@@ -86,15 +86,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
86
86
|
onRemove?: ((value: GrChipValue) => any) | undefined;
|
|
87
87
|
"onUpdate:modelValue"?: ((value: GrChipValue | GrChipValue[] | null) => any) | undefined;
|
|
88
88
|
}>, {
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
readonly: boolean;
|
|
89
91
|
tone: GrChipTone;
|
|
90
92
|
closable: boolean;
|
|
91
93
|
size: GrChipSize;
|
|
92
94
|
radius: GrChipRadius;
|
|
93
95
|
dark: boolean;
|
|
94
|
-
readonly: boolean;
|
|
95
96
|
name: string;
|
|
96
97
|
invalid: boolean;
|
|
97
|
-
disabled: boolean;
|
|
98
98
|
ariaLabel: string;
|
|
99
99
|
modelValue: GrChipValue | GrChipValue[] | null;
|
|
100
100
|
required: boolean;
|
|
@@ -75,13 +75,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
75
75
|
onChange?: ((value: GrCollapseModelValue) => any) | undefined;
|
|
76
76
|
"onUpdate:modelValue"?: ((value: GrCollapseModelValue) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
+
disabled: boolean;
|
|
78
79
|
size: GrComponentSize;
|
|
79
80
|
headingLevel: GrCollapseHeadingLevel;
|
|
80
81
|
divided: boolean;
|
|
81
82
|
borderless: boolean;
|
|
82
83
|
expandIconPosition: GrCollapseIconPosition;
|
|
83
84
|
emptyText: string;
|
|
84
|
-
disabled: boolean;
|
|
85
85
|
modelValue: GrCollapseValue | GrCollapseValue[];
|
|
86
86
|
empty: boolean;
|
|
87
87
|
accordion: boolean;
|
|
@@ -34,9 +34,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
34
34
|
title: undefined;
|
|
35
35
|
disabled: boolean;
|
|
36
36
|
}>>> & Readonly<{}>, {
|
|
37
|
+
disabled: boolean;
|
|
37
38
|
title: string;
|
|
38
39
|
name: GrCollapseValue;
|
|
39
|
-
disabled: boolean;
|
|
40
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -70,14 +70,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
70
70
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
71
71
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
|
-
|
|
73
|
+
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
74
|
+
disabled: boolean;
|
|
74
75
|
readonly: boolean;
|
|
76
|
+
size: GrColorPickerSize;
|
|
75
77
|
name: string;
|
|
76
78
|
invalid: boolean;
|
|
77
|
-
placement: "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
78
79
|
alpha: boolean;
|
|
79
80
|
open: boolean;
|
|
80
|
-
disabled: boolean;
|
|
81
81
|
ariaLabel: string;
|
|
82
82
|
required: boolean;
|
|
83
83
|
presets: string[];
|
|
@@ -120,10 +120,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
120
120
|
onSelect?: ((item: GrCommandItem) => any) | undefined;
|
|
121
121
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
122
122
|
}>, {
|
|
123
|
+
filter: GrCommandFilter;
|
|
123
124
|
size: GrCommandPaletteSize;
|
|
124
125
|
emptyText: string;
|
|
125
126
|
loading: boolean;
|
|
126
|
-
filter: GrCommandFilter;
|
|
127
127
|
maxHeight: number;
|
|
128
128
|
ariaLabel: string;
|
|
129
129
|
placeholder: string;
|
|
@@ -125,8 +125,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
125
125
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
126
126
|
onConfirm?: (() => any) | undefined;
|
|
127
127
|
}>, {
|
|
128
|
-
size: GrDialogSize;
|
|
129
128
|
title: string;
|
|
129
|
+
size: GrDialogSize;
|
|
130
130
|
description: string;
|
|
131
131
|
error: ResponseErrorInfo | null;
|
|
132
132
|
closeOnEsc: boolean;
|
|
@@ -113,10 +113,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
113
113
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
114
114
|
onBeforeOpen?: ((context: GrContextMenuOpenContext) => any) | undefined;
|
|
115
115
|
}>, {
|
|
116
|
-
minWidth: number | string;
|
|
117
116
|
placement: UseFloatingPlacement;
|
|
118
|
-
open: boolean;
|
|
119
117
|
disabled: boolean;
|
|
118
|
+
minWidth: number | string;
|
|
119
|
+
open: boolean;
|
|
120
120
|
ariaLabel: string;
|
|
121
121
|
items: GrDropdownMenuEntry[];
|
|
122
122
|
labelledBy: string;
|