bootstrap-vue-next 1.2.1 → 1.2.2
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/dist/{BListGroup-CQedMbI8.js → BListGroup-wJMMfLDf.js} +8 -5
- package/dist/BListGroup-wJMMfLDf.js.map +1 -0
- package/dist/bootstrap-vue-next.mjs +1 -1
- package/dist/src/components/BListGroup/index.mjs +1 -1
- package/dist/src/components/index.mjs +1 -1
- package/dist/types/ComponentSlots.d.mts +0 -9
- package/dist/types/ComponentSlots.d.ts +0 -9
- package/package.json +1 -1
- package/dist/BListGroup-CQedMbI8.js.map +0 -1
|
@@ -104,12 +104,15 @@ var BListGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
104
104
|
const { computedLink, computedLinkProps } = useBLinkHelper(props);
|
|
105
105
|
const isLink = computed(() => !props.button && computedLink.value);
|
|
106
106
|
const tagComputed = computed(() => parentData?.numbered.value ? "li" : props.button ? "button" : !isLink.value ? props.tag : BLink_default);
|
|
107
|
-
const
|
|
107
|
+
const actionableTags = /* @__PURE__ */ new Set([
|
|
108
108
|
"a",
|
|
109
|
-
"router-link",
|
|
110
109
|
"button",
|
|
111
|
-
"
|
|
112
|
-
|
|
110
|
+
"router-link",
|
|
111
|
+
"RouterLink",
|
|
112
|
+
"b-link",
|
|
113
|
+
"BLink"
|
|
114
|
+
]);
|
|
115
|
+
const isAction = computed(() => props.action || isLink.value || props.button || actionableTags.has(props.tag));
|
|
113
116
|
const computedClasses = computed(() => ({
|
|
114
117
|
[`list-group-item-${props.variant}`]: props.variant !== null && props.variant !== void 0,
|
|
115
118
|
"list-group-item-action": isAction.value,
|
|
@@ -152,4 +155,4 @@ var BListGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
152
155
|
//#endregion
|
|
153
156
|
export { BListGroup_default as n, BListGroupItem_default as t };
|
|
154
157
|
|
|
155
|
-
//# sourceMappingURL=BListGroup-
|
|
158
|
+
//# sourceMappingURL=BListGroup-wJMMfLDf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BListGroup-wJMMfLDf.js","names":[],"sources":["../src/components/BListGroup/BListGroup.vue","../src/components/BListGroup/BListGroup.vue","../src/components/BListGroup/BListGroupItem.vue","../src/components/BListGroup/BListGroupItem.vue"],"sourcesContent":["<template>\n <component :is=\"computedTag\" class=\"list-group\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef} from 'vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BListGroupProps, BListGroupSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupProps>(), {\n flush: false,\n horizontal: false,\n numbered: false,\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BListGroup')\ndefineSlots<BListGroupSlots>()\n\nconst computedClasses = computed(() => {\n const horizontal = props.flush ? false : props.horizontal\n return {\n 'list-group-flush': props.flush,\n 'list-group-horizontal': horizontal === true,\n [`list-group-horizontal-${horizontal}`]: typeof horizontal === 'string',\n 'list-group-numbered': props.numbered,\n }\n})\nconst computedTag = computed(() => (props.numbered === true ? 'ol' : props.tag))\n\nprovide(listGroupInjectionKey, {\n numbered: toRef(() => props.numbered),\n})\n</script>\n","<template>\n <component :is=\"computedTag\" class=\"list-group\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef} from 'vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BListGroupProps, BListGroupSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupProps>(), {\n flush: false,\n horizontal: false,\n numbered: false,\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BListGroup')\ndefineSlots<BListGroupSlots>()\n\nconst computedClasses = computed(() => {\n const horizontal = props.flush ? false : props.horizontal\n return {\n 'list-group-flush': props.flush,\n 'list-group-horizontal': horizontal === true,\n [`list-group-horizontal-${horizontal}`]: typeof horizontal === 'string',\n 'list-group-numbered': props.numbered,\n }\n})\nconst computedTag = computed(() => (props.numbered === true ? 'ol' : props.tag))\n\nprovide(listGroupInjectionKey, {\n numbered: toRef(() => props.numbered),\n})\n</script>\n","<template>\n <component\n :is=\"tagComputed\"\n class=\"list-group-item\"\n :class=\"computedClasses\"\n :aria-current=\"props.active ? true : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :target=\"isLink ? props.target : undefined\"\n :href=\"!props.button ? props.href : undefined\"\n :to=\"!props.button ? props.to : undefined\"\n v-bind=\"{...(isLink ? computedLinkProps : {}), ...computedAttrs}\"\n >\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BLink from '../BLink/BLink.vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useBLinkHelper} from '../../composables/useBLinkHelper'\nimport type {BListGroupItemProps, BListGroupItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupItemProps>(), {\n action: false,\n button: false,\n tag: 'div',\n // Link props\n active: false, // Why is this active: false?\n // All others use defaults\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: undefined,\n href: undefined,\n icon: undefined,\n opacity: undefined,\n opacityHover: undefined,\n stretched: false,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BListGroupItem')\ndefineSlots<BListGroupItemSlots>()\nconst attrs = useAttrs()\n\nconst parentData = inject(listGroupInjectionKey, null)\n\nconst {computedLink, computedLinkProps} = useBLinkHelper(props)\n\nconst isLink = computed(() => !props.button && computedLink.value)\nconst tagComputed = computed(() =>\n parentData?.numbered.value ? 'li' : props.button ? 'button' : !isLink.value ? props.tag : BLink\n)\n\nconst actionableTags = new Set(['a', 'button', 'router-link', 'RouterLink', 'b-link', 'BLink'])\nconst isAction = computed(\n () =>\n props.action ||\n isLink.value ||\n props.button ||\n actionableTags.has(props.tag)\n)\n\nconst computedClasses = computed(() => ({\n [`list-group-item-${props.variant}`]: props.variant !== null && props.variant !== undefined,\n 'list-group-item-action': isAction.value,\n 'active': props.active,\n 'disabled': props.disabled,\n}))\n\nconst computedAttrs = computed(() => {\n const localAttrs = {} as {type?: string; disabled?: boolean}\n if (props.button) {\n if (!attrs || !attrs.type) {\n // Add a type for button is one not provided in passed attributes\n localAttrs.type = 'button'\n }\n if (props.disabled) {\n // Set disabled attribute if button and disabled\n localAttrs.disabled = true\n }\n }\n return localAttrs\n})\n</script>\n","<template>\n <component\n :is=\"tagComputed\"\n class=\"list-group-item\"\n :class=\"computedClasses\"\n :aria-current=\"props.active ? true : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :target=\"isLink ? props.target : undefined\"\n :href=\"!props.button ? props.href : undefined\"\n :to=\"!props.button ? props.to : undefined\"\n v-bind=\"{...(isLink ? computedLinkProps : {}), ...computedAttrs}\"\n >\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BLink from '../BLink/BLink.vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useBLinkHelper} from '../../composables/useBLinkHelper'\nimport type {BListGroupItemProps, BListGroupItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupItemProps>(), {\n action: false,\n button: false,\n tag: 'div',\n // Link props\n active: false, // Why is this active: false?\n // All others use defaults\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: undefined,\n href: undefined,\n icon: undefined,\n opacity: undefined,\n opacityHover: undefined,\n stretched: false,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BListGroupItem')\ndefineSlots<BListGroupItemSlots>()\nconst attrs = useAttrs()\n\nconst parentData = inject(listGroupInjectionKey, null)\n\nconst {computedLink, computedLinkProps} = useBLinkHelper(props)\n\nconst isLink = computed(() => !props.button && computedLink.value)\nconst tagComputed = computed(() =>\n parentData?.numbered.value ? 'li' : props.button ? 'button' : !isLink.value ? props.tag : BLink\n)\n\nconst actionableTags = new Set(['a', 'button', 'router-link', 'RouterLink', 'b-link', 'BLink'])\nconst isAction = computed(\n () =>\n props.action ||\n isLink.value ||\n props.button ||\n actionableTags.has(props.tag)\n)\n\nconst computedClasses = computed(() => ({\n [`list-group-item-${props.variant}`]: props.variant !== null && props.variant !== undefined,\n 'list-group-item-action': isAction.value,\n 'active': props.active,\n 'disabled': props.disabled,\n}))\n\nconst computedAttrs = computed(() => {\n const localAttrs = {} as {type?: string; disabled?: boolean}\n if (props.button) {\n if (!attrs || !attrs.type) {\n // Add a type for button is one not provided in passed attributes\n localAttrs.type = 'button'\n }\n if (props.disabled) {\n // Set disabled attribute if button and disabled\n localAttrs.disabled = true\n }\n }\n return localAttrs\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ,YAAY,SAAQ,YAAY;EAG9C,MAAM,kBAAkB,eAAe;GACrC,MAAM,aAAa,MAAM,QAAQ,QAAQ,MAAM;GAC/C,OAAO;IACL,oBAAoB,MAAM;IAC1B,yBAAyB,eAAe;KACvC,yBAAyB,eAAe,OAAO,eAAe;IAC/D,uBAAuB,MAAM;GAC/B;EACF,CAAC;EACD,MAAM,cAAc,eAAgB,MAAM,aAAa,OAAO,OAAO,MAAM,GAAI;EAE/E,QAAQ,uBAAuB,EAC7B,UAAU,YAAY,MAAM,QAAQ,EACtC,CAAC;;GA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AAM,OAAU,KAAA;IACpC,iBAAe,MAAA,KAAA,CAAK,CAAC,WAAQ,OAAU,KAAA;IACvC,QAAQ,OAAA,QAAS,MAAA,KAAA,CAAK,CAAC,SAAS,KAAA;IAChC,MAAI,CAAG,MAAA,KAAA,CAAK,CAAC,SAAS,MAAA,KAAA,CAAK,CAAC,OAAO,KAAA;IACnC,IAAE,CAAG,MAAA,KAAA,CAAK,CAAC,SAAS,MAAA,KAAA,CAAK,CAAC,KAAK,KAAA;GACnB,GAAA;IAAA,GAAA,OAAA,QAAS,MAAA,iBAAA,IAAiB,CAAA;IAAA,GAAW,cAAA;GAAa,CAAA,GAAA;IAE/D,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -52,7 +52,7 @@ import { t as BFormSpinbutton_default } from "./BFormSpinbutton-fkVMbQC3.js";
|
|
|
52
52
|
import { t as BFormTags_default } from "./BFormTags-CUcyRTCK.js";
|
|
53
53
|
import { t as BFormTextarea_default } from "./BFormTextarea-CBBlEcrV.js";
|
|
54
54
|
import { t as BInputGroupText_default } from "./BInputGroup-Bjh7zXyI.js";
|
|
55
|
-
import { n as BListGroup_default, t as BListGroupItem_default } from "./BListGroup-
|
|
55
|
+
import { n as BListGroup_default, t as BListGroupItem_default } from "./BListGroup-wJMMfLDf.js";
|
|
56
56
|
import { useScrollLock } from "./src/composables/useScrollLock/index.mjs";
|
|
57
57
|
import { a as BNav_default, i as BNavForm_default, n as BNavItemDropdown_default, r as BNavItem_default, t as BNavText_default } from "./BNav-CjXS9tQ5.js";
|
|
58
58
|
import { i as BNavbar_default, n as BNavbarNav_default, r as BNavbarBrand_default, t as BNavbarToggle_default } from "./BNavbar-DRqkdxTk.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BListGroup_default, t as BListGroupItem_default } from "../../../BListGroup-
|
|
1
|
+
import { n as BListGroup_default, t as BListGroupItem_default } from "../../../BListGroup-wJMMfLDf.js";
|
|
2
2
|
export { BListGroup_default as BListGroup, BListGroupItem_default as BListGroupItem };
|
|
@@ -46,7 +46,7 @@ import { t as BFormSpinbutton_default } from "../../BFormSpinbutton-fkVMbQC3.js"
|
|
|
46
46
|
import { t as BFormTags_default } from "../../BFormTags-CUcyRTCK.js";
|
|
47
47
|
import { t as BFormTextarea_default } from "../../BFormTextarea-CBBlEcrV.js";
|
|
48
48
|
import { t as BInputGroupText_default } from "../../BInputGroup-Bjh7zXyI.js";
|
|
49
|
-
import { n as BListGroup_default, t as BListGroupItem_default } from "../../BListGroup-
|
|
49
|
+
import { n as BListGroup_default, t as BListGroupItem_default } from "../../BListGroup-wJMMfLDf.js";
|
|
50
50
|
import { a as BNav_default, i as BNavForm_default, n as BNavItemDropdown_default, r as BNavItem_default, t as BNavText_default } from "../../BNav-CjXS9tQ5.js";
|
|
51
51
|
import { i as BNavbar_default, n as BNavbarNav_default, r as BNavbarBrand_default, t as BNavbarToggle_default } from "../../BNavbar-DRqkdxTk.js";
|
|
52
52
|
import { t as BOffcanvas_default } from "../../BOffcanvas-BndaBJoP.js";
|
|
@@ -464,12 +464,6 @@ type EmptySlotScope<Item> = {
|
|
|
464
464
|
fields: TableField<Item>[];
|
|
465
465
|
items: readonly Item[];
|
|
466
466
|
};
|
|
467
|
-
type SortSlotScope<Item> = {
|
|
468
|
-
label: string | undefined;
|
|
469
|
-
column: LiteralUnion<keyof Item>;
|
|
470
|
-
field: TableField<Item>;
|
|
471
|
-
isFoot: false;
|
|
472
|
-
};
|
|
473
467
|
export interface BTableSlots<Item> extends Omit<BTableLiteSlots<Item>, 'thead-top' | 'row-expansion' | `head(${string})` | `foot(${string})` | `cell(${string})`> {
|
|
474
468
|
'thead-top'?: (props: {
|
|
475
469
|
columns: number;
|
|
@@ -515,9 +509,6 @@ export interface BTableSlots<Item> extends Omit<BTableLiteSlots<Item>, 'thead-to
|
|
|
515
509
|
selectAllRows: () => void;
|
|
516
510
|
clearSelected: () => void;
|
|
517
511
|
}) => any;
|
|
518
|
-
[key: `sortAsc(${string})`]: (props: SortSlotScope<Item>) => any;
|
|
519
|
-
[key: `sortDesc(${string})`]: (props: SortSlotScope<Item>) => any;
|
|
520
|
-
[key: `sortDefault(${string})`]: (props: SortSlotScope<Item>) => any;
|
|
521
512
|
'table-busy'?: (props: Record<string, never>) => any;
|
|
522
513
|
'empty-filtered'?: (props: EmptySlotScope<Item>) => any;
|
|
523
514
|
'empty'?: (props: EmptySlotScope<Item>) => any;
|
|
@@ -464,12 +464,6 @@ type EmptySlotScope<Item> = {
|
|
|
464
464
|
fields: TableField<Item>[];
|
|
465
465
|
items: readonly Item[];
|
|
466
466
|
};
|
|
467
|
-
type SortSlotScope<Item> = {
|
|
468
|
-
label: string | undefined;
|
|
469
|
-
column: LiteralUnion<keyof Item>;
|
|
470
|
-
field: TableField<Item>;
|
|
471
|
-
isFoot: false;
|
|
472
|
-
};
|
|
473
467
|
export interface BTableSlots<Item> extends Omit<BTableLiteSlots<Item>, 'thead-top' | 'row-expansion' | `head(${string})` | `foot(${string})` | `cell(${string})`> {
|
|
474
468
|
'thead-top'?: (props: {
|
|
475
469
|
columns: number;
|
|
@@ -515,9 +509,6 @@ export interface BTableSlots<Item> extends Omit<BTableLiteSlots<Item>, 'thead-to
|
|
|
515
509
|
selectAllRows: () => void;
|
|
516
510
|
clearSelected: () => void;
|
|
517
511
|
}) => any;
|
|
518
|
-
[key: `sortAsc(${string})`]: (props: SortSlotScope<Item>) => any;
|
|
519
|
-
[key: `sortDesc(${string})`]: (props: SortSlotScope<Item>) => any;
|
|
520
|
-
[key: `sortDefault(${string})`]: (props: SortSlotScope<Item>) => any;
|
|
521
512
|
'table-busy'?: (props: Record<string, never>) => any;
|
|
522
513
|
'empty-filtered'?: (props: EmptySlotScope<Item>) => any;
|
|
523
514
|
'empty'?: (props: EmptySlotScope<Item>) => any;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "bootstrap-vue-next",
|
|
3
3
|
"displayName": "BootstrapVueNext",
|
|
4
4
|
"description": "Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development",
|
|
5
|
-
"version": "1.2.
|
|
5
|
+
"version": "1.2.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/bootstrap-vue-next.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BListGroup-CQedMbI8.js","names":[],"sources":["../src/components/BListGroup/BListGroup.vue","../src/components/BListGroup/BListGroup.vue","../src/components/BListGroup/BListGroupItem.vue","../src/components/BListGroup/BListGroupItem.vue"],"sourcesContent":["<template>\n <component :is=\"computedTag\" class=\"list-group\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef} from 'vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BListGroupProps, BListGroupSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupProps>(), {\n flush: false,\n horizontal: false,\n numbered: false,\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BListGroup')\ndefineSlots<BListGroupSlots>()\n\nconst computedClasses = computed(() => {\n const horizontal = props.flush ? false : props.horizontal\n return {\n 'list-group-flush': props.flush,\n 'list-group-horizontal': horizontal === true,\n [`list-group-horizontal-${horizontal}`]: typeof horizontal === 'string',\n 'list-group-numbered': props.numbered,\n }\n})\nconst computedTag = computed(() => (props.numbered === true ? 'ol' : props.tag))\n\nprovide(listGroupInjectionKey, {\n numbered: toRef(() => props.numbered),\n})\n</script>\n","<template>\n <component :is=\"computedTag\" class=\"list-group\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef} from 'vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BListGroupProps, BListGroupSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupProps>(), {\n flush: false,\n horizontal: false,\n numbered: false,\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BListGroup')\ndefineSlots<BListGroupSlots>()\n\nconst computedClasses = computed(() => {\n const horizontal = props.flush ? false : props.horizontal\n return {\n 'list-group-flush': props.flush,\n 'list-group-horizontal': horizontal === true,\n [`list-group-horizontal-${horizontal}`]: typeof horizontal === 'string',\n 'list-group-numbered': props.numbered,\n }\n})\nconst computedTag = computed(() => (props.numbered === true ? 'ol' : props.tag))\n\nprovide(listGroupInjectionKey, {\n numbered: toRef(() => props.numbered),\n})\n</script>\n","<template>\n <component\n :is=\"tagComputed\"\n class=\"list-group-item\"\n :class=\"computedClasses\"\n :aria-current=\"props.active ? true : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :target=\"isLink ? props.target : undefined\"\n :href=\"!props.button ? props.href : undefined\"\n :to=\"!props.button ? props.to : undefined\"\n v-bind=\"{...(isLink ? computedLinkProps : {}), ...computedAttrs}\"\n >\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BLink from '../BLink/BLink.vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useBLinkHelper} from '../../composables/useBLinkHelper'\nimport type {BListGroupItemProps, BListGroupItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupItemProps>(), {\n action: false,\n button: false,\n tag: 'div',\n // Link props\n active: false, // Why is this active: false?\n // All others use defaults\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: undefined,\n href: undefined,\n icon: undefined,\n opacity: undefined,\n opacityHover: undefined,\n stretched: false,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BListGroupItem')\ndefineSlots<BListGroupItemSlots>()\nconst attrs = useAttrs()\n\nconst parentData = inject(listGroupInjectionKey, null)\n\nconst {computedLink, computedLinkProps} = useBLinkHelper(props)\n\nconst isLink = computed(() => !props.button && computedLink.value)\nconst tagComputed = computed(() =>\n parentData?.numbered.value ? 'li' : props.button ? 'button' : !isLink.value ? props.tag : BLink\n)\n\nconst isAction = computed(\n () =>\n props.action ||\n isLink.value ||\n props.button ||\n ['a', 'router-link', 'button', 'b-link'].includes(props.tag)\n)\n\nconst computedClasses = computed(() => ({\n [`list-group-item-${props.variant}`]: props.variant !== null && props.variant !== undefined,\n 'list-group-item-action': isAction.value,\n 'active': props.active,\n 'disabled': props.disabled,\n}))\n\nconst computedAttrs = computed(() => {\n const localAttrs = {} as {type?: string; disabled?: boolean}\n if (props.button) {\n if (!attrs || !attrs.type) {\n // Add a type for button is one not provided in passed attributes\n localAttrs.type = 'button'\n }\n if (props.disabled) {\n // Set disabled attribute if button and disabled\n localAttrs.disabled = true\n }\n }\n return localAttrs\n})\n</script>\n","<template>\n <component\n :is=\"tagComputed\"\n class=\"list-group-item\"\n :class=\"computedClasses\"\n :aria-current=\"props.active ? true : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :target=\"isLink ? props.target : undefined\"\n :href=\"!props.button ? props.href : undefined\"\n :to=\"!props.button ? props.to : undefined\"\n v-bind=\"{...(isLink ? computedLinkProps : {}), ...computedAttrs}\"\n >\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BLink from '../BLink/BLink.vue'\nimport {listGroupInjectionKey} from '../../utils/keys'\nimport {useBLinkHelper} from '../../composables/useBLinkHelper'\nimport type {BListGroupItemProps, BListGroupItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BListGroupItemProps>(), {\n action: false,\n button: false,\n tag: 'div',\n // Link props\n active: false, // Why is this active: false?\n // All others use defaults\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: undefined,\n href: undefined,\n icon: undefined,\n opacity: undefined,\n opacityHover: undefined,\n stretched: false,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BListGroupItem')\ndefineSlots<BListGroupItemSlots>()\nconst attrs = useAttrs()\n\nconst parentData = inject(listGroupInjectionKey, null)\n\nconst {computedLink, computedLinkProps} = useBLinkHelper(props)\n\nconst isLink = computed(() => !props.button && computedLink.value)\nconst tagComputed = computed(() =>\n parentData?.numbered.value ? 'li' : props.button ? 'button' : !isLink.value ? props.tag : BLink\n)\n\nconst isAction = computed(\n () =>\n props.action ||\n isLink.value ||\n props.button ||\n ['a', 'router-link', 'button', 'b-link'].includes(props.tag)\n)\n\nconst computedClasses = computed(() => ({\n [`list-group-item-${props.variant}`]: props.variant !== null && props.variant !== undefined,\n 'list-group-item-action': isAction.value,\n 'active': props.active,\n 'disabled': props.disabled,\n}))\n\nconst computedAttrs = computed(() => {\n const localAttrs = {} as {type?: string; disabled?: boolean}\n if (props.button) {\n if (!attrs || !attrs.type) {\n // Add a type for button is one not provided in passed attributes\n localAttrs.type = 'button'\n }\n if (props.disabled) {\n // Set disabled attribute if button and disabled\n localAttrs.disabled = true\n }\n }\n return localAttrs\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ,YAAY,SAAQ,YAAY;EAG9C,MAAM,kBAAkB,eAAe;GACrC,MAAM,aAAa,MAAM,QAAQ,QAAQ,MAAM;GAC/C,OAAO;IACL,oBAAoB,MAAM;IAC1B,yBAAyB,eAAe;KACvC,yBAAyB,eAAe,OAAO,eAAe;IAC/D,uBAAuB,MAAM;GAC/B;EACF,CAAC;EACD,MAAM,cAA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