@wordpress/components 28.14.1-next.cd6172eb0.0 → 29.0.1-next.a9f418477.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 (205) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/build/animation/index.js +0 -6
  3. package/build/animation/index.js.map +1 -1
  4. package/build/dropdown-menu/index.js.map +1 -1
  5. package/build/index.js +0 -6
  6. package/build/index.js.map +1 -1
  7. package/build/range-control/mark.js +0 -1
  8. package/build/range-control/mark.js.map +1 -1
  9. package/build/range-control/styles/range-control-styles.js +33 -45
  10. package/build/range-control/styles/range-control-styles.js.map +1 -1
  11. package/build/tree-grid/cell.js +4 -1
  12. package/build/tree-grid/cell.js.map +1 -1
  13. package/build/tree-grid/types.js.map +1 -1
  14. package/build-module/animation/index.js +1 -1
  15. package/build-module/animation/index.js.map +1 -1
  16. package/build-module/dropdown-menu/index.js.map +1 -1
  17. package/build-module/index.js +1 -1
  18. package/build-module/index.js.map +1 -1
  19. package/build-module/range-control/mark.js +0 -1
  20. package/build-module/range-control/mark.js.map +1 -1
  21. package/build-module/range-control/styles/range-control-styles.js +33 -45
  22. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  23. package/build-module/tree-grid/cell.js +4 -1
  24. package/build-module/tree-grid/cell.js.map +1 -1
  25. package/build-module/tree-grid/types.js.map +1 -1
  26. package/build-style/style-rtl.css +3 -3
  27. package/build-style/style.css +3 -3
  28. package/build-types/alignment-matrix-control/styles.d.ts.map +1 -1
  29. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  30. package/build-types/animation/index.d.ts +1 -1
  31. package/build-types/animation/index.d.ts.map +1 -1
  32. package/build-types/base-control/hooks.d.ts +4 -4
  33. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  34. package/build-types/border-box-control/border-box-control/hook.d.ts +83 -83
  35. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +93 -93
  36. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +83 -83
  37. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +83 -83
  38. package/build-types/border-control/border-control/hook.d.ts +83 -83
  39. package/build-types/border-control/border-control-dropdown/hook.d.ts +83 -83
  40. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  41. package/build-types/box-control/stories/index.story.d.ts +816 -816
  42. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  43. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  44. package/build-types/card/card/hook.d.ts +83 -83
  45. package/build-types/card/card-body/hook.d.ts +83 -83
  46. package/build-types/card/card-divider/hook.d.ts +84 -84
  47. package/build-types/card/card-footer/hook.d.ts +83 -83
  48. package/build-types/card/card-header/hook.d.ts +83 -83
  49. package/build-types/card/card-media/hook.d.ts +83 -83
  50. package/build-types/color-picker/styles.d.ts.map +1 -1
  51. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  52. package/build-types/composite/index.d.ts.map +1 -1
  53. package/build-types/context/constants.d.ts.map +1 -1
  54. package/build-types/context/get-styled-class-name-from-key.d.ts +1 -9
  55. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  56. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  57. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  58. package/build-types/date-time/date/styles.d.ts.map +1 -1
  59. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  60. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  61. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  62. package/build-types/date-time/time/styles.d.ts.map +1 -1
  63. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  64. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  65. package/build-types/elevation/hook.d.ts +83 -83
  66. package/build-types/flex/flex/hook.d.ts +83 -83
  67. package/build-types/flex/flex-block/hook.d.ts +83 -83
  68. package/build-types/flex/flex-item/hook.d.ts +83 -83
  69. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  70. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  71. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  72. package/build-types/grid/hook.d.ts +83 -83
  73. package/build-types/h-stack/hook.d.ts +83 -83
  74. package/build-types/heading/hook.d.ts +82 -82
  75. package/build-types/higher-order/with-fallback-styles/index.d.ts +2 -2
  76. package/build-types/higher-order/with-filters/index.d.ts +4 -4
  77. package/build-types/index.d.ts +1 -1
  78. package/build-types/index.d.ts.map +1 -1
  79. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  80. package/build-types/item-group/item/hook.d.ts +83 -83
  81. package/build-types/item-group/item-group/hook.d.ts +83 -83
  82. package/build-types/menu/styles.d.ts.map +1 -1
  83. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  84. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  85. package/build-types/navigator/navigator-back-button/hook.d.ts +92 -92
  86. package/build-types/navigator/navigator-button/hook.d.ts +92 -92
  87. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  88. package/build-types/progress-bar/styles.d.ts.map +1 -1
  89. package/build-types/range-control/mark.d.ts.map +1 -1
  90. package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
  91. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  92. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  93. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  94. package/build-types/scrollable/hook.d.ts +83 -83
  95. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  96. package/build-types/select-control/index.d.ts.map +1 -1
  97. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  98. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  99. package/build-types/spacer/hook.d.ts +83 -83
  100. package/build-types/spinner/styles.d.ts.map +1 -1
  101. package/build-types/surface/hook.d.ts +83 -83
  102. package/build-types/text/hook.d.ts +83 -83
  103. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  104. package/build-types/tools-panel/tools-panel/hook.d.ts +83 -83
  105. package/build-types/tools-panel/tools-panel-header/hook.d.ts +83 -83
  106. package/build-types/tools-panel/tools-panel-item/hook.d.ts +83 -83
  107. package/build-types/tree-grid/cell.d.ts.map +1 -1
  108. package/build-types/tree-grid/types.d.ts +1 -1
  109. package/build-types/tree-grid/types.d.ts.map +1 -1
  110. package/build-types/truncate/hook.d.ts +83 -83
  111. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  112. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  113. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  114. package/build-types/utils/rtl.d.ts +1 -1
  115. package/build-types/utils/rtl.d.ts.map +1 -1
  116. package/build-types/v-stack/hook.d.ts +83 -83
  117. package/build-types/z-stack/styles.d.ts.map +1 -1
  118. package/package.json +19 -19
  119. package/src/alignment-matrix-control/stories/index.story.tsx +2 -2
  120. package/src/angle-picker-control/stories/index.story.tsx +2 -2
  121. package/src/animation/index.tsx +0 -1
  122. package/src/base-control/stories/index.story.tsx +1 -1
  123. package/src/border-box-control/stories/index.story.tsx +1 -1
  124. package/src/border-control/stories/index.story.tsx +1 -1
  125. package/src/box-control/stories/index.story.tsx +1 -1
  126. package/src/button-group/stories/index.story.tsx +1 -1
  127. package/src/card/stories/index.story.tsx +2 -2
  128. package/src/checkbox-control/stories/index.story.tsx +1 -1
  129. package/src/circular-option-picker/stories/index.story.tsx +2 -2
  130. package/src/color-palette/stories/index.story.tsx +3 -3
  131. package/src/color-picker/stories/index.story.tsx +2 -2
  132. package/src/combobox-control/stories/index.story.tsx +1 -1
  133. package/src/composite/stories/index.story.tsx +3 -3
  134. package/src/confirm-dialog/stories/index.story.tsx +1 -1
  135. package/src/custom-select-control/stories/index.story.tsx +2 -2
  136. package/src/custom-select-control-v2/stories/index.story.tsx +2 -2
  137. package/src/date-time/stories/date-time.story.tsx +4 -1
  138. package/src/date-time/stories/date.story.tsx +4 -1
  139. package/src/date-time/stories/time.story.tsx +4 -1
  140. package/src/dimension-control/stories/index.story.tsx +1 -1
  141. package/src/disabled/stories/index.story.tsx +3 -3
  142. package/src/divider/stories/index.story.tsx +1 -1
  143. package/src/draggable/stories/index.story.tsx +2 -2
  144. package/src/dropdown/stories/index.story.tsx +7 -7
  145. package/src/dropdown-menu/index.tsx +3 -1
  146. package/src/dropdown-menu/stories/index.story.tsx +3 -3
  147. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  148. package/src/flex/stories/index.story.tsx +1 -1
  149. package/src/font-size-picker/stories/index.story.tsx +1 -1
  150. package/src/form-file-upload/stories/index.story.tsx +3 -3
  151. package/src/form-token-field/stories/index.story.tsx +2 -2
  152. package/src/gradient-picker/stories/index.story.tsx +1 -1
  153. package/src/grid/stories/index.story.tsx +1 -1
  154. package/src/h-stack/stories/index.story.tsx +2 -2
  155. package/src/index.ts +1 -5
  156. package/src/input-control/stories/index.story.tsx +4 -4
  157. package/src/item-group/stories/index.story.tsx +2 -2
  158. package/src/menu/stories/index.story.tsx +2 -2
  159. package/src/menu-group/stories/index.story.tsx +1 -1
  160. package/src/menu-item/stories/index.story.tsx +1 -1
  161. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  162. package/src/modal/stories/index.story.tsx +2 -2
  163. package/src/modal/test/index.tsx +2 -1
  164. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  165. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  166. package/src/navigation/stories/index.story.tsx +4 -4
  167. package/src/navigator/stories/index.story.tsx +3 -3
  168. package/src/number-control/stories/index.story.tsx +1 -1
  169. package/src/panel/stories/index.story.tsx +1 -1
  170. package/src/placeholder/stories/index.story.tsx +3 -3
  171. package/src/popover/stories/index.story.tsx +11 -9
  172. package/src/query-controls/stories/index.story.tsx +6 -6
  173. package/src/radio-control/stories/index.story.tsx +1 -1
  174. package/src/radio-group/stories/index.story.tsx +3 -3
  175. package/src/range-control/mark.tsx +0 -1
  176. package/src/range-control/stories/index.story.tsx +7 -7
  177. package/src/range-control/styles/range-control-styles.ts +18 -19
  178. package/src/resizable-box/stories/index.story.tsx +1 -1
  179. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  180. package/src/sandbox/stories/index.story.tsx +1 -1
  181. package/src/scrollable/stories/index.story.tsx +2 -1
  182. package/src/search-control/stories/index.story.tsx +1 -1
  183. package/src/select-control/stories/index.story.tsx +1 -1
  184. package/src/slot-fill/stories/index.story.tsx +2 -2
  185. package/src/snackbar/stories/index.story.tsx +4 -4
  186. package/src/snackbar/stories/list.story.tsx +2 -2
  187. package/src/surface/stories/index.story.tsx +1 -1
  188. package/src/text-control/stories/index.story.tsx +1 -1
  189. package/src/textarea-control/stories/index.story.tsx +1 -1
  190. package/src/theme/stories/index.story.tsx +1 -1
  191. package/src/toggle-control/stories/index.story.tsx +1 -1
  192. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  193. package/src/toolbar/stories/index.story.tsx +1 -1
  194. package/src/tools-panel/stories/index.story.tsx +3 -3
  195. package/src/tools-panel/test/index.tsx +0 -17
  196. package/src/tooltip/stories/index.story.tsx +1 -1
  197. package/src/tree-grid/cell.tsx +5 -1
  198. package/src/tree-grid/stories/index.story.tsx +1 -1
  199. package/src/tree-grid/types.ts +1 -1
  200. package/src/tree-select/stories/index.story.tsx +1 -1
  201. package/src/unit-control/stories/index.story.tsx +4 -4
  202. package/src/view/stories/index.story.tsx +1 -1
  203. package/src/visually-hidden/stories/index.story.tsx +1 -1
  204. package/src/z-stack/stories/index.story.tsx +1 -1
  205. package/tsconfig.tsbuildinfo +1 -1
