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,UAAU,aAAa,CAAC;QACpC,IAAI,MAAM,MAAM,KAAK,GACnB,OAAO;QAGT,IAAI,QAAQ;QACZ,OAAO,MAAM,GAAG,CAAC,CAAA;YACf,IAAI,KAAK,IAAI,KAAK,WAChB,qBAAO,0DAAC,CAAA,GAAA,qBAAO;gBAAE,KAAK;eAAQ,QAAQ,CAAC,QAAQ;iBAE/C,OAAO,KAAK,KAAK;QAErB;IACF,GAAG;QAAC;QAAe;QAAW;QAAW;KAAS;IAElD,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,iBAAiB,mBAAmB,eAAe,gBAAgB,MAAM,CAAC;QAC1E,kBAAkB;QAClB,QAAQ;YACN,cAAc,MAAM,aAAa,CAAC,EAAE,EAAE,SAAc;YACpD,eAAe,CAAA,GAAA,oBAAM,EAAE,IAAM,MAAM,aAAa,CAAC,GAAG,CAAC,CAAA,OAAQ,KAAK,KAAK,IAAS,OAAO;gBAAC,MAAM,aAAa;aAAC;0BAC5G;YACA,eAAe,MAAM,aAAa,CAAC,MAAM,KAAK;mBAC9C;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,IAAI;QAAC,KAAK;QAAM,GAAG,QAAQ;QAAG,GAAG,WAAW;QAAE,oBAAkB,MAAM,aAAa,CAAC,MAAM,KAAK,KAAK;qBAEvG,0DAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;QAAC,OAAO;OAC1B,YAAY,QAAQ;AAI7B","sources":["packages/react-aria-components/src/Select.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {AriaSelectProps, HiddenSelect, useSelect} from 'react-aria/useSelect';\n\nimport {ButtonContext} from './Button';\nimport {\n  ClassNameOrFunction,\n  ContextValue,\n  dom,\n  Provider,\n  RACValidation,\n  removeDataAttributes,\n  RenderProps,\n  SlotProps,\n  useContextProps,\n  useRenderProps,\n  useSlot,\n  useSlottedContext\n} from './utils';\nimport {Collection, Node} from '@react-types/shared';\nimport {CollectionBuilder} from 'react-aria/CollectionBuilder';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport intlMessages from '../intl/*.json';\nimport {ItemRenderProps} from './Collection';\nimport {LabelContext} from './Label';\nimport {ListBoxContext, ListStateContext} from './ListBox';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {OverlayTriggerStateContext} from './Dialog';\n// @ts-ignore\nimport {PopoverContext} from './Popover';\nimport React, {createContext, ForwardedRef, forwardRef, Fragment, HTMLAttributes, ReactNode, useCallback, useContext, useMemo, useRef, useState} from 'react';\nimport {SelectState, useSelectState} from 'react-stately/useSelectState';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useListFormatter} from 'react-aria/useListFormatter';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useResizeObserver} from 'react-aria/private/utils/useResizeObserver';\n\ntype SelectionMode = 'single' | 'multiple';\n\nexport interface SelectRenderProps {\n  /**\n   * Whether the select is focused, either via a mouse or keyboard.\n   * @selector [data-focused]\n   */\n  isFocused: boolean,\n  /**\n   * Whether the select is keyboard focused.\n   * @selector [data-focus-visible]\n   */\n  isFocusVisible: boolean,\n  /**\n   * Whether the select is disabled.\n   * @selector [data-disabled]\n   */\n  isDisabled: boolean,\n  /**\n   * Whether the select is currently open.\n   * @selector [data-open]\n   */\n  isOpen: boolean,\n  /**\n   * Whether the select is invalid.\n   * @selector [data-invalid]\n   */\n  isInvalid: boolean,\n  /**\n   * Whether the select is required.\n   * @selector [data-required]\n   */\n  isRequired: boolean\n}\n\nexport interface SelectProps<T extends object = {}, M extends SelectionMode = 'single'> extends Omit<AriaSelectProps<T, M>, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior' | 'items'>, RACValidation, RenderProps<SelectRenderProps>, SlotProps, 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-Select'\n   */\n  className?: ClassNameOrFunction<SelectRenderProps>,\n  /**\n   * Temporary text that occupies the select when it is empty.\n   * @default 'Select an item' (localized)\n   */\n  placeholder?: string\n}\n\nexport const SelectContext = createContext<ContextValue<SelectProps<any, SelectionMode>, HTMLDivElement>>(null);\nexport const SelectStateContext = createContext<SelectState<unknown, SelectionMode> | null>(null);\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport const Select = /*#__PURE__*/ (forwardRef as forwardRefType)(function Select<T extends object = {}, M extends SelectionMode = 'single'>(props: SelectProps<T, M>, ref: ForwardedRef<HTMLDivElement>) {\n  [props, ref] = useContextProps(props, ref, SelectContext);\n  let {children, isDisabled = false, isInvalid = false, isRequired = false} = props;\n  let content = useMemo(() => (\n    typeof children === 'function'\n      ? children({\n        isOpen: false,\n        isDisabled,\n        isInvalid,\n        isRequired,\n        isFocused: false,\n        isFocusVisible: false,\n        defaultChildren: null\n      })\n      : children\n  ), [children, isDisabled, isInvalid, isRequired]);\n\n  return (\n    <CollectionBuilder content={content}>\n      {collection => <SelectInner props={props} collection={collection} selectRef={ref} />}\n    </CollectionBuilder>\n  );\n});\n\n// Contexts to clear inside the popover.\nconst CLEAR_CONTEXTS = [LabelContext, ButtonContext, TextContext];\n\ninterface SelectInnerProps<T extends object> {\n  props: SelectProps<T, SelectionMode>,\n  selectRef: ForwardedRef<HTMLDivElement>,\n  collection: Collection<Node<T>>\n}\n\nfunction SelectInner<T extends object>({props, selectRef: ref, collection}: SelectInnerProps<T>) {\n  let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n  let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n  let state = useSelectState({\n    ...props,\n    collection,\n    children: undefined,\n    validationBehavior\n  });\n\n  let {isFocusVisible, focusProps} = useFocusRing({within: true});\n\n  // Get props for child elements from useSelect\n  let buttonRef = useRef<HTMLButtonElement>(null);\n  let [labelRef, label] = useSlot(\n    !props['aria-label'] && !props['aria-labelledby']\n  );\n  let {\n    labelProps,\n    triggerProps,\n    valueProps,\n    menuProps,\n    descriptionProps,\n    errorMessageProps,\n    hiddenSelectProps,\n    ...validation\n  } = useSelect({\n    ...removeDataAttributes(props),\n    label,\n    validationBehavior\n  }, state, buttonRef);\n\n  // Make menu width match input + button\n  let [buttonWidth, setButtonWidth] = useState<string | null>(null);\n  let onResize = useCallback(() => {\n    if (buttonRef.current) {\n      setButtonWidth(buttonRef.current.offsetWidth + 'px');\n    }\n  }, [buttonRef]);\n\n  useResizeObserver({\n    ref: buttonRef,\n    onResize: onResize\n  });\n\n  // Only expose a subset of state to renderProps function to avoid infinite render loop\n  let renderPropsState = useMemo(() => ({\n    isOpen: state.isOpen,\n    isFocused: state.isFocused,\n    isFocusVisible,\n    isDisabled: props.isDisabled || false,\n    isInvalid: validation.isInvalid || false,\n    isRequired: props.isRequired || false\n  }), [state.isOpen, state.isFocused, isFocusVisible, props.isDisabled, validation.isInvalid, props.isRequired]);\n\n  let renderProps = useRenderProps({\n    ...props,\n    values: renderPropsState,\n    defaultClassName: 'react-aria-Select'\n  });\n\n  let DOMProps = filterDOMProps(props, {global: true});\n  delete DOMProps.id;\n\n  let scrollRef = useRef(null);\n\n  return (\n    <Provider\n      values={[\n        [SelectContext, props],\n        [SelectStateContext, state],\n        [SelectValueContext, valueProps],\n        [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n        [ButtonContext, {...triggerProps, ref: buttonRef, isPressed: state.isOpen, autoFocus: props.autoFocus}],\n        [OverlayTriggerStateContext, state],\n        [PopoverContext, {\n          trigger: 'Select',\n          triggerRef: buttonRef,\n          scrollRef,\n          placement: 'bottom start',\n          style: {'--trigger-width': buttonWidth} as React.CSSProperties,\n          'aria-labelledby': menuProps['aria-labelledby'],\n          clearContexts: CLEAR_CONTEXTS\n        }],\n        [ListBoxContext, {...menuProps, ref: scrollRef}],\n        [ListStateContext, state],\n        [TextContext, {\n          slots: {\n            description: descriptionProps,\n            errorMessage: errorMessageProps\n          }\n        }],\n        [FieldErrorContext, validation]\n      ]}>\n      <dom.div\n        {...mergeProps(DOMProps, renderProps, focusProps)}\n        ref={ref}\n        slot={props.slot || undefined}\n        data-focused={state.isFocused || undefined}\n        data-focus-visible={isFocusVisible || undefined}\n        data-open={state.isOpen || undefined}\n        data-disabled={props.isDisabled || undefined}\n        data-invalid={validation.isInvalid || undefined}\n        data-required={props.isRequired || undefined}>\n        {renderProps.children}\n        <HiddenSelect\n          {...hiddenSelectProps}\n          autoComplete={props.autoComplete} />\n      </dom.div>\n    </Provider>\n  );\n}\n\nexport interface SelectValueRenderProps<T> {\n  /**\n   * Whether the value is a placeholder.\n   * @selector [data-placeholder]\n   */\n  isPlaceholder: boolean,\n  /**\n   * The object value of the first selected item.\n   * @deprecated\n   */\n  selectedItem: T | null,\n  /** The object values of the currently selected items. */\n  selectedItems: (T | null)[],\n  /** The textValue of the currently selected items. */\n  selectedText: string,\n  /** The state of the select. */\n  state: SelectState<T, 'single' | 'multiple'>\n}\n\nexport interface SelectValueProps<T extends object> extends Omit<HTMLAttributes<HTMLElement>, keyof RenderProps<unknown>>, RenderProps<SelectValueRenderProps<T>, 'span'> {\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-SelectValue'\n   */\n  className?: ClassNameOrFunction<SelectValueRenderProps<T>>\n}\n\nexport const SelectValueContext = createContext<ContextValue<SelectValueProps<any>, HTMLSpanElement>>(null);\n\n/**\n * SelectValue renders the current value of a Select, or a placeholder if no value is selected.\n * It is usually placed within the button element.\n */\nexport const SelectValue = /*#__PURE__*/ createHideableComponent(function SelectValue<T extends object>(props: SelectValueProps<T>, ref: ForwardedRef<HTMLSpanElement>) {\n  [props, ref] = useContextProps(props, ref, SelectValueContext);\n  let state = useContext(SelectStateContext)! as SelectState<T, 'single' | 'multiple'>;\n  let {placeholder} = useSlottedContext(SelectContext)!;\n  let rendered = state.selectedItems.map((item) => {\n    let rendered = item.props?.children;\n    // If the selected item has a function as a child, we need to call it to render to React.JSX.\n    if (typeof rendered === 'function') {\n      let fn = rendered as (s: ItemRenderProps) => ReactNode;\n      rendered = fn({\n        isHovered: false,\n        isPressed: false,\n        isSelected: false,\n        isFocused: false,\n        isFocusVisible: false,\n        isDisabled: false,\n        selectionMode: 'single',\n        selectionBehavior: 'toggle'\n      });\n    }\n\n    return rendered;\n  });\n\n  let formatter = useListFormatter();\n  let textValue = useMemo(() => state.selectedItems.map(item => item?.textValue), [state.selectedItems]);\n  let selectionMode = state.selectionManager.selectionMode;\n  let selectedText = useMemo(() => (\n    selectionMode === 'single' \n      ? textValue[0] ?? '' \n      : formatter.format(textValue)\n  ), [selectionMode, formatter, textValue]);\n\n  let defaultChildren = useMemo(() => {\n    if (selectionMode === 'single') {\n      return rendered[0];\n    }\n\n    let parts = formatter.formatToParts(textValue);\n    if (parts.length === 0) {\n      return null;\n    }\n\n    let index = 0;\n    return parts.map(part => {\n      if (part.type === 'element') {\n        return <Fragment key={index}>{rendered[index++]}</Fragment>;\n      } else {\n        return part.value;\n      }\n    });\n  }, [selectionMode, formatter, textValue, rendered]);\n\n  let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n  let renderProps = useRenderProps({\n    ...props,\n    defaultChildren: defaultChildren ?? placeholder ?? stringFormatter.format('selectPlaceholder'),\n    defaultClassName: 'react-aria-SelectValue',\n    values: {\n      selectedItem: state.selectedItems[0]?.value as T ?? null,\n      selectedItems: useMemo(() => state.selectedItems.map(item => item.value as T ?? null), [state.selectedItems]),\n      selectedText,\n      isPlaceholder: state.selectedItems.length === 0,\n      state\n    }\n  });\n\n  let DOMProps = filterDOMProps(props, {global: true});\n\n  return (\n    <dom.span ref={ref} {...DOMProps} {...renderProps} data-placeholder={state.selectedItems.length === 0 || undefined}>\n      {/* clear description and error message slots */}\n      <TextContext.Provider value={undefined}>\n        {renderProps.children}\n      </TextContext.Provider>\n    </dom.span>\n  );\n});\n"],"names":[],"version":3,"file":"Select.cjs.map"}