-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PoC] Front Ui to help you build a front webapp quickly
- Loading branch information
Showing
153 changed files
with
7,245 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\EventListener; | ||
|
||
use App\Entity\User; | ||
use Doctrine\ORM\EntityManagerInterface; | ||
use Sylius\FrontUi\Event\ChangePasswordEvent; | ||
use Sylius\FrontUi\Symfony\EventListener\Attribute\AsChangePasswordListener; | ||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; | ||
use Webmozart\Assert\Assert; | ||
|
||
#[AsChangePasswordListener] | ||
final class ChangePasswordListener | ||
{ | ||
public function __construct( | ||
private readonly UserPasswordHasherInterface $passwordHasher, | ||
private readonly EntityManagerInterface $entityManager, | ||
) { | ||
} | ||
|
||
public function __invoke(ChangePasswordEvent $event): void | ||
{ | ||
/** @var User $user */ | ||
$user = $event->getUser(); | ||
Assert::isInstanceOf($user, User::class); | ||
|
||
$hashedPassword = $this->passwordHasher->hashPassword($user, $event->getNewPassword()); | ||
|
||
$user->setPassword($hashedPassword); | ||
|
||
$this->entityManager->flush(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,14 @@ public function build(): void | |
->admin() | ||
->withEmail('[email protected]') | ||
->withPassword('admin') | ||
->create(); | ||
->create() | ||
; | ||
|
||
UserFactory::new() | ||
->admin() | ||
->withEmail('[email protected]') | ||
->withPassword('front') | ||
->create() | ||
; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
imports: | ||
- { resource: '../../src/BootstrapFrontUi/config/app.php' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sylius_webapp_ui: | ||
resource: '@SyliusFrontUiBundle/config/routes.php' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import './styles/main.scss'; | ||
|
||
import './scripts/bootstrap'; |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
import * as bootstrap from 'bootstrap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
@font-face { | ||
font-family: 'Inter'; | ||
src: url('../fonts/inter-variable-font-slnt-wght.ttf') format('truetype-variations'); | ||
font-weight: 1 999; | ||
} | ||
|
||
html { | ||
font-feature-settings: "cv03", "cv04", "cv11"; | ||
} | ||
|
||
a { | ||
text-underline-offset: 0.25em; | ||
|
||
&.link-reset { | ||
color: inherit; | ||
text-decoration: none; | ||
|
||
&:hover { | ||
color: $link-hover-color; | ||
} | ||
} | ||
} | ||
|
||
.fs-7 { | ||
font-size: $small-font-size; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
.btn-icon { | ||
display: inline-flex; | ||
gap: 0.4rem; | ||
align-items: center; | ||
padding-left: 1.4rem; | ||
padding-right: 1.6rem; | ||
} | ||
|
||
.btn-primary { | ||
color: #fff; | ||
} | ||
|
||
.btn-transparent { | ||
@extend .btn-light; | ||
background-color: transparent; | ||
border-color: transparent; | ||
|
||
&:hover { | ||
background-color: $gray-100; | ||
border-color: transparent; | ||
} | ||
|
||
&:focus { | ||
background-color: transparent !important; | ||
border-color: transparent !important; | ||
} | ||
|
||
&:active { | ||
background-color: $gray-200 !important; | ||
border-color: transparent !important; | ||
} | ||
} | ||
|
||
.btn-outline-gray { | ||
@extend .btn-outline-dark; | ||
--bs-btn-border-color: var(--bs-gray-400); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.form-label.required::after { | ||
content: "*"; | ||
padding-left: 3px; | ||
color: $danger; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.symfony-icon { | ||
height: 28px; | ||
width: 28px; | ||
|
||
&-xs { | ||
height: 16px; | ||
width: 16px; | ||
} | ||
|
||
&-sm { | ||
height: 20px; | ||
width: 20px; | ||
} | ||
|
||
&-md { | ||
height: 24px; | ||
width: 24px; | ||
} | ||
|
||
&-lg { | ||
height: 32px; | ||
width: 32px; | ||
} | ||
|
||
&-xl { | ||
height: 40px; | ||
width: 40px; | ||
} | ||
|
||
& > * { | ||
stroke-width: 1.1; | ||
} | ||
|
||
&-xs, &-sm, &-md { | ||
& > * { | ||
stroke-width: 2; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*! | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
.sylius-shop-loader { | ||
display: flex; | ||
position: absolute; | ||
height: 100%; | ||
width: 100%; | ||
background: rgba(255, 255, 255, 0.9); | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 100; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Sylius Sp. z o.o. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
$utilities: ( | ||
"min-viewport-height": ( | ||
property: min-height, | ||
responsive: true, | ||
class: min-vh, | ||
values: (100: 100vh) | ||
), | ||
"width": ( | ||
property: width, | ||
class: w, | ||
values: ( | ||
1: 1%, | ||
25: 25%, | ||
50: 50%, | ||
75: 75%, | ||
100: 100%, | ||
auto: auto | ||
) | ||
), | ||
); | ||
|
||
$positions: 40px, 50px, 80px; | ||
|
||
@each $position in $positions { | ||
.border-#{$position}-dashed { | ||
border-#{$position}-style: dashed !important; | ||
} | ||
} |
Oops, something went wrong.