Merge pull request #10007 from ariaieboy/fix

replace flip with autoPlacement in x-float
This commit is contained in:
Dan Harrin
2023-12-04 23:27:40 +00:00
committed by GitHub
3 changed files with 12 additions and 3 deletions
@@ -91,7 +91,10 @@
wire:ignore.self
wire:key="{{ $this->getId() }}.{{ $statePath }}.{{ $field::class }}.panel"
x-cloak
x-float.placement.bottom-start.offset.flip.shift="{ offset: 8 }"
x-float.placement.bottom-start.offset.autoPlacement.shift="{
offset: 8,
autoPlacement: { allowedPlacements: ['top', 'bottom'] },
}"
x-ref="panel"
class="fi-fo-color-picker-panel absolute z-10 hidden rounded-lg shadow-lg"
>
@@ -145,7 +145,10 @@
<div
x-ref="panel"
x-cloak
x-float.placement.bottom-start.offset.flip.shift="{ offset: 8 }"
x-float.placement.bottom-start.offset.autoPlacement.shift="{
offset: 8,
autoPlacement: { allowedPlacements: ['top', 'bottom'] },
}"
wire:ignore
wire:key="{{ $this->getId() }}.{{ $statePath }}.{{ $field::class }}.panel"
@class([
@@ -37,7 +37,10 @@
<div
x-cloak
x-float{{ $placement ? ".placement.{$placement}" : '' }}.flip{{ $shift ? '.shift' : '' }}{{ $teleport ? '.teleport' : '' }}{{ $offset ? '.offset' : '' }}="{ offset: {{ $offset }} }"
x-float{{ $placement ? ".placement.{$placement}" : '' }}.autoPlacement{{ $shift ? '.shift' : '' }}{{ $teleport ? '.teleport' : '' }}{{ $offset ? '.offset' : '' }}="{
offset: {{ $offset }},
autoPlacement: { allowedPlacements: ['top', 'bottom'] },
}"
x-ref="panel"
x-transition:enter-start="opacity-0"
x-transition:leave-end="opacity-0"