bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
1 lines • 5.7 kB
Source Map (JSON)
{"version":3,"file":"BCol-C4v-TOX6.mjs","names":[],"sources":["../src/components/BContainer/BCol.vue","../src/components/BContainer/BCol.vue"],"sourcesContent":["<template>\n <component :is=\"props.tag\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport type {BColProps} from '../../types/ComponentProps'\nimport {getClasses} from '../../utils/getClasses'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BColSlots} from '../../types/ComponentSlots'\n\nconst _props = withDefaults(defineProps<BColProps>(), {\n alignSelf: undefined,\n col: false,\n cols: undefined,\n offset: undefined,\n order: undefined,\n tag: 'div',\n lg: false,\n md: false,\n sm: false,\n xl: false,\n xxl: false,\n offsetLg: undefined,\n offsetMd: undefined,\n offsetSm: undefined,\n offsetXl: undefined,\n offsetXxl: undefined,\n orderLg: undefined,\n orderMd: undefined,\n orderSm: undefined,\n orderXl: undefined,\n orderXxl: undefined,\n})\nconst props = useDefaults(_props, 'BCol')\ndefineSlots<BColSlots>()\n\nconst classList = computed(() => [\n ...getClasses(\n {\n sm: props.sm,\n md: props.md,\n lg: props.lg,\n xl: props.xl,\n xxl: props.xxl,\n },\n ['sm', 'md', 'lg', 'xl', 'xxl'],\n 'col'\n ),\n ...getClasses(\n {\n order: props.order,\n orderLg: props.orderLg,\n orderMd: props.orderMd,\n orderSm: props.orderSm,\n orderXl: props.orderXl,\n orderXxl: props.orderXxl,\n },\n ['order', 'orderLg', 'orderMd', 'orderSm', 'orderXl', 'orderXxl'],\n 'order'\n ),\n ...getClasses(\n {\n offset: props.offset,\n offsetLg: props.offsetLg,\n offsetMd: props.offsetMd,\n offsetSm: props.offsetSm,\n offsetXl: props.offsetXl,\n offsetXxl: props.offsetXxl,\n },\n ['offset', 'offsetLg', 'offsetMd', 'offsetSm', 'offsetXl', 'offsetXxl'],\n 'offset'\n ),\n])\n\nconst computedClasses = computed(() => [\n classList.value,\n {\n col: props.col || (!classList.value.some((v) => v.startsWith('col-')) && !props.cols),\n [`col-${props.cols}`]: props.cols !== undefined,\n [`offset-${props.offset}`]: props.offset !== undefined,\n [`order-${props.order}`]: props.order !== undefined,\n [`align-self-${props.alignSelf}`]: props.alignSelf !== undefined,\n },\n])\n</script>\n","<template>\n <component :is=\"props.tag\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport type {BColProps} from '../../types/ComponentProps'\nimport {getClasses} from '../../utils/getClasses'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BColSlots} from '../../types/ComponentSlots'\n\nconst _props = withDefaults(defineProps<BColProps>(), {\n alignSelf: undefined,\n col: false,\n cols: undefined,\n offset: undefined,\n order: undefined,\n tag: 'div',\n lg: false,\n md: false,\n sm: false,\n xl: false,\n xxl: false,\n offsetLg: undefined,\n offsetMd: undefined,\n offsetSm: undefined,\n offsetXl: undefined,\n offsetXxl: undefined,\n orderLg: undefined,\n orderMd: undefined,\n orderSm: undefined,\n orderXl: undefined,\n orderXxl: undefined,\n})\nconst props = useDefaults(_props, 'BCol')\ndefineSlots<BColSlots>()\n\nconst classList = computed(() => [\n ...getClasses(\n {\n sm: props.sm,\n md: props.md,\n lg: props.lg,\n xl: props.xl,\n xxl: props.xxl,\n },\n ['sm', 'md', 'lg', 'xl', 'xxl'],\n 'col'\n ),\n ...getClasses(\n {\n order: props.order,\n orderLg: props.orderLg,\n orderMd: props.orderMd,\n orderSm: props.orderSm,\n orderXl: props.orderXl,\n orderXxl: props.orderXxl,\n },\n ['order', 'orderLg', 'orderMd', 'orderSm', 'orderXl', 'orderXxl'],\n 'order'\n ),\n ...getClasses(\n {\n offset: props.offset,\n offsetLg: props.offsetLg,\n offsetMd: props.offsetMd,\n offsetSm: props.offsetSm,\n offsetXl: props.offsetXl,\n offsetXxl: props.offsetXxl,\n },\n ['offset', 'offsetLg', 'offsetMd', 'offsetSm', 'offsetXl', 'offsetXxl'],\n 'offset'\n ),\n])\n\nconst computedClasses = computed(() => [\n classList.value,\n {\n col: props.col || (!classList.value.some((v) => v.startsWith('col-')) && !props.cols),\n [`col-${props.cols}`]: props.cols !== undefined,\n [`offset-${props.offset}`]: props.offset !== undefined,\n [`order-${props.order}`]: props.order !== undefined,\n [`align-self-${props.alignSelf}`]: props.alignSelf !== undefined,\n },\n])\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,QAAQ,YAvBC,SAuBmB,OAAM;EAGxC,MAAM,YAAY,eAAe;GAC/B,GAAG,WACD;IACE,IAAI,MAAM;IACV,IAAI,MAAM;IACV,IAAI,MAAM;IACV,IAAI,MAAM;IACV,KAAK,MAAM;IACZ,EACD;IAAC;IAAM;IAAM;IAAM;IAAM;IAAM,EAC/B,MACD;GACD,GAAG,WACD;IACE,OAAO,MAAM;IACb,SAAS,MAAM;IACf,SAAS,MAAM;IACf,SAAS,MAAM;IACf,SAAS,MAAM;IACf,UAAU,MAAM;IACjB,EACD;IAAC;IAAS;IAAW;IAAW;IAAW;IAAW;IAAW,EACjE,QACD;GACD,GAAG,WACD;IACE,QAAQ,MAAM;IACd,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,WAAW,MAAM;IAClB,EACD;IAAC;IAAU;IAAY;IAAY;IAAY;IAAY;IAAY,EACvE,SAAA;GAEH,CAAA;EAED,MAAM,kBAAkB,eAAe,CACrC,UAAU,OACV;GACE,KAAK,MAAM,OAAQ,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE,WAAW,OAAO,CAAC,IAAI,CAAC,MAAM;IAC/E,OAAO,MAAM,SAAS,MAAM,SAAS,KAAA;IACrC,UAAU,MAAM,WAAW,MAAM,WAAW,KAAA;IAC5C,SAAS,MAAM,UAAU,MAAM,UAAU,KAAA;IACzC,cAAc,MAAM,cAAc,MAAM,cAAc,KAAA;GACxD,CACF,CAAA;;uBArFC,YAEY,wBAFI,MAAA,MAAK,CAAC,IAAG,EAAA,EAAG,OAAK,eAAE,gBAAA,MAAe,EAAA,EAAA;2BACxC,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}