@gits-id/spinner
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=require("vue");const o=e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),n=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),c=[o,n],r={props:{xLarge:{type:Boolean,default:!1},large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},xSmall:{type:Boolean,default:!1},color:{type:String,default:""}},emits:[],setup(l,{emit:u}){const t=l,s=e.computed(()=>t.large?"h-8 w-8":t.small?"h-4 w-4":t.xLarge?"h-10 w-10":t.xSmall?"h-3 w-3":"h-5 w-5"),a=e.computed(()=>{switch(t.color){case"primary":return"text-primary-600";case"info":return"text-info-600";case"warning":return"text-warning-600";case"error":return"text-error-600";case"success":return"text-success-600";case"white":return"text-white-600";default:return t.color||"text-gray-600"}});return(i,f)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["animate-spin inline",[e.unref(s),e.unref(a)]]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},c,2))}};exports.VSpinner=r;exports.default=r; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=require("vue");const o=e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),a=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),c=[o,a],r=e.defineComponent({props:{xLarge:{type:Boolean,default:!1},large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},xSmall:{type:Boolean,default:!1},color:{type:String,default:""}},setup(l){const t=l,s=e.computed(()=>t.large?"h-8 w-8":t.small?"h-4 w-4":t.xLarge?"h-10 w-10":t.xSmall?"h-3 w-3":"h-5 w-5"),n=e.computed(()=>{switch(t.color){case"primary":return"text-primary-600";case"info":return"text-info-600";case"warning":return"text-warning-600";case"error":return"text-error-600";case"success":return"text-success-600";case"white":return"text-white-600";default:return t.color||"text-gray-600"}});return(u,i)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["animate-spin inline",[e.unref(s),e.unref(n)]]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},c,2))}});exports.VSpinner=r;exports.default=r; |
@@ -1,4 +0,4 @@ | ||
import { computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode } from 'vue'; | ||
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode } from 'vue'; | ||
const _hoisted_1 = /*#__PURE__*/createElementVNode("circle", { | ||
const _hoisted_1 = /* @__PURE__ */ createElementVNode("circle", { | ||
class: "opacity-25", | ||
@@ -11,3 +11,3 @@ cx: "12", | ||
}, null, -1); | ||
const _hoisted_2 = /*#__PURE__*/createElementVNode("path", { | ||
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { | ||
class: "opacity-75", | ||
@@ -21,81 +21,69 @@ fill: "currentColor", | ||
]; | ||
const _sfc_main = { | ||
const _sfc_main = /* @__PURE__ */ defineComponent({ | ||
props: { | ||
xLarge: { | ||
type: Boolean, | ||
default: false, | ||
xLarge: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
large: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
small: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
xSmall: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
color: { | ||
type: String, | ||
default: "" | ||
} | ||
}, | ||
large: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
small: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
xSmall: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
color: { | ||
type: String, | ||
default: '', | ||
}, | ||
}, | ||
emits: [], | ||
setup(__props, { emit }) { | ||
const props = __props; | ||
const sizeClass = computed(() => { | ||
if (props.large) { | ||
return 'h-8 w-8'; | ||
} else if (props.small) { | ||
return 'h-4 w-4'; | ||
} else if (props.xLarge) { | ||
return 'h-10 w-10'; | ||
} else if (props.xSmall) { | ||
return 'h-3 w-3'; | ||
} else { | ||
return 'h-5 w-5'; | ||
setup(__props) { | ||
const props = __props; | ||
const sizeClass = computed(() => { | ||
if (props.large) { | ||
return "h-8 w-8"; | ||
} else if (props.small) { | ||
return "h-4 w-4"; | ||
} else if (props.xLarge) { | ||
return "h-10 w-10"; | ||
} else if (props.xSmall) { | ||
return "h-3 w-3"; | ||
} else { | ||
return "h-5 w-5"; | ||
} | ||
}); | ||
const colorClass = computed(() => { | ||
switch (props.color) { | ||
case "primary": | ||
return "text-primary-600"; | ||
case "info": | ||
return "text-info-600"; | ||
case "warning": | ||
return "text-warning-600"; | ||
case "error": | ||
return "text-error-600"; | ||
case "success": | ||
return "text-success-600"; | ||
case "white": | ||
return "text-white-600"; | ||
default: | ||
return props.color || "text-gray-600"; | ||
} | ||
}); | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("svg", { | ||
class: normalizeClass(["animate-spin inline", [unref(sizeClass), unref(colorClass)]]), | ||
xmlns: "http://www.w3.org/2000/svg", | ||
fill: "none", | ||
viewBox: "0 0 24 24" | ||
}, _hoisted_3, 2); | ||
}; | ||
} | ||
}); | ||
const colorClass = computed(() => { | ||
switch (props.color) { | ||
case 'primary': | ||
return 'text-primary-600'; | ||
case 'info': | ||
return 'text-info-600'; | ||
case 'warning': | ||
return 'text-warning-600'; | ||
case 'error': | ||
return 'text-error-600'; | ||
case 'success': | ||
return 'text-success-600'; | ||
case 'white': | ||
return 'text-white-600'; | ||
default: | ||
return props.color || 'text-gray-600'; | ||
} | ||
}); | ||
return (_ctx, _cache) => { | ||
return (openBlock(), createElementBlock("svg", { | ||
class: normalizeClass(["animate-spin inline", [unref(sizeClass), unref(colorClass)]]), | ||
xmlns: "http://www.w3.org/2000/svg", | ||
fill: "none", | ||
viewBox: "0 0 24 24" | ||
}, _hoisted_3, 2)) | ||
} | ||
} | ||
}; | ||
export { _sfc_main as VSpinner, _sfc_main as default }; |
@@ -1,1 +0,1 @@ | ||
var VSpinner=function(r,e){"use strict";const n=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)],l={props:{xLarge:{type:Boolean,default:!1},large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},xSmall:{type:Boolean,default:!1},color:{type:String,default:""}},emits:[],setup(s,{emit:u}){const t=s,a=e.computed(()=>t.large?"h-8 w-8":t.small?"h-4 w-4":t.xLarge?"h-10 w-10":t.xSmall?"h-3 w-3":"h-5 w-5"),o=e.computed(()=>{switch(t.color){case"primary":return"text-primary-600";case"info":return"text-info-600";case"warning":return"text-warning-600";case"error":return"text-error-600";case"success":return"text-success-600";case"white":return"text-white-600";default:return t.color||"text-gray-600"}});return(f,d)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["animate-spin inline",[e.unref(a),e.unref(o)]]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},n,2))}};return r.VSpinner=l,r.default=l,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r}({},Vue); | ||
var VSpinner=function(r,e){"use strict";const n=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)],l=e.defineComponent({props:{xLarge:{type:Boolean,default:!1},large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},xSmall:{type:Boolean,default:!1},color:{type:String,default:""}},setup(s){const t=s,o=e.computed(()=>t.large?"h-8 w-8":t.small?"h-4 w-4":t.xLarge?"h-10 w-10":t.xSmall?"h-3 w-3":"h-5 w-5"),a=e.computed(()=>{switch(t.color){case"primary":return"text-primary-600";case"info":return"text-info-600";case"warning":return"text-warning-600";case"error":return"text-error-600";case"success":return"text-success-600";case"white":return"text-white-600";default:return t.color||"text-gray-600"}});return(u,f)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["animate-spin inline",[e.unref(o),e.unref(a)]]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},n,2))}});return r.VSpinner=l,r.default=l,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),r}({},Vue); |
@@ -1,1 +0,1 @@ | ||
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.VSpinner={},t.Vue))})(this,function(t,e){"use strict";const s=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)],n={props:{xLarge:{type:Boolean,default:!1},large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},xSmall:{type:Boolean,default:!1},color:{type:String,default:""}},emits:[],setup(o,{emit:u}){const r=o,l=e.computed(()=>r.large?"h-8 w-8":r.small?"h-4 w-4":r.xLarge?"h-10 w-10":r.xSmall?"h-3 w-3":"h-5 w-5"),a=e.computed(()=>{switch(r.color){case"primary":return"text-primary-600";case"info":return"text-info-600";case"warning":return"text-warning-600";case"error":return"text-error-600";case"success":return"text-success-600";case"white":return"text-white-600";default:return r.color||"text-gray-600"}});return(f,d)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["animate-spin inline",[e.unref(l),e.unref(a)]]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},s,2))}};t.VSpinner=n,t.default=n,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.VSpinner={},t.Vue))})(this,function(t,e){"use strict";const o=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)],n=e.defineComponent({props:{xLarge:{type:Boolean,default:!1},large:{type:Boolean,default:!1},small:{type:Boolean,default:!1},xSmall:{type:Boolean,default:!1},color:{type:String,default:""}},setup(s){const r=s,l=e.computed(()=>r.large?"h-8 w-8":r.small?"h-4 w-4":r.xLarge?"h-10 w-10":r.xSmall?"h-3 w-3":"h-5 w-5"),a=e.computed(()=>{switch(r.color){case"primary":return"text-primary-600";case"info":return"text-info-600";case"warning":return"text-warning-600";case"error":return"text-error-600";case"success":return"text-success-600";case"white":return"text-white-600";default:return r.color||"text-gray-600"}});return(u,f)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["animate-spin inline",[e.unref(l),e.unref(a)]]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},o,2))}});t.VSpinner=n,t.default=n,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "@gits-id/spinner", | ||
"version": "0.4.1-alpha.0", | ||
"version": "0.4.5-alpha.0", | ||
"description": "GITS Spinner Component", | ||
"scripts": { | ||
"build": "vite build && tsc --emitDeclarationOnly && mv dist/src dist/types", | ||
"build": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types", | ||
"prepublishOnly": "npm run build", | ||
@@ -20,4 +20,4 @@ "test": "vitest" | ||
"devDependencies": { | ||
"@gits-id/tailwind-config": "^0.4.1-alpha.0", | ||
"@gits-id/utils": "^0.4.1-alpha.0", | ||
"@gits-id/tailwind-config": "^0.4.5-alpha.0", | ||
"@gits-id/utils": "^0.4.5-alpha.0", | ||
"@vue/test-utils": "^2.0.0-rc.17", | ||
@@ -33,3 +33,3 @@ "c8": "^7.11.3", | ||
"types": "./dist/types/index.d.ts", | ||
"gitHead": "b29c3a49d5dbfe5b5d579450bfd551387c8d834f", | ||
"gitHead": "63ecc25f18e70b95f1d516b2e7145177ab602649", | ||
"dependencies": { | ||
@@ -36,0 +36,0 @@ "vue": "^3.2.33" |
@@ -17,3 +17,4 @@ { | ||
"emitDeclarationOnly": true, | ||
"allowSyntheticDefaultImports": true | ||
"allowSyntheticDefaultImports": true, | ||
"jsx": "preserve" | ||
}, | ||
@@ -20,0 +21,0 @@ "include": ["src/vue.d.ts", "*.vue", "src"], |
Sorry, the diff of this file is not supported yet
19971
47.5%18
5.88%430
53.57%