Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ak-button

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-button - npm Package Compare versions

Comparing version 1.4.7 to 1.5.0

10

CHANGELOG.md

@@ -1,6 +0,11 @@

<a name="1.4.7"></a>
## 1.4.7 (2016-10-13)
<a name="1.5.0"></a>
# 1.5.0 (2016-10-14)
<a name="ak-button@1.5.0"></a>
# ak-button@1.5.0 (2016-10-14)
<a name="ak-button@1.4.7"></a>

@@ -17,2 +22,3 @@ ## ak-button@1.4.7 (2016-10-13)

* **component:** Adg2 styles added ([d56addb](https://bitbucket.org/atlassian/atlaskit/commits/d56addb))
* **package:** add pre-release version of profile-card ([55f8b8b](https://bitbucket.org/atlassian/atlaskit/commits/55f8b8b))

@@ -19,0 +25,0 @@

415

dist/bundle-cjs.js

@@ -76,17 +76,13 @@ module.exports = /******/

value: !0
}), exports.TYPE = exports.APPEARANCE = void 0;
var _defineProperty2 = __webpack_require__(1), _defineProperty3 = _interopRequireDefault(_defineProperty2), _attr = function(value, name) {
}), exports.themes = exports.TYPE = exports.APPEARANCE = void 0;
var _attr = function(value, name) {
_skatejs.vdom.attr(name, value);
}, _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) {
for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop);
}, _skatejs = __webpack_require__(2), _akTheme = __webpack_require__(3), _akutilCommon = __webpack_require__(4), _enumeratedProperties = __webpack_require__(5), _Slot = __webpack_require__(6), _Slot2 = _interopRequireDefault(_Slot), _Button = __webpack_require__(7), _Button2 = _interopRequireDefault(_Button), _symbols = __webpack_require__(9), _styles = __webpack_require__(11), _styles2 = _interopRequireDefault(_styles), APPEARANCE = _enumeratedProperties.appearance.values, TYPE = _enumeratedProperties.type.values;
}, _skatejs = __webpack_require__(1), _akTheme = __webpack_require__(2), _akutilCommon = __webpack_require__(3), _enumeratedProperties = __webpack_require__(4), _Slot = __webpack_require__(5), _Slot2 = _interopRequireDefault(_Slot), _Button = __webpack_require__(6), _Button2 = _interopRequireDefault(_Button), _styles = __webpack_require__(10), _styles2 = _interopRequireDefault(_styles), _adg = __webpack_require__(13), _adg2 = _interopRequireDefault(_adg), APPEARANCE = _enumeratedProperties.appearance.values, TYPE = _enumeratedProperties.type.values;
exports.APPEARANCE = APPEARANCE, exports.TYPE = TYPE;
/**
* @description Creates instances of ak-button programmatically, or using markup.
* @class Button
* @example @js import Button from 'ak-button';
* const button = new Button();
*/
var definition = {
props: (0, _defineProperty3["default"])({
var definition = (exports.themes = {
adg2: _adg2["default"]
}, {
props: {
/**

@@ -145,7 +141,5 @@ * @description Predefined appearances of an ak-button. One of:

})
}, _symbols.stylesKey, {
attribute: !1
}),
},
render: function(elem) {
var styles = elem[_symbols.stylesKey] = (0, _akutilCommon.style)(_skatejs.vdom, _styles2["default"]);
var styles = (0, _akutilCommon.style)(_skatejs.vdom, (0, _styles2["default"])(elem.themeProps));
return _skatejs.vdom.elementOpenStart(_Button2["default"]), _forOwn((0, _skatejs.props)(elem), _attr),

@@ -157,3 +151,3 @@ _skatejs.vdom.attr("styles", styles), _skatejs.vdom.elementOpenEnd(_Button2["default"]),

}
}, AkButton = (0, _skatejs.define)("ak-button", (0, _akTheme.themeable)(definition));
}), AkButton = (0, _skatejs.define)("ak-button", (0, _akTheme.themeable)(definition));
exports["default"] = AkButton;

@@ -163,17 +157,13 @@ }, /* 1 */

function(module, exports) {
module.exports = require("babel-runtime/helpers/defineProperty");
module.exports = require("skatejs");
}, /* 2 */
/***/
function(module, exports) {
module.exports = require("skatejs");
module.exports = require("ak-theme");
}, /* 3 */
/***/
function(module, exports) {
module.exports = require("ak-theme");
module.exports = require("akutil-common");
}, /* 4 */
/***/
function(module, exports) {
module.exports = require("akutil-common");
}, /* 5 */
/***/
function(module, exports, __webpack_require__) {

@@ -184,3 +174,3 @@ "use strict";

}), exports.type = exports.appearance = void 0;
var _akutilCommon = __webpack_require__(4), attributeValuesToEnumObject = function(values) {
var _akutilCommon = __webpack_require__(3), attributeValuesToEnumObject = function(values) {
return values.reduce(function(acum, val) {

@@ -210,3 +200,3 @@ return acum[val.toUpperCase()] = val, acum;

};
}, /* 6 */
}, /* 5 */
/***/

@@ -218,3 +208,3 @@ function(module, exports, __webpack_require__) {

});
var _skatejs = __webpack_require__(2), getSlotName = function(side) {
var _skatejs = __webpack_require__(1), getSlotName = function(side) {
return side || "default";

@@ -228,3 +218,3 @@ };

};
}, /* 7 */
}, /* 6 */
/***/

@@ -241,3 +231,3 @@ function(module, exports, __webpack_require__) {

});
var _defineProperty2 = __webpack_require__(1), _defineProperty3 = _interopRequireDefault(_defineProperty2), _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) {
var _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) {
for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop);

@@ -247,16 +237,8 @@ }, _renderArbitrary = function _renderArbitrary(child) {

"number" === type || "string" === type || "object" === type && child instanceof String ? _skatejs.vdom.text(child) : "function" === type && child.__jsxDOMWrapper ? child() : Array.isArray(child) ? child.forEach(_renderArbitrary) : "object" === type && "[object Object]" === String(child) && _forOwn(child, _renderArbitrary);
}, _skatejs = __webpack_require__(2), _classnames = __webpack_require__(8), _classnames2 = _interopRequireDefault(_classnames), _enumeratedProperties = __webpack_require__(5), _appearance$values = _enumeratedProperties.appearance.values, PRIMARY = _appearance$values.PRIMARY, SUBTLE = _appearance$values.SUBTLE, LINK = _appearance$values.LINK, getClasses = function(styles, props) {
var _ref;
return _ref = {}, (0, _defineProperty3["default"])(_ref, styles.button, !0), (0,
_defineProperty3["default"])(_ref, styles.compact, props.compact), (0, _defineProperty3["default"])(_ref, styles.disabled, props.disabled),
(0, _defineProperty3["default"])(_ref, styles.selected, props.selected && !props.disabled),
(0, _defineProperty3["default"])(_ref, styles.primary, props.appearance === PRIMARY && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, styles.subtle, props.appearance === SUBTLE && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, styles.link, props.appearance === LINK && !props.selected),
_ref;
};
}, _skatejs = __webpack_require__(1), _classnames = __webpack_require__(7), _classnames2 = _interopRequireDefault(_classnames), _getButtonClasses = __webpack_require__(8), _getButtonClasses2 = _interopRequireDefault(_getButtonClasses);
/* eslint-disable react/prop-types */
exports["default"] = function(props, children) {
return _skatejs.vdom.elementOpen("span", null, null, "className", props.styles.root),
_skatejs.vdom.elementOpen("button", null, null, "className", (0, _classnames2["default"])(getClasses(props.styles, props)), "type", props.type, "disabled", props.disabled, "onmousedown", function(e) {
_skatejs.vdom.elementOpen("button", null, null, "className", (0, _classnames2["default"])((0,
_getButtonClasses2["default"])(props.styles, props)), "type", props.type, "disabled", props.disabled, "onmousedown", function(e) {
return e.preventDefault();

@@ -267,7 +249,7 @@ }), _skatejs.vdom.elementOpen("span", null, null, "className", props.styles["button-content"]),

};
}, /* 8 */
}, /* 7 */
/***/
function(module, exports) {
module.exports = require("classnames");
}, /* 9 */
}, /* 8 */
/***/

