Skip to content

Commit bc7372e

Browse files
committed
Merge branch 'refactor-dashboard-qna' into v4-wp-editor-component
2 parents af94240 + a49ad2e commit bc7372e

92 files changed

Lines changed: 4122 additions & 1781 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/core/scss/components/_button.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,22 @@
3636
@include tutor-button-variant(ghost);
3737
}
3838

39+
.tutor-btn-ghost-brand {
40+
@include tutor-button-variant(ghost-brand);
41+
}
42+
3943
.tutor-btn-link {
4044
@include tutor-button-variant(link);
4145
}
4246

47+
.tutor-btn-link-gray {
48+
@include tutor-button-variant(link-gray);
49+
}
50+
51+
.tutor-btn-link-destructive {
52+
@include tutor-button-variant(link-destructive);
53+
}
54+
4355
// Button sizes
4456
.tutor-btn-x-small {
4557
@include tutor-button-size(x-small);

assets/core/scss/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@
2626
@forward 'select';
2727
@forward 'attachment-card';
2828
@forward 'calendar';
29+
@forward 'loading-spinner';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@use '../tokens/' as *;
2+
@use '../mixins/' as *;
3+
4+
.tutor-loading-spinner {
5+
@include tutor-flex();
6+
@include tutor-loading-spinner();
7+
padding: $tutor-spacing-8;
8+
position: relative;
9+
}

assets/core/scss/components/_toast.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
height: 36px;
7272
@include tutor-flex(row, center, center);
7373
border-radius: $tutor-radius-full;
74+
color: $tutor-icon-idle-inverse;
7475
}
7576

