1 line
6.8 KiB
JSON
1 line
6.8 KiB
JSON
{"ast":null,"code":"'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * @type {React.Context<{ idPrefix: string; value: string } | null>}\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Context = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n Context.displayName = 'TabContext';\n}\nfunction useUniquePrefix() {\n const [id, setId] = React.useState(null);\n React.useEffect(() => {\n setId(`mui-p-${Math.round(Math.random() * 1e5)}`);\n }, []);\n return id;\n}\nexport default function TabContext(props) {\n const {\n children,\n value\n } = props;\n const idPrefix = useUniquePrefix();\n const context = React.useMemo(() => {\n return {\n idPrefix,\n value\n };\n }, [idPrefix, value]);\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: context,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? TabContext.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * The value of the currently selected `Tab`.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired\n} : void 0;\n\n/**\n * @returns {unknown}\n */\nexport function useTabContext() {\n return React.useContext(Context);\n}\nexport function getPanelId(context, value) {\n const {\n idPrefix\n } = context;\n if (idPrefix === null) {\n return null;\n }\n return `${context.idPrefix}-P-${value}`;\n}\nexport function getTabId(context, value) {\n const {\n idPrefix\n } = context;\n if (idPrefix === null) {\n return null;\n }\n return `${context.idPrefix}-T-${value}`;\n}","map":{"version":3,"names":["React","PropTypes","jsx","_jsx","Context","createContext","process","env","NODE_ENV","displayName","useUniquePrefix","id","setId","useState","useEffect","Math","round","random","TabContext","props","children","value","idPrefix","context","useMemo","Provider","propTypes","node","oneOfType","number","string","isRequired","useTabContext","useContext","getPanelId","getTabId"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/lab/TabContext/TabContext.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * @type {React.Context<{ idPrefix: string; value: string } | null>}\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Context = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n Context.displayName = 'TabContext';\n}\nfunction useUniquePrefix() {\n const [id, setId] = React.useState(null);\n React.useEffect(() => {\n setId(`mui-p-${Math.round(Math.random() * 1e5)}`);\n }, []);\n return id;\n}\nexport default function TabContext(props) {\n const {\n children,\n value\n } = props;\n const idPrefix = useUniquePrefix();\n const context = React.useMemo(() => {\n return {\n idPrefix,\n value\n };\n }, [idPrefix, value]);\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: context,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? TabContext.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * The value of the currently selected `Tab`.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired\n} : void 0;\n\n/**\n * @returns {unknown}\n */\nexport function useTabContext() {\n return React.useContext(Context);\n}\nexport function getPanelId(context, value) {\n const {\n idPrefix\n } = context;\n if (idPrefix === null) {\n return null;\n }\n return `${context.idPrefix}-P-${value}`;\n}\nexport function getTabId(context, value) {\n const {\n idPrefix\n } = context;\n if (idPrefix === null) {\n return null;\n }\n return `${context.idPrefix}-T-${value}`;\n}"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,YAAY;;AAElC;A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