@@ -283,155 +265,187 @@ function(module, exports, __webpack_require__) {

value: !0
}), exports.stylesKey = void 0;
var _symbol = __webpack_require__(10), _symbol2 = _interopRequireDefault(_symbol);
exports.stylesKey = (0, _symbol2["default"])("ak-button-styles");
}, /* 10 */
});
var _defineProperty2 = __webpack_require__(9), _defineProperty3 = _interopRequireDefault(_defineProperty2), _enumeratedProperties = __webpack_require__(4), _appearance$values = _enumeratedProperties.appearance.values, PRIMARY = _appearance$values.PRIMARY, SUBTLE = _appearance$values.SUBTLE, LINK = _appearance$values.LINK;
exports["default"] = function(classKeys, props) {
var _ref;
return _ref = {}, (0, _defineProperty3["default"])(_ref, classKeys.button, !0),
(0, _defineProperty3["default"])(_ref, classKeys.compact, props.compact), (0, _defineProperty3["default"])(_ref, classKeys.disabled, props.disabled),
(0, _defineProperty3["default"])(_ref, classKeys.selected, props.selected && !props.disabled),
(0, _defineProperty3["default"])(_ref, classKeys.primary, props.appearance === PRIMARY && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, classKeys.subtle, props.appearance === SUBTLE && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, classKeys.link, props.appearance === LINK && !props.selected),
_ref;
};
}, /* 9 */
/***/
function(module, exports) {
module.exports = require("babel-runtime/core-js/symbol");
}, /* 11 */
module.exports = require("babel-runtime/helpers/defineProperty");
}, /* 10 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _akutilSharedStyles = __webpack_require__(12), baseFont = "inherit", em = 14, grid = 8, lineHeight = 20, buttonLineHeight = lineHeight / em, buttonHeight = 4 * grid / em + "em", compactButtonHeight = 3 * grid / em + "em", baseRadius = _akutilSharedStyles.akBorderRadius, sideSlotMargin = grid + "px", defaultBackgroundColor = _akutilSharedStyles.akColorN20, defaultBackgroundColorHover = _akutilSharedStyles.akColorN30, defaultBackgroundColorFocus = _akutilSharedStyles.akColorB200, defaultBackgroundColorActive = _akutilSharedStyles.akColorB50, defaultColor = _akutilSharedStyles.akColorN500, primaryBackgroundColor = _akutilSharedStyles.akColorB400, primaryBackgroundColorHover = _akutilSharedStyles.akColorB500, primaryBackgroundColorActive = _akutilSharedStyles.akColorB300, primaryColor = _akutilSharedStyles.akColorN20, selectedBackgroundColor = _akutilSharedStyles.akColorN700, selectedColor = _akutilSharedStyles.akColorN20, linkColor = _akutilSharedStyles.akColorB400, linkColorHover = _akutilSharedStyles.akColorB300, linkColorActive = linkColorHover, disabledColor = _akutilSharedStyles.akColorN40;
exports["default"] = {
// light DOM styles
":host": {
display: "inline-flex"
},
":host(> _shadow_root_)": {
display: "inline-block"
},
":host([disabled])": {
"pointer-events": "none"
},
// shadow DOM styles
'::slotted([slot="before"])': {
"margin-right": sideSlotMargin
},
'::slotted([slot="after"])': {
"margin-left": sideSlotMargin
},
":host .before-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"before-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"after-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"button-content": {
"align-items": "baseline",
display: "inline-flex",
"flex-wrap": "nowrap"
},
"before-slot": {
display: "inline-flex"
},
"after-slot": {
display: "inline-flex"
},
"default-slot": {
display: "inline-flex"
},
root: {
display: "inline-block"
},
button: {
"box-sizing": "border-box",
background: defaultBackgroundColor,
"border-width": "0",
"border-radius": baseRadius,
color: defaultColor,
display: "inline-block",
"font-style": "normal",
"font-size": baseFont,
height: buttonHeight,
"line-height": buttonLineHeight,
margin: "0",
outline: "none",
padding: .75 * grid + "px " + grid + "px",
"text-align": "center",
transition: "background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)",
"user-select": "none",
"&::-moz-focus-inner": {
margin: 0,
padding: 0,
border: 0
var _lodash = __webpack_require__(11), _lodash2 = _interopRequireDefault(_lodash), _akutilSharedStyles = __webpack_require__(12), lineHeight = 20, em = 14, grid = 8, transitionValue = "\n background 0.1s\n ease-out,\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)\n";
exports["default"] = function(vars) {
var val = _lodash2["default"].bind(null, vars);
return {
// light DOM styles
":host": {
display: "inline-block"
},
"&:hover": {
background: defaultBackgroundColorHover,
cursor: "pointer",
transition: "background 0.2s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)"
":host(> _shadow_root_)": {
display: "inline-block"
},
"&:active": {
background: defaultBackgroundColorActive,
"transition-duration": "0s"
":host([disabled])": {
"pointer-events": "none"
},
"&:focus": {
"box-shadow": "0 0 0 2px " + defaultBackgroundColorFocus,
"transition-duration": "0s, 0.2s"
// shadow DOM styles
'::slotted([slot="before"])': {
"margin-right": grid + "px"
},
"&:focus:active": {
"box-shadow": "0 0 0 0 " + defaultBackgroundColorFocus
}
},
primary: {
background: primaryBackgroundColor,
color: primaryColor,
"&:hover": {
background: primaryBackgroundColorHover
'::slotted([slot="after"])': {
"margin-left": grid + "px"
},
"&:active": {
background: primaryBackgroundColorActive
}
},
subtle: {
background: "none"
},
disabled: {
color: disabledColor,
"::slotted(*)": {
"pointer-events": "none"
"before-slot-wrapper": {
"align-self": "center",
display: "flex"
},
cursor: "not-allowed"
},
selected: {
background: selectedBackgroundColor,
color: selectedColor,
"&:hover": {
background: selectedBackgroundColor,
transition: "none"
}
},
link: {
background: "none",
color: linkColor,
transition: "color 0.1s ease-out",
"&:hover": {
"after-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"button-content": {
"align-items": "baseline",
display: "inline-flex",
"flex-wrap": "nowrap"
},
"before-slot": {
display: "inline-flex"
},
"after-slot": {
display: "inline-flex"
},
"default-slot": {
display: "inline-flex"
},
root: {
display: "inline-block"
},
button: {
"box-sizing": "border-box",
background: val("standard.background", _akutilSharedStyles.akColorN20),
"border-width": "0",
"border-radius": val("button.baseRadius", _akutilSharedStyles.akBorderRadius),
color: val("standard.color", _akutilSharedStyles.akColorN500),
display: "inline-block",
"font-style": "normal",
"font-size": "inherit",
height: val("button.height", 4 * grid / em + "em"),
"line-height": val("button.lineHeight", lineHeight / em),
margin: "0",
outline: "none",
padding: val("button.padding", .75 * grid + "px " + grid + "px"),
"text-align": "center",
transition: val("button.transition", transitionValue),
"user-select": "none",
border: val("button.border", "none"),
"&::-moz-focus-inner": {
margin: 0,
padding: 0,
border: 0
},
"&:hover": {
background: val("standard.hover.background", _akutilSharedStyles.akColorN30),
cursor: "pointer",
"border-color": val("standard.hover.borderColor")
},
"&:active": {
background: val("standard.active.background", _akutilSharedStyles.akColorB50),
"box-shadow": val("standard.active.boxShadow"),
"transition-duration": val("standard.active.transitionDuration", "0s")
},
"&:focus": {
"box-shadow": "0 0 0 2px " + val("standard.focus.background", _akutilSharedStyles.akColorB200),
"transition-duration": val("standard.focus.transitionDuration", "0s, 0.2s")
}
},
primary: {
background: val("primary.background", _akutilSharedStyles.akColorB400),
color: val("primary.color", _akutilSharedStyles.akColorN20),
"border-color": val("primary.borderColor"),
"&:hover": {
background: val("primary.hover.background", _akutilSharedStyles.akColorB500),
"border-color": val("primary.borderColor")
},
"&:active": {
background: val("primary.active.background", _akutilSharedStyles.akColorB300)
}
},
subtle: {
background: "none",
color: linkColorHover,
"text-decoration": "underline"
color: val("subtle.color"),
"border-color": val("subtle.borderColor"),
"&:hover": {
color: val("subtle.hover.color")
}
},
"&:active": {
color: linkColorActive,
"text-decoration": "none"
disabled: {
color: val("disabled.color", _akutilSharedStyles.akColorN40),
"::slotted(*)": {
"pointer-events": "none"
},
cursor: "not-allowed",
background: val("disabled.background"),
"border-color": val("disabled.borderColor"),
"box-shadow": val("disabled.boxShadow")
},
"&.disabled": {
color: disabledColor,
background: "none"
selected: {
background: val("selected.background", _akutilSharedStyles.akColorN700),
color: val("selected.color", _akutilSharedStyles.akColorN20),
"box-shadow": val("selected.boxShadow"),
"&:hover": {
background: val("selected.hover.background", _akutilSharedStyles.akColorN700),
"border-color": val("selected.hover.borderColor"),
transition: "none"
}
},
link: {
background: "none",
color: val("link.color", _akutilSharedStyles.akColorB400),
transition: "color 0.1s ease-out",
"box-shadow": val("link.boxShadow"),
"border-color": val("link.borderColor"),
"&:hover": {
background: "none",
color: val("link.hover.color", _akutilSharedStyles.akColorB300),
"text-decoration": "underline",
"border-color": val("link.hover.borderColor")
},
"&:active": {
color: val("link.active.color", _akutilSharedStyles.akColorB300),
"box-shadow": val("link.active.boxShadow"),
"text-decoration": "none"
},
"&.disabled": {
color: val("disabled.color", _akutilSharedStyles.akColorN40),
background: "none"
}
},
compact: {
height: val("compact.height", 3 * grid / em + "em"),
"padding-top": val("compact.paddingTop", grid / 3 + "px"),
"padding-bottom": val("compact.paddingBottom", grid / 3 + "px")
}
},
compact: {
height: compactButtonHeight,
"padding-top": grid / 4 + "px",
"padding-bottom": grid / 4 + "px"
}
};
};
}, /* 11 */
/***/
function(module, exports) {
module.exports = require("lodash.get");
}, /* 12 */

@@ -441,2 +455,53 @@ /***/

