@rubenpazch/ui 0.13.0 → 0.14.0

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/dist/index.d.ts CHANGED
@@ -53,7 +53,7 @@ export { default as Skeleton, SkeletonProps } from '@rubenpazch/skeleton';
53
53
  export { default as Stepper } from '@rubenpazch/stepper';
54
54
  export { default as Switch, SwitchProps } from '@rubenpazch/switch';
55
55
  export { Tab, TabOrientation, default as Tabs, TabsProps } from '@rubenpazch/tabs';
56
- export { default as TextInput, TextInputNativeProps, TextInputProps } from '@rubenpazch/text-input';
56
+ export { PasswordRule, PasswordRulesLabels, default as TextInput, TextInputNativeProps, TextInputProps } from '@rubenpazch/text-input';
57
57
  export { default as Textarea, TextareaProps } from '@rubenpazch/textarea';
58
58
  export { default as Timeline, TimelineItem, TimelineProps, TimelineStatus } from '@rubenpazch/timeline';
59
59
  export { ToastAction, ToastApi, ToastBanner, ToastBannerProps, ToastItem, ToastOptions, ToastProvider, ToastProviderProps, ToastRegion, ToastType, useToast } from '@rubenpazch/toast';
@@ -1091,49 +1091,51 @@ Campo de texto con etiqueta, ayuda, advertencia, error, iconos y variantes.
1091
1091
  import { TextInput } from "@rubenpazch/ui";
