@wordpress/components 27.0.0 → 27.2.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 +50 -2
- package/build/base-control/index.native.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/button/index.js +4 -5
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js.map +1 -1
- package/build/button/types.js.map +1 -1
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build/custom-select-control-v2/index.js +2 -2
- package/build/custom-select-control-v2/index.js.map +1 -1
- package/build/custom-select-control-v2/types.js.map +1 -1
- package/build/date-time/date/styles.js +7 -7
- package/build/date-time/date/styles.js.map +1 -1
- package/build/draggable/index.native.js +2 -2
- package/build/draggable/index.native.js.map +1 -1
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/flex/flex/hook.js +1 -1
- package/build/flex/flex/hook.js.map +1 -1
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/form-token-field/index.js +1 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/h-stack/hook.js +6 -1
- package/build/h-stack/hook.js.map +1 -1
- package/build/input-control/index.js +1 -1
- package/build/input-control/index.js.map +1 -1
- package/build/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js +4 -13
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/palette-edit/index.js +18 -12
- package/build/palette-edit/index.js.map +1 -1
- package/build/query-controls/index.native.js.map +1 -1
- package/build/range-control/index.js.map +1 -1
- package/build/search-control/index.native.js.map +1 -1
- package/build/snackbar/index.js +3 -2
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +2 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/snackbar/types.js.map +1 -1
- package/build/tabs/index.js +7 -7
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/text-control/types.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +4 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/utils/config-values.js +1 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/hooks/index.js +0 -7
- package/build/utils/hooks/index.js.map +1 -1
- package/build/utils/input/base.js +2 -2
- package/build/utils/input/base.js.map +1 -1
- package/build-module/base-control/index.native.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/button/index.js +4 -5
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/button/types.js.map +1 -1
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/index.js +1 -1
- package/build-module/custom-select-control-v2/index.js.map +1 -1
- package/build-module/custom-select-control-v2/types.js.map +1 -1
- package/build-module/date-time/date/styles.js +7 -7
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/draggable/index.native.js +2 -2
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/flex/flex/hook.js +1 -1
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/form-token-field/index.js +1 -1
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/h-stack/hook.js +6 -1
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/input-control/index.js +1 -1
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +6 -15
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/palette-edit/index.js +17 -11
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/snackbar/index.js +3 -2
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +2 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/snackbar/types.js.map +1 -1
- package/build-module/tabs/index.js +7 -7
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/text-control/types.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +4 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/utils/config-values.js +1 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/hooks/index.js +0 -1
- package/build-module/utils/hooks/index.js.map +1 -1
- package/build-module/utils/input/base.js +2 -2
- package/build-module/utils/input/base.js.map +1 -1
- package/build-style/style-rtl.css +33 -23
- package/build-style/style.css +33 -23
- package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
- package/build-types/button/deprecated.d.ts +4 -10
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts +3 -3
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +7 -7
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +37 -8
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +1 -1
- package/build-types/custom-select-control-v2/default-component/index.d.ts +2 -1
- package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/index.d.ts +1 -1
- package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts +2 -0
- package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +1 -0
- package/build-types/custom-select-control-v2/stories/default.story.d.ts +4 -3
- package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +2 -2
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/types.d.ts +0 -1
- package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +1 -0
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +2 -3
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +1 -1
- package/build-types/form-token-field/index.d.ts +1 -1
- package/build-types/h-stack/hook.d.ts +2 -4
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +0 -1
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +1 -2
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +0 -1
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +1 -2
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +0 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
- package/build-types/palette-edit/index.d.ts +6 -3
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +2 -2
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +5 -2
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/snackbar/test/index.d.ts +2 -0
- package/build-types/snackbar/test/index.d.ts.map +1 -0
- package/build-types/snackbar/test/list.d.ts +2 -0
- package/build-types/snackbar/test/list.d.ts.map +1 -0
- package/build-types/snackbar/types.d.ts +18 -2
- package/build-types/snackbar/types.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +1 -1
- package/build-types/tabs/types.d.ts +1 -1
- package/build-types/text-control/index.d.ts +1 -1
- package/build-types/text-control/types.d.ts +1 -1
- package/build-types/text-control/types.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +4 -10
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/utils/hooks/index.d.ts +0 -1
- package/build-types/v-stack/hook.d.ts +2 -4
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/base-control/index.native.js +1 -1
- package/src/base-control/test/index.tsx +1 -1
- package/src/border-box-control/border-box-control/component.tsx +1 -1
- package/src/border-box-control/border-box-control-split-controls/component.tsx +4 -4
- package/src/border-control/border-control-dropdown/component.tsx +1 -1
- package/src/button/index.native.js +1 -1
- package/src/button/index.tsx +3 -4
- package/src/button/style.scss +1 -3
- package/src/button/test/index.tsx +6 -6
- package/src/button/types.ts +37 -9
- package/src/circular-option-picker/test/index.tsx +2 -4
- package/src/combobox-control/test/index.tsx +1 -1
- package/src/confirm-dialog/README.md +7 -0
- package/src/confirm-dialog/component.tsx +1 -1
- package/src/confirm-dialog/test/index.tsx +5 -21
- package/src/custom-select-control-v2/default-component/index.tsx +4 -1
- package/src/custom-select-control-v2/index.tsx +1 -1
- package/src/custom-select-control-v2/legacy-component/test/index.tsx +457 -0
- package/src/custom-select-control-v2/stories/legacy.story.tsx +5 -6
- package/src/custom-select-control-v2/test/index.tsx +279 -749
- package/src/custom-select-control-v2/types.ts +0 -1
- package/src/date-time/date/styles.ts +2 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
- package/src/disabled/test/index.tsx +1 -1
- package/src/draggable/index.native.js +2 -2
- package/src/draggable/test/index.native.js +6 -2
- package/src/dropdown/stories/index.story.tsx +19 -0
- package/src/dropdown/style.scss +26 -0
- package/src/dropdown-menu/index.native.js +2 -2
- package/src/dropdown-menu/style.scss +0 -25
- package/src/flex/flex/README.md +2 -2
- package/src/flex/flex/hook.ts +1 -1
- package/src/font-size-picker/index.native.js +2 -2
- package/src/form-token-field/README.md +1 -1
- package/src/form-token-field/index.tsx +2 -2
- package/src/grid/README.md +11 -11
- package/src/h-stack/README.md +6 -6
- package/src/h-stack/hook.tsx +2 -1
- package/src/h-stack/test/index.tsx +10 -0
- package/src/heading/README.md +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +3 -3
- package/src/input-control/README.md +1 -1
- package/src/input-control/index.tsx +1 -1
- package/src/input-control/stories/index.story.tsx +1 -0
- package/src/item-group/test/__snapshots__/index.js.snap +11 -11
- package/src/item-group/test/index.js +2 -2
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +10 -15
- package/src/mobile/bottom-sheet/button.native.js +1 -5
- package/src/mobile/bottom-sheet/index.native.js +2 -2
- package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +2 -2
- package/src/mobile/bottom-sheet-select-control/README.md +1 -1
- package/src/mobile/bottom-sheet-select-control/index.native.js +1 -1
- package/src/mobile/bottom-sheet-text-control/index.native.js +1 -1
- package/src/mobile/gradient/index.native.js +1 -1
- package/src/mobile/image/index.native.js +8 -23
- package/src/mobile/media-edit/index.native.js +1 -1
- package/src/modal/test/index.tsx +1 -1
- package/src/navigation/stories/utils/hide-if-empty.tsx +2 -6
- package/src/palette-edit/index.tsx +23 -23
- package/src/palette-edit/test/index.tsx +21 -17
- package/src/placeholder/style.scss +5 -1
- package/src/popover/test/index.tsx +1 -4
- package/src/progress-bar/README.md +1 -1
- package/src/query-controls/index.native.js +2 -2
- package/src/radio-control/README.md +3 -3
- package/src/radio-group/stories/index.story.tsx +1 -0
- package/src/range-control/index.tsx +3 -3
- package/src/range-control/test/index.tsx +2 -2
- package/src/resizable-box/resize-tooltip/README.md +2 -2
- package/src/search-control/index.native.js +1 -1
- package/src/snackbar/index.tsx +5 -2
- package/src/snackbar/list.tsx +6 -1
- package/src/snackbar/stories/list.story.tsx +0 -3
- package/src/snackbar/test/index.tsx +267 -0
- package/src/snackbar/test/list.tsx +46 -0
- package/src/snackbar/types.ts +31 -3
- package/src/tabs/README.md +18 -18
- package/src/tabs/index.tsx +7 -7
- package/src/tabs/stories/index.story.tsx +1 -1
- package/src/tabs/test/index.tsx +30 -30
- package/src/tabs/types.ts +1 -1
- package/src/text/test/__snapshots__/index.tsx.snap +3 -3
- package/src/text-control/types.ts +12 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +14 -10
- package/src/toggle-group-control/test/index.tsx +1 -1
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +12 -10
- package/src/tools-panel/stories/index.story.tsx +8 -8
- package/src/tools-panel/test/index.tsx +10 -28
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/src/tooltip/style.scss +2 -1
- package/src/tooltip/test/index.native.js +3 -3
- package/src/tree-grid/test/index.tsx +1 -1
- package/src/truncate/README.md +5 -5
- package/src/utils/config-values.js +1 -1
- package/src/utils/hooks/index.js +0 -1
- package/src/utils/input/base.js +1 -1
- package/src/v-stack/README.md +6 -6
- package/src/v-stack/test/index.tsx +10 -0
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/custom-select-control-v2/legacy-adapter.js +0 -29
- package/build/custom-select-control-v2/legacy-adapter.js.map +0 -1
- package/build/utils/hooks/use-latest-ref.js +0 -33
- package/build/utils/hooks/use-latest-ref.js.map +0 -1
- package/build-module/custom-select-control-v2/legacy-adapter.js +0 -21
- package/build-module/custom-select-control-v2/legacy-adapter.js.map +0 -1
- package/build-module/utils/hooks/use-latest-ref.js +0 -27
- package/build-module/utils/hooks/use-latest-ref.js.map +0 -1
- package/build-types/custom-select-control-v2/legacy-adapter.d.ts +0 -6
- package/build-types/custom-select-control-v2/legacy-adapter.d.ts.map +0 -1
- package/build-types/utils/hooks/use-latest-ref.d.ts +0 -15
- package/build-types/utils/hooks/use-latest-ref.d.ts.map +0 -1
- package/src/custom-select-control-v2/legacy-adapter.tsx +0 -25
- package/src/utils/hooks/test/use-latest-ref.js +0 -119
- package/src/utils/hooks/use-latest-ref.ts +0 -29
|
@@ -31,7 +31,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
31
31
|
isBusy?: boolean | undefined;
|
|
32
32
|
isDestructive?: boolean | undefined;
|
|
33
33
|
isPressed?: boolean | undefined;
|
|
34
|
-
isSmall?: boolean | undefined;
|
|
35
34
|
label?: string | undefined;
|
|
36
35
|
shortcut?: string | {
|
|
37
36
|
display: string;
|
|
@@ -55,7 +54,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
55
54
|
isBusy?: boolean | undefined;
|
|
56
55
|
isDestructive?: boolean | undefined;
|
|
57
56
|
isPressed?: boolean | undefined;
|
|
58
|
-
isSmall?: boolean | undefined;
|
|
59
57
|
label?: string | undefined;
|
|
60
58
|
shortcut?: string | {
|
|
61
59
|
display: string;
|
|
@@ -67,7 +65,7 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
67
65
|
tooltipPosition?: ("top" | "middle" | "bottom") | "top left" | "top center" | "top right" | "middle left" | "middle center" | "middle right" | "bottom left" | "bottom center" | "bottom right" | "top left top" | "top left bottom" | "top left left" | "top left right" | "top center top" | "top center bottom" | "top center left" | "top center right" | "top right top" | "top right bottom" | "top right left" | "top right right" | "middle left top" | "middle left bottom" | "middle left left" | "middle left right" | "middle center top" | "middle center bottom" | "middle center left" | "middle center right" | "middle right top" | "middle right bottom" | "middle right left" | "middle right right" | "bottom left top" | "bottom left bottom" | "bottom left left" | "bottom left right" | "bottom center top" | "bottom center bottom" | "bottom center left" | "bottom center right" | "bottom right top" | "bottom right bottom" | "bottom right left" | "bottom right right" | undefined;
|
|
68
66
|
variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
|
|
69
67
|
__experimentalIsFocusable?: boolean | undefined;
|
|
70
|
-
}> & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "form" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "name" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof {
|
|
68
|
+
}> & import("../../button/types").DeprecatedButtonProps & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "form" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "name" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof {
|
|
71
69
|
__next40pxDefaultSize?: boolean | undefined;
|
|
72
70
|
children?: import("react").ReactNode;
|
|
73
71
|
describedBy?: string | undefined;
|
|
@@ -77,7 +75,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
77
75
|
isBusy?: boolean | undefined;
|
|
78
76
|
isDestructive?: boolean | undefined;
|
|
79
77
|
isPressed?: boolean | undefined;
|
|
80
|
-
isSmall?: boolean | undefined;
|
|
81
78
|
label?: string | undefined;
|
|
82
79
|
shortcut?: string | {
|
|
83
80
|
display: string;
|
|
@@ -89,7 +86,7 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
89
86
|
tooltipPosition?: ("top" | "middle" | "bottom") | "top left" | "top center" | "top right" | "middle left" | "middle center" | "middle right" | "bottom left" | "bottom center" | "bottom right" | "top left top" | "top left bottom" | "top left left" | "top left right" | "top center top" | "top center bottom" | "top center left" | "top center right" | "top right top" | "top right bottom" | "top right left" | "top right right" | "middle left top" | "middle left bottom" | "middle left left" | "middle left right" | "middle center top" | "middle center bottom" | "middle center left" | "middle center right" | "middle right top" | "middle right bottom" | "middle right left" | "middle right right" | "bottom left top" | "bottom left bottom" | "bottom left left" | "bottom left right" | "bottom center top" | "bottom center bottom" | "bottom center left" | "bottom center right" | "bottom right top" | "bottom right bottom" | "bottom right left" | "bottom right right" | undefined;
|
|
90
87
|
variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
|
|
91
88
|
__experimentalIsFocusable?: boolean | undefined;
|
|
92
|
-
}> | Pick<{
|
|
89
|
+
} | keyof import("../../button/types").DeprecatedButtonProps> | Pick<{
|
|
93
90
|
__next40pxDefaultSize?: boolean | undefined;
|
|
94
91
|
children?: import("react").ReactNode;
|
|
95
92
|
describedBy?: string | undefined;
|
|
@@ -99,7 +96,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
99
96
|
isBusy?: boolean | undefined;
|
|
100
97
|
isDestructive?: boolean | undefined;
|
|
101
98
|
isPressed?: boolean | undefined;
|
|
102
|
-
isSmall?: boolean | undefined;
|
|
103
99
|
label?: string | undefined;
|
|
104
100
|
shortcut?: string | {
|
|
105
101
|
display: string;
|
|
@@ -125,7 +121,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
125
121
|
isBusy?: boolean | undefined;
|
|
126
122
|
isDestructive?: boolean | undefined;
|
|
127
123
|
isPressed?: boolean | undefined;
|
|
128
|
-
isSmall?: boolean | undefined;
|
|
129
124
|
label?: string | undefined;
|
|
130
125
|
shortcut?: string | {
|
|
131
126
|
display: string;
|
|
@@ -141,7 +136,7 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
141
136
|
disabled?: false | undefined;
|
|
142
137
|
href: string;
|
|
143
138
|
target?: string | undefined;
|
|
144
|
-
}> & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "media" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "hrefLang" | "referrerPolicy" | "rel" | "download" | "ping" | keyof {
|
|
139
|
+
}> & import("../../button/types").DeprecatedButtonProps & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "media" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "hrefLang" | "referrerPolicy" | "rel" | "download" | "ping" | keyof {
|
|
145
140
|
__next40pxDefaultSize?: boolean | undefined;
|
|
146
141
|
children?: import("react").ReactNode;
|
|
147
142
|
describedBy?: string | undefined;
|
|
@@ -151,7 +146,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
151
146
|
isBusy?: boolean | undefined;
|
|
152
147
|
isDestructive?: boolean | undefined;
|
|
153
148
|
isPressed?: boolean | undefined;
|
|
154
|
-
isSmall?: boolean | undefined;
|
|
155
149
|
label?: string | undefined;
|
|
156
150
|
shortcut?: string | {
|
|
157
151
|
display: string;
|
|
@@ -167,6 +161,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
167
161
|
disabled?: false | undefined;
|
|
168
162
|
href: string;
|
|
169
163
|
target?: string | undefined;
|
|
170
|
-
}>, "as" | keyof ToolbarButtonProps> & import("react").RefAttributes<any>>;
|
|
164
|
+
} | keyof import("../../button/types").DeprecatedButtonProps>, "as" | keyof ToolbarButtonProps> & import("react").RefAttributes<any>>;
|
|
171
165
|
export default ToolbarButton;
|
|
172
166
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-button/index.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA+ElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-button/index.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA+ElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qIAAyC,CAAC;AACpE,eAAe,aAAa,CAAC"}
|
|
@@ -2,5 +2,4 @@ export { default as useControlledState } from "./use-controlled-state";
|
|
|
2
2
|
export { default as useUpdateEffect } from "./use-update-effect";
|
|
3
3
|
export { useControlledValue } from "./use-controlled-value";
|
|
4
4
|
export { useCx } from "./use-cx";
|
|
5
|
-
export { useLatestRef } from "./use-latest-ref";
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,13 +6,11 @@ import type { WordPressComponentProps } from '../context';
|
|
|
6
6
|
import type { VStackProps } from './types';
|
|
7
7
|
export declare function useVStack(props: WordPressComponentProps<VStackProps, 'div'>): {
|
|
8
8
|
className: string;
|
|
9
|
-
isColumn: boolean;
|
|
10
|
-
children: import("react").ReactNode;
|
|
11
|
-
isReversed?: boolean | undefined;
|
|
12
9
|
id?: string | undefined;
|
|
13
10
|
prefix?: string | undefined;
|
|
14
11
|
slot?: string | undefined;
|
|
15
12
|
role?: import("react").AriaRole | undefined;
|
|
13
|
+
children: import("react").ReactNode;
|
|
16
14
|
style?: import("react").CSSProperties | undefined;
|
|
17
15
|
title?: string | undefined;
|
|
18
16
|
color?: string | undefined;
|
|
@@ -231,6 +229,7 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
|
|
|
231
229
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
232
230
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
233
231
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
as?: keyof JSX.IntrinsicElements | undefined;
|
|
234
233
|
key?: import("react").Key | null | undefined;
|
|
235
234
|
defaultChecked?: boolean | undefined;
|
|
236
235
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -264,6 +263,5 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
|
|
|
264
263
|
unselectable?: "on" | "off" | undefined;
|
|
265
264
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
266
265
|
is?: string | undefined;
|
|
267
|
-
as?: keyof JSX.IntrinsicElements | undefined;
|
|
268
266
|
};
|
|
269
267
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/v-stack/hook.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,SAAS,CACxB,KAAK,EAAE,uBAAuB,CAAE,WAAW,EAAE,KAAK,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/v-stack/hook.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,SAAS,CACxB,KAAK,EAAE,uBAAuB,CAAE,WAAW,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBpD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.2.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
"@types/gradient-parser": "0.1.3",
|
|
43
43
|
"@types/highlight-words-core": "1.2.1",
|
|
44
44
|
"@use-gesture/react": "^10.2.24",
|
|
45
|
-
"@wordpress/a11y": "^3.
|
|
46
|
-
"@wordpress/compose": "^6.
|
|
47
|
-
"@wordpress/date": "^4.
|
|
48
|
-
"@wordpress/deprecated": "^3.
|
|
49
|
-
"@wordpress/dom": "^3.
|
|
50
|
-
"@wordpress/element": "^5.
|
|
51
|
-
"@wordpress/escape-html": "^2.
|
|
52
|
-
"@wordpress/hooks": "^3.
|
|
53
|
-
"@wordpress/html-entities": "^3.
|
|
54
|
-
"@wordpress/i18n": "^4.
|
|
55
|
-
"@wordpress/icons": "^9.
|
|
56
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
57
|
-
"@wordpress/keycodes": "^3.
|
|
58
|
-
"@wordpress/primitives": "^3.
|
|
59
|
-
"@wordpress/private-apis": "^0.
|
|
60
|
-
"@wordpress/rich-text": "^6.
|
|
61
|
-
"@wordpress/warning": "^2.
|
|
45
|
+
"@wordpress/a11y": "^3.54.0",
|
|
46
|
+
"@wordpress/compose": "^6.31.0",
|
|
47
|
+
"@wordpress/date": "^4.54.0",
|
|
48
|
+
"@wordpress/deprecated": "^3.54.0",
|
|
49
|
+
"@wordpress/dom": "^3.54.0",
|
|
50
|
+
"@wordpress/element": "^5.31.0",
|
|
51
|
+
"@wordpress/escape-html": "^2.54.0",
|
|
52
|
+
"@wordpress/hooks": "^3.54.0",
|
|
53
|
+
"@wordpress/html-entities": "^3.54.0",
|
|
54
|
+
"@wordpress/i18n": "^4.54.0",
|
|
55
|
+
"@wordpress/icons": "^9.45.0",
|
|
56
|
+
"@wordpress/is-shallow-equal": "^4.54.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.54.0",
|
|
58
|
+
"@wordpress/primitives": "^3.52.0",
|
|
59
|
+
"@wordpress/private-apis": "^0.36.0",
|
|
60
|
+
"@wordpress/rich-text": "^6.31.0",
|
|
61
|
+
"@wordpress/warning": "^2.54.0",
|
|
62
62
|
"change-case": "^4.1.2",
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"colord": "^2.7.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ffc07735d0abfb3f69e91d48f25b7fe8d1ef92d2"
|
|
90
90
|
}
|
|
@@ -5,7 +5,7 @@ import { Text, View } from 'react-native';
|
|
|
5
5
|
|
|
6
6
|
export default function BaseControl( { label, help, children } ) {
|
|
7
7
|
return (
|
|
8
|
-
<View accessible
|
|
8
|
+
<View accessible accessibilityLabel={ label }>
|
|
9
9
|
{ label && <Text>{ label }</Text> }
|
|
10
10
|
{ children }
|
|
11
11
|
{ help && <Text>{ help }</Text> }
|
|
@@ -14,7 +14,7 @@ const MyBaseControl = ( props: Omit< BaseControlProps, 'children' > ) => {
|
|
|
14
14
|
const { baseControlProps, controlProps } = useBaseControlProps( props );
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
|
-
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom
|
|
17
|
+
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom>
|
|
18
18
|
<textarea { ...controlProps } />
|
|
19
19
|
</BaseControl>
|
|
20
20
|
);
|
|
@@ -111,7 +111,7 @@ const UnconnectedBorderBoxControl = (
|
|
|
111
111
|
__unstablePopoverProps={ popoverProps }
|
|
112
112
|
shouldSanitizeBorder={ false } // This component will handle that.
|
|
113
113
|
value={ linkedValue }
|
|
114
|
-
withSlider
|
|
114
|
+
withSlider
|
|
115
115
|
width={
|
|
116
116
|
size === '__unstable-large' ? '116px' : '110px'
|
|
117
117
|
}
|
|
@@ -76,7 +76,7 @@ const BorderBoxControlSplitControls = (
|
|
|
76
76
|
<BorderBoxControlVisualizer value={ value } size={ size } />
|
|
77
77
|
<BorderControl
|
|
78
78
|
className={ centeredClassName }
|
|
79
|
-
hideLabelFromVision
|
|
79
|
+
hideLabelFromVision
|
|
80
80
|
label={ __( 'Top border' ) }
|
|
81
81
|
onChange={ ( newBorder ) => onChange( newBorder, 'top' ) }
|
|
82
82
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -84,7 +84,7 @@ const BorderBoxControlSplitControls = (
|
|
|
84
84
|
{ ...sharedBorderControlProps }
|
|
85
85
|
/>
|
|
86
86
|
<BorderControl
|
|
87
|
-
hideLabelFromVision
|
|
87
|
+
hideLabelFromVision
|
|
88
88
|
label={ __( 'Left border' ) }
|
|
89
89
|
onChange={ ( newBorder ) => onChange( newBorder, 'left' ) }
|
|
90
90
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -93,7 +93,7 @@ const BorderBoxControlSplitControls = (
|
|
|
93
93
|
/>
|
|
94
94
|
<BorderControl
|
|
95
95
|
className={ rightAlignedClassName }
|
|
96
|
-
hideLabelFromVision
|
|
96
|
+
hideLabelFromVision
|
|
97
97
|
label={ __( 'Right border' ) }
|
|
98
98
|
onChange={ ( newBorder ) => onChange( newBorder, 'right' ) }
|
|
99
99
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -102,7 +102,7 @@ const BorderBoxControlSplitControls = (
|
|
|
102
102
|
/>
|
|
103
103
|
<BorderControl
|
|
104
104
|
className={ centeredClassName }
|
|
105
|
-
hideLabelFromVision
|
|
105
|
+
hideLabelFromVision
|
|
106
106
|
label={ __( 'Bottom border' ) }
|
|
107
107
|
onChange={ ( newBorder ) => onChange( newBorder, 'bottom' ) }
|
|
108
108
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -179,7 +179,7 @@ const BorderControlDropdown = (
|
|
|
179
179
|
aria-label={ toggleAriaLabel }
|
|
180
180
|
tooltipPosition={ dropdownPosition }
|
|
181
181
|
label={ __( 'Border color and style picker' ) }
|
|
182
|
-
showTooltip
|
|
182
|
+
showTooltip
|
|
183
183
|
__next40pxDefaultSize={ size === '__unstable-large' ? true : false }
|
|
184
184
|
>
|
|
185
185
|
<span className={ indicatorWrapperClassName }>
|
package/src/button/index.tsx
CHANGED
|
@@ -65,10 +65,9 @@ function useDeprecatedProps( {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
if ( isDefault ) {
|
|
68
|
-
deprecated( 'Button isDefault prop', {
|
|
68
|
+
deprecated( 'wp.components.Button `isDefault` prop', {
|
|
69
69
|
since: '5.4',
|
|
70
70
|
alternative: 'variant="secondary"',
|
|
71
|
-
version: '6.2',
|
|
72
71
|
} );
|
|
73
72
|
|
|
74
73
|
computedVariant ??= 'secondary';
|
|
@@ -87,7 +86,7 @@ function useDeprecatedProps( {
|
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
export function UnforwardedButton(
|
|
90
|
-
props: ButtonProps,
|
|
89
|
+
props: ButtonProps & DeprecatedButtonProps,
|
|
91
90
|
ref: ForwardedRef< any >
|
|
92
91
|
) {
|
|
93
92
|
const {
|
|
@@ -223,10 +222,10 @@ export function UnforwardedButton(
|
|
|
223
222
|
<Icon icon={ icon } size={ iconSize } />
|
|
224
223
|
) }
|
|
225
224
|
{ text && <>{ text }</> }
|
|
225
|
+
{ children }
|
|
226
226
|
{ icon && iconPosition === 'right' && (
|
|
227
227
|
<Icon icon={ icon } size={ iconSize } />
|
|
228
228
|
) }
|
|
229
|
-
{ children }
|
|
230
229
|
</>
|
|
231
230
|
);
|
|
232
231
|
|
package/src/button/style.scss
CHANGED
|
@@ -84,9 +84,7 @@
|
|
|
84
84
|
outline: none;
|
|
85
85
|
|
|
86
86
|
&:focus:enabled {
|
|
87
|
-
box-shadow:
|
|
88
|
-
0 0 0 $border-width $components-color-background,
|
|
89
|
-
0 0 0 3px $components-color-accent;
|
|
87
|
+
box-shadow: inset 0 0 0 1px $components-color-background, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
|
|
@@ -43,7 +43,7 @@ describe( 'Button', () => {
|
|
|
43
43
|
} );
|
|
44
44
|
|
|
45
45
|
it( 'should render a button element with is-secondary and is-small class', () => {
|
|
46
|
-
render( <Button variant="secondary"
|
|
46
|
+
render( <Button variant="secondary" size="small" /> );
|
|
47
47
|
const button = screen.getByRole( 'button' );
|
|
48
48
|
|
|
49
49
|
expect( button ).toHaveClass( 'is-secondary' );
|
|
@@ -554,13 +554,11 @@ describe( 'Button', () => {
|
|
|
554
554
|
|
|
555
555
|
describe( 'deprecated props', () => {
|
|
556
556
|
it( 'should not break when the legacy isPrimary prop is passed', () => {
|
|
557
|
-
// @ts-expect-error
|
|
558
557
|
render( <Button isPrimary /> );
|
|
559
558
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-primary' );
|
|
560
559
|
} );
|
|
561
560
|
|
|
562
561
|
it( 'should not break when the legacy isSecondary prop is passed', () => {
|
|
563
|
-
// @ts-expect-error
|
|
564
562
|
render( <Button isSecondary /> );
|
|
565
563
|
expect( screen.getByRole( 'button' ) ).toHaveClass(
|
|
566
564
|
'is-secondary'
|
|
@@ -568,19 +566,16 @@ describe( 'Button', () => {
|
|
|
568
566
|
} );
|
|
569
567
|
|
|
570
568
|
it( 'should not break when the legacy isTertiary prop is passed', () => {
|
|
571
|
-
// @ts-expect-error
|
|
572
569
|
render( <Button isTertiary /> );
|
|
573
570
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-tertiary' );
|
|
574
571
|
} );
|
|
575
572
|
|
|
576
573
|
it( 'should not break when the legacy isLink prop is passed', () => {
|
|
577
|
-
// @ts-expect-error
|
|
578
574
|
render( <Button isLink /> );
|
|
579
575
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-link' );
|
|
580
576
|
} );
|
|
581
577
|
|
|
582
578
|
it( 'should warn when the isDefault prop is passed', () => {
|
|
583
|
-
// @ts-expect-error
|
|
584
579
|
render( <Button isDefault /> );
|
|
585
580
|
expect( screen.getByRole( 'button' ) ).toHaveClass(
|
|
586
581
|
'is-secondary'
|
|
@@ -593,6 +588,11 @@ describe( 'Button', () => {
|
|
|
593
588
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-small' );
|
|
594
589
|
} );
|
|
595
590
|
|
|
591
|
+
it( 'should have the is-small class when small class prop is passed', () => {
|
|
592
|
+
render( <Button size="small" /> );
|
|
593
|
+
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-small' );
|
|
594
|
+
} );
|
|
595
|
+
|
|
596
596
|
it( 'should prioritize the `size` prop over `isSmall`', () => {
|
|
597
597
|
render( <Button size="compact" isSmall /> );
|
|
598
598
|
expect( screen.getByRole( 'button' ) ).not.toHaveClass(
|
package/src/button/types.ts
CHANGED
|
@@ -61,15 +61,6 @@ type BaseButtonProps = {
|
|
|
61
61
|
* Renders a pressed button style.
|
|
62
62
|
*/
|
|
63
63
|
isPressed?: boolean;
|
|
64
|
-
// TODO: Deprecate officially (add console warning and move to DeprecatedButtonProps).
|
|
65
|
-
/**
|
|
66
|
-
* Decreases the size of the button.
|
|
67
|
-
*
|
|
68
|
-
* Deprecated in favor of the `size` prop. If both props are defined, the `size` prop will take precedence.
|
|
69
|
-
*
|
|
70
|
-
* @deprecated Use the `'small'` value on the `size` prop instead.
|
|
71
|
-
*/
|
|
72
|
-
isSmall?: boolean;
|
|
73
64
|
/**
|
|
74
65
|
* Sets the `aria-label` of the component, if none is provided.
|
|
75
66
|
* Sets the Tooltip content if `showTooltip` is provided.
|
|
@@ -149,11 +140,48 @@ type AnchorProps = {
|
|
|
149
140
|
};
|
|
150
141
|
|
|
151
142
|
export type DeprecatedButtonProps = {
|
|
143
|
+
/**
|
|
144
|
+
* Gives the button a default style.
|
|
145
|
+
*
|
|
146
|
+
* @deprecated Use the `'secondary'` value on the `variant` prop instead.
|
|
147
|
+
* @ignore
|
|
148
|
+
*/
|
|
152
149
|
isDefault?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Gives the button a link style.
|
|
152
|
+
*
|
|
153
|
+
* @deprecated Use the `'link'` value on the `variant` prop instead.
|
|
154
|
+
* @ignore
|
|
155
|
+
*/
|
|
153
156
|
isLink?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Gives the button a primary style.
|
|
159
|
+
*
|
|
160
|
+
* @deprecated Use the `'primary'` value on the `variant` prop instead.
|
|
161
|
+
* @ignore
|
|
162
|
+
*/
|
|
154
163
|
isPrimary?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Gives the button a default style.
|
|
166
|
+
*
|
|
167
|
+
* @deprecated Use the `'secondary'` value on the `variant` prop instead.
|
|
168
|
+
* @ignore
|
|
169
|
+
*/
|
|
155
170
|
isSecondary?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Gives the button a text-based style.
|
|
173
|
+
*
|
|
174
|
+
* @deprecated Use the `'tertiary'` value on the `variant` prop instead.
|
|
175
|
+
* @ignore
|
|
176
|
+
*/
|
|
156
177
|
isTertiary?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Decreases the size of the button.
|
|
180
|
+
*
|
|
181
|
+
* @deprecated Use the `'small'` value on the `size` prop instead.
|
|
182
|
+
* @ignore
|
|
183
|
+
*/
|
|
184
|
+
isSmall?: boolean;
|
|
157
185
|
};
|
|
158
186
|
|
|
159
187
|
export type DeprecatedIconButtonProps = {
|
|
@@ -59,9 +59,7 @@ describe( 'CircularOptionPicker', () => {
|
|
|
59
59
|
|
|
60
60
|
describe( 'when `asButtons` is true', () => {
|
|
61
61
|
it( 'should render as buttons', async () => {
|
|
62
|
-
render(
|
|
63
|
-
<CircularOptionPicker { ...DEFAULT_PROPS } asButtons={ true } />
|
|
64
|
-
);
|
|
62
|
+
render( <CircularOptionPicker { ...DEFAULT_PROPS } asButtons /> );
|
|
65
63
|
|
|
66
64
|
expect( screen.queryByRole( 'listbox' ) ).not.toBeInTheDocument();
|
|
67
65
|
expect( screen.queryByRole( 'option' ) ).not.toBeInTheDocument();
|
|
@@ -94,7 +92,7 @@ describe( 'CircularOptionPicker', () => {
|
|
|
94
92
|
<CircularOptionPicker
|
|
95
93
|
{ ...DEFAULT_PROPS }
|
|
96
94
|
options={ MULTIPLE_OPTIONS }
|
|
97
|
-
loop
|
|
95
|
+
loop
|
|
98
96
|
/>
|
|
99
97
|
);
|
|
100
98
|
|
|
@@ -138,3 +138,10 @@ The optional custom text to display as the confirmation button's label
|
|
|
138
138
|
- Default: "Cancel"
|
|
139
139
|
|
|
140
140
|
The optional custom text to display as the cancellation button's label
|
|
141
|
+
|
|
142
|
+
## Best practices
|
|
143
|
+
|
|
144
|
+
The ConfirmDialog component should:
|
|
145
|
+
|
|
146
|
+
- Be used only for short confirmation messages where a cancel and confirm actions are provided.
|
|
147
|
+
- Use a descriptive text for the _confirm_ button. Default is "OK".
|
|
@@ -86,7 +86,7 @@ const UnconnectedConfirmDialog = (
|
|
|
86
86
|
onRequestClose={ handleEvent( onCancel ) }
|
|
87
87
|
onKeyDown={ handleEnter }
|
|
88
88
|
closeButtonLabel={ cancelLabel }
|
|
89
|
-
isDismissible
|
|
89
|
+
isDismissible
|
|
90
90
|
ref={ forwardedRef }
|
|
91
91
|
overlayClassName={ wrapperClassName }
|
|
92
92
|
__experimentalHideHeader
|
|
@@ -235,11 +235,7 @@ describe( 'Confirm', () => {
|
|
|
235
235
|
describe( 'When controlled (isOpen is not `undefined`)', () => {
|
|
236
236
|
it( 'should render when `isOpen` is set to `true`', async () => {
|
|
237
237
|
render(
|
|
238
|
-
<ConfirmDialog
|
|
239
|
-
isOpen={ true }
|
|
240
|
-
onConfirm={ noop }
|
|
241
|
-
onCancel={ noop }
|
|
242
|
-
>
|
|
238
|
+
<ConfirmDialog isOpen onConfirm={ noop } onCancel={ noop }>
|
|
243
239
|
Are you sure?
|
|
244
240
|
</ConfirmDialog>
|
|
245
241
|
);
|
|
@@ -273,7 +269,7 @@ describe( 'Confirm', () => {
|
|
|
273
269
|
const onConfirm = jest.fn().mockName( 'onConfirm()' );
|
|
274
270
|
|
|
275
271
|
render(
|
|
276
|
-
<ConfirmDialog isOpen
|
|
272
|
+
<ConfirmDialog isOpen onConfirm={ onConfirm }>
|
|
277
273
|
Are you sure?
|
|
278
274
|
</ConfirmDialog>
|
|
279
275
|
);
|
|
@@ -291,11 +287,7 @@ describe( 'Confirm', () => {
|
|
|
291
287
|
const onCancel = jest.fn().mockName( 'onCancel()' );
|
|
292
288
|
|
|
293
289
|
render(
|
|
294
|
-
<ConfirmDialog
|
|
295
|
-
isOpen={ true }
|
|
296
|
-
onConfirm={ noop }
|
|
297
|
-
onCancel={ onCancel }
|
|
298
|
-
>
|
|
290
|
+
<ConfirmDialog isOpen onConfirm={ noop } onCancel={ onCancel }>
|
|
299
291
|
Are you sure?
|
|
300
292
|
</ConfirmDialog>
|
|
301
293
|
);
|
|
@@ -312,11 +304,7 @@ describe( 'Confirm', () => {
|
|
|
312
304
|
const onCancel = jest.fn().mockName( 'onCancel()' );
|
|
313
305
|
|
|
314
306
|
render(
|
|
315
|
-
<ConfirmDialog
|
|
316
|
-
isOpen={ true }
|
|
317
|
-
onConfirm={ noop }
|
|
318
|
-
onCancel={ onCancel }
|
|
319
|
-
>
|
|
307
|
+
<ConfirmDialog isOpen onConfirm={ noop } onCancel={ onCancel }>
|
|
320
308
|
Are you sure?
|
|
321
309
|
</ConfirmDialog>
|
|
322
310
|
);
|
|
@@ -352,11 +340,7 @@ describe( 'Confirm', () => {
|
|
|
352
340
|
const onConfirm = jest.fn().mockName( 'onConfirm()' );
|
|
353
341
|
|
|
354
342
|
render(
|
|
355
|
-
<ConfirmDialog
|
|
356
|
-
isOpen={ true }
|
|
357
|
-
onConfirm={ onConfirm }
|
|
358
|
-
onCancel={ noop }
|
|
359
|
-
>
|
|
343
|
+
<ConfirmDialog isOpen onConfirm={ onConfirm } onCancel={ noop }>
|
|
360
344
|
Are you sure?
|
|
361
345
|
</ConfirmDialog>
|
|
362
346
|
);
|
|
@@ -8,8 +8,11 @@ import * as Ariakit from '@ariakit/react';
|
|
|
8
8
|
*/
|
|
9
9
|
import _CustomSelect from '../custom-select';
|
|
10
10
|
import type { CustomSelectProps } from '../types';
|
|
11
|
+
import type { WordPressComponentProps } from '../../context';
|
|
11
12
|
|
|
12
|
-
function CustomSelect(
|
|
13
|
+
function CustomSelect(
|
|
14
|
+
props: WordPressComponentProps< CustomSelectProps, 'button', false >
|
|
15
|
+
) {
|
|
13
16
|
const { defaultValue, onChange, value, ...restProps } = props;
|
|
14
17
|
// Forward props + store from v2 implementation
|
|
15
18
|
const store = Ariakit.useSelectStore( {
|