bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.74

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 (179) hide show
  1. package/README.md +4 -2
  2. package/bin/bitboss-ui-mcp.mjs +101 -3
  3. package/bin/bitboss-ui.mjs +6 -1
  4. package/bin/cli.mjs +31 -5
  5. package/dist/ai/BbBadge.md +4 -4
  6. package/dist/ai/BbCalendar.md +4 -3
  7. package/dist/ai/BbColorPalette.md +8 -9
  8. package/dist/ai/BbConfirmPortal.md +1 -1
  9. package/dist/ai/BbDatePicker.md +4 -3
  10. package/dist/ai/BbDialog.md +14 -4
  11. package/dist/ai/BbDropdown.md +23 -10
  12. package/dist/ai/BbDropdownButton.md +2 -2
  13. package/dist/ai/BbForm.md +4 -1
  14. package/dist/ai/BbHoverCardPortal.md +1 -1
  15. package/dist/ai/BbNumberInput.md +5 -3
  16. package/dist/ai/BbPopoverPortal.md +1 -1
  17. package/dist/ai/BbTable.md +43 -19
  18. package/dist/ai/BbTimePicker.md +4 -3
  19. package/dist/ai/BbToastPortal.md +1 -1
  20. package/dist/ai/changelog.json +56 -4
  21. package/dist/ai/components.json +54 -18
  22. package/dist/ai/guides/design-tokens.md +20 -0
  23. package/dist/ai/guides/eslint-rules.md +1 -1
  24. package/dist/ai/guides/inertia-helpers.md +613 -53
  25. package/dist/ai/guides/migration/adoption-checklist.md +5 -5
  26. package/dist/ai/guides/migration/v2-to-v3.md +24 -0
  27. package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
  28. package/dist/ai/guides/preset-components.md +15 -2
  29. package/dist/ai/guides/reporting.md +49 -0
  30. package/dist/ai/helpers/inertia/manifest.json +33 -38
  31. package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
  32. package/dist/ai/helpers/inertia/useQuery.ts +24 -6
  33. package/dist/ai/helpers/inertia/utils.ts +552 -3
  34. package/dist/ai/index.md +1 -0
  35. package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
  36. package/dist/ai/manifest/components/BbCalendar.json +2 -2
  37. package/dist/ai/manifest/components/BbColorPalette.json +3 -3
  38. package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
  39. package/dist/ai/manifest/components/BbDatePicker.json +3 -3
  40. package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
  41. package/dist/ai/manifest/components/BbDropdown.json +3 -3
  42. package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
  43. package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
  44. package/dist/ai/manifest/components/BbForm.json +1 -1
  45. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  46. package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
  47. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  48. package/dist/ai/manifest/components/BbPopover.json +1 -1
  49. package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
  50. package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
  51. package/dist/ai/manifest/components/BbTable.tree.json +12 -6
  52. package/dist/ai/manifest/components/BbTimePicker.json +3 -3
  53. package/dist/ai/manifest/components/BbToastPortal.json +1 -1
  54. package/dist/ai/manifest/components/CommonPopover.json +1 -1
  55. package/dist/ai/manifest/index.json +2 -2
  56. package/dist/ai/manifest/meta.json +36 -0
  57. package/dist/ai/manifest/types.advanced.json +81 -80
  58. package/dist/ai/manifest/types.api.json +66 -65
  59. package/dist/ai/manifest/types.wrapper.json +155 -118
  60. package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
  61. package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
  62. package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
  63. package/dist/ai/source/BbAlert.md +16 -4
  64. package/dist/ai/source/BbAvatar.md +2 -0
  65. package/dist/ai/source/BbBreadcrumbs.md +4 -1
  66. package/dist/ai/source/BbCalendar.md +22 -12
  67. package/dist/ai/source/BbColorPalette.md +41 -12
  68. package/dist/ai/source/BbConfirm.md +7 -0
  69. package/dist/ai/source/BbConfirmPortal.md +9 -4
  70. package/dist/ai/source/BbDatePicker.md +53 -22
  71. package/dist/ai/source/BbDatePickerInput.md +32 -8
  72. package/dist/ai/source/BbDialog.md +31 -1
  73. package/dist/ai/source/BbDropdown.md +52 -24
  74. package/dist/ai/source/BbDropdownGroup.md +17 -21
  75. package/dist/ai/source/BbForm.md +73 -6
  76. package/dist/ai/source/BbHoverCard.md +7 -0
  77. package/dist/ai/source/BbHoverCardPortal.md +9 -5
  78. package/dist/ai/source/BbNumberInput.md +5 -6
  79. package/dist/ai/source/BbOffCanvas.md +34 -1
  80. package/dist/ai/source/BbPopover.md +7 -0
  81. package/dist/ai/source/BbPopoverPortal.md +9 -5
  82. package/dist/ai/source/BbRadio.md +4 -3
  83. package/dist/ai/source/BbRadioGroup.md +7 -5
  84. package/dist/ai/source/BbTable.md +54 -6
  85. package/dist/ai/source/BbTag.md +10 -3
  86. package/dist/ai/source/BbTimePicker.md +50 -15
  87. package/dist/ai/source/BbTimePickerInput.md +30 -7
  88. package/dist/ai/source/BbToast.md +14 -0
  89. package/dist/ai/source/BbToastPortal.md +16 -4
  90. package/dist/ai/source/CommonFieldInput.md +11 -5
  91. package/dist/ai/source/CommonPopover.md +4 -1
  92. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
  93. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
  94. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  95. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
  96. package/dist/components/BbCalendar/types.d.ts +2 -2
  97. package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
  98. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
  99. package/dist/components/BbColorPalette/types.d.ts +1 -1
  100. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
  101. package/dist/components/BbConfirm/types.d.ts +5 -0
  102. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  103. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
  104. package/dist/components/BbDatePicker/types.d.ts +2 -2
  105. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
  106. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
  107. package/dist/components/BbDialog/leaveGhost.js +33 -0
  108. package/dist/components/BbDialog/overlayActions.js +34 -20
  109. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
  110. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
  111. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
  112. package/dist/components/BbDropdown/types.d.ts +8 -17
  113. package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
  114. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
  115. package/dist/components/BbForm/types.d.ts +31 -0
  116. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
  117. package/dist/components/BbHoverCard/types.d.ts +5 -0
  118. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
  119. package/dist/components/BbNumberInput/numberDisplay.js +102 -106
  120. package/dist/components/BbNumberInput/types.d.ts +4 -3
  121. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
  122. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
  123. package/dist/components/BbPopover/types.d.ts +5 -0
  124. package/dist/components/BbRadio/types.d.ts +4 -3
  125. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
  126. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
  127. package/dist/components/BbTable/BbTableDataRow.js +96 -96
  128. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
  129. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
  130. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
  131. package/dist/components/BbTimePicker/types.d.ts +2 -2
  132. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
  133. package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
  134. package/dist/components/BbToast/types.d.ts +5 -0
  135. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
  136. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
  137. package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
  138. package/dist/composables/formSubmitLock.js +2 -1
  139. package/dist/composables/overlayRegistry.js +52 -42
  140. package/dist/composables/useActiveInactiveState.js +8 -4
  141. package/dist/composables/useBbDialog.js +5 -5
  142. package/dist/composables/useOwnModel.js +16 -0
  143. package/dist/composables/useSegmentedFields.js +31 -20
  144. package/dist/i18n/currencyDigits.js +58 -0
  145. package/dist/i18n/regionDates.js +250 -0
  146. package/dist/i18n/regionHints.js +30 -41
  147. package/dist/index.d.ts +34 -30
  148. package/dist/llms-full.txt +860 -129
  149. package/dist/llms.txt +3 -1
  150. package/dist/styles.css +2 -2
  151. package/dist/types/ActionButton.d.ts +3 -1
  152. package/dist/types/CommonProps.d.ts +8 -0
  153. package/dist/utilities/functions/hash.js +97 -64
  154. package/dist/utilities/functions/isEqual.js +33 -25
  155. package/dist/utils/versionCheck.js +1 -1
  156. package/dist/vite-plugin.d.ts +2 -1
  157. package/dist/vite.js +8 -4
  158. package/llms.txt +3 -1
  159. package/package.json +1 -2
  160. package/scripts/README.md +1 -1
  161. package/scripts/lib/adoption-checklist.json +6 -5
  162. package/scripts/lib/agent-manifest.mjs +33 -6
  163. package/scripts/lib/agent-setup.mjs +54 -6
  164. package/scripts/lib/cldr-pins.ts +182 -0
  165. package/scripts/lib/engines-include.d.mts +5 -0
  166. package/scripts/lib/engines-include.mjs +40 -0
  167. package/scripts/lib/eslint-plugin.mjs +8 -2
  168. package/scripts/lib/hidden-label-placeholder.mjs +25 -5
  169. package/scripts/lib/idiom-scan.mjs +30 -3
  170. package/scripts/lib/legacy-agent-files.json +152 -0
  171. package/scripts/lib/mcp-config.mjs +74 -7
  172. package/scripts/lib/portal-names.mjs +78 -8
  173. package/scripts/lib/release-results.mjs +5 -2
  174. package/scripts/lib/report.mjs +340 -0
  175. package/scripts/lib/run-beat.mjs +14 -0
  176. package/scripts/lib/run-records.mjs +313 -0
  177. package/scripts/lib/selector-log.mjs +98 -0
  178. package/scripts/lib/ticket-beat.mjs +30 -0
  179. package/scripts/lib/validate-bb-markup.mjs +17 -2
