bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
1 lines • 12.6 kB
Source Map (JSON)
{"version":3,"file":"VisuallyHidden-Bbwok8oL.mjs","names":[],"sources":["../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/shared/createContext.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/shared/renderSlotFragments.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/ConfigProvider/ConfigProvider.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useDirection.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/Primitive/Slot.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/Primitive/Primitive.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/Primitive/usePrimitiveElement.js","../../../node_modules/.pnpm/reka-ui@2.9.2_vue@3.5.31_typescript@5.9.3_/node_modules/reka-ui/dist/VisuallyHidden/VisuallyHidden.js"],"sourcesContent":["import { inject, provide } from \"vue\";\n\n//#region src/shared/createContext.ts\n/**\n* @param providerComponentName - The name(s) of the component(s) providing the context.\n*\n* There are situations where context can come from multiple components. In such cases, you might need to give an array of component names to provide your context, instead of just a single string.\n*\n* @param contextName The description for injection key symbol.\n*/\nfunction createContext(providerComponentName, contextName) {\n\tconst symbolDescription = typeof providerComponentName === \"string\" && !contextName ? `${providerComponentName}Context` : contextName;\n\tconst injectionKey = Symbol(symbolDescription);\n\t/**\n\t* @param fallback The context value to return if the injection fails.\n\t*\n\t* @throws When context injection failed and no fallback is specified.\n\t* This happens when the component injecting the context is not a child of the root component providing the context.\n\t*/\n\tconst injectContext = (fallback) => {\n\t\tconst context = inject(injectionKey, fallback);\n\t\tif (context) return context;\n\t\tif (context === null) return context;\n\t\tthrow new Error(`Injection \\`${injectionKey.toString()}\\` not found. Component must be used within ${Array.isArray(providerComponentName) ? `one of the following components: ${providerComponentName.join(\", \")}` : `\\`${providerComponentName}\\``}`);\n\t};\n\tconst provideContext = (contextValue) => {\n\t\tprovide(injectionKey, contextValue);\n\t\treturn contextValue;\n\t};\n\treturn [injectContext, provideContext];\n}\n\n//#endregion\nexport { createContext };\n//# sourceMappingURL=createContext.js.map","import { Fragment } from \"vue\";\n\n//#region src/shared/renderSlotFragments.ts\nfunction renderSlotFragments(children) {\n\tif (!children) return [];\n\treturn children.flatMap((child) => {\n\t\tif (child.type === Fragment) return renderSlotFragments(child.children);\n\t\treturn [child];\n\t});\n}\n\n//#endregion\nexport { renderSlotFragments };\n//# sourceMappingURL=renderSlotFragments.js.map","import { createContext } from \"../shared/createContext.js\";\nimport { defineComponent, renderSlot, toRefs } from \"vue\";\n\n//#region src/ConfigProvider/ConfigProvider.vue?vue&type=script&setup=true&lang.ts\nconst [injectConfigProviderContext, provideConfigProviderContext] = createContext(\"ConfigProvider\");\nvar ConfigProvider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\tinheritAttrs: false,\n\t__name: \"ConfigProvider\",\n\tprops: {\n\t\tdir: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: \"ltr\"\n\t\t},\n\t\tlocale: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: \"en\"\n\t\t},\n\t\tscrollBody: {\n\t\t\ttype: [Boolean, Object],\n\t\t\trequired: false,\n\t\t\tdefault: true\n\t\t},\n\t\tnonce: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t},\n\t\tuseId: {\n\t\t\ttype: Function,\n\t\t\trequired: false,\n\t\t\tdefault: void 0\n\t\t}\n\t},\n\tsetup(__props) {\n\t\tconst props = __props;\n\t\tconst { dir, locale, scrollBody, nonce } = toRefs(props);\n\t\tprovideConfigProviderContext({\n\t\t\tdir,\n\t\t\tlocale,\n\t\t\tscrollBody,\n\t\t\tnonce,\n\t\t\tuseId: props.useId\n\t\t});\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn renderSlot(_ctx.$slots, \"default\");\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/ConfigProvider/ConfigProvider.vue\nvar ConfigProvider_default = ConfigProvider_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { ConfigProvider_default, injectConfigProviderContext };\n//# sourceMappingURL=ConfigProvider.js.map","import { injectConfigProviderContext } from \"../ConfigProvider/ConfigProvider.js\";\nimport { computed, ref } from \"vue\";\n\n//#region src/shared/useDirection.ts\n/**\n* The `useDirection` function provides a way to access the current direction in your application.\n* @param {Ref<Direction | undefined>} [dir] - An optional ref containing the direction (ltr or rtl).\n* @returns computed value that combines with the resolved direction.\n*/\nfunction useDirection(dir) {\n\tconst context = injectConfigProviderContext({ dir: ref(\"ltr\") });\n\treturn computed(() => dir?.value || context.dir?.value || \"ltr\");\n}\n\n//#endregion\nexport { useDirection };\n//# sourceMappingURL=useDirection.js.map","import { renderSlotFragments } from \"../shared/renderSlotFragments.js\";\nimport { Comment, cloneVNode, defineComponent, mergeProps } from \"vue\";\n\n//#region src/Primitive/Slot.ts\nconst Slot = defineComponent({\n\tname: \"PrimitiveSlot\",\n\tinheritAttrs: false,\n\tsetup(_, { attrs, slots }) {\n\t\treturn () => {\n\t\t\tif (!slots.default) return null;\n\t\t\tconst children = renderSlotFragments(slots.default());\n\t\t\tconst firstNonCommentChildrenIndex = children.findIndex((child) => child.type !== Comment);\n\t\t\tif (firstNonCommentChildrenIndex === -1) return children;\n\t\t\tconst firstNonCommentChildren = children[firstNonCommentChildrenIndex];\n\t\t\tdelete firstNonCommentChildren.props?.ref;\n\t\t\tconst mergedProps = firstNonCommentChildren.props ? mergeProps(attrs, firstNonCommentChildren.props) : attrs;\n\t\t\tconst cloned = cloneVNode({\n\t\t\t\t...firstNonCommentChildren,\n\t\t\t\tprops: {}\n\t\t\t}, mergedProps);\n\t\t\tif (children.length === 1) return cloned;\n\t\t\tchildren[firstNonCommentChildrenIndex] = cloned;\n\t\t\treturn children;\n\t\t};\n\t}\n});\n\n//#endregion\nexport { Slot };\n//# sourceMappingURL=Slot.js.map","import { Slot } from \"./Slot.js\";\nimport { defineComponent, h } from \"vue\";\n\n//#region src/Primitive/Primitive.ts\nconst SELF_CLOSING_TAGS = [\n\t\"area\",\n\t\"img\",\n\t\"input\"\n];\nconst Primitive = defineComponent({\n\tname: \"Primitive\",\n\tinheritAttrs: false,\n\tprops: {\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tas: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: \"div\"\n\t\t}\n\t},\n\tsetup(props, { attrs, slots }) {\n\t\tconst asTag = props.asChild ? \"template\" : props.as;\n\t\tif (typeof asTag === \"string\" && SELF_CLOSING_TAGS.includes(asTag)) return () => h(asTag, attrs);\n\t\tif (asTag !== \"template\") return () => h(props.as, attrs, { default: slots.default });\n\t\treturn () => h(Slot, attrs, { default: slots.default });\n\t}\n});\n\n//#endregion\nexport { Primitive };\n//# sourceMappingURL=Primitive.js.map","import { computed, ref } from \"vue\";\nimport { unrefElement } from \"@vueuse/core\";\n\n//#region src/Primitive/usePrimitiveElement.ts\nfunction usePrimitiveElement() {\n\tconst primitiveElement = ref();\n\tconst currentElement = computed(() => [\"#text\", \"#comment\"].includes(primitiveElement.value?.$el.nodeName) ? primitiveElement.value?.$el.nextElementSibling : unrefElement(primitiveElement));\n\treturn {\n\t\tprimitiveElement,\n\t\tcurrentElement\n\t};\n}\n\n//#endregion\nexport { usePrimitiveElement };\n//# sourceMappingURL=usePrimitiveElement.js.map","import { Primitive } from \"../Primitive/Primitive.js\";\nimport { createBlock, defineComponent, openBlock, renderSlot, unref, withCtx } from \"vue\";\n\n//#region src/VisuallyHidden/VisuallyHidden.vue?vue&type=script&setup=true&lang.ts\nvar VisuallyHidden_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({\n\t__name: \"VisuallyHidden\",\n\tprops: {\n\t\tfeature: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: \"focusable\"\n\t\t},\n\t\tasChild: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\tas: {\n\t\t\ttype: null,\n\t\t\trequired: false,\n\t\t\tdefault: \"span\"\n\t\t}\n\t},\n\tsetup(__props) {\n\t\treturn (_ctx, _cache) => {\n\t\t\treturn openBlock(), createBlock(unref(Primitive), {\n\t\t\t\tas: _ctx.as,\n\t\t\t\t\"as-child\": _ctx.asChild,\n\t\t\t\t\"aria-hidden\": _ctx.feature === \"focusable\" ? \"true\" : void 0,\n\t\t\t\t\"data-hidden\": _ctx.feature === \"fully-hidden\" ? \"\" : void 0,\n\t\t\t\ttabindex: _ctx.feature === \"fully-hidden\" ? \"-1\" : void 0,\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tborder: 0,\n\t\t\t\t\twidth: \"1px\",\n\t\t\t\t\theight: \"1px\",\n\t\t\t\t\tpadding: 0,\n\t\t\t\t\tmargin: \"-1px\",\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\tclip: \"rect(0, 0, 0, 0)\",\n\t\t\t\t\tclipPath: \"inset(50%)\",\n\t\t\t\t\twhiteSpace: \"nowrap\",\n\t\t\t\t\twordWrap: \"normal\",\n\t\t\t\t\ttop: \"-1px\",\n\t\t\t\t\tleft: \"-1px\"\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tdefault: withCtx(() => [renderSlot(_ctx.$slots, \"default\")]),\n\t\t\t\t_: 3\n\t\t\t}, 8, [\n\t\t\t\t\"as\",\n\t\t\t\t\"as-child\",\n\t\t\t\t\"aria-hidden\",\n\t\t\t\t\"data-hidden\",\n\t\t\t\t\"tabindex\"\n\t\t\t]);\n\t\t};\n\t}\n});\n\n//#endregion\n//#region src/VisuallyHidden/VisuallyHidden.vue\nvar VisuallyHidden_default = VisuallyHidden_vue_vue_type_script_setup_true_lang_default;\n\n//#endregion\nexport { VisuallyHidden_default };\n//# sourceMappingURL=VisuallyHidden.js.map"],"x_google_ignoreList":[0,1,2,3,4,5,6,7],"mappings":";;;;;;;;;;AAUA,SAAS,cAAc,uBAAuB,aAAa;CAC1D,MAAM,oBAAoB,OAAO,0BAA0B,YAAY,CAAC,cAAc,GAAG,sBAAsB,WAAW;CAC1H,MAAM,eAAe,OAAO,kBAAkB;;;;;;;CAO9C,MAAM,iBAAiB,aAAa;EACnC,MAAM,UAAU,OAAO,cAAc,SAAS;AAC9C,MAAI,QAAS,QAAO;AACpB,MAAI,YAAY,KAAM,QAAO;AAC7B,QAAM,IAAI,MAAM,eAAe,aAAa,UAAU,CAAC,8CAA8C,MAAM,QAAQ,sBAAsB,GAAG,oCAAoC,sBAAsB,KAAK,KAAK,KAAK,KAAK,sBAAsB,MAAM;;CAEvP,MAAM,kBAAkB,iBAAiB;AACxC,UAAQ,cAAc,aAAa;AACnC,SAAO;;AAER,QAAO,CAAC,eAAe,eAAe;;;;AC1BvC,SAAS,oBAAoB,UAAU;AACtC,KAAI,CAAC,SAAU,QAAO,EAAE;AACxB,QAAO,SAAS,SAAS,UAAU;AAClC,MAAI,MAAM,SAAS,SAAU,QAAO,oBAAoB,MAAM,SAAS;AACvE,SAAO,CAAC,MAAM;GACb;;;;ACJH,IAAM,CAAC,6BAA6B,gCAAgC,cAAc,iBAAiB;;;;;;;;ACKnG,SAAS,aAAa,KAAK;CAC1B,MAAM,UAAU,4BAA4B,EAAE,KAAK,IAAI,MAAM,EAAE,CAAC;AAChE,QAAO,eAAe,KAAK,SAAS,QAAQ,KAAK,SAAS,MAAM;;;;ACPjE,IAAM,OAAO,gBAAgB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