nemesischart 0.1.0 → 0.1.2
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.
- package/README.md +59 -3
- package/dist/nemesischart.es.js +28 -24
- package/dist/nemesischart.umd.js +1 -1
- package/package.json +5 -7
- package/types/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nemesischart
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Uma biblioteca de componentes Vue 3 para construção de dashboards. Desenvolvida com PrimeFlex e PrimeIcons.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Instalação
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install nemesischart
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Requisitos
|
|
12
|
+
|
|
13
|
+
O nemesischart depende das seguintes peer dependencies instaladas no seu projeto:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install primeflex primeicons
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Como usar
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { createApp } from 'vue'
|
|
23
|
+
import 'primeflex/primeflex.css'
|
|
24
|
+
import 'primeicons/primeicons.css'
|
|
25
|
+
import NemesisChart from 'nemesischart'
|
|
26
|
+
|
|
27
|
+
const app = createApp(App)
|
|
28
|
+
|
|
29
|
+
app.use(NemesisChart)
|
|
30
|
+
|
|
31
|
+
app.mount('#app')
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<Cards
|
|
36
|
+
titulo="Receita Total"
|
|
37
|
+
valor="R$ 48.200"
|
|
38
|
+
descricao="+12% este mês"
|
|
39
|
+
cor="light"
|
|
40
|
+
:botao_todos="true"
|
|
41
|
+
@click="handleClick"
|
|
42
|
+
/>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Componentes
|
|
46
|
+
|
|
47
|
+
### Cards
|
|
48
|
+
|
|
49
|
+
| Prop | Tipo | Padrão | Descrição |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| `titulo` | `String` | `'Card Title'` | Título do card |
|
|
52
|
+
| `valor` | `String` | `'0'` | Valor principal exibido |
|
|
53
|
+
| `descricao` | `String` | `'This is a card component...'` | Texto descritivo abaixo do valor |
|
|
54
|
+
| `cor` | `String` | `'light'` | Tema do card: `light`, `dark` ou `transparent` |
|
|
55
|
+
| `botao_todos` | `Boolean` | `false` | Exibe botão "Ver Todos" |
|
|
56
|
+
|
|
57
|
+
**Evento:** `@click` — emitido ao clicar no botão "Ver Todos"
|
|
58
|
+
|
|
59
|
+
## Licença
|
|
60
|
+
|
|
61
|
+
MIT
|
package/dist/nemesischart.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
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
|
-
},
|
|
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
|
-
|
|
31
|
-
|
|
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
|
-
}[
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
43
|
-
class:
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
class:
|
|
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
|
-
|
|
53
|
+
o("p", h, l(t.descricao), 1)
|
|
51
54
|
]),
|
|
52
|
-
t.botao_todos ? (
|
|
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:
|
|
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"])) :
|
|
68
|
+
}, null, 8, ["class"])) : x("", !0)
|
|
65
69
|
], 2);
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
|
-
},
|
|
72
|
+
}, C = {
|
|
69
73
|
install(t) {
|
|
70
|
-
t.component("NemesisCards",
|
|
74
|
+
t.component("NemesisCards", k);
|
|
71
75
|
}
|
|
72
76
|
};
|
|
73
77
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
k as Cards,
|
|
79
|
+
C as default
|
|
76
80
|
};
|
package/dist/nemesischart.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
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.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Vue 3 component library for dashboard cards and charts.",
|
|
6
6
|
"keywords": [
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"vue3",
|
|
9
9
|
"component-library",
|
|
10
10
|
"charts",
|
|
11
|
-
"
|
|
11
|
+
"primeflex",
|
|
12
|
+
"primeicons"
|
|
12
13
|
],
|
|
13
14
|
"license": "MIT",
|
|
14
15
|
"files": [
|
|
@@ -31,23 +32,20 @@
|
|
|
31
32
|
"preview": "vite preview"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
|
-
"@primevue/themes": ">=4.0.0",
|
|
35
35
|
"primeflex": ">=3.0.0",
|
|
36
36
|
"primeicons": ">=6.0.0",
|
|
37
|
-
"primevue": ">=4.0.0",
|
|
38
37
|
"vue": ">=3.3.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@primevue/themes": "^4.5.4",
|
|
42
40
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
43
41
|
"@vue/devtools-api": "^8.0.6",
|
|
44
42
|
"chart.js": "^4.5.1",
|
|
45
43
|
"cross-env": "^10.1.0",
|
|
46
44
|
"primeflex": "^4.0.0",
|
|
47
45
|
"primeicons": "^7.0.0",
|
|
48
|
-
"primevue": "^4.5.4",
|
|
49
46
|
"vite": "^7.3.1",
|
|
50
47
|
"vite-plugin-vue-devtools": "^8.0.6",
|
|
51
|
-
"vue": "^3.5.25"
|
|
48
|
+
"vue": "^3.5.25",
|
|
49
|
+
"vue-router": "^4.6.4"
|
|
52
50
|
}
|
|
53
51
|
}
|
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 }
|