@@ -229,14 +229,14 @@ describe('CodeInput', () => {
229229 let container : HTMLElement ;
230230 let inputs : NodeListOf < HTMLInputElement > ;
231231
232- type TFocusCase = {
232+ type FocusCase = {
233233 name : string ;
234234 setup : ( ) => Promise < void > ;
235235 clickIndex : number ;
236236 expectedFocusIndex : number ;
237237 } ;
238238
239- const focusCases : Array < TFocusCase > = [
239+ const focusCases : Array < FocusCase > = [
240240 {
241241 name : 'should focus first input when clicking on any empty input' ,
242242 setup : async ( ) => { } ,
@@ -310,7 +310,7 @@ describe('CodeInput', () => {
310310 } ) ;
311311 } ) ;
312312
313- describe ( 'restrictFocus ' , ( ) => {
313+ describe ( 'strictFocus ' , ( ) => {
314314 let container : HTMLElement ;
315315 let inputs : NodeListOf < HTMLInputElement > ;
316316
@@ -352,7 +352,7 @@ describe('CodeInput', () => {
352352 ] ;
353353
354354 beforeEach ( ( ) => {
355- ( { container } = render ( < CodeInput restrictFocus = { true } /> ) ) ;
355+ ( { container } = render ( < CodeInput strictFocus /> ) ) ;
356356 inputs = getInputs ( container ) ;
357357 } ) ;
358358
@@ -366,7 +366,7 @@ describe('CodeInput', () => {
366366 } ,
367367 ) ;
368368
369- it ( 'ArrowRight does not move focus when restrictFocus is false and first value is empty' , async ( ) => {
369+ it ( 'ArrowRight does not move focus when strictFocus is false and first value is empty' , async ( ) => {
370370 ( { container } = render ( < CodeInput /> ) ) ;
371371 inputs = getInputs ( container ) ;
372372
@@ -415,7 +415,7 @@ describe('CodeInput', () => {
415415 expectedFocus : 0 ,
416416 } ,
417417 ] ) ( '$name' , async ( { fields, preset, clickIndex, expectedFocus } ) => {
418- ( { container } = render ( < CodeInput fields = { fields } restrictFocus = { true } /> ) ) ;
418+ ( { container } = render ( < CodeInput fields = { fields } strictFocus /> ) ) ;
419419 inputs = getInputs ( container ) ;
420420
421421 await fillByArray ( container , preset ) ;
@@ -427,7 +427,7 @@ describe('CodeInput', () => {
427427 } ) ;
428428
429429 it ( 'ArrowRight focuses first empty when restricted' , async ( ) => {
430- ( { container } = render ( < CodeInput fields = { 4 } restrictFocus = { true } /> ) ) ;
430+ ( { container } = render ( < CodeInput fields = { 4 } strictFocus /> ) ) ;
431431 inputs = getInputs ( container ) ;
432432
433433 await fillByArray ( container , [ '1' , undefined , undefined , undefined ] ) ;
@@ -440,7 +440,7 @@ describe('CodeInput', () => {
440440
441441 describe ( 'deletion restrictions' , ( ) => {
442442 it ( 'click on any filled cell when fully filled keeps that cell focused' , async ( ) => {
443- ( { container } = render ( < CodeInput fields = { 4 } restrictFocus = { true } /> ) ) ;
443+ ( { container } = render ( < CodeInput fields = { 4 } strictFocus /> ) ) ;
444444 inputs = getInputs ( container ) ;
445445
446446 await fillByArray ( container , [ '1' , '2' , '3' , '4' ] ) ;
@@ -452,7 +452,7 @@ describe('CodeInput', () => {
452452 } ) ;
453453
454454 it ( 'after deleting last, clicks on filled cells keep their focus and empty fields redirect' , async ( ) => {
455- ( { container } = render ( < CodeInput fields = { 5 } restrictFocus = { true } /> ) ) ;
455+ ( { container } = render ( < CodeInput fields = { 5 } strictFocus /> ) ) ;
456456 inputs = getInputs ( container ) ;
457457
458458 await fillByArray ( container , [ '1' , '2' , '3' , '4' , '5' ] ) ;
0 commit comments