Add popup theme for tippy and DropdownController

pull/12185/head
Sage Abdullah 2024-07-01 14:25:54 +01:00 zatwierdzone przez Thibaud Colas
rodzic 3865be0cff
commit 80480d8499
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -31,6 +31,14 @@
}
}
.tippy-box[data-theme='popup'] {
@apply w-rounded w-bg-surface-page w-text-inherit w-shadow-md;
&[data-placement^='bottom'] > .tippy-arrow::before {
@apply w-border-b-surface-page;
}
}
.tippy-box[data-theme='drilldown'] {
@apply w-rounded w-bg-surface-page w-text-inherit w-shadow-md;
width: 300px;

Wyświetl plik

@ -187,8 +187,8 @@ export class DropdownController extends Controller<HTMLElement> {
...(this.hasContentTarget
? { content: this.contentTarget as Content }
: {}),
...this.themeOptions,
trigger: 'click',
...this.themeOptions,
interactive: true,
...(this.hasOffsetValue && { offset: this.offsetValue }),
getReferenceClientRect: () => this.reference.getBoundingClientRect(),
@ -210,6 +210,12 @@ export class DropdownController extends Controller<HTMLElement> {
placement: 'bottom',
plugins: this.plugins,
},
'popup': {
arrow: true,
placement: 'bottom',
plugins: this.plugins,
trigger: 'mouseenter focus click',
},
'drilldown': {
arrow: false,
maxWidth: 'none',