1 line
7.4 KiB
JSON
1 line
7.4 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];\nexport const DEFAULT_MIN_BREAKPOINT = 'xs';\nconst ThemeContext = /*#__PURE__*/React.createContext({\n prefixes: {},\n breakpoints: DEFAULT_BREAKPOINTS,\n minBreakpoint: DEFAULT_MIN_BREAKPOINT\n});\nconst {\n Consumer,\n Provider\n} = ThemeContext;\nfunction ThemeProvider({\n prefixes = {},\n breakpoints = DEFAULT_BREAKPOINTS,\n minBreakpoint = DEFAULT_MIN_BREAKPOINT,\n dir,\n children\n}) {\n const contextValue = useMemo(() => ({\n prefixes: {\n ...prefixes\n },\n breakpoints,\n minBreakpoint,\n dir\n }), [prefixes, breakpoints, minBreakpoint, dir]);\n return /*#__PURE__*/_jsx(Provider, {\n value: contextValue,\n children: children\n });\n}\nexport function useBootstrapPrefix(prefix, defaultPrefix) {\n const {\n prefixes\n } = useContext(ThemeContext);\n return prefix || prefixes[defaultPrefix] || defaultPrefix;\n}\nexport function useBootstrapBreakpoints() {\n const {\n breakpoints\n } = useContext(ThemeContext);\n return breakpoints;\n}\nexport function useBootstrapMinBreakpoint() {\n const {\n minBreakpoint\n } = useContext(ThemeContext);\n return minBreakpoint;\n}\nexport function useIsRTL() {\n const {\n dir\n } = useContext(ThemeContext);\n return dir === 'rtl';\n}\nfunction createBootstrapComponent(Component, opts) {\n if (typeof opts === 'string') opts = {\n prefix: opts\n };\n const isClassy = Component.prototype && Component.prototype.isReactComponent;\n // If it's a functional component make sure we don't break it with a ref\n const {\n prefix,\n forwardRefAs = isClassy ? 'ref' : 'innerRef'\n } = opts;\n const Wrapped = /*#__PURE__*/React.forwardRef(({\n ...props\n }, ref) => {\n props[forwardRefAs] = ref;\n const bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n bsPrefix: bsPrefix\n });\n });\n Wrapped.displayName = `Bootstrap(${Component.displayName || Component.name})`;\n return Wrapped;\n}\nexport { createBootstrapComponent, Consumer as ThemeConsumer };\nexport default ThemeProvider;","map":{"version":3,"names":["React","useContext","useMemo","jsx","_jsx","DEFAULT_BREAKPOINTS","DEFAULT_MIN_BREAKPOINT","ThemeContext","createContext","prefixes","breakpoints","minBreakpoint","Consumer","Provider","ThemeProvider","dir","children","contextValue","value","useBootstrapPrefix","prefix","defaultPrefix","useBootstrapBreakpoints","useBootstrapMinBreakpoint","useIsRTL","createBootstrapComponent","Component","opts","isClassy","prototype","isReactComponent","forwardRefAs","Wrapped","forwardRef","props","ref","bsPrefix","displayName","name","ThemeConsumer"],"sources":["/home/violet/documents/development/portfolio/public/node_modules/react-bootstrap/esm/ThemeProvider.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];\nexport const DEFAULT_MIN_BREAKPOINT = 'xs';\nconst ThemeContext = /*#__PURE__*/React.createContext({\n prefixes: {},\n breakpoints: DEFAULT_BREAKPOINTS,\n minBreakpoint: DEFAULT_MIN_BREAKPOINT\n});\nconst {\n Consumer,\n Provider\n} = ThemeContext;\nfunction ThemeProvider({\n prefixes = {},\n breakpoints = DEFAULT_BREAKPOINTS,\n minBreakpoint = DEFAULT_MIN_BREAKPOINT,\n dir,\n children\n}) {\n const contextValue = useMemo(() => ({\n prefixes: {\n ...prefixes\n },\n breakpoints,\n minBreakpoint,\n dir\n }), [prefixes, breakpoints, minBreakpoint, dir]);\n return /*#__PURE__*/_jsx(Provider, {\n value: contextValue,\n children: children\n });\n}\nexport function useBootstrapPrefix(prefix, defaultPrefix) {\n const {\n prefixes\n } = useContext(ThemeContext);\n return prefix || prefixes[defaultPrefix] || defaultPrefix;\n}\nexport function useBootstrapBreakpoints() {\n const {\n breakpoints\n } = useContext(ThemeContext);\n return breakpoints;\n}\nexport function useBootstrapMinBreakpoint() {\n const {\n minBreakpoint\n } = useContext(ThemeContext);\n return minBreakpoint;\n}\nexport function useIsRTL() {\n const {\n dir\n } = useContext(ThemeContext);\n return dir === 'rtl';\n}\nfunction createBootstrapComponent(Component, opts) {\n if (typeof opts === 'string') opts = {\n prefix: opts\n };\n const isClassy = Component.prototype && Component.prototype.isReactComponent;\n // If it's a functional component make sure we don't break it with a ref\n const {\n prefix,\n forwardRefAs = isClassy ? 'ref' : 'innerRef'\n } = opts;\n const Wrapped = /*#__PURE__*/React.forwardRef(({\n ...props\n }, ref) => {\n props[forwardRefAs] = ref;\n const bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n bsPrefix: bsPrefix\n });\n });\n Wrapped.displayName = `Bootstrap(${Component.displayName || Component.name})`;\n return Wrapped;\n}\nexport { createBootstrapComponent, Consumer as ThemeConsumer };\nexport default ThemeProvider;"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3C,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,OAAO,MAAMC,mBAAmB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACxE,OAAO,MAAMC,sBAAsB,GAAG,IAAI;AAC1C,MAAMC,YAAY,GAAG,aAAaP,KAAK,CAACQ,aAAa,CAAC;EACpDC,QAAQ,EAAE,CAAC,CAAC;EACZC,WAAW,EAAEL,mBAAmB;EAChCM,aAAa,EAAEL;AACjB,CAAC,CAAC;AACF,MAAM;EACJM,QAAQ;EACRC;AACF,CAAC,GAAGN,YAAY;AAChB,SAASO,aAAaA,CAAC;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