bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
153 lines (152 loc) • 4.69 kB
JavaScript
import { t as useDefaults } from "./useDefaults-BKgBaqOV.mjs";
import { t as useColorVariantClasses } from "./useColorVariantClasses-B6Me_Kx6.mjs";
import { computed, createBlock, createTextVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
//#endregion
//#region src/components/BForm/BFormInvalidFeedback.vue
var BFormInvalidFeedback_default = /* @__PURE__ */ defineComponent({
__name: "BFormInvalidFeedback",
props: {
ariaLive: { default: void 0 },
forceShow: {
type: Boolean,
default: false
},
id: { default: void 0 },
role: { default: void 0 },
state: {
type: [Boolean, null],
default: null
},
tag: { default: "div" },
text: { default: void 0 },
tooltip: {
type: Boolean,
default: false
}
},
setup(__props) {
const props = useDefaults(__props, "BFormInvalidFeedback");
const computedShow = computed(() => props.forceShow === true || props.state === false);
const computedClasses = computed(() => ({
"d-block": computedShow.value,
"invalid-feedback": !props.tooltip,
"invalid-tooltip": props.tooltip
}));
return (_ctx, _cache) => {
return openBlock(), createBlock(resolveDynamicComponent(unref(props).tag), {
id: unref(props).id,
role: unref(props).role,
"aria-live": unref(props).ariaLive,
"aria-atomic": unref(props).ariaLive ? true : void 0,
class: normalizeClass(computedClasses.value)
}, {
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(props).text), 1)])]),
_: 3
}, 8, [
"id",
"role",
"aria-live",
"aria-atomic",
"class"
]);
};
}
});
//#endregion
//#region src/components/BForm/BFormRow.vue
var BFormRow_default = /* @__PURE__ */ defineComponent({
__name: "BFormRow",
props: { tag: { default: "div" } },
setup(__props) {
const props = useDefaults(__props, "BFormRow");
return (_ctx, _cache) => {
return openBlock(), createBlock(resolveDynamicComponent(unref(props).tag), { class: "row d-flex flex-wrap" }, {
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
_: 3
});
};
}
});
//#endregion
//#region src/components/BForm/BFormText.vue
var BFormText_default = /* @__PURE__ */ defineComponent({
__name: "BFormText",
props: {
id: { default: void 0 },
inline: {
type: Boolean,
default: false
},
tag: { default: "small" },
text: { default: void 0 },
textVariant: { default: "body-secondary" }
},
setup(__props) {
const props = useDefaults(__props, "BFormText");
const colorClasses = useColorVariantClasses(props);
const computedClasses = computed(() => [colorClasses.value, { "form-text": !props.inline }]);
return (_ctx, _cache) => {
return openBlock(), createBlock(resolveDynamicComponent(unref(props).tag), {
id: unref(props).id,
class: normalizeClass(computedClasses.value)
}, {
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(props).text), 1)])]),
_: 3
}, 8, ["id", "class"]);
};
}
});
//#endregion
//#region src/components/BForm/BFormValidFeedback.vue
var BFormValidFeedback_default = /* @__PURE__ */ defineComponent({
__name: "BFormValidFeedback",
props: {
ariaLive: { default: void 0 },
forceShow: {
type: Boolean,
default: false
},
id: { default: void 0 },
role: { default: void 0 },
state: {
type: [Boolean, null],
default: null
},
tag: { default: "div" },
text: { default: void 0 },
tooltip: {
type: Boolean,
default: false
}
},
setup(__props) {
const props = useDefaults(__props, "BFormInvalidFeedback");
const computedShow = computed(() => props.forceShow === true || props.state === true);
const computedClasses = computed(() => ({
"d-block": computedShow.value,
"valid-feedback": !props.tooltip,
"valid-tooltip": props.tooltip
}));
return (_ctx, _cache) => {
return openBlock(), createBlock(resolveDynamicComponent(unref(props).tag), {
id: unref(props).id,
role: unref(props).role,
"aria-live": unref(props).ariaLive,
"aria-atomic": unref(props).ariaLive ? true : void 0,
class: normalizeClass(computedClasses.value)
}, {
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(props).text), 1)])]),
_: 3
}, 8, [
"id",
"role",
"aria-live",
"aria-atomic",
"class"
]);
};
}
});
//#endregion
export { BFormInvalidFeedback_default as i, BFormText_default as n, BFormRow_default as r, BFormValidFeedback_default as t };
//# sourceMappingURL=BFormValidFeedback-BNQNdH26.mjs.map