bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -10,7 +10,13 @@ var w = /*@__PURE__*/ g({
|
|
|
10
10
|
name: "BbHost",
|
|
11
11
|
__name: "BbHost",
|
|
12
12
|
setup(g) {
|
|
13
|
-
let w = _()
|
|
13
|
+
let w = _();
|
|
14
|
+
n(w) && (w.ids = [
|
|
15
|
+
`h${w.uid}-`,
|
|
16
|
+
0,
|
|
17
|
+
0
|
|
18
|
+
]);
|
|
19
|
+
let T = t(w.appContext), E = S(!1), D = d(() => E.value && T.owner.value === w), O = T.openings, k;
|
|
14
20
|
return y(() => {
|
|
15
21
|
let t = r(T, w);
|
|
16
22
|
k = t.unregister, E.value = !0, t.owns && o(T), process.env.NODE_ENV !== "production" && !t.owns && !n(w) && e().warn("A second <BbHost /> is mounted; it renders nothing while the first one is mounted. The plugin already renders one: place a <BbHost /> only where an area needs its own (inside its <BbConfigScope>), one at a time.");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var e = /* @__PURE__ */ new Map(), t = {
|
|
3
3
|
content: null,
|
|
4
4
|
attributes: {}
|
|
5
|
-
}, n = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.3 9.4a2.8 2.8 0 0 1 5.4.9c0 1.9-2.7 2.3-2.7 4\"/><path d=\"M12 17.6h.01\"/></svg>", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (e) => e.startsWith("local:") ? `[bitboss-ui] icon "${e}" does not exist — there is no "${e.slice(6)}.svg" in the plugin's
|
|
5
|
+
}, n = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.3 9.4a2.8 2.8 0 0 1 5.4.9c0 1.9-2.7 2.3-2.7 4\"/><path d=\"M12 17.6h.01\"/></svg>", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (e) => e.startsWith("local:") ? `[bitboss-ui] icon "${e}" does not exist — there is no "${e.slice(6)}.svg" in the plugin's icons.dir.` : `[bitboss-ui] icon "${e}" does not exist in the icon registry.`, o = (t, n) => {
|
|
6
6
|
let o = e.get(t);
|
|
7
7
|
if (o) return Promise.resolve(o);
|
|
8
8
|
if (r.has(t)) return Promise.resolve(c);
|
|
@@ -42,8 +42,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
42
42
|
compact: boolean;
|
|
43
43
|
autocomplete: string;
|
|
44
44
|
disableFormatting: boolean;
|
|
45
|
-
max: number;
|
|
46
45
|
min: number;
|
|
46
|
+
max: number;
|
|
47
47
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
48
48
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
49
|
declare const _default: typeof __VLS_export;
|
|
@@ -522,16 +522,20 @@ var Re = [
|
|
|
522
522
|
return ne(n, t ? C.min : -Infinity, C.max);
|
|
523
523
|
}, jt = () => {
|
|
524
524
|
if (D.value) return;
|
|
525
|
+
let e = (e) => e < C.min ? C.min : e > C.max ? C.max : e;
|
|
525
526
|
if (!F.value) {
|
|
526
527
|
Z();
|
|
527
|
-
let
|
|
528
|
-
if (typeof
|
|
529
|
-
|
|
528
|
+
let t = xe(z.raw);
|
|
529
|
+
if (typeof t != "number" || e(t) === t) return;
|
|
530
|
+
let n = e(t);
|
|
531
|
+
K(ge(n, P.value)), G.value = n, J(q() ? z.raw.length : void 0), w("update:modelValue", n);
|
|
530
532
|
return;
|
|
531
533
|
}
|
|
532
534
|
if (!M.value?.value) return;
|
|
533
|
-
let
|
|
534
|
-
!Number.isFinite(
|
|
535
|
+
let t = Number(Ut(M.value.value));
|
|
536
|
+
if (!Number.isFinite(t) || e(t) === t) return;
|
|
537
|
+
let n = e(t);
|
|
538
|
+
M.value.value = n.toString(), w("update:modelValue", n);
|
|
535
539
|
}, Mt = (e) => {
|
|
536
540
|
let t = Number(C.modelValue || 0);
|
|
537
541
|
return At(t + e);
|
|
@@ -206,17 +206,17 @@ var ft = [
|
|
|
206
206
|
}, en = () => {
|
|
207
207
|
g.focusTarget && be(x.value, g.focusTarget)?.focus();
|
|
208
208
|
}, tn = (e) => {
|
|
209
|
-
if (e.key === "Escape" && !
|
|
209
|
+
if (e.key === "Escape" && !Pn.value && r(Yt) && (e.stopImmediatePropagation(), b.value)) return e.preventDefault(), D(200), !1;
|
|
210
210
|
}, nn = d(), O = null, rn = null, an = null, on = async (e) => {
|
|
211
211
|
if (e) {
|
|
212
|
-
j.value = hn(), xt("show"), T.value++, nn.value = ye(), Qt(), await tt(), E.value = !0, x.value && !x.value.open && (an = document.activeElement, x.value.showModal()), rn = null, _e(M),
|
|
212
|
+
j.value = hn(), xt("show"), T.value++, nn.value = ye(), Qt(), await tt(), E.value = !0, x.value && !x.value.open && (an = document.activeElement, x.value.showModal()), rn = null, _e(M), Mn(), En(M, !1), x.value && (O = Ne(x.value)), en();
|
|
213
213
|
let e = T.value;
|
|
214
214
|
await me(g.transitionDuration), await ve(x.value), e === T.value && c.value && xt("shown");
|
|
215
215
|
} else {
|
|
216
|
-
xt("hide", _.closingResult()), rn = performance.now(),
|
|
216
|
+
xt("hide", _.closingResult()), rn = performance.now(), En(M, !0), Nn();
|
|
217
217
|
let e = T.value;
|
|
218
218
|
if (await me(g.transitionDuration), e !== T.value) return;
|
|
219
|
-
$t(), x.value?.close(), ge(M), O?.(), O = null, E.value = !1,
|
|
219
|
+
$t(), x.value?.close(), ge(M), O?.(), O = null, E.value = !1, En(M, !1), B = !1, z.value = !1, Xn(), _.afterHidden(), xt("hidden");
|
|
220
220
|
}
|
|
221
221
|
}, sn = () => {
|
|
222
222
|
process.env.NODE_ENV !== "production" && St.header && !g.title && Et["aria-labelledby"] == null && tt(() => {
|
|
@@ -231,7 +231,7 @@ var ft = [
|
|
|
231
231
|
immediate: !0,
|
|
232
232
|
flush: "post"
|
|
233
233
|
}), nt(() => {
|
|
234
|
-
clearTimeout(qt), $t(),
|
|
234
|
+
clearTimeout(qt), $t(), L.value?.removeEventListener("scroll", Wn), V?.disconnect(), V = null, Nn(), En(M, !1), he(x.value, {
|
|
235
235
|
id: M,
|
|
236
236
|
openClass: "bb-offcanvas--open",
|
|
237
237
|
duration: g.transitionDuration,
|
|
@@ -255,159 +255,159 @@ var ft = [
|
|
|
255
255
|
open: () => c.value
|
|
256
256
|
}), fn = d(!1), { isMobile: pn } = ae(), { resolve: mn } = ce(), hn = () => le(mn(Ct.side), x.value), j = d(hn());
|
|
257
257
|
m(() => JSON.stringify(Ct.side), () => j.value = hn()), m(ue, () => j.value = hn());
|
|
258
|
-
let gn = a(() => g.fullscreen === !0 || g.fullscreen === "mobile" && pn.value), M = Symbol("bb-offcanvas"), { stacks: _n, push: vn, setSize: yn, remove: bn, offset: xn, openOrder:
|
|
258
|
+
let gn = a(() => g.fullscreen === !0 || g.fullscreen === "mobile" && pn.value), M = Symbol("bb-offcanvas"), { stacks: _n, push: vn, setSize: yn, remove: bn, offset: xn, openOrder: Sn, registerOpen: Cn, deregisterOpen: wn, closing: Tn, setClosing: En } = De(), N = a(() => j.value === "left" || j.value === "right" ? "x" : "y"), P = a(() => j.value === "right" || j.value === "bottom" ? 1 : -1), Dn = `bb-offcanvas-${ne().id.value}`, F = a(() => g.stack || Dn), I = null, On = () => {
|
|
259
259
|
let e = x.value?.getBoundingClientRect();
|
|
260
|
-
return e ?
|
|
261
|
-
},
|
|
262
|
-
typeof ResizeObserver < "u" && x.value && (
|
|
263
|
-
|
|
264
|
-
}),
|
|
265
|
-
}, An = () => {
|
|
266
|
-
On?.disconnect(), On = null;
|
|
260
|
+
return e ? N.value === "x" ? e.width : e.height : 0;
|
|
261
|
+
}, kn = null, An = () => {
|
|
262
|
+
typeof ResizeObserver < "u" && x.value && (kn = new ResizeObserver(() => {
|
|
263
|
+
I !== null && yn(I, M, On());
|
|
264
|
+
}), kn.observe(x.value));
|
|
267
265
|
}, jn = () => {
|
|
268
|
-
|
|
266
|
+
kn?.disconnect(), kn = null;
|
|
269
267
|
}, Mn = () => {
|
|
270
|
-
|
|
271
|
-
}, Nn =
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
268
|
+
I = F.value, vn(I, M, j.value, On(), g.stackGap), Cn(M), An();
|
|
269
|
+
}, Nn = () => {
|
|
270
|
+
jn(), wn(M), I !== null && (bn(I, M), I = null);
|
|
271
|
+
}, Pn = a(() => {
|
|
272
|
+
let e = Sn.value.indexOf(M);
|
|
273
|
+
return E.value && e !== -1 && e < Sn.value.length - 1;
|
|
274
|
+
}), Fn = d(!1);
|
|
275
|
+
m([() => Sn.value.indexOf(M), () => Tn.value.length > 0], ([e, t]) => {
|
|
276
|
+
e !== -1 && (Fn.value = t && Fn.value || e > 0);
|
|
277
277
|
}, { immediate: !0 });
|
|
278
|
-
let
|
|
278
|
+
let In = a(() => (Sn.value.includes(M) || E.value) && Fn.value);
|
|
279
279
|
m([
|
|
280
|
-
|
|
280
|
+
F,
|
|
281
281
|
() => j.value,
|
|
282
282
|
() => g.stackGap
|
|
283
283
|
], ([e]) => {
|
|
284
|
-
|
|
284
|
+
I !== null && (bn(I, M), I = e, vn(e, M, j.value, On(), g.stackGap));
|
|
285
285
|
});
|
|
286
|
-
let
|
|
286
|
+
let Ln = a(() => pn.value ? 14 : 20), Rn = a(() => {
|
|
287
287
|
_n.value;
|
|
288
|
-
let e =
|
|
288
|
+
let e = N.value === "x" ? se.value : oe.value, t = xn(F.value, M, e, Ln.value);
|
|
289
289
|
return {
|
|
290
|
-
[
|
|
290
|
+
[N.value === "x" ? "--stack-x" : "--stack-y"]: `${-P.value * t}px`,
|
|
291
291
|
"--stack-fill": `${t}px`
|
|
292
292
|
};
|
|
293
|
-
}),
|
|
294
|
-
let e = _n.value[
|
|
293
|
+
}), zn = d(!1), Bn = 0, Vn = () => {
|
|
294
|
+
let e = _n.value[F.value];
|
|
295
295
|
if (!e) return !1;
|
|
296
296
|
let t = e.filter((e) => e.direction === j.value), n = t.findIndex((e) => e.id === M);
|
|
297
297
|
return n !== -1 && n !== t.length - 1;
|
|
298
298
|
};
|
|
299
|
-
m(() => _n.value[
|
|
300
|
-
let t = e?.length ?? 0, n = t > 0 && t ===
|
|
301
|
-
|
|
299
|
+
m(() => _n.value[F.value], (e) => {
|
|
300
|
+
let t = e?.length ?? 0, n = t > 0 && t === Bn;
|
|
301
|
+
Bn = t, zn.value = n && Vn(), zn.value && tt(() => zn.value = !1);
|
|
302
302
|
});
|
|
303
|
-
let
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
m(
|
|
307
|
-
t?.removeEventListener("scroll",
|
|
303
|
+
let L = d(null), R = d(!1), z = d(!1), B = !1, V = null, Hn = !1, H = !1, Un = !1, U = !1, W = () => {
|
|
304
|
+
L.value?.style.removeProperty("touch-action");
|
|
305
|
+
}, Wn = () => W();
|
|
306
|
+
m(L, (e, t) => {
|
|
307
|
+
t?.removeEventListener("scroll", Wn), V?.disconnect(), V = null, e && (e.addEventListener("scroll", Wn, { passive: !0 }), typeof ResizeObserver < "u" && (V = new ResizeObserver(() => W()), V.observe(e)), W());
|
|
308
308
|
}, { flush: "post" }), m([
|
|
309
309
|
() => g.draggable,
|
|
310
310
|
() => j.value,
|
|
311
311
|
E
|
|
312
|
-
], () =>
|
|
313
|
-
let
|
|
314
|
-
x.value && (x.value.style.transition = "none"),
|
|
315
|
-
},
|
|
312
|
+
], () => W());
|
|
313
|
+
let Gn = () => N.value === "y" ? P.value === 1 ? -rr.value : rr.value : P.value === 1 ? -nr.value : nr.value, Kn = () => {
|
|
314
|
+
x.value && (x.value.style.transition = "none"), L.value && N.value === "y" && (L.value.style.touchAction = "none");
|
|
315
|
+
}, qn = (e) => {
|
|
316
316
|
let t = x.value;
|
|
317
317
|
if (!t) return;
|
|
318
|
-
let n = e > 0 ? e *
|
|
319
|
-
t.style.transform =
|
|
320
|
-
},
|
|
318
|
+
let n = e > 0 ? e * P.value : 0;
|
|
319
|
+
t.style.transform = N.value === "x" ? `translate3d(${n}px, 0, 0)` : `translate3d(0, ${n}px, 0)`;
|
|
320
|
+
}, Jn = () => {
|
|
321
321
|
let e = x.value;
|
|
322
322
|
e && (e.style.transform = j.value === "bottom" ? "translate3d(0, 100%, 0)" : j.value === "top" ? "translate3d(0, -100%, 0)" : j.value === "left" ? "translate3d(-100%, 0, 0)" : "translate3d(100%, 0, 0)");
|
|
323
|
-
},
|
|
323
|
+
}, Yn = (e) => {
|
|
324
324
|
let t = x.value;
|
|
325
325
|
t && (e ? (t.style.transition = `transform ${yt}ms ${bt}`, t.style.transform = "translate3d(0, 0, 0)", window.setTimeout(() => {
|
|
326
|
-
t.isConnected && !
|
|
327
|
-
}, yt)) : (t.style.transition = "",
|
|
328
|
-
},
|
|
326
|
+
t.isConnected && !B && (t.style.removeProperty("transform"), t.style.removeProperty("transition"), W());
|
|
327
|
+
}, yt)) : (t.style.transition = "", W()));
|
|
328
|
+
}, Xn = () => {
|
|
329
329
|
let e = x.value;
|
|
330
|
-
e && (
|
|
331
|
-
},
|
|
330
|
+
e && (B || (e.style.removeProperty("transition"), e.style.removeProperty("transform")));
|
|
331
|
+
}, Zn = async () => {
|
|
332
332
|
let e = x.value;
|
|
333
|
-
e ? (
|
|
334
|
-
},
|
|
333
|
+
e ? (B = !0, z.value = !0, e.style.transition = `transform ${yt}ms ${bt}`, Jn(), await me(yt), c.value ? (e.style.transition = "none", Jn(), k("swipe")) : (B = !1, z.value = !1, e.style.removeProperty("transform"), e.style.removeProperty("transition"), W())) : k("swipe");
|
|
334
|
+
}, Qn = (e) => {
|
|
335
335
|
let { overflowY: t } = getComputedStyle(e);
|
|
336
336
|
return t !== "auto" && t !== "scroll" ? !1 : e.scrollHeight > e.clientHeight + 1;
|
|
337
|
-
},
|
|
337
|
+
}, $n = (e) => P.value === 1 ? e.scrollTop <= 1 : e.scrollTop + e.clientHeight >= e.scrollHeight - 1, er = (e) => {
|
|
338
338
|
let t = x.value;
|
|
339
339
|
if (!t) return !1;
|
|
340
340
|
let n = e;
|
|
341
341
|
for (; n && n !== t;) {
|
|
342
|
-
if (n instanceof HTMLElement &&
|
|
342
|
+
if (n instanceof HTMLElement && Qn(n) && !$n(n)) return !0;
|
|
343
343
|
n = n.parentElement;
|
|
344
344
|
}
|
|
345
345
|
return !1;
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
}, { lengthX:
|
|
346
|
+
}, tr = () => {
|
|
347
|
+
Hn = !1, H = !1, Un = !1, U = !1, R.value = !1;
|
|
348
|
+
}, { lengthX: nr, lengthY: rr } = dt(x, {
|
|
349
349
|
threshold: vt,
|
|
350
350
|
passive: !1,
|
|
351
351
|
onSwipeStart: (e) => {
|
|
352
|
-
if (
|
|
352
|
+
if (tr(), !g.draggable || !E.value || e.target === x.value) return;
|
|
353
353
|
let t = e.target;
|
|
354
|
-
t instanceof Element && (t.closest("[data-bb-no-drag]") || (
|
|
354
|
+
t instanceof Element && (t.closest("[data-bb-no-drag]") || (Hn = !0, H = !!t.closest(".bb-offcanvas__content"), U = H && !lr() && er(t), G.value && kr()));
|
|
355
355
|
},
|
|
356
356
|
onSwipe: (e) => {
|
|
357
|
-
if (!
|
|
358
|
-
if (
|
|
357
|
+
if (!Hn || !g.draggable || U) return;
|
|
358
|
+
if (G.value) {
|
|
359
359
|
Nr(e);
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
|
-
let t =
|
|
363
|
-
if (!
|
|
364
|
-
if (
|
|
365
|
-
|
|
362
|
+
let t = Gn();
|
|
363
|
+
if (!Un) {
|
|
364
|
+
if (H && t < -8) {
|
|
365
|
+
U = !0;
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
if (t < vt) return;
|
|
369
|
-
|
|
369
|
+
Un = !0, R.value = !0, Kn();
|
|
370
370
|
}
|
|
371
|
-
e.preventDefault(),
|
|
371
|
+
e.preventDefault(), qn(t);
|
|
372
372
|
},
|
|
373
373
|
onSwipeEnd: (e) => {
|
|
374
|
-
if (
|
|
374
|
+
if (G.value) {
|
|
375
375
|
Fr(e.timeStamp);
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
|
-
if (!
|
|
379
|
-
|
|
378
|
+
if (!Un) {
|
|
379
|
+
tr();
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
|
-
let t =
|
|
383
|
-
|
|
382
|
+
let t = Gn();
|
|
383
|
+
tr(), t >= _t && !b.value ? Zn() : (Yn(!0), t >= _t && D(300));
|
|
384
384
|
}
|
|
385
|
-
}),
|
|
385
|
+
}), G = a(() => j.value === "bottom" && g.draggable && !gn.value && !!g.snapPoints?.length), ir = d(0), ar = () => {
|
|
386
386
|
if (!Rt()) return;
|
|
387
387
|
let e = document.createElement("div");
|
|
388
|
-
e.style.cssText = "position:fixed;visibility:hidden;height:env(safe-area-inset-top,0px)", document.body.append(e),
|
|
389
|
-
},
|
|
390
|
-
process.env.NODE_ENV !== "production" && (
|
|
391
|
-
}) : []),
|
|
392
|
-
let e = Me(
|
|
388
|
+
e.style.cssText = "position:fixed;visibility:hidden;height:env(safe-area-inset-top,0px)", document.body.append(e), ir.value = e.getBoundingClientRect().height, e.remove();
|
|
389
|
+
}, K = a(() => Math.max(0, oe.value - S.value - ir.value - Ln.value)), or = /* @__PURE__ */ new Set(), q = a(() => G.value ? Ae(g.snapPoints, K.value, (e) => {
|
|
390
|
+
process.env.NODE_ENV !== "production" && (or.has(e) || (or.add(e), ie().warn(`BbOffCanvas: snap point ${JSON.stringify(e)} is not a stop. Use a fraction of the screen in (0, 1] or a pixel height like '240px'.`)));
|
|
391
|
+
}) : []), J = d(0), sr = a(() => q.value[q.value.length - 1]?.height ?? 0), cr = (e) => sr.value - (q.value[e]?.height ?? 0), lr = () => G.value && J.value < q.value.length - 1, ur = () => {
|
|
392
|
+
let e = Me(q.value, h.value);
|
|
393
393
|
if (e !== -1) return e;
|
|
394
394
|
if (h.value !== void 0) {
|
|
395
|
-
let [e] = Ae([h.value],
|
|
395
|
+
let [e] = Ae([h.value], K.value), t = e ? q.value.findIndex((t) => Math.abs(t.height - e.height) < 1) : -1;
|
|
396
396
|
if (t !== -1) return t;
|
|
397
397
|
}
|
|
398
398
|
return 0;
|
|
399
|
-
},
|
|
399
|
+
}, Y = d(null), X = (e) => {
|
|
400
400
|
x.value?.style.setProperty("--snap-y", `${e}px`);
|
|
401
401
|
}, dr = () => parseFloat(x.value?.style.getPropertyValue("--snap-y") || "0") || 0, Z, fr = 0, pr = (e) => {
|
|
402
|
-
clearTimeout(Z),
|
|
403
|
-
|
|
402
|
+
clearTimeout(Z), J.value = e, Y.value = "instant", X(cr(e)), cancelAnimationFrame(fr), fr = requestAnimationFrame(() => {
|
|
403
|
+
Y.value === "instant" && (Y.value = null);
|
|
404
404
|
});
|
|
405
405
|
}, Q = (e, { report: t = !0 } = {}) => {
|
|
406
|
-
let n =
|
|
407
|
-
n && (
|
|
406
|
+
let n = q.value[e];
|
|
407
|
+
n && (Y.value === "settle" && Math.abs(Ar() - dr()) < 1 && _r(), clearTimeout(Z), x.value?.removeEventListener("transitionend", vr), J.value = e, Y.value = "settle", X(cr(e)), mr = t ? n.value : void 0, gr = t, x.value?.addEventListener("transitionend", vr), Z = setTimeout(_r, 550));
|
|
408
408
|
}, mr, hr, gr = !1;
|
|
409
409
|
function _r() {
|
|
410
|
-
clearTimeout(Z), x.value?.removeEventListener("transitionend", vr),
|
|
410
|
+
clearTimeout(Z), x.value?.removeEventListener("transitionend", vr), Y.value === "settle" && (Y.value = null), gr && h.value !== mr && (hr = mr, h.value = mr), gr = !1, W();
|
|
411
411
|
}
|
|
412
412
|
function vr(e) {
|
|
413
413
|
e.target === x.value && e.propertyName === "translate" && _r();
|
|
@@ -416,7 +416,7 @@ var ft = [
|
|
|
416
416
|
let e = wt?.vnode.props;
|
|
417
417
|
return !!e && ("snap" in e || "onUpdate:snap" in e);
|
|
418
418
|
}, br = () => {
|
|
419
|
-
|
|
419
|
+
G.value && (ar(), clearTimeout(Z), Y.value = null, J.value = yr() ? ur() : 0, X(cr(J.value)));
|
|
420
420
|
};
|
|
421
421
|
m(c, (e) => {
|
|
422
422
|
e && br();
|
|
@@ -427,68 +427,68 @@ var ft = [
|
|
|
427
427
|
hr = void 0;
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
|
-
if (hr = void 0, !c.value || !
|
|
431
|
-
let t =
|
|
432
|
-
(t !==
|
|
433
|
-
}), m(() =>
|
|
434
|
-
if (!c.value || !
|
|
435
|
-
let e =
|
|
436
|
-
pr(Math.min(
|
|
430
|
+
if (hr = void 0, !c.value || !G.value || Y.value === "drag") return;
|
|
431
|
+
let t = ur();
|
|
432
|
+
(t !== J.value || Y.value === "settle") && Q(t, { report: !1 });
|
|
433
|
+
}), m(() => q.value.map((e) => e.height).join(), () => {
|
|
434
|
+
if (!c.value || !G.value || Y.value === "drag") return;
|
|
435
|
+
let e = q.value.length - 1;
|
|
436
|
+
pr(Math.min(J.value, Math.max(0, e)));
|
|
437
437
|
});
|
|
438
438
|
let xr = null;
|
|
439
439
|
m(() => S.value > 0, (e) => {
|
|
440
|
-
if (!c.value || !
|
|
441
|
-
let t =
|
|
442
|
-
e &&
|
|
440
|
+
if (!c.value || !G.value) return;
|
|
441
|
+
let t = q.value.length - 1;
|
|
442
|
+
e && J.value < t ? (xr = J.value, Q(t)) : !e && xr !== null && (J.value === t && Q(xr), xr = null);
|
|
443
443
|
});
|
|
444
|
-
let Sr = Oe(), Cr = 0, wr = 0, Tr = 0, $ = !1, Er = !1, Dr = () =>
|
|
444
|
+
let Sr = Oe(), Cr = 0, wr = 0, Tr = 0, $ = !1, Er = !1, Dr = () => cr(0), Or = (e) => {
|
|
445
445
|
let t = wr + e;
|
|
446
|
-
if (t < 0) return -je(-t,
|
|
446
|
+
if (t < 0) return -je(-t, K.value);
|
|
447
447
|
let n = Dr();
|
|
448
|
-
return b.value && t > n ? n + je(t - n,
|
|
448
|
+
return b.value && t > n ? n + je(t - n, K.value) : t;
|
|
449
449
|
}, kr = (e = 0) => {
|
|
450
|
-
Sr.reset(), $ = !1, Er = !1, Cr =
|
|
450
|
+
Sr.reset(), $ = !1, Er = !1, Cr = J.value, wr = dr(), Tr = e;
|
|
451
451
|
}, Ar = () => {
|
|
452
452
|
let e = x.value;
|
|
453
453
|
if (!e) return 0;
|
|
454
454
|
let t = oe.value - S.value;
|
|
455
|
-
return e.getBoundingClientRect().top - (t -
|
|
455
|
+
return e.getBoundingClientRect().top - (t - sr.value);
|
|
456
456
|
}, jr = () => {
|
|
457
|
-
|
|
457
|
+
Y.value === "settle" && (wr = Ar()), $ = !0, Er = !0, clearTimeout(Z), Y.value = "drag", R.value = !0, L.value && (L.value.style.touchAction = "none");
|
|
458
458
|
}, Mr = (e, t) => {
|
|
459
|
-
|
|
459
|
+
X(Or(e)), Sr.add(t, -e);
|
|
460
460
|
}, Nr = (e) => {
|
|
461
|
-
let t = -
|
|
461
|
+
let t = -rr.value;
|
|
462
462
|
if (!$) {
|
|
463
|
-
if (
|
|
464
|
-
|
|
463
|
+
if (H && !lr() && t < -8) {
|
|
464
|
+
U = !0;
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
if (Math.abs(t) < vt) return;
|
|
468
|
-
if (Math.abs(
|
|
469
|
-
|
|
468
|
+
if (Math.abs(nr.value) > Math.abs(t)) {
|
|
469
|
+
Hn = !1;
|
|
470
470
|
return;
|
|
471
471
|
}
|
|
472
472
|
jr();
|
|
473
473
|
}
|
|
474
474
|
e.preventDefault(), Mr(t, e.timeStamp);
|
|
475
475
|
}, Pr = (e) => {
|
|
476
|
-
let t = dr(), n =
|
|
476
|
+
let t = dr(), n = q.value, r = ke({
|
|
477
477
|
heights: n.map((e) => e.height),
|
|
478
|
-
height:
|
|
478
|
+
height: sr.value - t,
|
|
479
479
|
velocity: Sr.velocity(e),
|
|
480
480
|
startIndex: Cr
|
|
481
481
|
});
|
|
482
|
-
if (
|
|
482
|
+
if (R.value = !1, r === -1) {
|
|
483
483
|
if (b.value) {
|
|
484
484
|
D(300), Q(0);
|
|
485
485
|
return;
|
|
486
486
|
}
|
|
487
|
-
|
|
487
|
+
Y.value = null, Zn();
|
|
488
488
|
} else Q(r);
|
|
489
489
|
}, Fr = (e) => {
|
|
490
490
|
let t = $;
|
|
491
|
-
$ = !1,
|
|
491
|
+
$ = !1, tr(), t && Pr(e);
|
|
492
492
|
}, Ir = null, Lr = (e) => {
|
|
493
493
|
if (e.pointerType !== "touch" && e.button === 0) {
|
|
494
494
|
Ir = e.pointerId;
|
|
@@ -515,39 +515,47 @@ var ft = [
|
|
|
515
515
|
Er = !1;
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
let e = (
|
|
518
|
+
let e = (J.value + 1) % q.value.length;
|
|
519
519
|
Q(e);
|
|
520
520
|
}, Vr = (e) => {
|
|
521
|
-
let t =
|
|
522
|
-
ArrowUp:
|
|
523
|
-
ArrowRight:
|
|
524
|
-
PageUp:
|
|
525
|
-
ArrowDown:
|
|
526
|
-
ArrowLeft:
|
|
527
|
-
PageDown:
|
|
521
|
+
let t = q.value.length - 1, n = {
|
|
522
|
+
ArrowUp: J.value + 1,
|
|
523
|
+
ArrowRight: J.value + 1,
|
|
524
|
+
PageUp: J.value + 1,
|
|
525
|
+
ArrowDown: J.value - 1,
|
|
526
|
+
ArrowLeft: J.value - 1,
|
|
527
|
+
PageDown: J.value - 1,
|
|
528
528
|
Home: 0,
|
|
529
529
|
End: t
|
|
530
530
|
};
|
|
531
531
|
if (!(e.key in n)) return;
|
|
532
532
|
e.preventDefault();
|
|
533
533
|
let r = Math.min(t, Math.max(0, n[e.key]));
|
|
534
|
-
r !==
|
|
535
|
-
}, Hr = a(() =>
|
|
536
|
-
let e =
|
|
537
|
-
return t === e - 1 && n &&
|
|
534
|
+
r !== J.value && Q(r);
|
|
535
|
+
}, Hr = a(() => q.value.length > 1), Ur = a(() => {
|
|
536
|
+
let e = q.value.length, t = J.value, n = q.value[t];
|
|
537
|
+
return t === e - 1 && n && K.value - n.height < 1 ? y("offCanvas.snapFull").value : y("offCanvas.snapValue", t + 1, e).value;
|
|
538
538
|
}), Wr = (e) => {
|
|
539
|
-
if (!
|
|
539
|
+
if (!lr() || Y.value === "drag") return;
|
|
540
540
|
let t = e.target;
|
|
541
541
|
if (!(t instanceof HTMLElement) || !t.closest(".bb-offcanvas__content")) return;
|
|
542
542
|
let n = (x.value?.querySelector(".bb-offcanvas__footer"))?.getBoundingClientRect().top ?? oe.value;
|
|
543
|
-
t.getBoundingClientRect().bottom > n + 1 && Q(
|
|
544
|
-
}, Gr = a(() =>
|
|
545
|
-
"--snap-h": `${
|
|
543
|
+
t.getBoundingClientRect().bottom > n + 1 && Q(q.value.length - 1);
|
|
544
|
+
}, Gr = a(() => G.value ? {
|
|
545
|
+
"--snap-h": `${sr.value}px`,
|
|
546
546
|
"--snap-floor": `${Dr()}px`
|
|
547
547
|
} : {});
|
|
548
548
|
return nt(() => {
|
|
549
549
|
clearTimeout(Z), cancelAnimationFrame(fr);
|
|
550
|
-
}), rt(() =>
|
|
550
|
+
}), rt(() => {
|
|
551
|
+
E.value && he(x.value, {
|
|
552
|
+
id: M,
|
|
553
|
+
openClass: "bb-offcanvas--open",
|
|
554
|
+
duration: g.transitionDuration,
|
|
555
|
+
closingSince: rn,
|
|
556
|
+
opener: an
|
|
557
|
+
}), k("unmounted");
|
|
558
|
+
}), (e, t) => (u(), s("dialog", l({
|
|
551
559
|
id: p(_).domId.value || void 0,
|
|
552
560
|
ref_key: "dialog",
|
|
553
561
|
ref: x,
|
|
@@ -558,28 +566,28 @@ var ft = [
|
|
|
558
566
|
"bb-offcanvas--visible": E.value,
|
|
559
567
|
"bb-offcanvas--fullscreen": gn.value,
|
|
560
568
|
"bb-offcanvas--deny-close": fn.value,
|
|
561
|
-
"bb-offcanvas--dragging":
|
|
562
|
-
"bb-offcanvas--swipe-exit":
|
|
563
|
-
"bb-offcanvas--instant-stack":
|
|
564
|
-
"bb-offcanvas--covered":
|
|
565
|
-
"bb-offcanvas--above":
|
|
569
|
+
"bb-offcanvas--dragging": R.value,
|
|
570
|
+
"bb-offcanvas--swipe-exit": z.value,
|
|
571
|
+
"bb-offcanvas--instant-stack": zn.value,
|
|
572
|
+
"bb-offcanvas--covered": Pn.value,
|
|
573
|
+
"bb-offcanvas--above": In.value,
|
|
566
574
|
"bb-offcanvas--has-handle": i.draggable,
|
|
567
575
|
"bb-offcanvas--no-header": !Mt(),
|
|
568
576
|
"bb-offcanvas--keyboard": p(S) > 0,
|
|
569
|
-
"bb-offcanvas--snap":
|
|
570
|
-
"bb-offcanvas--snap-low":
|
|
571
|
-
"bb-offcanvas--snap-settling":
|
|
572
|
-
"bb-offcanvas--snap-instant":
|
|
577
|
+
"bb-offcanvas--snap": G.value,
|
|
578
|
+
"bb-offcanvas--snap-low": lr(),
|
|
579
|
+
"bb-offcanvas--snap-settling": Y.value === "settle",
|
|
580
|
+
"bb-offcanvas--snap-instant": Y.value === "instant",
|
|
573
581
|
[`bb-offcanvas--${j.value}`]: !0
|
|
574
582
|
}].flat()],
|
|
575
|
-
inert: !c.value && !E.value ||
|
|
583
|
+
inert: !c.value && !E.value || Pn.value,
|
|
576
584
|
style: {
|
|
577
585
|
"--max-size": cn.value,
|
|
578
586
|
...nn.value,
|
|
579
587
|
"--transition-duration": `${g.transitionDuration}ms`,
|
|
580
588
|
"--stack-gap": `${g.stackGap}px`,
|
|
581
589
|
"--keyboard": `${p(S)}px`,
|
|
582
|
-
...
|
|
590
|
+
...Rn.value,
|
|
583
591
|
...Gr.value
|
|
584
592
|
}
|
|
585
593
|
}, ot(p(xe), !0), {
|
|
@@ -631,7 +639,7 @@ var ft = [
|
|
|
631
639
|
(u(), s("div", l({
|
|
632
640
|
key: `body-3-${C.value}`,
|
|
633
641
|
ref_key: "body",
|
|
634
|
-
ref:
|
|
642
|
+
ref: L,
|
|
635
643
|
class: "bb-offcanvas__content scrollbar-border"
|
|
636
644
|
}, p(v).content), [Xe("div", pt, [f(e.$slots, "default", {
|
|
637
645
|
close: A,
|
|
@@ -656,9 +664,9 @@ var ft = [
|
|
|
656
664
|
key: 1,
|
|
657
665
|
"aria-label": p(y)("offCanvas.snapLabel").value,
|
|
658
666
|
"aria-orientation": "vertical",
|
|
659
|
-
"aria-valuemax":
|
|
667
|
+
"aria-valuemax": q.value.length,
|
|
660
668
|
"aria-valuemin": "1",
|
|
661
|
-
"aria-valuenow":
|
|
669
|
+
"aria-valuenow": J.value + 1,
|
|
662
670
|
"aria-valuetext": Ur.value,
|
|
663
671
|
class: "bb-offcanvas__handle bb-offcanvas__handle--slider",
|
|
664
672
|
role: "slider",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FallthroughAttrs } from '../../types/fallthrough.js';
|
|
2
2
|
import { BbPaginationProps, BbPaginationEvents, BbPaginationSlots } from './types.js';
|
|
3
|
-
export type { BbPaginationProps, BbPaginationEvents, BbPaginationSlots };
|
|
4
3
|
type __VLS_Props = BbPaginationProps & FallthroughAttrs<'div', BbPaginationProps>;
|
|
5
4
|
type __VLS_Slots = BbPaginationSlots;
|
|
5
|
+
export type { BbPaginationProps, BbPaginationEvents, BbPaginationSlots };
|
|
6
6
|
type __VLS_ModelProps = {
|
|
7
7
|
/**
|
|
8
8
|
* Used by v-model. The 1-based index of the current page — pagination starts
|
|
@@ -19,8 +19,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
19
19
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
21
|
queryKey: string;
|
|
22
|
-
maxSize: number | string;
|
|
23
22
|
align: "left" | "center" | "right" | "start" | "end";
|
|
23
|
+
maxSize: number | string;
|
|
24
24
|
ellipsis: string;
|
|
25
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|