{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAkDM,MAAM,0DAAgB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,cACrD,KAAiC,EACjC,GAA2B;IAE3B,QAAQ,CAAA,GAAA,0CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,gBAAC,YAAY,YAAE,QAAQ,eAAE,cAAc,YAAW,GAAG;IACzD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,QAAQ,CAAA,GAAA,8DAAoB,EAAE;IAClC,IAAI,cAAC,UAAU,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,iDAAe,EAAE,OAAO;IAE1D,qBACE,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,KAAK;QACR,GAAG,UAAU;QACd,KAAK;QACL,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACrC,aAAY;QACZ,8CAAA;qBACA,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,6BAA6B;YACzD,yCAAyC,gBAAgB;QAC3D;qBACA,0DAAC,CAAA,GAAA,kCAAO;QAAE,cAAc;qBACtB,0DAAC,CAAA,GAAA,8CAAmB,EAAE,QAAQ;QAAC,OAAO;OAAQ;AAKxD","sources":["packages/@adobe/react-spectrum/src/checkbox/CheckboxGroup.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaCheckboxGroupProps, useCheckboxGroup} from 'react-aria/useCheckboxGroup';\n\nimport {CheckboxGroupContext} from './context';\nimport {classNames} from '../utils/classNames';\nimport {\n  DOMRef,\n  Orientation,\n  SpectrumHelpTextProps,\n  SpectrumLabelableProps,\n  StyleProps,\n  Validation\n} from '@react-types/shared';\nimport {Field} from '../label/Field';\nimport {Provider, useProviderProps} from '../provider/Provider';\nimport React, {ReactElement} from 'react';\nimport {SpectrumCheckboxProps} from './Checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroupState} from 'react-stately/useCheckboxGroupState';\nimport {useDOMRef} from '../utils/useDOMRef';\nimport {useFormProps} from '../form/Form';\n\nexport interface SpectrumCheckboxGroupProps\n  extends\n    AriaCheckboxGroupProps,\n    SpectrumLabelableProps,\n    Validation<string[]>,\n    StyleProps,\n    SpectrumHelpTextProps {\n  /**\n   * The Checkboxes contained within the CheckboxGroup.\n   */\n  children: ReactElement<SpectrumCheckboxProps> | ReactElement<SpectrumCheckboxProps>[];\n  /**\n   * The axis the checkboxes should align with.\n   *\n   * @default 'vertical'\n   */\n  orientation?: Orientation;\n  /**\n   * By default, checkboxes are not emphasized (gray).\n   * The emphasized (blue) version provides visual prominence.\n   */\n  isEmphasized?: boolean;\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nexport const CheckboxGroup = React.forwardRef(function CheckboxGroup(\n  props: SpectrumCheckboxGroupProps,\n  ref: DOMRef<HTMLDivElement>\n) {\n  props = useProviderProps(props);\n  props = useFormProps(props);\n  let {isEmphasized, children, orientation = 'vertical'} = props;\n  let domRef = useDOMRef(ref);\n  let state = useCheckboxGroupState(props);\n  let {groupProps, ...otherProps} = useCheckboxGroup(props, state);\n\n  return (\n    <Field\n      {...props}\n      {...otherProps}\n      ref={domRef}\n      wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n      elementType=\"span\"\n      includeNecessityIndicatorInAccessibilityName>\n      <div\n        {...groupProps}\n        className={classNames(styles, 'spectrum-FieldGroup-group', {\n          'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n        })}>\n        <Provider isEmphasized={isEmphasized}>\n          <CheckboxGroupContext.Provider value={state}>{children}</CheckboxGroupContext.Provider>\n        </Provider>\n      </div>\n    </Field>\n  );\n});\n"],"names":[],"version":3,"file":"CheckboxGroup.cjs.map"}