@vokality/design-system 1.2.3 → 2.0.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/CHANGELOG.md +35 -0
- package/README.md +6 -0
- package/dist/components/Badge/Badge.d.ts +6 -4
- package/dist/components/Badge/Badge.js +6 -4
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Field/Field.js +2 -2
- package/dist/components/Fieldset/Fieldset.d.ts +11 -0
- package/dist/components/Fieldset/Fieldset.js +12 -0
- package/dist/components/Grid/Grid.d.ts +866 -4
- package/dist/components/Grid/Grid.js +3 -4
- package/dist/components/Inline/Inline.d.ts +866 -4
- package/dist/components/Inline/Inline.js +3 -4
- package/dist/components/Stack/Stack.d.ts +866 -4
- package/dist/components/Stack/Stack.js +3 -4
- package/dist/components/Text/Text.d.ts +15 -4
- package/dist/components/Text/Text.js +3 -4
- package/dist/components.css +166 -19
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/internal/describedBy.d.ts +3 -0
- package/dist/internal/describedBy.js +4 -0
- package/dist/tokens.css +2 -0
- package/dist/tokens.dtcg.json +10 -0
- package/dist/tokens.json +10 -0
- package/dist/types.d.ts +6 -1
- package/dist/vokality.css +168 -19
- package/dist/vokality.iife.js +945 -912
- package/docs/brand.md +3 -1
- package/docs/components/Badge/README.md +2 -0
- package/docs/components/Button/README.md +7 -3
- package/docs/components/Fieldset/README.md +25 -0
- package/docs/components/Grid/README.md +2 -0
- package/docs/components/Inline/README.md +2 -0
- package/docs/components/PageHeader/README.md +2 -0
- package/docs/components/Stack/README.md +2 -0
- package/docs/components/Text/README.md +4 -0
- package/package.json +1 -1
package/dist/vokality.css
CHANGED
|
@@ -269,6 +269,8 @@
|
|
|
269
269
|
--sidebar-width: 15rem;
|
|
270
270
|
--topbar-height: 56px;
|
|
271
271
|
--control-height: 44px;
|
|
272
|
+
--control-font-size: 1rem;
|
|
273
|
+
--control-padding-block: 0.6rem;
|
|
272
274
|
--button-height: 40px;
|
|
273
275
|
--button-height-sm: 32px;
|
|
274
276
|
--font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
|
|
@@ -382,7 +384,7 @@ body {
|
|
|
382
384
|
gap: 0;
|
|
383
385
|
box-sizing: border-box;
|
|
384
386
|
max-width: 100%;
|
|
385
|
-
min-height: 40px;
|
|
387
|
+
min-height: var(--button-height, 40px);
|
|
386
388
|
padding: 0;
|
|
387
389
|
font: inherit;
|
|
388
390
|
font-family: var(--font-sans);
|
|
@@ -421,7 +423,7 @@ body {
|
|
|
421
423
|
}
|
|
422
424
|
.vk-btn-ghost:hover { background: var(--primary-tint); }
|
|
423
425
|
.vk-btn-outline:disabled, .vk-btn-ghost:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
424
|
-
.vk-btn-sm { min-height: 32px; font-size: 0.6875rem; }
|
|
426
|
+
.vk-btn-sm { min-height: var(--button-height-sm, 32px); font-size: 0.6875rem; }
|
|
425
427
|
.vk-btn-sm .vk-btn-label { padding: 0.4rem 0.75rem 0.4rem 0.85rem; }
|
|
426
428
|
.vk-btn-sm .vk-btn-label:only-child { padding-right: 0.85rem; }
|
|
427
429
|
.vk-btn-sm .vk-btn-glyph { width: 1.85rem; }
|
|
@@ -441,6 +443,24 @@ body {
|
|
|
441
443
|
.vk-btn { width: 100%; justify-content: space-between; }
|
|
442
444
|
}
|
|
443
445
|
|
|
446
|
+
/* A named record can be an action without adopting an uppercase action label. */
|
|
447
|
+
.vk-btn-text {
|
|
448
|
+
width: auto;
|
|
449
|
+
min-height: var(--button-height-sm);
|
|
450
|
+
justify-content: flex-start;
|
|
451
|
+
font-size: var(--text-sm);
|
|
452
|
+
font-weight: 500;
|
|
453
|
+
letter-spacing: normal;
|
|
454
|
+
text-transform: none;
|
|
455
|
+
text-align: left;
|
|
456
|
+
color: var(--foreground);
|
|
457
|
+
background: transparent;
|
|
458
|
+
border: 1px solid transparent;
|
|
459
|
+
}
|
|
460
|
+
.vk-btn-text .vk-btn-label, .vk-btn-text .vk-btn-label:only-child { padding: var(--space-xs) 0; }
|
|
461
|
+
.vk-btn-text:hover { color: var(--primary); text-decoration: underline; text-underline-offset: var(--space-xs); }
|
|
462
|
+
.vk-btn-text:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
463
|
+
|
|
444
464
|
/* Square glyph */
|
|
445
465
|
@keyframes vk-glyph-blink {
|
|
446
466
|
0%, 72%, 100% { opacity: 1; filter: brightness(1); }
|
|
@@ -685,6 +705,10 @@ body {
|
|
|
685
705
|
color: var(--primary);
|
|
686
706
|
}
|
|
687
707
|
|
|
708
|
+
.vk-badge-icon { gap: var(--space-xs); }
|
|
709
|
+
.vk-badge[tabindex]:not([tabindex="-1"]) { box-sizing: border-box; min-height: var(--button-height-sm); }
|
|
710
|
+
.vk-badge:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
711
|
+
|
|
688
712
|
/* Quote */
|
|
689
713
|
.vk-quote {
|
|
690
714
|
position: relative;
|
|
@@ -809,8 +833,8 @@ body {
|
|
|
809
833
|
align-items: center;
|
|
810
834
|
justify-content: center;
|
|
811
835
|
box-sizing: border-box;
|
|
812
|
-
width: 40px;
|
|
813
|
-
height: 40px;
|
|
836
|
+
width: var(--button-height, 40px);
|
|
837
|
+
height: var(--button-height, 40px);
|
|
814
838
|
padding: 0;
|
|
815
839
|
color: var(--foreground);
|
|
816
840
|
background: transparent;
|
|
@@ -861,9 +885,11 @@ input.vk-input:read-only, textarea.vk-input:read-only { background: transparent;
|
|
|
861
885
|
box-sizing: border-box;
|
|
862
886
|
width: 100%;
|
|
863
887
|
min-height: var(--control-height, 44px);
|
|
864
|
-
padding: 0.6rem 0.75rem;
|
|
888
|
+
padding: var(--control-padding-block, 0.6rem) 0.75rem;
|
|
865
889
|
font: inherit;
|
|
866
|
-
font-size: var(--
|
|
890
|
+
font-size: var(--control-font-size, 1rem);
|
|
891
|
+
/* One line fits inside --control-height; the inherited body line-height would make fields taller than the token. */
|
|
892
|
+
line-height: 1.25;
|
|
867
893
|
color: var(--foreground);
|
|
868
894
|
background: var(--card);
|
|
869
895
|
border: 1px solid var(--input-border);
|
|
@@ -872,7 +898,7 @@ input.vk-input:read-only, textarea.vk-input:read-only { background: transparent;
|
|
|
872
898
|
.vk-input::placeholder { color: var(--muted-subtle); }
|
|
873
899
|
.vk-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-color: var(--primary); }
|
|
874
900
|
.vk-input[aria-invalid="true"] { border-color: var(--primary); }
|
|
875
|
-
textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }
|
|
901
|
+
textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; padding-block: 0.6rem; line-height: 1.6; }
|
|
876
902
|
.vk-select { position: relative; display: grid; min-width: 0; }
|
|
877
903
|
.vk-select-trigger {
|
|
878
904
|
display: flex;
|
|
@@ -888,7 +914,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
888
914
|
.vk-select-placeholder { color: var(--muted-subtle); }
|
|
889
915
|
.vk-select-icon {
|
|
890
916
|
position: absolute;
|
|
891
|
-
top:
|
|
917
|
+
top: calc(var(--control-height, 44px) / 2);
|
|
892
918
|
right: 0.75rem;
|
|
893
919
|
translate: 0 -50%;
|
|
894
920
|
color: var(--muted-foreground);
|
|
@@ -920,7 +946,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
920
946
|
justify-content: space-between;
|
|
921
947
|
gap: 0.75rem;
|
|
922
948
|
padding: 0.6rem 0.75rem;
|
|
923
|
-
font-size: var(--
|
|
949
|
+
font-size: var(--control-font-size, 1rem);
|
|
924
950
|
line-height: 1.4;
|
|
925
951
|
color: var(--foreground);
|
|
926
952
|
cursor: pointer;
|
|
@@ -934,6 +960,12 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
934
960
|
.vk-select-option[aria-disabled="true"] .vk-select-option-description { color: var(--muted-subtle); }
|
|
935
961
|
.vk-field-error { margin: 0; font-size: var(--text-sm); color: var(--primary-hover); }
|
|
936
962
|
|
|
963
|
+
.vk-fieldset { min-width: 0; margin: 0; padding: var(--space-md); border: 1px solid var(--border-subtle); }
|
|
964
|
+
.vk-fieldset-legend { padding-inline: var(--space-xs); font-size: var(--text-xs); font-weight: 600; color: var(--foreground); }
|
|
965
|
+
.vk-fieldset-controls { display: grid; gap: var(--space-sm); }
|
|
966
|
+
/* Hint and error take the shared field styles; only their spacing within the group is set here. */
|
|
967
|
+
.vk-fieldset-hint { margin: 0 0 var(--space-sm); }
|
|
968
|
+
.vk-fieldset-error { margin: var(--space-sm) 0 0; }
|
|
937
969
|
/* Select (Radix Select, popper position). The shared .vk-select-* rules live in styles/fields.css;
|
|
938
970
|
these cover the Radix parts: state comes from data-state, data-highlighted and data-disabled,
|
|
939
971
|
and the list is portalled and placed by Radix's popper wrapper. */
|
|
@@ -1083,13 +1115,13 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1083
1115
|
|
|
1084
1116
|
/* Search and clear */
|
|
1085
1117
|
.vk-search, .vk-combobox-field { position: relative; display: grid; min-width: 0; }
|
|
1086
|
-
.vk-search-icon { position: absolute; top:
|
|
1118
|
+
.vk-search-icon { position: absolute; top: calc(var(--control-height, 44px) / 2); left: 0.75rem; translate: 0 -50%; color: var(--muted-foreground); pointer-events: none; }
|
|
1087
1119
|
.vk-search-input, .vk-has-lead { padding-left: 2.25rem; }
|
|
1088
1120
|
.vk-search-input { padding-right: 2.5rem; }
|
|
1089
1121
|
.vk-search-input::-webkit-search-cancel-button, .vk-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
|
|
1090
1122
|
.vk-field-clear {
|
|
1091
1123
|
position: absolute;
|
|
1092
|
-
top:
|
|
1124
|
+
top: calc(var(--control-height, 44px) / 2);
|
|
1093
1125
|
right: 0.35rem;
|
|
1094
1126
|
translate: 0 -50%;
|
|
1095
1127
|
display: inline-flex;
|
|
@@ -1117,7 +1149,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1117
1149
|
flex-wrap: wrap;
|
|
1118
1150
|
align-items: center;
|
|
1119
1151
|
gap: 0.35rem;
|
|
1120
|
-
padding:
|
|
1152
|
+
padding: calc((var(--control-height, 44px) - 28px) / 2) 2.5rem calc((var(--control-height, 44px) - 28px) / 2) 0.5rem;
|
|
1121
1153
|
cursor: text;
|
|
1122
1154
|
}
|
|
1123
1155
|
.vk-multiselect-field:focus-within { outline: 2px solid var(--ring); outline-offset: 1px; border-color: var(--primary); }
|
|
@@ -1129,7 +1161,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1129
1161
|
height: 26px;
|
|
1130
1162
|
padding: 0 0.25rem;
|
|
1131
1163
|
font: inherit;
|
|
1132
|
-
font-size: var(--
|
|
1164
|
+
font-size: var(--control-font-size, 1rem);
|
|
1133
1165
|
color: var(--foreground);
|
|
1134
1166
|
background: transparent;
|
|
1135
1167
|
border: 0;
|
|
@@ -1146,7 +1178,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1146
1178
|
.vk-multi-option[aria-disabled="true"] .vk-choice-box { border-style: dashed; background: transparent; }
|
|
1147
1179
|
|
|
1148
1180
|
/* Date picker and popover */
|
|
1149
|
-
.vk-date-trigger { gap: 0.6rem; padding-right: 0.75rem;
|
|
1181
|
+
.vk-date-trigger { gap: 0.6rem; padding-right: 0.75rem; }
|
|
1150
1182
|
.vk-date-trigger:disabled { cursor: not-allowed; }
|
|
1151
1183
|
.vk-date-trigger[data-state="open"] { border-color: var(--primary); }
|
|
1152
1184
|
.vk-date-icon { flex-shrink: 0; color: var(--muted-foreground); }
|
|
@@ -1163,6 +1195,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1163
1195
|
border: 1px solid var(--border);
|
|
1164
1196
|
border-radius: var(--radius, 0);
|
|
1165
1197
|
}
|
|
1198
|
+
.vk-popover-footer .vk-btn { width: auto; }
|
|
1166
1199
|
.vk-popover-footer { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); }
|
|
1167
1200
|
|
|
1168
1201
|
/* The calendar panel (Radix Popover): placed by its popper wrapper, which takes the z-index from here; data-state and data-side set by Radix */
|
|
@@ -1225,6 +1258,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1225
1258
|
.vk-day-range-end { background: linear-gradient(90deg, var(--primary-tint) 50%, transparent 50%); }
|
|
1226
1259
|
.vk-day[aria-disabled="true"] { color: var(--muted-subtle); text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
|
|
1227
1260
|
.vk-day[aria-disabled="true"]:hover { border-color: transparent; }
|
|
1261
|
+
.vk-day-selected[aria-disabled="true"] { color: var(--primary-foreground); border-color: var(--primary); }
|
|
1228
1262
|
|
|
1229
1263
|
/* Badge tones */
|
|
1230
1264
|
.vk-badge-neutral { color: var(--muted-foreground); border-color: var(--border); }
|
|
@@ -1232,7 +1266,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1232
1266
|
.vk-badge-success { color: var(--success); border-color: var(--success-line); }
|
|
1233
1267
|
.vk-badge-warning { color: var(--warning); border-color: var(--warning-line); }
|
|
1234
1268
|
.vk-badge-danger { color: var(--danger); border-color: var(--danger-line); }
|
|
1235
|
-
.vk-table .vk-icon-btn { width: 32px; height: 32px; }
|
|
1269
|
+
.vk-table .vk-icon-btn { width: var(--button-height-sm, 32px); height: var(--button-height-sm, 32px); }
|
|
1236
1270
|
.vk-table td:has(.vk-menu-root) { padding-top: 0.25rem; padding-bottom: 0.25rem; }
|
|
1237
1271
|
|
|
1238
1272
|
/* Utilities */
|
|
@@ -1408,6 +1442,21 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1408
1442
|
|
|
1409
1443
|
/* Tabs (Radix Tabs: data-state=active|inactive and data-disabled set by Radix) */
|
|
1410
1444
|
.vk-tablist { display: flex; gap: 1.75rem; overflow-x: auto; border-bottom: 1px solid var(--border-subtle); scrollbar-width: none; }
|
|
1445
|
+
/* A tab list that scrolls fades the edge with more tabs behind it, since its scrollbar is hidden. */
|
|
1446
|
+
@property --vk-tab-fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
1447
|
+
@property --vk-tab-fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
|
|
1448
|
+
@keyframes vk-tablist-fade {
|
|
1449
|
+
0% { --vk-tab-fade-start: 0px; --vk-tab-fade-end: 2.5rem; }
|
|
1450
|
+
8%, 92% { --vk-tab-fade-start: 2.5rem; --vk-tab-fade-end: 2.5rem; }
|
|
1451
|
+
100% { --vk-tab-fade-start: 2.5rem; --vk-tab-fade-end: 0px; }
|
|
1452
|
+
}
|
|
1453
|
+
@supports (animation-timeline: scroll()) {
|
|
1454
|
+
.vk-tablist {
|
|
1455
|
+
mask-image: linear-gradient(to right, transparent, #000 var(--vk-tab-fade-start), #000 calc(100% - var(--vk-tab-fade-end)), transparent);
|
|
1456
|
+
animation: vk-tablist-fade linear both;
|
|
1457
|
+
animation-timeline: scroll(self inline);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1411
1460
|
.vk-tab {
|
|
1412
1461
|
position: relative;
|
|
1413
1462
|
display: inline-flex;
|
|
@@ -1734,6 +1783,10 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1734
1783
|
.vk-layout-stack { display: flex; flex-direction: column; min-width: 0; }
|
|
1735
1784
|
.vk-layout-inline { display: flex; min-width: 0; }
|
|
1736
1785
|
.vk-layout-grid { display: grid; min-width: 0; }
|
|
1786
|
+
/* A row that holds a field sizes its buttons to the field, so toolbars and inline forms sit flush at --control-height. */
|
|
1787
|
+
.vk-layout-inline:has(.vk-input) > .vk-btn { min-height: var(--control-height, 44px); }
|
|
1788
|
+
.vk-layout-inline:has(.vk-input) > .vk-icon-btn { width: var(--control-height, 44px); height: var(--control-height, 44px); }
|
|
1789
|
+
.vk-layout-inline:has(.vk-input) > .vk-segmented .vk-segment { min-height: calc(var(--control-height, 44px) - 2px); }
|
|
1737
1790
|
@media (max-width: 40rem) { .vk-layout-grid-fixed { grid-template-columns: 1fr !important; } }
|
|
1738
1791
|
.vk-container { box-sizing: border-box; width: 100%; max-width: var(--content-max); margin-inline: auto; }
|
|
1739
1792
|
.vk-container-prose { max-width: calc(var(--prose-max) + 2 * var(--section-gutter)); }
|
|
@@ -1799,6 +1852,8 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1799
1852
|
/* Charts */
|
|
1800
1853
|
.vk-chart { display: grid; gap: 0.75rem; margin: 0; min-width: 0; }
|
|
1801
1854
|
.vk-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
|
|
1855
|
+
/* The table toggle keeps its width beside the title on narrow screens, where buttons otherwise fill the column. */
|
|
1856
|
+
.vk-chart-head .vk-btn { width: auto; flex-shrink: 0; }
|
|
1802
1857
|
.vk-chart-title { margin: 0; font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; color: var(--foreground); }
|
|
1803
1858
|
.vk-chart-description { margin: 0.2rem 0 0; font-size: var(--text-sm); color: var(--muted-foreground); }
|
|
1804
1859
|
.vk-chart-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--muted-foreground); }
|
|
@@ -1889,7 +1944,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1889
1944
|
|
|
1890
1945
|
/* Slider (Radix Slider: the track is its root, the fill its range; Radix positions the thumb's wrapper) */
|
|
1891
1946
|
.vk-slider { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; align-items: center; min-width: 0; }
|
|
1892
|
-
.vk-slider-value { grid-column: 2; grid-row: 1; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--foreground); }
|
|
1947
|
+
.vk-slider-value { grid-column: 2; grid-row: 1; font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--foreground); min-width: 6ch; text-align: right; }
|
|
1893
1948
|
/* A flex box, so the absolutely positioned thumb wrapper is centred vertically. */
|
|
1894
1949
|
.vk-slider-track { grid-column: 1; grid-row: 1; position: relative; display: flex; align-items: center; height: 28px; cursor: pointer; touch-action: none; }
|
|
1895
1950
|
.vk-slider-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; translate: 0 -50%; background: var(--card); border: 1px solid var(--input-border); box-sizing: border-box; }
|
|
@@ -1977,12 +2032,13 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1977
2032
|
.vk-list-divided > .vk-list-item + .vk-list-item { border-top: 1px solid var(--border-subtle); }
|
|
1978
2033
|
.vk-list-bordered { border: 1px solid var(--border-subtle); }
|
|
1979
2034
|
.vk-list-bordered .vk-list-main { padding-inline: 1rem; }
|
|
2035
|
+
.vk-list-bordered .vk-list-trailing { padding-right: 1rem; }
|
|
1980
2036
|
.vk-list-item { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
|
|
1981
2037
|
.vk-list-main { flex: 1; display: flex; align-items: center; gap: 0.85rem; min-width: 0; padding: 0.75rem 0.25rem; font: inherit; text-align: left; color: inherit; text-decoration: none; background: none; border: 0; }
|
|
1982
2038
|
.vk-list-interactive { cursor: pointer; }
|
|
1983
2039
|
.vk-list-interactive:hover { background: var(--card-fill); }
|
|
1984
2040
|
.vk-list-interactive:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
|
|
1985
|
-
.vk-list-item-selected
|
|
2041
|
+
.vk-list-item-selected { background: var(--primary-tint); }
|
|
1986
2042
|
.vk-list-leading { display: inline-flex; flex-shrink: 0; color: var(--muted-foreground); }
|
|
1987
2043
|
.vk-list-text { display: grid; gap: 0.1rem; flex: 1; min-width: 0; }
|
|
1988
2044
|
.vk-list-title { font-size: var(--text-sm); font-weight: 500; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -1995,7 +2051,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
1995
2051
|
.vk-avatar-group-item { display: inline-flex; margin-left: -6px; }
|
|
1996
2052
|
.vk-avatar-group-item:first-child { margin-left: 0; }
|
|
1997
2053
|
.vk-avatar-group-item .vk-avatar { outline: 2px solid var(--background); }
|
|
1998
|
-
.vk-avatar-more { background: var(--card); color: var(--muted-foreground); font-
|
|
2054
|
+
.vk-avatar-more { background: var(--card); color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
|
|
1999
2055
|
|
|
2000
2056
|
/* Timeline */
|
|
2001
2057
|
.vk-timeline { margin: 0; padding: 0; list-style: none; }
|
|
@@ -2038,6 +2094,13 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
2038
2094
|
/* Typography */
|
|
2039
2095
|
.vk-heading { margin: 0; color: var(--foreground); text-wrap: balance; }
|
|
2040
2096
|
.vk-text { margin: 0; color: var(--foreground); }
|
|
2097
|
+
.vk-text-numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
|
|
2098
|
+
.vk-text-wrap-anywhere { overflow-wrap: anywhere; min-width: 0; }
|
|
2099
|
+
.vk-text-truncate { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2100
|
+
.vk-weight-regular { font-weight: 400; }
|
|
2101
|
+
.vk-weight-medium { font-weight: 500; }
|
|
2102
|
+
.vk-weight-semibold { font-weight: 600; }
|
|
2103
|
+
.vk-weight-bold { font-weight: 700; }
|
|
2041
2104
|
.vk-tone-muted { color: var(--muted-foreground); }
|
|
2042
2105
|
.vk-tone-subtle { color: var(--muted-subtle); }
|
|
2043
2106
|
.vk-tone-primary { color: var(--primary); }
|
|
@@ -2076,6 +2139,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
2076
2139
|
.vk-codeblock-copy:hover { color: var(--foreground); background: var(--primary-tint); }
|
|
2077
2140
|
.vk-codeblock-copy:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
|
|
2078
2141
|
.vk-codeblock-pre { margin: 0; overflow-x: auto; padding: 0.9rem 1rem; font-family: var(--font-mono); font-size: 13px; line-height: 1.65; color: var(--foreground); tab-size: 2; }
|
|
2142
|
+
.vk-codeblock-pre code { font: inherit; }
|
|
2079
2143
|
.vk-codeblock-pre:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
|
|
2080
2144
|
.vk-codeblock-numbered code { counter-reset: vk-line; }
|
|
2081
2145
|
.vk-code-line { display: block; }
|
|
@@ -2100,6 +2164,91 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
2100
2164
|
.vk-cmd-item-active { background: var(--primary-tint); }
|
|
2101
2165
|
.vk-cmd-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; padding: 0.55rem 0.85rem; font-size: 0.75rem; color: var(--muted-subtle); border-top: 1px solid var(--border-subtle); }
|
|
2102
2166
|
|
|
2167
|
+
/* Opt in on html so portalled controls use the same density as their triggers.
|
|
2168
|
+
Components size controls from the control and button tokens, so density redefines those; component-specific sizes still win.
|
|
2169
|
+
On fine pointers the control height is 32px; with any coarse pointer it stays 44px, and buttons follow it either way. */
|
|
2170
|
+
[data-density="compact"] { --button-height: var(--control-height); --button-height-sm: var(--control-height); }
|
|
2171
|
+
html[data-density="compact"] body { font-size: var(--text-sm); }
|
|
2172
|
+
[data-density="compact"] .vk-page-header { container-type: inline-size; box-sizing: border-box; width: 100%; gap: var(--space-sm); padding-block: 0; }
|
|
2173
|
+
[data-density="compact"] .vk-page-header-divider { padding-bottom: var(--space-md); margin-bottom: 0; }
|
|
2174
|
+
[data-density="compact"] .vk-page-header-row { display: grid; grid-template-columns: minmax(min-content, 1fr) minmax(0, auto); align-items: center; gap: var(--space-xs) var(--space-md); }
|
|
2175
|
+
[data-density="compact"] .vk-page-header-text { display: contents; }
|
|
2176
|
+
[data-density="compact"] .vk-page-header-title { grid-column: 1; grid-row: 1; }
|
|
2177
|
+
[data-density="compact"] .vk-page-header-description { grid-column: 1; grid-row: 2; max-width: var(--prose-max); }
|
|
2178
|
+
[data-density="compact"] .vk-page-header-actions { grid-column: 2; grid-row: 1; justify-self: start; min-width: 0; }
|
|
2179
|
+
[data-density="compact"] .vk-page-header-eyebrow { grid-column: 1; grid-row: 1; }
|
|
2180
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-title,
|
|
2181
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-actions { grid-row: 2; }
|
|
2182
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-description { grid-row: 3; }
|
|
2183
|
+
[data-density="compact"] .vk-page-header-title, [data-density="compact"] .vk-text-heading-1 { font-size: var(--text-xl); line-height: 1.3; }
|
|
2184
|
+
[data-density="compact"] .vk-page-header-description, [data-density="compact"] .vk-text-body { font-size: var(--text-sm); }
|
|
2185
|
+
[data-density="compact"] .vk-text-body-sm { font-size: 0.8125rem; }
|
|
2186
|
+
[data-density="compact"] .vk-text-small { font-size: var(--text-xs); }
|
|
2187
|
+
[data-density="compact"] .vk-text-lead, [data-density="compact"] .vk-section-lead { font-size: var(--text-base); }
|
|
2188
|
+
[data-density="compact"] .vk-section-header { margin-bottom: 0; }
|
|
2189
|
+
[data-density="compact"] .vk-section-heading, [data-density="compact"] .vk-text-heading-2, [data-density="compact"] .vk-text-title, [data-density="compact"] .vk-text-title-sm,
|
|
2190
|
+
[data-density="compact"] .vk-card-title, [data-density="compact"] .vk-empty-title, [data-density="compact"] .vk-media-card-title { font-size: var(--text-base); line-height: 1.4; }
|
|
2191
|
+
[data-density="compact"] .vk-section-heading { font-weight: 600; text-transform: none; letter-spacing: normal; }
|
|
2192
|
+
[data-density="compact"] .vk-stat-value { font-size: var(--text-2xl); }
|
|
2193
|
+
[data-density="compact"] .vk-shell-main { padding: var(--space-lg); }
|
|
2194
|
+
[data-density="compact"] .vk-shell-topbar > .vk-icon-btn { flex-shrink: 0; }
|
|
2195
|
+
[data-density="compact"] .vk-shell-brand { flex: 0 1 auto; min-width: 0; }
|
|
2196
|
+
[data-density="compact"] .vk-shell-brand > * { min-width: 0; max-width: 100%; }
|
|
2197
|
+
[data-density="compact"] .vk-shell-actions { flex: 0 1 auto; min-width: 0; }
|
|
2198
|
+
[data-density="compact"] .vk-shell-actions > * { min-width: 0; max-width: 100%; }
|
|
2199
|
+
[data-density="compact"] .vk-shell-actions .vk-btn { width: auto; min-width: 0; }
|
|
2200
|
+
[data-density="compact"] .vk-shell-actions .vk-btn-label { display: block; min-width: 0; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2201
|
+
[data-density="compact"] .vk-dialog-title { font-size: var(--text-base); }
|
|
2202
|
+
[data-density="compact"] .vk-accordion-trigger { font-size: var(--text-sm); padding-block: var(--space-sm); }
|
|
2203
|
+
[data-density="compact"] .vk-btn-text { font-size: var(--text-sm); }
|
|
2204
|
+
[data-density="compact"] .vk-btn:not(.vk-btn-sm, .vk-btn-text) .vk-btn-label { padding: var(--space-xs) var(--space-sm); }
|
|
2205
|
+
[data-density="compact"] .vk-segmented { min-width: 0; max-width: 100%; align-self: flex-start; }
|
|
2206
|
+
[data-density="compact"] .vk-segment { min-width: 0; min-height: calc(var(--control-height) - 2px); padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); overflow-wrap: anywhere; }
|
|
2207
|
+
@container (max-width: 40rem) {
|
|
2208
|
+
[data-density="compact"] .vk-page-header-row { grid-template-columns: minmax(0, 1fr); }
|
|
2209
|
+
[data-density="compact"] .vk-page-header-row .vk-page-header-actions,
|
|
2210
|
+
[data-density="compact"] .vk-page-header-row:has(.vk-page-header-eyebrow) .vk-page-header-actions { grid-column: 1; grid-row: auto; margin-top: var(--space-xs); }
|
|
2211
|
+
}
|
|
2212
|
+
@media (max-width: 48rem) {
|
|
2213
|
+
[data-density="compact"] .vk-shell-actions { max-width: 45%; }
|
|
2214
|
+
}
|
|
2215
|
+
/* Data-dense components: tighter rows, cells and cards. Touch keeps 44px rows through accessibility.css. */
|
|
2216
|
+
[data-density="compact"] .vk-table td, [data-density="compact"] .vk-table tbody th { padding: var(--space-sm) var(--space-md); }
|
|
2217
|
+
[data-density="compact"] .vk-table thead th { padding: var(--space-xs) var(--space-md); }
|
|
2218
|
+
[data-density="compact"] .vk-list-main { padding-block: var(--space-sm); }
|
|
2219
|
+
[data-density="compact"] .vk-navlist-item, [data-density="compact"] .vk-menu-item { min-height: var(--control-height); padding-block: var(--space-xs); }
|
|
2220
|
+
[data-density="compact"] .vk-card { gap: var(--space-sm); padding: var(--space-md); }
|
|
2221
|
+
[data-density="compact"] .vk-card-body { font-size: var(--text-sm); }
|
|
2222
|
+
[data-density="compact"] .vk-page { min-width: var(--control-height); height: var(--control-height); }
|
|
2223
|
+
/* Fine pointers only: with any coarse pointer, controls keep 44px targets and 16px text (iOS zooms smaller inputs on focus). */
|
|
2224
|
+
@media (pointer: fine) and (not (any-pointer: coarse)) {
|
|
2225
|
+
[data-density="compact"] { --control-height: 32px; --control-font-size: var(--text-sm); --control-padding-block: var(--space-xs); }
|
|
2226
|
+
}
|
|
2227
|
+
/* Touch: buttons and rows meet a 44px target in every density (WCAG 2.5.5, Apple HIG); density only tightens fine-pointer layouts. */
|
|
2228
|
+
@media (any-pointer: coarse) {
|
|
2229
|
+
:root { --button-height: var(--control-height); --button-height-sm: var(--control-height); }
|
|
2230
|
+
.vk-navlist-item, .vk-menu-item, .vk-tree-row, .vk-accordion-trigger, .vk-choice { min-height: var(--control-height); }
|
|
2231
|
+
.vk-page { min-width: var(--control-height); height: var(--control-height); }
|
|
2232
|
+
.vk-day { height: var(--control-height); }
|
|
2233
|
+
.vk-segmented .vk-segment { min-height: calc(var(--control-height) - 2px); }
|
|
2234
|
+
.vk-calendar-header .vk-icon-btn { width: var(--control-height); height: var(--control-height); }
|
|
2235
|
+
.vk-stepper-btn, .vk-tab { min-width: var(--control-height); justify-content: center; }
|
|
2236
|
+
.vk-codeblock-copy { min-height: var(--control-height); }
|
|
2237
|
+
.vk-field-clear { width: var(--control-height); height: var(--control-height); right: 0; }
|
|
2238
|
+
.vk-search-input, .vk-date-input { padding-right: calc(var(--control-height) + var(--space-xs)); }
|
|
2239
|
+
/* Single-line choices centre the box in their 44px row; with a description the box stays on the first line. */
|
|
2240
|
+
.vk-choice:not(:has(.vk-choice-description)) { align-items: center; }
|
|
2241
|
+
.vk-choice:not(:has(.vk-choice-description)) :is(.vk-choice-box, .vk-switch-track) { margin-top: 0; }
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
/* Small controls keep their look and extend their hit area: at least 24px (WCAG 2.5.8), 44px on touch where neighbours allow. */
|
|
2245
|
+
.vk-tag-remove, .vk-th-sort, .vk-alert-close, .vk-slider-thumb { position: relative; }
|
|
2246
|
+
.vk-tag-remove::after, .vk-th-sort::after, .vk-alert-close::after, .vk-slider-thumb::after { content: ""; position: absolute; top: 50%; left: 50%; width: max(100%, 24px); height: max(100%, 24px); translate: -50% -50%; }
|
|
2247
|
+
@media (any-pointer: coarse) {
|
|
2248
|
+
.vk-th-sort::after { height: 44px; }
|
|
2249
|
+
.vk-alert-close::after, .vk-slider-thumb::after { width: 44px; height: 44px; }
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2103
2252
|
/* Windows high-contrast (forced colors): restore state that relied on fills */
|
|
2104
2253
|
@media (forced-colors: active) {
|
|
2105
2254
|
.vk-choice .vk-choice-box:is([data-state="checked"], [data-state="indeterminate"]),
|
|
@@ -2112,7 +2261,7 @@ textarea.vk-input, .vk-textarea { resize: vertical; min-height: 8rem; line-heigh
|
|
|
2112
2261
|
.vk-tab[aria-selected="true"]::after, .vk-slider-fill, .vk-progress-fill, .vk-slider-thumb { forced-color-adjust: none; background: Highlight; }
|
|
2113
2262
|
.vk-progress-track[data-state="indeterminate"] { forced-color-adjust: none; background: repeating-linear-gradient(-45deg, Canvas, Canvas 4px, Highlight 4px, Highlight 6px); }
|
|
2114
2263
|
.vk-select-option-active, .vk-menu-item:focus, .vk-cmd-item-active, .vk-tree-row-selected, .vk-navlist-item-active,
|
|
2115
|
-
.vk-list-item-selected
|
|
2264
|
+
.vk-list-item-selected, .vk-table .vk-tr-selected, .vk-day-selected, .vk-segment[aria-checked="true"], .vk-page[aria-current="page"],
|
|
2116
2265
|
.vk-tile-active { forced-color-adjust: none; background: Highlight; color: HighlightText; }
|
|
2117
2266
|
.vk-day-in-range { forced-color-adjust: none; background: transparent; outline: 1px dashed Highlight; outline-offset: -3px; }
|
|
2118
2267
|
.vk-spinner { border-color: CanvasText; border-top-color: Highlight; }
|