@wordpress/components 23.9.0 → 25.0.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 +62 -0
- package/CONTRIBUTING.md +75 -1
- package/README.md +1 -3
- package/build/autocomplete/autocompleter-ui.js +0 -2
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/index.js +2 -0
- package/build/autocomplete/index.js.map +1 -1
- package/build/button/index.js +2 -0
- package/build/button/index.js.map +1 -1
- package/build/card/card-media/component.js +2 -1
- package/build/card/card-media/component.js.map +1 -1
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +7 -5
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/styles.js +3 -3
- package/build/combobox-control/styles.js.map +1 -1
- package/build/date-time/date-time/index.js +3 -84
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/date-time/styles.js +4 -19
- package/build/date-time/date-time/styles.js.map +1 -1
- package/build/dimension-control/index.js +1 -1
- package/build/dimension-control/index.js.map +1 -1
- package/build/draggable/index.js +2 -7
- package/build/draggable/index.js.map +1 -1
- package/build/dropdown-menu/index.js +87 -11
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/types.js +6 -0
- package/build/dropdown-menu/types.js.map +1 -0
- package/build/dropdown-menu-v2/index.js +195 -0
- package/build/dropdown-menu-v2/index.js.map +1 -0
- package/build/dropdown-menu-v2/styles.js +176 -0
- package/build/dropdown-menu-v2/styles.js.map +1 -0
- package/build/dropdown-menu-v2/types.js +6 -0
- package/build/dropdown-menu-v2/types.js.map +1 -0
- package/build/form-token-field/index.js +5 -3
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/styles.js +3 -3
- package/build/form-token-field/styles.js.map +1 -1
- package/build/index.native.js +0 -9
- package/build/index.native.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +30 -23
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +16 -8
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +3 -2
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js +8 -2
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/index.native.js +13 -1
- package/build/mobile/global-styles-context/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +3 -1
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/navigable-container/container.js +39 -19
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/index.js.map +1 -1
- package/build/navigable-container/menu.js +37 -5
- package/build/navigable-container/menu.js.map +1 -1
- package/build/navigable-container/tabbable.js +45 -4
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigable-container/types.js +6 -0
- package/build/navigable-container/types.js.map +1 -0
- package/build/palette-edit/index.js +34 -12
- package/build/palette-edit/index.js.map +1 -1
- package/build/private-apis.js +13 -1
- package/build/private-apis.js.map +1 -1
- package/build/range-control/index.native.js +5 -2
- package/build/range-control/index.native.js.map +1 -1
- package/build/sandbox/index.native.js +6 -2
- package/build/sandbox/index.native.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +2 -1
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +45 -35
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot.js +11 -26
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/fill.js +7 -31
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/index.js.map +1 -1
- package/build/slot-fill/provider.js +0 -6
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +0 -5
- package/build/slot-fill/slot.js.map +1 -1
- package/build/snackbar/list.js +0 -2
- package/build/snackbar/list.js.map +1 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/theme/color-algorithms.js +1 -1
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +1 -2
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +4 -2
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/utils/colors-values.js +3 -3
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/use-deprecated-props.js +35 -0
- package/build/utils/use-deprecated-props.js.map +1 -0
- package/build-module/autocomplete/autocompleter-ui.js +1 -3
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/index.js +3 -3
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/button/index.js +2 -0
- package/build-module/button/index.js.map +1 -1
- package/build-module/card/card-media/component.js +2 -1
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +6 -5
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/styles.js +3 -3
- package/build-module/combobox-control/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js +6 -81
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/date-time/styles.js +3 -17
- package/build-module/date-time/date-time/styles.js.map +1 -1
- package/build-module/dimension-control/index.js +1 -1
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/draggable/index.js +2 -7
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/dropdown-menu/index.js +87 -10
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/types.js +2 -0
- package/build-module/dropdown-menu/types.js.map +1 -0
- package/build-module/dropdown-menu-v2/index.js +149 -0
- package/build-module/dropdown-menu-v2/index.js.map +1 -0
- package/build-module/dropdown-menu-v2/styles.js +153 -0
- package/build-module/dropdown-menu-v2/styles.js.map +1 -0
- package/build-module/dropdown-menu-v2/types.js +2 -0
- package/build-module/dropdown-menu-v2/types.js.map +1 -0
- package/build-module/form-token-field/index.js +4 -3
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/styles.js +3 -3
- package/build-module/form-token-field/styles.js.map +1 -1
- package/build-module/index.native.js +0 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +30 -23
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +16 -8
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +3 -2
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js +7 -2
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/index.native.js +13 -1
- package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +3 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/navigable-container/container.js +43 -19
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigable-container/index.js +0 -2
- package/build-module/navigable-container/index.js.map +1 -1
- package/build-module/navigable-container/menu.js +36 -4
- package/build-module/navigable-container/menu.js.map +1 -1
- package/build-module/navigable-container/tabbable.js +44 -3
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigable-container/types.js +2 -0
- package/build-module/navigable-container/types.js.map +1 -0
- package/build-module/palette-edit/index.js +34 -13
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/private-apis.js +12 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/range-control/index.native.js +5 -2
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/sandbox/index.native.js +6 -2
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +2 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +46 -36
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +12 -27
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/fill.js +7 -31
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/index.js +1 -2
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/provider.js +0 -6
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +0 -5
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/snackbar/list.js +0 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/theme/color-algorithms.js +1 -1
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +1 -2
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +5 -2
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/utils/colors-values.js +3 -3
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/use-deprecated-props.js +25 -0
- package/build-module/utils/use-deprecated-props.js.map +1 -0
- package/build-style/style-rtl.css +67 -67
- package/build-style/style.css +67 -67
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/autocomplete/types.d.ts +2 -18
- package/build-types/autocomplete/types.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts +6 -0
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/types.d.ts +7 -0
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/card/card-media/component.d.ts +2 -1
- package/build-types/card/card-media/component.d.ts.map +1 -1
- package/build-types/card/stories/index.d.ts +21 -1
- package/build-types/card/stories/index.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts +1 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.d.ts.map +1 -1
- package/build-types/combobox-control/styles.d.ts +1 -1
- package/build-types/combobox-control/types.d.ts +8 -1
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts +3 -4
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +0 -4
- package/build-types/date-time/date-time/styles.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.d.ts.map +1 -1
- package/build-types/date-time/types.d.ts +0 -14
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +1 -1
- package/build-types/draggable/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +83 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.d.ts +13 -0
- package/build-types/dropdown-menu/stories/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/test/index.d.ts +2 -0
- package/build-types/dropdown-menu/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/types.d.ts +134 -0
- package/build-types/dropdown-menu/types.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/index.d.ts +17 -0
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/stories/index.d.ts +13 -0
- package/build-types/dropdown-menu-v2/stories/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/styles.d.ts +41 -0
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/test/index.d.ts +2 -0
- package/build-types/dropdown-menu-v2/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/types.d.ts +242 -0
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -0
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +1 -1
- package/build-types/form-token-field/types.d.ts +8 -1
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +20 -1
- package/build-types/navigable-container/container.d.ts.map +1 -1
- package/build-types/navigable-container/index.d.ts +5 -2
- package/build-types/navigable-container/index.d.ts.map +1 -1
- package/build-types/navigable-container/menu.d.ts +45 -11
- package/build-types/navigable-container/menu.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.d.ts +12 -0
- package/build-types/navigable-container/stories/navigable-menu.d.ts.map +1 -0
- package/build-types/navigable-container/stories/tabbable-container.d.ts +12 -0
- package/build-types/navigable-container/stories/tabbable-container.d.ts.map +1 -0
- package/build-types/navigable-container/tabbable.d.ts +52 -9
- package/build-types/navigable-container/tabbable.d.ts.map +1 -1
- package/build-types/navigable-container/test/navigable-menu.d.ts +2 -0
- package/build-types/navigable-container/test/navigable-menu.d.ts.map +1 -0
- package/build-types/navigable-container/test/tababble-container.d.ts +2 -0
- package/build-types/navigable-container/test/tababble-container.d.ts.map +1 -0
- package/build-types/navigable-container/types.d.ts +61 -0
- package/build-types/navigable-container/types.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/component.d.ts +1 -0
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +1 -0
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +1 -0
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +1 -0
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -0
- package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.d.ts.map +1 -1
- package/build-types/palette-edit/types.d.ts +8 -0
- package/build-types/palette-edit/types.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts +4 -2
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +1 -2
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts +0 -2
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +6 -0
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts +6 -4
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/tree-grid/types.d.ts +7 -0
- package/build-types/tree-grid/types.d.ts.map +1 -1
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts +1 -10
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/build-types/utils/use-deprecated-props.d.ts +9 -0
- package/build-types/utils/use-deprecated-props.d.ts.map +1 -0
- package/package.json +21 -20
- package/src/autocomplete/README.md +78 -52
- package/src/autocomplete/autocompleter-ui.tsx +0 -2
- package/src/autocomplete/index.tsx +1 -2
- package/src/autocomplete/types.ts +3 -19
- package/src/button/index.tsx +2 -0
- package/src/button/style.scss +18 -18
- package/src/button/types.ts +7 -0
- package/src/card/card-media/README.md +1 -1
- package/src/card/card-media/component.tsx +2 -1
- package/src/card/stories/index.tsx +47 -26
- package/src/checkbox-control/style.scss +1 -4
- package/src/color-picker/styles.ts +7 -2
- package/src/combobox-control/index.tsx +24 -18
- package/src/combobox-control/stories/index.tsx +0 -1
- package/src/combobox-control/styles.ts +4 -4
- package/src/combobox-control/types.ts +8 -1
- package/src/custom-gradient-picker/style.scss +2 -2
- package/src/date-time/README.md +0 -16
- package/src/date-time/date-time/index.tsx +17 -155
- package/src/date-time/date-time/styles.ts +0 -4
- package/src/date-time/stories/date-time.tsx +0 -4
- package/src/date-time/types.ts +0 -16
- package/src/dimension-control/index.tsx +1 -1
- package/src/draggable/index.tsx +1 -9
- package/src/dropdown-menu/README.md +12 -22
- package/src/dropdown-menu/{index.js → index.tsx} +111 -25
- package/src/dropdown-menu/stories/{index.js → index.tsx} +14 -22
- package/src/dropdown-menu/test/{index.js → index.tsx} +6 -5
- package/src/dropdown-menu/types.ts +143 -0
- package/src/dropdown-menu-v2/README.md +392 -0
- package/src/dropdown-menu-v2/index.tsx +241 -0
- package/src/dropdown-menu-v2/stories/index.tsx +193 -0
- package/src/dropdown-menu-v2/styles.ts +263 -0
- package/src/dropdown-menu-v2/test/index.tsx +816 -0
- package/src/dropdown-menu-v2/types.ts +250 -0
- package/src/form-toggle/style.scss +1 -5
- package/src/form-token-field/index.tsx +7 -3
- package/src/form-token-field/styles.ts +4 -4
- package/src/form-token-field/types.ts +8 -1
- package/src/index.native.js +0 -1
- package/src/input-control/styles/input-control-styles.tsx +7 -0
- package/src/mobile/bottom-sheet/cell.native.js +26 -5
- package/src/mobile/bottom-sheet/range-cell.native.js +2 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +2 -0
- package/src/mobile/bottom-sheet/styles.native.scss +13 -1
- package/src/mobile/bottom-sheet/switch-cell.native.js +10 -2
- package/src/mobile/bottom-sheet-select-control/index.native.js +2 -0
- package/src/mobile/bottom-sheet-text-control/index.native.js +2 -0
- package/src/mobile/global-styles-context/index.native.js +12 -1
- package/src/mobile/link-picker/link-picker-results.native.js +3 -0
- package/src/modal/style.scss +1 -1
- package/src/navigable-container/README.md +24 -13
- package/src/navigable-container/{container.js → container.tsx} +57 -27
- package/src/navigable-container/{index.js → index.tsx} +0 -1
- package/src/navigable-container/menu.tsx +100 -0
- package/src/navigable-container/stories/{navigable-menu.js → navigable-menu.tsx} +15 -10
- package/src/navigable-container/stories/{tabbable-container.js → tabbable-container.tsx} +15 -6
- package/src/navigable-container/tabbable.tsx +92 -0
- package/src/navigable-container/test/{navigable-menu.js → navigable-menu.tsx} +3 -1
- package/src/navigable-container/test/{tababble-container.js → tababble-container.tsx} +53 -24
- package/src/navigable-container/types.ts +76 -0
- package/src/palette-edit/index.tsx +45 -7
- package/src/palette-edit/stories/index.tsx +4 -0
- package/src/palette-edit/types.ts +11 -0
- package/src/private-apis.ts +22 -0
- package/src/range-control/index.native.js +3 -0
- package/src/sandbox/index.native.js +4 -0
- package/src/search-control/style.scss +2 -0
- package/src/slot-fill/bubbles-virtually/fill.js +2 -1
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +46 -60
- package/src/slot-fill/bubbles-virtually/use-slot.js +14 -41
- package/src/slot-fill/fill.js +4 -26
- package/src/slot-fill/index.js +1 -3
- package/src/slot-fill/provider.js +0 -6
- package/src/slot-fill/slot.js +0 -5
- package/src/snackbar/list.tsx +0 -1
- package/src/style.scss +6 -0
- package/src/tab-panel/index.tsx +1 -1
- package/src/theme/color-algorithms.ts +1 -1
- package/src/theme/stories/index.tsx +1 -1
- package/src/theme/test/color-algorithms.ts +2 -2
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +10 -6
- package/src/toggle-group-control/toggle-group-control/styles.ts +6 -1
- package/src/toolbar/stories/index.tsx +25 -26
- package/src/toolbar/toolbar-button/index.tsx +10 -13
- package/src/toolbar/toolbar-item/{index.js → index.tsx} +12 -3
- package/src/tooltip/style.scss +2 -2
- package/src/tree-grid/README.md +18 -0
- package/src/tree-grid/types.ts +7 -0
- package/src/utils/colors-values.js +3 -3
- package/src/utils/theme-variables.scss +4 -4
- package/src/utils/use-deprecated-props.ts +29 -0
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/mobile/readable-content-view/index.native.js +0 -97
- package/build/mobile/readable-content-view/index.native.js.map +0 -1
- package/build-module/mobile/readable-content-view/index.native.js +0 -81
- package/build-module/mobile/readable-content-view/index.native.js.map +0 -1
- package/src/CONTRIBUTING.md +0 -78
- package/src/README.md +0 -20
- package/src/mobile/readable-content-view/index.native.js +0 -85
- package/src/mobile/readable-content-view/style.native.scss +0 -30
- package/src/navigable-container/menu.js +0 -62
- package/src/navigable-container/tabbable.js +0 -46
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { ButtonAsButtonProps } from '../button/types';
|
|
9
|
+
import type { WordPressComponentProps } from '../ui/context';
|
|
10
|
+
import type { DropdownProps } from '../dropdown/types';
|
|
11
|
+
import type { Props as IconProps } from '../icon';
|
|
12
|
+
import type { NavigableMenuProps } from '../navigable-container/types';
|
|
13
|
+
|
|
14
|
+
export type DropdownOption = {
|
|
15
|
+
/**
|
|
16
|
+
* The Dashicon icon slug to be shown for the option.
|
|
17
|
+
*/
|
|
18
|
+
icon?: IconProps[ 'icon' ];
|
|
19
|
+
/**
|
|
20
|
+
* A human-readable title to display for the option.
|
|
21
|
+
*/
|
|
22
|
+
title: string;
|
|
23
|
+
/**
|
|
24
|
+
* Whether or not the option is disabled.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
isDisabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* A callback function to invoke when the option is selected.
|
|
31
|
+
*/
|
|
32
|
+
onClick?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Whether or not the control is currently active.
|
|
35
|
+
*/
|
|
36
|
+
isActive?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Text to use for the internal `Button` component's tooltip.
|
|
39
|
+
*/
|
|
40
|
+
label?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The role to apply to the option's HTML element
|
|
43
|
+
*/
|
|
44
|
+
role?: HTMLElement[ 'role' ];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type DropdownCallbackProps = {
|
|
48
|
+
isOpen: boolean;
|
|
49
|
+
onToggle: () => void;
|
|
50
|
+
onClose: () => void;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Manually including `as` prop because `WordPressComponentProps` polymorhpism
|
|
54
|
+
// creates a union that is too large for TypeScript to handle.
|
|
55
|
+
type ToggleProps = Partial<
|
|
56
|
+
Omit<
|
|
57
|
+
WordPressComponentProps< ButtonAsButtonProps, 'button', false >,
|
|
58
|
+
'label' | 'text'
|
|
59
|
+
>
|
|
60
|
+
> & {
|
|
61
|
+
as?: React.ElementType | keyof JSX.IntrinsicElements;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type DropdownMenuProps = {
|
|
65
|
+
/**
|
|
66
|
+
* The Dashicon icon slug to be shown in the collapsed menu button.
|
|
67
|
+
*
|
|
68
|
+
* @default "menu"
|
|
69
|
+
*/
|
|
70
|
+
icon?: IconProps[ 'icon' ] | null;
|
|
71
|
+
/**
|
|
72
|
+
* A human-readable label to present as accessibility text on the focused
|
|
73
|
+
* collapsed menu button.
|
|
74
|
+
*/
|
|
75
|
+
label: string;
|
|
76
|
+
/**
|
|
77
|
+
* A class name to apply to the dropdown menu's toggle element wrapper.
|
|
78
|
+
*/
|
|
79
|
+
className?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Properties of `popoverProps` object will be passed as props to the nested
|
|
82
|
+
* `Popover` component.
|
|
83
|
+
* Use this object to modify props available for the `Popover` component that
|
|
84
|
+
* are not already exposed in the `DropdownMenu` component, e.g.: the
|
|
85
|
+
* direction in which the popover should open relative to its parent node
|
|
86
|
+
* set with `position` prop.
|
|
87
|
+
*/
|
|
88
|
+
popoverProps?: DropdownProps[ 'popoverProps' ];
|
|
89
|
+
/**
|
|
90
|
+
* Properties of `toggleProps` object will be passed as props to the nested
|
|
91
|
+
* `Button` component in the `renderToggle` implementation of the `Dropdown`
|
|
92
|
+
* component used internally.
|
|
93
|
+
* Use this object to modify props available for the `Button` component that
|
|
94
|
+
* are not already exposed in the `DropdownMenu` component, e.g.: the tooltip
|
|
95
|
+
* text displayed on hover set with `tooltip` prop.
|
|
96
|
+
*/
|
|
97
|
+
toggleProps?: ToggleProps;
|
|
98
|
+
/**
|
|
99
|
+
* Properties of `menuProps` object will be passed as props to the nested
|
|
100
|
+
* `NavigableMenu` component in the `renderContent` implementation of the
|
|
101
|
+
* `Dropdown` component used internally.
|
|
102
|
+
* Use this object to modify props available for the `NavigableMenu`
|
|
103
|
+
* component that are not already exposed in the `DropdownMenu` component,
|
|
104
|
+
* e.g.: the orientation of the menu set with `orientation` prop.
|
|
105
|
+
*/
|
|
106
|
+
menuProps?: Omit< Partial< NavigableMenuProps >, 'children' >;
|
|
107
|
+
/**
|
|
108
|
+
* In some contexts, the arrow down key used to open the dropdown menu might
|
|
109
|
+
* need to be disabled—for example when that key is used to perform another
|
|
110
|
+
* action.
|
|
111
|
+
*
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
disableOpenOnArrowDown?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Text to display on the nested `Button` component in the `renderToggle`
|
|
117
|
+
* implementation of the `Dropdown` component used internally.
|
|
118
|
+
*/
|
|
119
|
+
text?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Whether or not `no-icons` should be added to the menu's `className`.
|
|
122
|
+
*/
|
|
123
|
+
noIcons?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* A [function render prop](https://reactjs.org/docs/render-props.html#using-props-other-than-render)
|
|
126
|
+
* which should return an element or elements valid for use in a DropdownMenu:
|
|
127
|
+
* `MenuItem`, `MenuItemsChoice`, or `MenuGroup`. Its first argument is a
|
|
128
|
+
* props object including the same values as given to a `Dropdown`'s
|
|
129
|
+
* `renderContent` (`isOpen`, `onToggle`, `onClose`).
|
|
130
|
+
*
|
|
131
|
+
* A valid DropdownMenu must specify a `controls` or `children` prop, or both.
|
|
132
|
+
*/
|
|
133
|
+
children?: ( callbackProps: DropdownCallbackProps ) => ReactNode;
|
|
134
|
+
/**
|
|
135
|
+
* An array or nested array of objects describing the options to be shown in
|
|
136
|
+
* the expanded menu. Each object should include an `icon` Dashicon slug
|
|
137
|
+
* string, a human-readable `title` string, `isDisabled` boolean flag, and
|
|
138
|
+
* an `onClick` function callback to invoke when the option is selected.
|
|
139
|
+
*
|
|
140
|
+
* A valid DropdownMenu must specify a `controls` or `children` prop, or both.
|
|
141
|
+
*/
|
|
142
|
+
controls?: DropdownOption[] | DropdownOption[][];
|
|
143
|
+
};
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# `DropdownMenu` (v2)
|
|
2
|
+
|
|
3
|
+
<div class="callout callout-alert">
|
|
4
|
+
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
`DropdownMenu` displays a menu to the user (such as a set of actions or functions) triggered by a button.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Design guidelines
|
|
11
|
+
|
|
12
|
+
### Usage
|
|
13
|
+
|
|
14
|
+
#### When to use a DropdownMenu
|
|
15
|
+
|
|
16
|
+
Use a DropdownMenu when you want users to:
|
|
17
|
+
|
|
18
|
+
- Choose an action or change a setting from a list, AND
|
|
19
|
+
- Only see the available choices contextually.
|
|
20
|
+
|
|
21
|
+
`DropdownMenu` is a React component to render an expandable menu of buttons. It is similar in purpose to a `<select>` element, with the distinction that it does not maintain a value. Instead, each option behaves as an action button.
|
|
22
|
+
|
|
23
|
+
If you need to display all the available options at all times, consider using a Toolbar instead. Use a `DropdownMenu` to display a list of actions after the user interacts with a button.
|
|
24
|
+
|
|
25
|
+
**Do**
|
|
26
|
+
Use a `DropdownMenu` to display a list of actions after the user interacts with an icon.
|
|
27
|
+
|
|
28
|
+
**Don’t** use a `DropdownMenu` for important actions that should always be visible. Use a `Toolbar` instead.
|
|
29
|
+
|
|
30
|
+
**Don’t**
|
|
31
|
+
Don’t use a `DropdownMenu` for frequently used actions. Use a `Toolbar` instead.
|
|
32
|
+
|
|
33
|
+
#### Behavior
|
|
34
|
+
|
|
35
|
+
Generally, the parent button should indicate that interacting with it will show a `DropdownMenu`.
|
|
36
|
+
|
|
37
|
+
The parent button should retain the same visual styling regardless of whether the `DropdownMenu` is displayed or not.
|
|
38
|
+
|
|
39
|
+
#### Placement
|
|
40
|
+
|
|
41
|
+
The `DropdownMenu` should typically appear directly below, or below and to the left of, the parent button. If there isn’t enough space below to display the full `DropdownMenu`, it can be displayed instead above the parent button.
|
|
42
|
+
|
|
43
|
+
## Development guidelines
|
|
44
|
+
|
|
45
|
+
This component is still highly experimental, and it's not normally accessible to consumers of the `@wordpress/components` package.
|
|
46
|
+
|
|
47
|
+
The component exposes a set of components that are meant to be used in combination with each other in order to implement a `DropdownMenu` correctly.
|
|
48
|
+
|
|
49
|
+
### `DropdownMenu`
|
|
50
|
+
|
|
51
|
+
The root component, used to specify the menu's trigger and its contents.
|
|
52
|
+
|
|
53
|
+
#### Props
|
|
54
|
+
|
|
55
|
+
The component accepts the following props:
|
|
56
|
+
|
|
57
|
+
##### `trigger`: `React.ReactNode`
|
|
58
|
+
|
|
59
|
+
The trigger button
|
|
60
|
+
|
|
61
|
+
- Required: yes
|
|
62
|
+
|
|
63
|
+
##### `children`: `React.ReactNode`
|
|
64
|
+
|
|
65
|
+
The contents of the dropdown
|
|
66
|
+
|
|
67
|
+
- Required: yes
|
|
68
|
+
|
|
69
|
+
##### `defaultOpen`: `boolean`
|
|
70
|
+
|
|
71
|
+
The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state.
|
|
72
|
+
|
|
73
|
+
- Required: no
|
|
74
|
+
|
|
75
|
+
##### `open`: `boolean`
|
|
76
|
+
|
|
77
|
+
The controlled open state of the dropdown menu. Must be used in conjunction with `onOpenChange`
|
|
78
|
+
|
|
79
|
+
- Required: no
|
|
80
|
+
|
|
81
|
+
##### `onOpenChange`: `(open: boolean) => void`
|
|
82
|
+
|
|
83
|
+
Event handler called when the open state of the dropdown menu changes.
|
|
84
|
+
|
|
85
|
+
- Required: no
|
|
86
|
+
|
|
87
|
+
##### `modal`: `boolean`
|
|
88
|
+
|
|
89
|
+
The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
|
|
90
|
+
|
|
91
|
+
- Required: no
|
|
92
|
+
- Default: `true`
|
|
93
|
+
|
|
94
|
+
##### `side`: `"bottom" | "left" | "right" | "top"`
|
|
95
|
+
|
|
96
|
+
The preferred side of the trigger to render against when open. Will be reversed when collisions occur and avoidCollisions is enabled.
|
|
97
|
+
|
|
98
|
+
- Required: no
|
|
99
|
+
- Default: `"bottom"`
|
|
100
|
+
|
|
101
|
+
##### `sideOffset`: `number`
|
|
102
|
+
|
|
103
|
+
The distance in pixels from the trigger.
|
|
104
|
+
|
|
105
|
+
- Required: no
|
|
106
|
+
- Default: `0`
|
|
107
|
+
|
|
108
|
+
##### `align`: `"end" | "start" | "center"`
|
|
109
|
+
|
|
110
|
+
The preferred alignment against the trigger. May change when collisions occur.
|
|
111
|
+
|
|
112
|
+
- Required: no
|
|
113
|
+
- Default: `"center"`
|
|
114
|
+
|
|
115
|
+
##### `alignOffset`: `number`
|
|
116
|
+
|
|
117
|
+
An offset in pixels from the "start" or "end" alignment options.
|
|
118
|
+
|
|
119
|
+
- Required: no
|
|
120
|
+
- Default: `0`
|
|
121
|
+
|
|
122
|
+
### `DropdownMenuItem`
|
|
123
|
+
|
|
124
|
+
Used to render a menu item.
|
|
125
|
+
|
|
126
|
+
#### Props
|
|
127
|
+
|
|
128
|
+
The component accepts the following props:
|
|
129
|
+
|
|
130
|
+
##### `children`: `React.ReactNode`
|
|
131
|
+
|
|
132
|
+
The contents of the item
|
|
133
|
+
|
|
134
|
+
- Required: yes
|
|
135
|
+
|
|
136
|
+
##### `disabled`: `boolean`
|
|
137
|
+
|
|
138
|
+
- Required: no
|
|
139
|
+
- Default: `false`
|
|
140
|
+
|
|
141
|
+
##### `onSelect`: `(event: Event) => void`
|
|
142
|
+
|
|
143
|
+
Event handler called when the user selects an item (via mouse or keyboard). Calling `event.preventDefault` in this handler will prevent the dropdown menu from closing when selecting that item.
|
|
144
|
+
|
|
145
|
+
- Required: no
|
|
146
|
+
|
|
147
|
+
##### `textValue`: `string`
|
|
148
|
+
|
|
149
|
+
Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
150
|
+
|
|
151
|
+
- Required: no
|
|
152
|
+
|
|
153
|
+
##### `prefix`: `React.ReactNode`
|
|
154
|
+
|
|
155
|
+
The contents of the item's prefix.
|
|
156
|
+
|
|
157
|
+
- Required: no
|
|
158
|
+
|
|
159
|
+
##### `suffix`: `React.ReactNode`
|
|
160
|
+
|
|
161
|
+
The contents of the item's suffix.
|
|
162
|
+
|
|
163
|
+
- Required: no
|
|
164
|
+
|
|
165
|
+
### `DropdownSubMenu`
|
|
166
|
+
|
|
167
|
+
Used to render a nested submenu.
|
|
168
|
+
|
|
169
|
+
#### Props
|
|
170
|
+
|
|
171
|
+
The component accepts the following props:
|
|
172
|
+
##### `trigger`: `React.ReactNode`
|
|
173
|
+
|
|
174
|
+
The contents rendered inside the trigger. The trigger should be an instance of the `DropdownSubMenuTrigger` component.
|
|
175
|
+
|
|
176
|
+
- Required: yes
|
|
177
|
+
|
|
178
|
+
##### `children`: `React.ReactNode`
|
|
179
|
+
|
|
180
|
+
The contents of the dropdown
|
|
181
|
+
|
|
182
|
+
- Required: yes
|
|
183
|
+
|
|
184
|
+
##### `defaultOpen`: `boolean`
|
|
185
|
+
|
|
186
|
+
The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state.
|
|
187
|
+
|
|
188
|
+
- Required: no
|
|
189
|
+
|
|
190
|
+
##### `open`: `boolean`
|
|
191
|
+
|
|
192
|
+
The controlled open state of the dropdown menu. Must be used in conjunction with `onOpenChange`
|
|
193
|
+
|
|
194
|
+
- Required: no
|
|
195
|
+
|
|
196
|
+
##### `onOpenChange`: `(open: boolean) => void`
|
|
197
|
+
|
|
198
|
+
Event handler called when the open state of the dropdown menu changes.
|
|
199
|
+
|
|
200
|
+
- Required: no
|
|
201
|
+
|
|
202
|
+
##### `disabled`: `boolean`
|
|
203
|
+
|
|
204
|
+
When `true`, prevents the user from interacting with the item.
|
|
205
|
+
|
|
206
|
+
- Required: no
|
|
207
|
+
|
|
208
|
+
##### `textValue`: `string`
|
|
209
|
+
|
|
210
|
+
Optional text used for typeahead purposes for the trigger. By default the typeahead behavior will use the `.textContent` of the trigger. Use this when the content is complex, or you have non-textual content inside.
|
|
211
|
+
|
|
212
|
+
- Required: no
|
|
213
|
+
|
|
214
|
+
### `DropdownSubMenuTrigger`
|
|
215
|
+
|
|
216
|
+
Used to render a submenu trigger.
|
|
217
|
+
|
|
218
|
+
#### Props
|
|
219
|
+
|
|
220
|
+
The component accepts the following props:
|
|
221
|
+
|
|
222
|
+
##### `children`: `React.ReactNode`
|
|
223
|
+
|
|
224
|
+
The contents of the item
|
|
225
|
+
|
|
226
|
+
- Required: yes
|
|
227
|
+
|
|
228
|
+
##### `prefix`: `React.ReactNode`
|
|
229
|
+
|
|
230
|
+
The contents of the item's prefix.
|
|
231
|
+
|
|
232
|
+
- Required: no
|
|
233
|
+
|
|
234
|
+
##### `suffix`: `React.ReactNode`
|
|
235
|
+
|
|
236
|
+
The contents of the item's suffix.
|
|
237
|
+
|
|
238
|
+
- Default: a chevron icon
|
|
239
|
+
- Required: The standard chevron icon for a submenu trigger
|
|
240
|
+
|
|
241
|
+
### `DropdownMenuCheckboxItem`
|
|
242
|
+
|
|
243
|
+
Used to render a checkbox item.
|
|
244
|
+
|
|
245
|
+
#### Props
|
|
246
|
+
|
|
247
|
+
The component accepts the following props:
|
|
248
|
+
|
|
249
|
+
##### `children`: `React.ReactNode`
|
|
250
|
+
|
|
251
|
+
The contents of the checkbox item
|
|
252
|
+
|
|
253
|
+
- Required: yes
|
|
254
|
+
|
|
255
|
+
##### `checked`: `boolean`
|
|
256
|
+
|
|
257
|
+
The controlled checked state of the item. Must be used in conjunction with `onCheckedChange`.
|
|
258
|
+
|
|
259
|
+
- Required: no
|
|
260
|
+
- Default: `false`
|
|
261
|
+
|
|
262
|
+
##### `onCheckedChange`: `(checked: boolean) => void)`
|
|
263
|
+
|
|
264
|
+
Event handler called when the checked state changes.
|
|
265
|
+
|
|
266
|
+
- Required: no
|
|
267
|
+
|
|
268
|
+
##### `disabled`: `boolean`
|
|
269
|
+
|
|
270
|
+
When `true`, prevents the user from interacting with the item.
|
|
271
|
+
|
|
272
|
+
- Required: no
|
|
273
|
+
|
|
274
|
+
##### `onSelect`: `(event: Event) => void`
|
|
275
|
+
|
|
276
|
+
Event handler called when the user selects an item (via mouse or keyboard). Calling `event.preventDefault` in this handler will prevent the dropdown menu from closing when selecting that item.
|
|
277
|
+
|
|
278
|
+
- Required: no
|
|
279
|
+
|
|
280
|
+
##### `textValue`: `string`
|
|
281
|
+
|
|
282
|
+
Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
283
|
+
|
|
284
|
+
- Required: no
|
|
285
|
+
|
|
286
|
+
##### `suffix`: `React.ReactNode`
|
|
287
|
+
|
|
288
|
+
The contents of the checkbox item's suffix.
|
|
289
|
+
|
|
290
|
+
- Required: no
|
|
291
|
+
|
|
292
|
+
### `DropdownMenuRadioGroup`
|
|
293
|
+
|
|
294
|
+
Used to render a radio group.
|
|
295
|
+
|
|
296
|
+
#### Props
|
|
297
|
+
|
|
298
|
+
The component accepts the following props:
|
|
299
|
+
|
|
300
|
+
##### `children`: `React.ReactNode`
|
|
301
|
+
|
|
302
|
+
The contents of the radio group
|
|
303
|
+
|
|
304
|
+
- Required: yes
|
|
305
|
+
|
|
306
|
+
##### `value`: `string`
|
|
307
|
+
|
|
308
|
+
The value of the selected item in the group.
|
|
309
|
+
|
|
310
|
+
- Required: no
|
|
311
|
+
|
|
312
|
+
##### `onValueChange`: `(value: string) => void`
|
|
313
|
+
|
|
314
|
+
Event handler called when the value changes.
|
|
315
|
+
|
|
316
|
+
- Required: no
|
|
317
|
+
|
|
318
|
+
### `DropdownMenuRadioItem`
|
|
319
|
+
|
|
320
|
+
Used to render a radio item.
|
|
321
|
+
|
|
322
|
+
#### Props
|
|
323
|
+
|
|
324
|
+
The component accepts the following props:
|
|
325
|
+
|
|
326
|
+
##### `children`: `React.ReactNode`
|
|
327
|
+
|
|
328
|
+
The contents of the item.
|
|
329
|
+
|
|
330
|
+
- Required: yes
|
|
331
|
+
|
|
332
|
+
##### `value`: `string`
|
|
333
|
+
|
|
334
|
+
The unique value of the item.
|
|
335
|
+
|
|
336
|
+
- Required: yes
|
|
337
|
+
|
|
338
|
+
##### `disabled`: `boolean`
|
|
339
|
+
|
|
340
|
+
When `true`, prevents the user from interacting with the item.
|
|
341
|
+
|
|
342
|
+
- Required: no
|
|
343
|
+
|
|
344
|
+
##### `onSelect`: `(event: Event) => void`
|
|
345
|
+
|
|
346
|
+
Event handler called when the user selects an item (via mouse or keyboard). Calling `event.preventDefault` in this handler will prevent the dropdown menu from closing when selecting that item.
|
|
347
|
+
|
|
348
|
+
- Required: no
|
|
349
|
+
|
|
350
|
+
##### `textValue`: `string`
|
|
351
|
+
|
|
352
|
+
Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the item. Use this when the content is complex, or you have non-textual content inside.
|
|
353
|
+
|
|
354
|
+
- Required: no
|
|
355
|
+
|
|
356
|
+
##### `suffix`: `React.ReactNode
|
|
357
|
+
|
|
358
|
+
The contents of the radio item's suffix.
|
|
359
|
+
|
|
360
|
+
- Required: no
|
|
361
|
+
|
|
362
|
+
### `DropdownMenuLabel`
|
|
363
|
+
|
|
364
|
+
Used to render a group label.
|
|
365
|
+
|
|
366
|
+
#### Props
|
|
367
|
+
|
|
368
|
+
The component accepts the following props:
|
|
369
|
+
|
|
370
|
+
##### `children`: `React.ReactNode`
|
|
371
|
+
|
|
372
|
+
The contents of the group.
|
|
373
|
+
|
|
374
|
+
- Required: yes
|
|
375
|
+
|
|
376
|
+
### `DropdownMenuGroup`
|
|
377
|
+
|
|
378
|
+
Used to group menu items.
|
|
379
|
+
|
|
380
|
+
#### Props
|
|
381
|
+
|
|
382
|
+
The component accepts the following props:
|
|
383
|
+
|
|
384
|
+
##### `children`: `React.ReactNode`
|
|
385
|
+
|
|
386
|
+
The contents of the group.
|
|
387
|
+
|
|
388
|
+
- Required: yes
|
|
389
|
+
|
|
390
|
+
### `DropdownMenuSeparatorProps`
|
|
391
|
+
|
|
392
|
+
Used to render a visual separator.
|