7677
&-content {

assets/core/scss/components/_tooltip.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@
2121
@include tutor-typography('tiny', 'regular', 'primary-inverse');
2222
position: fixed;
2323
z-index: 1070;
24-
max-width: 200px;
24+
max-width: 180px;
2525
padding: $tutor-spacing-4;
2626
background-color: $tutor-surface-dark;
2727
border-radius: $tutor-radius-sm;
2828
box-shadow: $tutor-shadow-md;
2929
word-wrap: break-word;
30-
text-align: start;
30+
text-align: center;
3131

3232
&-large {
3333
max-width: 320px;
3434
padding: $tutor-spacing-5;
35+
text-align: start;
3536
}
3637

3738
&-arrow-start {

assets/core/scss/mixins/_buttons.scss

Lines changed: 88 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
@include tutor-transition();
2020

2121
&:disabled {
22+
color: $tutor-text-subdued;
2223
cursor: not-allowed;
24+
25+
svg {
26+
color: $tutor-icon-disabled;
27+
}
2328
}
2429
}
2530

@@ -28,6 +33,10 @@
2833
background-color: $tutor-button-primary;
2934
color: $tutor-text-primary-inverse;
3035

36+
svg {
37+
color: $tutor-icon-idle-inverse;
38+
}
39+
3140
&:hover:not(:disabled) {
3241
background-color: $tutor-button-primary-hover;
3342
color: $tutor-text-primary-inverse;
@@ -40,11 +49,20 @@
4049

4150
&:disabled {
4251
background-color: $tutor-button-primary-disabled;
52+
color: $tutor-text-primary-inverse;
53+
54+
svg {
55+
color: $tutor-icon-idle-inverse;
56+
}
4357
}
4458
} @else if $variant == primary-soft {
4559
background-color: $tutor-button-primary-soft;
4660
color: $tutor-text-brand;
4761

62+
svg {
63+
color: $tutor-icon-brand;
64+
}
65+
4866
&:hover:not(:disabled) {
4967
background-color: $tutor-button-primary-soft-hover;
5068
color: $tutor-text-brand;
@@ -57,12 +75,15 @@
5775

5876
&:disabled {
5977
background-color: $tutor-button-disabled;
60-
color: $tutor-text-subdued;
6178
}
6279
} @else if $variant == destructive {
6380
background-color: $tutor-button-destructive;
6481
color: $tutor-text-primary-inverse;
6582

83+
svg {
84+
color: $tutor-icon-idle-inverse;
85+
}
86+
6687
&:hover:not(:disabled) {
6788
background-color: $tutor-button-destructive-hover;
6889
color: $tutor-text-primary-inverse;
@@ -75,12 +96,15 @@
7596

7697
&:disabled {
7798
background-color: $tutor-button-disabled;
78-
color: $tutor-text-subdued;
7999
}
80100
} @else if $variant == destructive-soft {
81101
background-color: $tutor-button-destructive-soft;
82102
color: $tutor-text-critical;
83103

104+
svg {
105+
color: $tutor-icon-critical;
106+
}
107+
84108
&:hover:not(:disabled) {
85109
background-color: $tutor-button-destructive-soft-hover;
86110
color: $tutor-text-critical;
@@ -93,12 +117,15 @@
93117

94118
&:disabled {
95119
background-color: $tutor-button-disabled;
96-
color: $tutor-text-subdued;
97120
}
98121
} @else if $variant == secondary {
99122
background-color: $tutor-button-secondary;
100123
color: $tutor-text-primary;
101124

125+
svg {
126+
color: $tutor-icon-idle;
127+
}
128+
102129
&:hover:not(:disabled) {
103130
background-color: $tutor-button-secondary-hover;
104131
color: $tutor-text-primary;
@@ -111,13 +138,16 @@
111138

112139
&:disabled {
113140
background-color: $tutor-button-disabled;
114-
color: $tutor-text-subdued;
115141
}
116142
} @else if $variant == outline {
117143
background-color: $tutor-button-outline-inverse;
118144
color: $tutor-text-primary;
119145
box-shadow: inset 0 0 0 1px $tutor-border-idle;
120146

147+
svg {
148+
color: $tutor-icon-idle;
149+
}
150+
121151
&:hover:not(:disabled) {
122152
background-color: $tutor-button-outline-hover;
123153
color: $tutor-text-primary;
@@ -130,26 +160,74 @@
130160

131161
&:disabled {
132162
background-color: $tutor-button-disabled;
133-
color: $tutor-text-subdued;
134163
}
135164
} @else if $variant == ghost {
136165
background-color: transparent;
137166
color: $tutor-text-primary;
138167

168+
svg {
169+
color: $tutor-icon-secondary;
170+
}
171+
139172
&:hover:not(:disabled) {
140173
background-color: $tutor-button-ghost-hover;
141174
color: $tutor-text-primary;
142175
}
176+
} @else if $variant == ghost-brand {
177+
background-color: transparent;
178+
color: $tutor-text-brand;
143179

144-
&:disabled {
145-
color: $tutor-text-subdued;
180+
svg {
181+
color: $tutor-icon-brand;
182+
}
183+
184+
&:hover:not(:disabled) {
185+
background-color: $tutor-button-primary-soft;
146186
}
147187
} @else if $variant == link {
148188
background-color: transparent;
149-
color: $tutor-text-primary;
189+
color: $tutor-text-brand;
150190

151-
&:disabled {
152-
color: $tutor-text-subdued;
191+
svg {
192+
color: $tutor-icon-brand;
193+
}
194+
195+
&:hover:not(:disabled) {
196+
color: $tutor-text-brand-hover;
197+
198+
svg {
199+
color: $tutor-icon-brand-hover;
200+
}
201+
}
202+
} @else if $variant == link-gray {
203+
background-color: transparent;
204+
color: $tutor-text-subdued;
205+
206+
svg {
207+
color: $tutor-icon-subdued;
208+
}
209+
210+
&:hover:not(:disabled) {
211+
color: $tutor-text-secondary;
212+
213+
svg {
214+
color: $tutor-icon-secondary;
215+
}
216+
}
217+
} @else if $variant == link-destructive {
218+
background-color: transparent;
219+
color: $tutor-text-critical;
220+
221+
svg {
222+
color: $tutor-icon-critical;
223+
}
224+
225+
&:hover:not(:disabled) {
226+
color: $tutor-text-critical-hover;
227+
228+
svg {
229+
color: $tutor-icon-critical-hover;
230+
}
153231
}
154232
}
155233
}

assets/core/scss/themes/_dark.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
--tutor-surface-brand-quaternary: #{$tutor-brand-900};
2121
--tutor-surface-sidebar-l1: #{$tutor-gray-950};
2222
--tutor-surface-exception2-secondary: #{$tutor-exception-2-tertiary};
23+
--tutor-surface-exception3-highlight: #{$tutor-exception-3};
2324
--tutor-surface-dark: #{$tutor-gray-800};
2425
--tutor-surface-exception7: #{$tutor-brand-900};
2526
--tutor-surface-warning: #{$tutor-warning-950};
@@ -42,6 +43,7 @@
4243
--tutor-text-light: #{$tutor-gray-25};
4344
--tutor-text-success: #{$tutor-success-600};
4445
--tutor-text-critical: #{$tutor-error-600};
46+
--tutor-text-critical-hover: #{$tutor-error-700};
4547
--tutor-text-warning: #{$tutor-warning-600};
4648
--tutor-text-caution: #{$tutor-yellow-600};
4749
--tutor-text-exception1: #{$tutor-exception-1};
@@ -69,6 +71,7 @@
6971
--tutor-icon-exception5: #{$tutor-exception-5};
7072
--tutor-icon-caution: #{$tutor-yellow-400};
7173
--tutor-icon-critical: #{$tutor-error-600};
74+
--tutor-icon-critical-hover: #{$tutor-error-700};
7275
--tutor-icon-warning: #{$tutor-warning-600};
7376

7477
// =============================================================================

assets/core/scss/themes/_light.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
--tutor-surface-brand-quaternary: #{$tutor-brand-200};
2222
--tutor-surface-sidebar-l1: #{$tutor-gray-10};
2323
--tutor-surface-exception2-secondary: #{$tutor-exception-2-secondary};
24+
--tutor-surface-exception3-highlight: #{$tutor-exception-3};
2425
--tutor-surface-dark: #{$tutor-gray-950};
2526
--tutor-surface-exception7: #{$tutor-brand-900};
2627
--tutor-surface-warning: #{$tutor-warning-50};
@@ -43,6 +44,7 @@
4344
--tutor-text-light: #{$tutor-gray-25};
4445
--tutor-text-success: #{$tutor-success-700};
4546
--tutor-text-critical: #{$tutor-error-600};
47+
--tutor-text-critical-hover: #{$tutor-error-700};
4648
--tutor-text-warning: #{$tutor-warning-800};
4749
--tutor-text-caution: #{$tutor-yellow-800};
4850
--tutor-text-exception1: #{$tutor-exception-1};
@@ -70,6 +72,7 @@
7072
--tutor-icon-exception5: #{$tutor-exception-5};
7173
--tutor-icon-caution: #{$tutor-yellow-400};
7274
--tutor-icon-critical: #{$tutor-error-600};
75+
--tutor-icon-critical-hover: #{$tutor-error-700};
7376
--tutor-icon-warning: #{$tutor-warning-700};
7477

7578
// =============================================================================

assets/core/scss/tokens/_icons.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ $tutor-icon-brand: var(--tutor-icon-brand);
1414
$tutor-icon-brand-hover: var(--tutor-icon-brand-hover);
1515
$tutor-icon-success-primary: var(--tutor-icon-success-primary);
1616
$tutor-icon-critical: var(--tutor-icon-critical);
17+
$tutor-icon-critical-hover: var(--tutor-icon-critical-hover);
1718
$tutor-icon-warning: var(--tutor-icon-warning);
1819
$tutor-icon-caution: var(--tutor-icon-caution);
1920
$tutor-icon-exception1: var(--tutor-icon-exception1);
@@ -36,6 +37,7 @@ $tutor-icons: (
3637
brand-hover: $tutor-icon-brand-hover,
3738
success-primary: $tutor-icon-success-primary,
3839
critical: $tutor-icon-critical,
40+
critical-hover: $tutor-icon-critical-hover,
3941
warning: $tutor-icon-warning,
4042
caution: $tutor-icon-caution,
4143
exception1: $tutor-icon-exception1,

assets/core/scss/tokens/_surfaces.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ $tutor-surface-brand-tertiary: var(--tutor-surface-brand-tertiary);
1717
$tutor-surface-brand-quaternary: var(--tutor-surface-brand-quaternary);
1818
$tutor-surface-sidebar-l1: var(--tutor-surface-sidebar-l1);
1919
$tutor-surface-exception2-secondary: var(--tutor-surface-exception2-secondary);
20+
$tutor-surface-exception3-highlight: var(--tutor-surface-exception3-highlight);
2021
$tutor-surface-dark: var(--tutor-surface-dark);
2122
$tutor-surface-exception7: var(--tutor-surface-exception7);
2223
$tutor-surface-warning: var(--tutor-surface-warning);
@@ -41,6 +42,7 @@ $tutor-surfaces: (
4142
brand-quaternary: $tutor-surface-brand-quaternary,
4243
sidebar-l1: $tutor-surface-sidebar-l1,
4344
exception2-secondary: $tutor-surface-exception2-secondary,
45+
exception3-highlight: $tutor-surface-exception3-highlight,
4446
dark: $tutor-surface-dark,
4547
exception7: $tutor-surface-exception7,
4648
warning: $tutor-surface-warning,

0 commit comments

Comments
 (0)