module.exports = require("akutil-shared-styles");
}, /* 13 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _skatejs = __webpack_require__(1), _akTheme = __webpack_require__(2), _akTheme2 = _interopRequireDefault(_akTheme);
exports["default"] = (0, _skatejs.define)("ak-button-theme-adg2", {
render: function() {
return _skatejs.vdom.elementOpen(_akTheme2["default"], null, null, "id", "ak-button-theme-adg2"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "button.padding", "value", "4px 10px"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "button.border", "value", "1px solid #ccc"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "button.transition", "value", "none"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.color", "value", "#333"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.hover.background", "value", "#e9e9e9"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.hover.borderColor", "value", "#999"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.active.boxShadow", "value", "inset 0 3px 6px 0 rgba(0,0,0,.1)"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.active.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.background", "value", "#3572b0"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.color", "value", "#fff"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.fontWeight", "value", "700"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.hover.background", "value", "#2a67a5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.hover.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.active.background", "value", "#3572b0"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "subtle.color", "value", "#707070"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "subtle.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "subtle.hover.color", "value", "#000"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "disabled.color", "value", "#999"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "disabled.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "disabled.boxShadow", "value", "none"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.boxShadow", "value", "inset 0 3px 6px 0 rgba(0,0,0,.1)"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.color", "value", "#333"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.hover.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.hover.borderColor", "value", "#ccc"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.color", "value", "#3572b0"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.boxShadow", "value", "none"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.hover.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.active.boxShadow", "value", "none"),
_skatejs.vdom.elementClose(_akTheme2["default"]);
}
});
} ]);

@@ -1,1 +0,1 @@

module.exports=function(e){function t(n){if(o[n])return o[n].exports;var a=o[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.TYPE=t.APPEARANCE=void 0;var a=o(1),r=n(a),l=function(e,t){u.vdom.attr(t,e)},s=Object.prototype.hasOwnProperty,i=function(e,t){for(var o in e)s.call(e,o)&&t(e[o],o)},u=o(2),d=o(3),c=o(4),p=o(5),f=o(6),b=n(f),m=o(7),v=n(m),y=o(9),k=o(11),x=n(k),g=p.appearance.values,h=p.type.values;t.APPEARANCE=g,t.TYPE=h;var _={props:(0,r["default"])({appearance:p.appearance.enumeration,type:p.type.enumeration,disabled:u.prop["boolean"]({attribute:!0}),compact:u.prop["boolean"]({attribute:!0}),selected:u.prop["boolean"]({attribute:!0})},y.stylesKey,{attribute:!1}),render:function(e){var t=e[y.stylesKey]=(0,c.style)(u.vdom,x["default"]);return u.vdom.elementOpenStart(v["default"]),i((0,u.props)(e),l),u.vdom.attr("styles",t),u.vdom.elementOpenEnd(v["default"]),u.vdom.elementVoid(b["default"],null,null,"styles",t,"name","before"),u.vdom.elementVoid(b["default"],null,null,"styles",t),u.vdom.elementVoid(b["default"],null,null,"styles",t,"name","after"),u.vdom.elementClose(v["default"])}},C=(0,u.define)("ak-button",(0,d.themeable)(_));t["default"]=C},function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t){e.exports=require("skatejs")},function(e,t){e.exports=require("ak-theme")},function(e,t){e.exports=require("akutil-common")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.type=t.appearance=void 0;var n=o(4),a=function(e){return e.reduce(function(e,t){return e[t.toUpperCase()]=t,e},{})},r=["primary","standard","subtle","link"],l=["button","submit"],s=a(r),i=a(l),u={attribute:"appearance",values:r,invalidDefault:s.STANDARD},d={attribute:"type",values:l,missingDefault:"button",invalidDefault:"button"};t.appearance={enumeration:(0,n.enumeration)(u)({attribute:!0}),values:s},t.type={enumeration:(0,n.enumeration)(d)({attribute:!0}),values:i}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2),a=function(e){return e||"default"};t["default"]=function(e){var t=e.name,o=e.styles;return n.vdom.elementOpen("span",null,null,"className",o[a(t)+"-slot-wrapper"]),n.vdom.elementVoid("slot",null,null,"name",t,"className",o[a(t)+"-slot"]),n.vdom.elementClose("span")}},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=o(1),r=n(a),l=Object.prototype.hasOwnProperty,s=function(e,t){for(var o in e)l.call(e,o)&&t(e[o],o)},i=function k(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?u.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(k):"object"===t&&"[object Object]"===String(e)&&s(e,k)},u=o(2),d=o(8),c=n(d),p=o(5),f=p.appearance.values,b=f.PRIMARY,m=f.SUBTLE,v=f.LINK,y=function(e,t){var o;return o={},(0,r["default"])(o,e.button,!0),(0,r["default"])(o,e.compact,t.compact),(0,r["default"])(o,e.disabled,t.disabled),(0,r["default"])(o,e.selected,t.selected&&!t.disabled),(0,r["default"])(o,e.primary,t.appearance===b&&!t.disabled&&!t.selected),(0,r["default"])(o,e.subtle,t.appearance===m&&!t.disabled&&!t.selected),(0,r["default"])(o,e.link,t.appearance===v&&!t.selected),o};t["default"]=function(e,t){return u.vdom.elementOpen("span",null,null,"className",e.styles.root),u.vdom.elementOpen("button",null,null,"className",(0,c["default"])(y(e.styles,e)),"type",e.type,"disabled",e.disabled,"onmousedown",function(e){return e.preventDefault()}),u.vdom.elementOpen("span",null,null,"className",e.styles["button-content"]),i(t()),u.vdom.elementClose("span"),u.vdom.elementClose("button"),u.vdom.elementClose("span")}},function(e,t){e.exports=require("classnames")},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.stylesKey=void 0;var a=o(10),r=n(a);t.stylesKey=(0,r["default"])("ak-button-styles")},function(e,t){e.exports=require("babel-runtime/core-js/symbol")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12),a="inherit",r=14,l=8,s=20,i=s/r,u=4*l/r+"em",d=3*l/r+"em",c=n.akBorderRadius,p=l+"px",f=n.akColorN20,b=n.akColorN30,m=n.akColorB200,v=n.akColorB50,y=n.akColorN500,k=n.akColorB400,x=n.akColorB500,g=n.akColorB300,h=n.akColorN20,_=n.akColorN700,C=n.akColorN20,O=n.akColorB400,w=n.akColorB300,N=w,P=n.akColorN40;t["default"]={":host":{display:"inline-flex"},":host(> _shadow_root_)":{display:"inline-block"},":host([disabled])":{"pointer-events":"none"},'::slotted([slot="before"])':{"margin-right":p},'::slotted([slot="after"])':{"margin-left":p},":host .before-slot-wrapper":{"align-self":"center",display:"flex"},"before-slot-wrapper":{"align-self":"center",display:"flex"},"after-slot-wrapper":{"align-self":"center",display:"flex"},"button-content":{"align-items":"baseline",display:"inline-flex","flex-wrap":"nowrap"},"before-slot":{display:"inline-flex"},"after-slot":{display:"inline-flex"},"default-slot":{display:"inline-flex"},root:{display:"inline-block"},button:{"box-sizing":"border-box",background:f,"border-width":"0","border-radius":c,color:y,display:"inline-block","font-style":"normal","font-size":a,height:u,"line-height":i,margin:"0",outline:"none",padding:.75*l+"px "+l+"px","text-align":"center",transition:"background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)","user-select":"none","&::-moz-focus-inner":{margin:0,padding:0,border:0},"&:hover":{background:b,cursor:"pointer",transition:"background 0.2s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)"},"&:active":{background:v,"transition-duration":"0s"},"&:focus":{"box-shadow":"0 0 0 2px "+m,"transition-duration":"0s, 0.2s"},"&:focus:active":{"box-shadow":"0 0 0 0 "+m}},primary:{background:k,color:h,"&:hover":{background:x},"&:active":{background:g}},subtle:{background:"none"},disabled:{color:P,"::slotted(*)":{"pointer-events":"none"},cursor:"not-allowed"},selected:{background:_,color:C,"&:hover":{background:_,transition:"none"}},link:{background:"none",color:O,transition:"color 0.1s ease-out","&:hover":{background:"none",color:w,"text-decoration":"underline"},"&:active":{color:N,"text-decoration":"none"},"&.disabled":{color:P,background:"none"}},compact:{height:d,"padding-top":l/4+"px","padding-bottom":l/4+"px"}}},function(e,t){e.exports=require("akutil-shared-styles")}]);
module.exports=function(e){function o(l){if(n[l])return n[l].exports;var r=n[l]={exports:{},id:l,loaded:!1};return e[l].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}var n={};return o.m=e,o.c=n,o.p="",o(0)}([function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0}),o.themes=o.TYPE=o.APPEARANCE=void 0;var r=function(e,o){d.vdom.attr(o,e)},t=Object.prototype.hasOwnProperty,a=function(e,o){for(var n in e)t.call(e,n)&&o(e[n],n)},d=n(1),u=n(2),i=n(3),s=n(4),c=n(5),m=l(c),p=n(6),b=l(p),v=n(10),f=l(v),k=n(13),h=l(k),g=s.appearance.values,y=s.type.values;o.APPEARANCE=g,o.TYPE=y;var x=(o.themes={adg2:h["default"]},{props:{appearance:s.appearance.enumeration,type:s.type.enumeration,disabled:d.prop["boolean"]({attribute:!0}),compact:d.prop["boolean"]({attribute:!0}),selected:d.prop["boolean"]({attribute:!0})},render:function(e){var o=(0,i.style)(d.vdom,(0,f["default"])(e.themeProps));return d.vdom.elementOpenStart(b["default"]),a((0,d.props)(e),r),d.vdom.attr("styles",o),d.vdom.elementOpenEnd(b["default"]),d.vdom.elementVoid(m["default"],null,null,"styles",o,"name","before"),d.vdom.elementVoid(m["default"],null,null,"styles",o),d.vdom.elementVoid(m["default"],null,null,"styles",o,"name","after"),d.vdom.elementClose(b["default"])}}),P=(0,d.define)("ak-button",(0,u.themeable)(x));o["default"]=P},function(e,o){e.exports=require("skatejs")},function(e,o){e.exports=require("ak-theme")},function(e,o){e.exports=require("akutil-common")},function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.type=o.appearance=void 0;var l=n(3),r=function(e){return e.reduce(function(e,o){return e[o.toUpperCase()]=o,e},{})},t=["primary","standard","subtle","link"],a=["button","submit"],d=r(t),u=r(a),i={attribute:"appearance",values:t,invalidDefault:d.STANDARD},s={attribute:"type",values:a,missingDefault:"button",invalidDefault:"button"};o.appearance={enumeration:(0,l.enumeration)(i)({attribute:!0}),values:d},o.type={enumeration:(0,l.enumeration)(s)({attribute:!0}),values:u}},function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var l=n(1),r=function(e){return e||"default"};o["default"]=function(e){var o=e.name,n=e.styles;return l.vdom.elementOpen("span",null,null,"className",n[r(o)+"-slot-wrapper"]),l.vdom.elementVoid("slot",null,null,"name",o,"className",n[r(o)+"-slot"]),l.vdom.elementClose("span")}},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty,t=function(e,o){for(var n in e)r.call(e,n)&&o(e[n],n)},a=function m(e){var o=typeof e;"number"===o||"string"===o||"object"===o&&e instanceof String?d.vdom.text(e):"function"===o&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(m):"object"===o&&"[object Object]"===String(e)&&t(e,m)},d=n(1),u=n(7),i=l(u),s=n(8),c=l(s);o["default"]=function(e,o){return d.vdom.elementOpen("span",null,null,"className",e.styles.root),d.vdom.elementOpen("button",null,null,"className",(0,i["default"])((0,c["default"])(e.styles,e)),"type",e.type,"disabled",e.disabled,"onmousedown",function(e){return e.preventDefault()}),d.vdom.elementOpen("span",null,null,"className",e.styles["button-content"]),a(o()),d.vdom.elementClose("span"),d.vdom.elementClose("button"),d.vdom.elementClose("span")}},function(e,o){e.exports=require("classnames")},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=n(9),t=l(r),a=n(4),d=a.appearance.values,u=d.PRIMARY,i=d.SUBTLE,s=d.LINK;o["default"]=function(e,o){var n;return n={},(0,t["default"])(n,e.button,!0),(0,t["default"])(n,e.compact,o.compact),(0,t["default"])(n,e.disabled,o.disabled),(0,t["default"])(n,e.selected,o.selected&&!o.disabled),(0,t["default"])(n,e.primary,o.appearance===u&&!o.disabled&&!o.selected),(0,t["default"])(n,e.subtle,o.appearance===i&&!o.disabled&&!o.selected),(0,t["default"])(n,e.link,o.appearance===s&&!o.selected),n}},function(e,o){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=n(11),t=l(r),a=n(12),d=20,u=14,i=8,s="\n background 0.1s\n ease-out,\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)\n";o["default"]=function(e){var o=t["default"].bind(null,e);return{":host":{display:"inline-block"},":host(> _shadow_root_)":{display:"inline-block"},":host([disabled])":{"pointer-events":"none"},'::slotted([slot="before"])':{"margin-right":i+"px"},'::slotted([slot="after"])':{"margin-left":i+"px"},"before-slot-wrapper":{"align-self":"center",display:"flex"},"after-slot-wrapper":{"align-self":"center",display:"flex"},"button-content":{"align-items":"baseline",display:"inline-flex","flex-wrap":"nowrap"},"before-slot":{display:"inline-flex"},"after-slot":{display:"inline-flex"},"default-slot":{display:"inline-flex"},root:{display:"inline-block"},button:{"box-sizing":"border-box",background:o("standard.background",a.akColorN20),"border-width":"0","border-radius":o("button.baseRadius",a.akBorderRadius),color:o("standard.color",a.akColorN500),display:"inline-block","font-style":"normal","font-size":"inherit",height:o("button.height",4*i/u+"em"),"line-height":o("button.lineHeight",d/u),margin:"0",outline:"none",padding:o("button.padding",.75*i+"px "+i+"px"),"text-align":"center",transition:o("button.transition",s),"user-select":"none",border:o("button.border","none"),"&::-moz-focus-inner":{margin:0,padding:0,border:0},"&:hover":{background:o("standard.hover.background",a.akColorN30),cursor:"pointer","border-color":o("standard.hover.borderColor")},"&:active":{background:o("standard.active.background",a.akColorB50),"box-shadow":o("standard.active.boxShadow"),"transition-duration":o("standard.active.transitionDuration","0s")},"&:focus":{"box-shadow":"0 0 0 2px "+o("standard.focus.background",a.akColorB200),"transition-duration":o("standard.focus.transitionDuration","0s, 0.2s")}},primary:{background:o("primary.background",a.akColorB400),color:o("primary.color",a.akColorN20),"border-color":o("primary.borderColor"),"&:hover":{background:o("primary.hover.background",a.akColorB500),"border-color":o("primary.borderColor")},"&:active":{background:o("primary.active.background",a.akColorB300)}},subtle:{background:"none",color:o("subtle.color"),"border-color":o("subtle.borderColor"),"&:hover":{color:o("subtle.hover.color")}},disabled:{color:o("disabled.color",a.akColorN40),"::slotted(*)":{"pointer-events":"none"},cursor:"not-allowed",background:o("disabled.background"),"border-color":o("disabled.borderColor"),"box-shadow":o("disabled.boxShadow")},selected:{background:o("selected.background",a.akColorN700),color:o("selected.color",a.akColorN20),"box-shadow":o("selected.boxShadow"),"&:hover":{background:o("selected.hover.background",a.akColorN700),"border-color":o("selected.hover.borderColor"),transition:"none"}},link:{background:"none",color:o("link.color",a.akColorB400),transition:"color 0.1s ease-out","box-shadow":o("link.boxShadow"),"border-color":o("link.borderColor"),"&:hover":{background:"none",color:o("link.hover.color",a.akColorB300),"text-decoration":"underline","border-color":o("link.hover.borderColor")},"&:active":{color:o("link.active.color",a.akColorB300),"box-shadow":o("link.active.boxShadow"),"text-decoration":"none"},"&.disabled":{color:o("disabled.color",a.akColorN40),background:"none"}},compact:{height:o("compact.height",3*i/u+"em"),"padding-top":o("compact.paddingTop",i/3+"px"),"padding-bottom":o("compact.paddingBottom",i/3+"px")}}}},function(e,o){e.exports=require("lodash.get")},function(e,o){e.exports=require("akutil-shared-styles")},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=n(1),t=n(2),a=l(t);o["default"]=(0,r.define)("ak-button-theme-adg2",{render:function(){return r.vdom.elementOpen(a["default"],null,null,"id","ak-button-theme-adg2"),r.vdom.elementVoid(t.Prop,null,null,"name","button.padding","value","4px 10px"),r.vdom.elementVoid(t.Prop,null,null,"name","button.border","value","1px solid #ccc"),r.vdom.elementVoid(t.Prop,null,null,"name","button.transition","value","none"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.color","value","#333"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.hover.background","value","#e9e9e9"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.hover.borderColor","value","#999"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.active.boxShadow","value","inset 0 3px 6px 0 rgba(0,0,0,.1)"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.active.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.background","value","#3572b0"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.color","value","#fff"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.fontWeight","value","700"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.hover.background","value","#2a67a5"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.hover.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.active.background","value","#3572b0"),r.vdom.elementVoid(t.Prop,null,null,"name","subtle.color","value","#707070"),r.vdom.elementVoid(t.Prop,null,null,"name","subtle.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","subtle.hover.color","value","#000"),r.vdom.elementVoid(t.Prop,null,null,"name","disabled.color","value","#999"),r.vdom.elementVoid(t.Prop,null,null,"name","disabled.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","disabled.boxShadow","value","none"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.boxShadow","value","inset 0 3px 6px 0 rgba(0,0,0,.1)"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.color","value","#333"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.hover.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.hover.borderColor","value","#ccc"),r.vdom.elementVoid(t.Prop,null,null,"name","link.color","value","#3572b0"),r.vdom.elementVoid(t.Prop,null,null,"name","link.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","link.boxShadow","value","none"),r.vdom.elementVoid(t.Prop,null,null,"name","link.hover.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","link.active.boxShadow","value","none"),r.vdom.elementClose(a["default"])}})}]);
!function(root, factory) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("babel-runtime/helpers/defineProperty"), require("skatejs"), require("ak-theme"), require("akutil-common"), require("classnames"), require("babel-runtime/core-js/symbol"), require("akutil-shared-styles")) : "function" == typeof define && define.amd ? define([ "babel-runtime/helpers/defineProperty", "skatejs", "ak-theme", "akutil-common", "classnames", "babel-runtime/core-js/symbol", "akutil-shared-styles" ], factory) : "object" == typeof exports ? exports.akButton = factory(require("babel-runtime/helpers/defineProperty"), require("skatejs"), require("ak-theme"), require("akutil-common"), require("classnames"), require("babel-runtime/core-js/symbol"), require("akutil-shared-styles")) : root.akButton = factory(root["babel-runtime/helpers/defineProperty"], root.skatejs, root["ak-theme"], root["akutil-common"], root.classnames, root["babel-runtime/core-js/symbol"], root["akutil-shared-styles"]);
}(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_12__) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("skatejs"), require("ak-theme"), require("akutil-common"), require("classnames"), require("babel-runtime/helpers/defineProperty"), require("lodash.get"), require("akutil-shared-styles")) : "function" == typeof define && define.amd ? define([ "skatejs", "ak-theme", "akutil-common", "classnames", "babel-runtime/helpers/defineProperty", "lodash.get", "akutil-shared-styles" ], factory) : "object" == typeof exports ? exports.akButton = factory(require("skatejs"), require("ak-theme"), require("akutil-common"), require("classnames"), require("babel-runtime/helpers/defineProperty"), require("lodash.get"), require("akutil-shared-styles")) : root.akButton = factory(root.skatejs, root["ak-theme"], root["akutil-common"], root.classnames, root["babel-runtime/helpers/defineProperty"], root["lodash.get"], root["akutil-shared-styles"]);
}(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__) {
/******/

