matcha-theme 20.187.0 → 20.189.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.
@@ -216,6 +216,34 @@ a[matcha-button] {
216
216
  border-radius: 999px;
217
217
  z-index: 2;
218
218
  }
219
+
220
+ &[size="tiny"]::after {
221
+ width: 0.75rem;
222
+ height: 0.75rem;
223
+ top: -0.15rem;
224
+ right: -0.15rem;
225
+ }
226
+
227
+ &[size="small"]::after {
228
+ width: 1rem;
229
+ height: 1rem;
230
+ top: -0.2rem;
231
+ right: -0.2rem;
232
+ }
233
+
234
+ &[size="large"]::after {
235
+ width: 1.5rem;
236
+ height: 1.5rem;
237
+ top: -0.3rem;
238
+ right: -0.3rem;
239
+ }
240
+
241
+ &[size="huge"]::after {
242
+ width: 1.65rem;
243
+ height: 1.65rem;
244
+ top: -0.34rem;
245
+ right: -0.34rem;
246
+ }
219
247
  }
220
248
 
221
249
  .ripple {
@@ -1,107 +1,200 @@
1
1
  /*
2
2
  How to use
3
- @import '~matcha-ds/assets/scss/components/matcha-header.scss';
4
- @include matcha-progress-bar-theme($theme);
3
+ @import '~matcha-ds/assets/scss/components/matcha-progress-bar.scss';
4
+ @include matcha-progress-bar($theme);
5
5
  */
6
- // -----------------------------------------------------------------------------------------------------
7
- // Progress-bar [Theme]
8
- // -----------------------------------------------------------------------------------------------------
6
+
7
+ @mixin keyframes($animation-name) {
8
+ @-webkit-keyframes #{$animation-name} {
9
+ @content;
10
+ }
11
+
12
+ @-moz-keyframes #{$animation-name} {
13
+ @content;
14
+ }
15
+
16
+ @keyframes #{$animation-name} {
17
+ @content;
18
+ }
19
+ }
20
+
21
+ @mixin generate-matcha-progress-bar-size-classes($helper-breakpoints) {
22
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
23
+ @include media-breakpoint($materialBreakpoint) {
24
+ $infix: if($materialBreakpoint ==null, "", "-#{$breakpoint}");
25
+
26
+ &[size#{$infix}="tiny"] {
27
+ .progress {
28
+ height: px-to-rem(8px);
29
+ }
30
+ }
31
+
32
+ &[size#{$infix}="small"] {
33
+ .progress {
34
+ height: px-to-rem(16px);
35
+ }
36
+ }
37
+
38
+ &[size#{$infix}="medium"] {
39
+ .progress {
40
+ height: px-to-rem(32px);
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ &:not([size]) {
47
+ .progress {
48
+ height: px-to-rem(4px);
49
+ }
50
+ }
51
+ }
52
+
9
53
  @mixin matcha-progress-bar-theme($theme) {
10
- $accent: map-get($theme, accent);
11
- $warn: map-get($theme, warn);
12
- $primary: map-get($theme, primary);
13
- $background: map-get($theme, background);
14
- $foreground: map-get($theme, foreground);
54
+ matcha-progress-bar:not([color]) {
15
55
 
16
- .matcha-progress-bar {
56
+ .determinate,
57
+ .indeterminate {
58
+ background-color: getAccent($theme);
59
+ }
60
+ }
61
+
62
+ matcha-progress-bar {
17
63
 
18
- // matcha-progress-bar__field
19
- &__field {
20
- background: map-get($background, disabled);
21
- transition: all 300ms linear;
64
+ .matcha-progress-bar {
65
+ overflow: hidden;
66
+ border-radius: px-to-rem(8px);
22
67
  }
23
68
 
24
- // matcha-progress-bar__progress
25
- &__progress {
26
- transition: all 300ms ease-out;
27
-
28
- &::before {
29
- content: '';
30
- border-radius: 8px;
31
- background-size: 50px 50px;
32
- background-image: linear-gradient(-45deg,
33
- rgba(0, 0, 0, 0) 25%,
34
- transparent 25%,
35
- transparent 50%,
36
- rgba(0, 0, 0, 0) 50%,
37
- rgba(0, 0, 0, 0) 75%,
38
- transparent 75%,
39
- transparent);
40
- animation: progress-bar-animation 2s linear infinite;
69
+ .progress {
70
+ position: relative;
71
+ display: block;
72
+ width: 100%;
73
+ background-color: getDisabled($theme);
74
+ border-radius: px-to-rem(2px);
75
+ background-clip: padding-box;
76
+ overflow: hidden;
77
+
78
+ .progress-text {
79
+ position: absolute;
80
+ top: 0;
81
+ left: 0;
41
82
  width: 100%;
83
+ height: 100%;
42
84
  display: flex;
43
- transition: all 300ms linear;
85
+ align-items: center;
86
+ justify-content: center;
87
+ font-size: 0.75rem;
88
+ font-weight: 600;
89
+ pointer-events: none;
90
+ white-space: nowrap;
91
+ }
44
92
 
93
+ .progress-text-bg {
94
+ color: getForeground($theme);
95
+ z-index: 1;
45
96
  }
46
- }
47
97
 
48
- @keyframes progress-bar-animation {
49
- 0% {
50
- background-position: 50px 50px;
98
+ .progress-text-fg {
99
+ color: getDisabled($theme);
100
+ z-index: 3;
101
+ transition: clip-path 0.3s linear;
51
102
  }
52
103
 
53
- 100% {
54
- background-position: 0px 0px;
104
+ .determinate {
105
+ position: absolute;
106
+ top: 0;
107
+ bottom: 0;
108
+ left: 0;
109
+ transition: width 0.3s linear;
110
+ z-index: 2;
111
+ }
112
+
113
+ .indeterminate {
114
+ &:before {
115
+ content: '';
116
+ position: absolute;
117
+ background-color: inherit;
118
+ top: 0;
119
+ left: 0;
120
+ bottom: 0;
121
+ will-change: left, right;
122
+ animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
123
+ }
124
+
125
+ &:after {
126
+ content: '';
127
+ position: absolute;
128
+ background-color: inherit;
129
+ top: 0;
130
+ left: 0;
131
+ bottom: 0;
132
+ will-change: left, right;
133
+ animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
134
+ animation-delay: 1.15s;
135
+ }
55
136
  }
56
137
  }
57
138
 
58
- // matcha-progress-bar__progress
59
- &__label {
60
- color: map-get($foreground, foreground-inverse);
139
+ // Informative card styles
140
+ .progress-info-card {
141
+ border-radius: 8px;
142
+ width: 100%;
143
+ display: block;
61
144
  }
145
+
146
+ @include generate-matcha-progress-bar-size-classes($helper-breakpoints);
62
147
  }
63
- }
64
148
 
65
- // -----------------------------------------------------------------------------------------------------
66
- // Progress-bar [Style]
67
- // -----------------------------------------------------------------------------------------------------
68
- .matcha-progress-bar {
69
- width: 100%;
70
- display: flex;
149
+ @include keyframes(indeterminate) {
150
+ 0% {
151
+ left: -35%;
152
+ right: 100%;
153
+ }
71
154
 
72
- // matcha-progress-bar__field
73
- &__field {
74
- border-radius: 8px;
75
- display: flex;
76
- width: 100%;
77
- }
155
+ 60% {
156
+ left: 100%;
157
+ right: -90%;
158
+ }
78
159
 
79
- // matcha-progress-bar__progress
80
- &__progress {
81
- line-height: 12px;
82
- font-size: 12px;
83
- height: 16px;
84
- border-radius: 8px;
85
- display: flex;
160
+ 100% {
161
+ left: 100%;
162
+ right: -90%;
163
+ }
86
164
  }
87
165
 
88
- // matcha-progress-bar__progress
89
- &__label {
90
- line-height: 16px;
91
- padding-left: 8px;
92
- display: flex;
93
- position: relative;
166
+ @include keyframes(indeterminate-short) {
167
+ 0% {
168
+ left: -200%;
169
+ right: 100%;
170
+ }
171
+
172
+ 60% {
173
+ left: 107%;
174
+ right: -8%;
175
+ }
176
+
177
+ 100% {
178
+ left: 107%;
179
+ right: -8%;
180
+ }
94
181
  }
95
182
  }
96
183
 
97
- // Medium devices (landscapes and tablets, 600px and up < 1024px )
98
- @media (min-width: 600px) {}
99
184
 
100
- // Large devices (tablets and small monitors, 1024px and up < 1440px)
101
- @media (min-width: 1024px) {}
185
+ matcha-progress-bar {
186
+ display: flex;
187
+ width: 100%;
188
+ border-radius: px-to-rem(8px);
102
189
 
103
- // X-Large devices (big desktops, 1440px and up < 1920)
104
- @media (min-width: 1440px) {}
190
+ .matcha-progress-bar {
191
+ display: flex;
192
+ flex-direction: column;
193
+ position: relative;
194
+ width: 100%;
195
+ }
196
+ }
105
197
 
106
- // XX-Large devices (larger desktops, 1920px and up)
107
- @media (min-width: 1920px) {}
198
+ .progress {
199
+ overflow: hidden;
200
+ }
package/main.scss CHANGED
@@ -62,6 +62,7 @@
62
62
  @import "./components/matcha-chip.scss"; // matcha-chip($theme)
63
63
  @import "./components/matcha-date.scss"; // matcha-date($theme)
64
64
  @import "./components/matcha-date-range.scss"; // matcha-date-range($theme)
65
+ @import "./components/matcha-progress-bar.scss"; // matcha-progress-bar($theme)
65
66
  @import "./components/matcha-page-builder.scss"; // matcha-page-builder($theme)
66
67
 
67
68
  // VENDORS
@@ -182,5 +183,6 @@
182
183
  @include matcha-slider-theme($theme);
183
184
  @include matcha-highlight-theme($theme);
184
185
  @include matcha-divider-theme($theme);
186
+ @include matcha-progress-bar-theme($theme);
185
187
  @include matcha-page-builder-theme($theme);
186
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-theme",
3
- "version": "20.187.0",
3
+ "version": "20.189.0",
4
4
  "description": "Themes for matcha-design-system",
5
5
  "main": "main.scss",
6
6
  "scripts": {