Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/b4ce09c8d7ff6e78d249b07a0c9...

1 line
3.5 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React, { useMemo, useCallback } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport createWithBsPrefix from './createWithBsPrefix';\nimport NavbarBrand from './NavbarBrand';\nimport NavbarCollapse from './NavbarCollapse';\nimport NavbarToggle from './NavbarToggle';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nimport SelectableContext from './SelectableContext';\nvar defaultProps = {\n expand: true,\n variant: 'light',\n collapseOnSelect: false\n};\nvar Navbar = React.forwardRef(function (props, ref) {\n var _useUncontrolled = useUncontrolled(props, {\n expanded: 'onToggle'\n }),\n bsPrefix = _useUncontrolled.bsPrefix,\n expand = _useUncontrolled.expand,\n variant = _useUncontrolled.variant,\n bg = _useUncontrolled.bg,\n fixed = _useUncontrolled.fixed,\n sticky = _useUncontrolled.sticky,\n className = _useUncontrolled.className,\n children = _useUncontrolled.children,\n _useUncontrolled$as = _useUncontrolled.as,\n Component = _useUncontrolled$as === void 0 ? 'nav' : _useUncontrolled$as,\n expanded = _useUncontrolled.expanded,\n _onToggle = _useUncontrolled.onToggle,\n onSelect = _useUncontrolled.onSelect,\n collapseOnSelect = _useUncontrolled.collapseOnSelect,\n controlledProps = _objectWithoutPropertiesLoose(_useUncontrolled, [\"bsPrefix\", \"expand\", \"variant\", \"bg\", \"fixed\", \"sticky\", \"className\", \"children\", \"as\", \"expanded\", \"onToggle\", \"onSelect\", \"collapseOnSelect\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar');\n var handleCollapse = useCallback(function () {\n if (onSelect) onSelect.apply(void 0, arguments);\n\n if (collapseOnSelect && expanded) {\n _onToggle(false);\n }\n }, [onSelect, collapseOnSelect, expanded, _onToggle]); // will result in some false positives but that seems better\n // than false negatives. strict `undefined` check allows explicit\n // \"nulling\" of the role if the user really doesn't want one\n\n if (controlledProps.role === undefined && Component !== 'nav') {\n controlledProps.role = 'navigation';\n }\n\n var expandClass = bsPrefix + \"-expand\";\n if (typeof expand === 'string') expandClass = expandClass + \"-\" + expand;\n var navbarContext = useMemo(function () {\n return {\n onToggle: function onToggle() {\n return _onToggle(!expanded);\n },\n bsPrefix: bsPrefix,\n expanded: expanded\n };\n }, [bsPrefix, expanded, _onToggle]);\n return React.createElement(NavbarContext.Provider, {\n value: navbarContext\n }, React.createElement(SelectableContext.Provider, {\n value: handleCollapse\n }, React.createElement(Component, _extends({\n ref: ref\n }, controlledProps, {\n className: classNames(className, bsPrefix, expand && expandClass, variant && bsPrefix + \"-\" + variant, bg && \"bg-\" + bg, sticky && \"sticky-\" + sticky, fixed && \"fixed-\" + fixed)\n }), children)));\n});\nNavbar.defaultProps = defaultProps;\nNavbar.displayName = 'Navbar';\nNavbar.Brand = NavbarBrand;\nNavbar.Toggle = NavbarToggle;\nNavbar.Collapse = NavbarCollapse;\nNavbar.Text = createWithBsPrefix('navbar-text', {\n Component: 'span'\n});\nexport default Navbar;","map":null,"metadata":{},"sourceType":"module"}