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
|
@@ -22,35 +22,37 @@ import { groupByTitle as me, groupByValue as he, levelHasSearch as ge, normalize
|
|
|
22
22
|
import { useDropdownContext as ve } from "./useDropdownContext.js";
|
|
23
23
|
import { markRowsChanged as ye, pointerStill as be, trackPointer as xe } from "./pointerTrail.js";
|
|
24
24
|
import { focusQuietly as Se, focusVisibly as Ce } from "../../utils/focusVisibility.js";
|
|
25
|
-
import {
|
|
25
|
+
import { useInternalIcon as we } from "../../composables/useInternalIcon.js";
|
|
26
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as Te, createVNode as h, defineComponent as g, h as Ee, mergeProps as _, nextTick as De, normalizeClass as Oe, normalizeStyle as ke, onBeforeUnmount as Ae, onMounted as v, onUpdated as je, openBlock as y, ref as b, renderList as x, resolveDynamicComponent as Me, toDisplayString as S, unref as C, watch as w, watchEffect as Ne, withCtx as T, withKeys as Pe, withModifiers as Fe } from "vue";
|
|
26
27
|
// src/components/BbDropdown/BbDropdownList.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
28
|
+
var Ie = {
|
|
28
29
|
key: 0,
|
|
29
30
|
"aria-hidden": "true",
|
|
30
31
|
class: "bb-dropdown__divider"
|
|
31
|
-
},
|
|
32
|
+
}, Le = [
|
|
32
33
|
"id",
|
|
33
34
|
"role",
|
|
34
35
|
"tabindex",
|
|
35
36
|
"onClick",
|
|
36
37
|
"onKeydown"
|
|
37
|
-
],
|
|
38
|
+
], Re = {
|
|
38
39
|
key: 0,
|
|
39
|
-
class: "group-
|
|
40
|
-
},
|
|
40
|
+
class: "group-label__content"
|
|
41
|
+
}, ze = {
|
|
41
42
|
key: 2,
|
|
42
43
|
class: "bb-dropdown__sheet-selection"
|
|
43
|
-
},
|
|
44
|
+
}, Be = { class: "bb-dropdown__sheet-chips" }, Ve = [
|
|
44
45
|
"aria-describedby",
|
|
45
46
|
"aria-label",
|
|
46
47
|
"placeholder",
|
|
47
48
|
"value",
|
|
49
|
+
"onCompositionend",
|
|
48
50
|
"onInput"
|
|
49
|
-
],
|
|
51
|
+
], He = ["id"], Ue = {
|
|
50
52
|
key: 1,
|
|
51
53
|
"aria-hidden": "true",
|
|
52
54
|
class: "bb-dropdown__group-loading"
|
|
53
|
-
},
|
|
55
|
+
}, We = ["aria-labelledby", "role"], Ge = ["id"], Ke = { class: "group-header__content" }, qe = { class: "item__content" }, Je = [
|
|
54
56
|
"id",
|
|
55
57
|
"aria-label",
|
|
56
58
|
"data-bb-dropdown-surface",
|
|
@@ -58,7 +60,7 @@ var Ne = {
|
|
|
58
60
|
"role",
|
|
59
61
|
"onKeydown",
|
|
60
62
|
"onPointerleave"
|
|
61
|
-
],
|
|
63
|
+
], Ye = 289, Xe = 160, Ze = 100, Qe = 120, $e = /*@__PURE__*/ g({
|
|
62
64
|
__name: "BbDropdownList",
|
|
63
65
|
props: {
|
|
64
66
|
groups: {},
|
|
@@ -68,19 +70,19 @@ var Ne = {
|
|
|
68
70
|
slotDepth: {}
|
|
69
71
|
},
|
|
70
72
|
emits: ["close-level"],
|
|
71
|
-
setup(g, { expose:
|
|
72
|
-
let
|
|
73
|
+
setup(g, { expose: $e, emit: et }) {
|
|
74
|
+
let E = g, tt = et, nt = we("search", ae), rt = u(() => E.slotDepth ?? E.level), D = ve(), { inSheet: O } = pe(), { t: k } = ce(), it = k("select.searchLabel"), at = k("common.emptyText"), ot = (e, t) => {
|
|
73
75
|
let n = t && t.length ? t : e.description == null ? ["label"] : ["label", "description"];
|
|
74
76
|
try {
|
|
75
77
|
return re(e, n);
|
|
76
78
|
} catch {
|
|
77
79
|
return [];
|
|
78
80
|
}
|
|
79
|
-
},
|
|
80
|
-
if (!e.searchable || !e.id ||
|
|
81
|
-
let t =
|
|
82
|
-
if (!t ||
|
|
83
|
-
let n = e.filterBy, r = n === !1 ? e.items : [...e.items.filter((e) => e.placeholder), ...ie(e.items.filter((e) => !e.placeholder), (e) =>
|
|
81
|
+
}, A = u(() => E.groups.map((e) => mt(lt(e)))), j = (e) => !!e.id && (e.minQueryLength ?? 0) > 0 && [...D.queryFor(e.id).trim()].length < e.minQueryLength, st = (e) => (e.minQueryLength ?? 0) > 1 ? k("select.searchMinLength", e.minQueryLength).value : k("select.searchToStart").value, ct = (e) => `${V.value}_search-hint_${e}`, lt = (e) => {
|
|
82
|
+
if (!e.searchable || !e.id || D.isPipelineGroup(e.id)) return e;
|
|
83
|
+
let t = D.queryFor(e.id).trim();
|
|
84
|
+
if (!t || j(e)) return e;
|
|
85
|
+
let n = e.filterBy, r = n === !1 ? e.items : [...e.items.filter((e) => e.placeholder), ...ie(e.items.filter((e) => !e.placeholder), (e) => ot(e, n), t, e.groupBy == null ? void 0 : (t) => dt(e, t))];
|
|
84
86
|
return r.length ? {
|
|
85
87
|
...e,
|
|
86
88
|
items: r
|
|
@@ -90,13 +92,13 @@ var Ne = {
|
|
|
90
92
|
rowKey: "__bb-dropdown:no-results__",
|
|
91
93
|
domKey: "no-results",
|
|
92
94
|
placeholder: "empty",
|
|
93
|
-
label:
|
|
95
|
+
label: D.emptyText.value ?? at.value,
|
|
94
96
|
disabled: !0
|
|
95
97
|
}]
|
|
96
98
|
};
|
|
97
|
-
},
|
|
99
|
+
}, ut = (e, t) => {
|
|
98
100
|
if (!t.placeholder) return "groupByValue" in t ? t.groupByValue : he(e.groupBy, t);
|
|
99
|
-
},
|
|
101
|
+
}, dt = (e, t) => {
|
|
100
102
|
if (!t.placeholder) {
|
|
101
103
|
if ("groupByValue" in t) {
|
|
102
104
|
let e = t.groupByValue;
|
|
@@ -104,16 +106,16 @@ var Ne = {
|
|
|
104
106
|
}
|
|
105
107
|
return me(e.groupBy, t);
|
|
106
108
|
}
|
|
107
|
-
},
|
|
109
|
+
}, ft = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), mt = (e) => {
|
|
108
110
|
if (e.groupBy == null) return e;
|
|
109
|
-
let t =
|
|
111
|
+
let t = pt.get(e.items);
|
|
110
112
|
if (!t) {
|
|
111
113
|
let n = /* @__PURE__ */ new Map();
|
|
112
114
|
for (let t of e.items) {
|
|
113
|
-
let r =
|
|
115
|
+
let r = dt(e, t), i = r === void 0 ? "" : `group-by:${r}`, a = n.get(i);
|
|
114
116
|
a || n.set(i, a = {
|
|
115
117
|
title: r,
|
|
116
|
-
value: r === void 0 ? void 0 :
|
|
118
|
+
value: r === void 0 ? void 0 : ut(e, t),
|
|
117
119
|
items: []
|
|
118
120
|
}), a.items.push(t);
|
|
119
121
|
}
|
|
@@ -130,60 +132,60 @@ var Ne = {
|
|
|
130
132
|
start: t.length,
|
|
131
133
|
items: n.items
|
|
132
134
|
}), t.push(...n.items);
|
|
133
|
-
|
|
135
|
+
pt.set(e.items, t), ft.set(t, a);
|
|
134
136
|
}
|
|
135
137
|
return {
|
|
136
138
|
...e,
|
|
137
139
|
items: t
|
|
138
140
|
};
|
|
139
|
-
},
|
|
141
|
+
}, ht = (e) => ft.get(e.items) ?? [{
|
|
140
142
|
key: "",
|
|
141
143
|
index: -1,
|
|
142
144
|
start: 0,
|
|
143
145
|
items: e.items
|
|
144
|
-
}],
|
|
145
|
-
|
|
146
|
-
let
|
|
146
|
+
}], M = (e, { slots: t, attrs: n }) => e.titled ? Ee("div", n, t.default?.()) : t.default?.();
|
|
147
|
+
M.props = ["titled"], M.inheritAttrs = !1;
|
|
148
|
+
let gt = (e) => [e.id ? D.slots[`${s(e.id)}:group`] : void 0, D.slots.group], _t = (e) => ({
|
|
147
149
|
text: e.title ?? "",
|
|
148
150
|
item: e.value,
|
|
149
151
|
index: e.index,
|
|
150
152
|
length: e.items.length,
|
|
151
153
|
disabled: e.items.every((e) => !!e.disabled)
|
|
152
|
-
}),
|
|
153
|
-
if (
|
|
154
|
+
}), vt = u(() => {
|
|
155
|
+
if (E.level === 0) for (let [e, t] of A.value.entries()) {
|
|
154
156
|
let n = t.items.find((e) => e.placeholder);
|
|
155
157
|
if (n) return {
|
|
156
158
|
gi: e,
|
|
157
159
|
item: n
|
|
158
160
|
};
|
|
159
161
|
}
|
|
160
|
-
}),
|
|
161
|
-
t instanceof HTMLElement ?
|
|
162
|
-
},
|
|
163
|
-
let e =
|
|
164
|
-
if (t !==
|
|
162
|
+
}), N = {}, yt = (e, t) => {
|
|
163
|
+
t instanceof HTMLElement ? N[e] = t : delete N[e];
|
|
164
|
+
}, bt, P = E.level !== 0 || typeof MutationObserver > "u" ? void 0 : new MutationObserver(() => F()), F = () => {
|
|
165
|
+
let e = vt.value, t = e ? N[e.gi] : void 0;
|
|
166
|
+
if (t !== bt && (P?.disconnect(), bt = t, t && P?.observe(t, {
|
|
165
167
|
characterData: !0,
|
|
166
168
|
childList: !0,
|
|
167
169
|
subtree: !0
|
|
168
|
-
})),
|
|
169
|
-
let n = t && e &&
|
|
170
|
-
|
|
170
|
+
})), E.level !== 0) return;
|
|
171
|
+
let n = t && e && R(e.item) ? t.textContent?.replace(/\s+/g, " ").trim() : void 0;
|
|
172
|
+
D.setStatus(n || e?.item.label);
|
|
171
173
|
};
|
|
172
|
-
|
|
174
|
+
v(F), v(() => {
|
|
173
175
|
xe(), ye();
|
|
174
|
-
}),
|
|
175
|
-
for (let e of
|
|
176
|
+
}), je(F), w(vt, F, { flush: "post" }), Ae(() => P?.disconnect()), Ne(() => {
|
|
177
|
+
for (let e of E.groups) e.id && D.isPipelineGroup(e.id) && D.activateGroup(e.id);
|
|
176
178
|
});
|
|
177
|
-
let
|
|
179
|
+
let I = b({}), xt = (e, t) => {
|
|
178
180
|
let n = ne(t);
|
|
179
|
-
n instanceof HTMLInputElement ?
|
|
180
|
-
}, St = u(() =>
|
|
181
|
-
if (
|
|
182
|
-
let t = e.maxHeight ?? (e.searchable ?
|
|
181
|
+
n instanceof HTMLInputElement ? I.value[e] = n : delete I.value[e];
|
|
182
|
+
}, St = u(() => A.value.find((e) => e.searchable && e.id)?.id), Ct = (e) => {
|
|
183
|
+
if (O.value) return;
|
|
184
|
+
let t = e.maxHeight ?? (e.searchable ? Ye : void 0);
|
|
183
185
|
if (t != null && t !== 0 && t !== "none") return typeof t == "number" ? `${t}px` : t;
|
|
184
186
|
}, wt = (e) => _e(e).map((e) => e.selectable ? {
|
|
185
187
|
...e,
|
|
186
|
-
selected:
|
|
188
|
+
selected: D.selectedFor(e.id ?? "")
|
|
187
189
|
} : e), Tt = /* @__PURE__ */ new WeakMap(), Et = (e) => {
|
|
188
190
|
let t = Tt.get(e);
|
|
189
191
|
return t === void 0 && Tt.set(e, t = Dt(e)), t;
|
|
@@ -194,20 +196,20 @@ var Ne = {
|
|
|
194
196
|
return typeof t == "number" ? s(String(t)) : typeof t == "string" && t !== "" ? s(t) : null;
|
|
195
197
|
}, Ot = (e, t) => {
|
|
196
198
|
let n = Et(e);
|
|
197
|
-
if (n !== null) return
|
|
199
|
+
if (n !== null) return D.slots[t ? `${n}:${t}` : n];
|
|
198
200
|
}, kt = (e, t, n) => Ot(t, n) ?? At(e, n), At = (e, t) => {
|
|
199
201
|
if (!e.id) return;
|
|
200
202
|
let n = `${s(e.id)}:item`;
|
|
201
|
-
return
|
|
202
|
-
}, jt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__item--variant-${e.variant}` : void 0, Mt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__group-
|
|
203
|
+
return D.slots[t ? `${n}:${t}` : n];
|
|
204
|
+
}, jt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__item--variant-${e.variant}` : void 0, Mt = (e) => e.variant && e.variant !== "default" ? `bb-dropdown__group-label--variant-${e.variant}` : void 0, Nt = (e) => e.selectable ? e.multiple ? "menuitemcheckbox" : "menuitemradio" : "menuitem", Pt = (e, t) => e.selected.includes(t.rowKey), Ft = /* @__PURE__ */ new WeakMap(), It = (e, t) => {
|
|
203
205
|
let n = Object.keys(e);
|
|
204
206
|
return n.length === Object.keys(t).length && n.every((n) => n === "selected" || e[n] === t[n]);
|
|
205
207
|
}, Lt = (e) => {
|
|
206
208
|
let t = Ft.get(e.items);
|
|
207
209
|
return t && It(t, e) ? t : (Ft.set(e.items, e), e);
|
|
208
|
-
},
|
|
210
|
+
}, L = (e) => {
|
|
209
211
|
let t = 0;
|
|
210
|
-
for (let n = 0; n < e; n++) t +=
|
|
212
|
+
for (let n = 0; n < e; n++) t += A.value[n]?.items.length ?? 0;
|
|
211
213
|
return t;
|
|
212
214
|
}, Rt = /* @__PURE__ */ new Set([...t.filter((e) => e !== "text" && e !== "disabled")]), zt = (e) => {
|
|
213
215
|
let t = {};
|
|
@@ -216,106 +218,106 @@ var Ne = {
|
|
|
216
218
|
}, Bt = (e, t, n, r, i) => {
|
|
217
219
|
let a = Vt("item", t, r, i);
|
|
218
220
|
return _(zt(t), {
|
|
219
|
-
"aria-busy":
|
|
221
|
+
"aria-busy": D.isItemLoading(t.rowKey) || void 0,
|
|
220
222
|
"aria-checked": e.selectable ? r : void 0,
|
|
221
|
-
"aria-labelledby":
|
|
222
|
-
"aria-expanded": t.items ?
|
|
223
|
-
"aria-haspopup": t.items ?
|
|
224
|
-
"aria-controls": t.items &&
|
|
223
|
+
"aria-labelledby": $t(e, t, n, a),
|
|
224
|
+
"aria-expanded": t.items ? J.value === t.rowKey : void 0,
|
|
225
|
+
"aria-haspopup": t.items ? nn(t) ? "dialog" : "menu" : void 0,
|
|
226
|
+
"aria-controls": t.items && J.value === t.rowKey ? rn(t) : void 0,
|
|
225
227
|
class: [jt(t), {
|
|
226
228
|
"bb-dropdown__item--selected": r,
|
|
227
229
|
"bb-dropdown__item--has-submenu": !!t.items,
|
|
228
230
|
"bb-dropdown__item--description": !!t.description
|
|
229
231
|
}],
|
|
230
232
|
"data-dropdown-item": "",
|
|
231
|
-
disabled: t.disabled ||
|
|
233
|
+
disabled: t.disabled || D.disabled.value,
|
|
232
234
|
role: Nt(e),
|
|
233
235
|
tabindex: -1,
|
|
234
|
-
onClick: (r) =>
|
|
235
|
-
onKeydown: (e) =>
|
|
236
|
-
onMousedown: (t) =>
|
|
237
|
-
onPointerenter: (e) =>
|
|
238
|
-
onPointerleave: (e) =>
|
|
239
|
-
}, a, { "aria-describedby":
|
|
236
|
+
onClick: (r) => Xn(e, t, n, r),
|
|
237
|
+
onKeydown: (e) => Zn(t, n, e),
|
|
238
|
+
onMousedown: (t) => Yn(e, t),
|
|
239
|
+
onPointerenter: (e) => Gn(t, n, e),
|
|
240
|
+
onPointerleave: (e) => qn(t, e)
|
|
241
|
+
}, a, { "aria-describedby": en(e, t, n, a) });
|
|
240
242
|
};
|
|
241
243
|
function Vt(e, t, n, r) {
|
|
242
|
-
return
|
|
244
|
+
return D.passthrough.part(e, {
|
|
243
245
|
selected: n,
|
|
244
|
-
disabled: t.disabled ||
|
|
246
|
+
disabled: t.disabled || D.disabled.value || void 0,
|
|
245
247
|
activeLink: !!r?.activeLink,
|
|
246
248
|
exactActiveLink: !!r?.exactActiveLink
|
|
247
|
-
},
|
|
249
|
+
}, Wt(t), t.variant ?? "default");
|
|
248
250
|
}
|
|
249
|
-
let Ht = (e) =>
|
|
251
|
+
let Ht = (e) => D.passthrough.part("submenu", {}, Wt(e), e.variant ?? "default"), Ut = (e, t) => t.placeholder === "failed" && !!e.id && D.isTopLevelPipeline(e.id), R = (e) => e.placeholder === "loading" ? D.slots.loading : e.placeholder === "empty" ? D.slots.empty : void 0, Wt = (e) => {
|
|
250
252
|
let { rowKey: t, domKey: n, keyless: r, groupByValue: i, ...a } = e;
|
|
251
253
|
return a;
|
|
252
|
-
},
|
|
254
|
+
}, Gt = (e) => ({
|
|
253
255
|
id: e.id,
|
|
254
256
|
label: e.label,
|
|
255
257
|
meta: e.meta,
|
|
256
258
|
multiple: e.multiple,
|
|
257
259
|
selectable: e.selectable
|
|
258
|
-
}),
|
|
259
|
-
disabled: t.disabled ||
|
|
260
|
-
group:
|
|
260
|
+
}), Kt = (e, t, n, r, i) => ({
|
|
261
|
+
disabled: t.disabled || D.disabled.value,
|
|
262
|
+
group: Gt(e),
|
|
261
263
|
groupTitle: !1,
|
|
262
264
|
index: n,
|
|
263
|
-
item:
|
|
264
|
-
level:
|
|
265
|
+
item: Wt(t),
|
|
266
|
+
level: rt.value,
|
|
265
267
|
selected: r,
|
|
266
|
-
loading:
|
|
267
|
-
open:
|
|
268
|
-
placement:
|
|
268
|
+
loading: D.isItemLoading(t.rowKey),
|
|
269
|
+
open: D.open.value,
|
|
270
|
+
placement: D.placement.value,
|
|
269
271
|
label: t.label,
|
|
270
272
|
description: t.description,
|
|
271
273
|
activeLink: !!i?.activeLink,
|
|
272
274
|
exactActiveLink: !!i?.exactActiveLink
|
|
273
|
-
}),
|
|
274
|
-
if (e.id) return
|
|
275
|
-
},
|
|
275
|
+
}), z = (e, t = "label") => {
|
|
276
|
+
if (e.id) return D.slots[`${s(e.id)}:${t}`];
|
|
277
|
+
}, B = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!z(e) || !!z(e, "prepend") || !!z(e, "append")), qt = (e) => !e.id || !e.selectable || !e.multiple ? [] : D.selectedChipsFor(e.id), V = oe().id, Jt = (e) => `${V.value}_group-title_${e}`, Yt = (e, t) => `${V.value}_group-by-title_${e}_${s(t) || "none"}`, Xt = (e) => `${V.value}_row-text_${e}`, Zt = (e) => `${V.value}_row-description_${e}`, Qt = (e, t) => !!t.description && !kt(e, t), $t = (e, t, n, r) => Qt(e, t) && !r["aria-label"] && !r["aria-labelledby"] ? Xt(n) : r["aria-labelledby"], en = (e, t, n, r) => {
|
|
276
278
|
let i = r["aria-describedby"];
|
|
277
|
-
return
|
|
278
|
-
},
|
|
279
|
-
disabled:
|
|
280
|
-
group:
|
|
279
|
+
return Qt(e, t) ? [i, Zt(n)].filter(Boolean).join(" ") : i;
|
|
280
|
+
}, tn = u(() => ge(A.value)), nn = (e) => !!e.items && ge(wt(e.items)), rn = (e) => `submenu_${D.rootId}_${e.domKey}`, an = (e) => tn.value ? "menu" : B(e) ? "group" : "none", on = (e, t) => B(e) ? Jt(t) : void 0, sn = (e, t) => ({
|
|
281
|
+
disabled: D.disabled.value,
|
|
282
|
+
group: Gt(e),
|
|
281
283
|
groupTitle: !0,
|
|
282
284
|
index: t,
|
|
283
285
|
item: e,
|
|
284
|
-
level:
|
|
286
|
+
level: rt.value,
|
|
285
287
|
selected: !1,
|
|
286
288
|
loading: !1,
|
|
287
|
-
open:
|
|
288
|
-
placement:
|
|
289
|
+
open: D.open.value,
|
|
290
|
+
placement: D.placement.value,
|
|
289
291
|
label: e.label
|
|
290
|
-
}),
|
|
292
|
+
}), cn = (e) => e.key === "Escape" || e.key === "Esc", ln = (t) => {
|
|
291
293
|
let { key: n, currentTarget: r } = t;
|
|
292
294
|
return n !== "ArrowLeft" && n !== "ArrowRight" || !(r instanceof Element) || !e(r) ? n : n === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
|
|
293
|
-
}, H =
|
|
295
|
+
}, H = b({}), un = (e, t) => {
|
|
294
296
|
let n = ne(t);
|
|
295
297
|
n ? H.value[e] = n : delete H.value[e];
|
|
296
|
-
},
|
|
298
|
+
}, dn = b({}), fn = (e, t) => {
|
|
297
299
|
let n = ne(t);
|
|
298
|
-
n instanceof HTMLElement ?
|
|
299
|
-
},
|
|
300
|
+
n instanceof HTMLElement ? dn.value[e] = n : delete dn.value[e];
|
|
301
|
+
}, U = () => {
|
|
300
302
|
let e = [], t = 0;
|
|
301
|
-
for (let n of
|
|
302
|
-
n.onClick &&
|
|
303
|
-
for (let r of n.items) r.disabled ||
|
|
303
|
+
for (let n of A.value) {
|
|
304
|
+
n.onClick && B(n) && e.push(t - .5);
|
|
305
|
+
for (let r of n.items) r.disabled || D.disabled.value || e.push(t), t++;
|
|
304
306
|
}
|
|
305
307
|
return e;
|
|
306
|
-
},
|
|
308
|
+
}, pn = (e) => {
|
|
307
309
|
let t = 0;
|
|
308
|
-
for (let n = 0; n <
|
|
310
|
+
for (let n = 0; n < A.value.length; n++) {
|
|
309
311
|
if (t - .5 === e) return n;
|
|
310
|
-
t +=
|
|
312
|
+
t += A.value[n].items.length;
|
|
311
313
|
}
|
|
312
314
|
return -1;
|
|
313
|
-
},
|
|
315
|
+
}, W = (e, t) => {
|
|
314
316
|
if (e == null) return;
|
|
315
|
-
let n = Number.isInteger(e) ? H.value[e] :
|
|
316
|
-
t === void 0 ? n?.focus() : t ? Ce(n) : Se(n), t !== void 0 && n &&
|
|
317
|
-
},
|
|
318
|
-
let t = e.closest(".bb-
|
|
317
|
+
let n = Number.isInteger(e) ? H.value[e] : dn.value[pn(e)];
|
|
318
|
+
t === void 0 ? n?.focus() : t ? Ce(n) : Se(n), t !== void 0 && n && mn(n);
|
|
319
|
+
}, mn = (e) => {
|
|
320
|
+
let t = e.closest(".bb-dropdown__group-section")?.querySelector(":scope > .bb-dropdown__group-header");
|
|
319
321
|
if (!t) return;
|
|
320
322
|
let n = t.parentElement;
|
|
321
323
|
for (; n && n.scrollHeight <= n.clientHeight;) n = n.parentElement;
|
|
@@ -324,382 +326,386 @@ var Ne = {
|
|
|
324
326
|
if (r <= 0) return;
|
|
325
327
|
n.scrollTop -= r;
|
|
326
328
|
}
|
|
327
|
-
},
|
|
329
|
+
}, hn = (e, t) => {
|
|
330
|
+
t.type === "input" && t.isComposing || D.setQuery(e, t.target.value);
|
|
331
|
+
}, gn = () => Object.values(I.value).some((e) => e === document.activeElement);
|
|
328
332
|
se({
|
|
329
|
-
active:
|
|
330
|
-
input: () => Object.values(
|
|
333
|
+
active: O,
|
|
334
|
+
input: () => Object.values(I.value).find((e) => e === document.activeElement) ?? null
|
|
331
335
|
});
|
|
332
|
-
let
|
|
336
|
+
let _n = () => {
|
|
333
337
|
let e = St.value;
|
|
334
|
-
return e ? (
|
|
335
|
-
},
|
|
338
|
+
return e ? (I.value[e]?.focus(), !0) : !1;
|
|
339
|
+
}, vn = (e) => W(U()[0], e), yn = (e) => {
|
|
336
340
|
let t = 0;
|
|
337
|
-
for (let n of
|
|
341
|
+
for (let n of A.value) for (let r of n.items) {
|
|
338
342
|
if (r.rowKey === e) return t;
|
|
339
343
|
t++;
|
|
340
344
|
}
|
|
341
345
|
return -1;
|
|
342
|
-
},
|
|
343
|
-
let n =
|
|
346
|
+
}, G = (e, t) => {
|
|
347
|
+
let n = U();
|
|
344
348
|
if (!n.length) return;
|
|
345
349
|
let r = n.indexOf(e), i = r === -1 ? t > 0 ? 0 : n.length - 1 : (r + t + n.length) % n.length;
|
|
346
|
-
|
|
350
|
+
W(n[i], !0);
|
|
351
|
+
}, K = (e) => {
|
|
352
|
+
(O.value || !_n()) && vn(e);
|
|
347
353
|
}, q = (e) => {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
n === -1 ? q(t) : G(n, t);
|
|
355
|
-
}, _n = (e) => {
|
|
354
|
+
let t = U();
|
|
355
|
+
W(t[t.length - 1], e);
|
|
356
|
+
}, bn = (e, t) => {
|
|
357
|
+
let n = yn(e);
|
|
358
|
+
n === -1 ? K(t) : W(n, t);
|
|
359
|
+
}, xn = (e) => {
|
|
356
360
|
let t = 0;
|
|
357
|
-
for (let n of
|
|
361
|
+
for (let n of A.value) for (let r of n.items) {
|
|
358
362
|
if (t === e) return r;
|
|
359
363
|
t++;
|
|
360
364
|
}
|
|
361
|
-
},
|
|
362
|
-
candidates: () =>
|
|
363
|
-
getTokens: (e) => [de(
|
|
365
|
+
}, Sn = le(), Cn = fe({
|
|
366
|
+
candidates: () => U().filter(Number.isInteger),
|
|
367
|
+
getTokens: (e) => [de(xn(e)?.label ?? "", Sn.locale)],
|
|
364
368
|
getCurrent: () => {
|
|
365
369
|
let e = Object.entries(H.value).find(([, e]) => e === document.activeElement);
|
|
366
370
|
return e ? Number(e[0]) : void 0;
|
|
367
371
|
},
|
|
368
|
-
onMatch: (e) =>
|
|
369
|
-
locale: () =>
|
|
370
|
-
}),
|
|
371
|
-
ue(e) &&
|
|
372
|
-
},
|
|
373
|
-
ArrowDown: () =>
|
|
374
|
-
ArrowUp: () =>
|
|
375
|
-
Down: () =>
|
|
376
|
-
Esc: () =>
|
|
377
|
-
Escape: () =>
|
|
378
|
-
Up: () =>
|
|
379
|
-
},
|
|
380
|
-
if (o(e) ||
|
|
381
|
-
let t =
|
|
372
|
+
onMatch: (e) => W(e, !0),
|
|
373
|
+
locale: () => Sn.locale
|
|
374
|
+
}), wn = (e) => {
|
|
375
|
+
ue(e) && Cn.onKeydown(e);
|
|
376
|
+
}, Tn = {
|
|
377
|
+
ArrowDown: () => vn(!0),
|
|
378
|
+
ArrowUp: () => q(!0),
|
|
379
|
+
Down: () => vn(!0),
|
|
380
|
+
Esc: () => D.close(),
|
|
381
|
+
Escape: () => D.close(),
|
|
382
|
+
Up: () => q(!0)
|
|
383
|
+
}, En = (e) => {
|
|
384
|
+
if (o(e) || E.level > 0 && cn(e)) return;
|
|
385
|
+
let t = Tn[e.key];
|
|
382
386
|
t && (e.stopPropagation(), e.preventDefault(), t());
|
|
383
387
|
};
|
|
384
|
-
|
|
385
|
-
|
|
388
|
+
v(() => {
|
|
389
|
+
E.level === 0 && St.value && !O.value && De(() => _n());
|
|
386
390
|
});
|
|
387
|
-
let
|
|
388
|
-
|
|
389
|
-
t != null &&
|
|
390
|
-
|
|
391
|
-
},
|
|
391
|
+
let J = b(null), Dn = b({}), Y, X, On = 0, kn = b(null), An;
|
|
392
|
+
w(J, (e, t) => {
|
|
393
|
+
t != null && D.open.value && Ln(t) && W(yn(t)), clearTimeout(An), kn.value = t ?? null, t != null && (An = setTimeout(() => {
|
|
394
|
+
kn.value = null;
|
|
395
|
+
}, Qe));
|
|
392
396
|
});
|
|
393
|
-
let
|
|
397
|
+
let jn = (e) => J.value !== e && kn.value !== e, Mn = b(0), Nn = b("right-start"), Pn = () => {
|
|
394
398
|
let t = Object.values(H.value)[0], n = t?.closest(".bb-dropdown");
|
|
395
399
|
if (!t || !n) return;
|
|
396
400
|
let r = e(t);
|
|
397
|
-
|
|
401
|
+
Nn.value = r ? "left-start" : "right-start";
|
|
398
402
|
let i = n.getBoundingClientRect(), a = t.getBoundingClientRect();
|
|
399
|
-
|
|
400
|
-
},
|
|
401
|
-
t instanceof HTMLElement ?
|
|
402
|
-
},
|
|
403
|
-
|
|
404
|
-
},
|
|
405
|
-
t ?
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
clearTimeout(
|
|
403
|
+
Mn.value = Math.max(0, r ? a.left - i.left : i.right - a.right);
|
|
404
|
+
}, Fn = {}, In = (e, t) => {
|
|
405
|
+
t instanceof HTMLElement ? Fn[e] = t : delete Fn[e];
|
|
406
|
+
}, Ln = (e) => !!Fn[e]?.contains(document.activeElement), Rn = (e, t) => {
|
|
407
|
+
cn(t) && !t.defaultPrevented && !o(t) && D.ownsEscape() && (t.preventDefault(), t.stopPropagation(), Wn(e));
|
|
408
|
+
}, zn = (e, t) => {
|
|
409
|
+
t ? Dn.value[e] = t : delete Dn.value[e];
|
|
410
|
+
}, Z = () => clearTimeout(Y), Q = () => clearTimeout(X);
|
|
411
|
+
Ae(() => {
|
|
412
|
+
clearTimeout(X), clearTimeout(Y), clearTimeout(An);
|
|
409
413
|
});
|
|
410
|
-
let
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
},
|
|
414
|
-
},
|
|
414
|
+
let Bn = (e) => {
|
|
415
|
+
Q(), clearTimeout(Y), Y = setTimeout(() => {
|
|
416
|
+
J.value === e && (J.value = null);
|
|
417
|
+
}, Xe);
|
|
418
|
+
}, Vn = (e) => {
|
|
415
419
|
let t = e.trim();
|
|
416
420
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) || 0 : t.endsWith("s") ? (Number.parseFloat(t) || 0) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
417
|
-
},
|
|
421
|
+
}, Hn = (e) => {
|
|
418
422
|
let t = H.value[e];
|
|
419
423
|
if (!t) return 0;
|
|
420
424
|
let n = t.closest(".bb-common-popover");
|
|
421
425
|
if (!n) return 0;
|
|
422
|
-
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i =
|
|
426
|
+
let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i = Vn(r);
|
|
423
427
|
if (!i) return 0;
|
|
424
|
-
let a = performance.now() -
|
|
428
|
+
let a = performance.now() - On;
|
|
425
429
|
return Math.max(0, i - a + 16);
|
|
426
|
-
},
|
|
427
|
-
|
|
430
|
+
}, $ = async (e, t) => {
|
|
431
|
+
Z(), Pn(), J.value = e, t !== void 0 && (await De(), Dn.value[e]?.focusFirst(t));
|
|
428
432
|
};
|
|
429
|
-
|
|
430
|
-
e ?
|
|
433
|
+
w(D.open, (e) => {
|
|
434
|
+
e ? On = performance.now() : (Q(), Z(), J.value = null);
|
|
431
435
|
});
|
|
432
|
-
let
|
|
433
|
-
t ?
|
|
434
|
-
},
|
|
435
|
-
|
|
436
|
-
},
|
|
436
|
+
let Un = (e, t) => {
|
|
437
|
+
t ? J.value = e : J.value === e && (J.value = null);
|
|
438
|
+
}, Wn = (e) => {
|
|
439
|
+
J.value = null, De(() => W(e, !0));
|
|
440
|
+
}, Gn = (e, t, n) => {
|
|
437
441
|
if (n.pointerType !== "mouse" || be(n)) return;
|
|
438
|
-
if (
|
|
439
|
-
|
|
442
|
+
if (Z(), Q(), J.value !== null && J.value === e.rowKey) {
|
|
443
|
+
Ln(e.rowKey) || W(t);
|
|
440
444
|
return;
|
|
441
445
|
}
|
|
442
446
|
let r = () => {
|
|
443
|
-
|
|
447
|
+
W(t), e.items ? $(e.rowKey) : J.value = null;
|
|
444
448
|
};
|
|
445
|
-
if (
|
|
446
|
-
let e =
|
|
447
|
-
e >= 0 && Math.abs(t - e) <= 1 ?
|
|
449
|
+
if (J.value !== null) {
|
|
450
|
+
let e = yn(J.value);
|
|
451
|
+
e >= 0 && Math.abs(t - e) <= 1 ? X = setTimeout(r, Ze) : r();
|
|
448
452
|
return;
|
|
449
453
|
}
|
|
450
|
-
let i = e.items ?
|
|
451
|
-
i ?
|
|
452
|
-
},
|
|
453
|
-
|
|
454
|
-
},
|
|
455
|
-
t.pointerType === "mouse" && e.items &&
|
|
456
|
-
},
|
|
457
|
-
t.pointerType === "mouse" &&
|
|
458
|
-
},
|
|
454
|
+
let i = e.items ? Hn(t) : 0;
|
|
455
|
+
i ? X = setTimeout(r, i) : r();
|
|
456
|
+
}, Kn = () => {
|
|
457
|
+
Z(), Q();
|
|
458
|
+
}, qn = (e, t) => {
|
|
459
|
+
t.pointerType === "mouse" && e.items && Bn(e.rowKey);
|
|
460
|
+
}, Jn = (e, t) => {
|
|
461
|
+
t.pointerType === "mouse" && Bn(e);
|
|
462
|
+
}, Yn = (e, t) => {
|
|
459
463
|
e.searchable && t.preventDefault();
|
|
460
|
-
},
|
|
461
|
-
t.disabled ||
|
|
462
|
-
},
|
|
463
|
-
switch (
|
|
464
|
+
}, Xn = (e, t, n, r) => {
|
|
465
|
+
t.disabled || D.disabled.value || D.isItemLoading(t.rowKey) || (t.items ? (r.stopPropagation(), Z(), Q(), E.navigate ? E.navigate(t) : $(t.rowKey, r.detail === 0)) : e.selectable && e.id ? (r.stopPropagation(), D.toggleSelect(e, t), D.runItemAction(t, r), gn() || W(n)) : (r.stopPropagation(), D.runItemAction(t, r, { close: !0 })));
|
|
466
|
+
}, Zn = (e, t, n) => {
|
|
467
|
+
switch (ln(n)) {
|
|
464
468
|
case "ArrowDown":
|
|
465
|
-
n.preventDefault(),
|
|
469
|
+
n.preventDefault(), Q(), Z(), J.value = null, G(t, 1);
|
|
466
470
|
break;
|
|
467
471
|
case "ArrowUp":
|
|
468
|
-
n.preventDefault(),
|
|
472
|
+
n.preventDefault(), Q(), Z(), J.value = null, G(t, -1);
|
|
469
473
|
break;
|
|
470
474
|
case "Home":
|
|
471
|
-
n.preventDefault(),
|
|
475
|
+
n.preventDefault(), K(!0);
|
|
472
476
|
break;
|
|
473
477
|
case "End":
|
|
474
|
-
n.preventDefault(),
|
|
478
|
+
n.preventDefault(), q(!0);
|
|
475
479
|
break;
|
|
476
480
|
case "ArrowRight":
|
|
477
|
-
e.items && (n.preventDefault(), n.stopPropagation(),
|
|
481
|
+
e.items && (n.preventDefault(), n.stopPropagation(), E.navigate ? E.navigate(e) : $(e.rowKey, !0));
|
|
478
482
|
break;
|
|
479
483
|
case "ArrowLeft":
|
|
480
|
-
|
|
484
|
+
E.back ? (n.preventDefault(), n.stopPropagation(), E.back()) : E.level > 0 && (n.preventDefault(), n.stopPropagation(), tt("close-level"));
|
|
481
485
|
break;
|
|
482
|
-
default:
|
|
486
|
+
default: wn(n);
|
|
483
487
|
}
|
|
484
|
-
},
|
|
485
|
-
let n =
|
|
486
|
-
switch (
|
|
488
|
+
}, Qn = (e, t) => {
|
|
489
|
+
let n = L(e) - .5;
|
|
490
|
+
switch (ln(t)) {
|
|
487
491
|
case "ArrowDown":
|
|
488
|
-
t.preventDefault(),
|
|
492
|
+
t.preventDefault(), G(n, 1);
|
|
489
493
|
break;
|
|
490
494
|
case "ArrowUp":
|
|
491
|
-
t.preventDefault(),
|
|
495
|
+
t.preventDefault(), G(n, -1);
|
|
492
496
|
break;
|
|
493
497
|
case "Home":
|
|
494
|
-
t.preventDefault(),
|
|
498
|
+
t.preventDefault(), K(!0);
|
|
495
499
|
break;
|
|
496
500
|
case "End":
|
|
497
|
-
t.preventDefault(),
|
|
501
|
+
t.preventDefault(), q(!0);
|
|
498
502
|
break;
|
|
499
503
|
case "ArrowLeft":
|
|
500
|
-
|
|
504
|
+
E.back ? (t.preventDefault(), t.stopPropagation(), E.back()) : E.level > 0 && (t.preventDefault(), t.stopPropagation(), tt("close-level"));
|
|
501
505
|
break;
|
|
502
|
-
default:
|
|
506
|
+
default: wn(t);
|
|
503
507
|
}
|
|
504
|
-
},
|
|
505
|
-
slots:
|
|
506
|
-
setItemEl:
|
|
508
|
+
}, $n = {
|
|
509
|
+
slots: D.slots,
|
|
510
|
+
setItemEl: un,
|
|
507
511
|
itemAttrs: Bt,
|
|
508
512
|
rowPart: Vt,
|
|
509
|
-
slotProps:
|
|
513
|
+
slotProps: Kt,
|
|
510
514
|
rowSlot: kt,
|
|
511
515
|
itemSlot: Ot,
|
|
512
516
|
groupRowSlot: At,
|
|
513
|
-
rowTextId:
|
|
514
|
-
rowDescriptionId:
|
|
517
|
+
rowTextId: Xt,
|
|
518
|
+
rowDescriptionId: Zt
|
|
515
519
|
};
|
|
516
|
-
return
|
|
517
|
-
focusFirst:
|
|
518
|
-
focusLast:
|
|
519
|
-
focusRow:
|
|
520
|
-
}), (e, t) => (
|
|
521
|
-
e.divider ? (
|
|
522
|
-
|
|
520
|
+
return $e({
|
|
521
|
+
focusFirst: K,
|
|
522
|
+
focusLast: q,
|
|
523
|
+
focusRow: bn
|
|
524
|
+
}), (e, t) => (y(!0), p(l, null, x(A.value, (e, o) => (y(), p(l, { key: e.id ?? o }, [
|
|
525
|
+
e.divider ? (y(), p("hr", Ie)) : f("", !0),
|
|
526
|
+
B(e) ? (y(), p("div", _({
|
|
523
527
|
key: 1,
|
|
524
|
-
id:
|
|
528
|
+
id: Jt(o),
|
|
525
529
|
ref_for: !0,
|
|
526
|
-
ref: (e) =>
|
|
527
|
-
class:
|
|
530
|
+
ref: (e) => fn(o, e),
|
|
531
|
+
class: ["bb-dropdown__group-label", Mt(e)]
|
|
532
|
+
}, { ref_for: !0 }, C(D).passthrough.groupLabel, {
|
|
528
533
|
role: e.onClick ? "menuitem" : "presentation",
|
|
529
534
|
tabindex: e.onClick ? -1 : void 0,
|
|
530
535
|
onClick: (t) => e.onClick?.(t),
|
|
531
536
|
onKeydown: [
|
|
532
|
-
(t) => e.onClick &&
|
|
533
|
-
|
|
534
|
-
|
|
537
|
+
(t) => e.onClick && Qn(o, t),
|
|
538
|
+
Pe((t) => e.onClick?.(t), ["enter"]),
|
|
539
|
+
Pe(Fe((t) => e.onClick?.(t), ["prevent"]), ["space"])
|
|
535
540
|
]
|
|
536
|
-
}, [
|
|
537
|
-
h(
|
|
538
|
-
props:
|
|
539
|
-
slots: [
|
|
541
|
+
}), [
|
|
542
|
+
h(C(c), {
|
|
543
|
+
props: sn(e, L(o)),
|
|
544
|
+
slots: [z(e, "prepend"), C(D).slots["item:prepend"]]
|
|
540
545
|
}, {
|
|
541
|
-
default:
|
|
546
|
+
default: T(() => [e["prepend:icon"] ? (y(), d(r, {
|
|
542
547
|
key: 0,
|
|
543
|
-
class: "group-
|
|
548
|
+
class: "group-label__prepend-icon",
|
|
544
549
|
icon: e["prepend:icon"]
|
|
545
550
|
}, null, 8, ["icon"])) : f("", !0)]),
|
|
546
551
|
_: 2
|
|
547
552
|
}, 1032, ["props", "slots"]),
|
|
548
|
-
h(
|
|
549
|
-
props:
|
|
550
|
-
slots: [
|
|
553
|
+
h(C(c), {
|
|
554
|
+
props: sn(e, L(o)),
|
|
555
|
+
slots: [z(e)]
|
|
551
556
|
}, {
|
|
552
|
-
default:
|
|
557
|
+
default: T(() => [e.label ? (y(), p("span", Re, S(e.label), 1)) : f("", !0)]),
|
|
553
558
|
_: 2
|
|
554
559
|
}, 1032, ["props", "slots"]),
|
|
555
|
-
h(
|
|
556
|
-
props:
|
|
557
|
-
slots: [
|
|
560
|
+
h(C(c), {
|
|
561
|
+
props: sn(e, L(o)),
|
|
562
|
+
slots: [z(e, "append"), C(D).slots["item:append"]]
|
|
558
563
|
}, {
|
|
559
|
-
default:
|
|
564
|
+
default: T(() => [e["append:icon"] ? (y(), d(r, {
|
|
560
565
|
key: 0,
|
|
561
|
-
class: "group-
|
|
566
|
+
class: "group-label__append-icon",
|
|
562
567
|
icon: e["append:icon"]
|
|
563
568
|
}, null, 8, ["icon"])) : f("", !0)]),
|
|
564
569
|
_: 2
|
|
565
570
|
}, 1032, ["props", "slots"])
|
|
566
|
-
],
|
|
567
|
-
|
|
571
|
+
], 16, Le)) : f("", !0),
|
|
572
|
+
C(O) && qt(e).length ? (y(), p("div", ze, [m("div", Be, [(y(!0), p(l, null, x(qt(e), (r) => (y(), d(n, {
|
|
568
573
|
key: r.key,
|
|
569
574
|
class: "bb-dropdown__sheet-chip",
|
|
570
|
-
clearable: !
|
|
575
|
+
clearable: !C(D).disabled.value,
|
|
571
576
|
size: "xl",
|
|
572
577
|
variant: "secondary",
|
|
573
|
-
"onClick:clear": (t) =>
|
|
574
|
-
onMousedown: t[0] ||=
|
|
578
|
+
"onClick:clear": (t) => C(D).deselect(e.id, r.key),
|
|
579
|
+
onMousedown: t[0] ||= Fe(() => {}, ["prevent"])
|
|
575
580
|
}, {
|
|
576
|
-
default:
|
|
581
|
+
default: T(() => [Te(S(r.text), 1)]),
|
|
577
582
|
_: 2
|
|
578
583
|
}, 1032, ["clearable", "onClick:clear"]))), 128))])])) : f("", !0),
|
|
579
|
-
e.searchable && e.id ? (
|
|
584
|
+
e.searchable && e.id ? (y(), p("div", _({
|
|
580
585
|
key: 3,
|
|
581
586
|
class: "bb-dropdown__group-search",
|
|
582
587
|
role: "none"
|
|
583
|
-
}, { ref_for: !0 },
|
|
588
|
+
}, { ref_for: !0 }, C(D).passthrough.box), [
|
|
584
589
|
h(r, {
|
|
585
590
|
"aria-hidden": "true",
|
|
586
591
|
class: "bb-dropdown__search-icon",
|
|
587
592
|
focusable: "false",
|
|
588
|
-
icon:
|
|
593
|
+
icon: C(nt)
|
|
589
594
|
}, null, 8, ["icon"]),
|
|
590
595
|
m("input", _({
|
|
591
596
|
ref_for: !0,
|
|
592
597
|
ref: (t) => xt(e.id, t),
|
|
593
|
-
"aria-describedby":
|
|
594
|
-
"aria-label": e.searchPlaceholder ||
|
|
598
|
+
"aria-describedby": j(e) ? ct(o) : void 0,
|
|
599
|
+
"aria-label": e.searchPlaceholder || C(it),
|
|
595
600
|
autocomplete: "off",
|
|
596
601
|
class: "bb-dropdown__search-input",
|
|
597
|
-
placeholder: e.searchPlaceholder ||
|
|
602
|
+
placeholder: e.searchPlaceholder || C(it),
|
|
598
603
|
role: "searchbox",
|
|
599
604
|
type: "text",
|
|
600
|
-
value:
|
|
601
|
-
}, { ref_for: !0 },
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
605
|
+
value: C(D).queryFor(e.id)
|
|
606
|
+
}, { ref_for: !0 }, C(D).passthrough.input, {
|
|
607
|
+
onCompositionend: (t) => hn(e.id, t),
|
|
608
|
+
onInput: (t) => hn(e.id, t),
|
|
609
|
+
onKeydown: En
|
|
610
|
+
}), null, 16, Ve),
|
|
611
|
+
j(e) ? (y(), p("span", {
|
|
606
612
|
key: 0,
|
|
607
|
-
id:
|
|
613
|
+
id: ct(o),
|
|
608
614
|
class: "bb-sr-only"
|
|
609
|
-
},
|
|
610
|
-
e.id &&
|
|
615
|
+
}, S(st(e)), 9, He)) : f("", !0),
|
|
616
|
+
e.id && C(D).isGroupLoading(e.id) ? (y(), p("div", Ue)) : f("", !0)
|
|
611
617
|
], 16)) : f("", !0),
|
|
612
618
|
m("div", {
|
|
613
|
-
"aria-labelledby":
|
|
614
|
-
class:
|
|
619
|
+
"aria-labelledby": on(e, o),
|
|
620
|
+
class: Oe(["bb-dropdown__group-items", {
|
|
615
621
|
"bb-dropdown__group-items--capped": !!Ct(e),
|
|
616
|
-
"bb-dropdown__group-items--loading": !!e.id &&
|
|
622
|
+
"bb-dropdown__group-items--loading": !!e.id && C(D).isGroupLoading(e.id)
|
|
617
623
|
}]),
|
|
618
|
-
role:
|
|
619
|
-
style:
|
|
620
|
-
}, [(
|
|
624
|
+
role: an(e),
|
|
625
|
+
style: ke({ maxHeight: Ct(e) })
|
|
626
|
+
}, [(y(!0), p(l, null, x(ht(e), (t) => (y(), d(M, _({
|
|
621
627
|
key: t.key,
|
|
622
628
|
titled: t.title !== void 0
|
|
623
629
|
}, { ref_for: !0 }, t.title === void 0 ? {} : {
|
|
624
|
-
class: "bb-
|
|
630
|
+
class: "bb-dropdown__group-section",
|
|
625
631
|
role: "group",
|
|
626
|
-
"aria-labelledby":
|
|
632
|
+
"aria-labelledby": Yt(o, t.key)
|
|
627
633
|
}), {
|
|
628
|
-
default:
|
|
634
|
+
default: T(() => [t.title === void 0 ? f("", !0) : (y(), p("div", _({
|
|
629
635
|
key: 0,
|
|
630
|
-
id:
|
|
631
|
-
class: "bb-dropdown__group-
|
|
636
|
+
id: Yt(o, t.key),
|
|
637
|
+
class: "bb-dropdown__group-header",
|
|
632
638
|
role: "presentation"
|
|
633
|
-
}, [h(
|
|
634
|
-
props:
|
|
635
|
-
slots:
|
|
639
|
+
}, { ref_for: !0 }, C(D).passthrough.groupHeader), [h(C(c), {
|
|
640
|
+
props: _t(t),
|
|
641
|
+
slots: gt(e)
|
|
636
642
|
}, {
|
|
637
|
-
default:
|
|
643
|
+
default: T(() => [m("span", Ke, S(t.title), 1)]),
|
|
638
644
|
_: 2
|
|
639
|
-
}, 1032, ["props", "slots"])],
|
|
645
|
+
}, 1032, ["props", "slots"])], 16, Ge)), (y(!0), p(l, null, x(t.items, (n, r) => (y(), p(l, { key: n.rowKey }, [Ut(e, n) ? (y(), p(l, { key: 0 }, [], 64)) : n.placeholder ? (y(), p("div", {
|
|
640
646
|
key: 1,
|
|
641
647
|
ref_for: !0,
|
|
642
|
-
ref: (e) =>
|
|
643
|
-
class:
|
|
648
|
+
ref: (e) => yt(o, e),
|
|
649
|
+
class: Oe(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${n.placeholder}`]),
|
|
644
650
|
role: "presentation"
|
|
645
|
-
}, [
|
|
651
|
+
}, [R(n) ? (y(), d(Me(R(n)), _({
|
|
646
652
|
key: 0,
|
|
647
653
|
ref_for: !0
|
|
648
654
|
}, {
|
|
649
655
|
groupId: e.id,
|
|
650
|
-
query: e.id ?
|
|
656
|
+
query: e.id ? C(D).queryFor(e.id) : "",
|
|
651
657
|
text: n.label
|
|
652
|
-
}), null, 16)) : (
|
|
658
|
+
}), null, 16)) : (y(), p(l, { key: 1 }, [n.placeholder === "failed" ? (y(), d(i, {
|
|
653
659
|
key: 0,
|
|
654
660
|
class: "bb-dropdown__placeholder-icon"
|
|
655
|
-
})) : f("", !0), m("span",
|
|
661
|
+
})) : f("", !0), m("span", qe, S(n.label), 1)], 64))], 2)) : (y(), p(l, { key: 2 }, [h(te, {
|
|
656
662
|
group: Lt(e),
|
|
657
|
-
index:
|
|
663
|
+
index: L(o) + t.start + r,
|
|
658
664
|
item: n,
|
|
659
|
-
row:
|
|
665
|
+
row: $n,
|
|
660
666
|
selected: !!e.selectable && Pt(e, n)
|
|
661
667
|
}, null, 8, [
|
|
662
668
|
"group",
|
|
663
669
|
"index",
|
|
664
670
|
"item",
|
|
665
671
|
"selected"
|
|
666
|
-
]), n.items && !g.navigate ? (
|
|
672
|
+
]), n.items && !g.navigate ? (y(), d(a, {
|
|
667
673
|
key: 0,
|
|
668
|
-
anchor: H.value[
|
|
674
|
+
anchor: H.value[L(o) + t.start + r],
|
|
669
675
|
"bubble-attrs": Ht(n),
|
|
670
676
|
class: "bb-dropdown bb-dropdown--submenu",
|
|
671
677
|
"hide-arrow": "",
|
|
672
|
-
"model-value":
|
|
673
|
-
offset:
|
|
674
|
-
placement:
|
|
678
|
+
"model-value": J.value === n.rowKey,
|
|
679
|
+
offset: Mn.value,
|
|
680
|
+
placement: Nn.value,
|
|
675
681
|
role: "none",
|
|
676
|
-
"transition-duration":
|
|
677
|
-
"onUpdate:modelValue": (e) =>
|
|
682
|
+
"transition-duration": Qe,
|
|
683
|
+
"onUpdate:modelValue": (e) => Un(n.rowKey, e)
|
|
678
684
|
}, {
|
|
679
|
-
default:
|
|
680
|
-
id:
|
|
685
|
+
default: T(({ availableHeight: e }) => [m("span", {
|
|
686
|
+
id: rn(n),
|
|
681
687
|
ref_for: !0,
|
|
682
|
-
ref: (e) =>
|
|
688
|
+
ref: (e) => In(n.rowKey, e),
|
|
683
689
|
"aria-label": n.label,
|
|
684
690
|
class: "bb-dropdown__list",
|
|
685
|
-
"data-bb-dropdown-surface":
|
|
686
|
-
inert:
|
|
687
|
-
role:
|
|
688
|
-
style:
|
|
689
|
-
onKeydown: (e) =>
|
|
690
|
-
onPointerenter:
|
|
691
|
-
onPointerleave: (e) =>
|
|
691
|
+
"data-bb-dropdown-surface": C(D).rootId,
|
|
692
|
+
inert: jn(n.rowKey),
|
|
693
|
+
role: nn(n) ? "dialog" : "menu",
|
|
694
|
+
style: ke({ "--max-h": e == null ? void 0 : `${e}px` }),
|
|
695
|
+
onKeydown: (e) => Rn(L(o) + t.start + r, e),
|
|
696
|
+
onPointerenter: Kn,
|
|
697
|
+
onPointerleave: (e) => Jn(n.rowKey, e)
|
|
692
698
|
}, [h(ee, {
|
|
693
699
|
ref_for: !0,
|
|
694
|
-
ref: (e) =>
|
|
700
|
+
ref: (e) => zn(n.rowKey, e),
|
|
695
701
|
groups: wt(n.items),
|
|
696
702
|
level: g.level + 1,
|
|
697
|
-
onCloseLevel: (e) =>
|
|
703
|
+
onCloseLevel: (e) => Wn(L(o) + t.start + r)
|
|
698
704
|
}, null, 8, [
|
|
699
705
|
"groups",
|
|
700
706
|
"level",
|
|
701
707
|
"onCloseLevel"
|
|
702
|
-
])], 44,
|
|
708
|
+
])], 44, Je)]),
|
|
703
709
|
_: 2
|
|
704
710
|
}, 1032, [
|
|
705
711
|
"anchor",
|
|
@@ -710,8 +716,8 @@ var Ne = {
|
|
|
710
716
|
"onUpdate:modelValue"
|
|
711
717
|
])) : f("", !0)], 64))], 64))), 128))]),
|
|
712
718
|
_: 2
|
|
713
|
-
}, 1040, ["titled"]))), 128))], 14,
|
|
719
|
+
}, 1040, ["titled"]))), 128))], 14, We)
|
|
714
720
|
], 64))), 128));
|
|
715
721
|
}
|
|
716
722
|
});
|
|
717
|
-
export {
|
|
723
|
+
export { $e as default };
|