@thalassic/themes 22.14.1 → 22.14.2
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/package.json +1 -1
- package/themes/thalassic/components/tab-header/_index.scss +1 -0
- package/themes/thalassic/components/tab-header/_tab-header-align.scss +53 -0
- package/themes/thalassic/components/tab-header/_tab-header.scss +15 -0
- package/themes/thalassic/components/tabs/_tabs-variant.scss +15 -1
- package/themes/thalassic/components/tabs/_tabs.scss +13 -13
package/package.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Alignment of the strip itself and of the tabs inside it. Both classes sit on
|
|
2
|
+
// the strip element and both set properties the strip owns, so they live with
|
|
3
|
+
// the shared block rather than in the tabs composite.
|
|
4
|
+
//
|
|
5
|
+
// The `--align-*` modifiers presume the strip is a flex item, which `tls-tabs`
|
|
6
|
+
// guarantees by being a flex container. `tls-tab-nav` is a standalone strip
|
|
7
|
+
// whose placement is its consumer's layout concern, so it carries only the
|
|
8
|
+
// `--items-*` modifiers.
|
|
9
|
+
.tls-tab-header {
|
|
10
|
+
// Placement along the container's cross axis: block when the tabs are
|
|
11
|
+
// vertical, inline when horizontal. Anything but `stretch` sizes the strip to
|
|
12
|
+
// its tabs rather than to the content panel's extent.
|
|
13
|
+
&--align-stretch {
|
|
14
|
+
align-self: stretch;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&--align-start {
|
|
18
|
+
align-self: flex-start;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--align-center {
|
|
22
|
+
align-self: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--align-end {
|
|
26
|
+
align-self: flex-end;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Distribution of the tabs along the strip's main axis. These have nothing to
|
|
30
|
+
// distribute once the strip is sized to its tabs by a non-stretch
|
|
31
|
+
// `--align-*`.
|
|
32
|
+
&--items-start {
|
|
33
|
+
justify-content: flex-start;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--items-center {
|
|
37
|
+
justify-content: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--items-end {
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Equal shares rather than a `justify-content` value: the base reserves each
|
|
45
|
+
// item at its content size (`flex-shrink: 0`), so growing the items is what
|
|
46
|
+
// splits the strip evenly. Tabs then shrink on a narrow strip instead of
|
|
47
|
+
// scrolling — the trade-off this value opts into.
|
|
48
|
+
&--items-stretch {
|
|
49
|
+
.tls-tab-header__item {
|
|
50
|
+
flex: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use '../../mixins' as mixins;
|
|
2
|
+
|
|
1
3
|
// Shared tab-strip visuals used by two components: the header row inside
|
|
2
4
|
// `tls-tabs` (buttons driving tabpanels) and the standalone `tls-tab-nav`
|
|
3
5
|
// (router links styled as tabs). The block carries its own variant /
|
|
@@ -84,6 +86,19 @@
|
|
|
84
86
|
cursor: pointer;
|
|
85
87
|
|
|
86
88
|
transition: background-color var(--motion-fast);
|
|
89
|
+
|
|
90
|
+
// Focus is distinct from selection here: the strip is a roving-tabindex
|
|
91
|
+
// widget, so arrowing moves focus onto tabs that are not selected and
|
|
92
|
+
// the active-indicator color alone cannot stand in for a focus
|
|
93
|
+
// indicator. The ring is drawn inside the control's box — the strip
|
|
94
|
+
// clips on its cross axis (see the orientation overflow rules) and items
|
|
95
|
+
// sit flush against their neighbours, so an outset ring would be cut off
|
|
96
|
+
// on one edge and overlap the adjacent tab on the other.
|
|
97
|
+
&:focus-visible {
|
|
98
|
+
@include mixins.focus-ring;
|
|
99
|
+
|
|
100
|
+
outline-offset: calc(var(--control-focus-ring-offset) * -1);
|
|
101
|
+
}
|
|
87
102
|
}
|
|
88
103
|
}
|
|
89
104
|
}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
// Variant styles that concern the tabs container itself; the header strip's
|
|
2
2
|
// variant styles live in the shared tab-header block.
|
|
3
3
|
.tls-tabs {
|
|
4
|
-
// Outlined
|
|
4
|
+
// Outlined — the one variant that is a container rather than a transparent
|
|
5
|
+
// layout primitive: the header sits flush against the card's edge (no gap)
|
|
6
|
+
// and the panel is padded away from the border. Its surface is also what the
|
|
7
|
+
// header's active item is filled with, so the item reads as a folder tab
|
|
8
|
+
// merging into the panel.
|
|
5
9
|
&.tls-tabs--outlined {
|
|
6
10
|
--tls-tabs-border-color: var(--color-outline-variant);
|
|
7
11
|
--tls-tabs-border-width: 1px;
|
|
8
12
|
--tls-tabs-border-radius: var(--radius-sm);
|
|
13
|
+
--tls-tabs-background-color: var(--color-surface);
|
|
14
|
+
--tls-tabs-gap: 0;
|
|
15
|
+
--tls-tabs-content-padding: var(--spacing-4);
|
|
9
16
|
|
|
10
17
|
border: var(--tls-tabs-border-width) solid var(--tls-tabs-border-color);
|
|
11
18
|
border-radius: var(--tls-tabs-border-radius);
|
|
19
|
+
|
|
20
|
+
background: var(--tls-tabs-background-color);
|
|
21
|
+
|
|
22
|
+
overflow: clip;
|
|
23
|
+
|
|
24
|
+
transition: border-color var(--motion-theme),
|
|
25
|
+
background-color var(--motion-theme);
|
|
12
26
|
}
|
|
13
27
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
// Container-level styles for `tls-tabs` (
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// Container-level styles for `tls-tabs` (layout, content panel). The header
|
|
2
|
+
// strip itself is the shared `.tls-tab-header` block (components/tab-header),
|
|
3
|
+
// which `tls-tabs` renders as its tablist and `tls-tab-nav` renders as router
|
|
4
|
+
// links.
|
|
5
|
+
//
|
|
6
|
+
// The container is a transparent layout primitive: it paints no surface of its
|
|
7
|
+
// own and pads no content, so a panel holding its own card, table or list sits
|
|
8
|
+
// flush and owns its spacing. The header and the content panel are separated by
|
|
9
|
+
// `--tls-tabs-gap` alone. The `outlined` variant is the exception — it is a card
|
|
10
|
+
// and reinstates both the surface and the content padding.
|
|
5
11
|
.tls-tabs {
|
|
6
|
-
--tls-tabs-
|
|
7
|
-
--tls-tabs-content-padding:
|
|
12
|
+
--tls-tabs-gap: var(--spacing-4);
|
|
13
|
+
--tls-tabs-content-padding: 0;
|
|
8
14
|
|
|
9
15
|
display: flex;
|
|
10
16
|
flex-direction: column;
|
|
11
|
-
|
|
12
|
-
background: var(--tls-tabs-background-color);
|
|
13
|
-
|
|
14
|
-
overflow: clip;
|
|
15
|
-
|
|
16
|
-
transition: border-color var(--motion-theme),
|
|
17
|
-
background-color var(--motion-theme);
|
|
17
|
+
gap: var(--tls-tabs-gap);
|
|
18
18
|
|
|
19
19
|
.tls-tabs-content {
|
|
20
20
|
padding: var(--tls-tabs-content-padding);
|