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.
Files changed (169) hide show
  1. package/README.md +5 -5
  2. package/bin/cli.mjs +16 -10
  3. package/dist/ai/BbAlert.md +1 -1
  4. package/dist/ai/BbBreadcrumbs.md +1 -1
  5. package/dist/ai/BbButton.md +2 -2
  6. package/dist/ai/BbColorInput.md +1 -1
  7. package/dist/ai/BbColorPalette.md +1 -1
  8. package/dist/ai/BbConfirm.md +1 -1
  9. package/dist/ai/BbDatePicker.md +1 -1
  10. package/dist/ai/BbDatePickerInput.md +1 -1
  11. package/dist/ai/BbDialog.md +3 -2
  12. package/dist/ai/BbDropdown.md +23 -21
  13. package/dist/ai/BbDropdownButton.md +13 -11
  14. package/dist/ai/BbGallery.md +3 -2
  15. package/dist/ai/BbIcon.md +10 -10
  16. package/dist/ai/BbOffCanvas.md +3 -2
  17. package/dist/ai/BbPopover.md +1 -1
  18. package/dist/ai/BbSelect.md +153 -43
  19. package/dist/ai/BbSelectPopover.md +115 -9
  20. package/dist/ai/BbTable.md +1 -1
  21. package/dist/ai/BbTimePicker.md +1 -1
  22. package/dist/ai/BbTimePickerInput.md +1 -1
  23. package/dist/ai/GroupedListBox.md +2 -2
  24. package/dist/ai/ListBox.md +3 -2
  25. package/dist/ai/changelog.json +153 -7
  26. package/dist/ai/components.json +12 -12
  27. package/dist/ai/guides/agent-contract.md +1 -1
  28. package/dist/ai/guides/calendars-and-digits.md +1 -1
  29. package/dist/ai/guides/eslint-rules.md +1 -1
  30. package/dist/ai/guides/icons-policy.md +32 -11
  31. package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
  32. package/dist/ai/guides/migration/adoption-checklist.md +1 -1
  33. package/dist/ai/guides/migration/components/bb-icon.md +4 -4
  34. package/dist/ai/guides/migration/v2-to-v3.md +48 -19
  35. package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
  36. package/dist/ai/guides/passthrough.md +58 -58
  37. package/dist/ai/helpers/inertia/manifest.json +1 -1
  38. package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
  39. package/dist/ai/manifest/components/BbDropdown.json +19 -17
  40. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
  41. package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
  42. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  43. package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
  44. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  45. package/dist/ai/manifest/components/BbSelect.json +44 -40
  46. package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
  47. package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
  48. package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
  49. package/dist/ai/manifest/components/BbTable.tree.json +5 -1
  50. package/dist/ai/manifest/components/GroupedListBox.json +1 -1
  51. package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
  52. package/dist/ai/manifest/components/ListBox.json +1 -1
  53. package/dist/ai/manifest/components/ListBox.tree.json +1 -1
  54. package/dist/ai/manifest/index.json +2 -2
  55. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  56. package/dist/ai/recipes/inertia/onboarding.md +1 -1
  57. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
  58. package/dist/ai/recipes/nuxt/onboarding.md +1 -1
  59. package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
  60. package/dist/ai/recipes/vue/onboarding.md +2 -2
  61. package/dist/ai/source/BbAccordion.md +4 -5
  62. package/dist/ai/source/BbAvatar.md +9 -2
  63. package/dist/ai/source/BbBadge.md +6 -2
  64. package/dist/ai/source/BbBreadcrumbs.md +5 -2
  65. package/dist/ai/source/BbCalendar.md +8 -6
  66. package/dist/ai/source/BbCarousel.md +10 -6
  67. package/dist/ai/source/BbColorPalette.md +5 -2
  68. package/dist/ai/source/BbDatePickerInput.md +7 -2
  69. package/dist/ai/source/BbDropdown.md +91 -66
  70. package/dist/ai/source/BbDropdownButton.md +36 -19
  71. package/dist/ai/source/BbDropdownGroup.md +91 -66
  72. package/dist/ai/source/BbGallery.md +6 -5
  73. package/dist/ai/source/BbPagination.md +12 -28
  74. package/dist/ai/source/BbRating.md +4 -4
  75. package/dist/ai/source/BbSelect.md +130 -106
  76. package/dist/ai/source/BbSelectPopover.md +128 -21
  77. package/dist/ai/source/BbTable.md +42 -9
  78. package/dist/ai/source/BbTimePickerInput.md +6 -2
  79. package/dist/ai/source/ClearableButton.md +4 -2
  80. package/dist/ai/source/ErrorIcon.md +4 -3
  81. package/dist/ai/source/FlatListBox.md +7 -2
  82. package/dist/ai/source/GroupedListBox.md +22 -3
  83. package/dist/ai/source/ListBox.md +7 -1
  84. package/dist/ai/source/WarningIcon.md +4 -3
  85. package/dist/assets/svgs/close.svg_raw.js +1 -1
  86. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  87. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
  88. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
  89. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
  90. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
  91. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  92. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
  93. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
  94. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
  95. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
  96. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  97. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
  98. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
  99. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
  100. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
  101. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
  102. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
  103. package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
  104. package/dist/components/BbDropdown/types.d.ts +51 -53
  105. package/dist/components/BbDropdown/types.js +2 -0
  106. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
  107. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
  108. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
  109. package/dist/components/BbDropdownButton/types.d.ts +12 -10
  110. package/dist/components/BbDropdownButton/types.js +2 -0
  111. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
  112. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
  113. package/dist/components/BbIcon/iconCache.js +1 -1
  114. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
  115. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  116. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
  117. package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
  118. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
  119. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  120. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
  121. package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
  122. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
  123. package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
  124. package/dist/components/BbSelect/types.d.ts +101 -105
  125. package/dist/components/BbSelect/types.js +1 -27
  126. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
  127. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
  128. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
  129. package/dist/components/BbSelectPopover/types.d.ts +22 -13
  130. package/dist/components/BbSelectPopover/types.js +3 -1
  131. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  132. package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
  133. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
  134. package/dist/components/BbTable/BbTableDataRow.js +97 -90
  135. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
  136. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
  137. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
  138. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
  139. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
  140. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
  141. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  142. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
  143. package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  144. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
  145. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
  146. package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  147. package/dist/composables/useInternalIcon.js +25 -0
  148. package/dist/icon-scan.d.ts +1 -1
  149. package/dist/llms-full.txt +477 -187
  150. package/dist/llms-medium.txt +25 -24
  151. package/dist/llms.txt +1 -1
  152. package/dist/nuxt.js +1 -1
  153. package/dist/styles.css +2 -2
  154. package/dist/types/Config.d.ts +8 -1
  155. package/dist/types/ConfigDefaults.d.ts +10 -2
  156. package/dist/types/internalIcons.d.ts +89 -0
  157. package/dist/types/internalIcons.js +158 -0
  158. package/dist/types/ptComponentMap.d.ts +4 -4
  159. package/dist/utils/configDefaults.js +75 -64
  160. package/dist/utils/iconsOption.js +48 -0
  161. package/dist/utils/versionCheck.js +1 -1
  162. package/dist/vite-plugin.d.ts +10 -16
  163. package/dist/vite.js +319 -306
  164. package/llms.txt +1 -1
  165. package/package.json +1 -1
  166. package/scripts/lib/adoption-checklist.json +1 -1
  167. package/scripts/lib/update-install.mjs +48 -0
  168. package/scripts/lib/validate-bb-markup.mjs +73 -12
  169. 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 { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as we, createVNode as h, defineComponent as g, h as Te, mergeProps as _, nextTick as v, normalizeClass as y, normalizeStyle as Ee, onBeforeUnmount as De, onMounted as b, onUpdated as Oe, openBlock as x, ref as S, renderList as C, resolveDynamicComponent as ke, toDisplayString as w, unref as T, watch as E, watchEffect as Ae, withCtx as D, withKeys as je, withModifiers as Me } from "vue";
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 Ne = {
28
+ var Ie = {
28
29
  key: 0,
29
30
  "aria-hidden": "true",
30
31
  class: "bb-dropdown__divider"
31
- }, Pe = [
32
+ }, Le = [
32
33
  "id",
33
34
  "role",
34
35
  "tabindex",
35
36
  "onClick",
36
37
  "onKeydown"
37
- ], Fe = {
38
+ ], Re = {
38
39
  key: 0,
39
- class: "group-title__content"
40
- }, Ie = {
40
+ class: "group-label__content"
41
+ }, ze = {
41
42
  key: 2,
42
43
  class: "bb-dropdown__sheet-selection"
43
- }, Le = { class: "bb-dropdown__sheet-chips" }, Re = [
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
- ], ze = ["id"], Be = {
51
+ ], He = ["id"], Ue = {
50
52
  key: 1,
51
53
  "aria-hidden": "true",
52
54
  class: "bb-dropdown__group-loading"
53
- }, Ve = ["aria-labelledby", "role"], He = ["id"], Ue = { class: "group-title__content" }, We = { class: "item__content" }, Ge = [
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
- ], Ke = 289, qe = 160, Je = 100, Ye = 120, Xe = /*@__PURE__*/ g({
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: Xe, emit: Ze }) {
72
- let O = g, Qe = Ze, $e = u(() => O.slotDepth ?? O.level), k = ve(), { inSheet: A } = pe(), { t: j } = ce(), et = j("select.searchLabel"), tt = j("common.emptyText"), nt = (e, t) => {
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
- }, M = u(() => O.groups.map((e) => dt(ot(e)))), rt = (e) => !!e.id && (e.minQueryLength ?? 0) > 0 && [...k.queryFor(e.id).trim()].length < e.minQueryLength, it = (e) => (e.minQueryLength ?? 0) > 1 ? j("select.searchMinLength", e.minQueryLength).value : j("select.searchToStart").value, at = (e) => `${B.value}_search-hint_${e}`, ot = (e) => {
80
- if (!e.searchable || !e.id || k.isPipelineGroup(e.id)) return e;
81
- let t = k.queryFor(e.id).trim();
82
- if (!t || rt(e)) return e;
83
- let n = e.filterBy, r = n === !1 ? e.items : [...e.items.filter((e) => e.placeholder), ...ie(e.items.filter((e) => !e.placeholder), (e) => nt(e, n), t, e.groupBy == null ? void 0 : (t) => ct(e, t))];
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: k.emptyText.value ?? tt.value,
95
+ label: D.emptyText.value ?? at.value,
94
96
  disabled: !0
95
97
  }]
96
98
  };
