bitboss-ui 3.0.0-beta.21 → 3.0.0-beta.23
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 +55 -3
- package/bin/bitboss-ui-mcp.mjs +419 -9
- package/bin/bitboss-ui.mjs +293 -22
- package/dist/ai/BbAccordion.md +21 -23
- package/dist/ai/BbAlert.md +6 -12
- package/dist/ai/BbAvatar.md +60 -24
- package/dist/ai/BbBadge.md +12 -20
- package/dist/ai/BbBaseButton.md +14 -16
- package/dist/ai/BbBaseCheckboxIcon.md +6 -10
- package/dist/ai/BbBaseColorInput.md +1 -0
- package/dist/ai/BbBaseDatePickerInput.md +1 -0
- package/dist/ai/BbBaseNumberInput.md +1 -0
- package/dist/ai/BbBaseRadioIcon.md +6 -10
- package/dist/ai/BbBaseSelect.md +1 -0
- package/dist/ai/BbBaseSwitchIcon.md +5 -9
- package/dist/ai/BbBaseTag.md +1 -0
- package/dist/ai/BbBaseTextInput.md +2 -1
- package/dist/ai/BbBaseTextarea.md +1 -0
- package/dist/ai/BbBaseTimePickerInput.md +1 -0
- package/dist/ai/BbBreadcrumbs.md +23 -34
- package/dist/ai/BbButton.md +35 -47
- package/dist/ai/BbCheckbox.md +21 -37
- package/dist/ai/BbCheckboxGroup.md +13 -13
- package/dist/ai/BbCollapsible.md +14 -26
- package/dist/ai/BbColorInput.md +27 -23
- package/dist/ai/BbColorPalette.md +23 -35
- package/dist/ai/BbConfirm.md +17 -32
- package/dist/ai/BbDatePickerInput.md +29 -21
- package/dist/ai/BbDialog.md +159 -62
- package/dist/ai/BbDropdown.md +21 -25
- package/dist/ai/BbDropdownButton.md +13 -30
- package/dist/ai/BbDropzone.md +9 -11
- package/dist/ai/BbIcon.md +44 -33
- package/dist/ai/BbIndicator.md +2 -2
- package/dist/ai/BbNumberInput.md +32 -20
- package/dist/ai/BbOffCanvas.md +42 -42
- package/dist/ai/BbPagination.md +21 -23
- package/dist/ai/BbPopover.md +15 -17
- package/dist/ai/BbProgress.md +40 -51
- package/dist/ai/BbRadio.md +9 -9
- package/dist/ai/BbRadioGroup.md +7 -11
- package/dist/ai/BbRating.md +8 -12
- package/dist/ai/BbSelect.md +46 -36
- package/dist/ai/BbSelectPopover.md +19 -31
- package/dist/ai/BbSlider.md +15 -19
- package/dist/ai/BbSmoothHeight.md +16 -31
- package/dist/ai/BbSpinner.md +118 -74
- package/dist/ai/BbSwitch.md +25 -18
- package/dist/ai/BbSwitchGroup.md +9 -14
- package/dist/ai/BbTable.md +102 -55
- package/dist/ai/BbTabs.md +59 -82
- package/dist/ai/BbTag.md +26 -23
- package/dist/ai/BbTextInput.md +63 -27
- package/dist/ai/BbTextarea.md +42 -34
- package/dist/ai/BbTimePickerInput.md +14 -0
- package/dist/ai/BbToast.md +14 -34
- package/dist/ai/BbTooltip.md +22 -20
- package/dist/ai/BbTree.md +46 -72
- package/dist/ai/CommonInputWrapper.md +1 -0
- package/dist/ai/changelog.json +170 -62
- package/dist/ai/components.json +1678 -11
- package/dist/ai/composables/useConfirm.md +5 -2
- package/dist/ai/composables/useToast.md +4 -2
- package/dist/ai/guides/agent-contract.md +7 -4
- package/dist/ai/guides/ai-router.md +37 -22
- package/dist/ai/guides/component-picker.md +23 -18
- package/dist/ai/guides/design-language.md +151 -21
- package/dist/ai/guides/design-tokens.md +29 -4
- package/dist/ai/guides/icons-policy.md +46 -21
- package/dist/ai/guides/installation-and-plugin-setup.md +286 -17
- package/dist/ai/guides/migration/components/bb-rating.md +26 -1
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/v2-to-v3.md +50 -23
- package/dist/ai/index.md +1 -1
- package/dist/ai/recipes/inertia/approvals-inbox.md +3 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +2 -2
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +6 -6
- package/dist/ai/recipes/inertia/record-form.md +5 -5
- package/dist/ai/recipes/inertia/records-workspace.md +4 -4
- package/dist/ai/recipes/inertia/upload-center.md +6 -6
- package/dist/ai/recipes/inertia/wizard-form.md +5 -5
- package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -3
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +2 -2
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +4 -4
- package/dist/ai/recipes/nuxt/upload-center.md +6 -6
- package/dist/ai/recipes/nuxt/wizard-form.md +5 -5
- package/dist/ai/recipes/vue/approvals-inbox.md +3 -3
- package/dist/ai/recipes/vue/inline-edit-workspace.md +2 -2
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +10 -10
- package/dist/ai/recipes/vue/records-workspace.md +4 -4
- package/dist/ai/recipes/vue/upload-center.md +6 -6
- package/dist/ai/recipes/vue/wizard-form.md +5 -5
- package/dist/ai/source/BbBadge.md +1 -1
- package/dist/ai/source/BbBaseCheckbox.md +1 -1
- package/dist/ai/source/BbBaseColorInput.md +7 -0
- package/dist/ai/source/BbBaseDatePicker.md +5 -5
- package/dist/ai/source/BbBaseDatePickerInput.md +9 -2
- package/dist/ai/source/BbBaseNumberInput.md +7 -0
- package/dist/ai/source/BbBaseRadio.md +1 -1
- package/dist/ai/source/BbBaseRating.md +5 -5
- package/dist/ai/source/BbBaseSelect.md +8 -1
- package/dist/ai/source/BbBaseSlider.md +5 -5
- package/dist/ai/source/BbBaseSwitch.md +1 -1
- package/dist/ai/source/BbBaseTag.md +7 -0
- package/dist/ai/source/BbBaseTextInput.md +7 -0
- package/dist/ai/source/BbBaseTextarea.md +7 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +8 -1
- package/dist/ai/source/BbBreadcrumbs.md +20 -1
- package/dist/ai/source/BbButton.md +2 -2
- package/dist/ai/source/BbColorInput.md +14 -0
- package/dist/ai/source/BbDatePickerInput.md +14 -0
- package/dist/ai/source/BbDialog.md +39 -8
- package/dist/ai/source/BbDropdown.md +1 -1
- package/dist/ai/source/BbDropzone.md +5 -5
- package/dist/ai/source/BbIcon.md +23 -10
- package/dist/ai/source/BbNumberInput.md +14 -0
- package/dist/ai/source/BbOffCanvas.md +50 -28
- package/dist/ai/source/BbPagination.md +2 -2
- package/dist/ai/source/BbPopover.md +12 -1
- package/dist/ai/source/BbSelect.md +14 -0
- package/dist/ai/source/BbSelectPopover.md +45 -7
- package/dist/ai/source/BbSpinner.md +2 -2
- package/dist/ai/source/BbTable.md +11 -11
- package/dist/ai/source/BbTag.md +14 -0
- package/dist/ai/source/BbTextInput.md +14 -0
- package/dist/ai/source/BbTextarea.md +14 -0
- package/dist/ai/source/BbTimePickerInput.md +14 -0
- package/dist/ai/source/BbTooltip.md +57 -10
- package/dist/ai/source/ChipsBox.md +1 -1
- package/dist/ai/source/CommaBox.md +1 -1
- package/dist/ai/source/CommonInputWrapper.md +128 -33
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/OptionsContainer.md +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbBaseColorInput/types.d.ts +5 -0
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbBaseDatePickerInput/types.d.ts +5 -0
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +1 -1
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbBaseNumberInput/types.d.ts +5 -0
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbBaseSelect/types.d.ts +5 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbBaseTag/types.d.ts +5 -0
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbBaseTextInput/types.d.ts +5 -0
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbBaseTextarea/types.d.ts +5 -0
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbBaseTimePickerInput/types.d.ts +5 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +71 -71
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbColorInput/types.d.ts +12 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/components/BbDatePickerInput/types.d.ts +12 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +102 -97
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +33 -35
- package/dist/components/BbIcon/iconCache.d.ts +30 -0
- package/dist/components/BbIcon/iconCache.js +21 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbNumberInput/types.d.ts +12 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +57 -56
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/components/BbSelect/types.d.ts +12 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +43 -43
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbSpinner/types.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbTable/BbTableDataRow.js +2 -2
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbTag/types.d.ts +12 -0
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbTextInput/types.d.ts +12 -0
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/BbTextarea/types.d.ts +12 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/components/BbTimePickerInput/types.d.ts +12 -0
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +81 -78
- package/dist/components/BbTooltip/types.d.ts +8 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.d.ts +1 -0
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/components/CommonInputWrapper/types.d.ts +10 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/composables/useConfirm.d.ts +22 -0
- package/dist/composables/useConfirm.js +43 -40
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useToast.d.ts +16 -0
- package/dist/composables/useToast.js +20 -16
- package/dist/composables/useViewportWidth.d.ts +20 -6
- package/dist/composables/useViewportWidth.js +8 -7
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/index.d.ts +2 -0
- package/dist/input-variants.d.ts +18 -0
- package/dist/llms-full.txt +2173 -1537
- package/dist/llms-medium.txt +504 -82
- package/dist/llms.txt +1 -1
- package/dist/nuxt-module.d.ts +1 -0
- package/dist/nuxt.js +10 -7
- package/dist/plugin.js +1 -0
- package/dist/runtime/nuxt-plugin.js +2 -1
- package/dist/styles.css +1 -1
- package/dist/types/Config.d.ts +18 -0
- package/dist/types/InputVariant.d.ts +22 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/index.d.ts +1 -0
- package/dist/vite-plugin.d.ts +89 -12
- package/dist/vite.js +331 -281
- package/llms.txt +1 -1
- package/package.json +7 -5
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-plugin.d.ts +35 -0
- package/scripts/lib/eslint-plugin.mjs +299 -3
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +42 -0
- package/scripts/lib/mcp-config.mjs +38 -34
- package/scripts/lib/public-type-exports.mjs +246 -0
- package/scripts/lib/validate-bb-markup.mjs +205 -12
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
import { overlaySurfaceIsolation as e } from "../../utils/overlaySurfaceIsolation.js";
|
|
2
|
-
import {
|
|
3
|
-
import { topLayerHost as
|
|
4
|
-
import { useSafeAreaInternal as
|
|
5
|
-
import { dismissToast as
|
|
6
|
-
import
|
|
7
|
-
import { Fragment as
|
|
2
|
+
import { viewportClientHeight as t, viewportClientWidth as n, viewportWidth as r } from "../../composables/useViewportWidth.js";
|
|
3
|
+
import { topLayerHost as i } from "../../composables/useTopLayer.js";
|
|
4
|
+
import { useSafeAreaInternal as a } from "../../composables/useSafeAreaInternal.js";
|
|
5
|
+
import { dismissToast as o } from "../../composables/useToast.js";
|
|
6
|
+
import s from "./BbToastMessage.vue.js";
|
|
7
|
+
import { Fragment as c, computed as l, createBlock as u, createElementBlock as d, defineComponent as f, mergeProps as p, onBeforeUnmount as m, onMounted as h, openBlock as g, reactive as _, ref as v, renderList as y, toHandlers as b, unref as x, watch as S, watchEffect as C } from "vue";
|
|
8
8
|
//#region src/components/BbToast/BbToastRegion.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var w = /*@__PURE__*/ f({
|
|
10
10
|
__name: "BbToastRegion",
|
|
11
11
|
props: {
|
|
12
12
|
position: {},
|
|
13
13
|
toasts: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
let e =
|
|
15
|
+
setup(f) {
|
|
16
|
+
let w = f, T = v(), E = v(!1), D = v(!1), O = _({}), k = l(() => E.value), A = l(() => E.value || D.value), j = v(0), M = v(0), N = _({});
|
|
17
|
+
C(() => {
|
|
18
|
+
let e = w.toasts.filter((e) => !e.removed), t = e.length - 1;
|
|
19
19
|
e.forEach((n, r) => {
|
|
20
20
|
let i = 0;
|
|
21
|
-
for (let n = r + 1; n <= t; n++) i +=
|
|
22
|
-
|
|
21
|
+
for (let n = r + 1; n <= t; n++) i += O[e[n].id] ?? 0;
|
|
22
|
+
N[n.id] = {
|
|
23
23
|
frontIndex: t - r,
|
|
24
24
|
heightBefore: i
|
|
25
25
|
};
|
|
26
|
-
}),
|
|
27
|
-
let n = new Set(
|
|
28
|
-
for (let e of Object.keys(
|
|
29
|
-
for (let e of Object.keys(
|
|
26
|
+
}), j.value = e.length, M.value = t >= 0 ? O[e[t].id] ?? 0 : 0;
|
|
27
|
+
let n = new Set(w.toasts.map((e) => e.id));
|
|
28
|
+
for (let e of Object.keys(N)) n.has(e) || delete N[e];
|
|
29
|
+
for (let e of Object.keys(O)) n.has(e) || delete O[e];
|
|
30
30
|
});
|
|
31
|
-
let { occupied:
|
|
32
|
-
let e =
|
|
33
|
-
return
|
|
34
|
-
}),
|
|
35
|
-
let e =
|
|
31
|
+
let { occupied: P } = a(), F = l(() => r.value < 640 ? 14 : 20), I = l(() => {
|
|
32
|
+
let e = w.toasts.filter((e) => !e.removed);
|
|
33
|
+
return k.value && e.length ? e.reduce((e, t) => e + (O[t.id] ?? 0), 0) : M.value;
|
|
34
|
+
}), L = l(() => {
|
|
35
|
+
let e = F.value * 2, r = w.position.startsWith("top") ? P.top.value : P.bottom.value, i = r + I.value + e <= t.value, a = w.position.endsWith("right") ? P.right.value : w.position.endsWith("left") ? P.left.value : 0, o = a + (T.value?.offsetWidth ?? 356) + e <= n.value;
|
|
36
36
|
return {
|
|
37
37
|
"--safe-v": `${i ? r : 0}px`,
|
|
38
38
|
"--safe-h": `${o ? a : 0}px`
|
|
39
39
|
};
|
|
40
|
-
}),
|
|
41
|
-
height: `${
|
|
42
|
-
...
|
|
43
|
-
})),
|
|
44
|
-
let e =
|
|
40
|
+
}), R = l(() => ({
|
|
41
|
+
height: `${I.value}px`,
|
|
42
|
+
...L.value
|
|
43
|
+
})), z = () => {
|
|
44
|
+
let e = T.value;
|
|
45
45
|
!e || !e.isConnected || (e.matches(":popover-open") && e.hidePopover(), e.showPopover());
|
|
46
46
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
S([
|
|
48
|
+
l(() => w.toasts.filter((e) => !e.removed).length),
|
|
49
|
+
l(() => P.top.value + P.right.value + P.bottom.value + P.left.value),
|
|
50
|
+
i
|
|
51
51
|
], ([e, t, n], [r, i, a]) => {
|
|
52
|
-
e !== 0 && (e > r || t !== i || n !== a) &&
|
|
52
|
+
e !== 0 && (e > r || t !== i || n !== a) && z();
|
|
53
53
|
}, { flush: "post" });
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
54
|
+
let B = (e, t) => {
|
|
55
|
+
O[e] = t;
|
|
56
|
+
}, V = (e, t) => {
|
|
57
|
+
o(e, t);
|
|
58
|
+
}, H = (e) => {
|
|
59
|
+
T.value?.contains(e.relatedTarget) || (E.value = !1);
|
|
60
|
+
}, U = () => {
|
|
61
|
+
D.value = document.hidden;
|
|
62
62
|
};
|
|
63
|
-
return
|
|
64
|
-
|
|
65
|
-
}),
|
|
66
|
-
|
|
67
|
-
}), (t, n) => (
|
|
63
|
+
return h(() => {
|
|
64
|
+
T.value?.showPopover(), document.addEventListener("visibilitychange", U);
|
|
65
|
+
}), m(() => {
|
|
66
|
+
T.value?.hidePopover(), document.removeEventListener("visibilitychange", U);
|
|
67
|
+
}), (t, n) => (g(), d("ol", p({
|
|
68
68
|
ref_key: "regionEl",
|
|
69
|
-
ref:
|
|
70
|
-
class: ["bb-toast", [`bb-toast--${t.position}`, { "bb-toast--expanded":
|
|
69
|
+
ref: T,
|
|
70
|
+
class: ["bb-toast", [`bb-toast--${t.position}`, { "bb-toast--expanded": k.value }]],
|
|
71
71
|
popover: "manual",
|
|
72
|
-
style:
|
|
72
|
+
style: R.value,
|
|
73
73
|
tabindex: "-1"
|
|
74
|
-
},
|
|
75
|
-
onFocusin: n[0] ||= (e) =>
|
|
76
|
-
onFocusout:
|
|
77
|
-
onPointerenter: n[1] ||= (e) =>
|
|
78
|
-
onPointerleave: n[2] ||= (e) =>
|
|
79
|
-
}), [(
|
|
74
|
+
}, b(x(e), !0), {
|
|
75
|
+
onFocusin: n[0] ||= (e) => E.value = !0,
|
|
76
|
+
onFocusout: H,
|
|
77
|
+
onPointerenter: n[1] ||= (e) => E.value = !0,
|
|
78
|
+
onPointerleave: n[2] ||= (e) => E.value = !1
|
|
79
|
+
}), [(g(!0), d(c, null, y(t.toasts, (e) => (g(), u(s, {
|
|
80
80
|
key: e.id,
|
|
81
|
-
"front-height":
|
|
82
|
-
"front-index":
|
|
83
|
-
"height-before":
|
|
84
|
-
paused:
|
|
81
|
+
"front-height": M.value,
|
|
82
|
+
"front-index": N[e.id]?.frontIndex ?? 0,
|
|
83
|
+
"height-before": N[e.id]?.heightBefore ?? 0,
|
|
84
|
+
paused: A.value,
|
|
85
85
|
position: t.position,
|
|
86
86
|
toast: e,
|
|
87
|
-
total:
|
|
88
|
-
onDismiss:
|
|
89
|
-
onHeight:
|
|
87
|
+
total: j.value,
|
|
88
|
+
onDismiss: V,
|
|
89
|
+
onHeight: B
|
|
90
90
|
}, null, 8, [
|
|
91
91
|
"front-height",
|
|
92
92
|
"front-index",
|
|
@@ -99,4 +99,4 @@ var C = /*@__PURE__*/ d({
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
//#endregion
|
|
102
|
-
export {
|
|
102
|
+
export { w as default };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { useId as e } from "../../composables/useId.js";
|
|
2
2
|
import { useUntil as t } from "../../composables/useUntil.js";
|
|
3
3
|
import { removedPropsFor as n } from "../../deprecation/removedProps.js";
|
|
4
|
-
import { warnRemovedAttrs as
|
|
5
|
-
import { extractDomContainer as
|
|
6
|
-
import { transitions as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useElementSize as O } from "@vueuse/core";
|
|
4
|
+
import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
5
|
+
import { extractDomContainer as i } from "../../utilities/functions/extractDomContainer.js";
|
|
6
|
+
import { transitions as a } from "../../utilities/misc/transitions.js";
|
|
7
|
+
import o from "../CommonPopover/CommonPopover.vue.js";
|
|
8
|
+
import { Comment as s, Fragment as ee, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as g, normalizeProps as te, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, ref as x, renderSlot as S, toDisplayString as C, useModel as w, useSlots as T, useTemplateRef as E, watch as D, withCtx as O } from "vue";
|
|
9
|
+
import { useElementSize as k } from "@vueuse/core";
|
|
11
10
|
//#region src/components/BbTooltip/BbTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
11
|
+
var A = /*@__PURE__*/ m({
|
|
13
12
|
inheritAttrs: !1,
|
|
14
13
|
__name: "BbTooltip",
|
|
15
|
-
props: /*@__PURE__*/
|
|
14
|
+
props: /*@__PURE__*/ h({
|
|
16
15
|
arrowPadding: { default: 10 },
|
|
17
16
|
disabled: { type: Boolean },
|
|
18
17
|
eager: { type: Boolean },
|
|
@@ -21,7 +20,7 @@ var k = /*@__PURE__*/ p({
|
|
|
21
20
|
padding: { default: 10 },
|
|
22
21
|
placement: { default: "top" },
|
|
23
22
|
text: {},
|
|
24
|
-
transitionDuration: { default:
|
|
23
|
+
transitionDuration: { default: a.medium },
|
|
25
24
|
activator: {},
|
|
26
25
|
boundary: {},
|
|
27
26
|
variant: { default: "default" },
|
|
@@ -35,98 +34,102 @@ var k = /*@__PURE__*/ p({
|
|
|
35
34
|
modelModifiers: {}
|
|
36
35
|
}),
|
|
37
36
|
emits: ["update:modelValue"],
|
|
38
|
-
setup(
|
|
39
|
-
let
|
|
40
|
-
process.env.NODE_ENV !== "production" &&
|
|
41
|
-
let
|
|
37
|
+
setup(a) {
|
|
38
|
+
let m = w(a, "modelValue"), h = a, A = T();
|
|
39
|
+
process.env.NODE_ENV !== "production" && r("BbTooltip", n("BbTooltip"));
|
|
40
|
+
let j = `bb_${h.id ?? e().id.value}`, M = `${j}_desc`, N = (e) => {
|
|
42
41
|
if (!e) return "";
|
|
43
42
|
let t = "";
|
|
44
43
|
for (let n of e) {
|
|
45
|
-
if (n.type ===
|
|
44
|
+
if (n.type === s) continue;
|
|
46
45
|
let e = n.children;
|
|
47
|
-
typeof e == "string" ? t += e : Array.isArray(e) && (t +=
|
|
46
|
+
typeof e == "string" ? t += e : Array.isArray(e) && (t += N(e));
|
|
48
47
|
}
|
|
49
48
|
return t;
|
|
50
|
-
},
|
|
51
|
-
let t =
|
|
52
|
-
t && (
|
|
53
|
-
}, B, V
|
|
54
|
-
clearTimeout(
|
|
49
|
+
}, P = x(!1), F = c(() => (h.text ?? (P.value ? N(A.default?.({})) : "")).replace(/\s+/g, " ").trim()), I = x(), ne = c(() => h.activator != null), re = E("popover"), ie = c(() => i(re.value)), L = t(m), R = (e) => {
|
|
50
|
+
let t = i(e);
|
|
51
|
+
t && (I.value = t);
|
|
52
|
+
}, z, B, V = () => {
|
|
53
|
+
clearTimeout(B);
|
|
54
|
+
}, H = () => {
|
|
55
|
+
clearTimeout(z), clearTimeout(B), m.value = !1;
|
|
55
56
|
}, U = () => {
|
|
56
|
-
clearTimeout(
|
|
57
|
+
clearTimeout(z), clearTimeout(B), B = setTimeout(H, 50);
|
|
57
58
|
}, W = () => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
V(), !(m.value || h.disabled) && (z = setTimeout(() => {
|
|
60
|
+
m.value = !0;
|
|
61
|
+
}, h.delay));
|
|
62
|
+
}, G = (e) => {
|
|
63
|
+
e.key === "Escape" && H();
|
|
63
64
|
}, K = (e) => {
|
|
64
|
-
e.
|
|
65
|
-
}, q = (e) => {
|
|
66
|
-
e.currentTarget?.matches(":focus-visible") && G();
|
|
65
|
+
e.currentTarget?.matches(":focus-visible") && W();
|
|
67
66
|
};
|
|
68
|
-
D(
|
|
69
|
-
e ? document.addEventListener("keydown",
|
|
70
|
-
}), D(() =>
|
|
71
|
-
e &&
|
|
72
|
-
}), D(() =>
|
|
73
|
-
e &&
|
|
67
|
+
D(m, (e) => {
|
|
68
|
+
e ? document.addEventListener("keydown", G) : document.removeEventListener("keydown", G);
|
|
69
|
+
}), D(() => h.disabled, (e) => {
|
|
70
|
+
e && H();
|
|
71
|
+
}), D(() => h.activator, (e) => {
|
|
72
|
+
e && R(e);
|
|
74
73
|
}, { immediate: !0 });
|
|
75
|
-
let
|
|
76
|
-
D(
|
|
77
|
-
|
|
78
|
-
e.removeEventListener("mouseenter",
|
|
74
|
+
let q = null;
|
|
75
|
+
D(I, (e) => {
|
|
76
|
+
q &&= (q(), null), e && (e.addEventListener("mouseenter", W, { passive: !0 }), e.addEventListener("mouseleave", U, { passive: !0 }), e.addEventListener("focus", K, { passive: !0 }), e.addEventListener("blur", H, { passive: !0 }), q = () => {
|
|
77
|
+
e.removeEventListener("mouseenter", W), e.removeEventListener("mouseleave", U), e.removeEventListener("focus", K), e.removeEventListener("blur", H);
|
|
79
78
|
});
|
|
80
79
|
}, { immediate: !0 });
|
|
81
|
-
let
|
|
82
|
-
D(
|
|
83
|
-
|
|
84
|
-
e.removeEventListener("mouseenter",
|
|
80
|
+
let J = null;
|
|
81
|
+
D(ie, (e) => {
|
|
82
|
+
J &&= (J(), null), e && (e.addEventListener("mouseenter", V, { passive: !0 }), e.addEventListener("mouseleave", U, { passive: !0 }), J = () => {
|
|
83
|
+
e.removeEventListener("mouseenter", V), e.removeEventListener("mouseleave", U);
|
|
85
84
|
});
|
|
86
85
|
}, { immediate: !0 });
|
|
87
|
-
let ae = /* @__PURE__ */ new Set([
|
|
86
|
+
let ae = /* @__PURE__ */ new Set([j, M]), Y = null, X = (e, t) => {
|
|
88
87
|
let n = (e.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((e) => e && !ae.has(e));
|
|
89
88
|
t && n.push(t), n.length ? e.setAttribute("aria-describedby", n.join(" ")) : e.removeAttribute("aria-describedby");
|
|
90
|
-
},
|
|
91
|
-
let e =
|
|
92
|
-
|
|
89
|
+
}, Z = () => {
|
|
90
|
+
let e = I.value ?? null;
|
|
91
|
+
Y && Y !== e && X(Y, null), Y = e, e && (F.value ? X(e, M) : X(e, L.value ? j : null));
|
|
93
92
|
};
|
|
94
93
|
y(() => {
|
|
95
|
-
|
|
94
|
+
Z(), P.value = !0;
|
|
96
95
|
}), D([
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
],
|
|
101
|
-
|
|
96
|
+
I,
|
|
97
|
+
L,
|
|
98
|
+
F
|
|
99
|
+
], Z, { flush: "post" }), v(() => {
|
|
100
|
+
q?.(), J?.(), Y &&= (X(Y, null), null), H(), document.removeEventListener("keydown", G);
|
|
102
101
|
});
|
|
103
|
-
let
|
|
104
|
-
if (
|
|
105
|
-
let
|
|
106
|
-
return
|
|
107
|
-
}), { width:
|
|
102
|
+
let oe = /^-?\d*\.?\d+$/, se = /^(-?\d*\.?\d+)%$/, Q = c(() => {
|
|
103
|
+
if (typeof h.width != "string") return;
|
|
104
|
+
let e = h.width.trim().match(se);
|
|
105
|
+
return e ? parseFloat(e[1]) : void 0;
|
|
106
|
+
}), { width: $ } = k(c(() => Q.value == null ? void 0 : I.value), {
|
|
108
107
|
width: 0,
|
|
109
108
|
height: 0
|
|
110
|
-
}, { box: "border-box" }),
|
|
111
|
-
if (
|
|
109
|
+
}, { box: "border-box" }), ce = c(() => {
|
|
110
|
+
if (h.width == null || h.width === "") return;
|
|
111
|
+
if (Q.value != null) return $.value ? `${$.value * (Q.value / 100)}px` : void 0;
|
|
112
|
+
if (typeof h.width == "number") return Number.isFinite(h.width) ? `${h.width}px` : void 0;
|
|
113
|
+
let e = h.width.trim();
|
|
114
|
+
return oe.test(e) ? `${e}px` : e;
|
|
112
115
|
});
|
|
113
|
-
return (e, t) => (b(), u(
|
|
114
|
-
|
|
116
|
+
return (e, t) => (b(), u(ee, null, [
|
|
117
|
+
F.value ? (b(), u("span", {
|
|
115
118
|
key: 0,
|
|
116
|
-
id:
|
|
117
|
-
class: "sr-only"
|
|
118
|
-
}, C(
|
|
119
|
-
|
|
120
|
-
props: { ref:
|
|
119
|
+
id: M,
|
|
120
|
+
class: "bb-sr-only"
|
|
121
|
+
}, C(F.value), 1)) : l("", !0),
|
|
122
|
+
ne.value ? l("", !0) : S(e.$slots, "activator", te(g({ key: 1 }, {
|
|
123
|
+
props: { ref: R },
|
|
121
124
|
disabled: e.disabled,
|
|
122
|
-
open:
|
|
125
|
+
open: m.value,
|
|
123
126
|
placement: e.placement
|
|
124
127
|
}))),
|
|
125
|
-
|
|
128
|
+
p(o, g({
|
|
126
129
|
ref: "popover",
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
129
|
-
anchor:
|
|
130
|
+
modelValue: m.value,
|
|
131
|
+
"onUpdate:modelValue": t[0] ||= (e) => m.value = e,
|
|
132
|
+
anchor: I.value,
|
|
130
133
|
"arrow-padding": e.arrowPadding,
|
|
131
134
|
boundary: e.boundary,
|
|
132
135
|
class: ["bb-tooltip", { [`bb-tooltip--${e.variant}`]: !0 }],
|
|
@@ -137,12 +140,12 @@ var k = /*@__PURE__*/ p({
|
|
|
137
140
|
tag: "span",
|
|
138
141
|
"transition-duration": e.transitionDuration
|
|
139
142
|
}, e.$attrs), {
|
|
140
|
-
default:
|
|
141
|
-
id:
|
|
143
|
+
default: O(() => [d("span", {
|
|
144
|
+
id: j,
|
|
142
145
|
class: "bb-tooltip__content",
|
|
143
146
|
role: "tooltip",
|
|
144
|
-
style: _({
|
|
145
|
-
}, [S(e.$slots, "default", {}, () => [
|
|
147
|
+
style: _({ "--max-w": ce.value })
|
|
148
|
+
}, [S(e.$slots, "default", {}, () => [f(C(e.text), 1)])], 4)]),
|
|
146
149
|
_: 3
|
|
147
150
|
}, 16, [
|
|
148
151
|
"modelValue",
|
|
@@ -160,4 +163,4 @@ var k = /*@__PURE__*/ p({
|
|
|
160
163
|
}
|
|
161
164
|
});
|
|
162
165
|
//#endregion
|
|
163
|
-
export {
|
|
166
|
+
export { A as default };
|
|
@@ -88,7 +88,14 @@ export type BbTooltipProps = {
|
|
|
88
88
|
*/
|
|
89
89
|
delay?: number;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Caps the width of the tooltip bubble: it wraps at this measure but still
|
|
92
|
+
* shrinks to its text, so a short hint never sits in an oversized bubble.
|
|
93
|
+
* A bare number is read as pixels, a percentage is measured against the
|
|
94
|
+
* activator, and any other CSS length (`'20rem'`, `'min(320px, 90vw)'`)
|
|
95
|
+
* is passed through.
|
|
96
|
+
*
|
|
97
|
+
* Replaces the default cap of `40ch`, which is also reachable in CSS as
|
|
98
|
+
* `--max-w` on the tooltip root.
|
|
92
99
|
*/
|
|
93
100
|
width?: number | string;
|
|
94
101
|
};
|
|
@@ -4,7 +4,7 @@ import { hash as n } from "../../utilities/functions/hash.js";
|
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, watch as h, withCtx as g, withModifiers as _ } from "vue";
|
|
5
5
|
//#region src/components/ChipsBox/ChipsBox.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var v = {
|
|
7
|
-
class: "sr-only",
|
|
7
|
+
class: "bb-sr-only",
|
|
8
8
|
role: "status"
|
|
9
9
|
}, y = /*@__PURE__*/ l({
|
|
10
10
|
__name: "ChipsBox",
|
|
@@ -3,7 +3,7 @@ import { hash as t } from "../../utilities/functions/hash.js";
|
|
|
3
3
|
import { Fragment as n, computed as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, renderList as u, toDisplayString as d, watch as f } from "vue";
|
|
4
4
|
//#region src/components/CommaBox/CommaBox.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var p = {
|
|
6
|
-
class: "sr-only",
|
|
6
|
+
class: "bb-sr-only",
|
|
7
7
|
role: "status"
|
|
8
8
|
}, m = /*@__PURE__*/ o({
|
|
9
9
|
__name: "CommaBox",
|
|
@@ -7,6 +7,7 @@ declare const __VLS_base: import('vue').DefineComponent<CommonInputWrapperProps,
|
|
|
7
7
|
"onClick:clear"?: (() => any) | undefined;
|
|
8
8
|
"onContainer:click"?: (() => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
+
variant: import('../../index').InputVariantType;
|
|
10
11
|
hasValue: boolean;
|
|
11
12
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -29,7 +29,8 @@ var b = {
|
|
|
29
29
|
"prepend:icon": {},
|
|
30
30
|
preventFocus: { type: Boolean },
|
|
31
31
|
reserveAppendSpace: { type: Boolean },
|
|
32
|
-
readonly: { type: Boolean }
|
|
32
|
+
readonly: { type: Boolean },
|
|
33
|
+
variant: { default: "outline" }
|
|
33
34
|
},
|
|
34
35
|
emits: ["click:clear", "container:click"],
|
|
35
36
|
setup(f, { emit: S }) {
|
|
@@ -63,7 +64,8 @@ var b = {
|
|
|
63
64
|
"common-input-wrapper--errors": o.hasErrors,
|
|
64
65
|
"common-input-wrapper--warnings": k.value,
|
|
65
66
|
"common-input-wrapper--loading": o.loading,
|
|
66
|
-
"common-input-wrapper--readonly": o.readonly
|
|
67
|
+
"common-input-wrapper--readonly": o.readonly,
|
|
68
|
+
[`common-input-wrapper--${o.variant}`]: o.variant !== "none"
|
|
67
69
|
}]) }, [
|
|
68
70
|
_(o.$slots, "prepend-outer"),
|
|
69
71
|
u("span", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IconType } from '../../types/Icon';
|
|
2
|
+
import { InputVariantType } from '../../types/InputVariant';
|
|
2
3
|
export type CommonInputWrapperProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Name of the icon to be added at the end of the input.
|
|
@@ -53,6 +54,15 @@ export type CommonInputWrapperProps = {
|
|
|
53
54
|
* Whether the input is readonly.
|
|
54
55
|
*/
|
|
55
56
|
readonly?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Visual variant of the field box. Controls colours only — background,
|
|
59
|
+
* border colour, focus border — while height, padding and border WIDTH
|
|
60
|
+
* stay identical across variants, so switching one never reflows a form.
|
|
61
|
+
* Mirrors the equally named `BbButton` variants.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue `'outline'`
|
|
64
|
+
*/
|
|
65
|
+
variant?: InputVariantType;
|
|
56
66
|
};
|
|
57
67
|
export type CommonInputWrapperEvents = {
|
|
58
68
|
/**
|
|
@@ -205,6 +205,28 @@ export declare const namedPortalRegistry: import('vue').Reactive<Map<string, ()
|
|
|
205
205
|
export declare const registerNamedPortal: (name: string, fn: () => VNode[] | undefined) => () => boolean;
|
|
206
206
|
/** Duration to wait before clearing state, matching BaseDialog transition. */
|
|
207
207
|
export declare const TRANSITION_DURATION: number;
|
|
208
|
+
/**
|
|
209
|
+
* Grace period before the zero-host warning fires.
|
|
210
|
+
*
|
|
211
|
+
* The check cannot be synchronous. A host mounted anywhere but the app root —
|
|
212
|
+
* a layout, say — unmounts and remounts across a route change, and a
|
|
213
|
+
* `confirm()` landing inside that gap is NOT broken: a late-mounting host
|
|
214
|
+
* renders the pending dialog and the promise settles normally (verified). So
|
|
215
|
+
* "no host right now" does not mean "no host is coming", and warning on it
|
|
216
|
+
* would be a false positive on every route transition.
|
|
217
|
+
*
|
|
218
|
+
* Waiting also removes the need to guess. At fire time we re-read the real
|
|
219
|
+
* state — a host mounted, or the promise settled — and stay quiet if either is
|
|
220
|
+
* true, so the delay only ever has to be long enough for a slow async layout
|
|
221
|
+
* chunk to arrive. That makes a generous value strictly safer than a tight
|
|
222
|
+
* one; there is no false-positive risk left to trade against.
|
|
223
|
+
*
|
|
224
|
+
* This supersedes the 2026-07-30 `hostEverMounted` latch, which suppressed the
|
|
225
|
+
* warning for the whole process once ANY host had ever mounted. That silenced
|
|
226
|
+
* exactly the case a non-root host produces: mounted once, gone now, promise
|
|
227
|
+
* hangs with no diagnostic.
|
|
228
|
+
*/
|
|
229
|
+
export declare const NO_HOST_WARNING_DELAY = 1000;
|
|
208
230
|
/**
|
|
209
231
|
* Called by `<BbConfirm>` on mount. Internal — not re-exported from
|
|
210
232
|
* `src/index.ts`. Returns the host count including this one (for the
|