innoboxrr-form-core 2.7.0 → 2.8.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/README.md CHANGED
@@ -67,7 +67,7 @@ setTheme({
67
67
  | Avisos | `toast`, `toastSuccess`, `toastDanger`, `toastWarning`, `toastTitle`, `toastClose`, `toastRegion` |
68
68
  | Tabla | `table`, `tableNumeric`, `tableSticky`, `tableSelect`, `tableResizer`, `tableEmpty`, `bulkBar`, `bulkCount`, `tableSort`, `tableContainer`, `tableFooter`, `tablePager` |
69
69
  | Listado | `datatable`, `datatableFilters`, `toolbarSpacer` |
70
- | Campos compuestos | `fileDrop`, `fileDropHint`, `avatarPreview`, `codeInput`, `codeCell`, `group`, `groupTitle`, `dragHandle`, `iconButtonDanger` |
70
+ | Campos compuestos | `fileDrop`, `fileDropHint`, `avatarPreview`, `codeInput`, `codeCell`, `group`, `groupTitle`, `dragHandle`, `iconButtonDanger`, `phone`, `phoneInvalid` |
71
71
  | Edición en línea | `editable` |
72
72
  | Shell de aplicación | `shell`, `shellHeader`, `shellSidebar`, `shellMain` |
73
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innoboxrr-form-core",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "El nucleo agnostico de la interfaz innoboxrr: tema, iconos, estilos, archivos y zonas horarias.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1395,6 +1395,138 @@
1395
1395
  background: var(--fe-danger-soft);
1396
1396
  }
1397
1397
 
1398
+ /* ============================================================
1399
+ TELEFONO
1400
+ vue-tel-input y react-phone-number-input dibujan su propio marcado con
1401
+ colores escritos (borde #bbb, foco #66afe9, lista con fondo blanco), y el de
1402
+ React ni siquiera tiene forma sin su hoja. Aquí se les da la de un fe-input,
1403
+ con los colores de los tokens, también en oscuro.
1404
+ ============================================================ */
1405
+
1406
+ .fe-phone {
1407
+ box-sizing: border-box;
1408
+ display: flex;
1409
+ align-items: stretch;
1410
+ width: 100%;
1411
+ min-height: var(--fe-control-height);
1412
+ font-family: var(--fe-font);
1413
+ font-size: var(--fe-text-base);
1414
+ color: var(--fe-text);
1415
+ background: var(--fe-surface);
1416
+ border: 1px solid var(--fe-border);
1417
+ border-radius: var(--fe-radius);
1418
+ transition: border-color var(--fe-transition), box-shadow var(--fe-transition);
1419
+ }
1420
+
1421
+ .fe-phone:hover {
1422
+ border-color: var(--fe-border-strong);
1423
+ }
1424
+
1425
+ .fe-phone:focus-within {
1426
+ border-color: var(--fe-focus);
1427
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--fe-focus) 22%, transparent);
1428
+ }
1429
+
1430
+ .fe-phone-invalid {
1431
+ border-color: var(--fe-danger);
1432
+ }
1433
+
1434
+ .fe-phone input {
1435
+ box-sizing: border-box;
1436
+ flex: 1;
1437
+ min-width: 0;
1438
+ padding: 0 var(--fe-control-padding-x);
1439
+ font: inherit;
1440
+ color: inherit;
1441
+ background: transparent;
1442
+ border: 0;
1443
+ outline: none;
1444
+ }
1445
+
1446
+ .fe-phone input::placeholder {
1447
+ color: var(--fe-text-subtle);
1448
+ }
1449
+
1450
+ .fe-phone input:disabled {
1451
+ color: var(--fe-text-subtle);
1452
+ cursor: not-allowed;
1453
+ }
1454
+
1455
+ /* react-phone-number-input: la bandera y la flecha, sobre un <select> nativo
1456
+ invisible. Se ajusta con sus propias variables. */
1457
+ .fe-phone.PhoneInput {
1458
+ --PhoneInput-color--focus: var(--fe-focus);
1459
+ --PhoneInputCountryFlag-borderColor: var(--fe-border-strong);
1460
+ --PhoneInputCountrySelectArrow-color: var(--fe-text-subtle);
1461
+ --PhoneInputCountrySelectArrow-opacity: 1;
1462
+ align-items: center;
1463
+ padding-left: var(--fe-control-padding-x);
1464
+ }
1465
+
1466
+ /* vue-tel-input declara su borde y su foco con la misma especificidad y su
1467
+ hoja se carga después: sin el selector doble, ganaría la suya. */
1468
+ .fe-phone.vue-tel-input {
1469
+ border: 1px solid var(--fe-border);
1470
+ border-radius: var(--fe-radius);
1471
+ }
1472
+
1473
+ .fe-phone.vue-tel-input:hover {
1474
+ border-color: var(--fe-border-strong);
1475
+ }
1476
+
1477
+ .fe-phone.vue-tel-input:focus-within {
1478
+ border-color: var(--fe-focus);
1479
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--fe-focus) 22%, transparent);
1480
+ }
1481
+
1482
+ .fe-phone.vue-tel-input.fe-phone-invalid {
1483
+ border-color: var(--fe-danger);
1484
+ }
1485
+
1486
+ .fe-phone .vti__dropdown {
1487
+ padding: 0 var(--fe-space-2) 0 var(--fe-control-padding-x);
1488
+ border-radius: var(--fe-radius) 0 0 var(--fe-radius);
1489
+ }
1490
+
1491
+ .fe-phone .vti__dropdown:hover,
1492
+ .fe-phone .vti__dropdown.open {
1493
+ background: var(--fe-surface-hover);
1494
+ }
1495
+
1496
+ .fe-phone .vti__selection .vti__country-code,
1497
+ .fe-phone .vti__dropdown-arrow {
1498
+ color: var(--fe-text-subtle);
1499
+ }
1500
+
1501
+ .fe-phone .vti__dropdown-list {
1502
+ z-index: var(--fe-z-dropdown);
1503
+ width: max-content;
1504
+ max-width: min(24rem, 90vw);
1505
+ color: var(--fe-text);
1506
+ background: var(--fe-surface-raised);
1507
+ border: 1px solid var(--fe-border);
1508
+ border-radius: var(--fe-radius);
1509
+ box-shadow: var(--fe-shadow);
1510
+ }
1511
+
1512
+ .fe-phone .vti__dropdown-list.below {
1513
+ top: calc(100% + var(--fe-space-1));
1514
+ }
1515
+
1516
+ .fe-phone .vti__dropdown-item.highlighted {
1517
+ background: var(--fe-surface-hover);
1518
+ }
1519
+
1520
+ .fe-phone .vti__dropdown-item.last-preferred {
1521
+ border-bottom-color: var(--fe-border);
1522
+ }
1523
+
1524
+ .fe-phone .vti__search_box {
1525
+ width: 100%;
1526
+ min-height: var(--fe-control-height);
1527
+ border-bottom: 1px solid var(--fe-border);
1528
+ }
1529
+
1398
1530
  /* ============================================================
1399
1531
  EDICION EN LINEA
1400
1532
  ============================================================ */
package/src/theme.js CHANGED
@@ -54,6 +54,8 @@ export const defaultTheme = {
54
54
  group: 'fe-group',
55
55
  groupTitle: 'fe-group-title',
56
56
  dragHandle: 'fe-drag-handle',
57
+ phone: 'fe-phone',
58
+ phoneInvalid: 'fe-phone-invalid',
57
59
 
58
60
  // BOTONES
59
61
  button: 'fe-button',