97
- }, st = (e, t) => {
99
+ }, ut = (e, t) => {
98
100
  if (!t.placeholder) return "groupByValue" in t ? t.groupByValue : he(e.groupBy, t);
99
- }, ct = (e, t) => {
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
- }, lt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), dt = (e) => {
109
+ }, ft = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), mt = (e) => {
108
110
  if (e.groupBy == null) return e;
109
- let t = ut.get(e.items);
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 = ct(e, t), i = r === void 0 ? "" : `group-by:${r}`, a = n.get(i);
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 : st(e, t),
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
- ut.set(e.items, t), lt.set(t, a);
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
- }, ft = (e) => lt.get(e.items) ?? [{
141
+ }, ht = (e) => ft.get(e.items) ?? [{
140
142
  key: "",
141
143
  index: -1,
142
144
  start: 0,
143
145
  items: e.items
144
- }], pt = (e, { slots: t, attrs: n }) => e.titled ? Te("div", n, t.default?.()) : t.default?.();
145
- pt.props = ["titled"], pt.inheritAttrs = !1;
146
- let mt = (e) => [e.id ? k.slots[`${s(e.id)}:group`] : void 0, k.slots.group], ht = (e) => ({
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
- }), gt = u(() => {
153
- if (O.level === 0) for (let [e, t] of M.value.entries()) {
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
- }), _t = {}, vt = (e, t) => {
161
- t instanceof HTMLElement ? _t[e] = t : delete _t[e];
162
- }, yt, bt = O.level !== 0 || typeof MutationObserver > "u" ? void 0 : new MutationObserver(() => N()), N = () => {
163
- let e = gt.value, t = e ? _t[e.gi] : void 0;
164
- if (t !== yt && (bt?.disconnect(), yt = t, t && bt?.observe(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
- })), O.level !== 0) return;
169
- let n = t && e && I(e.item) ? t.textContent?.replace(/\s+/g, " ").trim() : void 0;
170
- k.setStatus(n || e?.item.label);
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
- b(N), b(() => {
174
+ v(F), v(() => {
173
175
  xe(), ye();
174
- }), Oe(N), E(gt, N, { flush: "post" }), De(() => bt?.disconnect()), Ae(() => {
175
- for (let e of O.groups) e.id && k.isPipelineGroup(e.id) && k.activateGroup(e.id);
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 P = S({}), xt = (e, t) => {
179
+ let I = b({}), xt = (e, t) => {
178
180
  let n = ne(t);
179
- n instanceof HTMLInputElement ? P.value[e] = n : delete P.value[e];
180
- }, St = u(() => M.value.find((e) => e.searchable && e.id)?.id), Ct = (e) => {
181
- if (A.value) return;
182
- let t = e.maxHeight ?? (e.searchable ? Ke : void 0);
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: k.selectedFor(e.id ?? "")
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 k.slots[t ? `${n}:${t}` : n];
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 k.slots[t ? `${n}:${t}` : n];
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-title--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
+ 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
- }, F = (e) => {
210
+ }, L = (e) => {
209
211
  let t = 0;
210
- for (let n = 0; n < e; n++) t += M.value[n]?.items.length ?? 0;
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": k.isItemLoading(t.rowKey) || void 0,
221
+ "aria-busy": D.isItemLoading(t.rowKey) || void 0,
220
222
  "aria-checked": e.selectable ? r : void 0,
221
- "aria-labelledby": Qt(e, t, n, a),
222
- "aria-expanded": t.items ? Y.value === t.rowKey : void 0,
223
- "aria-haspopup": t.items ? tn(t) ? "dialog" : "menu" : void 0,
224
- "aria-controls": t.items && Y.value === t.rowKey ? nn(t) : void 0,
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 || k.disabled.value,
233
+ disabled: t.disabled || D.disabled.value,
232
234
  role: Nt(e),
233
235
  tabindex: -1,
234
- onClick: (r) => qn(e, t, n, r),
235
- onKeydown: (e) => Jn(t, n, e),
236
- onMousedown: (t) => Kn(e, t),
237
- onPointerenter: (e) => Hn(t, n, e),
238
- onPointerleave: (e) => Wn(t, e)
239
- }, a, { "aria-describedby": $t(e, t, n, a) });
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 k.passthrough.part(e, {
244
+ return D.passthrough.part(e, {
243
245
  selected: n,
244
- disabled: t.disabled || k.disabled.value || void 0,
246
+ disabled: t.disabled || D.disabled.value || void 0,
245
247
  activeLink: !!r?.activeLink,
246
248
  exactActiveLink: !!r?.exactActiveLink
247
- }, L(t), t.variant ?? "default");
249
+ }, Wt(t), t.variant ?? "default");
248
250
  }
249
- let Ht = (e) => k.passthrough.part("submenu", {}, L(e), e.variant ?? "default"), Ut = (e, t) => t.placeholder === "failed" && !!e.id && k.isTopLevelPipeline(e.id), I = (e) => e.placeholder === "loading" ? k.slots.loading : e.placeholder === "empty" ? k.slots.empty : void 0, L = (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
- }, Wt = (e) => ({
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
- }), Gt = (e, t, n, r, i) => ({
259
- disabled: t.disabled || k.disabled.value,
260
- group: Wt(e),
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: L(t),
264
- level: $e.value,
265
+ item: Wt(t),
266
+ level: rt.value,
265
267
  selected: r,
266
- loading: k.isItemLoading(t.rowKey),
267
- open: k.open.value,
268
- placement: k.placement.value,
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
- }), R = (e, t = "label") => {
274
- if (e.id) return k.slots[`${s(e.id)}:${t}`];
275
- }, z = (e) => !e.hideLabel && (!!e.label || !!e["prepend:icon"] || !!e["append:icon"] || !!R(e) || !!R(e, "prepend") || !!R(e, "append")), Kt = (e) => !e.id || !e.selectable || !e.multiple ? [] : k.selectedChipsFor(e.id), B = oe().id, qt = (e) => `${B.value}_group-title_${e}`, Jt = (e, t) => `${B.value}_group-by-title_${e}_${s(t) || "none"}`, Yt = (e) => `${B.value}_row-text_${e}`, Xt = (e) => `${B.value}_row-description_${e}`, Zt = (e, t) => !!t.description && !kt(e, t), Qt = (e, t, n, r) => Zt(e, t) && !r["aria-label"] && !r["aria-labelledby"] ? Yt(n) : r["aria-labelledby"], $t = (e, t, n, r) => {
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 Zt(e, t) ? [i, Xt(n)].filter(Boolean).join(" ") : i;
278
- }, en = u(() => ge(M.value)), tn = (e) => !!e.items && ge(wt(e.items)), nn = (e) => `submenu_${k.rootId}_${e.domKey}`, rn = (e) => en.value ? "menu" : z(e) ? "group" : "none", an = (e, t) => z(e) ? qt(t) : void 0, V = (e, t) => ({
279
- disabled: k.disabled.value,
280
- group: Wt(e),
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: $e.value,
286
+ level: rt.value,
285
287
  selected: !1,
286
288
  loading: !1,
287
- open: k.open.value,
288
- placement: k.placement.value,
289
+ open: D.open.value,
290
+ placement: D.placement.value,
289
291
  label: e.label
290
- }), on = (e) => e.key === "Escape" || e.key === "Esc", sn = (t) => {
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 = S({}), cn = (e, t) => {
295
+ }, H = b({}), un = (e, t) => {
294
296
  let n = ne(t);
295
297
  n ? H.value[e] = n : delete H.value[e];
296
- }, U = S({}), ln = (e, t) => {
298
+ }, dn = b({}), fn = (e, t) => {
297
299
  let n = ne(t);
298
- n instanceof HTMLElement ? U.value[e] = n : delete U.value[e];
299
- }, W = () => {
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 M.value) {
302
- n.onClick && z(n) && e.push(t - .5);
303
- for (let r of n.items) r.disabled || k.disabled.value || e.push(t), t++;
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
- }, un = (e) => {
308
+ }, pn = (e) => {
307
309
  let t = 0;
308
- for (let n = 0; n < M.value.length; n++) {
310
+ for (let n = 0; n < A.value.length; n++) {
309
311
  if (t - .5 === e) return n;
310
- t += M.value[n].items.length;
312
+ t += A.value[n].items.length;
311
313
  }
312
314
  return -1;
313
- }, G = (e, t) => {
315
+ }, W = (e, t) => {
314
316
  if (e == null) return;
315
- let n = Number.isInteger(e) ? H.value[e] : U.value[un(e)];
316
- t === void 0 ? n?.focus() : t ? Ce(n) : Se(n), t !== void 0 && n && dn(n);
317
- }, dn = (e) => {
318
- let t = e.closest(".bb-dropdown__section")?.querySelector(":scope > .bb-dropdown__section-title");
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
- }, fn = () => Object.values(P.value).some((e) => e === document.activeElement);
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: A,
330
- input: () => Object.values(P.value).find((e) => e === document.activeElement) ?? null
333
+ active: O,
334
+ input: () => Object.values(I.value).find((e) => e === document.activeElement) ?? null
331
335
  });
332
- let pn = () => {
336
+ let _n = () => {
333
337
  let e = St.value;
334
- return e ? (P.value[e]?.focus(), !0) : !1;
335
- }, mn = (e) => G(W()[0], e), hn = (e) => {
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 M.value) for (let r of n.items) {
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
- }, K = (e, t) => {
343
- let n = W();
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
- G(n[i], !0);
350
+ W(n[i], !0);
351
+ }, K = (e) => {
352
+ (O.value || !_n()) && vn(e);
347
353
  }, q = (e) => {
348
- (A.value || !pn()) && mn(e);
349
- }, J = (e) => {
350
- let t = W();
351
- G(t[t.length - 1], e);
352
- }, gn = (e, t) => {
353
- let n = hn(e);
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 M.value) for (let r of n.items) {
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
- }, vn = le(), yn = fe({
362
- candidates: () => W().filter(Number.isInteger),
363
- getTokens: (e) => [de(_n(e)?.label ?? "", vn.locale)],
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) => G(e, !0),
369
- locale: () => vn.locale
370
- }), bn = (e) => {
371
- ue(e) && yn.onKeydown(e);
372
- }, xn = {
373
- ArrowDown: () => mn(!0),
374
- ArrowUp: () => J(!0),
375
- Down: () => mn(!0),
376
- Esc: () => k.close(),
377
- Escape: () => k.close(),
378
- Up: () => J(!0)
379
- }, Sn = (e) => {
380
- if (o(e) || O.level > 0 && on(e)) return;
381
- let t = xn[e.key];
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
- b(() => {
385
- O.level === 0 && St.value && !A.value && v(() => pn());
388
+ v(() => {
389
+ E.level === 0 && St.value && !O.value && De(() => _n());
386
390
  });
387
- let Y = S(null), Cn = S({}), X, Z, wn = 0, Tn = S(null), En;
388
- E(Y, (e, t) => {
389
- t != null && k.open.value && Nn(t) && G(hn(t)), clearTimeout(En), Tn.value = t ?? null, t != null && (En = setTimeout(() => {
390
- Tn.value = null;
391
- }, Ye));
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 Dn = (e) => Y.value !== e && Tn.value !== e, On = S(0), kn = S("right-start"), An = () => {
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
- kn.value = r ? "left-start" : "right-start";
401
+ Nn.value = r ? "left-start" : "right-start";
398
402
  let i = n.getBoundingClientRect(), a = t.getBoundingClientRect();
399
- On.value = Math.max(0, r ? a.left - i.left : i.right - a.right);
400
- }, jn = {}, Mn = (e, t) => {
401
- t instanceof HTMLElement ? jn[e] = t : delete jn[e];
402
- }, Nn = (e) => !!jn[e]?.contains(document.activeElement), Pn = (e, t) => {
403
- on(t) && !t.defaultPrevented && !o(t) && k.ownsEscape() && (t.preventDefault(), t.stopPropagation(), Vn(e));
404
- }, Fn = (e, t) => {
405
- t ? Cn.value[e] = t : delete Cn.value[e];
406
- }, Q = () => clearTimeout(X), $ = () => clearTimeout(Z);
407
- De(() => {
408
- clearTimeout(Z), clearTimeout(X), clearTimeout(En);
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 In = (e) => {
411
- $(), clearTimeout(X), X = setTimeout(() => {
412
- Y.value === e && (Y.value = null);
413
- }, qe);
414
- }, Ln = (e) => {
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
- }, Rn = (e) => {
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 = Ln(r);
426
+ let r = getComputedStyle(n).getPropertyValue("--transition-duration"), i = Vn(r);
423
427
  if (!i) return 0;
424
- let a = performance.now() - wn;
428
+ let a = performance.now() - On;
425
429
  return Math.max(0, i - a + 16);
426
- }, zn = async (e, t) => {
427
- Q(), An(), Y.value = e, t !== void 0 && (await v(), Cn.value[e]?.focusFirst(t));
430
+ }, $ = async (e, t) => {
431
+ Z(), Pn(), J.value = e, t !== void 0 && (await De(), Dn.value[e]?.focusFirst(t));
428
432
  };
429
- E(k.open, (e) => {
430
- e ? wn = performance.now() : ($(), Q(), Y.value = null);
433
+ w(D.open, (e) => {
434
+ e ? On = performance.now() : (Q(), Z(), J.value = null);
431
435
  });
432
- let Bn = (e, t) => {
433
- t ? Y.value = e : Y.value === e && (Y.value = null);
434
- }, Vn = (e) => {
435
- Y.value = null, v(() => G(e, !0));
436
- }, Hn = (e, t, n) => {
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 (Q(), $(), Y.value !== null && Y.value === e.rowKey) {
439
- Nn(e.rowKey) || G(t);
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
- G(t), e.items ? zn(e.rowKey) : Y.value = null;
447
+ W(t), e.items ? $(e.rowKey) : J.value = null;
444
448
  };
445
- if (Y.value !== null) {
446
- let e = hn(Y.value);
447
- e >= 0 && Math.abs(t - e) <= 1 ? Z = setTimeout(r, Je) : r();
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 ? Rn(t) : 0;
451
- i ? Z = setTimeout(r, i) : r();
452
- }, Un = () => {
453
- Q(), $();
454
- }, Wn = (e, t) => {
455
- t.pointerType === "mouse" && e.items && In(e.rowKey);
456
- }, Gn = (e, t) => {
457
- t.pointerType === "mouse" && In(e);
458
- }, Kn = (e, t) => {
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
- }, qn = (e, t, n, r) => {
461
- t.disabled || k.disabled.value || k.isItemLoading(t.rowKey) || (t.items ? (r.stopPropagation(), Q(), $(), O.navigate ? O.navigate(t) : zn(t.rowKey, r.detail === 0)) : e.selectable && e.id ? (r.stopPropagation(), k.toggleSelect(e, t), k.runItemAction(t, r), fn() || G(n)) : (r.stopPropagation(), k.runItemAction(t, r, { close: !0 })));
462
- }, Jn = (e, t, n) => {
463
- switch (sn(n)) {
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(), $(), Q(), Y.value = null, K(t, 1);
469
+ n.preventDefault(), Q(), Z(), J.value = null, G(t, 1);
466
470
  break;
467
471
  case "ArrowUp":
468
- n.preventDefault(), $(), Q(), Y.value = null, K(t, -1);
472
+ n.preventDefault(), Q(), Z(), J.value = null, G(t, -1);
469
473
  break;
470
474
  case "Home":
471
- n.preventDefault(), q(!0);
475
+ n.preventDefault(), K(!0);
472
476
  break;
473
477
  case "End":
474
- n.preventDefault(), J(!0);
478
+ n.preventDefault(), q(!0);
475
479
  break;
476
480
  case "ArrowRight":
477
- e.items && (n.preventDefault(), n.stopPropagation(), O.navigate ? O.navigate(e) : zn(e.rowKey, !0));
481
+ e.items && (n.preventDefault(), n.stopPropagation(), E.navigate ? E.navigate(e) : $(e.rowKey, !0));
478
482
  break;
479
483
  case "ArrowLeft":
480
- O.back ? (n.preventDefault(), n.stopPropagation(), O.back()) : O.level > 0 && (n.preventDefault(), n.stopPropagation(), Qe("close-level"));
484
+ E.back ? (n.preventDefault(), n.stopPropagation(), E.back()) : E.level > 0 && (n.preventDefault(), n.stopPropagation(), tt("close-level"));
481
485
  break;
482
- default: bn(n);
486
+ default: wn(n);
483
487
  }
484
- }, Yn = (e, t) => {
485
- let n = F(e) - .5;
486
- switch (sn(t)) {
488
+ }, Qn = (e, t) => {
489
+ let n = L(e) - .5;
490
+ switch (ln(t)) {
487
491
  case "ArrowDown":
488
- t.preventDefault(), K(n, 1);
492
+ t.preventDefault(), G(n, 1);
489
493
  break;
490
494
  case "ArrowUp":
491
- t.preventDefault(), K(n, -1);
495
+ t.preventDefault(), G(n, -1);
492
496
  break;
493
497
  case "Home":
494
- t.preventDefault(), q(!0);
498
+ t.preventDefault(), K(!0);
495
499
  break;
496
500
  case "End":
497
- t.preventDefault(), J(!0);
501
+ t.preventDefault(), q(!0);
498
502
  break;
499
503
  case "ArrowLeft":
500
- O.back ? (t.preventDefault(), t.stopPropagation(), O.back()) : O.level > 0 && (t.preventDefault(), t.stopPropagation(), Qe("close-level"));
504
+ E.back ? (t.preventDefault(), t.stopPropagation(), E.back()) : E.level > 0 && (t.preventDefault(), t.stopPropagation(), tt("close-level"));
501
505
  break;
502
- default: bn(t);
506
+ default: wn(t);
503
507
  }
504
- }, Xn = {
505
- slots: k.slots,
506
- setItemEl: cn,
508
+ }, $n = {
509
+ slots: D.slots,
510
+ setItemEl: un,
507
511
  itemAttrs: Bt,
508
512
  rowPart: Vt,
509
- slotProps: Gt,
513
+ slotProps: Kt,
510
514
  rowSlot: kt,
511
515
  itemSlot: Ot,
512
516
  groupRowSlot: At,
513
- rowTextId: Yt,
514
- rowDescriptionId: Xt
517
+ rowTextId: Xt,
518
+ rowDescriptionId: Zt
515
519
  };
516
- return Xe({
517
- focusFirst: q,
518
- focusLast: J,
519
- focusRow: gn
520
- }), (e, t) => (x(!0), p(l, null, C(M.value, (e, o) => (x(), p(l, { key: e.id ?? o }, [
521
- e.divider ? (x(), p("hr", Ne)) : f("", !0),
522
- z(e) ? (x(), p("div", {
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: qt(o),
528
+ id: Jt(o),
525
529
  ref_for: !0,
526
- ref: (e) => ln(o, e),
527
- class: y(["bb-dropdown__group-title", Mt(e)]),
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 && Yn(o, t),
533
- je((t) => e.onClick?.(t), ["enter"]),
534
- je(Me((t) => e.onClick?.(t), ["prevent"]), ["space"])
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(T(c), {
538
- props: V(e, F(o)),
539
- slots: [R(e, "prepend"), T(k).slots["item:prepend"]]
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: D(() => [e["prepend:icon"] ? (x(), d(r, {
546
+ default: T(() => [e["prepend:icon"] ? (y(), d(r, {
542
547
  key: 0,
543
- class: "group-title__prepend-icon",
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(T(c), {
549
- props: V(e, F(o)),
550
- slots: [R(e)]
553
+ h(C(c), {
554
+ props: sn(e, L(o)),
555
+ slots: [z(e)]
551
556
  }, {
552
- default: D(() => [e.label ? (x(), p("span", Fe, w(e.label), 1)) : f("", !0)]),
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(T(c), {
556
- props: V(e, F(o)),
557
- slots: [R(e, "append"), T(k).slots["item:append"]]
560
+ h(C(c), {
561
+ props: sn(e, L(o)),
562
+ slots: [z(e, "append"), C(D).slots["item:append"]]
558
563
  }, {
559
- default: D(() => [e["append:icon"] ? (x(), d(r, {
564
+ default: T(() => [e["append:icon"] ? (y(), d(r, {
560
565
  key: 0,
561
- class: "group-title__append-icon",
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
- ], 42, Pe)) : f("", !0),
567
- T(A) && Kt(e).length ? (x(), p("div", Ie, [m("div", Le, [(x(!0), p(l, null, C(Kt(e), (r) => (x(), d(n, {
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: !T(k).disabled.value,
575
+ clearable: !C(D).disabled.value,
571
576
  size: "xl",
572
577
  variant: "secondary",
573
- "onClick:clear": (t) => T(k).deselect(e.id, r.key),
574
- onMousedown: t[0] ||= Me(() => {}, ["prevent"])
578
+ "onClick:clear": (t) => C(D).deselect(e.id, r.key),
579
+ onMousedown: t[0] ||= Fe(() => {}, ["prevent"])
575
580
  }, {
576
- default: D(() => [we(w(r.text), 1)]),
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 ? (x(), p("div", _({
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 }, T(k).passthrough.box), [
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: T(ae)
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": rt(e) ? at(o) : void 0,
594
- "aria-label": e.searchPlaceholder || T(et),
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 || T(et),
602
+ placeholder: e.searchPlaceholder || C(it),
598
603
  role: "searchbox",
599
604
  type: "text",
600
- value: T(k).queryFor(e.id)
601
- }, { ref_for: !0 }, T(k).passthrough.input, {
602
- onInput: (t) => T(k).setQuery(e.id, t.target.value),
603
- onKeydown: Sn
604
- }), null, 16, Re),
605
- rt(e) ? (x(), p("span", {
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: at(o),
613
+ id: ct(o),
608
614
  class: "bb-sr-only"
609
- }, w(it(e)), 9, ze)) : f("", !0),
610
- e.id && T(k).isGroupLoading(e.id) ? (x(), p("div", Be)) : f("", !0)
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": an(e, o),
614
- class: y(["bb-dropdown__group-items", {
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 && T(k).isGroupLoading(e.id)
622
+ "bb-dropdown__group-items--loading": !!e.id && C(D).isGroupLoading(e.id)
617
623
  }]),
618
- role: rn(e),
619
- style: Ee({ maxHeight: Ct(e) })
620
- }, [(x(!0), p(l, null, C(ft(e), (t) => (x(), d(pt, _({
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-dropdown__section",
630
+ class: "bb-dropdown__group-section",
625
631
  role: "group",
626
- "aria-labelledby": Jt(o, t.key)
632
+ "aria-labelledby": Yt(o, t.key)
627
633
  }), {
628
- default: D(() => [t.title === void 0 ? f("", !0) : (x(), p("div", {
634
+ default: T(() => [t.title === void 0 ? f("", !0) : (y(), p("div", _({
629
635
  key: 0,
630
- id: Jt(o, t.key),
631
- class: "bb-dropdown__group-title bb-dropdown__section-title",
636
+ id: Yt(o, t.key),
637
+ class: "bb-dropdown__group-header",
632
638
  role: "presentation"
633
- }, [h(T(c), {
634
- props: ht(t),
635
- slots: mt(e)
639
+ }, { ref_for: !0 }, C(D).passthrough.groupHeader), [h(C(c), {
640
+ props: _t(t),
641
+ slots: gt(e)
636
642
  }, {
637
- default: D(() => [m("span", Ue, w(t.title), 1)]),
643
+ default: T(() => [m("span", Ke, S(t.title), 1)]),
638
644
  _: 2
639
- }, 1032, ["props", "slots"])], 8, He)), (x(!0), p(l, null, C(t.items, (n, r) => (x(), p(l, { key: n.rowKey }, [Ut(e, n) ? (x(), p(l, { key: 0 }, [], 64)) : n.placeholder ? (x(), p("div", {
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) => vt(o, e),
643
- class: y(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${n.placeholder}`]),
648
+ ref: (e) => yt(o, e),
649
+ class: Oe(["bb-dropdown__placeholder", `bb-dropdown__placeholder--${n.placeholder}`]),
644
650
  role: "presentation"
645
- }, [I(n) ? (x(), d(ke(I(n)), _({
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 ? T(k).queryFor(e.id) : "",
656
+ query: e.id ? C(D).queryFor(e.id) : "",
651
657
  text: n.label
652
- }), null, 16)) : (x(), p(l, { key: 1 }, [n.placeholder === "failed" ? (x(), d(i, {
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", We, w(n.label), 1)], 64))], 2)) : (x(), p(l, { key: 2 }, [h(te, {
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: F(o) + t.start + r,
663
+ index: L(o) + t.start + r,
658
664
  item: n,
659
- row: Xn,
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 ? (x(), d(a, {
672
+ ]), n.items && !g.navigate ? (y(), d(a, {
667
673
  key: 0,
668
- anchor: H.value[F(o) + t.start + r],
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": Y.value === n.rowKey,
673
- offset: On.value,
674
- placement: kn.value,
678
+ "model-value": J.value === n.rowKey,
679
+ offset: Mn.value,
680
+ placement: Nn.value,
675
681
  role: "none",
676
- "transition-duration": Ye,
677
- "onUpdate:modelValue": (e) => Bn(n.rowKey, e)
682
+ "transition-duration": Qe,
683
+ "onUpdate:modelValue": (e) => Un(n.rowKey, e)
678
684
  }, {
679
- default: D(({ availableHeight: e }) => [m("span", {
680
- id: nn(n),
685
+ default: T(({ availableHeight: e }) => [m("span", {
686
+ id: rn(n),
681
687
  ref_for: !0,
682
- ref: (e) => Mn(n.rowKey, 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": T(k).rootId,
686
- inert: Dn(n.rowKey),
687
- role: tn(n) ? "dialog" : "menu",
688
- style: Ee({ "--max-h": e == null ? void 0 : `${e}px` }),
689
- onKeydown: (e) => Pn(F(o) + t.start + r, e),
690
- onPointerenter: Un,
691
- onPointerleave: (e) => Gn(n.rowKey, 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) => Fn(n.rowKey, e),
700
+ ref: (e) => zn(n.rowKey, e),
695
701
  groups: wt(n.items),
696
702
  level: g.level + 1,
697
- onCloseLevel: (e) => Vn(F(o) + t.start + r)
703
+ onCloseLevel: (e) => Wn(L(o) + t.start + r)
698
704
  }, null, 8, [
699
705
  "groups",
700
706
  "level",
701
707
  "onCloseLevel"
702
- ])], 44, Ge)]),
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, Ve)
719
+ }, 1040, ["titled"]))), 128))], 14, We)
714
720
  ], 64))), 128));
715
721
  }
716
722
  });
717
- export { Xe as default };
723
+ export { $e as default };