@@ -79,17 +79,13 @@ return function(modules) {

value: !0
}), exports.TYPE = exports.APPEARANCE = void 0;
var _defineProperty2 = __webpack_require__(1), _defineProperty3 = _interopRequireDefault(_defineProperty2), _attr = function(value, name) {
}), exports.themes = exports.TYPE = exports.APPEARANCE = void 0;
var _attr = function(value, name) {
_skatejs.vdom.attr(name, value);
}, _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) {
for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop);
}, _skatejs = __webpack_require__(2), _akTheme = __webpack_require__(3), _akutilCommon = __webpack_require__(4), _enumeratedProperties = __webpack_require__(5), _Slot = __webpack_require__(6), _Slot2 = _interopRequireDefault(_Slot), _Button = __webpack_require__(7), _Button2 = _interopRequireDefault(_Button), _symbols = __webpack_require__(9), _styles = __webpack_require__(11), _styles2 = _interopRequireDefault(_styles), APPEARANCE = _enumeratedProperties.appearance.values, TYPE = _enumeratedProperties.type.values;
}, _skatejs = __webpack_require__(1), _akTheme = __webpack_require__(2), _akutilCommon = __webpack_require__(3), _enumeratedProperties = __webpack_require__(4), _Slot = __webpack_require__(5), _Slot2 = _interopRequireDefault(_Slot), _Button = __webpack_require__(6), _Button2 = _interopRequireDefault(_Button), _styles = __webpack_require__(10), _styles2 = _interopRequireDefault(_styles), _adg = __webpack_require__(13), _adg2 = _interopRequireDefault(_adg), APPEARANCE = _enumeratedProperties.appearance.values, TYPE = _enumeratedProperties.type.values;
exports.APPEARANCE = APPEARANCE, exports.TYPE = TYPE;
/**
* @description Creates instances of ak-button programmatically, or using markup.
* @class Button
* @example @js import Button from 'ak-button';
* const button = new Button();
*/
var definition = {
props: (0, _defineProperty3["default"])({
var definition = (exports.themes = {
adg2: _adg2["default"]
}, {
props: {
/**

@@ -148,7 +144,5 @@ * @description Predefined appearances of an ak-button. One of:

})
}, _symbols.stylesKey, {
attribute: !1
}),
},
render: function(elem) {
var styles = elem[_symbols.stylesKey] = (0, _akutilCommon.style)(_skatejs.vdom, _styles2["default"]);
var styles = (0, _akutilCommon.style)(_skatejs.vdom, (0, _styles2["default"])(elem.themeProps));
return _skatejs.vdom.elementOpenStart(_Button2["default"]), _forOwn((0, _skatejs.props)(elem), _attr),

@@ -160,3 +154,3 @@ _skatejs.vdom.attr("styles", styles), _skatejs.vdom.elementOpenEnd(_Button2["default"]),

}
}, AkButton = (0, _skatejs.define)("ak-button", (0, _akTheme.themeable)(definition));
}), AkButton = (0, _skatejs.define)("ak-button", (0, _akTheme.themeable)(definition));
exports["default"] = AkButton;

@@ -177,6 +171,2 @@ }, /* 1 */

/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
}, /* 5 */
/***/
function(module, exports, __webpack_require__) {

@@ -187,3 +177,3 @@ "use strict";

}), exports.type = exports.appearance = void 0;
var _akutilCommon = __webpack_require__(4), attributeValuesToEnumObject = function(values) {
var _akutilCommon = __webpack_require__(3), attributeValuesToEnumObject = function(values) {
return values.reduce(function(acum, val) {

@@ -213,3 +203,3 @@ return acum[val.toUpperCase()] = val, acum;

};
}, /* 6 */
}, /* 5 */
/***/

@@ -221,3 +211,3 @@ function(module, exports, __webpack_require__) {

});
var _skatejs = __webpack_require__(2), getSlotName = function(side) {
var _skatejs = __webpack_require__(1), getSlotName = function(side) {
return side || "default";

@@ -231,3 +221,3 @@ };

};
}, /* 7 */
}, /* 6 */
/***/

@@ -244,3 +234,3 @@ function(module, exports, __webpack_require__) {

});
var _defineProperty2 = __webpack_require__(1), _defineProperty3 = _interopRequireDefault(_defineProperty2), _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) {
var _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) {
for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop);

