Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@featherds/badge

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@featherds/badge - npm Package Compare versions

Comparing version 0.9.6 to 0.10.0

src/components/__snapshots__/Badge.spec.ts.snap

79

dist/app.es.js

@@ -1,10 +0,11 @@

import { openBlock, createElementBlock, normalizeClass, createElementVNode, resolveComponent, renderSlot, Fragment, renderList, createBlock } from "vue";
const TYPES = {
INFO: "info",
ERROR: "error"
};
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, resolveComponent, renderSlot, Fragment, renderList, createBlock } from "vue";
var BadgeTypes = /* @__PURE__ */ ((BadgeTypes2) => {
BadgeTypes2["info"] = "info";
BadgeTypes2["error"] = "error";
return BadgeTypes2;
})(BadgeTypes || {});
var Badge_vue_vue_type_style_index_0_scoped_true_lang = "";
var _export_sfc = (sfc, props) => {
var _export_sfc = (sfc, props2) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
for (const [key, val] of props2) {
target[key] = val;

@@ -14,3 +15,3 @@ }

};
const _sfc_main$2 = {
const _sfc_main$2 = defineComponent({
props: {

@@ -21,34 +22,35 @@ type: { type: String, required: true },

}
};
});
const _hoisted_1$1 = ["title"];
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", {
class: normalizeClass(["badge", [$props.type, $props.siblings ? "siblings" : ""]])
class: normalizeClass(["badge", [_ctx.type, _ctx.siblings ? "siblings" : ""]])
}, [
createElementVNode("div", {
class: "badge-icon",
title: $props.title
title: _ctx.title
}, null, 8, _hoisted_1$1)
], 2);
}
var Badge = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-32586987"]]);
var Badge = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-6f3faa0e"]]);
var FeatherBadge_vue_vue_type_style_index_0_scoped_true_lang = "";
const BADGES = [TYPES.INFO, TYPES.ERROR];
const _sfc_main$1 = {
props: {
badges: {
type: [Array, Object],
required: true
},
inline: {
type: Boolean,
default: false
}
const BADGES = [BadgeTypes.info, BadgeTypes.error];
const props$1 = {
badges: {
type: [Array, Object],
required: true
},
inline: {
type: Boolean,
default: false
}
};
const _sfc_main$1 = defineComponent({
props: props$1,
computed: {
orderBadges() {
const badges = Array.isArray(this.badges) ? this.badges : [this.badges];
return badges.filter((x) => BADGES.indexOf(x.type.toLowerCase()) > -1).sort((a, b) => {
const aIndex = BADGES.indexOf(a.type.toLowerCase());
const bIndex = BADGES.indexOf(b.type.toLowerCase());
return badges.filter((x) => BADGES.indexOf(x.type) > -1).sort((a, b) => {
const aIndex = BADGES.indexOf(a.type);
const bIndex = BADGES.indexOf(b.type);
return aIndex - bIndex;

@@ -61,3 +63,3 @@ });

}
};
});
const _hoisted_1 = { class: "badges" };

@@ -67,7 +69,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {

return openBlock(), createElementBlock("span", {
class: normalizeClass(["badge-container", { inline: $props.inline }])
class: normalizeClass(["badge-container", { inline: _ctx.inline }])
}, [
renderSlot(_ctx.$slots, "default", {}, void 0, true),
createElementVNode("div", _hoisted_1, [
(openBlock(true), createElementBlock(Fragment, null, renderList($options.orderBadges, (item) => {
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.orderBadges, (item) => {
return openBlock(), createBlock(_component_Badge, {

@@ -77,3 +79,3 @@ key: item.type,

title: item.title,
siblings: $options.orderBadges.length > 1
siblings: _ctx.orderBadges.length > 1
}, null, 8, ["type", "title", "siblings"]);

@@ -84,12 +86,13 @@ }), 128))

}
var FeatherBadge = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-231e1072"]]);
var FeatherBadge = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-f8aad372"]]);
var FeatherTextBadge_vue_vue_type_style_index_0_scoped_true_lang = "";
const _sfc_main = {
props: {
type: { type: String, required: true }
}
const props = {
type: { type: String, required: true }
};
const _sfc_main = defineComponent({
props
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("span", {
class: normalizeClass(["feather-text-badge", $props.type])
class: normalizeClass(["feather-text-badge", _ctx.type])
}, [

@@ -99,3 +102,3 @@ renderSlot(_ctx.$slots, "default", {}, void 0, true)

}
var FeatherTextBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-42e2cb72"]]);
export { FeatherBadge, FeatherTextBadge, TYPES };
var FeatherTextBadge = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-710cbd86"]]);
export { BadgeTypes, FeatherBadge, FeatherTextBadge };
{
"name": "@featherds/badge",
"version": "0.9.6",
"version": "0.10.0",
"publishConfig": {

@@ -12,3 +12,3 @@ "access": "public"

"dependencies": {
"@featherds/styles": "^0.9.6",
"@featherds/styles": "^0.10.0",
"vue": "^3.1.0-0"

@@ -21,3 +21,3 @@ },

"types": "./src/index.d.ts",
"gitHead": "04a74207e8bfa8d39acc470365e30dd6c90b2e8e"
"gitHead": "9871b17eaedcfc90174b78b21acb0cc06afd594c"
}

@@ -1,12 +0,8 @@

declare module "@featherds/badge" {
import { defineComponent } from "vue";
const FeatherBadge: ReturnType<typeof defineComponent>;
const FeatherTextBadge: ReturnType<typeof defineComponent>;
export { FeatherBadge, FeatherTextBadge };
export enum TYPES {
INFO = "info",
ERROR = "error"
}
}
import { DefineComponent } from "vue";
export const FeatherBadge: DefineComponent<
typeof import("./components/FeatherBadge.vue").props
>;
export const FeatherTextBadge: DefineComponent<
typeof import("./components/FeatherTextBadge.vue").props
>;
export { BadgeTypes, IBadge } from "./types/Types";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc