Skip to content

Commit

Permalink
LWB-264 Adding all of the Input types as individual components
Browse files Browse the repository at this point in the history
  • Loading branch information
t73biz committed Jul 16, 2024
1 parent 6995c9f commit 9ad8d9e
Show file tree
Hide file tree
Showing 88 changed files with 3,960 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="button" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/checkbox.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="checkbox" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/color.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="color" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/date.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="date" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/datetimelocal.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="datetimelocal" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/email.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="email" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/file.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="file" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/hidden.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="hidden" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/image.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="image" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/month.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="month" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/number.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="number" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/password.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="password" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/radio.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="radio" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/range.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="range" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/reset.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="reset" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/search.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="search" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/submit.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="submit" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/tel.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="tel" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/text.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="text" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/time.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="time" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/url.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="url" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
3 changes: 3 additions & 0 deletions resources/views/forms/inputs/week.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<input type="week" {!! $globalAttributes !!} {!! $specificAttributes !!}>
{{ $slot }}
</menu>
51 changes: 51 additions & 0 deletions src/Components/Forms/Inputs/Button.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace T73biz\LwBits\Components\Forms\Inputs;

use Illuminate\Contracts\Foundation\Application as ContractedApplication;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View as ContractedView;
use Illuminate\Foundation\Application;
use Illuminate\View\View;
use Livewire\Component;
use Livewire\Features\SupportAttributes\AttributeCollection;
use T73biz\LwBits\Components\GlobalAttributesTrait;

/**
* Class Button
*/
class Button extends Component
{
use GlobalAttributesTrait;

/**
* The specific attributes for the Button component
*/
private AttributeCollection $specificAttributes;

/**
* Standard mount function
*
* @throws \T73biz\LwBits\Exceptions\InvalidAttributeException
*/
public function mount(): void
{
$this->setGlobalAttributes();
$this->specificAttributes = new AttributeCollection();
}

/**
* Standard render function
*/
public function render(): Application|ContractedApplication|ContractedView|Factory|View
{
return view(
'lw-bits::forms.inputs.button',
[
'globalAttributes' => $this->getGlobalAttributes(),
'specificAttributes' => $this->parseAttributes($this->specificAttributes),
'slot' => '',
]
);
}
}
51 changes: 51 additions & 0 deletions src/Components/Forms/Inputs/Checkbox.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace T73biz\LwBits\Components\Forms\Inputs;

use Illuminate\Contracts\Foundation\Application as ContractedApplication;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View as ContractedView;
use Illuminate\Foundation\Application;
use Illuminate\View\View;
use Livewire\Component;
use Livewire\Features\SupportAttributes\AttributeCollection;
use T73biz\LwBits\Components\GlobalAttributesTrait;

/**
* Class Checkbox
*/
class Checkbox extends Component
{
use GlobalAttributesTrait;

/**
* The specific attributes for the Checkbox component
*/
private AttributeCollection $specificAttributes;

/**
* Standard mount function
*
* @throws \T73biz\LwBits\Exceptions\InvalidAttributeException
*/
public function mount(): void
{
$this->setGlobalAttributes();
$this->specificAttributes = new AttributeCollection();
}

/**
* Standard render function
*/
public function render(): Application|ContractedApplication|ContractedView|Factory|View
{
return view(
'lw-bits::forms.inputs.checkbox',
[
'globalAttributes' => $this->getGlobalAttributes(),
'specificAttributes' => $this->parseAttributes($this->specificAttributes),
'slot' => '',
]
);
}
}
51 changes: 51 additions & 0 deletions src/Components/Forms/Inputs/Color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace T73biz\LwBits\Components\Forms\Inputs;

use Illuminate\Contracts\Foundation\Application as ContractedApplication;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View as ContractedView;
use Illuminate\Foundation\Application;
use Illuminate\View\View;
use Livewire\Component;
use Livewire\Features\SupportAttributes\AttributeCollection;
use T73biz\LwBits\Components\GlobalAttributesTrait;

