UNPKG

bootstrap-vue-next

Version:

BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.

1 lines 8.07 kB
{"version":3,"file":"keys-CLEaYsGj.mjs","sources":["../src/utils/keys.ts"],"sourcesContent":["import type {ComponentInternalInstance, ComputedRef, InjectionKey, Ref} from 'vue'\nimport type {TabType} from '../types/Tab'\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport type {Numberish} from '../types/CommonTypes'\nimport type {LiteralUnion} from '../types/LiteralUnion'\nimport type {Size} from '../types/Size'\nimport type {RadiusElement} from '../types/RadiusElement'\nimport type {ButtonVariant, ColorVariant, TextColorVariant} from '../types/ColorTypes'\nimport type {CheckboxValue} from '../types/CheckboxTypes'\nimport type {RadioValue} from '../types/RadioTypes'\nimport type {BreadcrumbItemRaw} from '../types/BreadcrumbTypes'\nimport type {\n ModalOrchestratorMapValue,\n ModalOrchestratorShowParam,\n PopoverOrchestratorMapValue,\n PopoverOrchestratorShowParam,\n PrivateOrchestratedPopover,\n PrivateOrchestratedTooltip,\n ToastOrchestratorArrayValue,\n ToastOrchestratorShowParam,\n TooltipOrchestratorMapValue,\n TooltipOrchestratorShowParam,\n} from '../types/ComponentOrchestratorTypes'\nimport type {BvnComponentProps} from '../types/BootstrapVueOptions'\n\n// BCarousel\nexport const carouselInjectionKey: InjectionKey<{\n background: Readonly<Ref<string | undefined>>\n width: Readonly<Ref<string | undefined>>\n height: Readonly<Ref<string | undefined>>\n}> = Symbol('bvn::carousel')\n\n// BTabs\nexport const tabsInjectionKey: InjectionKey<{\n lazy: Readonly<Ref<boolean>>\n card: Readonly<Ref<boolean>>\n noFade: Readonly<Ref<boolean>>\n registerTab: (tab: Readonly<Ref<TabType>>) => void\n unregisterTab: (id: string) => void\n activateTab: (id: string | undefined) => void\n activeTabClass: Readonly<Ref<ClassValue>>\n inactiveTabClass: Readonly<Ref<ClassValue>>\n tabClass: Readonly<Ref<ClassValue>>\n activeId: Readonly<Ref<string | undefined>>\n}> = Symbol('bvn::tabs')\n\n// BProgress\nexport const progressInjectionKey: InjectionKey<{\n animated: Readonly<Ref<boolean | undefined>>\n max: Readonly<Ref<Numberish>>\n showProgress: Readonly<Ref<boolean | undefined>>\n showValue: Readonly<Ref<boolean | undefined>>\n striped: Readonly<Ref<boolean | undefined>>\n}> = Symbol('bvn::progress')\n\n// BListGroup\nexport const listGroupInjectionKey: InjectionKey<{\n numbered: Readonly<Ref<boolean>>\n}> = Symbol('bvn::listGroup')\n\n// BAvatarGroup\nexport const avatarGroupInjectionKey: InjectionKey<{\n overlapScale: Readonly<Ref<number>>\n size: Readonly<Ref<LiteralUnion<Size, Numberish> | undefined>>\n square: Readonly<Ref<boolean>>\n rounded: Readonly<Ref<RadiusElement | boolean>>\n roundedTop: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedBottom: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedStart: Readonly<Ref<RadiusElement | boolean | undefined>>\n roundedEnd: Readonly<Ref<RadiusElement | boolean | undefined>>\n variant: Readonly<Ref<ColorVariant | null>>\n bgVariant: Readonly<Ref<ColorVariant | null>>\n textVariant: Readonly<Ref<TextColorVariant | null>>\n}> = Symbol('bvn::avatarGroup')\n\n// BAccordion\nexport const accordionInjectionKey: InjectionKey<{\n openItem: Readonly<Ref<string | undefined>>\n free: Readonly<Ref<boolean>>\n setOpenItem: (id: string) => void\n}> = Symbol('bvn::accordion')\n\n// BFormCheckboxGroup\nexport const checkboxGroupKey: InjectionKey<{\n modelValue: Ref<readonly CheckboxValue[]>\n switch: Readonly<Ref<boolean>>\n buttonVariant: Readonly<Ref<ButtonVariant | null>>\n form: Readonly<Ref<string | undefined>>\n name: Readonly<Ref<string>>\n state: Readonly<Ref<boolean | undefined | null>>\n plain: Readonly<Ref<boolean>>\n size: Readonly<Ref<Size>>\n inline: Readonly<Ref<boolean>>\n reverse: Readonly<Ref<boolean>>\n required: Readonly<Ref<boolean>>\n buttons: Readonly<Ref<boolean>>\n disabled: Readonly<Ref<boolean>>\n}> = Symbol('bvn::checkboxGroup')\n\nexport const radioGroupKey: InjectionKey<{\n modelValue: Ref<RadioValue>\n buttonVariant: Readonly<Ref<ButtonVariant | null>>\n form: Readonly<Ref<string | undefined>>\n name: Readonly<Ref<string>>\n buttons: Readonly<Ref<boolean>>\n state: Readonly<Ref<boolean | undefined | null>>\n plain: Readonly<Ref<boolean>>\n size: Readonly<Ref<Size>>\n inline: Readonly<Ref<boolean>>\n reverse: Readonly<Ref<boolean>>\n required: Readonly<Ref<boolean>>\n disabled: Readonly<Ref<boolean>>\n}> = Symbol('bvn::radioGroup')\n\n// Collapse\nexport const collapseInjectionKey: InjectionKey<{\n id?: Readonly<Ref<string>>\n readonly hide?: () => void\n readonly show?: () => void\n readonly toggle?: () => void\n visible?: Readonly<Ref<boolean>>\n isNav?: Readonly<Ref<boolean>>\n}> = Symbol('bvn::collapse')\n\nexport const dropdownInjectionKey: InjectionKey<{\n id?: Readonly<Ref<string>>\n readonly hide?: () => void\n readonly show?: () => void\n readonly toggle?: () => void\n visible?: Readonly<Ref<boolean>>\n isNav?: Readonly<Ref<boolean>>\n}> = Symbol('bvn::collapse')\n\nexport const navbarInjectionKey: InjectionKey<{\n tag?: Readonly<Ref<string>>\n autoClose?: Readonly<Ref<boolean>>\n}> = Symbol('bvn::navbar')\n\nexport const rtlPluginKey: InjectionKey<{\n isRtl: Ref<boolean>\n locale: Ref<string | undefined>\n}> = Symbol('bvn::rtlPlugin')\n\nexport const breadcrumbPluginKey: InjectionKey<{\n items: Ref<BreadcrumbItemRaw[]>\n reset: () => void\n}> = Symbol('bvn::breadcrumbPlugin')\n\nexport const modalManagerPluginKey: InjectionKey<{\n stack: ComputedRef<ComponentInternalInstance[]>\n countStack: ComputedRef<number>\n lastStack: ComputedRef<ComponentInternalInstance | undefined>\n pushStack: (modal: Readonly<ComponentInternalInstance>) => void\n removeStack: (modal: Readonly<ComponentInternalInstance>) => void\n registry: Readonly<Ref<Map<number, ComponentInternalInstance>>>\n pushRegistry: (modal: Readonly<ComponentInternalInstance>) => void\n removeRegistry: (modal: Readonly<ComponentInternalInstance>) => void\n}> = Symbol('bvn::modalManagerPlugin')\n\nexport const defaultsKey: InjectionKey<Ref<Partial<BvnComponentProps>>> = Symbol('bvn::defaults')\n\nexport const inputGroupKey: InjectionKey<boolean> = Symbol('bvn::inputGroup')\n\nexport const toastPluginKey: InjectionKey<{\n toasts: Ref<ToastOrchestratorArrayValue[]>\n _setIsAppend: (value: boolean) => void\n show: (obj: ToastOrchestratorShowParam) => symbol\n remove: (self: symbol) => void\n leave: (self: symbol) => void\n}> = Symbol('bvn::toastPlugin')\n\nexport const modalControllerPluginKey: InjectionKey<{\n modals: Ref<Map<symbol, ModalOrchestratorMapValue>>\n show: (obj: ModalOrchestratorShowParam) => Promise<boolean | null>\n confirm: (obj: ModalOrchestratorShowParam) => Promise<boolean | null>\n remove: (self: symbol) => void\n leave: (self: symbol) => void\n}> = Symbol('bvn::modalControllerPlugin')\n\nexport const tooltipPluginKey: InjectionKey<{\n tooltips: Ref<Map<symbol, TooltipOrchestratorMapValue>>\n show: (obj: TooltipOrchestratorShowParam) => symbol\n remove: (self: symbol) => void\n set: (self: symbol, val: Partial<PrivateOrchestratedTooltip>) => void\n}> = Symbol('bvn::toastPlugin')\n\nexport const popoverPluginKey: InjectionKey<{\n popovers: Ref<Map<symbol, PopoverOrchestratorMapValue>>\n show: (obj: PopoverOrchestratorShowParam) => symbol\n remove: (self: symbol) => void\n set: (self: symbol, val: Partial<PrivateOrchestratedPopover>) => void\n}> = Symbol('bvn::toastPlugin')\n"],"names":[],"mappings":"AA0Ba,MAAA,uBAIR,OAAO,eAAe;AAGd,MAAA,mBAWR,OAAO,WAAW;AAGV,MAAA,uBAMR,OAAO,eAAe;AAGd,MAAA,wBAER,OAAO,gBAAgB;AAGf,MAAA,0BAYR,OAAO,kBAAkB;AAGjB,MAAA,wBAIR,OAAO,gBAAgB;AAGf,MAAA,mBAcR,OAAO,oBAAoB;AAEnB,MAAA,gBAaR,OAAO,iBAAiB;AAGhB,MAAA,uBAOR,OAAO,eAAe;AAEd,MAAA,uBAOR,OAAO,eAAe;AAEd,MAAA,qBAGR,OAAO,aAAa;AAEZ,MAAA,eAGR,OAAO,gBAAgB;AAEf,MAAA,sBAGR,OAAO,uBAAuB;AAEtB,MAAA,wBASR,OAAO,yBAAyB;AAExB,MAAA,cAA6D,OAAO,eAAe;AAEnF,MAAA,gBAAuC,OAAO,iBAAiB;AAE/D,MAAA,iBAMR,OAAO,kBAAkB;AAEjB,MAAA,2BAMR,OAAO,4BAA4B;AAE3B,MAAA,mBAKR,OAAO,kBAAkB;AAEjB,MAAA,mBAKR,OAAO,kBAAkB;"}