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
|
@@ -6,24 +6,24 @@ import { warnRemovedAttrs as i } from "../../utilities/functions/warnRemovedAttr
|
|
|
6
6
|
import { extractDomContainer as a } from "../../utilities/functions/extractDomContainer.js";
|
|
7
7
|
import { transitions as o } from "../../utilities/misc/transitions.js";
|
|
8
8
|
import ee from "../CommonPopover/CommonPopover.vue.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useElementSize as
|
|
9
|
+
import { isTopEscapeEntry as te, pushEscapeEntry as ne, removeEscapeEntry as re } from "../../utils/overlayEscapeStack.js";
|
|
10
|
+
import { useMobile as ie } from "../../composables/useMobile.js";
|
|
11
|
+
import { useClosingInert as ae } from "../../composables/useClosingInert.js";
|
|
12
|
+
import oe from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
13
|
+
import { parseWidthString as s } from "../../utilities/functions/parseWidthString.js";
|
|
14
|
+
import { Fragment as se, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as ce, createSlots as le, defineComponent as f, mergeModels as p, mergeProps as m, nextTick as ue, normalizeClass as de, normalizeProps as fe, normalizeStyle as pe, onBeforeUnmount as me, onMounted as he, openBlock as h, ref as g, renderSlot as _, unref as v, useModel as ge, useTemplateRef as _e, watch as y, withCtx as b } from "vue";
|
|
15
|
+
import { useElementSize as ve, useIntersectionObserver as ye } from "@vueuse/core";
|
|
16
16
|
//#region src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var
|
|
17
|
+
var be = ["inert"], xe = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "bb-popover__header"
|
|
20
|
-
},
|
|
20
|
+
}, Se = { class: "bb-popover__content scrollbar-border" }, Ce = {
|
|
21
21
|
key: 1,
|
|
22
22
|
class: "bb-popover__footer"
|
|
23
|
-
},
|
|
23
|
+
}, we = 500, Te = 10, x = /*@__PURE__*/ f({
|
|
24
24
|
inheritAttrs: !1,
|
|
25
25
|
__name: "BbPopover",
|
|
26
|
-
props: /*@__PURE__*/
|
|
26
|
+
props: /*@__PURE__*/ p({
|
|
27
27
|
activator: {},
|
|
28
28
|
adaptive: {
|
|
29
29
|
type: Boolean,
|
|
@@ -52,39 +52,39 @@ var xe = ["inert"], Se = {
|
|
|
52
52
|
},
|
|
53
53
|
modelModifiers: {}
|
|
54
54
|
}),
|
|
55
|
-
emits: /*@__PURE__*/
|
|
55
|
+
emits: /*@__PURE__*/ p([
|
|
56
56
|
"show",
|
|
57
57
|
"hide",
|
|
58
58
|
"shown",
|
|
59
59
|
"hidden"
|
|
60
60
|
], ["update:modelValue"]),
|
|
61
|
-
setup(o, { emit:
|
|
62
|
-
let
|
|
61
|
+
setup(o, { emit: f }) {
|
|
62
|
+
let p = ge(o, "modelValue"), x = o, S = f, Ee = e();
|
|
63
63
|
process.env.NODE_ENV !== "production" && i("BbPopover", r("BbPopover"));
|
|
64
|
-
let { id:
|
|
65
|
-
|
|
66
|
-
() =>
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
let { id: De } = t(), C = x.id ?? De.value, w = `bbp_${C}`, T = g(), E = _e("popoverRef"), D = c(() => a(E.value)), O = n(p), k = c(() => x.activator != null), { isMobile: A } = ie(), j = () => (x.adaptive ?? Ee.adaptive) && A.value ? "canvas" : "popover", M = g(j()), N = c(() => M.value === "canvas");
|
|
65
|
+
y([
|
|
66
|
+
() => x.adaptive,
|
|
67
|
+
A,
|
|
68
|
+
p
|
|
69
69
|
], () => {
|
|
70
|
-
|
|
70
|
+
p.value || (M.value = j());
|
|
71
71
|
});
|
|
72
|
-
let
|
|
72
|
+
let Oe = c(() => ({
|
|
73
73
|
side: "bottom",
|
|
74
74
|
size: "auto",
|
|
75
75
|
draggable: !0,
|
|
76
|
-
eager:
|
|
77
|
-
disabled:
|
|
78
|
-
focusTarget:
|
|
79
|
-
transitionDuration:
|
|
80
|
-
...
|
|
81
|
-
...
|
|
82
|
-
})),
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
let e =
|
|
76
|
+
eager: x.eager,
|
|
77
|
+
disabled: x.disabled,
|
|
78
|
+
focusTarget: x.focusTarget,
|
|
79
|
+
transitionDuration: x.transitionDuration,
|
|
80
|
+
...x.offCanvasProps,
|
|
81
|
+
...O.value && !x.offCanvasProps?.title ? { "aria-labelledby": C } : {}
|
|
82
|
+
})), ke = () => {
|
|
83
|
+
T.value?.focus(), S("hidden");
|
|
84
|
+
}, P = c(() => {
|
|
85
|
+
let e = x.trigger;
|
|
86
86
|
return new Set(Array.isArray(e) ? e : [e]);
|
|
87
|
-
}),
|
|
87
|
+
}), F = (e, t) => ({ getBoundingClientRect: () => ({
|
|
88
88
|
x: e,
|
|
89
89
|
y: t,
|
|
90
90
|
width: 0,
|
|
@@ -96,19 +96,19 @@ var xe = ["inert"], Se = {
|
|
|
96
96
|
toJSON() {
|
|
97
97
|
return this;
|
|
98
98
|
}
|
|
99
|
-
}) }),
|
|
100
|
-
clearTimeout(
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
let e =
|
|
99
|
+
}) }), I = g(null), Ae = c(() => x.placement === "cursor" && I.value ? I.value : T.value), L, R = null, z = !1, B = () => {
|
|
100
|
+
clearTimeout(L), R = null;
|
|
101
|
+
}, V = (e) => {
|
|
102
|
+
T.value = a(e) ?? void 0;
|
|
103
|
+
}, je = c(() => {
|
|
104
|
+
let e = P.value;
|
|
105
105
|
return {
|
|
106
|
-
"aria-expanded":
|
|
107
|
-
"aria-controls":
|
|
106
|
+
"aria-expanded": O.value ? p.value : void 0,
|
|
107
|
+
"aria-controls": O.value ? w : void 0,
|
|
108
108
|
"aria-haspopup": "dialog",
|
|
109
|
-
id:
|
|
110
|
-
disabled: !!
|
|
111
|
-
ref:
|
|
109
|
+
id: C,
|
|
110
|
+
disabled: !!x.disabled,
|
|
111
|
+
ref: V,
|
|
112
112
|
...e.has("click") ? { onClick: J } : {},
|
|
113
113
|
...e.has("contextMenu") ? {
|
|
114
114
|
onContextmenu: Y,
|
|
@@ -119,146 +119,146 @@ var xe = ["inert"], Se = {
|
|
|
119
119
|
} : {}
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
|
-
|
|
123
|
-
e &&
|
|
124
|
-
}, { immediate: !0 }),
|
|
125
|
-
if (!e || !
|
|
122
|
+
y(() => x.activator, (e) => {
|
|
123
|
+
e && V(e);
|
|
124
|
+
}, { immediate: !0 }), y([T, P], ([e, t], n, r) => {
|
|
125
|
+
if (!e || !k.value) return;
|
|
126
126
|
let i = [];
|
|
127
127
|
t.has("click") && (e.addEventListener("click", J), i.push(() => e.removeEventListener("click", J))), t.has("contextMenu") && (e.addEventListener("contextmenu", Y), e.addEventListener("pointerdown", X), e.addEventListener("pointermove", Z), e.addEventListener("pointerup", Q), e.addEventListener("pointercancel", Q), i.push(() => {
|
|
128
|
-
e.removeEventListener("contextmenu", Y), e.removeEventListener("pointerdown", X), e.removeEventListener("pointermove", Z), e.removeEventListener("pointerup", Q), e.removeEventListener("pointercancel", Q),
|
|
128
|
+
e.removeEventListener("contextmenu", Y), e.removeEventListener("pointerdown", X), e.removeEventListener("pointermove", Z), e.removeEventListener("pointerup", Q), e.removeEventListener("pointercancel", Q), B();
|
|
129
129
|
})), e.setAttribute("aria-haspopup", "dialog"), r(() => {
|
|
130
130
|
i.forEach((e) => e()), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-haspopup");
|
|
131
131
|
});
|
|
132
|
-
}, { immediate: !0 }),
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
}, { immediate: !0 }), y([
|
|
133
|
+
T,
|
|
134
|
+
p,
|
|
135
|
+
O
|
|
136
136
|
], ([e, t, n]) => {
|
|
137
|
-
!e || !
|
|
138
|
-
}, { immediate: !0 }),
|
|
139
|
-
e
|
|
137
|
+
!e || !k.value || !n || (e.setAttribute("id", C), e.setAttribute("aria-expanded", String(t)), e.setAttribute("aria-controls", w));
|
|
138
|
+
}, { immediate: !0 }), ye(T, ([{ intersectionRatio: e }]) => {
|
|
139
|
+
!(e >= .99) && p.value && !N.value && $();
|
|
140
140
|
}, { threshold: [0, 1] });
|
|
141
|
-
let
|
|
141
|
+
let H = (e) => {
|
|
142
142
|
let t = e.target;
|
|
143
143
|
if (!(t instanceof Node)) return;
|
|
144
|
-
let n =
|
|
144
|
+
let n = D.value?.contains(t), r = T.value?.contains(t);
|
|
145
145
|
!n && !r && $();
|
|
146
|
-
},
|
|
147
|
-
e.key === "Escape" &&
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
let e =
|
|
156
|
-
t instanceof HTMLElement && t.focus(),
|
|
146
|
+
}, U = Symbol("bb-popover"), W = (e) => {
|
|
147
|
+
e.key === "Escape" && te(U) && (e.preventDefault(), e.stopImmediatePropagation(), $());
|
|
148
|
+
}, Me = () => {
|
|
149
|
+
ne(U), document.addEventListener("click", H, { passive: !0 }), document.addEventListener("contextmenu", H, { passive: !0 }), document.addEventListener("keydown", W, { capture: !0 });
|
|
150
|
+
}, G = () => {
|
|
151
|
+
re(U), document.removeEventListener("click", H), document.removeEventListener("contextmenu", H), document.removeEventListener("keydown", W, { capture: !0 });
|
|
152
|
+
}, K = !1, Ne = async () => {
|
|
153
|
+
if (N.value) return;
|
|
154
|
+
K = !0, S("show"), Me(), await ue();
|
|
155
|
+
let e = x.focusTarget ?? "[tabindex]:not([tabindex=\"-1\"]), button, a, input, select, textarea", t = D.value?.querySelector(e);
|
|
156
|
+
t instanceof HTMLElement && t.focus(), S("shown");
|
|
157
157
|
}, Pe = () => {
|
|
158
|
-
|
|
159
|
-
}, Fe =
|
|
160
|
-
|
|
161
|
-
e ? (
|
|
162
|
-
}), ge(() => {
|
|
163
|
-
f.value && K();
|
|
158
|
+
K && (K = !1, S("hide"), G(), T.value && T.value.focus(), S("hidden"));
|
|
159
|
+
}, Fe = ae(p, () => x.transitionDuration);
|
|
160
|
+
y(p, (e) => {
|
|
161
|
+
e ? (M.value = j(), Ne()) : Pe();
|
|
164
162
|
}), he(() => {
|
|
165
|
-
|
|
163
|
+
p.value && Ne();
|
|
164
|
+
}), me(() => {
|
|
165
|
+
B(), G();
|
|
166
166
|
});
|
|
167
167
|
let q = () => {
|
|
168
|
-
|
|
168
|
+
x.disabled || (p.value = !0);
|
|
169
169
|
}, J = (e) => {
|
|
170
|
-
if (
|
|
170
|
+
if (p.value) {
|
|
171
171
|
$();
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
-
if (
|
|
175
|
-
|
|
174
|
+
if (z) {
|
|
175
|
+
z = !1, e.preventDefault(), e.stopPropagation();
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
|
-
e.stopImmediatePropagation(),
|
|
178
|
+
e.stopImmediatePropagation(), x.placement === "cursor" && (I.value = F(e.clientX, e.clientY)), q();
|
|
179
179
|
}, Y = (e) => {
|
|
180
|
-
|
|
180
|
+
x.disabled || (e.preventDefault(), e.stopPropagation(), !(x.placement === "cursor" && (I.value = F(e.clientX, e.clientY), p.value)) && (p.value ? $() : q()));
|
|
181
181
|
}, X = (e) => {
|
|
182
|
-
|
|
182
|
+
x.disabled || e.pointerType === "mouse" || (z = !1, R = {
|
|
183
183
|
x: e.clientX,
|
|
184
184
|
y: e.clientY
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
},
|
|
185
|
+
}, L = setTimeout(() => {
|
|
186
|
+
z = !0, x.placement === "cursor" && R && (I.value = F(R.x, R.y)), R = null, q();
|
|
187
|
+
}, we));
|
|
188
188
|
}, Z = (e) => {
|
|
189
|
-
if (!
|
|
190
|
-
let t = e.clientX -
|
|
191
|
-
Math.sqrt(t * t + n * n) >
|
|
189
|
+
if (!R) return;
|
|
190
|
+
let t = e.clientX - R.x, n = e.clientY - R.y;
|
|
191
|
+
Math.sqrt(t * t + n * n) > Te && B();
|
|
192
192
|
}, Q = () => {
|
|
193
|
-
|
|
193
|
+
B();
|
|
194
194
|
}, $ = () => {
|
|
195
|
-
|
|
196
|
-
}, Ie =
|
|
197
|
-
if (!
|
|
198
|
-
let { unit: e } =
|
|
195
|
+
p.value = !1;
|
|
196
|
+
}, Ie = c(() => {
|
|
197
|
+
if (!x.width) return !1;
|
|
198
|
+
let { unit: e } = s(x.width);
|
|
199
199
|
return e === "%";
|
|
200
|
-
}), { width: Le } =
|
|
200
|
+
}), { width: Le } = ve(c(() => Ie.value ? T.value : void 0), {
|
|
201
201
|
width: 0,
|
|
202
202
|
height: 0
|
|
203
|
-
}, { box: "border-box" }), Re =
|
|
204
|
-
if (!
|
|
205
|
-
let { value: e, unit: t } =
|
|
206
|
-
return t === "%" &&
|
|
203
|
+
}, { box: "border-box" }), Re = c(() => {
|
|
204
|
+
if (!x.width) return;
|
|
205
|
+
let { value: e, unit: t } = s(x.width);
|
|
206
|
+
return t === "%" && T.value ? `${Le.value * (e / 100)}px` : `${e}px`;
|
|
207
207
|
});
|
|
208
|
-
return (e, t) => (
|
|
209
|
-
props:
|
|
208
|
+
return (e, t) => (h(), d(se, null, [k.value ? u("", !0) : _(e.$slots, "activator", fe(m({ key: 0 }, {
|
|
209
|
+
props: je.value,
|
|
210
210
|
disabled: !!e.disabled,
|
|
211
|
-
isOpen:
|
|
211
|
+
isOpen: p.value,
|
|
212
212
|
placement: e.placement
|
|
213
|
-
}))),
|
|
213
|
+
}))), N.value ? (h(), l(oe, m({
|
|
214
214
|
key: 1,
|
|
215
|
-
id:
|
|
216
|
-
modelValue:
|
|
217
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
215
|
+
id: w,
|
|
216
|
+
modelValue: p.value,
|
|
217
|
+
"onUpdate:modelValue": t[0] ||= (e) => p.value = e,
|
|
218
218
|
class: "bb-popover-offcanvas"
|
|
219
219
|
}, {
|
|
220
220
|
...e.$attrs,
|
|
221
|
-
...
|
|
221
|
+
...Oe.value
|
|
222
222
|
}, {
|
|
223
|
-
onHidden:
|
|
224
|
-
onHide: t[1] ||= (e) =>
|
|
225
|
-
onShow: t[2] ||= (e) =>
|
|
226
|
-
onShown: t[3] ||= (e) =>
|
|
227
|
-
}),
|
|
228
|
-
default:
|
|
223
|
+
onHidden: ke,
|
|
224
|
+
onHide: t[1] ||= (e) => S("hide"),
|
|
225
|
+
onShow: t[2] ||= (e) => S("show"),
|
|
226
|
+
onShown: t[3] ||= (e) => S("shown")
|
|
227
|
+
}), le({
|
|
228
|
+
default: b(() => [_(e.$slots, "default", {
|
|
229
229
|
close: $,
|
|
230
230
|
disabled: !!e.disabled,
|
|
231
|
-
open:
|
|
231
|
+
open: p.value,
|
|
232
232
|
placement: e.placement
|
|
233
233
|
})]),
|
|
234
234
|
_: 2
|
|
235
235
|
}, [e.$slots.header ? {
|
|
236
236
|
name: "header",
|
|
237
|
-
fn:
|
|
237
|
+
fn: b(() => [_(e.$slots, "header", {
|
|
238
238
|
close: $,
|
|
239
239
|
disabled: !!e.disabled,
|
|
240
|
-
open:
|
|
240
|
+
open: p.value,
|
|
241
241
|
placement: e.placement
|
|
242
242
|
})]),
|
|
243
243
|
key: "0"
|
|
244
244
|
} : void 0, e.$slots.footer ? {
|
|
245
245
|
name: "footer",
|
|
246
|
-
fn:
|
|
246
|
+
fn: b(() => [_(e.$slots, "footer", {
|
|
247
247
|
close: $,
|
|
248
248
|
disabled: !!e.disabled,
|
|
249
|
-
open:
|
|
249
|
+
open: p.value,
|
|
250
250
|
placement: e.placement
|
|
251
251
|
})]),
|
|
252
252
|
key: "1"
|
|
253
|
-
} : void 0]), 1040, ["modelValue"])) : (
|
|
253
|
+
} : void 0]), 1040, ["modelValue"])) : (h(), l(ee, m({
|
|
254
254
|
key: 2,
|
|
255
|
-
id:
|
|
255
|
+
id: w,
|
|
256
256
|
ref_key: "popoverRef",
|
|
257
|
-
ref:
|
|
258
|
-
modelValue:
|
|
259
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
260
|
-
anchor:
|
|
261
|
-
"aria-labelledby":
|
|
257
|
+
ref: E,
|
|
258
|
+
modelValue: p.value,
|
|
259
|
+
"onUpdate:modelValue": t[4] ||= (e) => p.value = e,
|
|
260
|
+
anchor: Ae.value,
|
|
261
|
+
"aria-labelledby": v(O) ? v(C) : void 0,
|
|
262
262
|
boundary: e.boundary,
|
|
263
263
|
class: "bb-popover",
|
|
264
264
|
dialog: "",
|
|
@@ -270,30 +270,30 @@ var xe = ["inert"], Se = {
|
|
|
270
270
|
style: { width: Re.value },
|
|
271
271
|
"transition-duration": e.transitionDuration
|
|
272
272
|
}, e.$attrs), {
|
|
273
|
-
default:
|
|
274
|
-
class:
|
|
275
|
-
inert:
|
|
276
|
-
style:
|
|
273
|
+
default: b(({ availableHeight: t }) => [ce("div", {
|
|
274
|
+
class: de(["bb-popover__panel", { "bb-popover__panel--scrollable": e.scrollable }]),
|
|
275
|
+
inert: v(Fe),
|
|
276
|
+
style: pe({ "--max-h": e.scrollable && t != null ? `${t}px` : void 0 })
|
|
277
277
|
}, [
|
|
278
|
-
e.$slots.header ? (
|
|
278
|
+
e.$slots.header ? (h(), d("div", xe, [_(e.$slots, "header", {
|
|
279
279
|
close: $,
|
|
280
280
|
disabled: !!e.disabled,
|
|
281
|
-
open:
|
|
281
|
+
open: p.value,
|
|
282
282
|
placement: e.placement
|
|
283
|
-
})])) :
|
|
284
|
-
|
|
283
|
+
})])) : u("", !0),
|
|
284
|
+
ce("div", Se, [_(e.$slots, "default", {
|
|
285
285
|
close: $,
|
|
286
286
|
disabled: !!e.disabled,
|
|
287
|
-
open:
|
|
287
|
+
open: p.value,
|
|
288
288
|
placement: e.placement
|
|
289
289
|
})]),
|
|
290
|
-
e.$slots.footer ? (
|
|
290
|
+
e.$slots.footer ? (h(), d("div", Ce, [_(e.$slots, "footer", {
|
|
291
291
|
close: $,
|
|
292
292
|
disabled: !!e.disabled,
|
|
293
|
-
open:
|
|
293
|
+
open: p.value,
|
|
294
294
|
placement: e.placement
|
|
295
|
-
})])) :
|
|
296
|
-
], 14,
|
|
295
|
+
})])) : u("", !0)
|
|
296
|
+
], 14, be)]),
|
|
297
297
|
_: 3
|
|
298
298
|
}, 16, [
|
|
299
299
|
"modelValue",
|
|
@@ -310,4 +310,4 @@ var xe = ["inert"], Se = {
|
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
//#endregion
|
|
313
|
-
export {
|
|
313
|
+
export { x as default };
|
|
@@ -23,6 +23,7 @@ var b = /*@__PURE__*/ d({
|
|
|
23
23
|
clearable: { type: Boolean },
|
|
24
24
|
comma: { type: Boolean },
|
|
25
25
|
compact: { type: Boolean },
|
|
26
|
+
variant: {},
|
|
26
27
|
dependencies: {},
|
|
27
28
|
depsDebounceTime: {},
|
|
28
29
|
direction: {},
|
|
@@ -179,7 +180,8 @@ var b = /*@__PURE__*/ d({
|
|
|
179
180
|
selectable: e.selectable,
|
|
180
181
|
"selected-labels-fn": e.selectedLabelsFn,
|
|
181
182
|
stash: e.stash,
|
|
182
|
-
"transition-duration": e.transitionDuration
|
|
183
|
+
"transition-duration": e.transitionDuration,
|
|
184
|
+
variant: e.variant
|
|
183
185
|
}, j), l({
|
|
184
186
|
"append-outer": y((t) => [_(e.$slots, "append-outer", m(f(t)))]),
|
|
185
187
|
append: y((t) => [_(e.$slots, "append", m(f(t)))]),
|
|
@@ -212,7 +214,7 @@ var b = /*@__PURE__*/ d({
|
|
|
212
214
|
fn: y(() => [_(e.$slots, "suffix")]),
|
|
213
215
|
key: "3"
|
|
214
216
|
} : void 0
|
|
215
|
-
]), 1040, /* @__PURE__ */ "id.adaptive.append:icon.aria-describedby.autocomplete.autofocus.clearable.comma.compact.dependencies.deps-debounce-time.disable-writing.disabled.enforce-coherence.filter-by.group-by.has-errors.has-warning.header-height.item-height.item-text.item-value.items.loading.loading-text.max.max-selected-labels.model-value.model-value-debounce-time.multiple.name.no-data-text.off-canvas-props.placeholder.prefill.prepend:icon.query-debounce-time.readonly.required.selectable.selected-labels-fn.stash.transition-duration".split("."))]),
|
|
217
|
+
]), 1040, /* @__PURE__ */ "id.adaptive.append:icon.aria-describedby.autocomplete.autofocus.clearable.comma.compact.dependencies.deps-debounce-time.disable-writing.disabled.enforce-coherence.filter-by.group-by.has-errors.has-warning.header-height.item-height.item-text.item-value.items.loading.loading-text.max.max-selected-labels.model-value.model-value-debounce-time.multiple.name.no-data-text.off-canvas-props.placeholder.prefill.prepend:icon.query-debounce-time.readonly.required.selectable.selected-labels-fn.stash.transition-duration.variant".split("."))]),
|
|
216
218
|
_: 3
|
|
217
219
|
}, 8, [
|
|
218
220
|
"id",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputVariantType } from '../../types/InputVariant';
|
|
1
2
|
import { HTMLAttributes, InputHTMLAttributes } from 'vue';
|
|
2
3
|
import { InputDirection } from '../../types/InputDirection';
|
|
3
4
|
import { ItemAccessor } from '../../types/ItemAccessor';
|
|
@@ -55,6 +56,17 @@ export type BbSelectProps<T> = {
|
|
|
55
56
|
* Sets the component in a compact mode.
|
|
56
57
|
*/
|
|
57
58
|
compact?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Visual variant of the field box — the same names and tokens as the
|
|
61
|
+
* `BbButton` variants. Colours only: height, padding and border width are
|
|
62
|
+
* identical across variants, so a form never reflows when one changes.
|
|
63
|
+
* `'ghost'` has no border in any state (errors and warnings show through
|
|
64
|
+
* the icon and the messages); every variant keeps the focus ring.
|
|
65
|
+
* Register extra names with the plugin's `inputVariants` option.
|
|
66
|
+
*
|
|
67
|
+
* @defaultValue `'outline'`
|
|
68
|
+
*/
|
|
69
|
+
variant?: InputVariantType;
|
|
58
70
|
/**
|
|
59
71
|
* Defines an array of dependencies that will trigger actions in the component upon change.
|
|
60
72
|
*/
|