@doscientos/ui 0.1.28 → 0.1.30
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 +17 -8
- package/dist/index.cjs +1863 -1071
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +359 -278
- package/dist/index.d.ts +359 -278
- package/dist/index.js +1747 -970
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +23 -14
package/README.md
CHANGED
|
@@ -22,15 +22,21 @@ encapsulado para que las APIs, tokens y accesibilidad sean consistentes.
|
|
|
22
22
|
Instala el paquete y React como dependencia de tu aplicación. Después, importa una sola vez los estilos compilados en el punto de entrada CSS.
|
|
23
23
|
|
|
24
24
|
```css
|
|
25
|
-
@import
|
|
26
|
-
@import
|
|
25
|
+
@import 'tailwindcss';
|
|
26
|
+
@import '@doscientos/ui/styles.css';
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
-
import { Button, Field, FieldLabel, Input } from
|
|
30
|
+
import { Button, Field, FieldLabel, Input } from '@doscientos/ui'
|
|
31
31
|
|
|
32
32
|
export function ProfileName() {
|
|
33
|
-
return
|
|
33
|
+
return (
|
|
34
|
+
<Field>
|
|
35
|
+
<FieldLabel htmlFor="name">Nombre</FieldLabel>
|
|
36
|
+
<Input id="name" />
|
|
37
|
+
<Button>Guardar</Button>
|
|
38
|
+
</Field>
|
|
39
|
+
)
|
|
34
40
|
}
|
|
35
41
|
```
|
|
36
42
|
|
|
@@ -44,10 +50,13 @@ El combobox es composable: la aplicación controla datos, peticiones y caché; l
|
|
|
44
50
|
<Combobox items={clients} inputValue={query} onInputChange={setQuery}>
|
|
45
51
|
<ComboboxInput placeholder="Busca un cliente…" />
|
|
46
52
|
<ComboboxContent>
|
|
47
|
-
<ComboboxList emptyState="Sin resultados.">
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
<ComboboxList emptyState="Sin resultados.">
|
|
54
|
+
{(client) => (
|
|
55
|
+
<ComboboxItem id={client.id} textValue={client.name}>
|
|
56
|
+
<HighlightMatch text={client.name} query={query} />
|
|
57
|
+
</ComboboxItem>
|
|
58
|
+
)}
|
|
59
|
+
</ComboboxList>
|
|
51
60
|
</ComboboxContent>
|
|
52
61
|
</Combobox>
|
|
53
62
|
```
|