@topjoao/top-design-system 0.1.0-beta.0 → 0.1.0-beta.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.
- package/README.md +43 -0
- package/dist/TopButton-2hSBDfRU.js +77 -0
- package/dist/TopButton-2hSBDfRU.js.map +1 -0
- package/dist/TopButton-Do46BCHz.cjs +2 -0
- package/dist/TopButton-Do46BCHz.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +5 -77
- package/dist/index.js.map +1 -1
- package/dist/nuxt.cjs +2 -0
- package/dist/nuxt.cjs.map +1 -0
- package/dist/nuxt.d.ts +2 -0
- package/dist/nuxt.js +20 -0
- package/dist/nuxt.js.map +1 -0
- package/dist/plugin.cjs +2 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.js +9 -0
- package/dist/plugin.js.map +1 -0
- package/package.json +18 -1
package/README.md
CHANGED
|
@@ -30,6 +30,49 @@ import '@topjoao/top-design-system/style.css'
|
|
|
30
30
|
Esta versão experimental é publicada no escopo pessoal `@topjoao` com a tag
|
|
31
31
|
`beta`. O nome definitivo da organização será definido posteriormente.
|
|
32
32
|
|
|
33
|
+
## Formas de consumo
|
|
34
|
+
|
|
35
|
+
### Importação direta (Vue ou Nuxt)
|
|
36
|
+
|
|
37
|
+
Importe somente os componentes utilizados:
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import { TopButton } from '@topjoao/top-design-system'
|
|
42
|
+
import '@topjoao/top-design-system/style.css'
|
|
43
|
+
</script>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Componentes globais em Vue 3
|
|
47
|
+
|
|
48
|
+
Registre o plugin na inicialização da aplicação:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { createApp } from 'vue'
|
|
52
|
+
import { TopSolutionsDesignSystem } from '@topjoao/top-design-system/plugin'
|
|
53
|
+
import '@topjoao/top-design-system/style.css'
|
|
54
|
+
import App from './App.vue'
|
|
55
|
+
|
|
56
|
+
createApp(App).use(TopSolutionsDesignSystem).mount('#app')
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Depois disso, `<TopButton>` fica disponível globalmente e sua tipagem é
|
|
60
|
+
reconhecida pela IDE. Esta entrada não depende do Nuxt.
|
|
61
|
+
|
|
62
|
+
### Autoimportação no Nuxt
|
|
63
|
+
|
|
64
|
+
Adicione o módulo ao `nuxt.config.ts`:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
export default defineNuxtConfig({
|
|
68
|
+
modules: ['@topjoao/top-design-system/nuxt'],
|
|
69
|
+
})
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
O módulo registra o `TopButton`, sua tipagem e o CSS da biblioteca. Assim, o
|
|
73
|
+
componente pode ser usado como `<TopButton>` sem importação manual. A integração
|
|
74
|
+
com Nuxt é opcional e não afeta aplicações Vue que utilizam as outras entradas.
|
|
75
|
+
|
|
33
76
|
## TopButton
|
|
34
77
|
|
|
35
78
|
O `TopButton` preserva a API do `CustomButton` do TopSolutions Licitação:
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
label: { default: "" },
|
|
11
|
+
icon: { default: "" },
|
|
12
|
+
loading: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
class: { default: "" },
|
|
17
|
+
outlined: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
secondary: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
unstyled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
type: { default: "button" }
|
|
34
|
+
},
|
|
35
|
+
emits: ["click"],
|
|
36
|
+
setup(i, { emit: g }) {
|
|
37
|
+
let _ = l(), v = e(() => !!_.icon), y = i, b = g, x = e(() => {
|
|
38
|
+
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 ";
|
|
39
|
+
return m(e, y.class);
|
|
40
|
+
});
|
|
41
|
+
return (e, l) => (o(), n("span", h, [d((o(), t(c(f), {
|
|
42
|
+
type: i.type,
|
|
43
|
+
label: i.label,
|
|
44
|
+
disabled: i.disabled || i.loading,
|
|
45
|
+
icon: v.value ? void 0 : i.icon || void 0,
|
|
46
|
+
loading: i.loading,
|
|
47
|
+
outlined: i.outlined || i.secondary,
|
|
48
|
+
severity: i.secondary ? "secondary" : void 0,
|
|
49
|
+
class: a(x.value),
|
|
50
|
+
pt: { root: { class: x.value } },
|
|
51
|
+
onClick: l[0] ||= (e) => b("click")
|
|
52
|
+
}, r({ _: 2 }, [v.value ? {
|
|
53
|
+
name: "icon",
|
|
54
|
+
fn: u(() => [s(e.$slots, "icon")]),
|
|
55
|
+
key: "0"
|
|
56
|
+
} : void 0]), 1032, [
|
|
57
|
+
"type",
|
|
58
|
+
"label",
|
|
59
|
+
"disabled",
|
|
60
|
+
"icon",
|
|
61
|
+
"loading",
|
|
62
|
+
"outlined",
|
|
63
|
+
"severity",
|
|
64
|
+
"class",
|
|
65
|
+
"pt"
|
|
66
|
+
])), [[
|
|
67
|
+
c(p),
|
|
68
|
+
i.tooltip,
|
|
69
|
+
void 0,
|
|
70
|
+
{ top: !0 }
|
|
71
|
+
]])]));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//#endregion
|
|
75
|
+
export { g as t };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=TopButton-2hSBDfRU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopButton-2hSBDfRU.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 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 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=\"tooltip\"\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 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 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=\"tooltip\"\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,GA2BR,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,EAoBO,QApBP,GAoBO,CAnBL,GAAA,EAAA,GAAA,EAkBS,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;;;;;;;;;;;;;;GAfP,EAAA;;GAAL,EAAA,KAAV,GAAuB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
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:``},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),e.tooltip,void 0,{top:!0}]])]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
|
|
2
|
+
//# sourceMappingURL=TopButton-Do46BCHz.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopButton-Do46BCHz.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 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 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=\"tooltip\"\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 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 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=\"tooltip\"\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":"8hCAMA,IAAM,GAAA,EAAQ,EAAA,SAAA,CAAS,EACjB,GAAA,EAAe,EAAA,SAAA,KAAe,EAAQ,EAAM,IAAK,EAEjD,EAAQ,EA2BR,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,CAoBO,OApBP,EAoBO,EAAA,EAnBL,EAAA,eAAA,GAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,YAAA,EAAA,EAkBS,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,oIAfP,EAAA,eAAL,CAAA,IAAV,EAAuB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./TopButton-Do46BCHz.cjs");var t={primary:{50:`#EEF9FF`,100:`#DFF4FF`,200:`#C5E6F8`,300:`#8EC4DF`,400:`#66ACD1`,500:`#2488BC`,600:`#036DA3`,700:`#1B5783`,800:`#02466B`,900:`#052F4A`,950:`#0C192D`},secondary:{50:`#FAFAFA`,100:`#F4F4F5`,200:`#E9E9E9`,300:`#D8D8D8`,400:`#B8B8B8`,500:`#8E8E8E`,600:`#676767`,700:`#4B4B4B`,800:`#343434`,900:`#1C1917`,950:`#0C0A09`},success:{50:`#FAFFFA`,100:`#F4FBF6`,200:`#DFF6DE`,300:`#CBE3CA`,400:`#A3CCA1`,500:`#6BA968`,600:`#358F30`,700:`#2C7B27`,800:`#1E631A`,900:`#10430D`,950:`#062804`},warn:{50:`#FFF7ED`,100:`#FDF3D8`,200:`#FDE9B2`,300:`#FDD566`,400:`#FFB900`,500:`#FFA515`,600:`#FD9024`,700:`#DD781F`,800:`#BC4E00`,900:`#A42D02`,950:`#792202`},danger:{50:`#F8E6E4`,100:`#FFDDD9`,200:`#EEC1BC`,300:`#E3938C`,400:`#E3675C`,500:`#DC3F32`,600:`#CF150E`,700:`#B10404`,800:`#820907`,900:`#5D0803`,950:`#450501`}};exports.TopButton=e.t,exports.colors=t;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/tokens/colors.ts"],"sourcesContent":["export const colors = {\n primary: {\n 50: '#EEF9FF',\n 100: '#DFF4FF',\n 200: '#C5E6F8',\n 300: '#8EC4DF',\n 400: '#66ACD1',\n 500: '#2488BC',\n 600: '#036DA3',\n 700: '#1B5783',\n 800: '#02466B',\n 900: '#052F4A',\n 950: '#0C192D',\n },\n secondary: {\n 50: '#FAFAFA',\n 100: '#F4F4F5',\n 200: '#E9E9E9',\n 300: '#D8D8D8',\n 400: '#B8B8B8',\n 500: '#8E8E8E',\n 600: '#676767',\n 700: '#4B4B4B',\n 800: '#343434',\n 900: '#1C1917',\n 950: '#0C0A09',\n },\n success: {\n 50: '#FAFFFA',\n 100: '#F4FBF6',\n 200: '#DFF6DE',\n 300: '#CBE3CA',\n 400: '#A3CCA1',\n 500: '#6BA968',\n 600: '#358F30',\n 700: '#2C7B27',\n 800: '#1E631A',\n 900: '#10430D',\n 950: '#062804',\n },\n warn: {\n 50: '#FFF7ED',\n 100: '#FDF3D8',\n 200: '#FDE9B2',\n 300: '#FDD566',\n 400: '#FFB900',\n 500: '#FFA515',\n 600: '#FD9024',\n 700: '#DD781F',\n 800: '#BC4E00',\n 900: '#A42D02',\n 950: '#792202',\n },\n danger: {\n 50: '#F8E6E4',\n 100: '#FFDDD9',\n 200: '#EEC1BC',\n 300: '#E3938C',\n 400: '#E3675C',\n 500: '#DC3F32',\n 600: '#CF150E',\n 700: '#B10404',\n 800: '#820907',\n 900: '#5D0803',\n 950: '#450501',\n },\n} as const\n"],"mappings":"+GAAA,IAAa,EAAS,CACpB,QAAS,CACP,GAAI,UACJ,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,SACP,EACA,UAAW,CACT,GAAI,UACJ,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,SACP,EACA,QAAS,CACP,GAAI,UACJ,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,SACP,EACA,KAAM,CACJ,GAAI,UACJ,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,SACP,EACA,OAAQ,CACN,GAAI,UACJ,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,SACP,CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { default as TopButton } from './components/TopButton.vue';
|
|
3
|
-
export { TopButton };
|
|
1
|
+
export { default as TopButton } from './components/TopButton.vue';
|
|
4
2
|
export { colors } from './tokens/colors';
|
|
5
|
-
export declare const TopSolutionsDesignSystem: Plugin;
|
package/dist/index.js
CHANGED
|
@@ -1,76 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
label: { default: "" },
|
|
11
|
-
icon: { default: "" },
|
|
12
|
-
loading: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: !1
|
|
15
|
-
},
|
|
16
|
-
class: { default: "" },
|
|
17
|
-
outlined: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1
|
|
20
|
-
},
|
|
21
|
-
secondary: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
25
|
-
disabled: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !1
|
|
28
|
-
},
|
|
29
|
-
unstyled: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: !1
|
|
32
|
-
},
|
|
33
|
-
type: { default: "button" }
|
|
34
|
-
},
|
|
35
|
-
emits: ["click"],
|
|
36
|
-
setup(i, { emit: g }) {
|
|
37
|
-
let _ = l(), v = e(() => !!_.icon), y = i, b = g, x = e(() => {
|
|
38
|
-
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 ";
|
|
39
|
-
return m(e, y.class);
|
|
40
|
-
});
|
|
41
|
-
return (e, l) => (o(), n("span", h, [d((o(), t(c(f), {
|
|
42
|
-
type: i.type,
|
|
43
|
-
label: i.label,
|
|
44
|
-
disabled: i.disabled || i.loading,
|
|
45
|
-
icon: v.value ? void 0 : i.icon || void 0,
|
|
46
|
-
loading: i.loading,
|
|
47
|
-
outlined: i.outlined || i.secondary,
|
|
48
|
-
severity: i.secondary ? "secondary" : void 0,
|
|
49
|
-
class: a(x.value),
|
|
50
|
-
pt: { root: { class: x.value } },
|
|
51
|
-
onClick: l[0] ||= (e) => b("click")
|
|
52
|
-
}, r({ _: 2 }, [v.value ? {
|
|
53
|
-
name: "icon",
|
|
54
|
-
fn: u(() => [s(e.$slots, "icon")]),
|
|
55
|
-
key: "0"
|
|
56
|
-
} : void 0]), 1032, [
|
|
57
|
-
"type",
|
|
58
|
-
"label",
|
|
59
|
-
"disabled",
|
|
60
|
-
"icon",
|
|
61
|
-
"loading",
|
|
62
|
-
"outlined",
|
|
63
|
-
"severity",
|
|
64
|
-
"class",
|
|
65
|
-
"pt"
|
|
66
|
-
])), [[
|
|
67
|
-
c(p),
|
|
68
|
-
i.tooltip,
|
|
69
|
-
void 0,
|
|
70
|
-
{ top: !0 }
|
|
71
|
-
]])]));
|
|
72
|
-
}
|
|
73
|
-
}), _ = {
|
|
1
|
+
import { t as e } from "./TopButton-2hSBDfRU.js";
|
|
2
|
+
//#region src/tokens/colors.ts
|
|
3
|
+
var t = {
|
|
74
4
|
primary: {
|
|
75
5
|
50: "#EEF9FF",
|
|
76
6
|
100: "#DFF4FF",
|
|
@@ -136,10 +66,8 @@ var h = { class: "h-fit w-fit rounded-[12px] bg-transparent" }, g = /* @__PURE__
|
|
|
136
66
|
900: "#5D0803",
|
|
137
67
|
950: "#450501"
|
|
138
68
|
}
|
|
139
|
-
}
|
|
140
|
-
e.component("TopButton", g);
|
|
141
|
-
} };
|
|
69
|
+
};
|
|
142
70
|
//#endregion
|
|
143
|
-
export {
|
|
71
|
+
export { e as TopButton, t as colors };
|
|
144
72
|
|
|
145
73
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/tokens/colors.ts"],"sourcesContent":["export const colors = {\n primary: {\n 50: '#EEF9FF',\n 100: '#DFF4FF',\n 200: '#C5E6F8',\n 300: '#8EC4DF',\n 400: '#66ACD1',\n 500: '#2488BC',\n 600: '#036DA3',\n 700: '#1B5783',\n 800: '#02466B',\n 900: '#052F4A',\n 950: '#0C192D',\n },\n secondary: {\n 50: '#FAFAFA',\n 100: '#F4F4F5',\n 200: '#E9E9E9',\n 300: '#D8D8D8',\n 400: '#B8B8B8',\n 500: '#8E8E8E',\n 600: '#676767',\n 700: '#4B4B4B',\n 800: '#343434',\n 900: '#1C1917',\n 950: '#0C0A09',\n },\n success: {\n 50: '#FAFFFA',\n 100: '#F4FBF6',\n 200: '#DFF6DE',\n 300: '#CBE3CA',\n 400: '#A3CCA1',\n 500: '#6BA968',\n 600: '#358F30',\n 700: '#2C7B27',\n 800: '#1E631A',\n 900: '#10430D',\n 950: '#062804',\n },\n warn: {\n 50: '#FFF7ED',\n 100: '#FDF3D8',\n 200: '#FDE9B2',\n 300: '#FDD566',\n 400: '#FFB900',\n 500: '#FFA515',\n 600: '#FD9024',\n 700: '#DD781F',\n 800: '#BC4E00',\n 900: '#A42D02',\n 950: '#792202',\n },\n danger: {\n 50: '#F8E6E4',\n 100: '#FFDDD9',\n 200: '#EEC1BC',\n 300: '#E3938C',\n 400: '#E3675C',\n 500: '#DC3F32',\n 600: '#CF150E',\n 700: '#B10404',\n 800: '#820907',\n 900: '#5D0803',\n 950: '#450501',\n },\n} as const\n"],"mappings":";;AAAA,IAAa,IAAS;CACpB,SAAS;EACP,IAAI;EACJ,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CACP;CACA,WAAW;EACT,IAAI;EACJ,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CACP;CACA,SAAS;EACP,IAAI;EACJ,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CACP;CACA,MAAM;EACJ,IAAI;EACJ,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CACP;CACA,QAAQ;EACN,IAAI;EACJ,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CACP;AACF"}
|
package/dist/nuxt.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e=require("@nuxt/kit");var t=`@topjoao/top-design-system`,n=`${t}/style.css`,r=(0,e.defineNuxtModule)({meta:{name:t,configKey:`topDesignSystem`,compatibility:{nuxt:`^3.0.0 || ^4.0.0`}},setup(r,i){i.options.css.some(e=>e===n)||i.options.css.push(n),(0,e.addComponent)({name:`TopButton`,export:`TopButton`,filePath:t})}});module.exports=r;
|
|
2
|
+
//# sourceMappingURL=nuxt.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt.cjs","names":[],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addComponent, defineNuxtModule } from '@nuxt/kit'\n\nconst packageName = '@topjoao/top-design-system'\nconst stylePath = `${packageName}/style.css`\n\nexport default defineNuxtModule({\n meta: {\n name: packageName,\n configKey: 'topDesignSystem',\n compatibility: {\n nuxt: '^3.0.0 || ^4.0.0',\n },\n },\n setup(_options, nuxt) {\n if (!nuxt.options.css.some((style) => style === stylePath)) {\n nuxt.options.css.push(stylePath)\n }\n\n addComponent({\n name: 'TopButton',\n export: 'TopButton',\n filePath: packageName,\n })\n },\n})\n"],"mappings":"2BAEA,IAAM,EAAc,6BACd,EAAY,GAAG,EAAY,YAEjC,GAAA,EAAe,EAAA,iBAAA,CAAiB,CAC9B,KAAM,CACJ,KAAM,EACN,UAAW,kBACX,cAAe,CACb,KAAM,kBACR,CACF,EACA,MAAM,EAAU,EAAM,CACf,EAAK,QAAQ,IAAI,KAAM,GAAU,IAAU,CAAS,GACvD,EAAK,QAAQ,IAAI,KAAK,CAAS,GAGjC,EAAA,EAAA,aAAA,CAAa,CACX,KAAM,YACN,OAAQ,YACR,SAAU,CACZ,CAAC,CACH,CACF,CAAC"}
|
package/dist/nuxt.d.ts
ADDED
package/dist/nuxt.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { addComponent as e, defineNuxtModule as t } from "@nuxt/kit";
|
|
2
|
+
//#region src/nuxt.ts
|
|
3
|
+
var n = "@topjoao/top-design-system", r = `${n}/style.css`, i = t({
|
|
4
|
+
meta: {
|
|
5
|
+
name: n,
|
|
6
|
+
configKey: "topDesignSystem",
|
|
7
|
+
compatibility: { nuxt: "^3.0.0 || ^4.0.0" }
|
|
8
|
+
},
|
|
9
|
+
setup(t, i) {
|
|
10
|
+
i.options.css.some((e) => e === r) || i.options.css.push(r), e({
|
|
11
|
+
name: "TopButton",
|
|
12
|
+
export: "TopButton",
|
|
13
|
+
filePath: n
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { i as default };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=nuxt.js.map
|
package/dist/nuxt.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nuxt.js","names":[],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addComponent, defineNuxtModule } from '@nuxt/kit'\n\nconst packageName = '@topjoao/top-design-system'\nconst stylePath = `${packageName}/style.css`\n\nexport default defineNuxtModule({\n meta: {\n name: packageName,\n configKey: 'topDesignSystem',\n compatibility: {\n nuxt: '^3.0.0 || ^4.0.0',\n },\n },\n setup(_options, nuxt) {\n if (!nuxt.options.css.some((style) => style === stylePath)) {\n nuxt.options.css.push(stylePath)\n }\n\n addComponent({\n name: 'TopButton',\n export: 'TopButton',\n filePath: packageName,\n })\n },\n})\n"],"mappings":";;AAEA,IAAM,IAAc,8BACd,IAAY,GAAG,EAAY,aAEjC,IAAe,EAAiB;CAC9B,MAAM;EACJ,MAAM;EACN,WAAW;EACX,eAAe,EACb,MAAM,mBACR;CACF;CACA,MAAM,GAAU,GAAM;EAKpB,AAJK,EAAK,QAAQ,IAAI,MAAM,MAAU,MAAU,CAAS,KACvD,EAAK,QAAQ,IAAI,KAAK,CAAS,GAGjC,EAAa;GACX,MAAM;GACN,QAAQ;GACR,UAAU;EACZ,CAAC;CACH;AACF,CAAC"}
|
package/dist/plugin.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport TopButton from './components/TopButton.vue'\n\ndeclare module 'vue' {\n export interface GlobalComponents {\n TopButton: typeof TopButton\n }\n}\n\nexport const TopSolutionsDesignSystem: Plugin = {\n install(app: App) {\n app.component('TopButton', TopButton)\n },\n}\n"],"mappings":"+GASA,IAAa,EAAmC,CAC9C,QAAQ,EAAU,CAChB,EAAI,UAAU,YAAa,EAAA,CAAS,CACtC,CACF"}
|
package/dist/plugin.d.ts
ADDED
package/dist/plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport TopButton from './components/TopButton.vue'\n\ndeclare module 'vue' {\n export interface GlobalComponents {\n TopButton: typeof TopButton\n }\n}\n\nexport const TopSolutionsDesignSystem: Plugin = {\n install(app: App) {\n app.component('TopButton', TopButton)\n },\n}\n"],"mappings":";;AASA,IAAa,IAAmC,EAC9C,QAAQ,GAAU;CAChB,EAAI,UAAU,aAAa,CAAS;AACtC,EACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topjoao/top-design-system",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
4
|
"description": "Design system e biblioteca de componentes Vue da TopSolutions",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,15 @@
|
|
|
25
25
|
"import": "./dist/index.js",
|
|
26
26
|
"require": "./dist/index.cjs"
|
|
27
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
|
+
},
|
|
28
37
|
"./style.css": "./dist/style.css"
|
|
29
38
|
},
|
|
30
39
|
"scripts": {
|
|
@@ -37,15 +46,23 @@
|
|
|
37
46
|
"prepack": "npm run check"
|
|
38
47
|
},
|
|
39
48
|
"peerDependencies": {
|
|
49
|
+
"@nuxt/kit": "^3.0.0 || ^4.0.0",
|
|
40
50
|
"@primeuix/themes": "^1.2.0",
|
|
41
51
|
"primeicons": "^7.0.0",
|
|
42
52
|
"primevue": "^4.4.0",
|
|
43
53
|
"vue": "^3.5.0"
|
|
44
54
|
},
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"@nuxt/kit": {
|
|
57
|
+
"optional": true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
45
60
|
"dependencies": {
|
|
46
61
|
"tailwind-merge": "^3.6.0"
|
|
47
62
|
},
|
|
48
63
|
"devDependencies": {
|
|
64
|
+
"@nuxt/kit": "^4.2.1",
|
|
65
|
+
"@nuxt/schema": "^4.2.1",
|
|
49
66
|
"@primeuix/themes": "^1.2.5",
|
|
50
67
|
"@types/node": "^24.13.3",
|
|
51
68
|
"@vitejs/plugin-vue": "^6.0.8",
|