UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

58 lines (57 loc) 2.92 kB
/* index-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */ import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["children", "customWidth", "visible", "disableAnimation"], _excluded2 = ["children", "customWidth", "visible", "disableAnimation", "hasPadding"]; import "./index-compiled.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; /** * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment. * Used via `componentWithCondition` in `index.tsx`. * * Cleanup: delete this file once the `platform_editor_core_non_ecc_static_css` experiment has shipped. */ import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles'; var ANIM_SPEED_MS = 500; var panelStyles = { panel: "_v5648l2w _1reo15vq _18m915vq _1bsbnklw _4t3i1osq _16qshh4h", panelHidden: "_1bsbidpf", disablePanelAnimation: "_v564glyw", content: "_v564e1q5 _vchhusvi _1bsbnklw _4t3i1osq _18m91wug", padding: "_ca0qpxbi _u5f3pxbi _n3tdze3t _19bvpxbi", customWidthOverflow: "_1reo15vq" }; export var ContextPanelWrapperCompiled = function ContextPanelWrapperCompiled(_ref) { var children = _ref.children, customWidth = _ref.customWidth, visible = _ref.visible, disableAnimation = _ref.disableAnimation, rest = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement("div", _extends({ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS style: customWidth && visible ? { width: "".concat(customWidth, "px") } : undefined // eslint-disable-next-line react/jsx-props-no-spreading }, rest, { className: ax([panelStyles.panel, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation]) }), children); }; export var ContextPanelContentCompiled = function ContextPanelContentCompiled(_ref2) { var children = _ref2.children, customWidth = _ref2.customWidth, visible = _ref2.visible, disableAnimation = _ref2.disableAnimation, hasPadding = _ref2.hasPadding, rest = _objectWithoutProperties(_ref2, _excluded2); return /*#__PURE__*/React.createElement("div", _extends({ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic width cannot be expressed as static compiled CSS style: customWidth && visible ? { width: "".concat(customWidth, "px") } : undefined // eslint-disable-next-line react/jsx-props-no-spreading }, rest, { className: ax([panelStyles.content, hasPadding && panelStyles.padding, customWidth && "", !visible && panelStyles.panelHidden, disableAnimation && panelStyles.disablePanelAnimation]) }), children); };