nemesischart 0.1.0

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 ADDED
@@ -0,0 +1,5 @@
1
+ # Vue 3 + Vite
2
+
3
+ This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
@@ -0,0 +1,76 @@
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 = {
3
+ class: "m-0 text-sm min-w-max",
4
+ style: { color: "#7B7B7B" }
5
+ }, g = {
6
+ __name: "Cards",
7
+ props: {
8
+ cor: {
9
+ type: String,
10
+ default: "light",
11
+ validator: (t) => ["light", "dark", "transparent"].includes(t)
12
+ },
13
+ titulo: {
14
+ type: String,
15
+ default: "Card Title"
16
+ },
17
+ valor: {
18
+ type: String,
19
+ default: "0"
20
+ },
21
+ descricao: {
22
+ type: String,
23
+ default: "This is a card component. You can add any content here."
24
+ },
25
+ botao_todos: {
26
+ type: Boolean,
27
+ default: !1
28
+ }
29
+ },
30
+ setup(t) {
31
+ const e = {
32
+ light: "bg-white",
33
+ 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"]),
40
+ style: { padding: "1.25rem", gap: "1.438rem" }
41
+ }, [
42
+ n("p", {
43
+ class: o(["m-0 text-xs font-medium", a(e) === "bg-black" ? "text-white" : "text-gray-900"])
44
+ }, 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
+ style: { "line-height": "36px", "letter-spacing": "-1px" }
49
+ }, l(t.valor), 3),
50
+ n("p", p, l(t.descricao), 1)
51
+ ]),
52
+ t.botao_todos ? (r(), d(s, {
53
+ key: 0,
54
+ text: "",
55
+ label: "Ver Todos",
56
+ icon: "pi pi-angle-right text-xs",
57
+ iconPos: "right",
58
+ severity: "contrast",
59
+ class: o(["text-xs p-0 w-max", a(e) === "bg-black" ? "text-white" : "text-gray-900"]),
60
+ pt: {
61
+ root: { style: "background: transparent !important; box-shadow: none !important; gap:0.3rem" },
62
+ label: { class: "font-medium" }
63
+ }
64
+ }, null, 8, ["class"])) : m("", !0)
65
+ ], 2);
66
+ };
67
+ }
68
+ }, y = {
69
+ install(t) {
70
+ t.component("NemesisCards", g);
71
+ }
72
+ };
73
+ export {
74
+ g as Cards,
75
+ y as default
76
+ };
@@ -0,0 +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"}})}));
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "nemesischart",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "A Vue 3 component library for dashboard cards and charts.",
6
+ "keywords": [
7
+ "vue",
8
+ "vue3",
9
+ "component-library",
10
+ "charts",
11
+ "primevue"
12
+ ],
13
+ "license": "MIT",
14
+ "files": [
15
+ "dist",
16
+ "types"
17
+ ],
18
+ "main": "./dist/nemesischart.umd.js",
19
+ "module": "./dist/nemesischart.es.js",
20
+ "exports": {
21
+ ".": {
22
+ "import": "./dist/nemesischart.es.js",
23
+ "require": "./dist/nemesischart.umd.js"
24
+ }
25
+ },
26
+ "types": "./types/index.d.ts",
27
+ "scripts": {
28
+ "dev": "vite",
29
+ "build": "vite build",
30
+ "build:lib": "cross-env BUILD_TARGET=lib vite build",
31
+ "preview": "vite preview"
32
+ },
33
+ "peerDependencies": {
34
+ "@primevue/themes": ">=4.0.0",
35
+ "primeflex": ">=3.0.0",
36
+ "primeicons": ">=6.0.0",
37
+ "primevue": ">=4.0.0",
38
+ "vue": ">=3.3.0"
39
+ },
40
+ "devDependencies": {
41
+ "@primevue/themes": "^4.5.4",
42
+ "@vitejs/plugin-vue": "^6.0.2",
43
+ "@vue/devtools-api": "^8.0.6",
44
+ "chart.js": "^4.5.1",
45
+ "cross-env": "^10.1.0",
46
+ "primeflex": "^4.0.0",
47
+ "primeicons": "^7.0.0",
48
+ "primevue": "^4.5.4",
49
+ "vite": "^7.3.1",
50
+ "vite-plugin-vue-devtools": "^8.0.6",
51
+ "vue": "^3.5.25"
52
+ }
53
+ }
@@ -0,0 +1,40 @@
1
+ import type { DefineComponent, Plugin } from 'vue'
2
+
3
+ export interface CardsProps {
4
+ /**
5
+ * Background color theme of the card.
6
+ * @default 'light'
7
+ */
8
+ cor?: 'light' | 'dark' | 'transparent'
9
+
10
+ /**
11
+ * Title text displayed at the top of the card.
12
+ * @default 'Card Title'
13
+ */
14
+ titulo?: string
15
+
16
+ /**
17
+ * Primary value displayed in the card body.
18
+ * @default '0'
19
+ */
20
+ valor?: string
21
+
22
+ /**
23
+ * Description text shown below the value.
24
+ * @default 'This is a card component. You can add any content here.'
25
+ */
26
+ descricao?: string
27
+
28
+ /**
29
+ * When true, renders a "Ver Todos" button at the bottom.
30
+ * Requires PrimeVue Button component to be registered globally.
31
+ * @default false
32
+ */
33
+ botao_todos?: boolean
34
+ }
35
+
36
+ declare const Cards: DefineComponent<CardsProps>
37
+ declare const NemesisChart: Plugin
38
+
39
+ export { Cards }
40
+ export default NemesisChart