innoboxrr-form-core 2.5.0 → 2.6.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 +12 -2
- package/package.json +1 -1
- package/src/components.css +107 -0
- package/src/theme.js +7 -0
- package/src/tokens.css +3 -0
package/README.md
CHANGED
|
@@ -65,7 +65,8 @@ setTheme({
|
|
|
65
65
|
| Menús | `menu`, `menuList`, `menuItem`, `menuItemDanger`, `menuSeparator`, `menuLabel` |
|
|
66
66
|
| Paleta de comandos | `command`, `commandInput`, `commandList`, `commandGroup`, `commandItem`, `commandEmpty` |
|
|
67
67
|
| Avisos | `toast`, `toastSuccess`, `toastDanger`, `toastWarning`, `toastTitle`, `toastClose`, `toastRegion` |
|
|
68
|
-
| Tabla | `table`, `tableNumeric`, `tableSticky`, `tableSelect`, `tableResizer`, `tableEmpty`, `bulkBar`, `bulkCount` |
|
|
68
|
+
| Tabla | `table`, `tableNumeric`, `tableSticky`, `tableSelect`, `tableResizer`, `tableEmpty`, `bulkBar`, `bulkCount`, `tableSort`, `tableContainer`, `tableFooter`, `tablePager` |
|
|
69
|
+
| Listado | `datatable`, `datatableFilters`, `toolbarSpacer` |
|
|
69
70
|
| Edición en línea | `editable` |
|
|
70
71
|
| Shell de aplicación | `shell`, `shellHeader`, `shellSidebar`, `shellMain` |
|
|
71
72
|
|
|
@@ -113,7 +114,16 @@ Los componentes de Vue y React envuelven exactamente este marcado.
|
|
|
113
114
|
- **Menús**: `fe-menu` con `popover`, colocado con Floating UI.
|
|
114
115
|
- **Tabla**: `fe-table-select` para la columna de casillas, `data-selected` en
|
|
115
116
|
la fila, `fe-bulk-bar` para lo que se hace con la selección y
|
|
116
|
-
`fe-table-resizer` para cambiar el ancho de una columna.
|
|
117
|
+
`fe-table-resizer` para cambiar el ancho de una columna. Una columna
|
|
118
|
+
ordenable lleva `aria-sort` en el `<th>` y dentro un `<button
|
|
119
|
+
class="fe-table-sort">`, para que se ordene también con el teclado.
|
|
120
|
+
- **Listado**: `fe-datatable` agrupa la `fe-toolbar` (con un
|
|
121
|
+
`fe-toolbar-spacer` que empuja lo que va a la derecha), el panel
|
|
122
|
+
`fe-datatable-filters`, la tabla dentro de un `fe-table-container` y el
|
|
123
|
+
`fe-table-footer` con el resumen y el `fe-table-pager`. El contenedor se
|
|
124
|
+
desplaza en horizontal cuando la tabla no cabe; para que además la cabecera
|
|
125
|
+
fija funcione al bajar, dale una altura máxima con
|
|
126
|
+
`--fe-table-max-height: 70vh`.
|
|
117
127
|
|
|
118
128
|
Un `<dialog>` cerrado está oculto porque el navegador le pone `display: none`;
|
|
119
129
|
por eso ninguna regla fija `display` fuera del estado `[open]`. Las capas que no
|
package/package.json
CHANGED
package/src/components.css
CHANGED
|
@@ -172,6 +172,10 @@
|
|
|
172
172
|
.fe-select,
|
|
173
173
|
.fe-textarea,
|
|
174
174
|
.fe-file {
|
|
175
|
+
/* Con width: 100% y padding, sin border-box el control mide más que su
|
|
176
|
+
contenedor. Una aplicación que ya pone border-box a todo no lo nota; una
|
|
177
|
+
que no, ve una barra de desplazamiento en cada drawer. */
|
|
178
|
+
box-sizing: border-box;
|
|
175
179
|
width: 100%;
|
|
176
180
|
min-height: var(--fe-control-height);
|
|
177
181
|
padding: 0 var(--fe-control-padding-x);
|
|
@@ -271,6 +275,7 @@
|
|
|
271
275
|
.fe-button-secondary,
|
|
272
276
|
.fe-button-danger,
|
|
273
277
|
.fe-button-link {
|
|
278
|
+
box-sizing: border-box;
|
|
274
279
|
display: inline-flex;
|
|
275
280
|
align-items: center;
|
|
276
281
|
justify-content: center;
|
|
@@ -332,6 +337,7 @@
|
|
|
332
337
|
/* Un botón que solo lleva un icono: cerrar un diálogo, abrir el menú de una
|
|
333
338
|
fila. Cuadrado, para que el objetivo no dependa del ancho del glifo. */
|
|
334
339
|
.fe-icon-button {
|
|
340
|
+
box-sizing: border-box;
|
|
335
341
|
display: inline-flex;
|
|
336
342
|
align-items: center;
|
|
337
343
|
justify-content: center;
|
|
@@ -625,6 +631,7 @@
|
|
|
625
631
|
}
|
|
626
632
|
|
|
627
633
|
.fe-dialog {
|
|
634
|
+
box-sizing: border-box;
|
|
628
635
|
width: min(var(--fe-dialog-width), calc(100vw - 2 * var(--fe-space-4)));
|
|
629
636
|
max-height: 85vh;
|
|
630
637
|
padding: 0;
|
|
@@ -694,6 +701,7 @@
|
|
|
694
701
|
/* Un drawer es un <dialog> pegado a un borde. El formulario de crear o
|
|
695
702
|
editar se abre aquí y la tabla sigue a la vista, detrás. */
|
|
696
703
|
.fe-drawer {
|
|
704
|
+
box-sizing: border-box;
|
|
697
705
|
width: min(var(--fe-drawer-width), 100vw);
|
|
698
706
|
max-width: 100vw;
|
|
699
707
|
height: 100dvh;
|
|
@@ -803,6 +811,7 @@
|
|
|
803
811
|
}
|
|
804
812
|
|
|
805
813
|
.fe-menu-item {
|
|
814
|
+
box-sizing: border-box;
|
|
806
815
|
display: flex;
|
|
807
816
|
align-items: center;
|
|
808
817
|
gap: var(--fe-space-2);
|
|
@@ -892,6 +901,7 @@
|
|
|
892
901
|
}
|
|
893
902
|
|
|
894
903
|
.fe-command-input {
|
|
904
|
+
box-sizing: border-box;
|
|
895
905
|
width: 100%;
|
|
896
906
|
min-height: calc(var(--fe-control-height) * 1.4);
|
|
897
907
|
padding: 0 var(--fe-space-5);
|
|
@@ -928,6 +938,7 @@
|
|
|
928
938
|
}
|
|
929
939
|
|
|
930
940
|
.fe-command-item {
|
|
941
|
+
box-sizing: border-box;
|
|
931
942
|
display: flex;
|
|
932
943
|
align-items: center;
|
|
933
944
|
gap: var(--fe-space-3);
|
|
@@ -1155,6 +1166,94 @@
|
|
|
1155
1166
|
font-variant-numeric: tabular-nums;
|
|
1156
1167
|
}
|
|
1157
1168
|
|
|
1169
|
+
/*
|
|
1170
|
+
* Ordenar tiene que poderse hacer con el teclado, así que dentro del <th> va
|
|
1171
|
+
* un botón. Hereda todo de la cabecera para no parecer un botón del navegador.
|
|
1172
|
+
*/
|
|
1173
|
+
.fe-table-sort {
|
|
1174
|
+
display: inline-flex;
|
|
1175
|
+
align-items: center;
|
|
1176
|
+
gap: var(--fe-space-1);
|
|
1177
|
+
padding: 0;
|
|
1178
|
+
font: inherit;
|
|
1179
|
+
letter-spacing: inherit;
|
|
1180
|
+
text-transform: inherit;
|
|
1181
|
+
color: inherit;
|
|
1182
|
+
background: none;
|
|
1183
|
+
border: none;
|
|
1184
|
+
cursor: pointer;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.fe-table-sort:focus-visible {
|
|
1188
|
+
outline: 2px solid var(--fe-focus);
|
|
1189
|
+
outline-offset: 2px;
|
|
1190
|
+
border-radius: var(--fe-radius-sm);
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/* Mientras llega la página siguiente, la actual se sigue viendo, atenuada. */
|
|
1194
|
+
.fe-table[aria-busy='true'] tbody {
|
|
1195
|
+
opacity: 0.6;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/*
|
|
1199
|
+
* Una tabla más ancha que la pantalla se desplaza dentro de su contenedor, no
|
|
1200
|
+
* ensancha la página. Con una altura máxima, la cabecera fija también funciona
|
|
1201
|
+
* al bajar por un listado largo.
|
|
1202
|
+
*/
|
|
1203
|
+
.fe-table-container {
|
|
1204
|
+
max-width: 100%;
|
|
1205
|
+
max-height: var(--fe-table-max-height);
|
|
1206
|
+
overflow: auto;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/* ============================================================
|
|
1210
|
+
LISTADO
|
|
1211
|
+
============================================================ */
|
|
1212
|
+
|
|
1213
|
+
/* Barra, filtros, tabla y pie de un listado, uno debajo de otro. */
|
|
1214
|
+
.fe-datatable {
|
|
1215
|
+
display: flex;
|
|
1216
|
+
flex-direction: column;
|
|
1217
|
+
min-width: 0;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
/* Lo que va detrás del separador en una barra se queda a la derecha. */
|
|
1221
|
+
.fe-toolbar-spacer {
|
|
1222
|
+
flex: 1 1 auto;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
.fe-datatable > .fe-bulk-bar {
|
|
1226
|
+
margin: var(--fe-space-2);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
.fe-datatable-filters {
|
|
1230
|
+
padding: var(--fe-space-4);
|
|
1231
|
+
border-bottom: 1px solid var(--fe-border);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.fe-table-footer {
|
|
1235
|
+
display: flex;
|
|
1236
|
+
flex-wrap: wrap;
|
|
1237
|
+
align-items: center;
|
|
1238
|
+
justify-content: space-between;
|
|
1239
|
+
gap: var(--fe-space-3);
|
|
1240
|
+
padding: var(--fe-space-2) var(--fe-space-4);
|
|
1241
|
+
font-size: var(--fe-text-sm);
|
|
1242
|
+
font-variant-numeric: tabular-nums;
|
|
1243
|
+
color: var(--fe-text-muted);
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
.fe-table-pager {
|
|
1247
|
+
display: flex;
|
|
1248
|
+
align-items: center;
|
|
1249
|
+
gap: var(--fe-space-2);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/* En un formulario ocupa todo el ancho; aquí empujaría las flechas fuera. */
|
|
1253
|
+
.fe-table-pager .fe-select {
|
|
1254
|
+
width: auto;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1158
1257
|
/* ============================================================
|
|
1159
1258
|
EDICION EN LINEA
|
|
1160
1259
|
============================================================ */
|
|
@@ -1168,6 +1267,14 @@
|
|
|
1168
1267
|
min-height: 1.5em;
|
|
1169
1268
|
padding: 0 var(--fe-space-1);
|
|
1170
1269
|
margin: 0 calc(-1 * var(--fe-space-1));
|
|
1270
|
+
/* Es un <button> para que se alcance con teclado, pero tiene que leerse
|
|
1271
|
+
como el texto que muestra: sin el fondo, el borde ni la fuente que el
|
|
1272
|
+
navegador le pone a un botón. */
|
|
1273
|
+
font: inherit;
|
|
1274
|
+
color: inherit;
|
|
1275
|
+
text-align: left;
|
|
1276
|
+
background: none;
|
|
1277
|
+
border: none;
|
|
1171
1278
|
border-radius: var(--fe-radius-sm);
|
|
1172
1279
|
border-bottom: 1px dashed transparent;
|
|
1173
1280
|
cursor: text;
|
package/src/theme.js
CHANGED
|
@@ -128,6 +128,13 @@ export const defaultTheme = {
|
|
|
128
128
|
tableEmpty: 'fe-table-empty',
|
|
129
129
|
bulkBar: 'fe-bulk-bar',
|
|
130
130
|
bulkCount: 'fe-bulk-count',
|
|
131
|
+
tableSort: 'fe-table-sort',
|
|
132
|
+
tableContainer: 'fe-table-container',
|
|
133
|
+
tableFooter: 'fe-table-footer',
|
|
134
|
+
tablePager: 'fe-table-pager',
|
|
135
|
+
datatable: 'fe-datatable',
|
|
136
|
+
datatableFilters: 'fe-datatable-filters',
|
|
137
|
+
toolbarSpacer: 'fe-toolbar-spacer',
|
|
131
138
|
|
|
132
139
|
// EDICION EN LINEA
|
|
133
140
|
editable: 'fe-editable',
|
package/src/tokens.css
CHANGED
|
@@ -128,6 +128,9 @@
|
|
|
128
128
|
--fe-drawer-width: 32rem;
|
|
129
129
|
--fe-command-width: 40rem;
|
|
130
130
|
--fe-sidebar-width: 15rem;
|
|
131
|
+
/* Sin límite, la tabla crece con sus filas; con uno, la cabecera fija
|
|
132
|
+
funciona también al bajar por el listado. */
|
|
133
|
+
--fe-table-max-height: none;
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
/* La elección explícita de claro gana sobre un sistema en oscuro, de ahí el
|