@higinio/design-mcp 0.1.0 → 0.2.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/LICENSE +4 -4
- package/README.md +11 -8
- package/assets/bruma/design-doc.md +1083 -0
- package/assets/bruma/framework.css +1374 -0
- package/assets/bruma/styleguide.html +4687 -0
- package/assets/bruma/tailwind.css +121 -0
- package/assets/bruma/tokens.css +147 -0
- package/assets/bruma/tokens.json +995 -0
- package/assets/celeste/design-doc.md +183 -17
- package/assets/celeste/framework.css +440 -3
- package/assets/celeste/styleguide.html +1534 -64
- package/assets/celeste/tailwind.css +4 -0
- package/assets/nocturna/design-doc.md +237 -47
- package/assets/nocturna/framework.css +429 -15
- package/assets/nocturna/styleguide.html +1521 -137
- package/assets/nocturna/tailwind.css +8 -2
- package/assets/nocturna/tokens.css +22 -11
- package/assets/nocturna/tokens.json +26 -1
- package/assets/salvia/design-doc.md +1067 -0
- package/assets/salvia/framework.css +1370 -0
- package/assets/salvia/styleguide.html +4670 -0
- package/assets/salvia/tailwind.css +121 -0
- package/assets/salvia/tokens.css +143 -0
- package/assets/salvia/tokens.json +1023 -0
- package/dist/cli.js +7 -5
- package/dist/doc.js +18 -4
- package/dist/preflight.js +2 -1
- package/dist/server.js +7 -7
- package/dist/slop.js +3 -3
- package/dist/systems.js +27 -1
- package/dist/validate.js +13 -5
- package/package.json +3 -3
|
@@ -304,6 +304,8 @@
|
|
|
304
304
|
.field__help { font-size: var(--text-sm); color: var(--text-muted); }
|
|
305
305
|
.field__error { font-size: var(--text-sm); color: var(--danger-500); display: inline-flex; align-items: center; gap: 6px; }
|
|
306
306
|
.field__error svg { width: 14px; height: 14px; flex: none; }
|
|
307
|
+
/* Campo obligatorio (§10.4): asterisco decorativo; el input lleva required/aria-required */
|
|
308
|
+
.field--required .field__label::after { content: " *"; color: var(--danger-500); }
|
|
307
309
|
|
|
308
310
|
.input, .textarea, .select {
|
|
309
311
|
width: 100%; font-family: var(--font-body); font-size: var(--text-base);
|
|
@@ -333,7 +335,7 @@
|
|
|
333
335
|
.input-icon .input { padding-left: 40px; }
|
|
334
336
|
|
|
335
337
|
.textarea { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: var(--leading-base); }
|
|
336
|
-
.textarea-counter { font-size: var(--text-xs); color: var(--text-
|
|
338
|
+
.textarea-counter { font-size: var(--text-xs); color: var(--text-muted); text-align: right; }
|
|
337
339
|
|
|
338
340
|
.select-wrap { position: relative; }
|
|
339
341
|
.select { appearance: none; padding-right: 38px; cursor: pointer; }
|
|
@@ -421,6 +423,15 @@
|
|
|
421
423
|
.checkbox input:checked ~ .checkbox__box svg { stroke-dashoffset: 0; }
|
|
422
424
|
.checkbox input:focus-visible ~ .checkbox__box { box-shadow: var(--ring); }
|
|
423
425
|
.checkbox input:disabled ~ * { opacity: .5; cursor: not-allowed; }
|
|
426
|
+
/* Estado indeterminate (§10.9): guion horizontal para "seleccionar todo" parcial */
|
|
427
|
+
.checkbox__box { position: relative; }
|
|
428
|
+
.checkbox input:indeterminate ~ .checkbox__box { background: var(--accent); border-color: var(--accent); }
|
|
429
|
+
.checkbox input:indeterminate ~ .checkbox__box svg { visibility: hidden; }
|
|
430
|
+
.checkbox input:indeterminate ~ .checkbox__box::after {
|
|
431
|
+
content: ""; position: absolute; top: 50%; left: 50%;
|
|
432
|
+
width: 10px; height: 2px;
|
|
433
|
+
background: var(--text-on-primary); transform: translate(-50%, -50%);
|
|
434
|
+
}
|
|
424
435
|
|
|
425
436
|
.radio__dot {
|
|
426
437
|
width: 20px; height: 20px; flex: none; display: grid; place-items: center;
|
|
@@ -526,6 +537,19 @@
|
|
|
526
537
|
.avatar__dot--busy { background: var(--danger-500); }
|
|
527
538
|
.avatar__dot--away { background: var(--warning-500); }
|
|
528
539
|
|
|
540
|
+
/* AvatarGroup (§10.27): stack solapado con anillo de superficie */
|
|
541
|
+
.avatar-group { display: inline-flex; align-items: center; }
|
|
542
|
+
.avatar-group .avatar { border: 2px solid var(--surface); border-radius: var(--radius-full); }
|
|
543
|
+
.avatar-group .avatar + .avatar,
|
|
544
|
+
.avatar-group .avatar-group__more { margin-left: -8px; }
|
|
545
|
+
.avatar-group__more {
|
|
546
|
+
display: grid; place-items: center; flex: none;
|
|
547
|
+
width: 36px; height: 36px; border-radius: var(--radius-full);
|
|
548
|
+
border: 2px solid var(--surface);
|
|
549
|
+
background: var(--accent-soft-strong); color: var(--text-on-primary-solid);
|
|
550
|
+
font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--weight-semibold);
|
|
551
|
+
}
|
|
552
|
+
|
|
529
553
|
.divider { border: 0; border-top: var(--border-width) solid var(--border); margin: var(--space-4) 0; }
|
|
530
554
|
.divider--label {
|
|
531
555
|
display: flex; align-items: center; gap: 12px; border: 0; margin: var(--space-4) 0;
|
|
@@ -610,7 +634,7 @@
|
|
|
610
634
|
}
|
|
611
635
|
.alert > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
|
|
612
636
|
.alert__title { font-weight: var(--weight-semibold); margin: 0 0 2px; }
|
|
613
|
-
.alert__body {
|
|
637
|
+
.alert__body { margin: 0; }
|
|
614
638
|
.alert__close {
|
|
615
639
|
margin-left: auto; flex: none; display: grid; place-items: center;
|
|
616
640
|
width: 24px; height: 24px; border: 0; border-radius: var(--radius-sm);
|
|
@@ -787,6 +811,30 @@
|
|
|
787
811
|
.table tbody tr.is-selected { background: var(--accent-soft); }
|
|
788
812
|
.table .num, .table td.num, .table th.num { text-align: right; font-family: var(--font-mono); }
|
|
789
813
|
|
|
814
|
+
/* Variantes de tabla (§10.21): zebra, sticky header, orden y selección */
|
|
815
|
+
.table--zebra tbody tr:nth-child(even) { background: var(--surface-alt); }
|
|
816
|
+
.table--zebra tbody tr:nth-child(even):hover { background: var(--bg); }
|
|
817
|
+
.table--sticky thead th { position: sticky; top: 0; z-index: 1; }
|
|
818
|
+
.table tbody tr.row--selected,
|
|
819
|
+
.table tbody tr.row--selected:hover { background: var(--accent-soft); }
|
|
820
|
+
.table .col-select { width: 44px; text-align: center; }
|
|
821
|
+
.table .col-select .checkbox { display: inline-flex; justify-content: center; gap: 0; }
|
|
822
|
+
|
|
823
|
+
.th-sort {
|
|
824
|
+
display: inline-flex; align-items: center; gap: 6px; width: 100%;
|
|
825
|
+
border: 0; background: transparent; cursor: pointer;
|
|
826
|
+
font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left;
|
|
827
|
+
}
|
|
828
|
+
.th-sort--num { justify-content: flex-end; }
|
|
829
|
+
.th-sort .sort-icon {
|
|
830
|
+
width: 14px; height: 14px; flex: none; opacity: .35;
|
|
831
|
+
transition: opacity var(--duration-fast) var(--ease-out),
|
|
832
|
+
transform var(--duration-base) var(--ease-out);
|
|
833
|
+
}
|
|
834
|
+
.table th[aria-sort="ascending"] .sort-icon,
|
|
835
|
+
.table th[aria-sort="descending"] .sort-icon { opacity: 1; color: var(--accent); }
|
|
836
|
+
.table th[aria-sort="descending"] .sort-icon { transform: rotate(180deg); }
|
|
837
|
+
|
|
790
838
|
.stat__label {
|
|
791
839
|
display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px;
|
|
792
840
|
font-size: var(--text-sm); color: var(--text-muted);
|
|
@@ -807,6 +855,32 @@
|
|
|
807
855
|
.stat__delta--up { color: var(--success-text); }
|
|
808
856
|
.stat__delta--down { color: var(--danger-text); }
|
|
809
857
|
|
|
858
|
+
/* Chip de métrica (§10.22): rótulo y valor en una pastilla de una línea */
|
|
859
|
+
.metric-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
|
860
|
+
.metric-chip {
|
|
861
|
+
display: inline-flex; align-items: center; gap: var(--space-2);
|
|
862
|
+
padding: var(--space-1) var(--space-3);
|
|
863
|
+
border: var(--border-width) solid var(--border); border-radius: var(--radius-full);
|
|
864
|
+
background: var(--surface);
|
|
865
|
+
font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.5;
|
|
866
|
+
color: var(--text-secondary); white-space: nowrap;
|
|
867
|
+
}
|
|
868
|
+
.metric-chip svg { width: 16px; height: 16px; flex: none; color: var(--text-muted); }
|
|
869
|
+
.metric-chip__value {
|
|
870
|
+
font-weight: var(--weight-semibold); color: var(--link);
|
|
871
|
+
font-variant-numeric: tabular-nums;
|
|
872
|
+
}
|
|
873
|
+
button.metric-chip {
|
|
874
|
+
min-height: var(--control-height-md); padding-inline: var(--space-4);
|
|
875
|
+
cursor: pointer; text-align: left;
|
|
876
|
+
transition: background-color var(--duration-fast) var(--ease-out),
|
|
877
|
+
border-color var(--duration-fast) var(--ease-out),
|
|
878
|
+
transform var(--duration-instant) var(--ease-out);
|
|
879
|
+
}
|
|
880
|
+
button.metric-chip:hover { background: var(--accent-soft); border-color: var(--accent); }
|
|
881
|
+
button.metric-chip:active { background: var(--accent-soft-strong); transform: scale(.98); }
|
|
882
|
+
button.metric-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
883
|
+
|
|
810
884
|
.pagination { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
|
|
811
885
|
.pagination__btn {
|
|
812
886
|
display: inline-grid; place-items: center;
|
|
@@ -855,7 +929,7 @@
|
|
|
855
929
|
.sidebar__item {
|
|
856
930
|
display: flex; align-items: center; gap: 10px;
|
|
857
931
|
padding: 10px 12px; border-radius: var(--radius-md);
|
|
858
|
-
font-size: var(--text-sm); font-weight: var(--weight-medium);
|
|
932
|
+
font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--weight-medium);
|
|
859
933
|
color: var(--text-secondary); text-decoration: none; border: 0; background: transparent;
|
|
860
934
|
cursor: pointer; text-align: left; width: 100%;
|
|
861
935
|
transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
|
|
@@ -865,6 +939,68 @@
|
|
|
865
939
|
.sidebar__item.is-active { background: var(--accent-soft-strong); color: var(--link); }
|
|
866
940
|
.sidebar__item.is-active svg { color: var(--accent); }
|
|
867
941
|
|
|
942
|
+
/* Grupos con rótulo dentro del sidebar */
|
|
943
|
+
.sidebar__group { display: flex; flex-direction: column; gap: 2px; }
|
|
944
|
+
.sidebar__group + .sidebar__group { margin-top: var(--space-4); }
|
|
945
|
+
.sidebar__group-label {
|
|
946
|
+
padding: 0 12px var(--space-1);
|
|
947
|
+
font-size: var(--text-xs); font-weight: var(--weight-semibold);
|
|
948
|
+
text-transform: uppercase; letter-spacing: var(--tracking-label);
|
|
949
|
+
color: var(--text-muted); white-space: nowrap;
|
|
950
|
+
}
|
|
951
|
+
.sidebar__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
952
|
+
|
|
953
|
+
/* Sidebar contraíble (§10.24): expandido 260 px, riel de iconos de 64 px.
|
|
954
|
+
El ancho cambia sin transición; solo los rótulos se funden con opacity y transform. */
|
|
955
|
+
.sidebar--collapsible .sidebar__label {
|
|
956
|
+
transition: opacity var(--duration-fast) var(--ease-out),
|
|
957
|
+
transform var(--duration-fast) var(--ease-out);
|
|
958
|
+
}
|
|
959
|
+
.sidebar__toggle { margin-top: auto; }
|
|
960
|
+
.sidebar.is-collapsed { width: 64px; padding-inline: var(--space-3); }
|
|
961
|
+
.sidebar.is-collapsed .sidebar__item { position: relative; justify-content: center; padding-inline: 0; }
|
|
962
|
+
.sidebar.is-collapsed .sidebar__toggle svg { transform: rotate(180deg); }
|
|
963
|
+
.sidebar.is-collapsed .sidebar__group + .sidebar__group { margin-top: var(--space-2); }
|
|
964
|
+
/* En el riel, el rótulo de grupo es un separador de 1 px; su texto sigue en el árbol de accesibilidad */
|
|
965
|
+
.sidebar.is-collapsed .sidebar__group-label {
|
|
966
|
+
height: 1px; padding: 0; margin: 0 var(--space-2) var(--space-2);
|
|
967
|
+
overflow: hidden; color: transparent; background: var(--border);
|
|
968
|
+
}
|
|
969
|
+
/* Oculto a la vista pero accesible (patrón de .u-visually-hidden) */
|
|
970
|
+
.sidebar.is-collapsed .sidebar__label,
|
|
971
|
+
.sidebar.is-collapsed .sidebar__group:first-child > .sidebar__group-label {
|
|
972
|
+
position: absolute; width: 1px; height: 1px; margin: -1px;
|
|
973
|
+
clip-path: inset(50%); overflow: hidden; white-space: nowrap;
|
|
974
|
+
}
|
|
975
|
+
.sidebar.is-collapsed .sidebar__label {
|
|
976
|
+
border-radius: var(--radius-sm); background: var(--tooltip-bg); color: var(--tooltip-text);
|
|
977
|
+
font-size: var(--text-xs); line-height: 16px;
|
|
978
|
+
pointer-events: none; z-index: 70;
|
|
979
|
+
opacity: 0; transform: translateX(-4px);
|
|
980
|
+
}
|
|
981
|
+
/* Tooltip del riel: el propio rótulo aparece a la derecha del ítem, también con teclado */
|
|
982
|
+
.sidebar.is-collapsed .sidebar__item:focus-visible .sidebar__label {
|
|
983
|
+
left: calc(100% + 8px); top: calc(50% - 14px); width: auto; height: auto;
|
|
984
|
+
margin: 0; padding: 6px 10px; clip-path: none; overflow: visible;
|
|
985
|
+
opacity: 1; transform: none; transition-delay: 400ms;
|
|
986
|
+
}
|
|
987
|
+
/* Por hover solo con puntero real — en touch quedaría pegado tras el tap */
|
|
988
|
+
@media (hover: hover) and (pointer: fine) {
|
|
989
|
+
.sidebar.is-collapsed .sidebar__item:hover .sidebar__label {
|
|
990
|
+
left: calc(100% + 8px); top: calc(50% - 14px); width: auto; height: auto;
|
|
991
|
+
margin: 0; padding: 6px 10px; clip-path: none; overflow: visible;
|
|
992
|
+
opacity: 1; transform: none; transition-delay: 400ms;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
/* Por debajo de 768 px la navegación vive en un Drawer --left (§10.29), que abre el botón ☰
|
|
996
|
+
.sidebar-trigger (combinado con .icon-btn); desde 768 px el sidebar es fijo y el botón sobra */
|
|
997
|
+
@media (max-width: 767px) {
|
|
998
|
+
.sidebar--collapsible { display: none; }
|
|
999
|
+
}
|
|
1000
|
+
@media (min-width: 768px) {
|
|
1001
|
+
.sidebar-trigger { display: none; }
|
|
1002
|
+
}
|
|
1003
|
+
|
|
868
1004
|
.tabs { display: flex; gap: var(--space-6); border-bottom: var(--border-width) solid var(--border); }
|
|
869
1005
|
.tabs__tab {
|
|
870
1006
|
padding: 12px 4px; margin-bottom: -1px;
|
|
@@ -902,6 +1038,307 @@
|
|
|
902
1038
|
border-radius: var(--radius-sm); padding: 1px 6px;
|
|
903
1039
|
}
|
|
904
1040
|
|
|
1041
|
+
/* --------------------------------------------------------------------------
|
|
1042
|
+
13b. COMBOBOX · BÚSQUEDA · DRAWER · POPOVER · BUTTONGROUP (§10.28–10.31)
|
|
1043
|
+
-------------------------------------------------------------------------- */
|
|
1044
|
+
|
|
1045
|
+
/* Combobox / Autocomplete (§10.28) */
|
|
1046
|
+
.combobox { position: relative; }
|
|
1047
|
+
.combobox__input {
|
|
1048
|
+
width: 100%; height: var(--control-height-md); padding: 0 14px;
|
|
1049
|
+
font-family: var(--font-body); font-size: var(--text-base);
|
|
1050
|
+
color: var(--text-primary); background: var(--surface);
|
|
1051
|
+
border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm);
|
|
1052
|
+
transition: border-color var(--duration-fast) var(--ease-out),
|
|
1053
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
1054
|
+
}
|
|
1055
|
+
.combobox__input:hover:not(:disabled):not(:focus) { border-color: var(--text-disabled); }
|
|
1056
|
+
.combobox__input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
|
|
1057
|
+
.combobox__input:disabled { background: var(--surface-alt); color: var(--text-disabled); cursor: not-allowed; }
|
|
1058
|
+
.combobox__list {
|
|
1059
|
+
position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
|
|
1060
|
+
max-height: 264px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
|
|
1061
|
+
background: var(--surface); border: var(--border-width) solid var(--border);
|
|
1062
|
+
border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
|
|
1063
|
+
opacity: 0; transform: translateY(-4px); pointer-events: none;
|
|
1064
|
+
transition: opacity var(--duration-base) var(--ease-out),
|
|
1065
|
+
transform var(--duration-base) var(--ease-out);
|
|
1066
|
+
}
|
|
1067
|
+
.combobox.is-open .combobox__list { opacity: 1; transform: none; pointer-events: auto; }
|
|
1068
|
+
.combobox__option {
|
|
1069
|
+
display: flex; align-items: center; gap: 8px;
|
|
1070
|
+
padding: 10px 12px; border-radius: var(--radius-sm);
|
|
1071
|
+
font-size: var(--text-sm); color: var(--text-primary); cursor: pointer;
|
|
1072
|
+
transition: background-color var(--duration-fast) var(--ease-out);
|
|
1073
|
+
}
|
|
1074
|
+
.combobox__option .combobox__check {
|
|
1075
|
+
width: 16px; height: 16px; margin-left: auto; flex: none;
|
|
1076
|
+
color: var(--accent); opacity: 0;
|
|
1077
|
+
}
|
|
1078
|
+
.combobox__option.is-active { background: var(--accent-soft); }
|
|
1079
|
+
.combobox__option[aria-selected="true"] { color: var(--link); font-weight: var(--weight-medium); }
|
|
1080
|
+
.combobox__option[aria-selected="true"] .combobox__check { opacity: 1; }
|
|
1081
|
+
.combobox__empty { padding: 10px 12px; font-size: var(--text-sm); color: var(--text-muted); }
|
|
1082
|
+
|
|
1083
|
+
/* Búsqueda (§10.28) */
|
|
1084
|
+
.search { position: relative; display: flex; align-items: center; }
|
|
1085
|
+
.search__icon {
|
|
1086
|
+
position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
|
|
1087
|
+
width: 18px; height: 18px; color: var(--text-disabled); pointer-events: none;
|
|
1088
|
+
}
|
|
1089
|
+
.search__input {
|
|
1090
|
+
width: 100%; height: var(--control-height-md); padding: 0 40px;
|
|
1091
|
+
font-family: var(--font-body); font-size: var(--text-base);
|
|
1092
|
+
color: var(--text-primary); background: var(--surface);
|
|
1093
|
+
border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm);
|
|
1094
|
+
transition: border-color var(--duration-fast) var(--ease-out),
|
|
1095
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
1096
|
+
}
|
|
1097
|
+
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
|
|
1098
|
+
.search__input:hover:not(:focus) { border-color: var(--text-disabled); }
|
|
1099
|
+
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
|
|
1100
|
+
.search__clear {
|
|
1101
|
+
position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
|
|
1102
|
+
display: none; width: 32px; height: 32px; align-items: center; justify-content: center;
|
|
1103
|
+
border: 0; border-radius: var(--radius-full); background: transparent;
|
|
1104
|
+
color: var(--text-muted); cursor: pointer;
|
|
1105
|
+
transition: background-color var(--duration-fast) var(--ease-out),
|
|
1106
|
+
color var(--duration-fast) var(--ease-out);
|
|
1107
|
+
}
|
|
1108
|
+
.search__clear:hover { background: var(--surface-alt); color: var(--text-primary); }
|
|
1109
|
+
.search__clear svg { width: 16px; height: 16px; }
|
|
1110
|
+
.search__input:not(:placeholder-shown) ~ .search__clear { display: inline-flex; }
|
|
1111
|
+
|
|
1112
|
+
/* Drawer / Sheet (§10.29) */
|
|
1113
|
+
.drawer {
|
|
1114
|
+
position: fixed; inset: 0; z-index: 100;
|
|
1115
|
+
visibility: hidden; pointer-events: none;
|
|
1116
|
+
transition: visibility 0s linear var(--duration-base);
|
|
1117
|
+
}
|
|
1118
|
+
.drawer.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
|
|
1119
|
+
.drawer__overlay {
|
|
1120
|
+
position: absolute; inset: 0; background: var(--overlay);
|
|
1121
|
+
opacity: 0; transition: opacity var(--duration-base) var(--ease-out);
|
|
1122
|
+
}
|
|
1123
|
+
.drawer.is-open .drawer__overlay { opacity: 1; }
|
|
1124
|
+
.drawer__panel {
|
|
1125
|
+
position: absolute; inset: 0 0 0 auto; width: min(400px, 100%);
|
|
1126
|
+
display: flex; flex-direction: column; gap: var(--space-5);
|
|
1127
|
+
padding: var(--card-padding); background: var(--surface);
|
|
1128
|
+
box-shadow: var(--shadow-xl); overflow-y: auto; overscroll-behavior: contain;
|
|
1129
|
+
transform: translateX(100%);
|
|
1130
|
+
transition: transform var(--duration-base) var(--ease-in);
|
|
1131
|
+
}
|
|
1132
|
+
.drawer.is-open .drawer__panel {
|
|
1133
|
+
transform: none;
|
|
1134
|
+
transition: transform var(--duration-slow) var(--ease-out);
|
|
1135
|
+
}
|
|
1136
|
+
.drawer--right .drawer__panel { inset: 0 0 0 auto; transform: translateX(100%); }
|
|
1137
|
+
.drawer--left .drawer__panel { inset: 0 auto 0 0; transform: translateX(-100%); }
|
|
1138
|
+
.drawer--bottom .drawer__panel {
|
|
1139
|
+
inset: auto 0 0 0; width: 100%; max-height: 85vh;
|
|
1140
|
+
border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(100%);
|
|
1141
|
+
}
|
|
1142
|
+
.drawer__header {
|
|
1143
|
+
display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
|
|
1144
|
+
}
|
|
1145
|
+
.drawer__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin: 0; }
|
|
1146
|
+
.drawer__body { flex: 1; }
|
|
1147
|
+
.drawer__footer {
|
|
1148
|
+
display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: auto;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/* Popover (§10.30) */
|
|
1152
|
+
.popover { position: relative; display: inline-block; }
|
|
1153
|
+
.popover__panel {
|
|
1154
|
+
position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
|
|
1155
|
+
width: max-content; max-width: 300px; padding: var(--space-4);
|
|
1156
|
+
background: var(--surface); border: var(--border-width) solid var(--border);
|
|
1157
|
+
border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
|
|
1158
|
+
transform-origin: top left; opacity: 0; transform: scale(.96); pointer-events: none;
|
|
1159
|
+
transition: opacity var(--duration-base) var(--ease-out),
|
|
1160
|
+
transform var(--duration-base) var(--ease-out);
|
|
1161
|
+
}
|
|
1162
|
+
.popover.is-open .popover__panel { opacity: 1; transform: none; pointer-events: auto; }
|
|
1163
|
+
.popover--right .popover__panel { left: auto; right: 0; transform-origin: top right; }
|
|
1164
|
+
|
|
1165
|
+
/* ButtonGroup (§10.31) */
|
|
1166
|
+
.btn-group { display: inline-flex; }
|
|
1167
|
+
.btn-group .btn { border-radius: 0; }
|
|
1168
|
+
.btn-group .btn:first-child {
|
|
1169
|
+
border-top-left-radius: var(--radius-md); border-bottom-left-radius: var(--radius-md);
|
|
1170
|
+
}
|
|
1171
|
+
.btn-group .btn:last-child {
|
|
1172
|
+
border-top-right-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md);
|
|
1173
|
+
}
|
|
1174
|
+
.btn-group .btn:not(:first-child) { margin-left: calc(var(--border-width) * -1); }
|
|
1175
|
+
.btn-group .btn:hover, .btn-group .btn:focus-visible { z-index: 1; }
|
|
1176
|
+
|
|
1177
|
+
/* --------------------------------------------------------------------------
|
|
1178
|
+
13c. DATEPICKER · FILEUPLOAD · STEPPER · KBD (§10.32–10.35)
|
|
1179
|
+
-------------------------------------------------------------------------- */
|
|
1180
|
+
|
|
1181
|
+
/* DatePicker (§10.32) */
|
|
1182
|
+
.datepicker { position: relative; display: inline-block; }
|
|
1183
|
+
.datepicker__input {
|
|
1184
|
+
width: 100%; height: var(--control-height-md); padding: 0 40px 0 14px;
|
|
1185
|
+
font-family: var(--font-body); font-size: var(--text-base);
|
|
1186
|
+
color: var(--text-primary); background: var(--surface);
|
|
1187
|
+
border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-sm);
|
|
1188
|
+
transition: border-color var(--duration-fast) var(--ease-out),
|
|
1189
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
1190
|
+
}
|
|
1191
|
+
.datepicker__input:hover:not(:disabled):not(:focus) { border-color: var(--text-disabled); }
|
|
1192
|
+
.datepicker__input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
|
|
1193
|
+
.datepicker__input:disabled { background: var(--surface-alt); color: var(--text-disabled); cursor: not-allowed; }
|
|
1194
|
+
.datepicker__icon {
|
|
1195
|
+
position: absolute; right: 12px; top: calc(var(--control-height-md) / 2); transform: translateY(-50%);
|
|
1196
|
+
width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
|
|
1197
|
+
}
|
|
1198
|
+
.datepicker__calendar {
|
|
1199
|
+
position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
|
|
1200
|
+
width: max-content; padding: var(--space-4);
|
|
1201
|
+
background: var(--surface); border: var(--border-width) solid var(--border);
|
|
1202
|
+
border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
|
|
1203
|
+
transform-origin: top left; opacity: 0; transform: scale(.96); pointer-events: none;
|
|
1204
|
+
transition: opacity var(--duration-base) var(--ease-out),
|
|
1205
|
+
transform var(--duration-base) var(--ease-out);
|
|
1206
|
+
}
|
|
1207
|
+
.datepicker.is-open .datepicker__calendar { opacity: 1; transform: none; pointer-events: auto; }
|
|
1208
|
+
.datepicker--right .datepicker__calendar { left: auto; right: 0; transform-origin: top right; }
|
|
1209
|
+
|
|
1210
|
+
.calendar { width: 15.75rem; }
|
|
1211
|
+
.calendar__header {
|
|
1212
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
1213
|
+
gap: var(--space-2); margin-bottom: var(--space-3);
|
|
1214
|
+
}
|
|
1215
|
+
.calendar__title { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
|
|
1216
|
+
.calendar__weekdays,
|
|
1217
|
+
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
|
|
1218
|
+
.calendar__weekdays { margin-bottom: 4px; }
|
|
1219
|
+
.calendar__week { display: contents; }
|
|
1220
|
+
.calendar__weekday {
|
|
1221
|
+
display: flex; align-items: center; justify-content: center; height: 28px;
|
|
1222
|
+
font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-muted);
|
|
1223
|
+
}
|
|
1224
|
+
.calendar__day {
|
|
1225
|
+
display: flex; align-items: center; justify-content: center;
|
|
1226
|
+
width: 34px; height: 34px; margin: 0 auto; padding: 0;
|
|
1227
|
+
border: 0; border-radius: var(--radius-sm); background: transparent;
|
|
1228
|
+
font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-primary);
|
|
1229
|
+
cursor: pointer;
|
|
1230
|
+
transition: background-color var(--duration-fast) var(--ease-out),
|
|
1231
|
+
color var(--duration-fast) var(--ease-out);
|
|
1232
|
+
}
|
|
1233
|
+
.calendar__day:hover:not(:disabled):not(.calendar__day--selected) { background: var(--accent-soft); }
|
|
1234
|
+
.calendar__day--outside { color: var(--text-muted); }
|
|
1235
|
+
.calendar__day--today { font-weight: var(--weight-semibold); box-shadow: inset 0 0 0 1px var(--border-strong); }
|
|
1236
|
+
.calendar__day--selected { background: var(--accent); color: var(--text-on-primary); font-weight: var(--weight-semibold); }
|
|
1237
|
+
.calendar__day:disabled { color: var(--text-disabled); cursor: not-allowed; }
|
|
1238
|
+
|
|
1239
|
+
/* FileUpload (§10.33) */
|
|
1240
|
+
.file-upload {
|
|
1241
|
+
border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
|
|
1242
|
+
background: var(--surface);
|
|
1243
|
+
transition: border-color var(--duration-fast) var(--ease-out),
|
|
1244
|
+
background-color var(--duration-fast) var(--ease-out);
|
|
1245
|
+
}
|
|
1246
|
+
.file-upload.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
|
|
1247
|
+
.file-upload__input {
|
|
1248
|
+
position: absolute; width: 1px; height: 1px; margin: -1px;
|
|
1249
|
+
clip-path: inset(50%); overflow: hidden; white-space: nowrap;
|
|
1250
|
+
}
|
|
1251
|
+
.file-upload__label {
|
|
1252
|
+
display: flex; flex-direction: column; align-items: center; text-align: center;
|
|
1253
|
+
gap: var(--space-2); padding: var(--space-8) var(--space-6); cursor: pointer;
|
|
1254
|
+
}
|
|
1255
|
+
.file-upload__label > svg { width: 32px; height: 32px; color: var(--text-muted); }
|
|
1256
|
+
.file-upload__title { font-size: var(--text-sm); color: var(--text-secondary); }
|
|
1257
|
+
.file-upload__hint { font-size: var(--text-xs); color: var(--text-muted); }
|
|
1258
|
+
.file-upload__button {
|
|
1259
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1260
|
+
height: var(--control-height-sm); padding: 0 16px; margin-top: var(--space-1);
|
|
1261
|
+
border: var(--border-width) solid var(--border-strong); border-radius: var(--radius-md);
|
|
1262
|
+
font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary);
|
|
1263
|
+
background: var(--surface);
|
|
1264
|
+
transition: background-color var(--duration-fast) var(--ease-out);
|
|
1265
|
+
}
|
|
1266
|
+
.file-upload__label:hover .file-upload__button { background: var(--bg); }
|
|
1267
|
+
.file-upload__list { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
|
|
1268
|
+
.file-upload__item {
|
|
1269
|
+
display: flex; align-items: center; gap: var(--space-3);
|
|
1270
|
+
padding: var(--space-3); border: var(--border-width) solid var(--border);
|
|
1271
|
+
border-radius: var(--radius-md); background: var(--surface);
|
|
1272
|
+
}
|
|
1273
|
+
.file-upload__icon { width: 20px; height: 20px; color: var(--text-muted); flex: none; }
|
|
1274
|
+
.file-upload__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
|
|
1275
|
+
.file-upload__name {
|
|
1276
|
+
font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary);
|
|
1277
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
1278
|
+
}
|
|
1279
|
+
.file-upload__size { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--text-muted); }
|
|
1280
|
+
.file-upload__size svg { width: 12px; height: 12px; flex: none; }
|
|
1281
|
+
.file-upload__meta .progress { margin-top: 2px; }
|
|
1282
|
+
.file-upload__remove {
|
|
1283
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1284
|
+
width: 32px; height: 32px; flex: none; border: 0; border-radius: var(--radius-full);
|
|
1285
|
+
background: transparent; color: var(--text-muted); cursor: pointer;
|
|
1286
|
+
transition: background-color var(--duration-fast) var(--ease-out),
|
|
1287
|
+
color var(--duration-fast) var(--ease-out);
|
|
1288
|
+
}
|
|
1289
|
+
.file-upload__remove:hover { background: var(--surface-alt); color: var(--text-primary); }
|
|
1290
|
+
.file-upload__remove svg { width: 16px; height: 16px; }
|
|
1291
|
+
.file-upload__item--error { border-color: var(--danger-500); }
|
|
1292
|
+
.file-upload__item--error .file-upload__icon,
|
|
1293
|
+
.file-upload__item--error .file-upload__size { color: var(--danger-text); }
|
|
1294
|
+
|
|
1295
|
+
/* Stepper / Wizard (§10.34) */
|
|
1296
|
+
.stepper { display: flex; list-style: none; margin: 0; padding: 0; }
|
|
1297
|
+
.step {
|
|
1298
|
+
position: relative; flex: 1;
|
|
1299
|
+
display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2);
|
|
1300
|
+
}
|
|
1301
|
+
.step__marker {
|
|
1302
|
+
position: relative; z-index: 1;
|
|
1303
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1304
|
+
width: 32px; height: 32px; flex: none; border-radius: var(--radius-full);
|
|
1305
|
+
border: 2px solid var(--border-strong); background: var(--surface);
|
|
1306
|
+
font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-muted);
|
|
1307
|
+
}
|
|
1308
|
+
.step__marker svg { width: 16px; height: 16px; }
|
|
1309
|
+
.step__label { font-size: var(--text-sm); color: var(--text-secondary); }
|
|
1310
|
+
.step__connector {
|
|
1311
|
+
position: absolute; top: 16px; z-index: 0; left: 50%; right: -50%;
|
|
1312
|
+
height: 2px; margin: 0 20px; background: var(--border);
|
|
1313
|
+
}
|
|
1314
|
+
.step--complete .step__marker { background: var(--accent); border-color: var(--accent); color: var(--text-on-primary); }
|
|
1315
|
+
.step--complete .step__label { color: var(--text-primary); }
|
|
1316
|
+
.step--complete .step__connector { background: var(--accent); }
|
|
1317
|
+
.step--current .step__marker { border-color: var(--accent); color: var(--accent); }
|
|
1318
|
+
.step--current .step__label { color: var(--text-primary); font-weight: var(--weight-semibold); }
|
|
1319
|
+
.stepper--vertical { flex-direction: column; align-items: stretch; }
|
|
1320
|
+
.stepper--vertical .step {
|
|
1321
|
+
flex-direction: row; align-items: flex-start; text-align: left;
|
|
1322
|
+
gap: var(--space-3); padding-bottom: var(--space-6);
|
|
1323
|
+
}
|
|
1324
|
+
.stepper--vertical .step:last-child { padding-bottom: 0; }
|
|
1325
|
+
.stepper--vertical .step__connector {
|
|
1326
|
+
top: 36px; bottom: -4px; left: 15px; right: auto;
|
|
1327
|
+
width: 2px; height: auto; margin: 0;
|
|
1328
|
+
}
|
|
1329
|
+
.stepper--vertical .step__label { padding-top: 5px; }
|
|
1330
|
+
|
|
1331
|
+
/* Kbd (§10.35) */
|
|
1332
|
+
.kbd {
|
|
1333
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
1334
|
+
min-width: 20px; height: 20px; padding: 0 6px;
|
|
1335
|
+
font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1;
|
|
1336
|
+
color: var(--text-secondary); background: var(--surface);
|
|
1337
|
+
border: var(--border-width) solid var(--border-strong);
|
|
1338
|
+
border-radius: var(--radius-sm); box-shadow: var(--shadow-xs);
|
|
1339
|
+
}
|
|
1340
|
+
.kbd-combo { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: var(--text-xs); }
|
|
1341
|
+
|
|
905
1342
|
/* --------------------------------------------------------------------------
|
|
906
1343
|
14. UTILIDADES MÍNIMAS
|
|
907
1344
|
-------------------------------------------------------------------------- */
|