bitboss-ui 3.0.0-beta.69 → 3.0.0-beta.71
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/README.md +20 -11
- package/bin/bitboss-ui-mcp.mjs +7 -4
- package/bin/bitboss-ui.mjs +0 -0
- package/bin/cli.mjs +47 -28
- package/dist/ai/BbBaseButton.md +4 -4
- package/dist/ai/BbBreadcrumbs.md +3 -0
- package/dist/ai/BbCarousel.md +32 -29
- package/dist/ai/BbCheckbox.md +5 -6
- package/dist/ai/BbCheckboxGroup.md +28 -26
- package/dist/ai/BbColorInput.md +9 -14
- package/dist/ai/BbDatePickerInput.md +3 -4
- package/dist/ai/BbDropdown.md +35 -1
- package/dist/ai/BbDropdownButton.md +4 -3
- package/dist/ai/BbDropzone.md +3 -3
- package/dist/ai/BbGallery.md +2034 -0
- package/dist/ai/BbNumberInput.md +3 -4
- package/dist/ai/BbPopover.md +12 -6
- package/dist/ai/BbRadio.md +5 -6
- package/dist/ai/BbRadioGroup.md +28 -31
- package/dist/ai/BbRating.md +6 -16
- package/dist/ai/BbSelect.md +10 -11
- package/dist/ai/BbSlider.md +3 -9
- package/dist/ai/BbSwitch.md +6 -6
- package/dist/ai/BbSwitchGroup.md +4 -7
- package/dist/ai/BbTag.md +3 -4
- package/dist/ai/BbTextInput.md +19 -19
- package/dist/ai/BbTextarea.md +8 -8
- package/dist/ai/BbTimePickerInput.md +3 -4
- package/dist/ai/BbTooltip.md +17 -13
- package/dist/ai/CommonField.md +2 -10
- package/dist/ai/OptionsContainer.md +7 -12
- package/dist/ai/changelog.json +119 -4
- package/dist/ai/components.json +37 -32
- package/dist/ai/guides/ai-router.md +3 -2
- package/dist/ai/guides/component-picker.md +1 -0
- package/dist/ai/guides/eslint-rules.md +3 -3
- package/dist/ai/guides/installation-and-plugin-setup.md +5 -5
- package/dist/ai/guides/migration/v2-to-v3.md +53 -1
- package/dist/ai/guides/migration/v3-beta-tooling.md +25 -15
- package/dist/ai/guides/passthrough.md +2 -1
- package/dist/ai/guides/preset-components.md +53 -19
- package/dist/ai/helpers/definePreset.json +8 -1
- package/dist/ai/helpers/definePreset.ts +42 -13
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +2 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbCarousel.json +3 -2
- package/dist/ai/manifest/components/BbCarousel.tree.json +7 -0
- package/dist/ai/manifest/components/BbCheckbox.json +2 -2
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +10 -18
- package/dist/ai/manifest/components/BbColorInput.json +2 -2
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfigScope.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbGallery.json +54 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +139 -0
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +9 -17
- package/dist/ai/manifest/components/BbRating.removed.json +1 -1
- package/dist/ai/manifest/components/BbRating.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +15 -15
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSlider.json +1 -1
- package/dist/ai/manifest/components/BbSlider.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -2
- package/dist/ai/manifest/components/BbTabs.removed.json +4 -4
- package/dist/ai/manifest/components/BbTabsList.removed.json +4 -4
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.tree.json +2 -2
- package/dist/ai/manifest/components/CommonField.tree.json +5 -10
- package/dist/ai/manifest/components/OptionsContainer.tree.json +7 -12
- package/dist/ai/manifest/index.json +4 -3
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +4 -2
- package/dist/ai/manifest/types.api.json +3 -3
- package/dist/ai/manifest/types.wrapper.json +1 -0
- package/dist/ai/recipes/inertia/onboarding.md +5 -8
- package/dist/ai/recipes/inertia/record-form.md +33 -12
- package/dist/ai/recipes/nuxt/onboarding.md +5 -8
- package/dist/ai/recipes/nuxt/record-form.md +27 -11
- package/dist/ai/recipes/vue/onboarding.md +5 -8
- package/dist/ai/recipes/vue/record-form.md +25 -11
- package/dist/ai/source/BbBreadcrumbs.md +31 -12
- package/dist/ai/source/BbCalendar.md +2 -0
- package/dist/ai/source/BbCarousel.md +135 -32
- package/dist/ai/source/BbCheckbox.md +36 -42
- package/dist/ai/source/BbCheckboxGroup.md +2 -4
- package/dist/ai/source/BbColorInput.md +2 -4
- package/dist/ai/source/BbDatePickerInput.md +2 -4
- package/dist/ai/source/BbDropdown.md +13 -2
- package/dist/ai/source/BbDropdownButton.md +4 -1
- package/dist/ai/source/BbDropdownGroup.md +11 -2
- package/dist/ai/source/BbGallery.md +2027 -0
- package/dist/ai/source/BbNumberInput.md +2 -4
- package/dist/ai/source/BbRadio.md +36 -42
- package/dist/ai/source/BbRadioGroup.md +4 -6
- package/dist/ai/source/BbRating.md +2 -14
- package/dist/ai/source/BbSelect.md +30 -13
- package/dist/ai/source/BbSelectPopover.md +1 -0
- package/dist/ai/source/BbSlider.md +2 -4
- package/dist/ai/source/BbSwitch.md +34 -38
- package/dist/ai/source/BbSwitchGroup.md +1 -0
- package/dist/ai/source/BbTable.md +15 -8
- package/dist/ai/source/BbTag.md +2 -4
- package/dist/ai/source/BbTextInput.md +2 -4
- package/dist/ai/source/BbTextarea.md +2 -4
- package/dist/ai/source/BbTimePickerInput.md +2 -4
- package/dist/ai/source/BbTooltip.md +9 -3
- package/dist/ai/source/BbTree.md +7 -3
- package/dist/ai/source/CommonField.md +17 -106
- package/dist/ai/source/CommonPopover.md +13 -3
- package/dist/ai/source/FlatListBox.md +3 -3
- package/dist/ai/source/GroupedListBox.md +3 -3
- package/dist/ai/source/GuidesComponent.md +3 -0
- package/dist/ai/source/ListBox.md +4 -4
- package/dist/ai/source/OptionsContainer.md +4 -4
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +106 -106
- package/dist/components/BbBreadcrumbs/types.d.ts +6 -0
- package/dist/components/BbCalendar/useDayjsLocale.js +5 -3
- package/dist/components/BbCarousel/BbCarousel.vue.d.ts +1 -1
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +506 -481
- package/dist/components/BbCarousel/dragRelease.js +14 -0
- package/dist/components/BbCarousel/ptKeys.generated.d.ts +4 -0
- package/dist/components/BbCarousel/types.d.ts +11 -6
- package/dist/components/BbCarousel/types.js +1 -0
- package/dist/components/BbCheckbox/types.d.ts +2 -4
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -4
- package/dist/components/BbColorInput/types.d.ts +2 -4
- package/dist/components/BbDatePickerInput/types.d.ts +2 -4
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +121 -120
- package/dist/components/BbDropdown/normalizeGroups.js +37 -33
- package/dist/components/BbDropdown/types.d.ts +9 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +95 -94
- package/dist/components/BbGallery/BbGallery.vue.d.ts +50 -0
- package/dist/components/BbGallery/BbGallery.vue.js +5 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +587 -0
- package/dist/components/BbGallery/findItem.js +41 -0
- package/dist/components/BbGallery/ptKeys.generated.d.ts +112 -0
- package/dist/components/BbGallery/types.d.ts +177 -0
- package/dist/components/BbGallery/types.js +29 -0
- package/dist/components/BbNumberInput/types.d.ts +2 -4
- package/dist/components/BbOffCanvas/sheetSnap.d.ts +2 -0
- package/dist/components/BbOffCanvas/sheetSnap.js +5 -5
- package/dist/components/BbRadio/types.d.ts +2 -4
- package/dist/components/BbRadioGroup/types.d.ts +4 -6
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +116 -118
- package/dist/components/BbRating/types.d.ts +2 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +10 -4
- package/dist/components/BbSelect/types.d.ts +4 -6
- package/dist/components/BbSlider/types.d.ts +2 -4
- package/dist/components/BbTable/types.d.ts +8 -8
- package/dist/components/BbTag/types.d.ts +2 -4
- package/dist/components/BbTextInput/types.d.ts +2 -4
- package/dist/components/BbTextarea/types.d.ts +2 -4
- package/dist/components/BbTimePickerInput/types.d.ts +2 -4
- package/dist/components/BbTooltip/ptKeys.generated.d.ts +4 -4
- package/dist/components/BbTooltip/types.d.ts +3 -1
- package/dist/components/BbTree/types.d.ts +3 -3
- package/dist/components/CommonField/types.d.ts +2 -4
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +28 -26
- package/dist/composables/overlayRegistry.d.ts +17 -0
- package/dist/composables/overlayRegistry.js +16 -9
- package/dist/composables/useChoiceIndicator.js +66 -63
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/directives/bbGallery.d.ts +64 -0
- package/dist/directives/bbGallery.js +38 -0
- package/dist/i18n/locales/ar.json +3 -1
- package/dist/i18n/locales/cs.json +3 -1
- package/dist/i18n/locales/da.json +3 -1
- package/dist/i18n/locales/de-CH.json +3 -1
- package/dist/i18n/locales/de.json +3 -1
- package/dist/i18n/locales/el.json +3 -1
- package/dist/i18n/locales/en-GB.json +3 -1
- package/dist/i18n/locales/en.json +3 -1
- package/dist/i18n/locales/es-MX.json +3 -1
- package/dist/i18n/locales/es.json +3 -1
- package/dist/i18n/locales/fa.json +3 -1
- package/dist/i18n/locales/fi.json +3 -1
- package/dist/i18n/locales/fr.json +3 -1
- package/dist/i18n/locales/he.json +3 -1
- package/dist/i18n/locales/hu.json +3 -1
- package/dist/i18n/locales/it.json +3 -1
- package/dist/i18n/locales/ja.json +3 -1
- package/dist/i18n/locales/ko.json +3 -1
- package/dist/i18n/locales/nb.json +3 -1
- package/dist/i18n/locales/nl.json +3 -1
- package/dist/i18n/locales/pl.json +3 -1
- package/dist/i18n/locales/pt-BR.json +3 -1
- package/dist/i18n/locales/pt-PT.json +3 -1
- package/dist/i18n/locales/ro.json +3 -1
- package/dist/i18n/locales/ru.json +3 -1
- package/dist/i18n/locales/sv.json +3 -1
- package/dist/i18n/locales/tr.json +3 -1
- package/dist/i18n/locales/uk.json +3 -1
- package/dist/i18n/locales/zh-CN.json +3 -1
- package/dist/i18n/locales/zh-HK.json +3 -1
- package/dist/i18n/locales/zh-TW.json +3 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +38 -36
- package/dist/llms-full.txt +2534 -346
- package/dist/llms-medium.txt +10 -7
- package/dist/llms.txt +1 -1
- package/dist/locale-blueprint.json +3 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/plugin.js +18 -17
- package/dist/project-dts.js +17 -16
- package/dist/runtime/nuxt-plugin.js +22 -21
- package/dist/scripts/lib/atomic-write.js +42 -0
- package/dist/styles.css +2 -2
- package/dist/types/FieldLayout.d.ts +4 -1
- package/dist/types/ItemAccessor.d.ts +3 -1
- package/dist/types/ItemPath.d.ts +33 -0
- package/dist/types/passthrough.d.ts +2 -2
- package/dist/types/ptComponentMap.d.ts +2 -1
- package/dist/utilities/calendar/canonicalParts.js +10 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +361 -331
- package/llms.txt +2 -2
- package/package.json +7 -4
- package/scripts/README.md +31 -29
- package/scripts/lib/agent-refresh.mjs +15 -9
- package/scripts/lib/agent-setup.mjs +46 -15
- package/scripts/lib/atomic-write.d.mts +6 -0
- package/scripts/lib/atomic-write.mjs +85 -0
- package/scripts/lib/define-preset-copy.mjs +24 -4
- package/scripts/lib/eslint-plugin.mjs +74 -36
- package/scripts/lib/hand-imported-styles.mjs +44 -99
- package/scripts/lib/helpers-add.mjs +3 -1
- package/scripts/lib/linked-target.mjs +1 -1
- package/scripts/lib/locale-check.mjs +41 -25
- package/scripts/lib/mcp-config.mjs +250 -133
- package/scripts/lib/mcp-sdk.mjs +24 -0
- package/scripts/lib/plugin-options-check.mjs +22 -15
- package/scripts/lib/pnp.mjs +1 -1
- package/scripts/lib/project-variant-dts.mjs +80 -136
- package/scripts/lib/release-results.mjs +331 -0
- package/scripts/lib/setup.mjs +61 -3
- package/scripts/lib/toolchain-check.mjs +134 -14
- package/scripts/lib/tooling-options.mjs +357 -38
- package/scripts/lib/validate-bb-markup.mjs +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +0 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +0 -55
- package/dist/components/BbBaseButton/RouterComponent.vue.d.ts +0 -18
- package/dist/components/BbBaseButton/useLinkState.d.ts +0 -43
- package/dist/components/BbBreadcrumbs/estimateBreadcrumbItemWidth.d.ts +0 -18
- package/dist/components/BbButton/toggleRoving.d.ts +0 -6
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.d.ts +0 -5
- package/dist/components/BbCalendar/CalendarYearPanel.vue.d.ts +0 -5
- package/dist/components/BbCalendar/calendarHost.d.ts +0 -29
- package/dist/components/BbCalendar/calendarMath.d.ts +0 -102
- package/dist/components/BbCalendar/useCalendarContext.d.ts +0 -116
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +0 -411
- package/dist/components/BbCalendar/useDayGrid.d.ts +0 -122
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +0 -93
- package/dist/components/BbCalendar/useToday.d.ts +0 -25
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +0 -4
- package/dist/components/BbConfirm/BbConfirmHost.d.ts +0 -10
- package/dist/components/BbConfirm/confirmEntry.d.ts +0 -4
- package/dist/components/BbDatePickerInput/calendarFields.d.ts +0 -91
- package/dist/components/BbDatePickerInput/dateFieldLayout.d.ts +0 -29
- package/dist/components/BbDialog/useDialogStack.d.ts +0 -19
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +0 -26
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +0 -38
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue.d.ts +0 -16
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +0 -41
- package/dist/components/BbDropdown/normalizeGroups.d.ts +0 -39
- package/dist/components/BbDropdown/pointerTrail.d.ts +0 -5
- package/dist/components/BbDropdown/useDropdownContext.d.ts +0 -131
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +0 -170
- package/dist/components/BbForm/BbFormCustomField.d.ts +0 -14
- package/dist/components/BbForm/bindFormField.d.ts +0 -56
- package/dist/components/BbForm/formFields.d.ts +0 -77
- package/dist/components/BbHost/BbHostOpening.d.ts +0 -27
- package/dist/components/BbHoverCard/hoverCardFocus.d.ts +0 -29
- package/dist/components/BbIcon/iconCache.d.ts +0 -63
- package/dist/components/BbNumberInput/numberDisplay.d.ts +0 -255
- package/dist/components/BbNumberInput/platform.d.ts +0 -7
- package/dist/components/BbOffCanvas/hostCloseLabel.d.ts +0 -3
- package/dist/components/BbOffCanvas/sheetAttrs.d.ts +0 -9
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +0 -37
- package/dist/components/BbPagination/paginationFit.d.ts +0 -38
- package/dist/components/BbSelectPopover/knownItems.d.ts +0 -65
- package/dist/components/BbSelectPopover/reclickClears.d.ts +0 -17
- package/dist/components/BbSelectPopover/sheetChipAttrs.d.ts +0 -18
- package/dist/components/BbTable/BbTableDataRow.d.ts +0 -204
- package/dist/components/BbTable/BbTableEdgeRow.d.ts +0 -112
- package/dist/components/BbTable/BbTableExpandRow.d.ts +0 -84
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +0 -128
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +0 -25
- package/dist/components/BbTable/gridWidgets.d.ts +0 -30
- package/dist/components/BbTable/measuredFloors.d.ts +0 -46
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +0 -27
- package/dist/components/BbTable/textRuler.d.ts +0 -73
- package/dist/components/BbTable/useRowReorder.d.ts +0 -60
- package/dist/components/BbTable/utils.d.ts +0 -375
- package/dist/components/BbTabs/tablistName.d.ts +0 -4
- package/dist/components/BbToast/BbToast.vue.d.ts +0 -5
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +0 -22
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +0 -15
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +0 -23
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +0 -19
- package/dist/components/BbTree/context.d.ts +0 -25
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +0 -21
- package/dist/components/ChipsBox/types.d.ts +0 -28
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +0 -6
- package/dist/components/ClearableButton/types.d.ts +0 -9
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +0 -7
- package/dist/components/CloseIcon/types.d.ts +0 -2
- package/dist/components/CommaBox/CommaBox.vue.d.ts +0 -21
- package/dist/components/CommaBox/types.d.ts +0 -20
- package/dist/components/CommonField/CommonField.vue.d.ts +0 -20
- package/dist/components/CommonField/messageHeightMatrix.d.ts +0 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue.d.ts +0 -22
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +0 -10
- package/dist/components/CommonFieldInput/types.d.ts +0 -114
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +0 -42
- package/dist/components/CommonPopover/resolvePlacement.d.ts +0 -9
- package/dist/components/CommonPopover/types.d.ts +0 -120
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +0 -48
- package/dist/components/CommonTimeSelector/useMeridiem.d.ts +0 -19
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +0 -7
- package/dist/components/ErrorIcon/types.d.ts +0 -3
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +0 -39
- package/dist/components/FlatListBox/types.d.ts +0 -140
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +0 -39
- package/dist/components/GroupedListBox/types.d.ts +0 -163
- package/dist/components/ListBox/ListBox.vue.d.ts +0 -39
- package/dist/components/ListBox/types.d.ts +0 -180
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +0 -20
- package/dist/components/OptionsContainer/types.d.ts +0 -168
- package/dist/components/Transitions/ScaleFade.vue.d.ts +0 -28
- package/dist/components/Transitions/Slide.vue.d.ts +0 -39
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +0 -7
- package/dist/components/WarningIcon/types.d.ts +0 -3
- package/dist/composables/__testResets.d.ts +0 -1
- package/dist/composables/autoHost.d.ts +0 -22
- package/dist/composables/formSubmitLock.d.ts +0 -48
- package/dist/composables/hostOpenings.d.ts +0 -88
- package/dist/composables/hostRegistry.d.ts +0 -47
- package/dist/composables/ssrMarker.d.ts +0 -15
- package/dist/composables/useActiveInactiveState.d.ts +0 -4
- package/dist/composables/useArray.d.ts +0 -7
- package/dist/composables/useBaseOptions.d.ts +0 -51
- package/dist/composables/useBodyScrollLock.d.ts +0 -4
- package/dist/composables/useBreakpoint.d.ts +0 -13
- package/dist/composables/useCancelableFunction.d.ts +0 -17
- package/dist/composables/useChoiceIndicator.d.ts +0 -58
- package/dist/composables/useClosingInert.d.ts +0 -28
- package/dist/composables/useCoarsePointer.d.ts +0 -9
- package/dist/composables/useCoherence.d.ts +0 -21
- package/dist/composables/useConfig.d.ts +0 -59
- package/dist/composables/useConfigDefaults.d.ts +0 -54
- package/dist/composables/useDirection.d.ts +0 -43
- package/dist/composables/useEscapeStackEntry.d.ts +0 -13
- package/dist/composables/useFrameworkDetection.d.ts +0 -12
- package/dist/composables/useHashedWatcher.d.ts +0 -19
- package/dist/composables/useHydrated.d.ts +0 -37
- package/dist/composables/useImeDismissBlur.d.ts +0 -103
- package/dist/composables/useIndexById.d.ts +0 -11
- package/dist/composables/useInertiaPage.d.ts +0 -10
- package/dist/composables/useItemText.d.ts +0 -17
- package/dist/composables/useItemValue.d.ts +0 -7
- package/dist/composables/useItemsGetter.d.ts +0 -83
- package/dist/composables/useKeyboardInset.d.ts +0 -28
- package/dist/composables/useListboxFocus.d.ts +0 -21
- package/dist/composables/useLocale.d.ts +0 -5
- package/dist/composables/useLogger.d.ts +0 -5
- package/dist/composables/useMinimalQueue.d.ts +0 -9
- package/dist/composables/useOnFalsy.d.ts +0 -2
- package/dist/composables/useOnTruthy.d.ts +0 -7
- package/dist/composables/useOverlayNavigation.d.ts +0 -37
- package/dist/composables/useOverlayYield.d.ts +0 -23
- package/dist/composables/usePrefill.d.ts +0 -44
- package/dist/composables/useQuery.d.ts +0 -39
- package/dist/composables/useRefusedCloseAnnouncement.d.ts +0 -13
- package/dist/composables/useRoute.d.ts +0 -3
- package/dist/composables/useRouter.d.ts +0 -2
- package/dist/composables/useSegmentedFields.d.ts +0 -129
- package/dist/composables/useServerPrefetch.d.ts +0 -28
- package/dist/composables/useSheetSurface.d.ts +0 -39
- package/dist/composables/useSsrState.d.ts +0 -28
- package/dist/composables/useTableWidthContext.d.ts +0 -73
- package/dist/composables/useToggleInput.d.ts +0 -44
- package/dist/composables/useTopLayer.d.ts +0 -9
- package/dist/composables/useTypeahead.d.ts +0 -112
- package/dist/composables/useUntil.d.ts +0 -7
- package/dist/composables/useUrlQueryParam.d.ts +0 -21
- package/dist/composables/useViewportWidth.d.ts +0 -14
- package/dist/deprecation/ai-deprecations.json.d.ts +0 -2984
- package/dist/deprecation/removedProps.d.ts +0 -3
- package/dist/directives/createPopoverDirective.d.ts +0 -111
- package/dist/directives/renderingInstance.d.ts +0 -2
- package/dist/i18n/eraNames.d.ts +0 -2
- package/dist/i18n/regionHints.d.ts +0 -16
- package/dist/icons-whitelist.d.ts +0 -9
- package/dist/reset.d.ts +0 -0
- package/dist/runtime/nuxt-plugin.d.ts +0 -2
- package/dist/styles.d.ts +0 -0
- package/dist/types/ExtractGenericFromComputedRef.d.ts +0 -2
- package/dist/types/ExtractGenericFromRef.d.ts +0 -2
- package/dist/types/NestedKeyOf.d.ts +0 -3
- package/dist/types/PrefixWith.d.ts +0 -1
- package/dist/types/ShapeErased.d.ts +0 -15
- package/dist/types/Simplify.d.ts +0 -6
- package/dist/utilities/calendar/canonicalParts.d.ts +0 -29
- package/dist/utilities/calendar/digits.d.ts +0 -18
- package/dist/utilities/calendar/gregorian.d.ts +0 -2
- package/dist/utilities/calendar/index.d.ts +0 -3
- package/dist/utilities/calendar/international.d.ts +0 -19
- package/dist/utilities/calendar/resolve.d.ts +0 -32
- package/dist/utilities/calendar/runtime.d.ts +0 -49
- package/dist/utilities/functions/animationsSettled.d.ts +0 -7
- package/dist/utilities/functions/bytesToUnit.d.ts +0 -2
- package/dist/utilities/functions/chunk.d.ts +0 -1
- package/dist/utilities/functions/clamp.d.ts +0 -9
- package/dist/utilities/functions/clampPrecision.d.ts +0 -1
- package/dist/utilities/functions/convertDateValue.d.ts +0 -57
- package/dist/utilities/functions/curry.d.ts +0 -6
- package/dist/utilities/functions/deburr.d.ts +0 -1
- package/dist/utilities/functions/elementLabel.d.ts +0 -8
- package/dist/utilities/functions/empty.d.ts +0 -1
- package/dist/utilities/functions/extractDomContainer.d.ts +0 -20
- package/dist/utilities/functions/findInTree.d.ts +0 -4
- package/dist/utilities/functions/flattenTree.d.ts +0 -1
- package/dist/utilities/functions/get.d.ts +0 -3
- package/dist/utilities/functions/hasVnodeListener.d.ts +0 -16
- package/dist/utilities/functions/hash.d.ts +0 -1
- package/dist/utilities/functions/head.d.ts +0 -2
- package/dist/utilities/functions/identity.d.ts +0 -1
- package/dist/utilities/functions/indexBy.d.ts +0 -11
- package/dist/utilities/functions/isDateDisabled.d.ts +0 -25
- package/dist/utilities/functions/isEqual.d.ts +0 -1
- package/dist/utilities/functions/isHex.d.ts +0 -1
- package/dist/utilities/functions/isImeComposing.d.ts +0 -7
- package/dist/utilities/functions/isNil.d.ts +0 -6
- package/dist/utilities/functions/isNotEmpty.d.ts +0 -1
- package/dist/utilities/functions/isNotNil.d.ts +0 -6
- package/dist/utilities/functions/isTextEntry.d.ts +0 -5
- package/dist/utilities/functions/isoWeek.d.ts +0 -36
- package/dist/utilities/functions/itemProps.d.ts +0 -46
- package/dist/utilities/functions/last.d.ts +0 -2
- package/dist/utilities/functions/negative.d.ts +0 -1
- package/dist/utilities/functions/noop.d.ts +0 -1
- package/dist/utilities/functions/normalizeDateBound.d.ts +0 -69
- package/dist/utilities/functions/parsePaginationNumber.d.ts +0 -22
- package/dist/utilities/functions/parseSize.d.ts +0 -3
- package/dist/utilities/functions/parseWidthString.d.ts +0 -6
- package/dist/utilities/functions/percentage.d.ts +0 -26
- package/dist/utilities/functions/pickBy.d.ts +0 -1
- package/dist/utilities/functions/range.d.ts +0 -1
- package/dist/utilities/functions/readableValue.d.ts +0 -6
- package/dist/utilities/functions/reject.d.ts +0 -25
- package/dist/utilities/functions/resolveEnumProp.d.ts +0 -19
- package/dist/utilities/functions/responsiveDefault.d.ts +0 -7
- package/dist/utilities/functions/searchRank.d.ts +0 -19
- package/dist/utilities/functions/settlesVisible.d.ts +0 -20
- package/dist/utilities/functions/snapToStep.d.ts +0 -1
- package/dist/utilities/functions/sort.d.ts +0 -6
- package/dist/utilities/functions/throttle.d.ts +0 -1
- package/dist/utilities/functions/toggleInput.d.ts +0 -114
- package/dist/utilities/functions/transpose.d.ts +0 -1
- package/dist/utilities/functions/validateDateFormat.d.ts +0 -8
- package/dist/utilities/functions/wait.d.ts +0 -2
- package/dist/utilities/functions/waitFor.d.ts +0 -9
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +0 -49
- package/dist/utilities/functions/when.d.ts +0 -9
- package/dist/utilities/misc/autofocus.d.ts +0 -20
- package/dist/utilities/misc/iconsInjectionKey.d.ts +0 -15
- package/dist/utilities/misc/listboxMetrics.d.ts +0 -47
- package/dist/utilities/misc/maskaDataOptions.d.ts +0 -12
- package/dist/utilities/misc/pageText.d.ts +0 -16
- package/dist/utilities/misc/ssrValue.d.ts +0 -20
- package/dist/utilities/misc/transitions.d.ts +0 -5
- package/dist/utils/configDefaults.d.ts +0 -43
- package/dist/utils/configScope.d.ts +0 -43
- package/dist/utils/copyData.d.ts +0 -13
- package/dist/utils/focusVisibility.d.ts +0 -15
- package/dist/utils/injectLibraryStyles.d.ts +0 -8
- package/dist/utils/overlayEscapeStack.d.ts +0 -52
- package/dist/utils/overlaySurfaceIsolation.d.ts +0 -1
- package/dist/utils/passthroughDeduper.d.ts +0 -16
- package/dist/utils/releasedActivator.d.ts +0 -20
- package/dist/utils/versionCheck.d.ts +0 -19
|
@@ -6,38 +6,45 @@ import i from "../../assets/svgs/play.svg_raw.js";
|
|
|
6
6
|
import { usePassthrough as a } from "../../composables/usePassthrough.js";
|
|
7
7
|
import { useLocale as o } from "../../composables/useLocale.js";
|
|
8
8
|
import { BB_CAROUSEL_PT as s } from "./types.js";
|
|
9
|
-
import {
|
|
9
|
+
import { dragVelocity as c, quickRelease as ee } from "./dragRelease.js";
|
|
10
|
+
import { Comment as te, Fragment as l, Text as ne, cloneVNode as u, computed as d, createBlock as re, createCommentVNode as ie, createElementBlock as f, createElementVNode as p, createVNode as ae, defineComponent as oe, mergeModels as m, mergeProps as h, nextTick as g, onBeforeUnmount as se, onMounted as ce, onUpdated as le, openBlock as _, ref as v, renderList as ue, renderSlot as de, resolveDynamicComponent as fe, toDisplayString as pe, unref as y, useAttrs as me, useModel as he, useSlots as ge, watch as _e, withModifiers as ve } from "vue";
|
|
10
11
|
// src/components/BbCarousel/BbCarousel.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
12
|
+
var ye = ["aria-label", "aria-roledescription"], be = ["aria-label"], xe = ["aria-label"], Se = [
|
|
12
13
|
"aria-current",
|
|
13
14
|
"aria-label",
|
|
14
15
|
"inert",
|
|
15
16
|
"tabindex",
|
|
16
17
|
"onClick"
|
|
17
|
-
],
|
|
18
|
+
], Ce = ["aria-disabled", "aria-label"], we = ["aria-disabled", "aria-label"], Te = [
|
|
18
19
|
"aria-hidden",
|
|
19
20
|
"aria-label",
|
|
20
21
|
"aria-roledescription",
|
|
21
22
|
"inert",
|
|
22
23
|
"role"
|
|
23
|
-
],
|
|
24
|
+
], Ee = ["aria-current", "aria-label"], De = [
|
|
25
|
+
"loading",
|
|
26
|
+
"sizes",
|
|
27
|
+
"src",
|
|
28
|
+
"srcset"
|
|
29
|
+
], Oe = [
|
|
24
30
|
"alt",
|
|
25
31
|
"loading",
|
|
26
32
|
"sizes",
|
|
27
33
|
"src",
|
|
28
34
|
"srcset"
|
|
29
|
-
],
|
|
35
|
+
], ke = {
|
|
30
36
|
"aria-live": "polite",
|
|
31
37
|
class: "bb-sr-only"
|
|
32
|
-
},
|
|
38
|
+
}, b = /*@__PURE__*/ oe({
|
|
33
39
|
inheritAttrs: !1,
|
|
34
40
|
__name: "BbCarousel",
|
|
35
|
-
props: /*@__PURE__*/
|
|
41
|
+
props: /*@__PURE__*/ m({
|
|
36
42
|
"pt:root": {},
|
|
37
43
|
"pt:slide": {},
|
|
38
44
|
"pt:slide:current": {},
|
|
39
45
|
"pt:slide:active": {},
|
|
40
46
|
"pt:image": {},
|
|
47
|
+
"pt:thumb": {},
|
|
41
48
|
"pt:overlay": {},
|
|
42
49
|
"pt:prev": {},
|
|
43
50
|
"pt:prev:disabled": {},
|
|
@@ -71,48 +78,48 @@ var ve = ["aria-label", "aria-roledescription"], ye = ["aria-label"], be = ["ari
|
|
|
71
78
|
modelModifiers: {}
|
|
72
79
|
}),
|
|
73
80
|
emits: ["update:modelValue"],
|
|
74
|
-
setup(
|
|
75
|
-
let
|
|
81
|
+
setup(oe) {
|
|
82
|
+
let m = he(oe, "modelValue"), b = oe, x = ge(), S = v(m.value), { t: C } = o(), w = a({
|
|
76
83
|
component: "BbCarousel",
|
|
77
|
-
attrs:
|
|
78
|
-
props:
|
|
84
|
+
attrs: me(),
|
|
85
|
+
props: b,
|
|
79
86
|
parts: s.parts,
|
|
80
87
|
states: s.states,
|
|
81
88
|
active: {}
|
|
82
|
-
}),
|
|
89
|
+
}), T = v(null), E = v(null), D = v(!1), Ae = (e) => e.flatMap((e) => e.type === te ? [] : e.type === l ? Ae(e.children) : e.type === ne && !String(e.children).trim() ? [] : [e]), je = /* @__PURE__ */ new WeakMap(), Me = 0, Ne = (e) => {
|
|
83
90
|
let t = /* @__PURE__ */ new Map();
|
|
84
91
|
return e.map((e) => {
|
|
85
|
-
if (typeof e == "object" && e) return
|
|
92
|
+
if (typeof e == "object" && e) return je.has(e) || je.set(e, ++Me), `o${je.get(e)}`;
|
|
86
93
|
let n = (t.get(e) ?? 0) + 1;
|
|
87
94
|
return t.set(e, n), `${typeof e}:${String(e)}:${n}`;
|
|
88
95
|
});
|
|
89
|
-
},
|
|
90
|
-
let { items: e } =
|
|
96
|
+
}, Pe = () => {
|
|
97
|
+
let { items: e } = b;
|
|
91
98
|
if (typeof e == "number") return Array.from({ length: Math.max(0, Math.floor(e)) }, (e, t) => ({
|
|
92
99
|
key: t,
|
|
93
100
|
item: t
|
|
94
101
|
}));
|
|
95
102
|
if (e) {
|
|
96
|
-
let t =
|
|
103
|
+
let t = Ne(e);
|
|
97
104
|
return e.map((e, n) => ({
|
|
98
105
|
key: t[n],
|
|
99
106
|
item: e
|
|
100
107
|
}));
|
|
101
108
|
}
|
|
102
|
-
return
|
|
109
|
+
return Ae(x.default?.() ?? []).map((e, t) => ({
|
|
103
110
|
key: e.key ?? t,
|
|
104
111
|
node: e
|
|
105
112
|
}));
|
|
106
|
-
},
|
|
113
|
+
}, Fe = (e) => {
|
|
107
114
|
let t = e.map((e, t) => ({
|
|
108
115
|
...e,
|
|
109
116
|
real: t,
|
|
110
117
|
clone: !1
|
|
111
|
-
})), n = Math.min(
|
|
118
|
+
})), n = Math.min(j.value, e.length);
|
|
112
119
|
if (!n) return t;
|
|
113
120
|
let r = (e, t, n) => ({
|
|
114
121
|
key: `${n}${String(e.key)}`,
|
|
115
|
-
node: e.node ?
|
|
122
|
+
node: e.node ? u(e.node) : void 0,
|
|
116
123
|
item: e.item,
|
|
117
124
|
real: t,
|
|
118
125
|
clone: !0
|
|
@@ -122,7 +129,7 @@ var ve = ["aria-label", "aria-roledescription"], ye = ["aria-label"], be = ["ari
|
|
|
122
129
|
...t,
|
|
123
130
|
...e.slice(0, n).map((e, t) => r(e, t, ">"))
|
|
124
131
|
];
|
|
125
|
-
},
|
|
132
|
+
}, O = (e) => {
|
|
126
133
|
if (typeof e == "string") return {
|
|
127
134
|
src: e,
|
|
128
135
|
alt: ""
|
|
@@ -135,133 +142,136 @@ var ve = ["aria-label", "aria-roledescription"], ye = ["aria-label"], be = ["ari
|
|
|
135
142
|
sizes: a(r),
|
|
136
143
|
alt: i == null ? "" : String(i)
|
|
137
144
|
};
|
|
138
|
-
},
|
|
139
|
-
let
|
|
140
|
-
|
|
145
|
+
}, Ie = (e, t) => {
|
|
146
|
+
let n = O(e)?.alt ?? "";
|
|
147
|
+
return n.trim() ? n : C("carousel.goTo", t + 1).value;
|
|
148
|
+
}, Le = v(1), k = v(0), A = v(0), j = v(0), M = v(S.value), Re = v(0), ze = v(0), Be = 0, N = v(!1), Ve = v(0), He = v(!1), Ue = () => Math.max(1, Math.floor(Le.value + .01)), We = () => N.value || b.picker ? 1 : Ue(), P = d(() => {
|
|
149
|
+
let e = k.value, t = We(), n = [];
|
|
150
|
+
if (!A.value) return n;
|
|
141
151
|
for (let r = 0; r < e; r += t) {
|
|
142
|
-
let e =
|
|
152
|
+
let e = V() ? r : Math.min(r, A.value - 1);
|
|
143
153
|
n.length && n[n.length - 1].start === e || n.push({
|
|
144
154
|
start: e,
|
|
145
155
|
first: r
|
|
146
156
|
});
|
|
147
157
|
}
|
|
148
158
|
return n;
|
|
149
|
-
}),
|
|
159
|
+
}), Ge = d(() => new Set(P.value.map((e) => e.start))), F = () => P.value.length, Ke = (e) => {
|
|
150
160
|
let t = 0;
|
|
151
|
-
return
|
|
161
|
+
return P.value.forEach((n, r) => {
|
|
152
162
|
n.first <= e && (t = r);
|
|
153
163
|
}), t;
|
|
154
|
-
},
|
|
155
|
-
if (
|
|
156
|
-
let t = Math.floor((
|
|
157
|
-
return
|
|
164
|
+
}, qe = (e) => {
|
|
165
|
+
if (b.picker && !N.value) {
|
|
166
|
+
let t = Math.floor((Ue() - 1) / 2), n = k.value;
|
|
167
|
+
return V() ? ((e - t) % n + n) % n : Math.min(Math.max(e - t, 0), A.value - 1);
|
|
158
168
|
}
|
|
159
|
-
return
|
|
160
|
-
},
|
|
161
|
-
let n =
|
|
162
|
-
if (
|
|
163
|
-
let r =
|
|
164
|
-
if (
|
|
169
|
+
return P.value[Ke(e)]?.start ?? 0;
|
|
170
|
+
}, Je = (e) => j.value ? Ge.value.has(q(e)) : Ge.value.has(e), Ye = (e, t) => {
|
|
171
|
+
let n = k.value;
|
|
172
|
+
if (N.value) return t === e;
|
|
173
|
+
let r = Ue();
|
|
174
|
+
if (V()) return ((t - e) % n + n) % n < r;
|
|
165
175
|
let i = Math.min(e, Math.max(0, n - r));
|
|
166
176
|
return t >= i && t < i + r;
|
|
167
|
-
},
|
|
168
|
-
let e =
|
|
169
|
-
return e >= 0 &&
|
|
170
|
-
},
|
|
171
|
-
let n =
|
|
172
|
-
for (let r = e + t; r >= 0 && r <= n; r += t) if (
|
|
177
|
+
}, Xe = () => {
|
|
178
|
+
let e = P.value.findIndex((e) => e.start === S.value);
|
|
179
|
+
return e >= 0 && Ye(S.value, m.value) ? e : Ke(m.value);
|
|
180
|
+
}, Ze = (e) => b.picker || Ye(e, m.value) ? m.value : P.value.find((t) => t.start === e)?.first ?? e, Qe = (e, t) => {
|
|
181
|
+
let n = j.value ? I().length - 1 : A.value - 1;
|
|
182
|
+
for (let r = e + t; r >= 0 && r <= n; r += t) if (Je(r)) return r;
|
|
173
183
|
return e;
|
|
174
|
-
},
|
|
175
|
-
if (!
|
|
176
|
-
|
|
177
|
-
let e =
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
let t =
|
|
181
|
-
|
|
182
|
-
let n =
|
|
183
|
-
if (Math.abs(n -
|
|
184
|
+
}, $e = () => N.value ? Math.floor((Le.value - 1) / 2 + .01) : 0, et = () => N.value ? 1 + 2 * $e() : Ue(), I = () => Array.from(E.value?.children ?? []), L = (e) => I()[e + j.value], tt = () => !!T.value && getComputedStyle(T.value).direction === "rtl", R = (e) => tt() ? e.offsetLeft + e.offsetWidth - E.value.clientWidth + Be : e.offsetLeft - Be, nt = () => E.value ? E.value.scrollWidth - E.value.clientWidth : 0, rt = () => !E.value || E.value.clientWidth === 0, it = "", at = !1, ot = () => {
|
|
185
|
+
if (!T.value || !E.value) return;
|
|
186
|
+
Yn();
|
|
187
|
+
let e = I().length - 2 * j.value;
|
|
188
|
+
if (k.value = Math.max(0, e), rt()) return;
|
|
189
|
+
Le.value = Math.max(1, parseFloat(getComputedStyle(T.value).getPropertyValue("--per-view")) || 1);
|
|
190
|
+
let t = L(0);
|
|
191
|
+
N.value = getComputedStyle(T.value).getPropertyValue("--align").trim() === "center", He.value = parseFloat(getComputedStyle(T.value).getPropertyValue("--py")) > 0;
|
|
192
|
+
let n = N.value && t ? Math.max(0, (T.value.clientWidth - t.offsetWidth) / 2) : 0;
|
|
193
|
+
if (Math.abs(n - Ve.value) > .5) Ve.value = n, at = !0;
|
|
184
194
|
else {
|
|
185
|
-
if (
|
|
186
|
-
let n = parseFloat(getComputedStyle(
|
|
187
|
-
|
|
188
|
-
let r = Math.min(e, Math.ceil(
|
|
189
|
-
if (r !==
|
|
190
|
-
|
|
195
|
+
if (Be = parseFloat(getComputedStyle(E.value).scrollPaddingInlineStart) || 0, b.loop && e > Ue() && t) {
|
|
196
|
+
let n = parseFloat(getComputedStyle(E.value).columnGap) || 0;
|
|
197
|
+
At = t.offsetWidth + n;
|
|
198
|
+
let r = Math.min(e, Math.ceil(E.value.clientWidth / Math.max(1, At)) + 2);
|
|
199
|
+
if (r !== j.value) {
|
|
200
|
+
j.value = r, at = !0;
|
|
191
201
|
return;
|
|
192
202
|
}
|
|
193
|
-
} else if (
|
|
194
|
-
|
|
203
|
+
} else if (j.value) {
|
|
204
|
+
j.value = 0, at = !0;
|
|
195
205
|
return;
|
|
196
206
|
}
|
|
197
|
-
if (
|
|
207
|
+
if (b.loop && j.value) A.value = e;
|
|
198
208
|
else {
|
|
199
|
-
let t =
|
|
200
|
-
|
|
209
|
+
let t = nt(), n = I().slice(0, e).findIndex((e) => Math.abs(R(e)) >= t - 1);
|
|
210
|
+
A.value = e === 0 ? 0 : n === -1 ? e : n + 1;
|
|
201
211
|
}
|
|
202
|
-
if (
|
|
203
|
-
let t =
|
|
204
|
-
n !== t &&
|
|
212
|
+
if (A.value && S.value > A.value - 1 && Wt(A.value - 1), e > 0) {
|
|
213
|
+
let t = m.value, n = Number.isFinite(t) ? Math.min(Math.max(Math.round(t), 0), e - 1) : 0;
|
|
214
|
+
n !== t && K(n);
|
|
205
215
|
}
|
|
206
216
|
}
|
|
207
|
-
},
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
210
|
-
if (
|
|
211
|
-
|
|
217
|
+
}, z = () => {
|
|
218
|
+
if (at = !1, ot(), at) return void g(z);
|
|
219
|
+
if (rt() || X.value) return;
|
|
220
|
+
if (W()) return void (Tt = !0);
|
|
221
|
+
H === null && (M.value = S.value + j.value);
|
|
212
222
|
let e = [
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
k.value,
|
|
216
|
-
Fe.value,
|
|
217
|
-
Ie.value,
|
|
218
|
-
D.value,
|
|
219
|
-
O.value,
|
|
223
|
+
E.value.clientWidth,
|
|
224
|
+
Le.value,
|
|
220
225
|
j.value,
|
|
221
|
-
Re.value
|
|
226
|
+
Re.value,
|
|
227
|
+
ze.value,
|
|
228
|
+
k.value,
|
|
229
|
+
A.value,
|
|
230
|
+
N.value,
|
|
231
|
+
Ve.value
|
|
222
232
|
].join();
|
|
223
|
-
if (e ===
|
|
224
|
-
if (!
|
|
225
|
-
|
|
226
|
-
let t = !
|
|
227
|
-
|
|
228
|
-
},
|
|
233
|
+
if (e === it) return;
|
|
234
|
+
if (!P.value.length) return void qt(S.value);
|
|
235
|
+
it = e;
|
|
236
|
+
let t = !b.picker && Ge.value.has(S.value) && Ye(S.value, m.value) ? S.value : qe(m.value);
|
|
237
|
+
Wt(t), qt(t);
|
|
238
|
+
}, st = d(() => q(M.value)), ct = d(() => {
|
|
229
239
|
let e = 0;
|
|
230
|
-
return
|
|
231
|
-
t.start <=
|
|
240
|
+
return P.value.forEach((t, n) => {
|
|
241
|
+
t.start <= st.value && (e = n);
|
|
232
242
|
}), e;
|
|
233
|
-
}),
|
|
234
|
-
if (!
|
|
235
|
-
let t =
|
|
236
|
-
return
|
|
237
|
-
},
|
|
238
|
-
if (!
|
|
243
|
+
}), lt = d(() => Ze(st.value)), ut = (e) => {
|
|
244
|
+
if (!D.value) return !0;
|
|
245
|
+
let t = k.value, n = e - st.value;
|
|
246
|
+
return V() && (n = (n % t + t) % t, n > t / 2 && (n -= t)), n >= -$e() && n < et() - $e();
|
|
247
|
+
}, B = (e) => D.value ? e === lt.value : e === m.value, dt = (e, t) => {
|
|
248
|
+
if (!D.value) return !1;
|
|
239
249
|
if (t) return !0;
|
|
240
|
-
let n =
|
|
250
|
+
let n = S.value - $e(), r = n + et();
|
|
241
251
|
if (e >= n && e < r) return !1;
|
|
242
|
-
if (!(
|
|
243
|
-
let i =
|
|
252
|
+
if (!(b.loop && j.value > 0)) return !0;
|
|
253
|
+
let i = k.value;
|
|
244
254
|
return !(e + i < r || e - i >= n);
|
|
245
|
-
},
|
|
246
|
-
if (!
|
|
247
|
-
let t =
|
|
255
|
+
}, ft = () => F() > 7, pt = () => Math.min(Math.max(ct.value - 3, 0), F() - 7), mt = (e) => !ft() || e >= pt() && e < pt() + 7, ht = (e) => {
|
|
256
|
+
if (!ft()) return;
|
|
257
|
+
let t = pt(), n = t + 7 - 1, r = Math.min(t > 0 ? e - t : Infinity, n < F() - 1 ? n - e : Infinity);
|
|
248
258
|
if (r === 0) return "bb-carousel__dot--far";
|
|
249
259
|
if (r === 1) return "bb-carousel__dot--near";
|
|
250
|
-
},
|
|
251
|
-
let e =
|
|
252
|
-
return !e || !(
|
|
253
|
-
},
|
|
254
|
-
let t = 1 +
|
|
255
|
-
return e >= r && e <= i ? !0 : !
|
|
256
|
-
},
|
|
257
|
-
if (!
|
|
258
|
-
let e =
|
|
259
|
-
|
|
260
|
+
}, gt = () => {
|
|
261
|
+
let e = D.value ? L(0) : void 0;
|
|
262
|
+
return !e || !(Re.value || ze.value) ? 0 : Math.ceil(Math.max(Re.value, ze.value) / Math.max(1, e.offsetWidth));
|
|
263
|
+
}, _t = (e) => {
|
|
264
|
+
let t = 1 + gt(), n = N.value ? Math.ceil((Le.value - 1) / 2) : 0, r = S.value - n - t, i = N.value ? S.value + n + t : S.value + Math.ceil(Le.value - .01) - 1 + t;
|
|
265
|
+
return e >= r && e <= i ? !0 : !b.loop || !k.value ? !1 : e - k.value >= r || e + k.value <= i;
|
|
266
|
+
}, vt = () => Array.isArray(b.items) && b.items.length > 0 && !x.slide && !x["slide:header"] && !x["slide:footer"] && b.items.every((e) => O(e) !== void 0), V = () => !!b.loop && j.value > 0, yt = () => b.loop || (b.picker ? m.value : Xe()) > 0, bt = () => b.loop || (b.picker ? m.value < k.value - 1 : Xe() < F() - 1), xt = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, H = null, St = !1, Ct = v(""), wt = !1, Tt = !1, U = [], W = () => U.length > 0, Et = 0, Dt = 0, Ot = 300, kt = .4, At = 0, jt = [], Mt = {}, Nt = () => {
|
|
267
|
+
if (!W()) return;
|
|
268
|
+
let e = U[0].currentTime, t = new Set(U.map((e) => e.effect.target));
|
|
269
|
+
I().forEach((n) => {
|
|
260
270
|
if (t.has(n)) return;
|
|
261
|
-
let r = n.animate(
|
|
262
|
-
r.currentTime = e,
|
|
271
|
+
let r = n.animate(jt, Mt);
|
|
272
|
+
r.currentTime = e, U.push(r);
|
|
263
273
|
});
|
|
264
|
-
},
|
|
274
|
+
}, Pt = (e, t) => {
|
|
265
275
|
let n = (e) => .75 * e * (1 - e) + e ** 3, r = (e) => .75 * (1 - 2 * e) + 3 * e * e, i = e;
|
|
266
276
|
for (let t = 0; t < 8; t++) {
|
|
267
277
|
let t = n(i) - e;
|
|
@@ -279,217 +289,210 @@ var ve = ["aria-label", "aria-roledescription"], ye = ["aria-label"], be = ["ari
|
|
|
279
289
|
p: o,
|
|
280
290
|
slope: r(i) > 1e-6 ? s / r(i) : t
|
|
281
291
|
};
|
|
282
|
-
},
|
|
283
|
-
if (!
|
|
284
|
-
let e = getComputedStyle(
|
|
292
|
+
}, Ft = () => {
|
|
293
|
+
if (!T.value) return 300;
|
|
294
|
+
let e = getComputedStyle(T.value).getPropertyValue("--speed").trim(), t = parseFloat(e);
|
|
285
295
|
return Number.isFinite(t) ? e.endsWith("ms") ? t : e.endsWith("s") ? t * 1e3 : t : 300;
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
let e = Math.min(1, Math.max(0, Number(
|
|
296
|
+
}, G = (e) => {
|
|
297
|
+
E.value && (E.value.style.scrollSnapType = e ? "none" : "");
|
|
298
|
+
}, It = () => {
|
|
299
|
+
let e = Math.min(1, Math.max(0, Number(U[0]?.currentTime ?? Ot) / Ot)), t = Pt(e, kt);
|
|
290
300
|
return {
|
|
291
|
-
at:
|
|
292
|
-
speed: (
|
|
301
|
+
at: Et + (Dt - Et) * t.p,
|
|
302
|
+
speed: (Dt - Et) * t.slope / (Ot / 1e3)
|
|
293
303
|
};
|
|
294
|
-
}, Ft = () => {
|
|
295
|
-
let e = B;
|
|
296
|
-
B = [], e.forEach((e) => e.cancel());
|
|
297
|
-
}, It = () => {
|
|
298
|
-
Ft(), St = !1, H(!1);
|
|
299
304
|
}, Lt = () => {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
H(!0), Ft(), T.value.scrollLeft = e, St = !0;
|
|
305
|
+
let e = U;
|
|
306
|
+
U = [], e.forEach((e) => e.cancel());
|
|
303
307
|
}, Rt = () => {
|
|
304
|
-
Lt(),
|
|
305
|
-
}, zt = (
|
|
306
|
-
|
|
308
|
+
Lt(), wt = !1, G(!1);
|
|
309
|
+
}, zt = () => {
|
|
310
|
+
if (!W() || !E.value) return;
|
|
311
|
+
let { at: e } = It();
|
|
312
|
+
G(!0), Lt(), E.value.scrollLeft = e, wt = !0;
|
|
313
|
+
}, Bt = () => {
|
|
314
|
+
zt(), H = null, Hn();
|
|
315
|
+
}, Vt = (e, t, n = 0) => {
|
|
316
|
+
let r = E.value;
|
|
307
317
|
if (!r) return;
|
|
308
|
-
let i =
|
|
309
|
-
if (
|
|
310
|
-
|
|
318
|
+
let i = nt(), a = Math.sign(e) * Math.min(Math.abs(e), i), o = Ft();
|
|
319
|
+
if (xt() || o <= 0) {
|
|
320
|
+
Rt(), r.scrollTo({
|
|
311
321
|
left: a,
|
|
312
322
|
behavior: "instant"
|
|
313
323
|
});
|
|
314
324
|
return;
|
|
315
325
|
}
|
|
316
|
-
if (
|
|
317
|
-
let s =
|
|
318
|
-
if (
|
|
326
|
+
if (W() && Math.abs(a - Dt) < .5 && !n) return;
|
|
327
|
+
let s = W() ? It() : null, c = (s ? s.at : r.scrollLeft) + n, ee = s ? s.speed : t ?? 0, te = a - c;
|
|
328
|
+
if (Lt(), wt = !1, G(!0), Math.abs(a - r.scrollLeft) >= .5 && r.scrollTo({
|
|
319
329
|
left: a,
|
|
320
330
|
behavior: "instant"
|
|
321
|
-
}), Math.abs(
|
|
322
|
-
|
|
331
|
+
}), Math.abs(te) < .5) {
|
|
332
|
+
G(!1), J();
|
|
323
333
|
return;
|
|
324
334
|
}
|
|
325
|
-
|
|
335
|
+
Et = c, Dt = a, Ot = o, kt = Math.min(4, Math.max(.4, o / 1e3 * ee / te)), jt = [{ translate: `${te}px 0` }, { translate: "0px 0" }], Mt = {
|
|
326
336
|
duration: o,
|
|
327
|
-
easing: `cubic-bezier(0.25, ${(.25 *
|
|
337
|
+
easing: `cubic-bezier(0.25, ${(.25 * kt).toFixed(4)}, 0.25, 1)`
|
|
328
338
|
};
|
|
329
|
-
let
|
|
330
|
-
s &&
|
|
331
|
-
|
|
339
|
+
let l = I().map((e) => e.animate(jt, Mt)), ne = document.timeline?.currentTime;
|
|
340
|
+
s && ne != null && l.forEach((e) => e.startTime = Number(ne)), U = l, l[0].onfinish = () => {
|
|
341
|
+
U === l && (U = [], G(!1), J(), Tt && (Tt = !1, z()));
|
|
332
342
|
};
|
|
333
|
-
},
|
|
334
|
-
if (!
|
|
335
|
-
let t =
|
|
343
|
+
}, Ht = 0, Ut = (e = E.value?.scrollLeft ?? 0) => {
|
|
344
|
+
if (!j.value || !E.value) return 0;
|
|
345
|
+
let t = k.value, n = I(), r = n[j.value], i = n[j.value + t];
|
|
336
346
|
if (!r || !i) return 0;
|
|
337
|
-
let a =
|
|
347
|
+
let a = R(r), o = R(i) - a;
|
|
338
348
|
if (!o) return 0;
|
|
339
349
|
let s = (e - a) / o, c = 0;
|
|
340
350
|
if (s >= .999 ? c = -t : s < -.001 && (c = t), !c) return 0;
|
|
341
|
-
let
|
|
342
|
-
return
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
e !==
|
|
347
|
-
},
|
|
348
|
-
let t =
|
|
349
|
-
if (!t || !
|
|
350
|
-
|
|
351
|
-
let n =
|
|
352
|
-
Math.abs(
|
|
351
|
+
let ee = c / t * o;
|
|
352
|
+
return Ht = c, E.value.scrollLeft = e + ee, M.value += c, H !== null && (H += c), ee;
|
|
353
|
+
}, Wt = (e) => {
|
|
354
|
+
S.value = e, M.value = e + j.value;
|
|
355
|
+
}, Gt = !1, Kt = null, K = (e) => {
|
|
356
|
+
e !== m.value && (Gt = !0, Kt = e, m.value = e, Gt = !1);
|
|
357
|
+
}, qt = (e) => {
|
|
358
|
+
let t = I()[e + j.value];
|
|
359
|
+
if (!t || !E.value) return;
|
|
360
|
+
Rt();
|
|
361
|
+
let n = R(t);
|
|
362
|
+
Math.abs(E.value.scrollLeft - n) >= 1 && E.value.scrollTo({
|
|
353
363
|
left: n,
|
|
354
364
|
behavior: "instant"
|
|
355
365
|
});
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
let n =
|
|
366
|
+
}, Jt = (e) => {
|
|
367
|
+
zn.value || (Ct.value = "", g(() => Ct.value = C("carousel.slideOf", (e ?? m.value) + 1, k.value).value));
|
|
368
|
+
}, Yt = (e, t = !1) => {
|
|
369
|
+
let n = P.value;
|
|
360
370
|
if (!n.length) return;
|
|
361
371
|
let r = n[Math.min(Math.max(e, 0), n.length - 1)];
|
|
362
|
-
t &&
|
|
363
|
-
},
|
|
364
|
-
let n =
|
|
372
|
+
t && Hn(), b.picker || K(r.first), Zt(r.start + j.value, t);
|
|
373
|
+
}, Xt = (e, t = !1) => {
|
|
374
|
+
let n = k.value;
|
|
365
375
|
if (!n) return;
|
|
366
|
-
let r =
|
|
367
|
-
t &&
|
|
368
|
-
let i =
|
|
369
|
-
|
|
370
|
-
},
|
|
371
|
-
let r =
|
|
372
|
-
if (
|
|
376
|
+
let r = b.loop ? (e % n + n) % n : Math.min(Math.max(e, 0), n - 1);
|
|
377
|
+
t && Hn();
|
|
378
|
+
let i = m.value;
|
|
379
|
+
K(r), en(r, t && r !== i);
|
|
380
|
+
}, Zt = (e, t, n) => {
|
|
381
|
+
let r = k.value, i = ((e - j.value) % r + r) % r;
|
|
382
|
+
if (H = e, Wt(i), M.value = e, St = t, !E.value || !I().length) return;
|
|
373
383
|
let a = 0;
|
|
374
|
-
if (
|
|
375
|
-
let t =
|
|
376
|
-
for (; e + n <
|
|
377
|
-
for (; e + n >=
|
|
384
|
+
if (j.value) {
|
|
385
|
+
let t = k.value, n = 0;
|
|
386
|
+
for (; e + n < j.value;) n += t;
|
|
387
|
+
for (; e + n >= j.value + t;) n -= t;
|
|
378
388
|
if (n) {
|
|
379
|
-
let t =
|
|
380
|
-
r >= o - 1 && r <= s + 1 ? (e += n, a = t,
|
|
389
|
+
let t = Qt(e + n) - Qt(e), r = (W() ? It().at : E.value.scrollLeft) + t, i = I(), o = Math.min(R(i[0]), R(i[i.length - 1])), s = Math.max(R(i[0]), R(i[i.length - 1]));
|
|
390
|
+
r >= o - 1 && r <= s + 1 ? (e += n, a = t, H = e, M.value = e) : e = Math.min(Math.max(e, 0), i.length - 1);
|
|
381
391
|
}
|
|
382
392
|
}
|
|
383
|
-
let o =
|
|
384
|
-
if (!
|
|
385
|
-
|
|
386
|
-
},
|
|
387
|
-
let t =
|
|
388
|
-
if (t[e]) return
|
|
389
|
-
let n = t[
|
|
390
|
-
return !n || !r ?
|
|
391
|
-
},
|
|
392
|
-
let n =
|
|
393
|
+
let o = Qt(e);
|
|
394
|
+
if (!W() && Math.abs(E.value.scrollLeft - o) < 1) return wt = !1, G(!1), tn();
|
|
395
|
+
Vt(o, n, a);
|
|
396
|
+
}, Qt = (e) => {
|
|
397
|
+
let t = I();
|
|
398
|
+
if (t[e]) return R(t[e]);
|
|
399
|
+
let n = t[j.value], r = t[j.value + k.value];
|
|
400
|
+
return !n || !r ? R(t[Math.max(0, Math.min(e, t.length - 1))]) : R(n) + (e - j.value) * (R(r) - R(n)) / k.value;
|
|
401
|
+
}, $t = (e, t = !0) => {
|
|
402
|
+
let n = P.value;
|
|
393
403
|
if (!n.length) return;
|
|
394
|
-
if (
|
|
395
|
-
if (t &&
|
|
396
|
-
let n =
|
|
404
|
+
if (b.picker) return Xt(m.value + e, t);
|
|
405
|
+
if (t && Hn(), V()) {
|
|
406
|
+
let n = H ?? S.value + j.value;
|
|
397
407
|
do
|
|
398
408
|
n += e;
|
|
399
|
-
while (!
|
|
400
|
-
|
|
409
|
+
while (!Ge.value.has(q(n)));
|
|
410
|
+
K(q(n)), Zt(n, t);
|
|
401
411
|
return;
|
|
402
412
|
}
|
|
403
|
-
let r = n.length - 1, i =
|
|
404
|
-
a < 0 && (a =
|
|
405
|
-
},
|
|
406
|
-
if (!
|
|
407
|
-
let n =
|
|
408
|
-
if (
|
|
409
|
-
t &&
|
|
413
|
+
let r = n.length - 1, i = Xe(), a = i + e;
|
|
414
|
+
a < 0 && (a = b.loop ? r : 0), a > r && (a = b.loop ? 0 : r), a !== i && (Math.abs(a - i) > 1 ? (H = null, K(n[a].first), Wt(n[a].start), qt(n[a].start), t && Jt(n[a].first)) : Yt(a, t));
|
|
415
|
+
}, en = (e, t = !1) => {
|
|
416
|
+
if (!P.value.length || X.value || cn) return;
|
|
417
|
+
let n = qe(e);
|
|
418
|
+
if (b.picker ? n === S.value : Ye(S.value, e)) {
|
|
419
|
+
t && Jt(e);
|
|
410
420
|
return;
|
|
411
421
|
}
|
|
412
|
-
let r = n +
|
|
413
|
-
if (
|
|
414
|
-
let e =
|
|
422
|
+
let r = n + j.value;
|
|
423
|
+
if (V()) {
|
|
424
|
+
let e = k.value, t = H ?? S.value + j.value;
|
|
415
425
|
for (let n of [r - e, r + e]) Math.abs(n - t) < Math.abs(r - t) && (r = n);
|
|
416
426
|
}
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
let e =
|
|
420
|
-
if (
|
|
421
|
-
let t = e -
|
|
422
|
-
(t < 0 || t >=
|
|
427
|
+
Zt(r, t);
|
|
428
|
+
}, tn = () => {
|
|
429
|
+
let e = H;
|
|
430
|
+
if (H = null, e !== null && j.value) {
|
|
431
|
+
let t = e - j.value;
|
|
432
|
+
(t < 0 || t >= k.value) && (qt(S.value), M.value = S.value + j.value);
|
|
423
433
|
}
|
|
424
|
-
|
|
425
|
-
},
|
|
426
|
-
if (!
|
|
427
|
-
let e =
|
|
428
|
-
if (!
|
|
429
|
-
let t =
|
|
434
|
+
St && Jt(), St = !1;
|
|
435
|
+
}, nn = () => {
|
|
436
|
+
if (!E.value) return 0;
|
|
437
|
+
let e = E.value.scrollLeft;
|
|
438
|
+
if (!j.value && Math.abs(e) >= nt() - 1) return P.value[P.value.length - 1]?.start ?? A.value - 1;
|
|
439
|
+
let t = I(), n = -1;
|
|
430
440
|
return t.forEach((r, i) => {
|
|
431
|
-
|
|
441
|
+
Je(i) && (n < 0 || Math.abs(R(r) - e) < Math.abs(R(t[n]) - e)) && (n = i);
|
|
432
442
|
}), Math.max(0, n);
|
|
433
|
-
},
|
|
434
|
-
let t =
|
|
435
|
-
return t ? ((e -
|
|
436
|
-
},
|
|
437
|
-
if (clearTimeout(
|
|
438
|
-
if (
|
|
439
|
-
if (
|
|
440
|
-
let e =
|
|
441
|
-
|
|
443
|
+
}, q = (e) => {
|
|
444
|
+
let t = k.value;
|
|
445
|
+
return t ? ((e - j.value) % t + t) % t : 0;
|
|
446
|
+
}, J = () => {
|
|
447
|
+
if (clearTimeout(Y), rn = !1, !E.value || !A.value || cn || W()) return;
|
|
448
|
+
if (wt) {
|
|
449
|
+
if (X.value) return;
|
|
450
|
+
let e = nn(), t = Ze(q(e)), n = t !== m.value;
|
|
451
|
+
K(t), Zt(e, n);
|
|
442
452
|
return;
|
|
443
453
|
}
|
|
444
|
-
let e =
|
|
445
|
-
if (
|
|
446
|
-
let t =
|
|
454
|
+
let e = E.value.scrollLeft;
|
|
455
|
+
if (H !== null) {
|
|
456
|
+
let t = Qt(H), n = Math.sign(t) * Math.min(Math.abs(t), nt());
|
|
447
457
|
if (Math.abs(n - e) > 1) return;
|
|
448
|
-
|
|
458
|
+
tn();
|
|
449
459
|
return;
|
|
450
460
|
}
|
|
451
|
-
let t =
|
|
452
|
-
|
|
453
|
-
let r =
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
},
|
|
458
|
-
clearTimeout(
|
|
459
|
-
|
|
461
|
+
let t = nn(), n = q(t);
|
|
462
|
+
j.value && (t < j.value || t >= j.value + k.value) && qt(n);
|
|
463
|
+
let r = Ze(n);
|
|
464
|
+
Wt(n), r !== m.value && (K(r), Jt(r)), Hn();
|
|
465
|
+
}, Y, rn = !1, an = () => {
|
|
466
|
+
rn || J();
|
|
467
|
+
}, on = 0, sn = () => {
|
|
468
|
+
clearTimeout(Y), Y = setTimeout(J, 150), H !== null || on || (on = requestAnimationFrame(() => {
|
|
469
|
+
on = 0, H === null && A.value && (M.value = nn());
|
|
460
470
|
}));
|
|
461
471
|
};
|
|
462
|
-
|
|
463
|
-
if (
|
|
464
|
-
if (e ===
|
|
465
|
-
let t =
|
|
472
|
+
_e(m, (e) => {
|
|
473
|
+
if (Gt || !D.value) return;
|
|
474
|
+
if (e === Kt) return void (Kt = null);
|
|
475
|
+
let t = k.value;
|
|
466
476
|
if (!t) return;
|
|
467
477
|
let n = Number.isFinite(e) ? Math.min(Math.max(Math.round(e), 0), t - 1) : 0;
|
|
468
|
-
n !== e &&
|
|
469
|
-
}, { flush: "sync" }),
|
|
478
|
+
n !== e && K(n), en(n);
|
|
479
|
+
}, { flush: "sync" }), _e(S, () => {
|
|
470
480
|
let e = document.activeElement;
|
|
471
|
-
e &&
|
|
472
|
-
document.activeElement === e && (e.closest("[inert]") || !e.isConnected) &&
|
|
481
|
+
e && T.value?.contains(e) && (e.classList.contains("bb-carousel__dot") ? g(() => T.value?.querySelectorAll(".bb-carousel__dot")[ct.value]?.focus({ preventScroll: !0 })) : e.closest(".bb-carousel__slide") && g(() => {
|
|
482
|
+
document.activeElement === e && (e.closest("[inert]") || !e.isConnected) && E.value?.focus({ preventScroll: !0 });
|
|
473
483
|
}));
|
|
474
484
|
});
|
|
475
|
-
let
|
|
476
|
-
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}, fn = "mouse", pn = (e) => {
|
|
487
|
-
un(e) && fn === "mouse" && (e.button !== 0 || N() < 2 || e.target.closest?.("input, select, option, textarea, button, video, label, [contenteditable]") || (e.preventDefault(), T.value && (T.value.dataset.pointer = "", T.value.focus({ preventScroll: !0 }))));
|
|
488
|
-
}, mn = (e) => {
|
|
489
|
-
if (!un(e) || !e.isPrimary) return;
|
|
490
|
-
fn = e.pointerType, (J || Y !== null) && (X = !1, vn(void 0, !0)), cn = !1;
|
|
491
|
-
let t = z ?? x.value + k.value;
|
|
492
|
-
e.target.closest?.("input, select, option, textarea, video, [contenteditable]") || !T.value || N() < 2 || (e.pointerType !== "mouse" || e.button === 0) && (e.pointerType !== "mouse" && Rt(), q.value = !0, window.addEventListener("pointermove", hn), window.addEventListener("pointerup", gn), window.addEventListener("pointercancel", _n), e.pointerType !== "mouse" && !R() ? Y = e.pointerId : J = {
|
|
485
|
+
let cn = !1, ln = (e) => {
|
|
486
|
+
cn = e, T.value?.classList.toggle("bb-carousel--dragging", e);
|
|
487
|
+
}, X = v(!1), Z = null, un = null, dn = !1, fn = !1, pn = (e) => e.target?.closest?.(".bb-carousel__track") === E.value, mn = (e) => {
|
|
488
|
+
pn(e) && (Math.abs(e.deltaX) <= Math.abs(e.deltaY) && !e.shiftKey || (W() && (rn = !0, clearTimeout(Y), Y = setTimeout(J, 150)), Bt()));
|
|
489
|
+
}, hn = "mouse", gn = (e) => {
|
|
490
|
+
pn(e) && hn === "mouse" && (e.button !== 0 || F() < 2 || e.target.closest?.("input, select, option, textarea, button, video, label, [contenteditable]") || (e.preventDefault(), E.value && (E.value.dataset.pointer = "", E.value.focus({ preventScroll: !0 }))));
|
|
491
|
+
}, _n = (e) => {
|
|
492
|
+
if (!pn(e) || !e.isPrimary) return;
|
|
493
|
+
hn = e.pointerType, (Z || un !== null) && (dn = !1, xn(void 0, !0)), fn = !1;
|
|
494
|
+
let t = H ?? S.value + j.value;
|
|
495
|
+
e.target.closest?.("input, select, option, textarea, video, [contenteditable]") || !E.value || F() < 2 || (e.pointerType !== "mouse" || e.button === 0) && (e.pointerType !== "mouse" && Bt(), X.value = !0, window.addEventListener("pointermove", vn), window.addEventListener("pointerup", yn), window.addEventListener("pointercancel", bn), e.pointerType !== "mouse" && !V() ? un = e.pointerId : Z = {
|
|
493
496
|
pointerId: e.pointerId,
|
|
494
497
|
pointerType: e.pointerType,
|
|
495
498
|
x: e.clientX,
|
|
@@ -501,135 +504,141 @@ var ve = ["aria-label", "aria-roledescription"], ye = ["aria-label"], be = ["ari
|
|
|
501
504
|
start: 0,
|
|
502
505
|
t0: e.timeStamp
|
|
503
506
|
});
|
|
504
|
-
},
|
|
505
|
-
if (!
|
|
506
|
-
let t = e.clientX -
|
|
507
|
-
if (!
|
|
508
|
-
if (!
|
|
509
|
-
|
|
507
|
+
}, vn = (e) => {
|
|
508
|
+
if (!Z || !E.value || e.pointerId !== Z.pointerId) return;
|
|
509
|
+
let t = e.clientX - Z.x;
|
|
510
|
+
if (!Z.moved && Math.abs(t) < 5) return;
|
|
511
|
+
if (!Z.moved) {
|
|
512
|
+
Z.moved = !0, Z.x = e.clientX, Bt(), wt = !0, G(!0), Z.left = Z.start = E.value.scrollLeft, Z.samples = [{
|
|
510
513
|
t: e.timeStamp,
|
|
511
|
-
left:
|
|
512
|
-
}],
|
|
514
|
+
left: Z.left
|
|
515
|
+
}], ln(!0);
|
|
513
516
|
return;
|
|
514
517
|
}
|
|
515
518
|
let n = typeof e.getCoalescedEvents == "function" ? e.getCoalescedEvents() : [];
|
|
516
|
-
for (let t of n.length ? n : [e])
|
|
519
|
+
for (let t of n.length ? n : [e]) Z.samples.push({
|
|
517
520
|
t: t.timeStamp,
|
|
518
|
-
left:
|
|
521
|
+
left: Z.left - (t.clientX - Z.x)
|
|
519
522
|
});
|
|
520
|
-
let r =
|
|
521
|
-
|
|
522
|
-
let i =
|
|
523
|
-
i && (
|
|
523
|
+
let r = Z.samples[Z.samples.length - 1];
|
|
524
|
+
Z.samples = Z.samples.filter((e) => r.t - e.t <= 250), Z.v = c(Z.samples), E.value.scrollLeft = r.left;
|
|
525
|
+
let i = Ut();
|
|
526
|
+
i && (Z.left += i, Z.start += i, Z.from += Ht, Z.samples = Z.samples.map((e) => ({
|
|
524
527
|
t: e.t,
|
|
525
528
|
left: e.left + i
|
|
526
529
|
})));
|
|
527
|
-
},
|
|
528
|
-
if (e && e.pointerId !==
|
|
529
|
-
if (t && e && e.pointerId ===
|
|
530
|
-
window.removeEventListener("pointermove",
|
|
530
|
+
}, yn = (e) => xn(e, !1), bn = (e) => xn(e, !0), xn = (e, t) => {
|
|
531
|
+
if (e && e.pointerId !== Z?.pointerId && e.pointerId !== un) return;
|
|
532
|
+
if (t && e && e.pointerId === un && e.pointerType === "touch") {
|
|
533
|
+
window.removeEventListener("pointermove", vn), window.removeEventListener("pointerup", yn), window.removeEventListener("pointercancel", bn), un = null, dn = !0;
|
|
531
534
|
return;
|
|
532
535
|
}
|
|
533
|
-
window.removeEventListener("pointermove",
|
|
534
|
-
let n =
|
|
535
|
-
if (
|
|
536
|
+
window.removeEventListener("pointermove", vn), window.removeEventListener("pointerup", yn), window.removeEventListener("pointercancel", bn), X.value = !1;
|
|
537
|
+
let n = Z;
|
|
538
|
+
if (Z = null, un = null, !E.value) return;
|
|
536
539
|
if (!n?.moved) {
|
|
537
|
-
e && e.pointerType !== "mouse" && (
|
|
540
|
+
e && e.pointerType !== "mouse" && (Hn(), clearTimeout(Y), Y = setTimeout(J, 150));
|
|
538
541
|
return;
|
|
539
542
|
}
|
|
540
543
|
let r = n.samples[n.samples.length - 1];
|
|
541
544
|
e && !t && (n.samples.push({
|
|
542
545
|
t: e.timeStamp,
|
|
543
546
|
left: n.left - (e.clientX - n.x)
|
|
544
|
-
}), n.v =
|
|
545
|
-
let i =
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
}), n.v = c(n.samples)), (t || e && r && e.timeStamp - r.t > 80) && (n.v = 0), fn = !t, ln(!1);
|
|
548
|
+
let i = E.value.scrollLeft, a = i - n.start, o = tt() ? -1 : 1, s = Math.sign(a) * o, te = ee({
|
|
549
|
+
moved: a,
|
|
550
|
+
durationMs: (e?.timeStamp ?? n.t0) - n.t0,
|
|
551
|
+
velocity: n.v,
|
|
552
|
+
cancelled: t
|
|
553
|
+
}), l = te.speed, ne = te.quick, u = nn();
|
|
554
|
+
if (ne && s) {
|
|
555
|
+
let e = (i - R(I()[u])) * o;
|
|
556
|
+
u = Qe((s > 0 ? e < 0 : e > 0) ? Qe(u, -s) : u, s);
|
|
549
557
|
}
|
|
550
|
-
Math.sign(
|
|
551
|
-
},
|
|
552
|
-
if (
|
|
553
|
-
|
|
558
|
+
Math.sign(l) !== Math.sign(Qt(u) - i) && (l = 0), K(Ze(q(u))), Zt(u, !0, l);
|
|
559
|
+
}, Sn = (e) => {
|
|
560
|
+
if (e.target.closest?.(".bb-carousel") !== T.value) return;
|
|
561
|
+
if (fn) {
|
|
562
|
+
fn = !1, e.preventDefault(), e.stopPropagation();
|
|
554
563
|
return;
|
|
555
564
|
}
|
|
556
|
-
if (
|
|
565
|
+
if (W() || !T.value || !E.value) return;
|
|
557
566
|
let t = (e) => {
|
|
558
|
-
if (
|
|
559
|
-
|
|
567
|
+
if (b.picker || N.value) return Xt(q(e), !0);
|
|
568
|
+
q(e) !== m.value && (K(q(e)), Jt(q(e)));
|
|
560
569
|
};
|
|
561
|
-
if (e.target !==
|
|
570
|
+
if (e.target !== E.value) {
|
|
562
571
|
let n = e.target.closest?.(".bb-carousel__slide");
|
|
563
|
-
for (; n && n.parentElement !==
|
|
564
|
-
let r = n ?
|
|
572
|
+
for (; n && n.parentElement !== E.value;) n = n.parentElement?.closest(".bb-carousel__slide") ?? null;
|
|
573
|
+
let r = n ? I().indexOf(n) : -1;
|
|
565
574
|
r >= 0 && !n.hasAttribute("inert") && t(r);
|
|
566
575
|
return;
|
|
567
576
|
}
|
|
568
|
-
let n =
|
|
577
|
+
let n = I(), r = n.findIndex((t) => {
|
|
569
578
|
let n = t.getBoundingClientRect();
|
|
570
579
|
return e.clientX >= n.left && e.clientX <= n.right;
|
|
571
580
|
});
|
|
572
581
|
if (r < 0 || !n[r].hasAttribute("inert")) return;
|
|
573
|
-
let i =
|
|
582
|
+
let i = T.value.getBoundingClientRect(), a = n[r].getBoundingClientRect();
|
|
574
583
|
if (a.left >= i.left - 1 && a.right <= i.right + 1) return t(r);
|
|
575
|
-
if (getComputedStyle(
|
|
576
|
-
if (
|
|
584
|
+
if (getComputedStyle(T.value).getPropertyValue("--peek-click").trim() === "off") return;
|
|
585
|
+
if (b.picker) return Xt(q(r), !0);
|
|
577
586
|
let o = r;
|
|
578
|
-
for (; o > 0 && !
|
|
579
|
-
|
|
580
|
-
},
|
|
581
|
-
|
|
582
|
-
},
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
if (delete
|
|
587
|
+
for (; o > 0 && !Je(o);) o--;
|
|
588
|
+
j.value || (o = qe(r)), K(q(r)), Zt(o, !0);
|
|
589
|
+
}, Cn = (e) => {
|
|
590
|
+
pn(e) && (Z || un !== null || dn || e.touches.length && (dn = !0, X.value = !0, Bt()));
|
|
591
|
+
}, wn = (e) => {
|
|
592
|
+
dn && !e.touches.length && (dn = !1, X.value = !1, Hn(), clearTimeout(Y), Y = setTimeout(J, 150));
|
|
593
|
+
}, Tn = (e) => e instanceof HTMLElement && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), En = (e) => {
|
|
594
|
+
if (delete E.value?.dataset.pointer, Tn(e.target) || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
586
595
|
let t = e.target, n = !!t.closest?.(".bb-carousel__slide");
|
|
587
|
-
if (n && (e.defaultPrevented || t.closest(".bb-carousel") !==
|
|
588
|
-
let r =
|
|
589
|
-
if (e.key === r)
|
|
590
|
-
else if (e.key === i)
|
|
591
|
-
else if (e.key === "Home")
|
|
592
|
-
else if (e.key === "End")
|
|
596
|
+
if (n && (e.defaultPrevented || t.closest(".bb-carousel") !== T.value || t.closest("audio, video, [role=\"slider\"], [role=\"spinbutton\"], [role=\"tablist\"], [role=\"tab\"], [role=\"menu\"], [role=\"menubar\"], [role=\"menuitem\"], [role=\"listbox\"], [role=\"option\"], [role=\"radiogroup\"], [role=\"radio\"], [role=\"grid\"], [role=\"tree\"], [role=\"combobox\"], [role=\"toolbar\"]"))) return;
|
|
597
|
+
let r = tt() ? "ArrowLeft" : "ArrowRight", i = tt() ? "ArrowRight" : "ArrowLeft", a = b.picker ? k.value - 1 : F() - 1;
|
|
598
|
+
if (e.key === r) $t(1);
|
|
599
|
+
else if (e.key === i) $t(-1);
|
|
600
|
+
else if (e.key === "Home") b.picker ? Xt(0, !0) : Yt(0, !0);
|
|
601
|
+
else if (e.key === "End") b.picker ? Xt(a, !0) : Yt(a, !0);
|
|
593
602
|
else return;
|
|
594
|
-
e.preventDefault(), n &&
|
|
595
|
-
},
|
|
596
|
-
|
|
603
|
+
e.preventDefault(), n && g(() => L(m.value)?.querySelector("a[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])")?.focus({ preventScroll: !0 }));
|
|
604
|
+
}, Dn = d(() => b.autoplay === !0 ? 5e3 : Number(b.autoplay) || 0), On = v(!1), kn = v(!1), Q = v(!1), An = v(!1), jn = v(!1), Mn = v(!1), Nn = v(!1), Pn = (e) => {
|
|
605
|
+
kn.value = !0;
|
|
597
606
|
let t = e.target;
|
|
598
|
-
|
|
599
|
-
},
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
clearInterval(
|
|
607
|
-
if (
|
|
608
|
-
else if (
|
|
607
|
+
Dn.value > 0 && !An.value && !t.classList.contains("bb-carousel__pause") && t.matches?.(":focus-visible") && (Q.value = !0);
|
|
608
|
+
}, Fn = (e) => {
|
|
609
|
+
T.value?.contains(e.relatedTarget) || (kn.value = !1, On.value || (An.value = !1));
|
|
610
|
+
}, In = () => {
|
|
611
|
+
On.value = !1, kn.value || (An.value = !1);
|
|
612
|
+
}, Ln = () => {
|
|
613
|
+
Q.value = !Q.value, An.value = !Q.value;
|
|
614
|
+
}, Rn = () => D.value && Dn.value > 0 && !Mn.value && F() > 1, zn = d(() => Rn() && !Q.value && !jn.value && !Nn.value && !X.value && (An.value || !On.value && !kn.value)), Bn, Vn = () => {
|
|
615
|
+
clearInterval(Bn), zn.value && (Bn = setInterval(() => {
|
|
616
|
+
if (b.picker) Xt(m.value >= k.value - 1 ? 0 : m.value + 1);
|
|
617
|
+
else if (V()) $t(1, !1);
|
|
609
618
|
else {
|
|
610
|
-
let e =
|
|
611
|
-
|
|
619
|
+
let e = Xe();
|
|
620
|
+
Yt(e >= F() - 1 ? 0 : e + 1);
|
|
612
621
|
}
|
|
613
|
-
},
|
|
614
|
-
},
|
|
615
|
-
|
|
622
|
+
}, Dn.value));
|
|
623
|
+
}, Hn = () => {
|
|
624
|
+
zn.value && Vn();
|
|
616
625
|
};
|
|
617
|
-
|
|
618
|
-
let
|
|
626
|
+
_e([zn, Dn], Vn, { flush: "post" });
|
|
627
|
+
let Un = v(!1), Wn = v(!1), Gn = d(() => D.value && (Re.value > 0 || ze.value > 0)), Kn = d(() => {
|
|
619
628
|
let e = {};
|
|
620
|
-
return
|
|
629
|
+
return b.perView !== void 0 && (e["--per-view"] = String(b.perView)), b.bleed !== void 0 && (e["--bleed"] = b.bleed ? "auto" : "0px"), b.align !== void 0 && (e["--align"] = b.align), e;
|
|
621
630
|
});
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
], () => void
|
|
627
|
-
let
|
|
628
|
-
"--_cp":
|
|
629
|
-
"--_bleed-start":
|
|
630
|
-
"--_bleed-end":
|
|
631
|
-
} : void 0),
|
|
632
|
-
let e =
|
|
631
|
+
_e(() => [
|
|
632
|
+
b.perView,
|
|
633
|
+
b.bleed,
|
|
634
|
+
b.align
|
|
635
|
+
], () => void g(z));
|
|
636
|
+
let qn = d(() => D.value ? {
|
|
637
|
+
"--_cp": N.value ? `${Ve.value}px` : void 0,
|
|
638
|
+
"--_bleed-start": Un.value ? `${Re.value}px` : void 0,
|
|
639
|
+
"--_bleed-end": Wn.value ? `${ze.value}px` : void 0
|
|
640
|
+
} : void 0), Jn = () => {
|
|
641
|
+
let e = T.value?.parentElement ?? null;
|
|
633
642
|
for (; e && e !== document.body && e !== document.documentElement;) {
|
|
634
643
|
if (getComputedStyle(e).overflowX !== "visible") {
|
|
635
644
|
let t = e.getBoundingClientRect();
|
|
@@ -644,175 +653,191 @@ var ve = ["aria-label", "aria-roledescription"], ye = ["aria-label"], be = ["ari
|
|
|
644
653
|
left: 0,
|
|
645
654
|
right: document.documentElement.clientWidth
|
|
646
655
|
};
|
|
647
|
-
},
|
|
648
|
-
if (!
|
|
649
|
-
let e = getComputedStyle(
|
|
650
|
-
|
|
656
|
+
}, Yn = () => {
|
|
657
|
+
if (!T.value || !E.value) return;
|
|
658
|
+
let e = getComputedStyle(T.value);
|
|
659
|
+
Un.value = e.getPropertyValue("--bleed-start").trim() === "auto", Wn.value = e.getPropertyValue("--bleed-end").trim() === "auto";
|
|
651
660
|
let t = 0, n = 0;
|
|
652
|
-
if (
|
|
653
|
-
let e =
|
|
661
|
+
if (Un.value || Wn.value) {
|
|
662
|
+
let e = T.value.getBoundingClientRect();
|
|
654
663
|
if (!e.width) return;
|
|
655
|
-
let r =
|
|
656
|
-
t =
|
|
664
|
+
let r = Jn(), i = Math.max(0, Math.floor(e.left - r.left)), a = Math.max(0, Math.floor(r.right - e.right));
|
|
665
|
+
t = tt() ? a : i, n = tt() ? i : a;
|
|
657
666
|
}
|
|
658
|
-
let r = getComputedStyle(
|
|
659
|
-
|
|
660
|
-
}, $,
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
}), $ = new ResizeObserver(() =>
|
|
665
|
-
|
|
666
|
-
}),
|
|
667
|
+
let r = getComputedStyle(E.value);
|
|
668
|
+
Un.value || (t = parseFloat(r.paddingInlineStart) || 0), Wn.value || (n = parseFloat(r.paddingInlineEnd) || 0), Re.value = t, ze.value = n;
|
|
669
|
+
}, $, Xn, Zn, Qn = () => Mn.value = !!Zn?.matches, $n = () => jn.value = document.hidden, er = () => z();
|
|
670
|
+
ce(() => {
|
|
671
|
+
D.value = !0, M.value = S.value + j.value, ot(), g(() => {
|
|
672
|
+
ot(), it = "", z();
|
|
673
|
+
}), $ = new ResizeObserver(() => z()), E.value && $.observe(E.value), L(0) && $.observe(L(0)), $.observe(T.value), $.observe(document.documentElement), window.addEventListener("resize", er), Xn = new IntersectionObserver(([e]) => {
|
|
674
|
+
Nn.value = !e.isIntersecting, e.isIntersecting && z();
|
|
675
|
+
}), Xn.observe(T.value), Zn = window.matchMedia?.("(prefers-reduced-motion: reduce)"), Qn(), Zn?.addEventListener("change", Qn), document.addEventListener("visibilitychange", $n);
|
|
667
676
|
});
|
|
668
|
-
let
|
|
669
|
-
return
|
|
670
|
-
|
|
671
|
-
let e =
|
|
672
|
-
e !==
|
|
673
|
-
}),
|
|
674
|
-
|
|
675
|
-
}),
|
|
676
|
-
clearInterval(
|
|
677
|
-
}), (a, o) => (
|
|
677
|
+
let tr = -1;
|
|
678
|
+
return le(() => {
|
|
679
|
+
Nt();
|
|
680
|
+
let e = I().length;
|
|
681
|
+
e !== tr && (tr = e, z(), L(0) && $?.observe(L(0)));
|
|
682
|
+
}), _e(() => [b.loop, b.picker], () => {
|
|
683
|
+
it = "", g(z);
|
|
684
|
+
}), se(() => {
|
|
685
|
+
clearInterval(Bn), clearTimeout(Y), cancelAnimationFrame(on), Rt(), $?.disconnect(), Xn?.disconnect(), Zn?.removeEventListener("change", Qn), document.removeEventListener("visibilitychange", $n), window.removeEventListener("resize", er), yn();
|
|
686
|
+
}), (a, o) => (_(), f("section", h({
|
|
678
687
|
ref_key: "root",
|
|
679
|
-
ref:
|
|
680
|
-
"aria-label":
|
|
681
|
-
"aria-roledescription":
|
|
688
|
+
ref: T,
|
|
689
|
+
"aria-label": oe.label || y(C)("carousel.label").value,
|
|
690
|
+
"aria-roledescription": y(C)("carousel.role").value,
|
|
682
691
|
class: ["bb-carousel", {
|
|
683
|
-
"bb-carousel--autoplay":
|
|
684
|
-
"bb-carousel--bleed":
|
|
685
|
-
"bb-carousel--draggable":
|
|
686
|
-
"bb-carousel--dots-below":
|
|
687
|
-
"bb-carousel--framed": !!(
|
|
688
|
-
"bb-carousel--centred":
|
|
689
|
-
"bb-carousel--
|
|
690
|
-
"bb-carousel--
|
|
692
|
+
"bb-carousel--autoplay": Rn(),
|
|
693
|
+
"bb-carousel--bleed": Gn.value,
|
|
694
|
+
"bb-carousel--draggable": D.value && F() > 1,
|
|
695
|
+
"bb-carousel--dots-below": D.value && F() > 1 && !vt(),
|
|
696
|
+
"bb-carousel--framed": !!(x["slide:header"] || x["slide:footer"]),
|
|
697
|
+
"bb-carousel--centred": N.value,
|
|
698
|
+
"bb-carousel--picker": b.picker,
|
|
699
|
+
"bb-carousel--py": He.value,
|
|
700
|
+
"bb-carousel--loop": V()
|
|
691
701
|
}],
|
|
692
|
-
style: [
|
|
693
|
-
},
|
|
694
|
-
onFocusin:
|
|
695
|
-
onFocusout:
|
|
696
|
-
onKeydown:
|
|
697
|
-
onMouseenter: o[3] ||= (e) =>
|
|
698
|
-
onMouseleave:
|
|
702
|
+
style: [Kn.value, qn.value]
|
|
703
|
+
}, y(w).rootAttrs, {
|
|
704
|
+
onFocusin: Pn,
|
|
705
|
+
onFocusout: Fn,
|
|
706
|
+
onKeydown: En,
|
|
707
|
+
onMouseenter: o[3] ||= (e) => On.value = !0,
|
|
708
|
+
onMouseleave: In
|
|
699
709
|
}), [
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
class: ["bb-carousel__dots", { "bb-carousel__dots--window":
|
|
703
|
-
style:
|
|
704
|
-
},
|
|
710
|
+
D.value && F() > 1 ? (_(), f(l, { key: 0 }, [
|
|
711
|
+
p("div", h({
|
|
712
|
+
class: ["bb-carousel__dots", { "bb-carousel__dots--window": ft() }],
|
|
713
|
+
style: ft() ? { "--start": pt() } : void 0
|
|
714
|
+
}, y(w).dots), [Rn() ? (_(), f("button", h({
|
|
705
715
|
key: 0,
|
|
706
|
-
"aria-label":
|
|
716
|
+
"aria-label": Q.value ? y(C)("carousel.play").value : y(C)("carousel.pause").value,
|
|
707
717
|
class: "bb-carousel__pause",
|
|
708
718
|
type: "button"
|
|
709
|
-
},
|
|
710
|
-
icon:
|
|
719
|
+
}, y(w).pause, { onClick: Ln }), [ae(e, {
|
|
720
|
+
icon: Q.value ? y(i) : y(r),
|
|
711
721
|
size: "10px"
|
|
712
|
-
}, null, 8, ["icon"])], 16,
|
|
713
|
-
"aria-label":
|
|
722
|
+
}, null, 8, ["icon"])], 16, be)) : ie("", !0), p("div", {
|
|
723
|
+
"aria-label": y(C)("carousel.slides").value,
|
|
714
724
|
class: "bb-carousel__dot-list",
|
|
715
725
|
role: "group"
|
|
716
|
-
}, [(
|
|
726
|
+
}, [(_(!0), f(l, null, ue(F(), (e) => (_(), f("button", h({
|
|
717
727
|
key: e,
|
|
718
|
-
"aria-current": e - 1 ===
|
|
719
|
-
"aria-label":
|
|
720
|
-
class: ["bb-carousel__dot", [{ "bb-carousel__dot--active": e - 1 ===
|
|
721
|
-
inert: !
|
|
722
|
-
tabindex: e - 1 ===
|
|
728
|
+
"aria-current": e - 1 === ct.value || void 0,
|
|
729
|
+
"aria-label": y(C)("carousel.goTo", P.value[e - 1].first + 1).value,
|
|
730
|
+
class: ["bb-carousel__dot", [{ "bb-carousel__dot--active": e - 1 === ct.value }, ht(e - 1)]],
|
|
731
|
+
inert: !mt(e - 1) || void 0,
|
|
732
|
+
tabindex: e - 1 === ct.value ? 0 : -1,
|
|
723
733
|
type: "button"
|
|
724
|
-
}, { ref_for: !0 },
|
|
725
|
-
|
|
726
|
-
"aria-disabled": !
|
|
727
|
-
"aria-label":
|
|
734
|
+
}, { ref_for: !0 }, y(w).part("dot", { active: e - 1 === ct.value || void 0 }), { onClick: (t) => Yt(e - 1, !0) }), null, 16, Se))), 128))], 8, xe)], 16),
|
|
735
|
+
p("button", h({
|
|
736
|
+
"aria-disabled": !yt() || void 0,
|
|
737
|
+
"aria-label": y(C)("carousel.previous").value,
|
|
728
738
|
class: "bb-carousel__arrow bb-carousel__prev",
|
|
729
739
|
type: "button"
|
|
730
|
-
},
|
|
731
|
-
icon:
|
|
740
|
+
}, y(w).part("prev", { disabled: !yt() || void 0 }), { onClick: o[0] ||= (e) => $t(-1) }), [ae(e, {
|
|
741
|
+
icon: y(t),
|
|
732
742
|
size: "50%"
|
|
733
|
-
}, null, 8, ["icon"])], 16,
|
|
734
|
-
|
|
735
|
-
"aria-disabled": !
|
|
736
|
-
"aria-label":
|
|
743
|
+
}, null, 8, ["icon"])], 16, Ce),
|
|
744
|
+
p("button", h({
|
|
745
|
+
"aria-disabled": !bt() || void 0,
|
|
746
|
+
"aria-label": y(C)("carousel.next").value,
|
|
737
747
|
class: "bb-carousel__arrow bb-carousel__next",
|
|
738
748
|
type: "button"
|
|
739
|
-
},
|
|
740
|
-
icon:
|
|
749
|
+
}, y(w).part("next", { disabled: !bt() || void 0 }), { onClick: o[1] ||= (e) => $t(1) }), [ae(e, {
|
|
750
|
+
icon: y(n),
|
|
741
751
|
size: "50%"
|
|
742
|
-
}, null, 8, ["icon"])], 16,
|
|
743
|
-
], 64)) :
|
|
744
|
-
|
|
752
|
+
}, null, 8, ["icon"])], 16, we)
|
|
753
|
+
], 64)) : ie("", !0),
|
|
754
|
+
p("div", {
|
|
745
755
|
ref_key: "track",
|
|
746
|
-
ref:
|
|
756
|
+
ref: E,
|
|
747
757
|
class: "bb-carousel__track",
|
|
748
758
|
tabindex: "-1",
|
|
749
|
-
onClickCapture:
|
|
750
|
-
onDragstart: o[2] ||=
|
|
751
|
-
onMousedown:
|
|
752
|
-
onPointerdown:
|
|
753
|
-
onScrollPassive:
|
|
754
|
-
onScrollend:
|
|
755
|
-
onTouchcancelPassive:
|
|
756
|
-
onTouchendPassive:
|
|
757
|
-
onTouchstartPassive:
|
|
758
|
-
onWheelPassive:
|
|
759
|
-
}, [(
|
|
759
|
+
onClickCapture: Sn,
|
|
760
|
+
onDragstart: o[2] ||= ve(() => {}, ["prevent"]),
|
|
761
|
+
onMousedown: gn,
|
|
762
|
+
onPointerdown: _n,
|
|
763
|
+
onScrollPassive: sn,
|
|
764
|
+
onScrollend: an,
|
|
765
|
+
onTouchcancelPassive: wn,
|
|
766
|
+
onTouchendPassive: wn,
|
|
767
|
+
onTouchstartPassive: Cn,
|
|
768
|
+
onWheelPassive: mn
|
|
769
|
+
}, [(_(!0), f(l, null, ue([Pe()], (e, t) => (_(), f(l, { key: t }, [(_(!0), f(l, null, ue(Fe(e), (t, n) => (_(), f("div", h({
|
|
760
770
|
key: t.key,
|
|
761
771
|
"aria-hidden": t.clone || void 0,
|
|
762
|
-
"aria-label": t.clone ? void 0 :
|
|
763
|
-
"aria-roledescription": t.clone ? void 0 :
|
|
772
|
+
"aria-label": t.clone ? void 0 : y(C)("carousel.slideOf", t.real + 1, e.length).value,
|
|
773
|
+
"aria-roledescription": t.clone ? void 0 : y(C)("carousel.slideRole").value,
|
|
764
774
|
class: ["bb-carousel__slide", {
|
|
765
|
-
"bb-carousel__slide--active":
|
|
766
|
-
"bb-carousel__slide--current":
|
|
775
|
+
"bb-carousel__slide--active": ut(t.real),
|
|
776
|
+
"bb-carousel__slide--current": B(t.real),
|
|
767
777
|
"bb-carousel__slide--clone": t.clone,
|
|
768
|
-
"bb-carousel__slide--page": !
|
|
778
|
+
"bb-carousel__slide--page": !D.value || Je(n)
|
|
769
779
|
}],
|
|
770
|
-
inert:
|
|
780
|
+
inert: dt(t.real, t.clone) || void 0,
|
|
771
781
|
role: t.clone ? void 0 : "group"
|
|
772
|
-
}, { ref_for: !0 },
|
|
773
|
-
active:
|
|
774
|
-
current:
|
|
782
|
+
}, { ref_for: !0 }, y(w).part("slide", {
|
|
783
|
+
active: ut(t.real) || void 0,
|
|
784
|
+
current: B(t.real) || void 0
|
|
775
785
|
})), [
|
|
776
|
-
|
|
777
|
-
active:
|
|
778
|
-
current:
|
|
786
|
+
x["slide:header"] ? de(a.$slots, "slide:header", {
|
|
787
|
+
active: ut(t.real),
|
|
788
|
+
current: B(t.real),
|
|
779
789
|
index: t.real,
|
|
780
790
|
item: t.item
|
|
781
|
-
}, void 0, void 0, 0) :
|
|
782
|
-
t.node ? (
|
|
783
|
-
active:
|
|
784
|
-
current:
|
|
791
|
+
}, void 0, void 0, 0) : ie("", !0),
|
|
792
|
+
t.node ? (_(), re(fe(t.node), { key: 1 })) : x.slide ? de(a.$slots, "slide", {
|
|
793
|
+
active: ut(t.real),
|
|
794
|
+
current: B(t.real),
|
|
785
795
|
index: t.real,
|
|
786
796
|
item: t.item
|
|
787
|
-
}, void 0, void 0, 2) :
|
|
797
|
+
}, void 0, void 0, 2) : b.picker && O(t.item) ? (_(), f("button", h({
|
|
788
798
|
key: 3,
|
|
789
|
-
|
|
799
|
+
"aria-current": B(t.real) || void 0,
|
|
800
|
+
"aria-label": Ie(t.item, t.real),
|
|
801
|
+
class: "bb-carousel__thumb",
|
|
802
|
+
type: "button"
|
|
803
|
+
}, { ref_for: !0 }, y(w).thumb), [p("img", h({
|
|
804
|
+
alt: "",
|
|
805
|
+
class: "bb-carousel__image",
|
|
806
|
+
decoding: "async",
|
|
807
|
+
draggable: "false",
|
|
808
|
+
loading: _t(t.real) ? void 0 : "lazy",
|
|
809
|
+
sizes: O(t.item).sizes,
|
|
810
|
+
src: O(t.item).src,
|
|
811
|
+
srcset: O(t.item).srcset
|
|
812
|
+
}, { ref_for: !0 }, y(w).image), null, 16, De)], 16, Ee)) : O(t.item) ? (_(), f("img", h({
|
|
813
|
+
key: 4,
|
|
814
|
+
alt: O(t.item).alt,
|
|
790
815
|
class: "bb-carousel__image",
|
|
791
816
|
decoding: "async",
|
|
792
817
|
draggable: "false",
|
|
793
|
-
loading:
|
|
794
|
-
sizes:
|
|
795
|
-
src:
|
|
796
|
-
srcset:
|
|
797
|
-
}, { ref_for: !0 },
|
|
798
|
-
|
|
799
|
-
active:
|
|
800
|
-
current:
|
|
818
|
+
loading: _t(t.real) ? void 0 : "lazy",
|
|
819
|
+
sizes: O(t.item).sizes,
|
|
820
|
+
src: O(t.item).src,
|
|
821
|
+
srcset: O(t.item).srcset
|
|
822
|
+
}, { ref_for: !0 }, y(w).image), null, 16, Oe)) : ie("", !0),
|
|
823
|
+
x["slide:footer"] ? de(a.$slots, "slide:footer", {
|
|
824
|
+
active: ut(t.real),
|
|
825
|
+
current: B(t.real),
|
|
801
826
|
index: t.real,
|
|
802
827
|
item: t.item
|
|
803
|
-
}, void 0, void 0,
|
|
804
|
-
|
|
805
|
-
key:
|
|
828
|
+
}, void 0, void 0, 5) : ie("", !0),
|
|
829
|
+
x.overlay ? (_(), f("div", h({
|
|
830
|
+
key: 6,
|
|
806
831
|
class: "bb-carousel__overlay"
|
|
807
|
-
}, { ref_for: !0 },
|
|
808
|
-
active:
|
|
809
|
-
current:
|
|
832
|
+
}, { ref_for: !0 }, y(w).overlay), [de(a.$slots, "overlay", {
|
|
833
|
+
active: ut(t.real),
|
|
834
|
+
current: B(t.real),
|
|
810
835
|
index: t.real,
|
|
811
836
|
item: t.item
|
|
812
|
-
})], 16)) :
|
|
813
|
-
], 16,
|
|
814
|
-
|
|
815
|
-
], 16,
|
|
837
|
+
})], 16)) : ie("", !0)
|
|
838
|
+
], 16, Te))), 128))], 64))), 128))], 544),
|
|
839
|
+
p("span", ke, pe(Ct.value), 1)
|
|
840
|
+
], 16, ye));
|
|
816
841
|
}
|
|
817
842
|
});
|
|
818
|
-
export {
|
|
843
|
+
export { b as default };
|