Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/lib/accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ export const Accordion = React.forwardRef((inProps, ref) => {

const tabs = createTabs();
const rootProps = mergeProps(
ptm('root'),
{
className: classNames(props.className, cx('root')),
style: props.style
},
AccordionBase.getOtherProps(props),
ptm('root')
AccordionBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,14 +773,14 @@ export const AutoComplete = React.memo(
const input = createInput();
const dropdown = createDropdown();
const rootProps = mergeProps(
ptm('root'),
{
id: idState,
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root', { focusedState }))
},
otherProps,
ptm('root')
otherProps
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/avatar/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ export const Avatar = React.forwardRef((inProps, ref) => {
}));

const rootProps = mergeProps(
ptm('root'),
{
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root', { imageFailed }))
},
AvatarBase.getOtherProps(props),
ptm('root')
AvatarBase.getOtherProps(props)
);

const content = props.template ? ObjectUtils.getJSXElement(props.template, props) : createContent();
Expand Down
4 changes: 2 additions & 2 deletions components/lib/avatargroup/AvatarGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export const AvatarGroup = React.forwardRef((inProps, ref) => {
}));

const rootProps = mergeProps(
ptm('root'),
{
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root'))
},
AvatarGroupBase.getOtherProps(props),
ptm('root')
AvatarGroupBase.getOtherProps(props)
);

return <div {...rootProps}>{props.children}</div>;
Expand Down
4 changes: 2 additions & 2 deletions components/lib/badge/Badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export const Badge = React.memo(
}));

const rootProps = mergeProps(
ptm('root'),
{
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root'))
},
BadgeBase.getOtherProps(props),
ptm('root')
BadgeBase.getOtherProps(props)
);

return <span {...rootProps}>{props.value}</span>;
Expand Down
4 changes: 2 additions & 2 deletions components/lib/blockui/BlockUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ export const BlockUI = React.forwardRef((inProps, ref) => {
const mask = createMask();

const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
style: props.containerStyle,
className: classNames(props.containerClassName, cx('root')),
'aria-busy': props.blocked
},
BlockUIBase.getOtherProps(props),
ptm('root')
BlockUIBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/breadcrumb/BreadCrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ export const BreadCrumb = React.memo(
ptm('menu')
);
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
className: classNames(props.className, cx('root')),
style: props.style
},
BreadCrumbBase.getOtherProps(props),
ptm('root')
BreadCrumbBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ export const Button = React.memo(
const defaultAriaLabel = props.label ? props.label + (props.badge ? ' ' + props.badge : '') : props['aria-label'];

const rootProps = mergeProps(
ptm('root'),
{
ref: elementRef,
'aria-label': defaultAriaLabel,
'data-pc-autofocus': props.autoFocus,
className: classNames(props.className, cx('root', { size, disabled })),
disabled: disabled
},
ButtonBase.getOtherProps(props),
ptm('root')
ButtonBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/buttongroup/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export const ButtonGroup = React.memo(
const isSingleButton = React.Children.count(props.children) === 1;

const rootProps = mergeProps(
ptm('root'),
{
ref: elementRef,
className: classNames(cx('root'), { 'p-button-group-single': isSingleButton }),
role: 'group'
},
ButtonGroupBase.getOtherProps(props),
ptm('root')
ButtonGroupBase.getOtherProps(props)
);

return <span {...rootProps}>{props.children}</span>;
Expand Down
4 changes: 2 additions & 2 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4439,13 +4439,13 @@ export const Calendar = React.memo(
const yearPicker = createYearPicker();
const isFilled = DomHandler.hasClass(inputRef.current, 'p-filled') && inputRef.current.value !== '';
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
className: classNames(props.className, cx('root', { focusedState, isFilled, panelVisible: visible })),
style: props.style
},
CalendarBase.getOtherProps(props),
ptm('root')
CalendarBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export const Card = React.forwardRef((inProps, ref) => {
}, [elementRef, ref]);

const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root'))
},
CardBase.getOtherProps(props),
ptm('root')
CardBase.getOtherProps(props)
);

const header = createHeader();
Expand Down
4 changes: 2 additions & 2 deletions components/lib/carousel/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,15 +805,15 @@ export const Carousel = React.memo(
const header = createHeader();
const footer = createFooter();
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
className: classNames(props.className, cx('root', { isVertical })),
style: props.style,
role: 'region'
},
CarouselBase.getOtherProps(props),
ptm('root')
CarouselBase.getOtherProps(props)
);

const contentProps = mergeProps(
Expand Down
4 changes: 2 additions & 2 deletions components/lib/cascadeselect/CascadeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,15 +528,15 @@ export const CascadeSelect = React.memo(
const dropdownIcon = props.loading ? createLoadingIcon() : createDropdownIcon();
const overlay = createOverlay();
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
className: classNames(props.className, cx('root', { focusedState, overlayVisibleState, context })),
style: props.style,
onClick: (e) => onClick(e)
},
otherProps,
ptm('root')
otherProps
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/chart/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ const PrimeReactChart = React.memo(
const title = props.options && props.options.plugins && props.options.plugins.title && props.options.plugins.title.text;
const ariaLabel = props.ariaLabel || title;
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
style: sx('root'),
className: classNames(props.className, cx('root'))
},
ChartBase.getOtherProps(props),
ptm('root')
ChartBase.getOtherProps(props)
);
const canvasProps = mergeProps(
{
Expand Down
4 changes: 2 additions & 2 deletions components/lib/checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const Checkbox = React.memo(
const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
const otherProps = CheckboxBase.getOtherProps(props);
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
className: classNames(props.className, cx('root', { checked, context })),
Expand All @@ -115,8 +116,7 @@ export const Checkbox = React.memo(
onContextMenu: props.onContextMenu,
onMouseDown: props.onMouseDown
},
otherProps,
ptm('root')
otherProps
);

const createInputElement = () => {
Expand Down
4 changes: 2 additions & 2 deletions components/lib/chip/Chip.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ export const Chip = React.memo(
const content = props.template ? ObjectUtils.getJSXElement(props.template, props) : createContent();

const rootProps = mergeProps(
ptm('root'),
{
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root')),
'aria-label': props.label
},
ChipBase.getOtherProps(props),
ptm('root')
ChipBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/chips/Chips.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,13 @@ export const Chips = React.memo(
const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
const list = createList();
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
className: classNames(props.className, cx('root', { isFilled, focusedState, disabled: props.disabled, invalid: props.invalid })),
style: props.style
},
ptm('root')
}
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/colorpicker/ColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,14 @@ export const ColorPicker = React.memo(
const content = createContent();
const input = createInput();
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root'))
},
ColorPickerBase.getOtherProps(props),
ptm('root')
ColorPickerBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/confirmpopup/ConfirmPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,15 @@ export const ConfirmPopup = React.memo(
};

const rootProps = mergeProps(
ptm('root'),
{
ref: overlayRef,
id: getPropValue('id'),
className: classNames(props.className, cx('root', { context, getPropValue })),
style: getPropValue('style'),
onClick: onPanelClick
},
ConfirmPopupBase.getOtherProps(props),
ptm('root')
ConfirmPopupBase.getOtherProps(props)
);

const transitionProps = mergeProps(
Expand Down
2 changes: 1 addition & 1 deletion components/lib/contextmenu/ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ export const ContextMenu = React.memo(

const createContextMenu = () => {
const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
className: classNames(props.className, cx('root', { context })),
Expand All @@ -694,7 +695,6 @@ export const ContextMenu = React.memo(
onMouseEnter: (e) => onMenuMouseEnter(e)
},
ContextMenuBase.getOtherProps(props),
ptm('root')
);

const transitionProps = mergeProps(
Expand Down
4 changes: 2 additions & 2 deletions components/lib/datascroller/DataScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ export const DataScroller = React.memo(
const content = createContent();

const rootProps = mergeProps(
ptm('root'),
{
id: props.id,
ref: elementRef,
className: classNames(props.className, cx('root'))
},
DataScrollerBase.getOtherProps(props),
ptm('root')
DataScrollerBase.getOtherProps(props)
);

return (
Expand Down
4 changes: 2 additions & 2 deletions components/lib/datatable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2087,15 +2087,15 @@ export const DataTable = React.forwardRef((inProps, ref) => {
const resizeHelper = createResizeHelper();
const reorderIndicators = createReorderIndicators();
const rootProps = mergeProps(
ptCallbacks.ptm('root'),
{
id: props.id,
className: classNames(props.className, ptCallbacks.cx('root', { selectable })),
style: props.style,
'data-scrollselectors': '.p-datatable-wrapper',
'data-showgridlines': props.showGridlines
},
DataTableBase.getOtherProps(props),
ptCallbacks.ptm('root')
DataTableBase.getOtherProps(props)
);

return (
Expand Down
Loading
Loading