1092
1092
  ```
1093
1093
 
1094
- | Prop | Tipo | Req. | Por defecto | Descripción |
1095
- | ------------------------ | --------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1096
- | `onChange` | `(value: string) => void` | sí | | |
1097
- | `value` | `string` | sí | | |
1098
- | `autoComplete` | `string` | | | |
1099
- | `className` | `string` | | `` | |
1100
- | `disabled` | `boolean` | | `false` | |
1101
- | `emailInvalidMessage` | `string` | | | |
1102
- | `emailSuggestionMessage` | `string` | | | |
1103
- | `emailValidMessage` | `string` | | | |
1104
- | `endAddon` | `ReactNode` | | | Bloque pegado a la derecha del campo: un texto (".pe", "kg") o un botón ("Buscar"). |
1105
- | `error` | `string` | | | |
1106
- | `hint` | `string` | | | |
1107
- | `icon` | `ReactNode` | | | |
1108
- | `id` | `string` | | | id del input; si no se pasa se genera uno (la etiqueta se asocia sola). |
1109
- | `label` | `string` | | | |
1110
- | `labelAction` | `ReactNode` | | | Contenido junto a la etiqueta, a la derecha: un botón de ayuda ("?"), un enlace ("¿Olvidaste tu contraseña?")… No va dentro del `<label>`. |
1111
- | `max` | `number` | | | |
1112
- | `maxLength` | `number` | | | |
1113
- | `min` | `number` | | | |
1114
- | `minLength` | `number` | | | |
1115
- | `minLengthMessage` | `string` | | | Inline error shown when the value is non-empty but shorter than `minLength`. |
1116
- | `name` | `string` | | | name del input (formularios nativos, react-hook-form…). |
1117
- | `onBlur` | `() => void` | | | |
1118
- | `onFocus` | `() => void` | | | |
1119
- | `onValidityChange` | `(isValid: boolean) => void` | | | Fires whenever the field's overall validity changes (respecting `required`, `validateEmail`, `minLength`, `maxLength`, `pattern` and `error`). Lets the parent gate a submit button on the component's own validation, without duplicating the rules. |
1120
- | `passwordToggleLabels` | `{ show: string; hide: string; }` | | `{ show: "Mostrar contraseña", hide: "Ocultar contraseña", }` | Textos del botón de contraseña (accesibilidad). |
1121
- | `pattern` | `string` | | | |
1122
- | `placeholder` | `string` | | | |
1123
- | `required` | `boolean` | | `false` | |
1124
- | `requiredMessage` | `string` | | | |
1125
- | `requirementsLabels` | `Partial<PasswordRequirementsLabels>` | | | |
1126
- | `showPasswordStrength` | `boolean` | | `false` | |
1127
- | `showPasswordToggle` | `boolean` | | `true` | Con `type="password"`, botón para ver u ocultar lo escrito. Por defecto true. |
1128
- | `startAddon` | `ReactNode` | | | Bloque pegado a la izquierda del campo: un texto ("S/", "https://"), un icono o un botón. Si es texto, los lectores de pantalla lo leen como parte de la descripción del campo. |
1129
- | `step` | `number` | | | |
1130
- | `strengthLabelPrefix` | `string` | | | |
1131
- | `strengthLabels` | `Partial<Record<PasswordStrengthKey, string>>` | | | |
1132
- | `type` | `"number" \| "text" \| "email" \| "tel" \| "password" \| "url"` | | `text` | |
1133
- | `validateEmail` | `boolean` | | `false` | |
1134
- | `warning` | `string` | | | |
1135
-
1136
- Tipos: `TextInputProps`, `TextInputNativeProps`.
1094
+ | Prop | Tipo | Req. | Por defecto | Descripción |
1095
+ | ------------------------ | --------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1096
+ | `onChange` | `(value: string) => void` | sí | | |
1097
+ | `value` | `string` | sí | | |
1098
+ | `autoComplete` | `string` | | | |
1099
+ | `className` | `string` | | `` | |
1100
+ | `disabled` | `boolean` | | `false` | |
1101
+ | `emailInvalidMessage` | `string` | | | |
1102
+ | `emailSuggestionMessage` | `string` | | | |
1103
+ | `emailValidMessage` | `string` | | | |
1104
+ | `endAddon` | `ReactNode` | | | Bloque pegado a la derecha del campo: un texto (".pe", "kg") o un botón ("Buscar"). |
1105
+ | `error` | `string` | | | |
1106
+ | `hint` | `string` | | | |
1107
+ | `icon` | `ReactNode` | | | |
1108
+ | `id` | `string` | | | id del input; si no se pasa se genera uno (la etiqueta se asocia sola). |
1109
+ | `label` | `string` | | | |
1110
+ | `labelAction` | `ReactNode` | | | Contenido junto a la etiqueta, a la derecha: un botón de ayuda ("?"), un enlace ("¿Olvidaste tu contraseña?")… No va dentro del `<label>`. |
1111
+ | `max` | `number` | | | |
1112
+ | `maxLength` | `number` | | | |
1113
+ | `min` | `number` | | | |
1114
+ | `minLength` | `number` | | | |
1115
+ | `minLengthMessage` | `string` | | | Inline error shown when the value is non-empty but shorter than `minLength`. |
1116
+ | `name` | `string` | | | name del input (formularios nativos, react-hook-form…). |
1117
+ | `onBlur` | `() => void` | | | |
1118
+ | `onFocus` | `() => void` | | | |
1119
+ | `onValidityChange` | `(isValid: boolean) => void` | | | Fires whenever the field's overall validity changes (respecting `required`, `validateEmail`, `minLength`, `maxLength`, `pattern` and `error`). Lets the parent gate a submit button on the component's own validation, without duplicating the rules. |
1120
+ | `passwordRules` | `PasswordRule[]` | | | Con `type="password"`, las reglas de tu backend para una contraseña nueva. Se muestran como lista bajo el campo desde el inicio, cada una se marca al cumplirse y todas cuentan para `onValidityChange`. Si las pasas, reemplazan al medidor por composición (`showPasswordStrength` y `requirementsLabels` se ignoran). |
1121
+ | `passwordRulesLabels` | `Partial<PasswordRulesLabels>` | | | Textos de la lista de reglas: título y estado de cada regla para lectores de pantalla. |
1122
+ | `passwordToggleLabels` | `{ show: string; hide: string; }` | | `{ show: "Mostrar contraseña", hide: "Ocultar contraseña", }` | Textos del botón de contraseña (accesibilidad). |
1123
+ | `pattern` | `string` | | | |
1124
+ | `placeholder` | `string` | | | |
1125
+ | `required` | `boolean` | | `false` | |
1126
+ | `requiredMessage` | `string` | | | |
1127
+ | `requirementsLabels` | `Partial<PasswordRequirementsLabels>` | | | |
1128
+ | `showPasswordStrength` | `boolean` | | `false` | |
1129
+ | `showPasswordToggle` | `boolean` | | `true` | Con `type="password"`, botón para ver u ocultar lo escrito. Por defecto true. |
1130
+ | `startAddon` | `ReactNode` | | | Bloque pegado a la izquierda del campo: un texto ("S/", "https://"), un icono o un botón. Si es texto, los lectores de pantalla lo leen como parte de la descripción del campo. |
1131
+ | `step` | `number` | | | |
1132
+ | `strengthLabelPrefix` | `string` | | | |
1133
+ | `strengthLabels` | `Partial<Record<PasswordStrengthKey, string>>` | | | |
1134
+ | `type` | `"number" \| "text" \| "email" \| "tel" \| "password" \| "url"` | | `text` | |
1135
+ | `validateEmail` | `boolean` | | `false` | |
1136
+ | `warning` | `string` | | | |
1137
+
1138
+ Tipos: `TextInputProps`, `TextInputNativeProps`, `PasswordRule`, `PasswordRulesLabels`.
1137
1139
 
1138
1140
  ### @rubenpazch/textarea
1139
1141
 
@@ -9661,6 +9661,20 @@
9661
9661
  "porDefecto": null,
9662
9662
  "descripcion": "Fires whenever the field's overall validity changes (respecting `required`,\n`validateEmail`, `minLength`, `maxLength`, `pattern` and `error`). Lets the\nparent gate a submit button on the component's own validation, without\nduplicating the rules."
9663
9663
  },
9664
+ {
9665
+ "nombre": "passwordRules",
9666
+ "tipo": "PasswordRule[]",
9667
+ "requerido": false,
9668
+ "porDefecto": null,
9669
+ "descripcion": "Con `type=\"password\"`, las reglas de tu backend para una contraseña nueva. Se muestran\ncomo lista bajo el campo desde el inicio, cada una se marca al cumplirse y todas cuentan\npara `onValidityChange`. Si las pasas, reemplazan al medidor por composición\n(`showPasswordStrength` y `requirementsLabels` se ignoran)."
9670
+ },
9671
+ {
9672
+ "nombre": "passwordRulesLabels",
9673
+ "tipo": "Partial<PasswordRulesLabels>",
9674
+ "requerido": false,
9675
+ "porDefecto": null,
9676
+ "descripcion": "Textos de la lista de reglas: título y estado de cada regla para lectores de pantalla."
9677
+ },
9664
9678
  {
9665
9679
  "nombre": "passwordToggleLabels",
9666
9680
  "tipo": "{ show: string; hide: string; }",
@@ -9770,7 +9784,12 @@
9770
9784
  }
