@react-spectrum/checkbox 3.2.4 → 3.3.2

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/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;ACaM,MAAMG,yDAAoB,gBAAGC,MAAK,CAACC,aAAN,CAAwC,IAAxC,CAA7B;;;;ACfP,2CAAiB;AACf,uBAAqB,0BADN;AAEf,6BAA2B,gCAFZ;AAGf,gBAAc,mBAHC;AAIf,2BAAyB,8BAJV;AAKf,sBAAoB,yBALL;AAMf,iCAA+B,oCANhB;AAOf,wCAAsC,2CAPvB;AAQf,gBAAc,mBARC;AASf,6BAA2B,gCATZ;AAUf,gBAAc,mBAVC;AAWf,8BAA4B,iCAXb;AAYf,gBAAc;AAZC,CAAjB;;;AC0BA,SAASC,6CAAT,CAAkBC,KAAlB,EAAgDC,GAAhD,EAAqF;AACnF,MAAIC,aAAa,GAAGF,KAApB;AACAA,EAAAA,KAAK,GAAGG,gBAAgB,CAACH,KAAD,CAAxB;;AACA,MAAI;AACFI,IAAAA,eAAe,GAAG,KADhB;AAEFC,IAAAA,YAAY,GAAG,KAFb;AAGFC,IAAAA,UAAU,GAAG,KAHX;AAIFC,IAAAA,SAJE;AAKFC,IAAAA,QALE;AAMFC,IAAAA;AANE,MAQAT,KARJ;AAAA,MAOKU,UAPL,oDAQIV,KARJ;;AASA,MAAI;AAACW,IAAAA;AAAD,MAAeC,aAAa,CAACF,UAAD,CAAhC;AACA,MAAI;AAACG,IAAAA,UAAD;AAAaC,IAAAA;AAAb,MAA0BC,QAAQ,CAAC;AAACT,IAAAA;AAAD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AAyCc,WAAW,KAAK;AAD3D,KAHQ;AAHd,kBAWE,qBAAC,QAAD;AAAU,IAAA,YAAY,EAAEtC,YAAxB;AAAsC,IAAA,eAAe,EAAEI;AAAvD,kBACE,+EAAsB,QAAtB;AAA+B,IAAA,KAAK,EAAEoC;AAAtC,KACGrC,QADH,CADF,CAXF,CA/BF,CADF;AAmDD;AAED;;;;;AAGA,MAAM0C,aAAc,gBAAGrD,MAAK,CAACuC,UAAN,CAAiBC,iDAAjB,CAAvB","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./packages/@react-spectrum/checkbox/src/context.ts","./node_modules/@adobe/spectrum-css-temp/components/checkbox/vars.css","./packages/@react-spectrum/checkbox/src/Checkbox.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./node_modules/@adobe/spectrum-css-temp/components/fieldgroup/vars.css","./packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\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 {CheckboxGroupState} from '@react-stately/checkbox';\nimport React from 'react';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState>(null);\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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 {CheckboxGroupContext} from './context';\nimport CheckmarkSmall from '@spectrum-icons/ui/CheckmarkSmall';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport DashSmall from '@spectrum-icons/ui/DashSmall';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useContext, useRef} from 'react';\nimport {SpectrumCheckboxProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/checkbox/vars.css';\nimport {useCheckbox, useCheckboxGroupItem} from '@react-aria/checkbox';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n let originalProps = props;\n props = useProviderProps(props);\n let {\n isIndeterminate = false,\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n validationState,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n let {inputProps} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...props,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).\n value: props.value,\n // Only pass isRequired and validationState to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n validationState: originalProps.validationState\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox(props, useToggleState(props), inputRef);\n\n let markIcon = isIndeterminate\n ? <DashSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-partialCheckmark')} />\n : <CheckmarkSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-checkmark')} />;\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);\n }\n }\n if (props.value == null) {\n console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');\n }\n }\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Checkbox',\n {\n 'is-checked': inputProps.checked,\n 'is-indeterminate': isIndeterminate,\n 'spectrum-Checkbox--quiet': !isEmphasized,\n 'is-invalid': validationState === 'invalid',\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-Checkbox-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Checkbox-box')}>{markIcon}</span>\n {children && (\n <span className={classNames(styles, 'spectrum-Checkbox-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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\n@import './index.css';\n","/*\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 {CheckboxGroupContext} from './context';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, LabelPosition} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React from 'react';\nimport {SpectrumCheckboxGroupProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroup} from '@react-aria/checkbox';\nimport {useCheckboxGroupState} from '@react-stately/checkbox';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n isRequired,\n necessityIndicator,\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n children,\n orientation = 'vertical',\n validationState,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps} = useCheckboxGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so checkbox group works inside a <Form>\n classNames(\n labelStyles,\n 'spectrum-Field'\n ),\n styleProps.className\n )\n }\n ref={domRef}>\n {label &&\n <Label\n {...labelProps}\n elementType=\"span\"\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName>\n {label}\n </Label>\n }\n <div\n role=\"presentation\"\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <Provider isEmphasized={isEmphasized} validationState={validationState}>\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </Provider>\n </div>\n </div>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nconst _CheckboxGroup = React.forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":["$parcel$interopDefault","a","__esModule","default","CheckboxGroupContext","React","createContext","Checkbox","props","ref","originalProps","useProviderProps","isIndeterminate","isEmphasized","isDisabled","autoFocus","children","validationState","otherProps","styleProps","useStyleProps","hoverProps","isHovered","useHover","inputRef","useRef","domRef","useFocusableRef","groupState","useContext","inputProps","useCheckboxGroupItem","value","isRequired","useCheckbox","useToggleState","markIcon","classNames","key","console","warn","checked","className","_Checkbox","forwardRef","CheckboxGroup","useFormProps","necessityIndicator","label","labelPosition","labelAlign","orientation","useDOMRef","state","useCheckboxGroupState","labelProps","groupProps","useCheckboxGroup","_CheckboxGroup"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,sCAAK,CAAC,aAAa,CAAqB,IAAI;;;;;;;;;;;;;;;;;;;;;;ACfhF,GAAmC;AACnC,GAAyC;AACzC,GAA4B;AAC5B,GAAuC;AACvC,GAAkC;AAClC,GAA6C;AAC7C,GAAoD;AACpD,GAA4B;AAC5B,GAAyC;AACzC,GAA4B;AAC5B,GAA0C;AAC1C,GAA4B;AAX5B,yCAAmC,GAAG,CAA0B;AAChE,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,wCAAkC,GAAG,CAAyB;AAC9D,yCAA6C,G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CAAC,yCAAc,iBAAG,sCAAK,CAAC,UAAU,CAAC,mCAAa;;","sources":["packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/context.ts","packages/@adobe/spectrum-css-temp/components/checkbox/vars.css","packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","packages/@adobe/spectrum-css-temp/components/fieldgroup/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Checkbox';\nexport * from './CheckboxGroup';\n","/*\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 {CheckboxGroupContext} from './context';\nimport CheckmarkSmall from '@spectrum-icons/ui/CheckmarkSmall';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport DashSmall from '@spectrum-icons/ui/DashSmall';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useContext, useRef} from 'react';\nimport {SpectrumCheckboxProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/checkbox/vars.css';\nimport {useCheckbox, useCheckboxGroupItem} from '@react-aria/checkbox';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useToggleState} from '@react-stately/toggle';\n\nfunction Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n let originalProps = props;\n props = useProviderProps(props);\n let {\n isIndeterminate = false,\n isEmphasized = false,\n isDisabled = false,\n autoFocus,\n children,\n validationState,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.\n // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,\n // but since the checkbox won't move in and out of a group, it should be safe.\n let groupState = useContext(CheckboxGroupContext);\n let {inputProps} = groupState\n // eslint-disable-next-line react-hooks/rules-of-hooks\n ? useCheckboxGroupItem({\n ...props,\n // Value is optional for standalone checkboxes, but required for CheckboxGroup items;\n // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).\n value: props.value,\n // Only pass isRequired and validationState to react-aria if they came from\n // the props for this individual checkbox, and not from the group via context.\n isRequired: originalProps.isRequired,\n validationState: originalProps.validationState\n }, groupState, inputRef)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n : useCheckbox(props, useToggleState(props), inputRef);\n\n let markIcon = isIndeterminate\n ? <DashSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-partialCheckmark')} />\n : <CheckmarkSmall UNSAFE_className={classNames(styles, 'spectrum-Checkbox-checkmark')} />;\n\n if (groupState) {\n for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {\n if (originalProps[key] != null) {\n console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);\n }\n }\n if (props.value == null) {\n console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');\n }\n }\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Checkbox',\n {\n 'is-checked': inputProps.checked,\n 'is-indeterminate': isIndeterminate,\n 'spectrum-Checkbox--quiet': !isEmphasized,\n 'is-invalid': validationState === 'invalid',\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-Checkbox-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Checkbox-box')}>{markIcon}</span>\n {children && (\n <span className={classNames(styles, 'spectrum-Checkbox-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n","/*\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 {CheckboxGroupState} from '@react-stately/checkbox';\nimport React from 'react';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState>(null);\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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 {CheckboxGroupContext} from './context';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, LabelPosition} from '@react-types/shared';\nimport {Label} from '@react-spectrum/label';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React from 'react';\nimport {SpectrumCheckboxGroupProps} from '@react-types/checkbox';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useCheckboxGroup} from '@react-aria/checkbox';\nimport {useCheckboxGroupState} from '@react-stately/checkbox';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction CheckboxGroup(props: SpectrumCheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n isRequired,\n necessityIndicator,\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n children,\n orientation = 'vertical',\n validationState,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let state = useCheckboxGroupState(props);\n let {labelProps, groupProps} = useCheckboxGroup(props, state);\n\n return (\n <div\n {...styleProps}\n {...groupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup',\n {\n 'spectrum-FieldGroup--positionSide': labelPosition === 'side'\n },\n // This is so checkbox group works inside a <Form>\n classNames(\n labelStyles,\n 'spectrum-Field'\n ),\n styleProps.className\n )\n }\n ref={domRef}>\n {label &&\n <Label\n {...labelProps}\n elementType=\"span\"\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName>\n {label}\n </Label>\n }\n <div\n role=\"presentation\"\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <Provider isEmphasized={isEmphasized} validationState={validationState}>\n <CheckboxGroupContext.Provider value={state}>\n {children}\n </CheckboxGroupContext.Provider>\n </Provider>\n </div>\n </div>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nconst _CheckboxGroup = React.forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,216 +1,265 @@
1
- import { useFormProps } from "@react-spectrum/form";
2
- import { useCheckboxGroupState } from "@react-stately/checkbox";
3
- import { Label } from "@react-spectrum/label";
4
- import { useToggleState } from "@react-stately/toggle";
5
- import { useProviderProps, Provider } from "@react-spectrum/provider";
6
- import { useHover } from "@react-aria/interactions";
7
- import { useCheckbox, useCheckboxGroupItem, useCheckboxGroup } from "@react-aria/checkbox";
8
- import { FocusRing } from "@react-aria/focus";
9
- import _spectrumIconsUiDashSmall from "@spectrum-icons/ui/DashSmall";
10
- import { classNames, useFocusableRef, useStyleProps, useDOMRef } from "@react-spectrum/utils";
11
- import _spectrumIconsUiCheckmarkSmall from "@spectrum-icons/ui/CheckmarkSmall";
12
- import _react, { forwardRef, useContext, useRef } from "react";
13
- import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
14
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
15
1
  import "./main.css";
2
+ import $gpy1V$spectrumiconsuiCheckmarkSmall from "@spectrum-icons/ui/CheckmarkSmall";
3
+ import {useStyleProps as $gpy1V$useStyleProps, useFocusableRef as $gpy1V$useFocusableRef, classNames as $gpy1V$classNames, useDOMRef as $gpy1V$useDOMRef} from "@react-spectrum/utils";
4
+ import $gpy1V$spectrumiconsuiDashSmall from "@spectrum-icons/ui/DashSmall";
5
+ import {FocusRing as $gpy1V$FocusRing} from "@react-aria/focus";
6
+ import $gpy1V$react, {useRef as $gpy1V$useRef, useContext as $gpy1V$useContext, forwardRef as $gpy1V$forwardRef} from "react";
7
+ import {useCheckboxGroupItem as $gpy1V$useCheckboxGroupItem, useCheckbox as $gpy1V$useCheckbox, useCheckboxGroup as $gpy1V$useCheckboxGroup} from "@react-aria/checkbox";
8
+ import {useHover as $gpy1V$useHover} from "@react-aria/interactions";
9
+ import {useProviderProps as $gpy1V$useProviderProps, Provider as $gpy1V$Provider} from "@react-spectrum/provider";
10
+ import {useToggleState as $gpy1V$useToggleState} from "@react-stately/toggle";
11
+ import {Label as $gpy1V$Label} from "@react-spectrum/label";
12
+ import {useCheckboxGroupState as $gpy1V$useCheckboxGroupState} from "@react-stately/checkbox";
13
+ import {useFormProps as $gpy1V$useFormProps} from "@react-spectrum/form";
16
14
 
17
15
  function $parcel$interopDefault(a) {
18
16
  return a && a.__esModule ? a.default : a;
19
17
  }
18
+ function $parcel$export(e, n, v, s) {
19
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
20
+ }
21
+ var $25b6292d81af2844$exports = {};
22
+
23
+ $parcel$export($25b6292d81af2844$exports, "Checkbox", () => $25b6292d81af2844$export$48513f6b9f8ce62d);
24
+
25
+ const $8c8ab388b155237e$export$baf37c4be89255b8 = $gpy1V$react.createContext(null);
26
+
27
+
28
+
29
+
30
+
20
31
 
21
- const $bde9b0e0d548308768028eb5bb392fd8$export$CheckboxGroupContext = /*#__PURE__*/_react.createContext(null);
22
-
23
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/checkbox/vars.css
24
- var $f30999564e5c72d738e3a371addc872$exports = {};
25
- $f30999564e5c72d738e3a371addc872$exports = {
26
- "spectrum-Checkbox": "_spectrum-Checkbox_0ffa4",
27
- "spectrum-Checkbox-input": "_spectrum-Checkbox-input_0ffa4",
28
- "focus-ring": "_focus-ring_0ffa4",
29
- "spectrum-Checkbox-box": "_spectrum-Checkbox-box_0ffa4",
30
- "is-indeterminate": "_is-indeterminate_0ffa4",
31
- "spectrum-Checkbox-checkmark": "_spectrum-Checkbox-checkmark_0ffa4",
32
- "spectrum-Checkbox-partialCheckmark": "_spectrum-Checkbox-partialCheckmark_0ffa4",
33
- "is-checked": "_is-checked_0ffa4",
34
- "spectrum-Checkbox-label": "_spectrum-Checkbox-label_0ffa4",
35
- "is-hovered": "_is-hovered_0ffa4",
36
- "spectrum-Checkbox--quiet": "_spectrum-Checkbox--quiet_0ffa4",
37
- "is-invalid": "_is-invalid_0ffa4"
38
- };
39
- var $f30999564e5c72d738e3a371addc872$$interop$default = $parcel$interopDefault($f30999564e5c72d738e3a371addc872$exports);
40
-
41
- function $e1b4ba32ec7b6456ce724babf7eb8$var$Checkbox(props, ref) {
42
- let originalProps = props;
43
- props = useProviderProps(props);
44
-
45
- let {
46
- isIndeterminate = false,
47
- isEmphasized = false,
48
- isDisabled = false,
49
- autoFocus,
50
- children,
51
- validationState
52
- } = props,
53
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["isIndeterminate", "isEmphasized", "isDisabled", "autoFocus", "children", "validationState"]);
54
-
55
- let {
56
- styleProps
57
- } = useStyleProps(otherProps);
58
- let {
59
- hoverProps,
60
- isHovered
61
- } = useHover({
62
- isDisabled
63
- });
64
- let inputRef = useRef(null);
65
- let domRef = useFocusableRef(ref, inputRef); // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.
66
- // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,
67
- // but since the checkbox won't move in and out of a group, it should be safe.
68
-
69
- let groupState = useContext($bde9b0e0d548308768028eb5bb392fd8$export$CheckboxGroupContext);
70
- let {
71
- inputProps
72
- } = groupState // eslint-disable-next-line react-hooks/rules-of-hooks
73
- ? useCheckboxGroupItem(_babelRuntimeHelpersEsmExtends({}, props, {
74
- // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
75
- // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).
76
- value: props.value,
77
- // Only pass isRequired and validationState to react-aria if they came from
78
- // the props for this individual checkbox, and not from the group via context.
79
- isRequired: originalProps.isRequired,
80
- validationState: originalProps.validationState
81
- }), groupState, inputRef) // eslint-disable-next-line react-hooks/rules-of-hooks
82
- : useCheckbox(props, useToggleState(props), inputRef);
83
- let markIcon = isIndeterminate ? /*#__PURE__*/_react.createElement(_spectrumIconsUiDashSmall, {
84
- UNSAFE_className: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'spectrum-Checkbox-partialCheckmark')
85
- }) : /*#__PURE__*/_react.createElement(_spectrumIconsUiCheckmarkSmall, {
86
- UNSAFE_className: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'spectrum-Checkbox-checkmark')
87
- });
88
-
89
- if (groupState) {
90
- for (let key of ['isSelected', 'defaultSelected', 'isEmphasized']) {
91
- if (originalProps[key] != null) {
92
- console.warn(key + " is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.");
93
- }
94
- }
95
32
 
96
- if (props.value == null) {
97
- console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');
33
+ var $fe1a56c62936037c$exports = {};
34
+
35
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox", () => $fe1a56c62936037c$export$f8ee3e99d637ccac, (v) => $fe1a56c62936037c$export$f8ee3e99d637ccac = v);
36
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox-input", () => $fe1a56c62936037c$export$fbf255e91152b086, (v) => $fe1a56c62936037c$export$fbf255e91152b086 = v);
37
+ $parcel$export($fe1a56c62936037c$exports, "focus-ring", () => $fe1a56c62936037c$export$f39a09f249340e2a, (v) => $fe1a56c62936037c$export$f39a09f249340e2a = v);
38
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox-box", () => $fe1a56c62936037c$export$b07bd551df410935, (v) => $fe1a56c62936037c$export$b07bd551df410935 = v);
39
+ $parcel$export($fe1a56c62936037c$exports, "is-indeterminate", () => $fe1a56c62936037c$export$682c8615600f6ee, (v) => $fe1a56c62936037c$export$682c8615600f6ee = v);
40
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox-checkmark", () => $fe1a56c62936037c$export$e152b25f70350d85, (v) => $fe1a56c62936037c$export$e152b25f70350d85 = v);
41
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox-partialCheckmark", () => $fe1a56c62936037c$export$7f6ea68ad4b1fa69, (v) => $fe1a56c62936037c$export$7f6ea68ad4b1fa69 = v);
42
+ $parcel$export($fe1a56c62936037c$exports, "is-checked", () => $fe1a56c62936037c$export$3f46c891456641e7, (v) => $fe1a56c62936037c$export$3f46c891456641e7 = v);
43
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox-label", () => $fe1a56c62936037c$export$9244b14cfa532d4f, (v) => $fe1a56c62936037c$export$9244b14cfa532d4f = v);
44
+ $parcel$export($fe1a56c62936037c$exports, "is-hovered", () => $fe1a56c62936037c$export$b8813cd5d7824ce7, (v) => $fe1a56c62936037c$export$b8813cd5d7824ce7 = v);
45
+ $parcel$export($fe1a56c62936037c$exports, "spectrum-Checkbox--quiet", () => $fe1a56c62936037c$export$3a2eb50fe5450439, (v) => $fe1a56c62936037c$export$3a2eb50fe5450439 = v);
46
+ $parcel$export($fe1a56c62936037c$exports, "is-invalid", () => $fe1a56c62936037c$export$14a30de2866685fa, (v) => $fe1a56c62936037c$export$14a30de2866685fa = v);
47
+ var $fe1a56c62936037c$export$f8ee3e99d637ccac;
48
+ var $fe1a56c62936037c$export$fbf255e91152b086;
49
+ var $fe1a56c62936037c$export$f39a09f249340e2a;
50
+ var $fe1a56c62936037c$export$b07bd551df410935;
51
+ var $fe1a56c62936037c$export$682c8615600f6ee;
52
+ var $fe1a56c62936037c$export$e152b25f70350d85;
53
+ var $fe1a56c62936037c$export$7f6ea68ad4b1fa69;
54
+ var $fe1a56c62936037c$export$3f46c891456641e7;
55
+ var $fe1a56c62936037c$export$9244b14cfa532d4f;
56
+ var $fe1a56c62936037c$export$b8813cd5d7824ce7;
57
+ var $fe1a56c62936037c$export$3a2eb50fe5450439;
58
+ var $fe1a56c62936037c$export$14a30de2866685fa;
59
+ $fe1a56c62936037c$export$f8ee3e99d637ccac = "spectrum-Checkbox_4870fc";
60
+ $fe1a56c62936037c$export$fbf255e91152b086 = "spectrum-Checkbox-input_4870fc";
61
+ $fe1a56c62936037c$export$f39a09f249340e2a = "focus-ring_4870fc";
62
+ $fe1a56c62936037c$export$b07bd551df410935 = "spectrum-Checkbox-box_4870fc";
63
+ $fe1a56c62936037c$export$682c8615600f6ee = "is-indeterminate_4870fc";
64
+ $fe1a56c62936037c$export$e152b25f70350d85 = "spectrum-Checkbox-checkmark_4870fc";
65
+ $fe1a56c62936037c$export$7f6ea68ad4b1fa69 = "spectrum-Checkbox-partialCheckmark_4870fc";
66
+ $fe1a56c62936037c$export$3f46c891456641e7 = "is-checked_4870fc";
67
+ $fe1a56c62936037c$export$9244b14cfa532d4f = "spectrum-Checkbox-label_4870fc";
68
+ $fe1a56c62936037c$export$b8813cd5d7824ce7 = "is-hovered_4870fc";
69
+ $fe1a56c62936037c$export$3a2eb50fe5450439 = "spectrum-Checkbox--quiet_4870fc";
70
+ $fe1a56c62936037c$export$14a30de2866685fa = "is-invalid_4870fc";
71
+
72
+
73
+
74
+
75
+
76
+
77
+ function $25b6292d81af2844$var$Checkbox(props, ref) {
78
+ let originalProps = props;
79
+ props = $gpy1V$useProviderProps(props);
80
+ let { isIndeterminate: isIndeterminate = false , isEmphasized: isEmphasized = false , isDisabled: isDisabled = false , autoFocus: autoFocus , children: children , validationState: validationState , ...otherProps } = props;
81
+ let { styleProps: styleProps } = $gpy1V$useStyleProps(otherProps);
82
+ let { hoverProps: hoverProps , isHovered: isHovered } = $gpy1V$useHover({
83
+ isDisabled: isDisabled
84
+ });
85
+ let inputRef = $gpy1V$useRef(null);
86
+ let domRef = $gpy1V$useFocusableRef(ref, inputRef);
87
+ // Swap hooks depending on whether this checkbox is inside a CheckboxGroup.
88
+ // This is a bit unorthodox. Typically, hooks cannot be called in a conditional,
89
+ // but since the checkbox won't move in and out of a group, it should be safe.
90
+ let groupState = $gpy1V$useContext($8c8ab388b155237e$export$baf37c4be89255b8);
91
+ let { inputProps: inputProps } = groupState ? $gpy1V$useCheckboxGroupItem({
92
+ ...props,
93
+ // Value is optional for standalone checkboxes, but required for CheckboxGroup items;
94
+ // it's passed explicitly here to avoid typescript error (requires strictNullChecks disabled).
95
+ value: props.value,
96
+ // Only pass isRequired and validationState to react-aria if they came from
97
+ // the props for this individual checkbox, and not from the group via context.
98
+ isRequired: originalProps.isRequired,
99
+ validationState: originalProps.validationState
100
+ }, groupState, inputRef) : $gpy1V$useCheckbox(props, $gpy1V$useToggleState(props), inputRef);
101
+ let markIcon = isIndeterminate ? /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$spectrumiconsuiDashSmall, {
102
+ UNSAFE_className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-partialCheckmark')
103
+ }) : /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$spectrumiconsuiCheckmarkSmall, {
104
+ UNSAFE_className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-checkmark')
105
+ });
106
+ if (groupState) {
107
+ for (let key of [
108
+ 'isSelected',
109
+ 'defaultSelected',
110
+ 'isEmphasized'
111
+ ])if (originalProps[key] != null) console.warn(`${key} is unsupported on individual <Checkbox> elements within a <CheckboxGroup>. Please apply these props to the group instead.`);
112
+ if (props.value == null) console.warn('A <Checkbox> element within a <CheckboxGroup> requires a `value` property.');
98
113
  }
99
- }
100
-
101
- return /*#__PURE__*/_react.createElement("label", _babelRuntimeHelpersEsmExtends({}, styleProps, hoverProps, {
102
- ref: domRef,
103
- className: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'spectrum-Checkbox', {
104
- 'is-checked': inputProps.checked,
105
- 'is-indeterminate': isIndeterminate,
106
- 'spectrum-Checkbox--quiet': !isEmphasized,
107
- 'is-invalid': validationState === 'invalid',
108
- 'is-disabled': isDisabled,
109
- 'is-hovered': isHovered
110
- }, styleProps.className)
111
- }), /*#__PURE__*/_react.createElement(FocusRing, {
112
- focusRingClass: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'focus-ring'),
113
- autoFocus: autoFocus
114
- }, /*#__PURE__*/_react.createElement("input", _babelRuntimeHelpersEsmExtends({}, inputProps, {
115
- ref: inputRef,
116
- className: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'spectrum-Checkbox-input')
117
- }))), /*#__PURE__*/_react.createElement("span", {
118
- className: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'spectrum-Checkbox-box')
119
- }, markIcon), children && /*#__PURE__*/_react.createElement("span", {
120
- className: classNames($f30999564e5c72d738e3a371addc872$$interop$default, 'spectrum-Checkbox-label')
121
- }, children));
114
+ return(/*#__PURE__*/ $gpy1V$react.createElement("label", {
115
+ ...styleProps,
116
+ ...hoverProps,
117
+ ref: domRef,
118
+ className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox', {
119
+ 'is-checked': inputProps.checked,
120
+ 'is-indeterminate': isIndeterminate,
121
+ 'spectrum-Checkbox--quiet': !isEmphasized,
122
+ 'is-invalid': validationState === 'invalid',
123
+ 'is-disabled': isDisabled,
124
+ 'is-hovered': isHovered
125
+ }, styleProps.className)
126
+ }, /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$FocusRing, {
127
+ focusRingClass: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'focus-ring'),
128
+ autoFocus: autoFocus
129
+ }, /*#__PURE__*/ $gpy1V$react.createElement("input", {
130
+ ...inputProps,
131
+ ref: inputRef,
132
+ className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-input')
133
+ })), /*#__PURE__*/ $gpy1V$react.createElement("span", {
134
+ className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-box')
135
+ }, markIcon), children && /*#__PURE__*/ $gpy1V$react.createElement("span", {
136
+ className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($fe1a56c62936037c$exports)), 'spectrum-Checkbox-label')
137
+ }, children)));
122
138
  }
