@klu_dev/ui-klu-green 1.2.7 → 1.2.9

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 CHANGED
@@ -25,6 +25,8 @@ npm install @klu_dev/ui-klu-green
25
25
  - MobileMenuDrawer
26
26
  - SearchSelect
27
27
  - InputCode
28
+ - GridCard
29
+ - CheckBox
28
30
 
29
31
  ## Antes de comenzar a agregar componentes
30
32
 
@@ -820,4 +822,78 @@ export default function BankSelector() {
820
822
  | `placeholder` | `string` | `"Buscar..."` | Texto de soporte visible cuando el campo se encuentra vacío. |
821
823
  | `size` | `'sm' \| 'md' \| 'lg' \| 'full'` | `'lg'` | Determina la escala del ancho mínimo, alto de caja e interlineado tipográfico interno. |
822
824
  | `error` | `boolean` | `false` | Alterna el color de la caja a la paleta destructiva y formatea el color del placeholder. |
823
- | `disabled` | `boolean` | `false` | Inactiva por completo la interacción del gatillo y cancela el despliegue del Popover. |
825
+ | `disabled` | `boolean` | `false` | Inactiva por completo la interacción del gatillo y cancela el despliegue del Popover. |
826
+
827
+ ## Uso de GridCard
828
+ Tarjeta modular interactiva e individual ideal para layouts de cuadrícula.
829
+
830
+ ```tsx
831
+ import { GridCard, Icons } from "@klu_dev/ui-klu-green"
832
+ import { useState } from "react"
833
+
834
+ export default function CategorySelector() {
835
+ const mockCategories = [
836
+ { id: 'tel', label: 'Telefonía', icon: Icons.TELEPHONY },
837
+ { id: 'mov', label: 'Movilidad', icon: Icons.MOBILITY },
838
+ { id: 'hog', label: 'Hogar', icon: Icons.HOMESERVICE },
839
+ ]
840
+
841
+ const [activeId, setActiveId] = useState<string>('tel')
842
+
843
+ return (
844
+ <div className="uiklu-flex uiklu-flex-wrap uiklu-gap-4 uiklu-p-6">
845
+ {mockCategories.map((category) => (
846
+ <GridCard
847
+ key={category.id}
848
+ label={category.label}
849
+ icon={category.icon}
850
+ isActive={activeId === category.id}
851
+ onClick={() => setActiveId(category.id)}
852
+ />
853
+ ))}
854
+ </div>
855
+ )
856
+ }
857
+ ```
858
+
859
+ ### Props de GridCard
860
+ | Prop | Tipo | Por defecto | Descripción |
861
+ | :--- | :--- | :--- | :--- |
862
+ | `label` | `string` | - | Texto informativo inferior que titula el bloque de la tarjeta. |
863
+ | `icon` | `ReactNode` | - | Grafismo o ícono vectorial extraído del catálogo corporativo `Icons`. |
864
+ | `isActive` | `boolean` | `false` | Modifica dinámicamente el estilo del marco y el relleno para denotar selección activa. |
865
+ | `onClick` | `() => void` | - | Callback gatillado al presionar la tarjeta completa. |
866
+
867
+
868
+
869
+ ## Uso de CheckBox
870
+ Componente de casilla de verificación estilizado con soporte de estados e icono interno centralizado. Puede ser utilizado de manera controlada o no controlada.
871
+
872
+ ```tsx
873
+ import { Checkbox } from "@klu_dev/ui-klu-green"
874
+ import { useState } from "react"
875
+
876
+ export default function CheckboxExample() {
877
+ const [isLogged, setIsLogged] = useState(false)
878
+
879
+ return (
880
+ <div className="uiklu-p-6">
881
+ <Checkbox
882
+ label="Guardar como servicio recurrente"
883
+ checked={isLogged}
884
+ onChange={(checked) => setIsLogged(checked)}
885
+ />
886
+ </div>
887
+ )
888
+ }
889
+ ```
890
+
891
+ ### Props de CheckBox
892
+ | Prop | Tipo | Por defecto | Descripción |
893
+ | :--- | :--- | :--- | :--- |
894
+ | `id` | `string` | - | Identificador único del input (si no se provee, genera uno interno de forma automática). |
895
+ | `label` | `string` | `"Guardar como servicio recurrente"` | Texto descriptivo renderizado al lado derecho del recuadro. |
896
+ | `defaultChecked` | `boolean` | `false` | Estado inicial por defecto en modo no controlado. |
897
+ | `checked` | `boolean` | - | Estado binario síncrono en modo controlado. |
898
+ | `onChange` | `(checked: boolean) => void` | - | Callback gatillado automáticamente al alterar la interacción del recuadro. |
899
+
package/dist/index.css CHANGED
@@ -116,9 +116,12 @@
116
116
  --uiklu-primary-700: 176 84% 22%;
117
117
  --uiklu-primary-600: 177 87% 25%;
118
118
  --uiklu-primary-500: 178 87% 27%;
119
+ --uiklu-primary-400: 178 60% 36%;
119
120
  --uiklu-primary-300: 179 39% 47%;
120
121
  --uiklu-primary-100: 180 34% 77%;
121
122
  --uiklu-primary-light: 180 100% 99%;
123
+ --uiklu-primaryactive: 184 98% 96%;
124
+ --uiklu-primary-borderactive: 183 64% 90%;
122
125
  --uiklu-primary-50: 184 36% 91%;
123
126
  --uiklu-primary-foreground: 0 0% 100%;
124
127
  --uiklu-secondary: 160 60% 40%;
@@ -148,6 +151,7 @@
148
151
  --uiklu-gray-400: 220 2% 72%;
149
152
  --uiklu-gray-300: 210 3% 87%;
150
153
  --uiklu-gray-200: 220 8% 93%;
154
+ --uiklu-gray-50: 240 20% 98%;
151
155
 
152
156
 
153
157
  --uiklu-successbg: 184 36% 91%;
@@ -345,6 +349,10 @@ button,
345
349
  .uiklu-ml-5{
346
350
  margin-left: 1.25rem;
347
351
 
352
+ }
353
+ .uiklu-ml-\[1px\]{
354
+ margin-left: 1px;
355
+
348
356
  }
349
357
  .uiklu-ml-\[3px\]{
350
358
  margin-left: 3px;
@@ -457,6 +465,10 @@ button,
457
465
  .uiklu-h-\[20px\]{
458
466
  height: 20px;
459
467
 
468
+ }
469
+ .uiklu-h-\[24px\]{
470
+ height: 24px;
471
+
460
472
  }
461
473
  .uiklu-h-\[34px\]{
462
474
  height: 34px;
@@ -489,6 +501,10 @@ button,
489
501
  .uiklu-h-\[6px\]{
490
502
  height: 6px;
491
503
 
504
+ }
505
+ .uiklu-h-\[70px\]{
506
+ height: 70px;
507
+
492
508
  }
493
509
  .uiklu-h-auto{
494
510
  height: auto;
@@ -621,6 +637,10 @@ button,
621
637
  .uiklu-w-\[600px\]{
622
638
  width: 600px;
623
639
 
640
+ }
641
+ .uiklu-w-\[70px\]{
642
+ width: 70px;
643
+
624
644
  }
625
645
  .uiklu-w-\[75px\]{
626
646
  width: 75px;
@@ -746,6 +766,10 @@ button,
746
766
  .uiklu-max-w-lg{
747
767
  max-width: 32rem;
748
768
 
769
+ }
770
+ .uiklu-max-w-md{
771
+ max-width: 28rem;
772
+
749
773
  }
750
774
  .uiklu-flex-1{
751
775
  flex: 1 1 0%;
@@ -1026,6 +1050,10 @@ button,
1026
1050
  .uiklu-rounded-\[48px\]{
1027
1051
  border-radius: 48px;
1028
1052
 
1053
+ }
1054
+ .uiklu-rounded-\[4px\]{
1055
+ border-radius: 4px;
1056
+
1029
1057
  }
1030
1058
  .uiklu-rounded-\[50px\]{
1031
1059
  border-radius: 50px;
@@ -1134,6 +1162,11 @@ button,
1134
1162
  --tw-border-opacity: 1;
1135
1163
  border-color: hsl(var(--uiklu-gray-200) / var(--tw-border-opacity, 1));
1136
1164
 
1165
+ }
1166
+ .uiklu-border-gray300{
1167
+ --tw-border-opacity: 1;
1168
+ border-color: hsl(var(--uiklu-gray-300) / var(--tw-border-opacity, 1));
1169
+
1137
1170
  }
1138
1171
  .uiklu-border-inputlight{
1139
1172
  --tw-border-opacity: 1;
@@ -1159,6 +1192,11 @@ button,
1159
1192
  --tw-border-opacity: 1;
1160
1193
  border-color: hsl(var(--uiklu-primary-900) / var(--tw-border-opacity, 1));
1161
1194
 
1195
+ }
1196
+ .uiklu-border-primaryborderactive{
1197
+ --tw-border-opacity: 1;
1198
+ border-color: hsl(var(--uiklu-primary-borderactive) / var(--tw-border-opacity, 1));
1199
+
1162
1200
  }
1163
1201
  .uiklu-border-transparent{
1164
1202
  border-color: transparent;
@@ -1245,6 +1283,11 @@ button,
1245
1283
  --tw-bg-opacity: 1;
1246
1284
  background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
1247
1285
 
1286
+ }
1287
+ .uiklu-bg-gray50{
1288
+ --tw-bg-opacity: 1;
1289
+ background-color: hsl(var(--uiklu-gray-50) / var(--tw-bg-opacity, 1));
1290
+
1248
1291
  }
1249
1292
  .uiklu-bg-gray900{
1250
1293
  --tw-bg-opacity: 1;
@@ -1294,6 +1337,11 @@ button,
1294
1337
  --tw-bg-opacity: 1;
1295
1338
  background-color: hsl(var(--uiklu-primary-900) / var(--tw-bg-opacity, 1));
1296
1339
 
1340
+ }
1341
+ .uiklu-bg-primaryactive{
1342
+ --tw-bg-opacity: 1;
1343
+ background-color: hsl(var(--uiklu-primaryactive) / var(--tw-bg-opacity, 1));
1344
+
1297
1345
  }
1298
1346
  .uiklu-bg-primarylight{
1299
1347
  --tw-bg-opacity: 1;
@@ -1436,6 +1484,14 @@ button,
1436
1484
  .uiklu-p-8{
1437
1485
  padding: 2rem;
1438
1486
 
1487
+ }
1488
+ .uiklu-p-\[10px\]{
1489
+ padding: 10px;
1490
+
1491
+ }
1492
+ .uiklu-p-\[10px_8px_10px_8px\]{
1493
+ padding: 10px 8px 10px 8px;
1494
+
1439
1495
  }
1440
1496
  .uiklu-p-\[14px\]{
1441
1497
  padding: 14px;
@@ -1657,6 +1713,10 @@ button,
1657
1713
  .uiklu-text-\[8px\]{
1658
1714
  font-size: 8px;
1659
1715
 
1716
+ }
1717
+ .uiklu-text-\[9\.5px\]{
1718
+ font-size: 9.5px;
1719
+
1660
1720
  }
1661
1721
  .uiklu-text-lg{
1662
1722
  font-size: 12px;
@@ -1872,6 +1932,11 @@ button,
1872
1932
  --tw-text-opacity: 1;
1873
1933
  color: hsl(var(--uiklu-primary-300) / var(--tw-text-opacity, 1));
1874
1934
 
1935
+ }
1936
+ .uiklu-text-primary400{
1937
+ --tw-text-opacity: 1;
1938
+ color: hsl(var(--uiklu-primary-400) / var(--tw-text-opacity, 1));
1939
+
1875
1940
  }
1876
1941
  .uiklu-text-primary600{
1877
1942
  --tw-text-opacity: 1;
@@ -2093,6 +2158,18 @@ input.uiklu-flex:not(:placeholder-shown) {
2093
2158
 
2094
2159
  }
2095
2160
 
2161
+ .checked\:uiklu-border-primary:checked{
2162
+ --tw-border-opacity: 1;
2163
+ border-color: hsl(var(--uiklu-primary) / var(--tw-border-opacity, 1));
2164
+
2165
+ }
2166
+
2167
+ .checked\:uiklu-bg-primary:checked{
2168
+ --tw-bg-opacity: 1;
2169
+ background-color: hsl(var(--uiklu-primary) / var(--tw-bg-opacity, 1));
2170
+
2171
+ }
2172
+
2096
2173
  .focus-within\:uiklu-border-\[1px\]:focus-within{
2097
2174
  border-width: 1px;
2098
2175
 
@@ -2122,6 +2199,11 @@ input.uiklu-flex:not(:placeholder-shown) {
2122
2199
 
2123
2200
  }
2124
2201
 
2202
+ .hover\:uiklu-bg-gray200\/40:hover{
2203
+ background-color: hsl(var(--uiklu-gray-200) / 0.4);
2204
+
2205
+ }
2206
+
2125
2207
  .hover\:uiklu-bg-orange500\/90:hover{
2126
2208
  background-color: hsl(var(--uiklu-orange-500) / 0.9);
2127
2209
 
@@ -2243,6 +2325,24 @@ input.uiklu-flex:not(:placeholder-shown) {
2243
2325
 
2244
2326
  }
2245
2327
 
2328
+ .focus-visible\:uiklu-ring-2:focus-visible{
2329
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
2330
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
2331
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
2332
+
2333
+ }
2334
+
2335
+ .focus-visible\:uiklu-ring-primary300:focus-visible{
2336
+ --tw-ring-opacity: 1;
2337
+ --tw-ring-color: hsl(var(--uiklu-primary-300) / var(--tw-ring-opacity, 1));
2338
+
2339
+ }
2340
+
2341
+ .focus-visible\:uiklu-ring-offset-2:focus-visible{
2342
+ --tw-ring-offset-width: 2px;
2343
+
2344
+ }
2345
+
2246
2346
  .active\:uiklu-opacity-70:active{
2247
2347
  opacity: 0.7;
2248
2348
 
@@ -2282,6 +2382,11 @@ input.uiklu-flex:not(:placeholder-shown) {
2282
2382
 
2283
2383
  }
2284
2384
 
2385
+ .uiklu-peer:checked ~ .peer-checked\:uiklu-opacity-100{
2386
+ opacity: 1;
2387
+
2388
+ }
2389
+
2285
2390
  .data-\[placeholder\]\:uiklu-text-gray500[data-placeholder]{
2286
2391
  --tw-text-opacity: 1;
2287
2392
  color: hsl(var(--uiklu-gray-500) / var(--tw-text-opacity, 1));
@@ -2352,4 +2457,14 @@ input.uiklu-flex:not(:placeholder-shown) {
2352
2457
  --tw-bg-opacity: 1;
2353
2458
  background-color: hsl(var(--uiklu-primary-300) / var(--tw-bg-opacity, 1));
2354
2459
 
2460
+ }
2461
+
2462
+ .\[\&\>svg\]\:uiklu-h-3>svg{
2463
+ height: 0.75rem;
2464
+
2465
+ }
2466
+
2467
+ .\[\&\>svg\]\:uiklu-w-3>svg{
2468
+ width: 0.75rem;
2469
+
2355
2470
  }
package/dist/index.d.ts CHANGED
@@ -131,6 +131,15 @@ interface SidebarTabsProps {
131
131
  }
132
132
  declare function SidebarTabs({ items }: SidebarTabsProps): react_jsx_runtime.JSX.Element;
133
133
 
134
+ interface MobileMenuDrawerProps {
135
+ isOpen: boolean;
136
+ onClose: () => void;
137
+ items: NavItem[];
138
+ activeTab: string;
139
+ onTabChange: (id: string) => void;
140
+ }
141
+ declare function MobileMenuDrawer({ isOpen, onClose, items, activeTab, onTabChange }: MobileMenuDrawerProps): react_jsx_runtime.JSX.Element | null;
142
+
134
143
  declare const Icons: {
135
144
  CARD: react_jsx_runtime.JSX.Element;
136
145
  TICKET: react_jsx_runtime.JSX.Element;
@@ -157,6 +166,12 @@ declare const Icons: {
157
166
  BOXES: react_jsx_runtime.JSX.Element;
158
167
  MENU: react_jsx_runtime.JSX.Element;
159
168
  CIRCLE_MOVEMENTS: react_jsx_runtime.JSX.Element;
169
+ TELEPHONY: react_jsx_runtime.JSX.Element;
170
+ MOBILITY: react_jsx_runtime.JSX.Element;
171
+ HOMESERVICE: react_jsx_runtime.JSX.Element;
172
+ SIGN: react_jsx_runtime.JSX.Element;
173
+ GAMES: react_jsx_runtime.JSX.Element;
174
+ CHECKED: react_jsx_runtime.JSX.Element;
160
175
  };
161
176
 
162
177
  declare const searchSelectTriggerVariants: (props?: ({
@@ -185,4 +200,22 @@ interface AuthCodeProps {
185
200
  }
186
201
  declare const InputCode: React__default.FC<AuthCodeProps>;
187
202
 
188
- export { BackButton, BalanceInfo, Button, Icons, Input, InputCode, LoadingScreen, Modal, PromoBanner, SearchSelect, Select, SidebarTabs, ToastAction, Toaster, Typography, useToast };
203
+ interface GridCardProps {
204
+ label: string;
205
+ icon: React__default.ReactNode;
206
+ isActive?: boolean;
207
+ onClick?: () => void;
208
+ }
209
+ declare const GridCard: React__default.FC<GridCardProps>;
210
+
211
+ interface CheckboxProps {
212
+ id?: string;
213
+ label?: string;
214
+ defaultChecked?: boolean;
215
+ checked?: boolean;
216
+ onChange?: (checked: boolean) => void;
217
+ [key: string]: any;
218
+ }
219
+ declare const Checkbox: React__default.FC<CheckboxProps>;
220
+
221
+ export { BackButton, BalanceInfo, Button, Checkbox, type CheckboxProps, GridCard, Icons, Input, InputCode, LoadingScreen, MobileMenuDrawer, Modal, PromoBanner, SearchSelect, Select, SidebarTabs, ToastAction, Toaster, Typography, useToast };