1 line
13 KiB
JSON
1 line
13 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\", \"id\", \"slotProps\", \"slots\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getMenuItemUtilityClass } from './menuItemClasses';\nimport { useMenuItem, useMenuItemContextStabilizer } from '../useMenuItem';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { useSlotProps } from '../utils/useSlotProps';\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 focusVisible\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n return composeClasses(slots, useClassNamesOverride(getMenuItemUtilityClass));\n}\nconst InnerMenuItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function MenuItem(props, forwardedRef) {\n var _slots$root;\n const {\n children,\n disabled: disabledProp = false,\n label,\n id,\n slotProps = {},\n slots = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getRootProps,\n disabled,\n focusVisible,\n highlighted\n } = useMenuItem({\n id,\n disabled: disabledProp,\n rootRef: forwardedRef,\n label\n });\n const ownerState = _extends({}, props, {\n disabled,\n focusVisible,\n highlighted\n });\n const classes = useUtilityClasses(ownerState);\n const Root = (_slots$root = slots.root) != null ? _slots$root : 'li';\n const rootProps = useSlotProps({\n elementType: Root,\n getSlotProps: getRootProps,\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 menu item to be used within a Menu.\n *\n * Demos:\n *\n * - [Menu](https://mui.com/base-ui/react-menu/)\n *\n * API:\n *\n * - [MenuItem API](https://mui.com/base-ui/react-menu/components-api/#menu-item)\n */\nconst MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, ref) {\n const {\n id: idProp\n } = props;\n\n // This wrapper component is used as a performance optimization.\n // `useMenuItemContextStabilizer` ensures that the context value\n // is stable across renders, so that the actual MenuItem re-renders\n // only when it needs to.\n const {\n contextValue,\n id\n } = useMenuItemContextStabilizer(idProp);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(InnerMenuItem, _extends({}, props, {\n id: id,\n ref: ref\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.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 menu item will be disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the menu item won't receive focus when the mouse moves over it.\n *\n * @default false\n */\n disableFocusOnHover: PropTypes.bool,\n /**\n * A text representation of the menu item's content.\n * Used for keyboard text navigation matching.\n */\n label: PropTypes.string,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * The props used for each slot inside the MenuItem.\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 MenuItem.\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} : void 0;\nexport { MenuItem };","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","PropTypes","getMenuItemUtilityClass","useMenuItem","useMenuItemContextStabilizer","unstable_composeClasses","composeClasses","useSlotProps","useClassNamesOverride","ListContext","jsx","_jsx","useUtilityClasses","ownerState","disabled","focusVisible","slots","root","InnerMenuItem","memo","forwardRef","MenuItem","props","forwardedRef","_slots$root","children","disabledProp","label","id","slotProps","other","getRootProps","highlighted","rootRef","classes","Root","rootProps","elementType","getSlotProps","externalSlotProps","externalForwardedProps","className","ref","idProp","contextValue","Provider","value","process","env","NODE_ENV","propTypes","node","string","bool","disableFocusOnHover","onClick","func","shape","oneOfType","object"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/base/MenuItem/MenuItem.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\", \"id\", \"slotProps\", \"slots\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getMenuItemUtilityClass } from './menuItemClasses';\nimport { useMenuItem, useMenuItemContextStabilizer } from '../useMenuItem';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { useSlotProps } from '../utils/useSlotProps';\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 focusVisible\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n return composeClasses(slots, useClassNamesOverride(getMenuItemUtilityClass));\n}\nconst InnerMenuItem = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function MenuItem(props, forwardedRef) {\n var _slots$root;\n const {\n children,\n disabled: disabledProp = false,\n label,\n id,\n slotProps = {},\n slots = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getRootProps,\n disabled,\n focusVisible,\n highlighted\n } = useMenuItem({\n id,\n disabled: disabledProp,\n rootRef: forwardedRef,\n label\n });\n const ownerState = _extends({}, props, {\n disabled,\n focusVisible,\n highlighted\n });\n const classes = useUtilityClasses(ownerState);\n const Root = (_slots$root = slots.root) != null ? _slots$root : 'li';\n const rootProps = useSlotProps({\n elementType: Root,\n getSlotProps: getRootProps,\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 menu item to be used within a Menu.\n *\n * Demos:\n *\n * - [Menu](https://mui.com/base-ui/react-menu/)\n *\n * API:\n *\n * - [MenuItem API](https://mui.com/base-ui/react-menu/components-api/#menu-item)\n */\nconst MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, ref) {\n const {\n id: idProp\n } = props;\n\n // This wrapper component is used as a performance optimization.\n // `useMenuItemContextStabilizer` ensures that the context value\n // is stable across renders, so that the actual MenuItem re-renders\n // only when it needs to.\n const {\n contextValue,\n id\n } = useMenuItemContextStabilizer(idProp);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(InnerMenuItem, _extends({}, props, {\n id: id,\n ref: ref\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.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 menu item will be disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the menu item won't receive focus when the mouse moves over it.\n *\n * @default false\n */\n disableFocusOnHover: PropTypes.bool,\n /**\n * A text representation of the menu item's content.\n * Used for keyboard text navigation matching.\n */\n label: PropTypes.string,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * The props used for each slot inside the MenuItem.\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 MenuItem.\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} : void 0;\nexport { MenuItem };"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,MAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC;AAC/E,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,WAAW,EAAEC,4BAA4B,QAAQ,gBAAgB;AAC1E,SAASC,uBAAuB,IAAIC,cAAc,QAAQ,mBAAmB;AAC7E,SAASC,YAAY,QAAQ,uBAAuB;AACpD,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;EACF,CAAC,GAAGF,UAAU;EACd,MAAMG,KAAK,GAAG;IACZC,IAAI,EAAE,CAAC,MAAM,EAAEH,QAAQ,IAAI,UAAU,EAAEC,YAAY,IAAI,cAAc;EACvE,CAAC;EACD,OAAOT,cAAc,CAACU,KAAK,EAAER,qBAAqB,CAACN,uBAAuB,CAAC,CAAC;AAC9E;AACA,MAAMgB,aAAa,GAAG,aAAalB,KAAK,CAACmB,IAAI,CAAE,aAAanB,KAAK,CAACoB,UAAU,CAAC,SAASC,QAAQA,CAACC,KAAK,EAAEC,YAAY,EAAE;EAClH,IAAIC,WAAW;EACf,MAAM;M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C,GAAG,KAAK,CAAC;AACV,SAAShB,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |