@gits-id/badge
Advanced tools
Comparing version 0.10.12 to 0.11.0
@@ -6,2 +6,6 @@ # Change Log | ||
# [0.11.0](https://github.com/gitsindonesia/ui-component/compare/v0.10.14...v0.11.0) (2022-08-24) | ||
**Note:** Version bump only for package @gits-id/badge | ||
## [0.10.12](https://github.com/gitsindonesia/ui-component/compare/v0.10.11...v0.10.12) (2022-07-20) | ||
@@ -8,0 +12,0 @@ |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=require("vue"),b=require("@heroicons/vue/outline");const o=e.defineComponent({props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(n,{emit:s}){const r=n,{dismissable:a}=e.toRefs(r),l=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),i=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),d=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),c=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),u=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),g=()=>{s("dismiss")};return(t,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(l),e.unref(d),e.unref(i),e.unref(c)]])},[e.renderSlot(t.$slots,"default"),e.unref(a)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(u)]]),type:"button",onClick:g},[e.createVNode(e.unref(b.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});exports.VBadge=o;exports.default=o; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=require("vue"),b=require("@heroicons/vue/outline");const o=e.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(n,{emit:s}){const r=n,{dismissable:a}=e.toRefs(r),l=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),i=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),d=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),c=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),u=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),g=()=>{s("dismiss")};return(t,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(l),e.unref(d),e.unref(i),e.unref(c)]])},[e.renderSlot(t.$slots,"default"),e.unref(a)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(u)]]),type:"button",onClick:g},[e.createVNode(e.unref(b.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});exports.VBadge=o;exports.default=o; |
@@ -5,2 +5,3 @@ import { defineComponent, toRefs, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createVNode, createCommentVNode } from 'vue'; | ||
const _sfc_main = /* @__PURE__ */ defineComponent({ | ||
__name: "VBadge", | ||
props: { | ||
@@ -7,0 +8,0 @@ color: { |
@@ -1,1 +0,1 @@ | ||
var Badge=function(o,e,a){"use strict";const n=e.defineComponent({props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(s,{emit:l}){const r=s,{dismissable:i}=e.toRefs(r),d=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),c=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),g=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),b=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),f=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),u=()=>{l("dismiss")};return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(d),e.unref(g),e.unref(c),e.unref(b)]])},[e.renderSlot(t.$slots,"default"),e.unref(i)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(f)]]),type:"button",onClick:u},[e.createVNode(e.unref(a.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});return o.VBadge=n,o.default=n,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),o}({},Vue,outline); | ||
var Badge=function(o,e,a){"use strict";const n=e.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(s,{emit:l}){const r=s,{dismissable:i}=e.toRefs(r),d=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),c=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),g=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),b=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),f=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),u=()=>{l("dismiss")};return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(d),e.unref(g),e.unref(c),e.unref(b)]])},[e.renderSlot(t.$slots,"default"),e.unref(i)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(f)]]),type:"button",onClick:u},[e.createVNode(e.unref(a.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});return o.VBadge=n,o.default=n,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),o}({},Vue,outline); |
@@ -1,1 +0,1 @@ | ||
(function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@heroicons/vue/outline")):typeof define=="function"&&define.amd?define(["exports","vue","@heroicons/vue/outline"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.Badge={},o.Vue,o.outline))})(this,function(o,e,s){"use strict";const n=e.defineComponent({props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(a,{emit:i}){const r=a,{dismissable:l}=e.toRefs(r),d=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),c=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),f=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),u=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),g=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),b=()=>{i("dismiss")};return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(d),e.unref(f),e.unref(c),e.unref(u)]])},[e.renderSlot(t.$slots,"default"),e.unref(l)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(g)]]),type:"button",onClick:b},[e.createVNode(e.unref(s.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});o.VBadge=n,o.default=n,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@heroicons/vue/outline")):typeof define=="function"&&define.amd?define(["exports","vue","@heroicons/vue/outline"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o.Badge={},o.Vue,o.outline))})(this,function(o,e,s){"use strict";const n=e.defineComponent({__name:"VBadge",props:{color:{type:String,default:"default"},rounded:{type:Boolean,default:!1},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},bgColor:{type:String,default:""},textColor:{type:String,default:"text-white"},circle:{type:Boolean,default:!1},dismissable:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1}},emits:["dismiss"],setup(a,{emit:i}){const r=a,{dismissable:l}=e.toRefs(r),d=e.computed(()=>{if(r.bgColor)return`${r.bgColor} ${r.textColor}`;let t;return r.outlined?t={default:"bg-transparent border border-gray-800 text-gray-800",primary:"bg-transparent border border-primary-500 text-primary-500",secondary:"bg-transparent border border-secondary-500 text-secondary-500",info:"bg-transparent border border-info-500 text-info-500",warning:"bg-transparent border border-warning-500 text-warning-500",error:"bg-transparent border border-error-500 text-error-500",success:"bg-transparent border border-success-500 text-success-500",dark:"bg-transparent border border-gray-900 text-gray-900"}:t={default:"bg-gray-200 text-gray-800",primary:"bg-primary-500 text-white",secondary:"bg-secondary-500 text-white",info:"bg-info-500 text-white",warning:"bg-warning-500 text-white",error:"bg-error-500 text-white",success:"bg-success-500 text-white",dark:"bg-gray-900 text-white"},t[r.color]}),c=e.computed(()=>r.small?"px-2 py-1 text-xs":r.large?"px-4 py-2 text-lg":"px-2 py-1 text-sm"),f=e.computed(()=>{let t="rounded-md";return r.small?t="rounded":r.large&&(t="rounded-lg"),r.rounded?"rounded-full":t}),g=e.computed(()=>{let t="w-7 h-7";return r.small?t="w-6 h-6":r.large&&(t="w-10 h-10"),r.circle?"inline-flex items-center justify-center rounded-full "+t:""}),u=e.computed(()=>({default:"hover:bg-gray-400 active:bg-gray-300 hover:text-white",primary:"hover:bg-primary-400 active:bg-primary-300",secondary:"hover:bg-secondary-400 active:bg-secondary-300",info:"hover:bg-info-400 active:bg-info-300",warning:"hover:bg-warning-400 active:bg-warning-300",success:"hover:bg-success-400 active:bg-success-300",error:"hover:bg-error-400 active:bg-error-300"})[r.color]),b=()=>{i("dismiss")};return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["inline-flex items-center gap-2",[e.unref(d),e.unref(f),e.unref(c),e.unref(g)]])},[e.renderSlot(t.$slots,"default"),e.unref(l)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["bg-transparent rounded-sm !p-0",[e.unref(u)]]),type:"button",onClick:b},[e.createVNode(e.unref(s.XIcon),{class:"h-4 w-4"})],2)):e.createCommentVNode("",!0)],2))}});o.VBadge=n,o.default=n,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
@@ -176,3 +176,3 @@ declare const _default: { | ||
onDismiss?: ((...args: any[]) => any) | undefined; | ||
} & import("vue").ShallowUnwrapRef<{}> & {} & {} & import("vue").ComponentCustomProperties; | ||
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties; | ||
__isFragment?: undefined; | ||
@@ -179,0 +179,0 @@ __isTeleport?: undefined; |
{ | ||
"name": "@gits-id/badge", | ||
"version": "0.10.12", | ||
"version": "0.11.0", | ||
"description": "GITS Badge Component", | ||
@@ -22,4 +22,4 @@ "scripts": { | ||
"devDependencies": { | ||
"@gits-id/tailwind-config": "^0.10.12", | ||
"@gits-id/utils": "^0.10.12", | ||
"@gits-id/tailwind-config": "^0.11.0", | ||
"@gits-id/utils": "^0.11.0", | ||
"@vue/test-utils": "^2.0.0-rc.17", | ||
@@ -36,3 +36,3 @@ "c8": "^7.11.3", | ||
"types": "./dist/types/index.d.ts", | ||
"gitHead": "3e860a6bcfa9686a5c79826521678e10015d3e67" | ||
"gitHead": "691edca5992778c449d48bc6b00dc49e02295855" | ||
} |
35618
676