@wordpress/components 21.0.2 → 21.1.2-next.4d3b314fd5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -4
- package/build/autocomplete/get-default-use-items.js +3 -3
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/box-control/unit-control.js +0 -1
- package/build/box-control/unit-control.js.map +1 -1
- package/build/button/index.js +5 -1
- package/build/button/index.js.map +1 -1
- package/build/draggable/index.js +3 -6
- package/build/draggable/index.js.map +1 -1
- package/build/drop-zone/index.js +7 -1
- package/build/drop-zone/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +1 -1
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/build/menu-item/index.js +4 -3
- package/build/menu-item/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +10 -3
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +15 -6
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js +4 -1
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js +3 -1
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/color-settings/picker-screen.native.js +3 -1
- package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build/mobile/image/index.native.js +3 -1
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js +3 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +3 -1
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +6 -4
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-screen.native.js +3 -1
- package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js +24 -6
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-screen.native.js +3 -1
- package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +6 -2
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js +6 -2
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build/notice/index.native.js +15 -19
- package/build/notice/index.native.js.map +1 -1
- package/build/notice/list.native.js +2 -3
- package/build/notice/list.native.js.map +1 -1
- package/build/palette-edit/index.js +1 -1
- package/build/palette-edit/index.js.map +1 -1
- package/build/popover/index.js +29 -32
- package/build/popover/index.js.map +1 -1
- package/build/popover/limit-shift.js +145 -0
- package/build/popover/limit-shift.js.map +1 -0
- package/build/popover/utils.js +55 -15
- package/build/popover/utils.js.map +1 -1
- package/build/range-control/input-range.js +1 -15
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/tooltip.js +1 -1
- package/build/range-control/tooltip.js.map +1 -1
- package/build/range-control/utils.js +2 -58
- package/build/range-control/utils.js.map +1 -1
- package/build/tools-panel/styles.js +27 -12
- package/build/tools-panel/styles.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +19 -6
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js +4 -0
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tree-grid/index.js +13 -8
- package/build/tree-grid/index.js.map +1 -1
- package/build/unit-control/index.js +2 -2
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +10 -2
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +21 -32
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/utils/hooks/use-controlled-state.js +2 -3
- package/build/utils/hooks/use-controlled-state.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +1 -1
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/box-control/unit-control.js +0 -1
- package/build-module/box-control/unit-control.js.map +1 -1
- package/build-module/button/index.js +5 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/draggable/index.js +2 -5
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/drop-zone/index.js +7 -1
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +2 -2
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/menu-item/index.js +4 -3
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +10 -3
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +13 -4
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +4 -1
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js +3 -1
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/picker-screen.native.js +3 -1
- package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +3 -1
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js +3 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +3 -1
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +4 -2
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-screen.native.js +3 -1
- package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +24 -6
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-screen.native.js +3 -1
- package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +6 -2
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +6 -2
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build-module/notice/index.native.js +16 -21
- package/build-module/notice/index.native.js.map +1 -1
- package/build-module/notice/list.native.js +3 -3
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/palette-edit/index.js +1 -1
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/popover/index.js +31 -35
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/limit-shift.js +136 -0
- package/build-module/popover/limit-shift.js.map +1 -0
- package/build-module/popover/utils.js +55 -15
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/range-control/input-range.js +1 -14
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/tooltip.js +1 -1
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/range-control/utils.js +2 -57
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/tools-panel/styles.js +23 -12
- package/build-module/tools-panel/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +19 -7
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js +4 -0
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tree-grid/index.js +13 -8
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/unit-control/index.js +2 -2
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +10 -2
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +20 -31
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/utils/hooks/use-controlled-state.js +3 -4
- package/build-module/utils/hooks/use-controlled-state.js.map +1 -1
- package/build-style/style-rtl.css +13 -2
- package/build-style/style.css +13 -2
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/draggable/index.d.ts.map +1 -1
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts +3 -3
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/limit-shift.d.ts +87 -0
- package/build-types/popover/limit-shift.d.ts.map +1 -0
- package/build-types/popover/stories/e2e/index.d.ts +8 -0
- package/build-types/popover/stories/e2e/index.d.ts.map +1 -0
- package/build-types/popover/test/index.d.ts +2 -0
- package/build-types/popover/test/index.d.ts.map +1 -0
- package/build-types/popover/types.d.ts +1 -1
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/stories/index.d.ts.map +1 -1
- package/build-types/range-control/types.d.ts +0 -34
- package/build-types/range-control/types.d.ts.map +1 -1
- package/build-types/range-control/utils.d.ts +1 -12
- package/build-types/range-control/utils.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +1 -1
- package/build-types/tools-panel/styles.d.ts +6 -0
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +1 -0
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +1 -0
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -4
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/autocomplete/get-default-use-items.js +1 -1
- package/src/box-control/unit-control.js +0 -1
- package/src/button/index.js +7 -1
- package/src/button/test/index.js +36 -0
- package/src/color-palette/test/__snapshots__/index.js.snap +169 -1106
- package/src/color-palette/test/index.js +107 -61
- package/src/draggable/index.js +2 -5
- package/src/drop-zone/index.tsx +4 -1
- package/src/font-size-picker/stories/e2e/index.js +47 -0
- package/src/higher-order/with-filters/index.js +2 -2
- package/src/index.js +1 -1
- package/src/menu-item/README.md +7 -0
- package/src/menu-item/index.js +11 -5
- package/src/menu-item/style.scss +1 -0
- package/src/menu-item/test/index.js +36 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +9 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +12 -2
- package/src/mobile/bottom-sheet/sub-sheet/index.native.js +3 -0
- package/src/mobile/color-settings/index.native.js +3 -0
- package/src/mobile/color-settings/picker-screen.native.js +3 -0
- package/src/mobile/image/index.native.js +3 -0
- package/src/mobile/keyboard-avoiding-view/index.ios.js +3 -0
- package/src/mobile/link-picker/index.native.js +3 -0
- package/src/mobile/link-picker/link-picker-results.native.js +4 -1
- package/src/mobile/link-picker/link-picker-screen.native.js +3 -0
- package/src/mobile/link-settings/index.native.js +18 -0
- package/src/mobile/link-settings/link-settings-screen.native.js +3 -0
- package/src/mobile/segmented-control/index.native.js +6 -0
- package/src/mobile/utils/use-unit-converter-to-mobile.native.js +6 -0
- package/src/notice/index.native.js +17 -20
- package/src/notice/list.native.js +7 -3
- package/src/palette-edit/index.js +1 -1
- package/src/placeholder/style.scss +1 -1
- package/src/popover/index.tsx +26 -42
- package/src/popover/limit-shift.ts +205 -0
- package/src/popover/stories/e2e/index.tsx +25 -0
- package/src/popover/test/index.tsx +230 -0
- package/src/popover/types.ts +1 -0
- package/src/popover/utils.ts +58 -16
- package/src/range-control/README.md +6 -7
- package/src/range-control/input-range.tsx +1 -21
- package/src/range-control/stories/index.tsx +2 -1
- package/src/range-control/tooltip.tsx +1 -1
- package/src/range-control/types.ts +0 -35
- package/src/range-control/utils.ts +3 -75
- package/src/tools-panel/stories/index.js +27 -0
- package/src/tools-panel/styles.ts +28 -1
- package/src/tools-panel/tools-panel-header/component.tsx +12 -5
- package/src/tools-panel/tools-panel-header/hook.ts +5 -0
- package/src/tools-panel/types.ts +1 -0
- package/src/tree-grid/index.js +23 -14
- package/src/tree-grid/test/__snapshots__/cell.js.snap +21 -17
- package/src/tree-grid/test/__snapshots__/index.js.snap +1 -1
- package/src/unit-control/index.native.js +8 -0
- package/src/unit-control/index.tsx +2 -2
- package/src/unit-control/styles/unit-control-styles.ts +0 -20
- package/src/unit-control/test/index.tsx +6 -3
- package/src/utils/hooks/use-controlled-state.js +9 -6
- package/tsconfig.tsbuildinfo +1 -1
- package/src/popover/test/__snapshots__/index.js.snap +0 -34
- package/src/popover/test/index.js +0 -164
- package/src/unit-control/test/__snapshots__/index.tsx.snap +0 -31
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { render, screen, within } from '@testing-library/react';
|
|
5
|
+
import userEvent from '@testing-library/user-event';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
@@ -17,102 +18,147 @@ describe( 'ColorPalette', () => {
|
|
|
17
18
|
const currentColor = '#f00';
|
|
18
19
|
const onChange = jest.fn();
|
|
19
20
|
|
|
20
|
-
const wrapper = mount(
|
|
21
|
-
<ColorPalette
|
|
22
|
-
colors={ colors }
|
|
23
|
-
value={ currentColor }
|
|
24
|
-
onChange={ onChange }
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
const buttons = wrapper.find( 'Option button' );
|
|
28
|
-
|
|
29
21
|
beforeEach( () => {
|
|
30
22
|
onChange.mockClear();
|
|
31
23
|
} );
|
|
32
24
|
|
|
33
25
|
test( 'should render a dynamic toolbar of colors', () => {
|
|
34
|
-
|
|
26
|
+
const { container } = render(
|
|
27
|
+
<ColorPalette
|
|
28
|
+
colors={ colors }
|
|
29
|
+
value={ currentColor }
|
|
30
|
+
onChange={ onChange }
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
expect( container ).toMatchSnapshot();
|
|
35
35
|
} );
|
|
36
36
|
|
|
37
37
|
test( 'should render three color button options', () => {
|
|
38
|
-
|
|
38
|
+
render(
|
|
39
|
+
<ColorPalette
|
|
40
|
+
colors={ colors }
|
|
41
|
+
value={ currentColor }
|
|
42
|
+
onChange={ onChange }
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
expect(
|
|
47
|
+
screen.getAllByRole( 'button', { name: /^Color:/ } )
|
|
48
|
+
).toHaveLength( 3 );
|
|
39
49
|
} );
|
|
40
50
|
|
|
41
|
-
test( 'should call onClick on an active button with undefined', () => {
|
|
42
|
-
const
|
|
43
|
-
|
|
51
|
+
test( 'should call onClick on an active button with undefined', async () => {
|
|
52
|
+
const user = userEvent.setup( {
|
|
53
|
+
advanceTimers: jest.advanceTimersByTime,
|
|
54
|
+
} );
|
|
55
|
+
|
|
56
|
+
render(
|
|
57
|
+
<ColorPalette
|
|
58
|
+
colors={ colors }
|
|
59
|
+
value={ currentColor }
|
|
60
|
+
onChange={ onChange }
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
await user.click(
|
|
65
|
+
screen.getByRole( 'button', { name: /^Color:/, pressed: true } )
|
|
44
66
|
);
|
|
45
|
-
activeButton.simulate( 'click' );
|
|
46
67
|
|
|
47
68
|
expect( onChange ).toHaveBeenCalledTimes( 1 );
|
|
48
69
|
expect( onChange ).toHaveBeenCalledWith( undefined );
|
|
49
70
|
} );
|
|
50
71
|
|
|
51
|
-
test( 'should call onClick on an inactive button', () => {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
72
|
+
test( 'should call onClick on an inactive button', async () => {
|
|
73
|
+
const user = userEvent.setup( {
|
|
74
|
+
advanceTimers: jest.advanceTimersByTime,
|
|
75
|
+
} );
|
|
76
|
+
|
|
77
|
+
render(
|
|
78
|
+
<ColorPalette
|
|
79
|
+
colors={ colors }
|
|
80
|
+
value={ currentColor }
|
|
81
|
+
onChange={ onChange }
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
await user.click(
|
|
86
|
+
screen.getAllByRole( 'button', {
|
|
87
|
+
name: /^Color:/,
|
|
88
|
+
pressed: false,
|
|
89
|
+
} )[ 0 ]
|
|
90
|
+
);
|
|
56
91
|
|
|
57
92
|
expect( onChange ).toHaveBeenCalledTimes( 1 );
|
|
93
|
+
expect( onChange ).toHaveBeenCalledWith( '#fff' );
|
|
58
94
|
} );
|
|
59
95
|
|
|
60
|
-
test( 'should call onClick with undefined, when the clearButton onClick is triggered', () => {
|
|
61
|
-
const
|
|
96
|
+
test( 'should call onClick with undefined, when the clearButton onClick is triggered', async () => {
|
|
97
|
+
const user = userEvent.setup( {
|
|
98
|
+
advanceTimers: jest.advanceTimersByTime,
|
|
99
|
+
} );
|
|
62
100
|
|
|
63
|
-
|
|
101
|
+
render(
|
|
102
|
+
<ColorPalette
|
|
103
|
+
colors={ colors }
|
|
104
|
+
value={ currentColor }
|
|
105
|
+
onChange={ onChange }
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
64
108
|
|
|
65
|
-
|
|
109
|
+
await user.click( screen.getByRole( 'button', { name: 'Clear' } ) );
|
|
66
110
|
|
|
67
111
|
expect( onChange ).toHaveBeenCalledTimes( 1 );
|
|
68
112
|
expect( onChange ).toHaveBeenCalledWith( undefined );
|
|
69
113
|
} );
|
|
70
114
|
|
|
71
115
|
test( 'should allow disabling custom color picker', () => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
)
|
|
81
|
-
).toMatchSnapshot();
|
|
82
|
-
} );
|
|
116
|
+
const { container } = render(
|
|
117
|
+
<ColorPalette
|
|
118
|
+
colors={ colors }
|
|
119
|
+
disableCustomColors
|
|
120
|
+
value={ currentColor }
|
|
121
|
+
onChange={ onChange }
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
83
124
|
|
|
84
|
-
|
|
85
|
-
|
|
125
|
+
expect( container ).toMatchSnapshot();
|
|
126
|
+
} );
|
|
86
127
|
|
|
87
|
-
|
|
88
|
-
|
|
128
|
+
test( 'should render dropdown and its content', async () => {
|
|
129
|
+
const user = userEvent.setup( {
|
|
130
|
+
advanceTimers: jest.advanceTimersByTime,
|
|
89
131
|
} );
|
|
90
132
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
test( 'should render dropdown content', () => {
|
|
100
|
-
expect( renderedToggleButton ).toMatchSnapshot();
|
|
101
|
-
} );
|
|
133
|
+
render(
|
|
134
|
+
<ColorPalette
|
|
135
|
+
colors={ colors }
|
|
136
|
+
value={ currentColor }
|
|
137
|
+
onChange={ onChange }
|
|
138
|
+
/>
|
|
139
|
+
);
|
|
102
140
|
|
|
103
|
-
|
|
104
|
-
|
|
141
|
+
await user.click(
|
|
142
|
+
screen.getByRole( 'button', {
|
|
143
|
+
name: /^Custom color picker/,
|
|
144
|
+
expanded: false,
|
|
145
|
+
} )
|
|
146
|
+
);
|
|
105
147
|
|
|
106
|
-
|
|
107
|
-
|
|
148
|
+
const dropdownButton = screen.getByRole( 'button', {
|
|
149
|
+
name: /^Custom color picker/,
|
|
150
|
+
expanded: true,
|
|
108
151
|
} );
|
|
109
152
|
|
|
110
|
-
|
|
111
|
-
const renderedContent = shallow( dropdown.props().renderContent() );
|
|
153
|
+
expect( dropdownButton ).toBeVisible();
|
|
112
154
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
155
|
+
expect(
|
|
156
|
+
within( dropdownButton ).getByText( colors[ 0 ].name )
|
|
157
|
+
).toBeVisible();
|
|
158
|
+
expect(
|
|
159
|
+
within( dropdownButton ).getByText(
|
|
160
|
+
colors[ 0 ].color.replace( '#', '' )
|
|
161
|
+
)
|
|
162
|
+
).toBeVisible();
|
|
117
163
|
} );
|
|
118
164
|
} );
|
package/src/draggable/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
+
import { throttle } from '@wordpress/compose';
|
|
4
5
|
import { useEffect, useRef } from '@wordpress/element';
|
|
5
6
|
|
|
6
|
-
/**
|
|
7
|
-
* External dependencies
|
|
8
|
-
*/
|
|
9
|
-
import { throttle } from 'lodash';
|
|
10
|
-
|
|
11
7
|
const dragImageClass = 'components-draggable__invisible-drag-image';
|
|
12
8
|
const cloneWrapperClass = 'components-draggable__clone';
|
|
13
9
|
const clonePadding = 0;
|
|
@@ -180,6 +176,7 @@ export default function Draggable( {
|
|
|
180
176
|
|
|
181
177
|
// Aim for 60fps (16 ms per frame) for now. We can potentially use requestAnimationFrame (raf) instead,
|
|
182
178
|
// note that browsers may throttle raf below 60fps in certain conditions.
|
|
179
|
+
// @ts-ignore
|
|
183
180
|
const throttledDragOver = throttle( over, 16 );
|
|
184
181
|
|
|
185
182
|
ownerDocument.addEventListener( 'dragover', throttledDragOver );
|
package/src/drop-zone/index.tsx
CHANGED
|
@@ -119,7 +119,6 @@ export function DropZoneComponent( {
|
|
|
119
119
|
const disableMotion = useReducedMotion();
|
|
120
120
|
|
|
121
121
|
let children;
|
|
122
|
-
|
|
123
122
|
const backdrop = {
|
|
124
123
|
hidden: { scaleY: 0, opacity: 0 },
|
|
125
124
|
show: {
|
|
@@ -156,6 +155,10 @@ export function DropZoneComponent( {
|
|
|
156
155
|
animate="show"
|
|
157
156
|
exit={ disableMotion ? 'show' : 'exit' }
|
|
158
157
|
className="components-drop-zone__content"
|
|
158
|
+
// Without this, when this div is shown,
|
|
159
|
+
// Safari calls a onDropZoneLeave causing a loop because of this bug
|
|
160
|
+
// https://bugs.webkit.org/show_bug.cgi?id=66547
|
|
161
|
+
style={ { pointerEvents: 'none' } }
|
|
159
162
|
>
|
|
160
163
|
<motion.div variants={ foreground }>
|
|
161
164
|
<Icon
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useState } from '@wordpress/element';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import FontSizePicker from '../..';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'Components/FontSizePicker',
|
|
13
|
+
component: FontSizePicker,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const FontSizePickerWithState = ( { initialValue, ...props } ) => {
|
|
17
|
+
const [ fontSize, setFontSize ] = useState( initialValue );
|
|
18
|
+
return (
|
|
19
|
+
<FontSizePicker
|
|
20
|
+
{ ...props }
|
|
21
|
+
value={ fontSize }
|
|
22
|
+
onChange={ setFontSize }
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Default = FontSizePickerWithState.bind( {} );
|
|
28
|
+
Default.args = {
|
|
29
|
+
fontSizes: [
|
|
30
|
+
{
|
|
31
|
+
name: 'Small',
|
|
32
|
+
slug: 'small',
|
|
33
|
+
size: 12,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Normal',
|
|
37
|
+
slug: 'normal',
|
|
38
|
+
size: 16,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Big',
|
|
42
|
+
slug: 'big',
|
|
43
|
+
size: 26,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
initialValue: 16,
|
|
47
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { without } from 'lodash';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { Component } from '@wordpress/element';
|
|
10
10
|
import { addAction, applyFilters, removeAction } from '@wordpress/hooks';
|
|
11
|
-
import { createHigherOrderComponent } from '@wordpress/compose';
|
|
11
|
+
import { createHigherOrderComponent, debounce } from '@wordpress/compose';
|
|
12
12
|
|
|
13
13
|
const ANIMATION_FRAME_PERIOD = 16;
|
|
14
14
|
|
package/src/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export {
|
|
|
16
16
|
default as Animate,
|
|
17
17
|
getAnimateClassName as __unstableGetAnimateClassName,
|
|
18
18
|
} from './animate';
|
|
19
|
-
export { __unstableMotion } from './animation';
|
|
19
|
+
export { __unstableMotion, __unstableAnimatePresence } from './animation';
|
|
20
20
|
export { default as AnglePickerControl } from './angle-picker-control';
|
|
21
21
|
export {
|
|
22
22
|
default as Autocomplete,
|
package/src/menu-item/README.md
CHANGED
|
@@ -79,3 +79,10 @@ If shortcut is a string, it is expecting the display text. If shortcut is an obj
|
|
|
79
79
|
- Default: `'menuitem'`
|
|
80
80
|
|
|
81
81
|
[Aria Spec](https://www.w3.org/TR/wai-aria-1.1/#aria-checked). If you need to have selectable menu items use menuitemradio for single select, and menuitemcheckbox for multiselect.
|
|
82
|
+
|
|
83
|
+
### `suffix`
|
|
84
|
+
|
|
85
|
+
- Type: `WPElement`
|
|
86
|
+
- Required: No
|
|
87
|
+
|
|
88
|
+
Allows for markup other than icons or shortcuts to be added to the menu item.
|
package/src/menu-item/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export function MenuItem( props, ref ) {
|
|
|
26
26
|
shortcut,
|
|
27
27
|
isSelected,
|
|
28
28
|
role = 'menuitem',
|
|
29
|
+
suffix,
|
|
29
30
|
...buttonProps
|
|
30
31
|
} = props;
|
|
31
32
|
|
|
@@ -63,11 +64,16 @@ export function MenuItem( props, ref ) {
|
|
|
63
64
|
{ ...buttonProps }
|
|
64
65
|
>
|
|
65
66
|
<span className="components-menu-item__item">{ children }</span>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
{ ! suffix && (
|
|
68
|
+
<Shortcut
|
|
69
|
+
className="components-menu-item__shortcut"
|
|
70
|
+
shortcut={ shortcut }
|
|
71
|
+
/>
|
|
72
|
+
) }
|
|
73
|
+
{ ! suffix && icon && iconPosition === 'right' && (
|
|
74
|
+
<Icon icon={ icon } />
|
|
75
|
+
) }
|
|
76
|
+
{ suffix }
|
|
71
77
|
</Button>
|
|
72
78
|
);
|
|
73
79
|
}
|
package/src/menu-item/style.scss
CHANGED
|
@@ -107,4 +107,40 @@ describe( 'MenuItem', () => {
|
|
|
107
107
|
expect( checkboxMenuItem ).toBeChecked();
|
|
108
108
|
expect( checkboxMenuItem ).toHaveAttribute( 'aria-checked', 'true' );
|
|
109
109
|
} );
|
|
110
|
+
|
|
111
|
+
it( 'should not render shortcut or right icon if suffix provided', () => {
|
|
112
|
+
render(
|
|
113
|
+
<MenuItem
|
|
114
|
+
icon={ <span>Icon</span> }
|
|
115
|
+
iconPosition="right"
|
|
116
|
+
role="menuitemcheckbox"
|
|
117
|
+
shortcut="Shortcut"
|
|
118
|
+
suffix="Suffix"
|
|
119
|
+
>
|
|
120
|
+
My item
|
|
121
|
+
</MenuItem>
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
expect( screen.getByText( 'Suffix' ) ).toBeInTheDocument();
|
|
125
|
+
expect( screen.queryByText( 'Shortcut' ) ).not.toBeInTheDocument();
|
|
126
|
+
expect( screen.queryByText( 'Icon' ) ).not.toBeInTheDocument();
|
|
127
|
+
} );
|
|
128
|
+
|
|
129
|
+
it( 'should render left icon despite suffix being provided', () => {
|
|
130
|
+
render(
|
|
131
|
+
<MenuItem
|
|
132
|
+
icon={ <span>Icon</span> }
|
|
133
|
+
iconPosition="left"
|
|
134
|
+
role="menuitemcheckbox"
|
|
135
|
+
shortcut="Shortcut"
|
|
136
|
+
suffix="Suffix"
|
|
137
|
+
>
|
|
138
|
+
My item
|
|
139
|
+
</MenuItem>
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
expect( screen.getByText( 'Icon' ) ).toBeInTheDocument();
|
|
143
|
+
expect( screen.getByText( 'Suffix' ) ).toBeInTheDocument();
|
|
144
|
+
expect( screen.queryByText( 'Shortcut' ) ).not.toBeInTheDocument();
|
|
145
|
+
} );
|
|
110
146
|
} );
|
|
@@ -112,6 +112,9 @@ function BottomSheetNavigationContainer( {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
+
// Disable reason: deferring this refactor to the native team.
|
|
116
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
117
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
118
|
[ currentHeight ]
|
|
116
119
|
);
|
|
117
120
|
|
|
@@ -133,6 +136,9 @@ function BottomSheetNavigationContainer( {
|
|
|
133
136
|
/>
|
|
134
137
|
);
|
|
135
138
|
} );
|
|
139
|
+
// Disable reason: deferring this refactor to the native team.
|
|
140
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
141
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
136
142
|
}, [ children ] );
|
|
137
143
|
|
|
138
144
|
return useMemo( () => {
|
|
@@ -158,6 +164,9 @@ function BottomSheetNavigationContainer( {
|
|
|
158
164
|
</BottomSheetNavigationProvider>
|
|
159
165
|
</View>
|
|
160
166
|
);
|
|
167
|
+
// Disable reason: deferring this refactor to the native team.
|
|
168
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
169
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
161
170
|
}, [ currentHeight, _theme ] );
|
|
162
171
|
}
|
|
163
172
|
|
|
@@ -7,13 +7,12 @@ import {
|
|
|
7
7
|
useFocusEffect,
|
|
8
8
|
} from '@react-navigation/native';
|
|
9
9
|
import { View, ScrollView, TouchableHighlight } from 'react-native';
|
|
10
|
-
import { debounce } from 'lodash';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* WordPress dependencies
|
|
14
13
|
*/
|
|
15
14
|
import { BottomSheetContext } from '@wordpress/components';
|
|
16
|
-
|
|
15
|
+
import { debounce } from '@wordpress/compose';
|
|
17
16
|
import { useRef, useCallback, useContext, useMemo } from '@wordpress/element';
|
|
18
17
|
|
|
19
18
|
/**
|
|
@@ -42,6 +41,9 @@ const BottomSheetNavigationScreen = ( {
|
|
|
42
41
|
|
|
43
42
|
const { setHeight } = useContext( BottomSheetNavigationContext );
|
|
44
43
|
|
|
44
|
+
// Disable reason: deferring this refactor to the native team.
|
|
45
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
46
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
47
|
const setHeightDebounce = useCallback( debounce( setHeight, 10 ), [
|
|
46
48
|
setHeight,
|
|
47
49
|
] );
|
|
@@ -71,6 +73,8 @@ const BottomSheetNavigationScreen = ( {
|
|
|
71
73
|
*
|
|
72
74
|
* Related: https://github.com/WordPress/gutenberg/pull/36328#discussion_r768897546
|
|
73
75
|
*/
|
|
76
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
77
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
78
|
}, [] )
|
|
75
79
|
);
|
|
76
80
|
|
|
@@ -84,6 +88,9 @@ const BottomSheetNavigationScreen = ( {
|
|
|
84
88
|
setHeight( heightRef.current.maxHeight );
|
|
85
89
|
}
|
|
86
90
|
return () => {};
|
|
91
|
+
// Disable reason: deferring this refactor to the native team.
|
|
92
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
93
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
87
94
|
}, [ setHeight ] )
|
|
88
95
|
);
|
|
89
96
|
|
|
@@ -128,6 +135,9 @@ const BottomSheetNavigationScreen = ( {
|
|
|
128
135
|
</TouchableHighlight>
|
|
129
136
|
</ScrollView>
|
|
130
137
|
);
|
|
138
|
+
// Disable reason: deferring this refactor to the native team.
|
|
139
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
140
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
141
|
}, [
|
|
132
142
|
children,
|
|
133
143
|
isFocused,
|
|
@@ -23,6 +23,9 @@ const BottomSheetSubSheet = ( {
|
|
|
23
23
|
if ( showSheet ) {
|
|
24
24
|
setIsFullScreen( isFullScreen );
|
|
25
25
|
}
|
|
26
|
+
// Disable reason: deferring this refactor to the native team.
|
|
27
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
28
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26
29
|
}, [ showSheet, isFullScreen ] );
|
|
27
30
|
|
|
28
31
|
return (
|
|
@@ -34,6 +34,9 @@ const ColorSettingsMemo = memo(
|
|
|
34
34
|
useEffect( () => {
|
|
35
35
|
shouldEnableBottomSheetMaxHeight( true );
|
|
36
36
|
onHandleClosingBottomSheet( null );
|
|
37
|
+
// Disable reason: deferring this refactor to the native team.
|
|
38
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
39
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
40
|
}, [] );
|
|
38
41
|
return (
|
|
39
42
|
<BottomSheet.NavigationContainer>
|
|
@@ -43,6 +43,9 @@ const PickerScreen = () => {
|
|
|
43
43
|
onHandleHardwareButtonPress={ onHandleHardwareButtonPress }
|
|
44
44
|
/>
|
|
45
45
|
);
|
|
46
|
+
// Disable reason: deferring this refactor to the native team.
|
|
47
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
48
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
49
|
}, [
|
|
47
50
|
setColor,
|
|
48
51
|
currentValue,
|
|
@@ -82,6 +82,9 @@ const ImageComponent = ( {
|
|
|
82
82
|
} );
|
|
83
83
|
}
|
|
84
84
|
return () => ( isCurrent = false );
|
|
85
|
+
// Disable reason: deferring this refactor to the native team.
|
|
86
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
87
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
88
|
}, [ url ] );
|
|
86
89
|
|
|
87
90
|
const onContainerLayout = ( event ) => {
|
|
@@ -69,6 +69,9 @@ export const KeyboardAvoidingView = ( {
|
|
|
69
69
|
keyboardShowSubscription.remove();
|
|
70
70
|
keyboardHideSubscription.remove();
|
|
71
71
|
};
|
|
72
|
+
// Disable reason: deferring this refactor to the native team.
|
|
73
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
74
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
75
|
}, [] );
|
|
73
76
|
|
|
74
77
|
function onSafeAreaInsetsUpdate( { safeAreaInsets } ) {
|
|
@@ -91,6 +91,9 @@ export const LinkPicker = ( {
|
|
|
91
91
|
getURLFromClipboard()
|
|
92
92
|
.then( ( url ) => setValue( { value, clipboardUrl: url } ) )
|
|
93
93
|
.catch( () => setValue( { value, clipboardUrl: '' } ) );
|
|
94
|
+
// Disable reason: deferring this refactor to the native team.
|
|
95
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
96
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
97
|
}, [] );
|
|
95
98
|
|
|
96
99
|
// TODO: Localize the accessibility label.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { ActivityIndicator, FlatList, View } from 'react-native';
|
|
5
|
-
import { debounce } from 'lodash';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
9
8
|
*/
|
|
10
9
|
import { BottomSheet, BottomSheetConsumer } from '@wordpress/components';
|
|
10
|
+
import { debounce } from '@wordpress/compose';
|
|
11
11
|
import { useState, useEffect, useRef } from '@wordpress/element';
|
|
12
12
|
import { useSelect } from '@wordpress/data';
|
|
13
13
|
|
|
@@ -86,6 +86,9 @@ export default function LinkPickerResults( {
|
|
|
86
86
|
setHasAllSuggestions( false );
|
|
87
87
|
setLinks( [ directEntry ] );
|
|
88
88
|
fetchMoreSuggestions( { query, links: [ directEntry ] } );
|
|
89
|
+
// Disable reason: deferring this refactor to the native team.
|
|
90
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
91
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
92
|
}, [ query ] );
|
|
90
93
|
|
|
91
94
|
const onEndReached = () => fetchMoreSuggestions( { query, links } );
|
|
@@ -53,6 +53,9 @@ const LinkPickerScreen = ( { returnScreenName } ) => {
|
|
|
53
53
|
onCancel={ onCancel }
|
|
54
54
|
/>
|
|
55
55
|
);
|
|
56
|
+
// Disable reason: deferring this refactor to the native team.
|
|
57
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
58
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
59
|
}, [ inputValue ] );
|
|
57
60
|
};
|
|
58
61
|
|
|
@@ -101,6 +101,9 @@ function LinkSettings( {
|
|
|
101
101
|
if ( onHandleClosingBottomSheet ) {
|
|
102
102
|
onHandleClosingBottomSheet( onCloseSettingsSheet );
|
|
103
103
|
}
|
|
104
|
+
// Disable reason: deferring this refactor to the native team.
|
|
105
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
106
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
107
|
}, [ urlInputValue, labelInputValue, linkRelInputValue ] );
|
|
105
108
|
|
|
106
109
|
useEffect( () => {
|
|
@@ -112,6 +115,9 @@ function LinkSettings( {
|
|
|
112
115
|
if ( url !== urlInputValue ) {
|
|
113
116
|
setUrlInputValue( url || '' );
|
|
114
117
|
}
|
|
118
|
+
// Disable reason: deferring this refactor to the native team.
|
|
119
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
120
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
121
|
}, [ url ] );
|
|
116
122
|
|
|
117
123
|
useEffect( () => {
|
|
@@ -135,6 +141,9 @@ function LinkSettings( {
|
|
|
135
141
|
if ( prevEditorSidebarOpened && ! editorSidebarOpened ) {
|
|
136
142
|
onSetAttributes();
|
|
137
143
|
}
|
|
144
|
+
// Disable reason: deferring this refactor to the native team.
|
|
145
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
146
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
147
|
}, [ editorSidebarOpened, isVisible ] );
|
|
139
148
|
|
|
140
149
|
useEffect( () => {
|
|
@@ -147,6 +156,9 @@ function LinkSettings( {
|
|
|
147
156
|
url: prependHTTP( urlValue ),
|
|
148
157
|
} );
|
|
149
158
|
}
|
|
159
|
+
// Disable reason: deferring this refactor to the native team.
|
|
160
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
161
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
150
162
|
}, [ urlValue ] );
|
|
151
163
|
|
|
152
164
|
const onChangeURL = useCallback(
|
|
@@ -176,6 +188,9 @@ function LinkSettings( {
|
|
|
176
188
|
rel: linkRelInputValue,
|
|
177
189
|
} );
|
|
178
190
|
}
|
|
191
|
+
// Disable reason: deferring this refactor to the native team.
|
|
192
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
193
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
179
194
|
}, [ urlInputValue, labelInputValue, linkRelInputValue, setAttributes ] );
|
|
180
195
|
|
|
181
196
|
const onCloseSettingsSheet = useCallback( () => {
|
|
@@ -208,6 +223,9 @@ function LinkSettings( {
|
|
|
208
223
|
rel: updatedRel,
|
|
209
224
|
} );
|
|
210
225
|
},
|
|
226
|
+
// Disable reason: deferring this refactor to the native team.
|
|
227
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
228
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
211
229
|
[ linkRelInputValue ]
|
|
212
230
|
);
|
|
213
231
|
|