@thalassic/themes 22.7.0 → 22.8.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/package.json +1 -1
- package/themes/thalassic/components/_file-input.scss +3 -2
- package/themes/thalassic/components/tabs/_tabs-variant.scss +61 -12
- package/themes/thalassic/functions/_index.scss +1 -0
- package/themes/thalassic/functions/_tint.scss +13 -0
- package/themes/thalassic/index.scss +1 -0
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '../functions' as functions;
|
|
1
2
|
@use '../mixins' as mixins;
|
|
2
3
|
|
|
3
4
|
.tls-file-input {
|
|
@@ -67,14 +68,14 @@
|
|
|
67
68
|
&--dragging {
|
|
68
69
|
--tls-file-input-border-color: var(--color-primary);
|
|
69
70
|
|
|
70
|
-
background-color:
|
|
71
|
+
background-color: functions.tint(var(--color-primary), 8%);
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
&--rejected {
|
|
74
75
|
--tls-file-input-border-color: var(--color-danger);
|
|
75
76
|
|
|
76
77
|
color: var(--color-danger);
|
|
77
|
-
background-color:
|
|
78
|
+
background-color: functions.tint(var(--color-danger), 8%);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
&--disabled {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
@use '../../functions' as functions;
|
|
2
|
+
|
|
1
3
|
.tls-tabs {
|
|
2
4
|
// Flat
|
|
3
5
|
&.tls-tabs--flat {
|
|
6
|
+
--tls-tabs-active-background-color: #{functions.tint(var(--color-primary), 8%)};
|
|
7
|
+
--tls-tabs-active-hover-background-color: #{functions.tint(var(--color-primary), 12%)};
|
|
8
|
+
|
|
4
9
|
.tls-tabs-header {
|
|
5
10
|
border-bottom-width: var(--tls-tabs-border-width);
|
|
6
11
|
border-bottom-style: solid;
|
|
@@ -14,21 +19,28 @@
|
|
|
14
19
|
border-bottom-width: var(--tls-tabs-active-border-width);
|
|
15
20
|
border-bottom-style: solid;
|
|
16
21
|
|
|
22
|
+
&.tls-tabs-header__item--active {
|
|
23
|
+
background-color: var(--tls-tabs-active-background-color);
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: var(--tls-tabs-active-hover-background-color);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
// Hover fill sits on the item, not the button, so it paints under
|
|
18
31
|
// the item's border and reaches the divider line instead of
|
|
19
|
-
// stopping short and leaving a gap.
|
|
20
|
-
|
|
32
|
+
// stopping short and leaving a gap. Excludes the active item so
|
|
33
|
+
// its primary tint is not replaced by the neutral hover fill.
|
|
34
|
+
//
|
|
35
|
+
// The item's border overlaps the header's divider line by
|
|
36
|
+
// `--tls-tabs-border-width` (see `margin-bottom: -1px` above).
|
|
37
|
+
// Made opaque only while hovering, it paints over the hover
|
|
38
|
+
// fill and keeps that shared pixel visible instead of the
|
|
39
|
+
// fill covering it. The active item already has an opaque
|
|
40
|
+
// border, so it needs neither of these.
|
|
41
|
+
&:hover:not(.tls-tabs-header__item--active) {
|
|
21
42
|
background-color: var(--color-surface-container);
|
|
22
|
-
|
|
23
|
-
// The item's border overlaps the header's divider line by
|
|
24
|
-
// `--tls-tabs-border-width` (see `margin-bottom: -1px` above).
|
|
25
|
-
// Made opaque only while hovering, it paints over the hover
|
|
26
|
-
// fill and keeps that shared pixel visible instead of the
|
|
27
|
-
// fill covering it. The active item already has an opaque
|
|
28
|
-
// border, so it's excluded here.
|
|
29
|
-
&:not(.tls-tabs-header__item--active) {
|
|
30
|
-
border-bottom-color: var(--tls-tabs-border-color);
|
|
31
|
-
}
|
|
43
|
+
border-bottom-color: var(--tls-tabs-border-color);
|
|
32
44
|
}
|
|
33
45
|
}
|
|
34
46
|
}
|
|
@@ -72,4 +84,41 @@
|
|
|
72
84
|
}
|
|
73
85
|
}
|
|
74
86
|
}
|
|
87
|
+
|
|
88
|
+
// Segmented
|
|
89
|
+
&.tls-tabs--segmented {
|
|
90
|
+
--tls-tabs-border-radius: var(--radius-lg);
|
|
91
|
+
--tls-tabs-pill-radius: var(--radius-md);
|
|
92
|
+
--tls-tabs-header-background-color: var(--color-surface-container);
|
|
93
|
+
--tls-tabs-pill-background-color: var(--color-surface);
|
|
94
|
+
--tls-tabs-header-padding: var(--spacing-2);
|
|
95
|
+
--tls-tabs-active-label-color: var(--color-on-surface);
|
|
96
|
+
|
|
97
|
+
.tls-tabs-header {
|
|
98
|
+
padding: var(--tls-tabs-header-padding);
|
|
99
|
+
gap: var(--tls-tabs-header-padding);
|
|
100
|
+
|
|
101
|
+
border-radius: var(--tls-tabs-border-radius);
|
|
102
|
+
|
|
103
|
+
background-color: var(--tls-tabs-header-background-color);
|
|
104
|
+
|
|
105
|
+
&__item {
|
|
106
|
+
border: none;
|
|
107
|
+
border-radius: var(--tls-tabs-pill-radius);
|
|
108
|
+
|
|
109
|
+
&:hover:not(.tls-tabs-header__item--active) {
|
|
110
|
+
background-color: var(--color-surface-container-high);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.tls-tabs-header__item--active {
|
|
114
|
+
background-color: var(--tls-tabs-pill-background-color);
|
|
115
|
+
box-shadow: var(--shadow-xs);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&-button {
|
|
119
|
+
padding: var(--spacing-2) var(--spacing-5);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
75
124
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward 'tint';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Produces a translucent wash of a color by mixing it with `transparent`.
|
|
2
|
+
// `$amount` is the share of the color that stays opaque (e.g. 8% → the color
|
|
3
|
+
// at 8% alpha), the rest being transparent. Ideal for state layers — hover,
|
|
4
|
+
// active, selected fills — laid over any background.
|
|
5
|
+
//
|
|
6
|
+
// Works with custom-property colors (`tint(var(--color-primary), 8%)`), which
|
|
7
|
+
// `rgba()` cannot, since the token is not raw channel values.
|
|
8
|
+
//
|
|
9
|
+
// `$space` is the mixing color space; srgb blends the intuitive "normal RGB"
|
|
10
|
+
// way. Override to `oklab` for a perceptually even blend when needed.
|
|
11
|
+
@function tint($color, $amount, $space: srgb) {
|
|
12
|
+
@return color-mix(in $space, #{$color} $amount, transparent);
|
|
13
|
+
}
|