matcha-theme 18.1.49 → 18.2.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.
@@ -47,24 +47,6 @@ $index: 0;
47
47
  }
48
48
  }
49
49
  }
50
- // @mixin _generate-classes($prefix, $color-map, $saturation) {
51
- // // .primary-500
52
- // // .primary-600-bg
53
- // // .primary-700-fg
54
- // $background: map-get($color-map, $saturation);
55
- // $contrast: map-get($color-map, #{$saturation}-contrast);
56
-
57
- // .#{$prefix}-#{$saturation} {
58
- // background: $background;
59
- // color: $contrast;
60
- // }
61
- // .#{$prefix}-#{$saturation}-bg {
62
- // background: $background;
63
- // }
64
- // .#{$prefix}-#{$saturation}-fg {
65
- // color: $background;
66
- // }
67
- // }
68
50
 
69
51
  // -------------------------------------------------------------------------------------------------------------------
70
52
  // @ Static color classes generator
@@ -101,18 +83,6 @@ $index: 0;
101
83
  color: $color !important;
102
84
  }
103
85
  }
104
-
105
- // #{$colorSelector}-border,
106
- // #{$colorSelector}-border-top,
107
- // #{$colorSelector}-border-right,
108
- // #{$colorSelector}-border-bottom,
109
- // #{$colorSelector}-border-left {
110
- // border-color: $color !important;
111
- // }
112
-
113
- // #{$colorSelector}-fill {
114
- // fill: $color !important;
115
- // }
116
86
  }
117
87
 
118
88
  @mixin colors-classes-static($theme) {
@@ -152,28 +122,6 @@ $index: 0;
152
122
  );
153
123
  }
154
124
  }
155
- // Run the generator one more time for default values (500)
156
- // if we are not working with primary, accent or warn palettes
157
- // @if ($saturation == 500) {
158
- // // Generate color classes
159
- // @include _generate-static-color-classes($paletteName, $color, $contrast, "");
160
-
161
- // // Add color to the correct list depending on the contrasting color
162
-
163
- // // If the contrast color is dark
164
- // @if (rgba(black, 1) ==rgba($contrast, 1)) {
165
- // $dark-contrasting-classes: append($dark-contrasting-classes, unquote(".#{$paletteName}"), "comma");
166
- // }
167
-
168
- // // if the contrast color is light
169
- // @else {
170
- // $light-contrasting-classes: append(
171
- // $light-contrasting-classes,
172
- // unquote(".#{$paletteName}"),
173
- // "comma"
174
- // );
175
- // }
176
- // }
177
125
  }
178
126
  }
179
127
 
@@ -1,7 +1,16 @@
1
1
  // -------------------------------------------------------------------------------------------------------------------
2
2
  // @ Theme mixins
3
3
  // --------------------------------------------------------------------------------------------------------------------
4
- // for a full list of available breakpoints, see the $breakpoints map in the /tokens/_breakpoints.scss file
4
+ /*
5
+ Esse mixin foi criado para não precisar escrever o valor em pixels de cada breakpoint toda vez que for necessário
6
+ criar um media query. Se em algum momento for necessário alterar o valor de um breakpoint, basta alterar o valor nos
7
+ tokens e o mixin irá se encarregar de atualizar todos os media queries que utilizam aquele breakpoint.
8
+
9
+ Exemplo de uso:
10
+
11
+
12
+
13
+ */
5
14
  @mixin media-breakpoint($breakpointName) {
6
15
  $mediaQuery: map-get($breakpoints, $breakpointName);
7
16
  @if ($mediaQuery == null) {
@@ -34,7 +34,7 @@ How to use
34
34
  }
35
35
  }
36
36
 
37
- @media (min-width: 1024px) {
37
+ @include media-breakpoint('gt-sm') {
38
38
  .matcha-header {
39
39
 
40
40
  // matcha-header__content
@@ -61,10 +61,10 @@ How to use
61
61
  }
62
62
 
63
63
  // X-Large devices (big desktops, 1440px and up < 1920)
64
- @media (min-width: 1440px) {}
64
+ @include media-breakpoint('gt-md') {}
65
65
 
66
66
  // XX-Large devices (larger desktops, 1920px and up)
67
- @media (min-width: 1920px) {}
67
+ @include media-breakpoint('gt-lg') {}
68
68
  }
69
69
 
70
70
  // -----------------------------------------------------------------------------------------------------
@@ -251,10 +251,10 @@ How to use
251
251
  }
