@wordpress/components 28.10.0 → 28.12.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 +61 -0
- package/build/autocomplete/autocompleter-ui.js +2 -6
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +2 -4
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/index.js +4 -5
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/types.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +1 -0
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control/hook.js +6 -0
- package/build/border-box-control/border-box-control/hook.js.map +1 -1
- package/build/border-control/border-control/component.js +1 -0
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +6 -0
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +13 -13
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/color-palette/index.js +1 -1
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +1 -2
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/index.native.js +0 -1
- package/build/color-picker/index.native.js.map +1 -1
- package/build/composite/legacy/index.js +5 -2
- package/build/composite/legacy/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/date-time/date/index.js +0 -1
- package/build/date-time/date/index.js.map +1 -1
- package/build/font-size-picker/index.native.js +6 -6
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/form-file-upload/index.js +5 -1
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-token-field/index.js +0 -3
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +7 -3
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token.js +1 -0
- package/build/form-token-field/token.js.map +1 -1
- package/build/guide/page-control.js +1 -0
- package/build/guide/page-control.js.map +1 -1
- package/build/{dropdown-menu-v2 → menu}/checkbox-item.js +8 -8
- package/build/menu/checkbox-item.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/context.js +2 -2
- package/build/menu/context.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/group-label.js +5 -5
- package/build/menu/group-label.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/group.js +5 -5
- package/build/menu/group.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/index.js +38 -38
- package/build/menu/index.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/item-help-text.js +3 -3
- package/build/menu/item-help-text.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/item-label.js +3 -3
- package/build/menu/item-label.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/item.js +7 -7
- package/build/menu/item.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/radio-item.js +8 -8
- package/build/menu/radio-item.js.map +1 -0
- package/build/{dropdown-menu-v2 → menu}/separator.js +6 -6
- package/build/menu/separator.js.map +1 -0
- package/build/menu/styles.js +150 -0
- package/build/menu/styles.js.map +1 -0
- package/build/menu/types.js.map +1 -0
- package/build/menu/use-temporary-focus-visible-fix.js.map +1 -0
- package/build/menu-item/index.js +1 -0
- package/build/menu-item/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +2 -2
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js +1 -3
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/color-settings/picker-screen.native.js +1 -3
- package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build/mobile/image/index.native.js +1 -3
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js +1 -3
- package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +2 -5
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-screen.native.js +1 -3
- package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js +6 -18
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-screen.native.js +1 -3
- package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +2 -6
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build/navigation/index.js +1 -2
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/use-navigation-tree-item.js +2 -2
- package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +2 -2
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/use-navigation-tree-menu.js +2 -2
- package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
- package/build/notice/index.js +2 -0
- package/build/notice/index.js.map +1 -1
- package/build/palette-edit/index.js +9 -2
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/styles.js +13 -28
- package/build/palette-edit/styles.js.map +1 -1
- package/build/panel/body.js +1 -0
- package/build/panel/body.js.map +1 -1
- package/build/popover/index.js +4 -1
- package/build/popover/index.js.map +1 -1
- package/build/private-apis.js +4 -4
- package/build/private-apis.js.map +1 -1
- package/build/radio-group/index.js +3 -1
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio.js +6 -0
- package/build/radio-group/radio.js.map +1 -1
- package/build/radio-group/types.js.map +1 -1
- package/build/sandbox/index.js +3 -6
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -3
- package/build/sandbox/index.native.js.map +1 -1
- package/build/search-control/index.native.js +1 -3
- package/build/search-control/index.native.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +1 -2
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/fill.js +3 -6
- package/build/slot-fill/fill.js.map +1 -1
- package/build/snackbar/index.js +2 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/spacer/hook.js +5 -3
- package/build/spacer/hook.js.map +1 -1
- package/build/tab-panel/index.js +4 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +48 -113
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/styles.js +12 -12
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tab.js +23 -6
- package/build/tabs/tab.js.map +1 -1
- package/build/tabs/tablist.js +37 -14
- package/build/tabs/tablist.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +3 -2
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toolbar/toolbar/index.js +3 -0
- package/build/toolbar/toolbar/index.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/tools-panel/tools-panel-item/hook.js +0 -2
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tooltip/index.native.js +5 -15
- package/build/tooltip/index.native.js.map +1 -1
- package/build/unit-control/index.native.js +2 -6
- package/build/unit-control/index.native.js.map +1 -1
- package/build/utils/deprecated-36px-size.js +27 -0
- package/build/utils/deprecated-36px-size.js.map +1 -0
- package/build/utils/element-rect.js +13 -2
- package/build/utils/element-rect.js.map +1 -1
- package/build/utils/hooks/use-animated-offset-rect.js +3 -2
- package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
- package/build/utils/hooks/use-update-effect.js +0 -2
- package/build/utils/hooks/use-update-effect.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +2 -6
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +2 -4
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/index.js +4 -5
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/types.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +1 -0
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control/hook.js +6 -0
- package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
- package/build-module/border-control/border-control/component.js +1 -0
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +7 -0
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +13 -13
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/color-palette/index.js +1 -1
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +1 -2
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/index.native.js +0 -1
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/composite/legacy/index.js +5 -2
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/date-time/date/index.js +0 -1
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +7 -7
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/form-file-upload/index.js +5 -1
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-token-field/index.js +0 -3
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +7 -3
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token.js +1 -0
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/guide/page-control.js +1 -0
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/{dropdown-menu-v2 → menu}/checkbox-item.js +8 -8
- package/build-module/menu/checkbox-item.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/context.js +1 -1
- package/build-module/menu/context.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/group-label.js +5 -5
- package/build-module/menu/group-label.js.map +1 -0
- package/build-module/menu/group.js +21 -0
- package/build-module/menu/group.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/index.js +46 -46
- package/build-module/menu/index.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/item-help-text.js +2 -2
- package/build-module/menu/item-help-text.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/item-label.js +2 -2
- package/build-module/menu/item-label.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/item.js +7 -7
- package/build-module/menu/item.js.map +1 -0
- package/build-module/{dropdown-menu-v2 → menu}/radio-item.js +8 -8
- package/build-module/menu/radio-item.js.map +1 -0
- package/build-module/menu/separator.js +22 -0
- package/build-module/menu/separator.js.map +1 -0
- package/build-module/menu/styles.js +143 -0
- package/build-module/menu/styles.js.map +1 -0
- package/build-module/menu/types.js.map +1 -0
- package/build-module/menu/use-temporary-focus-visible-fix.js.map +1 -0
- package/build-module/menu-item/index.js +1 -0
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +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 +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +2 -2
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js +1 -3
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/picker-screen.native.js +1 -3
- package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +1 -3
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js +1 -3
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +2 -5
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-screen.native.js +1 -3
- package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +6 -18
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-screen.native.js +1 -3
- package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +2 -6
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build-module/navigation/index.js +1 -2
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/use-navigation-tree-item.js +2 -2
- package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +2 -2
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/use-navigation-tree-menu.js +2 -2
- package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
- package/build-module/notice/index.js +2 -0
- package/build-module/notice/index.js.map +1 -1
- package/build-module/palette-edit/index.js +11 -4
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/styles.js +13 -29
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/panel/body.js +1 -0
- package/build-module/panel/body.js.map +1 -1
- package/build-module/popover/index.js +4 -1
- package/build-module/popover/index.js.map +1 -1
- package/build-module/private-apis.js +3 -3
- package/build-module/private-apis.js.map +1 -1
- package/build-module/radio-group/index.js +3 -1
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio.js +6 -0
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/radio-group/types.js.map +1 -1
- package/build-module/sandbox/index.js +3 -6
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -3
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/search-control/index.native.js +1 -3
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +1 -2
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/fill.js +3 -6
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/snackbar/index.js +2 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/spacer/hook.js +5 -3
- package/build-module/spacer/hook.js.map +1 -1
- package/build-module/tab-panel/index.js +4 -1
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +47 -112
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/styles.js +11 -11
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tab.js +21 -6
- package/build-module/tabs/tab.js.map +1 -1
- package/build-module/tabs/tablist.js +37 -14
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +3 -2
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +3 -0
- package/build-module/toolbar/toolbar/index.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/tools-panel/tools-panel-item/hook.js +0 -2
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tooltip/index.native.js +5 -15
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/unit-control/index.native.js +2 -6
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/utils/deprecated-36px-size.js +19 -0
- package/build-module/utils/deprecated-36px-size.js.map +1 -0
- package/build-module/utils/element-rect.js +13 -2
- package/build-module/utils/element-rect.js.map +1 -1
- package/build-module/utils/hooks/use-animated-offset-rect.js +3 -2
- package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
- package/build-module/utils/hooks/use-update-effect.js +0 -2
- package/build-module/utils/hooks/use-update-effect.js.map +1 -1
- package/build-style/style-rtl.css +21 -35
- package/build-style/style.css +21 -35
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/types.d.ts +3 -0
- package/build-types/base-control/types.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +1 -0
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +1 -0
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/legacy/index.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
- package/build-types/form-token-field/token.d.ts.map +1 -1
- package/build-types/guide/page-control.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/item-group/stories/index.story.d.ts +1 -1
- package/build-types/item-group/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/lock-unlock.d.ts +2 -2
- package/build-types/menu/checkbox-item.d.ts +3 -0
- package/build-types/menu/checkbox-item.d.ts.map +1 -0
- package/build-types/menu/context.d.ts +6 -0
- package/build-types/menu/context.d.ts.map +1 -0
- package/build-types/menu/group-label.d.ts +3 -0
- package/build-types/menu/group-label.d.ts.map +1 -0
- package/build-types/menu/group.d.ts +3 -0
- package/build-types/menu/group.d.ts.map +1 -0
- package/build-types/menu/index.d.ts +40 -0
- package/build-types/menu/index.d.ts.map +1 -0
- package/build-types/{dropdown-menu-v2 → menu}/item-help-text.d.ts +1 -1
- package/build-types/menu/item-help-text.d.ts.map +1 -0
- package/build-types/{dropdown-menu-v2 → menu}/item-label.d.ts +1 -1
- package/build-types/menu/item-label.d.ts.map +1 -0
- package/build-types/menu/item.d.ts +3 -0
- package/build-types/menu/item.d.ts.map +1 -0
- package/build-types/menu/radio-item.d.ts +3 -0
- package/build-types/menu/radio-item.d.ts.map +1 -0
- package/build-types/menu/separator.d.ts +3 -0
- package/build-types/menu/separator.d.ts.map +1 -0
- package/build-types/menu/stories/index.story.d.ts +16 -0
- package/build-types/menu/stories/index.story.d.ts.map +1 -0
- package/build-types/{dropdown-menu-v2 → menu}/styles.d.ts +13 -13
- package/build-types/menu/styles.d.ts.map +1 -0
- package/build-types/menu/test/index.d.ts.map +1 -0
- package/build-types/{dropdown-menu-v2 → menu}/types.d.ts +22 -21
- package/build-types/menu/types.d.ts.map +1 -0
- package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +1 -0
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +0 -256
- package/build-types/palette-edit/styles.d.ts.map +1 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts +4 -2
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/types.d.ts +5 -1
- package/build-types/radio-group/types.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +21 -8
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +1 -1
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts +6 -3
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tab.d.ts +0 -3
- package/build-types/tabs/tab.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/tabs/types.d.ts +85 -48
- package/build-types/tabs/types.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/deprecated-36px-size.d.ts +6 -0
- package/build-types/utils/deprecated-36px-size.d.ts.map +1 -0
- package/build-types/utils/element-rect.d.ts +1 -1
- package/build-types/utils/element-rect.d.ts.map +1 -1
- package/build-types/utils/hooks/use-animated-offset-rect.d.ts +8 -1
- package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -1
- package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/alignment-matrix-control/README.md +1 -2
- package/src/angle-picker-control/README.md +1 -2
- package/src/animate/stories/index.story.tsx +2 -1
- package/src/autocomplete/autocompleter-ui.native.js +2 -4
- package/src/autocomplete/autocompleter-ui.tsx +2 -6
- package/src/autocomplete/index.tsx +4 -5
- package/src/base-control/README.md +58 -47
- package/src/base-control/docs-manifest.json +12 -0
- package/src/base-control/stories/index.story.tsx +4 -0
- package/src/base-control/types.ts +3 -0
- package/src/border-box-control/border-box-control/README.md +1 -0
- package/src/border-box-control/border-box-control/component.tsx +1 -0
- package/src/border-box-control/border-box-control/hook.ts +7 -0
- package/src/border-box-control/stories/index.story.tsx +1 -0
- package/src/border-box-control/test/index.tsx +1 -0
- package/src/border-control/border-control/README.md +1 -0
- package/src/border-control/border-control/component.tsx +1 -0
- package/src/border-control/border-control/hook.ts +7 -1
- package/src/border-control/border-control-dropdown/component.tsx +25 -13
- package/src/border-control/stories/index.story.tsx +1 -0
- package/src/border-control/test/index.js +1 -0
- package/src/button/stories/index.story.tsx +2 -1
- package/src/card/stories/index.story.tsx +2 -1
- package/src/color-palette/index.native.js +1 -2
- package/src/color-palette/index.tsx +1 -1
- package/src/color-palette/style.scss +2 -4
- package/src/color-picker/index.native.js +0 -1
- package/src/composite/legacy/index.tsx +5 -2
- package/src/composite/stories/index.story.tsx +2 -1
- package/src/confirm-dialog/stories/index.story.tsx +2 -1
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
- package/src/date-time/date/index.tsx +0 -1
- package/src/disabled/stories/index.story.tsx +2 -1
- package/src/draggable/stories/index.story.tsx +2 -1
- package/src/dropdown/stories/index.story.tsx +2 -1
- package/src/external-link/stories/index.story.tsx +2 -1
- package/src/font-size-picker/index.native.js +7 -7
- package/src/form-file-upload/index.tsx +7 -1
- package/src/form-token-field/index.tsx +0 -3
- package/src/form-token-field/style.scss +12 -13
- package/src/form-token-field/suggestions-list.tsx +6 -0
- package/src/form-token-field/token.tsx +1 -0
- package/src/guide/page-control.tsx +1 -0
- package/src/guide/style.scss +4 -6
- package/src/heading/stories/index.story.tsx +2 -1
- package/src/item-group/stories/index.story.tsx +8 -4
- package/src/keyboard-shortcuts/stories/index.story.tsx +2 -1
- package/src/{dropdown-menu-v2 → menu}/README.md +34 -34
- package/src/{dropdown-menu-v2 → menu}/checkbox-item.tsx +14 -14
- package/src/menu/context.tsx +13 -0
- package/src/{dropdown-menu-v2 → menu}/group-label.tsx +8 -8
- package/src/menu/group.tsx +26 -0
- package/src/{dropdown-menu-v2 → menu}/index.tsx +65 -70
- package/src/{dropdown-menu-v2 → menu}/item-help-text.tsx +3 -7
- package/src/{dropdown-menu-v2 → menu}/item-label.tsx +3 -7
- package/src/{dropdown-menu-v2 → menu}/item.tsx +13 -13
- package/src/{dropdown-menu-v2 → menu}/radio-item.tsx +14 -14
- package/src/menu/separator.tsx +27 -0
- package/src/menu/stories/index.story.tsx +543 -0
- package/src/{dropdown-menu-v2 → menu}/styles.ts +17 -17
- package/src/{dropdown-menu-v2 → menu}/test/index.tsx +145 -225
- package/src/{dropdown-menu-v2 → menu}/types.ts +24 -23
- package/src/menu-item/index.tsx +1 -0
- package/src/menu-item/test/__snapshots__/index.js.snap +4 -4
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
- package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
- package/src/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
- package/src/mobile/bottom-sheet-select-control/index.native.js +2 -2
- package/src/mobile/color-settings/index.native.js +1 -3
- package/src/mobile/color-settings/picker-screen.native.js +1 -3
- package/src/mobile/image/index.native.js +1 -3
- package/src/mobile/keyboard-avoiding-view/index.ios.js +1 -3
- package/src/mobile/link-picker/link-picker-results.native.js +2 -5
- package/src/mobile/link-picker/link-picker-screen.native.js +1 -3
- package/src/mobile/link-settings/index.native.js +6 -18
- package/src/mobile/link-settings/link-settings-screen.native.js +1 -3
- package/src/mobile/segmented-control/index.native.js +2 -6
- package/src/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
- package/src/modal/stories/index.story.tsx +2 -1
- package/src/navigable-container/stories/navigable-menu.story.tsx +2 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +2 -1
- package/src/navigation/index.tsx +1 -2
- package/src/navigation/item/use-navigation-tree-item.tsx +2 -2
- package/src/navigation/menu/menu-title-search.tsx +2 -2
- package/src/navigation/menu/use-navigation-tree-menu.tsx +2 -2
- package/src/navigator/stories/index.story.tsx +2 -1
- package/src/notice/index.tsx +2 -0
- package/src/notice/stories/index.story.tsx +7 -2
- package/src/notice/test/__snapshots__/index.tsx.snap +4 -4
- package/src/palette-edit/index.tsx +9 -5
- package/src/palette-edit/styles.ts +1 -67
- package/src/panel/body.tsx +1 -0
- package/src/panel/stories/index.story.tsx +2 -1
- package/src/popover/index.tsx +3 -0
- package/src/popover/stories/index.story.tsx +2 -1
- package/src/private-apis.ts +3 -3
- package/src/progress-bar/stories/index.story.tsx +2 -1
- package/src/radio-group/README.md +8 -8
- package/src/radio-group/index.tsx +2 -0
- package/src/radio-group/radio.tsx +7 -0
- package/src/radio-group/stories/index.story.tsx +16 -4
- package/src/radio-group/types.ts +6 -1
- package/src/resizable-box/stories/index.story.tsx +2 -1
- package/src/sandbox/index.native.js +1 -3
- package/src/sandbox/index.tsx +3 -6
- package/src/sandbox/stories/index.story.tsx +2 -1
- package/src/scroll-lock/stories/index.story.tsx +2 -1
- package/src/search-control/index.native.js +1 -3
- package/src/shortcut/stories/index.story.tsx +2 -1
- package/src/slot-fill/bubbles-virtually/slot.tsx +1 -2
- package/src/slot-fill/fill.ts +3 -6
- package/src/slot-fill/stories/index.story.tsx +2 -1
- package/src/snackbar/index.tsx +2 -1
- package/src/snackbar/stories/index.story.tsx +2 -1
- package/src/snackbar/stories/list.story.tsx +2 -1
- package/src/snackbar/style.scss +7 -16
- package/src/spacer/hook.ts +3 -2
- package/src/spinner/stories/index.story.tsx +2 -1
- package/src/tab-panel/index.tsx +3 -0
- package/src/tab-panel/stories/index.story.tsx +2 -1
- package/src/tab-panel/style.scss +1 -3
- package/src/tabs/README.md +63 -21
- package/src/tabs/index.tsx +112 -189
- package/src/tabs/stories/index.story.tsx +5 -2
- package/src/tabs/styles.ts +13 -5
- package/src/tabs/tab.tsx +23 -3
- package/src/tabs/tablist.tsx +44 -17
- package/src/tabs/test/index.tsx +131 -118
- package/src/tabs/types.ts +89 -49
- package/src/text/stories/index.story.tsx +2 -1
- package/src/text-highlight/stories/index.story.tsx +2 -1
- package/src/theme/stories/index.story.tsx +2 -1
- package/src/tip/stories/index.story.tsx +2 -1
- package/src/toggle-group-control/toggle-group-control/component.tsx +2 -1
- package/src/toolbar/toolbar/index.tsx +3 -0
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/src/tools-panel/tools-panel-item/hook.ts +0 -2
- package/src/tooltip/index.native.js +5 -15
- package/src/tooltip/stories/index.story.tsx +2 -1
- package/src/tree-grid/stories/index.story.tsx +2 -1
- package/src/truncate/stories/index.story.tsx +2 -1
- package/src/unit-control/index.native.js +2 -6
- package/src/utils/deprecated-36px-size.ts +27 -0
- package/src/utils/element-rect.ts +14 -2
- package/src/utils/hooks/use-animated-offset-rect.ts +13 -1
- package/src/utils/hooks/use-update-effect.js +0 -2
- package/src/visually-hidden/stories/index.story.tsx +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/dropdown-menu-v2/checkbox-item.js.map +0 -1
- package/build/dropdown-menu-v2/context.js.map +0 -1
- package/build/dropdown-menu-v2/group-label.js.map +0 -1
- package/build/dropdown-menu-v2/group.js.map +0 -1
- package/build/dropdown-menu-v2/index.js.map +0 -1
- package/build/dropdown-menu-v2/item-help-text.js.map +0 -1
- package/build/dropdown-menu-v2/item-label.js.map +0 -1
- package/build/dropdown-menu-v2/item.js.map +0 -1
- package/build/dropdown-menu-v2/radio-item.js.map +0 -1
- package/build/dropdown-menu-v2/separator.js.map +0 -1
- package/build/dropdown-menu-v2/styles.js +0 -150
- package/build/dropdown-menu-v2/styles.js.map +0 -1
- package/build/dropdown-menu-v2/types.js.map +0 -1
- package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
- package/build-module/dropdown-menu-v2/checkbox-item.js.map +0 -1
- package/build-module/dropdown-menu-v2/context.js.map +0 -1
- package/build-module/dropdown-menu-v2/group-label.js.map +0 -1
- package/build-module/dropdown-menu-v2/group.js +0 -21
- package/build-module/dropdown-menu-v2/group.js.map +0 -1
- package/build-module/dropdown-menu-v2/index.js.map +0 -1
- package/build-module/dropdown-menu-v2/item-help-text.js.map +0 -1
- package/build-module/dropdown-menu-v2/item-label.js.map +0 -1
- package/build-module/dropdown-menu-v2/item.js.map +0 -1
- package/build-module/dropdown-menu-v2/radio-item.js.map +0 -1
- package/build-module/dropdown-menu-v2/separator.js +0 -22
- package/build-module/dropdown-menu-v2/separator.js.map +0 -1
- package/build-module/dropdown-menu-v2/styles.js +0 -143
- package/build-module/dropdown-menu-v2/styles.js.map +0 -1
- package/build-module/dropdown-menu-v2/types.js.map +0 -1
- package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
- package/build-types/dropdown-menu-v2/checkbox-item.d.ts +0 -3
- package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/context.d.ts +0 -6
- package/build-types/dropdown-menu-v2/context.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/group-label.d.ts +0 -3
- package/build-types/dropdown-menu-v2/group-label.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/group.d.ts +0 -3
- package/build-types/dropdown-menu-v2/group.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/index.d.ts +0 -40
- package/build-types/dropdown-menu-v2/index.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/item-label.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/item.d.ts +0 -3
- package/build-types/dropdown-menu-v2/item.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/radio-item.d.ts +0 -3
- package/build-types/dropdown-menu-v2/radio-item.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/separator.d.ts +0 -3
- package/build-types/dropdown-menu-v2/separator.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts +0 -16
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/styles.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/test/index.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/types.d.ts.map +0 -1
- package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +0 -1
- package/src/dropdown-menu-v2/context.tsx +0 -13
- package/src/dropdown-menu-v2/group.tsx +0 -26
- package/src/dropdown-menu-v2/separator.tsx +0 -27
- package/src/dropdown-menu-v2/stories/index.story.tsx +0 -639
- /package/build/{dropdown-menu-v2 → menu}/types.js +0 -0
- /package/build/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
- /package/build-module/{dropdown-menu-v2 → menu}/types.js +0 -0
- /package/build-module/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
- /package/build-types/{dropdown-menu-v2 → menu}/test/index.d.ts +0 -0
- /package/build-types/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.d.ts +0 -0
- /package/src/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.ts +0 -0
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import type * as Ariakit from '@ariakit/react';
|
|
5
5
|
import type { Placement } from '@floating-ui/react-dom';
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface MenuContext {
|
|
8
8
|
/**
|
|
9
|
-
* The ariakit store shared across all
|
|
9
|
+
* The ariakit store shared across all Menu subcomponents.
|
|
10
10
|
*/
|
|
11
11
|
store: Ariakit.MenuStore;
|
|
12
12
|
/**
|
|
@@ -15,33 +15,33 @@ export interface DropdownMenuContext {
|
|
|
15
15
|
variant?: 'toolbar';
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export interface
|
|
18
|
+
export interface MenuProps {
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
20
|
+
* The button triggering the menu popover.
|
|
21
21
|
*/
|
|
22
22
|
trigger: React.ReactElement;
|
|
23
23
|
/**
|
|
24
|
-
* The contents of the
|
|
24
|
+
* The contents of the menu (ie. one or more menu items).
|
|
25
25
|
*/
|
|
26
26
|
children?: React.ReactNode;
|
|
27
27
|
/**
|
|
28
|
-
* The open state of the
|
|
28
|
+
* The open state of the menu popover when it is initially rendered. Use when
|
|
29
29
|
* not wanting to control its open state.
|
|
30
30
|
*
|
|
31
31
|
* @default false
|
|
32
32
|
*/
|
|
33
33
|
defaultOpen?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* The controlled open state of the
|
|
35
|
+
* The controlled open state of the menu popover. Must be used in conjunction
|
|
36
36
|
* with `onOpenChange`.
|
|
37
37
|
*/
|
|
38
38
|
open?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
* Event handler called when the open state of the
|
|
40
|
+
* Event handler called when the open state of the menu popover changes.
|
|
41
41
|
*/
|
|
42
42
|
onOpenChange?: ( open: boolean ) => void;
|
|
43
43
|
/**
|
|
44
|
-
* The modality of the
|
|
44
|
+
* The modality of the menu popover. When set to true, interaction with
|
|
45
45
|
* outside elements will be disabled and only menu content will be visible to
|
|
46
46
|
* screen readers.
|
|
47
47
|
*
|
|
@@ -49,7 +49,7 @@ export interface DropdownMenuProps {
|
|
|
49
49
|
*/
|
|
50
50
|
modal?: boolean;
|
|
51
51
|
/**
|
|
52
|
-
* The placement of the
|
|
52
|
+
* The placement of the menu popover.
|
|
53
53
|
*
|
|
54
54
|
* @default 'bottom-start' for root-level menus, 'right-start' for nested menus
|
|
55
55
|
*/
|
|
@@ -80,21 +80,22 @@ export interface DropdownMenuProps {
|
|
|
80
80
|
) => boolean );
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export interface
|
|
83
|
+
export interface MenuGroupProps {
|
|
84
84
|
/**
|
|
85
|
-
* The contents of the
|
|
85
|
+
* The contents of the menu group (ie. an optional menu group label and one
|
|
86
|
+
* or more menu items).
|
|
86
87
|
*/
|
|
87
88
|
children: React.ReactNode;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
export interface
|
|
91
|
+
export interface MenuGroupLabelProps {
|
|
91
92
|
/**
|
|
92
|
-
* The contents of the
|
|
93
|
+
* The contents of the menu group label.
|
|
93
94
|
*/
|
|
94
95
|
children: React.ReactNode;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
export interface
|
|
98
|
+
export interface MenuItemProps {
|
|
98
99
|
/**
|
|
99
100
|
* The contents of the menu item.
|
|
100
101
|
*/
|
|
@@ -108,7 +109,7 @@ export interface DropdownMenuItemProps {
|
|
|
108
109
|
*/
|
|
109
110
|
suffix?: React.ReactNode;
|
|
110
111
|
/**
|
|
111
|
-
* Whether to hide the
|
|
112
|
+
* Whether to hide the menu popover when the menu item is clicked.
|
|
112
113
|
*
|
|
113
114
|
* @default true
|
|
114
115
|
*/
|
|
@@ -119,10 +120,10 @@ export interface DropdownMenuItemProps {
|
|
|
119
120
|
disabled?: boolean;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
export interface
|
|
123
|
-
extends Omit<
|
|
123
|
+
export interface MenuCheckboxItemProps
|
|
124
|
+
extends Omit< MenuItemProps, 'prefix' | 'hideOnClick' > {
|
|
124
125
|
/**
|
|
125
|
-
* Whether to hide the
|
|
126
|
+
* Whether to hide the menu popover when the menu item is clicked.
|
|
126
127
|
*
|
|
127
128
|
* @default false
|
|
128
129
|
*/
|
|
@@ -151,10 +152,10 @@ export interface DropdownMenuCheckboxItemProps
|
|
|
151
152
|
onChange?: ( event: React.ChangeEvent< HTMLInputElement > ) => void;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
export interface
|
|
155
|
-
extends Omit<
|
|
155
|
+
export interface MenuRadioItemProps
|
|
156
|
+
extends Omit< MenuItemProps, 'prefix' | 'hideOnClick' > {
|
|
156
157
|
/**
|
|
157
|
-
* Whether to hide the
|
|
158
|
+
* Whether to hide the menu popover when the menu item is clicked.
|
|
158
159
|
*
|
|
159
160
|
* @default false
|
|
160
161
|
*/
|
|
@@ -182,4 +183,4 @@ export interface DropdownMenuRadioItemProps
|
|
|
182
183
|
onChange?: ( event: React.ChangeEvent< HTMLInputElement > ) => void;
|
|
183
184
|
}
|
|
184
185
|
|
|
185
|
-
export interface
|
|
186
|
+
export interface MenuSeparatorProps {}
|
package/src/menu-item/index.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`MenuItem should match snapshot when all props provided 1`] = `
|
|
4
4
|
<button
|
|
5
5
|
aria-checked="true"
|
|
6
|
-
class="components-button components-menu-item__button my-class"
|
|
6
|
+
class="components-button components-menu-item__button my-class is-next-40px-default-size"
|
|
7
7
|
role="menuitemcheckbox"
|
|
8
8
|
type="button"
|
|
9
9
|
>
|
|
@@ -35,7 +35,7 @@ exports[`MenuItem should match snapshot when all props provided 1`] = `
|
|
|
35
35
|
|
|
36
36
|
exports[`MenuItem should match snapshot when info is provided 1`] = `
|
|
37
37
|
<button
|
|
38
|
-
class="components-button components-menu-item__button"
|
|
38
|
+
class="components-button components-menu-item__button is-next-40px-default-size"
|
|
39
39
|
role="menuitem"
|
|
40
40
|
type="button"
|
|
41
41
|
>
|
|
@@ -62,7 +62,7 @@ exports[`MenuItem should match snapshot when info is provided 1`] = `
|
|
|
62
62
|
|
|
63
63
|
exports[`MenuItem should match snapshot when isSelected and role are optionally provided 1`] = `
|
|
64
64
|
<button
|
|
65
|
-
class="components-button components-menu-item__button my-class"
|
|
65
|
+
class="components-button components-menu-item__button my-class is-next-40px-default-size"
|
|
66
66
|
role="menuitem"
|
|
67
67
|
type="button"
|
|
68
68
|
>
|
|
@@ -94,7 +94,7 @@ exports[`MenuItem should match snapshot when isSelected and role are optionally
|
|
|
94
94
|
|
|
95
95
|
exports[`MenuItem should match snapshot when only label provided 1`] = `
|
|
96
96
|
<button
|
|
97
|
-
class="components-button components-menu-item__button"
|
|
97
|
+
class="components-button components-menu-item__button is-next-40px-default-size"
|
|
98
98
|
role="menuitem"
|
|
99
99
|
type="button"
|
|
100
100
|
>
|
|
@@ -71,9 +71,9 @@ const BottomSheetNavigationScreen = ( {
|
|
|
71
71
|
* callbacks triggered based upon which screen is currently active.
|
|
72
72
|
*
|
|
73
73
|
* Related: https://github.com/WordPress/gutenberg/pull/36328#discussion_r768897546
|
|
74
|
+
*
|
|
75
|
+
* Also see https://github.com/WordPress/gutenberg/pull/41166.
|
|
74
76
|
*/
|
|
75
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
76
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
77
|
}, [] )
|
|
78
78
|
);
|
|
79
79
|
|
|
@@ -130,9 +130,7 @@ const BottomSheetNavigationScreen = ( {
|
|
|
130
130
|
</TouchableHighlight>
|
|
131
131
|
</ScrollView>
|
|
132
132
|
);
|
|
133
|
-
//
|
|
134
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
135
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
136
134
|
}, [
|
|
137
135
|
children,
|
|
138
136
|
isFocused,
|
|
@@ -165,7 +165,7 @@ class BottomSheetRangeCell extends Component {
|
|
|
165
165
|
|
|
166
166
|
const getAccessibilityLabel = () => {
|
|
167
167
|
return sprintf(
|
|
168
|
-
/* translators: accessibility text. Inform about current value.
|
|
168
|
+
/* translators: accessibility text. Inform about current value. 1: Control label. 2: setting label (example: width). 3: Current value. 4: value measurement unit (example: pixels) */
|
|
169
169
|
__( '%1$s. %2$s is %3$s %4$s.' ),
|
|
170
170
|
cellProps.label,
|
|
171
171
|
settingLabel,
|
|
@@ -159,7 +159,7 @@ class BottomSheetStepperCell extends Component {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
const accessibilityLabel = sprintf(
|
|
162
|
-
/* translators: accessibility text. Inform about current value.
|
|
162
|
+
/* translators: accessibility text. Inform about current value. 1: Control label. 2: setting label (example: width). 3: Current value. 4: value measurement unit (example: pixels) */
|
|
163
163
|
__( '%1$s. %2$s is %3$s %4$s.' ),
|
|
164
164
|
label,
|
|
165
165
|
settingLabel,
|
|
@@ -28,9 +28,7 @@ const BottomSheetSubSheet = ( {
|
|
|
28
28
|
if ( showSheet ) {
|
|
29
29
|
setIsFullScreen( isFullScreen );
|
|
30
30
|
}
|
|
31
|
-
//
|
|
32
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
33
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
34
32
|
}, [ showSheet, isFullScreen ] );
|
|
35
33
|
|
|
36
34
|
return (
|
|
@@ -64,7 +64,7 @@ const BottomSheetSelectControl = ( {
|
|
|
64
64
|
onPress={ openSubSheet }
|
|
65
65
|
accessibilityRole="button"
|
|
66
66
|
accessibilityLabel={ sprintf(
|
|
67
|
-
// translators:
|
|
67
|
+
// translators: 1: Select control button label e.g. "Button width". 2: Select control option value e.g: "Auto, 25%".
|
|
68
68
|
__( '%1$s. Currently selected: %2$s' ),
|
|
69
69
|
label,
|
|
70
70
|
selectedOption.label
|
|
@@ -102,7 +102,7 @@ const BottomSheetSelectControl = ( {
|
|
|
102
102
|
accessibilityLabel={
|
|
103
103
|
item.value === selectedValue
|
|
104
104
|
? sprintf(
|
|
105
|
-
// translators: %s:
|
|
105
|
+
// translators: %s: The selected option.
|
|
106
106
|
__( 'Selected: %s' ),
|
|
107
107
|
item.label
|
|
108
108
|
)
|
|
@@ -35,9 +35,7 @@ const ColorSettingsMemo = memo(
|
|
|
35
35
|
useEffect( () => {
|
|
36
36
|
shouldEnableBottomSheetMaxHeight( true );
|
|
37
37
|
onHandleClosingBottomSheet( null );
|
|
38
|
-
//
|
|
39
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
40
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
41
39
|
}, [] );
|
|
42
40
|
return (
|
|
43
41
|
<BottomSheet.NavigationContainer>
|
|
@@ -43,9 +43,7 @@ const PickerScreen = () => {
|
|
|
43
43
|
onHandleHardwareButtonPress={ onHandleHardwareButtonPress }
|
|
44
44
|
/>
|
|
45
45
|
);
|
|
46
|
-
//
|
|
47
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
48
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
49
47
|
}, [
|
|
50
48
|
setColor,
|
|
51
49
|
currentValue,
|
|
@@ -112,9 +112,7 @@ const ImageComponent = ( {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
return () => ( isCurrent = false );
|
|
115
|
-
//
|
|
116
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
117
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
118
116
|
}, [ url ] );
|
|
119
117
|
|
|
120
118
|
const onContainerLayout = ( event ) => {
|
|
@@ -69,9 +69,7 @@ export const KeyboardAvoidingView = ( {
|
|
|
69
69
|
keyboardShowSubscription.remove();
|
|
70
70
|
keyboardHideSubscription.remove();
|
|
71
71
|
};
|
|
72
|
-
//
|
|
73
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
74
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
75
73
|
}, [] );
|
|
76
74
|
|
|
77
75
|
function onSafeAreaInsetsUpdate( { safeAreaInsets } ) {
|
|
@@ -75,9 +75,8 @@ export default function LinkPickerResults( {
|
|
|
75
75
|
return {
|
|
76
76
|
fetchMoreSuggestions: debounce( fetchMore, REQUEST_DEBOUNCE_DELAY ),
|
|
77
77
|
};
|
|
78
|
-
//
|
|
78
|
+
// Not adding dependencies for now, to avoid introducing a regression
|
|
79
79
|
// (see https://github.com/WordPress/gutenberg/pull/23922#discussion_r1170634879).
|
|
80
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
80
|
}, [] );
|
|
82
81
|
|
|
83
82
|
// Prevent setting state when unmounted.
|
|
@@ -90,9 +89,7 @@ export default function LinkPickerResults( {
|
|
|
90
89
|
setHasAllSuggestions( false );
|
|
91
90
|
setLinks( [ directEntry ] );
|
|
92
91
|
fetchMoreSuggestions( { query, links: [ directEntry ] } );
|
|
93
|
-
//
|
|
94
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
95
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
92
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
96
93
|
}, [ query ] );
|
|
97
94
|
|
|
98
95
|
const onEndReached = () => fetchMoreSuggestions( { query, links } );
|
|
@@ -53,9 +53,7 @@ const LinkPickerScreen = ( { returnScreenName } ) => {
|
|
|
53
53
|
onCancel={ onCancel }
|
|
54
54
|
/>
|
|
55
55
|
);
|
|
56
|
-
//
|
|
57
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
58
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
59
57
|
}, [ inputValue ] );
|
|
60
58
|
};
|
|
61
59
|
|
|
@@ -101,9 +101,7 @@ function LinkSettings( {
|
|
|
101
101
|
if ( onHandleClosingBottomSheet ) {
|
|
102
102
|
onHandleClosingBottomSheet( onCloseSettingsSheet );
|
|
103
103
|
}
|
|
104
|
-
//
|
|
105
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
106
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
107
105
|
}, [ urlInputValue, labelInputValue, linkRelInputValue ] );
|
|
108
106
|
|
|
109
107
|
useEffect( () => {
|
|
@@ -115,9 +113,7 @@ function LinkSettings( {
|
|
|
115
113
|
if ( url !== urlInputValue ) {
|
|
116
114
|
setUrlInputValue( url || '' );
|
|
117
115
|
}
|
|
118
|
-
//
|
|
119
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
120
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
116
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
121
117
|
}, [ url ] );
|
|
122
118
|
|
|
123
119
|
useEffect( () => {
|
|
@@ -141,9 +137,7 @@ function LinkSettings( {
|
|
|
141
137
|
if ( prevEditorSidebarOpened && ! editorSidebarOpened ) {
|
|
142
138
|
onSetAttributes();
|
|
143
139
|
}
|
|
144
|
-
//
|
|
145
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
146
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
140
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
147
141
|
}, [ editorSidebarOpened, isVisible ] );
|
|
148
142
|
|
|
149
143
|
useEffect( () => {
|
|
@@ -156,9 +150,7 @@ function LinkSettings( {
|
|
|
156
150
|
url: prependHTTP( urlValue ),
|
|
157
151
|
} );
|
|
158
152
|
}
|
|
159
|
-
//
|
|
160
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
161
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
153
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
162
154
|
}, [ urlValue ] );
|
|
163
155
|
|
|
164
156
|
const onChangeURL = useCallback(
|
|
@@ -188,9 +180,7 @@ function LinkSettings( {
|
|
|
188
180
|
rel: linkRelInputValue,
|
|
189
181
|
} );
|
|
190
182
|
}
|
|
191
|
-
//
|
|
192
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
193
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
183
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
194
184
|
}, [ urlInputValue, labelInputValue, linkRelInputValue, setAttributes ] );
|
|
195
185
|
|
|
196
186
|
const onCloseSettingsSheet = useCallback( () => {
|
|
@@ -223,9 +213,7 @@ function LinkSettings( {
|
|
|
223
213
|
rel: updatedRel,
|
|
224
214
|
} );
|
|
225
215
|
},
|
|
226
|
-
//
|
|
227
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
228
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
216
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
229
217
|
[ linkRelInputValue ]
|
|
230
218
|
);
|
|
231
219
|
|
|
@@ -37,9 +37,7 @@ const LinkSettingsScreen = ( props ) => {
|
|
|
37
37
|
urlValue={ inputValue }
|
|
38
38
|
/>
|
|
39
39
|
);
|
|
40
|
-
//
|
|
41
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
42
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
43
41
|
}, [ props, inputValue, navigation, route ] );
|
|
44
42
|
};
|
|
45
43
|
|
|
@@ -74,18 +74,14 @@ const SegmentedControls = ( {
|
|
|
74
74
|
useEffect( () => {
|
|
75
75
|
setActiveSegmentIndex( selectedSegmentIndex );
|
|
76
76
|
segmentHandler( segments[ selectedSegmentIndex ] );
|
|
77
|
-
//
|
|
78
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
79
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
80
78
|
}, [] );
|
|
81
79
|
|
|
82
80
|
useEffect( () => {
|
|
83
81
|
positionAnimationValue.setValue(
|
|
84
82
|
calculateEndValue( activeSegmentIndex )
|
|
85
83
|
);
|
|
86
|
-
//
|
|
87
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
88
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
84
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
89
85
|
}, [ segmentsDimensions ] );
|
|
90
86
|
|
|
91
87
|
const containerStyle = usePreferredColorSchemeStyle(
|
|
@@ -66,9 +66,7 @@ const useConvertUnitToMobile = ( value, unit, styles ) => {
|
|
|
66
66
|
return () => {
|
|
67
67
|
dimensionsChangeSubscription.remove();
|
|
68
68
|
};
|
|
69
|
-
//
|
|
70
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
71
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
72
70
|
}, [] );
|
|
73
71
|
|
|
74
72
|
const onDimensionsChange = useCallback( ( { window } ) => {
|
|
@@ -85,9 +83,7 @@ const useConvertUnitToMobile = ( value, unit, styles ) => {
|
|
|
85
83
|
valueToConvert,
|
|
86
84
|
valueUnit
|
|
87
85
|
);
|
|
88
|
-
//
|
|
89
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
90
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
91
87
|
}, [ windowSizes, value, unit ] );
|
|
92
88
|
};
|
|
93
89
|
|
|
@@ -19,7 +19,8 @@ import type { ModalProps } from '../types';
|
|
|
19
19
|
|
|
20
20
|
const meta: Meta< typeof Modal > = {
|
|
21
21
|
component: Modal,
|
|
22
|
-
title: 'Components/Modal',
|
|
22
|
+
title: 'Components/Overlays/Modal',
|
|
23
|
+
id: 'components-modal',
|
|
23
24
|
argTypes: {
|
|
24
25
|
children: {
|
|
25
26
|
control: { type: null },
|
|
@@ -9,7 +9,8 @@ import type { Meta, StoryFn } from '@storybook/react';
|
|
|
9
9
|
import { NavigableMenu } from '..';
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof NavigableMenu > = {
|
|
12
|
-
title: 'Components/NavigableMenu',
|
|
12
|
+
title: 'Components/Containers/NavigableMenu',
|
|
13
|
+
id: 'components-navigablemenu',
|
|
13
14
|
component: NavigableMenu,
|
|
14
15
|
argTypes: {
|
|
15
16
|
children: { control: { type: null } },
|
|
@@ -9,7 +9,8 @@ import type { Meta, StoryFn } from '@storybook/react';
|
|
|
9
9
|
import { TabbableContainer } from '..';
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof TabbableContainer > = {
|
|
12
|
-
title: 'Components/TabbableContainer',
|
|
12
|
+
title: 'Components/Containers/TabbableContainer',
|
|
13
|
+
id: 'components-tabbablecontainer',
|
|
13
14
|
component: TabbableContainer,
|
|
14
15
|
argTypes: {
|
|
15
16
|
children: { control: { type: null } },
|
package/src/navigation/index.tsx
CHANGED
|
@@ -104,9 +104,8 @@ export function Navigation( {
|
|
|
104
104
|
if ( activeMenu !== menu ) {
|
|
105
105
|
setActiveMenu( activeMenu );
|
|
106
106
|
}
|
|
107
|
-
//
|
|
107
|
+
// Not adding deps for now, as it would require either a larger refactor or some questionable workarounds.
|
|
108
108
|
// See https://github.com/WordPress/gutenberg/pull/41612 for context.
|
|
109
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
110
109
|
}, [ activeMenu ] );
|
|
111
110
|
|
|
112
111
|
const context = {
|
|
@@ -41,7 +41,7 @@ export const useNavigationTreeItem = (
|
|
|
41
41
|
return () => {
|
|
42
42
|
removeItem( itemId );
|
|
43
43
|
};
|
|
44
|
-
//
|
|
45
|
-
//
|
|
44
|
+
// Not adding deps for now, as it would require either a larger refactor.
|
|
45
|
+
// See https://github.com/WordPress/gutenberg/pull/41639
|
|
46
46
|
}, [ activeMenu, search ] );
|
|
47
47
|
};
|
|
@@ -55,8 +55,8 @@ function MenuTitleSearch( {
|
|
|
55
55
|
count
|
|
56
56
|
);
|
|
57
57
|
debouncedSpeak( resultsFoundMessage );
|
|
58
|
-
//
|
|
59
|
-
//
|
|
58
|
+
// Not adding deps for now, as it would require either a larger refactor.
|
|
59
|
+
// See https://github.com/WordPress/gutenberg/pull/44090
|
|
60
60
|
}, [ items, search ] );
|
|
61
61
|
|
|
62
62
|
const onClose = () => {
|
|
@@ -23,7 +23,7 @@ export const useNavigationTreeMenu = ( props: NavigationMenuProps ) => {
|
|
|
23
23
|
return () => {
|
|
24
24
|
removeMenu( key );
|
|
25
25
|
};
|
|
26
|
-
//
|
|
27
|
-
//
|
|
26
|
+
// Not adding deps for now, as it would require either a larger refactor
|
|
27
|
+
// See https://github.com/WordPress/gutenberg/pull/44090
|
|
28
28
|
}, [] );
|
|
29
29
|
};
|
|
@@ -21,7 +21,8 @@ const meta: Meta< typeof Navigator > = {
|
|
|
21
21
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
22
22
|
BackButton: Navigator.BackButton,
|
|
23
23
|
},
|
|
24
|
-
title: 'Components/Navigator',
|
|
24
|
+
title: 'Components/Navigation/Navigator',
|
|
25
|
+
id: 'components-navigator',
|
|
25
26
|
argTypes: {
|
|
26
27
|
as: { control: { type: null } },
|
|
27
28
|
children: { control: { type: null } },
|
package/src/notice/index.tsx
CHANGED
|
@@ -142,6 +142,7 @@ function Notice( {
|
|
|
142
142
|
|
|
143
143
|
return (
|
|
144
144
|
<Button
|
|
145
|
+
__next40pxDefaultSize
|
|
145
146
|
key={ index }
|
|
146
147
|
href={ url }
|
|
147
148
|
variant={ computedVariant }
|
|
@@ -160,6 +161,7 @@ function Notice( {
|
|
|
160
161
|
</div>
|
|
161
162
|
{ isDismissible && (
|
|
162
163
|
<Button
|
|
164
|
+
size="small"
|
|
163
165
|
className="components-notice__dismiss"
|
|
164
166
|
icon={ close }
|
|
165
167
|
label={ __( 'Close' ) }
|
|
@@ -17,7 +17,8 @@ import NoticeList from '../list';
|
|
|
17
17
|
import type { NoticeListProps } from '../types';
|
|
18
18
|
|
|
19
19
|
const meta: Meta< typeof Notice > = {
|
|
20
|
-
title: 'Components/Notice',
|
|
20
|
+
title: 'Components/Feedback/Notice',
|
|
21
|
+
id: 'components-notice',
|
|
21
22
|
component: Notice,
|
|
22
23
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
23
24
|
subcomponents: { NoticeList },
|
|
@@ -109,7 +110,11 @@ export const NoticeListSubcomponent: StoryFn< typeof NoticeList > = () => {
|
|
|
109
110
|
return (
|
|
110
111
|
<>
|
|
111
112
|
<NoticeList notices={ notices } onRemove={ removeNotice } />
|
|
112
|
-
<Button
|
|
113
|
+
<Button
|
|
114
|
+
__next40pxDefaultSize
|
|
115
|
+
variant="primary"
|
|
116
|
+
onClick={ resetNotices }
|
|
117
|
+
>
|
|
113
118
|
Reset Notices
|
|
114
119
|
</Button>
|
|
115
120
|
</>
|
|
@@ -21,19 +21,19 @@ exports[`Notice should match snapshot 1`] = `
|
|
|
21
21
|
class="components-notice__actions"
|
|
22
22
|
>
|
|
23
23
|
<a
|
|
24
|
-
class="components-button components-notice__action is-link"
|
|
24
|
+
class="components-button components-notice__action is-next-40px-default-size is-link"
|
|
25
25
|
href="https://example.com"
|
|
26
26
|
>
|
|
27
27
|
More information
|
|
28
28
|
</a>
|
|
29
29
|
<button
|
|
30
|
-
class="components-button components-notice__action is-secondary"
|
|
30
|
+
class="components-button components-notice__action is-next-40px-default-size is-secondary"
|
|
31
31
|
type="button"
|
|
32
32
|
>
|
|
33
33
|
Cancel
|
|
34
34
|
</button>
|
|
35
35
|
<button
|
|
36
|
-
class="components-button components-notice__action is-primary"
|
|
36
|
+
class="components-button components-notice__action is-next-40px-default-size is-primary"
|
|
37
37
|
type="button"
|
|
38
38
|
>
|
|
39
39
|
Submit
|
|
@@ -42,7 +42,7 @@ exports[`Notice should match snapshot 1`] = `
|
|
|
42
42
|
</div>
|
|
43
43
|
<button
|
|
44
44
|
aria-label="Close"
|
|
45
|
-
class="components-button components-notice__dismiss has-icon"
|
|
45
|
+
class="components-button components-notice__dismiss is-small has-icon"
|
|
46
46
|
type="button"
|
|
47
47
|
>
|
|
48
48
|
<svg
|