UNPKG

@atlaskit/atlassian-navigation

Version:

A horizontal navigation component for Atlassian apps.

61 lines (57 loc) 3.2 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.SearchSkeleton = void 0; var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _react = _interopRequireWildcard(require("react")); var _react2 = require("@emotion/react"); var _constants = require("../../common/constants"); var _theme = require("../../theme"); var _skeleton = require("../IconButton/skeleton"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } /** * @jsxRuntime classic * @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 var searchInputContainerStyles = (0, _react2.css)((0, _defineProperty2.default)({ // eslint-disable-next-line @atlaskit/design-system/no-physical-properties marginRight: "var(--ds-space-100, 8px)", // eslint-disable-next-line @atlaskit/design-system/no-physical-properties marginLeft: "var(--ds-space-250, 20px)", position: 'relative' }, "@media (max-width: ".concat(_constants.CREATE_BREAKPOINT - 1, "px)"), { // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766 display: 'none !important' })); var searchInputSkeletonStyles = (0, _react2.css)({ boxSizing: 'border-box', width: '220px', height: "var(--ds-space-400, 32px)", padding: "0 ".concat("var(--ds-space-100, 8px)", " 0 ", "var(--ds-space-500, 40px)"), borderRadius: "var(--ds-radius-large, 6px)", opacity: 0.15 }); var searchIconStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (min-width: ".concat(_constants.CREATE_BREAKPOINT, "px)"), { // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766 display: 'none !important' })); // Not exported to consumers, only used in NavigationSkeleton // eslint-disable-next-line @repo/internal/react/require-jsdoc var SearchSkeleton = exports.SearchSkeleton = function SearchSkeleton() { var theme = (0, _theme.useTheme)(); return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", { css: searchInputContainerStyles }, (0, _react2.jsx)("div", { // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 style: theme.mode.skeleton, css: searchInputSkeletonStyles })), (0, _react2.jsx)(_skeleton.IconButtonSkeleton, { css: searchIconStyles, marginRight: 5, size: 26 })); };