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

@justeat/f-button

Package Overview
Dependencies
Maintainers
46
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeat/f-button - npm Package Compare versions

Comparing version 4.3.0 to 4.4.0

345

dist/f-button.common.js

@@ -90,2 +90,13 @@ module.exports =

/***/ "039d":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bc4f");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default.a; });
/***/ }),
/***/ "05e9":

@@ -123,3 +134,3 @@ /***/ (function(module, exports) {

// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=template&id=746803f8&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=template&id=8ce2fcf6&
var render = function () {

@@ -135,5 +146,5 @@ var _obj, _obj$1;

// CONCATENATED MODULE: ./src/components/Button.vue?vue&type=template&id=746803f8&
// CONCATENATED MODULE: ./src/components/Button.vue?vue&type=template&id=8ce2fcf6&
// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=template&id=24360df8&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=template&id=24360df8&
var Actionvue_type_template_id_24360df8_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',_vm._g({attrs:{"type":_vm.actionType}},_vm.$listeners),[_vm._t("default")],2)}

@@ -145,3 +156,3 @@ var Actionvue_type_template_id_24360df8_staticRenderFns = []

// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--13-0!/home/circleci/project/node_modules/thread-loader/dist/cjs.js!/home/circleci/project/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=script&lang=js&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=script&lang=js&
//

@@ -155,14 +166,16 @@ //

//
/* harmony default export */ var Actionvue_type_script_lang_js_ = ({
name: 'ActionButton',
props: {
actionType: {
type: String,
required: true
name: 'ActionButton',
props: {
actionType: {
type: String,
required: true
}
}
}
});
// CONCATENATED MODULE: ./src/components/Action.vue?vue&type=script&lang=js&
/* harmony default export */ var components_Actionvue_type_script_lang_js_ = (Actionvue_type_script_lang_js_);
// CONCATENATED MODULE: /home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */

@@ -285,3 +298,3 @@

/* harmony default export */ var Action = (component.exports);
// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=template&id=138ef925&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=template&id=138ef925&
var Linkvue_type_template_id_138ef925_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',_vm._g({},_vm.$listeners),[_vm._t("default")],2)}

@@ -293,3 +306,3 @@ var Linkvue_type_template_id_138ef925_staticRenderFns = []

// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--13-0!/home/circleci/project/node_modules/thread-loader/dist/cjs.js!/home/circleci/project/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=script&lang=js&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=script&lang=js&
//

@@ -301,5 +314,7 @@ //

//
/* harmony default export */ var Linkvue_type_script_lang_js_ = ({
name: 'LinkButton'
name: 'LinkButton'
});
// CONCATENATED MODULE: ./src/components/Link.vue?vue&type=script&lang=js&

@@ -329,9 +344,12 @@ /* harmony default export */ var components_Linkvue_type_script_lang_js_ = (Linkvue_type_script_lang_js_);

// eslint-disable-next-line import/prefer-default-export
var VALID_BUTTON_TYPES = {
iconButton: ['primary', 'secondary', 'ghost', 'ghostTertiary', 'inverse', 'ghostInverse'],
button: ['primary', 'secondary', 'outline', 'ghost', 'link']
const VALID_BUTTON_TYPES = {
iconButton: ['primary', 'secondary', 'ghost', 'ghostTertiary', 'inverse', 'ghostInverse'],
button: ['primary', 'secondary', 'outline', 'ghost', 'link']
};
var VALID_BUTTON_SIZES = ['xsmall', 'small', 'medium', 'large'];
var VALID_BUTTON_ICON_POSITION = ['leading', 'trailing', false];
// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--13-0!/home/circleci/project/node_modules/thread-loader/dist/cjs.js!/home/circleci/project/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=script&lang=js&
const VALID_BUTTON_SIZES = ['xsmall', 'small', 'medium', 'large'];
const VALID_BUTTON_ICON_POSITION = ['leading', 'trailing', false];
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=script&lang=js&
//

@@ -394,125 +412,133 @@ //

/* harmony default export */ var Buttonvue_type_script_lang_js_ = ({
name: 'FButton',
components: {
ActionButton: Action,
LinkButton: Link
},
props: {
buttonType: {
type: String,
default: 'primary'
name: 'FButton',
components: {
ActionButton: Action,
LinkButton: Link
},
buttonSize: {
type: String,
default: 'medium'
props: {
buttonType: {
type: String,
default: 'primary'
},
buttonSize: {
type: String,
default: 'medium'
},
isFullWidth: {
type: Boolean,
default: false
},
actionType: {
type: String,
default: 'button'
},
isIcon: {
type: Boolean,
default: false
},
isLoading: {
type: Boolean,
default: false
},
hasIcon: {
type: [Boolean, String],
default: false
}
},
isFullWidth: {
type: Boolean,
default: false
},
actionType: {
type: String,
default: 'button'
},
isIcon: {
type: Boolean,
default: false
},
isLoading: {
type: Boolean,
default: false
},
hasIcon: {
type: [Boolean, String],
default: false
}
},
computed: {
/**
* Passes `actionType` prop to action button if no `href` or `to` attributes is applied to the component
*/
buttonActionType: function buttonActionType() {
return !this.$attrs.href && !this.$attrs.to ? this.actionType : null;
},
computed: {
/**
* Passes `actionType` prop to action button if no `href` or `to` attributes is applied to the component
*/
buttonActionType () {
return (!this.$attrs.href && !this.$attrs.to) ? this.actionType : null;
},
/**
* Converts the buttonSize prop into a normalised classname (that fits with our class naming scheme)
*/
buttonSizeClassname: function buttonSizeClassname() {
if (this.buttonSize === 'xsmall') {
return this.buttonSize.slice(0, 2).toUpperCase() + this.buttonSize.slice(2); // xsmall -> XSmall
}
/**
* Converts the buttonSize prop into a normalised classname (that fits with our class naming scheme)
*/
buttonSizeClassname () {
if (this.buttonSize === 'xsmall') {
return this.buttonSize.slice(0, 2).toUpperCase() + this.buttonSize.slice(2); // xsmall -> XSmall
}
return this.buttonSize.charAt(0).toUpperCase() + this.buttonSize.slice(1); // capitalize the first letter of the prop
},
return this.buttonSize.charAt(0).toUpperCase() + this.buttonSize.slice(1); // capitalize the first letter of the prop
},
/**
* Renders `Link` component if a `href` attribute is applied to the component
* Renders `RouterLink` component if a `to` attribute is applied to the component, avoids page reload compared to Link with `href`
* Renders `Action` component if no `href` attribute is applied to the component
*/
componentType () {
if (this.$attrs.href) {
return 'link-button';
}
/**
* Renders `Link` component if a `href` attribute is applied to the component
* Renders `RouterLink` component if a `to` attribute is applied to the component, avoids page reload compared to Link with `href`
* Renders `Action` component if no `href` attribute is applied to the component
*/
componentType: function componentType() {
if (this.$attrs.href) {
return 'link-button';
}
if (this.$attrs.to) {
return 'router-link';
}
if (this.$attrs.to) {
return 'router-link';
}
return 'action-button';
},
return 'action-button';
},
/**
* Gets the correct value for the aria-live attribute depending on whether the button is loading or not.
*/
getAriaLive () {
return this.isLoading ? 'polite' : 'off';
},
/**
* Gets the correct value for the aria-live attribute depending on whether the button is loading or not.
*/
getAriaLive: function getAriaLive() {
return this.isLoading ? 'polite' : 'off';
hasTrailingIcon () {
return this.hasIcon && this.hasIcon === 'trailing';
},
hasLeadingIcon () {
return this.hasIcon && this.hasIcon === 'leading';
},
hasNestedContent () {
return this.isLoading
|| this.hasLeadingIcon
|| this.hasTrailingIcon;
}
},
hasTrailingIcon: function hasTrailingIcon() {
return this.hasIcon && this.hasIcon === 'trailing';
watch: {
$props: {
immediate: true,
handler () {
this.validateProps();
}
}
},
hasLeadingIcon: function hasLeadingIcon() {
return this.hasIcon && this.hasIcon === 'leading';
},
hasNestedContent: function hasNestedContent() {
return this.isLoading || this.hasLeadingIcon || this.hasTrailingIcon;
}
},
watch: {
$props: {
immediate: true,
handler: function handler() {
this.validateProps();
}
}
},
methods: {
/**
* Throws an error if the `buttonType` is invalid for the type of button being used (component is either a button or iconButton).
* This is to ensure visual styles are only used with the intended component type.
*/
validateProps: function validateProps() {
var componentType = this.isIcon ? 'iconButton' : 'button';
var validTypes = VALID_BUTTON_TYPES[componentType];
methods: {
/**
* Throws an error if the `buttonType` is invalid for the type of button being used (component is either a button or iconButton).
* This is to ensure visual styles are only used with the intended component type.
*/
validateProps () {
const componentType = this.isIcon ? 'iconButton' : 'button';
if (!validTypes.includes(this.buttonType)) {
throw new TypeError("".concat(componentType, " is set to have buttonType=\"").concat(this.buttonType, "\", but it can only be one of the following buttonTypes: \"").concat(validTypes.join('", "'), "\""));
}
const validTypes = VALID_BUTTON_TYPES[componentType];
if (!validTypes.includes(this.buttonType)) {
throw new TypeError(`${componentType} is set to have buttonType="${this.buttonType}", but it can only be one of the following buttonTypes: "${validTypes.join('", "')}"`);
}
if (!VALID_BUTTON_SIZES.includes(this.buttonSize)) {
throw new TypeError("buttonSize is set to \"".concat(this.buttonSize, "\", but it can only be one of the following buttonSizes: \"").concat(VALID_BUTTON_SIZES.join('", "'), "\""));
}
if (!VALID_BUTTON_SIZES.includes(this.buttonSize)) {
throw new TypeError(`buttonSize is set to "${this.buttonSize}", but it can only be one of the following buttonSizes: "${VALID_BUTTON_SIZES.join('", "')}"`);
}
if (!VALID_BUTTON_ICON_POSITION.includes(this.hasIcon)) {
throw new TypeError("hasIcon is set to \"".concat(this.hasIcon, "\", but it can only be one of the following button icon positions: \"").concat(VALID_BUTTON_ICON_POSITION.join('", "'), "\""));
}
if (!VALID_BUTTON_ICON_POSITION.includes(this.hasIcon)) {
throw new TypeError(`hasIcon is set to "${this.hasIcon}", but it can only be one of the following button icon positions: "${VALID_BUTTON_ICON_POSITION.join('", "')}"`);
}
}
}
}
});
// CONCATENATED MODULE: ./src/components/Button.vue?vue&type=script&lang=js&
/* harmony default export */ var components_Buttonvue_type_script_lang_js_ = (Buttonvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/Button.vue?vue&type=style&index=0&id=746803f8&prod&lang=scss&module=true&
var Buttonvue_type_style_index_0_id_746803f8_prod_lang_scss_module_true_ = __webpack_require__("8ef1");
// EXTERNAL MODULE: ./src/components/Button.vue?vue&type=style&index=0&id=8ce2fcf6&prod&lang=scss&module=true&
var Buttonvue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true_ = __webpack_require__("039d");

@@ -530,3 +556,3 @@ // CONCATENATED MODULE: ./src/components/Button.vue

this["$style"] = (Buttonvue_type_style_index_0_id_746803f8_prod_lang_scss_module_true_["default"].locals || Buttonvue_type_style_index_0_id_746803f8_prod_lang_scss_module_true_["default"])
this["$style"] = (Buttonvue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true_["default"].locals || Buttonvue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true_["default"])

@@ -552,10 +578,2 @@ }

/***/ "5043":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"c-spinner-wrapper":"Button_c-spinner-wrapper_16dYe","c-spinner":"Button_c-spinner_16ib0","spin":"Button_spin_1l7_1","o-btn":"Button_o-btn_1KX8u","o-button-content":"Button_o-button-content_3Ow1e","o-btn-content--hidden":"Button_o-btn-content--hidden_1592m","o-btn-icon":"Button_o-btn-icon_rKd_B","o-btn-icon--leading":"Button_o-btn-icon--leading_2MkiQ","o-btn-icon--trailing":"Button_o-btn-icon--trailing_R6HPj","o-btn--primary":"Button_o-btn--primary_NRuBe","o-btn--icon":"Button_o-btn--icon_1k-qM","o-btn--loading":"Button_o-btn--loading_2up-7","o-btn--sizeSmall":"Button_o-btn--sizeSmall_WNBZx","o-btn--sizeXSmall":"Button_o-btn--sizeXSmall_3KRtq","o-btn--secondary":"Button_o-btn--secondary_1KBR1","o-btn--outline":"Button_o-btn--outline_3TR6n","o-btn--ghost":"Button_o-btn--ghost_1hnGu","o-btn--ghostTertiary":"Button_o-btn--ghostTertiary_2F6ho","o-btn--inverse":"Button_o-btn--inverse_1uhdX","o-btn--ghostInverse":"Button_o-btn--ghostInverse_2oPMZ","o-btn--link":"Button_o-btn--link_2f-eF","o-btn--sizeLarge":"Button_o-btn--sizeLarge_3A8Ov","o-btn--sizeMedium":"Button_o-btn--sizeMedium_2uSln","o-btn--fullWidth":"Button_o-btn--fullWidth_1xkfh","is-disabled":"Button_is-disabled_1zPQV","skeletonGradient":"Button_skeletonGradient_2l0Iq"};
/***/ }),
/***/ "7e10":

@@ -646,13 +664,2 @@ /***/ (function(module, exports, __webpack_require__) {

/***/ "8ef1":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5043");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default.a; });
/***/ }),
/***/ "b635":

@@ -669,29 +676,33 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

*/
// Import vue component
// Declare install function executed by Vue.use()
function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('FButton', _components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
} // Create module definition for Vue.use()
var plugin = {
install: install
}; // Auto-install when vue is found (eg. in browser via <script> tag)
// Declare install function executed by Vue.use()
function install (Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('FButton', _components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
}
var GlobalVue = null;
// Create module definition for Vue.use()
const plugin = {
install
};
// Auto-install when vue is found (eg. in browser via <script> tag)
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
} // To allow use as module (npm/webpack/etc.) export component
GlobalVue.use(plugin);
}
// To allow use as module (npm/webpack/etc.) export component
/* harmony default export */ __webpack_exports__["a"] = (_components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/* harmony default export */ __webpack_exports__["a"] = (_components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("05e9")))

@@ -701,2 +712,10 @@

/***/ "bc4f":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"c-spinner-wrapper":"Button_c-spinner-wrapper_16dYe","c-spinner":"Button_c-spinner_16ib0","spin":"Button_spin_1l7_1","o-btn":"Button_o-btn_1KX8u","o-button-content":"Button_o-button-content_3Ow1e","o-btn-content--hidden":"Button_o-btn-content--hidden_1592m","o-btn-icon":"Button_o-btn-icon_rKd_B","o-btn-icon--leading":"Button_o-btn-icon--leading_2MkiQ","o-btn-icon--trailing":"Button_o-btn-icon--trailing_R6HPj","o-btn--primary":"Button_o-btn--primary_NRuBe","o-btn--icon":"Button_o-btn--icon_1k-qM","o-btn--loading":"Button_o-btn--loading_2up-7","o-btn--sizeSmall":"Button_o-btn--sizeSmall_WNBZx","o-btn--sizeXSmall":"Button_o-btn--sizeXSmall_3KRtq","o-btn--secondary":"Button_o-btn--secondary_1KBR1","o-btn--outline":"Button_o-btn--outline_3TR6n","o-btn--ghost":"Button_o-btn--ghost_1hnGu","o-btn--ghostTertiary":"Button_o-btn--ghostTertiary_2F6ho","o-btn--inverse":"Button_o-btn--inverse_1uhdX","o-btn--ghostInverse":"Button_o-btn--ghostInverse_2oPMZ","o-btn--link":"Button_o-btn--link_2f-eF","o-btn--sizeLarge":"Button_o-btn--sizeLarge_3A8Ov","o-btn--sizeMedium":"Button_o-btn--sizeMedium_2uSln","o-btn--fullWidth":"Button_o-btn--fullWidth_1xkfh","is-disabled":"Button_is-disabled_1zPQV","skeletonGradient":"Button_skeletonGradient_2l0Iq"};
/***/ }),
/***/ "fa16":

@@ -712,3 +731,3 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

// CONCATENATED MODULE: /home/circleci/project/node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.

@@ -740,3 +759,3 @@

// CONCATENATED MODULE: /home/circleci/project/node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/lib/commands/build/entry-lib.js

@@ -743,0 +762,0 @@

@@ -99,2 +99,13 @@ (function webpackUniversalModuleDefinition(root, factory) {

/***/ "039d":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bc4f");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_13_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default.a; });
/***/ }),
/***/ "05e9":

@@ -132,3 +143,3 @@ /***/ (function(module, exports) {

// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=template&id=746803f8&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=template&id=8ce2fcf6&
var render = function () {

@@ -144,5 +155,5 @@ var _obj, _obj$1;

// CONCATENATED MODULE: ./src/components/Button.vue?vue&type=template&id=746803f8&
// CONCATENATED MODULE: ./src/components/Button.vue?vue&type=template&id=8ce2fcf6&
// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=template&id=24360df8&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=template&id=24360df8&
var Actionvue_type_template_id_24360df8_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',_vm._g({attrs:{"type":_vm.actionType}},_vm.$listeners),[_vm._t("default")],2)}

@@ -154,3 +165,3 @@ var Actionvue_type_template_id_24360df8_staticRenderFns = []

// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--13-0!/home/circleci/project/node_modules/thread-loader/dist/cjs.js!/home/circleci/project/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=script&lang=js&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Action.vue?vue&type=script&lang=js&
//

@@ -164,14 +175,16 @@ //

//
/* harmony default export */ var Actionvue_type_script_lang_js_ = ({
name: 'ActionButton',
props: {
actionType: {
type: String,
required: true
name: 'ActionButton',
props: {
actionType: {
type: String,
required: true
}
}
}
});
// CONCATENATED MODULE: ./src/components/Action.vue?vue&type=script&lang=js&
/* harmony default export */ var components_Actionvue_type_script_lang_js_ = (Actionvue_type_script_lang_js_);
// CONCATENATED MODULE: /home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */

@@ -294,3 +307,3 @@

/* harmony default export */ var Action = (component.exports);
// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=template&id=138ef925&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8154d706-vue-loader-template"}!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=template&id=138ef925&
var Linkvue_type_template_id_138ef925_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',_vm._g({},_vm.$listeners),[_vm._t("default")],2)}

@@ -302,3 +315,3 @@ var Linkvue_type_template_id_138ef925_staticRenderFns = []

// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--13-0!/home/circleci/project/node_modules/thread-loader/dist/cjs.js!/home/circleci/project/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=script&lang=js&
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Link.vue?vue&type=script&lang=js&
//

@@ -310,5 +323,7 @@ //

//
/* harmony default export */ var Linkvue_type_script_lang_js_ = ({
name: 'LinkButton'
name: 'LinkButton'
});
// CONCATENATED MODULE: ./src/components/Link.vue?vue&type=script&lang=js&

@@ -338,9 +353,12 @@ /* harmony default export */ var components_Linkvue_type_script_lang_js_ = (Linkvue_type_script_lang_js_);

// eslint-disable-next-line import/prefer-default-export
var VALID_BUTTON_TYPES = {
iconButton: ['primary', 'secondary', 'ghost', 'ghostTertiary', 'inverse', 'ghostInverse'],
button: ['primary', 'secondary', 'outline', 'ghost', 'link']
const VALID_BUTTON_TYPES = {
iconButton: ['primary', 'secondary', 'ghost', 'ghostTertiary', 'inverse', 'ghostInverse'],
button: ['primary', 'secondary', 'outline', 'ghost', 'link']
};
var VALID_BUTTON_SIZES = ['xsmall', 'small', 'medium', 'large'];
var VALID_BUTTON_ICON_POSITION = ['leading', 'trailing', false];
// CONCATENATED MODULE: /home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--13-0!/home/circleci/project/node_modules/thread-loader/dist/cjs.js!/home/circleci/project/node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib!/home/circleci/project/node_modules/cache-loader/dist/cjs.js??ref--1-0!/home/circleci/project/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=script&lang=js&
const VALID_BUTTON_SIZES = ['xsmall', 'small', 'medium', 'large'];
const VALID_BUTTON_ICON_POSITION = ['leading', 'trailing', false];
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/cache-loader/dist/cjs.js??ref--1-0!/Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./src/components/Button.vue?vue&type=script&lang=js&
//

@@ -403,125 +421,133 @@ //

/* harmony default export */ var Buttonvue_type_script_lang_js_ = ({
name: 'FButton',
components: {
ActionButton: Action,
LinkButton: Link
},
props: {
buttonType: {
type: String,
default: 'primary'
name: 'FButton',
components: {
ActionButton: Action,
LinkButton: Link
},
buttonSize: {
type: String,
default: 'medium'
props: {
buttonType: {
type: String,
default: 'primary'
},
buttonSize: {
type: String,
default: 'medium'
},
isFullWidth: {
type: Boolean,
default: false
},
actionType: {
type: String,
default: 'button'
},
isIcon: {
type: Boolean,
default: false
},
isLoading: {
type: Boolean,
default: false
},
hasIcon: {
type: [Boolean, String],
default: false
}
},
isFullWidth: {
type: Boolean,
default: false
},
actionType: {
type: String,
default: 'button'
},
isIcon: {
type: Boolean,
default: false
},
isLoading: {
type: Boolean,
default: false
},
hasIcon: {
type: [Boolean, String],
default: false
}
},
computed: {
/**
* Passes `actionType` prop to action button if no `href` or `to` attributes is applied to the component
*/
buttonActionType: function buttonActionType() {
return !this.$attrs.href && !this.$attrs.to ? this.actionType : null;
},
computed: {
/**
* Passes `actionType` prop to action button if no `href` or `to` attributes is applied to the component
*/
buttonActionType () {
return (!this.$attrs.href && !this.$attrs.to) ? this.actionType : null;
},
/**
* Converts the buttonSize prop into a normalised classname (that fits with our class naming scheme)
*/
buttonSizeClassname: function buttonSizeClassname() {
if (this.buttonSize === 'xsmall') {
return this.buttonSize.slice(0, 2).toUpperCase() + this.buttonSize.slice(2); // xsmall -> XSmall
}
/**
* Converts the buttonSize prop into a normalised classname (that fits with our class naming scheme)
*/
buttonSizeClassname () {
if (this.buttonSize === 'xsmall') {
return this.buttonSize.slice(0, 2).toUpperCase() + this.buttonSize.slice(2); // xsmall -> XSmall
}
return this.buttonSize.charAt(0).toUpperCase() + this.buttonSize.slice(1); // capitalize the first letter of the prop
},
return this.buttonSize.charAt(0).toUpperCase() + this.buttonSize.slice(1); // capitalize the first letter of the prop
},
/**
* Renders `Link` component if a `href` attribute is applied to the component
* Renders `RouterLink` component if a `to` attribute is applied to the component, avoids page reload compared to Link with `href`
* Renders `Action` component if no `href` attribute is applied to the component
*/
componentType () {
if (this.$attrs.href) {
return 'link-button';
}
/**
* Renders `Link` component if a `href` attribute is applied to the component
* Renders `RouterLink` component if a `to` attribute is applied to the component, avoids page reload compared to Link with `href`
* Renders `Action` component if no `href` attribute is applied to the component
*/
componentType: function componentType() {
if (this.$attrs.href) {
return 'link-button';
}
if (this.$attrs.to) {
return 'router-link';
}
if (this.$attrs.to) {
return 'router-link';
}
return 'action-button';
},
return 'action-button';
},
/**
* Gets the correct value for the aria-live attribute depending on whether the button is loading or not.
*/
getAriaLive () {
return this.isLoading ? 'polite' : 'off';
},
/**
* Gets the correct value for the aria-live attribute depending on whether the button is loading or not.
*/
getAriaLive: function getAriaLive() {
return this.isLoading ? 'polite' : 'off';
hasTrailingIcon () {
return this.hasIcon && this.hasIcon === 'trailing';
},
hasLeadingIcon () {
return this.hasIcon && this.hasIcon === 'leading';
},
hasNestedContent () {
return this.isLoading
|| this.hasLeadingIcon
|| this.hasTrailingIcon;
}
},
hasTrailingIcon: function hasTrailingIcon() {
return this.hasIcon && this.hasIcon === 'trailing';
watch: {
$props: {
immediate: true,
handler () {
this.validateProps();
}
}
},
hasLeadingIcon: function hasLeadingIcon() {
return this.hasIcon && this.hasIcon === 'leading';
},
hasNestedContent: function hasNestedContent() {
return this.isLoading || this.hasLeadingIcon || this.hasTrailingIcon;
}
},
watch: {
$props: {
immediate: true,
handler: function handler() {
this.validateProps();
}
}
},
methods: {
/**
* Throws an error if the `buttonType` is invalid for the type of button being used (component is either a button or iconButton).
* This is to ensure visual styles are only used with the intended component type.
*/
validateProps: function validateProps() {
var componentType = this.isIcon ? 'iconButton' : 'button';
var validTypes = VALID_BUTTON_TYPES[componentType];
methods: {
/**
* Throws an error if the `buttonType` is invalid for the type of button being used (component is either a button or iconButton).
* This is to ensure visual styles are only used with the intended component type.
*/
validateProps () {
const componentType = this.isIcon ? 'iconButton' : 'button';
if (!validTypes.includes(this.buttonType)) {
throw new TypeError("".concat(componentType, " is set to have buttonType=\"").concat(this.buttonType, "\", but it can only be one of the following buttonTypes: \"").concat(validTypes.join('", "'), "\""));
}
const validTypes = VALID_BUTTON_TYPES[componentType];
if (!validTypes.includes(this.buttonType)) {
throw new TypeError(`${componentType} is set to have buttonType="${this.buttonType}", but it can only be one of the following buttonTypes: "${validTypes.join('", "')}"`);
}
if (!VALID_BUTTON_SIZES.includes(this.buttonSize)) {
throw new TypeError("buttonSize is set to \"".concat(this.buttonSize, "\", but it can only be one of the following buttonSizes: \"").concat(VALID_BUTTON_SIZES.join('", "'), "\""));
}
if (!VALID_BUTTON_SIZES.includes(this.buttonSize)) {
throw new TypeError(`buttonSize is set to "${this.buttonSize}", but it can only be one of the following buttonSizes: "${VALID_BUTTON_SIZES.join('", "')}"`);
}
if (!VALID_BUTTON_ICON_POSITION.includes(this.hasIcon)) {
throw new TypeError("hasIcon is set to \"".concat(this.hasIcon, "\", but it can only be one of the following button icon positions: \"").concat(VALID_BUTTON_ICON_POSITION.join('", "'), "\""));
}
if (!VALID_BUTTON_ICON_POSITION.includes(this.hasIcon)) {
throw new TypeError(`hasIcon is set to "${this.hasIcon}", but it can only be one of the following button icon positions: "${VALID_BUTTON_ICON_POSITION.join('", "')}"`);
}
}
}
}
});
// CONCATENATED MODULE: ./src/components/Button.vue?vue&type=script&lang=js&
/* harmony default export */ var components_Buttonvue_type_script_lang_js_ = (Buttonvue_type_script_lang_js_);
// EXTERNAL MODULE: ./src/components/Button.vue?vue&type=style&index=0&id=746803f8&prod&lang=scss&module=true&
var Buttonvue_type_style_index_0_id_746803f8_prod_lang_scss_module_true_ = __webpack_require__("8ef1");
// EXTERNAL MODULE: ./src/components/Button.vue?vue&type=style&index=0&id=8ce2fcf6&prod&lang=scss&module=true&
var Buttonvue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true_ = __webpack_require__("039d");

@@ -539,3 +565,3 @@ // CONCATENATED MODULE: ./src/components/Button.vue

this["$style"] = (Buttonvue_type_style_index_0_id_746803f8_prod_lang_scss_module_true_["default"].locals || Buttonvue_type_style_index_0_id_746803f8_prod_lang_scss_module_true_["default"])
this["$style"] = (Buttonvue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true_["default"].locals || Buttonvue_type_style_index_0_id_8ce2fcf6_prod_lang_scss_module_true_["default"])

@@ -561,10 +587,2 @@ }

/***/ "5043":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"c-spinner-wrapper":"Button_c-spinner-wrapper_16dYe","c-spinner":"Button_c-spinner_16ib0","spin":"Button_spin_1l7_1","o-btn":"Button_o-btn_1KX8u","o-button-content":"Button_o-button-content_3Ow1e","o-btn-content--hidden":"Button_o-btn-content--hidden_1592m","o-btn-icon":"Button_o-btn-icon_rKd_B","o-btn-icon--leading":"Button_o-btn-icon--leading_2MkiQ","o-btn-icon--trailing":"Button_o-btn-icon--trailing_R6HPj","o-btn--primary":"Button_o-btn--primary_NRuBe","o-btn--icon":"Button_o-btn--icon_1k-qM","o-btn--loading":"Button_o-btn--loading_2up-7","o-btn--sizeSmall":"Button_o-btn--sizeSmall_WNBZx","o-btn--sizeXSmall":"Button_o-btn--sizeXSmall_3KRtq","o-btn--secondary":"Button_o-btn--secondary_1KBR1","o-btn--outline":"Button_o-btn--outline_3TR6n","o-btn--ghost":"Button_o-btn--ghost_1hnGu","o-btn--ghostTertiary":"Button_o-btn--ghostTertiary_2F6ho","o-btn--inverse":"Button_o-btn--inverse_1uhdX","o-btn--ghostInverse":"Button_o-btn--ghostInverse_2oPMZ","o-btn--link":"Button_o-btn--link_2f-eF","o-btn--sizeLarge":"Button_o-btn--sizeLarge_3A8Ov","o-btn--sizeMedium":"Button_o-btn--sizeMedium_2uSln","o-btn--fullWidth":"Button_o-btn--fullWidth_1xkfh","is-disabled":"Button_is-disabled_1zPQV","skeletonGradient":"Button_skeletonGradient_2l0Iq"};
/***/ }),
/***/ "7e10":

@@ -655,13 +673,2 @@ /***/ (function(module, exports, __webpack_require__) {

/***/ "8ef1":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5043");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_0_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_0_1_node_modules_vue_cli_service_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_0_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_0_3_node_modules_sass_loader_dist_cjs_js_ref_14_0_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_lib_index_js_vue_loader_options_Button_vue_vue_type_style_index_0_id_746803f8_prod_lang_scss_module_true___WEBPACK_IMPORTED_MODULE_0___default.a; });
/***/ }),
/***/ "b635":

@@ -678,29 +685,33 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

*/
// Import vue component
// Declare install function executed by Vue.use()
function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('FButton', _components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
} // Create module definition for Vue.use()
var plugin = {
install: install
}; // Auto-install when vue is found (eg. in browser via <script> tag)
// Declare install function executed by Vue.use()
function install (Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('FButton', _components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
}
var GlobalVue = null;
// Create module definition for Vue.use()
const plugin = {
install
};
// Auto-install when vue is found (eg. in browser via <script> tag)
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
} // To allow use as module (npm/webpack/etc.) export component
GlobalVue.use(plugin);
}
// To allow use as module (npm/webpack/etc.) export component
/* harmony default export */ __webpack_exports__["a"] = (_components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/* harmony default export */ __webpack_exports__["a"] = (_components_Button_vue__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("05e9")))

@@ -710,2 +721,10 @@

/***/ "bc4f":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"c-spinner-wrapper":"Button_c-spinner-wrapper_16dYe","c-spinner":"Button_c-spinner_16ib0","spin":"Button_spin_1l7_1","o-btn":"Button_o-btn_1KX8u","o-button-content":"Button_o-button-content_3Ow1e","o-btn-content--hidden":"Button_o-btn-content--hidden_1592m","o-btn-icon":"Button_o-btn-icon_rKd_B","o-btn-icon--leading":"Button_o-btn-icon--leading_2MkiQ","o-btn-icon--trailing":"Button_o-btn-icon--trailing_R6HPj","o-btn--primary":"Button_o-btn--primary_NRuBe","o-btn--icon":"Button_o-btn--icon_1k-qM","o-btn--loading":"Button_o-btn--loading_2up-7","o-btn--sizeSmall":"Button_o-btn--sizeSmall_WNBZx","o-btn--sizeXSmall":"Button_o-btn--sizeXSmall_3KRtq","o-btn--secondary":"Button_o-btn--secondary_1KBR1","o-btn--outline":"Button_o-btn--outline_3TR6n","o-btn--ghost":"Button_o-btn--ghost_1hnGu","o-btn--ghostTertiary":"Button_o-btn--ghostTertiary_2F6ho","o-btn--inverse":"Button_o-btn--inverse_1uhdX","o-btn--ghostInverse":"Button_o-btn--ghostInverse_2oPMZ","o-btn--link":"Button_o-btn--link_2f-eF","o-btn--sizeLarge":"Button_o-btn--sizeLarge_3A8Ov","o-btn--sizeMedium":"Button_o-btn--sizeMedium_2uSln","o-btn--fullWidth":"Button_o-btn--fullWidth_1xkfh","is-disabled":"Button_is-disabled_1zPQV","skeletonGradient":"Button_skeletonGradient_2l0Iq"};
/***/ }),
/***/ "fa16":

@@ -721,3 +740,3 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

// CONCATENATED MODULE: /home/circleci/project/node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.

@@ -749,3 +768,3 @@

// CONCATENATED MODULE: /home/circleci/project/node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
// CONCATENATED MODULE: /Users/ashley.watson-nolan/_projects/_jet/design_system/fozzie-components/node_modules/@vue/cli-service/lib/commands/build/entry-lib.js

@@ -752,0 +771,0 @@

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

(function(t,n){"object"===typeof exports&&"object"===typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):"object"===typeof exports?exports["f-button"]=n():t["f-button"]=n()})("undefined"!==typeof self?self:this,(function(){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="fa16")}({"05e9":function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(o){"object"===typeof window&&(e=window)}t.exports=e},"2a7d":function(t,n,e){"use strict";var o=function(){var t,n,e=this,o=e.$createElement,i=e._self._c||o;return i(e.componentType,e._g(e._b({tag:"component",class:[e.$style["o-btn"],e.$style["o-btn--"+e.buttonType],e.$style["o-btn--size"+e.buttonSizeClassname],(t={},t[e.$style["o-btn--icon"]]=e.isIcon,t[e.$style["o-btn--fullWidth"]]=e.isFullWidth,t[e.$style["o-btn--loading"]]=e.isLoading,t)],attrs:{"action-type":e.buttonActionType,"data-test-id":e.componentType+"-component","aria-live":e.getAriaLive,"aria-busy":e.isLoading}},"component",e.$attrs,!1),!e.isLoading&&e.$listeners),[e.hasNestedContent?[e.isLoading?i("span",{class:e.$style["c-spinner"],attrs:{"data-test-id":e.componentType+"-spinner"}}):e._e(),i("span",{class:[e.$style["o-button-content"],(n={},n[e.$style["o-btn-content--hidden"]]=e.isLoading,n)]},[e.hasLeadingIcon?i("span",{class:[e.$style["o-btn-icon"],e.$style["o-btn-icon--leading"]],attrs:{"data-test-id":"button-leading-icon"}},[e._t("leading-icon")],2):e._e(),e._t("default"),e.hasTrailingIcon?i("span",{class:[e.$style["o-btn-icon"],e.$style["o-btn-icon--trailing"]],attrs:{"data-test-id":"button-trailing-icon"}},[e._t("trailing-icon")],2):e._e()],2)]:[e._t("default")]],2)},i=[],r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("button",t._g({attrs:{type:t.actionType}},t.$listeners),[t._t("default")],2)},s=[],u={name:"ActionButton",props:{actionType:{type:String,required:!0}}},a=u;function c(t,n,e,o,i,r,s,u){var a,c="function"===typeof t?t.options:t;if(n&&(c.render=n,c.staticRenderFns=e,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(a=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=a):i&&(a=u?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(c.functional){c._injectStyles=a;var l=c.render;c.render=function(t,n){return a.call(n),l(t,n)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,a):[a]}return{exports:t,options:c}}var l=c(a,r,s,!1,null,null,null),d=l.exports,f=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("a",t._g({},t.$listeners),[t._t("default")],2)},p=[],b={name:"LinkButton"},h=b,_=c(h,f,p,!1,null,null,null),y=_.exports,g={iconButton:["primary","secondary","ghost","ghostTertiary","inverse","ghostInverse"],button:["primary","secondary","outline","ghost","link"]},m=["xsmall","small","medium","large"],v=["leading","trailing",!1],B={name:"FButton",components:{ActionButton:d,LinkButton:y},props:{buttonType:{type:String,default:"primary"},buttonSize:{type:String,default:"medium"},isFullWidth:{type:Boolean,default:!1},actionType:{type:String,default:"button"},isIcon:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},hasIcon:{type:[Boolean,String],default:!1}},computed:{buttonActionType:function(){return this.$attrs.href||this.$attrs.to?null:this.actionType},buttonSizeClassname:function(){return"xsmall"===this.buttonSize?this.buttonSize.slice(0,2).toUpperCase()+this.buttonSize.slice(2):this.buttonSize.charAt(0).toUpperCase()+this.buttonSize.slice(1)},componentType:function(){return this.$attrs.href?"link-button":this.$attrs.to?"router-link":"action-button"},getAriaLive:function(){return this.isLoading?"polite":"off"},hasTrailingIcon:function(){return this.hasIcon&&"trailing"===this.hasIcon},hasLeadingIcon:function(){return this.hasIcon&&"leading"===this.hasIcon},hasNestedContent:function(){return this.isLoading||this.hasLeadingIcon||this.hasTrailingIcon}},watch:{$props:{immediate:!0,handler:function(){this.validateProps()}}},methods:{validateProps:function(){var t=this.isIcon?"iconButton":"button",n=g[t];if(!n.includes(this.buttonType))throw new TypeError("".concat(t,' is set to have buttonType="').concat(this.buttonType,'", but it can only be one of the following buttonTypes: "').concat(n.join('", "'),'"'));if(!m.includes(this.buttonSize))throw new TypeError('buttonSize is set to "'.concat(this.buttonSize,'", but it can only be one of the following buttonSizes: "').concat(m.join('", "'),'"'));if(!v.includes(this.hasIcon))throw new TypeError('hasIcon is set to "'.concat(this.hasIcon,'", but it can only be one of the following button icon positions: "').concat(v.join('", "'),'"'))}}},S=B,T=e("8ef1");function $(t){this["$style"]=T["default"].locals||T["default"]}var w=c(S,o,i,!1,$,null,null);n["a"]=w.exports},5043:function(t,n,e){t.exports={"c-spinner-wrapper":"Button_c-spinner-wrapper_16dYe","c-spinner":"Button_c-spinner_16ib0",spin:"Button_spin_1l7_1","o-btn":"Button_o-btn_1KX8u","o-button-content":"Button_o-button-content_3Ow1e","o-btn-content--hidden":"Button_o-btn-content--hidden_1592m","o-btn-icon":"Button_o-btn-icon_rKd_B","o-btn-icon--leading":"Button_o-btn-icon--leading_2MkiQ","o-btn-icon--trailing":"Button_o-btn-icon--trailing_R6HPj","o-btn--primary":"Button_o-btn--primary_NRuBe","o-btn--icon":"Button_o-btn--icon_1k-qM","o-btn--loading":"Button_o-btn--loading_2up-7","o-btn--sizeSmall":"Button_o-btn--sizeSmall_WNBZx","o-btn--sizeXSmall":"Button_o-btn--sizeXSmall_3KRtq","o-btn--secondary":"Button_o-btn--secondary_1KBR1","o-btn--outline":"Button_o-btn--outline_3TR6n","o-btn--ghost":"Button_o-btn--ghost_1hnGu","o-btn--ghostTertiary":"Button_o-btn--ghostTertiary_2F6ho","o-btn--inverse":"Button_o-btn--inverse_1uhdX","o-btn--ghostInverse":"Button_o-btn--ghostInverse_2oPMZ","o-btn--link":"Button_o-btn--link_2f-eF","o-btn--sizeLarge":"Button_o-btn--sizeLarge_3A8Ov","o-btn--sizeMedium":"Button_o-btn--sizeMedium_2uSln","o-btn--fullWidth":"Button_o-btn--fullWidth_1xkfh","is-disabled":"Button_is-disabled_1zPQV",skeletonGradient:"Button_skeletonGradient_2l0Iq"}},"7e10":function(t,n,e){var o,i,r;(function(e,s){i=[],o=s,r="function"===typeof o?o.apply(n,i):o,void 0===r||(t.exports=r)})("undefined"!==typeof self&&self,(function(){function t(){var n=Object.getOwnPropertyDescriptor(document,"currentScript");if(!n&&"currentScript"in document&&document.currentScript)return document.currentScript;if(n&&n.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var e,o,i,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,u=r.exec(p.stack)||s.exec(p.stack),a=u&&u[1]||!1,c=u&&u[2]||!1,l=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");a===l&&(e=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=e.replace(o,"$1").trim());for(var f=0;f<d.length;f++){if("interactive"===d[f].readyState)return d[f];if(d[f].src===a)return d[f];if(a===l&&d[f].innerHTML&&d[f].innerHTML.trim()===i)return d[f]}return null}}return t}))},"8ef1":function(t,n,e){"use strict";var o=e("5043"),i=e.n(o);e.d(n,"default",(function(){return i.a}))},b635:function(t,n,e){"use strict";(function(t){e.d(n,"b",(function(){return i}));var o=e("2a7d");function i(t){i.installed||(i.installed=!0,t.component("FButton",o["a"]))}var r={install:i},s=null;"undefined"!==typeof window?s=window.Vue:"undefined"!==typeof t&&(s=t.Vue),s&&s.use(r),n["a"]=o["a"]}).call(this,e("05e9"))},fa16:function(t,n,e){"use strict";if(e.r(n),e.d(n,"install",(function(){return s["b"]})),"undefined"!==typeof window){var o=window.document.currentScript,i=e("7e10");o=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(e.p=r[1])}var s=e("b635");n["default"]=s["a"]}})}));
(function(t,n){"object"===typeof exports&&"object"===typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):"object"===typeof exports?exports["f-button"]=n():t["f-button"]=n()})("undefined"!==typeof self?self:this,(function(){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(o,i,function(n){return t[n]}.bind(null,i));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="fa16")}({"039d":function(t,n,e){"use strict";var o=e("bc4f"),i=e.n(o);e.d(n,"default",(function(){return i.a}))},"05e9":function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(o){"object"===typeof window&&(e=window)}t.exports=e},"2a7d":function(t,n,e){"use strict";var o=function(){var t,n,e=this,o=e.$createElement,i=e._self._c||o;return i(e.componentType,e._g(e._b({tag:"component",class:[e.$style["o-btn"],e.$style["o-btn--"+e.buttonType],e.$style["o-btn--size"+e.buttonSizeClassname],(t={},t[e.$style["o-btn--icon"]]=e.isIcon,t[e.$style["o-btn--fullWidth"]]=e.isFullWidth,t[e.$style["o-btn--loading"]]=e.isLoading,t)],attrs:{"action-type":e.buttonActionType,"data-test-id":e.componentType+"-component","aria-live":e.getAriaLive,"aria-busy":e.isLoading}},"component",e.$attrs,!1),!e.isLoading&&e.$listeners),[e.hasNestedContent?[e.isLoading?i("span",{class:e.$style["c-spinner"],attrs:{"data-test-id":e.componentType+"-spinner"}}):e._e(),i("span",{class:[e.$style["o-button-content"],(n={},n[e.$style["o-btn-content--hidden"]]=e.isLoading,n)]},[e.hasLeadingIcon?i("span",{class:[e.$style["o-btn-icon"],e.$style["o-btn-icon--leading"]],attrs:{"data-test-id":"button-leading-icon"}},[e._t("leading-icon")],2):e._e(),e._t("default"),e.hasTrailingIcon?i("span",{class:[e.$style["o-btn-icon"],e.$style["o-btn-icon--trailing"]],attrs:{"data-test-id":"button-trailing-icon"}},[e._t("trailing-icon")],2):e._e()],2)]:[e._t("default")]],2)},i=[],r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("button",t._g({attrs:{type:t.actionType}},t.$listeners),[t._t("default")],2)},s=[],u={name:"ActionButton",props:{actionType:{type:String,required:!0}}},a=u;function c(t,n,e,o,i,r,s,u){var a,c="function"===typeof t?t.options:t;if(n&&(c.render=n,c.staticRenderFns=e,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(a=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=a):i&&(a=u?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(c.functional){c._injectStyles=a;var l=c.render;c.render=function(t,n){return a.call(n),l(t,n)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,a):[a]}return{exports:t,options:c}}var l=c(a,r,s,!1,null,null,null),d=l.exports,p=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("a",t._g({},t.$listeners),[t._t("default")],2)},f=[],b={name:"LinkButton"},h=b,_=c(h,p,f,!1,null,null,null),y=_.exports;const g={iconButton:["primary","secondary","ghost","ghostTertiary","inverse","ghostInverse"],button:["primary","secondary","outline","ghost","link"]},m=["xsmall","small","medium","large"],v=["leading","trailing",!1];var B={name:"FButton",components:{ActionButton:d,LinkButton:y},props:{buttonType:{type:String,default:"primary"},buttonSize:{type:String,default:"medium"},isFullWidth:{type:Boolean,default:!1},actionType:{type:String,default:"button"},isIcon:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},hasIcon:{type:[Boolean,String],default:!1}},computed:{buttonActionType(){return this.$attrs.href||this.$attrs.to?null:this.actionType},buttonSizeClassname(){return"xsmall"===this.buttonSize?this.buttonSize.slice(0,2).toUpperCase()+this.buttonSize.slice(2):this.buttonSize.charAt(0).toUpperCase()+this.buttonSize.slice(1)},componentType(){return this.$attrs.href?"link-button":this.$attrs.to?"router-link":"action-button"},getAriaLive(){return this.isLoading?"polite":"off"},hasTrailingIcon(){return this.hasIcon&&"trailing"===this.hasIcon},hasLeadingIcon(){return this.hasIcon&&"leading"===this.hasIcon},hasNestedContent(){return this.isLoading||this.hasLeadingIcon||this.hasTrailingIcon}},watch:{$props:{immediate:!0,handler(){this.validateProps()}}},methods:{validateProps(){const t=this.isIcon?"iconButton":"button",n=g[t];if(!n.includes(this.buttonType))throw new TypeError(`${t} is set to have buttonType="${this.buttonType}", but it can only be one of the following buttonTypes: "${n.join('", "')}"`);if(!m.includes(this.buttonSize))throw new TypeError(`buttonSize is set to "${this.buttonSize}", but it can only be one of the following buttonSizes: "${m.join('", "')}"`);if(!v.includes(this.hasIcon))throw new TypeError(`hasIcon is set to "${this.hasIcon}", but it can only be one of the following button icon positions: "${v.join('", "')}"`)}}},$=B,S=e("039d");function T(t){this["$style"]=S["default"].locals||S["default"]}var w=c($,o,i,!1,T,null,null);n["a"]=w.exports},"7e10":function(t,n,e){var o,i,r;(function(e,s){i=[],o=s,r="function"===typeof o?o.apply(n,i):o,void 0===r||(t.exports=r)})("undefined"!==typeof self&&self,(function(){function t(){var n=Object.getOwnPropertyDescriptor(document,"currentScript");if(!n&&"currentScript"in document&&document.currentScript)return document.currentScript;if(n&&n.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var e,o,i,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,u=r.exec(f.stack)||s.exec(f.stack),a=u&&u[1]||!1,c=u&&u[2]||!1,l=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");a===l&&(e=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=e.replace(o,"$1").trim());for(var p=0;p<d.length;p++){if("interactive"===d[p].readyState)return d[p];if(d[p].src===a)return d[p];if(a===l&&d[p].innerHTML&&d[p].innerHTML.trim()===i)return d[p]}return null}}return t}))},b635:function(t,n,e){"use strict";(function(t){e.d(n,"b",(function(){return i}));var o=e("2a7d");function i(t){i.installed||(i.installed=!0,t.component("FButton",o["a"]))}const r={install:i};let s=null;"undefined"!==typeof window?s=window.Vue:"undefined"!==typeof t&&(s=t.Vue),s&&s.use(r),n["a"]=o["a"]}).call(this,e("05e9"))},bc4f:function(t,n,e){t.exports={"c-spinner-wrapper":"Button_c-spinner-wrapper_16dYe","c-spinner":"Button_c-spinner_16ib0",spin:"Button_spin_1l7_1","o-btn":"Button_o-btn_1KX8u","o-button-content":"Button_o-button-content_3Ow1e","o-btn-content--hidden":"Button_o-btn-content--hidden_1592m","o-btn-icon":"Button_o-btn-icon_rKd_B","o-btn-icon--leading":"Button_o-btn-icon--leading_2MkiQ","o-btn-icon--trailing":"Button_o-btn-icon--trailing_R6HPj","o-btn--primary":"Button_o-btn--primary_NRuBe","o-btn--icon":"Button_o-btn--icon_1k-qM","o-btn--loading":"Button_o-btn--loading_2up-7","o-btn--sizeSmall":"Button_o-btn--sizeSmall_WNBZx","o-btn--sizeXSmall":"Button_o-btn--sizeXSmall_3KRtq","o-btn--secondary":"Button_o-btn--secondary_1KBR1","o-btn--outline":"Button_o-btn--outline_3TR6n","o-btn--ghost":"Button_o-btn--ghost_1hnGu","o-btn--ghostTertiary":"Button_o-btn--ghostTertiary_2F6ho","o-btn--inverse":"Button_o-btn--inverse_1uhdX","o-btn--ghostInverse":"Button_o-btn--ghostInverse_2oPMZ","o-btn--link":"Button_o-btn--link_2f-eF","o-btn--sizeLarge":"Button_o-btn--sizeLarge_3A8Ov","o-btn--sizeMedium":"Button_o-btn--sizeMedium_2uSln","o-btn--fullWidth":"Button_o-btn--fullWidth_1xkfh","is-disabled":"Button_is-disabled_1zPQV",skeletonGradient:"Button_skeletonGradient_2l0Iq"}},fa16:function(t,n,e){"use strict";if(e.r(n),e.d(n,"install",(function(){return s["b"]})),"undefined"!==typeof window){var o=window.document.currentScript,i=e("7e10");o=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(e.p=r[1])}var s=e("b635");n["default"]=s["a"]}})}));
//# sourceMappingURL=f-button.umd.min.js.map
{
"name": "@justeat/f-button",
"description": "Fozzie Button – The generic button component",
"version": "4.3.0",
"version": "4.4.0",
"main": "dist/f-button.umd.min.js",

@@ -39,3 +39,3 @@ "maxBundleSize": "5kB",

"lint:style:fix": "yarn lint:style --fix",
"test": "vue-cli-service test:unit",
"test": "jest",
"ci:test:atoms": "yarn test",

@@ -64,11 +64,6 @@ "test-component:chrome": "cross-env-shell TEST_TYPE=component wdio ../../../../wdio-chrome.conf.js",

"devDependencies": {
"@justeat/f-wdio-utils": "1.1.0",
"@justeat/fozzie": "9.0.0-beta.2",
"@justeattakeaway/pie-icons-vue": "1.0.0",
"@vue/cli-plugin-babel": "4.5.16",
"@vue/cli-plugin-unit-jest": "4.5.16",
"@vue/test-utils": "1.0.3",
"@justeat/f-wdio-utils": "1.x",
"vue-router": "3.5.2"
},
"gitHead": "a5c99f81d2ddcb57483c5613dee8db57dbbe5f47"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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