@@ -2,29 +2,31 @@ import { asSheetAttrs as e } from "../BbOffCanvas/sheetAttrs.js";
2
2
  import { useConfig as t } from "../../composables/useConfig.js";
3
3
  import { useConfigDefaults as n, useConfigSetting as r } from "../../composables/useConfigDefaults.js";
4
4
  import { useId as i } from "../../composables/useId.js";
5
- import { extractDomContainer as a } from "../../utilities/functions/extractDomContainer.js";
6
- import { useLocale as o } from "../../composables/useLocale.js";
7
- import { useLogger as s } from "../../composables/useLogger.js";
8
- import { useEscapeStackEntry as c } from "../../composables/useEscapeStackEntry.js";
9
- import { useMobile as ee } from "../../composables/useMobile.js";
5
+ import { useOwnModel as a } from "../../composables/useOwnModel.js";
6
+ import { extractDomContainer as o } from "../../utilities/functions/extractDomContainer.js";
7
+ import { useLocale as s } from "../../composables/useLocale.js";
8
+ import { useLogger as c } from "../../composables/useLogger.js";
9
+ import { useEscapeStackEntry as ee } from "../../composables/useEscapeStackEntry.js";
10
+ import { useMobile as te } from "../../composables/useMobile.js";
10
11
  import { transitions as l } from "../../utilities/misc/transitions.js";
