@vue-interface/btn-activity 2.0.0-beta.11 → 2.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/btn-activity.js
CHANGED
|
@@ -170,7 +170,7 @@ const S = (t, e) => {
|
|
|
170
170
|
return i;
|
|
171
171
|
};
|
|
172
172
|
function P(t, e, i, a, s, C) {
|
|
173
|
-
const c = n("
|
|
173
|
+
const c = n("ActivityIndicator"), r = n("Btn");
|
|
174
174
|
return y(), p(r, b({
|
|
175
175
|
active: t.active,
|
|
176
176
|
block: t.block,
|
|
@@ -197,7 +197,7 @@ function P(t, e, i, a, s, C) {
|
|
|
197
197
|
_: 3
|
|
198
198
|
}, 16, ["active", "block", "disabled", "size", "tag", "variant", "class"]);
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const I = /* @__PURE__ */ S(B, [["render", P]]);
|
|
201
201
|
export {
|
|
202
|
-
|
|
202
|
+
I as BtnActivity
|
|
203
203
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@vue-interface/activity-indicator"),require("@vue-interface/btn"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@vue-interface/activity-indicator","@vue-interface/btn","vue"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.BtnActivity={},n.
|
|
1
|
+
(function(n,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@vue-interface/activity-indicator"),require("@vue-interface/btn"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@vue-interface/activity-indicator","@vue-interface/btn","vue"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.BtnActivity={},n.VueInterfaceActivityIndicator,n.VueInterfaceBtn,n.Vue))})(this,function(n,o,d,i){"use strict";const l=function(t){const s=parseFloat(t||0),e=t&&t.match(/m?s/),c=e?e[0]:!1;let a;switch(c){case"s":a=s*1e3;break;case"ms":default:a=s;break}return a||0},r=function(t,s){const e=(t.ownerDocument||document).defaultView;setTimeout(s,l(e==null?void 0:e.getComputedStyle(t).animationDuration))},y=i.defineComponent({components:{ActivityIndicator:o.ActivityIndicator,Btn:d.Btn},inheritAttrs:!1,props:{active:Boolean,activity:Boolean,block:Boolean,disabled:Boolean,indicator:{type:[Object,String],default:"spinner"},label:{type:String,default:void 0},orientation:{type:String,default:"right"},size:{type:String,default:"md"},tag:{type:String,default:void 0},variant:{type:String,default:"primary"}},emits:["click","hide-activity","show-activity"],data(){return{currentActivity:this.activity}},computed:{classes(){return{disabled:this.disabled,active:this.active,"btn-activity":this.activity,[`btn-activity-${this.orientation.replace("btn-activity-","")}`]:!!this.orientation,[`btn-activity-indicator-${this.indicatorProps.type.replace("btn-activity-indicator-","")}`]:!!this.indicatorProps.type}},indicatorProps(){return Object.assign({type:"spinner"},(typeof this.indicator=="string"?{type:this.indicator}:this.indicator)||{})}},watch:{activity(t){t?this.showActivity():this.hideActivity()}},mounted(){this.activity&&this.showActivity()},methods:{disable(){this.$el.disabled=!0,this.$el.classList.add("disabled")},enable(){this.$el.disabled=!1,this.$el.classList.remove("disabled")},hideActivity(){this.$el.classList.add("btn-hide-activity"),r(this.$el,()=>{this.disabled||this.enable(),this.currentActivity=!1,this.$el.classList.remove("btn-activity","btn-hide-activity"),this.$emit("hide-activity")})},showActivity(){this.currentActivity=!0,this.disable(),r(this.$el,()=>{this.$el.classList.add("btn-activity"),this.$emit("show-activity")})},toggle(){this.currentActivity?this.hideActivity():this.showActivity()}}}),m="",v=(t,s)=>{const e=t.__vccOpts||t;for(const[c,a]of s)e[c]=a;return e};function h(t,s,e,c,a,A){const u=i.resolveComponent("ActivityIndicator"),f=i.resolveComponent("Btn");return i.openBlock(),i.createBlock(f,i.mergeProps({active:t.active,block:t.block,disabled:t.disabled,size:t.size,tag:t.tag,variant:t.variant,class:t.classes},Object.assign({},t.$attrs,{onClick:void 0}),{onClick:s[0]||(s[0]=b=>!t.disabled&&t.$emit("click",b,{disable:t.disable,enable:t.enable,toggle:t.toggle,showActivity:t.showActivity,hideActivity:t.hideActivity}))}),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(t.label),1)]),i.createVNode(u,i.normalizeProps(i.guardReactiveProps(t.indicatorProps)),null,16)]),_:3},16,["active","block","disabled","size","tag","variant","class"])}const p=v(y,[["render",h]]);n.BtnActivity=p,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-interface/btn-activity",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.13",
|
|
4
4
|
"description": "A Vue activity button component.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/vue-interface/btn-activity/issues"
|
|
43
43
|
},
|
|
44
|
-
"homepage": "https://github.com/vue-interface/btn-activity
|
|
44
|
+
"homepage": "https://github.com/vue-interface/btn-activity",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@vue-interface/activity-indicator": "^2.0.0-beta.7",
|
|
47
47
|
"@vue-interface/btn": "^3.0.0-beta.4"
|
|
@@ -51,11 +51,10 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@vitejs/plugin-vue": "^4.0.0",
|
|
54
|
-
"@vue/eslint-config
|
|
54
|
+
"@vue-interface/eslint-config": "^1.0.0-beta.0",
|
|
55
55
|
"autoprefixer": "^10.4.2",
|
|
56
56
|
"change-case": "^4.1.2",
|
|
57
57
|
"eslint": "^8.25.0",
|
|
58
|
-
"eslint-plugin-vue": "^9.6.0",
|
|
59
58
|
"pascalcase": "^2.0.0",
|
|
60
59
|
"postcss": "^8.4.6",
|
|
61
60
|
"tailwindcss": "^3.0.18",
|