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 = [\"action\", \"children\", \"disabled\", \"focusableWhenDisabled\", \"onFocusVisible\", \"slotProps\", \"slots\", \"rootElementName\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { getButtonUtilityClass } from './buttonClasses';\nimport { useButton } from '../useButton';\nimport { useSlotProps } from '../utils';\nimport { useClassNamesOverride } from '../utils/ClassNameConfigurator';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n active,\n disabled,\n focusVisible\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible', active && 'active']\n };\n return composeClasses(slots, useClassNamesOverride(getButtonUtilityClass));\n};\n/**\n * The foundation for building custom-styled buttons.\n *\n * Demos:\n *\n * - [Button](https://mui.com/base-ui/react-button/)\n *\n * API:\n *\n * - [Button API](https://mui.com/base-ui/react-button/components-api/#button)\n */\nconst Button = /*#__PURE__*/React.forwardRef(function Button(props, forwardedRef) {\n var _slots$root;\n const {\n action,\n children,\n focusableWhenDisabled = false,\n slotProps = {},\n slots = {},\n rootElementName: rootElementNameProp = 'button'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const buttonRef = React.useRef();\n let rootElementName = rootElementNameProp;\n if (typeof slots.root === 'string') {\n rootElementName = slots.root;\n } else if (other.href || other.to) {\n rootElementName = 'a';\n }\n const {\n active,\n focusVisible,\n setFocusVisible,\n getRootProps\n } = useButton(_extends({}, props, {\n focusableWhenDisabled,\n rootElementName\n }));\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), [setFocusVisible]);\n const ownerState = _extends({}, props, {\n active,\n focusableWhenDisabled,\n focusVisible\n });\n const classes = useUtilityClasses(ownerState);\n const defaultElement = other.href || other.to ? 'a' : 'button';\n const Root = (_slots$root = slots.root) != null ? _slots$root : defaultElement;\n const rootProps = useSlotProps({\n elementType: Root,\n getSlotProps: getRootProps,\n externalForwardedProps: other,\n externalSlotProps: slotProps.root,\n additionalProps: {\n ref: forwardedRef\n },\n ownerState,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.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 * A ref for imperative actions. It currently only supports `focusVisible()` action.\n */\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focusVisible: PropTypes.func.isRequired\n })\n })]),\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, allows a disabled button to receive focus.\n * @default false\n */\n focusableWhenDisabled: PropTypes.bool,\n /**\n * @ignore\n */\n href: PropTypes.string,\n /**\n * @ignore\n */\n onFocusVisible: PropTypes.func,\n /**\n * The HTML element that is ultimately rendered, for example 'button' or 'a'\n * @default 'button'\n */\n rootElementName: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The props used for each slot inside the Button.\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 Button.\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 * @ignore\n */\n to: PropTypes.string\n} : void 0;\nexport { Button };","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","PropTypes","unstable_composeClasses","composeClasses","getButtonUtilityClass","useButton","useSlotProps","useClassNamesOverride","jsx","_jsx","useUtilityClasses","ownerState","active","disabled","focusVisible","slots","root","Button","forwardRef","props","forwardedRef","_slots$root","action","children","focusableWhenDisabled","slotProps","rootElementName","rootElementNameProp","other","buttonRef","useRef","href","to","setFocusVisible","getRootProps","useImperativeHandle","current","focus","classes","defaultElement","Root","rootProps","elementType","getSlotProps","externalForwardedProps","externalSlotProps","additionalProps","ref","className","process","env","NODE_ENV","propTypes","oneOfType","func","shape","isRequired","node","string","bool","onFocusVisible","object"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/base/Button/Button.js"],"sourcesContent":["'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"action\", \"children\", \"disabled\", \"focusableWhenDisabled\", \"onFocusVisible\", \"slotProps\", \"slots\", \"rootElementName\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { getButtonUtilityClass } from './buttonClasses';\nimport { useButton } from '../useButton';\nimport { useSlotProps } from '../utils';\nimport { useClassNamesOverride } from '../utils/ClassNameConfigurator';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n active,\n disabled,\n focusVisible\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible', active && 'active']\n };\n return composeClasses(slots, useClassNamesOverride(getButtonUtilityClass));\n};\n/**\n * The foundation for building custom-styled buttons.\n *\n * Demos:\n *\n * - [Button](https://mui.com/base-ui/react-button/)\n *\n * API:\n *\n * - [Button API](https://mui.com/base-ui/react-button/components-api/#button)\n */\nconst Button = /*#__PURE__*/React.forwardRef(function Button(props, forwardedRef) {\n var _slots$root;\n const {\n action,\n children,\n focusableWhenDisabled = false,\n slotProps = {},\n slots = {},\n rootElementName: rootElementNameProp = 'button'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const buttonRef = React.useRef();\n let rootElementName = rootElementNameProp;\n if (typeof slots.root === 'string') {\n rootElementName = slots.root;\n } else if (other.href || other.to) {\n rootElementName = 'a';\n }\n const {\n active,\n focusVisible,\n setFocusVisible,\n getRootProps\n } = useButton(_extends({}, props, {\n focusableWhenDisabled,\n rootElementName\n }));\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), [setFocusVisible]);\n const ownerState = _extends({}, props, {\n active,\n focusableWhenDisabled,\n focusVisible\n });\n const classes = useUtilityClasses(ownerState);\n const defaultElement = other.href || other.to ? 'a' : 'button';\n const Root = (_slots$root = slots.root) != null ? _slots$root : defaultElement;\n const rootProps = useSlotProps({\n elementType: Root,\n getSlotProps: getRootProps,\n externalForwardedProps: other,\n externalSlotProps: slotProps.root,\n additionalProps: {\n ref: forwardedRef\n },\n ownerState,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.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 * A ref for imperative actions. It currently only supports `focusVisible()` action.\n */\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focusVisible: PropTypes.func.isRequired\n })\n })]),\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, allows a disabled button to receive focus.\n * @default false\n */\n focusableWhenDisabled: PropTypes.bool,\n /**\n * @ignore\n */\n href: PropTypes.string,\n /**\n * @ignore\n */\n onFocusVisible: PropTypes.func,\n /**\n * The HTML element that is ultimately rendered, for example 'button' or 'a'\n * @default 'button'\n */\n rootElementName: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The props used for each slot inside the Button.\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 Button.\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 * @ignore\n */\n to: PropTypes.string\n} : void 0;\nexport { Button };"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,MAAMC,SAAS,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,CAAC;AACxI,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,uBAAuB,IAAIC,cAAc,QAAQ,mBAAmB;AAC7E,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,MAAMC,iBAAiB,GAAGC,UAAU,IAAI;EACtC,MAAM;IACJC,MAAM;IACNC,QAAQ;IACRC;EACF,CAAC,GAAGH,UAAU;EACd,MAAMI,KAAK,GAAG;IACZC,IAAI,EAAE,CAAC,MAAM,EAAEH,QAAQ,IAAI,UAAU,EAAEC,YAAY,IAAI,cAAc,EAAEF,MAAM,IAAI,QAAQ;EAC3F,CAAC;EACD,OAAOT,cAAc,CAACY,K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/C,SAAS,CAACyD,MAAM;EAC3B;AACF;AACA;AACA;EACE7C,QAAQ,EAAEZ,SAAS,CAAC0D,IAAI;EACxB;AACF;AACA;AACA;EACEnC,qBAAqB,EAAEvB,SAAS,CAAC0D,IAAI;EACrC;AACF;AACA;EACE5B,IAAI,EAAE9B,SAAS,CAACyD,MAAM;EACtB;AACF;AACA;EACEE,cAAc,EAAE3D,SAAS,CAACqD,IAAI;EAC9B;AACF;AACA;AACA;EACE5B,eAAe,EAAEzB,SAAS,CAAC,sCAAsCyD,MAAM;EACvE;AACF;AACA;AACA;EACEjC,SAAS,EAAExB,SAAS,CAACsD,KAAK,CAAC;IACzBvC,IAAI,EAAEf,SAAS,CAACoD,SAAS,CAAC,CAACpD,SAAS,CAACqD,IAAI,EAAErD,SAAS,CAAC4D,MAAM,CAAC;EAC9D,CAAC,CAAC;EACF;AACF;AACA;AACA;AACA;EACE9C,KAAK,EAAEd,SAAS,CAACsD,KAAK,CAAC;IACrBvC,IAAI,EAAEf,SAAS,CAACyC;EAClB,CAAC,CAAC;EACF;AACF;AACA;EACEV,EAAE,EAAE/B,SAAS,CAACyD;AAChB,CAAC,GAAG,KAAK,CAAC;AACV,SAASzC,MAAM","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |