Skip to content

Commit c889f29

Browse files
committed
fix: version
1 parent dcc3789 commit c889f29

File tree

6 files changed

+56
-51
lines changed

6 files changed

+56
-51
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "designbycode/laravel-mint",
33
"description": "a fresh component library for Laravel",
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"keywords": [
66
"designbycode",
77
"laravel",

src/Enums/ButtonVariant.php

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,70 +24,70 @@ public function colorClass(string $color): string
2424
private static function freshColors(): array
2525
{
2626
return [
27-
'primary' => 'border border-primary-300 text-shadow-primary-200 bg-primary-100 text-primary-600 hover:bg-primary-200 focus:ring-primary-300',
28-
'mute' => 'border border-mute-300 bg-mute-100 text-shadow-mute-300 text-mute-600 hover:bg-mute-200 focus:ring-mute-300',
29-
'white' => 'border border-white bg-white text-shadow-mute-300 text-black/60 hover:bg-white/90 focus:ring-white',
30-
'black' => 'border border-black bg-mute-300 text-shadow-mute-300 text-mute-600 hover:bg-mute-300/90 focus:ring-mute-300',
31-
'danger' => 'border border-danger-300 text-shadow-danger-200 bg-danger-100 text-danger-600 hover:bg-danger-200 focus:ring-danger-300',
27+
'primary' => 'border border-primary-300 text-shadow-primary-200 bg-primary-100 text-primary-600 hover:bg-primary-200 focus:ring-primary-300/50',
28+
'mute' => 'border border-mute-300 bg-mute-100 text-shadow-mute-300 text-mute-600 hover:bg-mute-200 focus:ring-mute-300/50',
29+
'white' => 'border border-white bg-white text-shadow-mute-300 text-black/60 hover:bg-white/90 focus:ring-white/50',
30+
'black' => 'border border-black bg-mute-300 text-shadow-mute-300 text-mute-600 hover:bg-mute-300/90 focus:ring-mute-300/50',
31+
'danger' => 'border border-danger-300 text-shadow-danger-200 bg-danger-100 text-danger-600 hover:bg-danger-200 focus:ring-danger-300/50',
3232
'info' => 'border border-info-300 text-shadow-info-200 bg-info-100 text-info-600 hover:bg-info-200 focus:ring-info-300',
33-
'warning' => 'border border-waring-300 text-shadow-waring-200 bg-waring-100 text-waring-600 hover:bg-waring-200 focus:ring-waring-300',
34-
'success' => 'border border-success-300 text-shadow-success-200 bg-success-100 text-success-600 hover:bg-success-200 focus:ring-success-300',
33+
'warning' => 'border border-waring-300 text-shadow-waring-200 bg-waring-100 text-waring-600 hover:bg-waring-200 focus:ring-waring-300/50',
34+
'success' => 'border border-success-300 text-shadow-success-200 bg-success-100 text-success-600 hover:bg-success-200 focus:ring-success-300/50',
3535
];
3636
}
3737

3838
private static function solidColors(): array
3939
{
4040
return [
41-
'primary' => 'border border-primary-400 text-shadow-primary-700 bg-primary-400 text-white hover:bg-primary-600 focus:ring-primary-400',
42-
'mute' => 'border border-mute-400 text-shadow-mute-700 bg-mute-400 text-white hover:bg-mute-600 focus:ring-mute-400',
43-
'white' => 'border border-white bg-white text-shadow-mute-300 text-black/90 hover:bg-white/90 focus:ring-white',
44-
'black' => 'border border-black bg-black text-shadow-mute-600 text-white hover:bg-black/90 focus:ring-black',
45-
'danger' => 'border border-danger-400 bg-danger-400 text-shadow-danger-700 text-white hover:bg-danger-600 focus:ring-danger-400',
46-
'info' => 'border border-info-400 bg-info-400 text-shadow-info-700 text-white hover:bg-info-600 focus:ring-info-400',
47-
'warning' => 'border border-waring-400 bg-waring-400 text-shadow-waring-700 text-white hover:bg-waring-600 focus:ring-waring-400',
48-
'success' => 'border border-success-400 bg-success-400 text-shadow-success-700 text-white hover:bg-success-600 focus:ring-success-400',
41+
'primary' => 'border border-primary-400 text-shadow-primary-700 bg-primary-400 text-white hover:bg-primary-600 focus:ring-primary-400/50',
42+
'mute' => 'border border-mute-400 text-shadow-mute-700 bg-mute-400 text-white hover:bg-mute-600 focus:ring-mute-400/50',
43+
'white' => 'border border-white bg-white text-shadow-mute-300 text-black/90 hover:bg-white/90 focus:ring-white/50',
44+
'black' => 'border border-black bg-black text-shadow-mute-600 text-white hover:bg-black/90 focus:ring-black/50',
45+
'danger' => 'border border-danger-400 bg-danger-400 text-shadow-danger-700 text-white hover:bg-danger-600 focus:ring-danger-400/50',
46+
'info' => 'border border-info-400 bg-info-400 text-shadow-info-700 text-white hover:bg-info-600 focus:ring-info-400/50',
47+
'warning' => 'border border-waring-400 bg-waring-400 text-shadow-waring-700 text-white hover:bg-waring-600 focus:ring-waring-400/50',
48+
'success' => 'border border-success-400 bg-success-400 text-shadow-success-700 text-white hover:bg-success-600 focus:ring-success-400/50',
4949
];
5050
}
5151

5252
private static function gradientColors(): array
5353
{
5454
return [
55-
'primary' => 'border border-primary-400 text-shadow-primary-700 bg-linear-to-br from-primary-400 to-primary-600 text-white hover:from-primary-300 focus:ring-primary-400 shadow-sm hover:shadow-md shadow-primary-400/50',
56-
'mute' => 'border border-mute-400 text-shadow-mute-700 bg-linear-to-br from-mute-400 to-mute-600 text-white hover:from-mute-300 focus:ring-mute-400 shadow-sm hover:shadow-md shadow-mute-400/50',
57-
'white' => 'border border-white text-shadow-mute-300 bg-linear-to-br from-white to-mute-100 text-black/90 hover:from-white/50 focus:ring-white shadow-sm hover:shadow-md shadow-mute-400/50',
58-
'black' => 'border border-black text-shadow-mute-600 bg-linear-to-br from-black/70 to-black text-white hover:from-black/50 focus:ring-black shadow-sm hover:shadow-md shadow-black/50',
59-
'danger' => 'border border-danger-400 text-shadow-danger-700 bg-linear-to-br from-danger-400 to-danger-600 text-white hover:from-danger-300 focus:ring-danger-400 shadow-sm hover:shadow-md shadow-danger-400/50',
60-
'info' => 'border border-info-400 text-shadow-info-700 bg-linear-to-br from-info-400 to-info-600 text-white hover:from-info-300 focus:ring-info-400 shadow-sm hover:shadow-md shadow-info-400/50',
61-
'warning' => 'border border-waring-400 text-shadow-waring-700 bg-linear-to-br from-waring-400 to-waring-600 text-white hover:from-waring-300 focus:ring-waring-400 shadow-sm hover:shadow-md shadow-waring-400/50',
62-
'success' => 'border border-success-400 text-shadow-success-700 bg-linear-to-br from-success-400 to-success-600 text-white hover:from-success-300 focus:ring-success-400 shadow-sm hover:shadow-md shadow-success-400/50',
55+
'primary' => 'border border-primary-400 text-shadow-primary-700 bg-linear-to-br from-primary-400 to-primary-600 text-white hover:from-primary-300 focus:ring-primary-400/50 shadow-sm hover:shadow-md shadow-primary-400/50',
56+
'mute' => 'border border-mute-400 text-shadow-mute-700 bg-linear-to-br from-mute-400 to-mute-600 text-white hover:from-mute-300 focus:ring-mute-400/50 shadow-sm hover:shadow-md shadow-mute-400/50',
57+
'white' => 'border border-white text-shadow-mute-300 bg-linear-to-br from-white to-mute-100 text-black/90 hover:from-white/50 focus:ring-white/50 shadow-sm hover:shadow-md shadow-mute-400/50',
58+
'black' => 'border border-black text-shadow-mute-600 bg-linear-to-br from-black/70 to-black text-white hover:from-black/50 focus:ring-black/50 shadow-sm hover:shadow-md shadow-black/50',
59+
'danger' => 'border border-danger-400 text-shadow-danger-700 bg-linear-to-br from-danger-400 to-danger-600 text-white hover:from-danger-300 focus:ring-danger-400/50 shadow-sm hover:shadow-md shadow-danger-400/50',
60+
'info' => 'border border-info-400 text-shadow-info-700 bg-linear-to-br from-info-400 to-info-600 text-white hover:from-info-300 focus:ring-info-400/50 shadow-sm hover:shadow-md shadow-info-400/50',
61+
'warning' => 'border border-waring-400 text-shadow-waring-700 bg-linear-to-br from-waring-400 to-waring-600 text-white hover:from-waring-300 focus:ring-waring-400/50 shadow-sm hover:shadow-md shadow-waring-400/50',
62+
'success' => 'border border-success-400 text-shadow-success-700 bg-linear-to-br from-success-400 to-success-600 text-white hover:from-success-300 focus:ring-success-400/50 shadow-sm hover:shadow-md shadow-success-400/50',
6363
];
6464
}
6565

6666
private static function outlineColors(): array
6767
{
6868
return [
69-
'primary' => 'border border-primary-300 text-shadow-primary-200 dark:text-shadow-primary-900/50 text-primary-600 hover:bg-primary-100 focus:ring-primary-300',
70-
'mute' => 'border border-mute-300 text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 hover:bg-mute-100 focus:ring-mute-300',
71-
'white' => 'border border-white text-shadow-mute-300 dark:text-shadow-black/50 text-black/60 dark:text-white hover:bg-white/90 focus:ring-white dark:hover:bg-white/10',
72-
'black' => 'border border-black text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 hover:bg-mute-200 focus:ring-mute-300 dark:text-mute-100 dark:hover:bg-black/25',
73-
'danger' => 'border border-danger-300 text-shadow-danger-200 dark:text-shadow-danger-900/50 text-danger-600 hover:bg-danger-100 focus:ring-danger-300',
74-
'info' => 'border border-info-300 text-shadow-info-200 dark:text-shadow-info-900/50 text-info-600 hover:bg-info-100 focus:ring-info-300',
75-
'warning' => 'border border-waring-300 text-shadow-waring-200 dark:text-shadow-waring-900/50 text-waring-600 hover:bg-waring-100 focus:ring-waring-300',
76-
'success' => 'border border-success-300 text-shadow-success-200 dark:text-shadow-success-900/50 text-success-600 hover:bg-success-100 focus:ring-success-300',
69+
'primary' => 'border border-primary-300 text-shadow-primary-200 dark:text-shadow-primary-900/50 text-primary-600 hover:bg-primary-100 focus:ring-primary-300/50',
70+
'mute' => 'border border-mute-300 text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 hover:bg-mute-100 focus:ring-mute-300/50',
71+
'white' => 'border border-white text-shadow-mute-300 dark:text-shadow-black/50 text-black/60 dark:text-white hover:bg-white/90 focus:ring-white/50 dark:hover:bg-white/10',
72+
'black' => 'border border-black text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 hover:bg-mute-200 focus:ring-mute-300 dark:text-mute-100/50 dark:hover:bg-black/25',
73+
'danger' => 'border border-danger-300 text-shadow-danger-200 dark:text-shadow-danger-900/50 text-danger-600 hover:bg-danger-100 focus:ring-danger-300/50',
74+
'info' => 'border border-info-300 text-shadow-info-200 dark:text-shadow-info-900/50 text-info-600 hover:bg-info-100 focus:ring-info-300/50',
75+
'warning' => 'border border-waring-300 text-shadow-waring-200 dark:text-shadow-waring-900/50 text-waring-600 hover:bg-waring-100 focus:ring-waring-300/50',
76+
'success' => 'border border-success-300 text-shadow-success-200 dark:text-shadow-success-900/50 text-success-600 hover:bg-success-100 focus:ring-success-300/50',
7777
];
7878
}
7979

8080
private static function ghostColors(): array
8181
{
8282
return [
83-
'primary' => 'border border-transparent text-shadow-primary-200 dark:text-shadow-primary-900/50 text-primary-600 hover:bg-primary-100 focus:ring-primary-300',
84-
'mute' => 'border border-transparent text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 hover:bg-mute-100 focus:ring-mute-300',
85-
'white' => 'border border-transparent text-shadow-mute-300 dark:text-shadow-black/50 dark:text-white text-black/60 hover:bg-white/90 focus:ring-white dark:hover:bg-white/10',
86-
'black' => 'border border-transparent text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 dark:text-white dark:hover:bg-black hover:bg-mute-200 focus:ring-mute-300 dark:hover:bg-black/25',
87-
'danger' => 'border border-transparent text-shadow-danger-200 dark:text-shadow-danger-900/50 text-danger-600 hover:bg-danger-100 focus:ring-danger-300',
88-
'info' => 'border border-transparent text-shadow-info-200 dark:text-shadow-info-900/50 text-info-600 hover:bg-info-100 focus:ring-info-300',
89-
'warning' => 'border border-transparent text-shadow-waring-200 dark:text-shadow-waring-900/50 text-waring-600 hover:bg-waring-100 focus:ring-waring-300',
90-
'success' => 'border border-transparent text-shadow-success-200 dark:text-shadow-success-900/50 text-success-600 hover:bg-success-100 focus:ring-success-300',
83+
'primary' => 'border border-transparent text-shadow-primary-200 dark:text-shadow-primary-900/50 text-primary-600 hover:bg-primary-100 focus:ring-primary-300/50',
84+
'mute' => 'border border-transparent text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 hover:bg-mute-100 focus:ring-mute-300/50',
85+
'white' => 'border border-transparent text-shadow-mute-300 dark:text-shadow-black/50 dark:text-white text-black/60 hover:bg-white/90 focus:ring-white/50 dark:hover:bg-white/10',
86+
'black' => 'border border-transparent text-shadow-mute-300 dark:text-shadow-black/50 text-mute-600 dark:text-white dark:hover:bg-black hover:bg-mute-200 focus:ring-mute-300/50 dark:hover:bg-black/25',
87+
'danger' => 'border border-transparent text-shadow-danger-200 dark:text-shadow-danger-900/50 text-danger-600 hover:bg-danger-100 focus:ring-danger-300/50',
88+
'info' => 'border border-transparent text-shadow-info-200 dark:text-shadow-info-900/50 text-info-600 hover:bg-info-100 focus:ring-info-300/50',
89+
'warning' => 'border border-transparent text-shadow-waring-200 dark:text-shadow-waring-900/50 text-waring-600 hover:bg-waring-100 focus:ring-waring-300/50',
90+
'success' => 'border border-transparent text-shadow-success-200 dark:text-shadow-success-900/50 text-success-600 hover:bg-success-100 focus:ring-success-300/50',
9191
];
9292
}
9393
}

