Skip to content

Commit

Permalink
Fix primefaces#5464: Tailwind fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jan 9, 2024
1 parent 5b6ec4c commit 9056925
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
13 changes: 7 additions & 6 deletions components/lib/passthrough/tailwind/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ const Tailwind = {
speeddial: {
root: 'absolute flex',
button: {
root: ({ parent }) => ({
root: ({ state }) => ({
className: classNames('w-16 !h-16 !rounded-full justify-center z-10', {
'rotate-45': parent.state.visible
'rotate-45': state.visible
})
}),
label: {
Expand Down Expand Up @@ -780,9 +780,11 @@ const Tailwind = {
},
inputnumber: {
root: 'w-full inline-flex',
input: ({ props }) => ({
className: classNames({ 'rounded-tr-none rounded-br-none': props.showButtons && props.buttonLayout == 'stacked' })
}),
input: {
root: ({ props }) => ({
className: classNames({ 'rounded-tr-none rounded-br-none': props.showButtons && props.buttonLayout == 'stacked' })
})
},
buttongroup: ({ props }) => ({
className: classNames({ 'flex flex-col': props.showButtons && props.buttonLayout == 'stacked' })
}),
Expand All @@ -791,7 +793,6 @@ const Tailwind = {
'rounded-br-none rounded-bl-none rounded-bl-none !p-0 flex-1 w-[3rem]': props.showButtons && props.buttonLayout == 'stacked'
})
}),
label: 'hidden',
decrementbutton: ({ props }) => ({
className: classNames('flex !items-center !justify-center', {
'rounded-tr-none rounded-tl-none rounded-tl-none !p-0 flex-1 w-[3rem]': props.showButtons && props.buttonLayout == 'stacked'
Expand Down
27 changes: 27 additions & 0 deletions components/lib/tooltip/tooltip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export declare type TooltipPassThroughType<T> = PassThroughType<T, TooltipPassTh
export interface TooltipPassThroughMethodOptions {
props: TooltipProps;
state: TooltipState;
context: TooltipContext;
}

/**
Expand All @@ -47,6 +48,32 @@ export interface TooltipPassThroughOptions {
hooks?: ComponentHooks;
}

/**
* Defines current inline context in Tooltip component.
*/
export interface TooltipContext {
/**
* Right aligned tooltip as a boolean.
* @defaultValue false
*/
right: boolean;
/**
* Right aligned tooltip as a boolean.
* @defaultValue false
*/
left: boolean;
/**
* Right aligned tooltip as a boolean.
* @defaultValue false
*/
top: boolean;
/**
* Right aligned tooltip as a boolean.
* @defaultValue false
*/
bottom: boolean;
}

/**
* Defines current inline state in Tooltip component.
*/
Expand Down

0 comments on commit 9056925

Please sign in to comment.