@vue-interface/btn-activity 2.0.0-beta.1 → 2.0.0-beta.11

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.
@@ -0,0 +1,203 @@
1
+ import { ActivityIndicator as d } from "@vue-interface/activity-indicator";
2
+ import { Btn as v } from "@vue-interface/btn";
3
+ import { defineComponent as h, resolveComponent as n, openBlock as y, createBlock as p, mergeProps as b, withCtx as m, renderSlot as u, createTextVNode as f, toDisplayString as g, createVNode as A, normalizeProps as $, guardReactiveProps as k } from "vue";
4
+ const w = function(t) {
5
+ const e = parseFloat(t || 0), i = t && t.match(/m?s/), a = i ? i[0] : !1;
6
+ let s;
7
+ switch (a) {
8
+ case "s":
9
+ s = e * 1e3;
10
+ break;
11
+ case "ms":
12
+ default:
13
+ s = e;
14
+ break;
15
+ }
16
+ return s || 0;
17
+ }, o = function(t, e) {
18
+ const i = (t.ownerDocument || document).defaultView;
19
+ setTimeout(
20
+ e,
21
+ w(
22
+ i == null ? void 0 : i.getComputedStyle(t).animationDuration
23
+ )
24
+ );
25
+ }, B = h({
26
+ components: {
27
+ ActivityIndicator: d,
28
+ Btn: v
29
+ },
30
+ inheritAttrs: !1,
31
+ props: {
32
+ /**
33
+ * Make the button appear with the active state.
34
+ */
35
+ active: Boolean,
36
+ /**
37
+ * Show the activity indicator inside the button.
38
+ */
39
+ activity: Boolean,
40
+ /**
41
+ * Display the button as block width.
42
+ */
43
+ block: Boolean,
44
+ /**
45
+ * Disable the button.
46
+ */
47
+ disabled: Boolean,
48
+ /**
49
+ * The type of activity indicator inside the button.
50
+ */
51
+ indicator: {
52
+ type: [Object, String],
53
+ default: "spinner"
54
+ },
55
+ /**
56
+ * The button label.
57
+ */
58
+ label: {
59
+ type: String,
60
+ default: void 0
61
+ },
62
+ /**
63
+ * The orientation of the activity button inside the button.
64
+ */
65
+ orientation: {
66
+ type: String,
67
+ default: "right"
68
+ },
69
+ /**
70
+ * The size of the button.
71
+ */
72
+ size: {
73
+ type: String,
74
+ default: "md"
75
+ },
76
+ /**
77
+ * The HTML tag.
78
+ */
79
+ tag: {
80
+ type: String,
81
+ default: void 0
82
+ },
83
+ /**
84
+ * The variant of the button.
85
+ */
86
+ variant: {
87
+ type: String,
88
+ default: "primary"
89
+ }
90
+ },
91
+ emits: ["click", "hide-activity", "show-activity"],
92
+ data() {
93
+ return {
94
+ currentActivity: this.activity
95
+ };
96
+ },
97
+ computed: {
98
+ /**
99
+ * An object of classes to append to the button.
100
+ */
101
+ classes() {
102
+ return {
103
+ disabled: this.disabled,
104
+ active: this.active,
105
+ "btn-activity": this.activity,
106
+ [`btn-activity-${this.orientation.replace("btn-activity-", "")}`]: !!this.orientation,
107
+ [`btn-activity-indicator-${this.indicatorProps.type.replace("btn-activity-indicator-", "")}`]: !!this.indicatorProps.type
108
+ };
109
+ },
110
+ indicatorProps() {
111
+ return Object.assign(
112
+ {
113
+ type: "spinner"
114
+ },
115
+ (typeof this.indicator == "string" ? {
116
+ type: this.indicator
117
+ } : this.indicator) || {}
118
+ );
119
+ }
120
+ },
121
+ watch: {
122
+ activity(t) {
123
+ t ? this.showActivity() : this.hideActivity();
124
+ }
125
+ },
126
+ mounted() {
127
+ this.activity && this.showActivity();
128
+ },
129
+ methods: {
130
+ /**
131
+ * Disable the button.
132
+ */
133
+ disable() {
134
+ this.$el.disabled = !0, this.$el.classList.add("disabled");
135
+ },
136
+ /**
137
+ * Enable the button.
138
+ */
139
+ enable() {
140
+ this.$el.disabled = !1, this.$el.classList.remove("disabled");
141
+ },
142
+ /**
143
+ * Hide the activity indicator inside the button.
144
+ */
145
+ hideActivity() {
146
+ this.$el.classList.add("btn-hide-activity"), o(this.$el, () => {
147
+ this.disabled || this.enable(), this.currentActivity = !1, this.$el.classList.remove("btn-activity", "btn-hide-activity"), this.$emit("hide-activity");
148
+ });
149
+ },
150
+ /**
151
+ * Show the activity indicator inside the button.
152
+ */
153
+ showActivity() {
154
+ this.currentActivity = !0, this.disable(), o(this.$el, () => {
155
+ this.$el.classList.add("btn-activity"), this.$emit("show-activity");
156
+ });
157
+ },
158
+ /**
159
+ * Show the activity indicator inside the button.
160
+ */
161
+ toggle() {
162
+ this.currentActivity ? this.hideActivity() : this.showActivity();
163
+ }
164
+ }
165
+ });
166
+ const S = (t, e) => {
167
+ const i = t.__vccOpts || t;
168
+ for (const [a, s] of e)
169
+ i[a] = s;
170
+ return i;
171
+ };
172
+ function P(t, e, i, a, s, C) {
173
+ const c = n("activity-indicator"), r = n("btn");
174
+ return y(), p(r, b({
175
+ active: t.active,
176
+ block: t.block,
177
+ disabled: t.disabled,
178
+ size: t.size,
179
+ tag: t.tag,
180
+ variant: t.variant,
181
+ class: t.classes
182
+ }, Object.assign({}, t.$attrs, { onClick: void 0 }), {
183
+ onClick: e[0] || (e[0] = (l) => !t.disabled && t.$emit("click", l, {
184
+ disable: t.disable,
185
+ enable: t.enable,
186
+ toggle: t.toggle,
187
+ showActivity: t.showActivity,
188
+ hideActivity: t.hideActivity
189
+ }))
190
+ }), {
191
+ default: m(() => [
192
+ u(t.$slots, "default", {}, () => [
193
+ f(g(t.label), 1)
194
+ ]),
195
+ A(c, $(k(t.indicatorProps)), null, 16)
196
+ ]),
197
+ _: 3
198
+ }, 16, ["active", "block", "disabled", "size", "tag", "variant", "class"]);
199
+ }
200
+ const O = /* @__PURE__ */ S(B, [["render", P]]);
201
+ export {
202
+ O as BtnActivity
203
+ };
@@ -0,0 +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.ActivityIndicator,n.Btn,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,g){const u=i.resolveComponent("activity-indicator"),b=i.resolveComponent("btn");return i.openBlock(),i.createBlock(b,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]=f=>!t.disabled&&t.$emit("click",f,{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"})});
@@ -1,5 +1,2 @@
1
1
  import BtnActivity from './src/BtnActivity.vue';
2
-
3
- export {
4
- BtnActivity
5
- };
2
+ export { BtnActivity };
@@ -0,0 +1,169 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{
2
+ /**
3
+ * Make the button appear with the active state.
4
+ */
5
+ active: BooleanConstructor;
6
+ /**
7
+ * Show the activity indicator inside the button.
8
+ */
9
+ activity: BooleanConstructor;
10
+ /**
11
+ * Display the button as block width.
12
+ */
13
+ block: BooleanConstructor;
14
+ /**
15
+ * Disable the button.
16
+ */
17
+ disabled: BooleanConstructor;
18
+ /**
19
+ * The type of activity indicator inside the button.
20
+ */
21
+ indicator: {
22
+ type: (StringConstructor | ObjectConstructor)[];
23
+ default: string;
24
+ };
25
+ /**
26
+ * The button label.
27
+ */
28
+ label: {
29
+ type: StringConstructor;
30
+ default: undefined;
31
+ };
32
+ /**
33
+ * The orientation of the activity button inside the button.
34
+ */
35
+ orientation: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ /**
40
+ * The size of the button.
41
+ */
42
+ size: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ /**
47
+ * The HTML tag.
48
+ */
49
+ tag: {
50
+ type: StringConstructor;
51
+ default: undefined;
52
+ };
53
+ /**
54
+ * The variant of the button.
55
+ */
56
+ variant: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ }, unknown, {
61
+ currentActivity: boolean;
62
+ }, {
63
+ /**
64
+ * An object of classes to append to the button.
65
+ */
66
+ classes(): {
67
+ [x: string]: any;
68
+ disabled: any;
69
+ active: any;
70
+ 'btn-activity': any;
71
+ };
72
+ indicatorProps(): any;
73
+ }, {
74
+ /**
75
+ * Disable the button.
76
+ */
77
+ disable(): void;
78
+ /**
79
+ * Enable the button.
80
+ */
81
+ enable(): void;
82
+ /**
83
+ * Hide the activity indicator inside the button.
84
+ */
85
+ hideActivity(): void;
86
+ /**
87
+ * Show the activity indicator inside the button.
88
+ */
89
+ showActivity(): void;
90
+ /**
91
+ * Show the activity indicator inside the button.
92
+ */
93
+ toggle(): void;
94
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "hide-activity" | "show-activity")[], "click" | "hide-activity" | "show-activity", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
95
+ /**
96
+ * Make the button appear with the active state.
97
+ */
98
+ active: BooleanConstructor;
99
+ /**
100
+ * Show the activity indicator inside the button.
101
+ */
102
+ activity: BooleanConstructor;
103
+ /**
104
+ * Display the button as block width.
105
+ */
106
+ block: BooleanConstructor;
107
+ /**
108
+ * Disable the button.
109
+ */
110
+ disabled: BooleanConstructor;
111
+ /**
112
+ * The type of activity indicator inside the button.
113
+ */
114
+ indicator: {
115
+ type: (StringConstructor | ObjectConstructor)[];
116
+ default: string;
117
+ };
118
+ /**
119
+ * The button label.
120
+ */
121
+ label: {
122
+ type: StringConstructor;
123
+ default: undefined;
124
+ };
125
+ /**
126
+ * The orientation of the activity button inside the button.
127
+ */
128
+ orientation: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ /**
133
+ * The size of the button.
134
+ */
135
+ size: {
136
+ type: StringConstructor;
137
+ default: string;
138
+ };
139
+ /**
140
+ * The HTML tag.
141
+ */
142
+ tag: {
143
+ type: StringConstructor;
144
+ default: undefined;
145
+ };
146
+ /**
147
+ * The variant of the button.
148
+ */
149
+ variant: {
150
+ type: StringConstructor;
151
+ default: string;
152
+ };
153
+ }>> & {
154
+ onClick?: ((...args: any[]) => any) | undefined;
155
+ "onHide-activity"?: ((...args: any[]) => any) | undefined;
156
+ "onShow-activity"?: ((...args: any[]) => any) | undefined;
157
+ }, {
158
+ label: string;
159
+ size: string;
160
+ active: boolean;
161
+ block: boolean;
162
+ disabled: boolean;
163
+ tag: string;
164
+ variant: string;
165
+ activity: boolean;
166
+ indicator: string | Record<string, any>;
167
+ orientation: string;
168
+ }>;
169
+ export default _sfc_main;
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ @-webkit-keyframes btn-activity-in{0%,to{-webkit-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scale(.98);transform:scale(.98)}}@keyframes btn-activity-in{0%,to{-webkit-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scale(.98);transform:scale(.98)}}@-webkit-keyframes btn-activity-out{0%,to{-webkit-transform:scale(1);transform:scale(1)}70%{-webkit-transform:scale(.98);transform:scale(.98)}}@keyframes btn-activity-out{0%,to{-webkit-transform:scale(1);transform:scale(1)}70%{-webkit-transform:scale(.98);transform:scale(.98)}}.btn-activity-top,.btn.btn-activity-top,.btn-activity-bottom,.btn.btn-activity-bottom,.btn-activity-left,.btn.btn-activity-left,.btn-activity-right,.btn.btn-activity-right{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-transition:all 166.5ms ease-in;transition:all 166.5ms ease-in}.btn-activity-top .activity-indicator,.btn-activity-bottom .activity-indicator,.btn-activity-left .activity-indicator,.btn-activity-right .activity-indicator{opacity:0;position:absolute;visibility:hidden;-webkit-transition:opacity 333ms ease-in;transition:opacity 333ms ease-in}.btn-activity-top,.btn-activity-bottom{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.btn-activity-top .activity-indicator,.btn-activity-bottom .activity-indicator{margin-left:auto;margin-right:auto}.btn-activity-top{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.btn-activity-top .activity-indicator{padding-bottom:1em}.btn-activity-bottom .activity-indicator{padding-top:1em}.btn-activity-left,.btn-activity-right{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.btn-activity-left{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.btn-activity-left .activity-indicator{padding-right:1em}.btn-activity-right .activity-indicator{padding-left:1em}.btn-activity:not(.btn-link){-webkit-animation:btn-activity-in 333ms;animation:btn-activity-in 333ms}.btn-hide-activity:not(.btn-link){-webkit-animation:btn-activity-out 333ms;animation:btn-activity-out 333ms}.btn-activity.btn-hide-activity .activity-indicator{opacity:0}.btn-activity .activity-indicator{opacity:1;visibility:visible;position:relative;font-size:.55em}
package/package.json CHANGED
@@ -1,24 +1,28 @@
1
1
  {
2
2
  "name": "@vue-interface/btn-activity",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "A Vue activity button component.",
5
+ "type": "module",
5
6
  "files": [
6
- "index.js",
7
- "dist",
8
- "src"
7
+ "dist"
9
8
  ],
10
- "main": "./dist/btn-activity.umd.js",
11
- "module": "./index.js",
9
+ "main": "./dist/btn-activity.umd.cjs",
10
+ "module": "./dist/btn-activity.js",
11
+ "style": "./dist/style.css",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/btn-activity.js",
16
+ "require": "./dist/btn-activity.umd.cjs",
17
+ "types": "./dist/index.d.ts"
18
+ },
19
+ "./dist/style.css": "./dist/style.css"
20
+ },
12
21
  "browserslist": "last 2 versions, > 0.5%, ie >= 11",
13
22
  "scripts": {
14
23
  "dev": "vite",
15
24
  "build": "vite build",
16
- "preview": "vite preview",
17
- "pre-release": "npm run build; git add . -A; git commit -m 'pre-release commit'",
18
- "release-patch": "npm run pre-release && npm version patch -m \"%s\" && npm run release;",
19
- "release-minor": "npm run pre-release && npm version minor -m \"%s\" && npm run release;",
20
- "release-major": "npm run pre-release && npm version major -m \"%s\" && npm run release;",
21
- "release": "git add . -A; git commit; git push --tags origin; npm publish;"
25
+ "preview": "vite preview"
22
26
  },
23
27
  "repository": {
24
28
  "type": "git",
@@ -39,22 +43,25 @@
39
43
  },
40
44
  "homepage": "https://github.com/vue-interface/btn-activity/docs#readme",
41
45
  "dependencies": {
42
- "@vue-interface/activity-indicator": "^2.0.0-beta.0",
43
- "@vue-interface/btn": "^3.0.0-beta.1"
46
+ "@vue-interface/activity-indicator": "^2.0.0-beta.7",
47
+ "@vue-interface/btn": "^3.0.0-beta.4"
48
+ },
49
+ "peerDependencies": {
50
+ "vue": "^3.0.0"
44
51
  },
45
52
  "devDependencies": {
46
- "@rollup/plugin-babel": "^6.0.0",
47
- "@vitejs/plugin-vue": "^3.1.2",
53
+ "@vitejs/plugin-vue": "^4.0.0",
54
+ "@vue/eslint-config-typescript": "^11.0.2",
48
55
  "autoprefixer": "^10.4.2",
49
- "babel-eslint": "^10.1.0",
50
- "babel-preset-vue": "^2.0.2",
51
56
  "change-case": "^4.1.2",
52
57
  "eslint": "^8.25.0",
53
58
  "eslint-plugin-vue": "^9.6.0",
54
59
  "pascalcase": "^2.0.0",
55
60
  "postcss": "^8.4.6",
56
61
  "tailwindcss": "^3.0.18",
57
- "vite": "^3.1.7",
62
+ "typescript": "^4.9.5",
63
+ "vite": "^4.0.0",
64
+ "vite-plugin-dts": "^1.7.1",
58
65
  "vue": "^3.2.40"
59
66
  }
60
67
  }
@@ -1 +0,0 @@
1
- .activity-indicator-label{margin-top:.75rem;text-align:center}.activity-indicator-xs{font-size:.5rem}.activity-indicator-sm{font-size:.75rem}.activity-indicator-md{font-size:1rem}.activity-indicator-lg{font-size:1.25rem}.activity-indicator-xl{font-size:1.75rem}.activity-indicator-center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:auto}.activity-indicator-absolute{position:absolute;width:100%;height:100%;top:0;left:0}.activity-indicator-chase{width:2.5em;height:2.5em;position:relative;-webkit-animation:activity-indicator-chase 2.5s infinite linear both;animation:activity-indicator-chase 2.5s infinite linear both}.activity-indicator-chase-dot{width:100%;height:100%;position:absolute;left:0;top:0;-webkit-animation:activity-indicator-chase-dot 2s infinite ease-in-out both;animation:activity-indicator-chase-dot 2s infinite ease-in-out both}.activity-indicator-chase-dot:before{content:"";display:block;width:25%;height:25%;background-color:currentColor;border-radius:100%;-webkit-animation:activity-indicator-chase-dot-before 2s infinite ease-in-out both;animation:activity-indicator-chase-dot-before 2s infinite ease-in-out both}.activity-indicator-chase-dot:nth-child(1){-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.activity-indicator-chase-dot:nth-child(2){-webkit-animation-delay:-1s;animation-delay:-1s}.activity-indicator-chase-dot:nth-child(3){-webkit-animation-delay:-.9s;animation-delay:-.9s}.activity-indicator-chase-dot:nth-child(4){-webkit-animation-delay:-.8s;animation-delay:-.8s}.activity-indicator-chase-dot:nth-child(5){-webkit-animation-delay:-.7s;animation-delay:-.7s}.activity-indicator-chase-dot:nth-child(6){-webkit-animation-delay:-.6s;animation-delay:-.6s}.activity-indicator-chase-dot:nth-child(1):before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.activity-indicator-chase-dot:nth-child(2):before{-webkit-animation-delay:-1s;animation-delay:-1s}.activity-indicator-chase-dot:nth-child(3):before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.activity-indicator-chase-dot:nth-child(4):before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.activity-indicator-chase-dot:nth-child(5):before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.activity-indicator-chase-dot:nth-child(6):before{-webkit-animation-delay:-.6s;animation-delay:-.6s}@-webkit-keyframes activity-indicator-chase{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes activity-indicator-chase{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes activity-indicator-chase-dot{80%,to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes activity-indicator-chase-dot{80%,to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes activity-indicator-chase-dot-before{50%{-webkit-transform:scale(.4);transform:scale(.4)}to,0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes activity-indicator-chase-dot-before{50%{-webkit-transform:scale(.4);transform:scale(.4)}to,0%{-webkit-transform:scale(1);transform:scale(1)}}.activity-indicator-circle-fade{width:2.5em;height:2.5em;position:relative}.activity-indicator-circle-fade .activity-indicator-circle{width:100%;height:100%;position:absolute;left:0;top:0}.activity-indicator-circle-fade .activity-indicator-circle:before{content:"";display:block;margin:0 auto;width:15%;height:15%;background-color:#333;border-radius:100%;-webkit-animation:activity-indicator-circle-fade 1.2s infinite ease-in-out both;animation:activity-indicator-circle-fade 1.2s infinite ease-in-out both}.activity-indicator-circle-fade .activity-indicator-circle2{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.activity-indicator-circle-fade .activity-indicator-circle3{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.activity-indicator-circle-fade .activity-indicator-circle4{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.activity-indicator-circle-fade .activity-indicator-circle5{-webkit-transform:rotate(120deg);transform:rotate(120deg)}.activity-indicator-circle-fade .activity-indicator-circle6{-webkit-transform:rotate(150deg);transform:rotate(150deg)}.activity-indicator-circle-fade .activity-indicator-circle7{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.activity-indicator-circle-fade .activity-indicator-circle8{-webkit-transform:rotate(210deg);transform:rotate(210deg)}.activity-indicator-circle-fade .activity-indicator-circle9{-webkit-transform:rotate(240deg);transform:rotate(240deg)}.activity-indicator-circle-fade .activity-indicator-circle10{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.activity-indicator-circle-fade .activity-indicator-circle11{-webkit-transform:rotate(300deg);transform:rotate(300deg)}.activity-indicator-circle-fade .activity-indicator-circle12{-webkit-transform:rotate(330deg);transform:rotate(330deg)}.activity-indicator-circle-fade .activity-indicator-circle2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.activity-indicator-circle-fade .activity-indicator-circle3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.activity-indicator-circle-fade .activity-indicator-circle4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.activity-indicator-circle-fade .activity-indicator-circle5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.activity-indicator-circle-fade .activity-indicator-circle6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.activity-indicator-circle-fade .activity-indicator-circle7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.activity-indicator-circle-fade .activity-indicator-circle8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.activity-indicator-circle-fade .activity-indicator-circle9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.activity-indicator-circle-fade .activity-indicator-circle10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.activity-indicator-circle-fade .activity-indicator-circle11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.activity-indicator-circle-fade .activity-indicator-circle12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes activity-indicator-circle-fade{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes activity-indicator-circle-fade{0%,39%,to{opacity:0}40%{opacity:1}}.activity-indicator-circle-orbit{width:2.5em;height:2.5em;position:relative;text-align:center;-webkit-animation:activity-indicator-circle-orbit-rotate 2s infinite linear;animation:activity-indicator-circle-orbit-rotate 2s infinite linear}.activity-indicator-circle-orbit-dot1,.activity-indicator-circle-orbit-dot2{width:60%;height:60%;display:inline-block;position:absolute;top:0;background-color:currentColor;border-radius:100%;-webkit-animation:activity-indicator-circle-orbit-bounce 2s infinite ease-in-out;animation:activity-indicator-circle-orbit-bounce 2s infinite ease-in-out}.activity-indicator-circle-orbit-dot2{top:auto;bottom:0;-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes activity-indicator-circle-orbit-rotate{to{-webkit-transform:rotate(360deg)}}@keyframes activity-indicator-circle-orbit-rotate{to{transform:rotate(360deg);-webkit-transform:rotate(360deg)}}@-webkit-keyframes activity-indicator-circle-orbit-bounce{0%,to{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes activity-indicator-circle-orbit-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.activity-indicator-circle-trail{width:2.5em;height:2.5em;position:relative}.activity-indicator-circle-trail .activity-indicator-child{width:100%;height:100%;position:absolute;left:0;top:0}.activity-indicator-circle-trail .activity-indicator-child:before{content:"";display:block;margin:0 auto;width:.4em;height:.4em;background-color:currentColor;border-radius:100%;-webkit-animation:activity-indicator-circle-trail 1.2s infinite ease-in-out both;animation:activity-indicator-circle-trail 1.2s infinite ease-in-out both}.activity-indicator-circle-trail .activity-indicator-circle-trail2{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail3{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail4{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail5{-webkit-transform:rotate(120deg);transform:rotate(120deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail6{-webkit-transform:rotate(150deg);transform:rotate(150deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail7{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail8{-webkit-transform:rotate(210deg);transform:rotate(210deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail9{-webkit-transform:rotate(240deg);transform:rotate(240deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail10{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail11{-webkit-transform:rotate(300deg);transform:rotate(300deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail12{-webkit-transform:rotate(330deg);transform:rotate(330deg)}.activity-indicator-circle-trail .activity-indicator-circle-trail2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.activity-indicator-circle-trail .activity-indicator-circle-trail3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.activity-indicator-circle-trail .activity-indicator-circle-trail4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.activity-indicator-circle-trail .activity-indicator-circle-trail5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.activity-indicator-circle-trail .activity-indicator-circle-trail6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.activity-indicator-circle-trail .activity-indicator-circle-trail7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.activity-indicator-circle-trail .activity-indicator-circle-trail8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.activity-indicator-circle-trail .activity-indicator-circle-trail9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.activity-indicator-circle-trail .activity-indicator-circle-trail10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.activity-indicator-circle-trail .activity-indicator-circle-trail11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.activity-indicator-circle-trail .activity-indicator-circle-trail12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes activity-indicator-circle-trail{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes activity-indicator-circle-trail{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.activity-indicator-dots{font-size:1em;position:relative}.activity-indicator-dots>div{width:1em;height:1em;background-color:currentColor;border-radius:100%;display:inline-block;-webkit-animation:activity-indicator-dots 1.4s infinite ease-in-out both;animation:activity-indicator-dots 1.4s infinite ease-in-out both}.activity-indicator-dots>div:not(:last-child){margin-right:.2em}.activity-indicator-dots .activity-indicator-dots-bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.activity-indicator-dots .activity-indicator-dots-bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes activity-indicator-dots{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes activity-indicator-dots{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.activity-indicator-double-pulse{width:2.5em;height:2.5em;position:relative}.activity-indicator-double-pulse-bounce1,.activity-indicator-double-pulse-bounce2{width:100%;height:100%;border-radius:50%;background-color:currentColor;opacity:.66;position:absolute;top:0;left:0;-webkit-animation:activity-indicator-double-pulse 2s infinite ease-in-out;animation:activity-indicator-double-pulse 2s infinite ease-in-out}.activity-indicator-double-pulse-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes activity-indicator-double-pulse{0%,to{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes activity-indicator-double-pulse{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.activity-indicator-facebook{height:4em}.activity-indicator-facebook>div{background-color:#333;height:100%;width:6px;margin-right:2px;display:inline-block;-webkit-animation:activity-indicator-facebook 1.2s infinite ease-in-out;animation:activity-indicator-facebook 1.2s infinite ease-in-out}.activity-indicator-facebook .activity-indicator-facebook-rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.activity-indicator-facebook .activity-indicator-facebook-rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.activity-indicator-facebook .activity-indicator-facebook-rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.activity-indicator-facebook .activity-indicator-facebook-rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}@-webkit-keyframes activity-indicator-facebook{0%,40%,to{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes activity-indicator-facebook{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}.activity-indicator-grid{width:2.5em;height:2.5em}.activity-indicator-grid .activity-indicator-grid{width:33%;height:33%;background-color:currentColor;float:left;-webkit-animation:activity-indicator-grid 1.3s infinite ease-in-out;animation:activity-indicator-grid 1.3s infinite ease-in-out}.activity-indicator-grid .activity-indicator-grid1{-webkit-animation-delay:.2s;animation-delay:.2s}.activity-indicator-grid .activity-indicator-grid2{-webkit-animation-delay:.3s;animation-delay:.3s}.activity-indicator-grid .activity-indicator-grid3{-webkit-animation-delay:.4s;animation-delay:.4s}.activity-indicator-grid .activity-indicator-grid4{-webkit-animation-delay:.1s;animation-delay:.1s}.activity-indicator-grid .activity-indicator-grid5{-webkit-animation-delay:.2s;animation-delay:.2s}.activity-indicator-grid .activity-indicator-grid6{-webkit-animation-delay:.3s;animation-delay:.3s}.activity-indicator-grid .activity-indicator-grid7{-webkit-animation-delay:0s;animation-delay:0s}.activity-indicator-grid .activity-indicator-grid8{-webkit-animation-delay:.1s;animation-delay:.1s}.activity-indicator-grid .activity-indicator-grid9{-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes activity-indicator-grid{0%,70%,to{-webkit-transform:scale3D(1,1,1);transform:scaleZ(1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@keyframes activity-indicator-grid{0%,70%,to{-webkit-transform:scale3D(1,1,1);transform:scaleZ(1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}.activity-indicator-pulse{width:2.5em;height:2.5em;background-color:currentColor;border-radius:100%;-webkit-animation:activity-indicator-pulse 1s infinite ease-in-out;animation:activity-indicator-pulse 1s infinite ease-in-out}@-webkit-keyframes activity-indicator-pulse{0%{-webkit-transform:scale(0)}to{-webkit-transform:scale(1);opacity:0}}@keyframes activity-indicator-pulse{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.activity-indicator-spinner{width:2.5em;height:2.5em;position:relative}.activity-indicator-spinner .activity-indicator-spinner{width:100%;height:100%;position:absolute;left:0;top:0}.activity-indicator-spinner .activity-indicator-spinner:before{content:"";display:block;margin:0 auto;width:10%;height:33.333%;background-color:currentColor;-webkit-animation:activity-indicator-spinner 1.2s infinite ease-in-out both;animation:activity-indicator-spinner 1.2s infinite ease-in-out both}.activity-indicator-spinner .activity-indicator-spinner2{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.activity-indicator-spinner .activity-indicator-spinner3{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.activity-indicator-spinner .activity-indicator-spinner4{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.activity-indicator-spinner .activity-indicator-spinner5{-webkit-transform:rotate(120deg);transform:rotate(120deg)}.activity-indicator-spinner .activity-indicator-spinner6{-webkit-transform:rotate(150deg);transform:rotate(150deg)}.activity-indicator-spinner .activity-indicator-spinner7{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.activity-indicator-spinner .activity-indicator-spinner8{-webkit-transform:rotate(210deg);transform:rotate(210deg)}.activity-indicator-spinner .activity-indicator-spinner9{-webkit-transform:rotate(240deg);transform:rotate(240deg)}.activity-indicator-spinner .activity-indicator-spinner10{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.activity-indicator-spinner .activity-indicator-spinner11{-webkit-transform:rotate(300deg);transform:rotate(300deg)}.activity-indicator-spinner .activity-indicator-spinner12{-webkit-transform:rotate(330deg);transform:rotate(330deg)}.activity-indicator-spinner .activity-indicator-spinner2:before{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.activity-indicator-spinner .activity-indicator-spinner3:before{-webkit-animation-delay:-1s;animation-delay:-1s}.activity-indicator-spinner .activity-indicator-spinner4:before{-webkit-animation-delay:-.9s;animation-delay:-.9s}.activity-indicator-spinner .activity-indicator-spinner5:before{-webkit-animation-delay:-.8s;animation-delay:-.8s}.activity-indicator-spinner .activity-indicator-spinner6:before{-webkit-animation-delay:-.7s;animation-delay:-.7s}.activity-indicator-spinner .activity-indicator-spinner7:before{-webkit-animation-delay:-.6s;animation-delay:-.6s}.activity-indicator-spinner .activity-indicator-spinner8:before{-webkit-animation-delay:-.5s;animation-delay:-.5s}.activity-indicator-spinner .activity-indicator-spinner9:before{-webkit-animation-delay:-.4s;animation-delay:-.4s}.activity-indicator-spinner .activity-indicator-spinner10:before{-webkit-animation-delay:-.3s;animation-delay:-.3s}.activity-indicator-spinner .activity-indicator-spinner11:before{-webkit-animation-delay:-.2s;animation-delay:-.2s}.activity-indicator-spinner .activity-indicator-spinner12:before{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes activity-indicator-spinner{0%,39%,to{opacity:0}40%{opacity:1}}@keyframes activity-indicator-spinner{0%,39%,to{opacity:0}40%{opacity:1}}.activity-indicator-spotify{width:2em;height:2em;border-radius:50%;background:conic-gradient(white,black);position:relative;-webkit-animation:activity-indicator-spotify 1.4s linear infinite;animation:activity-indicator-spotify 1.4s linear infinite;-webkit-transform:translateZ(0);transform:translateZ(0)}.activity-indicator-spotify:after{background:white;width:75%;height:75%;border-radius:50%;content:"";margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}@-webkit-keyframes activity-indicator-spotify{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes activity-indicator-spotify{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.activity-indicator-square{width:2.5em;height:2.5em;background-color:currentColor;-webkit-animation:activity-indicator-square 1.2s infinite ease-in-out;animation:activity-indicator-square 1.2s infinite ease-in-out}@-webkit-keyframes activity-indicator-square{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}to{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes activity-indicator-square{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0deg) rotateY(0deg)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0deg)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.activity-indicator-square-fold{margin:1em;width:2.5em;height:2.5em;position:relative;-webkit-transform:rotateZ(45deg);transform:rotate(45deg)}.activity-indicator-square-fold .activity-indicator-square-fold-square{float:left;width:50%;height:50%;position:relative;-webkit-transform:scale(1.1);transform:scale(1.1)}.activity-indicator-square-fold .activity-indicator-square-fold-square:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#333;-webkit-animation:activity-indicator-square-fold 2.4s infinite linear both;animation:activity-indicator-square-fold 2.4s infinite linear both;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.activity-indicator-square-fold .activity-indicator-square-fold-square2{-webkit-transform:scale(1.1) rotateZ(90deg);transform:scale(1.1) rotate(90deg)}.activity-indicator-square-fold .activity-indicator-square-fold-square3{-webkit-transform:scale(1.1) rotateZ(180deg);transform:scale(1.1) rotate(180deg)}.activity-indicator-square-fold .activity-indicator-square-fold-square4{-webkit-transform:scale(1.1) rotateZ(270deg);transform:scale(1.1) rotate(270deg)}.activity-indicator-square-fold .activity-indicator-square-fold-square2:before{-webkit-animation-delay:.3s;animation-delay:.3s}.activity-indicator-square-fold .activity-indicator-square-fold-square3:before{-webkit-animation-delay:.6s;animation-delay:.6s}.activity-indicator-square-fold .activity-indicator-square-fold-square4:before{-webkit-animation-delay:.9s;animation-delay:.9s}@-webkit-keyframes activity-indicator-square-fold{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@keyframes activity-indicator-square-fold{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}.activity-indicator-square-orbit{margin:.5em;width:3em;height:3em;position:relative}.activity-indicator-square-orbit-cube1,.activity-indicator-square-orbit-cube2{background-color:#333;width:1em;height:1em;position:absolute;top:0;left:0;-webkit-animation:activity-indicator-square-orbit 1.8s infinite ease-in-out;animation:activity-indicator-square-orbit 1.8s infinite ease-in-out}.activity-indicator-square-orbit-cube2{-webkit-animation-delay:-.9s;animation-delay:-.9s}@-webkit-keyframes activity-indicator-square-orbit{25%{-webkit-transform:translateX(2em) rotate(-90deg) scale(.5)}50%{-webkit-transform:translateX(2em) translateY(2em) rotate(-180deg)}75%{-webkit-transform:translateX(0px) translateY(2em) rotate(-270deg) scale(.5)}to{-webkit-transform:rotate(-360deg)}}@keyframes activity-indicator-square-orbit{25%{transform:translate(2em) rotate(-90deg) scale(.5);-webkit-transform:translateX(2em) rotate(-90deg) scale(.5)}50%{transform:translate(2em) translateY(2em) rotate(-179deg);-webkit-transform:translateX(2em) translateY(2em) rotate(-179deg)}50.1%{transform:translate(2em) translateY(2em) rotate(-180deg);-webkit-transform:translateX(2em) translateY(2em) rotate(-180deg)}75%{transform:translate(0) translateY(2em) rotate(-270deg) scale(.5);-webkit-transform:translateX(0px) translateY(2em) rotate(-270deg) scale(.5)}to{transform:rotate(-360deg);-webkit-transform:rotate(-360deg)}}@-webkit-keyframes btn-activity-in{0%,to{-webkit-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scale(.98);transform:scale(.98)}}@keyframes btn-activity-in{0%,to{-webkit-transform:scale(1);transform:scale(1)}30%{-webkit-transform:scale(.98);transform:scale(.98)}}@-webkit-keyframes btn-activity-out{0%,to{-webkit-transform:scale(1);transform:scale(1)}70%{-webkit-transform:scale(.98);transform:scale(.98)}}@keyframes btn-activity-out{0%,to{-webkit-transform:scale(1);transform:scale(1)}70%{-webkit-transform:scale(.98);transform:scale(.98)}}.btn-activity-top,.btn.btn-activity-top,.btn-activity-bottom,.btn.btn-activity-bottom,.btn-activity-left,.btn.btn-activity-left,.btn-activity-right,.btn.btn-activity-right{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-transition:all 166.5ms ease-in;transition:all 166.5ms ease-in}.btn-activity-top .activity-indicator,.btn-activity-bottom .activity-indicator,.btn-activity-left .activity-indicator,.btn-activity-right .activity-indicator{opacity:0;position:absolute;visibility:hidden;-webkit-transition:opacity 333ms ease-in;transition:opacity 333ms ease-in}.btn-activity-top,.btn-activity-bottom{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.btn-activity-top .activity-indicator,.btn-activity-bottom .activity-indicator{margin-left:auto;margin-right:auto}.btn-activity-top{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.btn-activity-top .activity-indicator{padding-bottom:1em}.btn-activity-bottom .activity-indicator{padding-top:1em}.btn-activity-left,.btn-activity-right{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.btn-activity-left{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.btn-activity-left .activity-indicator{padding-right:1em}.btn-activity-right .activity-indicator{padding-left:1em}.btn-activity:not(.btn-link){-webkit-animation:btn-activity-in 333ms;animation:btn-activity-in 333ms}.btn-hide-activity:not(.btn-link){-webkit-animation:btn-activity-out 333ms;animation:btn-activity-out 333ms}.btn-activity.btn-hide-activity .activity-indicator{opacity:0}.btn-activity .activity-indicator{opacity:1;visibility:visible;position:relative;font-size:.55em}
@@ -1,386 +0,0 @@
1
- import { openBlock as c, createElementBlock as p, normalizeClass as z, normalizeStyle as R, createElementVNode as N, createBlock as m, resolveDynamicComponent as w, createCommentVNode as b, toDisplayString as f, mergeProps as O, withCtx as $, renderSlot as A, createTextVNode as B, resolveComponent as x, createVNode as D, normalizeProps as L, guardReactiveProps as j } from "vue";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var h = function() {
17
- return h = Object.assign || function(e) {
18
- for (var i, n = 1, s = arguments.length; n < s; n++) {
19
- i = arguments[n];
20
- for (var a in i)
21
- Object.prototype.hasOwnProperty.call(i, a) && (e[a] = i[a]);
22
- }
23
- return e;
24
- }, h.apply(this, arguments);
25
- };
26
- function T(t) {
27
- return t.toLowerCase();
28
- }
29
- var V = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], F = /[^A-Z0-9]+/gi;
30
- function H(t, e) {
31
- e === void 0 && (e = {});
32
- for (var i = e.splitRegexp, n = i === void 0 ? V : i, s = e.stripRegexp, a = s === void 0 ? F : s, o = e.transform, _ = o === void 0 ? T : o, l = e.delimiter, E = l === void 0 ? " " : l, d = P(P(t, n, "$1\0$2"), a, "\0"), v = 0, y = d.length; d.charAt(v) === "\0"; )
33
- v++;
34
- for (; d.charAt(y - 1) === "\0"; )
35
- y--;
36
- return d.slice(v, y).split("\0").map(_).join(E);
37
- }
38
- function P(t, e, i) {
39
- return e instanceof RegExp ? t.replace(e, i) : e.reduce(function(n, s) {
40
- return n.replace(s, i);
41
- }, t);
42
- }
43
- function I(t, e) {
44
- return e === void 0 && (e = {}), H(t, h({
45
- delimiter: "."
46
- }, e));
47
- }
48
- function u(t, e) {
49
- return e === void 0 && (e = {}), I(t, h({
50
- delimiter: "-"
51
- }, e));
52
- }
53
- class k {
54
- constructor(e = {}) {
55
- this.components = /* @__PURE__ */ new Map(), Object.entries(e).forEach(([i, n]) => {
56
- this.register(i, n);
57
- });
58
- }
59
- get(e) {
60
- const i = this.components.get(e = u(e));
61
- if (i)
62
- return i;
63
- throw new Error(`"${e}" has not been registered yet!`);
64
- }
65
- register(e, i) {
66
- return typeof e == "object" ? (Object.entries(e).forEach(([n, s]) => {
67
- this.register(u(n), s);
68
- }), this) : (this.components.set(u(e), i), this);
69
- }
70
- remove(e) {
71
- return this.components.delete(u(e)), this;
72
- }
73
- reset() {
74
- return this.components = /* @__PURE__ */ new Map(), this;
75
- }
76
- }
77
- function W(...t) {
78
- return new k(...t);
79
- }
80
- const S = W();
81
- const g = (t, e) => {
82
- const i = t.__vccOpts || t;
83
- for (const [n, s] of e)
84
- i[n] = s;
85
- return i;
86
- };
87
- function r(t, e = "px") {
88
- return t != null && t !== !1 && isFinite(t) ? `${t}${e}` : t;
89
- }
90
- const q = {
91
- name: "ActivityIndicator",
92
- props: {
93
- absolute: Boolean,
94
- center: Boolean,
95
- label: String,
96
- size: {
97
- type: String,
98
- default: "md"
99
- },
100
- registry: {
101
- type: k,
102
- default() {
103
- return S;
104
- }
105
- },
106
- type: {
107
- type: String,
108
- required: !0
109
- },
110
- height: [String, Number],
111
- maxHeight: [String, Number],
112
- minHeight: [String, Number],
113
- width: [String, Number],
114
- maxWidth: [String, Number],
115
- minWidth: [String, Number]
116
- },
117
- data: () => ({
118
- is: null
119
- }),
120
- computed: {
121
- classes() {
122
- return {
123
- "activity-indicator-center": this.center,
124
- "activity-indicator-absolute": this.absolute,
125
- [this.size && `activity-indicator-${this.size}`]: !!this.size
126
- };
127
- },
128
- style() {
129
- return {
130
- width: r(this.width),
131
- maxWidth: r(this.maxWidth),
132
- minWidth: r(this.minWidth),
133
- height: r(this.height),
134
- maxHeight: r(this.maxHeight),
135
- minHeight: r(this.minHeight)
136
- };
137
- }
138
- },
139
- async mounted() {
140
- const t = await this.component();
141
- this.is = () => t;
142
- },
143
- methods: {
144
- async component() {
145
- let t = S.get(this.type);
146
- return t instanceof Promise ? t : (typeof t == "function" && (t = await t()), t.default ? t.default : t);
147
- }
148
- }
149
- }, Z = { class: "activity-indicator-content" }, G = {
150
- key: 1,
151
- class: "activity-indicator-label"
152
- };
153
- function M(t, e, i, n, s, a) {
154
- return c(), p("div", {
155
- class: z(["activity-indicator", a.classes]),
156
- style: R(a.style)
157
- }, [
158
- N("div", Z, [
159
- t.is ? (c(), m(w(t.is()), {
160
- key: 0,
161
- class: "mx-auto"
162
- })) : b("", !0),
163
- i.label ? (c(), p("div", G, f(i.label), 1)) : b("", !0)
164
- ])
165
- ], 6);
166
- }
167
- const U = /* @__PURE__ */ g(q, [["render", M]]);
168
- const X = {
169
- props: {
170
- componentPrefix: String,
171
- size: String,
172
- sizePrefix: String
173
- },
174
- computed: {
175
- sizeableClassPrefix() {
176
- return this.sizePrefix || this.componentPrefix;
177
- },
178
- hasSizeablePrefix() {
179
- return this.size && !!this.size.match(
180
- new RegExp(`^${this.sizeableClassPrefix}`)
181
- );
182
- },
183
- sizeableClass() {
184
- return this.size ? !this.sizeableClassPrefix || this.hasSizeablePrefix ? this.size : `${this.sizeableClassPrefix}-${this.size}` : "";
185
- }
186
- }
187
- }, J = {
188
- props: {
189
- componentPrefix: String,
190
- variant: String,
191
- variantPrefix: String
192
- },
193
- computed: {
194
- variantClassPrefix() {
195
- return this.variantPrefix || this.componentPrefix;
196
- },
197
- hasVariantPrefix() {
198
- return this.variant && !!this.variant.match(
199
- new RegExp(`^${this.variantClassPrefix}`)
200
- );
201
- },
202
- variantClass() {
203
- return this.variant ? !this.variantClassPrefix || this.hasVariantPrefix ? this.variant : `${this.variantClassPrefix}-${this.variant}` : "";
204
- }
205
- }
206
- }, K = {
207
- name: "Btn",
208
- mixins: [
209
- X,
210
- J
211
- ],
212
- props: {
213
- active: Boolean,
214
- block: Boolean,
215
- componentPrefix: {
216
- type: String,
217
- default: "btn"
218
- },
219
- disabled: Boolean,
220
- label: String,
221
- outline: Boolean,
222
- tag: String,
223
- variant: {
224
- type: String,
225
- default: "primary"
226
- }
227
- },
228
- computed: {
229
- classes() {
230
- return [
231
- "btn",
232
- this.variantClass,
233
- this.sizeableClass,
234
- this.active && "active",
235
- this.block && "btn-block",
236
- this.disabled && "disabled"
237
- ];
238
- },
239
- component() {
240
- return this.tag ? this.tag : this.$attrs.href ? "a" : "button";
241
- },
242
- variantClassPrefix() {
243
- return (this.variantPrefix || this.componentPrefix) + (this.outline ? "-outline" : "");
244
- }
245
- }
246
- };
247
- function Q(t, e, i, n, s, a) {
248
- return c(), m(w(a.component), O(t.$attrs, {
249
- disabled: i.disabled,
250
- class: a.classes,
251
- role: "button"
252
- }), {
253
- default: $(() => [
254
- A(t.$slots, "default", {}, () => [
255
- B(f(i.label), 1)
256
- ])
257
- ]),
258
- _: 3
259
- }, 16, ["disabled", "class"]);
260
- }
261
- const Y = /* @__PURE__ */ g(K, [["render", Q]]);
262
- const tt = function(t) {
263
- const e = parseFloat(t || 0, 10), i = t && t.match(/m?s/), n = i ? i[0] : !1;
264
- let s;
265
- switch (n) {
266
- case "s":
267
- s = e * 1e3;
268
- break;
269
- case "ms":
270
- default:
271
- s = e;
272
- break;
273
- }
274
- return s || 0;
275
- }, C = function(t, e) {
276
- const i = (t.ownerDocument || document).defaultView;
277
- setTimeout(() => {
278
- e.apply();
279
- }, tt(i.getComputedStyle(t).animationDuration));
280
- }, et = {
281
- name: "BtnActivity",
282
- components: {
283
- ActivityIndicator: U,
284
- Btn: Y
285
- },
286
- props: {
287
- active: Boolean,
288
- activity: Boolean,
289
- block: Boolean,
290
- disabled: Boolean,
291
- indicator: {
292
- type: [Object, String],
293
- default: "spinner"
294
- },
295
- label: String,
296
- orientation: {
297
- type: String,
298
- default: "right"
299
- },
300
- size: {
301
- type: String,
302
- default: "md"
303
- },
304
- tag: String,
305
- variant: {
306
- type: String,
307
- default: "primary"
308
- }
309
- },
310
- data() {
311
- return {
312
- currentActivity: this.activity
313
- };
314
- },
315
- computed: {
316
- classes() {
317
- const t = {
318
- disabled: this.disabled,
319
- active: this.active,
320
- "btn-activity": this.activity
321
- };
322
- return t["btn-activity-" + this.orientation.replace("btn-activity-", "")] = !!this.orientation, t["btn-activity-indicator-" + this.indicatorProps.type.replace("btn-activity-indicator-", "")] = !!this.indicatorProps.type, t;
323
- },
324
- indicatorProps() {
325
- return Object.assign({
326
- type: "spinner"
327
- }, (typeof this.indicator == "string" ? {
328
- type: this.indicator
329
- } : this.indicator) || {});
330
- }
331
- },
332
- watch: {
333
- activity(t) {
334
- t ? this.showActivity() : this.hideActivity();
335
- }
336
- },
337
- mounted() {
338
- this.activity && this.showActivity();
339
- },
340
- methods: {
341
- disable() {
342
- this.$el.disabled = !0, this.$el.classList.add("disabled");
343
- },
344
- enable() {
345
- this.$el.disabled = !1, this.$el.classList.remove("disabled");
346
- },
347
- hideActivity() {
348
- this.$el.classList.add("btn-hide-activity"), C(this.$el, () => {
349
- this.enable(), this.currentActivity = !1, this.$el.classList.remove("btn-activity", "btn-hide-activity"), this.$emit("hide-activity");
350
- });
351
- },
352
- showActivity() {
353
- this.currentActivity = !0, this.disable(), C(this.$el, () => {
354
- this.$el.classList.add("btn-activity"), this.$emit("show-activity");
355
- });
356
- },
357
- toggle() {
358
- this.currentActivity ? this.hideActivity() : this.showActivity();
359
- }
360
- }
361
- };
362
- function it(t, e, i, n, s, a) {
363
- const o = x("activity-indicator"), _ = x("btn");
364
- return c(), m(_, {
365
- active: i.active,
366
- block: i.block,
367
- disabled: i.disabled,
368
- size: i.size,
369
- tag: i.tag,
370
- variant: i.variant,
371
- class: z(a.classes),
372
- onClick: e[0] || (e[0] = (l) => !i.disabled && t.$emit("click", l, this))
373
- }, {
374
- default: $(() => [
375
- A(t.$slots, "default", {}, () => [
376
- B(f(i.label), 1)
377
- ]),
378
- D(o, L(j(a.indicatorProps)), null, 16)
379
- ]),
380
- _: 3
381
- }, 8, ["active", "block", "disabled", "size", "tag", "variant", "class"]);
382
- }
383
- const st = /* @__PURE__ */ g(et, [["render", it]]);
384
- export {
385
- st as BtnActivity
386
- };
@@ -1,14 +0,0 @@
1
- (function(o,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(o=typeof globalThis<"u"?globalThis:o||self,n(o.BtnActivity={},o.Vue))})(this,function(o,n){"use strict";/*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */var l=function(){return l=Object.assign||function(e){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},l.apply(this,arguments)};function S(t){return t.toLowerCase()}var P=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],C=/[^A-Z0-9]+/gi;function z(t,e){e===void 0&&(e={});for(var i=e.splitRegexp,s=i===void 0?P:i,a=e.stripRegexp,r=a===void 0?C:a,h=e.transform,m=h===void 0?S:h,_=e.delimiter,F=_===void 0?" ":_,u=v(v(t,s,"$1\0$2"),r,"\0"),y=0,p=u.length;u.charAt(y)==="\0";)y++;for(;u.charAt(p-1)==="\0";)p--;return u.slice(y,p).split("\0").map(m).join(F)}function v(t,e,i){return e instanceof RegExp?t.replace(e,i):e.reduce(function(s,a){return s.replace(a,i)},t)}function $(t,e){return e===void 0&&(e={}),z(t,l({delimiter:"."},e))}function d(t,e){return e===void 0&&(e={}),$(t,l({delimiter:"-"},e))}class g{constructor(e={}){this.components=new Map,Object.entries(e).forEach(([i,s])=>{this.register(i,s)})}get(e){const i=this.components.get(e=d(e));if(i)return i;throw new Error(`"${e}" has not been registered yet!`)}register(e,i){return typeof e=="object"?(Object.entries(e).forEach(([s,a])=>{this.register(d(s),a)}),this):(this.components.set(d(e),i),this)}remove(e){return this.components.delete(d(e)),this}reset(){return this.components=new Map,this}}function w(...t){return new g(...t)}const b=w(),H="",f=(t,e)=>{const i=t.__vccOpts||t;for(const[s,a]of e)i[s]=a;return i};function c(t,e="px"){return t!=null&&t!==!1&&isFinite(t)?`${t}${e}`:t}const A={name:"ActivityIndicator",props:{absolute:Boolean,center:Boolean,label:String,size:{type:String,default:"md"},registry:{type:g,default(){return b}},type:{type:String,required:!0},height:[String,Number],maxHeight:[String,Number],minHeight:[String,Number],width:[String,Number],maxWidth:[String,Number],minWidth:[String,Number]},data:()=>({is:null}),computed:{classes(){return{"activity-indicator-center":this.center,"activity-indicator-absolute":this.absolute,[this.size&&`activity-indicator-${this.size}`]:!!this.size}},style(){return{width:c(this.width),maxWidth:c(this.maxWidth),minWidth:c(this.minWidth),height:c(this.height),maxHeight:c(this.maxHeight),minHeight:c(this.minHeight)}}},async mounted(){const t=await this.component();this.is=()=>t},methods:{async component(){let t=b.get(this.type);return t instanceof Promise?t:(typeof t=="function"&&(t=await t()),t.default?t.default:t)}}},B={class:"activity-indicator-content"},k={key:1,class:"activity-indicator-label"};function E(t,e,i,s,a,r){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["activity-indicator",r.classes]),style:n.normalizeStyle(r.style)},[n.createElementVNode("div",B,[t.is?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(t.is()),{key:0,class:"mx-auto"})):n.createCommentVNode("",!0),i.label?(n.openBlock(),n.createElementBlock("div",k,n.toDisplayString(i.label),1)):n.createCommentVNode("",!0)])],6)}const D=f(A,[["render",E]]),I="",W="",q="",M="",Z="",G="",U="",X="",J="",K="",Q="",Y="",tt="",et="",N={name:"Btn",mixins:[{props:{componentPrefix:String,size:String,sizePrefix:String},computed:{sizeableClassPrefix(){return this.sizePrefix||this.componentPrefix},hasSizeablePrefix(){return this.size&&!!this.size.match(new RegExp(`^${this.sizeableClassPrefix}`))},sizeableClass(){return this.size?!this.sizeableClassPrefix||this.hasSizeablePrefix?this.size:`${this.sizeableClassPrefix}-${this.size}`:""}}},{props:{componentPrefix:String,variant:String,variantPrefix:String},computed:{variantClassPrefix(){return this.variantPrefix||this.componentPrefix},hasVariantPrefix(){return this.variant&&!!this.variant.match(new RegExp(`^${this.variantClassPrefix}`))},variantClass(){return this.variant?!this.variantClassPrefix||this.hasVariantPrefix?this.variant:`${this.variantClassPrefix}-${this.variant}`:""}}}],props:{active:Boolean,block:Boolean,componentPrefix:{type:String,default:"btn"},disabled:Boolean,label:String,outline:Boolean,tag:String,variant:{type:String,default:"primary"}},computed:{classes(){return["btn",this.variantClass,this.sizeableClass,this.active&&"active",this.block&&"btn-block",this.disabled&&"disabled"]},component(){return this.tag?this.tag:this.$attrs.href?"a":"button"},variantClassPrefix(){return(this.variantPrefix||this.componentPrefix)+(this.outline?"-outline":"")}}};function R(t,e,i,s,a,r){return n.openBlock(),n.createBlock(n.resolveDynamicComponent(r.component),n.mergeProps(t.$attrs,{disabled:i.disabled,class:r.classes,role:"button"}),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(i.label),1)])]),_:3},16,["disabled","class"])}const T=f(N,[["render",R]]),st="",O=function(t){const e=parseFloat(t||0,10),i=t&&t.match(/m?s/),s=i?i[0]:!1;let a;switch(s){case"s":a=e*1e3;break;case"ms":default:a=e;break}return a||0},x=function(t,e){const i=(t.ownerDocument||document).defaultView;setTimeout(()=>{e.apply()},O(i.getComputedStyle(t).animationDuration))},V={name:"BtnActivity",components:{ActivityIndicator:D,Btn:T},props:{active:Boolean,activity:Boolean,block:Boolean,disabled:Boolean,indicator:{type:[Object,String],default:"spinner"},label:String,orientation:{type:String,default:"right"},size:{type:String,default:"md"},tag:String,variant:{type:String,default:"primary"}},data(){return{currentActivity:this.activity}},computed:{classes(){const t={disabled:this.disabled,active:this.active,"btn-activity":this.activity};return t["btn-activity-"+this.orientation.replace("btn-activity-","")]=!!this.orientation,t["btn-activity-indicator-"+this.indicatorProps.type.replace("btn-activity-indicator-","")]=!!this.indicatorProps.type,t},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"),x(this.$el,()=>{this.enable(),this.currentActivity=!1,this.$el.classList.remove("btn-activity","btn-hide-activity"),this.$emit("hide-activity")})},showActivity(){this.currentActivity=!0,this.disable(),x(this.$el,()=>{this.$el.classList.add("btn-activity"),this.$emit("show-activity")})},toggle(){this.currentActivity?this.hideActivity():this.showActivity()}}};function j(t,e,i,s,a,r){const h=n.resolveComponent("activity-indicator"),m=n.resolveComponent("btn");return n.openBlock(),n.createBlock(m,{active:i.active,block:i.block,disabled:i.disabled,size:i.size,tag:i.tag,variant:i.variant,class:n.normalizeClass(r.classes),onClick:e[0]||(e[0]=_=>!i.disabled&&t.$emit("click",_,this))},{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(i.label),1)]),n.createVNode(h,n.normalizeProps(n.guardReactiveProps(r.indicatorProps)),null,16)]),_:3},8,["active","block","disabled","size","tag","variant","class"])}const L=f(V,[["render",j]]);o.BtnActivity=L,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,369 +0,0 @@
1
- <template>
2
- <btn
3
- :active="active"
4
- :block="block"
5
- :disabled="disabled"
6
- :size="size"
7
- :tag="tag"
8
- :variant="variant"
9
- :class="classes"
10
- @click="(e) => !disabled && $emit('click', e, this)">
11
- <slot>{{ label }}</slot>
12
- <activity-indicator v-bind="indicatorProps" />
13
- </btn>
14
- </template>
15
-
16
- <script>
17
- import { ActivityIndicator } from '@vue-interface/activity-indicator';
18
- import { Btn } from '@vue-interface/btn';
19
-
20
- const convertAnimationDelayToInt = function(delay) {
21
- const num = parseFloat(delay || 0, 10);
22
- const matches = delay && delay.match(/m?s/);
23
- const unit = matches ? matches[0] : false;
24
-
25
- let milliseconds;
26
-
27
- switch (unit) {
28
- case 's': // seconds
29
- milliseconds = num * 1000;
30
- break;
31
- case 'ms':
32
- default:
33
- milliseconds = num;
34
- break;
35
- }
36
-
37
- return milliseconds || 0;
38
- };
39
-
40
- const animated = function(el, callback) {
41
- const defaultView = (el.ownerDocument || document).defaultView;
42
-
43
- setTimeout(() => {
44
- callback.apply();
45
- }, convertAnimationDelayToInt(defaultView.getComputedStyle(el).animationDuration));
46
- };
47
-
48
- export default {
49
-
50
- name: 'BtnActivity',
51
-
52
- components: {
53
- ActivityIndicator,
54
- Btn
55
- },
56
-
57
- props: {
58
-
59
- /**
60
- * Make the button appear with the active state.
61
- *
62
- * @property {Boolean}
63
- */
64
- active: Boolean,
65
-
66
- /**
67
- * Show the activity indicator inside the button.
68
- *
69
- * @property {Boolean}
70
- */
71
- activity: Boolean,
72
-
73
- /**
74
- * Display the button as block width.
75
- *
76
- * @property {Boolean}
77
- */
78
- block: Boolean,
79
-
80
- /**
81
- * Disable the button.
82
- *
83
- * @property {Boolean}
84
- */
85
- disabled: Boolean,
86
-
87
- /**
88
- * The type of activity indicator inside the button.
89
- *
90
- * @property {String}
91
- */
92
- indicator: {
93
- type: [Object, String],
94
- default: 'spinner'
95
- },
96
-
97
- /**
98
- * The button label.
99
- *
100
- * @property {String}
101
- */
102
- label: String,
103
-
104
- /**
105
- * The orientation of the activity button inside the button.
106
- *
107
- * @property {String}
108
- */
109
- orientation: {
110
- type: String,
111
- default: 'right'
112
- },
113
-
114
- /**
115
- * The size of the button.
116
- *
117
- * @property {String}
118
- */
119
- size: {
120
- type: String,
121
- default: 'md'
122
- },
123
-
124
- /**
125
- * The HTML tag.
126
- *
127
- * @property {String}
128
- */
129
- tag: String,
130
-
131
- /**
132
- * The variant of the button.
133
- *
134
- * @property {String}
135
- */
136
- variant: {
137
- type: String,
138
- default: 'primary'
139
- }
140
- },
141
-
142
- data() {
143
- return {
144
- currentActivity: this.activity
145
- };
146
- },
147
-
148
- computed: {
149
-
150
- /**
151
- * An object of classes to append to the button.
152
- *
153
- * @return void
154
- */
155
- classes() {
156
- const classes = {
157
- 'disabled': this.disabled,
158
- 'active': this.active,
159
- 'btn-activity': this.activity
160
- };
161
-
162
- classes['btn-activity-' + this.orientation.replace('btn-activity-', '')] = !!this.orientation;
163
- classes['btn-activity-indicator-' + this.indicatorProps.type.replace('btn-activity-indicator-', '')] = !!this.indicatorProps.type;
164
-
165
- return classes;
166
- },
167
-
168
- indicatorProps() {
169
- return Object.assign({
170
- type: 'spinner'
171
- }, (typeof this.indicator === 'string' ? {
172
- type: this.indicator
173
- } : this.indicator) || {});
174
- }
175
-
176
- },
177
-
178
- watch: {
179
-
180
- activity(value) {
181
- if(value) {
182
- this.showActivity();
183
- }
184
- else {
185
- this.hideActivity();
186
- }
187
- }
188
-
189
- },
190
-
191
- mounted() {
192
- if(this.activity) {
193
- this.showActivity();
194
- }
195
- },
196
-
197
- methods: {
198
-
199
- /**
200
- * Disable the button.
201
- *
202
- * @return void
203
- */
204
- disable() {
205
- this.$el.disabled = true;
206
- this.$el.classList.add('disabled');
207
- },
208
-
209
- /**
210
- * Enable the button.
211
- *
212
- * @return void
213
- */
214
- enable() {
215
- this.$el.disabled = false;
216
- this.$el.classList.remove('disabled');
217
- },
218
-
219
- /**
220
- * Hide the activity indicator inside the button.
221
- *
222
- * @return void
223
- */
224
- hideActivity() {
225
- this.$el.classList.add('btn-hide-activity');
226
-
227
- animated(this.$el, () => {
228
- this.enable();
229
- this.currentActivity = false;
230
- this.$el.classList.remove('btn-activity', 'btn-hide-activity');
231
- this.$emit('hide-activity');
232
- });
233
- },
234
-
235
- /**
236
- * Show the activity indicator inside the button.
237
- *
238
- * @return void
239
- */
240
- showActivity() {
241
- this.currentActivity = true;
242
- this.disable();
243
-
244
- animated(this.$el, () => {
245
- this.$el.classList.add('btn-activity');
246
- this.$emit('show-activity');
247
- });
248
- },
249
-
250
- /**
251
- * Show the activity indicator inside the button.
252
- *
253
- * @return void
254
- */
255
- toggle() {
256
- if(!this.currentActivity) {
257
- this.showActivity();
258
- }
259
- else {
260
- this.hideActivity();
261
- }
262
- }
263
-
264
- }
265
-
266
- };
267
- </script>
268
-
269
- <style>
270
- @keyframes btn-activity-in {
271
- 0%, 100% {
272
- transform: scale(1);
273
- } 30% {
274
- transform: scale(.98);
275
- }
276
- }
277
-
278
- @keyframes btn-activity-out {
279
- 0%, 100% {
280
- transform: scale(1);
281
- } 70% {
282
- transform: scale(.98);
283
- }
284
- }
285
-
286
- .btn-activity-top,
287
- .btn.btn-activity-top,
288
- .btn-activity-bottom,
289
- .btn.btn-activity-bottom,
290
- .btn-activity-left,
291
- .btn.btn-activity-left,
292
- .btn-activity-right,
293
- .btn.btn-activity-right {
294
- display: inline-flex;
295
- position: relative;
296
- transition: all calc(333ms / 2) ease-in;
297
- }
298
-
299
- .btn-activity-top .activity-indicator,
300
- .btn-activity-bottom .activity-indicator,
301
- .btn-activity-left .activity-indicator,
302
- .btn-activity-right .activity-indicator {
303
- opacity: 0;
304
- position: absolute;
305
- visibility: hidden;
306
- transition: opacity 333ms ease-in;
307
- }
308
-
309
- .btn-activity-top,
310
- .btn-activity-bottom {
311
- flex-direction: column;
312
- align-items: center;
313
- }
314
-
315
- .btn-activity-top .activity-indicator,
316
- .btn-activity-bottom .activity-indicator {
317
- margin-left: auto;
318
- margin-right: auto;
319
- }
320
-
321
- .btn-activity-top {
322
- flex-direction: column-reverse;
323
- }
324
-
325
- .btn-activity-top .activity-indicator {
326
- padding-bottom: 1em;
327
- }
328
-
329
- .btn-activity-bottom .activity-indicator {
330
- padding-top: 1em;
331
- }
332
-
333
- .btn-activity-left,
334
- .btn-activity-right {
335
- align-items: center;
336
- justify-content: center;
337
- }
338
-
339
- .btn-activity-left {
340
- flex-direction: row-reverse;
341
- }
342
-
343
- .btn-activity-left .activity-indicator {
344
- padding-right: 1em;
345
- }
346
-
347
- .btn-activity-right .activity-indicator {
348
- padding-left: 1em;
349
- }
350
-
351
- .btn-activity:not(.btn-link) {
352
- animation: btn-activity-in 333ms;
353
- }
354
-
355
- .btn-hide-activity:not(.btn-link) {
356
- animation: btn-activity-out 333ms;
357
- }
358
-
359
- .btn-activity.btn-hide-activity .activity-indicator {
360
- opacity: 0;
361
- }
362
-
363
- .btn-activity .activity-indicator {
364
- opacity: 1;
365
- visibility: visible;
366
- position: relative;
367
- font-size: .55em;
368
- }
369
- </style>