src/View/Components/Button.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ class Button extends Component
1111
public readonly ButtonVariant $resolvedVariant;
1212

1313
public function __construct(
14-
public readonly string $type = 'submit',
14+
public readonly string $type = 'submit',
1515
public string|ButtonVariant $variant = 'fresh',
16-
public readonly string $color = 'primary',
17-
public readonly string $size = 'md',
18-
public readonly bool $loading = false,
19-
) {
16+
public readonly string $color = 'primary',
17+
public readonly string $size = 'md',
18+
public ?bool $loading = false,
19+
)
20+
{
2021
$this->resolvedVariant = $variant instanceof ButtonVariant
2122
? $variant
2223
: ButtonVariant::from(strtolower($variant));

src/View/Components/FormInput.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ class FormInput extends Component
99
{
1010
public function __construct(
1111
public ?string $name,
12-
) {}
12+
)
13+
{
14+
}
1315

1416
public function classes(): string
1517
{
16-
return 'block w-full rounded-md border-mute-300 dark:placeholder:text-mute-300 dark:border-mute-500 text-mute-700 shadow-sm focus:border-mute-600 focus:ring-primary-400 focus:ring-2 ring-offset-3 sm:text-sm dark:bg-mute-700 dark:text-mute-100';
18+
return 'block w-full rounded-md border-mute-300 dark:placeholder:text-mute-300 dark:border-mute-500 text-mute-700 shadow-sm focus:border-mute-600 focus:ring-primary-400/50 focus:ring-2 ring-offset-3 sm:text-sm dark:bg-mute-700 dark:text-mute-100';
1719
}
1820

1921
public function render(): View

src/View/Components/FormLabel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class FormLabel extends Component
99
{
1010
public function classes(): string
1111
{
12-
return 'block text-sm font-medium text-mute-700 dark:text-mute-300 ';
12+
return 'block text-sm font-medium';
1313
}
1414

1515
public function render(): View

src/View/Components/FormTextarea.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
class FormTextarea extends Component
88
{
99
public function __construct(
10-
public bool $autoGrow,
10+
public ?bool $autoGrow,
1111
public ?string $name,
12-
) {}
12+
)
13+
{
14+
}
1315

1416
public function classes(): string
1517
{
16-
return 'block w-full rounded-md border-mute-300 dark:placeholder:text-mute-300 dark:border-mute-500 text-mute-700 shadow-sm focus:border-mute-600 focus:ring-primary-400 focus:ring-2 ring-offset-3 sm:text-sm dark:bg-mute-700 dark:text-mute-100';
18+
return 'block w-full rounded-md border-mute-300 dark:placeholder:text-mute-300 dark:border-mute-500 text-mute-700 shadow-sm focus:border-mute-600 focus:ring-primary-400/50 focus:ring-2 ring-offset-3 sm:text-sm dark:bg-mute-700 dark:text-mute-100';
1719

1820
}
1921

0 commit comments

Comments
 (0)