Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit f9f08a4

Browse files
committed
Merge branch 'main' of github.com:/rawilk/laravel-form-components
2 parents 0221122 + fc5b2b9 commit f9f08a4

File tree

14 files changed

+63
-65
lines changed

14 files changed

+63
-65
lines changed

src/Components/Choice/Checkbox.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class Checkbox extends BladeComponent
1212
public string $type = 'checkbox';
1313

1414
public function __construct(
15-
public null|string $name = null,
16-
public null|string $id = null,
15+
public null | string $name = null,
16+
public null | string $id = null,
1717
public mixed $value = null,
18-
public null|string $label = null,
19-
public null|string $description = '',
18+
public null | string $label = null,
19+
public null | string $description = '',
2020
public bool $checked = false,
2121
public $extraAttributes = '',
2222
) {

src/Components/Choice/CheckboxGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class CheckboxGroup extends BladeComponent
88
{
9-
public function __construct(public bool $stacked = true, public int|string $gridCols = 3)
9+
public function __construct(public bool $stacked = true, public int | string $gridCols = 3)
1010
{
1111
}
1212
}

src/Components/Choice/SwitchToggle.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ class SwitchToggle extends BladeComponent
1818
private string $labelId;
1919

2020
public function __construct(
21-
public null|string $name = null,
22-
public null|string $id = null,
21+
public null | string $name = null,
22+
public null | string $id = null,
2323
public mixed $value = false,
2424
public mixed $onValue = true,
2525
public mixed $offValue = false,
26-
public null|string $containerClass = null,
26+
public null | string $containerClass = null,
2727
public bool $short = false,
28-
public null|string $label = null,
28+
public null | string $label = null,
2929
public string $labelPosition = 'right',
30-
public null|string $offIcon = null, // doesn't apply to short mode
31-
public null|string $onIcon = null, // doesn't apply to short mode
32-
public null|string $buttonLabel = 'form-components::messages.switch_button_label',
33-
public null|string $size = null,
30+
public null | string $offIcon = null, // doesn't apply to short mode
31+
public null | string $onIcon = null, // doesn't apply to short mode
32+
public null | string $buttonLabel = 'form-components::messages.switch_button_label',
33+
public null | string $size = null,
3434
public bool $disabled = false,
3535
public $extraAttributes = '',
3636
) {

src/Components/Files/FilePond.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class FilePond extends BladeComponent
1818
public function __construct(
1919
public bool $multiple = false,
2020
public bool $allowDrop = true,
21-
public null|string $name = null,
21+
public null | string $name = null,
2222
public array $options = [],
2323
public bool $disabled = false,
24-
public null|int $maxFiles = null,
24+
public null | int $maxFiles = null,
2525
null|string $type = null,
26-
public null|string $description = null,
26+
public null | string $description = null,
2727
/*
2828
* When set to true, the component will watch for changes to the wire:model
2929
* and manually remove the files from the FilePond instance if they are

src/Components/Files/FileUpload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class FileUpload extends BladeComponent
1919
public null|string $label;
2020

2121
public function __construct(
22-
public null|string $name = null,
23-
public null|string $id = null,
22+
public null | string $name = null,
23+
public null | string $id = null,
2424
null|string $label = 'form-components::messages.file_upload_label',
2525
public bool $multiple = false,
2626
null|string $type = null,

src/Components/FormError.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
class FormError extends BladeComponent
88
{
99
public function __construct(
10-
public null|string $name = null,
11-
public null|string $inputId = null,
10+
public null | string $name = null,
11+
public null | string $inputId = null,
1212
public string $bag = 'default',
1313
public string $tag = 'p',
1414
) {

src/Components/FormGroup.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ class FormGroup extends BladeComponent
1111

1212
public function __construct(
1313
public string $name = '',
14-
public null|string|bool $label = null,
15-
public null|string $inputId = null,
14+
public null | string | bool $label = null,
15+
public null | string $inputId = null,
1616
public bool $inline = false,
1717
bool $showErrors = true,
18-
public null|string $helpText = null,
18+
public null | string $helpText = null,
1919
public bool $border = true,
2020
public bool $isCheckboxGroup = false,
21-
public null|string $labelId = null,
21+
public null | string $labelId = null,
2222
public bool $marginBottom = true,
23-
public null|string $hint = null,
23+
public null | string $hint = null,
2424
public bool $optional = false,
2525
) {
2626
$this->inputId = $this->inputId ?? $this->name;
@@ -37,7 +37,7 @@ public function groupClass(): string
3737
'form-group',
3838
'has-error' => $this->hasErrorsAndShow($this->name),
3939
'form-group-inline sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start' => $this->inline,
40-
'form-group-inline--border sm:pt-5 sm:border-t sm:border-blue-gray-200 first:sm:pt-0 first:sm:border-none' => $this->inline && $this->border,
40+
'form-group-inline--border sm:pt-5 sm:border-t sm:border-blue-gray-200 first:sm:pt-0 first:sm:border-none' => $this->inline && $this->border,
4141
'mb-5 last:mb-0' => $this->marginBottom,
4242
]);
4343
}

src/Components/Inputs/CustomSelect.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ class CustomSelect extends Select
1616
public null|string $emptyText;
1717

1818
public function __construct(
19-
public null|string $name = null,
20-
public null|string $id = null,
21-
public array|Collection $options = [],
19+
public null | string $name = null,
20+
public null | string $id = null,
21+
public array | Collection $options = [],
2222
public mixed $value = null,
2323
public bool $multiple = false,
24-
public null|string $maxWidth = null,
24+
public null | string $maxWidth = null,
2525
bool $showErrors = true,
2626
$leadingAddon = false,
2727
$inlineAddon = false,
@@ -33,17 +33,17 @@ public function __construct(
3333
public string $textField = 'text',
3434
public string $disabledField = 'disabled',
3535
public bool $filterable = false,
36-
public null|string $clearIcon = null,
36+
public null | string $clearIcon = null,
3737
public bool $disabled = false,
38-
public null|string $selectedIcon = null,
39-
public null|string $uncheckIcon = null,
38+
public null | string $selectedIcon = null,
39+
public null | string $uncheckIcon = null,
4040
public bool $maxOptionsSelected = false,
41-
public bool|null|string $optionDisplay = false,
42-
public bool|null|string $buttonDisplay = false,
41+
public bool | null | string $optionDisplay = false,
42+
public bool | null | string $buttonDisplay = false,
4343
public array $wireListeners = [],
4444
null|string $emptyText = 'form-components::messages.custom_select_empty_text',
4545
public bool $convertValuesToString = false,
46-
public null|string $containerClass = null,
46+
public null | string $containerClass = null,
4747
public $extraAttributes = '',
4848
public $after = null,
4949
) {

src/Components/Inputs/DatePicker.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ class DatePicker extends Input
1111
public null|string $placeholder;
1212

1313
public function __construct(
14-
public null|string $name = null,
15-
public null|string $id = null,
14+
public null | string $name = null,
15+
public null | string $id = null,
1616
public mixed $value = null,
17-
public null|string $maxWidth = null,
17+
public null | string $maxWidth = null,
1818
bool $showErrors = true,
1919
$leadingAddon = false,
2020
$inlineAddon = false,
@@ -27,12 +27,12 @@ public function __construct(
2727
public bool $clickOpens = false,
2828
public bool $allowInput = true,
2929
public bool $enableTime = false,
30-
public bool|null|string $format = false,
30+
public bool | null | string $format = false,
3131
public bool $clearable = false,
3232
null|string $placeholder = 'form-components::messages.date_picker_placeholder',
33-
public bool|null|string $toggleIcon = null,
34-
public null|string $clearIcon = null,
35-
public null|string $containerClass = null,
33+
public bool | null | string $toggleIcon = null,
34+
public null | string $clearIcon = null,
35+
public null | string $containerClass = null,
3636
public $extraAttributes = '',
3737
public $after = null,
3838
) {

src/Components/Inputs/Input.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Rawilk\FormComponents\Components\Inputs;
66

7-
use Closure;
87
use Illuminate\Support\Arr;
98
use Rawilk\FormComponents\Components\BladeComponent;
109
use Rawilk\FormComponents\Concerns\HandlesValidationErrors;
@@ -22,13 +21,13 @@ class Input extends BladeComponent
2221
public const DEFAULT_TRAILING_ADDON_PADDING = 'pr-12';
2322

2423
public function __construct(
25-
public null|string $name = null,
26-
public null|string $id = null,
24+
public null | string $name = null,
25+
public null | string $id = null,
2726
public string $type = 'text',
2827
public mixed $value = null,
29-
public null|string $maxWidth = null,
28+
public null | string $maxWidth = null,
3029
bool $showErrors = true,
31-
public null|string $containerClass = null,
30+
public null | string $containerClass = null,
3231
$leadingAddon = false,
3332
$inlineAddon = false,
3433
$inlineAddonPadding = self::DEFAULT_INLINE_ADDON_PADDING,

0 commit comments

Comments
 (0)