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
11 KiB
1 line
11 KiB
{"ast":null,"code":"import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from './Button';\nimport ButtonGroup from './ButtonGroup';\nimport Dropdown from './Dropdown';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.\n * @type {string}\n * @required\n */\n id: PropTypes.string,\n /**\n * Accessible label for the toggle; the value of `title` if not specified.\n */\n toggleLabel: PropTypes.string,\n /** An `href` passed to the non-toggle Button */\n href: PropTypes.string,\n /** An anchor `target` passed to the non-toggle Button */\n target: PropTypes.string,\n /** An `onClick` handler passed to the non-toggle Button */\n onClick: PropTypes.func,\n /** The content of the non-toggle Button. */\n title: PropTypes.node.isRequired,\n /** A `type` passed to the non-toggle Button */\n type: PropTypes.string,\n /** Disables both Buttons */\n disabled: PropTypes.bool,\n /**\n * Aligns the dropdown menu.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n *\n * @type {\"start\"|\"end\"|{ sm: \"start\"|\"end\" }|{ md: \"start\"|\"end\" }|{ lg: \"start\"|\"end\" }|{ xl: \"start\"|\"end\"}|{ xxl: \"start\"|\"end\"} }\n */\n align: alignPropType,\n /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */\n menuRole: PropTypes.string,\n /** Whether to render the dropdown menu in the DOM before the first time it is shown */\n renderMenuOnMount: PropTypes.bool,\n /**\n * Which event when fired outside the component will cause it to be closed.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n */\n rootCloseEvent: PropTypes.string,\n /**\n * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to\n * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).\n *\n */\n flip: PropTypes.bool,\n /** @ignore */\n bsPrefix: PropTypes.string,\n /** @ignore */\n variant: PropTypes.string,\n /** @ignore */\n size: PropTypes.string\n};\nconst defaultProps = {\n toggleLabel: 'Toggle dropdown',\n type: 'button'\n};\n/**\n * A convenience component for simple or general use split button dropdowns. Renders a\n * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`\n * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s\n * props](#dropdown-props).\n *\n * _All unknown props are passed through to the `Dropdown` component._\n * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,\n * and menu-related props are passed to the `Dropdown.Menu`\n */\n\nconst SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n id,\n bsPrefix,\n size,\n variant,\n title,\n type,\n toggleLabel,\n children,\n onClick,\n href,\n target,\n menuRole,\n renderMenuOnMount,\n rootCloseEvent,\n flip,\n ...props\n } = _ref;\n return /*#__PURE__*/_jsxs(Dropdown, {\n ref: ref,\n ...props,\n as: ButtonGroup,\n children: [/*#__PURE__*/_jsx(Button, {\n size: size,\n variant: variant,\n disabled: props.disabled,\n bsPrefix: bsPrefix,\n href: href,\n target: target,\n onClick: onClick,\n type: type,\n children: title\n }), /*#__PURE__*/_jsx(Dropdown.Toggle, {\n split: true,\n id: id,\n size: size,\n variant: variant,\n disabled: props.disabled,\n childBsPrefix: bsPrefix,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: \"visually-hidden\",\n children: toggleLabel\n })\n }), /*#__PURE__*/_jsx(Dropdown.Menu, {\n role: menuRole,\n renderOnMount: renderMenuOnMount,\n rootCloseEvent: rootCloseEvent,\n flip: flip,\n children: children\n })]\n });\n});\nSplitButton.propTypes = propTypes;\nSplitButton.defaultProps = defaultProps;\nSplitButton.displayName = 'SplitButton';\nexport default SplitButton;","map":{"version":3,"names":["React","PropTypes","Button","ButtonGroup","Dropdown","alignPropType","jsx","_jsx","jsxs","_jsxs","propTypes","id","string","toggleLabel","href","target","onClick","func","title","node","isRequired","type","disabled","bool","align","menuRole","renderMenuOnMount","rootCloseEvent","flip","bsPrefix","variant","size","defaultProps","SplitButton","forwardRef","ref","children","props","as","Toggle","split","childBsPrefix","className","Menu","role","renderOnMount","displayName"],"sources":["C:/Cours/SAE/SAE-3.01/Scripted/Scripted/website/node_modules/react-bootstrap/esm/SplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from './Button';\nimport ButtonGroup from './ButtonGroup';\nimport Dropdown from './Dropdown';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.\n * @type {string}\n * @required\n */\n id: PropTypes.string,\n\n /**\n * Accessible label for the toggle; the value of `title` if not specified.\n */\n toggleLabel: PropTypes.string,\n\n /** An `href` passed to the non-toggle Button */\n href: PropTypes.string,\n\n /** An anchor `target` passed to the non-toggle Button */\n target: PropTypes.string,\n\n /** An `onClick` handler passed to the non-toggle Button */\n onClick: PropTypes.func,\n\n /** The content of the non-toggle Button. */\n title: PropTypes.node.isRequired,\n\n /** A `type` passed to the non-toggle Button */\n type: PropTypes.string,\n\n /** Disables both Buttons */\n disabled: PropTypes.bool,\n\n /**\n * Aligns the dropdown menu.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n *\n * @type {\"start\"|\"end\"|{ sm: \"start\"|\"end\" }|{ md: \"start\"|\"end\" }|{ lg: \"start\"|\"end\" }|{ xl: \"start\"|\"end\"}|{ xxl: \"start\"|\"end\"} }\n */\n align: alignPropType,\n\n /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */\n menuRole: PropTypes.string,\n\n /** Whether to render the dropdown menu in the DOM before the first time it is shown */\n renderMenuOnMount: PropTypes.bool,\n\n /**\n * Which event when fired outside the component will cause it to be closed.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n */\n rootCloseEvent: PropTypes.string,\n\n /**\n * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to\n * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).\n *\n */\n flip: PropTypes.bool,\n\n /** @ignore */\n bsPrefix: PropTypes.string,\n\n /** @ignore */\n variant: PropTypes.string,\n\n /** @ignore */\n size: PropTypes.string\n};\nconst defaultProps = {\n toggleLabel: 'Toggle dropdown',\n type: 'button'\n};\n/**\n * A convenience component for simple or general use split button dropdowns. Renders a\n * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`\n * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s\n * props](#dropdown-props).\n *\n * _All unknown props are passed through to the `Dropdown` component._\n * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,\n * and menu-related props are passed to the `Dropdown.Menu`\n */\n\nconst SplitButton = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n size,\n variant,\n title,\n type,\n toggleLabel,\n children,\n onClick,\n href,\n target,\n menuRole,\n renderMenuOnMount,\n rootCloseEvent,\n flip,\n ...props\n}, ref) => /*#__PURE__*/_jsxs(Dropdown, {\n ref: ref,\n ...props,\n as: ButtonGroup,\n children: [/*#__PURE__*/_jsx(Button, {\n size: size,\n variant: variant,\n disabled: props.disabled,\n bsPrefix: bsPrefix,\n href: href,\n target: target,\n onClick: onClick,\n type: type,\n children: title\n }), /*#__PURE__*/_jsx(Dropdown.Toggle, {\n split: true,\n id: id,\n size: size,\n variant: variant,\n disabled: props.disabled,\n childBsPrefix: bsPrefix,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: \"visually-hidden\",\n children: toggleLabel\n })\n }), /*#__PURE__*/_jsx(Dropdown.Menu, {\n role: menuRole,\n renderOnMount: renderMenuOnMount,\n rootCloseEvent: rootCloseEvent,\n flip: flip,\n children: children\n })]\n}));\nSplitButton.propTypes = propTypes;\nSplitButton.defaultProps = defaultProps;\nSplitButton.displayName = 'SplitButton';\nexport default SplitButton;"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