@rubenpazch/radio-button 4.1.0 → 4.1.2
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 +56 -0
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
1
|
# RadioButton
|
|
2
2
|
|
|
3
3
|
Generated component package.
|
|
4
|
+
|
|
5
|
+
<!-- catalogo:inicio (generado por pnpm catalogo, no editar) -->
|
|
6
|
+
|
|
7
|
+
RadioButton y RadioGroup accesibles con variantes y validación.
|
|
8
|
+
|
|
9
|
+
- **Usar cuando:** Elegir una sola opción entre pocas (2 a 6) visibles a la vez.
|
|
10
|
+
- **Evitar cuando:** Muchas opciones: usa Select o Autocomplete.
|
|
11
|
+
|
|
12
|
+
Se recomienda instalar el paquete completo `@rubenpazch/ui` (incluye este). Por separado:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @rubenpazch/radio-button
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## RadioButton
|
|
19
|
+
|
|
20
|
+
| Prop | Tipo | Req. | Por defecto | Descripción |
|
|
21
|
+
| ------------- | -------------------------------------------------------------- | ---- | ----------- | ----------- |
|
|
22
|
+
| `label` | `string` | sí | | |
|
|
23
|
+
| `name` | `string` | sí | | |
|
|
24
|
+
| `value` | `string` | sí | | |
|
|
25
|
+
| `checked` | `boolean` | | `false` | |
|
|
26
|
+
| `className` | `string` | | `` | |
|
|
27
|
+
| `description` | `string` | | | |
|
|
28
|
+
| `disabled` | `boolean` | | `false` | |
|
|
29
|
+
| `error` | `string` | | | |
|
|
30
|
+
| `id` | `string` | | | |
|
|
31
|
+
| `onChange` | `(value: string) => void` | | | |
|
|
32
|
+
| `required` | `boolean` | | `false` | |
|
|
33
|
+
| `size` | `"sm" \| "md" \| "lg"` | | `md` | |
|
|
34
|
+
| `variant` | `"default" \| "primary" \| "success" \| "warning" \| "danger"` | | `default` | |
|
|
35
|
+
|
|
36
|
+
## RadioGroup
|
|
37
|
+
|
|
38
|
+
| Prop | Tipo | Req. | Por defecto | Descripción |
|
|
39
|
+
| ------------------- | -------------------------------------------------------------- | ---- | ----------- | ----------- |
|
|
40
|
+
| `name` | `string` | sí | | |
|
|
41
|
+
| `onChange` | `(value: string) => void` | sí | | |
|
|
42
|
+
| `options` | `RadioOption[]` | sí | | |
|
|
43
|
+
| `bordered` | `boolean` | | `false` | |
|
|
44
|
+
| `borderLabel` | `string` | | | |
|
|
45
|
+
| `className` | `string` | | `` | |
|
|
46
|
+
| `disabled` | `boolean` | | `false` | |
|
|
47
|
+
| `error` | `string` | | | |
|
|
48
|
+
| `groupLabel` | `string` | | | |
|
|
49
|
+
| `orientation` | `"vertical" \| "horizontal"` | | `vertical` | |
|
|
50
|
+
| `required` | `boolean` | | `false` | |
|
|
51
|
+
| `selectedLabelText` | `string` | | `Selected:` | |
|
|
52
|
+
| `showSelectedLabel` | `boolean` | | `false` | |
|
|
53
|
+
| `size` | `"sm" \| "md" \| "lg"` | | `md` | |
|
|
54
|
+
| `value` | `string` | | | |
|
|
55
|
+
| `variant` | `"default" \| "primary" \| "success" \| "warning" \| "danger"` | | `default` | |
|
|
56
|
+
|
|
57
|
+
Tipos: `RadioButtonProps`, `RadioSize`, `RadioVariant`, `RadioGroupProps`, `RadioOption`, `RadioGroupOrientation`.
|
|
58
|
+
|
|
59
|
+
<!-- catalogo:fin -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubenpazch/radio-button",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Accessible radio button and radio group components with variants and validation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^19.0.0",
|
|
31
31
|
"react-dom": "^19.0.0",
|
|
32
|
-
"@rubenpazch/tokens": "0.
|
|
32
|
+
"@rubenpazch/tokens": "0.4.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rubenpazch/typescript-config": "3.0.0"
|
|
@@ -37,6 +37,12 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
+
"lbyte": {
|
|
41
|
+
"categoria": "formularios",
|
|
42
|
+
"resumen": "RadioButton y RadioGroup accesibles con variantes y validación.",
|
|
43
|
+
"usarCuando": "Elegir una sola opción entre pocas (2 a 6) visibles a la vez.",
|
|
44
|
+
"evitarCuando": "Muchas opciones: usa Select o Autocomplete."
|
|
45
|
+
},
|
|
40
46
|
"scripts": {
|
|
41
47
|
"build": "rollup -c",
|
|
42
48
|
"test": "jest --passWithNoTests"
|