File tree Expand file tree Collapse file tree 7 files changed +939
-894
lines changed
polaris-react/src/components
polaris.shopify.com/src/data Expand file tree Collapse file tree 7 files changed +939
-894
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @shopify/polaris ' : patch
3+ ---
4+
5+ Updated ` IndexTable ` and ` ProgressBar ` to no longer log errors about deprecated ` React.findDOMNode `
Original file line number Diff line number Diff line change 1+ ---
2+ ' @shopify/polaris ' : minor
3+ ---
4+
5+ Updated ` Box ` allowable aria roles
Original file line number Diff line number Diff line change @@ -151,7 +151,10 @@ export interface BoxProps extends React.AriaAttributes {
151151 */
152152 paddingInlineEnd ?: Spacing ;
153153 /** Aria role */
154- role ?: Extract < React . AriaRole , 'status' | 'presentation' | 'menu' > ;
154+ role ?: Extract <
155+ React . AriaRole ,
156+ 'status' | 'presentation' | 'menu' | 'listbox' | 'combobox'
157+ > ;
155158 /** Shadow on box */
156159 shadow ?: DepthShadowAlias ;
157160 /** Set tab order */
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ function IndexTableBase({
148148 const scrollableContainerElement = useRef < HTMLDivElement > ( null ) ;
149149 const tableElement = useRef < HTMLTableElement > ( null ) ;
150150 const condensedListElement = useRef < HTMLUListElement > ( null ) ;
151+ const loadingElement = useRef < HTMLDivElement > ( null ) ;
151152
152153 const [ tableInitialized , setTableInitialized ] = useState ( false ) ;
153154 const [ stickyWrapper , setStickyWrapper ] = useState < HTMLElement | null > ( null ) ;
@@ -512,10 +513,11 @@ function IndexTableBase({
512513 in = { loading }
513514 classNames = { loadingTransitionClassNames }
514515 timeout = { parseInt ( motion [ 'duration-100' ] , 10 ) }
516+ nodeRef = { loadingElement }
515517 appear
516518 unmountOnExit
517519 >
518- < div className = { styles . LoadingPanel } >
520+ < div className = { styles . LoadingPanel } ref = { loadingElement } >
519521 < div className = { styles . LoadingPanelRow } >
520522 < Spinner size = "small" />
521523 < span className = { styles . LoadingPanelText } >
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import {TrapFocus} from '../../../TrapFocus';
1010
1111import styles from './Dialog.scss' ;
1212
13+ type CSSTransitionProps = React . ComponentProps < typeof CSSTransition > ;
14+
1315export interface DialogProps {
1416 labelledBy ?: string ;
1517 instant ?: boolean ;
@@ -117,7 +119,7 @@ const fadeUpClasses = {
117119 exitActive : classNames ( styles . animateFadeUp , styles . exited ) ,
118120} ;
119121
120- function FadeUp ( { children, ...props } : any ) {
122+ function FadeUp ( { children, ...props } : CSSTransitionProps ) {
121123 return (
122124 < CSSTransition { ...props } classNames = { fadeUpClasses } >
123125 { children }
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { useRef } from 'react' ;
22import { CSSTransition } from 'react-transition-group' ;
33import { motion } from '@shopify/polaris-tokens' ;
44
@@ -45,6 +45,7 @@ export function ProgressBar({
4545 ariaLabelledBy,
4646} : ProgressBarProps ) {
4747 const i18n = useI18n ( ) ;
48+ const indicatorRef = useRef < HTMLDivElement > ( null ) ;
4849
4950 const className = classNames (
5051 styles . ProgressBar ,
@@ -78,12 +79,14 @@ export function ProgressBar({
7879 in
7980 appear
8081 timeout = { parseInt ( progressBarDuration , 10 ) }
82+ nodeRef = { indicatorRef }
8183 classNames = { {
8284 appearActive : styles . IndicatorAppearActive ,
8385 appearDone : styles . IndicatorAppearDone ,
8486 } }
8587 >
8688 < div
89+ ref = { indicatorRef }
8790 className = { styles . Indicator }
8891 style = {
8992 {
You can’t perform that action at this time.
0 commit comments