11
- import te from "../CommonTimeSelector/CommonTimeSelector.vue.js";
12
- import { spokenTimeOf as ne } from "../BbCalendar/useDayjsLocale.js";
13
- import re from "../BbOffCanvas/BbOffCanvas.vue.js";
14
- import { BB_OFF_CANVAS_PT as ie } from "../BbOffCanvas/types.js";
15
- import ae from "../CommonPopover/CommonPopover.vue.js";
12
+ import ne from "../CommonTimeSelector/CommonTimeSelector.vue.js";
13
+ import { spokenTimeOf as re } from "../BbCalendar/useDayjsLocale.js";
14
+ import { useHydrated as ie } from "../../composables/useHydrated.js";
15
+ import ae from "../BbOffCanvas/BbOffCanvas.vue.js";
16
+ import { BB_OFF_CANVAS_PT as oe } from "../BbOffCanvas/types.js";
17
+ import se from "../CommonPopover/CommonPopover.vue.js";
16
18
  import { BB_TIME_PICKER_PT as u } from "./types.js";
17
- import { usePassthrough as oe } from "../../composables/usePassthrough.js";
18
- import { firstFocusableMatch as se } from "../../utils/focusVisibility.js";
19
- import { withoutPt as ce } from "../../utils/passthrough.js";
20
- import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as le, guardReactiveProps as ue, mergeProps as v, nextTick as de, normalizeClass as fe, normalizeProps as y, onBeforeUnmount as pe, onDeactivated as me, openBlock as b, ref as x, renderList as he, renderSlot as ge, toDisplayString as S, unref as C, useAttrs as _e, watch as w, withCtx as T } from "vue";
21
- import { createReusableTemplate as ve } from "@vueuse/core";
19
+ import { usePassthrough as ce } from "../../composables/usePassthrough.js";
20
+ import { firstFocusableMatch as le } from "../../utils/focusVisibility.js";
21
+ import { withoutPt as ue } from "../../utils/passthrough.js";
22
+ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as de, createVNode as g, defineComponent as _, guardReactiveProps as v, mergeProps as y, nextTick as fe, normalizeClass as pe, normalizeProps as me, onBeforeUnmount as he, onDeactivated as ge, openBlock as b, ref as x, renderList as _e, renderSlot as ve, toDisplayString as S, unref as C, useAttrs as ye, watch as w, withCtx as T } from "vue";
23
+ import { createReusableTemplate as be } from "@vueuse/core";
22
24
  // src/components/BbTimePicker/BbTimePicker.vue?vue&type=script&setup=true&lang.ts