/**
* Class Color
*/
class Color extends Component
{
use GlobalAttributesTrait;

/**
* The specific attributes for the Color component
*/
private AttributeCollection $specificAttributes;

/**
* Standard mount function
*
* @throws \T73biz\LwBits\Exceptions\InvalidAttributeException
*/
public function mount(): void
{
$this->setGlobalAttributes();
$this->specificAttributes = new AttributeCollection();
}

/**
* Standard render function
*/
public function render(): Application|ContractedApplication|ContractedView|Factory|View
{
return view(
'lw-bits::forms.inputs.color',
[
'globalAttributes' => $this->getGlobalAttributes(),
'specificAttributes' => $this->parseAttributes($this->specificAttributes),
'slot' => '',
]
);
}
}
51 changes: 51 additions & 0 deletions src/Components/Forms/Inputs/Date.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace T73biz\LwBits\Components\Forms\Inputs;

use Illuminate\Contracts\Foundation\Application as ContractedApplication;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View as ContractedView;
use Illuminate\Foundation\Application;
use Illuminate\View\View;
use Livewire\Component;
use Livewire\Features\SupportAttributes\AttributeCollection;
use T73biz\LwBits\Components\GlobalAttributesTrait;

/**
* Class Date
*/
class Date extends Component
{
use GlobalAttributesTrait;

/**
* The specific attributes for the Date component
*/
private AttributeCollection $specificAttributes;

/**
* Standard mount function
*
* @throws \T73biz\LwBits\Exceptions\InvalidAttributeException
*/
public function mount(): void
{
$this->setGlobalAttributes();
$this->specificAttributes = new AttributeCollection();
}

/**
* Standard render function
*/
public function render(): Application|ContractedApplication|ContractedView|Factory|View
{
return view(
'lw-bits::forms.inputs.date',
[
'globalAttributes' => $this->getGlobalAttributes(),
'specificAttributes' => $this->parseAttributes($this->specificAttributes),
'slot' => '',
]
);
}
}
51 changes: 51 additions & 0 deletions src/Components/Forms/Inputs/DateTimeLocal.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace T73biz\LwBits\Components\Forms\Inputs;

use Illuminate\Contracts\Foundation\Application as ContractedApplication;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View as ContractedView;
use Illuminate\Foundation\Application;
use Illuminate\View\View;
use Livewire\Component;
use Livewire\Features\SupportAttributes\AttributeCollection;
use T73biz\LwBits\Components\GlobalAttributesTrait;

/**
* Class DateTimeLocal
*/
class DateTimeLocal extends Component
{
use GlobalAttributesTrait;

/**
* The specific attributes for the DateTimeLocal component
*/
private AttributeCollection $specificAttributes;

/**
* Standard mount function
*
* @throws \T73biz\LwBits\Exceptions\InvalidAttributeException
*/
public function mount(): void
{
$this->setGlobalAttributes();
$this->specificAttributes = new AttributeCollection();
}

/**
* Standard render function
*/
public function render(): Application|ContractedApplication|ContractedView|Factory|View
{
return view(
'lw-bits::forms.inputs.datetimelocal',
[
'globalAttributes' => $this->getGlobalAttributes(),
'specificAttributes' => $this->parseAttributes($this->specificAttributes),
'slot' => '',
]
);
}
}
51 changes: 51 additions & 0 deletions src/Components/Forms/Inputs/Email.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace T73biz\LwBits\Components\Forms\Inputs;

use Illuminate\Contracts\Foundation\Application as ContractedApplication;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View as ContractedView;
use Illuminate\Foundation\Application;
use Illuminate\View\View;
use Livewire\Component;
use Livewire\Features\SupportAttributes\AttributeCollection;
use T73biz\LwBits\Components\GlobalAttributesTrait;

/**
* Class Email
*/
class Email extends Component
{
use GlobalAttributesTrait;

/**
* The specific attributes for the Email component
*/
private AttributeCollection $specificAttributes;

/**
* Standard mount function
*
* @throws \T73biz\LwBits\Exceptions\InvalidAttributeException
*/
public function mount(): void
{
$this->setGlobalAttributes();
$this->specificAttributes = new AttributeCollection();
}

/**
* Standard render function
*/
public function render(): Application|ContractedApplication|ContractedView|Factory|View
{
return view(
'lw-bits::forms.inputs.email',
[
'globalAttributes' => $this->getGlobalAttributes(),
'specificAttributes' => $this->parseAttributes($this->specificAttributes),
'slot' => '',
]
);
}
}
Loading

0 comments on commit 9ad8d9e

Please sign in to comment.