bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.75
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/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +11 -6
- package/dist/ai/BbDatePicker.md +12 -0
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +3 -1
- package/dist/ai/BbDropdown.md +155 -60
- package/dist/ai/BbDropdownButton.md +25 -6
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +17 -16
- package/dist/ai/BbTimePicker.md +12 -0
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +163 -6
- package/dist/ai/components.json +32 -34
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +22 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -0
- package/dist/ai/manifest/components/BbDropdown.json +20 -14
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +13 -3
- package/dist/ai/manifest/components/BbDropdownButton.json +13 -7
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +6 -3
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +4 -0
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/source/BbAvatar.md +119 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +52 -54
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +18 -0
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +40 -1
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +211 -39
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +104 -38
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +72 -26
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +15 -0
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +213 -202
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +495 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +412 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +382 -338
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +65 -41
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1086 -1069
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +3 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +268 -259
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +573 -276
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +1 -1
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +4 -1
- package/llms.txt +1 -1
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/validate-bb-markup.mjs +20 -0
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
|
@@ -3,35 +3,35 @@ import { isNotNil as t } from "../../utilities/functions/isNotNil.js";
|
|
|
3
3
|
import { hash as n } from "../../utilities/functions/hash.js";
|
|
4
4
|
import { useLocale as r } from "../../composables/useLocale.js";
|
|
5
5
|
import { useListboxFocus as ee } from "../../composables/useListboxFocus.js";
|
|
6
|
-
import { useTouchRowLadder as
|
|
7
|
-
import { listboxOptionFontSize as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { transitions as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { useVirtualizer as
|
|
6
|
+
import { useTouchRowLadder as te } from "../../composables/useSheetSurface.js";
|
|
7
|
+
import { listboxOptionFontSize as ne, listboxOptionHeight as re } from "../../utilities/misc/listboxMetrics.js";
|
|
8
|
+
import i from "../BbIcon/BbIcon.vue.js";
|
|
9
|
+
import a from "../ErrorIcon/ErrorIcon.vue.js";
|
|
10
|
+
import o from "../../assets/svgs/check_stroke.svg_raw.js";
|
|
11
|
+
import { transitions as s } from "../../utilities/misc/transitions.js";
|
|
12
|
+
import { Fragment as ie, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeProps as g, normalizeClass as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useId as ae, useSlots as oe, useTemplateRef as T, watch as E, withModifiers as D } from "vue";
|
|
13
|
+
import { useVirtualizer as se } from "@tanstack/vue-virtual";
|
|
14
14
|
// src/components/FlatListBox/FlatListBox.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var
|
|
15
|
+
var ce = { class: "bb-listbox__outer-container scrollbar-border" }, le = {
|
|
16
16
|
ref: "inner",
|
|
17
17
|
class: "bb-listbox__inner-container",
|
|
18
18
|
tabindex: "-1"
|
|
19
|
-
},
|
|
19
|
+
}, ue = {
|
|
20
20
|
class: "bb-listbox__status",
|
|
21
21
|
role: "status"
|
|
22
|
-
},
|
|
22
|
+
}, de = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "bb-listbox__loading"
|
|
25
|
-
},
|
|
25
|
+
}, fe = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "bb-listbox__empty"
|
|
28
|
-
},
|
|
28
|
+
}, pe = [
|
|
29
29
|
"id",
|
|
30
30
|
"aria-activedescendant",
|
|
31
31
|
"aria-label",
|
|
32
32
|
"aria-labelledby",
|
|
33
33
|
"aria-multiselectable"
|
|
34
|
-
],
|
|
34
|
+
], me = [
|
|
35
35
|
"id",
|
|
36
36
|
"aria-describedby",
|
|
37
37
|
"aria-disabled",
|
|
@@ -41,13 +41,16 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
41
41
|
"aria-setsize",
|
|
42
42
|
"data-index",
|
|
43
43
|
"onMouseenter"
|
|
44
|
-
],
|
|
44
|
+
], he = {
|
|
45
|
+
key: 1,
|
|
46
|
+
class: "bb-listbox__item-text bb-listbox__create"
|
|
47
|
+
}, ge = { class: "bb-listbox__create-query" }, _e = {
|
|
45
48
|
key: 0,
|
|
46
49
|
class: "bb-listbox__option-content"
|
|
47
|
-
},
|
|
50
|
+
}, O = ["id"], k = ["id"], A = {
|
|
48
51
|
key: 1,
|
|
49
52
|
class: "bb-listbox__loading bb-listbox__loading--below"
|
|
50
|
-
},
|
|
53
|
+
}, j = ["id"], M = /*@__PURE__*/ h({
|
|
51
54
|
__name: "FlatListBox",
|
|
52
55
|
props: {
|
|
53
56
|
passthrough: {},
|
|
@@ -60,7 +63,7 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
60
63
|
loading: { type: Boolean },
|
|
61
64
|
loadingBelow: { type: Boolean },
|
|
62
65
|
multiple: { type: Boolean },
|
|
63
|
-
transitionDuration: { default:
|
|
66
|
+
transitionDuration: { default: s.medium },
|
|
64
67
|
loadingText: {},
|
|
65
68
|
emptyText: {},
|
|
66
69
|
failedText: {},
|
|
@@ -68,19 +71,20 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
68
71
|
described: { type: Boolean }
|
|
69
72
|
},
|
|
70
73
|
emits: [
|
|
74
|
+
"retry",
|
|
71
75
|
"option:selected",
|
|
72
76
|
"option:unselected",
|
|
73
77
|
"focused:change"
|
|
74
78
|
],
|
|
75
|
-
setup(
|
|
76
|
-
let N =
|
|
79
|
+
setup(s, { expose: h, emit: M }) {
|
|
80
|
+
let N = s, P = M, F = oe(), { t: I } = r(), L = T("inner"), ve = T("listbox"), { touch: R } = te(), z = c(() => N.optionHeight ? N.optionHeight : re(R.value, !!N.compact, !!N.described)), ye = c(() => ne(R.value)), B = se({
|
|
77
81
|
get count() {
|
|
78
82
|
return N.options.length;
|
|
79
83
|
},
|
|
80
84
|
getScrollElement: () => L.value ?? null,
|
|
81
85
|
estimateSize: () => z.value,
|
|
82
86
|
overscan: 5
|
|
83
|
-
}),
|
|
87
|
+
}), be = c(() => B.value.getVirtualItems()), xe = c(() => B.value.getTotalSize()), V = c(() => N.options.map((e, t) => ({
|
|
84
88
|
index: t,
|
|
85
89
|
text: e.text,
|
|
86
90
|
description: e.description,
|
|
@@ -90,32 +94,33 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
90
94
|
valueHash: e.valueHash,
|
|
91
95
|
item: e.item,
|
|
92
96
|
selected: !!e.selected,
|
|
93
|
-
disabled: !!e.disabled
|
|
94
|
-
|
|
97
|
+
disabled: !!e.disabled,
|
|
98
|
+
create: e.create
|
|
99
|
+
}))), Se = ae(), H = (e) => `${Se}-listbox-option-${e}`, U = (e) => `${H(e)}__label`, W = (e) => `${H(e)}__description`, G = (e) => !!e && !F.option, K = c(() => {
|
|
95
100
|
if (e(J.value)) return;
|
|
96
101
|
let t = V.value[J.value];
|
|
97
102
|
if (t) return H(t.valueHash);
|
|
98
|
-
}), q =
|
|
99
|
-
|
|
103
|
+
}), q = c(() => V.value.length > 0), { focusedIndex: J, focusNext: Ce, focusPrevious: we, focusFirst: Te, focusLast: Ee, focusFirstSelected: De, focusLastSelected: Oe, focusByHash: ke, focusByPointer: Ae, blurPointerFocus: je, blur: Y, getHighlighted: Me } = ee(() => N.options, { disabled: () => !N.open }), X = b(!1);
|
|
104
|
+
E(J, (e) => {
|
|
100
105
|
L.value && t(e) && !X.value && B.value.scrollToIndex(e, { align: "center" }), X.value = !1, P("focused:change", K.value);
|
|
101
106
|
});
|
|
102
107
|
let Z = () => B.value.scrollToOffset(0), Q = () => {
|
|
103
108
|
let e = N.options.findIndex((e) => e.selected);
|
|
104
109
|
e < 0 ? Z() : B.value.scrollToIndex(e, { align: "start" });
|
|
105
110
|
};
|
|
106
|
-
|
|
111
|
+
E(() => N.open && !!L.value, (e) => {
|
|
107
112
|
e && Q();
|
|
108
113
|
}, { flush: "post" });
|
|
109
|
-
let
|
|
110
|
-
N.open && (X.value = !0,
|
|
111
|
-
},
|
|
112
|
-
|
|
114
|
+
let Ne = (e) => {
|
|
115
|
+
N.open && (X.value = !0, Ae(e));
|
|
116
|
+
}, Pe = () => {
|
|
117
|
+
je();
|
|
113
118
|
}, $ = () => {
|
|
114
119
|
if (e(J.value) || !N.open) return;
|
|
115
120
|
let t = V.value[J.value];
|
|
116
121
|
t.disabled || (t.selected ? P("option:unselected", t) : P("option:selected", t));
|
|
117
|
-
},
|
|
118
|
-
if (t.preventDefault(), L.value && t.target instanceof HTMLElement &&
|
|
122
|
+
}, Fe = (t) => {
|
|
123
|
+
if (t.preventDefault(), L.value && t.target instanceof HTMLElement && ve.value) {
|
|
119
124
|
let n = t.target, r = n.dataset.index;
|
|
120
125
|
for (; e(r) && n.parentElement;) n = n.parentElement, r = n.dataset.index;
|
|
121
126
|
if (r) {
|
|
@@ -124,58 +129,58 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
131
|
};
|
|
127
|
-
return
|
|
132
|
+
return E(() => N.options, (e, t) => {
|
|
128
133
|
n(e.map((e) => e.valueHash)) !== n(t.map((e) => e.valueHash)) && (B.value.measure(), Y());
|
|
129
|
-
}, { flush: "post" }),
|
|
134
|
+
}, { flush: "post" }), E(z, () => {
|
|
130
135
|
B.value.measure();
|
|
131
|
-
}, { flush: "post" }),
|
|
132
|
-
focusNext:
|
|
133
|
-
focusPrevious:
|
|
134
|
-
focusFirst:
|
|
135
|
-
focusFirstSelected:
|
|
136
|
-
focusLast:
|
|
137
|
-
focusLastSelected:
|
|
136
|
+
}, { flush: "post" }), h({
|
|
137
|
+
focusNext: Ce,
|
|
138
|
+
focusPrevious: we,
|
|
139
|
+
focusFirst: Te,
|
|
140
|
+
focusFirstSelected: De,
|
|
141
|
+
focusLast: Ee,
|
|
142
|
+
focusLastSelected: Oe,
|
|
138
143
|
blur: Y,
|
|
139
144
|
confirmOption: $,
|
|
140
|
-
focusByHash:
|
|
141
|
-
getHighlighted:
|
|
145
|
+
focusByHash: ke,
|
|
146
|
+
getHighlighted: Me,
|
|
142
147
|
getActiveDescendantId: () => K.value,
|
|
143
148
|
scrollToTop: Z,
|
|
144
149
|
scrollToSelected: Q
|
|
145
|
-
}), (e, t) => (
|
|
146
|
-
class:
|
|
147
|
-
"bb-listbox--compact":
|
|
148
|
-
"bb-listbox--described":
|
|
149
|
-
"bb-listbox--loading":
|
|
150
|
-
"bb-listbox--multiple":
|
|
150
|
+
}), (e, t) => (y(), d("span", {
|
|
151
|
+
class: _(["bb-listbox", {
|
|
152
|
+
"bb-listbox--compact": s.compact,
|
|
153
|
+
"bb-listbox--described": s.described,
|
|
154
|
+
"bb-listbox--loading": s.loading,
|
|
155
|
+
"bb-listbox--multiple": s.multiple,
|
|
151
156
|
"bb-listbox--empty": !q.value,
|
|
152
|
-
"bb-listbox--open":
|
|
157
|
+
"bb-listbox--open": s.open
|
|
153
158
|
}]),
|
|
154
|
-
style:
|
|
155
|
-
"--transition-duration": `${
|
|
159
|
+
style: v({
|
|
160
|
+
"--transition-duration": `${s.transitionDuration}ms`,
|
|
156
161
|
"--option-height": `${z.value}px`,
|
|
157
|
-
"--option-font-size":
|
|
162
|
+
"--option-font-size": ye.value
|
|
158
163
|
}),
|
|
159
|
-
onClickCapture:
|
|
160
|
-
onClick: t[
|
|
161
|
-
onMousedown: t[
|
|
162
|
-
}, [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
q.value ? (
|
|
164
|
+
onClickCapture: Fe,
|
|
165
|
+
onClick: t[1] ||= D(() => {}, ["stop"]),
|
|
166
|
+
onMousedown: t[2] ||= D(() => {}, ["prevent"])
|
|
167
|
+
}, [f("span", ce, [f("span", le, [
|
|
168
|
+
S(e.$slots, "options:prepend"),
|
|
169
|
+
f("span", ue, [s.loading && !q.value ? (y(), d("span", de, [S(e.$slots, "loading", {}, () => [p(C(s.loadingText || w(I)("common.loadingText").value), 1)])])) : !q.value && !s.failedText ? (y(), d("span", fe, [S(e.$slots, "empty", {}, () => [p(C(s.emptyText || w(I)("common.emptyText").value), 1)])])) : u("", !0)]),
|
|
170
|
+
q.value ? (y(), d("span", g({
|
|
166
171
|
key: 0,
|
|
167
|
-
id:
|
|
172
|
+
id: s.id,
|
|
168
173
|
ref: "listbox",
|
|
169
174
|
"aria-activedescendant": K.value,
|
|
170
|
-
"aria-label":
|
|
171
|
-
"aria-labelledby":
|
|
172
|
-
"aria-multiselectable":
|
|
175
|
+
"aria-label": s.listLabelledby ? void 0 : s.listLabel,
|
|
176
|
+
"aria-labelledby": s.listLabelledby,
|
|
177
|
+
"aria-multiselectable": s.multiple ? !0 : void 0,
|
|
173
178
|
class: "bb-listbox__list",
|
|
174
179
|
role: "listbox",
|
|
175
|
-
style: { height: `${
|
|
180
|
+
style: { height: `${xe.value}px` },
|
|
176
181
|
tabindex: "-1",
|
|
177
|
-
onMouseleave:
|
|
178
|
-
},
|
|
182
|
+
onMouseleave: Pe
|
|
183
|
+
}, s.passthrough?.list), [(y(!0), d(ie, null, x(be.value, (t) => (y(), d("span", g({
|
|
179
184
|
id: H(V.value[t.index].valueHash),
|
|
180
185
|
key: V.value[t.index].valueHash,
|
|
181
186
|
"aria-describedby": G(V.value[t.index].description) ? W(V.value[t.index].valueHash) : void 0,
|
|
@@ -185,81 +190,95 @@ var se = { class: "bb-listbox__outer-container scrollbar-border" }, ce = {
|
|
|
185
190
|
"aria-selected": V.value[t.index].selected,
|
|
186
191
|
"aria-setsize": N.options.length,
|
|
187
192
|
class: ["bb-listbox__option", {
|
|
188
|
-
"bb-listbox__option--focused":
|
|
193
|
+
"bb-listbox__option--focused": w(J) === t.index,
|
|
189
194
|
"bb-listbox__option--selected": V.value[t.index].selected,
|
|
190
195
|
"bb-listbox__option--disabled": V.value[t.index].disabled
|
|
191
196
|
}],
|
|
192
197
|
"data-index": t.index,
|
|
193
198
|
role: "option",
|
|
194
199
|
style: { transform: `translateY(${t.start}px)` },
|
|
195
|
-
onMouseenter:
|
|
196
|
-
}, { ref_for: !0 },
|
|
200
|
+
onMouseenter: D((e) => Ne(t.index), ["stop"])
|
|
201
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("option", {
|
|
197
202
|
selected: V.value[t.index].selected,
|
|
198
203
|
disabled: V.value[t.index].disabled || void 0
|
|
199
204
|
}, V.value[t.index].item)), [
|
|
200
|
-
V.value[t.index]["prepend:icon"] ? (
|
|
205
|
+
V.value[t.index]["prepend:icon"] ? (y(), l(i, g({
|
|
201
206
|
key: 0,
|
|
202
207
|
"aria-hidden": "true",
|
|
203
208
|
class: "bb-listbox__item-icon bb-listbox__option-prepend-icon",
|
|
204
209
|
icon: V.value[t.index]["prepend:icon"]
|
|
205
|
-
}, { ref_for: !0 },
|
|
210
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("itemIcon", {
|
|
206
211
|
selected: V.value[t.index].selected,
|
|
207
212
|
disabled: V.value[t.index].disabled || void 0
|
|
208
|
-
}, V.value[t.index].item)), null, 16, ["icon"])) :
|
|
209
|
-
|
|
213
|
+
}, V.value[t.index].item)), null, 16, ["icon"])) : u("", !0),
|
|
214
|
+
V.value[t.index].create ? (y(), d("span", he, [
|
|
215
|
+
p(C(V.value[t.index].create.before), 1),
|
|
216
|
+
f("strong", ge, C(V.value[t.index].create.query), 1),
|
|
217
|
+
p(C(V.value[t.index].create.after), 1)
|
|
218
|
+
])) : S(e.$slots, "option", {
|
|
210
219
|
description: V.value[t.index].description,
|
|
211
220
|
disabled: V.value[t.index].disabled,
|
|
212
|
-
focused:
|
|
221
|
+
focused: w(J) === t.index,
|
|
213
222
|
index: t.index,
|
|
214
223
|
item: V.value[t.index].item,
|
|
215
224
|
selected: V.value[t.index].selected,
|
|
216
225
|
text: V.value[t.index].text,
|
|
217
226
|
value: V.value[t.index].value
|
|
218
|
-
}, () => [V.value[t.index].description ? (
|
|
227
|
+
}, () => [V.value[t.index].description ? (y(), d("span", _e, [f("span", g({
|
|
219
228
|
id: U(V.value[t.index].valueHash),
|
|
220
229
|
class: "bb-listbox__item-text"
|
|
221
|
-
}, { ref_for: !0 },
|
|
230
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("itemText", {
|
|
222
231
|
selected: V.value[t.index].selected,
|
|
223
232
|
disabled: V.value[t.index].disabled || void 0
|
|
224
|
-
}, V.value[t.index].item)),
|
|
233
|
+
}, V.value[t.index].item)), C(V.value[t.index].text), 17, O), f("span", g({
|
|
225
234
|
id: W(V.value[t.index].valueHash),
|
|
226
235
|
class: "bb-listbox__item-description"
|
|
227
|
-
}, { ref_for: !0 },
|
|
236
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("itemDescription", {
|
|
228
237
|
selected: V.value[t.index].selected,
|
|
229
238
|
disabled: V.value[t.index].disabled || void 0
|
|
230
|
-
}, V.value[t.index].item)),
|
|
239
|
+
}, V.value[t.index].item)), C(V.value[t.index].description), 17, k)])) : (y(), d("span", g({
|
|
231
240
|
key: 1,
|
|
232
241
|
class: "bb-listbox__item-text"
|
|
233
|
-
}, { ref_for: !0 },
|
|
242
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("itemText", {
|
|
234
243
|
selected: V.value[t.index].selected,
|
|
235
244
|
disabled: V.value[t.index].disabled || void 0
|
|
236
|
-
}, V.value[t.index].item)),
|
|
237
|
-
V.value[t.index]["append:icon"] && !V.value[t.index].selected ? (
|
|
238
|
-
key:
|
|
245
|
+
}, V.value[t.index].item)), C(V.value[t.index].text), 17))], void 0, 2),
|
|
246
|
+
V.value[t.index]["append:icon"] && !V.value[t.index].selected ? (y(), l(i, g({
|
|
247
|
+
key: 3,
|
|
239
248
|
"aria-hidden": "true",
|
|
240
249
|
class: "bb-listbox__item-icon bb-listbox__option-append-icon",
|
|
241
250
|
icon: V.value[t.index]["append:icon"]
|
|
242
|
-
}, { ref_for: !0 },
|
|
251
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("itemIcon", {
|
|
243
252
|
selected: V.value[t.index].selected,
|
|
244
253
|
disabled: V.value[t.index].disabled || void 0
|
|
245
|
-
}, V.value[t.index].item)), null, 16, ["icon"])) :
|
|
246
|
-
|
|
254
|
+
}, V.value[t.index].item)), null, 16, ["icon"])) : u("", !0),
|
|
255
|
+
m(i, g({
|
|
247
256
|
"aria-hidden": "true",
|
|
248
257
|
class: "bb-listbox__option-check",
|
|
249
|
-
icon:
|
|
250
|
-
}, { ref_for: !0 },
|
|
258
|
+
icon: w(o)
|
|
259
|
+
}, { ref_for: !0 }, s.passthrough?.part?.("check", {
|
|
251
260
|
selected: V.value[t.index].selected,
|
|
252
261
|
disabled: V.value[t.index].disabled || void 0
|
|
253
262
|
}, V.value[t.index].item)), null, 16, ["icon"])
|
|
254
|
-
], 16,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
], 512)]),
|
|
263
|
+
], 16, me))), 128))], 16, pe)) : u("", !0),
|
|
264
|
+
s.loading && s.loadingBelow && q.value ? (y(), d("span", A, [S(e.$slots, "loading", {}, () => [p(C(s.loadingText || w(I)("common.loadingText").value), 1)])])) : u("", !0),
|
|
265
|
+
S(e.$slots, "options:append")
|
|
266
|
+
], 512)]), s.failedText && !s.loading ? (y(), d("span", {
|
|
258
267
|
key: 0,
|
|
259
|
-
|
|
260
|
-
class: v(["bb-listbox__failed", { "bb-listbox__failed--divided": q.value }]),
|
|
268
|
+
class: _(["bb-listbox__failed", { "bb-listbox__failed--divided": q.value }]),
|
|
261
269
|
role: "status"
|
|
262
|
-
}, [
|
|
270
|
+
}, [
|
|
271
|
+
m(a, { class: "bb-listbox__failed-icon" }),
|
|
272
|
+
f("span", {
|
|
273
|
+
id: `${s.id}_failed`,
|
|
274
|
+
class: "bb-listbox__failed-text"
|
|
275
|
+
}, C(s.failedText), 9, j),
|
|
276
|
+
f("button", {
|
|
277
|
+
class: "bb-load-retry",
|
|
278
|
+
type: "button",
|
|
279
|
+
onClick: t[0] ||= (e) => P("retry", e)
|
|
280
|
+
}, C(w(I)("common.retryLabel").value), 1)
|
|
281
|
+
], 2)) : u("", !0)], 38));
|
|
263
282
|
}
|
|
264
283
|
});
|
|
265
284
|
export { M as default };
|