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 Nov 30, 2023
1 parent 925ea49 commit f78132e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 13 deletions.
9 changes: 5 additions & 4 deletions components/doc/inputnumber/theming/tailwinddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ export function TailwindDoc(props) {
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 @@ -19,7 +21,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
4 changes: 2 additions & 2 deletions components/doc/speeddial/theming/tailwinddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,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
3 changes: 2 additions & 1 deletion components/lib/confirmdialog/confirmdialog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
*/
import * as React from 'react';
import { CSSTransitionProps as ReactCSSTransitionProps } from 'react-transition-group/CSSTransition';
import { ButtonPassThroughOptions } from '../button/button';
import { ComponentHooks } from '../componentbase/componentbase';
import { DialogProps } from '../dialog';
Expand Down Expand Up @@ -88,7 +89,7 @@ export interface ConfirmDialogPassThroughOptions {
/**
* Used to control React Transition API.
*/
transition?: OverlayPanelPassThroughTransitionType;
transition?: ConfirmDialogPassThroughTransitionType;
}

/**
Expand Down
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 f78132e

Please sign in to comment.