mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-29 08:53:18 +00:00
🎨 Add new Flux icons: implement multiple reusable icon components (e.g., hand-raised, hand-thumb-up, heart, hashtag, home) with variant support for improved UI consistency.
This commit is contained in:
25
resources/views/flux/radio/group/variants/buttons.blade.php
Normal file
25
resources/views/flux/radio/group/variants/buttons.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@props([
|
||||
'variant' => null,
|
||||
'size' => null,
|
||||
'name' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
// We only want to show the name attribute on the radio if it has been set
|
||||
// manually, but not if it has been set from the wire:model attribute...
|
||||
$showName = isset($name);
|
||||
|
||||
if (! isset($name)) {
|
||||
$name = $attributes->whereStartsWith('wire:model')->first();
|
||||
}
|
||||
|
||||
$classes = Flux::classes()
|
||||
->add('flex flex-wrap gap-2')
|
||||
;
|
||||
@endphp
|
||||
|
||||
<flux:with-field :$attributes>
|
||||
<ui-radio-group {{ $attributes->class($classes) }} @if($showName) name="{{ $name }}" @endif data-flux-radio-group-buttons>
|
||||
{{ $slot }}
|
||||
</ui-radio-group>
|
||||
</flux:with-field>
|
||||
25
resources/views/flux/radio/group/variants/cards.blade.php
Normal file
25
resources/views/flux/radio/group/variants/cards.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@props([
|
||||
'variant' => null,
|
||||
'size' => null,
|
||||
'name' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
// We only want to show the name attribute on the radio if it has been set
|
||||
// manually, but not if it has been set from the wire:model attribute...
|
||||
$showName = isset($name);
|
||||
|
||||
if (! isset($name)) {
|
||||
$name = $attributes->whereStartsWith('wire:model')->first();
|
||||
}
|
||||
|
||||
$classes = Flux::classes()
|
||||
->add('flex gap-3')
|
||||
;
|
||||
@endphp
|
||||
|
||||
<flux:with-field :$attributes>
|
||||
<ui-radio-group {{ $attributes->class($classes) }} @if($showName) name="{{ $name }}" @endif data-flux-radio-group-cards>
|
||||
{{ $slot }}
|
||||
</ui-radio-group>
|
||||
</flux:with-field>
|
||||
26
resources/views/flux/radio/group/variants/default.blade.php
Normal file
26
resources/views/flux/radio/group/variants/default.blade.php
Normal file
@@ -0,0 +1,26 @@
|
||||
@props([
|
||||
'name' => null,
|
||||
'variant' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
// We only want to show the name attribute it has been set manually
|
||||
// but not if it has been set from the `wire:model` attribute...
|
||||
$showName = isset($name);
|
||||
if (! isset($name)) {
|
||||
$name = $attributes->whereStartsWith('wire:model')->first();
|
||||
}
|
||||
|
||||
$classes = Flux::classes()
|
||||
// Adjust spacing between fields...
|
||||
->add('*:data-flux-field:mb-3')
|
||||
->add('[&>[data-flux-field]:has(>[data-flux-description])]:mb-4')
|
||||
->add('[&>[data-flux-field]:last-child]:mb-0!')
|
||||
;
|
||||
@endphp
|
||||
|
||||
<flux:with-field :$attributes>
|
||||
<ui-radio-group {{ $attributes->class($classes) }} @if($showName) name="{{ $name }}" @endif data-flux-radio-group>
|
||||
{{ $slot }}
|
||||
</ui-radio-group>
|
||||
</flux:with-field>
|
||||
25
resources/views/flux/radio/group/variants/pills.blade.php
Normal file
25
resources/views/flux/radio/group/variants/pills.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@props([
|
||||
'variant' => null,
|
||||
'size' => null,
|
||||
'name' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
// We only want to show the name attribute on the radio if it has been set
|
||||
// manually, but not if it has been set from the wire:model attribute...
|
||||
$showName = isset($name);
|
||||
|
||||
if (! isset($name)) {
|
||||
$name = $attributes->whereStartsWith('wire:model')->first();
|
||||
}
|
||||
|
||||
$classes = Flux::classes()
|
||||
->add('flex flex-wrap gap-3')
|
||||
;
|
||||
@endphp
|
||||
|
||||
<flux:with-field :$attributes>
|
||||
<ui-radio-group {{ $attributes->class($classes) }} @if($showName) name="{{ $name }}" @endif data-flux-radio-group-pills>
|
||||
{{ $slot }}
|
||||
</ui-radio-group>
|
||||
</flux:with-field>
|
||||
@@ -0,0 +1,28 @@
|
||||
@props([
|
||||
'name' => null,
|
||||
'variant' => null,
|
||||
'size' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
// We only want to show the name attribute on the checkbox if it has been set
|
||||
// manually, but not if it has been set from the wire:model attribute...
|
||||
$showName = isset($name);
|
||||
|
||||
if (! isset($name)) {
|
||||
$name = $attributes->whereStartsWith('wire:model')->first();
|
||||
}
|
||||
|
||||
$classes = Flux::classes()
|
||||
->add('block flex p-1')
|
||||
->add('rounded-lg bg-zinc-800/5 dark:bg-white/10')
|
||||
->add($size === 'sm' ? 'h-8 py-[3px] px-[3px]' : 'h-10 p-1')
|
||||
->add($size === 'sm' ? '-my-px h-[calc(2rem+2px)]' : '')
|
||||
;
|
||||
@endphp
|
||||
|
||||
<flux:with-field :$attributes>
|
||||
<ui-radio-group {{ $attributes->class($classes) }} @if($showName) name="{{ $name }}" @endif data-flux-radio-group-segmented>
|
||||
{{ $slot }}
|
||||
</ui-radio-group>
|
||||
</flux:with-field>
|
||||
Reference in New Issue
Block a user