capibara 1.3.78 → 1.3.80
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.js +5 -5
- package/package.json +1 -1
- package/src/scss/layout/_detail_day.scss +66 -20
- package/src/util/tableElements.js +5 -5
package/package.json
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
// max-height: min(calc(100% - 0px), 600px);
|
|
9
9
|
//min-width: 250px;
|
|
10
10
|
//max-width: 400px;
|
|
11
|
-
// El
|
|
12
|
-
//
|
|
13
|
-
width:
|
|
14
|
-
|
|
11
|
+
// El ancho se ajusta al viewport sin que un aviso largo controle la
|
|
12
|
+
// geometría. El mínimo deja dos columnas compactas en escritorio.
|
|
13
|
+
width: clamp(20rem, 42vw, 36rem);
|
|
14
|
+
min-width: min(18rem, calc(100vw - 2rem));
|
|
15
|
+
max-width: min(42rem, calc(100vw - 2rem));
|
|
15
16
|
border: 1px solid grey;
|
|
16
17
|
padding: 0.75em;
|
|
17
18
|
display: flex;
|
|
@@ -240,27 +241,60 @@
|
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
|
|
243
|
-
&.
|
|
244
|
-
max-height: 60vh;
|
|
244
|
+
&.detail-grid {
|
|
245
245
|
display: grid;
|
|
246
|
-
grid-template-columns: repeat(
|
|
247
|
-
|
|
248
|
-
row-gap: 4px;
|
|
246
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
|
|
247
|
+
gap: 0.5rem 1rem;
|
|
249
248
|
|
|
250
|
-
// Una sola cápsula
|
|
251
|
-
&.single
|
|
249
|
+
// Una sola cápsula debe ocupar todo el ancho disponible.
|
|
250
|
+
&.detail-grid--single {
|
|
252
251
|
grid-template-columns: minmax(0, 1fr);
|
|
253
252
|
}
|
|
254
253
|
|
|
255
|
-
// En pantallas intermedias se reduce la cantidad de columnas antes de
|
|
256
|
-
// que el contenido quede ilegible.
|
|
257
|
-
@media screen and (max-width: 959px) {
|
|
258
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
259
|
-
}
|
|
260
|
-
|
|
261
254
|
@media screen and (max-width: 600px) {
|
|
262
255
|
grid-template-columns: minmax(0, 1fr);
|
|
263
256
|
}
|
|
257
|
+
|
|
258
|
+
.item-detail {
|
|
259
|
+
margin: 0;
|
|
260
|
+
padding: 0.5rem 0.75rem 0.625rem 1rem;
|
|
261
|
+
border: 0;
|
|
262
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
263
|
+
border-radius: 0;
|
|
264
|
+
background: transparent;
|
|
265
|
+
|
|
266
|
+
.name {
|
|
267
|
+
margin-bottom: 0.375rem;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.item-description {
|
|
271
|
+
display: grid;
|
|
272
|
+
// Dos medidas caben dentro de una cápsula de escritorio. Cada una
|
|
273
|
+
// mantiene número y unidad como una sola pieza visual.
|
|
274
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.75rem), 1fr));
|
|
275
|
+
// Separa visualmente las métricas sin perder las dos columnas
|
|
276
|
+
// dentro de una cápsula de riego.
|
|
277
|
+
gap: 0.375rem 1rem;
|
|
278
|
+
align-items: baseline;
|
|
279
|
+
|
|
280
|
+
.desc {
|
|
281
|
+
min-width: 0;
|
|
282
|
+
margin: 0;
|
|
283
|
+
padding-inline: 0.125rem;
|
|
284
|
+
|
|
285
|
+
&.is-measurement {
|
|
286
|
+
white-space: nowrap;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.value,
|
|
290
|
+
.suffix,
|
|
291
|
+
.prefix {
|
|
292
|
+
overflow-wrap: normal;
|
|
293
|
+
word-break: normal;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
264
298
|
}
|
|
265
299
|
|
|
266
300
|
&.flex {
|
|
@@ -364,9 +398,15 @@
|
|
|
364
398
|
.alert {
|
|
365
399
|
padding: 0.5em 0px 0.25em 2em;
|
|
366
400
|
position: relative;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
401
|
+
// El aviso se renderiza fuera de .list-detail: debe ocupar una fila
|
|
402
|
+
// propia bajo las cápsulas, sin imponer su ancho al panel ni cortar el
|
|
403
|
+
// texto que contiene la explicación de la alerta.
|
|
404
|
+
width: 100%;
|
|
405
|
+
box-sizing: border-box;
|
|
406
|
+
min-width: 0;
|
|
407
|
+
max-width: 100%;
|
|
408
|
+
overflow-wrap: anywhere;
|
|
409
|
+
word-break: normal;
|
|
370
410
|
.alert-icon {
|
|
371
411
|
max-width: 2em;
|
|
372
412
|
font-size: 1.75em;
|
|
@@ -428,6 +468,12 @@
|
|
|
428
468
|
.item-detail {
|
|
429
469
|
background: mapGet($theme, detailDay, item, background);
|
|
430
470
|
}
|
|
471
|
+
&.detail-grid {
|
|
472
|
+
.item-detail {
|
|
473
|
+
// El divisor debe conservar contraste con el fondo de cada tema.
|
|
474
|
+
border-top-color: mapGet($theme, detailDay, border);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
431
477
|
&.list {
|
|
432
478
|
.item-detail {
|
|
433
479
|
border-color: mapGet($theme, detailDay, border);
|
|
@@ -2921,7 +2921,7 @@ export default {
|
|
|
2921
2921
|
</div>
|
|
2922
2922
|
</div>
|
|
2923
2923
|
|
|
2924
|
-
<div class="list-detail
|
|
2924
|
+
<div class="list-detail detail-grid">`;
|
|
2925
2925
|
|
|
2926
2926
|
//CAPSULES
|
|
2927
2927
|
let visibleItemsCount = 0; // Contador de elementos visibles
|
|
@@ -3031,7 +3031,7 @@ export default {
|
|
|
3031
3031
|
|
|
3032
3032
|
if (outputValue) {
|
|
3033
3033
|
str += `
|
|
3034
|
-
<div class="desc">
|
|
3034
|
+
<div class="desc ${v.prefix || v.suffix ? "is-measurement" : ""}">
|
|
3035
3035
|
<span class="prefix">
|
|
3036
3036
|
${v.prefix || ""}
|
|
3037
3037
|
</span>
|
|
@@ -3058,9 +3058,9 @@ export default {
|
|
|
3058
3058
|
// Agregar clase single-item si solo hay un elemento visible
|
|
3059
3059
|
const columnClass =
|
|
3060
3060
|
visibleItemsCount === 1
|
|
3061
|
-
? "
|
|
3062
|
-
: "
|
|
3063
|
-
str = str.replace("
|
|
3061
|
+
? "detail-grid detail-grid--single"
|
|
3062
|
+
: "detail-grid";
|
|
3063
|
+
str = str.replace("detail-grid", columnClass);
|
|
3064
3064
|
|
|
3065
3065
|
str += `
|
|
3066
3066
|
</div>`; // list-detail
|