123
139
  /**
124
140
  * Checkboxes allow users to select multiple items from a list of individual items,
125
141
  * or to mark one individual item as selected.
126
- */
127
-
128
-
129
- export let Checkbox = /*#__PURE__*/forwardRef($e1b4ba32ec7b6456ce724babf7eb8$var$Checkbox);
130
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css
131
- var $c9fb1f4220ea2c59cb2e10f0e9828c6e$exports = {};
132
- $c9fb1f4220ea2c59cb2e10f0e9828c6e$exports = {
133
- "spectrum-FieldLabel": "_spectrum-FieldLabel_36b9b",
134
- "spectrum-FieldLabel--positionSide": "_spectrum-FieldLabel--positionSide_36b9b",
135
- "spectrum-FieldLabel-requiredIcon": "_spectrum-FieldLabel-requiredIcon_36b9b",
136
- "spectrum-FieldLabel--alignEnd": "_spectrum-FieldLabel--alignEnd_36b9b",
137
- "spectrum-Field": "_spectrum-Field_36b9b",
138
- "spectrum-Field--positionTop": "_spectrum-Field--positionTop_36b9b",
139
- "spectrum-Field-field": "_spectrum-Field-field_36b9b",
140
- "spectrum-Field-field--multiline": "_spectrum-Field-field--multiline_36b9b",
141
- "spectrum-Field--positionSide": "_spectrum-Field--positionSide_36b9b",
142
- "spectrum-Form": "_spectrum-Form_36b9b",
143
- "spectrum-Form--positionSide": "_spectrum-Form--positionSide_36b9b",
144
- "spectrum-Form--positionTop": "_spectrum-Form--positionTop_36b9b",
145
- "spectrum-Form-itemLabel": "_spectrum-Form-itemLabel_36b9b",
146
- "is-disabled": "_is-disabled_36b9b"
147
- };
148
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/fieldgroup/vars.css
149
- var $d9233c793c189283ec9d2429b27b9$exports = {};
150
- $d9233c793c189283ec9d2429b27b9$exports = {
151
- "spectrum-FieldGroup": "_spectrum-FieldGroup_8cb9b",
152
- "spectrum-FieldGroup--positionSide": "_spectrum-FieldGroup--positionSide_8cb9b",
153
- "spectrum-FieldGroup-group": "_spectrum-FieldGroup-group_8cb9b",
154
- "spectrum-FieldGroup-group--horizontal": "_spectrum-FieldGroup-group--horizontal_8cb9b"
155
- };
156
- var $d9233c793c189283ec9d2429b27b9$$interop$default = $parcel$interopDefault($d9233c793c189283ec9d2429b27b9$exports);
157
- var $c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default = $parcel$interopDefault($c9fb1f4220ea2c59cb2e10f0e9828c6e$exports);
158
-
159
- function $e22ad9c258293c82626b875dc3985$var$CheckboxGroup(props, ref) {
160
- props = useProviderProps(props);
161
- props = useFormProps(props);
162
-
163
- let {
164
- isEmphasized,
165
- isRequired,
166
- necessityIndicator,
167
- label,
168
- labelPosition = 'top',
169
- labelAlign,
170
- children,
171
- orientation = 'vertical',
172
- validationState
173
- } = props,
174
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["isEmphasized", "isRequired", "necessityIndicator", "label", "labelPosition", "labelAlign", "children", "orientation", "validationState"]);
175
-
176
- let domRef = useDOMRef(ref);
177
- let {
178
- styleProps
179
- } = useStyleProps(otherProps);
180
- let state = useCheckboxGroupState(props);
181
- let {
182
- labelProps,
183
- groupProps
184
- } = useCheckboxGroup(props, state);
185
- return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, styleProps, groupProps, {
186
- className: classNames($d9233c793c189283ec9d2429b27b9$$interop$default, 'spectrum-FieldGroup', {
187
- 'spectrum-FieldGroup--positionSide': labelPosition === 'side'
188
- }, // This is so checkbox group works inside a <Form>
189
- classNames($c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default, 'spectrum-Field'), styleProps.className),
190
- ref: domRef
191
- }), label && /*#__PURE__*/_react.createElement(Label, _babelRuntimeHelpersEsmExtends({}, labelProps, {
192
- elementType: "span",
193
- labelPosition: labelPosition,
194
- labelAlign: labelAlign,
195
- isRequired: isRequired,
196
- necessityIndicator: necessityIndicator,
197
- includeNecessityIndicatorInAccessibilityName: true
198
- }), label), /*#__PURE__*/_react.createElement("div", {
199
- role: "presentation",
200
- className: classNames($d9233c793c189283ec9d2429b27b9$$interop$default, 'spectrum-FieldGroup-group', {
201
- 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
202
- })
203
- }, /*#__PURE__*/_react.createElement(Provider, {
204
- isEmphasized: isEmphasized,
205
- validationState: validationState
206
- }, /*#__PURE__*/_react.createElement($bde9b0e0d548308768028eb5bb392fd8$export$CheckboxGroupContext.Provider, {
207
- value: state
208
- }, children))));
142
+ */ let $25b6292d81af2844$export$48513f6b9f8ce62d = /*#__PURE__*/ $gpy1V$forwardRef($25b6292d81af2844$var$Checkbox);
143
+
144
+
145
+ var $73f43ce9d441cc69$exports = {};
146
+
147
+ $parcel$export($73f43ce9d441cc69$exports, "CheckboxGroup", () => $73f43ce9d441cc69$export$4aa08d5625cb8ead);
148
+
149
+
150
+
151
+ var $cd231e464c886c86$exports = {};
152
+
153
+ $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
154
+ $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
155
+ $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
156
+ $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
157
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
158
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
159
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
160
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Field-field--multiline", () => $cd231e464c886c86$export$f58a1e966a92ba5e, (v) => $cd231e464c886c86$export$f58a1e966a92ba5e = v);
161
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
162
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
163
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
164
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
165
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
166
+ $parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
167
+ $parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
168
+ var $cd231e464c886c86$export$493d18e796ae054;
169
+ var $cd231e464c886c86$export$9e6f19dc21f22f2e;
170
+ var $cd231e464c886c86$export$7c47642c7d46f3c9;
171
+ var $cd231e464c886c86$export$885efcc08143a987;
172
+ var $cd231e464c886c86$export$f6d480ae1e56eba0;
173
+ var $cd231e464c886c86$export$a4ea780a9064d7f9;
174
+ var $cd231e464c886c86$export$3ab8a3dc7f0563d;
175
+ var $cd231e464c886c86$export$f58a1e966a92ba5e;
176
+ var $cd231e464c886c86$export$2963225c91179589;
177
+ var $cd231e464c886c86$export$127df0b7290eb8ef;
178
+ var $cd231e464c886c86$export$94d2bcc94afabd89;
179
+ var $cd231e464c886c86$export$7f44db659563c8f4;
180
+ var $cd231e464c886c86$export$11b8bc81fe551057;
181
+ var $cd231e464c886c86$export$51ec27881a1e3928;
182
+ var $cd231e464c886c86$export$d35bc1e505d1ebbf;
183
+ $cd231e464c886c86$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
184
+ $cd231e464c886c86$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
185
+ $cd231e464c886c86$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
186
+ $cd231e464c886c86$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
187
+ $cd231e464c886c86$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
188
+ $cd231e464c886c86$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
189
+ $cd231e464c886c86$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
190
+ $cd231e464c886c86$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
191
+ $cd231e464c886c86$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
192
+ $cd231e464c886c86$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
193
+ $cd231e464c886c86$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
194
+ $cd231e464c886c86$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
195
+ $cd231e464c886c86$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
196
+ $cd231e464c886c86$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
197
+ $cd231e464c886c86$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
198
+
199
+
200
+
201
+
202
+ var $4cb2b26710154c56$exports = {};
203
+
204
+ $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup", () => $4cb2b26710154c56$export$75eb16cbfc18279c, (v) => $4cb2b26710154c56$export$75eb16cbfc18279c = v);
205
+ $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup--positionSide", () => $4cb2b26710154c56$export$859b606bd9f45f81, (v) => $4cb2b26710154c56$export$859b606bd9f45f81 = v);
206
+ $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group", () => $4cb2b26710154c56$export$984c7bbbfc7ddffc, (v) => $4cb2b26710154c56$export$984c7bbbfc7ddffc = v);
207
+ $parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group--horizontal", () => $4cb2b26710154c56$export$1ad8646bcba21c0e, (v) => $4cb2b26710154c56$export$1ad8646bcba21c0e = v);
208
+ var $4cb2b26710154c56$export$75eb16cbfc18279c;
209
+ var $4cb2b26710154c56$export$859b606bd9f45f81;
210
+ var $4cb2b26710154c56$export$984c7bbbfc7ddffc;
211
+ var $4cb2b26710154c56$export$1ad8646bcba21c0e;
212
+ $4cb2b26710154c56$export$75eb16cbfc18279c = "spectrum-FieldGroup_41d350";
213
+ $4cb2b26710154c56$export$859b606bd9f45f81 = "spectrum-FieldGroup--positionSide_41d350";
214
+ $4cb2b26710154c56$export$984c7bbbfc7ddffc = "spectrum-FieldGroup-group_41d350";
215
+ $4cb2b26710154c56$export$1ad8646bcba21c0e = "spectrum-FieldGroup-group--horizontal_41d350";
216
+
217
+
218
+
219
+
220
+
221
+ function $73f43ce9d441cc69$var$CheckboxGroup(props, ref) {
222
+ props = $gpy1V$useProviderProps(props);
223
+ props = $gpy1V$useFormProps(props);
224
+ let { isEmphasized: isEmphasized , isRequired: isRequired , necessityIndicator: necessityIndicator , label: label , labelPosition: labelPosition = 'top' , labelAlign: labelAlign , children: children , orientation: orientation = 'vertical' , validationState: validationState , ...otherProps } = props;
225
+ let domRef = $gpy1V$useDOMRef(ref);
226
+ let { styleProps: styleProps } = $gpy1V$useStyleProps(otherProps);
227
+ let state = $gpy1V$useCheckboxGroupState(props);
228
+ let { labelProps: labelProps , groupProps: groupProps } = $gpy1V$useCheckboxGroup(props, state);
229
+ return(/*#__PURE__*/ $gpy1V$react.createElement("div", {
230
+ ...styleProps,
231
+ ...groupProps,
232
+ className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup', {
233
+ 'spectrum-FieldGroup--positionSide': labelPosition === 'side'
234
+ }, // This is so checkbox group works inside a <Form>
235
+ $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-Field'), styleProps.className),
236
+ ref: domRef
237
+ }, label && /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$Label, {
238
+ ...labelProps,
239
+ elementType: "span",
240
+ labelPosition: labelPosition,
241
+ labelAlign: labelAlign,
242
+ isRequired: isRequired,
243
+ necessityIndicator: necessityIndicator,
244
+ includeNecessityIndicatorInAccessibilityName: true
245
+ }, label), /*#__PURE__*/ $gpy1V$react.createElement("div", {
246
+ role: "presentation",
247
+ className: $gpy1V$classNames((/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports)), 'spectrum-FieldGroup-group', {
248
+ 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
249
+ })
250
+ }, /*#__PURE__*/ $gpy1V$react.createElement($gpy1V$Provider, {
251
+ isEmphasized: isEmphasized,
252
+ validationState: validationState
253
+ }, /*#__PURE__*/ $gpy1V$react.createElement($8c8ab388b155237e$export$baf37c4be89255b8.Provider, {
254
+ value: state
255
+ }, children)))));
209
256
  }
210
257
  /**
211
258
  * A CheckboxGroup allows users to select one or more items from a list of choices.
212
- */
259
+ */ const $73f43ce9d441cc69$export$4aa08d5625cb8ead = /*#__PURE__*/ $gpy1V$react.forwardRef($73f43ce9d441cc69$var$CheckboxGroup);
260
+
261
+
213
262
 
214
263
 
215
- export const CheckboxGroup = /*#__PURE__*/_react.forwardRef($e22ad9c258293c82626b875dc3985$var$CheckboxGroup);
264
+ export {$25b6292d81af2844$export$48513f6b9f8ce62d as Checkbox, $73f43ce9d441cc69$export$4aa08d5625cb8ead as CheckboxGroup};
216
265
  //# sourceMappingURL=module.js.map