nemesischart 0.1.0 → 0.1.1

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.
@@ -1,8 +1,8 @@
1
- import { resolveComponent as i, openBlock as r, createElementBlock as c, normalizeClass as o, unref as a, createElementVNode as n, toDisplayString as l, createBlock as d, createCommentVNode as m } from "vue";
2
- const p = {
1
+ import { computed as g, resolveComponent as p, openBlock as n, createElementBlock as u, normalizeClass as a, createElementVNode as o, toDisplayString as l, createBlock as b, createCommentVNode as x } from "vue";
2
+ const h = {
3
3
  class: "m-0 text-sm min-w-max",
4
4
  style: { color: "#7B7B7B" }
5
- }, g = {
5
+ }, k = {
6
6
  __name: "Cards",
7
7
  props: {
8
8
  cor: {
@@ -27,50 +27,54 @@ const p = {
27
27
  default: !1
28
28
  }
29
29
  },
30
- setup(t) {
31
- const e = {
30
+ emits: ["click"],
31
+ setup(t, { emit: r }) {
32
+ const s = t, i = {
32
33
  light: "bg-white",
33
34
  dark: "bg-black",
34
- transparent: ""
35
- }[t.cor] ?? "bg-white";
36
- return (x, h) => {
37
- const s = i("Button");
38
- return r(), c("div", {
39
- class: o([a(e), "border-1 surface-border border-round-xl flex flex-column w-full transition-linear transition-all transition-duration-200 select-none", a(e) === "bg-black" ? "hover:bg-black-alpha-90" : "hover:bg-white-alpha-70"]),
35
+ transparent: "bg-transparent"
36
+ }, c = r, e = g(() => i[s.cor] ?? "bg-white"), d = () => {
37
+ c("click");
38
+ };
39
+ return (f, y) => {
40
+ const m = p("Button");
41
+ return n(), u("div", {
42
+ class: a([e.value, "border-1 surface-border border-round-xl flex flex-column w-full transition-linear transition-all transition-duration-200 select-none", e.value === "bg-black" ? "hover:bg-black-alpha-90" : "hover:bg-white-alpha-70"]),
40
43
  style: { padding: "1.25rem", gap: "1.438rem" }
41
44
  }, [
42
- n("p", {
43
- class: o(["m-0 text-xs font-medium", a(e) === "bg-black" ? "text-white" : "text-gray-900"])
45
+ o("p", {
46
+ class: a(["m-0 text-xs font-medium", e.value === "bg-black" ? "text-white" : "text-gray-900"])
44
47
  }, l(t.titulo), 3),
45
- n("div", null, [
46
- n("h2", {
47
- class: o(["m-0 text-3xl font-semibold", a(e) === "bg-black" ? "text-white" : "text-gray-900"]),
48
+ o("div", null, [
49
+ o("h2", {
50
+ class: a(["m-0 text-3xl font-semibold", e.value === "bg-black" ? "text-white" : "text-gray-900"]),
48
51
  style: { "line-height": "36px", "letter-spacing": "-1px" }
49
52
  }, l(t.valor), 3),
50
- n("p", p, l(t.descricao), 1)
53
+ o("p", h, l(t.descricao), 1)
51
54
  ]),
52
- t.botao_todos ? (r(), d(s, {
55
+ t.botao_todos ? (n(), b(m, {
53
56
  key: 0,
54
57
  text: "",
55
58
  label: "Ver Todos",
59
+ onClick: d,
56
60
  icon: "pi pi-angle-right text-xs",
57
61
  iconPos: "right",
58
62
  severity: "contrast",
59
- class: o(["text-xs p-0 w-max", a(e) === "bg-black" ? "text-white" : "text-gray-900"]),
63
+ class: a(["text-xs p-0 w-max", e.value === "bg-black" ? "text-white" : "text-gray-900"]),
60
64
  pt: {
61
65
  root: { style: "background: transparent !important; box-shadow: none !important; gap:0.3rem" },
62
66
  label: { class: "font-medium" }
63
67
  }
64
- }, null, 8, ["class"])) : m("", !0)
68
+ }, null, 8, ["class"])) : x("", !0)
65
69
  ], 2);
66
70
  };
67
71
  }
68
- }, y = {
72
+ }, C = {
69
73
  install(t) {
70
- t.component("NemesisCards", g);
74
+ t.component("NemesisCards", k);
71
75
  }
72
76
  };
73
77
  export {
74
- g as Cards,
75
- y as default
78
+ k as Cards,
79
+ C as default
76
80
  };
@@ -1 +1 @@
1
- (function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.NemesisChart={},n.Vue))})(this,(function(n,t){"use strict";const l={class:"m-0 text-sm min-w-max",style:{color:"#7B7B7B"}},o={__name:"Cards",props:{cor:{type:String,default:"light",validator:e=>["light","dark","transparent"].includes(e)},titulo:{type:String,default:"Card Title"},valor:{type:String,default:"0"},descricao:{type:String,default:"This is a card component. You can add any content here."},botao_todos:{type:Boolean,default:!1}},setup(e){const a={light:"bg-white",dark:"bg-black",transparent:""}[e.cor]??"bg-white";return(d,m)=>{const s=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(a),"border-1 surface-border border-round-xl flex flex-column w-full transition-linear transition-all transition-duration-200 select-none",t.unref(a)==="bg-black"?"hover:bg-black-alpha-90":"hover:bg-white-alpha-70"]),style:{padding:"1.25rem",gap:"1.438rem"}},[t.createElementVNode("p",{class:t.normalizeClass(["m-0 text-xs font-medium",t.unref(a)==="bg-black"?"text-white":"text-gray-900"])},t.toDisplayString(e.titulo),3),t.createElementVNode("div",null,[t.createElementVNode("h2",{class:t.normalizeClass(["m-0 text-3xl font-semibold",t.unref(a)==="bg-black"?"text-white":"text-gray-900"]),style:{"line-height":"36px","letter-spacing":"-1px"}},t.toDisplayString(e.valor),3),t.createElementVNode("p",l,t.toDisplayString(e.descricao),1)]),e.botao_todos?(t.openBlock(),t.createBlock(s,{key:0,text:"",label:"Ver Todos",icon:"pi pi-angle-right text-xs",iconPos:"right",severity:"contrast",class:t.normalizeClass(["text-xs p-0 w-max",t.unref(a)==="bg-black"?"text-white":"text-gray-900"]),pt:{root:{style:"background: transparent !important; box-shadow: none !important; gap:0.3rem"},label:{class:"font-medium"}}},null,8,["class"])):t.createCommentVNode("",!0)],2)}}},r={install(e){e.component("NemesisCards",o)}};n.Cards=o,n.default=r,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(a,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(a=typeof globalThis<"u"?globalThis:a||self,t(a.NemesisChart={},a.Vue))})(this,(function(a,t){"use strict";const l={class:"m-0 text-sm min-w-max",style:{color:"#7B7B7B"}},n={__name:"Cards",props:{cor:{type:String,default:"light",validator:e=>["light","dark","transparent"].includes(e)},titulo:{type:String,default:"Card Title"},valor:{type:String,default:"0"},descricao:{type:String,default:"This is a card component. You can add any content here."},botao_todos:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:i}){const r=e,c={light:"bg-white",dark:"bg-black",transparent:"bg-transparent"},d=i,o=t.computed(()=>c[r.cor]??"bg-white"),m=()=>{d("click")};return(g,u)=>{const p=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([o.value,"border-1 surface-border border-round-xl flex flex-column w-full transition-linear transition-all transition-duration-200 select-none",o.value==="bg-black"?"hover:bg-black-alpha-90":"hover:bg-white-alpha-70"]),style:{padding:"1.25rem",gap:"1.438rem"}},[t.createElementVNode("p",{class:t.normalizeClass(["m-0 text-xs font-medium",o.value==="bg-black"?"text-white":"text-gray-900"])},t.toDisplayString(e.titulo),3),t.createElementVNode("div",null,[t.createElementVNode("h2",{class:t.normalizeClass(["m-0 text-3xl font-semibold",o.value==="bg-black"?"text-white":"text-gray-900"]),style:{"line-height":"36px","letter-spacing":"-1px"}},t.toDisplayString(e.valor),3),t.createElementVNode("p",l,t.toDisplayString(e.descricao),1)]),e.botao_todos?(t.openBlock(),t.createBlock(p,{key:0,text:"",label:"Ver Todos",onClick:m,icon:"pi pi-angle-right text-xs",iconPos:"right",severity:"contrast",class:t.normalizeClass(["text-xs p-0 w-max",o.value==="bg-black"?"text-white":"text-gray-900"]),pt:{root:{style:"background: transparent !important; box-shadow: none !important; gap:0.3rem"},label:{class:"font-medium"}}},null,8,["class"])):t.createCommentVNode("",!0)],2)}}},s={install(e){e.component("NemesisCards",n)}};a.Cards=n,a.default=s,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nemesischart",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "A Vue 3 component library for dashboard cards and charts.",
6
6
  "keywords": [
@@ -48,6 +48,7 @@
48
48
  "primevue": "^4.5.4",
49
49
  "vite": "^7.3.1",
50
50
  "vite-plugin-vue-devtools": "^8.0.6",
51
- "vue": "^3.5.25"
51
+ "vue": "^3.5.25",
52
+ "vue-router": "^4.6.4"
52
53
  }
53
54
  }
package/types/index.d.ts CHANGED
@@ -33,7 +33,7 @@ export interface CardsProps {
33
33
  botao_todos?: boolean
34
34
  }
35
35
 
36
- declare const Cards: DefineComponent<CardsProps>
36
+ declare const Cards: DefineComponent<CardsProps, {}, {}, {}, {}, {}, {}, { click: () => void }>
37
37
  declare const NemesisChart: Plugin
38
38
 
39
39
  export { Cards }