@thalassic/themes 0.5.0 → 0.6.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": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -17,4 +17,9 @@
17
17
  --motion-delay-short: 50ms;
18
18
  --motion-delay-medium: 100ms;
19
19
  --motion-delay-long: 200ms;
20
+
21
+ // Theme transition
22
+ --motion-theme-duration: var(--motion-default);
23
+ --motion-theme-easing: var(--motion-ease-in-out);
24
+ --motion-theme: var(--motion-theme-duration) var(--motion-theme-easing);
20
25
  }
@@ -2,6 +2,7 @@
2
2
  @forward 'button';
3
3
  @forward 'form';
4
4
  @forward 'switch';
5
+ @forward 'tabs';
5
6
 
6
7
  @forward 'checkbox';
7
8
  @forward 'divider';
@@ -0,0 +1,2 @@
1
+ @forward 'tabs';
2
+ @forward 'tabs-variant';
@@ -0,0 +1,63 @@
1
+ .tls-tabs {
2
+ // Flat
3
+ &.tls-tabs--flat {
4
+ .tls-tabs-header {
5
+ border-bottom-width: var(--tls-tabs-border-width);
6
+ border-bottom-style: solid;
7
+
8
+ &__item {
9
+ margin-bottom: -1px;
10
+
11
+ &:hover {
12
+ .tls-tabs-header__item-button {
13
+ background-color: var(--color-surface-container);
14
+ }
15
+ }
16
+
17
+ &.tls-tabs-header__item--active {
18
+ border-bottom-width: var(--tls-tabs-active-border-width);
19
+ border-bottom-style: solid;
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ // Outlined
26
+ &.tls-tabs--outlined {
27
+ --tls-tabs-border-radius: var(--radius-sm);
28
+ --tls-tabs-header-background-color: var(--color-surface-container);
29
+ --tls-tabs-active-border-width: 1px;
30
+ --tls-tabs-active-border-color: var(--tls-tabs-border-color);
31
+
32
+ border: var(--tls-tabs-border-width) solid var(--tls-tabs-border-color);
33
+ border-radius: var(--tls-tabs-border-radius);
34
+
35
+ .tls-tabs-header {
36
+ border-bottom-width: var(--tls-tabs-border-width);
37
+ border-bottom-style: solid;
38
+
39
+ background-color: var(--tls-tabs-header-background-color);
40
+
41
+ &__item {
42
+ margin-bottom: -1px;
43
+
44
+ border-width: 0;
45
+ border-left-width: var(--tls-tabs-active-border-width);
46
+ border-right-width: var(--tls-tabs-active-border-width);
47
+ border-style: solid;
48
+
49
+ &:hover {
50
+ color: var(--tls-tabs-active-label-color);
51
+ }
52
+
53
+ &:first-child {
54
+ border-left-width: 0;
55
+ }
56
+
57
+ &.tls-tabs-header__item--active {
58
+ background-color: var(--tls-tabs-background-color);
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,73 @@
1
+ .tls-tabs {
2
+ --tls-tabs-background-color: var(--color-surface);
3
+ --tls-tabs-label-color: var(--color-outline);
4
+ --tls-tabs-active-label-color: var(--color-primary);
5
+ --tls-tabs-border-color: var(--color-outline-variant);
6
+ --tls-tabs-border-width: 1px;
7
+ --tls-tabs-active-border-color: var(--color-primary);
8
+ --tls-tabs-active-border-width: 2px;
9
+ --tls-tabs-content-padding: var(--spacing-4);
10
+
11
+ background: var(--tls-tabs-background-color);
12
+
13
+ display: block;
14
+
15
+ transition:
16
+ border-color var(--motion-theme),
17
+ background-color var(--motion-theme);
18
+
19
+ overflow: clip;
20
+
21
+ .tls-tabs-header {
22
+ display: flex;
23
+
24
+ border-color: var(--tls-tabs-border-color);
25
+
26
+ &__item {
27
+ color: var(--tls-tabs-label-color);
28
+
29
+ border-color: transparent;
30
+
31
+ transition:
32
+ color var(--motion-fast),
33
+ border-color var(--motion-fast),
34
+ background-color var(--motion-theme);
35
+
36
+ &:has(&-link:hover, &-link:focus) {
37
+ background-color: var(--color-grey-95);
38
+ }
39
+
40
+ &.tls-tabs-header__item--active {
41
+ color: var(--tls-tabs-active-label-color);
42
+ border-color: var(--tls-tabs-active-border-color);
43
+ }
44
+
45
+ &-button {
46
+ padding: var(--spacing-3) var(--spacing-6);
47
+
48
+ // TODO: use mixin
49
+ font-size: var(--font-label-large-size);
50
+ font-weight: var(--font-label-large-weight);
51
+ line-height: var(--font-label-large-border-height);
52
+ letter-spacing: var(--font-label-large-letter-spacing);
53
+
54
+ cursor: pointer;
55
+
56
+ transition: background-color var(--motion-fast);
57
+ }
58
+ }
59
+ }
60
+
61
+ .tls-tabs-content {
62
+ padding: var(--tls-tabs-content-padding);
63
+
64
+ // Tab
65
+ .tls-tab {
66
+ display: none;
67
+
68
+ &--active {
69
+ display: block;
70
+ }
71
+ }
72
+ }
73
+ }