@thalassic/themes 22.13.0 → 22.14.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thalassic/themes",
3
- "version": "22.13.0",
3
+ "version": "22.14.0",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^22.0.0",
@@ -1,12 +1,28 @@
1
+ @use '../mixins' as mixins;
2
+
1
3
  .tls-password {
2
4
  // The layout/border now lives on the inner tls-form-control-group; the host is
3
5
  // transparent so size/fluid set on the group resolve against the password's parent.
4
6
  display: contents;
5
7
 
6
8
  .tls-password-toggle {
9
+ position: relative;
10
+
11
+ align-self: stretch;
7
12
  display: grid;
8
13
  align-items: center;
9
14
 
15
+ // Follow the group's resolved size, so an sm/lg field scales the toggle
16
+ // label alongside the input text. Custom properties inherit from the group.
17
+ font-size: var(--tls-form-control-group-font-size);
18
+ font-weight: var(--tls-form-control-group-font-weight);
19
+ line-height: var(--tls-form-control-group-line-height);
20
+ letter-spacing: var(--tls-form-control-group-letter-spacing);
21
+
22
+ // `align-self: stretch` already makes the full field height clickable; this
23
+ // covers the remaining vertical gap to the 44px minimum on touch devices.
24
+ @include mixins.touch-target(var(--tls-form-control-group-height));
25
+
10
26
  &__item {
11
27
  grid-area: 1 / 1;
12
28
 
@@ -36,14 +36,29 @@
36
36
  box-shadow var(--motion-fast) var(--motion-ease-in-out),
37
37
  filter var(--motion-fast) var(--motion-ease-in-out);
38
38
 
39
- &:focus-visible {
39
+ // The invisible native input carries focus; the ring renders on the track.
40
+ &:has(.tls-switch-input:focus-visible) {
40
41
  @include mixins.focus-ring;
41
42
  }
42
43
 
43
44
  @include mixins.touch-target(var(--tls-switch-height));
44
45
 
46
+ // The real control: stretched invisibly over the track so it stays focusable
47
+ // and clickable while the styled track/handle underneath provide the visuals.
45
48
  .tls-switch-input {
46
- display: none;
49
+ position: absolute;
50
+ inset: 0;
51
+
52
+ width: 100%;
53
+ height: 100%;
54
+
55
+ margin: 0;
56
+
57
+ appearance: none;
58
+
59
+ opacity: 0;
60
+
61
+ cursor: inherit;
47
62
  }
48
63
 
49
64
  .tls-switch-handle {
@@ -58,6 +73,9 @@
58
73
 
59
74
  box-shadow: var(--shadow-xs);
60
75
 
76
+ // Clicks fall through to the stretched native input underneath.
77
+ pointer-events: none;
78
+
61
79
  transition: transform var(--motion-fast) var(--motion-ease-in-out);
62
80
  }
63
81
 
@@ -87,6 +87,14 @@
87
87
  --tls-tab-header-padding: var(--spacing-2);
88
88
  --tls-tab-header-active-label-color: var(--color-on-surface);
89
89
 
90
+ // On dark surfaces elevation reads through a lighter fill, not shadow: the
91
+ // pill's shadow is invisible there and `--color-surface` sits *below* the
92
+ // track's container color, so raise the pill above the track (and above the
93
+ // inactive hover's container-high) instead.
94
+ .tls-dark & {
95
+ --tls-tab-header-pill-background-color: var(--color-surface-container-highest);
96
+ }
97
+
90
98
  padding: var(--tls-tab-header-padding);
91
99
  gap: var(--tls-tab-header-padding);
92
100
 
@@ -58,24 +58,32 @@
58
58
  } @else if $treatment == outlined {
59
59
  border-color: var(--#{$block}-color);
60
60
 
61
+ // Transparent at rest so the control sits on any backdrop (a tinted card,
62
+ // a striped row); interaction paints a translucent state layer over it.
63
+ background-color: transparent;
64
+
61
65
  color: var(--#{$block}-color);
62
66
 
63
67
  @include _hover-focus-state($block) {
64
- background-color: color-mix(in srgb, var(--#{$block}-color) 7.5%, var(--color-surface));
68
+ background-color: color-mix(in srgb, var(--#{$block}-color) 7.5%, transparent);
65
69
  }
66
70
 
67
71
  @include _active-state($block) {
68
- background-color: color-mix(in srgb, var(--#{$block}-color) 15%, var(--color-surface));
72
+ background-color: color-mix(in srgb, var(--#{$block}-color) 15%, transparent);
69
73
  }
70
74
  } @else if $treatment == text {
75
+ // Transparent at rest so the control sits on any backdrop (a tinted card,
76
+ // a striped row); interaction paints a translucent state layer over it.
77
+ background-color: transparent;
78
+
71
79
  color: var(--#{$block}-color);
72
80
 
73
81
  @include _hover-focus-state($block) {
74
- background-color: color-mix(in srgb, var(--#{$block}-color) 7.5%, var(--color-surface));
82
+ background-color: color-mix(in srgb, var(--#{$block}-color) 7.5%, transparent);
75
83
  }
76
84
 
77
85
  @include _active-state($block) {
78
- background-color: color-mix(in srgb, var(--#{$block}-color) 15%, var(--color-surface));
86
+ background-color: color-mix(in srgb, var(--#{$block}-color) 15%, transparent);
79
87
  }
80
88
  } @else if $treatment == elevated {
81
89
  box-shadow: var(--shadow-sm);