@@ -250,16 +240,8 @@ }, _renderArbitrary = function _renderArbitrary(child) {

"number" === type || "string" === type || "object" === type && child instanceof String ? _skatejs.vdom.text(child) : "function" === type && child.__jsxDOMWrapper ? child() : Array.isArray(child) ? child.forEach(_renderArbitrary) : "object" === type && "[object Object]" === String(child) && _forOwn(child, _renderArbitrary);
}, _skatejs = __webpack_require__(2), _classnames = __webpack_require__(8), _classnames2 = _interopRequireDefault(_classnames), _enumeratedProperties = __webpack_require__(5), _appearance$values = _enumeratedProperties.appearance.values, PRIMARY = _appearance$values.PRIMARY, SUBTLE = _appearance$values.SUBTLE, LINK = _appearance$values.LINK, getClasses = function(styles, props) {
var _ref;
return _ref = {}, (0, _defineProperty3["default"])(_ref, styles.button, !0), (0,
_defineProperty3["default"])(_ref, styles.compact, props.compact), (0, _defineProperty3["default"])(_ref, styles.disabled, props.disabled),
(0, _defineProperty3["default"])(_ref, styles.selected, props.selected && !props.disabled),
(0, _defineProperty3["default"])(_ref, styles.primary, props.appearance === PRIMARY && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, styles.subtle, props.appearance === SUBTLE && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, styles.link, props.appearance === LINK && !props.selected),
_ref;
};
}, _skatejs = __webpack_require__(1), _classnames = __webpack_require__(7), _classnames2 = _interopRequireDefault(_classnames), _getButtonClasses = __webpack_require__(8), _getButtonClasses2 = _interopRequireDefault(_getButtonClasses);
/* eslint-disable react/prop-types */
exports["default"] = function(props, children) {
return _skatejs.vdom.elementOpen("span", null, null, "className", props.styles.root),
_skatejs.vdom.elementOpen("button", null, null, "className", (0, _classnames2["default"])(getClasses(props.styles, props)), "type", props.type, "disabled", props.disabled, "onmousedown", function(e) {
_skatejs.vdom.elementOpen("button", null, null, "className", (0, _classnames2["default"])((0,
_getButtonClasses2["default"])(props.styles, props)), "type", props.type, "disabled", props.disabled, "onmousedown", function(e) {
return e.preventDefault();

@@ -270,7 +252,7 @@ }), _skatejs.vdom.elementOpen("span", null, null, "className", props.styles["button-content"]),

};
}, /* 8 */
}, /* 7 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_8__;
}, /* 9 */
module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
}, /* 8 */
/***/

