1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"ast":null,"code":"'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"disabled\", \"label\", \"slotProps\", \"slots\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { getOptionUtilityClass } from './optionClasses';\nimport { useSlotProps } from '../utils';\nimport { useOption, useOptionContextStabilizer } from '../useOption';\nimport { useClassNamesOverride } from '../utils/ClassNameConfigurator';\nimport { ListContext } from '../useList';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUtilityClasses(ownerState) {\n const {\n disabled,\n highlighted,\n selected\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n };\n return composeClasses(slots, useClassNamesOverride(getOptionUtilityClass));\n}\nconst InnerOption = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function Option(props, forwardedRef) {\n var _slots$root, _optionRef$current;\n const {\n children,\n disabled = false,\n label,\n slotProps = {},\n slots = {},\n value\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const Root = (_slots$root = slots.root) != null ? _slots$root : 'li';\n const optionRef = React.useRef(null);\n const combinedRef = useForkRef(optionRef, forwardedRef);\n\n // If `label` is not explicitly provided, the `children` are used for convenience.\n // This is used to populate the select's trigger with the selected option's label.\n const computedLabel = label != null ? label : typeof children === 'string' ? children : (_optionRef$current = optionRef.current) == null || (_optionRef$current = _optionRef$current.textContent) == null ? void 0 : _optionRef$current.trim();\n const {\n getRootProps,\n selected,\n highlighted,\n index\n } = useOption({\n disabled,\n label: computedLabel,\n rootRef: combinedRef,\n value\n });\n const ownerState = _extends({}, props, {\n disabled,\n highlighted,\n index,\n selected\n });\n const classes = useUtilityClasses(ownerState);\n const rootProps = useSlotProps({\n getSlotProps: getRootProps,\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n className: classes.root,\n ownerState\n });\n return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n children: children\n }));\n}));\n\n/**\n * An unstyled option to be used within a Select.\n *\n * Demos:\n *\n * - [Select](https://mui.com/base-ui/react-select/)\n *\n * API:\n *\n * - [Option API](https://mui.com/base-ui/react-select/components-api/#option)\n */\nconst Option = /*#__PURE__*/React.forwardRef(function Option(props, ref) {\n const {\n value\n } = props;\n\n // This wrapper component is used as a performance optimization.\n // `useOptionContextStabilizer` ensures that the context value\n // is stable across renders, so that the actual Option re-renders\n // only when it needs to.\n const {\n contextValue\n } = useOptionContextStabilizer(value);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(InnerOption, _extends({}, props, {\n ref: ref\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Option.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the option will be disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * A text representation of the option's content.\n * Used for keyboard text navigation matching.\n */\n label: PropTypes.string,\n /**\n * The props used for each slot inside the Option.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Option.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The value of the option.\n */\n value: PropTypes.any.isRequired\n} : void 0;\nexport { Option };","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","PropTypes","unstable_useForkRef","useForkRef","unstable_composeClasses","composeClasses","getOptionUtilityClass","useSlotProps","useOption","useOptionContextStabilizer","useClassNamesOverride","ListContext","jsx","_jsx","useUtilityClasses","ownerState","disabled","highlighted","selected","slots","root","InnerOption","memo","forwardRef","Option","props","forwardedRef","_slots$root","_optionRef$current","children","label","slotProps","value","other","Root","optionRef","useRef","combinedRef","computedLabel","current","textContent","trim","getRootProps","index","rootRef","classes","rootProps","getSlotProps","elementType","externalSlotProps","externalForwardedProps","className","ref","contextValue","Provider","process","env","NODE_ENV","propTypes","node","string","bool","shape","oneOfType","func","object","any","isRequired"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/base/Option/Option.js"],"sourcesContent":["'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"disabled\", \"label\", \"slotProps\", \"slots\", \"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { getOptionUtilityClass } from './optionClasses';\nimport { useSlotProps } from '../utils';\nimport { useOption, useOptionContextStabilizer } from '../useOption';\nimport { useClassNamesOverride } from '../utils/ClassNameConfigurator';\nimport { ListContext } from '../useList';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUtilityClasses(ownerState) {\n const {\n disabled,\n highlighted,\n selected\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n };\n return composeClasses(slots, useClassNamesOverride(getOptionUtilityClass));\n}\nconst InnerOption = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Option(props, forwardedRef) {\n var _slots$root, _optionRef$current;\n const {\n children,\n disabled = false,\n label,\n slotProps = {},\n slots = {},\n value\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const Root = (_slots$root = slots.root) != null ? _slots$root : 'li';\n const optionRef = React.useRef(null);\n const combinedRef = useForkRef(optionRef, forwardedRef);\n\n // If `label` is not explicitly provided, the `children` are used for convenience.\n // This is used to populate the select's trigger with the selected option's label.\n const computedLabel = label != null ? label : typeof children === 'string' ? children : (_optionRef$current = optionRef.current) == null || (_optionRef$current = _optionRef$current.textContent) == null ? void 0 : _optionRef$current.trim();\n const {\n getRootProps,\n selected,\n highlighted,\n index\n } = useOption({\n disabled,\n label: computedLabel,\n rootRef: combinedRef,\n value\n });\n const ownerState = _extends({}, props, {\n disabled,\n highlighted,\n index,\n selected\n });\n const classes = useUtilityClasses(ownerState);\n const rootProps = useSlotProps({\n getSlotProps: getRootProps,\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n className: classes.root,\n ownerState\n });\n return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n children: children\n }));\n}));\n\n/**\n * An unstyled option to be used within a Select.\n *\n * Demos:\n *\n * - [Select](https://mui.com/base-ui/react-select/)\n *\n * API:\n *\n * - [Option API](https://mui.com/base-ui/react-select/components-api/#option)\n */\nconst Option = /*#__PURE__*/React.forwardRef(function Option(props, ref) {\n const {\n value\n } = props;\n\n // This wrapper component is used as a performance optimization.\n // `useOptionContextStabilizer` ensures that the context value\n // is stable across renders, so that the actual Option re-renders\n // only when it needs to.\n const {\n contextValue\n } = useOptionContextStabilizer(value);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(InnerOption, _extends({}, props, {\n ref: ref\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Option.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the option will be disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * A text representation of the option's content.\n * Used for keyboard text navigation matching.\n */\n label: PropTypes.string,\n /**\n * The props used for each slot inside the Option.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Option.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The value of the option.\n */\n value: PropTypes.any.isRequired\n} : void 0;\nexport { Option };"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,MAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;AAClF,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,mBAAmB,IAAIC,UAAU,QAAQ,YAAY;AAC9D,SAASC,uBAAuB,IAAIC,cAAc,QAAQ,mBAAmB;AAC7E,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,SAAS,EAAEC,0BAA0B,QAAQ,cAAc;AACpE,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,WAAW,QAAQ,YAAY;AACxC,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,SAASC,iBAAiBA,CAACC,UAAU,EAAE;EACrC,MAAM;IACJC,QAAQ;IACRC,WAAW;IACXC;EACF,CAAC,GAAGH,UAAU;EACd,MAAMI,KAAK,GAAG;IACZC,IAAI,EAAE,CAAC,MAAM,EAAEJ,QAAQ,IAAI,UAAU,EAAEC,WAAW,IAAI,aAAa,EAAEC,QAAQ,IA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AACA;EACE7B,QAAQ,EAAE5B,SAAS,CAAC0D,IAAI;EACxB;AACF;AACA;EACER,SAAS,EAAElD,SAAS,CAAC2D,MAAM;EAC3B;AACF;AACA;AACA;EACE5C,QAAQ,EAAEf,SAAS,CAAC4D,IAAI;EACxB;AACF;AACA;AACA;EACE/B,KAAK,EAAE7B,SAAS,CAAC2D,MAAM;EACvB;AACF;AACA;AACA;EACE7B,SAAS,EAAE9B,SAAS,CAAC6D,KAAK,CAAC;IACzB1C,IAAI,EAAEnB,SAAS,CAAC8D,SAAS,CAAC,CAAC9D,SAAS,CAAC+D,IAAI,EAAE/D,SAAS,CAACgE,MAAM,CAAC;EAC9D,CAAC,CAAC;EACF;AACF;AACA;AACA;AACA;EACE9C,KAAK,EAAElB,SAAS,CAAC6D,KAAK,CAAC;IACrB1C,IAAI,EAAEnB,SAAS,CAAC+C;EAClB,CAAC,CAAC;EACF;AACF;AACA;EACEhB,KAAK,EAAE/B,SAAS,CAACiE,GAAG,CAACC;AACvB,CAAC,GAAG,KAAK,CAAC;AACV,SAAS3C,MAAM","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |