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
136 changes: 93 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@testing-library/user-event": "14.6.1",
"@types/jest": "29.5.14",
"@types/prop-types": "15.7.15",
"@types/react": "18.3.27",
"@types/react-dom": "18.3.7",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"@types/styled-components": "5.1.36",
"@zendeskgarden/eslint-config": "47.0.0",
"@zendeskgarden/react-theming": "9.12.2",
Expand All @@ -86,8 +86,8 @@
"postcss": "8.5.6",
"prettier": "3.7.4",
"prettier-package-json": "2.8.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.2.1",
"react-dom": "19.2.1",
"rollup": "4.53.3",
"rollup-plugin-analyzer": "4.0.0",
"rollup-plugin-cleanup": "3.2.1",
Expand Down
5 changes: 0 additions & 5 deletions packages/accordion/src/AccordionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ export const AccordionContainer: React.FunctionComponent<IAccordionContainerProp
return <>{render!(useAccordion(options)) as React.ReactElement}</>;
};

AccordionContainer.defaultProps = {
expandable: true,
collapsible: true
};

AccordionContainer.propTypes = {
children: PropTypes.func,
render: PropTypes.func,
Expand Down
3 changes: 1 addition & 2 deletions packages/combobox/src/ComboboxContainer.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import React, { createRef, PropsWithChildren } from 'react';
import { act } from 'react-dom/test-utils';
import React, { act, createRef, PropsWithChildren } from 'react';
import { fireEvent, render, RenderResult } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ComboboxContainer, useCombobox } from './';
Expand Down
5 changes: 0 additions & 5 deletions packages/focusvisible/src/FocusVisibleContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ export const FocusVisibleContainer: React.FunctionComponent<IFocusVisibleContain
return <>{render!({ ref: scopeRef }) as React.ReactElement}</>;
};

FocusVisibleContainer.defaultProps = {
className: 'garden-focus-visible',
dataAttribute: 'data-garden-focus-visible'
};

FocusVisibleContainer.propTypes = {
children: PropTypes.func,
render: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion packages/focusvisible/src/useFocusVisible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function useFocusVisible(

const hadKeyboardEvent = useRef(false);
const hadFocusVisibleRecently = useRef(false);
const hadFocusVisibleRecentlyTimeout = useRef<number | undefined>();
const hadFocusVisibleRecentlyTimeout = useRef<number>(undefined);

useEffect(() => {
let environment = relativeDocument;
Expand Down
4 changes: 0 additions & 4 deletions packages/menu/src/MenuContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ MenuContainer.propTypes = {
defaultFocusedValue: PropTypes.oneOfType([PropTypes.string]),
restoreFocus: PropTypes.bool
};

MenuContainer.defaultProps = {
restoreFocus: true
};
5 changes: 0 additions & 5 deletions packages/modal/src/ModalContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ ModalContainer.propTypes = {
restoreFocus: PropTypes.bool,
environment: PropTypes.any
};

ModalContainer.defaultProps = {
focusOnMount: true,
restoreFocus: true
};
4 changes: 2 additions & 2 deletions packages/modal/src/useModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const useModal = <T extends Element = Element>({
onClose,
modalRef,
idPrefix,
focusOnMount,
restoreFocus,
focusOnMount = true,
restoreFocus = true,
environment
}: IUseModalProps<T>): IUseModalReturnValue => {
const prefix = useId(idPrefix);
Expand Down
6 changes: 0 additions & 6 deletions packages/schedule/src/ScheduleContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ export const ScheduleContainer: React.FunctionComponent<IScheduleContainerProps>
return <>{render!(useSchedule(props)) as React.ReactElement}</>;
};

ScheduleContainer.defaultProps = {
duration: 1250,
delayMS: 750,
loop: true
};

ScheduleContainer.propTypes = {
children: PropTypes.func,
render: PropTypes.func,
Expand Down
4 changes: 0 additions & 4 deletions packages/selection/src/SelectionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ export const SelectionContainer: React.FC<ISelectionContainerProps<any>> = ({
...options
}) => <>{render!(useSelection(options))}</>;

SelectionContainer.defaultProps = {
direction: 'horizontal'
};

SelectionContainer.propTypes = {
children: PropTypes.func,
render: PropTypes.func,
Expand Down
10 changes: 1 addition & 9 deletions packages/slider/src/SliderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import { SLIDER_MAX, SLIDER_MIN, SLIDER_STEP, useSlider } from './useSlider';
import { useSlider } from './useSlider';
import { ISliderContainerProps } from './types';

export const SliderContainer: React.FC<ISliderContainerProps> = ({
Expand Down Expand Up @@ -35,11 +35,3 @@ SliderContainer.propTypes = {
disabled: PropTypes.bool,
rtl: PropTypes.bool
};

/* Slider defaults informed by <input type="range">.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#specifying_the_minimum_and_maximum */
SliderContainer.defaultProps = {
min: SLIDER_MIN,
max: SLIDER_MAX,
step: SLIDER_STEP
};
2 changes: 2 additions & 0 deletions packages/slider/src/useSlider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export function useSlider<T extends Element = Element, M extends HTMLElement = H
trackRef,
minThumbRef,
maxThumbRef,
/* Slider defaults informed by <input type="range">.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#specifying_the_minimum_and_maximum */
min = SLIDER_MIN,
max = SLIDER_MAX,
defaultMinValue,
Expand Down
7 changes: 1 addition & 6 deletions packages/splitter/src/SplitterContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import { useSplitter, KEYBOARD_STEP } from './useSplitter';
import { useSplitter } from './useSplitter';
import { ISplitterContainerProps } from './types';

export const SplitterContainer: React.FC<ISplitterContainerProps> = ({
Expand All @@ -33,8 +33,3 @@ SplitterContainer.propTypes = {
isLeading: PropTypes.bool,
rtl: PropTypes.bool
};

SplitterContainer.defaultProps = {
keyboardStep: KEYBOARD_STEP,
orientation: 'vertical'
};
Loading