9771
9785
  ],
9772
9786
  "otrosValores": [],
9773
- "tipos": ["TextInputProps", "TextInputNativeProps"]
9787
+ "tipos": [
9788
+ "TextInputProps",
9789
+ "TextInputNativeProps",
9790
+ "PasswordRule",
9791
+ "PasswordRulesLabels"
9792
+ ]
9774
9793
  },
9775
9794
  {
9776
9795
  "paquete": "@rubenpazch/textarea",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubenpazch/ui",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Todos los componentes de Lbyte UI en un solo paquete, con su documentación para personas y agentes de IA",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,59 +43,59 @@
43
43
  "@rubenpazch/app-shell": "^0.4.0",
44
44
  "@rubenpazch/alert": "^0.2.1",
45
45
  "@rubenpazch/badge": "^0.1.2",
46
- "@rubenpazch/card": "^0.1.2",
47
- "@rubenpazch/checkbox-input": "^3.3.0",
46
+ "@rubenpazch/bottom-navigation": "^0.1.0",
48
47
  "@rubenpazch/button": "^6.2.5",
49
48
  "@rubenpazch/chip": "^4.0.8",
50
49
  "@rubenpazch/collapsible": "^0.1.0",
51
50
  "@rubenpazch/confirmation-dialog": "^3.1.6",
52
51
  "@rubenpazch/data-table": "^0.1.2",
52
+ "@rubenpazch/checkbox-input": "^3.3.0",
53
53
  "@rubenpazch/date-input": "^3.2.3",
54
- "@rubenpazch/bottom-navigation": "^0.1.0",
55
54
  "@rubenpazch/date-picker": "^3.2.3",
56
- "@rubenpazch/date-range-picker": "^0.1.3",
57
- "@rubenpazch/draggable-list": "^3.0.4",
58
55
  "@rubenpazch/description-list": "^0.1.0",
56
+ "@rubenpazch/draggable-list": "^3.0.4",
57
+ "@rubenpazch/date-range-picker": "^0.1.3",
58
+ "@rubenpazch/card": "^0.1.2",
59
59
  "@rubenpazch/drawer": "^4.2.6",
60
60
  "@rubenpazch/empty-state": "^0.1.2",
61
61
  "@rubenpazch/file-upload": "^0.1.1",
62
+ "@rubenpazch/form-field": "^0.1.2",
62
63
  "@rubenpazch/icon-button": "^4.2.2",
63
64
  "@rubenpazch/icons": "^6.5.0",
65
+ "@rubenpazch/identification-input": "^2.1.0",
64
66
  "@rubenpazch/image-upload": "^3.1.1",
65
67
  "@rubenpazch/info-row": "^3.0.4",
66
- "@rubenpazch/list": "^0.1.0",
67
68
  "@rubenpazch/loading-spinner": "^4.1.0",
68
- "@rubenpazch/identification-input": "^2.1.0",
69
- "@rubenpazch/menu": "^0.1.2",
70
- "@rubenpazch/form-field": "^0.1.2",
71
69
  "@rubenpazch/layout": "^0.1.0",
70
+ "@rubenpazch/menu": "^0.1.2",
71
+ "@rubenpazch/list": "^0.1.0",
72
72
  "@rubenpazch/modal": "^0.1.3",
73
73
  "@rubenpazch/money-input": "^0.1.2",
74
74
  "@rubenpazch/month-navigator": "^0.1.2",
75
75
  "@rubenpazch/numeric-picker": "^5.1.3",
76
76
  "@rubenpazch/numeric-up-picker": "^6.1.5",
77
+ "@rubenpazch/overlay-loader": "^1.1.4",
77
78
  "@rubenpazch/page-header": "^0.1.2",
78
79
  "@rubenpazch/pagination": "^3.2.5",
79
- "@rubenpazch/overlay-loader": "^1.1.4",
80
80
  "@rubenpazch/patient-details": "^3.1.3",
81
+ "@rubenpazch/patient-search": "^3.0.7",
82
+ "@rubenpazch/pin-input": "^0.1.0",
83
+ "@rubenpazch/prescription-card": "^3.0.5",
81
84
  "@rubenpazch/prescription-eye-card": "^3.0.9",
82
- "@rubenpazch/progress-bar": "^0.1.2",
83
85
  "@rubenpazch/radio-button": "^4.2.1",
86
+ "@rubenpazch/progress-bar": "^0.1.2",
84
87
  "@rubenpazch/segmented-control": "^0.1.2",
85
88
  "@rubenpazch/select": "^1.3.0",
86
89
  "@rubenpazch/shared": "^5.3.0",
87
- "@rubenpazch/pin-input": "^0.1.0",
88
- "@rubenpazch/patient-search": "^3.0.7",
89
90
  "@rubenpazch/sidebar": "^0.1.3",
90
- "@rubenpazch/skeleton": "^0.1.2",
91
- "@rubenpazch/prescription-card": "^3.0.5",
92
91
  "@rubenpazch/stepper": "^4.1.2",
92
+ "@rubenpazch/skeleton": "^0.1.2",
93
93
  "@rubenpazch/switch": "^0.1.2",
94
94
  "@rubenpazch/tabs": "^3.2.0",
95
- "@rubenpazch/text-input": "^6.5.0",
95
+ "@rubenpazch/text-input": "^6.6.0",
96
+ "@rubenpazch/timeline": "^0.1.0",
96
97
  "@rubenpazch/textarea": "^0.1.2",
97
98
  "@rubenpazch/toast": "^4.1.2",
98
- "@rubenpazch/timeline": "^0.1.0",
99
99
  "@rubenpazch/tokens": "^0.5.0",
100
100
  "@rubenpazch/tooltip": "^0.1.2",
101
101
  "@rubenpazch/turnstile": "^0.1.0",