@thalassic/themes 0.4.1 → 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.4.1",
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
  }
@@ -3,4 +3,6 @@
3
3
  --radius-md: 8px;
4
4
  --radius-lg: 12px;
5
5
  --radius-xl: 16px;
6
+ --radius-2xl: 20px;
7
+ --radius-3xl: 24px;
6
8
  }
@@ -14,6 +14,10 @@
14
14
  padding-inline: 0;
15
15
 
16
16
  aspect-ratio: 1/1;
17
+
18
+ &.tls-button--rounded {
19
+ --tls-button-border-radius: 50%;
20
+ }
17
21
  }
18
22
 
19
23
  &.tls-button--fluid {
@@ -28,6 +32,10 @@
28
32
  --tls-button-font-weight: var(--font-label-small-weight);
29
33
  --tls-button-line-height: var(--font-label-small-line-height);
30
34
  --tls-button-letter-spacing: var(--font-label-small-letter-spacing);
35
+
36
+ &.tls-button--rounded {
37
+ --tls-button-border-radius: var(--radius-xl);
38
+ }
31
39
  }
32
40
 
33
41
  &.tls-button--md {
@@ -38,6 +46,10 @@
38
46
  --tls-button-font-weight: var(--font-label-medium-weight);
39
47
  --tls-button-line-height: var(--font-label-medium-line-height);
40
48
  --tls-button-letter-spacing: var(--font-label-medium-letter-spacing);
49
+
50
+ &.tls-button--rounded {
51
+ --tls-button-border-radius: var(--radius-2xl);
52
+ }
41
53
  }
42
54
 
43
55
  &.tls-button--lg {
@@ -48,5 +60,9 @@
48
60
  --tls-button-font-weight: var(--font-label-large-weight);
49
61
  --tls-button-line-height: var(--font-label-large-line-height);
50
62
  --tls-button-letter-spacing: var(--font-label-large-letter-spacing);
63
+
64
+ &.tls-button--rounded {
65
+ --tls-button-border-radius: var(--radius-3xl);
66
+ }
51
67
  }
52
68
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  .tls-button {
4
4
  --tls-button-border-width: 1px;
5
+ --tls-button-border-radius: var(--radius-sm);
5
6
 
6
7
  position: relative;
7
8
  z-index: 1;
@@ -14,7 +15,7 @@
14
15
  cursor: pointer;
15
16
  user-select: none;
16
17
 
17
- border-radius: var(--radius-md);
18
+ border-radius: var(--tls-button-border-radius);
18
19
  background-color: var(--color-surface);
19
20
 
20
21
  transition: color var(--motion-fast) var(--motion-ease-in-out);
@@ -33,7 +34,7 @@
33
34
  z-index: -1;
34
35
 
35
36
  border: var(--tls-button-border-width) solid var(--tls-button-color);
36
- border-radius: var(--radius-md);
37
+ border-radius: var(--tls-button-border-radius);
37
38
  }
38
39
 
39
40
  &::before {
@@ -44,7 +45,7 @@
44
45
 
45
46
  &::after {
46
47
  border: none;
47
- border-radius: var(--radius-md);
48
+ border-radius: var(--tls-button-border-radius);
48
49
 
49
50
  transition:
50
51
  border-color var(--motion-fast) var(--motion-ease-in-out),
@@ -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
+ }