@topjoao/top-design-system 0.1.0-beta.2 → 0.1.0-beta.21
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 +767 -132
- package/dist/TopToast-Dkz2oCA0.cjs +2 -0
- package/dist/TopToast-Dkz2oCA0.cjs.map +1 -0
- package/dist/TopToast-ZB64v4w6.js +2499 -0
- package/dist/TopToast-ZB64v4w6.js.map +1 -0
- package/dist/components/TopButton.vue.d.ts +4 -1
- package/dist/components/TopConfirmDialog.vue.d.ts +47 -0
- package/dist/components/TopDatePicker.vue.d.ts +81 -0
- package/dist/components/TopFileUpload.vue.d.ts +88 -0
- package/dist/components/TopInputText.vue.d.ts +24 -0
- package/dist/components/TopNavBar.vue.d.ts +272 -0
- package/dist/components/TopSelect.vue.d.ts +100 -0
- package/dist/components/TopTabs.vue.d.ts +34 -0
- package/dist/components/TopToast.vue.d.ts +37 -0
- package/dist/components/internal/TopNavMobileTree.vue.d.ts +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +12 -70
- package/dist/index.js.map +1 -1
- package/dist/nuxt.cjs +1 -1
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.js +28 -0
- package/dist/nuxt.js.map +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.ts +16 -0
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/topSolutions.d.ts +7 -0
- package/package.json +91 -84
- package/dist/TopButton-9IIdtUbJ.js +0 -81
- package/dist/TopButton-9IIdtUbJ.js.map +0 -1
- package/dist/TopButton-CDKgguLF.cjs +0 -2
- package/dist/TopButton-CDKgguLF.cjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,84 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@topjoao/top-design-system",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"description": "Design system e biblioteca de componentes Vue da TopSolutions",
|
|
5
|
-
"private": false,
|
|
6
|
-
"type": "module",
|
|
7
|
-
"license": "UNLICENSED",
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public",
|
|
10
|
-
"registry": "https://registry.npmjs.org/",
|
|
11
|
-
"tag": "beta"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"sideEffects": [
|
|
17
|
-
"**/*.css"
|
|
18
|
-
],
|
|
19
|
-
"main": "./dist/index.cjs",
|
|
20
|
-
"module": "./dist/index.js",
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"types": "./dist/index.d.ts",
|
|
25
|
-
"import": "./dist/index.js",
|
|
26
|
-
"require": "./dist/index.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./plugin": {
|
|
29
|
-
"types": "./dist/plugin.d.ts",
|
|
30
|
-
"import": "./dist/plugin.js",
|
|
31
|
-
"require": "./dist/plugin.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./nuxt": {
|
|
34
|
-
"types": "./dist/nuxt.d.ts",
|
|
35
|
-
"import": "./dist/nuxt.js"
|
|
36
|
-
},
|
|
37
|
-
"./style.css": "./dist/style.css"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"dev": "vite build --watch",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"@
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@topjoao/top-design-system",
|
|
3
|
+
"version": "0.1.0-beta.21",
|
|
4
|
+
"description": "Design system e biblioteca de componentes Vue da TopSolutions",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "UNLICENSED",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"registry": "https://registry.npmjs.org/",
|
|
11
|
+
"tag": "beta"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./plugin": {
|
|
29
|
+
"types": "./dist/plugin.d.ts",
|
|
30
|
+
"import": "./dist/plugin.js",
|
|
31
|
+
"require": "./dist/plugin.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./nuxt": {
|
|
34
|
+
"types": "./dist/nuxt.d.ts",
|
|
35
|
+
"import": "./dist/nuxt.js"
|
|
36
|
+
},
|
|
37
|
+
"./style.css": "./dist/style.css"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "vite build --watch",
|
|
41
|
+
"storybook": "storybook dev -p 6006",
|
|
42
|
+
"build-storybook": "storybook build",
|
|
43
|
+
"build": "vue-tsc -b && vite build",
|
|
44
|
+
"typecheck": "vue-tsc -b",
|
|
45
|
+
"test": "vitest run --passWithNoTests",
|
|
46
|
+
"check": "npm run typecheck && npm run test && npm run build",
|
|
47
|
+
"pack:dry": "npm pack --dry-run",
|
|
48
|
+
"prepack": "npm run check"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@nuxt/kit": "^3.0.0 || ^4.0.0",
|
|
52
|
+
"@primeuix/themes": "^1.2.0",
|
|
53
|
+
"primeicons": "^7.0.0",
|
|
54
|
+
"primevue": "^4.4.0",
|
|
55
|
+
"vue": "^3.5.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"@nuxt/kit": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@hugeicons/core-free-icons": "^4.3.0",
|
|
64
|
+
"@hugeicons/vue": "^1.0.8",
|
|
65
|
+
"tailwind-merge": "^3.6.0"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@nuxt/kit": "^4.2.1",
|
|
69
|
+
"@nuxt/schema": "^4.2.1",
|
|
70
|
+
"@primeuix/themes": "^1.2.5",
|
|
71
|
+
"@storybook/addon-a11y": "^10.5.10",
|
|
72
|
+
"@storybook/vue3-vite": "^10.5.10",
|
|
73
|
+
"@types/node": "^24.13.3",
|
|
74
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
75
|
+
"@vue/test-utils": "^2.5.0",
|
|
76
|
+
"@vue/tsconfig": "^0.9.1",
|
|
77
|
+
"autoprefixer": "^10.5.4",
|
|
78
|
+
"jsdom": "^29.1.1",
|
|
79
|
+
"postcss": "^8.5.26",
|
|
80
|
+
"primeicons": "^7.0.0",
|
|
81
|
+
"primevue": "^4.4.1",
|
|
82
|
+
"storybook": "^10.5.10",
|
|
83
|
+
"tailwindcss": "^3.4.18",
|
|
84
|
+
"typescript": "~6.0.2",
|
|
85
|
+
"vite": "^8.2.2",
|
|
86
|
+
"vite-plugin-dts": "^5.0.3",
|
|
87
|
+
"vitest": "^4.1.11",
|
|
88
|
+
"vue": "^3.5.42",
|
|
89
|
+
"vue-tsc": "^3.3.11"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { computed as e, createBlock as t, createElementBlock as n, createSlots as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, unref as c, useSlots as l, withCtx as u, withDirectives as d } from "vue";
|
|
2
|
-
import f from "primevue/button";
|
|
3
|
-
import p from "primevue/tooltip";
|
|
4
|
-
import { twMerge as m } from "tailwind-merge";
|
|
5
|
-
//#region src/components/TopButton.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var h = { class: "h-fit w-fit rounded-[12px] bg-transparent" }, g = /* @__PURE__ */ i({
|
|
7
|
-
__name: "TopButton",
|
|
8
|
-
props: {
|
|
9
|
-
tooltip: { default: "" },
|
|
10
|
-
tooltipClass: { default: "text-xs" },
|
|
11
|
-
label: { default: "" },
|
|
12
|
-
icon: { default: "" },
|
|
13
|
-
loading: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !1
|
|
16
|
-
},
|
|
17
|
-
class: { default: "" },
|
|
18
|
-
outlined: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: !1
|
|
21
|
-
},
|
|
22
|
-
secondary: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !1
|
|
25
|
-
},
|
|
26
|
-
disabled: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: !1
|
|
29
|
-
},
|
|
30
|
-
unstyled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !1
|
|
33
|
-
},
|
|
34
|
-
type: { default: "button" }
|
|
35
|
-
},
|
|
36
|
-
emits: ["click"],
|
|
37
|
-
setup(i, { emit: g }) {
|
|
38
|
-
let _ = l(), v = e(() => !!_.icon), y = i, b = g, x = e(() => {
|
|
39
|
-
let e = y.unstyled ? "" : y.secondary ? "rounded-[10px] border px-2 py-2 font-bold" : y.outlined ? "shrink-0 rounded-[10px] border-primary-800 px-4 py-2 text-primary-800 hover:bg-primary-50" : "rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 ";
|
|
40
|
-
return m(e, y.class);
|
|
41
|
-
});
|
|
42
|
-
return (e, l) => (o(), n("span", h, [d((o(), t(c(f), {
|
|
43
|
-
type: i.type,
|
|
44
|
-
label: i.label,
|
|
45
|
-
disabled: i.disabled || i.loading,
|
|
46
|
-
icon: v.value ? void 0 : i.icon || void 0,
|
|
47
|
-
loading: i.loading,
|
|
48
|
-
outlined: i.outlined || i.secondary,
|
|
49
|
-
severity: i.secondary ? "secondary" : void 0,
|
|
50
|
-
class: a(x.value),
|
|
51
|
-
pt: { root: { class: x.value } },
|
|
52
|
-
onClick: l[0] ||= (e) => b("click")
|
|
53
|
-
}, r({ _: 2 }, [v.value ? {
|
|
54
|
-
name: "icon",
|
|
55
|
-
fn: u(() => [s(e.$slots, "icon")]),
|
|
56
|
-
key: "0"
|
|
57
|
-
} : void 0]), 1032, [
|
|
58
|
-
"type",
|
|
59
|
-
"label",
|
|
60
|
-
"disabled",
|
|
61
|
-
"icon",
|
|
62
|
-
"loading",
|
|
63
|
-
"outlined",
|
|
64
|
-
"severity",
|
|
65
|
-
"class",
|
|
66
|
-
"pt"
|
|
67
|
-
])), [[
|
|
68
|
-
c(p),
|
|
69
|
-
{
|
|
70
|
-
value: i.tooltip,
|
|
71
|
-
class: i.tooltipClass
|
|
72
|
-
},
|
|
73
|
-
void 0,
|
|
74
|
-
{ top: !0 }
|
|
75
|
-
]])]));
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
//#endregion
|
|
79
|
-
export { g as t };
|
|
80
|
-
|
|
81
|
-
//# sourceMappingURL=TopButton-9IIdtUbJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TopButton-9IIdtUbJ.js","names":[],"sources":["../src/components/TopButton.vue","../src/components/TopButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport Button from 'primevue/button'\nimport vTooltip from 'primevue/tooltip'\nimport { twMerge } from 'tailwind-merge'\n\nconst slots = useSlots()\nconst outrosIcones = computed(() => Boolean(slots.icon))\n\nconst props = withDefaults(\n defineProps<{\n tooltip?: string\n tooltipClass?: string\n label?: string\n icon?: string\n loading?: boolean\n class?: string\n outlined?: boolean\n secondary?: boolean\n disabled?: boolean\n unstyled?: boolean\n type?: 'button' | 'submit' | 'reset'\n }>(),\n {\n tooltip: '',\n tooltipClass: 'text-xs',\n label: '',\n icon: '',\n loading: false,\n class: '',\n outlined: false,\n secondary: false,\n disabled: false,\n unstyled: false,\n type: 'button',\n },\n)\n\nconst emit = defineEmits<{\n click: []\n}>()\n\nconst buttonClasses = computed(() => {\n const baseClasses = !props.unstyled\n ? props.secondary\n ? 'rounded-[10px] border px-2 py-2 font-bold'\n : props.outlined\n ? 'shrink-0 rounded-[10px] border-primary-800 px-4 py-2 text-primary-800 hover:bg-primary-50'\n : 'rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 '\n : ''\n\n return twMerge(baseClasses, props.class)\n})\n</script>\n\n<template>\n <span class=\"h-fit w-fit rounded-[12px] bg-transparent\">\n <Button\n v-tooltip.top=\"{\n value: tooltip,\n class: tooltipClass,\n }\"\n :type=\"type\"\n :label=\"label\"\n :disabled=\"disabled || loading\"\n :icon=\"outrosIcones ? undefined : icon || undefined\"\n :loading=\"loading\"\n :outlined=\"outlined || secondary\"\n :severity=\"secondary ? 'secondary' : undefined\"\n :class=\"buttonClasses\"\n :pt=\"{\n root: { class: buttonClasses },\n }\"\n @click=\"emit('click')\"\n >\n <template v-if=\"outrosIcones\" #icon>\n <slot name=\"icon\" />\n </template>\n </Button>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport Button from 'primevue/button'\nimport vTooltip from 'primevue/tooltip'\nimport { twMerge } from 'tailwind-merge'\n\nconst slots = useSlots()\nconst outrosIcones = computed(() => Boolean(slots.icon))\n\nconst props = withDefaults(\n defineProps<{\n tooltip?: string\n tooltipClass?: string\n label?: string\n icon?: string\n loading?: boolean\n class?: string\n outlined?: boolean\n secondary?: boolean\n disabled?: boolean\n unstyled?: boolean\n type?: 'button' | 'submit' | 'reset'\n }>(),\n {\n tooltip: '',\n tooltipClass: 'text-xs',\n label: '',\n icon: '',\n loading: false,\n class: '',\n outlined: false,\n secondary: false,\n disabled: false,\n unstyled: false,\n type: 'button',\n },\n)\n\nconst emit = defineEmits<{\n click: []\n}>()\n\nconst buttonClasses = computed(() => {\n const baseClasses = !props.unstyled\n ? props.secondary\n ? 'rounded-[10px] border px-2 py-2 font-bold'\n : props.outlined\n ? 'shrink-0 rounded-[10px] border-primary-800 px-4 py-2 text-primary-800 hover:bg-primary-50'\n : 'rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 '\n : ''\n\n return twMerge(baseClasses, props.class)\n})\n</script>\n\n<template>\n <span class=\"h-fit w-fit rounded-[12px] bg-transparent\">\n <Button\n v-tooltip.top=\"{\n value: tooltip,\n class: tooltipClass,\n }\"\n :type=\"type\"\n :label=\"label\"\n :disabled=\"disabled || loading\"\n :icon=\"outrosIcones ? undefined : icon || undefined\"\n :loading=\"loading\"\n :outlined=\"outlined || secondary\"\n :severity=\"secondary ? 'secondary' : undefined\"\n :class=\"buttonClasses\"\n :pt=\"{\n root: { class: buttonClasses },\n }\"\n @click=\"emit('click')\"\n >\n <template v-if=\"outrosIcones\" #icon>\n <slot name=\"icon\" />\n </template>\n </Button>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMA,IAAM,IAAQ,EAAS,GACjB,IAAe,QAAe,EAAQ,EAAM,IAAK,GAEjD,IAAQ,GA6BR,IAAO,GAIP,IAAgB,QAAe;GACnC,IAAM,IAAe,EAAM,WAMvB,KALA,EAAM,YACJ,8CACA,EAAM,WACJ,8FACA;GAGR,OAAO,EAAQ,GAAa,EAAM,KAAK;EACzC,CAAC;oBAIC,EAAA,GAAA,EAuBO,QAvBP,GAuBO,CAtBL,GAAA,EAAA,GAAA,EAqBS,EAAA,CAAA,GAAA;GAhBN,MAAM,EAAA;GACN,OAAO,EAAA;GACP,UAAU,EAAA,YAAY,EAAA;GACtB,MAAM,EAAA,QAAe,KAAA,IAAY,EAAA,QAAQ,KAAA;GACzC,SAAS,EAAA;GACT,UAAU,EAAA,YAAY,EAAA;GACtB,UAAU,EAAA,YAAS,cAAiB,KAAA;GACpC,OAAK,EAAE,EAAA,KAAa;GACpB,IAAE,EAA2B,MAAA,EAAA,OAAA,EAAA,MAAa,EAAA;GAG1C,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,OAAA;EAEI,GAAA,EAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EAAA,QAAA;GAAe,MAAA;GAC7B,IAAA,QAAoB,CAApB,EAAoB,EAAA,QAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;IAlBU,OAAA,EAAA;IAAwB,OAAA,EAAA;;;GAA9C,EAAA,KAAV,GAGE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("vue"),l=require("primevue/button");l=s(l,1);let u=require("primevue/tooltip");u=s(u,1);let d=require("tailwind-merge");var f={class:`h-fit w-fit rounded-[12px] bg-transparent`},p=(0,c.defineComponent)({__name:`TopButton`,props:{tooltip:{default:``},tooltipClass:{default:`text-xs`},label:{default:``},icon:{default:``},loading:{type:Boolean,default:!1},class:{default:``},outlined:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},unstyled:{type:Boolean,default:!1},type:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=(0,c.useSlots)(),r=(0,c.computed)(()=>!!n.icon),i=e,a=t,o=(0,c.computed)(()=>{let e=i.unstyled?``:i.secondary?`rounded-[10px] border px-2 py-2 font-bold`:i.outlined?`shrink-0 rounded-[10px] border-primary-800 px-4 py-2 text-primary-800 hover:bg-primary-50`:`rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 `;return(0,d.twMerge)(e,i.class)});return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`span`,f,[(0,c.withDirectives)(((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.default),{type:e.type,label:e.label,disabled:e.disabled||e.loading,icon:r.value?void 0:e.icon||void 0,loading:e.loading,outlined:e.outlined||e.secondary,severity:e.secondary?`secondary`:void 0,class:(0,c.normalizeClass)(o.value),pt:{root:{class:o.value}},onClick:n[0]||=e=>a(`click`)},(0,c.createSlots)({_:2},[r.value?{name:`icon`,fn:(0,c.withCtx)(()=>[(0,c.renderSlot)(t.$slots,`icon`)]),key:`0`}:void 0]),1032,[`type`,`label`,`disabled`,`icon`,`loading`,`outlined`,`severity`,`class`,`pt`])),[[(0,c.unref)(u.default),{value:e.tooltip,class:e.tooltipClass},void 0,{top:!0}]])]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
|
|
2
|
-
//# sourceMappingURL=TopButton-CDKgguLF.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TopButton-CDKgguLF.cjs","names":[],"sources":["../src/components/TopButton.vue","../src/components/TopButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport Button from 'primevue/button'\nimport vTooltip from 'primevue/tooltip'\nimport { twMerge } from 'tailwind-merge'\n\nconst slots = useSlots()\nconst outrosIcones = computed(() => Boolean(slots.icon))\n\nconst props = withDefaults(\n defineProps<{\n tooltip?: string\n tooltipClass?: string\n label?: string\n icon?: string\n loading?: boolean\n class?: string\n outlined?: boolean\n secondary?: boolean\n disabled?: boolean\n unstyled?: boolean\n type?: 'button' | 'submit' | 'reset'\n }>(),\n {\n tooltip: '',\n tooltipClass: 'text-xs',\n label: '',\n icon: '',\n loading: false,\n class: '',\n outlined: false,\n secondary: false,\n disabled: false,\n unstyled: false,\n type: 'button',\n },\n)\n\nconst emit = defineEmits<{\n click: []\n}>()\n\nconst buttonClasses = computed(() => {\n const baseClasses = !props.unstyled\n ? props.secondary\n ? 'rounded-[10px] border px-2 py-2 font-bold'\n : props.outlined\n ? 'shrink-0 rounded-[10px] border-primary-800 px-4 py-2 text-primary-800 hover:bg-primary-50'\n : 'rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 '\n : ''\n\n return twMerge(baseClasses, props.class)\n})\n</script>\n\n<template>\n <span class=\"h-fit w-fit rounded-[12px] bg-transparent\">\n <Button\n v-tooltip.top=\"{\n value: tooltip,\n class: tooltipClass,\n }\"\n :type=\"type\"\n :label=\"label\"\n :disabled=\"disabled || loading\"\n :icon=\"outrosIcones ? undefined : icon || undefined\"\n :loading=\"loading\"\n :outlined=\"outlined || secondary\"\n :severity=\"secondary ? 'secondary' : undefined\"\n :class=\"buttonClasses\"\n :pt=\"{\n root: { class: buttonClasses },\n }\"\n @click=\"emit('click')\"\n >\n <template v-if=\"outrosIcones\" #icon>\n <slot name=\"icon\" />\n </template>\n </Button>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport Button from 'primevue/button'\nimport vTooltip from 'primevue/tooltip'\nimport { twMerge } from 'tailwind-merge'\n\nconst slots = useSlots()\nconst outrosIcones = computed(() => Boolean(slots.icon))\n\nconst props = withDefaults(\n defineProps<{\n tooltip?: string\n tooltipClass?: string\n label?: string\n icon?: string\n loading?: boolean\n class?: string\n outlined?: boolean\n secondary?: boolean\n disabled?: boolean\n unstyled?: boolean\n type?: 'button' | 'submit' | 'reset'\n }>(),\n {\n tooltip: '',\n tooltipClass: 'text-xs',\n label: '',\n icon: '',\n loading: false,\n class: '',\n outlined: false,\n secondary: false,\n disabled: false,\n unstyled: false,\n type: 'button',\n },\n)\n\nconst emit = defineEmits<{\n click: []\n}>()\n\nconst buttonClasses = computed(() => {\n const baseClasses = !props.unstyled\n ? props.secondary\n ? 'rounded-[10px] border px-2 py-2 font-bold'\n : props.outlined\n ? 'shrink-0 rounded-[10px] border-primary-800 px-4 py-2 text-primary-800 hover:bg-primary-50'\n : 'rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 '\n : ''\n\n return twMerge(baseClasses, props.class)\n})\n</script>\n\n<template>\n <span class=\"h-fit w-fit rounded-[12px] bg-transparent\">\n <Button\n v-tooltip.top=\"{\n value: tooltip,\n class: tooltipClass,\n }\"\n :type=\"type\"\n :label=\"label\"\n :disabled=\"disabled || loading\"\n :icon=\"outrosIcones ? undefined : icon || undefined\"\n :loading=\"loading\"\n :outlined=\"outlined || secondary\"\n :severity=\"secondary ? 'secondary' : undefined\"\n :class=\"buttonClasses\"\n :pt=\"{\n root: { class: buttonClasses },\n }\"\n @click=\"emit('click')\"\n >\n <template v-if=\"outrosIcones\" #icon>\n <slot name=\"icon\" />\n </template>\n </Button>\n </span>\n</template>\n"],"mappings":"+jCAMA,IAAM,GAAA,EAAQ,EAAA,SAAA,CAAS,EACjB,GAAA,EAAe,EAAA,SAAA,KAAe,EAAQ,EAAM,IAAK,EAEjD,EAAQ,EA6BR,EAAO,EAIP,GAAA,EAAgB,EAAA,SAAA,KAAe,CACnC,IAAM,EAAe,EAAM,SAMvB,GALA,EAAM,UACJ,4CACA,EAAM,SACJ,4FACA,mIAGR,OAAA,EAAO,EAAA,QAAA,CAAQ,EAAa,EAAM,KAAK,CACzC,CAAC,iBAIC,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAuBO,OAvBP,EAuBO,EAAA,EAtBL,EAAA,eAAA,GAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,YAAA,EAAA,EAqBS,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAhBN,KAAM,EAAA,KACN,MAAO,EAAA,MACP,SAAU,EAAA,UAAY,EAAA,QACtB,KAAM,EAAA,MAAe,IAAA,GAAY,EAAA,MAAQ,IAAA,GACzC,QAAS,EAAA,QACT,SAAU,EAAA,UAAY,EAAA,UACtB,SAAU,EAAA,UAAS,YAAiB,IAAA,GACpC,OAAA,EAAK,EAAA,eAAA,CAAE,EAAA,KAAa,EACpB,GAAE,CAA2B,KAAA,CAAA,MAAA,EAAA,KAAa,CAAA,EAG1C,QAAK,AAAA,EAAA,KAAA,GAAE,EAAI,OAAA,CAEI,GAAA,EAAA,EAAA,YAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,CAAe,KAAA,OAC7B,IAAA,EAAA,EAAA,QAAA,KAAoB,EAAA,EAApB,EAAA,WAAA,CAAoB,EAAA,OAAA,MAAA,CAAA,CAAA,qIAlBU,MAAA,EAAA,QAAwB,MAAA,EAAA,qBAA9C,CAAA,IAAV,EAGE"}
|