capibara 1.3.79 → 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 +65 -21
- package/src/util/tableElements.js +5 -5
package/package.json
CHANGED
|
@@ -8,12 +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
|
-
|
|
14
|
-
width: fit-content;
|
|
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);
|
|
15
14
|
min-width: min(18rem, calc(100vw - 2rem));
|
|
16
|
-
max-width: min(
|
|
15
|
+
max-width: min(42rem, calc(100vw - 2rem));
|
|
17
16
|
border: 1px solid grey;
|
|
18
17
|
padding: 0.75em;
|
|
19
18
|
display: flex;
|
|
@@ -242,27 +241,60 @@
|
|
|
242
241
|
}
|
|
243
242
|
}
|
|
244
243
|
|
|
245
|
-
&.
|
|
246
|
-
max-height: 60vh;
|
|
244
|
+
&.detail-grid {
|
|
247
245
|
display: grid;
|
|
248
|
-
grid-template-columns: repeat(
|
|
249
|
-
|
|
250
|
-
row-gap: 4px;
|
|
246
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
|
|
247
|
+
gap: 0.5rem 1rem;
|
|
251
248
|
|
|
252
|
-
// Una sola cápsula
|
|
253
|
-
&.single
|
|
249
|
+
// Una sola cápsula debe ocupar todo el ancho disponible.
|
|
250
|
+
&.detail-grid--single {
|
|
254
251
|
grid-template-columns: minmax(0, 1fr);
|
|
255
252
|
}
|
|
256
253
|
|
|
257
|
-
// En pantallas intermedias se reduce la cantidad de columnas antes de
|
|
258
|
-
// que el contenido quede ilegible.
|
|
259
|
-
@media screen and (max-width: 959px) {
|
|
260
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
254
|
@media screen and (max-width: 600px) {
|
|
264
255
|
grid-template-columns: minmax(0, 1fr);
|
|
265
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
|
+
}
|
|
266
298
|
}
|
|
267
299
|
|
|
268
300
|
&.flex {
|
|
@@ -366,9 +398,15 @@
|
|
|
366
398
|
.alert {
|
|
367
399
|
padding: 0.5em 0px 0.25em 2em;
|
|
368
400
|
position: relative;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
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;
|
|
372
410
|
.alert-icon {
|
|
373
411
|
max-width: 2em;
|
|
374
412
|
font-size: 1.75em;
|
|
@@ -430,6 +468,12 @@
|
|
|
430
468
|
.item-detail {
|
|
431
469
|
background: mapGet($theme, detailDay, item, background);
|
|
432
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
|
+
}
|
|
433
477
|
&.list {
|
|
434
478
|
.item-detail {
|
|
435
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
|