-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from tallstackui/summer-release
The Summer Release Docs.
- Loading branch information
Showing
93 changed files
with
2,491 additions
and
444 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
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,107 @@ | ||
<?php | ||
|
||
namespace App\Enums\Examples\Form; | ||
|
||
class Date | ||
{ | ||
public const BASIC = <<<'HTML' | ||
<x-date /> | ||
HTML; | ||
|
||
public const LABEL_HINT = <<<'HTML' | ||
<x-date label="Date" hint="Select your DoB" /> | ||
HTML; | ||
|
||
public const FORMATS = <<<'HTML' | ||
<x-date format="YYYY-MM-DD" /> | ||
<x-date format="YYYY, MMMM, DD" /> | ||
<x-date format="DD [of] MMMM [of] YYYY" /> | ||
HTML; | ||
|
||
public const CREATE_FROM_FORMAT = <<<'HTML' | ||
// Your current date | ||
$date = '20/02/2024'; // 20/02/2024 | ||
// Formatting | ||
$date = now()->createFromFormat('d/m/Y', $date)->format('Y-m-d'); | ||
// Same date, but now in the correct format | ||
$date; // 2024-02-20 | ||
HTML; | ||
|
||
public const HELPERS = <<<'HTML' | ||
<x-date helpers /> | ||
HTML; | ||
|
||
public const MIN_MAX_DATES = <<<'HTML' | ||
<!-- You can use dates as strings or Carbon instances --> | ||
<x-date :min-date="now()->subWeek()" | ||
:max-date="now()->addWeek()" /> | ||
HTML; | ||
|
||
public const MIN_MAX_YEARS = <<<'HTML' | ||
<x-date :min-year="2020" :max-year="2024" /> | ||
HTML; | ||
|
||
public const DISABLED = <<<'HTML' | ||
<!-- Simple Array --> | ||
<x-date :disable="['2020-01-01','2020-01-02','2020-01-03']" /> | ||
<!-- Multiple Arrays --> | ||
<x-date :disable="[ | ||
['2020-01-01','2020-01-02','2020-01-03'], | ||
['2020-01-04','2020-01-05','2020-01-06'] | ||
]" /> | ||
<!-- Collection --> | ||
<x-date :disable="collect(['2020-01-01','2020-01-02','2020-01-03'])" /> | ||
<!-- Carbon Interval--> | ||
<x-date :disable="\Carbon\CarbonInterval::days(1)->toPeriod(now(), now()->addWeek())->toArray()" /> | ||
HTML; | ||
|
||
public const RANGE = <<<'HTML' | ||
<!-- | ||
The Livewire property must be an array with two positions, | ||
the first one is the start date and the second one is the end date. | ||
Property: | ||
public array $date = ['2021-01-01', '2021-01-31']; | ||
Usage: | ||
<x-date range wire:model="date" /> | ||
--> | ||
<x-date range /> | ||
HTML; | ||
|
||
public const MULTIPLE = <<<'HTML' | ||
<!-- | ||
The Livewire property must be an array with multiples dates. | ||
Property: | ||
public array $date = ['2021-01-01', '2021-01-02', '2021-01-03']; | ||
Usage: | ||
<x-date multiple wire:model="date" /> | ||
--> | ||
<x-date multiple /> | ||
HTML; | ||
|
||
public const EVENTS = <<<'HTML' | ||
<x-date x-on:select="alert(`Selected Date: ${$event.detail.date}`)" | ||
x-on:clear="alert(`Cleaned!`)" /> | ||
HTML; | ||
|
||
public const INVALIDATE = <<<'HTML' | ||
<x-date invalidate /> | ||
HTML; | ||
|
||
public const PERSONALIZATION = <<<'HTML' | ||
TallStackUi::personalize() | ||
->form('date') | ||
->block('block', 'classes'); | ||
HTML; | ||
} |
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
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,62 @@ | ||
<?php | ||
|
||
namespace App\Enums\Examples\Form; | ||
|
||
class Time | ||
{ | ||
public const BASIC = <<<'HTML' | ||
<x-time /> | ||
HTML; | ||
|
||
public const LABEL_HINT = <<<'HTML' | ||
<x-time label="Time" hint="Select the hour" /> | ||
HTML; | ||
|
||
public const FORMATS = <<<'HTML' | ||
<!-- 12-hour format --> | ||
<x-time /> | ||
<!-- 24-hour format --> | ||
<x-time format="24" /> | ||
HTML; | ||
|
||
public const MIN_MAX = <<<'HTML' | ||
<!-- Hours --> | ||
<x-time :min-hour="5" :max-hour="10" /> | ||
<!-- Minutes --> | ||
<x-time :min-minute="30" :max-minute="45" /> | ||
HTML; | ||
|
||
public const HELPER = <<<'HTML' | ||
<x-time helper /> | ||
HTML; | ||
|
||
public const STEP = <<<'HTML' | ||
<x-time :step-hour="3" :step-minute="15" /> | ||
HTML; | ||
|
||
public const FOOTER_SLOT = <<<'HTML' | ||
<x-time> | ||
<x-slot:footer> | ||
Footer Slot | ||
</x-slot:footer> | ||
</x-time> | ||
HTML; | ||
|
||
public const EVENTS = <<<'HTML' | ||
<x-time x-on:hour="alert(`Hour Selected: ${$event.detail.hour}`)" | ||
x-on:minute="alert(`Minute Selected: ${$event.detail.minute}`)" | ||
x-on:interval="alert(`Interval Changed: ${$event.detail.interval}`)"/> | ||
HTML; | ||
|
||
public const INVALIDATE = <<<'HTML' | ||
<x-time invalidate /> | ||
HTML; | ||
|
||
public const PERSONALIZATION = <<<'HTML' | ||
TallStackUi::personalize() | ||
->form('time') | ||
->block('block', 'classes'); | ||
HTML; | ||
} |
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,10 @@ | ||
<?php | ||
|
||
namespace App\Enums\Examples\Others; | ||
|
||
class SummerRelease | ||
{ | ||
public const SETUP_PREFIX = <<<'HTML' | ||
php artisan tallstackui:setup-prefix | ||
HTML; | ||
} |
Oops, something went wrong.