@@ -33,18 +33,18 @@ const meta: Meta< typeof RangeControl > = {
33
33
  },
34
34
  color: { control: { type: 'color' } },
35
35
  help: { control: { type: 'text' } },
36
- icon: { control: { type: null } },
36
+ icon: { control: false },
37
37
  marks: { control: { type: 'object' } },
38
- onBlur: { control: { type: null } },
39
- onChange: { control: { type: null } },
40
- onFocus: { control: { type: null } },
41
- onMouseLeave: { control: { type: null } },
42
- onMouseMove: { control: { type: null } },
38
+ onBlur: { control: false },
39
+ onChange: { control: false },
40
+ onFocus: { control: false },
41
+ onMouseLeave: { control: false },
42
+ onMouseMove: { control: false },
43
43
  railColor: { control: { type: 'color' } },
44
44
  step: { control: { type: 'number' } },
45
45
  trackColor: { control: { type: 'color' } },
46
46
  type: { control: { type: 'check' }, options: [ 'stepper' ] },
47
- value: { control: { type: null } },
47
+ value: { control: false },
48
48
  },
49
49
  parameters: {
50
50
  actions: { argTypesRegex: '^on.*' },
@@ -130,6 +130,10 @@ export const Track = styled.span`
130
130
  margin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;
131
131
  top: 0;
132
132
 
133
+ @media not ( prefers-reduced-motion ) {
134
+ transition: width ease 0.1s;
135
+ }
136
+
133
137
  ${ trackBackgroundColor };
134
138
  `;
135
139
 
@@ -139,28 +143,18 @@ export const MarksWrapper = styled.span`
139
143
  position: relative;
140
144
  width: 100%;
141
145
  user-select: none;
146
+ margin-top: 17px;
142
147
  `;
143
148
 
144
- const markFill = ( { disabled, isFilled }: RangeMarkProps ) => {
145
- let backgroundColor = isFilled ? 'currentColor' : COLORS.gray[ 300 ];
146
-
147
- if ( disabled ) {
148
- backgroundColor = COLORS.gray[ 400 ];
149
- }
150
-
151
- return css( {
152
- backgroundColor,
153
- } );
154
- };
155
-
156
149
  export const Mark = styled.span`
157
- height: ${ thumbSize }px;
158
- left: 0;
159
150
  position: absolute;
160
- top: 9px;
161
- width: 1px;
162
-
163
- ${ markFill };
151
+ left: 0;
152
+ top: -4px;
153
+ height: 4px;
154
+ width: 2px;
155
+ transform: translateX( -50% );
156
+ background-color: ${ COLORS.ui.background };
157
+ z-index: 1;
164
158
  `;
165
159
 
166
160
  const markLabelFill = ( { isFilled }: RangeMarkProps ) => {
@@ -173,7 +167,7 @@ export const MarkLabel = styled.span`
173
167
  color: ${ COLORS.gray[ 300 ] };
174
168
  font-size: 11px;
175
169
  position: absolute;
176
- top: 22px;
170
+ top: 8px;
177
171
  white-space: nowrap;
178
172
 
179
173
  ${ rtl( { left: 0 } ) };
@@ -207,6 +201,11 @@ export const ThumbWrapper = styled.span`
207
201
  user-select: none;
208
202
  width: ${ thumbSize }px;
209
203
  border-radius: ${ CONFIG.radiusRound };
204
+ z-index: 3;
205
+
206
+ @media not ( prefers-reduced-motion ) {
207
+ transition: left ease 0.1s;
208
+ }
210
209
 
211
210
  ${ thumbColor };
212
211
  ${ rtl( { marginLeft: -10 } ) };
@@ -18,7 +18,7 @@ const meta: Meta< typeof ResizableBox > = {
18
18
  id: 'components-resizablebox',
19
19
  component: ResizableBox,
20
20
  argTypes: {
21
- children: { control: { type: null } },
21
+ children: { control: false },
22
22
  enable: { control: 'object' },
23
23
  onResizeStop: { action: 'onResizeStop' },
24
24
  },
@@ -13,7 +13,7 @@ const meta: Meta< typeof ResponsiveWrapper > = {
13
13
  title: 'Components/Layout/ResponsiveWrapper',
14
14
  id: 'components-responsivewrapper',
15
15
  argTypes: {
16
- children: { control: { type: null } },
16
+ children: { control: false },
17
17
  },
18
18
  parameters: {
19
19
  controls: { expanded: true },
@@ -13,7 +13,7 @@ const meta: Meta< typeof SandBox > = {
13
13
  title: 'Components/Utilities/SandBox',
14
14
  id: 'components-sandbox',
15
15
  argTypes: {
16
- onFocus: { control: { type: null } },
16
+ onFocus: { control: false },
17
17
  },
18
18
  parameters: {
19
19
  actions: { argTypesRegex: '^on.*' },
@@ -22,7 +22,7 @@ const meta: Meta< typeof Scrollable > = {
22
22
  control: { type: 'text' },
23
23
  },
24
24
  children: {
25
- control: { type: null },
25
+ control: false,
26
26
  },
27
27
  },
28
28
  parameters: {
@@ -70,6 +70,7 @@ const Template: StoryFn< typeof Scrollable > = ( { ...args } ) => {
70
70
  } }
71
71
  type="text"
72
72
  value="Focus me"
73
+ readOnly
73
74
  />
74
75
  </View>
75
76
  </Scrollable>
@@ -19,7 +19,7 @@ const meta: Meta< typeof SearchControl > = {
19
19
  component: SearchControl,
20
20
  argTypes: {
21
21
  onChange: { action: 'onChange' },
22
- value: { control: { type: null } },
22
+ value: { control: false },
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
@@ -23,7 +23,7 @@ const meta: Meta< typeof SelectControl > = {
23
23
  label: { control: { type: 'text' } },
24
24
  prefix: { control: { type: 'text' } },
25
25
  suffix: { control: { type: 'text' } },
26
- value: { control: { type: null } },
26
+ value: { control: false },
27
27
  },
28
28
  parameters: {
29
29
  actions: { argTypesRegex: '^on.*' },
@@ -20,9 +20,9 @@ const meta: Meta< typeof Slot > = {
20
20
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
21
21
  subcomponents: { Fill, SlotFillProvider },
22
22
  argTypes: {
23
- name: { control: { type: null } },
23
+ name: { control: false },
24
24
  as: { control: { type: 'text' } },
25
- fillProps: { control: { type: null } },
25
+ fillProps: { control: false },
26
26
  },
27
27
  parameters: {
28
28
  controls: { expanded: true },
@@ -19,17 +19,17 @@ const meta: Meta< typeof Snackbar > = {
19
19
  id: 'components-snackbar',
20
20
  component: Snackbar,
21
21
  argTypes: {
22
- as: { control: { type: null } },
22
+ as: { control: false },
23
23
  onRemove: {
24
24
  action: 'onRemove',
25
- control: { type: null },
25
+ control: false,
26
26
  },
27
27
  onDismiss: {
28
28
  action: 'onDismiss',
29
- control: { type: null },
29
+ control: false,
30
30
  },
31
31
  listRef: {
32
- control: { type: null },
32
+ control: false,
33
33
  },
34
34
  },
35
35
  parameters: {
@@ -18,10 +18,10 @@ const meta: Meta< typeof SnackbarList > = {
18
18
  id: 'components-snackbarlist',
19
19
  component: SnackbarList,
20
20
  argTypes: {
21
- as: { control: { type: null } },
21
+ as: { control: false },
22
22
  onRemove: {
23
23
  action: 'onRemove',
24
- control: { type: null },
24
+ control: false,
25
25
  },
26
26
  },
27
27
  parameters: {
@@ -13,7 +13,7 @@ const meta: Meta< typeof Surface > = {
13
13
  component: Surface,
14
14
  title: 'Components (Experimental)/Surface',
15
15
  argTypes: {
16
- children: { control: { type: null } },
16
+ children: { control: false },
17
17
  as: { control: { type: 'text' } },
18
18
  },
19
19
  parameters: {
@@ -21,7 +21,7 @@ const meta: Meta< typeof TextControl > = {
21
21
  help: { control: { type: 'text' } },
22
22
  label: { control: { type: 'text' } },
23
23
  onChange: { action: 'onChange' },
24
- value: { control: { type: null } },
24
+ value: { control: false },
25
25
  },
26
26
  parameters: {
27
27
  controls: {
@@ -21,7 +21,7 @@ const meta: Meta< typeof TextareaControl > = {
21
21
  onChange: { action: 'onChange' },
22
22
  label: { control: { type: 'text' } },
23
23
  help: { control: { type: 'text' } },
24
- value: { control: { type: null } },
24
+ value: { control: false },
25
25
  },
26
26
  parameters: {
27
27
  controls: {
@@ -37,7 +37,7 @@ export const Default = Template.bind( {} );
37
37
  Default.args = {};
38
38
 
39
39
  export const Nested: StoryFn< typeof Theme > = ( args ) => (
40
- <Theme accent="tomato">
40
+ <Theme accent="crimson">
41
41
  <Button variant="primary">Outer theme (hardcoded)</Button>
42
42
 
43
43
  <Theme { ...args }>
@@ -18,7 +18,7 @@ const meta: Meta< typeof ToggleControl > = {
18
18
  id: 'components-togglecontrol',
19
19
  component: ToggleControl,
20
20
  argTypes: {
21
- checked: { control: { type: null } },
21
+ checked: { control: false },
22
22
  help: { control: { type: 'text' } },
23
23
  label: { control: { type: 'text' } },
24
24
  onChange: { action: 'onChange' },
@@ -32,7 +32,7 @@ const meta: Meta< typeof ToggleGroupControl > = {
32
32
  argTypes: {
33
33
  help: { control: { type: 'text' } },
34
34
  onChange: { action: 'onChange' },
35
- value: { control: { type: null } },
35
+ value: { control: false },
36
36
  },
37
37
  parameters: {
38
38
  controls: { expanded: true },
@@ -51,7 +51,7 @@ const meta: Meta< typeof Toolbar > = {
51
51
  ToolbarDropdownMenu,
52
52
  },
53
53
  argTypes: {
54
- children: { control: { type: null } },
54
+ children: { control: false },
55
55
  variant: {
56
56
  options: [ undefined, 'unstyled' ],
57
57
  control: { type: 'radio' },
@@ -31,9 +31,9 @@ const meta: Meta< typeof ToolsPanel > = {
31
31
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
32
32
  subcomponents: { ToolsPanelItem },
33
33
  argTypes: {
34
- as: { control: { type: null } },
35
- children: { control: { type: null } },
36
- panelId: { control: { type: null } },
34
+ as: { control: false },
35
+ children: { control: false },
36
+ panelId: { control: false },
37
37
  resetAll: { action: 'resetAll' },
38
38
  },
39
39
  parameters: {
@@ -154,7 +154,6 @@ const renderWrappedItemInPanel = () => {
154
154
  const renderPanel = () => {
155
155
  return render(
156
156
  <ToolsPanel { ...defaultProps }>
157
- { false && <div>Hidden</div> }
158
157
  <ToolsPanelItem { ...controlProps }>
159
158
  <div>Example control</div>
160
159
  </ToolsPanelItem>
@@ -236,22 +235,6 @@ describe( 'ToolsPanel', () => {
236
235
  it( 'should not render panel menu when there are no panel items', () => {
237
236
  render(
238
237
  <ToolsPanel { ...defaultProps }>
239
- { false && (
240
- <ToolsPanelItem
241
- label="Not rendered 1"
242
- hasValue={ () => false }
243
- >
244
- Should not show
245
- </ToolsPanelItem>
246
- ) }
247
- { false && (
248
- <ToolsPanelItem
249
- label="Not rendered 2"
250
- hasValue={ () => false }
251
- >
252
- Not shown either
253
- </ToolsPanelItem>
254
- ) }
255
238
  <span>Visible but insignificant</span>
256
239
  </ToolsPanel>
257
240
  );
@@ -19,7 +19,7 @@ const meta: Meta< typeof Tooltip > = {
19
19
  id: 'components-tooltip',
20
20
  component: Tooltip,
21
21
  argTypes: {
22
- children: { control: { type: null } },
22
+ children: { control: false },
23
23
  position: {
24
24
  control: { type: 'select' },
25
25
  options: [
@@ -21,7 +21,11 @@ function UnforwardedTreeGridCell(
21
21
  return (
22
22
  <td { ...props } role="gridcell">
23
23
  { withoutGridItem ? (
24
- <>{ children }</>
24
+ <>
25
+ { typeof children === 'function'
26
+ ? children( { ...props, ref } )
27
+ : children }
28
+ </>
25
29
  ) : (
26
30
  <TreeGridItem ref={ ref }>{ children }</TreeGridItem>
27
31
  ) }
@@ -22,7 +22,7 @@ const meta: Meta< typeof TreeGrid > = {
22
22
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
23
23
  subcomponents: { TreeGridRow, TreeGridCell },
24
24
  argTypes: {
25
- children: { control: { type: null } },
25
+ children: { control: false },
26
26
  },
27
27
  parameters: {
28
28
  actions: { argTypesRegex: '^on.*' },
@@ -36,7 +36,7 @@ export type TreeGridRowProps = {
36
36
  type RovingTabIndexItemPassThruProps = {
37
37
  ref: React.ForwardedRef< any >;
38
38
  tabIndex?: number;
39
- onFocus: React.FocusEventHandler< any >;
39
+ onFocus?: React.FocusEventHandler< any >;
40
40
  [ key: string ]: any;
41
41
  };
42
42
 
@@ -22,7 +22,7 @@ const meta: Meta< typeof TreeSelect > = {
22
22
  label: { control: { type: 'text' } },
23
23
  prefix: { control: { type: 'text' } },
24
24
  suffix: { control: { type: 'text' } },
25
- selectedId: { control: { type: null } },
25
+ selectedId: { control: false },
26
26
  },
27
27
  parameters: {
28
28
  controls: {
@@ -20,11 +20,11 @@ const meta: Meta< typeof UnitControl > = {
20
20
  id: 'components-experimental-unitcontrol',
21
21
  argTypes: {
22
22
  __unstableInputWidth: { control: { type: 'text' } },
23
- __unstableStateReducer: { control: { type: null } },
24
- onChange: { control: { type: null } },
25
- onUnitChange: { control: { type: null } },
23
+ __unstableStateReducer: { control: false },
24
+ onChange: { control: false },
25
+ onUnitChange: { control: false },
26
26
  prefix: { control: { type: 'text' } },
27
- value: { control: { type: null } },
27
+ value: { control: false },
28
28
  },
29
29
  parameters: {
30
30
  actions: { argTypesRegex: '^on.*' },
@@ -12,7 +12,7 @@ const meta: Meta< typeof View > = {
12
12
  component: View,
13
13
  title: 'Components (Experimental)/View',
14
14
  argTypes: {
15
- as: { control: { type: null } },
15
+ as: { control: false },
16
16
  children: { control: { type: 'text' } },
17
17
  },
18
18
  parameters: {
@@ -13,7 +13,7 @@ const meta: Meta< typeof VisuallyHidden > = {
13
13
  title: 'Components/Typography/VisuallyHidden',
14
14
  id: 'components-visuallyhidden',
15
15
  argTypes: {
16
- children: { control: { type: null } },
16
+ children: { control: false },
17
17
  as: { control: { type: 'text' } },
18
18
  },
19
19
  parameters: {
@@ -16,7 +16,7 @@ const meta: Meta< typeof ZStack > = {
16
16
  title: 'Components (Experimental)/ZStack',
17
17
  argTypes: {
18
18
  as: { control: { type: 'text' } },
19
- children: { control: { type: null } },
19
+ children: { control: false },
20
20
  },
21
21
  parameters: {
22
22
  controls: {