252
252
 
253
253
  // Medium devices (landscapes and tablets, 600px and up < 1024px )
254
- @media (min-width: 600px) {}
254
+ @include media-breakpoint('gt-xs') {}
255
255
 
256
256
  // Large devices (tablets and small monitors, 1024px and up < 1440px)
257
- @media (min-width: 1024px) {
257
+ @include media-breakpoint('gt-xs') {
258
258
  .matcha-header {
259
259
  &__content {
260
260
  padding: 16px;
@@ -321,7 +321,7 @@ How to use
321
321
  }
322
322
 
323
323
  // X-Large devices (big desktops, 1440px and up < 1920)
324
- @media (min-width: 1440px) {}
324
+ @include media-breakpoint('gt-md') {}
325
325
 
326
326
  // XX-Large devices (larger desktops, 1920px and up)
327
- @media (min-width: 1920px) {}
327
+ @include media-breakpoint('gt-lg') {}
@@ -0,0 +1,107 @@
1
+ .matcha-tooltip-content {
2
+ position: absolute;
3
+ z-index: 9999;
4
+ padding: 8px 16px;
5
+ border-radius: 8px;
6
+ font-size: 14px;
7
+ line-height: 20px;
8
+ width: auto;
9
+ max-width: 500px;
10
+ text-overflow: ellipsis;
11
+ display: inline-flex;
12
+ gap:8px;
13
+ align-items: center;
14
+ justify-content: center;
15
+
16
+ &:not(.matcha-tooltip-content_below):not(.matcha-tooltip-content_left):not(.matcha-tooltip-content_right)::after {
17
+ content: "";
18
+ position: absolute;
19
+ width: 0;
20
+ height: 0;
21
+ border-style: solid;
22
+ border-width: 6px 8px 0 8px;
23
+ bottom: -4px;
24
+ left: 50%;
25
+ border-radius: 0px;
26
+ transform: translateX(-50%);
27
+ }
28
+ }
29
+
30
+ // Estilo para o botão de fechar
31
+ .matcha-tooltip-close {
32
+ display: flex;
33
+ pointer-events: auto; // Permite que o botão receba cliques
34
+ cursor: pointer;
35
+
36
+ &::before {
37
+ content: "\e92a";
38
+ font-family: 'MatchaIcons';
39
+ font-size: 16px;
40
+ line-height: 16px;
41
+ width: 16px;
42
+ height: 16px;
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ }
47
+ }
48
+
49
+ .matcha-tooltip-content_below::before {
50
+ content: '';
51
+ position: absolute;
52
+ width: 0;
53
+ height: 0;
54
+ border-style: solid;
55
+ border-width: 0px 8px 6px 8px;
56
+ top: -4px;
57
+ left: 50%;
58
+ transform: translateX(-50%);
59
+ }
60
+
61
+ .matcha-tooltip-content_left::after {
62
+ content: '';
63
+ position: absolute;
64
+ width: 0;
65
+ height: 0;
66
+ border-style: solid;
67
+ border-width: 8px 0 8px 6px;
68
+ top: 50%;
69
+ right: -4px;
70
+ transform: translateY(-50%);
71
+ }
72
+
73
+ .matcha-tooltip-content_right::after {
74
+ content: '';
75
+ position: absolute;
76
+ width: 0;
77
+ height: 0;
78
+ border-style: solid;
79
+ border-width: 8px 6px 8px 0;
80
+ top: 50%;
81
+ left: -4px;
82
+ transform: translateY(-50%);
83
+ }
84
+
85
+ @mixin matcha-tooltip-theme($theme) {
86
+ $foreground: map-get($theme, foreground);
87
+
88
+ .matcha-tooltip-content {
89
+ background-color: map-get($foreground, text);
90
+ color: map-get($foreground, text-inverse);
91
+ &:not(.matcha-tooltip-content_below):not(.matcha-tooltip-content_left):not(.matcha-tooltip-content_right)::after {
92
+ border-color: map-get($foreground, text) transparent transparent transparent;
93
+ }
94
+ }
95
+
96
+ .matcha-tooltip-content_below::before {
97
+ border-color: transparent transparent map-get($foreground, text) transparent;
98
+ }
99
+
100
+ .matcha-tooltip-content_left::after {
101
+ border-color: transparent transparent transparent map-get($foreground, text);
102
+ }
103
+
104
+ .matcha-tooltip-content_right::after {
105
+ border-color: transparent map-get($foreground, text) transparent transparent;
106
+ }
107
+ }
package/main.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  // TOKENS
2
- @import "./tokens/animations";
3
- @import "./tokens/breakpoints";
2
+ @import "./tokens/animations-tokens";
3
+ @import "./tokens/breakpoints-tokens";
4
4
  @import "./tokens/color-tokens";
5
5
  @import "./tokens/elevation-tokens";
6
6
  @import "./tokens/spacing-tokens";
@@ -12,7 +12,7 @@
12
12
  // MIXINS
13
13
  @import "./abstracts/colors"; // colors-classes-static() colors-classes-dynamic()
14
14
  @import "./abstracts/elevation"; // elevation() _matcha-theme-elevation() matcha-overridable-elevation() _matcha-theme-overridable-elevation() elevation-transition() elevation-theme()
15
- @import "./abstracts/mixins"; // media-breakpoint()
15
+ @import "./abstracts/media-breakpoint"; // media-breakpoint()
16
16
 
17
17
  // TYPOGRAPHY
18
18
  @import "./abstracts/typography"; // matcha-typography-font-shorthand() matcha-typography-level-to-styles() matcha-reset-typography()
@@ -33,6 +33,7 @@
33
33
  @import "./components/matcha-scrollbar.scss"; // matcha-scrollbar-theme($theme)
34
34
  @import "./components/matcha-scrollbox-shadow.scss"; // matcha-scrollbox-shadow-theme($theme)
35
35
  @import "./components/matcha-table.scss"; // matcha-table-theme($theme)
36
+ @import "./components/matcha-tooltip.scss"; // matcha-tooltip-theme($theme)
36
37
 
37
38
  // VENDORS
38
39
  @import "./vendors/angular-editor.scss";
@@ -125,6 +126,7 @@
125
126
  @include matcha-table-theme($theme);
126
127
 
127
128
  @include matcha-button-theme($theme);
129
+ @include matcha-tooltip-theme($theme);
128
130
  @include matcha-header-theme($theme);
129
131
  @include matcha-menu-theme($theme);
130
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-theme",
3
- "version": "18.1.49",
3
+ "version": "18.2.0",
4
4
  "description": "Themes for matcha-design-system",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,16 +1,16 @@
1
1
  // Media step breakpoint mixin based on Angular Material lib
2
2
  $breakpoints: (
3
3
  xs: 'screen and (max-width: 599px)',
4
- sm: 'screen and (min-width: 600px) and (max-width: 1359px)',
5
- md: 'screen and (min-width: 1360px) and (max-width: 1439px)',
4
+ sm: 'screen and (min-width: 600px) and (max-width: 1023px)',
5
+ md: 'screen and (min-width: 1024px) and (max-width: 1439px)',
6
6
  lg: 'screen and (min-width: 1440px) and (max-width: 1919px)',
7
7
  xl: 'screen and (min-width: 1920px) and (max-width: 5000px)',
8
8
  lt-sm: 'screen and (max-width: 599px)',
9
- lt-md: 'screen and (max-width: 1359px)',
9
+ lt-md: 'screen and (max-width: 1023px)',
10
10
  lt-lg: 'screen and (max-width: 1439px)',
11
11
  lt-xl: 'screen and (max-width: 1919px)',
12
12
  gt-xs: 'screen and (min-width: 600px)',
13
- gt-sm: 'screen and (min-width: 1360px)',
13
+ gt-sm: 'screen and (min-width: 1024px)',
14
14
  gt-md: 'screen and (min-width: 1440px)',
15
15
  gt-lg: 'screen and (min-width: 1920px)'
16
16
  ) !default;