@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.
Files changed (102) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/build/date-time/date/index.js +5 -5
  3. package/build/date-time/date/index.js.map +2 -2
  4. package/build/date-time/utils.js +3 -1
  5. package/build/date-time/utils.js.map +2 -2
  6. package/build/external-link/index.js +1 -1
  7. package/build/external-link/index.js.map +2 -2
  8. package/build-module/date-time/date/index.js +6 -6
  9. package/build-module/date-time/date/index.js.map +2 -2
  10. package/build-module/date-time/utils.js +3 -1
  11. package/build-module/date-time/utils.js.map +2 -2
  12. package/build-module/external-link/index.js +2 -2
  13. package/build-module/external-link/index.js.map +2 -2
  14. package/build-style/style-rtl.css +8 -0
  15. package/build-style/style.css +8 -0
  16. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  17. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  18. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  19. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  20. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  21. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  22. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  23. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  24. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  25. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  26. package/build-types/date-time/date/index.d.ts.map +1 -1
  27. package/build-types/date-time/date-time/test/index.d.ts +2 -0
  28. package/build-types/date-time/date-time/test/index.d.ts.map +1 -0
  29. package/build-types/date-time/test/utils.test.d.ts +2 -0
  30. package/build-types/date-time/test/utils.test.d.ts.map +1 -0
  31. package/build-types/date-time/utils.d.ts +3 -2
  32. package/build-types/date-time/utils.d.ts.map +1 -1
  33. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  34. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  35. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  36. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  37. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  38. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  39. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  40. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  41. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  42. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  43. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  44. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  45. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  46. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  47. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  48. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  49. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  50. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  51. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  52. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  53. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  54. package/build-types/text/stories/index.story.d.ts.map +1 -1
  55. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  56. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  57. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  58. package/package.json +24 -20
  59. package/src/alignment-matrix-control/stories/index.story.tsx +4 -1
  60. package/src/angle-picker-control/stories/index.story.tsx +4 -1
  61. package/src/box-control/stories/index.story.tsx +4 -1
  62. package/src/circular-option-picker/stories/index.story.tsx +0 -1
  63. package/src/color-picker/stories/index.story.tsx +4 -1
  64. package/src/combobox-control/stories/index.story.tsx +5 -1
  65. package/src/confirm-dialog/stories/index.story.tsx +5 -1
  66. package/src/custom-gradient-picker/stories/index.story.tsx +4 -1
  67. package/src/custom-select-control/stories/index.story.tsx +4 -1
  68. package/src/custom-select-control-v2/stories/index.story.tsx +0 -1
  69. package/src/date-time/date/index.tsx +6 -16
  70. package/src/date-time/date-time/test/index.tsx +206 -0
  71. package/src/date-time/test/utils.test.ts +128 -0
  72. package/src/date-time/utils.ts +12 -3
  73. package/src/draggable/stories/index.story.tsx +6 -1
  74. package/src/drop-zone/stories/index.story.tsx +6 -1
  75. package/src/dropdown/stories/index.story.tsx +5 -1
  76. package/src/dropdown-menu/stories/index.story.tsx +4 -1
  77. package/src/external-link/index.tsx +2 -2
  78. package/src/focal-point-picker/stories/index.story.tsx +7 -1
  79. package/src/font-size-picker/stories/index.story.tsx +4 -1
  80. package/src/gradient-picker/stories/index.story.tsx +5 -1
  81. package/src/input-control/stories/index.story.tsx +7 -1
  82. package/src/menu/stories/index.story.tsx +4 -1
  83. package/src/modal/style.scss +14 -0
  84. package/src/navigable-container/stories/navigable-menu.story.tsx +5 -1
  85. package/src/navigable-container/stories/tabbable-container.story.tsx +5 -1
  86. package/src/navigation/stories/index.story.tsx +4 -1
  87. package/src/notice/stories/index.story.tsx +5 -1
  88. package/src/palette-edit/stories/index.story.tsx +4 -1
  89. package/src/query-controls/stories/index.story.tsx +8 -1
  90. package/src/radio-group/stories/index.story.tsx +4 -1
  91. package/src/range-control/stories/index.story.tsx +8 -1
  92. package/src/sandbox/stories/index.story.tsx +4 -1
  93. package/src/select-control/stories/index.story.tsx +4 -1
  94. package/src/tab-panel/stories/index.story.tsx +0 -1
  95. package/src/tabs/stories/index.story.tsx +0 -1
  96. package/src/text/stories/index.story.tsx +0 -1
  97. package/src/tools-panel/stories/index.story.tsx +4 -1
  98. package/src/tree-grid/stories/index.story.tsx +6 -1
  99. package/src/unit-control/stories/index.story.tsx +7 -1
  100. package/tsconfig.json +1 -1
  101. package/tsconfig.tsbuildinfo +1 -1
  102. /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
  },
@@ -19,7 +19,6 @@ const meta: Meta< typeof TabPanel > = {
19
19
  id: 'components-tabpanel',
20
20
  component: TabPanel,
21
21
  parameters: {
22
- actions: { argTypesRegex: '^on.*' },
23
22
  controls: { expanded: true },
24
23
  docs: { canvas: { sourceState: 'shown' } },
25
24
  },
@@ -35,7 +35,6 @@ const meta: Meta< typeof Tabs > = {
35
35
  },
36
36
  tags: [ 'status-private' ],
37
37
  parameters: {
38
- actions: { argTypesRegex: '^on.*' },
39
38
  controls: { expanded: true },
40
39
  docs: { canvas: { sourceState: 'shown' } },
41
40
  },
@@ -28,7 +28,6 @@ const meta: Meta< typeof Text > = {
28
28
  },
29
29
  tags: [ 'status-experimental' ],
30
30
  parameters: {
31
- actions: { argTypesRegex: '^on.*' },
32
31
  controls: { expanded: true },
33
32
  docs: { canvas: { sourceState: 'shown' } },
34
33
  },
@@ -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/**/*.js", // only exclude js files, tsx files should be checked
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
  }