nexaas-ui-components 1.0.18 → 1.0.19
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 +75 -0
- package/dist/index.cjs +377 -170
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +99 -8
- package/dist/index.d.ts +99 -8
- package/dist/index.js +304 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,81 @@ import { Button } from 'oms-ui-components'
|
|
|
81
81
|
/>
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
### ButtonLink
|
|
85
|
+
|
|
86
|
+
Um componente de link estilizado como botão, compatível com qualquer biblioteca de roteamento.
|
|
87
|
+
|
|
88
|
+
#### Props
|
|
89
|
+
|
|
90
|
+
- `label` (string | JSX.Element, required): Texto ou conteúdo do link
|
|
91
|
+
- `href` (string, required): URL de destino
|
|
92
|
+
- `as` (ComponentType, optional): Componente de link customizado (Next.js Link, React Router Link, etc.). Por padrão usa `<a>`
|
|
93
|
+
- `variant` (string, optional): Variante visual (mesmas do Button)
|
|
94
|
+
- `size` (string, optional): Tamanho do link (mesmas do Button)
|
|
95
|
+
- `icon` (JSX.Element, optional): Ícone a ser exibido
|
|
96
|
+
- `hotkey` (string, optional): Atalho de teclado (ex: "Ctrl+S")
|
|
97
|
+
- `hotkeyPosition` (string, optional): Posição do label do hotkey
|
|
98
|
+
- `top`
|
|
99
|
+
- `bottom` (padrão)
|
|
100
|
+
- `left`
|
|
101
|
+
- `right`
|
|
102
|
+
- `disabled` (boolean, optional): Estado desabilitado
|
|
103
|
+
- `target` (string, optional): Atributo target do link
|
|
104
|
+
- Todas as props padrão do HTML `<a>`
|
|
105
|
+
|
|
106
|
+
#### Exemplos
|
|
107
|
+
|
|
108
|
+
**Uso básico (usa `<a>` nativo):**
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { ButtonLink } from 'oms-ui-components'
|
|
112
|
+
|
|
113
|
+
<ButtonLink
|
|
114
|
+
href="/path"
|
|
115
|
+
label="Click"
|
|
116
|
+
variant="primary"
|
|
117
|
+
/>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Com Next.js Link:**
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
import { ButtonLink } from 'oms-ui-components'
|
|
124
|
+
import Link from 'next/link'
|
|
125
|
+
|
|
126
|
+
<ButtonLink
|
|
127
|
+
as={Link}
|
|
128
|
+
href="/dashboard"
|
|
129
|
+
label="Dashboard"
|
|
130
|
+
variant="secondary"
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Com React Router:**
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import { ButtonLink } from 'oms-ui-components'
|
|
138
|
+
import { Link } from 'react-router-dom'
|
|
139
|
+
|
|
140
|
+
<ButtonLink
|
|
141
|
+
as={Link}
|
|
142
|
+
href="/about"
|
|
143
|
+
label="Sobre"
|
|
144
|
+
variant="outline"
|
|
145
|
+
/>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Com hotkey:**
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
<ButtonLink
|
|
152
|
+
href="/save"
|
|
153
|
+
label="Salvar"
|
|
154
|
+
hotkey="Ctrl+S"
|
|
155
|
+
hotkeyPosition="right"
|
|
156
|
+
/>
|
|
157
|
+
```
|
|
158
|
+
|
|
84
159
|
## Desenvolvimento
|
|
85
160
|
|
|
86
161
|
### Pré-requisitos
|