@surflane/css 0.0.0-stage → 0.10.1
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-APACHE +202 -0
- package/LICENSE-MIT +18 -0
- package/README.md +31 -2
- package/controls.css +120 -0
- package/foundations/layout.css +127 -0
- package/foundations/page-header.css +36 -0
- package/foundations/typography.css +201 -0
- package/foundations.css +6 -0
- package/package.json +43 -4
- package/presentation/avatar.css +63 -0
- package/presentation/badge.css +83 -0
- package/presentation/base.css +25 -0
- package/presentation/breadcrumbs.css +40 -0
- package/presentation/card.css +54 -0
- package/presentation/code.css +81 -0
- package/presentation/empty-state.css +45 -0
- package/presentation/inline-message.css +92 -0
- package/presentation/link.css +20 -0
- package/presentation/list.css +68 -0
- package/presentation/pagination.css +104 -0
- package/presentation/separator.css +28 -0
- package/presentation/table.css +228 -0
- package/presentation.css +16 -0
- package/typography.css +86 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* Presentation classes: Inline message. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.components {
|
|
6
|
+
.surf-message {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
gap: var(--surf-space-3);
|
|
10
|
+
padding: var(--surf-space-4);
|
|
11
|
+
border-radius: var(--surf-radius-md);
|
|
12
|
+
background: var(--surf-status-neutral-bg);
|
|
13
|
+
color: var(--surf-status-neutral-fg);
|
|
14
|
+
}
|
|
15
|
+
.surf-message[data-tone='success'] {
|
|
16
|
+
background: var(--surf-status-success-bg);
|
|
17
|
+
color: var(--surf-status-success-fg);
|
|
18
|
+
}
|
|
19
|
+
.surf-message[data-tone='danger'] {
|
|
20
|
+
background: var(--surf-status-danger-bg);
|
|
21
|
+
color: var(--surf-status-danger-fg);
|
|
22
|
+
}
|
|
23
|
+
.surf-message[data-tone='caution'] {
|
|
24
|
+
background: var(--surf-status-caution-bg);
|
|
25
|
+
color: var(--surf-status-caution-fg);
|
|
26
|
+
}
|
|
27
|
+
.surf-message[data-tone='progress'] {
|
|
28
|
+
background: var(--surf-status-progress-bg);
|
|
29
|
+
color: var(--surf-status-progress-fg);
|
|
30
|
+
}
|
|
31
|
+
.surf-message[data-tone='info'] {
|
|
32
|
+
background: var(--surf-status-info-bg);
|
|
33
|
+
color: var(--surf-status-info-fg);
|
|
34
|
+
}
|
|
35
|
+
.surf-message-icon {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
min-height: 22px;
|
|
39
|
+
flex: none;
|
|
40
|
+
}
|
|
41
|
+
.surf-message-icon svg {
|
|
42
|
+
width: 18px;
|
|
43
|
+
height: 18px;
|
|
44
|
+
}
|
|
45
|
+
.surf-message-content {
|
|
46
|
+
flex: 1;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
overflow-wrap: anywhere;
|
|
49
|
+
}
|
|
50
|
+
.surf-message-title {
|
|
51
|
+
display: block;
|
|
52
|
+
font-weight: var(--surf-weight-medium);
|
|
53
|
+
}
|
|
54
|
+
.surf-message-description {
|
|
55
|
+
margin: var(--surf-space-1) 0 0;
|
|
56
|
+
color: inherit;
|
|
57
|
+
}
|
|
58
|
+
.surf-message-actions {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-wrap: wrap;
|
|
61
|
+
gap: var(--surf-space-2);
|
|
62
|
+
margin-top: var(--surf-space-4);
|
|
63
|
+
}
|
|
64
|
+
@media (forced-colors: active) {
|
|
65
|
+
.surf-message {
|
|
66
|
+
outline: 1px solid CanvasText;
|
|
67
|
+
outline-offset: -1px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
:is(.surf-message)[data-status-transition] {
|
|
71
|
+
background-color: color-mix(
|
|
72
|
+
in oklch,
|
|
73
|
+
var(--surf-status-from-0),
|
|
74
|
+
var(--surf-status-to-0) calc(var(--surf-status-progress) * 100%)
|
|
75
|
+
);
|
|
76
|
+
color: color-mix(
|
|
77
|
+
in oklch,
|
|
78
|
+
var(--surf-status-from-1),
|
|
79
|
+
var(--surf-status-to-1) calc(var(--surf-status-progress) * 100%)
|
|
80
|
+
);
|
|
81
|
+
border-color: color-mix(
|
|
82
|
+
in oklch,
|
|
83
|
+
var(--surf-status-from-2),
|
|
84
|
+
var(--surf-status-to-2) calc(var(--surf-status-progress) * 100%)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
|
|
88
|
+
:is(.surf-message)[data-status-transition] {
|
|
89
|
+
--surf-status-progress: 1 !important;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Presentation classes: Link. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.components {
|
|
6
|
+
.surf-link {
|
|
7
|
+
color: var(--surf-ink);
|
|
8
|
+
text-decoration: underline;
|
|
9
|
+
text-underline-offset: 3px;
|
|
10
|
+
border-radius: calc(var(--surf-radius-sm) / 3);
|
|
11
|
+
overflow-wrap: anywhere;
|
|
12
|
+
}
|
|
13
|
+
.surf-link:hover {
|
|
14
|
+
color: var(--surf-brand-ink);
|
|
15
|
+
}
|
|
16
|
+
.surf-link:focus-visible {
|
|
17
|
+
outline: var(--surf-focus-ring-width) solid var(--surf-interaction-focus);
|
|
18
|
+
outline-offset: var(--surf-focus-ring-offset);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* Presentation classes: List. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.components {
|
|
6
|
+
.surf-list {
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: var(--surf-space-2);
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: 0;
|
|
11
|
+
list-style: none;
|
|
12
|
+
color: var(--surf-ink-body);
|
|
13
|
+
}
|
|
14
|
+
.surf-list-item {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--surf-space-4);
|
|
18
|
+
padding: var(--surf-space-3) var(--surf-space-4);
|
|
19
|
+
border-radius: var(--surf-radius-md);
|
|
20
|
+
min-width: 0;
|
|
21
|
+
}
|
|
22
|
+
.surf-list-item:is(:hover, :focus-within) {
|
|
23
|
+
background: var(--surf-interaction-hover-bg);
|
|
24
|
+
}
|
|
25
|
+
.surf-list-item[data-selected] {
|
|
26
|
+
background: var(--surf-selected);
|
|
27
|
+
}
|
|
28
|
+
.surf-list-content {
|
|
29
|
+
flex: 1;
|
|
30
|
+
min-width: 0;
|
|
31
|
+
overflow-wrap: anywhere;
|
|
32
|
+
}
|
|
33
|
+
.surf-list-title {
|
|
34
|
+
font-weight: var(--surf-weight-medium);
|
|
35
|
+
color: var(--surf-ink);
|
|
36
|
+
}
|
|
37
|
+
.surf-list-description {
|
|
38
|
+
margin: var(--surf-space-1) 0 0;
|
|
39
|
+
color: var(--surf-ink-body);
|
|
40
|
+
font-size: var(--surf-type-caption-size);
|
|
41
|
+
line-height: var(--surf-type-caption-leading);
|
|
42
|
+
letter-spacing: var(--surf-type-caption-tracking);
|
|
43
|
+
}
|
|
44
|
+
.surf-list-actions {
|
|
45
|
+
min-inline-size: 0;
|
|
46
|
+
max-inline-size: 100%;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
flex-wrap: wrap;
|
|
50
|
+
gap: var(--surf-space-2);
|
|
51
|
+
flex: none;
|
|
52
|
+
}
|
|
53
|
+
@media (max-width: 560px) {
|
|
54
|
+
.surf-list-item {
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
}
|
|
57
|
+
.surf-list-actions {
|
|
58
|
+
width: 100%;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
@media (forced-colors: active) {
|
|
62
|
+
.surf-list-item:focus-within,
|
|
63
|
+
.surf-list-item[data-selected] {
|
|
64
|
+
outline: 1px solid CanvasText;
|
|
65
|
+
outline-offset: -1px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* Presentation classes: Pagination. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.components {
|
|
6
|
+
.surf-pagination {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
gap: var(--surf-space-2);
|
|
12
|
+
}
|
|
13
|
+
.surf-pagination-list {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
gap: var(--surf-space-1);
|
|
19
|
+
list-style: none;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
.surf-pagination-control {
|
|
24
|
+
min-width: var(--surf-control-height);
|
|
25
|
+
}
|
|
26
|
+
/* A Button control keeps the Button's box, type and colors. */
|
|
27
|
+
.surf-pagination-control:where(:not(.surf-button)) {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
min-height: var(--surf-control-height);
|
|
33
|
+
gap: var(--surf-space-2);
|
|
34
|
+
padding: 0 var(--surf-space-3);
|
|
35
|
+
border-radius: var(--surf-radius-pill);
|
|
36
|
+
border: 1px solid transparent;
|
|
37
|
+
background: transparent;
|
|
38
|
+
color: var(--surf-ink);
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
font: var(--surf-weight-medium)
|
|
41
|
+
var(--surf-type-label-size)/var(--surf-type-label-leading)
|
|
42
|
+
var(--surf-font-body);
|
|
43
|
+
letter-spacing: var(--surf-type-label-tracking);
|
|
44
|
+
}
|
|
45
|
+
.surf-pagination .surf-pagination-control[aria-current='page'] {
|
|
46
|
+
background-color: var(--surf-selected);
|
|
47
|
+
border-color: var(--surf-control-border);
|
|
48
|
+
}
|
|
49
|
+
/* Only a control that can act shows hover and pressed layers. */
|
|
50
|
+
.surf-pagination-control:is(a, button):where([href], :enabled):hover {
|
|
51
|
+
background: var(--surf-interaction-hover-bg);
|
|
52
|
+
}
|
|
53
|
+
/* Pressed layers show touch feedback in the control's shape instead. */
|
|
54
|
+
.surf-pagination-control:is(a, button) {
|
|
55
|
+
-webkit-tap-highlight-color: transparent;
|
|
56
|
+
}
|
|
57
|
+
.surf-pagination-control:is(a, button):where([href], :enabled):active {
|
|
58
|
+
background: var(--surf-interaction-active-bg);
|
|
59
|
+
}
|
|
60
|
+
.surf-pagination-control[aria-disabled='true'] {
|
|
61
|
+
opacity: var(--surf-control-disabled-opacity);
|
|
62
|
+
}
|
|
63
|
+
.surf-pagination-control:focus-visible {
|
|
64
|
+
outline: var(--surf-focus-ring-width) solid var(--surf-interaction-focus);
|
|
65
|
+
outline-offset: var(--surf-focus-ring-offset);
|
|
66
|
+
}
|
|
67
|
+
.surf-pagination-gap {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
padding-inline: var(--surf-space-1);
|
|
71
|
+
color: var(--surf-ink-muted);
|
|
72
|
+
}
|
|
73
|
+
/* Icon arrows mirror themselves. */
|
|
74
|
+
.surf-pagination:dir(rtl) .surf-pagination-arrow:where(:not(.surf-icon)) {
|
|
75
|
+
transform: rotate(180deg);
|
|
76
|
+
}
|
|
77
|
+
@media (forced-colors: active) {
|
|
78
|
+
.surf-pagination .surf-pagination-control[aria-current='page'] {
|
|
79
|
+
border-color: CanvasText;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
.surf-pagination-summary {
|
|
83
|
+
display: none;
|
|
84
|
+
color: var(--surf-ink-body);
|
|
85
|
+
font-size: var(--surf-type-body-size);
|
|
86
|
+
letter-spacing: var(--surf-type-body-tracking);
|
|
87
|
+
text-align: center;
|
|
88
|
+
overflow-wrap: anywhere;
|
|
89
|
+
}
|
|
90
|
+
@media (max-width: 560px) {
|
|
91
|
+
.surf-pagination-list {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|
|
94
|
+
/* "Page 1 of 3" stays on one line; the controls wrap around it instead. */
|
|
95
|
+
.surf-pagination-summary {
|
|
96
|
+
display: block;
|
|
97
|
+
flex: none;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
.surf-pagination > .surf-pagination-control > span {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* Presentation classes: Separator. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.components {
|
|
6
|
+
.surf-separator {
|
|
7
|
+
border: 0;
|
|
8
|
+
height: 1px;
|
|
9
|
+
width: 100%;
|
|
10
|
+
flex: none;
|
|
11
|
+
background: var(--surf-line);
|
|
12
|
+
}
|
|
13
|
+
.surf-separator[data-orientation='horizontal'][data-inset] {
|
|
14
|
+
width: calc(100% - var(--surf-space-4) * 2);
|
|
15
|
+
margin-inline: var(--surf-space-4);
|
|
16
|
+
}
|
|
17
|
+
.surf-separator[data-orientation='vertical'] {
|
|
18
|
+
width: 1px;
|
|
19
|
+
height: auto;
|
|
20
|
+
min-height: var(--surf-space-6);
|
|
21
|
+
align-self: stretch;
|
|
22
|
+
}
|
|
23
|
+
@media (forced-colors: active) {
|
|
24
|
+
.surf-separator {
|
|
25
|
+
background: CanvasText;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/* Presentation classes: Table. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.components {
|
|
6
|
+
/* Native data structures preserve table/list semantics and generous hover insets. */
|
|
7
|
+
.surf-table {
|
|
8
|
+
width: 100%;
|
|
9
|
+
border-collapse: separate;
|
|
10
|
+
border-spacing: 0 var(--surf-space-1);
|
|
11
|
+
font: inherit;
|
|
12
|
+
color: var(--surf-ink-body);
|
|
13
|
+
/* Columns size to whole words: break-word only splits a word that cannot fit,
|
|
14
|
+
* while an inherited overflow-wrap: anywhere would squeeze columns mid-word. */
|
|
15
|
+
overflow-wrap: break-word;
|
|
16
|
+
}
|
|
17
|
+
.surf-table-caption {
|
|
18
|
+
text-align: start;
|
|
19
|
+
font-weight: var(--surf-weight-regular);
|
|
20
|
+
color: var(--surf-ink);
|
|
21
|
+
padding: 0 var(--surf-space-4) var(--surf-space-3);
|
|
22
|
+
}
|
|
23
|
+
.surf-table-cell {
|
|
24
|
+
padding: var(--surf-space-3) var(--surf-space-4);
|
|
25
|
+
text-align: start;
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
border: 0;
|
|
28
|
+
}
|
|
29
|
+
.surf-table-header {
|
|
30
|
+
font-weight: var(--surf-weight-medium);
|
|
31
|
+
color: var(--surf-ink);
|
|
32
|
+
}
|
|
33
|
+
.surf-table-body > .surf-table-row > :first-child {
|
|
34
|
+
border-start-start-radius: var(--surf-radius-md);
|
|
35
|
+
border-end-start-radius: var(--surf-radius-md);
|
|
36
|
+
}
|
|
37
|
+
.surf-table-body > .surf-table-row > :last-child {
|
|
38
|
+
border-start-end-radius: var(--surf-radius-md);
|
|
39
|
+
border-end-end-radius: var(--surf-radius-md);
|
|
40
|
+
}
|
|
41
|
+
/* Striped tones every other body row with the recessed surface, a plane in place
|
|
42
|
+
* of a line. Hover and selection paint over it. */
|
|
43
|
+
:where(.surf-table[data-variant='striped'])
|
|
44
|
+
> .surf-table-body
|
|
45
|
+
> .surf-table-row:nth-child(even)
|
|
46
|
+
> * {
|
|
47
|
+
background: var(--surf-surface);
|
|
48
|
+
}
|
|
49
|
+
.surf-table-body > .surf-table-row:is(:hover, :focus-within) > * {
|
|
50
|
+
background: var(--surf-interaction-hover-bg);
|
|
51
|
+
}
|
|
52
|
+
/* A selected row takes the selected tone and a faint edge in the focus color, so it
|
|
53
|
+
* reads as held. Each cell draws its share of the edge; inset shadows follow a
|
|
54
|
+
* rounded row's corners. */
|
|
55
|
+
.surf-table-body > .surf-table-row[data-selected] > * {
|
|
56
|
+
--surf-table-edge-start: 0px;
|
|
57
|
+
--surf-table-edge-end: 0px;
|
|
58
|
+
--surf-table-edge-top: 1px;
|
|
59
|
+
--surf-table-edge-bottom: 1px;
|
|
60
|
+
background: var(--surf-selected);
|
|
61
|
+
box-shadow:
|
|
62
|
+
inset 0 var(--surf-table-edge-top) var(--surf-selected-edge),
|
|
63
|
+
inset 0 calc(-1 * var(--surf-table-edge-bottom)) var(--surf-selected-edge),
|
|
64
|
+
inset calc(var(--surf-table-direction, 1) * var(--surf-table-edge-start))
|
|
65
|
+
0 var(--surf-selected-edge),
|
|
66
|
+
inset
|
|
67
|
+
calc(-1 * var(--surf-table-direction, 1) * var(--surf-table-edge-end)) 0
|
|
68
|
+
var(--surf-selected-edge);
|
|
69
|
+
}
|
|
70
|
+
.surf-table-body > .surf-table-row[data-selected] > :first-child {
|
|
71
|
+
--surf-table-edge-start: 1px;
|
|
72
|
+
}
|
|
73
|
+
.surf-table-body > .surf-table-row[data-selected] > :last-child {
|
|
74
|
+
--surf-table-edge-end: 1px;
|
|
75
|
+
}
|
|
76
|
+
.surf-table:dir(rtl) {
|
|
77
|
+
--surf-table-direction: -1;
|
|
78
|
+
}
|
|
79
|
+
@media (forced-colors: active) {
|
|
80
|
+
.surf-table-row[data-selected] > * {
|
|
81
|
+
outline: 1px solid CanvasText;
|
|
82
|
+
outline-offset: -1px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.surf-table-header > .surf-button {
|
|
86
|
+
margin-inline-start: calc(-1 * var(--surf-space-3));
|
|
87
|
+
}
|
|
88
|
+
/* Column alignment. Numbers align to the end with tabular figures, so digits
|
|
89
|
+
* line up down the column; the header follows its column. */
|
|
90
|
+
.surf-table-cell[data-align='center'] {
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
93
|
+
.surf-table-cell[data-align='end'] {
|
|
94
|
+
text-align: end;
|
|
95
|
+
}
|
|
96
|
+
.surf-table-cell[data-numeric] {
|
|
97
|
+
font-variant-numeric: tabular-nums;
|
|
98
|
+
}
|
|
99
|
+
.surf-table-header[data-align='end'] > .surf-button {
|
|
100
|
+
margin-inline: 0 calc(-1 * var(--surf-space-3));
|
|
101
|
+
}
|
|
102
|
+
/* Sort headers show their icon on every sortable column, so sorting is
|
|
103
|
+
* discoverable without hovering. An end-aligned column puts the icon before
|
|
104
|
+
* the label, so the label's end lines up with the numbers below it. */
|
|
105
|
+
/* A Button sort control keeps the Button's gap, weight and color. */
|
|
106
|
+
.surf-table-sort:where(:not(.surf-button)) {
|
|
107
|
+
gap: var(--surf-space-1);
|
|
108
|
+
font-weight: inherit;
|
|
109
|
+
color: inherit;
|
|
110
|
+
}
|
|
111
|
+
.surf-table-header[data-align='end'] > .surf-table-sort {
|
|
112
|
+
flex-direction: row-reverse;
|
|
113
|
+
}
|
|
114
|
+
.surf-table-sort-icon {
|
|
115
|
+
flex: none;
|
|
116
|
+
color: var(--surf-ink-muted);
|
|
117
|
+
}
|
|
118
|
+
.surf-table-sort[data-sort] .surf-table-sort-icon {
|
|
119
|
+
color: var(--surf-ink);
|
|
120
|
+
}
|
|
121
|
+
/* Compact density: 4px row padding and 2px between rows, for scanning many
|
|
122
|
+
* records with a pointer. It overrides the component size's cell padding. */
|
|
123
|
+
.surf-table[data-density='compact'] {
|
|
124
|
+
border-spacing: 0 2px;
|
|
125
|
+
}
|
|
126
|
+
/* Lined, grid and striped rows meet edge to edge, square, so lines and stripes
|
|
127
|
+
* run unbroken. Lines stay inside the table: none above the header, below the
|
|
128
|
+
* last row or at its sides. */
|
|
129
|
+
.surf-table[data-variant] {
|
|
130
|
+
border-spacing: 0;
|
|
131
|
+
}
|
|
132
|
+
.surf-table[data-variant] > .surf-table-body > .surf-table-row > * {
|
|
133
|
+
border-radius: 0;
|
|
134
|
+
}
|
|
135
|
+
.surf-table:is([data-variant='lined'], [data-variant='grid'])
|
|
136
|
+
> :is(.surf-table-head, .surf-table-body, .surf-table-foot)
|
|
137
|
+
> .surf-table-row
|
|
138
|
+
+ .surf-table-row
|
|
139
|
+
> *,
|
|
140
|
+
.surf-table:is([data-variant='lined'], [data-variant='grid'])
|
|
141
|
+
> .surf-table-head
|
|
142
|
+
+ .surf-table-body
|
|
143
|
+
> .surf-table-row:first-child
|
|
144
|
+
> *,
|
|
145
|
+
.surf-table:is([data-variant='lined'], [data-variant='grid'])
|
|
146
|
+
> .surf-table-body
|
|
147
|
+
+ .surf-table-foot
|
|
148
|
+
> .surf-table-row:first-child
|
|
149
|
+
> * {
|
|
150
|
+
border-block-start: 1px solid var(--surf-line);
|
|
151
|
+
}
|
|
152
|
+
.surf-table[data-variant='grid'] .surf-table-cell + .surf-table-cell {
|
|
153
|
+
border-inline-start: 1px solid var(--surf-line);
|
|
154
|
+
}
|
|
155
|
+
/* A sticky header draws its own line beneath it. */
|
|
156
|
+
.surf-table[data-sticky-header]
|
|
157
|
+
> .surf-table-head
|
|
158
|
+
+ .surf-table-body
|
|
159
|
+
> .surf-table-row:first-child
|
|
160
|
+
> * {
|
|
161
|
+
border-block-start: 0;
|
|
162
|
+
}
|
|
163
|
+
/* Selected rows that meet share one edge around the run. */
|
|
164
|
+
.surf-table[data-variant]
|
|
165
|
+
> .surf-table-body
|
|
166
|
+
> .surf-table-row[data-selected]
|
|
167
|
+
+ .surf-table-row[data-selected]
|
|
168
|
+
> * {
|
|
169
|
+
--surf-table-edge-top: 0px;
|
|
170
|
+
}
|
|
171
|
+
.surf-table[data-variant]
|
|
172
|
+
> .surf-table-body
|
|
173
|
+
> .surf-table-row[data-selected]:has(+ .surf-table-row[data-selected])
|
|
174
|
+
> * {
|
|
175
|
+
--surf-table-edge-bottom: 0px;
|
|
176
|
+
}
|
|
177
|
+
/* A bleeding container hangs by the cell inset, which density and size set; it
|
|
178
|
+
outranks the scroll root's own width cap. */
|
|
179
|
+
.surf-scroll-root.surf-table-bleed {
|
|
180
|
+
--surf-table-bleed: var(--surf-space-4);
|
|
181
|
+
max-inline-size: none;
|
|
182
|
+
margin-inline: calc(-1 * var(--surf-table-bleed));
|
|
183
|
+
}
|
|
184
|
+
:where([data-ui-size], [data-ui-size] *).surf-scroll-root.surf-table-bleed {
|
|
185
|
+
--surf-table-bleed: var(--surf-ui-table-padding-x);
|
|
186
|
+
}
|
|
187
|
+
.surf-scroll-root.surf-table-bleed:has(.surf-table[data-density='compact']) {
|
|
188
|
+
--surf-table-bleed: var(--surf-space-3);
|
|
189
|
+
}
|
|
190
|
+
/* A sticky header needs a Container with a bounded block size that scrolls
|
|
191
|
+
* vertically. --table-surface matches the surface behind the table. */
|
|
192
|
+
.surf-table[data-sticky-header]
|
|
193
|
+
> .surf-table-head
|
|
194
|
+
> .surf-table-row
|
|
195
|
+
> .surf-table-cell {
|
|
196
|
+
position: sticky;
|
|
197
|
+
inset-block-start: 0;
|
|
198
|
+
z-index: 1;
|
|
199
|
+
background: var(--table-surface, var(--surf-canvas));
|
|
200
|
+
box-shadow: inset 0 -1px var(--surf-line);
|
|
201
|
+
}
|
|
202
|
+
.surf-table-truncate {
|
|
203
|
+
display: inline-block;
|
|
204
|
+
max-inline-size: 32ch;
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
text-overflow: ellipsis;
|
|
207
|
+
white-space: nowrap;
|
|
208
|
+
vertical-align: bottom;
|
|
209
|
+
}
|
|
210
|
+
/* Loading, empty, error and permission messages span every column. */
|
|
211
|
+
.surf-table-body > .surf-table-message-row:is(:hover, :focus-within) > * {
|
|
212
|
+
background: none;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
@layer surflane.sizes {
|
|
216
|
+
/* Extra-small and icon buttons keep their own inset. */
|
|
217
|
+
.surf-table-header
|
|
218
|
+
> .surf-button:where(:not([data-size='xs'], [data-size^='icon'])) {
|
|
219
|
+
padding-inline: var(--surf-space-3);
|
|
220
|
+
}
|
|
221
|
+
.surf-table[data-density='compact'] .surf-table-cell {
|
|
222
|
+
padding: var(--surf-space-1) var(--surf-space-3);
|
|
223
|
+
}
|
|
224
|
+
.surf-table[data-density='compact'] .surf-table-sort {
|
|
225
|
+
height: auto;
|
|
226
|
+
min-height: 28px;
|
|
227
|
+
}
|
|
228
|
+
}
|
package/presentation.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Opt-in native presentation classes; no React or global element reset. */
|
|
2
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components,
|
|
3
|
+
surflane.sizes;
|
|
4
|
+
@import './presentation/base.css';
|
|
5
|
+
@import './presentation/table.css';
|
|
6
|
+
@import './presentation/link.css';
|
|
7
|
+
@import './presentation/badge.css';
|
|
8
|
+
@import './presentation/card.css';
|
|
9
|
+
@import './presentation/avatar.css';
|
|
10
|
+
@import './presentation/list.css';
|
|
11
|
+
@import './presentation/inline-message.css';
|
|
12
|
+
@import './presentation/code.css';
|
|
13
|
+
@import './presentation/empty-state.css';
|
|
14
|
+
@import './presentation/breadcrumbs.css';
|
|
15
|
+
@import './presentation/separator.css';
|
|
16
|
+
@import './presentation/pagination.css';
|
package/typography.css
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* Opt-in document typography, including portal descendants when placed on body.
|
|
2
|
+
Font families are independent open-source dependencies; role sizes are UI tokens. */
|
|
3
|
+
@layer surflane.tokens, surflane.themes, surflane.base, surflane.components, surflane.sizes;
|
|
4
|
+
|
|
5
|
+
@layer surflane.base {
|
|
6
|
+
.surf-typography {
|
|
7
|
+
font-family: var(--surf-font-body);
|
|
8
|
+
font-size: var(--surf-type-body-size);
|
|
9
|
+
line-height: var(--surf-type-body-leading);
|
|
10
|
+
font-weight: var(--surf-weight-regular);
|
|
11
|
+
letter-spacing: var(--surf-type-body-tracking);
|
|
12
|
+
font-kerning: normal;
|
|
13
|
+
font-optical-sizing: auto;
|
|
14
|
+
font-synthesis-weight: none;
|
|
15
|
+
}
|
|
16
|
+
/* Korean wraps between words (어절), never inside one, and its word spaces take the
|
|
17
|
+
* Hangul face's width. Set on the scope so components keep their own wrapping. */
|
|
18
|
+
.surf-typography:lang(ko),
|
|
19
|
+
.surf-typography [lang|='ko'] {
|
|
20
|
+
word-break: keep-all;
|
|
21
|
+
overflow-wrap: break-word;
|
|
22
|
+
word-spacing: var(--surf-type-hangul-word-spacing);
|
|
23
|
+
}
|
|
24
|
+
.surf-typography :where(code, pre, kbd, samp) {
|
|
25
|
+
word-spacing: normal;
|
|
26
|
+
}
|
|
27
|
+
.surf-typography :where(h1, h2) {
|
|
28
|
+
font-family: var(--surf-font-display);
|
|
29
|
+
font-weight: var(--surf-weight-medium);
|
|
30
|
+
}
|
|
31
|
+
/* Headings tighten as they grow; the role tokens hold the amounts. */
|
|
32
|
+
.surf-typography :where(h1) {
|
|
33
|
+
letter-spacing: var(--surf-type-title-tracking);
|
|
34
|
+
}
|
|
35
|
+
.surf-typography :where(h2) {
|
|
36
|
+
letter-spacing: var(--surf-type-page-tracking);
|
|
37
|
+
}
|
|
38
|
+
.surf-typography :where(h3) {
|
|
39
|
+
letter-spacing: var(--surf-type-section-tracking);
|
|
40
|
+
}
|
|
41
|
+
.surf-typography :where(h3, h4, h5, h6) {
|
|
42
|
+
font-family: var(--surf-font-body);
|
|
43
|
+
font-weight: var(--surf-weight-medium);
|
|
44
|
+
}
|
|
45
|
+
.surf-typography :where(h4, h5, h6) {
|
|
46
|
+
letter-spacing: var(--surf-type-subsection-tracking);
|
|
47
|
+
}
|
|
48
|
+
.surf-typography :where(strong, b, th, a) {
|
|
49
|
+
font-weight: var(--surf-weight-medium);
|
|
50
|
+
}
|
|
51
|
+
.surf-typography :where(button, input, select, textarea) {
|
|
52
|
+
letter-spacing: var(--surf-type-label-tracking);
|
|
53
|
+
font-kerning: normal;
|
|
54
|
+
font-optical-sizing: auto;
|
|
55
|
+
font-synthesis-weight: none;
|
|
56
|
+
}
|
|
57
|
+
.surf-typography :where(code, pre, kbd, samp),
|
|
58
|
+
.surf-typography :where(code, pre, kbd, samp) :where(strong, b),
|
|
59
|
+
.surf-typography .surf-otp-input {
|
|
60
|
+
font-family: var(--surf-font-code);
|
|
61
|
+
font-weight: var(--surf-weight-regular);
|
|
62
|
+
letter-spacing: var(--surf-tracking-mono);
|
|
63
|
+
font-kerning: normal;
|
|
64
|
+
font-optical-sizing: auto;
|
|
65
|
+
font-synthesis-weight: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Rendering hints for scoped content and portals. A component's own font shorthand sits
|
|
69
|
+
* in the later components layer and computes kerning as auto, which renders the same. */
|
|
70
|
+
.surf-typography :where(*) {
|
|
71
|
+
font-kerning: normal;
|
|
72
|
+
font-optical-sizing: auto;
|
|
73
|
+
font-synthesis-weight: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Resolve stacks at the language boundary; changing only a root alias would
|
|
77
|
+
leave inherited, already-computed font stacks pointing at Korean glyphs. */
|
|
78
|
+
.surf-typography:lang(ja),
|
|
79
|
+
.surf-typography :where([lang|='ja']) {
|
|
80
|
+
--surf-font-display: 'Manrope Variable', var(--surf-font-japanese);
|
|
81
|
+
--surf-font-body: 'Manrope Variable', var(--surf-font-japanese);
|
|
82
|
+
--surf-font-code:
|
|
83
|
+
'JetBrains Mono Variable', var(--surf-font-japanese), monospace;
|
|
84
|
+
font-family: var(--surf-font-body);
|
|
85
|
+
}
|
|
86
|
+
}
|