bitboss-ui 3.0.0-beta.75 → 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/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +1 -1
- package/dist/ai/BbDatePickerInput.md +1 -1
- package/dist/ai/BbDialog.md +3 -2
- package/dist/ai/BbDropdown.md +23 -21
- package/dist/ai/BbDropdownButton.md +13 -11
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbSelect.md +153 -43
- package/dist/ai/BbSelectPopover.md +115 -9
- package/dist/ai/BbTable.md +1 -1
- package/dist/ai/BbTimePicker.md +1 -1
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/GroupedListBox.md +2 -2
- package/dist/ai/ListBox.md +3 -2
- package/dist/ai/changelog.json +153 -7
- package/dist/ai/components.json +12 -12
- package/dist/ai/guides/agent-contract.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/eslint-rules.md +1 -1
- 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-icon.md +4 -4
- package/dist/ai/guides/migration/v2-to-v3.md +48 -19
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +19 -17
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
- package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +44 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
- package/dist/ai/manifest/components/BbTable.tree.json +5 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- 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 +9 -2
- package/dist/ai/source/BbBadge.md +6 -2
- package/dist/ai/source/BbBreadcrumbs.md +5 -2
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +10 -6
- package/dist/ai/source/BbColorPalette.md +5 -2
- package/dist/ai/source/BbDatePickerInput.md +7 -2
- package/dist/ai/source/BbDropdown.md +91 -66
- package/dist/ai/source/BbDropdownButton.md +36 -19
- package/dist/ai/source/BbDropdownGroup.md +91 -66
- package/dist/ai/source/BbGallery.md +6 -5
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +130 -106
- package/dist/ai/source/BbSelectPopover.md +128 -21
- package/dist/ai/source/BbTable.md +42 -9
- package/dist/ai/source/BbTimePickerInput.md +6 -2
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +7 -2
- package/dist/ai/source/GroupedListBox.md +22 -3
- package/dist/ai/source/ListBox.md +7 -1
- 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_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
- 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/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
- package/dist/components/BbDropdown/types.d.ts +51 -53
- package/dist/components/BbDropdown/types.js +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
- package/dist/components/BbDropdownButton/types.d.ts +12 -10
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- 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/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 +30 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +101 -105
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +22 -13
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
- 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/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 +69 -68
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/llms-full.txt +477 -187
- package/dist/llms-medium.txt +25 -24
- package/dist/llms.txt +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +4 -4
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +319 -306
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +73 -12
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
|
@@ -19,15 +19,16 @@ import { isTopEscapeEntry as he, pushEscapeEntry as ge, removeEscapeEntry as _e
|
|
|
19
19
|
import { overlaySurfaceIsolation as ve } from "../../utils/overlaySurfaceIsolation.js";
|
|
20
20
|
import { findGalleryItem as ye, toPhoto as be } from "./findItem.js";
|
|
21
21
|
import { BB_GALLERY_PT as xe } from "./types.js";
|
|
22
|
-
import {
|
|
22
|
+
import { useInternalIcon as Se } from "../../composables/useInternalIcon.js";
|
|
23
|
+
import { Fragment as o, computed as s, createBlock as Ce, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as we, createVNode as d, defineComponent as f, getCurrentInstance as Te, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as Ee, onBeforeUnmount as De, onMounted as Oe, openBlock as g, reactive as ke, ref as _, renderList as Ae, renderSlot as je, toDisplayString as v, toHandlers as Me, unref as y, useAttrs as Ne, useModel as Pe, useSlots as Fe, watch as b, withCtx as Ie } from "vue";
|
|
23
24
|
// src/components/BbGallery/BbGallery.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
-
var
|
|
25
|
+
var Le = ["aria-labelledby", "inert"], Re = [
|
|
25
26
|
"aria-hidden",
|
|
26
27
|
"aria-label",
|
|
27
28
|
"aria-roledescription",
|
|
28
29
|
"inert",
|
|
29
30
|
"role"
|
|
30
|
-
],
|
|
31
|
+
], ze = { class: "bb-gallery__frame" }, Be = ["aria-hidden"], Ve = [
|
|
31
32
|
"alt",
|
|
32
33
|
"fetchpriority",
|
|
33
34
|
"height",
|
|
@@ -37,13 +38,13 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
37
38
|
"srcset",
|
|
38
39
|
"width",
|
|
39
40
|
"onError"
|
|
40
|
-
],
|
|
41
|
+
], He = ["aria-label", "disabled"], Ue = ["aria-label", "disabled"], We = {
|
|
41
42
|
"aria-live": "polite",
|
|
42
43
|
class: "bb-sr-only"
|
|
43
|
-
},
|
|
44
|
+
}, Ge = {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "bb-gallery__bar"
|
|
46
|
-
},
|
|
47
|
+
}, Ke = ["tabindex"], qe = ["aria-expanded"], x = /*@__PURE__*/ f({
|
|
47
48
|
inheritAttrs: !1,
|
|
48
49
|
__name: "BbGallery",
|
|
49
50
|
props: /*@__PURE__*/ p({
|
|
@@ -86,18 +87,18 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
86
87
|
}),
|
|
87
88
|
emits: ["update:modelValue"],
|
|
88
89
|
setup(f) {
|
|
89
|
-
let p =
|
|
90
|
+
let p = Pe(f, "modelValue"), x = f, Je = Se("next", r), Ye = Se("prev", n), Xe = Fe(), { t: S } = re(), C = s(() => x.items.map(be)), w = s(() => C.value.length), T = s(() => p.value !== null && w.value > 0), E = s(() => p.value === null ? 0 : Math.min(Math.max(Math.trunc(p.value), 0), Math.max(w.value - 1, 0))), D = s(() => !!x.loop && w.value > 1), Ze = s(() => !D.value && E.value === 0), Qe = s(() => !D.value && E.value === w.value - 1), $e = s(() => x.title || S("gallery.label").value), et = (e) => S("gallery.position", e + 1, w.value).value, O = ke({
|
|
90
91
|
scale: 1,
|
|
91
92
|
x: 0,
|
|
92
93
|
y: 0
|
|
93
94
|
}), k = s(() => O.scale > 1.01), A = ae({
|
|
94
95
|
component: "BbGallery",
|
|
95
|
-
attrs:
|
|
96
|
+
attrs: Ne(),
|
|
96
97
|
props: x,
|
|
97
98
|
parts: xe.parts,
|
|
98
99
|
states: xe.states,
|
|
99
100
|
active: { zoomed: () => k.value }
|
|
100
|
-
}),
|
|
101
|
+
}), tt = Te(), j = null, M = !1, nt = (e) => {
|
|
101
102
|
process.env.NODE_ENV !== "production" && ie().warn(e);
|
|
102
103
|
}, N = ee("gallery", {
|
|
103
104
|
id: () => x.id,
|
|
@@ -106,46 +107,46 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
106
107
|
set: (e) => {
|
|
107
108
|
if (!e) return void (p.value = null);
|
|
108
109
|
let t = N.data.value, n = ye(C.value, t);
|
|
109
|
-
n < 0 ?
|
|
110
|
+
n < 0 ? nt(`v-bb-gallery="{ id: '${x.id}', item: ${JSON.stringify(t)} }" opens nothing: no photo of <BbGallery id="${x.id}"> has that ${typeof t == "number" ? "index" : "URL (its src or a srcset candidate)"}. Pass the index, or one of the item's URLs.`) : (M = !0, j = ce(), p.value = n);
|
|
110
111
|
}
|
|
111
112
|
}),
|
|
112
|
-
element: () => a(
|
|
113
|
-
}),
|
|
114
|
-
let e = a(
|
|
113
|
+
element: () => a(tt)
|
|
114
|
+
}), rt = () => {
|
|
115
|
+
let e = a(tt);
|
|
115
116
|
e && (N.domId.value ? e.id = N.domId.value : e.removeAttribute("id"));
|
|
116
117
|
};
|
|
117
|
-
|
|
118
|
-
let
|
|
118
|
+
Oe(rt), b(() => N.domId.value, rt);
|
|
119
|
+
let it = /* @__PURE__ */ new Set(), at = (e) => {
|
|
119
120
|
if (T.value || typeof Image != "function") return;
|
|
120
121
|
let t = C.value[ye(C.value, e)];
|
|
121
|
-
if (!t ||
|
|
122
|
-
|
|
122
|
+
if (!t || it.has(t.key)) return;
|
|
123
|
+
it.add(t.key);
|
|
123
124
|
let n = new Image();
|
|
124
125
|
n.decoding = "async", t.srcset && (n.sizes = t.sizes ?? "100vw", n.srcset = t.srcset), t.src && (n.src = t.src);
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
let e = a(
|
|
128
|
-
e && (
|
|
126
|
+
}, ot;
|
|
127
|
+
Oe(() => {
|
|
128
|
+
let e = a(tt);
|
|
129
|
+
e && (ot = se(e, at));
|
|
129
130
|
}), b(T, (e) => {
|
|
130
|
-
if (e && (
|
|
131
|
+
if (e && (jt.clear(), !M)) {
|
|
131
132
|
let e = document.activeElement;
|
|
132
133
|
j = e instanceof HTMLElement && e !== document.body ? e : null;
|
|
133
134
|
}
|
|
134
135
|
});
|
|
135
136
|
let P = () => {
|
|
136
137
|
p.value = null;
|
|
137
|
-
},
|
|
138
|
+
}, F = (e) => {
|
|
138
139
|
Number.isInteger(e) && e >= 0 && e < w.value && (p.value = e);
|
|
139
|
-
},
|
|
140
|
+
}, st = s(() => {
|
|
140
141
|
let { key: e, ...t } = C.value[E.value] ?? { key: "" };
|
|
141
142
|
return {
|
|
142
143
|
index: E.value,
|
|
143
144
|
count: w.value,
|
|
144
145
|
item: t,
|
|
145
|
-
go:
|
|
146
|
+
go: F,
|
|
146
147
|
close: P
|
|
147
148
|
};
|
|
148
|
-
}),
|
|
149
|
+
}), ct = s(() => {
|
|
149
150
|
let e = /* @__PURE__ */ new Map(), t = C.value.map((t, n) => {
|
|
150
151
|
let r = e.get(t.key) ?? 0;
|
|
151
152
|
return e.set(t.key, r + 1), {
|
|
@@ -170,96 +171,96 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
170
171
|
key: `clone-end:${r.key}`
|
|
171
172
|
}
|
|
172
173
|
];
|
|
173
|
-
}),
|
|
174
|
+
}), lt = (e) => e + +!!D.value, I = (e) => {
|
|
174
175
|
let t = w.value;
|
|
175
176
|
return D.value ? ((e - 1) % t + t) % t : Math.min(Math.max(e, 0), t - 1);
|
|
176
|
-
},
|
|
177
|
+
}, ut = (e) => {
|
|
177
178
|
let t = w.value, n = Math.abs(e.real - E.value);
|
|
178
179
|
return n <= 1 || D.value && t - n <= 1;
|
|
179
|
-
},
|
|
180
|
+
}, dt = (e) => {
|
|
180
181
|
let { width: t, height: n } = e.item, r = !e.clone && e.real === E.value, i = {};
|
|
181
182
|
return t && n && (i["--arw"] = String(t), i["--arh"] = String(n), i["--w"] = `${t}px`), r && k.value && (i.transform = `translate(${O.x}px, ${O.y}px) scale(${O.scale})`), i;
|
|
182
|
-
}, L = _(null),
|
|
183
|
+
}, L = _(null), ft = !1, R = null, pt = !1, mt = () => !!L.value && getComputedStyle(L.value).direction === "rtl", z = () => L.value?.clientWidth ?? 0, ht = () => {
|
|
183
184
|
let e = z();
|
|
184
185
|
return e ? Math.abs(L.value.scrollLeft) / e : 0;
|
|
185
|
-
}, B = () => Math.round(
|
|
186
|
+
}, B = () => Math.round(ht()), gt = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, _t = null, vt = (e) => {
|
|
186
187
|
let t = L.value;
|
|
187
188
|
t && (t.scrollTo({
|
|
188
|
-
left: (
|
|
189
|
+
left: (mt() ? -1 : 1) * e * z(),
|
|
189
190
|
behavior: "instant"
|
|
190
|
-
}),
|
|
191
|
+
}), _t = {
|
|
191
192
|
left: t.scrollLeft,
|
|
192
193
|
width: z()
|
|
193
194
|
});
|
|
194
|
-
},
|
|
195
|
-
|
|
195
|
+
}, yt = () => {
|
|
196
|
+
gt() || h(() => {
|
|
196
197
|
L.value?.querySelector(".bb-gallery__slide--active")?.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
197
198
|
duration: 200,
|
|
198
199
|
easing: "ease-out"
|
|
199
200
|
});
|
|
200
201
|
});
|
|
201
|
-
},
|
|
202
|
-
R = e,
|
|
203
|
-
},
|
|
204
|
-
L.value && z() && (R = null,
|
|
205
|
-
},
|
|
206
|
-
if (!D.value || R !== null ||
|
|
202
|
+
}, bt = (e) => {
|
|
203
|
+
R = e, vt(e), B() === e && (R = null), yt();
|
|
204
|
+
}, xt = () => {
|
|
205
|
+
L.value && z() && (R = null, vt(lt(E.value)));
|
|
206
|
+
}, St = () => {
|
|
207
|
+
if (!D.value || R !== null || pt) return;
|
|
207
208
|
let e = B();
|
|
208
|
-
e !== 0 && e !== w.value + 1 || Math.abs(
|
|
209
|
+
e !== 0 && e !== w.value + 1 || Math.abs(ht() - e) > .01 || vt(lt(I(e)));
|
|
209
210
|
};
|
|
210
211
|
b(E, (e) => {
|
|
211
|
-
L.value && T.value && (G(), (R === null ? I(B()) === e : I(R) === e) ||
|
|
212
|
+
L.value && T.value && (G(), (R === null ? I(B()) === e : I(R) === e) || bt(lt(e)));
|
|
212
213
|
});
|
|
213
|
-
let
|
|
214
|
+
let Ct = (e) => {
|
|
214
215
|
let t = w.value;
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
clearTimeout(
|
|
218
|
-
if (
|
|
216
|
+
F(D.value ? ((E.value + e) % t + t) % t : E.value + e);
|
|
217
|
+
}, wt = 0, Tt, Et = () => {
|
|
218
|
+
clearTimeout(Tt), Tt = setTimeout(Dt, 150), wt ||= requestAnimationFrame(() => {
|
|
219
|
+
if (wt = 0, !L.value || !T.value || !z() || !ft || V && z() !== Ot) return;
|
|
219
220
|
let e = B();
|
|
220
221
|
if (R !== null) {
|
|
221
222
|
if (e === R) R = null;
|
|
222
223
|
else return;
|
|
223
224
|
}
|
|
224
225
|
let t = I(e);
|
|
225
|
-
t !== E.value && (p.value = t),
|
|
226
|
+
t !== E.value && (p.value = t), St();
|
|
226
227
|
});
|
|
227
|
-
},
|
|
228
|
-
clearTimeout(
|
|
229
|
-
}, V = null,
|
|
228
|
+
}, Dt = () => {
|
|
229
|
+
clearTimeout(Tt), R !== null && B() === R && (R = null), St();
|
|
230
|
+
}, V = null, Ot = 0;
|
|
230
231
|
b(L, (e) => {
|
|
231
|
-
V?.disconnect(), V = null, e && (h(
|
|
232
|
+
V?.disconnect(), V = null, e && (h(xt), typeof ResizeObserver == "function" && (Ot = e.clientWidth, V = new ResizeObserver(() => {
|
|
232
233
|
U();
|
|
233
234
|
let t = e.clientWidth;
|
|
234
|
-
if (t ===
|
|
235
|
-
let n = R ??
|
|
236
|
-
R = null,
|
|
235
|
+
if (t === Ot || (Ot = t, pt)) return;
|
|
236
|
+
let n = R ?? lt(E.value);
|
|
237
|
+
R = null, vt(n);
|
|
237
238
|
}), V.observe(e)));
|
|
238
239
|
});
|
|
239
|
-
let
|
|
240
|
-
|
|
240
|
+
let kt = () => {
|
|
241
|
+
ft = !0;
|
|
241
242
|
let e = L.value;
|
|
242
|
-
if (e &&
|
|
243
|
+
if (e && _t && z() === _t.width && Math.abs(e.scrollLeft - _t.left) > 1) {
|
|
243
244
|
R = null;
|
|
244
245
|
let e = I(B());
|
|
245
|
-
e !== E.value && (p.value = e),
|
|
246
|
-
} else
|
|
247
|
-
U(),
|
|
246
|
+
e !== E.value && (p.value = e), St();
|
|
247
|
+
} else xt();
|
|
248
|
+
U(), Rt();
|
|
248
249
|
};
|
|
249
|
-
b([
|
|
250
|
+
b([Ze, Qe], ([e, t]) => {
|
|
250
251
|
let n = document.activeElement;
|
|
251
252
|
if (!(n instanceof HTMLElement)) return;
|
|
252
253
|
let r = n.closest(".bb-gallery__stage");
|
|
253
254
|
(e && n.classList.contains("bb-gallery__nav--prev") || t && n.classList.contains("bb-gallery__nav--next")) && r?.querySelector(t ? ".bb-gallery__nav--prev" : ".bb-gallery__nav--next")?.focus({ preventScroll: !0 });
|
|
254
255
|
}, { flush: "pre" });
|
|
255
|
-
let
|
|
256
|
+
let At = (e) => {
|
|
256
257
|
if (e.defaultPrevented || e.altKey || e.metaKey || e.ctrlKey) return;
|
|
257
258
|
let t = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
|
|
258
|
-
if (t)
|
|
259
|
-
else if (e.key === "Home")
|
|
260
|
-
else if (e.key === "End")
|
|
261
|
-
else if (e.key === "+" || e.key === "=")
|
|
262
|
-
else if (e.key === "-")
|
|
259
|
+
if (t) Ct(mt() ? -t : t);
|
|
260
|
+
else if (e.key === "Home") F(0);
|
|
261
|
+
else if (e.key === "End") F(w.value - 1);
|
|
262
|
+
else if (e.key === "+" || e.key === "=") Yt(1.5);
|
|
263
|
+
else if (e.key === "-") Yt(1 / 1.5);
|
|
263
264
|
else if (e.key === "0") G();
|
|
264
265
|
else return;
|
|
265
266
|
e.preventDefault();
|
|
@@ -268,98 +269,98 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
268
269
|
if (p.value === null) return;
|
|
269
270
|
if (!e.length) return P();
|
|
270
271
|
let n = t?.[E.value]?.key, r = n ? e.findIndex((e) => e.key === n) : -1, i = r >= 0 ? r : Math.min(E.value, e.length - 1);
|
|
271
|
-
i !== p.value && (p.value = i), h(
|
|
272
|
+
i !== p.value && (p.value = i), h(xt);
|
|
272
273
|
}), b(() => [p.value, w.value], ([e]) => {
|
|
273
274
|
e !== null && w.value && e !== E.value && (p.value = E.value);
|
|
274
275
|
});
|
|
275
|
-
let
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
for (let e of
|
|
279
|
-
|
|
276
|
+
let jt = ke(/* @__PURE__ */ new Set()), Mt = [], Nt = 0, Pt = (e) => {
|
|
277
|
+
Mt.push(e), Nt ||= requestAnimationFrame(() => {
|
|
278
|
+
Nt = 0;
|
|
279
|
+
for (let e of Mt) jt.add(e);
|
|
280
|
+
Mt = [];
|
|
280
281
|
});
|
|
281
|
-
},
|
|
282
|
-
T.value && !
|
|
282
|
+
}, Ft = (e) => {
|
|
283
|
+
T.value && !gt() && e.target.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
283
284
|
duration: 200,
|
|
284
285
|
easing: "ease-out"
|
|
285
286
|
});
|
|
286
|
-
},
|
|
287
|
-
clearTimeout(
|
|
287
|
+
}, It = _(""), Lt, Rt = () => {
|
|
288
|
+
clearTimeout(Lt), Lt = setTimeout(() => {
|
|
288
289
|
let e = C.value[E.value];
|
|
289
290
|
if (!T.value || !e) return;
|
|
290
|
-
let t =
|
|
291
|
-
|
|
291
|
+
let t = et(E.value);
|
|
292
|
+
It.value = [e.alt ? `${t}: ${e.alt}` : t, e.caption].filter(Boolean).join(". ");
|
|
292
293
|
}, 350);
|
|
293
294
|
};
|
|
294
|
-
b(E, () =>
|
|
295
|
-
let
|
|
295
|
+
b(E, () => ft && Rt());
|
|
296
|
+
let zt = _(null), Bt = `bb-gallery-caption-${ne().id.value}`, Vt = s(() => C.value[E.value]?.caption), Ht = s(() => C.value.some((e) => !!e.caption)), H = _(!1), Ut = _(!1), U = () => {
|
|
296
297
|
if (H.value) return;
|
|
297
|
-
let e =
|
|
298
|
-
|
|
298
|
+
let e = zt.value;
|
|
299
|
+
Ut.value = !!e && e.clientWidth > 0 && e.scrollWidth > e.clientWidth + 1;
|
|
299
300
|
};
|
|
300
301
|
b([
|
|
301
302
|
E,
|
|
302
303
|
T,
|
|
303
|
-
|
|
304
|
+
Vt
|
|
304
305
|
], () => {
|
|
305
|
-
H.value = !1,
|
|
306
|
+
H.value = !1, Ut.value = !1, h(U);
|
|
306
307
|
}), b(H, (e) => {
|
|
307
308
|
e || h(U);
|
|
308
309
|
});
|
|
309
310
|
let W = null;
|
|
310
|
-
b(
|
|
311
|
+
b(zt, (e) => {
|
|
311
312
|
W?.disconnect(), W = null, h(U), e && typeof ResizeObserver == "function" && (W = new ResizeObserver(U), W.observe(e));
|
|
312
|
-
}),
|
|
313
|
-
let
|
|
313
|
+
}), Oe(() => void document.fonts?.ready.then(U));
|
|
314
|
+
let Wt = (e) => {
|
|
314
315
|
H.value && (e.target.closest(".bb-gallery__caption, .bb-gallery__more") || (H.value = !1));
|
|
315
|
-
},
|
|
316
|
-
let e =
|
|
316
|
+
}, Gt = () => L.value?.querySelector(".bb-gallery__slide--active .bb-gallery__image") ?? null, Kt = () => {
|
|
317
|
+
let e = Gt();
|
|
317
318
|
if (!e || !e.clientWidth) return 2;
|
|
318
319
|
let t = (e.naturalWidth || e.width) / e.clientWidth;
|
|
319
320
|
return Math.min(Math.max(t, 2), 4);
|
|
320
|
-
},
|
|
321
|
-
let e =
|
|
321
|
+
}, qt = () => {
|
|
322
|
+
let e = Gt(), t = e?.parentElement;
|
|
322
323
|
if (!e || !t) return;
|
|
323
324
|
let n = e.clientWidth * O.scale, r = e.clientHeight * O.scale, i = Math.max(0, (n - t.clientWidth) / 2), a = Math.max(0, (r - t.clientHeight) / 2);
|
|
324
325
|
O.x = Math.min(i, Math.max(-i, O.x)), O.y = Math.min(a, Math.max(-a, O.y));
|
|
325
|
-
},
|
|
326
|
-
let r =
|
|
326
|
+
}, Jt = (e, t, n) => {
|
|
327
|
+
let r = Gt();
|
|
327
328
|
if (!r) return;
|
|
328
|
-
let i = Math.min(Math.max(e, 1),
|
|
329
|
-
O.x = ne - (ne - O.x) * ie, O.y = re - (re - O.y) * ie, O.scale = i, i <= 1.01 ? G() :
|
|
330
|
-
},
|
|
329
|
+
let i = Math.min(Math.max(e, 1), Kt()), a = r.parentElement.getBoundingClientRect(), ee = a.left + a.width / 2, te = a.top + a.height / 2, ne = (t ?? ee) - ee, re = (n ?? te) - te, ie = i / O.scale;
|
|
330
|
+
O.x = ne - (ne - O.x) * ie, O.y = re - (re - O.y) * ie, O.scale = i, i <= 1.01 ? G() : qt();
|
|
331
|
+
}, Yt = (e) => Jt(O.scale * e), G = () => {
|
|
331
332
|
O.scale = 1, O.x = 0, O.y = 0;
|
|
332
|
-
},
|
|
333
|
-
if (e.ctrlKey) e.preventDefault(),
|
|
333
|
+
}, Xt = (e, t) => k.value ? G() : Jt(Kt(), e, t), Zt = (e) => {
|
|
334
|
+
if (e.ctrlKey) e.preventDefault(), Jt(O.scale * Math.exp(-e.deltaY * .01), e.clientX, e.clientY);
|
|
334
335
|
else {
|
|
335
336
|
if (!k.value) {
|
|
336
|
-
R = null,
|
|
337
|
+
R = null, $t(e);
|
|
337
338
|
return;
|
|
338
339
|
}
|
|
339
340
|
e.preventDefault();
|
|
340
341
|
let t = e.deltaMode === 1 ? 16 : e.deltaMode === 2 ? z() : 1, [n, r] = e.shiftKey && !e.deltaX ? [e.deltaY, 0] : [e.deltaX, e.deltaY];
|
|
341
|
-
O.x -= n * t, O.y -= r * t,
|
|
342
|
+
O.x -= n * t, O.y -= r * t, qt();
|
|
342
343
|
}
|
|
343
|
-
},
|
|
344
|
+
}, Qt = -Infinity, $t = (e) => {
|
|
344
345
|
if (!(Math.abs(e.deltaX) > Math.abs(e.deltaY) || e.shiftKey) || e.deltaMode === 0) return;
|
|
345
346
|
e.preventDefault();
|
|
346
|
-
let t = e.timeStamp -
|
|
347
|
-
|
|
347
|
+
let t = e.timeStamp - Qt < 250;
|
|
348
|
+
Qt = e.timeStamp;
|
|
348
349
|
let n = Math.sign(e.deltaX || e.deltaY);
|
|
349
|
-
!t && n &&
|
|
350
|
+
!t && n && Ct(mt() ? -n : n);
|
|
350
351
|
};
|
|
351
352
|
b(L, (e, t) => {
|
|
352
|
-
t?.removeEventListener("wheel",
|
|
353
|
+
t?.removeEventListener("wheel", Zt), e?.addEventListener("wheel", Zt, { passive: !1 });
|
|
353
354
|
});
|
|
354
|
-
let K = /* @__PURE__ */ new Map(), q = null, J = _(0),
|
|
355
|
+
let K = /* @__PURE__ */ new Map(), q = null, J = _(0), en = _(!1), tn = s(() => Math.min(J.value / 320, 1)), Y = {
|
|
355
356
|
t: 0,
|
|
356
357
|
x: 0,
|
|
357
358
|
y: 0
|
|
358
|
-
},
|
|
359
|
+
}, nn, rn = "", an = () => {
|
|
359
360
|
let [e, t] = [...K.values()];
|
|
360
361
|
return Math.hypot(e.x - t.x, e.y - t.y);
|
|
361
|
-
},
|
|
362
|
-
|
|
362
|
+
}, on = (e) => {
|
|
363
|
+
rn = e.pointerType, pt = !0, R = null, K.set(e.pointerId, {
|
|
363
364
|
x: e.clientX,
|
|
364
365
|
y: e.clientY
|
|
365
366
|
}), K.size === 2 && e.pointerType === "touch" ? q = {
|
|
@@ -369,7 +370,7 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
369
370
|
startT: e.timeStamp,
|
|
370
371
|
zoomX: O.x,
|
|
371
372
|
zoomY: O.y,
|
|
372
|
-
pinchDistance:
|
|
373
|
+
pinchDistance: an(),
|
|
373
374
|
pinchScale: O.scale,
|
|
374
375
|
moved: !0
|
|
375
376
|
} : K.size > 1 || (q = {
|
|
@@ -383,20 +384,20 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
383
384
|
pinchScale: O.scale,
|
|
384
385
|
moved: !1
|
|
385
386
|
}, k.value && e.target.setPointerCapture?.(e.pointerId));
|
|
386
|
-
},
|
|
387
|
+
}, sn = (e) => {
|
|
387
388
|
if (!K.has(e.pointerId) || !q) return;
|
|
388
389
|
K.set(e.pointerId, {
|
|
389
390
|
x: e.clientX,
|
|
390
391
|
y: e.clientY
|
|
391
392
|
});
|
|
392
393
|
let t = e.clientX - q.startX, n = e.clientY - q.startY;
|
|
393
|
-
if (Math.hypot(t, n) > 6 && (q.moved = !0), q.kind !== "idle" && (
|
|
394
|
+
if (Math.hypot(t, n) > 6 && (q.moved = !0), q.kind !== "idle" && (en.value = !0), q.kind === "pinch" && K.size === 2) {
|
|
394
395
|
let [e, t] = [...K.values()];
|
|
395
|
-
|
|
396
|
-
} else q.kind === "pan" ? (O.x = q.zoomX + t, O.y = q.zoomY + n,
|
|
397
|
-
},
|
|
396
|
+
Jt(q.pinchScale * an() / q.pinchDistance, (e.x + t.x) / 2, (e.y + t.y) / 2);
|
|
397
|
+
} else q.kind === "pan" ? (O.x = q.zoomX + t, O.y = q.zoomY + n, qt()) : (q.kind === "idle" && e.pointerType !== "mouse" && n > 10 && n > Math.abs(t) * 1.2 && (q.kind = "dismiss"), q.kind === "dismiss" && (en.value = !0, J.value = Math.max(0, n)));
|
|
398
|
+
}, cn = (e) => {
|
|
398
399
|
if (K.delete(e.pointerId), K.size) return;
|
|
399
|
-
|
|
400
|
+
pt = !1, en.value = !1;
|
|
400
401
|
let t = q;
|
|
401
402
|
if (q = null, !t) return;
|
|
402
403
|
if (t.kind === "dismiss") {
|
|
@@ -405,7 +406,7 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
405
406
|
return;
|
|
406
407
|
}
|
|
407
408
|
if (e.type !== "pointerup" || t.moved || e.pointerType === "mouse") {
|
|
408
|
-
|
|
409
|
+
St();
|
|
409
410
|
return;
|
|
410
411
|
}
|
|
411
412
|
let n = e.target.closest(".bb-gallery__image"), r = e.timeStamp, i = r - Y.t < 300 && Math.hypot(e.clientX - Y.x, e.clientY - Y.y) < 30;
|
|
@@ -413,94 +414,94 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
413
414
|
t: r,
|
|
414
415
|
x: e.clientX,
|
|
415
416
|
y: e.clientY
|
|
416
|
-
}, clearTimeout(
|
|
417
|
-
Y.t = 0, (n || k.value) &&
|
|
417
|
+
}, clearTimeout(nn), i) {
|
|
418
|
+
Y.t = 0, (n || k.value) && Xt(e.clientX, e.clientY);
|
|
418
419
|
return;
|
|
419
420
|
}
|
|
420
421
|
let a = e.target.closest(".bb-gallery__missing");
|
|
421
422
|
if (!n && !a && !k.value && x.closeOnBackdropClick) return P();
|
|
422
|
-
a || (
|
|
423
|
-
},
|
|
424
|
-
if (!(
|
|
423
|
+
a || (nn = setTimeout(() => dn.value = !dn.value, 300));
|
|
424
|
+
}, ln = (e) => {
|
|
425
|
+
if (!(rn !== "mouse" || e.detail > 1) && !e.target.closest(".bb-gallery__image, .bb-gallery__nav, .bb-gallery__missing")) {
|
|
425
426
|
if (k.value) return G();
|
|
426
427
|
x.closeOnBackdropClick && P();
|
|
427
428
|
}
|
|
428
|
-
},
|
|
429
|
-
|
|
429
|
+
}, un = (e) => {
|
|
430
|
+
rn && rn !== "mouse" || e.target.closest(".bb-gallery__image") && Xt(e.clientX, e.clientY);
|
|
430
431
|
};
|
|
431
432
|
b(L, (e, t) => {
|
|
432
|
-
t?.removeEventListener("dblclick",
|
|
433
|
+
t?.removeEventListener("dblclick", un), e?.addEventListener("dblclick", un);
|
|
433
434
|
});
|
|
434
|
-
let
|
|
435
|
+
let dn = _(!1), X = _(null), fn = `bb-gallery-title-${ne().id.value}`, Z = _(!1), pn = s(() => T.value || Z.value), mn = _();
|
|
435
436
|
te(Z);
|
|
436
|
-
let
|
|
437
|
+
let Q = Symbol("bb-gallery"), hn = null, $ = 0, gn = async () => {
|
|
437
438
|
let e = ++$;
|
|
438
|
-
|
|
439
|
+
mn.value = pe(), Z.value || ge(Q, { element: () => X.value }), Z.value = !0, await h();
|
|
439
440
|
let t = X.value;
|
|
440
|
-
t && e === $ && (t.open || t.showModal(),
|
|
441
|
-
},
|
|
441
|
+
t && e === $ && (t.open || t.showModal(), hn ??= oe(t), t.querySelector(".bb-gallery__stage")?.focus({ preventScroll: !0 }), await ue(me.medium), await le(t), e === $ && T.value && kt());
|
|
442
|
+
}, _n = async () => {
|
|
442
443
|
let e = $;
|
|
443
|
-
await ue(me.medium), e !== $ || T.value ||
|
|
444
|
-
},
|
|
445
|
-
_e(
|
|
444
|
+
await ue(me.medium), e !== $ || T.value || vn();
|
|
445
|
+
}, vn = () => {
|
|
446
|
+
_e(Q), X.value?.open && X.value.close(), hn?.(), hn = null, Z.value && (Z.value = !1, xn());
|
|
446
447
|
};
|
|
447
|
-
b(T, (e) => void (e ?
|
|
448
|
-
T.value &&
|
|
448
|
+
b(T, (e) => void (e ? gn() : _n())), Oe(() => {
|
|
449
|
+
T.value && gn();
|
|
449
450
|
});
|
|
450
|
-
let
|
|
451
|
+
let yn = (e) => {
|
|
451
452
|
if (e.preventDefault(), H.value) return void (H.value = !1);
|
|
452
|
-
he(
|
|
453
|
-
},
|
|
454
|
-
T.value && X.value && ($++, p.value = null,
|
|
455
|
-
},
|
|
456
|
-
|
|
453
|
+
he(Q) && P();
|
|
454
|
+
}, bn = () => {
|
|
455
|
+
T.value && X.value && ($++, p.value = null, vn());
|
|
456
|
+
}, xn = () => {
|
|
457
|
+
ft = !1, R = null, H.value = !1, dn.value = !1, J.value = 0, G(), It.value = "";
|
|
457
458
|
let e = j, t = M;
|
|
458
459
|
if (j = null, M = !1, N.afterHidden(), t || !e) return;
|
|
459
460
|
let n = document.activeElement;
|
|
460
461
|
n && n !== document.body || i(e);
|
|
461
462
|
};
|
|
462
|
-
return
|
|
463
|
-
$++, _e(
|
|
464
|
-
}), (
|
|
463
|
+
return De(() => {
|
|
464
|
+
$++, _e(Q), X.value?.open && X.value.close(), hn?.(), ot?.(), V?.disconnect(), W?.disconnect(), wt && cancelAnimationFrame(wt), clearTimeout(Tt), Nt && cancelAnimationFrame(Nt), clearTimeout(Lt), clearTimeout(nn);
|
|
465
|
+
}), (n, r) => (g(), l("dialog", m({
|
|
465
466
|
ref_key: "root",
|
|
466
467
|
ref: X,
|
|
467
|
-
"aria-labelledby":
|
|
468
|
+
"aria-labelledby": pn.value ? fn : void 0,
|
|
468
469
|
class: ["bb-gallery", {
|
|
469
470
|
"bb-gallery--open": T.value,
|
|
470
471
|
"bb-gallery--visible": Z.value,
|
|
471
472
|
"bb-gallery--zoomed": k.value,
|
|
472
|
-
"bb-gallery--quiet":
|
|
473
|
+
"bb-gallery--quiet": dn.value,
|
|
473
474
|
"bb-gallery--dismissing": J.value > 0,
|
|
474
|
-
"bb-gallery--gesture":
|
|
475
|
+
"bb-gallery--gesture": en.value
|
|
475
476
|
}],
|
|
476
477
|
inert: !T.value || void 0,
|
|
477
|
-
style: [
|
|
478
|
-
"--dismiss":
|
|
478
|
+
style: [mn.value, J.value > 0 ? {
|
|
479
|
+
"--dismiss": tn.value,
|
|
479
480
|
"--dismiss-y": `${J.value}px`
|
|
480
481
|
} : void 0]
|
|
481
|
-
},
|
|
482
|
-
onCancel:
|
|
483
|
-
onClose:
|
|
484
|
-
onKeydown:
|
|
485
|
-
onPointerdown:
|
|
486
|
-
}, y(A).rootAttrs), [
|
|
487
|
-
u("div", m({ class: "bb-gallery__header" }, y(A).header), [
|
|
482
|
+
}, Me(y(ve), !0), {
|
|
483
|
+
onCancel: yn,
|
|
484
|
+
onClose: bn,
|
|
485
|
+
onKeydown: At,
|
|
486
|
+
onPointerdown: Wt
|
|
487
|
+
}, y(A).rootAttrs), [pn.value ? (g(), l(o, { key: 0 }, [
|
|
488
|
+
u("div", m({ class: "bb-gallery__header" }, y(A).header), [je(n.$slots, "header", m(st.value, {
|
|
488
489
|
title: f.title,
|
|
489
|
-
titleId:
|
|
490
|
+
titleId: fn
|
|
490
491
|
}), () => [d(y(de), {
|
|
491
|
-
of: y(
|
|
492
|
+
of: y(Xe).title,
|
|
492
493
|
props: {
|
|
493
|
-
...
|
|
494
|
+
...st.value,
|
|
494
495
|
text: f.title
|
|
495
496
|
}
|
|
496
497
|
}, {
|
|
497
|
-
default:
|
|
498
|
-
id:
|
|
498
|
+
default: Ie(({ nodes: e }) => [u("p", m({
|
|
499
|
+
id: fn,
|
|
499
500
|
class: ["bb-gallery__title", { "bb-sr-only": !f.title && !e }]
|
|
500
|
-
}, y(A).title), [e ? (g(),
|
|
501
|
+
}, y(A).title), [e ? (g(), Ce(y(fe), {
|
|
501
502
|
key: 0,
|
|
502
503
|
nodes: e
|
|
503
|
-
}, null, 8, ["nodes"])) : (g(), l(o, { key: 1 }, [
|
|
504
|
+
}, null, 8, ["nodes"])) : (g(), l(o, { key: 1 }, [we(v($e.value), 1)], 64))], 16)]),
|
|
504
505
|
_: 1
|
|
505
506
|
}, 8, ["of", "props"]), d(t, m({
|
|
506
507
|
"aria-label": y(S)("dialog.closeLabel").value,
|
|
@@ -509,32 +510,32 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
509
510
|
u("div", {
|
|
510
511
|
class: "bb-gallery__stage",
|
|
511
512
|
tabindex: "-1",
|
|
512
|
-
onClick:
|
|
513
|
+
onClick: ln
|
|
513
514
|
}, [
|
|
514
515
|
u("div", {
|
|
515
516
|
ref_key: "track",
|
|
516
517
|
ref: L,
|
|
517
518
|
class: "bb-gallery__track",
|
|
518
519
|
tabindex: "-1",
|
|
519
|
-
onPointercancel:
|
|
520
|
-
onPointerdown:
|
|
521
|
-
onPointermove:
|
|
522
|
-
onPointerup:
|
|
523
|
-
onScrollPassive:
|
|
524
|
-
onScrollend:
|
|
525
|
-
}, [(g(!0), l(o, null,
|
|
520
|
+
onPointercancel: cn,
|
|
521
|
+
onPointerdown: on,
|
|
522
|
+
onPointermove: sn,
|
|
523
|
+
onPointerup: cn,
|
|
524
|
+
onScrollPassive: Et,
|
|
525
|
+
onScrollend: Dt
|
|
526
|
+
}, [(g(!0), l(o, null, Ae(ct.value, (e) => (g(), l("figure", m({
|
|
526
527
|
key: e.key,
|
|
527
528
|
"aria-hidden": e.clone || e.real !== E.value || void 0,
|
|
528
|
-
"aria-label": e.clone ? void 0 :
|
|
529
|
+
"aria-label": e.clone ? void 0 : et(e.real),
|
|
529
530
|
"aria-roledescription": e.clone ? void 0 : "slide",
|
|
530
531
|
class: ["bb-gallery__slide", { "bb-gallery__slide--active": !e.clone && e.real === E.value }],
|
|
531
532
|
inert: e.clone || e.real !== E.value || void 0,
|
|
532
533
|
role: e.clone ? void 0 : "group"
|
|
533
|
-
}, { ref_for: !0 }, y(A).part("slide", { active: !e.clone && e.real === E.value }, e.item)), [u("div",
|
|
534
|
+
}, { ref_for: !0 }, y(A).part("slide", { active: !e.clone && e.real === E.value }, e.item)), [u("div", ze, [jt.has(e.item.key) ? (g(), l("p", {
|
|
534
535
|
key: 0,
|
|
535
536
|
"aria-hidden": !e.item.alt || void 0,
|
|
536
|
-
class:
|
|
537
|
-
}, v(e.item.alt), 11,
|
|
537
|
+
class: Ee(["bb-gallery__missing", { "bb-gallery__missing--blank": !e.item.alt }])
|
|
538
|
+
}, v(e.item.alt), 11, Be)) : (g(), l("img", m({
|
|
538
539
|
key: 1,
|
|
539
540
|
alt: e.item.alt,
|
|
540
541
|
class: ["bb-gallery__image", { "bb-gallery__image--sized": !!(e.item.width && e.item.height) }],
|
|
@@ -542,68 +543,68 @@ var Ie = ["aria-labelledby", "inert"], Le = [
|
|
|
542
543
|
draggable: "false",
|
|
543
544
|
fetchpriority: !e.clone && e.real === E.value ? "high" : void 0,
|
|
544
545
|
height: e.item.height,
|
|
545
|
-
loading:
|
|
546
|
+
loading: ut(e) ? "eager" : "lazy",
|
|
546
547
|
sizes: e.item.srcset ? e.item.sizes ?? "100vw" : void 0,
|
|
547
548
|
src: e.item.src,
|
|
548
549
|
srcset: e.item.srcset,
|
|
549
|
-
style:
|
|
550
|
+
style: dt(e),
|
|
550
551
|
width: e.item.width
|
|
551
552
|
}, { ref_for: !0 }, y(A).image, {
|
|
552
|
-
onError: (t) =>
|
|
553
|
-
onLoad:
|
|
554
|
-
}), null, 16,
|
|
553
|
+
onError: (t) => Pt(e.item.key),
|
|
554
|
+
onLoad: Ft
|
|
555
|
+
}), null, 16, Ve))])], 16, Re))), 128))], 544),
|
|
555
556
|
f.items.length > 1 ? (g(), l(o, { key: 0 }, [u("button", m({
|
|
556
557
|
"aria-label": y(S)("gallery.previous").value,
|
|
557
558
|
class: "bb-gallery__nav bb-gallery__nav--prev",
|
|
558
|
-
disabled:
|
|
559
|
+
disabled: Ze.value,
|
|
559
560
|
type: "button"
|
|
560
|
-
}, y(A).part("prev", { disabled:
|
|
561
|
-
icon: y(
|
|
561
|
+
}, y(A).part("prev", { disabled: Ze.value }), { onClick: r[0] ||= (e) => Ct(-1) }), [d(e, {
|
|
562
|
+
icon: y(Ye),
|
|
562
563
|
size: "24px"
|
|
563
|
-
}, null, 8, ["icon"])], 16,
|
|
564
|
+
}, null, 8, ["icon"])], 16, He), u("button", m({
|
|
564
565
|
"aria-label": y(S)("gallery.next").value,
|
|
565
566
|
class: "bb-gallery__nav bb-gallery__nav--next",
|
|
566
|
-
disabled:
|
|
567
|
+
disabled: Qe.value,
|
|
567
568
|
type: "button"
|
|
568
|
-
}, y(A).part("next", { disabled:
|
|
569
|
-
icon: y(
|
|
569
|
+
}, y(A).part("next", { disabled: Qe.value }), { onClick: r[1] ||= (e) => Ct(1) }), [d(e, {
|
|
570
|
+
icon: y(Je),
|
|
570
571
|
size: "24px"
|
|
571
|
-
}, null, 8, ["icon"])], 16,
|
|
572
|
-
u("p",
|
|
572
|
+
}, null, 8, ["icon"])], 16, Ue)], 64)) : c("", !0),
|
|
573
|
+
u("p", We, v(It.value), 1)
|
|
573
574
|
]),
|
|
574
575
|
d(y(de), {
|
|
575
|
-
of: y(
|
|
576
|
-
props:
|
|
576
|
+
of: y(Xe).footer,
|
|
577
|
+
props: st.value
|
|
577
578
|
}, {
|
|
578
|
-
default:
|
|
579
|
+
default: Ie(({ nodes: e }) => [e || f.items.length > 1 || Ht.value ? (g(), l("div", m({
|
|
579
580
|
key: 0,
|
|
580
581
|
class: "bb-gallery__footer"
|
|
581
|
-
}, y(A).footer), [!e ||
|
|
582
|
+
}, y(A).footer), [!e || Ht.value ? (g(), l("div", Ge, [Vt.value ? (g(), l("p", m({
|
|
582
583
|
key: 0,
|
|
583
|
-
id:
|
|
584
|
+
id: Bt,
|
|
584
585
|
class: ["bb-gallery__caption", { "bb-gallery__caption--open": H.value }],
|
|
585
586
|
tabindex: H.value ? 0 : void 0
|
|
586
587
|
}, y(A).caption), [u("span", {
|
|
587
588
|
ref_key: "captionEl",
|
|
588
|
-
ref:
|
|
589
|
+
ref: zt,
|
|
589
590
|
class: "bb-gallery__caption-text"
|
|
590
|
-
}, v(
|
|
591
|
+
}, v(Vt.value), 513), Ut.value || H.value ? (g(), l("button", m({
|
|
591
592
|
key: 0,
|
|
592
|
-
"aria-controls":
|
|
593
|
+
"aria-controls": Bt,
|
|
593
594
|
"aria-expanded": H.value,
|
|
594
595
|
class: "bb-gallery__more",
|
|
595
596
|
type: "button"
|
|
596
|
-
}, y(A).more, { onClick:
|
|
597
|
+
}, y(A).more, { onClick: r[2] ||= (e) => H.value = !H.value }), v(H.value ? y(S)("gallery.less").value : y(S)("gallery.more").value), 17, qe)) : c("", !0)], 16, Ke)) : c("", !0), !e && f.items.length > 1 ? (g(), l("p", m({
|
|
597
598
|
key: 1,
|
|
598
599
|
"aria-hidden": "true",
|
|
599
600
|
class: "bb-gallery__counter"
|
|
600
|
-
}, y(A).counter), v(E.value + 1) + " / " + v(f.items.length), 17)) : c("", !0)])) : c("", !0), e ? (g(),
|
|
601
|
+
}, y(A).counter), v(E.value + 1) + " / " + v(f.items.length), 17)) : c("", !0)])) : c("", !0), e ? (g(), Ce(y(fe), {
|
|
601
602
|
key: 1,
|
|
602
603
|
nodes: e
|
|
603
604
|
}, null, 8, ["nodes"])) : c("", !0)], 16)) : c("", !0)]),
|
|
604
605
|
_: 1
|
|
605
606
|
}, 8, ["of", "props"])
|
|
606
|
-
], 64)) : c("", !0)], 16,
|
|
607
|
+
], 64)) : c("", !0)], 16, Le));
|
|
607
608
|
}
|
|
608
609
|
});
|
|
609
610
|
export { x as default };
|