@@ -286,155 +268,187 @@ function(module, exports, __webpack_require__) {

value: !0
}), exports.stylesKey = void 0;
var _symbol = __webpack_require__(10), _symbol2 = _interopRequireDefault(_symbol);
exports.stylesKey = (0, _symbol2["default"])("ak-button-styles");
}, /* 10 */
});
var _defineProperty2 = __webpack_require__(9), _defineProperty3 = _interopRequireDefault(_defineProperty2), _enumeratedProperties = __webpack_require__(4), _appearance$values = _enumeratedProperties.appearance.values, PRIMARY = _appearance$values.PRIMARY, SUBTLE = _appearance$values.SUBTLE, LINK = _appearance$values.LINK;
exports["default"] = function(classKeys, props) {
var _ref;
return _ref = {}, (0, _defineProperty3["default"])(_ref, classKeys.button, !0),
(0, _defineProperty3["default"])(_ref, classKeys.compact, props.compact), (0, _defineProperty3["default"])(_ref, classKeys.disabled, props.disabled),
(0, _defineProperty3["default"])(_ref, classKeys.selected, props.selected && !props.disabled),
(0, _defineProperty3["default"])(_ref, classKeys.primary, props.appearance === PRIMARY && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, classKeys.subtle, props.appearance === SUBTLE && !props.disabled && !props.selected),
(0, _defineProperty3["default"])(_ref, classKeys.link, props.appearance === LINK && !props.selected),
_ref;
};
}, /* 9 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_10__;
}, /* 11 */
module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
}, /* 10 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _akutilSharedStyles = __webpack_require__(12), baseFont = "inherit", em = 14, grid = 8, lineHeight = 20, buttonLineHeight = lineHeight / em, buttonHeight = 4 * grid / em + "em", compactButtonHeight = 3 * grid / em + "em", baseRadius = _akutilSharedStyles.akBorderRadius, sideSlotMargin = grid + "px", defaultBackgroundColor = _akutilSharedStyles.akColorN20, defaultBackgroundColorHover = _akutilSharedStyles.akColorN30, defaultBackgroundColorFocus = _akutilSharedStyles.akColorB200, defaultBackgroundColorActive = _akutilSharedStyles.akColorB50, defaultColor = _akutilSharedStyles.akColorN500, primaryBackgroundColor = _akutilSharedStyles.akColorB400, primaryBackgroundColorHover = _akutilSharedStyles.akColorB500, primaryBackgroundColorActive = _akutilSharedStyles.akColorB300, primaryColor = _akutilSharedStyles.akColorN20, selectedBackgroundColor = _akutilSharedStyles.akColorN700, selectedColor = _akutilSharedStyles.akColorN20, linkColor = _akutilSharedStyles.akColorB400, linkColorHover = _akutilSharedStyles.akColorB300, linkColorActive = linkColorHover, disabledColor = _akutilSharedStyles.akColorN40;
exports["default"] = {
// light DOM styles
":host": {
display: "inline-flex"
},
":host(> _shadow_root_)": {
display: "inline-block"
},
":host([disabled])": {
"pointer-events": "none"
},
// shadow DOM styles
'::slotted([slot="before"])': {
"margin-right": sideSlotMargin
},
'::slotted([slot="after"])': {
"margin-left": sideSlotMargin
},
":host .before-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"before-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"after-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"button-content": {
"align-items": "baseline",
display: "inline-flex",
"flex-wrap": "nowrap"
},
"before-slot": {
display: "inline-flex"
},
"after-slot": {
display: "inline-flex"
},
"default-slot": {
display: "inline-flex"
},
root: {
display: "inline-block"
},
button: {
"box-sizing": "border-box",
background: defaultBackgroundColor,
"border-width": "0",
"border-radius": baseRadius,
color: defaultColor,
display: "inline-block",
"font-style": "normal",
"font-size": baseFont,
height: buttonHeight,
"line-height": buttonLineHeight,
margin: "0",
outline: "none",
padding: .75 * grid + "px " + grid + "px",
"text-align": "center",
transition: "background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)",
"user-select": "none",
"&::-moz-focus-inner": {
margin: 0,
padding: 0,
border: 0
var _lodash = __webpack_require__(11), _lodash2 = _interopRequireDefault(_lodash), _akutilSharedStyles = __webpack_require__(12), lineHeight = 20, em = 14, grid = 8, transitionValue = "\n background 0.1s\n ease-out,\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)\n";
exports["default"] = function(vars) {
var val = _lodash2["default"].bind(null, vars);
return {
// light DOM styles
":host": {
display: "inline-block"
},
"&:hover": {
background: defaultBackgroundColorHover,
cursor: "pointer",
transition: "background 0.2s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)"
":host(> _shadow_root_)": {
display: "inline-block"
},
"&:active": {
background: defaultBackgroundColorActive,
"transition-duration": "0s"
":host([disabled])": {
"pointer-events": "none"
},
"&:focus": {
"box-shadow": "0 0 0 2px " + defaultBackgroundColorFocus,
"transition-duration": "0s, 0.2s"
// shadow DOM styles
'::slotted([slot="before"])': {
"margin-right": grid + "px"
},
"&:focus:active": {
"box-shadow": "0 0 0 0 " + defaultBackgroundColorFocus
}
},
primary: {
background: primaryBackgroundColor,
color: primaryColor,
"&:hover": {
background: primaryBackgroundColorHover
'::slotted([slot="after"])': {
"margin-left": grid + "px"
},
"&:active": {
background: primaryBackgroundColorActive
}
},
subtle: {
background: "none"
},
disabled: {
color: disabledColor,
"::slotted(*)": {
"pointer-events": "none"
"before-slot-wrapper": {
"align-self": "center",
display: "flex"
},
cursor: "not-allowed"
},
selected: {
background: selectedBackgroundColor,
color: selectedColor,
"&:hover": {
background: selectedBackgroundColor,
transition: "none"
}
},
link: {
background: "none",
color: linkColor,
transition: "color 0.1s ease-out",
"&:hover": {
"after-slot-wrapper": {
"align-self": "center",
display: "flex"
},
"button-content": {
"align-items": "baseline",
display: "inline-flex",
"flex-wrap": "nowrap"
},
"before-slot": {
display: "inline-flex"
},
"after-slot": {
display: "inline-flex"
},
"default-slot": {
display: "inline-flex"
},
root: {
display: "inline-block"
},
button: {
"box-sizing": "border-box",
background: val("standard.background", _akutilSharedStyles.akColorN20),
"border-width": "0",
"border-radius": val("button.baseRadius", _akutilSharedStyles.akBorderRadius),
color: val("standard.color", _akutilSharedStyles.akColorN500),
display: "inline-block",
"font-style": "normal",
"font-size": "inherit",
height: val("button.height", 4 * grid / em + "em"),
"line-height": val("button.lineHeight", lineHeight / em),
margin: "0",
outline: "none",
padding: val("button.padding", .75 * grid + "px " + grid + "px"),
"text-align": "center",
transition: val("button.transition", transitionValue),
"user-select": "none",
border: val("button.border", "none"),
"&::-moz-focus-inner": {
margin: 0,
padding: 0,
border: 0
},
"&:hover": {
background: val("standard.hover.background", _akutilSharedStyles.akColorN30),
cursor: "pointer",
"border-color": val("standard.hover.borderColor")
},
"&:active": {
background: val("standard.active.background", _akutilSharedStyles.akColorB50),
"box-shadow": val("standard.active.boxShadow"),
"transition-duration": val("standard.active.transitionDuration", "0s")
},
"&:focus": {
"box-shadow": "0 0 0 2px " + val("standard.focus.background", _akutilSharedStyles.akColorB200),
"transition-duration": val("standard.focus.transitionDuration", "0s, 0.2s")
}
},
primary: {
background: val("primary.background", _akutilSharedStyles.akColorB400),
color: val("primary.color", _akutilSharedStyles.akColorN20),
"border-color": val("primary.borderColor"),
"&:hover": {
background: val("primary.hover.background", _akutilSharedStyles.akColorB500),
"border-color": val("primary.borderColor")
},
"&:active": {
background: val("primary.active.background", _akutilSharedStyles.akColorB300)
}
},
subtle: {
background: "none",
color: linkColorHover,
"text-decoration": "underline"
color: val("subtle.color"),
"border-color": val("subtle.borderColor"),
"&:hover": {
color: val("subtle.hover.color")
}
},
"&:active": {
color: linkColorActive,
"text-decoration": "none"
disabled: {
color: val("disabled.color", _akutilSharedStyles.akColorN40),
"::slotted(*)": {
"pointer-events": "none"
},
cursor: "not-allowed",
background: val("disabled.background"),
"border-color": val("disabled.borderColor"),
"box-shadow": val("disabled.boxShadow")
},
"&.disabled": {
color: disabledColor,
background: "none"
selected: {
background: val("selected.background", _akutilSharedStyles.akColorN700),
color: val("selected.color", _akutilSharedStyles.akColorN20),
"box-shadow": val("selected.boxShadow"),
"&:hover": {
background: val("selected.hover.background", _akutilSharedStyles.akColorN700),
"border-color": val("selected.hover.borderColor"),
transition: "none"
}
},
link: {
background: "none",
color: val("link.color", _akutilSharedStyles.akColorB400),
transition: "color 0.1s ease-out",
"box-shadow": val("link.boxShadow"),
"border-color": val("link.borderColor"),
"&:hover": {
background: "none",
color: val("link.hover.color", _akutilSharedStyles.akColorB300),
"text-decoration": "underline",
"border-color": val("link.hover.borderColor")
},
"&:active": {
color: val("link.active.color", _akutilSharedStyles.akColorB300),
"box-shadow": val("link.active.boxShadow"),
"text-decoration": "none"
},
"&.disabled": {
color: val("disabled.color", _akutilSharedStyles.akColorN40),
background: "none"
}
},
compact: {
height: val("compact.height", 3 * grid / em + "em"),
"padding-top": val("compact.paddingTop", grid / 3 + "px"),
"padding-bottom": val("compact.paddingBottom", grid / 3 + "px")
}
},
compact: {
height: compactButtonHeight,
"padding-top": grid / 4 + "px",
"padding-bottom": grid / 4 + "px"
}
};
};
}, /* 11 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
}, /* 12 */

@@ -444,3 +458,54 @@ /***/

