@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.
- package/CHANGELOG.md +6 -1
- package/build/animation/index.js +0 -6
- package/build/animation/index.js.map +1 -1
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/index.js +0 -6
- package/build/index.js.map +1 -1
- package/build/range-control/mark.js +0 -1
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +33 -45
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/tree-grid/cell.js +4 -1
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/types.js.map +1 -1
- package/build-module/animation/index.js +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/range-control/mark.js +0 -1
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +33 -45
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/tree-grid/cell.js +4 -1
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/types.js.map +1 -1
- package/build-style/style-rtl.css +3 -3
- package/build-style/style.css +3 -3
- package/build-types/alignment-matrix-control/styles.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/animation/index.d.ts +1 -1
- package/build-types/animation/index.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +4 -4
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +83 -83
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +93 -93
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +83 -83
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +83 -83
- package/build-types/border-control/border-control/hook.d.ts +83 -83
- package/build-types/border-control/border-control-dropdown/hook.d.ts +83 -83
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +816 -816
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +83 -83
- package/build-types/card/card-body/hook.d.ts +83 -83
- package/build-types/card/card-divider/hook.d.ts +84 -84
- package/build-types/card/card-footer/hook.d.ts +83 -83
- package/build-types/card/card-header/hook.d.ts +83 -83
- package/build-types/card/card-media/hook.d.ts +83 -83
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/index.d.ts.map +1 -1
- package/build-types/context/constants.d.ts.map +1 -1
- package/build-types/context/get-styled-class-name-from-key.d.ts +1 -9
- package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +83 -83
- package/build-types/flex/flex/hook.d.ts +83 -83
- package/build-types/flex/flex-block/hook.d.ts +83 -83
- package/build-types/flex/flex-item/hook.d.ts +83 -83
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +83 -83
- package/build-types/h-stack/hook.d.ts +83 -83
- package/build-types/heading/hook.d.ts +82 -82
- package/build-types/higher-order/with-fallback-styles/index.d.ts +2 -2
- package/build-types/higher-order/with-filters/index.d.ts +4 -4
- package/build-types/index.d.ts +1 -1
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +83 -83
- package/build-types/item-group/item-group/hook.d.ts +83 -83
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +92 -92
- package/build-types/navigator/navigator-button/hook.d.ts +92 -92
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +83 -83
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +83 -83
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +83 -83
- package/build-types/text/hook.d.ts +83 -83
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +83 -83
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +83 -83
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +83 -83
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/types.d.ts +1 -1
- package/build-types/tree-grid/types.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +83 -83
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/build-types/utils/rtl.d.ts +1 -1
- package/build-types/utils/rtl.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +83 -83
- package/build-types/z-stack/styles.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/alignment-matrix-control/stories/index.story.tsx +2 -2
- package/src/angle-picker-control/stories/index.story.tsx +2 -2
- package/src/animation/index.tsx +0 -1
- package/src/base-control/stories/index.story.tsx +1 -1
- package/src/border-box-control/stories/index.story.tsx +1 -1
- package/src/border-control/stories/index.story.tsx +1 -1
- package/src/box-control/stories/index.story.tsx +1 -1
- package/src/button-group/stories/index.story.tsx +1 -1
- package/src/card/stories/index.story.tsx +2 -2
- package/src/checkbox-control/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/stories/index.story.tsx +2 -2
- package/src/color-palette/stories/index.story.tsx +3 -3
- package/src/color-picker/stories/index.story.tsx +2 -2
- package/src/combobox-control/stories/index.story.tsx +1 -1
- package/src/composite/stories/index.story.tsx +3 -3
- package/src/confirm-dialog/stories/index.story.tsx +1 -1
- package/src/custom-select-control/stories/index.story.tsx +2 -2
- package/src/custom-select-control-v2/stories/index.story.tsx +2 -2
- package/src/date-time/stories/date-time.story.tsx +4 -1
- package/src/date-time/stories/date.story.tsx +4 -1
- package/src/date-time/stories/time.story.tsx +4 -1
- package/src/dimension-control/stories/index.story.tsx +1 -1
- package/src/disabled/stories/index.story.tsx +3 -3
- package/src/divider/stories/index.story.tsx +1 -1
- package/src/draggable/stories/index.story.tsx +2 -2
- package/src/dropdown/stories/index.story.tsx +7 -7
- package/src/dropdown-menu/index.tsx +3 -1
- package/src/dropdown-menu/stories/index.story.tsx +3 -3
- package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
- package/src/flex/stories/index.story.tsx +1 -1
- package/src/font-size-picker/stories/index.story.tsx +1 -1
- package/src/form-file-upload/stories/index.story.tsx +3 -3
- package/src/form-token-field/stories/index.story.tsx +2 -2
- package/src/gradient-picker/stories/index.story.tsx +1 -1
- package/src/grid/stories/index.story.tsx +1 -1
- package/src/h-stack/stories/index.story.tsx +2 -2
- package/src/index.ts +1 -5
- package/src/input-control/stories/index.story.tsx +4 -4
- package/src/item-group/stories/index.story.tsx +2 -2
- package/src/menu/stories/index.story.tsx +2 -2
- package/src/menu-group/stories/index.story.tsx +1 -1
- package/src/menu-item/stories/index.story.tsx +1 -1
- package/src/menu-items-choice/stories/index.story.tsx +1 -1
- package/src/modal/stories/index.story.tsx +2 -2
- package/src/modal/test/index.tsx +2 -1
- package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
- package/src/navigation/stories/index.story.tsx +4 -4
- package/src/navigator/stories/index.story.tsx +3 -3
- package/src/number-control/stories/index.story.tsx +1 -1
- package/src/panel/stories/index.story.tsx +1 -1
- package/src/placeholder/stories/index.story.tsx +3 -3
- package/src/popover/stories/index.story.tsx +11 -9
- package/src/query-controls/stories/index.story.tsx +6 -6
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/radio-group/stories/index.story.tsx +3 -3
- package/src/range-control/mark.tsx +0 -1
- package/src/range-control/stories/index.story.tsx +7 -7
- package/src/range-control/styles/range-control-styles.ts +18 -19
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/responsive-wrapper/stories/index.story.tsx +1 -1
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scrollable/stories/index.story.tsx +2 -1
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/stories/index.story.tsx +1 -1
- package/src/slot-fill/stories/index.story.tsx +2 -2
- package/src/snackbar/stories/index.story.tsx +4 -4
- package/src/snackbar/stories/list.story.tsx +2 -2
- package/src/surface/stories/index.story.tsx +1 -1
- package/src/text-control/stories/index.story.tsx +1 -1
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/theme/stories/index.story.tsx +1 -1
- package/src/toggle-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/tools-panel/stories/index.story.tsx +3 -3
- package/src/tools-panel/test/index.tsx +0 -17
- package/src/tooltip/stories/index.story.tsx +1 -1
- package/src/tree-grid/cell.tsx +5 -1
- package/src/tree-grid/stories/index.story.tsx +1 -1
- package/src/tree-grid/types.ts +1 -1
- package/src/tree-select/stories/index.story.tsx +1 -1
- package/src/unit-control/stories/index.story.tsx +4 -4
- package/src/view/stories/index.story.tsx +1 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/src/z-stack/stories/index.story.tsx +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -18,9 +18,9 @@ const meta: Meta< typeof ColorPalette > = {
|
|
|
18
18
|
id: 'components-colorpalette',
|
|
19
19
|
component: ColorPalette,
|
|
20
20
|
argTypes: {
|
|
21
|
-
as: { control:
|
|
22
|
-
onChange: { action: 'onChange', control:
|
|
23
|
-
value: { control:
|
|
21
|
+
as: { control: false },
|
|
22
|
+
onChange: { action: 'onChange', control: false },
|
|
23
|
+
value: { control: false },
|
|
24
24
|
},
|
|
25
25
|
parameters: {
|
|
26
26
|
controls: { expanded: true },
|
|
@@ -13,8 +13,8 @@ const meta: Meta< typeof ColorPicker > = {
|
|
|
13
13
|
title: 'Components/Selection & Input/Color/ColorPicker',
|
|
14
14
|
id: 'components-colorpicker',
|
|
15
15
|
argTypes: {
|
|
16
|
-
as: { control:
|
|
17
|
-
color: { control:
|
|
16
|
+
as: { control: false },
|
|
17
|
+
color: { control: false },
|
|
18
18
|
},
|
|
19
19
|
parameters: {
|
|
20
20
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -38,7 +38,7 @@ const meta: Meta< typeof ComboboxControl > = {
|
|
|
38
38
|
id: 'components-comboboxcontrol',
|
|
39
39
|
component: ComboboxControl,
|
|
40
40
|
argTypes: {
|
|
41
|
-
value: { control:
|
|
41
|
+
value: { control: false },
|
|
42
42
|
},
|
|
43
43
|
parameters: {
|
|
44
44
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -36,9 +36,9 @@ const meta: Meta< typeof Composite > = {
|
|
|
36
36
|
'Composite.Context': Composite.Context,
|
|
37
37
|
},
|
|
38
38
|
argTypes: {
|
|
39
|
-
children: { control:
|
|
40
|
-
render: { control:
|
|
41
|
-
setActiveId: { control:
|
|
39
|
+
children: { control: false },
|
|
40
|
+
render: { control: false },
|
|
41
|
+
setActiveId: { control: false },
|
|
42
42
|
focusLoop: {
|
|
43
43
|
control: 'select',
|
|
44
44
|
options: [ true, false, 'horizontal', 'vertical', 'both' ],
|
|
@@ -18,8 +18,8 @@ const meta: Meta< typeof CustomSelectControl > = {
|
|
|
18
18
|
component: CustomSelectControl,
|
|
19
19
|
id: 'components-customselectcontrol',
|
|
20
20
|
argTypes: {
|
|
21
|
-
onChange: { control:
|
|
22
|
-
value: { control:
|
|
21
|
+
onChange: { control: false },
|
|
22
|
+
value: { control: false },
|
|
23
23
|
},
|
|
24
24
|
parameters: {
|
|
25
25
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -22,8 +22,8 @@ const meta: Meta< typeof CustomSelectControlV2 > = {
|
|
|
22
22
|
'CustomSelectControlV2.Item': CustomSelectControlV2.Item,
|
|
23
23
|
},
|
|
24
24
|
argTypes: {
|
|
25
|
-
children: { control:
|
|
26
|
-
value: { control:
|
|
25
|
+
children: { control: false },
|
|
26
|
+
value: { control: false },
|
|
27
27
|
},
|
|
28
28
|
tags: [ 'status-wip' ],
|
|
29
29
|
parameters: {
|
|
@@ -20,7 +20,7 @@ const meta: Meta< typeof DateTimePicker > = {
|
|
|
20
20
|
component: DateTimePicker,
|
|
21
21
|
argTypes: {
|
|
22
22
|
currentDate: { control: 'date' },
|
|
23
|
-
onChange: { action: 'onChange', control:
|
|
23
|
+
onChange: { action: 'onChange', control: false },
|
|
24
24
|
},
|
|
25
25
|
parameters: {
|
|
26
26
|
controls: { expanded: true },
|
|
@@ -51,6 +51,9 @@ const Template: StoryFn< typeof DateTimePicker > = ( {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export const Default: StoryFn< typeof DateTimePicker > = Template.bind( {} );
|
|
54
|
+
Default.args = {
|
|
55
|
+
currentDate: new Date(),
|
|
56
|
+
};
|
|
54
57
|
|
|
55
58
|
export const WithEvents: StoryFn< typeof DateTimePicker > = Template.bind( {} );
|
|
56
59
|
WithEvents.args = {
|
|
@@ -20,7 +20,7 @@ const meta: Meta< typeof DatePicker > = {
|
|
|
20
20
|
component: DatePicker,
|
|
21
21
|
argTypes: {
|
|
22
22
|
currentDate: { control: 'date' },
|
|
23
|
-
onChange: { action: 'onChange', control:
|
|
23
|
+
onChange: { action: 'onChange', control: false },
|
|
24
24
|
},
|
|
25
25
|
parameters: {
|
|
26
26
|
controls: { expanded: true },
|
|
@@ -51,6 +51,9 @@ const Template: StoryFn< typeof DatePicker > = ( {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export const Default: StoryFn< typeof DatePicker > = Template.bind( {} );
|
|
54
|
+
Default.args = {
|
|
55
|
+
currentDate: new Date(),
|
|
56
|
+
};
|
|
54
57
|
|
|
55
58
|
export const WithEvents: StoryFn< typeof DatePicker > = Template.bind( {} );
|
|
56
59
|
WithEvents.args = {
|
|
@@ -21,7 +21,7 @@ const meta: Meta< typeof TimePicker > = {
|
|
|
21
21
|
subcomponents: { 'TimePicker.TimeInput': TimePicker.TimeInput },
|
|
22
22
|
argTypes: {
|
|
23
23
|
currentTime: { control: 'date' },
|
|
24
|
-
onChange: { action: 'onChange', control:
|
|
24
|
+
onChange: { action: 'onChange', control: false },
|
|
25
25
|
},
|
|
26
26
|
parameters: {
|
|
27
27
|
controls: { expanded: true },
|
|
@@ -52,6 +52,9 @@ const Template: StoryFn< typeof TimePicker > = ( {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
export const Default: StoryFn< typeof TimePicker > = Template.bind( {} );
|
|
55
|
+
Default.args = {
|
|
56
|
+
currentTime: new Date(),
|
|
57
|
+
};
|
|
55
58
|
|
|
56
59
|
const TimeInputTemplate: StoryFn< typeof TimePicker.TimeInput > = ( args ) => {
|
|
57
60
|
return <TimePicker.TimeInput { ...args } />;
|
|
@@ -24,7 +24,7 @@ const meta: Meta< typeof DimensionControl > = {
|
|
|
24
24
|
id: 'components-dimensioncontrol',
|
|
25
25
|
argTypes: {
|
|
26
26
|
onChange: { action: 'onChange' },
|
|
27
|
-
value: { control:
|
|
27
|
+
value: { control: false },
|
|
28
28
|
icon: {
|
|
29
29
|
control: { type: 'select' },
|
|
30
30
|
options: [ '-', 'desktop', 'tablet', 'mobile' ],
|
|
@@ -22,8 +22,8 @@ const meta: Meta< typeof Disabled > = {
|
|
|
22
22
|
id: 'components-disabled',
|
|
23
23
|
component: Disabled,
|
|
24
24
|
argTypes: {
|
|
25
|
-
as: { control:
|
|
26
|
-
children: { control:
|
|
25
|
+
as: { control: false },
|
|
26
|
+
children: { control: false },
|
|
27
27
|
},
|
|
28
28
|
parameters: {
|
|
29
29
|
controls: {
|
|
@@ -82,7 +82,7 @@ Default.args = {
|
|
|
82
82
|
export const ContentEditable: StoryFn< typeof Disabled > = ( args ) => {
|
|
83
83
|
return (
|
|
84
84
|
<Disabled { ...args }>
|
|
85
|
-
<div contentEditable tabIndex={ 0 }>
|
|
85
|
+
<div contentEditable tabIndex={ 0 } suppressContentEditableWarning>
|
|
86
86
|
contentEditable
|
|
87
87
|
</div>
|
|
88
88
|
</Disabled>
|
|
@@ -21,8 +21,8 @@ const meta: Meta< typeof Draggable > = {
|
|
|
21
21
|
title: 'Components/Utilities/Draggable',
|
|
22
22
|
id: 'components-draggable',
|
|
23
23
|
argTypes: {
|
|
24
|
-
elementId: { control:
|
|
25
|
-
__experimentalDragComponent: { control:
|
|
24
|
+
elementId: { control: false },
|
|
25
|
+
__experimentalDragComponent: { control: false },
|
|
26
26
|
},
|
|
27
27
|
parameters: {
|
|
28
28
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -25,13 +25,13 @@ const meta: Meta< typeof Dropdown > = {
|
|
|
25
25
|
type: 'radio',
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
|
-
position: { control:
|
|
29
|
-
renderContent: { control:
|
|
30
|
-
renderToggle: { control:
|
|
31
|
-
open: { control:
|
|
32
|
-
defaultOpen: { control:
|
|
33
|
-
onToggle: { control:
|
|
34
|
-
onClose: { control:
|
|
28
|
+
position: { control: false },
|
|
29
|
+
renderContent: { control: false },
|
|
30
|
+
renderToggle: { control: false },
|
|
31
|
+
open: { control: false },
|
|
32
|
+
defaultOpen: { control: false },
|
|
33
|
+
onToggle: { control: false },
|
|
34
|
+
onClose: { control: false },
|
|
35
35
|
},
|
|
36
36
|
parameters: {
|
|
37
37
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -169,7 +169,9 @@ function UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) {
|
|
|
169
169
|
indexOfSet,
|
|
170
170
|
indexOfControl,
|
|
171
171
|
].join() }
|
|
172
|
-
onClick={ (
|
|
172
|
+
onClick={ (
|
|
173
|
+
event: React.MouseEvent< HTMLButtonElement >
|
|
174
|
+
) => {
|
|
173
175
|
event.stopPropagation();
|
|
174
176
|
props.onClose();
|
|
175
177
|
if ( control.onClick ) {
|
|
@@ -37,9 +37,9 @@ const meta: Meta< typeof DropdownMenu > = {
|
|
|
37
37
|
mapping: { menu, chevronDown, more },
|
|
38
38
|
control: { type: 'select' },
|
|
39
39
|
},
|
|
40
|
-
open: { control:
|
|
41
|
-
defaultOpen: { control:
|
|
42
|
-
onToggle: { control:
|
|
40
|
+
open: { control: false },
|
|
41
|
+
defaultOpen: { control: false },
|
|
42
|
+
onToggle: { control: false },
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
export default meta;
|
|
@@ -17,7 +17,7 @@ const meta: Meta< typeof Flex > = {
|
|
|
17
17
|
argTypes: {
|
|
18
18
|
align: { control: { type: 'text' } },
|
|
19
19
|
as: { control: { type: 'text' } },
|
|
20
|
-
children: { control:
|
|
20
|
+
children: { control: false },
|
|
21
21
|
gap: { control: { type: 'text' } },
|
|
22
22
|
justify: { control: { type: 'text' } },
|
|
23
23
|
// Disabled isReversed because it's deprecated.
|
|
@@ -17,7 +17,7 @@ const meta: Meta< typeof FontSizePicker > = {
|
|
|
17
17
|
title: 'Components/FontSizePicker',
|
|
18
18
|
component: FontSizePicker,
|
|
19
19
|
argTypes: {
|
|
20
|
-
value: { control:
|
|
20
|
+
value: { control: false },
|
|
21
21
|
},
|
|
22
22
|
parameters: {
|
|
23
23
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -18,9 +18,9 @@ const meta: Meta< typeof FormFileUpload > = {
|
|
|
18
18
|
id: 'components-formfileupload',
|
|
19
19
|
component: FormFileUpload,
|
|
20
20
|
argTypes: {
|
|
21
|
-
icon: { control:
|
|
22
|
-
onChange: { action: 'onChange', control:
|
|
23
|
-
onClick: { control:
|
|
21
|
+
icon: { control: false },
|
|
22
|
+
onChange: { action: 'onChange', control: false },
|
|
23
|
+
onClick: { control: false },
|
|
24
24
|
},
|
|
25
25
|
parameters: {
|
|
26
26
|
controls: { expanded: true },
|
|
@@ -19,10 +19,10 @@ const meta: Meta< typeof FormTokenField > = {
|
|
|
19
19
|
id: 'components-formtokenfield',
|
|
20
20
|
argTypes: {
|
|
21
21
|
value: {
|
|
22
|
-
control:
|
|
22
|
+
control: false,
|
|
23
23
|
},
|
|
24
24
|
__experimentalValidateInput: {
|
|
25
|
-
control:
|
|
25
|
+
control: false,
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
parameters: {
|
|
@@ -15,7 +15,7 @@ const meta: Meta< typeof Grid > = {
|
|
|
15
15
|
argTypes: {
|
|
16
16
|
as: { control: { type: 'text' } },
|
|
17
17
|
align: { control: { type: 'text' } },
|
|
18
|
-
children: { control:
|
|
18
|
+
children: { control: false },
|
|
19
19
|
columnGap: { control: { type: 'text' } },
|
|
20
20
|
columns: {
|
|
21
21
|
table: { type: { summary: 'number' } },
|
|
@@ -46,10 +46,10 @@ const meta: Meta< typeof HStack > = {
|
|
|
46
46
|
id: 'components-experimental-hstack',
|
|
47
47
|
argTypes: {
|
|
48
48
|
as: {
|
|
49
|
-
control:
|
|
49
|
+
control: false,
|
|
50
50
|
},
|
|
51
51
|
children: {
|
|
52
|
-
control:
|
|
52
|
+
control: false,
|
|
53
53
|
},
|
|
54
54
|
alignment: {
|
|
55
55
|
control: { type: 'select' },
|
package/src/index.ts
CHANGED
|
@@ -21,11 +21,7 @@ export {
|
|
|
21
21
|
default as Animate,
|
|
22
22
|
getAnimateClassName as __unstableGetAnimateClassName,
|
|
23
23
|
} from './animate';
|
|
24
|
-
export {
|
|
25
|
-
__unstableMotion,
|
|
26
|
-
__unstableAnimatePresence,
|
|
27
|
-
__unstableMotionContext,
|
|
28
|
-
} from './animation';
|
|
24
|
+
export { __unstableMotion, __unstableAnimatePresence } from './animation';
|
|
29
25
|
export { default as AnglePickerControl } from './angle-picker-control';
|
|
30
26
|
export {
|
|
31
27
|
default as Autocomplete,
|
|
@@ -23,10 +23,10 @@ const meta: Meta< typeof InputControl > = {
|
|
|
23
23
|
subcomponents: { InputControlPrefixWrapper, InputControlSuffixWrapper },
|
|
24
24
|
argTypes: {
|
|
25
25
|
__unstableInputWidth: { control: { type: 'text' } },
|
|
26
|
-
__unstableStateReducer: { control:
|
|
27
|
-
onChange: { control:
|
|
28
|
-
prefix: { control:
|
|
29
|
-
suffix: { control:
|
|
26
|
+
__unstableStateReducer: { control: false },
|
|
27
|
+
onChange: { control: false },
|
|
28
|
+
prefix: { control: false },
|
|
29
|
+
suffix: { control: false },
|
|
30
30
|
type: { control: { type: 'text' } },
|
|
31
31
|
value: { control: { disable: true } },
|
|
32
32
|
},
|
|
@@ -17,8 +17,8 @@ const meta: Meta< typeof ItemGroup > = {
|
|
|
17
17
|
subcomponents: { Item },
|
|
18
18
|
title: 'Components (Experimental)/ItemGroup',
|
|
19
19
|
argTypes: {
|
|
20
|
-
as: { control:
|
|
21
|
-
children: { control:
|
|
20
|
+
as: { control: false },
|
|
21
|
+
children: { control: false },
|
|
22
22
|
},
|
|
23
23
|
parameters: {
|
|
24
24
|
controls: { expanded: true },
|
|
@@ -46,8 +46,8 @@ const meta: Meta< typeof Menu > = {
|
|
|
46
46
|
ItemHelpText: Menu.ItemHelpText,
|
|
47
47
|
},
|
|
48
48
|
argTypes: {
|
|
49
|
-
children: { control:
|
|
50
|
-
trigger: { control:
|
|
49
|
+
children: { control: false },
|
|
50
|
+
trigger: { control: false },
|
|
51
51
|
},
|
|
52
52
|
tags: [ 'status-private' ],
|
|
53
53
|
parameters: {
|
|
@@ -20,7 +20,7 @@ const meta: Meta< typeof MenuItem > = {
|
|
|
20
20
|
title: 'Components/Actions/MenuItem',
|
|
21
21
|
id: 'components-menuitem',
|
|
22
22
|
argTypes: {
|
|
23
|
-
children: { control:
|
|
23
|
+
children: { control: false },
|
|
24
24
|
icon: {
|
|
25
25
|
control: { type: 'select' },
|
|
26
26
|
options: [ 'check', 'link', 'more' ],
|
|
@@ -23,10 +23,10 @@ const meta: Meta< typeof Modal > = {
|
|
|
23
23
|
id: 'components-modal',
|
|
24
24
|
argTypes: {
|
|
25
25
|
children: {
|
|
26
|
-
control:
|
|
26
|
+
control: false,
|
|
27
27
|
},
|
|
28
28
|
onKeyDown: {
|
|
29
|
-
control:
|
|
29
|
+
control: false,
|
|
30
30
|
},
|
|
31
31
|
focusOnMount: {
|
|
32
32
|
options: [ true, false, 'firstElement', 'firstContentElement' ],
|
package/src/modal/test/index.tsx
CHANGED
|
@@ -269,7 +269,8 @@ describe( 'Modal', () => {
|
|
|
269
269
|
} );
|
|
270
270
|
|
|
271
271
|
describe( 'Focus handling', () => {
|
|
272
|
-
|
|
272
|
+
const originalGetClientRects =
|
|
273
|
+
window.HTMLElement.prototype.getClientRects;
|
|
273
274
|
|
|
274
275
|
const FocusMountDemo = ( {
|
|
275
276
|
focusOnMount,
|
|
@@ -13,7 +13,7 @@ const meta: Meta< typeof NavigableMenu > = {
|
|
|
13
13
|
id: 'components-navigablemenu',
|
|
14
14
|
component: NavigableMenu,
|
|
15
15
|
argTypes: {
|
|
16
|
-
children: { control:
|
|
16
|
+
children: { control: false },
|
|
17
17
|
},
|
|
18
18
|
parameters: {
|
|
19
19
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -13,7 +13,7 @@ const meta: Meta< typeof TabbableContainer > = {
|
|
|
13
13
|
id: 'components-tabbablecontainer',
|
|
14
14
|
component: TabbableContainer,
|
|
15
15
|
argTypes: {
|
|
16
|
-
children: { control:
|
|
16
|
+
children: { control: false },
|
|
17
17
|
},
|
|
18
18
|
parameters: {
|
|
19
19
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -39,10 +39,10 @@ const meta: Meta< typeof Navigation > = {
|
|
|
39
39
|
NavigationMenu,
|
|
40
40
|
},
|
|
41
41
|
argTypes: {
|
|
42
|
-
activeItem: { control:
|
|
43
|
-
activeMenu: { control:
|
|
44
|
-
children: { control:
|
|
45
|
-
onActivateMenu: { control:
|
|
42
|
+
activeItem: { control: false },
|
|
43
|
+
activeMenu: { control: false },
|
|
44
|
+
children: { control: false },
|
|
45
|
+
onActivateMenu: { control: false },
|
|
46
46
|
},
|
|
47
47
|
parameters: {
|
|
48
48
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -24,9 +24,9 @@ const meta: Meta< typeof Navigator > = {
|
|
|
24
24
|
title: 'Components/Navigation/Navigator',
|
|
25
25
|
id: 'components-navigator',
|
|
26
26
|
argTypes: {
|
|
27
|
-
as: { control:
|
|
28
|
-
children: { control:
|
|
29
|
-
initialPath: { control:
|
|
27
|
+
as: { control: false },
|
|
28
|
+
children: { control: false },
|
|
29
|
+
initialPath: { control: false },
|
|
30
30
|
},
|
|
31
31
|
parameters: {
|
|
32
32
|
controls: { expanded: true },
|
|
@@ -23,7 +23,7 @@ const meta: Meta< typeof NumberControl > = {
|
|
|
23
23
|
step: { control: { type: 'text' } },
|
|
24
24
|
suffix: { control: { type: 'text' } },
|
|
25
25
|
type: { control: { type: 'text' } },
|
|
26
|
-
value: { control:
|
|
26
|
+
value: { control: false },
|
|
27
27
|
},
|
|
28
28
|
parameters: {
|
|
29
29
|
controls: { expanded: true },
|
|
@@ -23,7 +23,7 @@ const meta: Meta< typeof Panel > = {
|
|
|
23
23
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
24
24
|
subcomponents: { PanelRow, PanelBody },
|
|
25
25
|
argTypes: {
|
|
26
|
-
children: { control:
|
|
26
|
+
children: { control: false },
|
|
27
27
|
},
|
|
28
28
|
parameters: {
|
|
29
29
|
controls: { expanded: true },
|
|
@@ -21,9 +21,9 @@ const meta: Meta< typeof Placeholder > = {
|
|
|
21
21
|
component: Placeholder,
|
|
22
22
|
title: 'Components/Placeholder',
|
|
23
23
|
argTypes: {
|
|
24
|
-
children: { control:
|
|
25
|
-
notices: { control:
|
|
26
|
-
preview: { control:
|
|
24
|
+
children: { control: false },
|
|
25
|
+
notices: { control: false },
|
|
26
|
+
preview: { control: false },
|
|
27
27
|
icon: {
|
|
28
28
|
control: { type: 'select' },
|
|
29
29
|
options: Object.keys( ICONS ),
|
|
@@ -37,18 +37,18 @@ const meta: Meta< typeof Popover > = {
|
|
|
37
37
|
id: 'components-popover',
|
|
38
38
|
component: Popover,
|
|
39
39
|
argTypes: {
|
|
40
|
-
anchor: { control:
|
|
41
|
-
anchorRef: { control:
|
|
42
|
-
anchorRect: { control:
|
|
43
|
-
children: { control:
|
|
40
|
+
anchor: { control: false },
|
|
41
|
+
anchorRef: { control: false },
|
|
42
|
+
anchorRect: { control: false },
|
|
43
|
+
children: { control: false },
|
|
44
44
|
focusOnMount: {
|
|
45
45
|
control: { type: 'select' },
|
|
46
46
|
options: [ 'firstElement', true, false ],
|
|
47
47
|
},
|
|
48
|
-
getAnchorRect: { control:
|
|
48
|
+
getAnchorRect: { control: false },
|
|
49
49
|
onClose: { action: 'onClose' },
|
|
50
50
|
onFocusOutside: { action: 'onFocusOutside' },
|
|
51
|
-
__unstableSlotName: { control:
|
|
51
|
+
__unstableSlotName: { control: false },
|
|
52
52
|
},
|
|
53
53
|
parameters: {
|
|
54
54
|
controls: { expanded: true },
|
|
@@ -58,7 +58,9 @@ const meta: Meta< typeof Popover > = {
|
|
|
58
58
|
export default meta;
|
|
59
59
|
|
|
60
60
|
const PopoverWithAnchor = ( args: PopoverProps ) => {
|
|
61
|
-
const
|
|
61
|
+
const [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(
|
|
62
|
+
null
|
|
63
|
+
);
|
|
62
64
|
|
|
63
65
|
return (
|
|
64
66
|
<div
|
|
@@ -71,11 +73,11 @@ const PopoverWithAnchor = ( args: PopoverProps ) => {
|
|
|
71
73
|
>
|
|
72
74
|
<p
|
|
73
75
|
style={ { padding: '8px', background: 'salmon' } }
|
|
74
|
-
ref={
|
|
76
|
+
ref={ setPopoverAnchor }
|
|
75
77
|
>
|
|
76
78
|
Popover's anchor
|
|
77
79
|
</p>
|
|
78
|
-
<Popover { ...args }
|
|
80
|
+
<Popover { ...args } anchor={ popoverAnchor } />
|
|
79
81
|
</div>
|
|
80
82
|
);
|
|
81
83
|
};
|
|
@@ -22,12 +22,12 @@ const meta: Meta< typeof QueryControls > = {
|
|
|
22
22
|
title: 'Components/QueryControls',
|
|
23
23
|
component: QueryControls,
|
|
24
24
|
argTypes: {
|
|
25
|
-
numberOfItems: { control:
|
|
26
|
-
order: { control:
|
|
27
|
-
orderBy: { control:
|
|
28
|
-
selectedAuthorId: { control:
|
|
29
|
-
selectedCategories: { control:
|
|
30
|
-
selectedCategoryId: { control:
|
|
25
|
+
numberOfItems: { control: false },
|
|
26
|
+
order: { control: false },
|
|
27
|
+
orderBy: { control: false },
|
|
28
|
+
selectedAuthorId: { control: false },
|
|
29
|
+
selectedCategories: { control: false },
|
|
30
|
+
selectedCategoryId: { control: false },
|
|
31
31
|
},
|
|
32
32
|
parameters: {
|
|
33
33
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -21,8 +21,8 @@ const meta: Meta< typeof RadioGroup > = {
|
|
|
21
21
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
22
22
|
subcomponents: { Radio },
|
|
23
23
|
argTypes: {
|
|
24
|
-
onChange: { control:
|
|
25
|
-
children: { control:
|
|
24
|
+
onChange: { control: false },
|
|
25
|
+
children: { control: false },
|
|
26
26
|
checked: { control: { type: 'text' } },
|
|
27
27
|
},
|
|
28
28
|
parameters: {
|
|
@@ -99,5 +99,5 @@ Controlled.args = {
|
|
|
99
99
|
id: 'controlled-radiogroup',
|
|
100
100
|
};
|
|
101
101
|
Controlled.argTypes = {
|
|
102
|
-
checked: { control:
|
|
102
|
+
checked: { control: false },
|
|
103
103
|
};
|