/*! * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ import { type ReactElement, ReactNode } from "react"; import type { HtmlProps } from "../HtmlProps.js"; import { FieldComponentProps } from "../FieldComponentProps.js"; import { NullElement } from "../NullElement.js"; import { buttonSizeValues, buttonVariantValues } from "./BaseButton.js"; export declare const menuAlignmentValues: readonly ["left", "right"]; export declare const verticalDividerAlignmentValues: readonly ["start", "end"]; export type BaseMenuButtonProps = { /** * The button children for the triggering Button. Only available internal to Odyssey here in BaseMenuButton. If set, buttonLabel is ignored. */ buttonChildren?: ReactNode; /** * The label on the triggering Button */ buttonLabel?: string; /** * The variant of the triggering Button */ buttonVariant?: (typeof buttonVariantValues)[number]; /** * The end Icon on the triggering Button */ endIcon?: ReactElement; /** * If `true`, renders a vertical divider adjacent to the button to separate it from surrounding content. */ hasVerticalDivider?: boolean; /** * The id of the Button */ id?: string; /** * If `true`, renders as an overflow (more-actions) trigger instead of a labeled menu button. */ isOverflow?: boolean; /** * The horizontal alignment of the menu. */ menuAlignment?: (typeof menuAlignmentValues)[number]; /** * If `true`, suppresses the default end icon rather than falling back to the overflow or chevron default. */ omitEndIcon?: boolean; /** * If `true`, the menu closes automatically when a child MenuItem is clicked. * @default true */ shouldCloseOnSelect?: boolean; /** * The size of the button */ size?: (typeof buttonSizeValues)[number]; /** * The tooltip text for the Button if it's icon-only */ tooltipText?: string; /** * Show vertical rule before or after the button */ verticalDividerAlignment?: (typeof verticalDividerAlignmentValues)[number]; }; export type AdditionalBaseMenuButtonProps = Pick & Pick & ({ buttonLabel: string; } | (Required> & Partial> & { buttonLabel?: undefined | ""; }) | (Required> & Partial> & { buttonLabel?: undefined | ""; })) & ({ /** * The components within the Menu. */ children: ReactNode | NullElement; /** * popoverContent is disallowed if children are present */ popoverContent?: never; } | { /** * children is disallowed if popoverContent is present */ children?: never; /** * The content for the popover that is triggered on click. */ popoverContent: ReactNode | NullElement; }); declare const MemoizedBaseMenuButton: import("react").MemoExoticComponent<({ ariaLabel, ariaLabelledBy, ariaDescribedBy, buttonChildren, buttonLabel, buttonVariant, children, popoverContent, endIcon: endIconProp, hasVerticalDivider, id: idOverride, isDisabled, isOverflow, menuAlignment, omitEndIcon, shouldCloseOnSelect, size, testId, tooltipText, translate, verticalDividerAlignment, }: BaseMenuButtonProps & AdditionalBaseMenuButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element>; export { MemoizedBaseMenuButton as BaseMenuButton }; //# sourceMappingURL=BaseMenuButton.d.ts.map