@react-aria/steplist 3.0.0-nightly.4409 → 3.0.0-nightly.4419

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/import.mjs CHANGED
@@ -183,12 +183,13 @@ function $dd7f9f4bee5b11b8$export$fd9dc107b7325b53(props, state, ref) {
183
183
  });
184
184
  const isSelected = selectedKey === key;
185
185
  let onKeyDown = (event)=>{
186
+ var _itemProps_onKeyDown;
186
187
  const { key: eventKey } = event;
187
188
  if (eventKey === "ArrowDown" || eventKey === "ArrowUp") {
188
189
  event.preventDefault();
189
190
  event.stopPropagation();
190
191
  }
191
- itemProps.onKeyDown(event);
192
+ (_itemProps_onKeyDown = itemProps.onKeyDown) === null || _itemProps_onKeyDown === void 0 ? void 0 : _itemProps_onKeyDown.call(itemProps, event);
192
193
  };
193
194
  return {
194
195
  stepProps: {
package/dist/main.js CHANGED
@@ -190,12 +190,13 @@ function $0246bc8e841080a9$export$fd9dc107b7325b53(props, state, ref) {
190
190
  });
191
191
  const isSelected = selectedKey === key;
192
192
  let onKeyDown = (event)=>{
193
+ var _itemProps_onKeyDown;
193
194
  const { key: eventKey } = event;
194
195
  if (eventKey === "ArrowDown" || eventKey === "ArrowUp") {
195
196
  event.preventDefault();
196
197
  event.stopPropagation();
197
198
  }
198
- itemProps.onKeyDown(event);
199
+ (_itemProps_onKeyDown = itemProps.onKeyDown) === null || _itemProps_onKeyDown === void 0 ? void 0 : _itemProps_onKeyDown.call(itemProps, event);
199
200
  };
200
201
  return {
201
202
  stepProps: {
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBD,4BAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;AACX;;;;;AD1CO,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAgC;IACnH,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,gEAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,gCAAS,EAAE,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF;;CDxCC;AGVD;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAA2B;IACnH,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;QACf,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;QAEA,UAAU,SAAS,CAAC;IACtB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF;","sources":["packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/*.js","packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {useStepList} from './useStepList';\nexport {useStepListItem} from './useStepListItem';\n\nexport type {AriaStepListProps, StepListAria} from './useStepList';\nexport type {AriaStepListItemProps, StepListItemAria} from './useStepListItem';\n","/*\n * Copyright 2023 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 {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","/*\n * Copyright 2023 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 {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBD,4BAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;AACX;;;;;AD1CO,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAgC;IACnH,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,gEAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,gCAAS,EAAE,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF;;CDxCC;AGVD;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAA2B;IACnH,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;YAQf;QAPA,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;SAEA,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IACxB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF;","sources":["packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/*.js","packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {useStepList} from './useStepList';\nexport {useStepListItem} from './useStepListItem';\n\nexport type {AriaStepListProps, StepListAria} from './useStepList';\nexport type {AriaStepListItemProps, StepListItemAria} from './useStepListItem';\n","/*\n * Copyright 2023 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 {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","/*\n * Copyright 2023 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 {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown?.(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -183,12 +183,13 @@ function $dd7f9f4bee5b11b8$export$fd9dc107b7325b53(props, state, ref) {
183
183
  });
184
184
  const isSelected = selectedKey === key;
185
185
  let onKeyDown = (event)=>{
186
+ var _itemProps_onKeyDown;
186
187
  const { key: eventKey } = event;
187
188
  if (eventKey === "ArrowDown" || eventKey === "ArrowUp") {
188
189
  event.preventDefault();
189
190
  event.stopPropagation();
190
191
  }
191
- itemProps.onKeyDown(event);
192
+ (_itemProps_onKeyDown = itemProps.onKeyDown) === null || _itemProps_onKeyDown === void 0 ? void 0 : _itemProps_onKeyDown.call(itemProps, event);
192
193
  };
193
194
  return {
194
195
  stepProps: {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBD,4BAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;AACX;;;;;AD1CO,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAgC;IACnH,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,gEAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,iBAAS,EAAE,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF;;CDxCC;AGVD;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAA2B;IACnH,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;QACf,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;QAEA,UAAU,SAAS,CAAC;IACtB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF;","sources":["packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/*.js","packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {useStepList} from './useStepList';\nexport {useStepListItem} from './useStepListItem';\n\nexport type {AriaStepListProps, StepListAria} from './useStepList';\nexport type {AriaStepListItemProps, StepListItemAria} from './useStepListItem';\n","/*\n * Copyright 2023 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 {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","/*\n * Copyright 2023 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 {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBD,4BAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;AACX;;;;;AD1CO,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAgC;IACnH,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,gEAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,iBAAS,EAAE,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF;;CDxCC;AGVD;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAA2B;IACnH,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;YAQf;QAPA,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;SAEA,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IACxB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF;","sources":["packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/*.js","packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {useStepList} from './useStepList';\nexport {useStepListItem} from './useStepListItem';\n\nexport type {AriaStepListProps, StepListAria} from './useStepList';\nexport type {AriaStepListItemProps, StepListItemAria} from './useStepListItem';\n","/*\n * Copyright 2023 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 {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","/*\n * Copyright 2023 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 {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown?.(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/steplist",
3
- "version": "3.0.0-nightly.4409+55aca809c",
3
+ "version": "3.0.0-nightly.4419+5a0690fe9",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,11 +22,11 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/i18n": "3.0.0-nightly.2697+55aca809c",
26
- "@react-aria/selection": "3.0.0-nightly.2697+55aca809c",
27
- "@react-aria/utils": "3.0.0-nightly.2697+55aca809c",
28
- "@react-stately/steplist": "3.0.0-nightly.4409+55aca809c",
29
- "@react-types/shared": "3.0.0-nightly.2697+55aca809c",
25
+ "@react-aria/i18n": "3.0.0-nightly.2707+5a0690fe9",
26
+ "@react-aria/selection": "3.0.0-nightly.2707+5a0690fe9",
27
+ "@react-aria/utils": "3.0.0-nightly.2707+5a0690fe9",
28
+ "@react-stately/steplist": "3.0.0-nightly.4419+5a0690fe9",
29
+ "@react-types/shared": "3.0.0-nightly.2707+5a0690fe9",
30
30
  "@swc/helpers": "^0.5.0"
31
31
  },
32
32
  "peerDependencies": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "55aca809c4ce039efe672aaced8c77553d5c03f5"
39
+ "gitHead": "5a0690fe911ee3041b4bb3014273e19c79b5224e"
40
40
  }
@@ -51,7 +51,7 @@ export function useStepListItem<T>(props: AriaStepListItemProps, state: StepList
51
51
  event.stopPropagation();
52
52
  }
53
53
 
54
- itemProps.onKeyDown(event);
54
+ itemProps.onKeyDown?.(event);
55
55
  };
56
56
 
57
57
  return {