Skip to content

Commit

Permalink
fix(react): make children prop explicit for react 18 support (#4040)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonKleban authored May 31, 2022
1 parent 03c3644 commit 3a87831
Show file tree
Hide file tree
Showing 92 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/react/components/accordion-content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/accordion-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { f7, f7ready } from '../shared/f7.js';
onAccordionClose? : (...args: any[]) => void
onAccordionClosed? : (...args: any[]) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/accordion-toggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/accordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { colorClasses } from '../shared/mixins.js';
style: React.CSSProperties;
accordionOpposite: boolean;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/actions-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { f7 } from '../shared/f7.js';
close: boolean;
onClick? : (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/actions-group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/actions-label.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { colorClasses } from '../shared/mixins.js';
bold: boolean;
onClick?: (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Actions } from 'framework7/types';
onActionsClosed? : (instance?: Actions.Actions) => void
containerEl? : string | object
ref?: React.MutableRefObject<{el: HTMLElement | null; f7Actions: () => Actions.Actions}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { f7init, f7 } from '../shared/f7.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/appbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { colorClasses } from '../shared/mixins.js';
innerClass: string;
innerClassName: string;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/area-chart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { f7 } from '../shared/f7.js';
formatTooltipDataset?: (label: any, value: number, color: string) => string;
onSelect? : (index: number | null) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const AreaChart = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/badge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ f7Tooltip: Tooltip.Tooltip
tooltip: string;
tooltipTrigger: string;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/block-footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/block-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/block-title.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { colorClasses } from '../shared/mixins.js';
large?: boolean;
medium?: boolean;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { useTab } from '../shared/use-tab.js';
onTabShow?: (el?: HTMLElement) => void
onTabHide?: (el?: HTMLElement) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/breadcrumbs-collapsed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
style?: React.CSSProperties;
onClick? : (event?: any) => void;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const BreadcrumbsCollapsed = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/breadcrumbs-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
onClick? : (event?: any) => void;
active?: boolean;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const BreadcrumbsItem = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/breadcrumbs-separator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { classNames, getExtraAttrs } from '../shared/utils.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const BreadcrumbsSeparator = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/breadcrumbs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { classNames, getExtraAttrs } from '../shared/utils.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const Breadcrumbs = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import Preloader from './preloader.js';
loading?: boolean;
onClick? : (event?: any) => void;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
ICON_PROPS
ROUTER_PROPS
Expand Down
1 change: 1 addition & 0 deletions src/react/components/card-content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { colorClasses } from '../shared/mixins.js';
style: React.CSSProperties;
padding: boolean;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/card-footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/card-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className: string;
style: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { watchProp } from '../shared/watch-prop.js';
onCardClose? : (el?: HTMLElement) => void
onCardClosed? : (el?: HTMLElement, pageEl?: HTMLElement) => void
ref?: React.MutableRefObject<{el: HTMLElement | null; open: () => void; close: () => void}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/checkbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { colorClasses } from '../shared/mixins.js';
COLOR_PROPS
onChange? : (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null; inputEl: HTMLElement | null}>;
children?: React.ReactNode;
*/

const Checkbox = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/chip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { useIcon } from '../shared/use-icon.js';
onClick? : (event?: any) => void
onDelete? : (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
ICON_PROPS
*/
Expand Down
1 change: 1 addition & 0 deletions src/react/components/col.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { f7ready, f7 } from '../shared/f7.js';
onClick? : (event?: any) => void
onGridResize? : (...args: any[]) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/fab-backdrop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { getExtraAttrs, classNames } from '../shared/utils.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const FabBackdrop = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/fab-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useTooltip } from '../shared/use-tooltip.js';
tooltipTrigger? : string;
onClick? : (event?: any) => void;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/fab-buttons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { colorClasses } from '../shared/mixins.js';
style?: React.CSSProperties;
position?: string;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/fab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useTooltip } from '../shared/use-tooltip.js';
tooltipTrigger? : string;
onClick? : (event?: any) => void;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/gauge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { classNames, getExtraAttrs } from '../shared/utils.js';
labelFontSize? : number | string
labelFontWeight? : number | string
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const Gauge = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useTheme } from '../shared/use-theme.js';
tooltipTrigger? : string;
size? : string | number;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import { Calendar, ColorPicker, TextEditor } from 'framework7/types';
onChange? : (...args: any[]) => void
onTextEditorChange? : (...args: any[]) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const Input = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import { SmartSelect } from 'framework7/types';
ROUTER_PROPS
onClick? : (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null; f7SmartSelect: () => SmartSelect.SmartSelect}>;
children?: React.ReactNode;
*/

const Link = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { useRouteProps } from '../shared/use-route-props.js';
ACTIONS_PROPS
onClick? : (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const ListButton = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ListContext } from '../shared/list-context.js';
sortableTapHold? : boolean
sortableMoveElements? : boolean
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { watchProp } from '../shared/watch-prop.js';
COLOR_PROPS
onListIndexSelect? : (itemContent?: any, itemIndex?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const ListIndex = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import { Calendar, ColorPicker, TextEditor } from 'framework7/types';
onChange? : (...args: any[]) => void
onTextEditorChange? : (...args: any[]) => void
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const ListInput = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-item-cell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-item-row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/list-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ import { SmartSelect } from 'framework7/types';
onAccordionOpened? : (...args: any[]) => void
onChange? : (event?: any) => void
ref?: React.MutableRefObject<{el: HTMLElement | null; f7SmartSelect: () => SmartSelect.SmartSelect}>;
children?: React.ReactNode;
*/

/*
Expand Down
1 change: 1 addition & 0 deletions src/react/components/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { VirtualList } from 'framework7/types';
onTabShow? : (el?: HTMLElement) => void
onTabHide? : (el?: HTMLElement) => void
ref?: React.MutableRefObject<{el: HTMLElement | null; f7VirtualList: () => VirtualList.VirtualList}>;
children?: React.ReactNode;
*/

const List = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/login-screen-title.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/login-screen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { LoginScreen } from 'framework7/types';
onLoginScreenClose? : (instance: LoginScreen.LoginScreen) => void
onLoginScreenClosed? : (instance: LoginScreen.LoginScreen) => void
ref?: React.MutableRefObject<{el: HTMLElement | null; f7LoginScreen: () => LoginScreen.LoginScreen}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/menu-dropdown-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { useRouteProps } from '../shared/use-route-props.js';
ACTIONS_PROPS
onClick? : (event?: any) => void;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const MenuDropdownItem = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/menu-dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { colorClasses } from '../shared/mixins.js';
center? : boolean
right? : boolean
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
1 change: 1 addition & 0 deletions src/react/components/menu-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { useTooltip } from '../shared/use-tooltip.js';
onMenuOpened? : (el?: HTMLElement) => void;
onMenuClosed? : (el?: HTMLElement) => void;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
*/

const MenuItem = forwardRef((props, ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/react/components/menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colorClasses } from '../shared/mixins.js';
className?: string;
style?: React.CSSProperties;
ref?: React.MutableRefObject<{el: HTMLElement | null}>;
children?: React.ReactNode;
COLOR_PROPS
*/

Expand Down
Loading

0 comments on commit 3a87831

Please sign in to comment.