UNPKG

@atlaskit/inline-dialog

Version:

An inline dialog is a pop-up container for small amounts of information. It can also contain controls.

44 lines 2.78 kB
/* container.tsx generated by @compiled/babel-plugin v0.38.1 */ import _defineProperty from "@babel/runtime/helpers/defineProperty"; import "./container.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { forwardRef } from 'react'; import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors'; var CSS_THEME_BACKGROUND = '--theme-background'; var CSS_THEME_COLOR = '--theme-color'; var CSS_THEME_BOX_SHADOW = '--theme-box-shadow'; var containerStyles = null; /** * __Container__ * * A container is used as a styled wrapper around the contents of an inline dialog. * Note that the styles here are merged with the style prop that comes from the popper.js library. * */ export var Container = /*#__PURE__*/forwardRef(function (_ref, ref) { var children = _ref.children, onBlur = _ref.onBlur, onClick = _ref.onClick, onFocus = _ref.onFocus, style = _ref.style, testId = _ref.testId; return /*#__PURE__*/React.createElement("div", { "data-testid": testId, onBlur: onBlur, onClick: onClick, onFocus: onFocus, ref: ref // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 , className: ax(["_11q717w6 _2rkofajl _vchh1ntv _p12f184t _c71l184t _1pbyowjs _16qs11gm _syaz1xgh _85i5pxbi _1q51pxbi _y4ti1ejb _bozg1ejb _nt751r31 _49pcglyw _1hvw1o36"]), style: _objectSpread(_objectSpread({}, _objectSpread(_defineProperty(_defineProperty(_defineProperty({}, CSS_THEME_BACKGROUND, "var(--ds-surface-overlay, ".concat(N0, ")")), CSS_THEME_COLOR, "var(--ds-text, ".concat(N900, ")")), CSS_THEME_BOX_SHADOW, "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")), style)), {}, { "--_n6nwya": ix("".concat(8 * 56, "px")), "--_902zhz": ix("var(".concat(CSS_THEME_BACKGROUND, ")")), "--_uojrza": ix("var(".concat(CSS_THEME_BOX_SHADOW, ")")), "--_1yif2ym": ix("var(".concat(CSS_THEME_COLOR, ")")) }) }, typeof children === 'function' ? children() : children); });