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
package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -9,7 +9,8 @@ import l from "../BbIcon/BbIcon.vue.js";
|
|
|
9
9
|
import u from "../ErrorIcon/ErrorIcon.vue.js";
|
|
10
10
|
import d from "../../assets/svgs/check_stroke.svg_raw.js";
|
|
11
11
|
import { transitions as f } from "../../utilities/misc/transitions.js";
|
|
12
|
-
import {
|
|
12
|
+
import { useInternalIcon as ee } from "../../composables/useInternalIcon.js";
|
|
13
|
+
import { Fragment as te, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, mergeProps as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, openBlock as w, ref as re, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useId as ie, useSlots as ae, useTemplateRef as k, watch as A, withModifiers as j } from "vue";
|
|
13
14
|
import { useVirtualizer as oe } from "@tanstack/vue-virtual";
|
|
14
15
|
// src/components/GroupedListBox/GroupedListBox.vue?vue&type=script&setup=true&lang.ts
|
|
15
16
|
var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
@@ -50,7 +51,7 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
50
51
|
}, be = ["id"], xe = ["id"], Se = {
|
|
51
52
|
key: 1,
|
|
52
53
|
class: "bb-listbox__loading bb-listbox__loading--below"
|
|
53
|
-
}, Ce = ["id"],
|
|
54
|
+
}, Ce = ["id"], M = /*@__PURE__*/ b({
|
|
54
55
|
__name: "GroupedListBox",
|
|
55
56
|
props: {
|
|
56
57
|
passthrough: {},
|
|
@@ -77,11 +78,11 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
77
78
|
"option:unselected",
|
|
78
79
|
"focused:change"
|
|
79
80
|
],
|
|
80
|
-
setup(f, { expose: b, emit:
|
|
81
|
-
let
|
|
81
|
+
setup(f, { expose: b, emit: M }) {
|
|
82
|
+
let N = f, P = M, we = ae(), F = ee("check", d), { t: I } = n(), L = k("inner"), Te = k("listbox"), { touch: R } = i(), z = p(() => N.optionHeight ? N.optionHeight : s(R.value, !!N.compact, !!N.described)), B = p(() => N.headerHeight ? N.headerHeight : a(R.value, !!N.compact)), Ee = p(() => o(R.value)), V = (t) => e(N.groups[t].data) ? 0 : B.value, De = p(() => {
|
|
82
83
|
let t = 0;
|
|
83
|
-
return
|
|
84
|
-
let i = n.id, a = t, o = n.options.length, s =
|
|
84
|
+
return N.groups.map((n, r) => {
|
|
85
|
+
let i = n.id, a = t, o = n.options.length, s = ke(r), c = e(n.data) ? void 0 : `${G}-group-header-${n.id}`, l = typeof n.data == "string" ? n.data : e(n.data) ? "" : JSON.stringify(n.data), u = n.options.every((e) => e.disabled), d = n.data, f = n.options;
|
|
85
86
|
return t += o, {
|
|
86
87
|
offset: a,
|
|
87
88
|
length: o,
|
|
@@ -95,15 +96,15 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
95
96
|
options: f
|
|
96
97
|
};
|
|
97
98
|
});
|
|
98
|
-
}),
|
|
99
|
+
}), H = p(() => c(De.value, "index")), U = p(() => {
|
|
99
100
|
let e = /* @__PURE__ */ new Map();
|
|
100
|
-
return
|
|
101
|
+
return N.groups.flatMap((t, n) => t.options.map((r, i) => {
|
|
101
102
|
let a = r.valueHash, o = Oe(`${t.id}-${r.valueHash}`), s = (e.get(o) ?? 0) + 1;
|
|
102
103
|
e.set(o, s);
|
|
103
104
|
let c = s === 1 ? o : `${o}-${s}`;
|
|
104
105
|
return {
|
|
105
106
|
id: a,
|
|
106
|
-
globalIndex:
|
|
107
|
+
globalIndex: H.value[n].offset + i,
|
|
107
108
|
groupIndex: n,
|
|
108
109
|
groupId: t.id,
|
|
109
110
|
indexInGroup: i,
|
|
@@ -120,61 +121,61 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
120
121
|
create: r.create
|
|
121
122
|
};
|
|
122
123
|
}));
|
|
123
|
-
}),
|
|
124
|
-
let e =
|
|
125
|
-
for (let t of
|
|
124
|
+
}), W = p(() => {
|
|
125
|
+
let e = N.groups.map(() => []);
|
|
126
|
+
for (let t of U.value) e[t.groupIndex].push(t);
|
|
126
127
|
return e;
|
|
127
|
-
}),
|
|
128
|
-
if (e(
|
|
129
|
-
let t =
|
|
128
|
+
}), G = ie(), Oe = (e) => `${G}-listbox-option-${e}`, K = (e) => `${e}__label`, q = (e) => `${e}__description`, J = (e) => !!e && !we.option, Y = p(() => {
|
|
129
|
+
if (e(Q.value)) return;
|
|
130
|
+
let t = U.value[Q.value];
|
|
130
131
|
if (t) return t.domId;
|
|
131
|
-
}),
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
}), X = p(() => U.value.length > 0);
|
|
133
|
+
function ke(e) {
|
|
134
|
+
return V(e) + N.groups[e].options.length * z.value;
|
|
134
135
|
}
|
|
135
|
-
let
|
|
136
|
+
let Z = oe({
|
|
136
137
|
get count() {
|
|
137
|
-
return
|
|
138
|
+
return N.groups.length;
|
|
138
139
|
},
|
|
139
|
-
getScrollElement: () =>
|
|
140
|
-
estimateSize: (e) =>
|
|
140
|
+
getScrollElement: () => L.value ?? null,
|
|
141
|
+
estimateSize: (e) => ke(e),
|
|
141
142
|
overscan: 2
|
|
142
|
-
}),
|
|
143
|
-
if (!
|
|
144
|
-
let n = () =>
|
|
145
|
-
!n() && t(r) && (
|
|
143
|
+
}), Ae = p(() => Z.value.getVirtualItems()), je = p(() => Z.value.getTotalSize()), { focusedIndex: Q, focusNext: Me, focusPrevious: Ne, focusFirst: Pe, focusLast: Fe, focusFirstSelected: Ie, focusLastSelected: Le, focusByHash: Re, focusByPointer: ze, blurPointerFocus: Be, blur: Ve, getHighlighted: He } = r(p(() => U.value), { disabled: () => !N.open }), $ = re(!1), Ue = async () => {
|
|
144
|
+
if (!L.value || e(Q.value)) return;
|
|
145
|
+
let n = () => L.value?.querySelector(`[data-index="${Q.value}"]`), r = U.value[Q.value]?.groupIndex;
|
|
146
|
+
!n() && t(r) && (Z.value.scrollToIndex(r, { align: "auto" }), await ne());
|
|
146
147
|
let i = n();
|
|
147
|
-
i && (i.scrollIntoView({ block: "nearest" }),
|
|
148
|
-
},
|
|
148
|
+
i && (i.scrollIntoView({ block: "nearest" }), We(i));
|
|
149
|
+
}, We = (e) => {
|
|
149
150
|
let t = e.closest(".bb-listbox__group")?.querySelector(".bb-listbox__group-header");
|
|
150
|
-
if (t &&
|
|
151
|
+
if (t && L.value) for (let n = 0; n < 3; n++) {
|
|
151
152
|
let n = t.getBoundingClientRect().bottom - e.getBoundingClientRect().top;
|
|
152
153
|
if (n <= 0) return;
|
|
153
|
-
|
|
154
|
+
L.value.scrollTop -= n;
|
|
154
155
|
}
|
|
155
156
|
};
|
|
156
|
-
|
|
157
|
-
$.value ||
|
|
157
|
+
A(Q, () => {
|
|
158
|
+
$.value || Ue(), $.value = !1, P("focused:change", Y.value);
|
|
158
159
|
});
|
|
159
|
-
let
|
|
160
|
-
let e =
|
|
161
|
-
if (!e) return
|
|
162
|
-
|
|
163
|
-
let t =
|
|
160
|
+
let Ge = () => Z.value.scrollToOffset(0), Ke = () => {
|
|
161
|
+
let e = U.value.find((e) => e.selected);
|
|
162
|
+
if (!e) return Ge();
|
|
163
|
+
Z.value.getTotalSize();
|
|
164
|
+
let t = Z.value.measurementsCache[e.groupIndex];
|
|
164
165
|
if (!t) return;
|
|
165
|
-
let n =
|
|
166
|
-
|
|
166
|
+
let n = V(e.groupIndex), r = (L.value?.clientHeight ?? 0) >= n + z.value;
|
|
167
|
+
Z.value.scrollToOffset(t.start + (r ? 0 : n) + e.indexInGroup * z.value);
|
|
167
168
|
};
|
|
168
|
-
|
|
169
|
-
e &&
|
|
169
|
+
A(() => N.open && !!L.value, (e) => {
|
|
170
|
+
e && Ke();
|
|
170
171
|
}, { flush: "post" });
|
|
171
|
-
let
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
if (e(
|
|
177
|
-
let t =
|
|
172
|
+
let qe = (e) => {
|
|
173
|
+
N.open && ($.value = !0, ze(e));
|
|
174
|
+
}, Je = () => {
|
|
175
|
+
Be();
|
|
176
|
+
}, Ye = () => {
|
|
177
|
+
if (e(Q.value) || !N.open) return;
|
|
178
|
+
let t = U.value[Q.value];
|
|
178
179
|
if (!t || t.disabled) return;
|
|
179
180
|
let n = {
|
|
180
181
|
text: t.text,
|
|
@@ -184,185 +185,185 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
184
185
|
selected: t.selected,
|
|
185
186
|
disabled: t.disabled
|
|
186
187
|
};
|
|
187
|
-
t.selected ?
|
|
188
|
-
},
|
|
189
|
-
if (t.preventDefault(),
|
|
188
|
+
t.selected ? P("option:unselected", n) : P("option:selected", n);
|
|
189
|
+
}, Xe = (t) => {
|
|
190
|
+
if (t.preventDefault(), L.value && t.target instanceof HTMLElement && Te.value) {
|
|
190
191
|
let n = t.target, r = n.dataset.index;
|
|
191
192
|
for (; e(r) && n.parentElement;) n = n.parentElement, r = n.dataset.index;
|
|
192
193
|
if (r) {
|
|
193
|
-
let e =
|
|
194
|
-
e && !e.disabled && (
|
|
194
|
+
let e = U.value[+r];
|
|
195
|
+
e && !e.disabled && (Q.value = +r, Ye());
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
|
-
return
|
|
199
|
-
e.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") !== t.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") && (
|
|
200
|
-
}, { flush: "post" }),
|
|
201
|
-
|
|
199
|
+
return A(() => N.groups, (e, t) => {
|
|
200
|
+
e.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") !== t.flatMap((e) => [e.id, ...e.options.map((e) => e.valueHash)]).join(",") && (Z.value.measure(), Ve());
|
|
201
|
+
}, { flush: "post" }), A([z, B], () => {
|
|
202
|
+
Z.value.measure();
|
|
202
203
|
}, { flush: "post" }), b({
|
|
203
|
-
focusNext:
|
|
204
|
-
focusPrevious:
|
|
205
|
-
focusFirst:
|
|
206
|
-
focusFirstSelected:
|
|
207
|
-
focusLast:
|
|
208
|
-
focusLastSelected:
|
|
209
|
-
blur:
|
|
210
|
-
confirmOption:
|
|
211
|
-
focusByHash:
|
|
212
|
-
getHighlighted:
|
|
213
|
-
getActiveDescendantId: () =>
|
|
214
|
-
scrollToTop:
|
|
215
|
-
scrollToSelected:
|
|
216
|
-
}), (e, t) => (w(),
|
|
204
|
+
focusNext: Me,
|
|
205
|
+
focusPrevious: Ne,
|
|
206
|
+
focusFirst: Pe,
|
|
207
|
+
focusFirstSelected: Ie,
|
|
208
|
+
focusLast: Fe,
|
|
209
|
+
focusLastSelected: Le,
|
|
210
|
+
blur: Ve,
|
|
211
|
+
confirmOption: Ye,
|
|
212
|
+
focusByHash: Re,
|
|
213
|
+
getHighlighted: He,
|
|
214
|
+
getActiveDescendantId: () => Y.value,
|
|
215
|
+
scrollToTop: Ge,
|
|
216
|
+
scrollToSelected: Ke
|
|
217
|
+
}), (e, t) => (w(), g("span", {
|
|
217
218
|
class: S(["bb-listbox bb-listbox--grouped", {
|
|
218
219
|
"bb-listbox--compact": f.compact,
|
|
219
220
|
"bb-listbox--described": f.described,
|
|
220
221
|
"bb-listbox--loading": f.loading,
|
|
221
222
|
"bb-listbox--multiple": f.multiple,
|
|
222
|
-
"bb-listbox--empty": !
|
|
223
|
+
"bb-listbox--empty": !X.value,
|
|
223
224
|
"bb-listbox--open": f.open
|
|
224
225
|
}]),
|
|
225
226
|
style: C({
|
|
226
227
|
"--transition-duration": `${f.transitionDuration}ms`,
|
|
227
|
-
"--option-height": `${
|
|
228
|
-
"--group-header-height": `${
|
|
228
|
+
"--option-height": `${z.value}px`,
|
|
229
|
+
"--group-header-height": `${B.value}px`,
|
|
229
230
|
"--option-font-size": Ee.value
|
|
230
231
|
}),
|
|
231
|
-
onClickCapture:
|
|
232
|
-
onClick: t[1] ||=
|
|
233
|
-
onMousedown: t[2] ||=
|
|
234
|
-
}, [
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
232
|
+
onClickCapture: Xe,
|
|
233
|
+
onClick: t[1] ||= j(() => {}, ["stop"]),
|
|
234
|
+
onMousedown: t[2] ||= j(() => {}, ["prevent"])
|
|
235
|
+
}, [_("span", se, [_("span", ce, [
|
|
236
|
+
E(e.$slots, "options:prepend"),
|
|
237
|
+
_("span", le, [f.loading && !X.value ? (w(), g("span", ue, [E(e.$slots, "loading", {}, () => [v(D(f.loadingText || O(I)("common.loadingText").value), 1)])])) : !X.value && !f.failedText ? (w(), g("span", de, [E(e.$slots, "empty", {}, () => [v(D(f.emptyText || O(I)("common.emptyText").value), 1)])])) : h("", !0)]),
|
|
238
|
+
X.value ? (w(), g("span", x({
|
|
238
239
|
key: 0,
|
|
239
240
|
id: f.id,
|
|
240
241
|
ref: "listbox",
|
|
241
|
-
"aria-activedescendant":
|
|
242
|
+
"aria-activedescendant": Y.value,
|
|
242
243
|
"aria-label": f.listLabelledby ? void 0 : f.listLabel,
|
|
243
244
|
"aria-labelledby": f.listLabelledby,
|
|
244
245
|
"aria-multiselectable": f.multiple ? !0 : void 0,
|
|
245
246
|
class: "bb-listbox__list",
|
|
246
247
|
role: "listbox",
|
|
247
|
-
style: { height: `${
|
|
248
|
+
style: { height: `${je.value}px` },
|
|
248
249
|
tabindex: "-1",
|
|
249
|
-
onMouseleave:
|
|
250
|
-
}, f.passthrough?.list), [(w(!0),
|
|
251
|
-
key:
|
|
252
|
-
"aria-disabled":
|
|
253
|
-
"aria-labelledby":
|
|
250
|
+
onMouseleave: Je
|
|
251
|
+
}, f.passthrough?.list), [(w(!0), g(te, null, T(Ae.value, (t) => (w(), g("span", {
|
|
252
|
+
key: H.value[t.index].id,
|
|
253
|
+
"aria-disabled": H.value[t.index].allOptionsAreDisabled,
|
|
254
|
+
"aria-labelledby": H.value[t.index].headerId,
|
|
254
255
|
class: "bb-listbox__group",
|
|
255
256
|
role: "group",
|
|
256
257
|
style: C({ top: `${t.start}px` })
|
|
257
|
-
}, [
|
|
258
|
+
}, [H.value[t.index].headerId ? (w(), g("span", x({
|
|
258
259
|
key: 0,
|
|
259
|
-
id:
|
|
260
|
+
id: H.value[t.index].headerId,
|
|
260
261
|
class: "bb-listbox__group-header",
|
|
261
262
|
role: "presentation"
|
|
262
|
-
}, [
|
|
263
|
-
disabled:
|
|
263
|
+
}, { ref_for: !0 }, f.passthrough?.part?.("groupHeader", { disabled: H.value[t.index].allOptionsAreDisabled || void 0 })), [E(e.$slots, "group", {
|
|
264
|
+
disabled: H.value[t.index].allOptionsAreDisabled,
|
|
264
265
|
index: t.index,
|
|
265
|
-
item:
|
|
266
|
-
length:
|
|
267
|
-
text:
|
|
268
|
-
}, () => [
|
|
269
|
-
id:
|
|
266
|
+
item: H.value[t.index].data,
|
|
267
|
+
length: H.value[t.index].length,
|
|
268
|
+
text: H.value[t.index].label
|
|
269
|
+
}, () => [_("span", he, D(H.value[t.index].label), 1)])], 16, me)) : h("", !0), (w(!0), g(te, null, T(H.value[t.index].options, (n, r) => (w(), g("span", x({
|
|
270
|
+
id: W.value[t.index][r].domId,
|
|
270
271
|
key: n.valueHash,
|
|
271
|
-
"aria-describedby":
|
|
272
|
-
"aria-disabled":
|
|
273
|
-
"aria-labelledby":
|
|
274
|
-
"aria-posinset":
|
|
275
|
-
"aria-selected":
|
|
276
|
-
"aria-setsize":
|
|
272
|
+
"aria-describedby": J(W.value[t.index][r].description) ? q(W.value[t.index][r].domId) : void 0,
|
|
273
|
+
"aria-disabled": W.value[t.index][r].disabled ? !0 : void 0,
|
|
274
|
+
"aria-labelledby": J(W.value[t.index][r].description) ? K(W.value[t.index][r].domId) : void 0,
|
|
275
|
+
"aria-posinset": W.value[t.index][r].indexInGroup + 1,
|
|
276
|
+
"aria-selected": W.value[t.index][r].selected,
|
|
277
|
+
"aria-setsize": H.value[t.index].length,
|
|
277
278
|
class: ["bb-listbox__option", {
|
|
278
|
-
"bb-listbox__option--focused":
|
|
279
|
-
"bb-listbox__option--selected":
|
|
280
|
-
"bb-listbox__option--disabled":
|
|
279
|
+
"bb-listbox__option--focused": O(Q) === W.value[t.index][r].globalIndex,
|
|
280
|
+
"bb-listbox__option--selected": W.value[t.index][r].selected,
|
|
281
|
+
"bb-listbox__option--disabled": W.value[t.index][r].disabled
|
|
281
282
|
}],
|
|
282
|
-
"data-index":
|
|
283
|
+
"data-index": W.value[t.index][r].globalIndex,
|
|
283
284
|
role: "option",
|
|
284
|
-
onMouseenter:
|
|
285
|
+
onMouseenter: j((e) => qe(W.value[t.index][r].globalIndex), ["stop"])
|
|
285
286
|
}, { ref_for: !0 }, f.passthrough?.part?.("option", {
|
|
286
|
-
selected:
|
|
287
|
-
disabled:
|
|
288
|
-
},
|
|
289
|
-
|
|
287
|
+
selected: W.value[t.index][r].selected,
|
|
288
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
289
|
+
}, W.value[t.index][r].item)), [
|
|
290
|
+
W.value[t.index][r]["prepend:icon"] ? (w(), m(l, x({
|
|
290
291
|
key: 0,
|
|
291
292
|
"aria-hidden": "true",
|
|
292
293
|
class: "bb-listbox__item-icon bb-listbox__option-prepend-icon",
|
|
293
|
-
icon:
|
|
294
|
+
icon: W.value[t.index][r]["prepend:icon"]
|
|
294
295
|
}, { ref_for: !0 }, f.passthrough?.part?.("itemIcon", {
|
|
295
|
-
selected:
|
|
296
|
-
disabled:
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
])) :
|
|
303
|
-
description:
|
|
304
|
-
disabled: !!
|
|
305
|
-
focused:
|
|
306
|
-
index:
|
|
307
|
-
item:
|
|
308
|
-
selected: !!
|
|
309
|
-
text:
|
|
310
|
-
value:
|
|
311
|
-
}, () => [
|
|
312
|
-
id: W
|
|
296
|
+
selected: W.value[t.index][r].selected,
|
|
297
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
298
|
+
}, W.value[t.index][r].item)), null, 16, ["icon"])) : h("", !0),
|
|
299
|
+
W.value[t.index][r].create ? (w(), g("span", _e, [
|
|
300
|
+
v(D(W.value[t.index][r].create.before), 1),
|
|
301
|
+
_("strong", ve, D(W.value[t.index][r].create.query), 1),
|
|
302
|
+
v(D(W.value[t.index][r].create.after), 1)
|
|
303
|
+
])) : E(e.$slots, "option", {
|
|
304
|
+
description: W.value[t.index][r].description,
|
|
305
|
+
disabled: !!W.value[t.index][r].disabled,
|
|
306
|
+
focused: O(Q) === W.value[t.index][r].globalIndex,
|
|
307
|
+
index: W.value[t.index][r].globalIndex,
|
|
308
|
+
item: W.value[t.index][r].item,
|
|
309
|
+
selected: !!W.value[t.index][r].selected,
|
|
310
|
+
text: W.value[t.index][r].text,
|
|
311
|
+
value: W.value[t.index][r].value
|
|
312
|
+
}, () => [W.value[t.index][r].description ? (w(), g("span", ye, [_("span", x({
|
|
313
|
+
id: K(W.value[t.index][r].domId),
|
|
313
314
|
class: "bb-listbox__item-text"
|
|
314
315
|
}, { ref_for: !0 }, f.passthrough?.part?.("itemText", {
|
|
315
|
-
selected:
|
|
316
|
-
disabled:
|
|
317
|
-
},
|
|
318
|
-
id:
|
|
316
|
+
selected: W.value[t.index][r].selected,
|
|
317
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
318
|
+
}, W.value[t.index][r].item)), D(W.value[t.index][r].text), 17, be), _("span", x({
|
|
319
|
+
id: q(W.value[t.index][r].domId),
|
|
319
320
|
class: "bb-listbox__item-description"
|
|
320
321
|
}, { ref_for: !0 }, f.passthrough?.part?.("itemDescription", {
|
|
321
|
-
selected:
|
|
322
|
-
disabled:
|
|
323
|
-
},
|
|
322
|
+
selected: W.value[t.index][r].selected,
|
|
323
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
324
|
+
}, W.value[t.index][r].item)), D(W.value[t.index][r].description), 17, xe)])) : (w(), g("span", x({
|
|
324
325
|
key: 1,
|
|
325
326
|
class: "bb-listbox__item-text"
|
|
326
327
|
}, { ref_for: !0 }, f.passthrough?.part?.("itemText", {
|
|
327
|
-
selected:
|
|
328
|
-
disabled:
|
|
329
|
-
},
|
|
330
|
-
|
|
328
|
+
selected: W.value[t.index][r].selected,
|
|
329
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
330
|
+
}, W.value[t.index][r].item)), D(W.value[t.index][r].text), 17))], void 0, 2),
|
|
331
|
+
W.value[t.index][r]["append:icon"] && !W.value[t.index][r].selected ? (w(), m(l, x({
|
|
331
332
|
key: 3,
|
|
332
333
|
"aria-hidden": "true",
|
|
333
334
|
class: "bb-listbox__item-icon bb-listbox__option-append-icon",
|
|
334
|
-
icon:
|
|
335
|
+
icon: W.value[t.index][r]["append:icon"]
|
|
335
336
|
}, { ref_for: !0 }, f.passthrough?.part?.("itemIcon", {
|
|
336
|
-
selected:
|
|
337
|
-
disabled:
|
|
338
|
-
},
|
|
339
|
-
|
|
337
|
+
selected: W.value[t.index][r].selected,
|
|
338
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
339
|
+
}, W.value[t.index][r].item)), null, 16, ["icon"])) : h("", !0),
|
|
340
|
+
y(l, x({
|
|
340
341
|
"aria-hidden": "true",
|
|
341
|
-
class: "bb-listbox__option-check",
|
|
342
|
-
icon:
|
|
342
|
+
class: ["bb-listbox__option-check", { "bb-listbox__option-check--own": O(F) !== O(d) }],
|
|
343
|
+
icon: O(F)
|
|
343
344
|
}, { ref_for: !0 }, f.passthrough?.part?.("check", {
|
|
344
|
-
selected:
|
|
345
|
-
disabled:
|
|
346
|
-
},
|
|
347
|
-
], 16, ge))), 128))], 12, pe))), 128))], 16, fe)) :
|
|
348
|
-
f.loading && f.loadingBelow &&
|
|
349
|
-
|
|
350
|
-
], 512)]), f.failedText && !f.loading ? (w(),
|
|
345
|
+
selected: W.value[t.index][r].selected,
|
|
346
|
+
disabled: W.value[t.index][r].disabled || void 0
|
|
347
|
+
}, W.value[t.index][r].item)), null, 16, ["class", "icon"])
|
|
348
|
+
], 16, ge))), 128))], 12, pe))), 128))], 16, fe)) : h("", !0),
|
|
349
|
+
f.loading && f.loadingBelow && X.value ? (w(), g("span", Se, [E(e.$slots, "loading", {}, () => [v(D(f.loadingText || O(I)("common.loadingText").value), 1)])])) : h("", !0),
|
|
350
|
+
E(e.$slots, "options:append")
|
|
351
|
+
], 512)]), f.failedText && !f.loading ? (w(), g("span", {
|
|
351
352
|
key: 0,
|
|
352
|
-
class: S(["bb-listbox__failed", { "bb-listbox__failed--divided":
|
|
353
|
+
class: S(["bb-listbox__failed", { "bb-listbox__failed--divided": X.value }]),
|
|
353
354
|
role: "status"
|
|
354
355
|
}, [
|
|
355
|
-
|
|
356
|
-
|
|
356
|
+
y(u, { class: "bb-listbox__failed-icon" }),
|
|
357
|
+
_("span", {
|
|
357
358
|
id: `${f.id}_failed`,
|
|
358
359
|
class: "bb-listbox__failed-text"
|
|
359
|
-
},
|
|
360
|
-
|
|
360
|
+
}, D(f.failedText), 9, Ce),
|
|
361
|
+
_("button", {
|
|
361
362
|
class: "bb-load-retry",
|
|
362
363
|
type: "button",
|
|
363
|
-
onClick: t[0] ||= (e) =>
|
|
364
|
-
},
|
|
365
|
-
], 2)) :
|
|
364
|
+
onClick: t[0] ||= (e) => P("retry", e)
|
|
365
|
+
}, D(O(I)("common.retryLabel").value), 1)
|
|
366
|
+
], 2)) : h("", !0)], 38));
|
|
366
367
|
}
|
|
367
368
|
});
|
|
368
|
-
export {
|
|
369
|
+
export { M as default };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import e from "../BbIcon/BbIcon.vue.js";
|
|
2
2
|
import t from "../../assets/svgs/alert.svg_raw.js";
|
|
3
|
-
import {
|
|
3
|
+
import { useInternalIcon as n } from "../../composables/useInternalIcon.js";
|
|
4
|
+
import { createBlock as r, defineComponent as i, openBlock as a, unref as o } from "vue";
|
|
4
5
|
// src/components/WarningIcon/WarningIcon.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
6
|
+
var s = /*@__PURE__*/ i({
|
|
6
7
|
__name: "WarningIcon",
|
|
7
|
-
setup(
|
|
8
|
-
|
|
8
|
+
setup(i) {
|
|
9
|
+
let s = n("warning", t);
|
|
10
|
+
return (t, n) => (a(), r(e, {
|
|
9
11
|
"aria-hidden": "true",
|
|
10
12
|
class: "bb-warning-icon",
|
|
11
|
-
icon:
|
|
13
|
+
icon: o(s)
|
|
12
14
|
}, null, 8, ["icon"]));
|
|
13
15
|
}
|
|
14
16
|
});
|
|
15
|
-
export {
|
|
17
|
+
export { s as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useConfig as e } from "./useConfig.js";
|
|
2
|
+
import { appComponents as t } from "../utils/configScope.js";
|
|
3
|
+
import { LIBRARY_COMPONENT_NAMES as n } from "../types/internalIcons.js";
|
|
4
|
+
import { computed as r, getCurrentInstance as i, shallowRef as a } from "vue";
|
|
5
|
+
// src/composables/useInternalIcon.ts
|
|
6
|
+
var o = a(null), s = (e) => {
|
|
7
|
+
let t = [], r = e;
|
|
8
|
+
for (; r;) {
|
|
9
|
+
let e = r.type, i = e.__name ?? e.name;
|
|
10
|
+
if (!i || !n.has(i)) break;
|
|
11
|
+
t.push(i), r = r.vnode.ctx ?? null;
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
}, c = (n, a) => {
|
|
15
|
+
let c = s(i()), l = e();
|
|
16
|
+
return r(() => {
|
|
17
|
+
let e = t.value;
|
|
18
|
+
for (let t = c.length - 1; t >= 0; t--) {
|
|
19
|
+
let r = e[c[t]]?.icons?.[n];
|
|
20
|
+
if (r) return r;
|
|
21
|
+
}
|
|
22
|
+
return (o.value ?? l.iconDefaults)?.[n] ?? a;
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
export { c as useInternalIcon };
|
package/dist/icon-scan.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export declare function looksBinary(bytes: Buffer): boolean;
|
|
|
95
95
|
export declare const hasGlobMagic: (pattern: string) => boolean;
|
|
96
96
|
/**
|
|
97
97
|
* A small glob → RegExp for the two places the plugin matches globs against
|
|
98
|
-
* NAMES rather than gitignore paths: `
|
|
98
|
+
* NAMES rather than gitignore paths: `icons.whitelist` entries
|
|
99
99
|
* (`tabler:calendar-*`) and the pattern half of an `include` entry. Supports
|
|
100
100
|
* `*` (no slash), `**` (anything), `?`, `[…]` classes and `{a,b}` alternation.
|
|
101
101
|
*/
|