@react-aria/toggle 3.11.5 → 3.12.0

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.
@@ -1 +1 @@
1
- {"mappings":";;;;AAmBA;IACE,+CAA+C;IAC/C,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,+CAA+C;IAC/C,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,0BAA0B,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,UAAU,CAkEzH;AC5FD,YAAY,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-aria/toggle/src/packages/@react-aria/toggle/src/useToggle.ts","packages/@react-aria/toggle/src/packages/@react-aria/toggle/src/index.ts","packages/@react-aria/toggle/src/index.ts"],"sourcesContent":[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\nexport {useToggle} from './useToggle';\nexport type {AriaToggleProps} from '@react-types/checkbox';\nexport type {ToggleAria} from './useToggle';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;;AAmBA;IACE,+CAA+C;IAC/C,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,+CAA+C;IAC/C,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,0BAA0B,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,UAAU,CAsFzH;AChHD,YAAY,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-aria/toggle/src/packages/@react-aria/toggle/src/useToggle.ts","packages/@react-aria/toggle/src/packages/@react-aria/toggle/src/index.ts","packages/@react-aria/toggle/src/index.ts"],"sourcesContent":[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\nexport {useToggle} from './useToggle';\nexport type {AriaToggleProps} from '@react-types/checkbox';\nexport type {ToggleAria} from './useToggle';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -20,7 +20,7 @@ $parcel$export(module.exports, "useToggle", () => $ee1b638d33c90dcc$export$cbe85
20
20
  */
21
21
 
22
22
  function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
23
- let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
23
+ let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, form: form, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;
24
24
  let onChange = (e)=>{
25
25
  // since we spread props on label, onChange will end up there as well as in here.
26
26
  // so we have to stop propagation at the lowest level that we care about
@@ -32,12 +32,24 @@ function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
32
32
  if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');
33
33
  // Handle press state for keyboard interactions and cases where labelProps is not used.
34
34
  let { pressProps: pressProps, isPressed: isPressed } = (0, $2jyrz$reactariainteractions.usePress)({
35
+ onPressStart: onPressStart,
36
+ onPressEnd: onPressEnd,
37
+ onPressChange: onPressChange,
38
+ onPress: onPress,
39
+ onPressUp: onPressUp,
40
+ onClick: onClick,
35
41
  isDisabled: isDisabled
36
42
  });
37
43
  // Handle press state on the label.
38
44
  let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $2jyrz$reactariainteractions.usePress)({
39
- onPress () {
45
+ onPressStart: onPressStart,
46
+ onPressEnd: onPressEnd,
47
+ onPressChange: onPressChange,
48
+ onPressUp: onPressUp,
49
+ onClick: onClick,
50
+ onPress (e) {
40
51
  var _ref_current;
52
+ onPress === null || onPress === void 0 ? void 0 : onPress(e);
41
53
  state.toggle();
42
54
  (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
43
55
  },
@@ -48,7 +60,7 @@ function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
48
60
  let domProps = (0, $2jyrz$reactariautils.filterDOMProps)(props, {
49
61
  labelable: true
50
62
  });
51
- (0, $2jyrz$reactariautils.useFormReset)(ref, state.isSelected, state.setSelected);
63
+ (0, $2jyrz$reactariautils.useFormReset)(ref, state.defaultSelected, state.setSelected);
52
64
  return {
53
65
  labelProps: (0, $2jyrz$reactariautils.mergeProps)(labelProps, {
54
66
  onClick: (e)=>e.preventDefault()
@@ -64,6 +76,7 @@ function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
64
76
  value: value
65
77
  },
66
78
  name: name,
79
+ form: form,
67
80
  type: 'checkbox',
68
81
  ...interactions
69
82
  }),
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AA6BM,SAAS,0CAAU,KAAsB,EAAE,KAAkB,EAAE,GAAuC;IAC3G,IAAI,cACF,aAAa,mBACb,aAAa,cACb,KAAK,QACL,IAAI,YACJ,QAAQ,EACR,cAAc,SAAS,EACvB,mBAAmB,cAAc,mBACjC,kBAAkB,oBAClB,SAAS,EACV,GAAG;IAEJ,IAAI,WAAW,CAAC;QACd,iFAAiF;QACjF,wEAAwE;QACxE,EAAE,eAAe;QACjB,MAAM,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO;IACpC;IAEA,IAAI,cAAc,YAAY;IAC9B,IAAI,eAAe,aAAa,QAAQ,kBAAkB;IAC1D,IAAI,CAAC,eAAe,CAAC,gBAAgB,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC5D,QAAQ,IAAI,CAAC;IAGf,uFAAuF;IACvF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;oBACrC;IACF;IAEA,mCAAmC;IACnC,IAAI,EAAC,YAAY,UAAU,EAAE,WAAW,cAAc,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QACjE;gBAEE;YADA,MAAM,MAAM;aACZ,eAAA,IAAI,OAAO,cAAX,mCAAA,aAAa,KAAK;QACpB;QACA,YAAY,cAAc;IAC5B;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC3C,IAAI,eAAe,CAAA,GAAA,gCAAS,EAAE,YAAY;IAC1C,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,CAAA,GAAA,kCAAW,EAAE,KAAK,MAAM,UAAU,EAAE,MAAM,WAAW;IAErD,OAAO;QACL,YAAY,CAAA,GAAA,gCAAS,EAAE,YAAY;YAAC,SAAS,CAAA,IAAK,EAAE,cAAc;QAAE;QACpE,YAAY,CAAA,GAAA,gCAAS,EAAE,UAAU;YAC/B,gBAAgB,aAAa,oBAAoB,aAAa;YAC9D,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,cAAc;sBAC/B;YACA,UAAU;YACV,GAAI,SAAS,OAAO,CAAC,IAAI;uBAAC;YAAK,CAAC;kBAChC;YACA,MAAM;YACN,GAAG,YAAY;QACjB;QACA,YAAY,MAAM,UAAU;QAC5B,WAAW,aAAa;oBACxB;oBACA;QACA,WAAW,aAAa,oBAAoB;IAC9C;AACF","sources":["packages/@react-aria/toggle/src/useToggle.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaToggleProps} from '@react-types/checkbox';\nimport {filterDOMProps, mergeProps, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useFocusable, usePress} from '@react-aria/interactions';\n\nexport interface ToggleAria {\n /** Props to be spread on the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to be spread on the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Whether the toggle is selected. */\n isSelected: boolean,\n /** Whether the toggle is in a pressed state. */\n isPressed: boolean,\n /** Whether the toggle is disabled. */\n isDisabled: boolean,\n /** Whether the toggle is read only. */\n isReadOnly: boolean,\n /** Whether the toggle is invalid. */\n isInvalid: boolean\n}\n\n/**\n * Handles interactions for toggle elements, e.g. Checkboxes and Switches.\n */\nexport function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria {\n let {\n isDisabled = false,\n isReadOnly = false,\n value,\n name,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n validationState = 'valid',\n isInvalid\n } = props;\n\n let onChange = (e) => {\n // since we spread props on label, onChange will end up there as well as in here.\n // so we have to stop propagation at the lowest level that we care about\n e.stopPropagation();\n state.setSelected(e.target.checked);\n };\n\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') {\n console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n }\n\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let {pressProps, isPressed} = usePress({\n isDisabled\n });\n\n // Handle press state on the label.\n let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({\n onPress() {\n state.toggle();\n ref.current?.focus();\n },\n isDisabled: isDisabled || isReadOnly\n });\n\n let {focusableProps} = useFocusable(props, ref);\n let interactions = mergeProps(pressProps, focusableProps);\n let domProps = filterDOMProps(props, {labelable: true});\n\n useFormReset(ref, state.isSelected, state.setSelected);\n\n return {\n labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),\n inputProps: mergeProps(domProps, {\n 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-controls': props['aria-controls'],\n 'aria-readonly': isReadOnly || undefined,\n onChange,\n disabled: isDisabled,\n ...(value == null ? {} : {value}),\n name,\n type: 'checkbox',\n ...interactions\n }),\n isSelected: state.isSelected,\n isPressed: isPressed || isLabelPressed,\n isDisabled,\n isReadOnly,\n isInvalid: isInvalid || validationState === 'invalid'\n };\n}\n"],"names":[],"version":3,"file":"useToggle.main.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AA6BM,SAAS,0CAAU,KAAsB,EAAE,KAAkB,EAAE,GAAuC;IAC3G,IAAI,cACF,aAAa,mBACb,aAAa,cACb,KAAK,QACL,IAAI,QACJ,IAAI,YACJ,QAAQ,EACR,cAAc,SAAS,EACvB,mBAAmB,cAAc,mBACjC,kBAAkB,oBAClB,SAAS,gBACT,YAAY,cACZ,UAAU,iBACV,aAAa,WACb,OAAO,aACP,SAAS,WACT,OAAO,EACR,GAAG;IAEJ,IAAI,WAAW,CAAC;QACd,iFAAiF;QACjF,wEAAwE;QACxE,EAAE,eAAe;QACjB,MAAM,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO;IACpC;IAEA,IAAI,cAAc,YAAY;IAC9B,IAAI,eAAe,aAAa,QAAQ,kBAAkB;IAC1D,IAAI,CAAC,eAAe,CAAC,gBAAgB,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC5D,QAAQ,IAAI,CAAC;IAGf,uFAAuF;IACvF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;IACF;IAEA,mCAAmC;IACnC,IAAI,EAAC,YAAY,UAAU,EAAE,WAAW,cAAc,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;sBACjE;oBACA;uBACA;mBACA;iBACA;QACA,SAAQ,CAAC;gBAGP;YAFA,oBAAA,8BAAA,QAAU;YACV,MAAM,MAAM;aACZ,eAAA,IAAI,OAAO,cAAX,mCAAA,aAAa,KAAK;QACpB;QACA,YAAY,cAAc;IAC5B;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,yCAAW,EAAE,OAAO;IAC3C,IAAI,eAAe,CAAA,GAAA,gCAAS,EAAE,YAAY;IAC1C,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,CAAA,GAAA,kCAAW,EAAE,KAAK,MAAM,eAAe,EAAE,MAAM,WAAW;IAE1D,OAAO;QACL,YAAY,CAAA,GAAA,gCAAS,EAAE,YAAY;YAAC,SAAS,CAAA,IAAK,EAAE,cAAc;QAAE;QACpE,YAAY,CAAA,GAAA,gCAAS,EAAE,UAAU;YAC/B,gBAAgB,aAAa,oBAAoB,aAAa;YAC9D,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,cAAc;sBAC/B;YACA,UAAU;YACV,GAAI,SAAS,OAAO,CAAC,IAAI;uBAAC;YAAK,CAAC;kBAChC;kBACA;YACA,MAAM;YACN,GAAG,YAAY;QACjB;QACA,YAAY,MAAM,UAAU;QAC5B,WAAW,aAAa;oBACxB;oBACA;QACA,WAAW,aAAa,oBAAoB;IAC9C;AACF","sources":["packages/@react-aria/toggle/src/useToggle.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaToggleProps} from '@react-types/checkbox';\nimport {filterDOMProps, mergeProps, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useFocusable, usePress} from '@react-aria/interactions';\n\nexport interface ToggleAria {\n /** Props to be spread on the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to be spread on the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Whether the toggle is selected. */\n isSelected: boolean,\n /** Whether the toggle is in a pressed state. */\n isPressed: boolean,\n /** Whether the toggle is disabled. */\n isDisabled: boolean,\n /** Whether the toggle is read only. */\n isReadOnly: boolean,\n /** Whether the toggle is invalid. */\n isInvalid: boolean\n}\n\n/**\n * Handles interactions for toggle elements, e.g. Checkboxes and Switches.\n */\nexport function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria {\n let {\n isDisabled = false,\n isReadOnly = false,\n value,\n name,\n form,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n validationState = 'valid',\n isInvalid,\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick\n } = props;\n\n let onChange = (e) => {\n // since we spread props on label, onChange will end up there as well as in here.\n // so we have to stop propagation at the lowest level that we care about\n e.stopPropagation();\n state.setSelected(e.target.checked);\n };\n\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') {\n console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n }\n\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled\n });\n\n // Handle press state on the label.\n let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPressUp,\n onClick,\n onPress(e) {\n onPress?.(e);\n state.toggle();\n ref.current?.focus();\n },\n isDisabled: isDisabled || isReadOnly\n });\n\n let {focusableProps} = useFocusable(props, ref);\n let interactions = mergeProps(pressProps, focusableProps);\n let domProps = filterDOMProps(props, {labelable: true});\n\n useFormReset(ref, state.defaultSelected, state.setSelected);\n\n return {\n labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),\n inputProps: mergeProps(domProps, {\n 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-controls': props['aria-controls'],\n 'aria-readonly': isReadOnly || undefined,\n onChange,\n disabled: isDisabled,\n ...(value == null ? {} : {value}),\n name,\n form,\n type: 'checkbox',\n ...interactions\n }),\n isSelected: state.isSelected,\n isPressed: isPressed || isLabelPressed,\n isDisabled,\n isReadOnly,\n isInvalid: isInvalid || validationState === 'invalid'\n };\n}\n"],"names":[],"version":3,"file":"useToggle.main.js.map"}
@@ -14,7 +14,7 @@ import {usePress as $bvdLj$usePress, useFocusable as $bvdLj$useFocusable} from "
14
14
  */
15
15
 
16
16
  function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
17
- let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
17
+ let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, form: form, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;
18
18
  let onChange = (e)=>{
19
19
  // since we spread props on label, onChange will end up there as well as in here.
20
20
  // so we have to stop propagation at the lowest level that we care about
@@ -26,12 +26,24 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
26
26
  if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');
27
27
  // Handle press state for keyboard interactions and cases where labelProps is not used.
28
28
  let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({
29
+ onPressStart: onPressStart,
30
+ onPressEnd: onPressEnd,
31
+ onPressChange: onPressChange,
32
+ onPress: onPress,
33
+ onPressUp: onPressUp,
34
+ onClick: onClick,
29
35
  isDisabled: isDisabled
30
36
  });
31
37
  // Handle press state on the label.
32
38
  let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({
33
- onPress () {
39
+ onPressStart: onPressStart,
40
+ onPressEnd: onPressEnd,
41
+ onPressChange: onPressChange,
42
+ onPressUp: onPressUp,
43
+ onClick: onClick,
44
+ onPress (e) {
34
45
  var _ref_current;
46
+ onPress === null || onPress === void 0 ? void 0 : onPress(e);
35
47
  state.toggle();
36
48
  (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
37
49
  },
@@ -42,7 +54,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
42
54
  let domProps = (0, $bvdLj$filterDOMProps)(props, {
43
55
  labelable: true
44
56
  });
45
- (0, $bvdLj$useFormReset)(ref, state.isSelected, state.setSelected);
57
+ (0, $bvdLj$useFormReset)(ref, state.defaultSelected, state.setSelected);
46
58
  return {
47
59
  labelProps: (0, $bvdLj$mergeProps)(labelProps, {
48
60
  onClick: (e)=>e.preventDefault()
@@ -58,6 +70,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
58
70
  value: value
59
71
  },
60
72
  name: name,
73
+ form: form,
61
74
  type: 'checkbox',
62
75
  ...interactions
63
76
  }),
@@ -14,7 +14,7 @@ import {usePress as $bvdLj$usePress, useFocusable as $bvdLj$useFocusable} from "
14
14
  */
15
15
 
16
16
  function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
17
- let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
17
+ let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, form: form, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;
18
18
  let onChange = (e)=>{
19
19
  // since we spread props on label, onChange will end up there as well as in here.
20
20
  // so we have to stop propagation at the lowest level that we care about
@@ -26,12 +26,24 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
26
26
  if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');
27
27
  // Handle press state for keyboard interactions and cases where labelProps is not used.
28
28
  let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({
29
+ onPressStart: onPressStart,
30
+ onPressEnd: onPressEnd,
31
+ onPressChange: onPressChange,
32
+ onPress: onPress,
33
+ onPressUp: onPressUp,
34
+ onClick: onClick,
29
35
  isDisabled: isDisabled
30
36
  });
31
37
  // Handle press state on the label.
32
38
  let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({
33
- onPress () {
39
+ onPressStart: onPressStart,
40
+ onPressEnd: onPressEnd,
41
+ onPressChange: onPressChange,
42
+ onPressUp: onPressUp,
43
+ onClick: onClick,
44
+ onPress (e) {
34
45
  var _ref_current;
46
+ onPress === null || onPress === void 0 ? void 0 : onPress(e);
35
47
  state.toggle();
36
48
  (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
37
49
  },
@@ -42,7 +54,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
42
54
  let domProps = (0, $bvdLj$filterDOMProps)(props, {
43
55
  labelable: true
44
56
  });
45
- (0, $bvdLj$useFormReset)(ref, state.isSelected, state.setSelected);
57
+ (0, $bvdLj$useFormReset)(ref, state.defaultSelected, state.setSelected);
46
58
  return {
47
59
  labelProps: (0, $bvdLj$mergeProps)(labelProps, {
48
60
  onClick: (e)=>e.preventDefault()
@@ -58,6 +70,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
58
70
  value: value
59
71
  },
60
72
  name: name,
73
+ form: form,
61
74
  type: 'checkbox',
62
75
  ...interactions
63
76
  }),
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AA6BM,SAAS,0CAAU,KAAsB,EAAE,KAAkB,EAAE,GAAuC;IAC3G,IAAI,cACF,aAAa,mBACb,aAAa,cACb,KAAK,QACL,IAAI,YACJ,QAAQ,EACR,cAAc,SAAS,EACvB,mBAAmB,cAAc,mBACjC,kBAAkB,oBAClB,SAAS,EACV,GAAG;IAEJ,IAAI,WAAW,CAAC;QACd,iFAAiF;QACjF,wEAAwE;QACxE,EAAE,eAAe;QACjB,MAAM,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO;IACpC;IAEA,IAAI,cAAc,YAAY;IAC9B,IAAI,eAAe,aAAa,QAAQ,kBAAkB;IAC1D,IAAI,CAAC,eAAe,CAAC,gBAAgB,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC5D,QAAQ,IAAI,CAAC;IAGf,uFAAuF;IACvF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBACrC;IACF;IAEA,mCAAmC;IACnC,IAAI,EAAC,YAAY,UAAU,EAAE,WAAW,cAAc,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QACjE;gBAEE;YADA,MAAM,MAAM;aACZ,eAAA,IAAI,OAAO,cAAX,mCAAA,aAAa,KAAK;QACpB;QACA,YAAY,cAAc;IAC5B;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC3C,IAAI,eAAe,CAAA,GAAA,iBAAS,EAAE,YAAY;IAC1C,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,CAAA,GAAA,mBAAW,EAAE,KAAK,MAAM,UAAU,EAAE,MAAM,WAAW;IAErD,OAAO;QACL,YAAY,CAAA,GAAA,iBAAS,EAAE,YAAY;YAAC,SAAS,CAAA,IAAK,EAAE,cAAc;QAAE;QACpE,YAAY,CAAA,GAAA,iBAAS,EAAE,UAAU;YAC/B,gBAAgB,aAAa,oBAAoB,aAAa;YAC9D,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,cAAc;sBAC/B;YACA,UAAU;YACV,GAAI,SAAS,OAAO,CAAC,IAAI;uBAAC;YAAK,CAAC;kBAChC;YACA,MAAM;YACN,GAAG,YAAY;QACjB;QACA,YAAY,MAAM,UAAU;QAC5B,WAAW,aAAa;oBACxB;oBACA;QACA,WAAW,aAAa,oBAAoB;IAC9C;AACF","sources":["packages/@react-aria/toggle/src/useToggle.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaToggleProps} from '@react-types/checkbox';\nimport {filterDOMProps, mergeProps, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useFocusable, usePress} from '@react-aria/interactions';\n\nexport interface ToggleAria {\n /** Props to be spread on the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to be spread on the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Whether the toggle is selected. */\n isSelected: boolean,\n /** Whether the toggle is in a pressed state. */\n isPressed: boolean,\n /** Whether the toggle is disabled. */\n isDisabled: boolean,\n /** Whether the toggle is read only. */\n isReadOnly: boolean,\n /** Whether the toggle is invalid. */\n isInvalid: boolean\n}\n\n/**\n * Handles interactions for toggle elements, e.g. Checkboxes and Switches.\n */\nexport function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria {\n let {\n isDisabled = false,\n isReadOnly = false,\n value,\n name,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n validationState = 'valid',\n isInvalid\n } = props;\n\n let onChange = (e) => {\n // since we spread props on label, onChange will end up there as well as in here.\n // so we have to stop propagation at the lowest level that we care about\n e.stopPropagation();\n state.setSelected(e.target.checked);\n };\n\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') {\n console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n }\n\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let {pressProps, isPressed} = usePress({\n isDisabled\n });\n\n // Handle press state on the label.\n let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({\n onPress() {\n state.toggle();\n ref.current?.focus();\n },\n isDisabled: isDisabled || isReadOnly\n });\n\n let {focusableProps} = useFocusable(props, ref);\n let interactions = mergeProps(pressProps, focusableProps);\n let domProps = filterDOMProps(props, {labelable: true});\n\n useFormReset(ref, state.isSelected, state.setSelected);\n\n return {\n labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),\n inputProps: mergeProps(domProps, {\n 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-controls': props['aria-controls'],\n 'aria-readonly': isReadOnly || undefined,\n onChange,\n disabled: isDisabled,\n ...(value == null ? {} : {value}),\n name,\n type: 'checkbox',\n ...interactions\n }),\n isSelected: state.isSelected,\n isPressed: isPressed || isLabelPressed,\n isDisabled,\n isReadOnly,\n isInvalid: isInvalid || validationState === 'invalid'\n };\n}\n"],"names":[],"version":3,"file":"useToggle.module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC;;AA6BM,SAAS,0CAAU,KAAsB,EAAE,KAAkB,EAAE,GAAuC;IAC3G,IAAI,cACF,aAAa,mBACb,aAAa,cACb,KAAK,QACL,IAAI,QACJ,IAAI,YACJ,QAAQ,EACR,cAAc,SAAS,EACvB,mBAAmB,cAAc,mBACjC,kBAAkB,oBAClB,SAAS,gBACT,YAAY,cACZ,UAAU,iBACV,aAAa,WACb,OAAO,aACP,SAAS,WACT,OAAO,EACR,GAAG;IAEJ,IAAI,WAAW,CAAC;QACd,iFAAiF;QACjF,wEAAwE;QACxE,EAAE,eAAe;QACjB,MAAM,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO;IACpC;IAEA,IAAI,cAAc,YAAY;IAC9B,IAAI,eAAe,aAAa,QAAQ,kBAAkB;IAC1D,IAAI,CAAC,eAAe,CAAC,gBAAgB,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAC5D,QAAQ,IAAI,CAAC;IAGf,uFAAuF;IACvF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;sBACrC;oBACA;uBACA;iBACA;mBACA;iBACA;oBACA;IACF;IAEA,mCAAmC;IACnC,IAAI,EAAC,YAAY,UAAU,EAAE,WAAW,cAAc,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;sBACjE;oBACA;uBACA;mBACA;iBACA;QACA,SAAQ,CAAC;gBAGP;YAFA,oBAAA,8BAAA,QAAU;YACV,MAAM,MAAM;aACZ,eAAA,IAAI,OAAO,cAAX,mCAAA,aAAa,KAAK;QACpB;QACA,YAAY,cAAc;IAC5B;IAEA,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC3C,IAAI,eAAe,CAAA,GAAA,iBAAS,EAAE,YAAY;IAC1C,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,CAAA,GAAA,mBAAW,EAAE,KAAK,MAAM,eAAe,EAAE,MAAM,WAAW;IAE1D,OAAO;QACL,YAAY,CAAA,GAAA,iBAAS,EAAE,YAAY;YAAC,SAAS,CAAA,IAAK,EAAE,cAAc;QAAE;QACpE,YAAY,CAAA,GAAA,iBAAS,EAAE,UAAU;YAC/B,gBAAgB,aAAa,oBAAoB,aAAa;YAC9D,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,iBAAiB,KAAK,CAAC,gBAAgB;YACvC,iBAAiB,cAAc;sBAC/B;YACA,UAAU;YACV,GAAI,SAAS,OAAO,CAAC,IAAI;uBAAC;YAAK,CAAC;kBAChC;kBACA;YACA,MAAM;YACN,GAAG,YAAY;QACjB;QACA,YAAY,MAAM,UAAU;QAC5B,WAAW,aAAa;oBACxB;oBACA;QACA,WAAW,aAAa,oBAAoB;IAC9C;AACF","sources":["packages/@react-aria/toggle/src/useToggle.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaToggleProps} from '@react-types/checkbox';\nimport {filterDOMProps, mergeProps, useFormReset} from '@react-aria/utils';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useFocusable, usePress} from '@react-aria/interactions';\n\nexport interface ToggleAria {\n /** Props to be spread on the label element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to be spread on the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Whether the toggle is selected. */\n isSelected: boolean,\n /** Whether the toggle is in a pressed state. */\n isPressed: boolean,\n /** Whether the toggle is disabled. */\n isDisabled: boolean,\n /** Whether the toggle is read only. */\n isReadOnly: boolean,\n /** Whether the toggle is invalid. */\n isInvalid: boolean\n}\n\n/**\n * Handles interactions for toggle elements, e.g. Checkboxes and Switches.\n */\nexport function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria {\n let {\n isDisabled = false,\n isReadOnly = false,\n value,\n name,\n form,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n validationState = 'valid',\n isInvalid,\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick\n } = props;\n\n let onChange = (e) => {\n // since we spread props on label, onChange will end up there as well as in here.\n // so we have to stop propagation at the lowest level that we care about\n e.stopPropagation();\n state.setSelected(e.target.checked);\n };\n\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') {\n console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n }\n\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let {pressProps, isPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPress,\n onPressUp,\n onClick,\n isDisabled\n });\n\n // Handle press state on the label.\n let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({\n onPressStart,\n onPressEnd,\n onPressChange,\n onPressUp,\n onClick,\n onPress(e) {\n onPress?.(e);\n state.toggle();\n ref.current?.focus();\n },\n isDisabled: isDisabled || isReadOnly\n });\n\n let {focusableProps} = useFocusable(props, ref);\n let interactions = mergeProps(pressProps, focusableProps);\n let domProps = filterDOMProps(props, {labelable: true});\n\n useFormReset(ref, state.defaultSelected, state.setSelected);\n\n return {\n labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),\n inputProps: mergeProps(domProps, {\n 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-controls': props['aria-controls'],\n 'aria-readonly': isReadOnly || undefined,\n onChange,\n disabled: isDisabled,\n ...(value == null ? {} : {value}),\n name,\n form,\n type: 'checkbox',\n ...interactions\n }),\n isSelected: state.isSelected,\n isPressed: isPressed || isLabelPressed,\n isDisabled,\n isReadOnly,\n isInvalid: isInvalid || validationState === 'invalid'\n };\n}\n"],"names":[],"version":3,"file":"useToggle.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/toggle",
3
- "version": "3.11.5",
3
+ "version": "3.12.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -26,11 +26,11 @@
26
26
  "url": "https://github.com/adobe/react-spectrum"
27
27
  },
28
28
  "dependencies": {
29
- "@react-aria/interactions": "^3.25.3",
30
- "@react-aria/utils": "^3.29.1",
31
- "@react-stately/toggle": "^3.8.5",
32
- "@react-types/checkbox": "^3.9.5",
33
- "@react-types/shared": "^3.30.0",
29
+ "@react-aria/interactions": "^3.25.4",
30
+ "@react-aria/utils": "^3.30.0",
31
+ "@react-stately/toggle": "^3.9.0",
32
+ "@react-types/checkbox": "^3.10.0",
33
+ "@react-types/shared": "^3.31.0",
34
34
  "@swc/helpers": "^0.5.0"
35
35
  },
36
36
  "peerDependencies": {
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "a063122082d2b372e4846b58c85ae69ec73887ff"
43
+ "gitHead": "8b9348ff255e018b2dd9b27e2a45507cadfa1d35"
44
44
  }
package/src/useToggle.ts CHANGED
@@ -43,11 +43,18 @@ export function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefOb
43
43
  isReadOnly = false,
44
44
  value,
45
45
  name,
46
+ form,
46
47
  children,
47
48
  'aria-label': ariaLabel,
48
49
  'aria-labelledby': ariaLabelledby,
49
50
  validationState = 'valid',
50
- isInvalid
51
+ isInvalid,
52
+ onPressStart,
53
+ onPressEnd,
54
+ onPressChange,
55
+ onPress,
56
+ onPressUp,
57
+ onClick
51
58
  } = props;
52
59
 
53
60
  let onChange = (e) => {
@@ -65,12 +72,24 @@ export function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefOb
65
72
 
66
73
  // Handle press state for keyboard interactions and cases where labelProps is not used.
67
74
  let {pressProps, isPressed} = usePress({
75
+ onPressStart,
76
+ onPressEnd,
77
+ onPressChange,
78
+ onPress,
79
+ onPressUp,
80
+ onClick,
68
81
  isDisabled
69
82
  });
70
83
 
71
84
  // Handle press state on the label.
72
85
  let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({
73
- onPress() {
86
+ onPressStart,
87
+ onPressEnd,
88
+ onPressChange,
89
+ onPressUp,
90
+ onClick,
91
+ onPress(e) {
92
+ onPress?.(e);
74
93
  state.toggle();
75
94
  ref.current?.focus();
76
95
  },
@@ -81,7 +100,7 @@ export function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefOb
81
100
  let interactions = mergeProps(pressProps, focusableProps);
82
101
  let domProps = filterDOMProps(props, {labelable: true});
83
102
 
84
- useFormReset(ref, state.isSelected, state.setSelected);
103
+ useFormReset(ref, state.defaultSelected, state.setSelected);
85
104
 
86
105
  return {
87
106
  labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),
@@ -94,6 +113,7 @@ export function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefOb
94
113
  disabled: isDisabled,
95
114
  ...(value == null ? {} : {value}),
96
115
  name,
116
+ form,
97
117
  type: 'checkbox',
98
118
  ...interactions
99
119
  }),