@react-spectrum/checkbox 3.0.0-nightly.1662 → 3.0.0-nightly.1663
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 +4 -25
- package/dist/main.js.map +1 -1
- package/dist/module.js +0 -6
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/index.ts +2 -4
package/dist/main.js
CHANGED
|
@@ -12,31 +12,15 @@ var $5Ft2u$reactspectrumlabel = require("@react-spectrum/label");
|
|
|
12
12
|
var $5Ft2u$reactstatelycheckbox = require("@react-stately/checkbox");
|
|
13
13
|
var $5Ft2u$reactspectrumform = require("@react-spectrum/form");
|
|
14
14
|
|
|
15
|
-
function $parcel$
|
|
16
|
-
Object.
|
|
17
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(dest, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return source[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return dest;
|
|
15
|
+
function $parcel$export(e, n, v, s) {
|
|
16
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
30
17
|
}
|
|
31
18
|
function $parcel$interopDefault(a) {
|
|
32
19
|
return a && a.__esModule ? a.default : a;
|
|
33
20
|
}
|
|
34
|
-
function $parcel$export(e, n, v, s) {
|
|
35
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
36
|
-
}
|
|
37
|
-
var $096ccd12d23dd6cc$exports = {};
|
|
38
21
|
|
|
39
|
-
$parcel$export(
|
|
22
|
+
$parcel$export(module.exports, "Checkbox", () => $096ccd12d23dd6cc$export$48513f6b9f8ce62d);
|
|
23
|
+
$parcel$export(module.exports, "CheckboxGroup", () => $1151290755e16c44$export$4aa08d5625cb8ead);
|
|
40
24
|
|
|
41
25
|
const $bdf3bf7fe71fe120$export$baf37c4be89255b8 = ($parcel$interopDefault($5Ft2u$react)).createContext(null);
|
|
42
26
|
|
|
@@ -161,9 +145,6 @@ function $096ccd12d23dd6cc$var$Checkbox(props, ref) {
|
|
|
161
145
|
*/ let $096ccd12d23dd6cc$export$48513f6b9f8ce62d = /*#__PURE__*/ $5Ft2u$react.forwardRef($096ccd12d23dd6cc$var$Checkbox);
|
|
162
146
|
|
|
163
147
|
|
|
164
|
-
var $1151290755e16c44$exports = {};
|
|
165
|
-
|
|
166
|
-
$parcel$export($1151290755e16c44$exports, "CheckboxGroup", () => $1151290755e16c44$export$4aa08d5625cb8ead);
|
|
167
148
|
|
|
168
149
|
|
|
169
150
|
|
|
@@ -278,8 +259,6 @@ function $1151290755e16c44$var$CheckboxGroup(props, ref) {
|
|
|
278
259
|
*/ const $1151290755e16c44$export$4aa08d5625cb8ead = /*#__PURE__*/ ($parcel$interopDefault($5Ft2u$react)).forwardRef($1151290755e16c44$var$CheckboxGroup);
|
|
279
260
|
|
|
280
261
|
|
|
281
|
-
$parcel$exportWildcard(module.exports, $096ccd12d23dd6cc$exports);
|
|
282
|
-
$parcel$exportWildcard(module.exports, $1151290755e16c44$exports);
|
|
283
262
|
|
|
284
263
|
|
|
285
264
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;AAC5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CAAC;0EAGJ,qCAAQ;QAAC,YAAY,EAAE,YAAY;QAAE,eAAe,EAAE,eAAe;0EACnE,yCAAoB,CAAC,QAAQ;QAAC,KAAK,EAAE,KAAK;OACxC,QAAQ;AAMrB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,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"}
|
|
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;AAC5B,GAA6B;AAZ7B,yCAAmC,GAAG,CAA0B;AAChE,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,wCAAkC,GAAG,CAAyB;AAC9D,yCAA6C,GAAG,CAAoC;AACpF,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAA0C,GAAG,CAAiC;AAC9E,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;;;;;;;SFc3C,8BAAQ,CAAC,KAA4B,EAAE,GAAmC,EAAE,CAAC;IACpF,GAAG,CAAC,aAAa,GAAG,KAAK;IACzB,KAAK,GAAG,6CAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,kBACH,eAAe,GAAG,KAAK,iBACvB,YAAY,GAAG,KAAK,eACpB,UAAU,GAAG,KAAK,cAClB,SAAS,aACT,QAAQ,oBACR,eAAe,MACZ,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,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,CAAC,EACD,EAAkD,AAAlD,gDAAkD;QAClD,oCAAU,CACR,gEAAW,EACX,CAAgB,kBAElB,UAAU,CAAC,SAAS;QAGxB,GAAG,EAAE,MAAM;OACV,KAAK,uEACH,+BAAK;WACA,UAAU;QACd,WAAW,EAAC,CAAM;QAClB,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,kBAAkB,EAAE,kBAAkB;QACtC,4CAA4C,EAA5C,IAA4C;OAC3C,KAAK,sEAGT,CAAG;QACF,IAAI,EAAC,CAAc;QACnB,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAA2B,4BAC3B,CAAC;YACC,CAAuC,wCAAE,WAAW,KAAK,CAAY;QACvE,CAAC;0EAGJ,qCAAQ;QAAC,YAAY,EAAE,YAAY;QAAE,eAAe,EAAE,eAAe;0EACnE,yCAAoB,CAAC,QAAQ;QAAC,KAAK,EAAE,KAAK;OACxC,QAAQ;AAMrB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} 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
|
@@ -18,9 +18,6 @@ function $parcel$interopDefault(a) {
|
|
|
18
18
|
function $parcel$export(e, n, v, s) {
|
|
19
19
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
20
20
|
}
|
|
21
|
-
var $25b6292d81af2844$exports = {};
|
|
22
|
-
|
|
23
|
-
$parcel$export($25b6292d81af2844$exports, "Checkbox", () => $25b6292d81af2844$export$48513f6b9f8ce62d);
|
|
24
21
|
|
|
25
22
|
const $8c8ab388b155237e$export$baf37c4be89255b8 = $gpy1V$react.createContext(null);
|
|
26
23
|
|
|
@@ -145,9 +142,6 @@ function $25b6292d81af2844$var$Checkbox(props, ref) {
|
|
|
145
142
|
*/ let $25b6292d81af2844$export$48513f6b9f8ce62d = /*#__PURE__*/ $gpy1V$forwardRef($25b6292d81af2844$var$Checkbox);
|
|
146
143
|
|
|
147
144
|
|
|
148
|
-
var $73f43ce9d441cc69$exports = {};
|
|
149
|
-
|
|
150
|
-
$parcel$export($73f43ce9d441cc69$exports, "CheckboxGroup", () => $73f43ce9d441cc69$export$4aa08d5625cb8ead);
|
|
151
145
|
|
|
152
146
|
|
|
153
147
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,YAAK,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;AAC5B,GAA6B;AAZ7B,yCAAmC,GAAG,CAA0B;AAChE,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,wCAAkC,GAAG,CAAyB;AAC9D,yCAA6C,GAAG,CAAoC;AACpF,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAA0C,GAAG,CAAiC;AAC9E,yCAA4B,GAAG,CAAmB;AAClD,yCAA6B,GAAG,CAAoB;;;;;;;SFc3C,8BAAQ,CAAC,KAA4B,EAAE,GAAmC,EAAE,CAAC;IACpF,GAAG,CAAC,aAAa,GAAG,KAAK;IACzB,KAAK,GAAG,uBAAgB,CAAC,KAAK;IAC9B,GAAG,CAAC,CAAC,kBACH,eAAe,GAAG,KAAK,iBACvB,YAAY,GAAG,KAAK,eACpB,UAAU,GAAG,KAAK,cAClB,SAAS,aACT,QAAQ,oBACR,eAAe,MACZ,UAAU,CACf,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,oB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,aAAa,KAAK,CAAM;QAC/D,CAAC,EACD,EAAkD,AAAlD,gDAAkD;QAClD,iBAAU,CACR,gEAAW,EACX,CAAgB,kBAElB,UAAU,CAAC,SAAS;QAGxB,GAAG,EAAE,MAAM;OACV,KAAK,6CACH,YAAK;WACA,UAAU;QACd,WAAW,EAAC,CAAM;QAClB,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,kBAAkB,EAAE,kBAAkB;QACtC,4CAA4C,EAA5C,IAA4C;OAC3C,KAAK,4CAGT,CAAG;QACF,IAAI,EAAC,CAAc;QACnB,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAA2B,4BAC3B,CAAC;YACC,CAAuC,wCAAE,WAAW,KAAK,CAAY;QACvE,CAAC;gDAGJ,eAAQ;QAAC,YAAY,EAAE,YAAY;QAAE,eAAe,EAAE,eAAe;gDACnE,yCAAoB,CAAC,QAAQ;QAAC,KAAK,EAAE,KAAK;OACxC,QAAQ;AAMrB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAc,iBAAG,YAAK,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":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AEeO,KAAK,CAAC,yCAAoB,GAAG,YAAK,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;AAC5B,GAA6B;AAZ7B,yCAAmC,GAAG,CAA0B;AAChE,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B,GAAG,CAAmB;AAClD,yCAAuC,GAAG,CAA8B;AACxE,wCAAkC,GAAG,CAAyB;AAC9D,yCAA6C,GAAG,CAAoC;AACpF,yCAAoD,GAAG,CAA2C;AAClG,yCAA4B,GAAG,CAAmB;AAClD,yCAAyC,GAAG,CAAgC;AAC5E,yCAA4B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/@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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} 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":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;ACiHA;;;GAGG;AACH,OAAA,IAAI,2KAAgC,CAAC;ACnBrC;;GAEG;AACH,OAAA,MAAM,2JAAgD,CAAC","sources":["packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/context.ts","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\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
|
|
1
|
+
{"mappings":";;ACiHA;;;GAGG;AACH,OAAA,IAAI,2KAAgC,CAAC;ACnBrC;;GAEG;AACH,OAAA,MAAM,2JAAgD,CAAC","sources":["packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/context.ts","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/Checkbox.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/CheckboxGroup.tsx","packages/@react-spectrum/checkbox/src/packages/@react-spectrum/checkbox/src/index.ts","packages/@react-spectrum/checkbox/src/index.ts"],"sourcesContent":[null,null,null,null,"/*\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/// <reference types=\"css-module-types\" />\nexport {Checkbox} from './Checkbox';\nexport {CheckboxGroup} from './CheckboxGroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/checkbox",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1663+2a6c48eb0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/checkbox": "3.0.0-nightly.
|
|
36
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
37
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
38
|
-
"@react-spectrum/form": "3.0.0-nightly.
|
|
39
|
-
"@react-spectrum/label": "3.6.2-nightly.
|
|
40
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
41
|
-
"@react-stately/checkbox": "3.1.2-nightly.
|
|
42
|
-
"@react-stately/toggle": "3.0.0-nightly.
|
|
43
|
-
"@react-types/checkbox": "3.0.0-nightly.
|
|
44
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
45
|
-
"@spectrum-icons/ui": "3.0.0-nightly.
|
|
35
|
+
"@react-aria/checkbox": "3.0.0-nightly.1663+2a6c48eb0",
|
|
36
|
+
"@react-aria/focus": "3.0.0-nightly.1663+2a6c48eb0",
|
|
37
|
+
"@react-aria/interactions": "3.0.0-nightly.1663+2a6c48eb0",
|
|
38
|
+
"@react-spectrum/form": "3.0.0-nightly.1663+2a6c48eb0",
|
|
39
|
+
"@react-spectrum/label": "3.6.2-nightly.3363+2a6c48eb0",
|
|
40
|
+
"@react-spectrum/utils": "3.0.0-nightly.1663+2a6c48eb0",
|
|
41
|
+
"@react-stately/checkbox": "3.1.2-nightly.3363+2a6c48eb0",
|
|
42
|
+
"@react-stately/toggle": "3.0.0-nightly.1663+2a6c48eb0",
|
|
43
|
+
"@react-types/checkbox": "3.0.0-nightly.1663+2a6c48eb0",
|
|
44
|
+
"@react-types/shared": "3.0.0-nightly.1663+2a6c48eb0",
|
|
45
|
+
"@spectrum-icons/ui": "3.0.0-nightly.1663+2a6c48eb0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
48
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1663+2a6c48eb0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "2a6c48eb0099671cf9b530ec3d75882c549e9cb5"
|
|
58
58
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
/// <reference types="css-module-types" />
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export * from './CheckboxGroup';
|
|
13
|
+
export {Checkbox} from './Checkbox';
|
|
14
|
+
export {CheckboxGroup} from './CheckboxGroup';
|