bitboss-ui 3.0.0-beta.21 → 3.0.0-beta.22
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/BbBaseRadioIcon.md +6 -10
- package/dist/ai/BbBaseSwitchIcon.md +5 -9
- 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 +13 -23
- package/dist/ai/BbColorPalette.md +23 -35
- package/dist/ai/BbConfirm.md +17 -32
- package/dist/ai/BbDatePickerInput.md +15 -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 +18 -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 +32 -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 +12 -23
- package/dist/ai/BbTextInput.md +20 -26
- package/dist/ai/BbTextarea.md +28 -34
- package/dist/ai/BbToast.md +14 -34
- package/dist/ai/BbTooltip.md +22 -20
- package/dist/ai/BbTree.md +46 -72
- package/dist/ai/changelog.json +169 -62
- package/dist/ai/components.json +1467 -9
- 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 +141 -13
- 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 +253 -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/BbBaseDatePicker.md +5 -5
- package/dist/ai/source/BbBaseDatePickerInput.md +2 -2
- package/dist/ai/source/BbBaseRadio.md +1 -1
- package/dist/ai/source/BbBaseRating.md +5 -5
- package/dist/ai/source/BbBaseSelect.md +1 -1
- package/dist/ai/source/BbBaseSlider.md +5 -5
- package/dist/ai/source/BbBaseSwitch.md +1 -1
- package/dist/ai/source/BbBaseTimePickerInput.md +1 -1
- package/dist/ai/source/BbBreadcrumbs.md +20 -1
- package/dist/ai/source/BbButton.md +2 -2
- 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/BbOffCanvas.md +50 -28
- package/dist/ai/source/BbPagination.md +2 -2
- package/dist/ai/source/BbPopover.md +12 -1
- 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/BbTooltip.md +57 -10
- package/dist/ai/source/ChipsBox.md +1 -1
- package/dist/ai/source/CommaBox.md +1 -1
- 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/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 +1 -1
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +1 -1
- 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 +1 -1
- 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/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
- 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/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/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/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/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/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/llms-full.txt +1979 -1527
- package/dist/llms-medium.txt +461 -74
- package/dist/llms.txt +1 -1
- 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/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/vite-plugin.d.ts +74 -11
- package/dist/vite.js +292 -253
- 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
|
@@ -24,7 +24,7 @@ var ne = ["aria-label", "onKeydown"], re = {
|
|
|
24
24
|
"tabindex"
|
|
25
25
|
], M = { class: "bb-base-date-picker__date-append" }, N = {
|
|
26
26
|
"aria-live": "polite",
|
|
27
|
-
class: "sr-only",
|
|
27
|
+
class: "bb-sr-only",
|
|
28
28
|
role: "status"
|
|
29
29
|
}, se = 366, P = /*@__PURE__*/ b({
|
|
30
30
|
__name: "BbBaseDatePickerInputDaySelector",
|
|
@@ -706,7 +706,7 @@ var we = ["data-value"], Te = [
|
|
|
706
706
|
onClick: (e) => x(yt)(U.value[n + 1], { select: !0 })
|
|
707
707
|
}, b(pt(U.value[n], U.value[n + 1])), 11, Ee)) : ce("", !0)], 64))), 128))], 6), h("span", {
|
|
708
708
|
id: Pe,
|
|
709
|
-
class: "bb-base-date-picker-input__accessible-description sr-only"
|
|
709
|
+
class: "bb-base-date-picker-input__accessible-description bb-sr-only"
|
|
710
710
|
}, b(x(A)("baseDatePickerInput.dateFormat")) + " " + b(Lt.value), 1)]),
|
|
711
711
|
_: 2
|
|
712
712
|
}, [e.$slots.prefix ? {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseInputContainerProps, BaseInputContainerSlots } from './types';
|
|
2
2
|
type __VLS_Slots = BaseInputContainerSlots;
|
|
3
3
|
declare const __VLS_base: import('vue').DefineComponent<BaseInputContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseInputContainerProps> & Readonly<{}>, {
|
|
4
|
+
reverse: boolean;
|
|
4
5
|
labelPosition: "left" | "center" | "right";
|
|
5
6
|
direction: import('../..').InputDirection;
|
|
6
7
|
tag: import('../../types/CommonProps').ContainerTag;
|
|
7
|
-
reverse: boolean;
|
|
8
8
|
labelTag: import('../../types/CommonProps').LabelTag;
|
|
9
9
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -92,7 +92,7 @@ var m = /*@__PURE__*/ o({
|
|
|
92
92
|
"bb-base-radio--focused": v.value,
|
|
93
93
|
"bb-base-radio--focus-visible": y.value,
|
|
94
94
|
"bb-base-radio--readonly": e.readonly
|
|
95
|
-
}]) }, [i("input", c(C.value, { class: "sr-only" }), null, 16), p(e.$slots, "icon", u(s(w.value)), () => [a(t, {
|
|
95
|
+
}]) }, [i("input", c(C.value, { class: "bb-sr-only" }), null, 16), p(e.$slots, "icon", u(s(w.value)), () => [a(t, {
|
|
96
96
|
checked: _.value,
|
|
97
97
|
disabled: !!e.disabled,
|
|
98
98
|
"focus-visible": y.value,
|
|
@@ -13,7 +13,7 @@ var w = [
|
|
|
13
13
|
"aria-labelledby",
|
|
14
14
|
"aria-readonly",
|
|
15
15
|
"role"
|
|
16
|
-
], T = ["id"], E = { class: "bb-base-rating__label-text sr-only" }, D = [
|
|
16
|
+
], T = ["id"], E = { class: "bb-base-rating__label-text bb-sr-only" }, D = [
|
|
17
17
|
"id",
|
|
18
18
|
"aria-describedby",
|
|
19
19
|
"autofocus",
|
|
@@ -142,7 +142,7 @@ var w = [
|
|
|
142
142
|
V.value ? (_(), f("span", {
|
|
143
143
|
key: 0,
|
|
144
144
|
id: S(R),
|
|
145
|
-
class: "sr-only"
|
|
145
|
+
class: "bb-sr-only"
|
|
146
146
|
}, x(S(H)), 9, T)) : d("", !0),
|
|
147
147
|
(_(!0), f(l, null, y(Y.value, (n, r) => (_(), f("label", {
|
|
148
148
|
key: n.value,
|
|
@@ -159,7 +159,7 @@ var w = [
|
|
|
159
159
|
"aria-describedby": U.value,
|
|
160
160
|
autofocus: e.autofocus && !r,
|
|
161
161
|
checked: n.checked,
|
|
162
|
-
class: "sr-only",
|
|
162
|
+
class: "bb-sr-only",
|
|
163
163
|
disabled: n.disabled,
|
|
164
164
|
name: n.name,
|
|
165
165
|
required: e.required,
|
|
@@ -270,7 +270,7 @@ var re = ["id"], ie = [
|
|
|
270
270
|
class: S(["bb-base-select__display-value", [{ "bb-base-select__placeholder": !a }]])
|
|
271
271
|
}, A(a || e.placeholder), 3))], 8, re), m("span", {
|
|
272
272
|
id: `${j(z)}__selection`,
|
|
273
|
-
class: "sr-only"
|
|
273
|
+
class: "bb-sr-only"
|
|
274
274
|
}, A(ue(a)), 9, oe)]),
|
|
275
275
|
_: 2
|
|
276
276
|
}, [e.$slots.prefix ? {
|
|
@@ -238,7 +238,7 @@ var le = {
|
|
|
238
238
|
id: e.id,
|
|
239
239
|
ref_key: "hiddenInput",
|
|
240
240
|
ref: j,
|
|
241
|
-
class: "sr-only",
|
|
241
|
+
class: "bb-sr-only",
|
|
242
242
|
disabled: e.disabled,
|
|
243
243
|
name: e.name,
|
|
244
244
|
readonly: !0,
|
|
@@ -328,10 +328,10 @@ var le = {
|
|
|
328
328
|
}),
|
|
329
329
|
S.range && S.id ? (_(), f(l, { key: 0 }, [p("span", {
|
|
330
330
|
id: `${S.id}__thumb_label_lower`,
|
|
331
|
-
class: "sr-only"
|
|
331
|
+
class: "bb-sr-only"
|
|
332
332
|
}, b(x(T)("slider.minimumThumb").value), 9, pe), p("span", {
|
|
333
333
|
id: `${S.id}__thumb_label_higher`,
|
|
334
|
-
class: "sr-only"
|
|
334
|
+
class: "bb-sr-only"
|
|
335
335
|
}, b(x(T)("slider.maximumThumb").value), 9, me)], 64)) : d("", !0)
|
|
336
336
|
], 16));
|
|
337
337
|
}
|
|
@@ -433,7 +433,7 @@ var _e = ["data-value"], ve = [
|
|
|
433
433
|
}, v(Me(P.value[n], P.value[n + 1])), 11, ye)) : u("", !0)], 64))), 128))], 6),
|
|
434
434
|
f("span", {
|
|
435
435
|
id: A,
|
|
436
|
-
class: "bb-base-time-picker-input__accessible-description sr-only"
|
|
436
|
+
class: "bb-base-time-picker-input__accessible-description bb-sr-only"
|
|
437
437
|
}, v(Xe.value), 1),
|
|
438
438
|
p(y(at), null, {
|
|
439
439
|
default: x(() => [f("div", {
|
|
@@ -6,13 +6,13 @@ import { slotKey as i } from "../../utilities/functions/slotKey.js";
|
|
|
6
6
|
import a from "../../assets/svgs/chevron_right.svg_raw.js";
|
|
7
7
|
import o from "../BbDropdown/BbDropdown.vue.js";
|
|
8
8
|
import { estimateBreadcrumbItemWidth as s, estimateEllipsisWidth as c } from "./estimateBreadcrumbItemWidth.js";
|
|
9
|
-
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as te, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, normalizeProps as y, normalizeStyle as ne, onBeforeUnmount as b, openBlock as x, ref as S, renderList as C, renderSlot as w, unref as T, useSlots as re, watch as
|
|
10
|
-
import { useResizeObserver as
|
|
9
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as te, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeProps as v, normalizeProps as y, normalizeStyle as ne, onBeforeUnmount as b, openBlock as x, ref as S, renderList as C, renderSlot as w, unref as T, useSlots as re, watch as E, withCtx as D } from "vue";
|
|
10
|
+
import { useResizeObserver as O } from "@vueuse/core";
|
|
11
11
|
//#region src/components/BbBreadcrumbs/BbBreadcrumbs.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var ie = ["aria-label"], ae = { class: "bb-breadcrumbs__container" }, oe = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "bb-breadcrumbs__edge bb-breadcrumbs__edge--prepend"
|
|
15
|
-
},
|
|
15
|
+
}, se = { class: "bb-breadcrumbs__list" }, ce = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "bb-breadcrumbs__item"
|
|
18
18
|
}, le = { class: "bb-breadcrumbs__breadcrumb-container" }, ue = ["aria-label", "disabled"], de = {
|
|
@@ -26,10 +26,10 @@ var oe = ["aria-label"], se = { class: "bb-breadcrumbs__container" }, ce = {
|
|
|
26
26
|
key: 0,
|
|
27
27
|
"aria-hidden": "true",
|
|
28
28
|
class: "bb-breadcrumbs__divider"
|
|
29
|
-
},
|
|
29
|
+
}, he = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "bb-breadcrumbs__edge bb-breadcrumbs__edge--append"
|
|
32
|
-
},
|
|
32
|
+
}, k = 20, ge = 1, A = 8.5, _e = .5, ve = 8, ye = 200, j = /*@__PURE__*/ g({
|
|
33
33
|
__name: "BbBreadcrumbs",
|
|
34
34
|
props: {
|
|
35
35
|
disabled: { type: Boolean },
|
|
@@ -41,122 +41,122 @@ var oe = ["aria-label"], se = { class: "bb-breadcrumbs__container" }, ce = {
|
|
|
41
41
|
ellipsisWidth: {}
|
|
42
42
|
},
|
|
43
43
|
setup(g) {
|
|
44
|
-
let
|
|
44
|
+
let j = g, { t: M } = n();
|
|
45
45
|
e();
|
|
46
|
-
let
|
|
46
|
+
let N = re(), P = /* @__PURE__ */ new Set([
|
|
47
47
|
"prepend",
|
|
48
48
|
"append",
|
|
49
49
|
"ellipsis",
|
|
50
50
|
"divider",
|
|
51
51
|
"activator"
|
|
52
|
-
]),
|
|
52
|
+
]), F = (e) => i(e.key), be = (e) => {
|
|
53
53
|
let { "prepend:icon": t, "append:icon": n, ...r } = e;
|
|
54
54
|
return r;
|
|
55
|
-
},
|
|
56
|
-
let n = `${
|
|
57
|
-
return
|
|
55
|
+
}, I = (e, t) => {
|
|
56
|
+
let n = `${F(e)}:${t}`;
|
|
57
|
+
return N[n] ? {
|
|
58
58
|
name: n,
|
|
59
59
|
exists: !0
|
|
60
|
-
} :
|
|
60
|
+
} : N[`item:${t}`] ? {
|
|
61
61
|
name: `item:${t}`,
|
|
62
62
|
exists: !0
|
|
63
63
|
} : {
|
|
64
64
|
name: n,
|
|
65
65
|
exists: !1
|
|
66
66
|
};
|
|
67
|
-
}, xe = u(() => Object.keys(
|
|
67
|
+
}, xe = u(() => Object.keys(N).filter((e) => !P.has(e))), L = S(null), R = S(0), z = u(() => j.gapWidth), B = u(() => Math.max(0, j.offsetWidth)), Se = u(() => j.estimationBias), V = u(() => j.ellipsisWidth ?? c(A)), Ce = u(() => M("breadcrumbs.label").value), we = u(() => M("breadcrumbs.openHiddenLabelCount", R.value).value), H = (e) => s(e.text ?? String(e.key), {
|
|
68
68
|
estimationBias: Se.value,
|
|
69
|
-
fontWidth:
|
|
69
|
+
fontWidth: A
|
|
70
70
|
}), Te = u(() => {
|
|
71
|
-
let e =
|
|
71
|
+
let e = j.items.length;
|
|
72
72
|
if (e === 0) return 0;
|
|
73
|
-
let t =
|
|
74
|
-
return
|
|
73
|
+
let t = j.dividerWidth, n = z.value;
|
|
74
|
+
return j.items.map(H).reduce((e, t) => e + t, 0) + (e > 1 ? (e - 1) * (t + 2 * n) : 0) + B.value + k + 12;
|
|
75
75
|
}), Ee = u(() => ({
|
|
76
76
|
"--flex-basis": `${Math.ceil(Te.value)}px`,
|
|
77
|
-
"--flex-grow":
|
|
78
|
-
"--gap": `${
|
|
77
|
+
"--flex-grow": R.value > 0 ? "1" : "0",
|
|
78
|
+
"--gap": `${z.value}px`
|
|
79
79
|
})), De = (e) => {
|
|
80
|
-
let t =
|
|
80
|
+
let t = j.items.length;
|
|
81
81
|
if (t === 0) {
|
|
82
|
-
|
|
82
|
+
R.value = 0;
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
let n = Math.max(0, e - ge -
|
|
85
|
+
let n = Math.max(0, e - ge - B.value - k), r = j.dividerWidth, i = V.value, a = z.value, o = j.items.map(H), s = Array.from({ length: t + 1 }, () => 0);
|
|
86
86
|
for (let e = t - 1; e >= 0; e--) s[e] = s[e + 1] + o[e];
|
|
87
|
-
let c = (e) => n - e <=
|
|
87
|
+
let c = (e) => n - e <= k / 2, l = s[0] + (t > 1 ? (t - 1) * (r + 2 * a) : 0);
|
|
88
88
|
if (l <= n) {
|
|
89
89
|
if (t > 1 && c(l)) {
|
|
90
|
-
|
|
90
|
+
R.value = 1;
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
R.value = 0;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
for (let e = t - 1; e >= 0; e--) {
|
|
97
97
|
let o = s[t - e], l = i + e * (r + 2 * a) + o;
|
|
98
98
|
if (l <= n) {
|
|
99
99
|
if (e > 0 && c(l)) {
|
|
100
|
-
|
|
100
|
+
R.value = t - (e - 1);
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
R.value = t - e;
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
if (
|
|
114
|
-
let e =
|
|
115
|
-
if (
|
|
116
|
-
|
|
107
|
+
R.value = t;
|
|
108
|
+
}, U = u(() => L.value), Oe = u(() => j.items.map((e) => `${String(e.key)}::${e.text ?? ""}`).join("|")), W = null, G = null, K = null, q = null, J = 0, Y = null, X = (e, t) => Math.abs(e - t) <= _e, Z = () => {
|
|
109
|
+
Y != null && clearTimeout(Y), Y = setTimeout(() => {
|
|
110
|
+
Y = null, J = 0;
|
|
111
|
+
}, ye);
|
|
112
|
+
}, Q = () => {
|
|
113
|
+
if (G = null, W == null) return;
|
|
114
|
+
let e = W;
|
|
115
|
+
if (W = null, K != null && X(e, K)) {
|
|
116
|
+
Z();
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
if (
|
|
120
|
-
|
|
119
|
+
if (J = q != null && K != null && X(e, q) && !X(e, K) ? J + 1 : 0, J >= ve) {
|
|
120
|
+
q = K, K = e, Z();
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
q = K, K = e, De(e), Z();
|
|
124
124
|
}, $ = (e) => {
|
|
125
|
-
|
|
125
|
+
W = e, G ??= requestAnimationFrame(Q);
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
O(U, ([e]) => {
|
|
128
128
|
$(e.contentRect.width);
|
|
129
|
-
}),
|
|
130
|
-
|
|
129
|
+
}), E([
|
|
130
|
+
U,
|
|
131
131
|
Oe,
|
|
132
|
-
() =>
|
|
133
|
-
() =>
|
|
134
|
-
() =>
|
|
135
|
-
() =>
|
|
136
|
-
() =>
|
|
132
|
+
() => j.dividerWidth,
|
|
133
|
+
() => j.gapWidth,
|
|
134
|
+
() => j.offsetWidth,
|
|
135
|
+
() => j.estimationBias,
|
|
136
|
+
() => j.ellipsisWidth
|
|
137
137
|
], ([e]) => {
|
|
138
138
|
e && $(e.clientWidth);
|
|
139
139
|
}, { immediate: !0 }), b(() => {
|
|
140
|
-
|
|
140
|
+
G != null && cancelAnimationFrame(G), Y != null && clearTimeout(Y);
|
|
141
141
|
});
|
|
142
|
-
let
|
|
142
|
+
let ke = u(() => j.items.slice(0, R.value).map((e) => ({
|
|
143
143
|
...e,
|
|
144
144
|
text: e.text ?? e.key
|
|
145
145
|
})));
|
|
146
146
|
return (e, n) => (x(), p("nav", {
|
|
147
147
|
ref_key: "navRef",
|
|
148
|
-
ref:
|
|
148
|
+
ref: L,
|
|
149
149
|
"aria-label": Ce.value,
|
|
150
150
|
class: "bb-breadcrumbs",
|
|
151
151
|
style: ne(Ee.value)
|
|
152
|
-
}, [m("div",
|
|
153
|
-
e.$slots.prepend ? (x(), p("div",
|
|
154
|
-
m("ol",
|
|
155
|
-
items:
|
|
152
|
+
}, [m("div", ae, [
|
|
153
|
+
e.$slots.prepend ? (x(), p("div", oe, [w(e.$slots, "prepend", { disabled: e.disabled })])) : f("", !0),
|
|
154
|
+
m("ol", se, [R.value > 0 ? (x(), p("li", ce, [h(o, {
|
|
155
|
+
items: ke.value,
|
|
156
156
|
padding: 0,
|
|
157
157
|
placement: "bottom-start"
|
|
158
158
|
}, ee({
|
|
159
|
-
activator:
|
|
159
|
+
activator: D(({ props: t }) => [m("span", le, [m("button", v(t, {
|
|
160
160
|
"aria-label": we.value,
|
|
161
161
|
class: "bb-breadcrumbs__ellipsis",
|
|
162
162
|
disabled: e.disabled,
|
|
@@ -164,24 +164,24 @@ var oe = ["aria-label"], se = { class: "bb-breadcrumbs__container" }, ce = {
|
|
|
164
164
|
}), [w(e.$slots, "ellipsis", y(_({
|
|
165
165
|
props: t,
|
|
166
166
|
disabled: e.disabled,
|
|
167
|
-
overflowCount:
|
|
168
|
-
ellipsisWidth:
|
|
167
|
+
overflowCount: R.value,
|
|
168
|
+
ellipsisWidth: V.value
|
|
169
169
|
})), () => [n[0] ||= te(" … ")])], 16, ue)])]),
|
|
170
170
|
_: 2
|
|
171
171
|
}, [C(xe.value, (t) => ({
|
|
172
172
|
name: t,
|
|
173
|
-
fn:
|
|
174
|
-
}))]), 1032, ["items"]),
|
|
173
|
+
fn: D((n) => [w(e.$slots, t, y(_(n)))])
|
|
174
|
+
}))]), 1032, ["items"]), R.value < e.items.length ? (x(), p("span", de, [w(e.$slots, "divider", {}, () => [h(r, {
|
|
175
175
|
icon: T(a),
|
|
176
176
|
size: "14"
|
|
177
|
-
}, null, 8, ["icon"])])])) : f("", !0)])) : f("", !0), (x(!0), p(l, null, C(e.items, (n, i) => (x(), p(l, { key: n.key }, [i >=
|
|
178
|
-
w(e.$slots,
|
|
177
|
+
}, null, 8, ["icon"])])])) : f("", !0)])) : f("", !0), (x(!0), p(l, null, C(e.items, (n, i) => (x(), p(l, { key: n.key }, [i >= R.value ? (x(), p("li", fe, [m("span", pe, [
|
|
178
|
+
w(e.$slots, I(n, "prepend").name, {
|
|
179
179
|
disabled: !!(n.disabled || e.disabled),
|
|
180
180
|
index: i,
|
|
181
181
|
item: n,
|
|
182
182
|
text: n.text
|
|
183
183
|
}),
|
|
184
|
-
!
|
|
184
|
+
!I(n, "prepend").exists && n["prepend:icon"] ? (x(), d(r, {
|
|
185
185
|
key: 0,
|
|
186
186
|
class: "bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--prepend",
|
|
187
187
|
icon: n["prepend:icon"],
|
|
@@ -192,7 +192,7 @@ var oe = ["aria-label"], se = { class: "bb-breadcrumbs__container" }, ce = {
|
|
|
192
192
|
class: "bb-breadcrumbs__breadcrumb",
|
|
193
193
|
disabled: n.disabled || e.disabled
|
|
194
194
|
}), {
|
|
195
|
-
default:
|
|
195
|
+
default: D(() => [w(e.$slots, F(n), {
|
|
196
196
|
disabled: !!(n.disabled || e.disabled),
|
|
197
197
|
index: i,
|
|
198
198
|
item: n,
|
|
@@ -200,13 +200,13 @@ var oe = ["aria-label"], se = { class: "bb-breadcrumbs__container" }, ce = {
|
|
|
200
200
|
})]),
|
|
201
201
|
_: 2
|
|
202
202
|
}, 1040, ["aria-current", "disabled"]),
|
|
203
|
-
w(e.$slots,
|
|
203
|
+
w(e.$slots, I(n, "append").name, {
|
|
204
204
|
disabled: !!(n.disabled || e.disabled),
|
|
205
205
|
index: i,
|
|
206
206
|
item: n,
|
|
207
207
|
text: n.text
|
|
208
208
|
}),
|
|
209
|
-
!
|
|
209
|
+
!I(n, "append").exists && n["append:icon"] ? (x(), d(r, {
|
|
210
210
|
key: 1,
|
|
211
211
|
class: "bb-breadcrumbs__item-icon bb-breadcrumbs__item-icon--append",
|
|
212
212
|
icon: n["append:icon"],
|
|
@@ -216,9 +216,9 @@ var oe = ["aria-label"], se = { class: "bb-breadcrumbs__container" }, ce = {
|
|
|
216
216
|
icon: T(a),
|
|
217
217
|
size: "14"
|
|
218
218
|
}, null, 8, ["icon"])])])) : f("", !0)])) : f("", !0)], 64))), 128))]),
|
|
219
|
-
e.$slots.append ? (x(), p("div",
|
|
220
|
-
])], 12,
|
|
219
|
+
e.$slots.append ? (x(), p("div", he, [w(e.$slots, "append", { disabled: e.disabled })])) : f("", !0)
|
|
220
|
+
])], 12, ie));
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
//#endregion
|
|
224
|
-
export {
|
|
224
|
+
export { j as default };
|
|
@@ -14,7 +14,7 @@ import { Transition as f, computed as p, createBlock as m, createCommentVNode as
|
|
|
14
14
|
//#region src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
|
|
15
15
|
var M = {
|
|
16
16
|
key: 3,
|
|
17
|
-
class: "bb-button__loading-label sr-only"
|
|
17
|
+
class: "bb-button__loading-label bb-sr-only"
|
|
18
18
|
}, N = /*@__PURE__*/ y({
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
__name: "BbButton",
|
|
@@ -180,7 +180,7 @@ var M = {
|
|
|
180
180
|
class: "bb-button__prepend-icon",
|
|
181
181
|
icon: P["prepend:icon"]
|
|
182
182
|
}, null, 8, ["icon"])) : h("", !0),
|
|
183
|
-
_("span", { class: S(["bb-button__content", { "sr-only": !!e.icon }]) }, [T(e.$slots, "default", {}, () => [v(E(e.text), 1)])], 2),
|
|
183
|
+
_("span", { class: S(["bb-button__content", { "bb-sr-only": !!e.icon }]) }, [T(e.$slots, "default", {}, () => [v(E(e.text), 1)])], 2),
|
|
184
184
|
G.value ? (C(), g("span", M, E(D(z)("common.loadingText")), 1)) : h("", !0),
|
|
185
185
|
!e.icon && P["append:icon"] ? (C(), m(s, {
|
|
186
186
|
key: 4,
|