@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
package/src/tabs/types.ts
CHANGED
|
@@ -18,98 +18,138 @@ export type TabsContextProps =
|
|
|
18
18
|
|
|
19
19
|
export type TabsProps = {
|
|
20
20
|
/**
|
|
21
|
-
* The children elements, which should
|
|
22
|
-
* `Tabs.Tablist` component and
|
|
23
|
-
* components.
|
|
21
|
+
* The children elements, which should include one instance of the
|
|
22
|
+
* `Tabs.Tablist` component and as many instances of the `Tabs.TabPanel`
|
|
23
|
+
* components as there are `Tabs.Tab` components.
|
|
24
24
|
*/
|
|
25
|
-
children:
|
|
25
|
+
children: Ariakit.TabProps[ 'children' ];
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* (manual tab activation). See the official W3C docs
|
|
27
|
+
* Determines if the tab should be selected when it receives focus. If set to
|
|
28
|
+
* `false`, the tab will only be selected upon clicking, not when using arrow
|
|
29
|
+
* keys to shift focus (manual tab activation). See the official W3C docs
|
|
30
|
+
* for more info.
|
|
30
31
|
*
|
|
31
32
|
* @default true
|
|
32
33
|
*
|
|
33
34
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
|
|
34
35
|
*/
|
|
35
|
-
selectOnMove?:
|
|
36
|
+
selectOnMove?: Ariakit.TabStoreProps[ 'selectOnMove' ];
|
|
36
37
|
/**
|
|
37
|
-
* The id of the tab
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* The id of the tab whose panel is currently visible.
|
|
39
|
+
*
|
|
40
|
+
* If left `undefined`, it will be automatically set to the first enabled
|
|
41
|
+
* tab, and the component assumes it is being used in "uncontrolled" mode.
|
|
42
|
+
*
|
|
43
|
+
* Consequently, any value different than `undefined` will set the component
|
|
44
|
+
* in "controlled" mode. When in "controlled" mode, the `null` value will
|
|
45
|
+
* result in no tabs being selected, and the tablist becoming tabbable.
|
|
46
|
+
*/
|
|
47
|
+
selectedTabId?: Ariakit.TabStoreProps[ 'selectedId' ];
|
|
48
|
+
/**
|
|
49
|
+
* The id of the tab whose panel is currently visible.
|
|
50
|
+
*
|
|
51
|
+
* If left `undefined`, it will be automatically set to the first enabled
|
|
52
|
+
* tab. If set to `null`, no tab will be selected, and the tablist will be
|
|
53
|
+
* tabbable.
|
|
41
54
|
*
|
|
42
55
|
* Note: this prop will be overridden by the `selectedTabId` prop if it is
|
|
43
|
-
* provided
|
|
56
|
+
* provided (meaning the component will be used in "controlled" mode).
|
|
44
57
|
*/
|
|
45
|
-
defaultTabId?:
|
|
58
|
+
defaultTabId?: Ariakit.TabStoreProps[ 'defaultSelectedId' ];
|
|
46
59
|
/**
|
|
47
|
-
* The function called when
|
|
48
|
-
* It is passed the id of the newly selected tab as an argument.
|
|
60
|
+
* The function called when the `selectedTabId` changes.
|
|
49
61
|
*/
|
|
50
|
-
onSelect?:
|
|
51
|
-
|
|
62
|
+
onSelect?: Ariakit.TabStoreProps[ 'setSelectedId' ];
|
|
52
63
|
/**
|
|
53
|
-
* The
|
|
64
|
+
* The current active tab `id`. The active tab is the tab element within the
|
|
65
|
+
* tablist widget that has DOM focus.
|
|
66
|
+
* - `null` represents the tablist (ie. the base composite element). Users
|
|
67
|
+
* will be able to navigate out of it using arrow keys.
|
|
68
|
+
* - If `activeTabId` is initially set to `null`, the base composite element
|
|
69
|
+
* itself will have focus and users will be able to navigate to it using
|
|
70
|
+
* arrow keys.activeTabId
|
|
71
|
+
*/
|
|
72
|
+
activeTabId?: Ariakit.TabStoreProps[ 'activeId' ];
|
|
73
|
+
/**
|
|
74
|
+
* The tab id that should be active by default when the composite widget is
|
|
75
|
+
* rendered. If `null`, the tablist element itself will have focus
|
|
76
|
+
* and users will be able to navigate to it using arrow keys. If `undefined`,
|
|
77
|
+
* the first enabled item will be focused.
|
|
54
78
|
*
|
|
55
|
-
*
|
|
79
|
+
* Note: this prop will be overridden by the `activeTabId` prop if it is
|
|
80
|
+
* provided.
|
|
81
|
+
*/
|
|
82
|
+
defaultActiveTabId?: Ariakit.TabStoreProps[ 'defaultActiveId' ];
|
|
83
|
+
/**
|
|
84
|
+
* A callback that gets called when the `activeTabId` state changes.
|
|
56
85
|
*/
|
|
57
|
-
|
|
86
|
+
onActiveTabIdChange?: Ariakit.TabStoreProps[ 'setActiveId' ];
|
|
58
87
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
88
|
+
* Defines the orientation of the tablist and determines which arrow keys
|
|
89
|
+
* can be used to move focus:
|
|
90
|
+
* - `both`: all arrow keys work.
|
|
91
|
+
* - `horizontal`: only left and right arrow keys work.
|
|
92
|
+
* - `vertical`: only up and down arrow keys work.
|
|
61
93
|
*
|
|
62
|
-
*
|
|
63
|
-
* uncontrolled mode. Consequently, any value different than `undefined`
|
|
64
|
-
* will set the component in `controlled` mode.
|
|
65
|
-
* When in controlled mode, the `null` value will result in no tab being selected.
|
|
94
|
+
* @default "horizontal"
|
|
66
95
|
*/
|
|
67
|
-
|
|
96
|
+
orientation?: Ariakit.TabStoreProps[ 'orientation' ];
|
|
68
97
|
};
|
|
69
98
|
|
|
70
99
|
export type TabListProps = {
|
|
71
100
|
/**
|
|
72
|
-
* The children elements, which should
|
|
101
|
+
* The children elements, which should include one or more instances of the
|
|
102
|
+
* `Tabs.Tab` component.
|
|
73
103
|
*/
|
|
74
|
-
children
|
|
104
|
+
children: Ariakit.TabListProps[ 'children' ];
|
|
75
105
|
};
|
|
76
106
|
|
|
107
|
+
// TODO: consider prop name changes (tabId, selectedTabId)
|
|
108
|
+
// switch to auto-generated README
|
|
109
|
+
// compound technique
|
|
110
|
+
|
|
77
111
|
export type TabProps = {
|
|
78
112
|
/**
|
|
79
|
-
* The
|
|
80
|
-
*
|
|
81
|
-
* the corresponding `Tabs.TabPanel` component.
|
|
113
|
+
* The unique ID of the tab. It will be used to register the tab and match
|
|
114
|
+
* it to a corresponding `Tabs.TabPanel` component.
|
|
82
115
|
*/
|
|
83
|
-
tabId:
|
|
116
|
+
tabId: NonNullable< Ariakit.TabProps[ 'id' ] >;
|
|
84
117
|
/**
|
|
85
|
-
* The
|
|
118
|
+
* The contents of the tab.
|
|
86
119
|
*/
|
|
87
|
-
children?:
|
|
120
|
+
children?: Ariakit.TabProps[ 'children' ];
|
|
88
121
|
/**
|
|
89
|
-
* Determines if the tab
|
|
122
|
+
* Determines if the tab should be disabled. Note that disabled tabs can
|
|
123
|
+
* still be accessed via the keyboard when navigating through the tablist.
|
|
90
124
|
*
|
|
91
125
|
* @default false
|
|
92
126
|
*/
|
|
93
|
-
disabled?:
|
|
127
|
+
disabled?: Ariakit.TabProps[ 'disabled' ];
|
|
94
128
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
129
|
+
* Allows the component to be rendered as a different HTML element or React
|
|
130
|
+
* component. The value can be a React element or a function that takes in the
|
|
131
|
+
* original component props and gives back a React element with the props
|
|
132
|
+
* merged.
|
|
133
|
+
*
|
|
134
|
+
* By default, the tab will be rendered as a `button` element.
|
|
97
135
|
*/
|
|
98
|
-
render?:
|
|
136
|
+
render?: Ariakit.TabProps[ 'render' ];
|
|
99
137
|
};
|
|
100
138
|
|
|
101
139
|
export type TabPanelProps = {
|
|
102
140
|
/**
|
|
103
|
-
* The
|
|
141
|
+
* The contents of the tab panel.
|
|
104
142
|
*/
|
|
105
|
-
children?:
|
|
143
|
+
children?: Ariakit.TabPanelProps[ 'children' ];
|
|
106
144
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
145
|
+
* The unique `id` of the `Tabs.Tab` component controlling this panel. This
|
|
146
|
+
* connection is used to assign the `aria-labelledby` attribute to the tab
|
|
147
|
+
* panel and to determine if the tab panel should be visible.
|
|
148
|
+
*
|
|
149
|
+
* If not provided, this link is automatically established by matching the
|
|
150
|
+
* order of `Tabs.Tab` and `Tabs.TabPanel` elements in the DOM.
|
|
111
151
|
*/
|
|
112
|
-
tabId:
|
|
152
|
+
tabId: NonNullable< Ariakit.TabPanelProps[ 'tabId' ] >;
|
|
113
153
|
/**
|
|
114
154
|
* Determines whether or not the tabpanel element should be focusable.
|
|
115
155
|
* If `false`, pressing the tab key will skip over the tabpanel, and instead
|
|
@@ -117,5 +157,5 @@ export type TabPanelProps = {
|
|
|
117
157
|
*
|
|
118
158
|
* @default true
|
|
119
159
|
*/
|
|
120
|
-
focusable?:
|
|
160
|
+
focusable?: Ariakit.TabPanelProps[ 'focusable' ];
|
|
121
161
|
};
|
|
@@ -10,7 +10,8 @@ import { Text } from '../component';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof Text > = {
|
|
12
12
|
component: Text,
|
|
13
|
-
title: 'Components (Experimental)/Text',
|
|
13
|
+
title: 'Components (Experimental)/Typography/Text',
|
|
14
|
+
id: 'components-experimental-text',
|
|
14
15
|
argTypes: {
|
|
15
16
|
as: { control: { type: 'text' } },
|
|
16
17
|
color: { control: { type: 'color' } },
|
|
@@ -10,7 +10,8 @@ import TextHighlight from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof TextHighlight > = {
|
|
12
12
|
component: TextHighlight,
|
|
13
|
-
title: 'Components/TextHighlight',
|
|
13
|
+
title: 'Components/Typography/TextHighlight',
|
|
14
|
+
id: 'components-texthighlight',
|
|
14
15
|
parameters: {
|
|
15
16
|
controls: {
|
|
16
17
|
expanded: true,
|
|
@@ -13,7 +13,8 @@ import { HStack } from '../../h-stack';
|
|
|
13
13
|
|
|
14
14
|
const meta: Meta< typeof Theme > = {
|
|
15
15
|
component: Theme,
|
|
16
|
-
title: 'Components/Theme',
|
|
16
|
+
title: 'Components/Utilities/Theme',
|
|
17
|
+
id: 'components-theme',
|
|
17
18
|
argTypes: {
|
|
18
19
|
accent: { control: { type: 'color' } },
|
|
19
20
|
background: { control: { type: 'color' } },
|
|
@@ -52,12 +52,13 @@ function UnconnectedToggleGroupControl(
|
|
|
52
52
|
const [ controlElement, setControlElement ] = useState< HTMLElement >();
|
|
53
53
|
const refs = useMergeRefs( [ setControlElement, forwardedRef ] );
|
|
54
54
|
const selectedRect = useTrackElementOffsetRect(
|
|
55
|
-
value ? selectedElement : undefined
|
|
55
|
+
value || value === 0 ? selectedElement : undefined
|
|
56
56
|
);
|
|
57
57
|
useAnimatedOffsetRect( controlElement, selectedRect, {
|
|
58
58
|
prefix: 'selected',
|
|
59
59
|
dataAttribute: 'indicator-animated',
|
|
60
60
|
transitionEndFilter: ( event ) => event.pseudoElement === '::before',
|
|
61
|
+
roundRect: true,
|
|
61
62
|
} );
|
|
62
63
|
|
|
63
64
|
const cx = useCx();
|
|
@@ -54,11 +54,9 @@ export function useToolsPanelItem(
|
|
|
54
54
|
|
|
55
55
|
// hasValue is a new function on every render, so do not add it as a
|
|
56
56
|
// dependency to the useCallback hook! If needed, we should use a ref.
|
|
57
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
57
|
const hasValueCallback = useCallback( hasValue, [ panelId ] );
|
|
59
58
|
// resetAllFilter is a new function on every render, so do not add it as a
|
|
60
59
|
// dependency to the useCallback hook! If needed, we should use a ref.
|
|
61
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62
60
|
const resetAllFilterCallback = useCallback( resetAllFilter, [ panelId ] );
|
|
63
61
|
const previousPanelId = usePrevious( currentPanelId );
|
|
64
62
|
|
|
@@ -62,9 +62,7 @@ const useKeyboardVisibility = () => {
|
|
|
62
62
|
showListener.remove();
|
|
63
63
|
hideListener.remove();
|
|
64
64
|
};
|
|
65
|
-
//
|
|
66
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
67
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
68
66
|
}, [] );
|
|
69
67
|
|
|
70
68
|
return keyboardVisible;
|
|
@@ -105,9 +103,7 @@ const Tooltip = ( {
|
|
|
105
103
|
} );
|
|
106
104
|
}
|
|
107
105
|
return () => onHandleScreenTouch( null );
|
|
108
|
-
//
|
|
109
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
110
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
111
107
|
}, [ visible ] );
|
|
112
108
|
|
|
113
109
|
// Manage visibility animation.
|
|
@@ -121,9 +117,7 @@ const Tooltip = ( {
|
|
|
121
117
|
setAnimating( true );
|
|
122
118
|
startAnimation();
|
|
123
119
|
}
|
|
124
|
-
//
|
|
125
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
126
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
127
121
|
}, [ visible ] );
|
|
128
122
|
|
|
129
123
|
// Manage tooltip visibility and position in relation to keyboard.
|
|
@@ -142,9 +136,7 @@ const Tooltip = ( {
|
|
|
142
136
|
setAnimating( true );
|
|
143
137
|
setVisible( false );
|
|
144
138
|
}
|
|
145
|
-
//
|
|
146
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
147
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
139
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
148
140
|
}, [ visible, keyboardVisible ] );
|
|
149
141
|
|
|
150
142
|
// Manage tooltip position during keyboard frame changes.
|
|
@@ -273,9 +265,7 @@ const TooltipSlot = ( { children, ...rest } ) => {
|
|
|
273
265
|
setHandleScreenTouch( null );
|
|
274
266
|
};
|
|
275
267
|
// Memoize context value to avoid unnecessary rerenders of the Provider's children
|
|
276
|
-
//
|
|
277
|
-
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
278
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
268
|
+
// See https://github.com/WordPress/gutenberg/pull/41166
|
|
279
269
|
const value = useMemo( () => ( { onHandleScreenTouch } ) );
|
|
280
270
|
|
|
281
271
|
return (
|
|
@@ -15,7 +15,8 @@ import Tooltip from '..';
|
|
|
15
15
|
import Button from '../../button';
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof Tooltip > = {
|
|
18
|
-
title: 'Components/Tooltip',
|
|
18
|
+
title: 'Components/Overlays/Tooltip',
|
|
19
|
+
id: 'components-tooltip',
|
|
19
20
|
component: Tooltip,
|
|
20
21
|
argTypes: {
|
|
21
22
|
children: { control: { type: null } },
|
|
@@ -16,7 +16,8 @@ import { Button } from '../../button';
|
|
|
16
16
|
import InputControl from '../../input-control';
|
|
17
17
|
|
|
18
18
|
const meta: Meta< typeof TreeGrid > = {
|
|
19
|
-
title: 'Components (Experimental)/TreeGrid',
|
|
19
|
+
title: 'Components (Experimental)/Navigation/TreeGrid',
|
|
20
|
+
id: 'components-experimental-treegrid',
|
|
20
21
|
component: TreeGrid,
|
|
21
22
|
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
22
23
|
subcomponents: { TreeGridRow, TreeGridCell },
|
|
@@ -10,7 +10,8 @@ import { Truncate } from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof Truncate > = {
|
|
12
12
|
component: Truncate,
|
|
13
|
-
title: 'Components (Experimental)/Truncate',
|
|
13
|
+
title: 'Components (Experimental)/Typography/Truncate',
|
|
14
|
+
id: 'components-experimental-truncate',
|
|
14
15
|
argTypes: {
|
|
15
16
|
children: { control: { type: 'text' } },
|
|
16
17
|
as: { control: { type: 'text' } },
|
|
@@ -47,10 +47,8 @@ function UnitControl( {
|
|
|
47
47
|
if ( pickerRef?.current ) {
|
|
48
48
|
pickerRef.current.presentPicker();
|
|
49
49
|
}
|
|
50
|
-
//
|
|
51
|
-
// It would be great if this could be done in the context of
|
|
50
|
+
// It would be great if the deps could be addressed in the context of
|
|
52
51
|
// https://github.com/WordPress/gutenberg/pull/39218
|
|
53
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
52
|
}, [ pickerRef?.current ] );
|
|
55
53
|
|
|
56
54
|
const currentInputValue = currentInput === null ? value : currentInput;
|
|
@@ -106,10 +104,8 @@ function UnitControl( {
|
|
|
106
104
|
anchorNodeRef?.current
|
|
107
105
|
? findNodeHandle( anchorNodeRef?.current )
|
|
108
106
|
: undefined,
|
|
109
|
-
//
|
|
110
|
-
// It would be great if this could be done in the context of
|
|
107
|
+
// It would be great if the deps could be addressed in the context of
|
|
111
108
|
// https://github.com/WordPress/gutenberg/pull/39218
|
|
112
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
113
109
|
[ anchorNodeRef?.current ]
|
|
114
110
|
);
|
|
115
111
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import deprecated from '@wordpress/deprecated';
|
|
5
|
+
|
|
6
|
+
export function maybeWarnDeprecated36pxSize( {
|
|
7
|
+
componentName,
|
|
8
|
+
__next40pxDefaultSize,
|
|
9
|
+
size,
|
|
10
|
+
}: {
|
|
11
|
+
componentName: string;
|
|
12
|
+
__next40pxDefaultSize: boolean | undefined;
|
|
13
|
+
size: string | undefined;
|
|
14
|
+
} ) {
|
|
15
|
+
if (
|
|
16
|
+
__next40pxDefaultSize ||
|
|
17
|
+
( size !== undefined && size !== 'default' )
|
|
18
|
+
) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
deprecated( `36px default size for wp.components.${ componentName }`, {
|
|
23
|
+
since: '6.8',
|
|
24
|
+
version: '7.1',
|
|
25
|
+
hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.',
|
|
26
|
+
} );
|
|
27
|
+
}
|
|
@@ -134,14 +134,17 @@ const POLL_RATE = 100;
|
|
|
134
134
|
* milliseconds until it succeeds.
|
|
135
135
|
*/
|
|
136
136
|
export function useTrackElementOffsetRect(
|
|
137
|
-
targetElement: HTMLElement | undefined | null
|
|
137
|
+
targetElement: HTMLElement | undefined | null,
|
|
138
|
+
deps: unknown[] = []
|
|
138
139
|
) {
|
|
139
140
|
const [ indicatorPosition, setIndicatorPosition ] =
|
|
140
141
|
useState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );
|
|
141
142
|
const intervalRef = useRef< ReturnType< typeof setInterval > >();
|
|
142
143
|
|
|
143
144
|
const measure = useEvent( () => {
|
|
144
|
-
|
|
145
|
+
// Check that the targetElement is still attached to the DOM, in case
|
|
146
|
+
// it was removed since the last `measure` call.
|
|
147
|
+
if ( targetElement && targetElement.isConnected ) {
|
|
145
148
|
const elementOffsetRect = getElementOffsetRect( targetElement );
|
|
146
149
|
if ( elementOffsetRect ) {
|
|
147
150
|
setIndicatorPosition( elementOffsetRect );
|
|
@@ -171,6 +174,15 @@ export function useTrackElementOffsetRect(
|
|
|
171
174
|
}
|
|
172
175
|
}, [ setElement, targetElement ] );
|
|
173
176
|
|
|
177
|
+
// Escape hatch to force a remeasurement when something else changes rather
|
|
178
|
+
// than the target elements' ref or size (for example, the target element
|
|
179
|
+
// can change its position within the tablist).
|
|
180
|
+
useLayoutEffect( () => {
|
|
181
|
+
measure();
|
|
182
|
+
// `measure` is a stable function, so it's safe to omit it from the deps array.
|
|
183
|
+
// deps can't be statically analyzed by ESLint
|
|
184
|
+
}, deps );
|
|
185
|
+
|
|
174
186
|
return indicatorPosition;
|
|
175
187
|
}
|
|
176
188
|
|
|
@@ -46,6 +46,7 @@ export function useAnimatedOffsetRect(
|
|
|
46
46
|
prefix = 'subelement',
|
|
47
47
|
dataAttribute = `${ prefix }-animated`,
|
|
48
48
|
transitionEndFilter = () => true,
|
|
49
|
+
roundRect = false,
|
|
49
50
|
}: {
|
|
50
51
|
/**
|
|
51
52
|
* The prefix used for the CSS variables, e.g. if `prefix` is `selected`, the
|
|
@@ -72,6 +73,13 @@ export function useAnimatedOffsetRect(
|
|
|
72
73
|
* @default () => true
|
|
73
74
|
*/
|
|
74
75
|
transitionEndFilter?: ( event: TransitionEvent ) => boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the `rect` measurements should be rounded down when applied
|
|
78
|
+
* to the CSS variables. This can be useful to avoid blurry animations or
|
|
79
|
+
* to avoid subpixel rendering issues.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
roundRect?: boolean;
|
|
75
83
|
} = {}
|
|
76
84
|
) {
|
|
77
85
|
const setProperties = useEvent( () => {
|
|
@@ -80,7 +88,11 @@ export function useAnimatedOffsetRect(
|
|
|
80
88
|
property !== 'element' &&
|
|
81
89
|
container?.style.setProperty(
|
|
82
90
|
`--${ prefix }-${ property }`,
|
|
83
|
-
String(
|
|
91
|
+
String(
|
|
92
|
+
roundRect
|
|
93
|
+
? Math.floor( rect[ property ] )
|
|
94
|
+
: rect[ property ]
|
|
95
|
+
)
|
|
84
96
|
)
|
|
85
97
|
);
|
|
86
98
|
} );
|
|
@@ -19,11 +19,9 @@ function useUpdateEffect( effect, deps ) {
|
|
|
19
19
|
}
|
|
20
20
|
mountedRef.current = true;
|
|
21
21
|
return undefined;
|
|
22
|
-
// Disable reasons:
|
|
23
22
|
// 1. This hook needs to pass a dep list that isn't an array literal
|
|
24
23
|
// 2. `effect` is missing from the array, and will need to be added carefully to avoid additional warnings
|
|
25
24
|
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
26
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
25
|
}, deps );
|
|
28
26
|
|
|
29
27
|
useEffect(
|
|
@@ -10,7 +10,8 @@ import { VisuallyHidden } from '..';
|
|
|
10
10
|
|
|
11
11
|
const meta: Meta< typeof VisuallyHidden > = {
|
|
12
12
|
component: VisuallyHidden,
|
|
13
|
-
title: 'Components/VisuallyHidden',
|
|
13
|
+
title: 'Components/Typography/VisuallyHidden',
|
|
14
|
+
id: 'components-visuallyhidden',
|
|
14
15
|
argTypes: {
|
|
15
16
|
children: { control: { type: null } },
|
|
16
17
|
as: { control: { type: 'text' } },
|