@atlaskit/tag
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -1,6 +0,16 @@ | ||
<a name="3.0.1"></a> | ||
## 3.0.1 (2017-08-30) | ||
<a name="3.0.2"></a> | ||
## 3.0.2 (2017-09-20) | ||
<a name="3.0.2"></a> | ||
## 3.0.2 (2017-09-20) | ||
### Bug Fixes | ||
* **component:** fix text colors, styling for colored tags ([8c48e98](https://bitbucket.org/atlassian/atlaskit/commits/8c48e98)) | ||
<a name="3.0.1"></a> | ||
@@ -7,0 +17,0 @@ ## 3.0.1 (2017-08-30) |
@@ -95,3 +95,3 @@ module.exports = /******/ | ||
}); | ||
var _extends2 = __webpack_require__(3), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _Chrome = __webpack_require__(9), _Chrome2 = _interopRequireDefault(_Chrome), _Content = __webpack_require__(17), _Content2 = _interopRequireDefault(_Content), _Remove = __webpack_require__(19), _Remove2 = _interopRequireDefault(_Remove), _Before = __webpack_require__(22), _Before2 = _interopRequireDefault(_Before), _Container = __webpack_require__(23), _Container2 = _interopRequireDefault(_Container), colorList = [ "standard", "green", "blue", "red", "purple", "grey", "teal", "yellow", "greenLight", "blueLight", "redLight", "purpleLight", "greyLight", "tealLight", "yellowLight" ], Tag = function(_PureComponent) { | ||
var _extends2 = __webpack_require__(3), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _Chrome = __webpack_require__(9), _Chrome2 = _interopRequireDefault(_Chrome), _Content = __webpack_require__(17), _Content2 = _interopRequireDefault(_Content), _Remove = __webpack_require__(20), _Remove2 = _interopRequireDefault(_Remove), _Before = __webpack_require__(23), _Before2 = _interopRequireDefault(_Before), _Container = __webpack_require__(24), _Container2 = _interopRequireDefault(_Container), colorList = [ "standard", "green", "blue", "red", "purple", "grey", "teal", "yellow", "greenLight", "blueLight", "redLight", "purpleLight", "greyLight", "tealLight", "yellowLight" ], Tag = function(_PureComponent) { | ||
// eslint-disable-line react/sort-comp | ||
@@ -628,8 +628,9 @@ function Tag(props) { | ||
}), exports.Link = exports.Text = void 0; | ||
var _taggedTemplateLiteral2 = __webpack_require__(11), _taggedTemplateLiteral3 = _interopRequireDefault(_taggedTemplateLiteral2), _templateObject = (0, | ||
_taggedTemplateLiteral3.default)([ "\n font-size: ", ";\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ], [ "\n font-size: ", ";\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ]), _templateObject2 = (0, | ||
var _objectWithoutProperties2 = __webpack_require__(19), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _taggedTemplateLiteral2 = __webpack_require__(11), _taggedTemplateLiteral3 = _interopRequireDefault(_taggedTemplateLiteral2), _templateObject = (0, | ||
_taggedTemplateLiteral3.default)([ "\n font-size: ", "px;\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ], [ "\n font-size: ", "px;\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ]), _templateObject2 = (0, | ||
_taggedTemplateLiteral3.default)([ "\n ", "\n" ], [ "\n ", "\n" ]), _templateObject3 = (0, | ||
_taggedTemplateLiteral3.default)([ "\n ", "\n ", "\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n" ], [ "\n ", "\n ", "\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n" ]), _styledComponents = __webpack_require__(12), _styledComponents2 = _interopRequireDefault(_styledComponents), _theme = __webpack_require__(13), _constants = __webpack_require__(14), COMMON_STYLES = (0, | ||
_styledComponents.css)(_templateObject, (0, _theme.fontSize)() + "px", (0, _theme.gridSize)() / 2, (0, | ||
_theme.gridSize)() / 2, function(_ref) { | ||
_taggedTemplateLiteral3.default)([ "color: inherit" ], [ "color: inherit" ]), _templateObject4 = (0, | ||
_taggedTemplateLiteral3.default)([ "color: ", "" ], [ "color: ", "" ]), _templateObject5 = (0, | ||
_taggedTemplateLiteral3.default)([ "\n ", "\n ", "\n text-decoration: ", ";\n\n &:hover {\n color: ", ";\n ", "\n }\n" ], [ "\n ", "\n ", "\n text-decoration: ", ";\n\n &:hover {\n color: ", ";\n ", "\n }\n" ]), _styledComponents = __webpack_require__(12), _styledComponents2 = _interopRequireDefault(_styledComponents), _theme = __webpack_require__(13), _constants = __webpack_require__(14), COMMON_STYLES = (0, | ||
_styledComponents.css)(_templateObject, _theme.fontSize, _theme.math.divide(_theme.gridSize, 2), _theme.math.divide(_theme.gridSize, 2), function(_ref) { | ||
var isRemovable = _ref.isRemovable; | ||
@@ -639,8 +640,19 @@ return isRemovable ? _constants.maxTextWidthUnitless - _constants.buttonWidthUnitless + "px" : _constants.maxTextWidth; | ||
function(_ref2) { | ||
var isFocused = _ref2.isFocused; | ||
return isFocused ? "color: " + _theme.link : null; | ||
var isFocused = _ref2.isFocused, color = _ref2.color, rest = (0, _objectWithoutProperties3.default)(_ref2, [ "isFocused", "color" ]); | ||
return "standard" !== color ? (0, _styledComponents.css)(_templateObject3) : isFocused ? (0, | ||
_styledComponents.css)(_templateObject4, (0, _theme.link)(rest)) : null; | ||
}); | ||
exports.Link = _styledComponents2.default.a(_templateObject3, COMMON_STYLES, getFocusedStyles, _theme.linkHover); | ||
exports.Link = _styledComponents2.default.a(_templateObject5, COMMON_STYLES, getFocusedStyles, function(_ref3) { | ||
var color = _ref3.color; | ||
return "standard" === color ? "none" : "underline"; | ||
}, _theme.linkHover, function(_ref4) { | ||
var color = _ref4.color; | ||
return "standard" === color ? "" : (0, _styledComponents.css)(_templateObject3); | ||
}); | ||
}, /* 19 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/helpers/objectWithoutProperties"); | ||
}, /* 20 */ | ||
/***/ | ||
function(module, exports, __webpack_require__) { | ||
@@ -656,3 +668,3 @@ "use strict"; | ||
}); | ||
var _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _cross = __webpack_require__(20), _cross2 = _interopRequireDefault(_cross), _Remove = __webpack_require__(21), _Remove2 = _interopRequireDefault(_Remove), Remove = function(_PureComponent) { | ||
var _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _cross = __webpack_require__(21), _cross2 = _interopRequireDefault(_cross), _Remove = __webpack_require__(22), _Remove2 = _interopRequireDefault(_Remove), Remove = function(_PureComponent) { | ||
function Remove() { | ||
@@ -695,7 +707,7 @@ var _temp, _this, _ret; | ||
}, exports.default = Remove; | ||
}, /* 20 */ | ||
}, /* 21 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("@atlaskit/icon/glyph/cross"); | ||
}, /* 21 */ | ||
}, /* 22 */ | ||
/***/ | ||
@@ -725,3 +737,3 @@ function(module, exports, __webpack_require__) { | ||
}, _theme.colors.N500, focusColor, _theme.colors.R500, _constants.focusRingColor); | ||
}, /* 22 */ | ||
}, /* 23 */ | ||
/***/ | ||
@@ -742,3 +754,3 @@ function(module, exports, __webpack_require__) { | ||
exports.default = _styledComponents2.default.span(_templateObject, gridSizeUnitless / 2); | ||
}, /* 23 */ | ||
}, /* 24 */ | ||
/***/ | ||
@@ -745,0 +757,0 @@ function(module, exports, __webpack_require__) { |
@@ -1,1 +0,1 @@ | ||
module.exports=function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={exports:{},id:t,loaded:!1};return e[t].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var r={};return o.m=e,o.c=r,o.p="",o(0)}([function(e,o,r){e.exports=r(1)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=r(2),l=t(n);o.default=l.default},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),s=r(5),d=t(s),u=r(6),c=t(u),h=r(7),f=t(h),g=r(8),p=t(g),m=r(9),v=t(m),b=r(17),x=t(b),k=r(19),R=t(k),y=r(22),L=t(y),N=r(23),B=t(N),w=["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"],_=function(e){function o(r){(0,a.default)(this,o);var t=(0,d.default)(this,e.call(this,r));return t.handleRemoveRequest=function(){t.props.onBeforeRemoveAction()&&t.setState({isRemoving:!0,isRemoved:!1})},t.handleRemoveComplete=function(){t.props.onAfterRemoveAction(t.props.text),t.setState({isRemoving:!1,isRemoved:!0})},t.handleHoverChange=function(e){t.setState({markedForRemoval:e})},t.handleFocusChange=function(e){t.setState({isFocused:e})},t.state={isRemoving:!1,isRemoved:!1,markedForRemoval:!1},t}return(0,c.default)(o,e),o.prototype.render=function(){var e=this,o=this.state,r=o.isFocused,t=o.isRemoved,n=o.isRemoving,i=o.markedForRemoval,a=this.props,s=a.appearance,d=a.elemBefore,u=a.href,c=a.removeButtonText,h=a.text,f=a.color,g=w.includes(f)?f:"standard",m=Boolean(c),b="rounded"===s,k={isFocused:r,isRemovable:m,isRemoved:t,isRemoving:n,isRounded:b,markedForRemoval:i,color:g},y=function(o){return n&&e.handleRemoveComplete(o)};return p.default.createElement(B.default,(0,l.default)({},k,{onAnimationEnd:y}),p.default.createElement(v.default,(0,l.default)({},k,{isLink:!!u,onFocusChange:this.handleFocusChange}),d?p.default.createElement(L.default,null,d):null,p.default.createElement(x.default,(0,l.default)({},k,{href:u}),h),m?p.default.createElement(R.default,(0,l.default)({},k,{onHoverChange:this.handleHoverChange,onRemoveAction:this.handleRemoveRequest,removeText:c})):null))},o}(g.PureComponent);_.propTypes={appearance:f.default.oneOf(["default","rounded"]),color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]),elemBefore:f.default.any,text:f.default.string.isRequired,href:f.default.string,removeButtonText:f.default.string,onBeforeRemoveAction:f.default.func,onAfterRemoveAction:f.default.func},_.defaultProps={color:"standard",appearance:"default",elemBefore:null,onAfterRemoveAction:function(){},onBeforeRemoveAction:function(){return!0}},o.default=_},function(e,o){e.exports=require("babel-runtime/helpers/extends")},function(e,o){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,o){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,o){e.exports=require("babel-runtime/helpers/inherits")},function(e,o){e.exports=require("prop-types")},function(e,o){e.exports=require("react")},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),s=r(6),d=t(s),u=r(7),c=t(u),h=r(8),f=t(h),g=r(10),p=t(g),m=(r(16),function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,s=Array(i),d=0;d<i;d++)s[d]=arguments[d];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(s))),t.handleKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;t.chromeRef&&o&&t.chromeRef.querySelector("a").click()},t.handleBlur=function(){t.props.onFocusChange(!1)},t.handleFocus=function(e){e.target===t.chromeRef&&t.props.onFocusChange(!0)},n=r,(0,a.default)(t,n)}return(0,d.default)(o,e),o.prototype.render=function(){var e=this,o=this.props,r=o.children,t=o.isLink,n=o.isRemovable,l=o.isRemoved,i=o.isRemoving,a=o.isRounded,s=o.markedForRemoval,d=o.color,u={innerRef:function(o){return e.chromeRef=o},isRemovable:n,isRemoved:l,isRemoving:i,isRounded:a,markedForRemoval:s,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyPress:this.handleKeyPress,tabIndex:-1,color:d};return t&&(u.role="link",u.tabIndex=0),f.default.createElement(p.default,u,r)},o}(h.PureComponent));m.propTypes={children:c.default.arrayOf(c.default.any).isRequired,isLink:c.default.bool.isRequired,isRemovable:c.default.bool.isRequired,isRemoved:c.default.bool,isRemoving:c.default.bool,isRounded:c.default.bool,markedForRemoval:c.default.bool.isRequired,onFocusChange:c.default.func.isRequired,color:c.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=m},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"],["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"]),a=r(12),s=t(a),d=r(13),u=r(14),c=r(15),h=(0,d.gridSize)(),f=(0,d.themed)({light:d.colors.R500,dark:d.colors.DN30}),g=(0,d.themed)({light:d.colors.N700,dark:d.colors.DN30}),p=(0,d.themed)({light:d.colors.R50,dark:d.colors.R100});o.default=s.default.span(i,u.focusRingColor,function(e){return e.markedForRemoval?p(e):(0,c.backgroundColor)(e)},function(e){return e.markedForRemoval?f(e):(0,c.textColor)(e)},function(e){var o=e.isRounded;return o?u.buttonWidthUnitless/2+"px":(0,d.borderRadius)()+"px"},u.tagHeight,h/2,function(e){var o=e.isRemoved,r=e.isRemoving;return o||r?"hidden":"initial"},function(e){return e.markedForRemoval?p(e):(0,c.backgroundColorHover)(e)},function(e){return e.markedForRemoval?g(e):(0,c.textColorHover)(e)})},function(e,o){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,o){e.exports=require("styled-components")},function(e,o){e.exports=require("@atlaskit/theme")},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.maxTextWidth=o.maxTextWidthUnitless=o.maxWidth=o.maxWidthUnitless=o.buttonWidth=o.buttonWidthUnitless=o.tagHeight=o.tagHeightUnitless=o.focusRingColor=void 0;var t=r(13),n=(o.focusRingColor=(0,t.themed)({light:t.colors.B100,dark:t.colors.B75}),o.tagHeightUnitless=2.5*(0,t.gridSize)()),l=o.tagHeight=n+"px",i=(o.buttonWidthUnitless=n,o.buttonWidth=l,o.maxWidthUnitless=25*(0,t.gridSize)()),a=(o.maxWidth=i+"px",o.maxTextWidthUnitless=i-n);o.maxTextWidth=a+"px"},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.backgroundColorHover=o.textColorHover=o.backgroundColor=o.textColor=void 0;var t=r(13),n=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.DN600},green:{light:t.colors.N800,dark:t.colors.N800},purple:{light:t.colors.N800,dark:t.colors.N800},red:{light:t.colors.N800,dark:t.colors.N800},yellow:{light:t.colors.N800,dark:t.colors.N800},grey:{light:t.colors.N0,dark:t.colors.N0},teal:{light:t.colors.N800,dark:t.colors.N800},blue:{light:t.colors.N800,dark:t.colors.N800},tealLight:{light:t.colors.N500,dark:t.colors.N500},blueLight:{light:t.colors.B500,dark:t.colors.B500},greenLight:{light:t.colors.G500,dark:t.colors.G500},purpleLight:{light:t.colors.P500,dark:t.colors.P500},redLight:{light:t.colors.N500,dark:t.colors.N500},yellowLight:{light:t.colors.N500,dark:t.colors.N500},greyLight:{light:t.colors.N500,dark:t.colors.N500}}),l=(0,t.themed)("color",{standard:{light:t.colors.N20,dark:t.colors.DN100A},green:{light:t.colors.G200,dark:t.colors.G200},purple:{light:t.colors.P100,dark:t.colors.P100},red:{light:t.colors.R100,dark:t.colors.R100},yellow:{light:t.colors.Y200,dark:t.colors.Y200},grey:{light:t.colors.N500,dark:t.colors.N500},teal:{light:t.colors.T200,dark:t.colors.T200},blue:{light:t.colors.B100,dark:t.colors.B100},tealLight:{light:t.colors.T100,dark:t.colors.T100},blueLight:{light:t.colors.B75,dark:t.colors.B75},greenLight:{light:t.colors.G100,dark:t.colors.G100},purpleLight:{light:t.colors.P75,dark:t.colors.P75},redLight:{light:t.colors.R75,dark:t.colors.R75},yellowLight:{light:t.colors.Y100,dark:t.colors.Y100},greyLight:{light:t.colors.N30,dark:t.colors.N30}});o.textColor=n,o.backgroundColor=l,o.textColorHover=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.B75},green:{light:t.colors.B400,dark:t.colors.B100},purple:{light:t.colors.B400,dark:t.colors.B100},red:{light:t.colors.B400,dark:t.colors.B100},yellow:{light:t.colors.B400,dark:t.colors.B100},grey:{light:t.colors.B400,dark:t.colors.B100},teal:{light:t.colors.B400,dark:t.colors.B100},blue:{light:t.colors.B400,dark:t.colors.B100},tealLight:{light:t.colors.B400,dark:t.colors.B100},blueLight:{light:t.colors.B400,dark:t.colors.B100},greenLight:{light:t.colors.B400,dark:t.colors.B100},purpleLight:{light:t.colors.B400,dark:t.colors.B100},redLight:{light:t.colors.B400,dark:t.colors.B100},yellowLight:{light:t.colors.B400,dark:t.colors.B100},greyLight:{light:t.colors.B400,dark:t.colors.B100}}),o.backgroundColorHover=(0,t.themed)("color",{standard:{light:t.colors.N30,dark:t.colors.DN60},green:{light:t.colors.G100,dark:t.colors.DN60},purple:{light:t.colors.P75,dark:t.colors.DN60},red:{light:t.colors.R75,dark:t.colors.DN60},yellow:{light:t.colors.Y100,dark:t.colors.DN60},grey:{light:t.colors.N50,dark:t.colors.DN60},teal:{light:t.colors.T100,dark:t.colors.DN60},blue:{light:t.colors.B75,dark:t.colors.DN60},tealLight:{light:t.colors.T75,dark:t.colors.DN60},blueLight:{light:t.colors.B50,dark:t.colors.DN60},greenLight:{light:t.colors.G75,dark:t.colors.DN60},purpleLight:{light:t.colors.P50,dark:t.colors.DN60},redLight:{light:t.colors.R50,dark:t.colors.DN60},yellowLight:{light:t.colors.Y75,dark:t.colors.DN60},greyLight:{light:t.colors.N30,dark:t.colors.DN60}})},function(e,o){"use strict"},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),s=r(5),d=t(s),u=r(6),c=t(u),h=r(7),f=t(h),g=r(8),p=t(g),m=r(18),v=(r(16),function(e){function o(){return(0,a.default)(this,o),(0,d.default)(this,e.apply(this,arguments))}return(0,c.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.children,r=e.href,t=e.isFocused,n=e.isRemovable,i=e.markedForRemoval,a=e.color,s={isFocused:t,isRemovable:n,markedForRemoval:i,color:a};return r?p.default.createElement(m.Link,(0,l.default)({},s,{href:r,tabIndex:"-1"}),o):p.default.createElement(m.Text,s,o)},o}(g.PureComponent));v.propTypes={children:f.default.any.isRequired,href:f.default.string,isFocused:f.default.bool,isRemovable:f.default.bool,markedForRemoval:f.default.bool,color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=v},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.Link=o.Text=void 0;var n=r(11),l=t(n),i=(0,l.default)(["\n font-size: ",";\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-size: ",";\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]),a=(0,l.default)(["\n ","\n"],["\n ","\n"]),s=(0,l.default)(["\n ","\n ","\n text-decoration: none;\n\n &:hover {\n color: ",";\n }\n"],["\n ","\n ","\n text-decoration: none;\n\n &:hover {\n color: ",";\n }\n"]),d=r(12),u=t(d),c=r(13),h=r(14),f=(0,d.css)(i,(0,c.fontSize)()+"px",(0,c.gridSize)()/2,(0,c.gridSize)()/2,function(e){var o=e.isRemovable;return o?h.maxTextWidthUnitless-h.buttonWidthUnitless+"px":h.maxTextWidth}),g=(o.Text=u.default.span(a,f),function(e){var o=e.isFocused;return o?"color: "+c.link:null});o.Link=u.default.a(s,f,g,c.linkHover)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),s=r(6),d=t(s),u=r(7),c=t(u),h=r(8),f=t(h),g=r(20),p=t(g),m=r(21),v=t(m),b=function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,s=Array(i),d=0;d<i;d++)s[d]=arguments[d];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(s))),t.onKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;o&&(e.stopPropagation(),t.props.onRemoveAction())},t.onMouseOver=function(){t.props.onHoverChange(!0)},t.onMouseOut=function(){t.props.onHoverChange(!1)},n=r,(0,a.default)(t,n)}return(0,d.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.isRounded,r=e.onRemoveAction,t=e.removeText;return f.default.createElement(v.default,{"aria-label":t,isRounded:o,onClick:r,onKeyPress:this.onKeyPress,onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,type:"button"},f.default.createElement(p.default,{label:t,size:"small"}))},o}(h.PureComponent);b.propTypes={removeText:c.default.string.isRequired,isRounded:c.default.bool,onHoverChange:c.default.func,onRemoveAction:c.default.func},o.default=b},function(e,o){e.exports=require("@atlaskit/icon/glyph/cross")},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"],["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"]),a=r(12),s=t(a),d=r(13),u=r(14),c=(0,d.themed)({light:d.colors.R300,dark:d.colors.R200});o.default=s.default.button(i,function(e){var o=e.isRounded;return o?u.buttonWidthUnitless/2+"px":(0,d.borderRadius)()+"px"},d.colors.N500,c,d.colors.R500,u.focusRingColor)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"],["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"]),a=r(12),s=t(a),d=r(13),u=(0,d.gridSize)();o.default=s.default.span(i,u/2)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function n(e){var o=e.isRemoved,r=void 0;return o&&(r="width: 0; visibility: hidden;"),r}function l(e){var o=e.isRemoving,r=void 0;return o&&(r="animation: "+f+" 250ms forwards; will-change: width;"),r}Object.defineProperty(o,"__esModule",{value:!0});var i=r(11),a=t(i),s=(0,a.default)(["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"],["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"]),d=(0,a.default)(["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"],["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"]),u=r(12),c=t(u),h=r(14),f=(0,u.keyframes)(s,h.maxWidth,.8*h.maxWidthUnitless);o.default=c.default.div(d,l,n)}]); | ||
module.exports=function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={exports:{},id:t,loaded:!1};return e[t].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var r={};return o.m=e,o.c=r,o.p="",o(0)}([function(e,o,r){e.exports=r(1)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=r(2),l=t(n);o.default=l.default},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),d=r(5),s=t(d),u=r(6),c=t(u),h=r(7),f=t(h),g=r(8),p=t(g),m=r(9),v=t(m),b=r(17),x=t(b),k=r(20),R=t(k),y=r(23),L=t(y),N=r(24),B=t(N),w=["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"],_=function(e){function o(r){(0,a.default)(this,o);var t=(0,s.default)(this,e.call(this,r));return t.handleRemoveRequest=function(){t.props.onBeforeRemoveAction()&&t.setState({isRemoving:!0,isRemoved:!1})},t.handleRemoveComplete=function(){t.props.onAfterRemoveAction(t.props.text),t.setState({isRemoving:!1,isRemoved:!0})},t.handleHoverChange=function(e){t.setState({markedForRemoval:e})},t.handleFocusChange=function(e){t.setState({isFocused:e})},t.state={isRemoving:!1,isRemoved:!1,markedForRemoval:!1},t}return(0,c.default)(o,e),o.prototype.render=function(){var e=this,o=this.state,r=o.isFocused,t=o.isRemoved,n=o.isRemoving,i=o.markedForRemoval,a=this.props,d=a.appearance,s=a.elemBefore,u=a.href,c=a.removeButtonText,h=a.text,f=a.color,g=w.includes(f)?f:"standard",m=Boolean(c),b="rounded"===d,k={isFocused:r,isRemovable:m,isRemoved:t,isRemoving:n,isRounded:b,markedForRemoval:i,color:g},y=function(o){return n&&e.handleRemoveComplete(o)};return p.default.createElement(B.default,(0,l.default)({},k,{onAnimationEnd:y}),p.default.createElement(v.default,(0,l.default)({},k,{isLink:!!u,onFocusChange:this.handleFocusChange}),s?p.default.createElement(L.default,null,s):null,p.default.createElement(x.default,(0,l.default)({},k,{href:u}),h),m?p.default.createElement(R.default,(0,l.default)({},k,{onHoverChange:this.handleHoverChange,onRemoveAction:this.handleRemoveRequest,removeText:c})):null))},o}(g.PureComponent);_.propTypes={appearance:f.default.oneOf(["default","rounded"]),color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]),elemBefore:f.default.any,text:f.default.string.isRequired,href:f.default.string,removeButtonText:f.default.string,onBeforeRemoveAction:f.default.func,onAfterRemoveAction:f.default.func},_.defaultProps={color:"standard",appearance:"default",elemBefore:null,onAfterRemoveAction:function(){},onBeforeRemoveAction:function(){return!0}},o.default=_},function(e,o){e.exports=require("babel-runtime/helpers/extends")},function(e,o){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,o){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,o){e.exports=require("babel-runtime/helpers/inherits")},function(e,o){e.exports=require("prop-types")},function(e,o){e.exports=require("react")},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),d=r(6),s=t(d),u=r(7),c=t(u),h=r(8),f=t(h),g=r(10),p=t(g),m=(r(16),function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,d=Array(i),s=0;s<i;s++)d[s]=arguments[s];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(d))),t.handleKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;t.chromeRef&&o&&t.chromeRef.querySelector("a").click()},t.handleBlur=function(){t.props.onFocusChange(!1)},t.handleFocus=function(e){e.target===t.chromeRef&&t.props.onFocusChange(!0)},n=r,(0,a.default)(t,n)}return(0,s.default)(o,e),o.prototype.render=function(){var e=this,o=this.props,r=o.children,t=o.isLink,n=o.isRemovable,l=o.isRemoved,i=o.isRemoving,a=o.isRounded,d=o.markedForRemoval,s=o.color,u={innerRef:function(o){return e.chromeRef=o},isRemovable:n,isRemoved:l,isRemoving:i,isRounded:a,markedForRemoval:d,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyPress:this.handleKeyPress,tabIndex:-1,color:s};return t&&(u.role="link",u.tabIndex=0),f.default.createElement(p.default,u,r)},o}(h.PureComponent));m.propTypes={children:c.default.arrayOf(c.default.any).isRequired,isLink:c.default.bool.isRequired,isRemovable:c.default.bool.isRequired,isRemoved:c.default.bool,isRemoving:c.default.bool,isRounded:c.default.bool,markedForRemoval:c.default.bool.isRequired,onFocusChange:c.default.func.isRequired,color:c.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=m},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"],["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"]),a=r(12),d=t(a),s=r(13),u=r(14),c=r(15),h=(0,s.gridSize)(),f=(0,s.themed)({light:s.colors.R500,dark:s.colors.DN30}),g=(0,s.themed)({light:s.colors.N700,dark:s.colors.DN30}),p=(0,s.themed)({light:s.colors.R50,dark:s.colors.R100});o.default=d.default.span(i,u.focusRingColor,function(e){return e.markedForRemoval?p(e):(0,c.backgroundColor)(e)},function(e){return e.markedForRemoval?f(e):(0,c.textColor)(e)},function(e){var o=e.isRounded;return o?u.buttonWidthUnitless/2+"px":(0,s.borderRadius)()+"px"},u.tagHeight,h/2,function(e){var o=e.isRemoved,r=e.isRemoving;return o||r?"hidden":"initial"},function(e){return e.markedForRemoval?p(e):(0,c.backgroundColorHover)(e)},function(e){return e.markedForRemoval?g(e):(0,c.textColorHover)(e)})},function(e,o){e.exports=require("babel-runtime/helpers/taggedTemplateLiteral")},function(e,o){e.exports=require("styled-components")},function(e,o){e.exports=require("@atlaskit/theme")},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.maxTextWidth=o.maxTextWidthUnitless=o.maxWidth=o.maxWidthUnitless=o.buttonWidth=o.buttonWidthUnitless=o.tagHeight=o.tagHeightUnitless=o.focusRingColor=void 0;var t=r(13),n=(o.focusRingColor=(0,t.themed)({light:t.colors.B100,dark:t.colors.B75}),o.tagHeightUnitless=2.5*(0,t.gridSize)()),l=o.tagHeight=n+"px",i=(o.buttonWidthUnitless=n,o.buttonWidth=l,o.maxWidthUnitless=25*(0,t.gridSize)()),a=(o.maxWidth=i+"px",o.maxTextWidthUnitless=i-n);o.maxTextWidth=a+"px"},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.backgroundColorHover=o.textColorHover=o.backgroundColor=o.textColor=void 0;var t=r(13),n=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.DN600},green:{light:t.colors.N800,dark:t.colors.N800},purple:{light:t.colors.N800,dark:t.colors.N800},red:{light:t.colors.N800,dark:t.colors.N800},yellow:{light:t.colors.N800,dark:t.colors.N800},grey:{light:t.colors.N0,dark:t.colors.N0},teal:{light:t.colors.N800,dark:t.colors.N800},blue:{light:t.colors.N800,dark:t.colors.N800},tealLight:{light:t.colors.N500,dark:t.colors.N500},blueLight:{light:t.colors.B500,dark:t.colors.B500},greenLight:{light:t.colors.G500,dark:t.colors.G500},purpleLight:{light:t.colors.P500,dark:t.colors.P500},redLight:{light:t.colors.N500,dark:t.colors.N500},yellowLight:{light:t.colors.N500,dark:t.colors.N500},greyLight:{light:t.colors.N500,dark:t.colors.N500}}),l=(0,t.themed)("color",{standard:{light:t.colors.N20,dark:t.colors.DN100A},green:{light:t.colors.G200,dark:t.colors.G200},purple:{light:t.colors.P100,dark:t.colors.P100},red:{light:t.colors.R100,dark:t.colors.R100},yellow:{light:t.colors.Y200,dark:t.colors.Y200},grey:{light:t.colors.N500,dark:t.colors.N500},teal:{light:t.colors.T200,dark:t.colors.T200},blue:{light:t.colors.B100,dark:t.colors.B100},tealLight:{light:t.colors.T100,dark:t.colors.T100},blueLight:{light:t.colors.B75,dark:t.colors.B75},greenLight:{light:t.colors.G100,dark:t.colors.G100},purpleLight:{light:t.colors.P75,dark:t.colors.P75},redLight:{light:t.colors.R75,dark:t.colors.R75},yellowLight:{light:t.colors.Y100,dark:t.colors.Y100},greyLight:{light:t.colors.N30,dark:t.colors.N30}});o.textColor=n,o.backgroundColor=l,o.textColorHover=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.B75},green:{light:t.colors.B400,dark:t.colors.B100},purple:{light:t.colors.B400,dark:t.colors.B100},red:{light:t.colors.B400,dark:t.colors.B100},yellow:{light:t.colors.B400,dark:t.colors.B100},grey:{light:t.colors.B400,dark:t.colors.B100},teal:{light:t.colors.B400,dark:t.colors.B100},blue:{light:t.colors.B400,dark:t.colors.B100},tealLight:{light:t.colors.B400,dark:t.colors.B100},blueLight:{light:t.colors.B400,dark:t.colors.B100},greenLight:{light:t.colors.B400,dark:t.colors.B100},purpleLight:{light:t.colors.B400,dark:t.colors.B100},redLight:{light:t.colors.B400,dark:t.colors.B100},yellowLight:{light:t.colors.B400,dark:t.colors.B100},greyLight:{light:t.colors.B400,dark:t.colors.B100}}),o.backgroundColorHover=(0,t.themed)("color",{standard:{light:t.colors.N30,dark:t.colors.DN60},green:{light:t.colors.G100,dark:t.colors.DN60},purple:{light:t.colors.P75,dark:t.colors.DN60},red:{light:t.colors.R75,dark:t.colors.DN60},yellow:{light:t.colors.Y100,dark:t.colors.DN60},grey:{light:t.colors.N50,dark:t.colors.DN60},teal:{light:t.colors.T100,dark:t.colors.DN60},blue:{light:t.colors.B75,dark:t.colors.DN60},tealLight:{light:t.colors.T75,dark:t.colors.DN60},blueLight:{light:t.colors.B50,dark:t.colors.DN60},greenLight:{light:t.colors.G75,dark:t.colors.DN60},purpleLight:{light:t.colors.P50,dark:t.colors.DN60},redLight:{light:t.colors.R50,dark:t.colors.DN60},yellowLight:{light:t.colors.Y75,dark:t.colors.DN60},greyLight:{light:t.colors.N30,dark:t.colors.DN60}})},function(e,o){"use strict"},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),d=r(5),s=t(d),u=r(6),c=t(u),h=r(7),f=t(h),g=r(8),p=t(g),m=r(18),v=(r(16),function(e){function o(){return(0,a.default)(this,o),(0,s.default)(this,e.apply(this,arguments))}return(0,c.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.children,r=e.href,t=e.isFocused,n=e.isRemovable,i=e.markedForRemoval,a=e.color,d={isFocused:t,isRemovable:n,markedForRemoval:i,color:a};return r?p.default.createElement(m.Link,(0,l.default)({},d,{href:r,tabIndex:"-1"}),o):p.default.createElement(m.Text,d,o)},o}(g.PureComponent));v.propTypes={children:f.default.any.isRequired,href:f.default.string,isFocused:f.default.bool,isRemovable:f.default.bool,markedForRemoval:f.default.bool,color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=v},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.Link=o.Text=void 0;var n=r(19),l=t(n),i=r(11),a=t(i),d=(0,a.default)(["\n font-size: ","px;\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-size: ","px;\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]),s=(0,a.default)(["\n ","\n"],["\n ","\n"]),u=(0,a.default)(["color: inherit"],["color: inherit"]),c=(0,a.default)(["color: ",""],["color: ",""]),h=(0,a.default)(["\n ","\n ","\n text-decoration: ",";\n\n &:hover {\n color: ",";\n ","\n }\n"],["\n ","\n ","\n text-decoration: ",";\n\n &:hover {\n color: ",";\n ","\n }\n"]),f=r(12),g=t(f),p=r(13),m=r(14),v=(0,f.css)(d,p.fontSize,p.math.divide(p.gridSize,2),p.math.divide(p.gridSize,2),function(e){var o=e.isRemovable;return o?m.maxTextWidthUnitless-m.buttonWidthUnitless+"px":m.maxTextWidth}),b=(o.Text=g.default.span(s,v),function(e){var o=e.isFocused,r=e.color,t=(0,l.default)(e,["isFocused","color"]);return"standard"!==r?(0,f.css)(u):o?(0,f.css)(c,(0,p.link)(t)):null});o.Link=g.default.a(h,v,b,function(e){var o=e.color;return"standard"===o?"none":"underline"},p.linkHover,function(e){var o=e.color;return"standard"===o?"":(0,f.css)(u)})},function(e,o){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),d=r(6),s=t(d),u=r(7),c=t(u),h=r(8),f=t(h),g=r(21),p=t(g),m=r(22),v=t(m),b=function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,d=Array(i),s=0;s<i;s++)d[s]=arguments[s];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(d))),t.onKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;o&&(e.stopPropagation(),t.props.onRemoveAction())},t.onMouseOver=function(){t.props.onHoverChange(!0)},t.onMouseOut=function(){t.props.onHoverChange(!1)},n=r,(0,a.default)(t,n)}return(0,s.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.isRounded,r=e.onRemoveAction,t=e.removeText;return f.default.createElement(v.default,{"aria-label":t,isRounded:o,onClick:r,onKeyPress:this.onKeyPress,onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,type:"button"},f.default.createElement(p.default,{label:t,size:"small"}))},o}(h.PureComponent);b.propTypes={removeText:c.default.string.isRequired,isRounded:c.default.bool,onHoverChange:c.default.func,onRemoveAction:c.default.func},o.default=b},function(e,o){e.exports=require("@atlaskit/icon/glyph/cross")},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"],["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"]),a=r(12),d=t(a),s=r(13),u=r(14),c=(0,s.themed)({light:s.colors.R300,dark:s.colors.R200});o.default=d.default.button(i,function(e){var o=e.isRounded;return o?u.buttonWidthUnitless/2+"px":(0,s.borderRadius)()+"px"},s.colors.N500,c,s.colors.R500,u.focusRingColor)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"],["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"]),a=r(12),d=t(a),s=r(13),u=(0,s.gridSize)();o.default=d.default.span(i,u/2)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function n(e){var o=e.isRemoved,r=void 0;return o&&(r="width: 0; visibility: hidden;"),r}function l(e){var o=e.isRemoving,r=void 0;return o&&(r="animation: "+f+" 250ms forwards; will-change: width;"),r}Object.defineProperty(o,"__esModule",{value:!0});var i=r(11),a=t(i),d=(0,a.default)(["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"],["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"]),s=(0,a.default)(["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"],["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"]),u=r(12),c=t(u),h=r(14),f=(0,u.keyframes)(d,h.maxWidth,.8*h.maxWidthUnitless);o.default=c.default.div(s,l,n)}]); |
!function(root, factory) { | ||
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("babel-runtime/helpers/extends"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/taggedTemplateLiteral"), require("styled-components"), require("@atlaskit/theme"), require("@atlaskit/icon/glyph/cross")) : "function" == typeof define && define.amd ? define([ "babel-runtime/helpers/extends", "babel-runtime/helpers/classCallCheck", "babel-runtime/helpers/possibleConstructorReturn", "babel-runtime/helpers/inherits", "prop-types", "react", "babel-runtime/helpers/taggedTemplateLiteral", "styled-components", "@atlaskit/theme", "@atlaskit/icon/glyph/cross" ], factory) : "object" == typeof exports ? exports["@atlaskit/tag"] = factory(require("babel-runtime/helpers/extends"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/taggedTemplateLiteral"), require("styled-components"), require("@atlaskit/theme"), require("@atlaskit/icon/glyph/cross")) : root["@atlaskit/tag"] = factory(root["babel-runtime/helpers/extends"], root["babel-runtime/helpers/classCallCheck"], root["babel-runtime/helpers/possibleConstructorReturn"], root["babel-runtime/helpers/inherits"], root["prop-types"], root.react, root["babel-runtime/helpers/taggedTemplateLiteral"], root["styled-components"], root["@atlaskit/theme"], root["@atlaskit/icon/glyph/cross"]); | ||
}(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__, __WEBPACK_EXTERNAL_MODULE_13__, __WEBPACK_EXTERNAL_MODULE_20__) { | ||
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("babel-runtime/helpers/extends"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/taggedTemplateLiteral"), require("styled-components"), require("@atlaskit/theme"), require("babel-runtime/helpers/objectWithoutProperties"), require("@atlaskit/icon/glyph/cross")) : "function" == typeof define && define.amd ? define([ "babel-runtime/helpers/extends", "babel-runtime/helpers/classCallCheck", "babel-runtime/helpers/possibleConstructorReturn", "babel-runtime/helpers/inherits", "prop-types", "react", "babel-runtime/helpers/taggedTemplateLiteral", "styled-components", "@atlaskit/theme", "babel-runtime/helpers/objectWithoutProperties", "@atlaskit/icon/glyph/cross" ], factory) : "object" == typeof exports ? exports["@atlaskit/tag"] = factory(require("babel-runtime/helpers/extends"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/taggedTemplateLiteral"), require("styled-components"), require("@atlaskit/theme"), require("babel-runtime/helpers/objectWithoutProperties"), require("@atlaskit/icon/glyph/cross")) : root["@atlaskit/tag"] = factory(root["babel-runtime/helpers/extends"], root["babel-runtime/helpers/classCallCheck"], root["babel-runtime/helpers/possibleConstructorReturn"], root["babel-runtime/helpers/inherits"], root["prop-types"], root.react, root["babel-runtime/helpers/taggedTemplateLiteral"], root["styled-components"], root["@atlaskit/theme"], root["babel-runtime/helpers/objectWithoutProperties"], root["@atlaskit/icon/glyph/cross"]); | ||
}(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__, __WEBPACK_EXTERNAL_MODULE_13__, __WEBPACK_EXTERNAL_MODULE_19__, __WEBPACK_EXTERNAL_MODULE_21__) { | ||
/******/ | ||
@@ -98,3 +98,3 @@ return function(modules) { | ||
}); | ||
var _extends2 = __webpack_require__(3), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _Chrome = __webpack_require__(9), _Chrome2 = _interopRequireDefault(_Chrome), _Content = __webpack_require__(17), _Content2 = _interopRequireDefault(_Content), _Remove = __webpack_require__(19), _Remove2 = _interopRequireDefault(_Remove), _Before = __webpack_require__(22), _Before2 = _interopRequireDefault(_Before), _Container = __webpack_require__(23), _Container2 = _interopRequireDefault(_Container), colorList = [ "standard", "green", "blue", "red", "purple", "grey", "teal", "yellow", "greenLight", "blueLight", "redLight", "purpleLight", "greyLight", "tealLight", "yellowLight" ], Tag = function(_PureComponent) { | ||
var _extends2 = __webpack_require__(3), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _Chrome = __webpack_require__(9), _Chrome2 = _interopRequireDefault(_Chrome), _Content = __webpack_require__(17), _Content2 = _interopRequireDefault(_Content), _Remove = __webpack_require__(20), _Remove2 = _interopRequireDefault(_Remove), _Before = __webpack_require__(23), _Before2 = _interopRequireDefault(_Before), _Container = __webpack_require__(24), _Container2 = _interopRequireDefault(_Container), colorList = [ "standard", "green", "blue", "red", "purple", "grey", "teal", "yellow", "greenLight", "blueLight", "redLight", "purpleLight", "greyLight", "tealLight", "yellowLight" ], Tag = function(_PureComponent) { | ||
// eslint-disable-line react/sort-comp | ||
@@ -631,8 +631,9 @@ function Tag(props) { | ||
}), exports.Link = exports.Text = void 0; | ||
var _taggedTemplateLiteral2 = __webpack_require__(11), _taggedTemplateLiteral3 = _interopRequireDefault(_taggedTemplateLiteral2), _templateObject = (0, | ||
_taggedTemplateLiteral3.default)([ "\n font-size: ", ";\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ], [ "\n font-size: ", ";\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ]), _templateObject2 = (0, | ||
var _objectWithoutProperties2 = __webpack_require__(19), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _taggedTemplateLiteral2 = __webpack_require__(11), _taggedTemplateLiteral3 = _interopRequireDefault(_taggedTemplateLiteral2), _templateObject = (0, | ||
_taggedTemplateLiteral3.default)([ "\n font-size: ", "px;\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ], [ "\n font-size: ", "px;\n font-weight: normal;\n line-height: 1;\n margin-left: ", "px;\n margin-right: ", "px;\n padding: 2px 0;\n max-width: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n" ]), _templateObject2 = (0, | ||
_taggedTemplateLiteral3.default)([ "\n ", "\n" ], [ "\n ", "\n" ]), _templateObject3 = (0, | ||
_taggedTemplateLiteral3.default)([ "\n ", "\n ", "\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n" ], [ "\n ", "\n ", "\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n" ]), _styledComponents = __webpack_require__(12), _styledComponents2 = _interopRequireDefault(_styledComponents), _theme = __webpack_require__(13), _constants = __webpack_require__(14), COMMON_STYLES = (0, | ||
_styledComponents.css)(_templateObject, (0, _theme.fontSize)() + "px", (0, _theme.gridSize)() / 2, (0, | ||
_theme.gridSize)() / 2, function(_ref) { | ||
_taggedTemplateLiteral3.default)([ "color: inherit" ], [ "color: inherit" ]), _templateObject4 = (0, | ||
_taggedTemplateLiteral3.default)([ "color: ", "" ], [ "color: ", "" ]), _templateObject5 = (0, | ||
_taggedTemplateLiteral3.default)([ "\n ", "\n ", "\n text-decoration: ", ";\n\n &:hover {\n color: ", ";\n ", "\n }\n" ], [ "\n ", "\n ", "\n text-decoration: ", ";\n\n &:hover {\n color: ", ";\n ", "\n }\n" ]), _styledComponents = __webpack_require__(12), _styledComponents2 = _interopRequireDefault(_styledComponents), _theme = __webpack_require__(13), _constants = __webpack_require__(14), COMMON_STYLES = (0, | ||
_styledComponents.css)(_templateObject, _theme.fontSize, _theme.math.divide(_theme.gridSize, 2), _theme.math.divide(_theme.gridSize, 2), function(_ref) { | ||
var isRemovable = _ref.isRemovable; | ||
@@ -642,8 +643,19 @@ return isRemovable ? _constants.maxTextWidthUnitless - _constants.buttonWidthUnitless + "px" : _constants.maxTextWidth; | ||
function(_ref2) { | ||
var isFocused = _ref2.isFocused; | ||
return isFocused ? "color: " + _theme.link : null; | ||
var isFocused = _ref2.isFocused, color = _ref2.color, rest = (0, _objectWithoutProperties3.default)(_ref2, [ "isFocused", "color" ]); | ||
return "standard" !== color ? (0, _styledComponents.css)(_templateObject3) : isFocused ? (0, | ||
_styledComponents.css)(_templateObject4, (0, _theme.link)(rest)) : null; | ||
}); | ||
exports.Link = _styledComponents2.default.a(_templateObject3, COMMON_STYLES, getFocusedStyles, _theme.linkHover); | ||
exports.Link = _styledComponents2.default.a(_templateObject5, COMMON_STYLES, getFocusedStyles, function(_ref3) { | ||
var color = _ref3.color; | ||
return "standard" === color ? "none" : "underline"; | ||
}, _theme.linkHover, function(_ref4) { | ||
var color = _ref4.color; | ||
return "standard" === color ? "" : (0, _styledComponents.css)(_templateObject3); | ||
}); | ||
}, /* 19 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_19__; | ||
}, /* 20 */ | ||
/***/ | ||
function(module, exports, __webpack_require__) { | ||
@@ -659,3 +671,3 @@ "use strict"; | ||
}); | ||
var _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _cross = __webpack_require__(20), _cross2 = _interopRequireDefault(_cross), _Remove = __webpack_require__(21), _Remove2 = _interopRequireDefault(_Remove), Remove = function(_PureComponent) { | ||
var _classCallCheck2 = __webpack_require__(4), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(5), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(6), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(7), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(8), _react2 = _interopRequireDefault(_react), _cross = __webpack_require__(21), _cross2 = _interopRequireDefault(_cross), _Remove = __webpack_require__(22), _Remove2 = _interopRequireDefault(_Remove), Remove = function(_PureComponent) { | ||
function Remove() { | ||
@@ -698,7 +710,7 @@ var _temp, _this, _ret; | ||
}, exports.default = Remove; | ||
}, /* 20 */ | ||
}, /* 21 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_20__; | ||
}, /* 21 */ | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_21__; | ||
}, /* 22 */ | ||
/***/ | ||
@@ -728,3 +740,3 @@ function(module, exports, __webpack_require__) { | ||
}, _theme.colors.N500, focusColor, _theme.colors.R500, _constants.focusRingColor); | ||
}, /* 22 */ | ||
}, /* 23 */ | ||
/***/ | ||
@@ -745,3 +757,3 @@ function(module, exports, __webpack_require__) { | ||
exports.default = _styledComponents2.default.span(_templateObject, gridSizeUnitless / 2); | ||
}, /* 23 */ | ||
}, /* 24 */ | ||
/***/ | ||
@@ -748,0 +760,0 @@ function(module, exports, __webpack_require__) { |
@@ -1,1 +0,1 @@ | ||
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("babel-runtime/helpers/extends"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/theme"),require("@atlaskit/icon/glyph/cross")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/extends","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","prop-types","react","babel-runtime/helpers/taggedTemplateLiteral","styled-components","@atlaskit/theme","@atlaskit/icon/glyph/cross"],o):"object"==typeof exports?exports["@atlaskit/tag"]=o(require("babel-runtime/helpers/extends"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/theme"),require("@atlaskit/icon/glyph/cross")):e["@atlaskit/tag"]=o(e["babel-runtime/helpers/extends"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e["prop-types"],e.react,e["babel-runtime/helpers/taggedTemplateLiteral"],e["styled-components"],e["@atlaskit/theme"],e["@atlaskit/icon/glyph/cross"])}(this,function(e,o,r,t,n,l,i,a,s,d){return function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={exports:{},id:t,loaded:!1};return e[t].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var r={};return o.m=e,o.c=r,o.p="",o(0)}([function(e,o,r){e.exports=r(1)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=r(2),l=t(n);o.default=l.default},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),s=r(5),d=t(s),u=r(6),c=t(u),h=r(7),f=t(h),g=r(8),p=t(g),m=r(9),b=t(m),v=r(17),k=t(v),x=r(19),R=t(x),y=r(22),L=t(y),N=r(23),B=t(N),w=["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"],C=function(e){function o(r){(0,a.default)(this,o);var t=(0,d.default)(this,e.call(this,r));return t.handleRemoveRequest=function(){t.props.onBeforeRemoveAction()&&t.setState({isRemoving:!0,isRemoved:!1})},t.handleRemoveComplete=function(){t.props.onAfterRemoveAction(t.props.text),t.setState({isRemoving:!1,isRemoved:!0})},t.handleHoverChange=function(e){t.setState({markedForRemoval:e})},t.handleFocusChange=function(e){t.setState({isFocused:e})},t.state={isRemoving:!1,isRemoved:!1,markedForRemoval:!1},t}return(0,c.default)(o,e),o.prototype.render=function(){var e=this,o=this.state,r=o.isFocused,t=o.isRemoved,n=o.isRemoving,i=o.markedForRemoval,a=this.props,s=a.appearance,d=a.elemBefore,u=a.href,c=a.removeButtonText,h=a.text,f=a.color,g=w.includes(f)?f:"standard",m=Boolean(c),v="rounded"===s,x={isFocused:r,isRemovable:m,isRemoved:t,isRemoving:n,isRounded:v,markedForRemoval:i,color:g},y=function(o){return n&&e.handleRemoveComplete(o)};return p.default.createElement(B.default,(0,l.default)({},x,{onAnimationEnd:y}),p.default.createElement(b.default,(0,l.default)({},x,{isLink:!!u,onFocusChange:this.handleFocusChange}),d?p.default.createElement(L.default,null,d):null,p.default.createElement(k.default,(0,l.default)({},x,{href:u}),h),m?p.default.createElement(R.default,(0,l.default)({},x,{onHoverChange:this.handleHoverChange,onRemoveAction:this.handleRemoveRequest,removeText:c})):null))},o}(g.PureComponent);C.propTypes={appearance:f.default.oneOf(["default","rounded"]),color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]),elemBefore:f.default.any,text:f.default.string.isRequired,href:f.default.string,removeButtonText:f.default.string,onBeforeRemoveAction:f.default.func,onAfterRemoveAction:f.default.func},C.defaultProps={color:"standard",appearance:"default",elemBefore:null,onAfterRemoveAction:function(){},onBeforeRemoveAction:function(){return!0}},o.default=C},function(o,r){o.exports=e},function(e,r){e.exports=o},function(e,o){e.exports=r},function(e,o){e.exports=t},function(e,o){e.exports=n},function(e,o){e.exports=l},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),s=r(6),d=t(s),u=r(7),c=t(u),h=r(8),f=t(h),g=r(10),p=t(g),m=(r(16),function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,s=Array(i),d=0;d<i;d++)s[d]=arguments[d];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(s))),t.handleKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;t.chromeRef&&o&&t.chromeRef.querySelector("a").click()},t.handleBlur=function(){t.props.onFocusChange(!1)},t.handleFocus=function(e){e.target===t.chromeRef&&t.props.onFocusChange(!0)},n=r,(0,a.default)(t,n)}return(0,d.default)(o,e),o.prototype.render=function(){var e=this,o=this.props,r=o.children,t=o.isLink,n=o.isRemovable,l=o.isRemoved,i=o.isRemoving,a=o.isRounded,s=o.markedForRemoval,d=o.color,u={innerRef:function(o){return e.chromeRef=o},isRemovable:n,isRemoved:l,isRemoving:i,isRounded:a,markedForRemoval:s,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyPress:this.handleKeyPress,tabIndex:-1,color:d};return t&&(u.role="link",u.tabIndex=0),f.default.createElement(p.default,u,r)},o}(h.PureComponent));m.propTypes={children:c.default.arrayOf(c.default.any).isRequired,isLink:c.default.bool.isRequired,isRemovable:c.default.bool.isRequired,isRemoved:c.default.bool,isRemoving:c.default.bool,isRounded:c.default.bool,markedForRemoval:c.default.bool.isRequired,onFocusChange:c.default.func.isRequired,color:c.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=m},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"],["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"]),a=r(12),s=t(a),d=r(13),u=r(14),c=r(15),h=(0,d.gridSize)(),f=(0,d.themed)({light:d.colors.R500,dark:d.colors.DN30}),g=(0,d.themed)({light:d.colors.N700,dark:d.colors.DN30}),p=(0,d.themed)({light:d.colors.R50,dark:d.colors.R100});o.default=s.default.span(i,u.focusRingColor,function(e){return e.markedForRemoval?p(e):(0,c.backgroundColor)(e)},function(e){return e.markedForRemoval?f(e):(0,c.textColor)(e)},function(e){var o=e.isRounded;return o?u.buttonWidthUnitless/2+"px":(0,d.borderRadius)()+"px"},u.tagHeight,h/2,function(e){var o=e.isRemoved,r=e.isRemoving;return o||r?"hidden":"initial"},function(e){return e.markedForRemoval?p(e):(0,c.backgroundColorHover)(e)},function(e){return e.markedForRemoval?g(e):(0,c.textColorHover)(e)})},function(e,o){e.exports=i},function(e,o){e.exports=a},function(e,o){e.exports=s},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.maxTextWidth=o.maxTextWidthUnitless=o.maxWidth=o.maxWidthUnitless=o.buttonWidth=o.buttonWidthUnitless=o.tagHeight=o.tagHeightUnitless=o.focusRingColor=void 0;var t=r(13),n=(o.focusRingColor=(0,t.themed)({light:t.colors.B100,dark:t.colors.B75}),o.tagHeightUnitless=2.5*(0,t.gridSize)()),l=o.tagHeight=n+"px",i=(o.buttonWidthUnitless=n,o.buttonWidth=l,o.maxWidthUnitless=25*(0,t.gridSize)()),a=(o.maxWidth=i+"px",o.maxTextWidthUnitless=i-n);o.maxTextWidth=a+"px"},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.backgroundColorHover=o.textColorHover=o.backgroundColor=o.textColor=void 0;var t=r(13),n=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.DN600},green:{light:t.colors.N800,dark:t.colors.N800},purple:{light:t.colors.N800,dark:t.colors.N800},red:{light:t.colors.N800,dark:t.colors.N800},yellow:{light:t.colors.N800,dark:t.colors.N800},grey:{light:t.colors.N0,dark:t.colors.N0},teal:{light:t.colors.N800,dark:t.colors.N800},blue:{light:t.colors.N800,dark:t.colors.N800},tealLight:{light:t.colors.N500,dark:t.colors.N500},blueLight:{light:t.colors.B500,dark:t.colors.B500},greenLight:{light:t.colors.G500,dark:t.colors.G500},purpleLight:{light:t.colors.P500,dark:t.colors.P500},redLight:{light:t.colors.N500,dark:t.colors.N500},yellowLight:{light:t.colors.N500,dark:t.colors.N500},greyLight:{light:t.colors.N500,dark:t.colors.N500}}),l=(0,t.themed)("color",{standard:{light:t.colors.N20,dark:t.colors.DN100A},green:{light:t.colors.G200,dark:t.colors.G200},purple:{light:t.colors.P100,dark:t.colors.P100},red:{light:t.colors.R100,dark:t.colors.R100},yellow:{light:t.colors.Y200,dark:t.colors.Y200},grey:{light:t.colors.N500,dark:t.colors.N500},teal:{light:t.colors.T200,dark:t.colors.T200},blue:{light:t.colors.B100,dark:t.colors.B100},tealLight:{light:t.colors.T100,dark:t.colors.T100},blueLight:{light:t.colors.B75,dark:t.colors.B75},greenLight:{light:t.colors.G100,dark:t.colors.G100},purpleLight:{light:t.colors.P75,dark:t.colors.P75},redLight:{light:t.colors.R75,dark:t.colors.R75},yellowLight:{light:t.colors.Y100,dark:t.colors.Y100},greyLight:{light:t.colors.N30,dark:t.colors.N30}});o.textColor=n,o.backgroundColor=l,o.textColorHover=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.B75},green:{light:t.colors.B400,dark:t.colors.B100},purple:{light:t.colors.B400,dark:t.colors.B100},red:{light:t.colors.B400,dark:t.colors.B100},yellow:{light:t.colors.B400,dark:t.colors.B100},grey:{light:t.colors.B400,dark:t.colors.B100},teal:{light:t.colors.B400,dark:t.colors.B100},blue:{light:t.colors.B400,dark:t.colors.B100},tealLight:{light:t.colors.B400,dark:t.colors.B100},blueLight:{light:t.colors.B400,dark:t.colors.B100},greenLight:{light:t.colors.B400,dark:t.colors.B100},purpleLight:{light:t.colors.B400,dark:t.colors.B100},redLight:{light:t.colors.B400,dark:t.colors.B100},yellowLight:{light:t.colors.B400,dark:t.colors.B100},greyLight:{light:t.colors.B400,dark:t.colors.B100}}),o.backgroundColorHover=(0,t.themed)("color",{standard:{light:t.colors.N30,dark:t.colors.DN60},green:{light:t.colors.G100,dark:t.colors.DN60},purple:{light:t.colors.P75,dark:t.colors.DN60},red:{light:t.colors.R75,dark:t.colors.DN60},yellow:{light:t.colors.Y100,dark:t.colors.DN60},grey:{light:t.colors.N50,dark:t.colors.DN60},teal:{light:t.colors.T100,dark:t.colors.DN60},blue:{light:t.colors.B75,dark:t.colors.DN60},tealLight:{light:t.colors.T75,dark:t.colors.DN60},blueLight:{light:t.colors.B50,dark:t.colors.DN60},greenLight:{light:t.colors.G75,dark:t.colors.DN60},purpleLight:{light:t.colors.P50,dark:t.colors.DN60},redLight:{light:t.colors.R50,dark:t.colors.DN60},yellowLight:{light:t.colors.Y75,dark:t.colors.DN60},greyLight:{light:t.colors.N30,dark:t.colors.DN60}})},function(e,o){"use strict"},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),s=r(5),d=t(s),u=r(6),c=t(u),h=r(7),f=t(h),g=r(8),p=t(g),m=r(18),b=(r(16),function(e){function o(){return(0,a.default)(this,o),(0,d.default)(this,e.apply(this,arguments))}return(0,c.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.children,r=e.href,t=e.isFocused,n=e.isRemovable,i=e.markedForRemoval,a=e.color,s={isFocused:t,isRemovable:n,markedForRemoval:i,color:a};return r?p.default.createElement(m.Link,(0,l.default)({},s,{href:r,tabIndex:"-1"}),o):p.default.createElement(m.Text,s,o)},o}(g.PureComponent));b.propTypes={children:f.default.any.isRequired,href:f.default.string,isFocused:f.default.bool,isRemovable:f.default.bool,markedForRemoval:f.default.bool,color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=b},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.Link=o.Text=void 0;var n=r(11),l=t(n),i=(0,l.default)(["\n font-size: ",";\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-size: ",";\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]),a=(0,l.default)(["\n ","\n"],["\n ","\n"]),s=(0,l.default)(["\n ","\n ","\n text-decoration: none;\n\n &:hover {\n color: ",";\n }\n"],["\n ","\n ","\n text-decoration: none;\n\n &:hover {\n color: ",";\n }\n"]),d=r(12),u=t(d),c=r(13),h=r(14),f=(0,d.css)(i,(0,c.fontSize)()+"px",(0,c.gridSize)()/2,(0,c.gridSize)()/2,function(e){var o=e.isRemovable;return o?h.maxTextWidthUnitless-h.buttonWidthUnitless+"px":h.maxTextWidth}),g=(o.Text=u.default.span(a,f),function(e){var o=e.isFocused;return o?"color: "+c.link:null});o.Link=u.default.a(s,f,g,c.linkHover)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),s=r(6),d=t(s),u=r(7),c=t(u),h=r(8),f=t(h),g=r(20),p=t(g),m=r(21),b=t(m),v=function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,s=Array(i),d=0;d<i;d++)s[d]=arguments[d];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(s))),t.onKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;o&&(e.stopPropagation(),t.props.onRemoveAction())},t.onMouseOver=function(){t.props.onHoverChange(!0)},t.onMouseOut=function(){t.props.onHoverChange(!1)},n=r,(0,a.default)(t,n)}return(0,d.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.isRounded,r=e.onRemoveAction,t=e.removeText;return f.default.createElement(b.default,{"aria-label":t,isRounded:o,onClick:r,onKeyPress:this.onKeyPress,onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,type:"button"},f.default.createElement(p.default,{label:t,size:"small"}))},o}(h.PureComponent);v.propTypes={removeText:c.default.string.isRequired,isRounded:c.default.bool,onHoverChange:c.default.func,onRemoveAction:c.default.func},o.default=v},function(e,o){e.exports=d},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"],["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"]),a=r(12),s=t(a),d=r(13),u=r(14),c=(0,d.themed)({light:d.colors.R300,dark:d.colors.R200});o.default=s.default.button(i,function(e){var o=e.isRounded;return o?u.buttonWidthUnitless/2+"px":(0,d.borderRadius)()+"px"},d.colors.N500,c,d.colors.R500,u.focusRingColor)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"],["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"]),a=r(12),s=t(a),d=r(13),u=(0,d.gridSize)();o.default=s.default.span(i,u/2)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function n(e){var o=e.isRemoved,r=void 0;return o&&(r="width: 0; visibility: hidden;"),r}function l(e){var o=e.isRemoving,r=void 0;return o&&(r="animation: "+f+" 250ms forwards; will-change: width;"),r}Object.defineProperty(o,"__esModule",{value:!0});var i=r(11),a=t(i),s=(0,a.default)(["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"],["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"]),d=(0,a.default)(["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"],["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"]),u=r(12),c=t(u),h=r(14),f=(0,u.keyframes)(s,h.maxWidth,.8*h.maxWidthUnitless);o.default=c.default.div(d,l,n)}])}); | ||
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("babel-runtime/helpers/extends"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/theme"),require("babel-runtime/helpers/objectWithoutProperties"),require("@atlaskit/icon/glyph/cross")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/extends","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","prop-types","react","babel-runtime/helpers/taggedTemplateLiteral","styled-components","@atlaskit/theme","babel-runtime/helpers/objectWithoutProperties","@atlaskit/icon/glyph/cross"],o):"object"==typeof exports?exports["@atlaskit/tag"]=o(require("babel-runtime/helpers/extends"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/taggedTemplateLiteral"),require("styled-components"),require("@atlaskit/theme"),require("babel-runtime/helpers/objectWithoutProperties"),require("@atlaskit/icon/glyph/cross")):e["@atlaskit/tag"]=o(e["babel-runtime/helpers/extends"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e["prop-types"],e.react,e["babel-runtime/helpers/taggedTemplateLiteral"],e["styled-components"],e["@atlaskit/theme"],e["babel-runtime/helpers/objectWithoutProperties"],e["@atlaskit/icon/glyph/cross"])}(this,function(e,o,r,t,n,l,i,a,s,u,d){return function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={exports:{},id:t,loaded:!1};return e[t].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var r={};return o.m=e,o.c=r,o.p="",o(0)}([function(e,o,r){e.exports=r(1)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=r(2),l=t(n);o.default=l.default},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),s=r(5),u=t(s),d=r(6),c=t(d),h=r(7),f=t(h),g=r(8),p=t(g),m=r(9),b=t(m),v=r(17),k=t(v),x=r(20),R=t(x),y=r(23),L=t(y),N=r(24),B=t(N),w=["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"],C=function(e){function o(r){(0,a.default)(this,o);var t=(0,u.default)(this,e.call(this,r));return t.handleRemoveRequest=function(){t.props.onBeforeRemoveAction()&&t.setState({isRemoving:!0,isRemoved:!1})},t.handleRemoveComplete=function(){t.props.onAfterRemoveAction(t.props.text),t.setState({isRemoving:!1,isRemoved:!0})},t.handleHoverChange=function(e){t.setState({markedForRemoval:e})},t.handleFocusChange=function(e){t.setState({isFocused:e})},t.state={isRemoving:!1,isRemoved:!1,markedForRemoval:!1},t}return(0,c.default)(o,e),o.prototype.render=function(){var e=this,o=this.state,r=o.isFocused,t=o.isRemoved,n=o.isRemoving,i=o.markedForRemoval,a=this.props,s=a.appearance,u=a.elemBefore,d=a.href,c=a.removeButtonText,h=a.text,f=a.color,g=w.includes(f)?f:"standard",m=Boolean(c),v="rounded"===s,x={isFocused:r,isRemovable:m,isRemoved:t,isRemoving:n,isRounded:v,markedForRemoval:i,color:g},y=function(o){return n&&e.handleRemoveComplete(o)};return p.default.createElement(B.default,(0,l.default)({},x,{onAnimationEnd:y}),p.default.createElement(b.default,(0,l.default)({},x,{isLink:!!d,onFocusChange:this.handleFocusChange}),u?p.default.createElement(L.default,null,u):null,p.default.createElement(k.default,(0,l.default)({},x,{href:d}),h),m?p.default.createElement(R.default,(0,l.default)({},x,{onHoverChange:this.handleHoverChange,onRemoveAction:this.handleRemoveRequest,removeText:c})):null))},o}(g.PureComponent);C.propTypes={appearance:f.default.oneOf(["default","rounded"]),color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]),elemBefore:f.default.any,text:f.default.string.isRequired,href:f.default.string,removeButtonText:f.default.string,onBeforeRemoveAction:f.default.func,onAfterRemoveAction:f.default.func},C.defaultProps={color:"standard",appearance:"default",elemBefore:null,onAfterRemoveAction:function(){},onBeforeRemoveAction:function(){return!0}},o.default=C},function(o,r){o.exports=e},function(e,r){e.exports=o},function(e,o){e.exports=r},function(e,o){e.exports=t},function(e,o){e.exports=n},function(e,o){e.exports=l},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),s=r(6),u=t(s),d=r(7),c=t(d),h=r(8),f=t(h),g=r(10),p=t(g),m=(r(16),function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(s))),t.handleKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;t.chromeRef&&o&&t.chromeRef.querySelector("a").click()},t.handleBlur=function(){t.props.onFocusChange(!1)},t.handleFocus=function(e){e.target===t.chromeRef&&t.props.onFocusChange(!0)},n=r,(0,a.default)(t,n)}return(0,u.default)(o,e),o.prototype.render=function(){var e=this,o=this.props,r=o.children,t=o.isLink,n=o.isRemovable,l=o.isRemoved,i=o.isRemoving,a=o.isRounded,s=o.markedForRemoval,u=o.color,d={innerRef:function(o){return e.chromeRef=o},isRemovable:n,isRemoved:l,isRemoving:i,isRounded:a,markedForRemoval:s,onBlur:this.handleBlur,onFocus:this.handleFocus,onKeyPress:this.handleKeyPress,tabIndex:-1,color:u};return t&&(d.role="link",d.tabIndex=0),f.default.createElement(p.default,d,r)},o}(h.PureComponent));m.propTypes={children:c.default.arrayOf(c.default.any).isRequired,isLink:c.default.bool.isRequired,isRemovable:c.default.bool.isRequired,isRemoved:c.default.bool,isRemoving:c.default.bool,isRounded:c.default.bool,markedForRemoval:c.default.bool.isRequired,onFocusChange:c.default.func.isRequired,color:c.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=m},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"],["\n&:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n}\n background-color: ",";\n color: ",";\n border-radius: ",";\n cursor: default;\n display: flex;\n height: ",";\n line-height: 1;\n margin: ","px;\n padding: 0;\n overflow: ",";\n &:hover {\n box-shadow: none;\n background-color: ",";\n color: ",";\n }\n"]),a=r(12),s=t(a),u=r(13),d=r(14),c=r(15),h=(0,u.gridSize)(),f=(0,u.themed)({light:u.colors.R500,dark:u.colors.DN30}),g=(0,u.themed)({light:u.colors.N700,dark:u.colors.DN30}),p=(0,u.themed)({light:u.colors.R50,dark:u.colors.R100});o.default=s.default.span(i,d.focusRingColor,function(e){return e.markedForRemoval?p(e):(0,c.backgroundColor)(e)},function(e){return e.markedForRemoval?f(e):(0,c.textColor)(e)},function(e){var o=e.isRounded;return o?d.buttonWidthUnitless/2+"px":(0,u.borderRadius)()+"px"},d.tagHeight,h/2,function(e){var o=e.isRemoved,r=e.isRemoving;return o||r?"hidden":"initial"},function(e){return e.markedForRemoval?p(e):(0,c.backgroundColorHover)(e)},function(e){return e.markedForRemoval?g(e):(0,c.textColorHover)(e)})},function(e,o){e.exports=i},function(e,o){e.exports=a},function(e,o){e.exports=s},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.maxTextWidth=o.maxTextWidthUnitless=o.maxWidth=o.maxWidthUnitless=o.buttonWidth=o.buttonWidthUnitless=o.tagHeight=o.tagHeightUnitless=o.focusRingColor=void 0;var t=r(13),n=(o.focusRingColor=(0,t.themed)({light:t.colors.B100,dark:t.colors.B75}),o.tagHeightUnitless=2.5*(0,t.gridSize)()),l=o.tagHeight=n+"px",i=(o.buttonWidthUnitless=n,o.buttonWidth=l,o.maxWidthUnitless=25*(0,t.gridSize)()),a=(o.maxWidth=i+"px",o.maxTextWidthUnitless=i-n);o.maxTextWidth=a+"px"},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.backgroundColorHover=o.textColorHover=o.backgroundColor=o.textColor=void 0;var t=r(13),n=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.DN600},green:{light:t.colors.N800,dark:t.colors.N800},purple:{light:t.colors.N800,dark:t.colors.N800},red:{light:t.colors.N800,dark:t.colors.N800},yellow:{light:t.colors.N800,dark:t.colors.N800},grey:{light:t.colors.N0,dark:t.colors.N0},teal:{light:t.colors.N800,dark:t.colors.N800},blue:{light:t.colors.N800,dark:t.colors.N800},tealLight:{light:t.colors.N500,dark:t.colors.N500},blueLight:{light:t.colors.B500,dark:t.colors.B500},greenLight:{light:t.colors.G500,dark:t.colors.G500},purpleLight:{light:t.colors.P500,dark:t.colors.P500},redLight:{light:t.colors.N500,dark:t.colors.N500},yellowLight:{light:t.colors.N500,dark:t.colors.N500},greyLight:{light:t.colors.N500,dark:t.colors.N500}}),l=(0,t.themed)("color",{standard:{light:t.colors.N20,dark:t.colors.DN100A},green:{light:t.colors.G200,dark:t.colors.G200},purple:{light:t.colors.P100,dark:t.colors.P100},red:{light:t.colors.R100,dark:t.colors.R100},yellow:{light:t.colors.Y200,dark:t.colors.Y200},grey:{light:t.colors.N500,dark:t.colors.N500},teal:{light:t.colors.T200,dark:t.colors.T200},blue:{light:t.colors.B100,dark:t.colors.B100},tealLight:{light:t.colors.T100,dark:t.colors.T100},blueLight:{light:t.colors.B75,dark:t.colors.B75},greenLight:{light:t.colors.G100,dark:t.colors.G100},purpleLight:{light:t.colors.P75,dark:t.colors.P75},redLight:{light:t.colors.R75,dark:t.colors.R75},yellowLight:{light:t.colors.Y100,dark:t.colors.Y100},greyLight:{light:t.colors.N30,dark:t.colors.N30}});o.textColor=n,o.backgroundColor=l,o.textColorHover=(0,t.themed)("color",{standard:{light:t.colors.N700,dark:t.colors.B75},green:{light:t.colors.B400,dark:t.colors.B100},purple:{light:t.colors.B400,dark:t.colors.B100},red:{light:t.colors.B400,dark:t.colors.B100},yellow:{light:t.colors.B400,dark:t.colors.B100},grey:{light:t.colors.B400,dark:t.colors.B100},teal:{light:t.colors.B400,dark:t.colors.B100},blue:{light:t.colors.B400,dark:t.colors.B100},tealLight:{light:t.colors.B400,dark:t.colors.B100},blueLight:{light:t.colors.B400,dark:t.colors.B100},greenLight:{light:t.colors.B400,dark:t.colors.B100},purpleLight:{light:t.colors.B400,dark:t.colors.B100},redLight:{light:t.colors.B400,dark:t.colors.B100},yellowLight:{light:t.colors.B400,dark:t.colors.B100},greyLight:{light:t.colors.B400,dark:t.colors.B100}}),o.backgroundColorHover=(0,t.themed)("color",{standard:{light:t.colors.N30,dark:t.colors.DN60},green:{light:t.colors.G100,dark:t.colors.DN60},purple:{light:t.colors.P75,dark:t.colors.DN60},red:{light:t.colors.R75,dark:t.colors.DN60},yellow:{light:t.colors.Y100,dark:t.colors.DN60},grey:{light:t.colors.N50,dark:t.colors.DN60},teal:{light:t.colors.T100,dark:t.colors.DN60},blue:{light:t.colors.B75,dark:t.colors.DN60},tealLight:{light:t.colors.T75,dark:t.colors.DN60},blueLight:{light:t.colors.B50,dark:t.colors.DN60},greenLight:{light:t.colors.G75,dark:t.colors.DN60},purpleLight:{light:t.colors.P50,dark:t.colors.DN60},redLight:{light:t.colors.R50,dark:t.colors.DN60},yellowLight:{light:t.colors.Y75,dark:t.colors.DN60},greyLight:{light:t.colors.N30,dark:t.colors.DN60}})},function(e,o){"use strict"},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(3),l=t(n),i=r(4),a=t(i),s=r(5),u=t(s),d=r(6),c=t(d),h=r(7),f=t(h),g=r(8),p=t(g),m=r(18),b=(r(16),function(e){function o(){return(0,a.default)(this,o),(0,u.default)(this,e.apply(this,arguments))}return(0,c.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.children,r=e.href,t=e.isFocused,n=e.isRemovable,i=e.markedForRemoval,a=e.color,s={isFocused:t,isRemovable:n,markedForRemoval:i,color:a};return r?p.default.createElement(m.Link,(0,l.default)({},s,{href:r,tabIndex:"-1"}),o):p.default.createElement(m.Text,s,o)},o}(g.PureComponent));b.propTypes={children:f.default.any.isRequired,href:f.default.string,isFocused:f.default.bool,isRemovable:f.default.bool,markedForRemoval:f.default.bool,color:f.default.oneOf(["standard","green","blue","red","purple","grey","teal","yellow","greenLight","blueLight","redLight","purpleLight","greyLight","tealLight","yellowLight"]).isRequired},o.default=b},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0}),o.Link=o.Text=void 0;var n=r(19),l=t(n),i=r(11),a=t(i),s=(0,a.default)(["\n font-size: ","px;\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-size: ","px;\n font-weight: normal;\n line-height: 1;\n margin-left: ","px;\n margin-right: ","px;\n padding: 2px 0;\n max-width: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]),u=(0,a.default)(["\n ","\n"],["\n ","\n"]),d=(0,a.default)(["color: inherit"],["color: inherit"]),c=(0,a.default)(["color: ",""],["color: ",""]),h=(0,a.default)(["\n ","\n ","\n text-decoration: ",";\n\n &:hover {\n color: ",";\n ","\n }\n"],["\n ","\n ","\n text-decoration: ",";\n\n &:hover {\n color: ",";\n ","\n }\n"]),f=r(12),g=t(f),p=r(13),m=r(14),b=(0,f.css)(s,p.fontSize,p.math.divide(p.gridSize,2),p.math.divide(p.gridSize,2),function(e){var o=e.isRemovable;return o?m.maxTextWidthUnitless-m.buttonWidthUnitless+"px":m.maxTextWidth}),v=(o.Text=g.default.span(u,b),function(e){var o=e.isFocused,r=e.color,t=(0,l.default)(e,["isFocused","color"]);return"standard"!==r?(0,f.css)(d):o?(0,f.css)(c,(0,p.link)(t)):null});o.Link=g.default.a(h,b,v,function(e){var o=e.color;return"standard"===o?"none":"underline"},p.linkHover,function(e){var o=e.color;return"standard"===o?"":(0,f.css)(d)})},function(e,o){e.exports=u},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(4),l=t(n),i=r(5),a=t(i),s=r(6),u=t(s),d=r(7),c=t(d),h=r(8),f=t(h),g=r(21),p=t(g),m=r(22),b=t(m),v=function(e){function o(){var r,t,n;(0,l.default)(this,o);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return r=t=(0,a.default)(this,e.call.apply(e,[this].concat(s))),t.onKeyPress=function(e){var o=" "===e.key||"Enter"===e.key;o&&(e.stopPropagation(),t.props.onRemoveAction())},t.onMouseOver=function(){t.props.onHoverChange(!0)},t.onMouseOut=function(){t.props.onHoverChange(!1)},n=r,(0,a.default)(t,n)}return(0,u.default)(o,e),o.prototype.render=function(){var e=this.props,o=e.isRounded,r=e.onRemoveAction,t=e.removeText;return f.default.createElement(b.default,{"aria-label":t,isRounded:o,onClick:r,onKeyPress:this.onKeyPress,onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,type:"button"},f.default.createElement(p.default,{label:t,size:"small"}))},o}(h.PureComponent);v.propTypes={removeText:c.default.string.isRequired,isRounded:c.default.bool,onHoverChange:c.default.func,onRemoveAction:c.default.func},o.default=v},function(e,o){e.exports=d},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"],["\n align-items: center;\n appearance: none;\n background: none;\n border: none;\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n margin: 0;\n padding: 0;\n\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n\n &:hover {\n color: ",";\n &:focus {\n box-shadow: 0 0 0 2px ",";\n outline: none;\n }\n }\n\n &::-moz-focus-inner { border: 0; margin: 0; padding: 0; }\n"]),a=r(12),s=t(a),u=r(13),d=r(14),c=(0,u.themed)({light:u.colors.R300,dark:u.colors.R200});o.default=s.default.button(i,function(e){var o=e.isRounded;return o?d.buttonWidthUnitless/2+"px":(0,u.borderRadius)()+"px"},u.colors.N500,c,u.colors.R500,d.focusRingColor)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(o,"__esModule",{value:!0});var n=r(11),l=t(n),i=(0,l.default)(["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"],["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-left: ","px;\n"]),a=r(12),s=t(a),u=r(13),d=(0,u.gridSize)();o.default=s.default.span(i,d/2)},function(e,o,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function n(e){var o=e.isRemoved,r=void 0;return o&&(r="width: 0; visibility: hidden;"),r}function l(e){var o=e.isRemoving,r=void 0;return o&&(r="animation: "+f+" 250ms forwards; will-change: width;"),r}Object.defineProperty(o,"__esModule",{value:!0});var i=r(11),a=t(i),s=(0,a.default)(["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"],["\n 0% {\n animation-timing-function: cubic-bezier(0.23830050393398, 0, 0.25586732616931, 0.79011192334632);\n max-width: ",";\n }\n 20% {\n animation-timing-function: cubic-bezier(0.21787238302442, 0.98324004924648, 0.58694150667646, 1);\n max-width: ","px;\n }\n 100% { max-width: 0; }\n"]),u=(0,a.default)(["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"],["\n box-sizing: border-box;\n display: inline-block;\n\n ","\n ","\n"]),d=r(12),c=t(d),h=r(14),f=(0,d.keyframes)(s,h.maxWidth,.8*h.maxWidthUnitless);o.default=c.default.div(u,l,n)}])}); |
@@ -0,13 +1,16 @@ | ||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; | ||
import _taggedTemplateLiteral from 'babel-runtime/helpers/taggedTemplateLiteral'; | ||
var _templateObject = _taggedTemplateLiteral(['\n font-size: ', ';\n font-weight: normal;\n line-height: 1;\n margin-left: ', 'px;\n margin-right: ', 'px;\n padding: 2px 0;\n max-width: ', ';\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n'], ['\n font-size: ', ';\n font-weight: normal;\n line-height: 1;\n margin-left: ', 'px;\n margin-right: ', 'px;\n padding: 2px 0;\n max-width: ', ';\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n']), | ||
var _templateObject = _taggedTemplateLiteral(['\n font-size: ', 'px;\n font-weight: normal;\n line-height: 1;\n margin-left: ', 'px;\n margin-right: ', 'px;\n padding: 2px 0;\n max-width: ', ';\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n'], ['\n font-size: ', 'px;\n font-weight: normal;\n line-height: 1;\n margin-left: ', 'px;\n margin-right: ', 'px;\n padding: 2px 0;\n max-width: ', ';\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n']), | ||
_templateObject2 = _taggedTemplateLiteral(['\n ', '\n'], ['\n ', '\n']), | ||
_templateObject3 = _taggedTemplateLiteral(['\n ', '\n ', '\n text-decoration: none;\n\n &:hover {\n color: ', ';\n }\n'], ['\n ', '\n ', '\n text-decoration: none;\n\n &:hover {\n color: ', ';\n }\n']); | ||
_templateObject3 = _taggedTemplateLiteral(['color: inherit'], ['color: inherit']), | ||
_templateObject4 = _taggedTemplateLiteral(['color: ', ''], ['color: ', '']), | ||
_templateObject5 = _taggedTemplateLiteral(['\n ', '\n ', '\n text-decoration: ', ';\n\n &:hover {\n color: ', ';\n ', '\n }\n'], ['\n ', '\n ', '\n text-decoration: ', ';\n\n &:hover {\n color: ', ';\n ', '\n }\n']); | ||
import styled, { css } from 'styled-components'; | ||
import { gridSize, fontSize, link, linkHover } from '@atlaskit/theme'; | ||
import { gridSize, fontSize, link, linkHover, math } from '@atlaskit/theme'; | ||
import { buttonWidthUnitless, maxTextWidth, maxTextWidthUnitless } from './constants'; | ||
// Common styles for Text & Link | ||
var COMMON_STYLES = css(_templateObject, fontSize() + 'px', gridSize() / 2, gridSize() / 2, function (_ref) { | ||
var COMMON_STYLES = css(_templateObject, fontSize, math.divide(gridSize, 2), math.divide(gridSize, 2), function (_ref) { | ||
var isRemovable = _ref.isRemovable; | ||
@@ -21,5 +24,16 @@ return isRemovable ? maxTextWidthUnitless - buttonWidthUnitless + 'px' : maxTextWidth; | ||
var getFocusedStyles = function getFocusedStyles(_ref2) { | ||
var isFocused = _ref2.isFocused; | ||
return isFocused ? 'color: ' + link : null; | ||
var isFocused = _ref2.isFocused, | ||
color = _ref2.color, | ||
rest = _objectWithoutProperties(_ref2, ['isFocused', 'color']); | ||
if (color !== 'standard') return css(_templateObject3); | ||
if (isFocused) return css(_templateObject4, link(rest)); | ||
return null; | ||
}; | ||
export var Link = styled.a(_templateObject3, COMMON_STYLES, getFocusedStyles, linkHover); | ||
export var Link = styled.a(_templateObject5, COMMON_STYLES, getFocusedStyles, function (_ref3) { | ||
var color = _ref3.color; | ||
return color === 'standard' ? 'none' : 'underline'; | ||
}, linkHover, function (_ref4) { | ||
var color = _ref4.color; | ||
return color === 'standard' ? '' : css(_templateObject3); | ||
}); |
{ | ||
"name": "@atlaskit/tag", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"config": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -16,3 +16,3 @@ [![AtlasKit component registry](https://img.shields.io/badge/AtlasKit-components-FF5230.svg)](http://atlaskit.atlassian.com) | ||
Interact with a [live demo of the @atlaskit/tag component with code examples](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/tag/3.0.1/). | ||
Interact with a [live demo of the @atlaskit/tag component with code examples](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/tag/3.0.2/). | ||
@@ -19,0 +19,0 @@ |
155485
2083