{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAkCM,MAAM,0DAAiB,CAAA,GAAA,oBAAY,EAA8C,CAAC;AAMlF,MAAM,4CAAwB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,QAAQ,KAAmB,EAAE,GAAiC;IACzI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,OAAO;IACvC,IAAI,cAAc,CAAA,GAAA,uCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,QAAQ;YAAC,aAAa,MAAM,WAAW,IAAI;QAAY;QACvD,kBAAkB;IACpB;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAClD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QACL,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,aAAa;QACnD,KAAK;QACL,MAAM,MAAM,IAAI,IAAI;QACpB,oBAAkB,MAAM,WAAW,IAAI;OACtC,YAAY,QAAQ;AAG3B","sources":["packages/react-aria-components/src/Toolbar.tsx"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaToolbarProps, useToolbar} from 'react-aria/useToolbar';\n\nimport {\n  ClassNameOrFunction,\n  ContextValue,\n  dom,\n  RenderProps,\n  SlotProps,\n  useContextProps,\n  useRenderProps\n} from './utils';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {forwardRefType, GlobalDOMAttributes, Orientation} from '@react-types/shared';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {createContext, ForwardedRef, forwardRef} from 'react';\n\nexport interface ToolbarRenderProps {\n  /**\n   * The current orientation of the toolbar.\n   * @selector [data-orientation]\n   */\n  orientation: Orientation\n}\n\nexport interface ToolbarProps extends AriaToolbarProps, SlotProps, RenderProps<ToolbarRenderProps>, GlobalDOMAttributes<HTMLDivElement> {\n  /**\n   * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.\n   * @default 'react-aria-Toolbar'\n   */\n  className?: ClassNameOrFunction<ToolbarRenderProps>\n}\n\nexport const ToolbarContext = createContext<ContextValue<ToolbarProps, HTMLDivElement>>({});\n\n/**\n * A toolbar is a container for a set of interactive controls, such as buttons, dropdown menus, or checkboxes,\n * with arrow key navigation.\n */\nexport const Toolbar = /*#__PURE__*/ (forwardRef as forwardRefType)(function Toolbar(props: ToolbarProps, ref: ForwardedRef<HTMLDivElement>) {\n  [props, ref] = useContextProps(props, ref, ToolbarContext);\n  let {toolbarProps} = useToolbar(props, ref);\n  let renderProps = useRenderProps({\n    ...props,\n    values: {orientation: props.orientation || 'horizontal'},\n    defaultClassName: 'react-aria-Toolbar'\n  });\n  let DOMProps = filterDOMProps(props, {global: true});\n  delete DOMProps.id;\n\n  return (\n    <dom.div\n      {...mergeProps(DOMProps, renderProps, toolbarProps)}\n      ref={ref}\n      slot={props.slot || undefined}\n      data-orientation={props.orientation || 'horizontal'}>\n      {renderProps.children}\n    </dom.div>\n  );\n});\n"],"names":[],"version":3,"file":"Toolbar.mjs.map"}