@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
|
@@ -115,9 +115,8 @@ function ColorPalette( {
|
|
|
115
115
|
scrollViewRef.current.scrollTo( { x: 0, y: 0 } );
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
//
|
|
118
|
+
// Not adding additional dependencies until the component can be refactored and updated safely.
|
|
119
119
|
// Please see https://github.com/WordPress/gutenberg/pull/41253 for discussion and details.
|
|
120
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
121
120
|
}, [ currentSegment ] );
|
|
122
121
|
|
|
123
122
|
function isSelectedCustom() {
|
|
@@ -233,7 +233,7 @@ function UnforwardedColorPalette(
|
|
|
233
233
|
const displayValue = value?.replace( /^var\((.+)\)$/, '$1' );
|
|
234
234
|
const customColorAccessibleLabel = !! displayValue
|
|
235
235
|
? sprintf(
|
|
236
|
-
// translators:
|
|
236
|
+
// translators: 1: The name of the color e.g: "vivid red". 2: The color's hex code e.g: "#f00".
|
|
237
237
|
__(
|
|
238
238
|
'Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
|
|
239
239
|
),
|
|
@@ -26,10 +26,7 @@ $border-as-box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
|
|
|
26
26
|
&::after {
|
|
27
27
|
content: "";
|
|
28
28
|
position: absolute;
|
|
29
|
-
|
|
30
|
-
left: 0;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
29
|
+
inset: $border-width;
|
|
33
30
|
z-index: -1;
|
|
34
31
|
// The background image creates a checkerboard pattern. Ignore rtlcss to
|
|
35
32
|
// make it work both in LTR and RTL.
|
|
@@ -41,6 +38,7 @@ $border-as-box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
|
|
|
41
38
|
background-position: 0 0, 24px 24px;
|
|
42
39
|
/*rtl:end:ignore*/
|
|
43
40
|
background-size: calc(2 * 24px) calc(2 * 24px);
|
|
41
|
+
border-radius: $radius-medium - $border-width $radius-medium - $border-width 0 0;
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
|
|
@@ -111,7 +111,6 @@ function ColorPicker( {
|
|
|
111
111
|
// the hook’s dependencies and running it a single time. Ideally there
|
|
112
112
|
// may be a way to refactor and obviate the disabled lint rule. If not,
|
|
113
113
|
// this comment should be replaced by one that explains the reasoning.
|
|
114
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
114
|
}, [] );
|
|
116
115
|
|
|
117
116
|
function onButtonPress( action ) {
|
|
@@ -151,8 +151,11 @@ function proxyComposite< C extends Component >(
|
|
|
151
151
|
|
|
152
152
|
const { store, ...rest } =
|
|
153
153
|
mapLegacyStatePropsToComponentProps( legacyProps );
|
|
154
|
-
|
|
155
|
-
props
|
|
154
|
+
let props = rest as ComponentProps< C >;
|
|
155
|
+
props = {
|
|
156
|
+
...props,
|
|
157
|
+
id: useInstanceId( store, props.baseId, props.id ),
|
|
158
|
+
};
|
|
156
159
|
|
|
157
160
|
Object.entries( propMap ).forEach( ( [ from, to ] ) => {
|
|
158
161
|
if ( props.hasOwnProperty( from ) ) {
|
|
@@ -16,7 +16,8 @@ import { Composite } from '..';
|
|
|
16
16
|
import { Tooltip } from '../../tooltip';
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof Composite > = {
|
|
19
|
-
title: 'Components/Composite',
|
|
19
|
+
title: 'Components/Utilities/Composite',
|
|
20
|
+
id: 'components-composite',
|
|
20
21
|
component: Composite,
|
|
21
22
|
subcomponents: {
|
|
22
23
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
@@ -16,7 +16,8 @@ import { ConfirmDialog } from '../component';
|
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof ConfirmDialog > = {
|
|
18
18
|
component: ConfirmDialog,
|
|
19
|
-
title: 'Components (Experimental)/ConfirmDialog',
|
|
19
|
+
title: 'Components (Experimental)/Overlays/ConfirmDialog',
|
|
20
|
+
id: 'components-experimental-confirmdialog',
|
|
20
21
|
argTypes: {
|
|
21
22
|
isOpen: {
|
|
22
23
|
control: { type: null },
|
|
@@ -56,7 +56,7 @@ function ControlPointButton( {
|
|
|
56
56
|
<>
|
|
57
57
|
<Button
|
|
58
58
|
aria-label={ sprintf(
|
|
59
|
-
// translators:
|
|
59
|
+
// translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).
|
|
60
60
|
__(
|
|
61
61
|
'Gradient control point at position %1$s%% with color code %2$s.'
|
|
62
62
|
),
|
|
@@ -18,7 +18,8 @@ import TextareaControl from '../../textarea-control/';
|
|
|
18
18
|
import { VStack } from '../../v-stack/';
|
|
19
19
|
|
|
20
20
|
const meta: Meta< typeof Disabled > = {
|
|
21
|
-
title: 'Components/Disabled',
|
|
21
|
+
title: 'Components/Utilities/Disabled',
|
|
22
|
+
id: 'components-disabled',
|
|
22
23
|
component: Disabled,
|
|
23
24
|
argTypes: {
|
|
24
25
|
as: { control: { type: null } },
|
|
@@ -18,7 +18,8 @@ import Draggable from '..';
|
|
|
18
18
|
|
|
19
19
|
const meta: Meta< typeof Draggable > = {
|
|
20
20
|
component: Draggable,
|
|
21
|
-
title: 'Components/Draggable',
|
|
21
|
+
title: 'Components/Utilities/Draggable',
|
|
22
|
+
id: 'components-draggable',
|
|
22
23
|
argTypes: {
|
|
23
24
|
elementId: { control: { type: null } },
|
|
24
25
|
__experimentalDragComponent: { control: { type: null } },
|
|
@@ -13,7 +13,8 @@ import MenuItem from '../../menu-item';
|
|
|
13
13
|
import { DropdownContentWrapper } from '../dropdown-content-wrapper';
|
|
14
14
|
|
|
15
15
|
const meta: Meta< typeof Dropdown > = {
|
|
16
|
-
title: 'Components/Dropdown',
|
|
16
|
+
title: 'Components/Overlays/Dropdown',
|
|
17
|
+
id: 'components-dropdown',
|
|
17
18
|
component: Dropdown,
|
|
18
19
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
19
20
|
subcomponents: { DropdownContentWrapper },
|
|
@@ -10,7 +10,8 @@ import ExternalLink from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof ExternalLink > = {
|
|
12
12
|
component: ExternalLink,
|
|
13
|
-
title: 'Components/ExternalLink',
|
|
13
|
+
title: 'Components/Navigation/ExternalLink',
|
|
14
|
+
id: 'components-externallink',
|
|
14
15
|
argTypes: {
|
|
15
16
|
children: { control: { type: 'text' } },
|
|
16
17
|
},
|
|
@@ -9,7 +9,7 @@ import { View, useWindowDimensions } from 'react-native';
|
|
|
9
9
|
import { useNavigation } from '@react-navigation/native';
|
|
10
10
|
import { useState } from '@wordpress/element';
|
|
11
11
|
import { Icon, chevronRight, check } from '@wordpress/icons';
|
|
12
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
12
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
@@ -63,8 +63,8 @@ function FontSizePicker( {
|
|
|
63
63
|
} );
|
|
64
64
|
|
|
65
65
|
const accessibilityLabel = sprintf(
|
|
66
|
-
// translators: %
|
|
67
|
-
__( 'Font Size, %
|
|
66
|
+
// translators: %s: Font size name e.g. Small
|
|
67
|
+
__( 'Font Size, %s' ),
|
|
68
68
|
selectedOption.name
|
|
69
69
|
);
|
|
70
70
|
|
|
@@ -77,8 +77,8 @@ function FontSizePicker( {
|
|
|
77
77
|
value={
|
|
78
78
|
selectedValue
|
|
79
79
|
? sprintf(
|
|
80
|
-
// translators:
|
|
81
|
-
|
|
80
|
+
// translators: 1: Select control font size name e.g. Small. 2: Select control font size e.g. 12px
|
|
81
|
+
_x( '%1$s (%2$s)', 'font size' ),
|
|
82
82
|
selectedOption.name,
|
|
83
83
|
selectedPxValue
|
|
84
84
|
)
|
|
@@ -88,7 +88,7 @@ function FontSizePicker( {
|
|
|
88
88
|
accessibilityRole="button"
|
|
89
89
|
accessibilityLabel={ accessibilityLabel }
|
|
90
90
|
accessibilityHint={ sprintf(
|
|
91
|
-
// translators: %s: Select control button label e.g.
|
|
91
|
+
// translators: %s: Select control button label e.g. "Button width"
|
|
92
92
|
__( 'Navigates to select %s' ),
|
|
93
93
|
selectedOption.name
|
|
94
94
|
) }
|
|
@@ -143,7 +143,7 @@ function FontSizePicker( {
|
|
|
143
143
|
accessibilityLabel={
|
|
144
144
|
item.sizePx === selectedValue
|
|
145
145
|
? sprintf(
|
|
146
|
-
// translators: %s:
|
|
146
|
+
// translators: %s: The selected option.
|
|
147
147
|
__( 'Selected: %s' ),
|
|
148
148
|
item.name
|
|
149
149
|
)
|
|
@@ -47,6 +47,12 @@ export function FormFileUpload( {
|
|
|
47
47
|
{ children }
|
|
48
48
|
</Button>
|
|
49
49
|
);
|
|
50
|
+
// @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
|
|
51
|
+
// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
|
|
52
|
+
// This can be removed once the Chromium fix is in the stable channel.
|
|
53
|
+
const compatAccept = !! accept?.includes( 'image/*' )
|
|
54
|
+
? `${ accept }, image/heic, image/heif`
|
|
55
|
+
: accept;
|
|
50
56
|
|
|
51
57
|
return (
|
|
52
58
|
<div className="components-form-file-upload">
|
|
@@ -56,7 +62,7 @@ export function FormFileUpload( {
|
|
|
56
62
|
ref={ ref }
|
|
57
63
|
multiple={ multiple }
|
|
58
64
|
style={ { display: 'none' } }
|
|
59
|
-
accept={
|
|
65
|
+
accept={ compatAccept }
|
|
60
66
|
onChange={ onChange }
|
|
61
67
|
onClick={ onClick }
|
|
62
68
|
data-testid="form-file-upload-input"
|
|
@@ -124,17 +124,14 @@ export function FormTokenField( props: FormTokenFieldProps ) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// TODO: updateSuggestions() should first be refactored so its actual deps are clearer.
|
|
127
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
127
|
}, [ suggestions, prevSuggestions, value, prevValue ] );
|
|
129
128
|
|
|
130
129
|
useEffect( () => {
|
|
131
130
|
updateSuggestions();
|
|
132
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
131
|
}, [ incompleteTokenValue ] );
|
|
134
132
|
|
|
135
133
|
useEffect( () => {
|
|
136
134
|
updateSuggestions();
|
|
137
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
135
|
}, [ __experimentalAutoSelectFirstMatch ] );
|
|
139
136
|
|
|
140
137
|
if ( disabled && isActive ) {
|
|
@@ -81,7 +81,12 @@
|
|
|
81
81
|
|
|
82
82
|
.components-form-token-field__token-text {
|
|
83
83
|
background: transparent;
|
|
84
|
-
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:not(.is-disabled) {
|
|
87
|
+
.components-form-token-field__token-text {
|
|
88
|
+
color: $components-color-accent;
|
|
89
|
+
}
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
.components-form-token-field__remove-token {
|
|
@@ -90,7 +95,6 @@
|
|
|
90
95
|
position: absolute;
|
|
91
96
|
top: 1px;
|
|
92
97
|
right: 0;
|
|
93
|
-
padding: 0;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
&.is-success {
|
|
@@ -112,18 +116,11 @@
|
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
|
-
|
|
116
|
-
&.is-disabled {
|
|
117
|
-
.components-form-token-field__remove-token {
|
|
118
|
-
cursor: default;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
119
|
}
|
|
122
120
|
|
|
123
121
|
.components-form-token-field__token-text,
|
|
124
122
|
.components-form-token-field__remove-token.components-button {
|
|
125
123
|
display: inline-block;
|
|
126
|
-
line-height: 24px;
|
|
127
124
|
height: auto;
|
|
128
125
|
background: $gray-300;
|
|
129
126
|
min-width: unset;
|
|
@@ -134,20 +131,19 @@
|
|
|
134
131
|
.components-form-token-field__token-text {
|
|
135
132
|
border-radius: $radius-x-small 0 0 $radius-x-small;
|
|
136
133
|
padding: 0 0 0 8px;
|
|
134
|
+
line-height: 24px;
|
|
137
135
|
white-space: nowrap;
|
|
138
136
|
overflow: hidden;
|
|
139
137
|
text-overflow: ellipsis;
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
.components-form-token-field__remove-token.components-button {
|
|
143
|
-
cursor: pointer;
|
|
144
141
|
border-radius: 0 $radius-x-small $radius-x-small 0;
|
|
145
|
-
padding: 0 2px;
|
|
146
142
|
color: $gray-900;
|
|
147
143
|
line-height: 10px;
|
|
148
144
|
overflow: initial;
|
|
149
145
|
|
|
150
|
-
&:hover {
|
|
146
|
+
&:hover:not(:disabled) {
|
|
151
147
|
color: $gray-900;
|
|
152
148
|
}
|
|
153
149
|
}
|
|
@@ -173,7 +169,6 @@
|
|
|
173
169
|
padding: $grid-unit-10 $grid-unit-15;
|
|
174
170
|
min-height: $button-size-compact;
|
|
175
171
|
margin: 0;
|
|
176
|
-
cursor: pointer;
|
|
177
172
|
box-sizing: border-box;
|
|
178
173
|
|
|
179
174
|
&.is-selected {
|
|
@@ -189,4 +184,8 @@
|
|
|
189
184
|
background-color: $components-color-accent-transparent-40;
|
|
190
185
|
}
|
|
191
186
|
}
|
|
187
|
+
|
|
188
|
+
&:not(.is-empty) {
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
}
|
|
192
191
|
}
|
|
@@ -8,6 +8,7 @@ import type { MouseEventHandler, ReactNode } from 'react';
|
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
10
|
import { useRefEffect } from '@wordpress/compose';
|
|
11
|
+
import { __ } from '@wordpress/i18n';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Internal dependencies
|
|
@@ -156,6 +157,11 @@ export function SuggestionsList<
|
|
|
156
157
|
);
|
|
157
158
|
/* eslint-enable jsx-a11y/click-events-have-key-events */
|
|
158
159
|
} ) }
|
|
160
|
+
{ suggestions.length === 0 && (
|
|
161
|
+
<li className="components-form-token-field__suggestion is-empty">
|
|
162
|
+
{ __( 'No items found' ) }
|
|
163
|
+
</li>
|
|
164
|
+
) }
|
|
159
165
|
</ul>
|
|
160
166
|
);
|
|
161
167
|
}
|
|
@@ -72,6 +72,7 @@ export default function Token( {
|
|
|
72
72
|
|
|
73
73
|
<Button
|
|
74
74
|
className="components-form-token-field__remove-token"
|
|
75
|
+
size="small"
|
|
75
76
|
icon={ closeSmall }
|
|
76
77
|
onClick={ ! disabled ? onClick : undefined }
|
|
77
78
|
// Disable reason: Even when FormTokenField itself is accessibly disabled, token reset buttons shouldn't be in the tab sequence.
|
package/src/guide/style.scss
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
.components-guide__container {
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
justify-content: space-between;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
min-height: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
.components-guide__page {
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-direction: column;
|
|
48
48
|
justify-content: center;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
.components-guide__footer {
|
|
57
57
|
align-content: center;
|
|
58
58
|
display: flex;
|
|
59
59
|
height: $button-size;
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
width: 100%;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
.components-guide__page-control {
|
|
68
68
|
margin: 0;
|
|
69
69
|
text-align: center;
|
|
70
70
|
|
|
@@ -74,8 +74,6 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.components-button {
|
|
77
|
-
height: 30px;
|
|
78
|
-
min-width: 20px;
|
|
79
77
|
margin: -6px 0;
|
|
80
78
|
color: $gray-200;
|
|
81
79
|
}
|
|
@@ -10,7 +10,8 @@ import { Heading } from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof Heading > = {
|
|
12
12
|
component: Heading,
|
|
13
|
-
title: 'Components (Experimental)/Heading',
|
|
13
|
+
title: 'Components (Experimental)/Typography/Heading',
|
|
14
|
+
id: 'components-experimental-heading',
|
|
14
15
|
argTypes: {
|
|
15
16
|
as: { control: { type: 'text' } },
|
|
16
17
|
color: { control: { type: 'color' } },
|
|
@@ -37,6 +37,8 @@ const Template: StoryFn< typeof ItemGroup > = ( props ) => (
|
|
|
37
37
|
|
|
38
38
|
export const Default: StoryFn< typeof ItemGroup > = Template.bind( {} );
|
|
39
39
|
Default.args = {
|
|
40
|
+
isBordered: true,
|
|
41
|
+
isSeparated: true,
|
|
40
42
|
children: (
|
|
41
43
|
[
|
|
42
44
|
{
|
|
@@ -67,6 +69,7 @@ export const NonClickableItems: StoryFn< typeof ItemGroup > = Template.bind(
|
|
|
67
69
|
{}
|
|
68
70
|
);
|
|
69
71
|
NonClickableItems.args = {
|
|
72
|
+
...Default.args,
|
|
70
73
|
children: (
|
|
71
74
|
[
|
|
72
75
|
{
|
|
@@ -83,6 +86,7 @@ NonClickableItems.args = {
|
|
|
83
86
|
|
|
84
87
|
export const CustomItemSize: StoryFn< typeof ItemGroup > = Template.bind( {} );
|
|
85
88
|
CustomItemSize.args = {
|
|
89
|
+
...Default.args,
|
|
86
90
|
children: (
|
|
87
91
|
[
|
|
88
92
|
{
|
|
@@ -98,9 +102,9 @@ CustomItemSize.args = {
|
|
|
98
102
|
).map( mapPropsToItem ),
|
|
99
103
|
};
|
|
100
104
|
|
|
101
|
-
export const
|
|
102
|
-
|
|
105
|
+
export const WithoutBorder: StoryFn< typeof ItemGroup > = Template.bind( {} );
|
|
106
|
+
WithoutBorder.args = {
|
|
103
107
|
...Default.args,
|
|
104
|
-
isBordered:
|
|
105
|
-
isSeparated:
|
|
108
|
+
isBordered: false,
|
|
109
|
+
isSeparated: false,
|
|
106
110
|
};
|
|
@@ -10,7 +10,8 @@ import KeyboardShortcuts from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof KeyboardShortcuts > = {
|
|
12
12
|
component: KeyboardShortcuts,
|
|
13
|
-
title: 'Components/KeyboardShortcuts',
|
|
13
|
+
title: 'Components/Utilities/KeyboardShortcuts',
|
|
14
|
+
id: 'components-keyboardshortcuts',
|
|
14
15
|
parameters: {
|
|
15
16
|
controls: { expanded: true },
|
|
16
17
|
docs: { canvas: { sourceState: 'shown' } },
|