Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"*.{ts,tsx}": ["pnpm exec eslint --fix", "bash -c 'pnpm exec tsc --noEmit'"],
"*.{ts,tsx,jsonc,md}": ["pnpm exec prettier --write"],
"assets/{core/scss,src/scss/frontend}/**/*.scss": ["stylelint --fix"],
"*.{ts,tsx}": [
"pnpm exec eslint --fix",
"bash -c 'pnpm exec tsc --noEmit'"
],
"*.{ts,tsx,jsonc,md}": [
"pnpm exec prettier --write"
],
"*.scss": [
"stylelint --fix"
],
"*.php": [
"bash -c 'if [ ! -x ./vendor/bin/phpstan ]; then printf \"\\nError: PHPStan is not installed.\\n\\nInstall it with:\\n composer install\\n\\nThen retry your commit.\\n\\n\" >&2; exit 1; fi; exec ./vendor/bin/phpstan analyze --memory-limit=-1 \"$@\"' --"
]
Expand Down
7 changes: 7 additions & 0 deletions assets/core/scss/components/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
.tutor-accordion {
overflow: visible;
background-color: transparent;

@include tutor-flex(column, stretch, start);

gap: $tutor-spacing-6;

&-item {
Expand All @@ -16,12 +18,14 @@

&-header {
@include tutor-flex(row, start, space-between);

width: 100%;
padding: $tutor-spacing-5 $tutor-spacing-6;
background: none;
border: none;
text-align: start;
cursor: pointer;

@include tutor-transition(background-color);

&:hover,
Expand All @@ -33,13 +37,16 @@

&-title {
margin: 0;

@include tutor-typography('medium', 'medium', 'primary', 'heading');
}

&-icon {
@include tutor-flex-center();

flex-shrink: 0;
color: $tutor-icon-idle;

@include tutor-transition(transform);

.tutor-accordion-header[aria-expanded='true'] & {
Expand Down
2 changes: 2 additions & 0 deletions assets/core/scss/components/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

.tutor-alert {
@include tutor-flex(row, center, space-between);

gap: $tutor-spacing-5;
padding: $tutor-spacing-4;
border-radius: $tutor-radius-sm;
min-height: 48px;

.tutor-alert-content {
@include tutor-flex(row, start);

gap: $tutor-spacing-3;
}

Expand Down
6 changes: 6 additions & 0 deletions assets/core/scss/components/_attachment-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

.tutor-attachment-card {
@include tutor-flex(row, center, flex-start);

width: 100%;
gap: $tutor-spacing-5;
padding: $tutor-spacing-4 $tutor-spacing-5;

@include tutor-transition(background-color);

position: relative;

&:hover,
Expand All @@ -17,6 +20,7 @@

&-icon {
@include tutor-flex(row, center, center);

width: 48px;
height: 48px;
border-radius: $tutor-radius-sm;
Expand All @@ -36,6 +40,7 @@

&-body {
@include tutor-flex(column);

gap: $tutor-spacing-1;
flex: 1 1 auto;
min-width: 0;
Expand All @@ -53,6 +58,7 @@
@include tutor-breakpoint-up(md) {
&-actions {
opacity: 0;

@include tutor-transition((opacity, visibility));
}

Expand Down
2 changes: 2 additions & 0 deletions assets/core/scss/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ button.tutor-btn-link,
a.tutor-btn-link,
.tutor-btn-link {
@include tutor-button-variant(link);

box-shadow: none
}

Expand Down Expand Up @@ -144,6 +145,7 @@ button.tutor-btn-icon,
a.tutor-btn-icon,
.tutor-btn-icon {
flex-shrink: 0;

@include tutor-button-icon-size(medium);

&.tutor-btn-x-small {
Expand Down
8 changes: 6 additions & 2 deletions assets/core/scss/components/_calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@

[data-vc-week-day] {
@include tutor-typography('tiny', 'regular', 'secondary');

color: $tutor-text-secondary !important;
}

.vc-months__month.vc-months__month,
.vc-years__year.vc-years__year {
@include tutor-button-base();
@include tutor-button-variant('ghost');

color: $tutor-text-primary;
}

Expand All @@ -41,6 +43,7 @@
button {
box-shadow: none;
transition: none;

@include tutor-transition((background-color, color));
}

Expand Down Expand Up @@ -129,12 +132,14 @@

.vc-presets {
grid-area: presets;

@include tutor-flex(column);

button {
@include tutor-button-reset();
@include tutor-typography(tiny, medium);
@include tutor-flex(row, center, space-between);

border-radius: $tutor-radius-sm;
padding: $tutor-spacing-3 $tutor-spacing-5;
text-align: start;
Expand All @@ -159,8 +164,7 @@
}

@include tutor-breakpoint-down(md) {
flex-direction: row;
flex-wrap: wrap;
flex-flow: row wrap;
border-bottom: 1px solid $tutor-border-idle;
padding-bottom: $tutor-spacing-4;
margin-bottom: $tutor-spacing-4;
Expand Down
6 changes: 5 additions & 1 deletion assets/core/scss/components/_feature-disabled.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Feature Disabled / Access Denied Component
//
// Ported from legacy assets/src/scss/front/_denied.scss into the v4 design system.
// Used by templates/feature_disabled.php to render access-denied and feature-disabled
// states (e.g. when user registration is disabled) with proper v4 tokens and typography.
Expand All @@ -11,11 +10,14 @@
max-width: 444px;
padding: $tutor-spacing-12 $tutor-spacing-none $tutor-spacing-8;
margin: auto;

@include tutor-flex(column, center, center);

text-align: center;

.tutor-disabled-content-wrapper {
@include tutor-flex(column, center, center);

text-align: center;

img {
Expand All @@ -24,12 +26,14 @@

h3 {
@include tutor-typography('h4', 'medium', 'primary');

margin-top: $tutor-spacing-none;
margin-bottom: $tutor-spacing-3;
}

p {
@include tutor-typography('p2', 'regular', 'subdued');

margin-top: $tutor-spacing-none;
margin-bottom: $tutor-spacing-8;
}
Expand Down
14 changes: 12 additions & 2 deletions assets/core/scss/components/_file-uploader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

.tutor-file-uploader {
@include tutor-flex(column, center, center);

min-height: 228px;
background-color: $tutor-surface-brand-tertiary;
background-image: $tutor-file-uploader-background-image;
border-radius: $tutor-input-radius;
padding: $tutor-spacing-6;
cursor: pointer;
position: relative;

@include tutor-transition();

&.tutor-file-uploader-drag-over {
Expand All @@ -23,24 +25,28 @@

&-icon {
@include tutor-flex(row, center, center);

color: $tutor-icon-hover;
margin-bottom: $tutor-spacing-6;
}

&-content {
@include tutor-flex(column, center, center);

gap: $tutor-spacing-2;
text-align: center;
margin-bottom: $tutor-spacing-8;
}

&-title {
@include tutor-typography(small, medium, primary);

margin: 0;
}

&-subtitle {
@include tutor-typography(tiny, regular, subdued);

margin: 0;
}

Expand All @@ -49,14 +55,15 @@
width: 0;
height: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
}

.tutor-file-preview {
@include tutor-flex(row, center, center);

position: relative;
width: 100%;
min-height: 228px;
Expand All @@ -72,12 +79,14 @@

&-overlay {
@include tutor-flex(row, center, center);

position: absolute;
inset: 0;
background-color: rgba($color: $tutor-surface-dark, $alpha: 0.8);
background-color: rgba($color: $tutor-surface-dark, $alpha: 80%);
opacity: 0;
pointer-events: none;
backdrop-filter: blur(4px);

@include tutor-transition(opacity);
}

Expand All @@ -90,6 +99,7 @@

&-actions {
@include tutor-flex(row, center, center);

gap: $tutor-spacing-3;
}
}
15 changes: 14 additions & 1 deletion assets/core/scss/components/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

.tutor-input-wrapper {
position: relative;

@include tutor-flex(row, center, flex-start);

gap: $tutor-spacing-3;

.tutor-label {
Expand Down Expand Up @@ -52,7 +54,6 @@
}

.tutor-wp-editor-container {

.wp-editor-container,
.mce-tinymce {
border-radius: $tutor-input-radius;
Expand Down Expand Up @@ -165,6 +166,7 @@
.tutor-label {
@include tutor-typography('small', 'medium');
@include tutor-flex(row, center);

gap: $tutor-spacing-3;
margin-bottom: $tutor-spacing-3;

Expand All @@ -180,6 +182,7 @@
.tutor-input-help-icon {
@include tutor-button-reset;
@include tutor-flex(row, center, center);

color: $tutor-icon-subdued;
cursor: help;
}
Expand All @@ -188,11 +191,14 @@
@include tutor-flex(row, center, center);
@include tutor-button-base;
@include tutor-button-variant('ghost');

padding: $tutor-spacing-1;
border-radius: $tutor-radius-sm;
flex-shrink: 0;
position: absolute;

@include right($tutor-spacing-5);

top: 50%;
transform: translateY(-50%);
color: $tutor-icon-idle;
Expand All @@ -202,7 +208,9 @@
position: absolute;
top: 50%;
transform: translateY(-50%);

@include tutor-flex(row, center, center);

color: $tutor-icon-secondary;
pointer-events: none;

Expand All @@ -216,6 +224,7 @@

.tutor-input-password-toggle {
@include tutor-button-reset;

pointer-events: auto;
cursor: pointer;
color: inherit;
Expand Down Expand Up @@ -262,11 +271,14 @@
&-error {
.tutor-input {
border: 1px solid $tutor-border-error;

--tutor-input-border-shadow-current: none;

box-shadow: $tutor-shadow-xs;

&:focus {
@include tutor-focus-ring('error');

border-color: $tutor-border-error;
}
}
Expand All @@ -278,6 +290,7 @@

&:focus {
@include tutor-focus-ring('error');

border-color: $tutor-border-error;
}
}
Expand Down
1 change: 1 addition & 0 deletions assets/core/scss/components/_loading-spinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.tutor-loading-spinner {
@include tutor-flex();
@include tutor-loading-spinner();

padding: $tutor-spacing-8;
position: relative;
}
Loading
Loading