module.exports = __WEBPACK_EXTERNAL_MODULE_12__;
}, /* 13 */
/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _skatejs = __webpack_require__(1), _akTheme = __webpack_require__(2), _akTheme2 = _interopRequireDefault(_akTheme);
exports["default"] = (0, _skatejs.define)("ak-button-theme-adg2", {
render: function() {
return _skatejs.vdom.elementOpen(_akTheme2["default"], null, null, "id", "ak-button-theme-adg2"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "button.padding", "value", "4px 10px"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "button.border", "value", "1px solid #ccc"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "button.transition", "value", "none"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.color", "value", "#333"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.hover.background", "value", "#e9e9e9"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.hover.borderColor", "value", "#999"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.active.boxShadow", "value", "inset 0 3px 6px 0 rgba(0,0,0,.1)"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "standard.active.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.background", "value", "#3572b0"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.color", "value", "#fff"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.fontWeight", "value", "700"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.hover.background", "value", "#2a67a5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.hover.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "primary.active.background", "value", "#3572b0"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "subtle.color", "value", "#707070"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "subtle.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "subtle.hover.color", "value", "#000"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "disabled.color", "value", "#999"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "disabled.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "disabled.boxShadow", "value", "none"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.boxShadow", "value", "inset 0 3px 6px 0 rgba(0,0,0,.1)"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.color", "value", "#333"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.hover.background", "value", "#f5f5f5"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "selected.hover.borderColor", "value", "#ccc"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.color", "value", "#3572b0"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.boxShadow", "value", "none"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.hover.borderColor", "value", "transparent"),
_skatejs.vdom.elementVoid(_akTheme.Prop, null, null, "name", "link.active.boxShadow", "value", "none"),
_skatejs.vdom.elementClose(_akTheme2["default"]);
}
});
} ]);
});

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/defineProperty"),require("skatejs"),require("ak-theme"),require("akutil-common"),require("classnames"),require("babel-runtime/core-js/symbol"),require("akutil-shared-styles")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/defineProperty","skatejs","ak-theme","akutil-common","classnames","babel-runtime/core-js/symbol","akutil-shared-styles"],t):"object"==typeof exports?exports.akButton=t(require("babel-runtime/helpers/defineProperty"),require("skatejs"),require("ak-theme"),require("akutil-common"),require("classnames"),require("babel-runtime/core-js/symbol"),require("akutil-shared-styles")):e.akButton=t(e["babel-runtime/helpers/defineProperty"],e.skatejs,e["ak-theme"],e["akutil-common"],e.classnames,e["babel-runtime/core-js/symbol"],e["akutil-shared-styles"])}(this,function(e,t,o,n,r,a,l){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.TYPE=t.APPEARANCE=void 0;var r=o(1),a=n(r),l=function(e,t){u.vdom.attr(t,e)},s=Object.prototype.hasOwnProperty,i=function(e,t){for(var o in e)s.call(e,o)&&t(e[o],o)},u=o(2),d=o(3),c=o(4),p=o(5),f=o(6),b=n(f),m=o(7),y=n(m),v=o(9),k=o(11),x=n(k),h=p.appearance.values,g=p.type.values;t.APPEARANCE=h,t.TYPE=g;var j={props:(0,a["default"])({appearance:p.appearance.enumeration,type:p.type.enumeration,disabled:u.prop["boolean"]({attribute:!0}),compact:u.prop["boolean"]({attribute:!0}),selected:u.prop["boolean"]({attribute:!0})},v.stylesKey,{attribute:!1}),render:function(e){var t=e[v.stylesKey]=(0,c.style)(u.vdom,x["default"]);return u.vdom.elementOpenStart(y["default"]),i((0,u.props)(e),l),u.vdom.attr("styles",t),u.vdom.elementOpenEnd(y["default"]),u.vdom.elementVoid(b["default"],null,null,"styles",t,"name","before"),u.vdom.elementVoid(b["default"],null,null,"styles",t),u.vdom.elementVoid(b["default"],null,null,"styles",t,"name","after"),u.vdom.elementClose(y["default"])}},_=(0,u.define)("ak-button",(0,d.themeable)(j));t["default"]=_},function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o},function(e,t){e.exports=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.type=t.appearance=void 0;var n=o(4),r=function(e){return e.reduce(function(e,t){return e[t.toUpperCase()]=t,e},{})},a=["primary","standard","subtle","link"],l=["button","submit"],s=r(a),i=r(l),u={attribute:"appearance",values:a,invalidDefault:s.STANDARD},d={attribute:"type",values:l,missingDefault:"button",invalidDefault:"button"};t.appearance={enumeration:(0,n.enumeration)(u)({attribute:!0}),values:s},t.type={enumeration:(0,n.enumeration)(d)({attribute:!0}),values:i}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2),r=function(e){return e||"default"};t["default"]=function(e){var t=e.name,o=e.styles;return n.vdom.elementOpen("span",null,null,"className",o[r(t)+"-slot-wrapper"]),n.vdom.elementVoid("slot",null,null,"name",t,"className",o[r(t)+"-slot"]),n.vdom.elementClose("span")}},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1),a=n(r),l=Object.prototype.hasOwnProperty,s=function(e,t){for(var o in e)l.call(e,o)&&t(e[o],o)},i=function k(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?u.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(k):"object"===t&&"[object Object]"===String(e)&&s(e,k)},u=o(2),d=o(8),c=n(d),p=o(5),f=p.appearance.values,b=f.PRIMARY,m=f.SUBTLE,y=f.LINK,v=function(e,t){var o;return o={},(0,a["default"])(o,e.button,!0),(0,a["default"])(o,e.compact,t.compact),(0,a["default"])(o,e.disabled,t.disabled),(0,a["default"])(o,e.selected,t.selected&&!t.disabled),(0,a["default"])(o,e.primary,t.appearance===b&&!t.disabled&&!t.selected),(0,a["default"])(o,e.subtle,t.appearance===m&&!t.disabled&&!t.selected),(0,a["default"])(o,e.link,t.appearance===y&&!t.selected),o};t["default"]=function(e,t){return u.vdom.elementOpen("span",null,null,"className",e.styles.root),u.vdom.elementOpen("button",null,null,"className",(0,c["default"])(v(e.styles,e)),"type",e.type,"disabled",e.disabled,"onmousedown",function(e){return e.preventDefault()}),u.vdom.elementOpen("span",null,null,"className",e.styles["button-content"]),i(t()),u.vdom.elementClose("span"),u.vdom.elementClose("button"),u.vdom.elementClose("span")}},function(e,t){e.exports=r},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.stylesKey=void 0;var r=o(10),a=n(r);t.stylesKey=(0,a["default"])("ak-button-styles")},function(e,t){e.exports=a},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12),r="inherit",a=14,l=8,s=20,i=s/a,u=4*l/a+"em",d=3*l/a+"em",c=n.akBorderRadius,p=l+"px",f=n.akColorN20,b=n.akColorN30,m=n.akColorB200,y=n.akColorB50,v=n.akColorN500,k=n.akColorB400,x=n.akColorB500,h=n.akColorB300,g=n.akColorN20,j=n.akColorN700,_=n.akColorN20,C=n.akColorB400,P=n.akColorB300,O=P,w=n.akColorN40;t["default"]={":host":{display:"inline-flex"},":host(> _shadow_root_)":{display:"inline-block"},":host([disabled])":{"pointer-events":"none"},'::slotted([slot="before"])':{"margin-right":p},'::slotted([slot="after"])':{"margin-left":p},":host .before-slot-wrapper":{"align-self":"center",display:"flex"},"before-slot-wrapper":{"align-self":"center",display:"flex"},"after-slot-wrapper":{"align-self":"center",display:"flex"},"button-content":{"align-items":"baseline",display:"inline-flex","flex-wrap":"nowrap"},"before-slot":{display:"inline-flex"},"after-slot":{display:"inline-flex"},"default-slot":{display:"inline-flex"},root:{display:"inline-block"},button:{"box-sizing":"border-box",background:f,"border-width":"0","border-radius":c,color:v,display:"inline-block","font-style":"normal","font-size":r,height:u,"line-height":i,margin:"0",outline:"none",padding:.75*l+"px "+l+"px","text-align":"center",transition:"background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)","user-select":"none","&::-moz-focus-inner":{margin:0,padding:0,border:0},"&:hover":{background:b,cursor:"pointer",transition:"background 0.2s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)"},"&:active":{background:y,"transition-duration":"0s"},"&:focus":{"box-shadow":"0 0 0 2px "+m,"transition-duration":"0s, 0.2s"},"&:focus:active":{"box-shadow":"0 0 0 0 "+m}},primary:{background:k,color:g,"&:hover":{background:x},"&:active":{background:h}},subtle:{background:"none"},disabled:{color:w,"::slotted(*)":{"pointer-events":"none"},cursor:"not-allowed"},selected:{background:j,color:_,"&:hover":{background:j,transition:"none"}},link:{background:"none",color:C,transition:"color 0.1s ease-out","&:hover":{background:"none",color:P,"text-decoration":"underline"},"&:active":{color:O,"text-decoration":"none"},"&.disabled":{color:w,background:"none"}},compact:{height:d,"padding-top":l/4+"px","padding-bottom":l/4+"px"}}},function(e,t){e.exports=l}])});
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("skatejs"),require("ak-theme"),require("akutil-common"),require("classnames"),require("babel-runtime/helpers/defineProperty"),require("lodash.get"),require("akutil-shared-styles")):"function"==typeof define&&define.amd?define(["skatejs","ak-theme","akutil-common","classnames","babel-runtime/helpers/defineProperty","lodash.get","akutil-shared-styles"],o):"object"==typeof exports?exports.akButton=o(require("skatejs"),require("ak-theme"),require("akutil-common"),require("classnames"),require("babel-runtime/helpers/defineProperty"),require("lodash.get"),require("akutil-shared-styles")):e.akButton=o(e.skatejs,e["ak-theme"],e["akutil-common"],e.classnames,e["babel-runtime/helpers/defineProperty"],e["lodash.get"],e["akutil-shared-styles"])}(this,function(e,o,n,l,r,t,a){return function(e){function o(l){if(n[l])return n[l].exports;var r=n[l]={exports:{},id:l,loaded:!1};return e[l].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}var n={};return o.m=e,o.c=n,o.p="",o(0)}([function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0}),o.themes=o.TYPE=o.APPEARANCE=void 0;var r=function(e,o){d.vdom.attr(o,e)},t=Object.prototype.hasOwnProperty,a=function(e,o){for(var n in e)t.call(e,n)&&o(e[n],n)},d=n(1),u=n(2),i=n(3),s=n(4),c=n(5),m=l(c),p=n(6),b=l(p),v=n(10),f=l(v),k=n(13),h=l(k),g=s.appearance.values,y=s.type.values;o.APPEARANCE=g,o.TYPE=y;var x=(o.themes={adg2:h["default"]},{props:{appearance:s.appearance.enumeration,type:s.type.enumeration,disabled:d.prop["boolean"]({attribute:!0}),compact:d.prop["boolean"]({attribute:!0}),selected:d.prop["boolean"]({attribute:!0})},render:function(e){var o=(0,i.style)(d.vdom,(0,f["default"])(e.themeProps));return d.vdom.elementOpenStart(b["default"]),a((0,d.props)(e),r),d.vdom.attr("styles",o),d.vdom.elementOpenEnd(b["default"]),d.vdom.elementVoid(m["default"],null,null,"styles",o,"name","before"),d.vdom.elementVoid(m["default"],null,null,"styles",o),d.vdom.elementVoid(m["default"],null,null,"styles",o,"name","after"),d.vdom.elementClose(b["default"])}}),P=(0,d.define)("ak-button",(0,u.themeable)(x));o["default"]=P},function(o,n){o.exports=e},function(e,n){e.exports=o},function(e,o){e.exports=n},function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.type=o.appearance=void 0;var l=n(3),r=function(e){return e.reduce(function(e,o){return e[o.toUpperCase()]=o,e},{})},t=["primary","standard","subtle","link"],a=["button","submit"],d=r(t),u=r(a),i={attribute:"appearance",values:t,invalidDefault:d.STANDARD},s={attribute:"type",values:a,missingDefault:"button",invalidDefault:"button"};o.appearance={enumeration:(0,l.enumeration)(i)({attribute:!0}),values:d},o.type={enumeration:(0,l.enumeration)(s)({attribute:!0}),values:u}},function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var l=n(1),r=function(e){return e||"default"};o["default"]=function(e){var o=e.name,n=e.styles;return l.vdom.elementOpen("span",null,null,"className",n[r(o)+"-slot-wrapper"]),l.vdom.elementVoid("slot",null,null,"name",o,"className",n[r(o)+"-slot"]),l.vdom.elementClose("span")}},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty,t=function(e,o){for(var n in e)r.call(e,n)&&o(e[n],n)},a=function m(e){var o=typeof e;"number"===o||"string"===o||"object"===o&&e instanceof String?d.vdom.text(e):"function"===o&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(m):"object"===o&&"[object Object]"===String(e)&&t(e,m)},d=n(1),u=n(7),i=l(u),s=n(8),c=l(s);o["default"]=function(e,o){return d.vdom.elementOpen("span",null,null,"className",e.styles.root),d.vdom.elementOpen("button",null,null,"className",(0,i["default"])((0,c["default"])(e.styles,e)),"type",e.type,"disabled",e.disabled,"onmousedown",function(e){return e.preventDefault()}),d.vdom.elementOpen("span",null,null,"className",e.styles["button-content"]),a(o()),d.vdom.elementClose("span"),d.vdom.elementClose("button"),d.vdom.elementClose("span")}},function(e,o){e.exports=l},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=n(9),t=l(r),a=n(4),d=a.appearance.values,u=d.PRIMARY,i=d.SUBTLE,s=d.LINK;o["default"]=function(e,o){var n;return n={},(0,t["default"])(n,e.button,!0),(0,t["default"])(n,e.compact,o.compact),(0,t["default"])(n,e.disabled,o.disabled),(0,t["default"])(n,e.selected,o.selected&&!o.disabled),(0,t["default"])(n,e.primary,o.appearance===u&&!o.disabled&&!o.selected),(0,t["default"])(n,e.subtle,o.appearance===i&&!o.disabled&&!o.selected),(0,t["default"])(n,e.link,o.appearance===s&&!o.selected),n}},function(e,o){e.exports=r},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=n(11),t=l(r),a=n(12),d=20,u=14,i=8,s="\n background 0.1s\n ease-out,\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)\n";o["default"]=function(e){var o=t["default"].bind(null,e);return{":host":{display:"inline-block"},":host(> _shadow_root_)":{display:"inline-block"},":host([disabled])":{"pointer-events":"none"},'::slotted([slot="before"])':{"margin-right":i+"px"},'::slotted([slot="after"])':{"margin-left":i+"px"},"before-slot-wrapper":{"align-self":"center",display:"flex"},"after-slot-wrapper":{"align-self":"center",display:"flex"},"button-content":{"align-items":"baseline",display:"inline-flex","flex-wrap":"nowrap"},"before-slot":{display:"inline-flex"},"after-slot":{display:"inline-flex"},"default-slot":{display:"inline-flex"},root:{display:"inline-block"},button:{"box-sizing":"border-box",background:o("standard.background",a.akColorN20),"border-width":"0","border-radius":o("button.baseRadius",a.akBorderRadius),color:o("standard.color",a.akColorN500),display:"inline-block","font-style":"normal","font-size":"inherit",height:o("button.height",4*i/u+"em"),"line-height":o("button.lineHeight",d/u),margin:"0",outline:"none",padding:o("button.padding",.75*i+"px "+i+"px"),"text-align":"center",transition:o("button.transition",s),"user-select":"none",border:o("button.border","none"),"&::-moz-focus-inner":{margin:0,padding:0,border:0},"&:hover":{background:o("standard.hover.background",a.akColorN30),cursor:"pointer","border-color":o("standard.hover.borderColor")},"&:active":{background:o("standard.active.background",a.akColorB50),"box-shadow":o("standard.active.boxShadow"),"transition-duration":o("standard.active.transitionDuration","0s")},"&:focus":{"box-shadow":"0 0 0 2px "+o("standard.focus.background",a.akColorB200),"transition-duration":o("standard.focus.transitionDuration","0s, 0.2s")}},primary:{background:o("primary.background",a.akColorB400),color:o("primary.color",a.akColorN20),"border-color":o("primary.borderColor"),"&:hover":{background:o("primary.hover.background",a.akColorB500),"border-color":o("primary.borderColor")},"&:active":{background:o("primary.active.background",a.akColorB300)}},subtle:{background:"none",color:o("subtle.color"),"border-color":o("subtle.borderColor"),"&:hover":{color:o("subtle.hover.color")}},disabled:{color:o("disabled.color",a.akColorN40),"::slotted(*)":{"pointer-events":"none"},cursor:"not-allowed",background:o("disabled.background"),"border-color":o("disabled.borderColor"),"box-shadow":o("disabled.boxShadow")},selected:{background:o("selected.background",a.akColorN700),color:o("selected.color",a.akColorN20),"box-shadow":o("selected.boxShadow"),"&:hover":{background:o("selected.hover.background",a.akColorN700),"border-color":o("selected.hover.borderColor"),transition:"none"}},link:{background:"none",color:o("link.color",a.akColorB400),transition:"color 0.1s ease-out","box-shadow":o("link.boxShadow"),"border-color":o("link.borderColor"),"&:hover":{background:"none",color:o("link.hover.color",a.akColorB300),"text-decoration":"underline","border-color":o("link.hover.borderColor")},"&:active":{color:o("link.active.color",a.akColorB300),"box-shadow":o("link.active.boxShadow"),"text-decoration":"none"},"&.disabled":{color:o("disabled.color",a.akColorN40),background:"none"}},compact:{height:o("compact.height",3*i/u+"em"),"padding-top":o("compact.paddingTop",i/3+"px"),"padding-bottom":o("compact.paddingBottom",i/3+"px")}}}},function(e,o){e.exports=t},function(e,o){e.exports=a},function(e,o,n){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(o,"__esModule",{value:!0});var r=n(1),t=n(2),a=l(t);o["default"]=(0,r.define)("ak-button-theme-adg2",{render:function(){return r.vdom.elementOpen(a["default"],null,null,"id","ak-button-theme-adg2"),r.vdom.elementVoid(t.Prop,null,null,"name","button.padding","value","4px 10px"),r.vdom.elementVoid(t.Prop,null,null,"name","button.border","value","1px solid #ccc"),r.vdom.elementVoid(t.Prop,null,null,"name","button.transition","value","none"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.color","value","#333"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.hover.background","value","#e9e9e9"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.hover.borderColor","value","#999"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.active.boxShadow","value","inset 0 3px 6px 0 rgba(0,0,0,.1)"),r.vdom.elementVoid(t.Prop,null,null,"name","standard.active.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.background","value","#3572b0"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.color","value","#fff"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.fontWeight","value","700"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.hover.background","value","#2a67a5"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.hover.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","primary.active.background","value","#3572b0"),r.vdom.elementVoid(t.Prop,null,null,"name","subtle.color","value","#707070"),r.vdom.elementVoid(t.Prop,null,null,"name","subtle.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","subtle.hover.color","value","#000"),r.vdom.elementVoid(t.Prop,null,null,"name","disabled.color","value","#999"),r.vdom.elementVoid(t.Prop,null,null,"name","disabled.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","disabled.boxShadow","value","none"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.boxShadow","value","inset 0 3px 6px 0 rgba(0,0,0,.1)"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.color","value","#333"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.hover.background","value","#f5f5f5"),r.vdom.elementVoid(t.Prop,null,null,"name","selected.hover.borderColor","value","#ccc"),r.vdom.elementVoid(t.Prop,null,null,"name","link.color","value","#3572b0"),r.vdom.elementVoid(t.Prop,null,null,"name","link.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","link.boxShadow","value","none"),r.vdom.elementVoid(t.Prop,null,null,"name","link.hover.borderColor","value","transparent"),r.vdom.elementVoid(t.Prop,null,null,"name","link.active.boxShadow","value","none"),r.vdom.elementClose(a["default"])}})}])});
{
"name": "ak-button",
"version": "1.4.7",
"version": "1.5.0",
"description": "ak-button webcomponent",

@@ -19,2 +19,3 @@ "main": "dist/bundle.js",

"babel-runtime": "^6.11.6",
"lodash.get": "^4.4.2",
"skatejs": "^3.0.0"

@@ -21,0 +22,0 @@ },

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Bug tracker](https://img.shields.io/badge/support-bugtracker-blue.svg)](https://ecosystem.atlassian.net/browse/AK)
[![Support forum](https://img.shields.io/badge/support-forum-blue.svg)](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-button,ak-button@1.4.7)
[![Support forum](https://img.shields.io/badge/support-forum-blue.svg)](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-button,ak-button@1.5.0)

@@ -10,9 +10,9 @@ # Button

![Example buttons](https://bytebucket.org/atlassian/atlaskit/raw/master/packages/ak-button/docs/button_1.png)
![Example buttons](https://bytebucket.org/atlassian/atlaskit/raw/7231479506f899a18f2b4805dbce263a16c6944a/packages/ak-button/docs/button_1.png)
![Example buttons](https://bytebucket.org/atlassian/atlaskit/raw/master/packages/ak-button/docs/button_2.png)
![Example buttons](https://bytebucket.org/atlassian/atlaskit/raw/7231479506f899a18f2b4805dbce263a16c6944a/packages/ak-button/docs/button_2.png)
## Try it out
Interact with a [live demo of the ak-button component](https://aui-cdn.atlassian.com/atlaskit/stories/ak-button/1.4.7/).
Interact with a [live demo of the ak-button component](https://aui-cdn.atlassian.com/atlaskit/stories/ak-button/1.5.0/).

@@ -200,3 +200,3 @@ ## Installation

Ask a question in our [forum](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-button,ak-button@1.4.7).
Ask a question in our [forum](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-button,ak-button@1.5.0).

@@ -203,0 +203,0 @@ Check [if someone has already asked the same question before](https://answers.atlassian.com/questions/topics/42926171/atlaskit).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc