UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

1 lines 2.33 kB
{"version":3,"file":"index.mjs","sources":["../../../src/badge/style/BadgeStyle.js"],"sourcesContent":["import { style } from '@primeuix/styles/badge';\nimport { isEmpty, isNotEmpty } from '@primeuix/utils/object';\nimport BaseStyle from '@primevue/core/base/style';\n\nconst classes = {\n root: ({ props, instance }) => [\n 'p-badge p-component',\n {\n 'p-badge-circle': isNotEmpty(props.value) && String(props.value).length === 1,\n 'p-badge-dot': isEmpty(props.value) && !instance.$slots.default,\n 'p-badge-sm': props.size === 'small',\n 'p-badge-lg': props.size === 'large',\n 'p-badge-xl': props.size === 'xlarge',\n 'p-badge-info': props.severity === 'info',\n 'p-badge-success': props.severity === 'success',\n 'p-badge-warn': props.severity === 'warn',\n 'p-badge-danger': props.severity === 'danger',\n 'p-badge-secondary': props.severity === 'secondary',\n 'p-badge-contrast': props.severity === 'contrast'\n }\n ]\n};\n\nexport default BaseStyle.extend({\n name: 'badge',\n style,\n classes\n});\n"],"names":["classes","root","_ref","props","instance","isNotEmpty","value","String","length","isEmpty","$slots","size","severity","BaseStyle","extend","name","style"],"mappings":";;;;AAIA,IAAMA,OAAO,GAAG;AACZC,EAAAA,IAAI,EAAE,SAANA,IAAIA,CAAAC,IAAA,EAAA;AAAA,IAAA,IAAKC,KAAK,GAAAD,IAAA,CAALC,KAAK;MAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAA,OAAO,CAC3B,qBAAqB,EACrB;AACI,MAAA,gBAAgB,EAAEC,UAAU,CAACF,KAAK,CAACG,KAAK,CAAC,IAAIC,MAAM,CAACJ,KAAK,CAACG,KAAK,CAAC,CAACE,MAAM,KAAK,CAAC;AAC7E,MAAA,aAAa,EAAEC,OAAO,CAACN,KAAK,CAACG,KAAK,CAAC,IAAI,CAACF,QAAQ,CAACM,MAAM,CAAQ,SAAA,CAAA;AAC/D,MAAA,YAAY,EAAEP,KAAK,CAACQ,IAAI,KAAK,OAAO;AACpC,MAAA,YAAY,EAAER,KAAK,CAACQ,IAAI,KAAK,OAAO;AACpC,MAAA,YAAY,EAAER,KAAK,CAACQ,IAAI,KAAK,QAAQ;AACrC,MAAA,cAAc,EAAER,KAAK,CAACS,QAAQ,KAAK,MAAM;AACzC,MAAA,iBAAiB,EAAET,KAAK,CAACS,QAAQ,KAAK,SAAS;AAC/C,MAAA,cAAc,EAAET,KAAK,CAACS,QAAQ,KAAK,MAAM;AACzC,MAAA,gBAAgB,EAAET,KAAK,CAACS,QAAQ,KAAK,QAAQ;AAC7C,MAAA,mBAAmB,EAAET,KAAK,CAACS,QAAQ,KAAK,WAAW;AACnD,MAAA,kBAAkB,EAAET,KAAK,CAACS,QAAQ,KAAK;AAC3C,KAAC,CACJ;AAAA;AACL,CAAC;AAED,iBAAeC,SAAS,CAACC,MAAM,CAAC;AAC5BC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,KAAK,EAALA,KAAK;AACLhB,EAAAA,OAAO,EAAPA;AACJ,CAAC,CAAC;;;;"}