build
This commit is contained in:
parent
1e3c4026e8
commit
8c5a31ef30
5 changed files with 185 additions and 59 deletions
75
README.md
75
README.md
|
|
@ -35,21 +35,26 @@ src/
|
|||
EliBotao.vue
|
||||
index.ts
|
||||
README.md
|
||||
campo/
|
||||
EliInput.vue
|
||||
cartao/
|
||||
EliCartao.vue
|
||||
index.ts
|
||||
README.md
|
||||
indicador/
|
||||
EliBadge.vue
|
||||
index.ts
|
||||
README.md
|
||||
data_hora/
|
||||
EliDataHora.vue
|
||||
EliEntrada/
|
||||
EliEntradaTexto.vue
|
||||
EliEntradaNumero.vue
|
||||
EliEntradaDataHora.vue
|
||||
index.ts
|
||||
README.md
|
||||
EliTabela/
|
||||
EliTabela.vue
|
||||
index.ts
|
||||
README.md
|
||||
tipos/
|
||||
botao.ts
|
||||
campo.ts
|
||||
indicador.ts
|
||||
index.ts
|
||||
playground/
|
||||
|
|
@ -60,7 +65,7 @@ src/
|
|||
|
||||
### Convenções (nomenclatura)
|
||||
|
||||
- Componentes usam **prefixo `Eli`** (ex.: `EliBotao`, `EliInput`).
|
||||
- Componentes usam **prefixo `Eli`** (ex.: `EliBotao`, `EliEntradaTexto`).
|
||||
- Pastas preferem **português** (ex.: `src/componentes/botao`, `src/componentes/campo`).
|
||||
- Tipos compartilhados ficam em `src/tipos/`.
|
||||
- Sem TSX; padrão SFC: `<template>` + `<script lang="ts">` + `defineComponent`.
|
||||
|
|
@ -128,7 +133,15 @@ createApp(App)
|
|||
### 2) Importação direta de componentes
|
||||
|
||||
```ts
|
||||
import { EliBotao, EliInput, EliBadge, EliDataHora } from "eli-vue";
|
||||
import {
|
||||
EliBotao,
|
||||
EliBadge,
|
||||
EliCartao,
|
||||
EliTabela,
|
||||
EliEntradaTexto,
|
||||
EliEntradaNumero,
|
||||
EliEntradaDataHora,
|
||||
} from "eli-vue";
|
||||
```
|
||||
|
||||
## Exemplos rápidos de uso
|
||||
|
|
@ -141,11 +154,14 @@ import { EliBotao, EliInput, EliBadge, EliDataHora } from "eli-vue";
|
|||
</template>
|
||||
```
|
||||
|
||||
### EliInput (v-model)
|
||||
### Entradas (EliEntrada*) com v-model
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<EliInput v-model="nome" label="Nome" placeholder="Digite seu nome" />
|
||||
<EliEntradaTexto
|
||||
v-model:value="nome"
|
||||
:opcoes="{ rotulo: 'Nome', placeholder: 'Digite seu nome' }"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
@ -153,20 +169,21 @@ import { defineComponent, ref } from "vue";
|
|||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const nome = ref("");
|
||||
const nome = ref<string | null>("");
|
||||
return { nome };
|
||||
},
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
### EliInput (porcentagem)
|
||||
|
||||
Use `type="porcentagem"` quando precisar de um campo numérico com sufixo `%` embutido.
|
||||
### EliEntradaNumero (exemplo)
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<EliInput v-model="taxa" type="porcentagem" label="Taxa" placeholder="0,00" />
|
||||
<EliEntradaNumero
|
||||
v-model:value="taxa"
|
||||
:opcoes="{ rotulo: 'Taxa', placeholder: '0,00' }"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
@ -174,7 +191,7 @@ import { defineComponent, ref } from "vue";
|
|||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const taxa = ref("");
|
||||
const taxa = ref<number | null>(null);
|
||||
return { taxa };
|
||||
},
|
||||
});
|
||||
|
|
@ -191,7 +208,7 @@ export default defineComponent({
|
|||
</template>
|
||||
```
|
||||
|
||||
### EliDataHora
|
||||
### EliEntradaDataHora
|
||||
|
||||
> Entrada/saída sempre em **ISO 8601**.
|
||||
> - Aceita UTC absoluto (`Z`) ou com offset.
|
||||
|
|
@ -199,16 +216,19 @@ export default defineComponent({
|
|||
|
||||
```vue
|
||||
<template>
|
||||
<EliDataHora v-model="agendamento" rotulo="Agendamento" />
|
||||
<EliDataHora v-model="nascimento" modo="data" rotulo="Nascimento" />
|
||||
<EliEntradaDataHora v-model:value="agendamento" :opcoes="{ rotulo: 'Agendamento' }" />
|
||||
<EliEntradaDataHora
|
||||
v-model:value="nascimento"
|
||||
:opcoes="{ rotulo: 'Nascimento', modo: 'data' }"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { EliDataHora } from "eli-vue";
|
||||
import { EliEntradaDataHora } from "eli-vue";
|
||||
|
||||
export default defineComponent({
|
||||
components: { EliDataHora },
|
||||
components: { EliEntradaDataHora },
|
||||
setup() {
|
||||
const agendamento = ref<string | null>("2026-01-09T16:15:00Z");
|
||||
const nascimento = ref<string | null>("2026-01-09T00:00:00-03:00");
|
||||
|
|
@ -253,11 +273,9 @@ Exemplo: um **pipeline** em colunas (estilo Trello/Kanban) com cards de oportuni
|
|||
<v-container class="py-6">
|
||||
<div class="toolbar">
|
||||
<h2 class="text-h6">Pipeline de Oportunidades</h2>
|
||||
<EliInput
|
||||
v-model="filtro"
|
||||
label="Buscar"
|
||||
placeholder="Cliente, proposta, valor..."
|
||||
density="compact"
|
||||
<EliEntradaTexto
|
||||
v-model:value="filtro"
|
||||
:opcoes="{ rotulo: 'Buscar', placeholder: 'Cliente, proposta, valor...' }"
|
||||
/>
|
||||
<EliBotao @click="criarOportunidade">Nova oportunidade</EliBotao>
|
||||
</div>
|
||||
|
|
@ -313,7 +331,7 @@ Exemplo: um **pipeline** em colunas (estilo Trello/Kanban) com cards de oportuni
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { EliBadge, EliBotao, EliInput } from "eli-vue";
|
||||
import { EliBadge, EliBotao, EliEntradaTexto } from "eli-vue";
|
||||
|
||||
type Oportunidade = {
|
||||
id: string;
|
||||
|
|
@ -332,7 +350,7 @@ type Coluna = {
|
|||
|
||||
export default defineComponent({
|
||||
name: "PipelineExemplo",
|
||||
components: { EliBadge, EliBotao, EliInput },
|
||||
components: { EliBadge, EliBotao, EliEntradaTexto },
|
||||
setup() {
|
||||
const filtro = ref("");
|
||||
|
||||
|
|
@ -467,6 +485,9 @@ pnpm run build
|
|||
|
||||
Gera `dist/` (artefatos de build) e `dist/types` (declarações `.d.ts`).
|
||||
|
||||
> Observação importante: este repositório roda `npm version patch --no-git-tag-version` no `prebuild`.
|
||||
> Ou seja, ao rodar `pnpm run build` a versão do `package.json` é incrementada automaticamente.
|
||||
|
||||
## Guia rápido para IAs (antes de codar)
|
||||
|
||||
1) **Leia** `.agent` e este README.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue