@wordpress/components 30.8.2-next.dc3f6d3c1.0 → 30.9.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 +5 -1
- package/build/date-time/date/index.js +5 -5
- package/build/date-time/date/index.js.map +2 -2
- package/build/date-time/utils.js +3 -1
- package/build/date-time/utils.js.map +2 -2
- package/build/external-link/index.js +1 -1
- package/build/external-link/index.js.map +2 -2
- package/build-module/date-time/date/index.js +6 -6
- package/build-module/date-time/date/index.js.map +2 -2
- package/build-module/date-time/utils.js +3 -1
- package/build-module/date-time/utils.js.map +2 -2
- package/build-module/external-link/index.js +2 -2
- package/build-module/external-link/index.js.map +2 -2
- package/build-style/style-rtl.css +8 -0
- package/build-style/style.css +8 -0
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/test/index.d.ts +2 -0
- package/build-types/date-time/date-time/test/index.d.ts.map +1 -0
- package/build-types/date-time/test/utils.test.d.ts +2 -0
- package/build-types/date-time/test/utils.test.d.ts.map +1 -0
- package/build-types/date-time/utils.d.ts +3 -2
- package/build-types/date-time/utils.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/package.json +24 -20
- package/src/alignment-matrix-control/stories/index.story.tsx +4 -1
- package/src/angle-picker-control/stories/index.story.tsx +4 -1
- package/src/box-control/stories/index.story.tsx +4 -1
- package/src/circular-option-picker/stories/index.story.tsx +0 -1
- package/src/color-picker/stories/index.story.tsx +4 -1
- package/src/combobox-control/stories/index.story.tsx +5 -1
- package/src/confirm-dialog/stories/index.story.tsx +5 -1
- package/src/custom-gradient-picker/stories/index.story.tsx +4 -1
- package/src/custom-select-control/stories/index.story.tsx +4 -1
- package/src/custom-select-control-v2/stories/index.story.tsx +0 -1
- package/src/date-time/date/index.tsx +6 -16
- package/src/date-time/date-time/test/index.tsx +206 -0
- package/src/date-time/test/utils.test.ts +128 -0
- package/src/date-time/utils.ts +12 -3
- package/src/draggable/stories/index.story.tsx +6 -1
- package/src/drop-zone/stories/index.story.tsx +6 -1
- package/src/dropdown/stories/index.story.tsx +5 -1
- package/src/dropdown-menu/stories/index.story.tsx +4 -1
- package/src/external-link/index.tsx +2 -2
- package/src/focal-point-picker/stories/index.story.tsx +7 -1
- package/src/font-size-picker/stories/index.story.tsx +4 -1
- package/src/gradient-picker/stories/index.story.tsx +5 -1
- package/src/input-control/stories/index.story.tsx +7 -1
- package/src/menu/stories/index.story.tsx +4 -1
- package/src/modal/style.scss +14 -0
- package/src/navigable-container/stories/navigable-menu.story.tsx +5 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +5 -1
- package/src/navigation/stories/index.story.tsx +4 -1
- package/src/notice/stories/index.story.tsx +5 -1
- package/src/palette-edit/stories/index.story.tsx +4 -1
- package/src/query-controls/stories/index.story.tsx +8 -1
- package/src/radio-group/stories/index.story.tsx +4 -1
- package/src/range-control/stories/index.story.tsx +8 -1
- package/src/sandbox/stories/index.story.tsx +4 -1
- package/src/select-control/stories/index.story.tsx +4 -1
- package/src/tab-panel/stories/index.story.tsx +0 -1
- package/src/tabs/stories/index.story.tsx +0 -1
- package/src/text/stories/index.story.tsx +0 -1
- package/src/tools-panel/stories/index.story.tsx +4 -1
- package/src/tree-grid/stories/index.story.tsx +6 -1
- package/src/unit-control/stories/index.story.tsx +7 -1
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- /package/src/context/stories/{ComponentsProvider.stories.js → ComponentsProvider.stories.jsx} +0 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -17,8 +18,10 @@ import type { Color, Gradient } from '../types';
|
|
|
17
18
|
const meta: Meta< typeof PaletteEdit > = {
|
|
18
19
|
title: 'Components/PaletteEdit',
|
|
19
20
|
component: PaletteEdit,
|
|
21
|
+
args: {
|
|
22
|
+
onChange: fn(),
|
|
23
|
+
},
|
|
20
24
|
parameters: {
|
|
21
|
-
actions: { argTypesRegex: '^on.*' },
|
|
22
25
|
controls: { expanded: true },
|
|
23
26
|
docs: { canvas: { sourceState: 'shown' } },
|
|
24
27
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -29,8 +30,14 @@ const meta: Meta< typeof QueryControls > = {
|
|
|
29
30
|
selectedCategories: { control: false },
|
|
30
31
|
selectedCategoryId: { control: false },
|
|
31
32
|
},
|
|
33
|
+
args: {
|
|
34
|
+
onAuthorChange: fn(),
|
|
35
|
+
onNumberOfItemsChange: fn(),
|
|
36
|
+
onOrderByChange: fn(),
|
|
37
|
+
onOrderChange: fn(),
|
|
38
|
+
onCategoryChange: fn(),
|
|
39
|
+
},
|
|
32
40
|
parameters: {
|
|
33
|
-
actions: { argTypesRegex: '^on.*' },
|
|
34
41
|
controls: { expanded: true },
|
|
35
42
|
docs: { canvas: { sourceState: 'shown' } },
|
|
36
43
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
@@ -25,8 +26,10 @@ const meta: Meta< typeof RadioGroup > = {
|
|
|
25
26
|
children: { control: false },
|
|
26
27
|
checked: { control: { type: 'text' } },
|
|
27
28
|
},
|
|
29
|
+
args: {
|
|
30
|
+
onChange: fn(),
|
|
31
|
+
},
|
|
28
32
|
parameters: {
|
|
29
|
-
actions: { argTypesRegex: '^on.*' },
|
|
30
33
|
controls: { expanded: true },
|
|
31
34
|
docs: {
|
|
32
35
|
canvas: { sourceState: 'shown' },
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -46,8 +47,14 @@ const meta: Meta< typeof RangeControl > = {
|
|
|
46
47
|
type: { control: { type: 'check' }, options: [ 'stepper' ] },
|
|
47
48
|
value: { control: false },
|
|
48
49
|
},
|
|
50
|
+
args: {
|
|
51
|
+
onBlur: fn(),
|
|
52
|
+
onChange: fn(),
|
|
53
|
+
onFocus: fn(),
|
|
54
|
+
onMouseLeave: fn(),
|
|
55
|
+
onMouseMove: fn(),
|
|
56
|
+
},
|
|
49
57
|
parameters: {
|
|
50
|
-
actions: { argTypesRegex: '^on.*' },
|
|
51
58
|
controls: { expanded: true },
|
|
52
59
|
docs: { canvas: { sourceState: 'shown' } },
|
|
53
60
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
@@ -15,8 +16,10 @@ const meta: Meta< typeof SandBox > = {
|
|
|
15
16
|
argTypes: {
|
|
16
17
|
onFocus: { control: false },
|
|
17
18
|
},
|
|
19
|
+
args: {
|
|
20
|
+
onFocus: fn(),
|
|
21
|
+
},
|
|
18
22
|
parameters: {
|
|
19
|
-
actions: { argTypesRegex: '^on.*' },
|
|
20
23
|
controls: { expanded: true },
|
|
21
24
|
docs: { canvas: { sourceState: 'shown' } },
|
|
22
25
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -25,8 +26,10 @@ const meta: Meta< typeof SelectControl > = {
|
|
|
25
26
|
suffix: { control: { type: 'text' } },
|
|
26
27
|
value: { control: false },
|
|
27
28
|
},
|
|
29
|
+
args: {
|
|
30
|
+
onChange: fn(),
|
|
31
|
+
},
|
|
28
32
|
parameters: {
|
|
29
|
-
actions: { argTypesRegex: '^on.*' },
|
|
30
33
|
controls: { expanded: true },
|
|
31
34
|
docs: { canvas: { sourceState: 'shown' } },
|
|
32
35
|
},
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
|
+
import { fn } from '@storybook/test';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* WordPress dependencies
|
|
@@ -37,8 +38,10 @@ const meta: Meta< typeof ToolsPanel > = {
|
|
|
37
38
|
resetAll: { action: 'resetAll' },
|
|
38
39
|
},
|
|
39
40
|
tags: [ 'status-experimental' ],
|
|
41
|
+
args: {
|
|
42
|
+
resetAll: fn(),
|
|
43
|
+
},
|
|
40
44
|
parameters: {
|
|
41
|
-
actions: { argTypesRegex: '^on.*' },
|
|
42
45
|
controls: {
|
|
43
46
|
expanded: true,
|
|
44
47
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -25,8 +26,12 @@ const meta: Meta< typeof TreeGrid > = {
|
|
|
25
26
|
children: { control: false },
|
|
26
27
|
},
|
|
27
28
|
tags: [ 'status-experimental' ],
|
|
29
|
+
args: {
|
|
30
|
+
onExpandRow: fn(),
|
|
31
|
+
onCollapseRow: fn(),
|
|
32
|
+
onFocusRow: fn(),
|
|
33
|
+
},
|
|
28
34
|
parameters: {
|
|
29
|
-
actions: { argTypesRegex: '^on.*' },
|
|
30
35
|
controls: { expanded: true },
|
|
31
36
|
},
|
|
32
37
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
|
+
import { fn } from '@storybook/test';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* WordPress dependencies
|
|
@@ -27,8 +28,13 @@ const meta: Meta< typeof UnitControl > = {
|
|
|
27
28
|
value: { control: false },
|
|
28
29
|
},
|
|
29
30
|
tags: [ 'status-experimental' ],
|
|
31
|
+
args: {
|
|
32
|
+
onChange: fn(),
|
|
33
|
+
onUnitChange: fn(),
|
|
34
|
+
onFocus: fn(),
|
|
35
|
+
onBlur: fn(),
|
|
36
|
+
},
|
|
30
37
|
parameters: {
|
|
31
|
-
actions: { argTypesRegex: '^on.*' },
|
|
32
38
|
controls: {
|
|
33
39
|
expanded: true,
|
|
34
40
|
},
|
package/tsconfig.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"src/**/*.ios.js",
|
|
35
35
|
"src/**/*.native.js",
|
|
36
36
|
"src/**/react-native-*",
|
|
37
|
-
"src/**/stories/**/*.
|
|
37
|
+
"src/**/stories/**/*.jsx", // only exclude js files, tsx files should be checked
|
|
38
38
|
"src/**/test/**/*.js" // only exclude js files, ts{x} files should be checked
|
|
39
39
|
]
|
|
40
40
|
}
|