You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.3 KiB
1 line
5.3 KiB
{"ast":null,"code":"import classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useDropdownToggle } from '@restart/ui/DropdownToggle';\nimport DropdownContext from '@restart/ui/DropdownContext';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport Button from './Button';\nimport InputGroupContext from './InputGroupContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport useWrappedRefWithWarning from './useWrappedRefWithWarning';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownToggle = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n bsPrefix,\n split,\n className,\n childBsPrefix,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = Button,\n ...props\n } = _ref;\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');\n const dropdownContext = useContext(DropdownContext);\n const isInputGroup = useContext(InputGroupContext);\n if (childBsPrefix !== undefined) {\n props.bsPrefix = childBsPrefix;\n }\n const [toggleProps] = useDropdownToggle();\n toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle')); // This intentionally forwards size and variant (if set) to the\n // underlying component, to allow it to render size and style variants.\n\n return /*#__PURE__*/_jsx(Component, {\n className: classNames(className, prefix, split && `${prefix}-split`, !!isInputGroup && (dropdownContext == null ? void 0 : dropdownContext.show) && 'show'),\n ...toggleProps,\n ...props\n });\n});\nDropdownToggle.displayName = 'DropdownToggle';\nexport default DropdownToggle;","map":{"version":3,"names":["classNames","React","useContext","useDropdownToggle","DropdownContext","useMergedRefs","Button","InputGroupContext","useBootstrapPrefix","useWrappedRefWithWarning","jsx","_jsx","DropdownToggle","forwardRef","ref","bsPrefix","split","className","childBsPrefix","as","Component","props","prefix","dropdownContext","isInputGroup","undefined","toggleProps","show","displayName"],"sources":["C:/Cours/SAE/SAE-3.01/Scripted/Scripted/website/node_modules/react-bootstrap/esm/DropdownToggle.js"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useDropdownToggle } from '@restart/ui/DropdownToggle';\nimport DropdownContext from '@restart/ui/DropdownContext';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport Button from './Button';\nimport InputGroupContext from './InputGroupContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport useWrappedRefWithWarning from './useWrappedRefWithWarning';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownToggle = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n split,\n className,\n childBsPrefix,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = Button,\n ...props\n}, ref) => {\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');\n const dropdownContext = useContext(DropdownContext);\n const isInputGroup = useContext(InputGroupContext);\n\n if (childBsPrefix !== undefined) {\n props.bsPrefix = childBsPrefix;\n }\n\n const [toggleProps] = useDropdownToggle();\n toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle')); // This intentionally forwards size and variant (if set) to the\n // underlying component, to allow it to render size and style variants.\n\n return /*#__PURE__*/_jsx(Component, {\n className: classNames(className, prefix, split && `${prefix}-split`, !!isInputGroup && (dropdownContext == null ? void 0 : dropdownContext.show) && 'show'),\n ...toggleProps,\n ...props\n });\n});\nDropdownToggle.displayName = 'DropdownToggle';\nexport default DropdownToggle;"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,OAAO;AAClC,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,OAAOC,eAAe,MAAM,6BAA6B;AACzD,OAAOC,aAAa,MAAM,8BAA8B;AACxD,OAAOC,MAA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