23
- var ye = ["aria-label"], be = [
25
+ var xe = ["aria-label"], Se = [
24
26
  "aria-pressed",
25
27
  "disabled",
26
28
  "onClick"
27
- ], E = /*@__PURE__*/ le({
29
+ ], E = /*@__PURE__*/ _({
28
30
  inheritAttrs: !1,
29
31
  __name: "BbTimePicker",
30
32
  props: {
@@ -84,8 +86,8 @@ var ye = ["aria-label"], be = [
84
86
  "error",
85
87
  "time-pick"
86
88
  ],
87
- setup(l, { emit: le }) {
88
- let E = l, xe = le, Se = r(null, "popoverOffset"), D = E, O = xe, k = oe({
89
+ setup(l, { emit: _ }) {
90
+ let E = l, Ce = _, we = r(null, "popoverOffset"), D = E, O = Ce, { model: k, set: A } = a(D, "modelValue", (e, t) => O(e, t), () => D.range ? [] : null), j = ce({
89
91
  component: "BbTimePicker",
90
92
  props: D,
91
93
  parts: u.parts,
@@ -94,92 +96,96 @@ var ye = ["aria-label"], be = [
94
96
  open: () => H.value,
95
97
  disabled: () => !!D.disabled
96
98
  },
97
- attrs: _e()
98
- }), Ce = t(), we = f(() => {
99
- let e = (e) => ne(e, Ce.locale, !!D.ampm, !!D.seconds), t = D.modelValue;
99
+ attrs: ye()
100
+ }), Te = t(), { isHydrated: Ee } = ie(), De = f(() => {
101
+ let e = (e) => re(e, Te.locale, !!D.ampm, !!D.seconds, Ee.value), t = k.value;
100
102
  return Array.isArray(t) ? t.filter(Boolean).map(e).join(" – ") : t ? e(t) : "";
101
- }), { t: A } = o(), { isMobile: j } = ee(), Te = s(), [Ee, M] = ve(), N = i().id.value, P = `${N}-panel`, F = f(() => v({
102
- id: P,
103
- class: ["bb-time-picker__panel", { "bb-time-picker__panel--sheet": Z.value }]
104
- }, Z.value ? {} : k.panel ?? {})), I = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, L = (e) => {
103
+ }), { t: M } = s(), { isMobile: N } = te(), Oe = c(), [ke, Ae] = be(), P = i().id.value, F = `${P}-panel`, je = f(() => y({
104
+ id: F,
105
+ class: ["bb-time-picker__panel", { "bb-time-picker__panel--sheet": Q.value }]
106
+ }, Q.value ? {} : j.panel ?? {})), I = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, L = (e) => {
105
107
  let t = I.exec(e);
106
108
  if (!t) return null;
107
109
  let n = parseInt(t[1], 10), r = parseInt(t[2], 10);
108
110
  return n > 23 || r > 59 ? null : n * 60 + r;
109
111
  };
110
- for (let [e, t] of [["min", D.min], ["max", D.max]]) t && L(t) === null && Te.throw(`BbTimePicker: ${e} must be in the format HH:mm`);
111
- let R = f(() => D.activeSegment ?? z.value), z = x("start"), De = (e) => {
112
+ for (let [e, t] of [["min", D.min], ["max", D.max]]) t && L(t) === null && Oe.throw(`BbTimePicker: ${e} must be in the format HH:mm`);
113
+ let R = f(() => D.activeSegment ?? z.value), z = x("start"), Me = (e) => {
112
114
  z.value = e, O("update:activeSegment", e);
113
- }, Oe = f(() => [{
115
+ }, Ne = f(() => [{
114
116
  value: "start",
115
- label: A("timePickerInput.start").value
117
+ label: M("timePickerInput.start").value
116
118
  }, {
117
119
  value: "end",
118
- label: A("timePickerInput.end").value
119
- }]), ke = f(() => `${A("timePickerInput.start").value} / ${A("timePickerInput.end").value}`), B = x(), V = x(), Ae = f(() => D.activator != null), je = (e) => {
120
- B.value = a(e) ?? void 0;
121
- }, Me = (e) => {
122
- V.value = a(e) ?? void 0;
120
+ label: M("timePickerInput.end").value
121
+ }]), Pe = f(() => `${M("timePickerInput.start").value} / ${M("timePickerInput.end").value}`), B = x(), V = x(), Fe = f(() => D.activator != null), Ie = (e) => {
122
+ B.value = o(e) ?? void 0;
123
+ }, Le = (e) => {
124
+ V.value = o(e) ?? void 0;
123
125
  };
124
126
  w(() => D.activator, (e) => {
125
- B.value = a(e) ?? void 0;
127
+ B.value = o(e) ?? void 0;
126
128
  }, { immediate: !0 }), w(() => D.anchor, (e) => {
127
- V.value = e == null ? void 0 : a(e) ?? void 0;
129
+ V.value = e == null ? void 0 : o(e) ?? void 0;
128
130
  }, { immediate: !0 });
129
- let Ne = f(() => V.value ?? B.value), H = x(!1), U = null, W = (e) => {
130
- D.disabled || D.readonly || (e.stopPropagation(), H.value || (X.value = Y()), H.value = !H.value);
131
+ let Re = f(() => V.value ?? B.value), H = x(!1), U = null, W = (e) => {
132
+ D.disabled || D.readonly || (e.stopPropagation(), H.value || (Z.value = X()), H.value = !H.value);
131
133
  }, G = (e) => {
132
- e.target instanceof HTMLDialogElement && (H.value = !1);
134
+ let t = e.target;
135
+ t instanceof Node && ((document.getElementById(F)?.closest(".bb-common-popover"))?.contains(t) || B.value?.contains(t) || (H.value = !1));
133
136
  };
134
137
  w(H, async (e) => {
135
- e ? (U = document.activeElement instanceof HTMLElement ? document.activeElement : null, Z.value || document.addEventListener("click", G, { passive: !0 }), await de(), se(document.getElementById(P), "[tabindex=\"0\"]")?.focus()) : (document.removeEventListener("click", G), U?.focus(), U = null);
138
+ e ? (U = document.activeElement instanceof HTMLElement ? document.activeElement : null, Q.value || document.addEventListener("click", G, {
139
+ passive: !0,
140
+ capture: !0
141
+ }), await fe(), le(document.getElementById(F), "[tabindex=\"0\"]")?.focus()) : (document.removeEventListener("click", G, { capture: !0 }), U?.focus(), U = null);
136
142
  });
137
143
  let K = null, q = x();
138
144
  w(B, (e) => {
139
145
  if (K?.(), K = null, !e) return;
140
146
  let t = !e.id;
141
- t && (e.id = `${N}_activator`), q.value = e.id, e.addEventListener("click", W), K = () => {
147
+ t && (e.id = `${P}_activator`), q.value = e.id, e.addEventListener("click", W), K = () => {
142
148
  e.removeEventListener("click", W), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-labelledby"), e.removeAttribute("aria-controls"), t && e.removeAttribute("id"), q.value = void 0;
143
149
  };
144
150
  }, { immediate: !0 });
145
- let Pe = f(() => D.label ?? A("timePickerInput.openPicker").value), J = `${N}_label`, Fe = f(() => q.value ? `${J} ${q.value}` : J);
151
+ let J = f(() => D.label ?? M("timePickerInput.openPicker").value), Y = `${P}_label`, ze = f(() => q.value ? `${Y} ${q.value}` : Y);
146
152
  w([B, H], ([e, t]) => {
147
- e && (e.setAttribute("aria-haspopup", "dialog"), e.setAttribute("aria-expanded", t ? "true" : "false"), e.setAttribute("aria-labelledby", `${J} ${e.id}`), t ? e.setAttribute("aria-controls", P) : e.removeAttribute("aria-controls"));
148
- }, { immediate: !0 }), pe(() => {
149
- K?.(), document.removeEventListener("click", G);
153
+ e && (e.setAttribute("aria-haspopup", "dialog"), e.setAttribute("aria-expanded", t ? "true" : "false"), e.setAttribute("aria-labelledby", `${Y} ${e.id}`), t ? e.setAttribute("aria-controls", F) : e.removeAttribute("aria-controls"));
154
+ }, { immediate: !0 }), he(() => {
155
+ K?.(), document.removeEventListener("click", G, { capture: !0 });
150
156
  });
151
- let Ie = n("BbTimePicker", D, { adaptive: !0 }), Y = () => Ie.adaptive && j.value ? "canvas" : "popover", X = x(Y()), Z = f(() => X.value === "canvas");
157
+ let Be = n("BbTimePicker", D, { adaptive: !0 }), X = () => Be.adaptive && N.value ? "canvas" : "popover", Z = x(X()), Q = f(() => Z.value === "canvas");
152
158
  w([
153
- () => Ie.adaptive,
154
- j,
159
+ () => Be.adaptive,
160
+ N,
155
161
  H
156
162
  ], () => {
157
- H.value || (X.value = Y());
158
- }), c(() => H.value && !Z.value, () => H.value = !1);
159
- let Le = f(() => ({
163
+ H.value || (Z.value = X());
164
+ }), ee(() => H.value && !Q.value, () => H.value = !1);
165
+ let Ve = f(() => ({
160
166
  side: "bottom",
161
167
  size: "auto",
162
168
  draggable: !0,
163
169
  transitionDuration: D.transitionDuration,
164
170
  hideClose: !0,
165
- ...D.offCanvasProps?.title ? {} : { "aria-labelledby": Fe.value },
166
- ...ce(D.offCanvasProps)
167
- })), Re = () => {
171
+ ...D.offCanvasProps?.title ? {} : { "aria-labelledby": ze.value },
172
+ ...ue(D.offCanvasProps)
173
+ })), He = () => {
168
174
  B.value?.focus(), O("hidden");
169
- }, ze = (e) => +(e === "end"), Q = (e) => {
170
- let t = D.modelValue;
171
- return t == null ? null : Array.isArray(t) ? t[ze(e)] ?? null : e === "start" && typeof t == "string" ? t : null;
172
- }, Be = (e) => {
173
- let t = Q(e), n = t ? I.exec(t) : null;
175
+ }, Ue = (e) => +(e === "end"), We = (e) => {
176
+ let t = k.value;
177
+ return t == null ? null : Array.isArray(t) ? t[Ue(e)] ?? null : e === "start" && typeof t == "string" ? t : null;
178
+ }, Ge = (e) => {
179
+ let t = We(e), n = t ? I.exec(t) : null;
174
180
  return n ? {
175
181
  hour: n[1].padStart(2, "0"),
176
182
  minute: n[2].padStart(2, "0"),
177
183
  second: (n[3] ?? "").padStart(n[3] ? 2 : 0, "0")
178
184
  } : null;
179
- }, $ = f(() => Be(R.value)), Ve = f(() => $.value?.hour ?? ""), He = f(() => $.value?.minute ?? ""), Ue = f(() => $.value?.second ?? ""), We = (e) => D.seconds ? `${e.hour}:${e.minute}:${e.second || "00"}` : `${e.hour}:${e.minute}`, Ge = (e) => {
185
+ }, $ = f(() => Ge(R.value)), Ke = f(() => $.value?.hour ?? ""), qe = f(() => $.value?.minute ?? ""), Je = f(() => $.value?.second ?? ""), Ye = (e) => D.seconds ? `${e.hour}:${e.minute}:${e.second || "00"}` : `${e.hour}:${e.minute}`, Xe = (e) => {
180
186
  let t = L(e);
181
187
  return t === null ? e : D.min && t < L(D.min) ? D.min + (D.seconds ? ":00" : "") : D.max && t > L(D.max) ? D.max + (D.seconds ? ":00" : "") : e;
182
- }, Ke = (e) => {
188
+ }, Ze = (e) => {
183
189
  O("time-pick", e);
184
190
  let t = R.value, n = $.value ? { ...$.value } : {
185
191
  hour: "",
@@ -191,63 +197,63 @@ var ye = ["aria-label"], be = [
191
197
  r && t < 12 && (t += 12), !r && t >= 12 && (t -= 12), n.hour = String(t).padStart(2, "0");
192
198
  } else n[e.unit] = e.value;
193
199
  n.hour ||= "00", n.minute ||= "00", D.seconds && !n.second && (n.second = "00");
194
- let r = We(n), i = Ge(r);
200
+ let r = Ye(n), i = Xe(r);
195
201
  if (i !== r && O("error", {
196
202
  code: "disabled_time",
197
203
  original: r,
198
204
  normalized: i
199
205
  }), !D.range) {
200
- O("update:modelValue", i);
206
+ A(i);
201
207
  return;
202
208
  }
203
- let a = Q(t === "start" ? "end" : "start"), o = t === "start" ? i : a, s = t === "start" ? a : i, c = [];
204
- o && c.push(o), s && c.push(s), O("update:modelValue", c);
209
+ let a = We(t === "start" ? "end" : "start"), o = t === "start" ? i : a, s = t === "start" ? a : i, c = [];
210
+ o && c.push(o), s && c.push(s), A(c);
205
211
  };
206
- return me(() => {
212
+ return ge(() => {
207
213
  H.value = !1;
208
214
  }), (t, n) => (b(), h(d, null, [
209
- Ae.value ? m("", !0) : ge(t.$slots, "activator", y(ue({
215
+ Fe.value ? m("", !0) : ve(t.$slots, "activator", me(v({
210
216
  props: {
211
- ref: je,
217
+ ref: Ie,
212
218
  "aria-haspopup": "dialog",
213
219
  "aria-expanded": H.value ? "true" : "false",
214
- "aria-labelledby": Fe.value
220
+ "aria-labelledby": ze.value
215
221
  },
216
- anchorProps: { ref: Me },
222
+ anchorProps: { ref: Le },
217
223
  open: H.value,
218
- value: l.modelValue,
219
- text: we.value,
224
+ value: C(k),
225
+ text: De.value,
220
226
  disabled: !!l.disabled
221
227
  })), void 0, void 0, 0),
222
- g("span", {
223
- id: J,
228
+ de("span", {
229
+ id: Y,
224
230
  hidden: ""
225
- }, S(Pe.value), 1),
226
- _(C(Ee), null, {
231
+ }, S(J.value), 1),
232
+ g(C(ke), null, {
227
233
  default: T(() => [l.range ? (b(), h("div", {
228
234
  key: 0,
229
- "aria-label": ke.value,
235
+ "aria-label": Pe.value,
230
236
  class: "bb-time-picker__segments",
231
237
  role: "group"
232
- }, [(b(!0), h(d, null, he(Oe.value, (e) => (b(), h("button", {
238
+ }, [(b(!0), h(d, null, _e(Ne.value, (e) => (b(), h("button", {
233
239
  key: e.value,
234
240
  "aria-pressed": R.value === e.value,
235
- class: fe(["bb-time-picker__segment", { "bb-time-picker__segment--active": R.value === e.value }]),
241
+ class: pe(["bb-time-picker__segment", { "bb-time-picker__segment--active": R.value === e.value }]),
236
242
  disabled: l.disabled || l.readonly,
237
243
  type: "button",
238
- onClick: (t) => De(e.value)
239
- }, S(e.label), 11, be))), 128))], 8, ye)) : m("", !0), _(te, {
244
+ onClick: (t) => Me(e.value)
245
+ }, S(e.label), 11, Se))), 128))], 8, xe)) : m("", !0), g(ne, {
240
246
  ampm: l.ampm,
241
247
  disabled: l.disabled || l.readonly,
242
- hour: Ve.value,
248
+ hour: Ke.value,
243
249
  max: l.max,
244
250
  min: l.min,
245
- minute: He.value,
246
- passthrough: C(k),
247
- second: Ue.value,
251
+ minute: qe.value,
252
+ passthrough: C(j),
253
+ second: Je.value,
248
254
  seconds: l.seconds,
249
255
  step: l.step,
250
- onSelect: Ke
256
+ onSelect: Ze
251
257
  }, null, 8, [
252
258
  "ampm",
253
259
  "disabled",
@@ -262,37 +268,37 @@ var ye = ["aria-label"], be = [
262
268
  ])]),
263
269
  _: 1
264
270
  }),
265
- Z.value ? (b(), p(re, v({
271
+ Q.value ? (b(), p(ae, y({
266
272
  key: 1,
267
273
  modelValue: H.value,
268
274
  "onUpdate:modelValue": n[0] ||= (e) => H.value = e,
269
275
  class: "bb-time-picker__sheet",
270
- pt: C(k).forward({
276
+ pt: C(j).forward({
271
277
  panel: "root",
272
278
  sheet: "root"
273
- }, C(ie).states, () => l.offCanvasProps?.pt)
274
- }, v(Le.value, C(e)(C(k).forwardAttrs)), {
275
- onHidden: Re,
279
+ }, C(oe).states, () => l.offCanvasProps?.pt)
280
+ }, y(Ve.value, C(e)(C(j).forwardAttrs)), {
281
+ onHidden: He,
276
282
  onHide: n[1] ||= (e) => C(O)("hide"),
277
283
  onShow: n[2] ||= (e) => C(O)("show"),
278
284
  onShown: n[3] ||= (e) => C(O)("shown")
279
285
  }), {
280
- default: T(() => [g("div", y(ue(F.value)), [_(C(M))], 16)]),
286
+ default: T(() => [de("div", me(v(je.value)), [g(C(Ae))], 16)]),
281
287
  _: 1
282
- }, 16, ["modelValue", "pt"])) : (b(), p(ae, v({
288
+ }, 16, ["modelValue", "pt"])) : (b(), p(se, y({
283
289
  key: 2,
284
290
  modelValue: H.value,
285
291
  "onUpdate:modelValue": n[4] ||= (e) => H.value = e,
286
- anchor: Ne.value,
287
- "aria-label": Pe.value,
292
+ anchor: Re.value,
293
+ "aria-label": J.value,
288
294
  boundary: l.boundary,
289
- "bubble-attrs": F.value,
295
+ "bubble-attrs": je.value,
290
296
  class: "bb-time-picker",
291
297
  dialog: "",
292
298
  "disable-flip": l.disableFlip,
293
299
  eager: l.eager,
294
300
  "hide-arrow": "",
295
- offset: l.offset ?? C(Se)() ?? 4,
301
+ offset: l.offset ?? C(we)() ?? 4,
296
302
  padding: l.padding,
297
303
  placement: l.placement,
298
304
  "transition-duration": l.transitionDuration,
@@ -300,8 +306,8 @@ var ye = ["aria-label"], be = [
300
306
  onHide: n[6] ||= (e) => C(O)("hide"),
301
307
  onShow: n[7] ||= (e) => C(O)("show"),
302
308
  onShown: n[8] ||= (e) => C(O)("shown")
303
- }, C(k).rootAttrs), {
304
- default: T(() => [_(C(M))]),
309
+ }, C(j).rootAttrs), {
310
+ default: T(() => [g(C(Ae))]),
305
311
  _: 1
306
312
  }, 16, [
307
313
  "modelValue",
@@ -94,7 +94,7 @@ export type BbTimePickerBaseProps = BbTimePickerPtProps & {
94
94
  * v-model value: `null` for empty, a 24-hour `HH:mm` (or `HH:mm:ss` with
95
95
  * `seconds`) string, or a two-element `[start, end]` array when `range` is true.
96
96
  */
97
- modelValue: string | string[] | null;
97
+ modelValue?: string | string[] | null;
98
98
  /**
99
99
  * Which end the columns edit in range mode (`v-model:active-segment`).
100
100
  * Standalone use manages this internally via the in-panel toggle; a host can
@@ -180,7 +180,7 @@ export type BbTimePickerBaseProps = BbTimePickerPtProps & {
180
180
  */
181
181
  export type BbTimePickerModelProps<R extends boolean = boolean> = {
182
182
  range?: R;
183
- modelValue: PtNoInfer<BbTimeModel<R>>;
183
+ modelValue?: PtNoInfer<BbTimeModel<R>>;
184
184
  };
185
185
  export type BbTimePickerProps<R extends boolean = boolean> = BbTimePickerBaseProps & BbTimePickerModelProps<R>;
186
186
  export type BbTimePickerEvents<R extends boolean = boolean> = {