bitboss-ui 3.0.0-beta.72 → 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.
- package/README.md +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +34 -7
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbCalendar.md +4 -3
- package/dist/ai/BbColorPalette.md +8 -9
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -3
- package/dist/ai/BbDialog.md +17 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +11 -7
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +5 -3
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbTable.md +43 -19
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/changelog.json +60 -4
- package/dist/ai/components.json +56 -20
- package/dist/ai/guides/design-tokens.md +20 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/use-confirm.md +4 -1
- package/dist/ai/guides/migration/v2-to-v3.md +24 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbColorPalette.json +3 -3
- package/dist/ai/manifest/components/BbConfirm.removed.json +4 -4
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -3
- package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +12 -6
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbToast.removed.json +1 -1
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -0
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +66 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +2 -0
- package/dist/ai/source/BbBreadcrumbs.md +4 -1
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbColorPalette.md +41 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +53 -22
- package/dist/ai/source/BbDatePickerInput.md +32 -8
- package/dist/ai/source/BbDialog.md +31 -1
- package/dist/ai/source/BbDropdown.md +52 -24
- package/dist/ai/source/BbDropdownGroup.md +17 -21
- package/dist/ai/source/BbForm.md +80 -6
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +5 -6
- package/dist/ai/source/BbOffCanvas.md +34 -1
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +7 -5
- package/dist/ai/source/BbTable.md +54 -6
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +50 -15
- package/dist/ai/source/BbTimePickerInput.md +30 -7
- package/dist/ai/source/BbToast.md +14 -0
- package/dist/ai/source/BbToastPortal.md +16 -4
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +4 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbColorPalette/types.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
- package/dist/components/BbDialog/leaveGhost.js +33 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
- package/dist/components/BbDropdown/types.d.ts +8 -17
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +5 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/index.d.ts +34 -30
- package/dist/llms-full.txt +874 -136
- package/dist/llms.txt +3 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/utilities/functions/hash.js +123 -3
- package/dist/utilities/functions/isEqual.js +69 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -5
- package/llms.txt +3 -1
- package/package.json +2 -3
- package/scripts/README.md +43 -43
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +54 -6
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/helpers-add.mjs +21 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +153 -6
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +17 -2
|
@@ -2,49 +2,50 @@ import { parseSize as e } from "../../utilities/functions/parseSize.js";
|
|
|
2
2
|
import { escapeStackDepth as t, insertEscapeEntry as ee, isTopEscapeEntry as te, pushEscapeEntry as ne, removeEscapeEntry as re } from "../../utils/overlayEscapeStack.js";
|
|
3
3
|
import { useId as ie } from "../../composables/useId.js";
|
|
4
4
|
import { useLocale as ae } from "../../composables/useLocale.js";
|
|
5
|
-
import { useLogger as
|
|
6
|
-
import { useMobile as
|
|
7
|
-
import { useBreakpoint as
|
|
8
|
-
import { useUntil as
|
|
9
|
-
import { removedPropsFor as
|
|
10
|
-
import { warnRemovedAttrs as
|
|
11
|
-
import { wait as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
5
|
+
import { useLogger as oe } from "../../composables/useLogger.js";
|
|
6
|
+
import { useMobile as se } from "../../composables/useMobile.js";
|
|
7
|
+
import { useBreakpoint as ce } from "../../composables/useBreakpoint.js";
|
|
8
|
+
import { useUntil as le } from "../../composables/useUntil.js";
|
|
9
|
+
import { removedPropsFor as ue } from "../../deprecation/removedProps.js";
|
|
10
|
+
import { warnRemovedAttrs as de } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
11
|
+
import { wait as n } from "../../utilities/functions/wait.js";
|
|
12
|
+
import { leaveAsGhost as fe, surfaceGone as pe, surfaceShown as me } from "./leaveGhost.js";
|
|
13
|
+
import { animationsSettled as he } from "../../utilities/functions/animationsSettled.js";
|
|
14
|
+
import { useConfigDefaults as ge, useSizeMap as _e } from "../../composables/useConfigDefaults.js";
|
|
15
|
+
import { PANEL_SIZES as ve } from "../../types/SizeScale.js";
|
|
16
|
+
import { BB_DIALOG_PT as ye } from "./types.js";
|
|
17
|
+
import { usePassthrough as be } from "../../composables/usePassthrough.js";
|
|
18
|
+
import { firstFocusableMatch as xe } from "../../utils/focusVisibility.js";
|
|
19
|
+
import { withoutPt as Se } from "../../utils/passthrough.js";
|
|
20
|
+
import { BB_OFF_CANVAS_PT as Ce } from "../BbOffCanvas/types.js";
|
|
21
|
+
import we from "../CloseIcon/CloseButton.vue.js";
|
|
22
|
+
import Te from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
23
|
+
import { provideHostCloseLabel as Ee } from "../BbOffCanvas/hostCloseLabel.js";
|
|
23
24
|
import { transitions as r } from "../../utilities/misc/transitions.js";
|
|
24
|
-
import { pageText as
|
|
25
|
-
import { overlaySurfaceIsolation as
|
|
26
|
-
import { useDialogStack as
|
|
27
|
-
import { registerTopLayerHost as
|
|
28
|
-
import { useBodyScrollLock as
|
|
29
|
-
import { useRefusedCloseAnnouncement as
|
|
30
|
-
import { provideOverlaySubmitGuard as
|
|
31
|
-
import { ownCompleteListener as
|
|
32
|
-
import { provideOverlayStandIn as
|
|
33
|
-
import { provideStandInClose as
|
|
34
|
-
import { Fragment as
|
|
25
|
+
import { pageText as De } from "../../utilities/misc/pageText.js";
|
|
26
|
+
import { overlaySurfaceIsolation as Oe } from "../../utils/overlaySurfaceIsolation.js";
|
|
27
|
+
import { useDialogStack as ke } from "./useDialogStack.js";
|
|
28
|
+
import { registerTopLayerHost as Ae } from "../../composables/useTopLayer.js";
|
|
29
|
+
import { useBodyScrollLock as je } from "../../composables/useBodyScrollLock.js";
|
|
30
|
+
import { useRefusedCloseAnnouncement as Me } from "../../composables/useRefusedCloseAnnouncement.js";
|
|
31
|
+
import { provideOverlaySubmitGuard as Ne } from "../../composables/formSubmitLock.js";
|
|
32
|
+
import { ownCompleteListener as Pe, useOverlayActions as Fe } from "./overlayActions.js";
|
|
33
|
+
import { provideOverlayStandIn as Ie, rootElementOf as Le, routeNativeCommand as Re, useOverlayHost as ze } from "../../composables/overlayRegistry.js";
|
|
34
|
+
import { provideStandInClose as Be, useOverlayNavigation as Ve } from "../../composables/useOverlayNavigation.js";
|
|
35
|
+
import { Fragment as He, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as Ue, createSlots as We, createTextVNode as Ge, createVNode as Ke, defineComponent as c, getCurrentInstance as qe, mergeModels as l, mergeProps as u, nextTick as Je, onBeforeUnmount as Ye, onDeactivated as Xe, onMounted as Ze, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, toHandlers as Qe, unref as h, useAttrs as $e, useModel as et, useSlots as tt, watch as g, withCtx as _, withModifiers as nt } from "vue";
|
|
35
36
|
// src/components/BbDialog/BbDialog.vue?vue&type=script&setup=true&lang.ts
|
|
36
|
-
var
|
|
37
|
+
var rt = [
|
|
37
38
|
"id",
|
|
38
39
|
"aria-describedby",
|
|
39
40
|
"aria-labelledby",
|
|
40
41
|
"inert"
|
|
41
|
-
],
|
|
42
|
+
], it = { class: "bb-dialog__body-content" }, at = {
|
|
42
43
|
"aria-live": "polite",
|
|
43
44
|
class: "bb-sr-only"
|
|
44
|
-
},
|
|
45
|
+
}, ot = 4, v = /*@__PURE__*/ c({
|
|
45
46
|
inheritAttrs: !1,
|
|
46
47
|
__name: "BbDialog",
|
|
47
|
-
props: /*@__PURE__*/
|
|
48
|
+
props: /*@__PURE__*/ l({
|
|
48
49
|
"pt:root": {},
|
|
49
50
|
"pt:root:open": {},
|
|
50
51
|
"pt:root:fullscreen": {},
|
|
@@ -121,186 +122,193 @@ var $e = [
|
|
|
121
122
|
snap: {},
|
|
122
123
|
snapModifiers: {}
|
|
123
124
|
}),
|
|
124
|
-
emits: /*@__PURE__*/
|
|
125
|
+
emits: /*@__PURE__*/ l([
|
|
125
126
|
"complete",
|
|
126
127
|
"show",
|
|
127
128
|
"hide",
|
|
128
129
|
"shown",
|
|
129
130
|
"hidden"
|
|
130
131
|
], ["update:modelValue", "update:snap"]),
|
|
131
|
-
setup(r, { emit:
|
|
132
|
-
let
|
|
133
|
-
process.env.NODE_ENV !== "production" &&
|
|
134
|
-
let { t:
|
|
132
|
+
setup(r, { emit: c }) {
|
|
133
|
+
let l = et(r, "modelValue"), v = et(r, "snap"), y = r, b = c, x = tt();
|
|
134
|
+
process.env.NODE_ENV !== "production" && de("BbDialog", ue("BbDialog"));
|
|
135
|
+
let { t: S } = ae(), { isMobile: C } = se(), { resolve: st } = ce(), w = ge("BbDialog", y, {
|
|
135
136
|
adaptive: !0,
|
|
136
137
|
fullscreen: !1
|
|
137
|
-
}),
|
|
138
|
-
|
|
139
|
-
let
|
|
140
|
-
id: () =>
|
|
141
|
-
model:
|
|
142
|
-
element: () =>
|
|
143
|
-
defaultData: () =>
|
|
144
|
-
onComplete: () =>
|
|
138
|
+
}), ct = _e("BbDialog", ve), T = () => w.adaptive && C.value ? "canvas" : "dialog", E = f(T());
|
|
139
|
+
Ee(() => E.value === "canvas" ? S("dialog.closeLabel").value : null);
|
|
140
|
+
let lt = qe(), D = ze("dialog", {
|
|
141
|
+
id: () => y.id,
|
|
142
|
+
model: l,
|
|
143
|
+
element: () => Le(lt),
|
|
144
|
+
defaultData: () => y.defaultData,
|
|
145
|
+
onComplete: () => Pe(lt)
|
|
145
146
|
});
|
|
146
|
-
|
|
147
|
-
let
|
|
148
|
-
|
|
147
|
+
Ie();
|
|
148
|
+
let ut = Be();
|
|
149
|
+
y.navigation && D.onDemand && process.env.NODE_ENV !== "production" && oe().warn("BbDialog: `navigation` is ignored on a dialog opened on demand: it has no place in the page URL. For a URL dialog, render the wrapper in the page and open it by id."), Ve({
|
|
149
150
|
component: "BbDialog",
|
|
150
|
-
enabled: () => !!
|
|
151
|
-
key: () =>
|
|
152
|
-
replace: () => !!
|
|
153
|
-
id: () =>
|
|
154
|
-
model:
|
|
151
|
+
enabled: () => !!y.navigation && !D.onDemand,
|
|
152
|
+
key: () => y.queryKey,
|
|
153
|
+
replace: () => !!y.replace,
|
|
154
|
+
id: () => y.id,
|
|
155
|
+
model: l,
|
|
155
156
|
requestClose: () => {
|
|
156
|
-
if (
|
|
157
|
-
let e =
|
|
157
|
+
if (E.value === "dialog") return en("escape");
|
|
158
|
+
let e = ut();
|
|
158
159
|
return e === null ? (Q("escape"), !0) : e;
|
|
159
160
|
}
|
|
160
161
|
});
|
|
161
|
-
let
|
|
162
|
-
|
|
162
|
+
let dt = () => {
|
|
163
|
+
D.afterHidden(), b("hidden");
|
|
163
164
|
};
|
|
164
|
-
|
|
165
|
-
|
|
165
|
+
g([() => w.adaptive, C], () => {
|
|
166
|
+
l.value || (E.value = T());
|
|
166
167
|
});
|
|
167
|
-
let
|
|
168
|
+
let O = $e(), k = be({
|
|
168
169
|
component: "BbDialog",
|
|
169
|
-
attrs:
|
|
170
|
-
props:
|
|
171
|
-
parts:
|
|
172
|
-
states:
|
|
170
|
+
attrs: O,
|
|
171
|
+
props: y,
|
|
172
|
+
parts: ye.parts,
|
|
173
|
+
states: ye.states,
|
|
173
174
|
active: {
|
|
174
|
-
open: () =>
|
|
175
|
-
fullscreen: () =>
|
|
175
|
+
open: () => l.value,
|
|
176
|
+
fullscreen: () => I.value
|
|
176
177
|
}
|
|
177
|
-
}),
|
|
178
|
+
}), ft = i(() => u({
|
|
178
179
|
class: "bb-dialog__close",
|
|
179
180
|
onClick: $
|
|
180
|
-
},
|
|
181
|
-
id:
|
|
182
|
-
description:
|
|
183
|
-
preventClose:
|
|
184
|
-
eager:
|
|
185
|
-
focusTarget:
|
|
186
|
-
fullscreen:
|
|
187
|
-
hideClose:
|
|
188
|
-
persistent:
|
|
189
|
-
stack:
|
|
190
|
-
title:
|
|
191
|
-
transitionDuration:
|
|
181
|
+
}, k.close)), pt = i(() => ({
|
|
182
|
+
id: D.domId.value || y.id,
|
|
183
|
+
description: y.description,
|
|
184
|
+
preventClose: y.preventClose ?? (D.completing.value ? !0 : void 0),
|
|
185
|
+
eager: y.eager,
|
|
186
|
+
focusTarget: y.focusTarget,
|
|
187
|
+
fullscreen: w.fullscreen,
|
|
188
|
+
hideClose: y.hideClose,
|
|
189
|
+
persistent: y.persistent,
|
|
190
|
+
stack: y.stack,
|
|
191
|
+
title: y.title,
|
|
192
|
+
transitionDuration: y.transitionDuration,
|
|
192
193
|
side: "bottom",
|
|
193
194
|
draggable: !0,
|
|
194
195
|
size: "auto",
|
|
195
|
-
snapPoints:
|
|
196
|
-
snap:
|
|
197
|
-
ok:
|
|
198
|
-
cancel:
|
|
199
|
-
actions:
|
|
196
|
+
snapPoints: y.snapPoints,
|
|
197
|
+
snap: v.value,
|
|
198
|
+
ok: L.resolved.value.ok ?? void 0,
|
|
199
|
+
cancel: L.resolved.value.cancel ?? void 0,
|
|
200
|
+
actions: L.resolved.value.actions,
|
|
200
201
|
"onUpdate:snap": (e) => {
|
|
201
|
-
|
|
202
|
+
v.value = e;
|
|
202
203
|
},
|
|
203
|
-
...
|
|
204
|
-
})),
|
|
205
|
-
let { class: e, ...t } =
|
|
206
|
-
return
|
|
207
|
-
}),
|
|
208
|
-
|
|
209
|
-
e && !t && !
|
|
204
|
+
...Se(y.offCanvasProps)
|
|
205
|
+
})), mt = i(() => {
|
|
206
|
+
let { class: e, ...t } = O;
|
|
207
|
+
return u(pt.value, t);
|
|
208
|
+
}), A = f(null), j = `title_${ie().id.value}`, ht = `desc_${ie().id.value}`, M = () => !!y.description || !!x.description, N = () => !!y.title || !!x.title, gt = () => N() || M(), _t = le(() => l.value || y.eager, { initialValue: l.value || y.eager }), P = i(() => !!y.eager || l.value || K.value), F = f(0);
|
|
209
|
+
g(l, (e, t) => {
|
|
210
|
+
e && !t && !y.eager && F.value++;
|
|
210
211
|
}, { flush: "sync" });
|
|
211
|
-
let
|
|
212
|
+
let I = i(() => w.fullscreen === !0 || w.fullscreen === "mobile" && C.value), vt = () => typeof document < "u", yt = Ne(), bt = yt.saving, L = Fe({
|
|
212
213
|
component: "BbDialog",
|
|
213
|
-
props: () =>
|
|
214
|
-
surface:
|
|
215
|
-
complete:
|
|
216
|
-
data: () =>
|
|
214
|
+
props: () => y,
|
|
215
|
+
surface: yt,
|
|
216
|
+
complete: D.complete,
|
|
217
|
+
data: () => D.data.value,
|
|
217
218
|
close: () => $(),
|
|
219
|
+
closeLocked: () => R.value,
|
|
218
220
|
block: "bb-dialog"
|
|
219
|
-
}),
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
|
|
221
|
+
}), xt = () => L.render(), R = i(() => y.preventClose ?? (bt() || D.completing.value)), St = i(() => R.value || !!y.persistent), z = f(!1), B = f(null), Ct = () => {
|
|
222
|
+
B.value = null;
|
|
223
|
+
}, wt = (e) => {
|
|
224
|
+
B.value = {
|
|
223
225
|
startX: e.clientX,
|
|
224
226
|
startY: e.clientY,
|
|
225
227
|
startedOnBackdrop: e.target === e.currentTarget
|
|
226
228
|
};
|
|
227
|
-
},
|
|
228
|
-
let t =
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
}, Tt = (e) => {
|
|
230
|
+
let t = B.value;
|
|
231
|
+
Ct(), t && !t.startedOnBackdrop || t && (Math.abs(e.clientX - t.startX) > ot || Math.abs(e.clientY - t.startY) > ot) || $t(e, "backdrop");
|
|
232
|
+
}, V, Et = Me(() => S("dialog.closeRefused").value), H = (e) => {
|
|
233
|
+
Et.announce(), clearTimeout(V), z.value = !0, V = setTimeout(() => {
|
|
234
|
+
z.value = !1;
|
|
233
235
|
}, e);
|
|
234
|
-
},
|
|
235
|
-
let e = { element: () =>
|
|
236
|
-
|
|
237
|
-
},
|
|
238
|
-
re(
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
if (e.key === "Escape" && !
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
let
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
if (!
|
|
251
|
-
let e =
|
|
252
|
-
return !e || !e.includes(
|
|
253
|
-
}),
|
|
236
|
+
}, U = Symbol("bb-dialog-escape"), Dt = t(), W = !1, Ot = () => {
|
|
237
|
+
let e = { element: () => A.value };
|
|
238
|
+
W ? ee(U, Dt, e) : ne(U, e), vt() && document.addEventListener("keydown", jt, { capture: !0 });
|
|
239
|
+
}, kt = () => {
|
|
240
|
+
re(U), vt() && document.removeEventListener("keydown", jt, { capture: !0 });
|
|
241
|
+
}, At = () => {
|
|
242
|
+
y.focusTarget && xe(A.value, y.focusTarget)?.focus();
|
|
243
|
+
}, jt = (e) => {
|
|
244
|
+
if (e.key === "Escape" && !Y.value && te(U) && (e.stopImmediatePropagation(), St.value)) return e.preventDefault(), H(200), !1;
|
|
245
|
+
}, G = f(0), K = f(!1);
|
|
246
|
+
je(K);
|
|
247
|
+
let q = Symbol("bb-dialog"), { stacks: Mt, openOrder: Nt, closing: Pt, enter: Ft, leave: It, registerOpen: Lt, deregisterOpen: Rt, setClosing: J } = ke(), zt = () => {
|
|
248
|
+
Lt(q), y.stack && Ft(y.stack, q);
|
|
249
|
+
}, Bt = () => {
|
|
250
|
+
Rt(q), y.stack && It(y.stack, q);
|
|
251
|
+
}, Y = i(() => {
|
|
252
|
+
if (!y.stack) return !1;
|
|
253
|
+
let e = Mt.value[y.stack];
|
|
254
|
+
return !e || !e.includes(q) ? !1 : e[e.length - 1] !== q;
|
|
255
|
+
}), Vt = i(() => Nt.value.indexOf(q)), Ht = (e, t) => g([t, () => Pt.value.length > 0], ([t, ee]) => {
|
|
254
256
|
t !== -1 && (e.value = ee && e.value || t > 0);
|
|
255
|
-
}, { immediate: !0 }),
|
|
256
|
-
|
|
257
|
-
let
|
|
258
|
-
|
|
259
|
-
let
|
|
257
|
+
}, { immediate: !0 }), Ut = f(!1);
|
|
258
|
+
Ht(Ut, Vt);
|
|
259
|
+
let Wt = i(() => (Vt.value !== -1 || K.value) && Ut.value), Gt = i(() => y.stack ? Mt.value[y.stack]?.indexOf(q) ?? -1 : -1), Kt = f(!1);
|
|
260
|
+
Ht(Kt, Gt);
|
|
261
|
+
let qt = i(() => (Gt.value !== -1 || K.value) && Kt.value), Jt = f(), X = null, Z = null, Yt = null, Xt = async (e) => {
|
|
260
262
|
if (e) {
|
|
261
|
-
|
|
262
|
-
let e =
|
|
263
|
-
await
|
|
263
|
+
b("show"), G.value++, Jt.value = De(), Ot(), await Je(), K.value = !0, A.value && !A.value.open && (Yt = document.activeElement, A.value.showModal()), Z = null, me(q), zt(), J(q, !1), A.value && (X = Ae(A.value)), At();
|
|
264
|
+
let e = G.value;
|
|
265
|
+
await n(y.transitionDuration), await he(A.value), e === G.value && l.value && b("shown");
|
|
264
266
|
} else {
|
|
265
|
-
|
|
266
|
-
let e =
|
|
267
|
-
if (await
|
|
268
|
-
|
|
267
|
+
b("hide", D.closingResult()), Z = performance.now(), J(q, !0), Bt();
|
|
268
|
+
let e = G.value;
|
|
269
|
+
if (await n(y.transitionDuration), e !== G.value) return;
|
|
270
|
+
kt(), A.value?.close(), pe(q), X?.(), X = null, K.value = !1, J(q, !1), dt();
|
|
269
271
|
}
|
|
270
|
-
},
|
|
271
|
-
process.env.NODE_ENV !== "production" &&
|
|
272
|
-
|
|
272
|
+
}, Zt = () => {
|
|
273
|
+
process.env.NODE_ENV !== "production" && x.header && !y.title && O["aria-labelledby"] == null && Je(() => {
|
|
274
|
+
A.value && !document.getElementById(j) && oe().warn(`BbDialog: the #header slot does not contain an element with id="${j}", so aria-labelledby points at nothing and the dialog announces as unnamed. Bind the slot's \`titleId\` to your heading: <template #header="{ titleId }"><h2 :id="titleId">…</h2></template>.`);
|
|
273
275
|
});
|
|
274
276
|
};
|
|
275
|
-
|
|
276
|
-
e && (
|
|
277
|
-
}),
|
|
278
|
-
|
|
279
|
-
}),
|
|
280
|
-
e &&
|
|
277
|
+
g(l, (e) => {
|
|
278
|
+
e && (E.value = T()), E.value === "dialog" && Xt(e);
|
|
279
|
+
}), Ze(() => {
|
|
280
|
+
l.value && E.value === "dialog" && (W = !0, Xt(!0), W = !1);
|
|
281
|
+
}), g(_t, (e) => {
|
|
282
|
+
e && Zt();
|
|
281
283
|
}, {
|
|
282
284
|
immediate: !0,
|
|
283
285
|
flush: "post"
|
|
284
|
-
}),
|
|
285
|
-
|
|
286
|
+
}), Ye(() => {
|
|
287
|
+
fe(A.value, {
|
|
288
|
+
id: q,
|
|
289
|
+
openClass: "bb-dialog--open",
|
|
290
|
+
duration: y.transitionDuration,
|
|
291
|
+
closingSince: Z,
|
|
292
|
+
opener: Yt
|
|
293
|
+
}), A.value?.open && A.value.close(), clearTimeout(V), kt(), Bt(), J(q, !1), X?.(), X = null;
|
|
286
294
|
});
|
|
287
|
-
let
|
|
288
|
-
if (e.preventDefault(), !
|
|
289
|
-
},
|
|
290
|
-
|
|
295
|
+
let Qt = i(() => I.value ? "100%" : e(st(y.size), ct.value)), $t = (e, t = "escape") => {
|
|
296
|
+
if (e.preventDefault(), !en(t)) return !1;
|
|
297
|
+
}, en = (e) => St.value ? (H(300), !1) : (Q(e), !0), Q = (e) => {
|
|
298
|
+
D.record(e), l.value = !1;
|
|
291
299
|
}, $ = () => {
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
show:
|
|
300
|
+
R.value ? H(300) : Q("close");
|
|
301
|
+
}, tn = (e) => Re(e, {
|
|
302
|
+
show: D.show,
|
|
295
303
|
close: $,
|
|
296
|
-
open: () =>
|
|
304
|
+
open: () => l.value
|
|
297
305
|
});
|
|
298
|
-
return
|
|
306
|
+
return Xe(() => Q("unmounted")), (e, t) => E.value === "canvas" ? (d(), a(Te, u({
|
|
299
307
|
key: 0,
|
|
300
|
-
modelValue:
|
|
301
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
308
|
+
modelValue: l.value,
|
|
309
|
+
"onUpdate:modelValue": t[0] ||= (e) => l.value = e,
|
|
302
310
|
class: "bb-dialog__sheet",
|
|
303
|
-
pt: h(
|
|
311
|
+
pt: h(k).forward({
|
|
304
312
|
root: "root",
|
|
305
313
|
header: "header",
|
|
306
314
|
title: "title",
|
|
@@ -309,134 +317,134 @@ var $e = [
|
|
|
309
317
|
footer: "footer",
|
|
310
318
|
close: "close",
|
|
311
319
|
sheet: "root"
|
|
312
|
-
}, h(
|
|
313
|
-
},
|
|
314
|
-
onHidden:
|
|
315
|
-
onHide: t[1] ||= (e) =>
|
|
316
|
-
onShow: t[2] ||= (e) =>
|
|
317
|
-
onShown: t[3] ||= (e) =>
|
|
318
|
-
}),
|
|
320
|
+
}, h(Ce).states, () => r.offCanvasProps?.pt)
|
|
321
|
+
}, mt.value, {
|
|
322
|
+
onHidden: dt,
|
|
323
|
+
onHide: t[1] ||= (e) => b("hide", h(D).closingResult()),
|
|
324
|
+
onShow: t[2] ||= (e) => b("show"),
|
|
325
|
+
onShown: t[3] ||= (e) => b("shown")
|
|
326
|
+
}), We({ _: 2 }, [
|
|
319
327
|
e.$slots.default ? {
|
|
320
328
|
name: "default",
|
|
321
|
-
fn:
|
|
322
|
-
complete: h(
|
|
323
|
-
data: h(
|
|
324
|
-
reset: h(
|
|
329
|
+
fn: _((t) => [p(e.$slots, "default", u(t, {
|
|
330
|
+
complete: h(D).complete,
|
|
331
|
+
data: h(D).data.value,
|
|
332
|
+
reset: h(D).reset
|
|
325
333
|
}))]),
|
|
326
334
|
key: "0"
|
|
327
335
|
} : void 0,
|
|
328
336
|
e.$slots.header ? {
|
|
329
337
|
name: "header",
|
|
330
|
-
fn:
|
|
331
|
-
complete: h(
|
|
332
|
-
data: h(
|
|
333
|
-
reset: h(
|
|
338
|
+
fn: _((t) => [p(e.$slots, "header", u(t, {
|
|
339
|
+
complete: h(D).complete,
|
|
340
|
+
data: h(D).data.value,
|
|
341
|
+
reset: h(D).reset
|
|
334
342
|
}))]),
|
|
335
343
|
key: "1"
|
|
336
344
|
} : void 0,
|
|
337
345
|
e.$slots.title ? {
|
|
338
346
|
name: "title",
|
|
339
|
-
fn:
|
|
347
|
+
fn: _((t) => [p(e.$slots, "title", u(t, { data: h(D).data.value }))]),
|
|
340
348
|
key: "2"
|
|
341
349
|
} : void 0,
|
|
342
350
|
e.$slots.description ? {
|
|
343
351
|
name: "description",
|
|
344
|
-
fn:
|
|
352
|
+
fn: _((t) => [p(e.$slots, "description", u(t, { data: h(D).data.value }))]),
|
|
345
353
|
key: "3"
|
|
346
354
|
} : void 0,
|
|
347
355
|
e.$slots.footer ? {
|
|
348
356
|
name: "footer",
|
|
349
|
-
fn:
|
|
350
|
-
complete: h(
|
|
351
|
-
data: h(
|
|
352
|
-
reset: h(
|
|
357
|
+
fn: _((t) => [p(e.$slots, "footer", u(t, {
|
|
358
|
+
complete: h(D).complete,
|
|
359
|
+
data: h(D).data.value,
|
|
360
|
+
reset: h(D).reset
|
|
353
361
|
}))]),
|
|
354
362
|
key: "4"
|
|
355
363
|
} : void 0
|
|
356
|
-
]), 1040, ["modelValue", "pt"])) : (d(), s("dialog",
|
|
364
|
+
]), 1040, ["modelValue", "pt"])) : (d(), s("dialog", u({
|
|
357
365
|
key: 1,
|
|
358
|
-
id: h(
|
|
366
|
+
id: h(D).domId.value || void 0,
|
|
359
367
|
ref_key: "dialog",
|
|
360
|
-
ref:
|
|
361
|
-
"aria-describedby":
|
|
362
|
-
"aria-labelledby":
|
|
368
|
+
ref: A,
|
|
369
|
+
"aria-describedby": P.value && M() ? ht : void 0,
|
|
370
|
+
"aria-labelledby": P.value && (N() || e.$slots.header) ? j : void 0,
|
|
363
371
|
class: ["bb-dialog", {
|
|
364
|
-
"bb-dialog--open":
|
|
365
|
-
"bb-dialog--visible":
|
|
366
|
-
"bb-dialog--fullscreen":
|
|
367
|
-
"bb-dialog--mobile": h(
|
|
368
|
-
"bb-dialog--deny-close":
|
|
369
|
-
"bb-dialog--covered":
|
|
370
|
-
"bb-dialog--above":
|
|
371
|
-
"bb-dialog--covering":
|
|
372
|
+
"bb-dialog--open": l.value,
|
|
373
|
+
"bb-dialog--visible": K.value,
|
|
374
|
+
"bb-dialog--fullscreen": I.value,
|
|
375
|
+
"bb-dialog--mobile": h(C),
|
|
376
|
+
"bb-dialog--deny-close": z.value,
|
|
377
|
+
"bb-dialog--covered": Y.value,
|
|
378
|
+
"bb-dialog--above": Wt.value,
|
|
379
|
+
"bb-dialog--covering": qt.value
|
|
372
380
|
}],
|
|
373
|
-
inert: !
|
|
381
|
+
inert: !l.value && !K.value || Y.value,
|
|
374
382
|
style: {
|
|
375
|
-
"--max-width":
|
|
376
|
-
...
|
|
377
|
-
"--transition-duration": `${
|
|
383
|
+
"--max-width": Qt.value,
|
|
384
|
+
...Jt.value,
|
|
385
|
+
"--transition-duration": `${y.transitionDuration}ms`
|
|
378
386
|
}
|
|
379
|
-
},
|
|
380
|
-
onCancel:
|
|
381
|
-
onCommand:
|
|
382
|
-
onClick:
|
|
383
|
-
onPointercancel:
|
|
384
|
-
onPointerdown:
|
|
385
|
-
}, h(
|
|
386
|
-
|
|
387
|
-
key: `body-1-${
|
|
387
|
+
}, Qe(h(Oe), !0), {
|
|
388
|
+
onCancel: nt($t, ["self"]),
|
|
389
|
+
onCommand: tn,
|
|
390
|
+
onClick: nt(Tt, ["self"]),
|
|
391
|
+
onPointercancel: Ct,
|
|
392
|
+
onPointerdown: wt
|
|
393
|
+
}, h(k).rootAttrs), [P.value ? (d(), s(He, { key: 0 }, [
|
|
394
|
+
gt() || e.$slots.header ? (d(), s("div", u({
|
|
395
|
+
key: `body-1-${F.value}`,
|
|
388
396
|
class: "bb-dialog__header"
|
|
389
|
-
}, h(
|
|
397
|
+
}, h(k).header), [p(e.$slots, "header", {
|
|
390
398
|
close: $,
|
|
391
|
-
complete: h(
|
|
392
|
-
data: h(
|
|
393
|
-
reset: h(
|
|
399
|
+
complete: h(D).complete,
|
|
400
|
+
data: h(D).data.value,
|
|
401
|
+
reset: h(D).reset,
|
|
394
402
|
title: r.title,
|
|
395
|
-
titleId:
|
|
403
|
+
titleId: j
|
|
396
404
|
}, () => [
|
|
397
|
-
|
|
405
|
+
N() ? (d(), s("span", u({
|
|
398
406
|
key: 0,
|
|
399
|
-
id:
|
|
407
|
+
id: j,
|
|
400
408
|
class: "bb-dialog__title"
|
|
401
|
-
}, h(
|
|
402
|
-
data: h(
|
|
409
|
+
}, h(k).title), [p(e.$slots, "title", {
|
|
410
|
+
data: h(D).data.value,
|
|
403
411
|
text: r.title
|
|
404
|
-
}, () => [
|
|
405
|
-
|
|
412
|
+
}, () => [Ge(m(r.title), 1)])], 16)) : o("", !0),
|
|
413
|
+
M() ? (d(), s("p", u({
|
|
406
414
|
key: 1,
|
|
407
|
-
id:
|
|
415
|
+
id: ht,
|
|
408
416
|
class: "bb-dialog__description"
|
|
409
|
-
}, h(
|
|
410
|
-
data: h(
|
|
417
|
+
}, h(k).description), [p(e.$slots, "description", {
|
|
418
|
+
data: h(D).data.value,
|
|
411
419
|
text: r.description
|
|
412
|
-
}, () => [
|
|
413
|
-
r.hideClose ? o("", !0) : (d(), a(
|
|
420
|
+
}, () => [Ge(m(r.description), 1)])], 16)) : o("", !0),
|
|
421
|
+
r.hideClose ? o("", !0) : (d(), a(we, u({
|
|
414
422
|
key: 2,
|
|
415
|
-
"aria-label": h(
|
|
416
|
-
},
|
|
423
|
+
"aria-label": h(S)("dialog.closeLabel").value
|
|
424
|
+
}, ft.value), null, 16, ["aria-label"]))
|
|
417
425
|
])], 16)) : o("", !0),
|
|
418
|
-
(d(), s("div",
|
|
419
|
-
key: `body-2-${
|
|
426
|
+
(d(), s("div", u({
|
|
427
|
+
key: `body-2-${F.value}`,
|
|
420
428
|
class: "bb-dialog__content scrollbar-border"
|
|
421
|
-
}, h(
|
|
429
|
+
}, h(k).content), [Ue("div", it, [!gt() && !e.$slots.header && !r.hideClose ? (d(), a(we, u({
|
|
422
430
|
key: 0,
|
|
423
|
-
"aria-label": h(
|
|
424
|
-
},
|
|
431
|
+
"aria-label": h(S)("dialog.closeLabel").value
|
|
432
|
+
}, ft.value), null, 16, ["aria-label"])) : o("", !0), p(e.$slots, "default", {
|
|
425
433
|
close: $,
|
|
426
|
-
complete: h(
|
|
427
|
-
data: h(
|
|
428
|
-
reset: h(
|
|
434
|
+
complete: h(D).complete,
|
|
435
|
+
data: h(D).data.value,
|
|
436
|
+
reset: h(D).reset
|
|
429
437
|
})])], 16)),
|
|
430
|
-
(d(), s("div",
|
|
431
|
-
key: `body-3-${
|
|
438
|
+
(d(), s("div", u({
|
|
439
|
+
key: `body-3-${F.value}`,
|
|
432
440
|
class: "bb-dialog__footer"
|
|
433
|
-
}, h(
|
|
441
|
+
}, h(k).footer), [p(e.$slots, "footer", {
|
|
434
442
|
close: $,
|
|
435
|
-
complete: h(
|
|
436
|
-
data: h(
|
|
437
|
-
reset: h(
|
|
438
|
-
}, () => [
|
|
439
|
-
], 64)) : o("", !0),
|
|
443
|
+
complete: h(D).complete,
|
|
444
|
+
data: h(D).data.value,
|
|
445
|
+
reset: h(D).reset
|
|
446
|
+
}, () => [Ke(xt)])], 16))
|
|
447
|
+
], 64)) : o("", !0), Ue("span", at, m(h(Et).text.value), 1)], 16, rt));
|
|
440
448
|
}
|
|
441
449
|
});
|
|
442
|
-
export {
|
|
450
|
+
export { v as default };
|