@react-aria/steplist 3.0.0-nightly.4552 → 3.0.0-nightly.4558

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.
Files changed (55) hide show
  1. package/dist/ar-AE.mjs +1 -1
  2. package/dist/bg-BG.mjs +1 -1
  3. package/dist/cs-CZ.mjs +1 -1
  4. package/dist/da-DK.mjs +1 -1
  5. package/dist/de-DE.mjs +1 -1
  6. package/dist/el-GR.mjs +1 -1
  7. package/dist/en-US.mjs +1 -1
  8. package/dist/es-ES.mjs +1 -1
  9. package/dist/et-EE.mjs +1 -1
  10. package/dist/fi-FI.mjs +1 -1
  11. package/dist/fr-FR.mjs +1 -1
  12. package/dist/he-IL.mjs +1 -1
  13. package/dist/hr-HR.mjs +1 -1
  14. package/dist/hu-HU.mjs +1 -1
  15. package/dist/import.mjs +2 -193
  16. package/dist/intlStrings.main.js +108 -0
  17. package/dist/intlStrings.main.js.map +1 -0
  18. package/dist/intlStrings.mjs +110 -0
  19. package/dist/intlStrings.module.js +110 -0
  20. package/dist/intlStrings.module.js.map +1 -0
  21. package/dist/it-IT.mjs +1 -1
  22. package/dist/ja-JP.mjs +1 -1
  23. package/dist/ko-KR.mjs +1 -1
  24. package/dist/lt-LT.mjs +1 -1
  25. package/dist/lv-LV.mjs +1 -1
  26. package/dist/main.js +4 -195
  27. package/dist/main.js.map +1 -1
  28. package/dist/module.js +2 -193
  29. package/dist/module.js.map +1 -1
  30. package/dist/nb-NO.mjs +1 -1
  31. package/dist/nl-NL.mjs +1 -1
  32. package/dist/pl-PL.mjs +1 -1
  33. package/dist/pt-BR.mjs +1 -1
  34. package/dist/pt-PT.mjs +1 -1
  35. package/dist/ro-RO.mjs +1 -1
  36. package/dist/ru-RU.mjs +1 -1
  37. package/dist/sk-SK.mjs +1 -1
  38. package/dist/sl-SI.mjs +1 -1
  39. package/dist/sr-SP.mjs +1 -1
  40. package/dist/sv-SE.mjs +1 -1
  41. package/dist/tr-TR.mjs +1 -1
  42. package/dist/uk-UA.mjs +1 -1
  43. package/dist/useStepList.main.js +54 -0
  44. package/dist/useStepList.main.js.map +1 -0
  45. package/dist/useStepList.mjs +49 -0
  46. package/dist/useStepList.module.js +49 -0
  47. package/dist/useStepList.module.js.map +1 -0
  48. package/dist/useStepListItem.main.js +53 -0
  49. package/dist/useStepListItem.main.js.map +1 -0
  50. package/dist/useStepListItem.mjs +48 -0
  51. package/dist/useStepListItem.module.js +48 -0
  52. package/dist/useStepListItem.module.js.map +1 -0
  53. package/dist/zh-CN.mjs +1 -1
  54. package/dist/zh-TW.mjs +1 -1
  55. package/package.json +7 -7
@@ -0,0 +1,49 @@
1
+ import $lejUC$intlStringsmodulejs from "./intlStrings.mjs";
2
+ import {mergeProps as $lejUC$mergeProps, filterDOMProps as $lejUC$filterDOMProps} from "@react-aria/utils";
3
+ import {useLocalizedStringFormatter as $lejUC$useLocalizedStringFormatter} from "@react-aria/i18n";
4
+ import {useSelectableList as $lejUC$useSelectableList} from "@react-aria/selection";
5
+
6
+
7
+ function $parcel$interopDefault(a) {
8
+ return a && a.__esModule ? a.default : a;
9
+ }
10
+ /*
11
+ * Copyright 2023 Adobe. All rights reserved.
12
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License. You may obtain a copy
14
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software distributed under
17
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
18
+ * OF ANY KIND, either express or implied. See the License for the specific language
19
+ * governing permissions and limitations under the License.
20
+ */
21
+
22
+
23
+
24
+ function $8ca870e256ef9d32$export$c51c7b7354499d04(props, state, ref) {
25
+ let { "aria-label": ariaLabel } = props;
26
+ let { listProps: listProps } = (0, $lejUC$useSelectableList)({
27
+ ...props,
28
+ ...state,
29
+ allowsTabNavigation: true,
30
+ ref: ref
31
+ });
32
+ const strings = (0, $lejUC$useLocalizedStringFormatter)((0, ($parcel$interopDefault($lejUC$intlStringsmodulejs))), "@react-aria/steplist");
33
+ const stepListProps = {
34
+ ...(0, $lejUC$mergeProps)(listProps, (0, $lejUC$filterDOMProps)(props, {
35
+ labelable: true
36
+ })),
37
+ "aria-label": ariaLabel || strings.format("steplist")
38
+ };
39
+ return {
40
+ listProps: {
41
+ ...stepListProps,
42
+ tabIndex: undefined
43
+ }
44
+ };
45
+ }
46
+
47
+
48
+ export {$8ca870e256ef9d32$export$c51c7b7354499d04 as useStepList};
49
+ //# sourceMappingURL=useStepList.mjs.map
@@ -0,0 +1,49 @@
1
+ import $lejUC$intlStringsmodulejs from "./intlStrings.module.js";
2
+ import {mergeProps as $lejUC$mergeProps, filterDOMProps as $lejUC$filterDOMProps} from "@react-aria/utils";
3
+ import {useLocalizedStringFormatter as $lejUC$useLocalizedStringFormatter} from "@react-aria/i18n";
4
+ import {useSelectableList as $lejUC$useSelectableList} from "@react-aria/selection";
5
+
6
+
7
+ function $parcel$interopDefault(a) {
8
+ return a && a.__esModule ? a.default : a;
9
+ }
10
+ /*
11
+ * Copyright 2023 Adobe. All rights reserved.
12
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License. You may obtain a copy
14
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software distributed under
17
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
18
+ * OF ANY KIND, either express or implied. See the License for the specific language
19
+ * governing permissions and limitations under the License.
20
+ */
21
+
22
+
23
+
24
+ function $8ca870e256ef9d32$export$c51c7b7354499d04(props, state, ref) {
25
+ let { "aria-label": ariaLabel } = props;
26
+ let { listProps: listProps } = (0, $lejUC$useSelectableList)({
27
+ ...props,
28
+ ...state,
29
+ allowsTabNavigation: true,
30
+ ref: ref
31
+ });
32
+ const strings = (0, $lejUC$useLocalizedStringFormatter)((0, ($parcel$interopDefault($lejUC$intlStringsmodulejs))), "@react-aria/steplist");
33
+ const stepListProps = {
34
+ ...(0, $lejUC$mergeProps)(listProps, (0, $lejUC$filterDOMProps)(props, {
35
+ labelable: true
36
+ })),
37
+ "aria-label": ariaLabel || strings.format("steplist")
38
+ };
39
+ return {
40
+ listProps: {
41
+ ...stepListProps,
42
+ tabIndex: undefined
43
+ }
44
+ };
45
+ }
46
+
47
+
48
+ export {$8ca870e256ef9d32$export$c51c7b7354499d04 as useStepList};
49
+ //# sourceMappingURL=useStepList.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBM,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,oDAAW,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","sources":["packages/@react-aria/steplist/src/useStepList.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\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"],"names":[],"version":3,"file":"useStepList.module.js.map"}
@@ -0,0 +1,53 @@
1
+ var $V5kbE$reactariaselection = require("@react-aria/selection");
2
+
3
+
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+
8
+ $parcel$export(module.exports, "useStepListItem", () => $0246bc8e841080a9$export$fd9dc107b7325b53);
9
+ /*
10
+ * Copyright 2023 Adobe. All rights reserved.
11
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License. You may obtain a copy
13
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software distributed under
16
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
+ * OF ANY KIND, either express or implied. See the License for the specific language
18
+ * governing permissions and limitations under the License.
19
+ */
20
+ function $0246bc8e841080a9$export$fd9dc107b7325b53(props, state, ref) {
21
+ const { key: key } = props;
22
+ let { selectionManager: manager, selectedKey: selectedKey } = state;
23
+ let isDisabled = !state.isSelectable(key);
24
+ let { itemProps: itemProps } = (0, $V5kbE$reactariaselection.useSelectableItem)({
25
+ isDisabled: isDisabled,
26
+ key: key,
27
+ ref: ref,
28
+ selectionManager: manager
29
+ });
30
+ const isSelected = selectedKey === key;
31
+ let onKeyDown = (event)=>{
32
+ var _itemProps_onKeyDown;
33
+ const { key: eventKey } = event;
34
+ if (eventKey === "ArrowDown" || eventKey === "ArrowUp") {
35
+ event.preventDefault();
36
+ event.stopPropagation();
37
+ }
38
+ (_itemProps_onKeyDown = itemProps.onKeyDown) === null || _itemProps_onKeyDown === void 0 ? void 0 : _itemProps_onKeyDown.call(itemProps, event);
39
+ };
40
+ return {
41
+ stepProps: {
42
+ ...itemProps,
43
+ onKeyDown: onKeyDown,
44
+ role: "link",
45
+ "aria-current": isSelected ? "step" : undefined,
46
+ "aria-disabled": isDisabled ? true : undefined,
47
+ tabIndex: !isDisabled ? 0 : undefined
48
+ }
49
+ };
50
+ }
51
+
52
+
53
+ //# sourceMappingURL=useStepListItem.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;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/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\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":"useStepListItem.main.js.map"}
@@ -0,0 +1,48 @@
1
+ import {useSelectableItem as $12xzF$useSelectableItem} from "@react-aria/selection";
2
+
3
+ /*
4
+ * Copyright 2023 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $dd7f9f4bee5b11b8$export$fd9dc107b7325b53(props, state, ref) {
15
+ const { key: key } = props;
16
+ let { selectionManager: manager, selectedKey: selectedKey } = state;
17
+ let isDisabled = !state.isSelectable(key);
18
+ let { itemProps: itemProps } = (0, $12xzF$useSelectableItem)({
19
+ isDisabled: isDisabled,
20
+ key: key,
21
+ ref: ref,
22
+ selectionManager: manager
23
+ });
24
+ const isSelected = selectedKey === key;
25
+ let onKeyDown = (event)=>{
26
+ var _itemProps_onKeyDown;
27
+ const { key: eventKey } = event;
28
+ if (eventKey === "ArrowDown" || eventKey === "ArrowUp") {
29
+ event.preventDefault();
30
+ event.stopPropagation();
31
+ }
32
+ (_itemProps_onKeyDown = itemProps.onKeyDown) === null || _itemProps_onKeyDown === void 0 ? void 0 : _itemProps_onKeyDown.call(itemProps, event);
33
+ };
34
+ return {
35
+ stepProps: {
36
+ ...itemProps,
37
+ onKeyDown: onKeyDown,
38
+ role: "link",
39
+ "aria-current": isSelected ? "step" : undefined,
40
+ "aria-disabled": isDisabled ? true : undefined,
41
+ tabIndex: !isDisabled ? 0 : undefined
42
+ }
43
+ };
44
+ }
45
+
46
+
47
+ export {$dd7f9f4bee5b11b8$export$fd9dc107b7325b53 as useStepListItem};
48
+ //# sourceMappingURL=useStepListItem.mjs.map
@@ -0,0 +1,48 @@
1
+ import {useSelectableItem as $12xzF$useSelectableItem} from "@react-aria/selection";
2
+
3
+ /*
4
+ * Copyright 2023 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $dd7f9f4bee5b11b8$export$fd9dc107b7325b53(props, state, ref) {
15
+ const { key: key } = props;
16
+ let { selectionManager: manager, selectedKey: selectedKey } = state;
17
+ let isDisabled = !state.isSelectable(key);
18
+ let { itemProps: itemProps } = (0, $12xzF$useSelectableItem)({
19
+ isDisabled: isDisabled,
20
+ key: key,
21
+ ref: ref,
22
+ selectionManager: manager
23
+ });
24
+ const isSelected = selectedKey === key;
25
+ let onKeyDown = (event)=>{
26
+ var _itemProps_onKeyDown;
27
+ const { key: eventKey } = event;
28
+ if (eventKey === "ArrowDown" || eventKey === "ArrowUp") {
29
+ event.preventDefault();
30
+ event.stopPropagation();
31
+ }
32
+ (_itemProps_onKeyDown = itemProps.onKeyDown) === null || _itemProps_onKeyDown === void 0 ? void 0 : _itemProps_onKeyDown.call(itemProps, event);
33
+ };
34
+ return {
35
+ stepProps: {
36
+ ...itemProps,
37
+ onKeyDown: onKeyDown,
38
+ role: "link",
39
+ "aria-current": isSelected ? "step" : undefined,
40
+ "aria-disabled": isDisabled ? true : undefined,
41
+ tabIndex: !isDisabled ? 0 : undefined
42
+ }
43
+ };
44
+ }
45
+
46
+
47
+ export {$dd7f9f4bee5b11b8$export$fd9dc107b7325b53 as useStepListItem};
48
+ //# sourceMappingURL=useStepListItem.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;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/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\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":"useStepListItem.module.js.map"}
package/dist/zh-CN.mjs CHANGED
@@ -5,4 +5,4 @@ $149dc62f4be0749a$exports = {
5
5
 
6
6
 
7
7
  export {$149dc62f4be0749a$exports as default};
8
- //# sourceMappingURL=zh-CN.module.js.map
8
+ //# sourceMappingURL=zh-CN.mjs.map
package/dist/zh-TW.mjs CHANGED
@@ -5,4 +5,4 @@ $a71aa6ab92482f8d$exports = {
5
5
 
6
6
 
7
7
  export {$a71aa6ab92482f8d$exports as default};
8
- //# sourceMappingURL=zh-TW.module.js.map
8
+ //# sourceMappingURL=zh-TW.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/steplist",
3
- "version": "3.0.0-nightly.4552+64ed13090",
3
+ "version": "3.0.0-nightly.4558+c5e4b3701",
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.2840+64ed13090",
26
- "@react-aria/selection": "3.0.0-nightly.2840+64ed13090",
27
- "@react-aria/utils": "3.0.0-nightly.2840+64ed13090",
28
- "@react-stately/steplist": "3.0.0-nightly.4552+64ed13090",
29
- "@react-types/shared": "3.0.0-nightly.2840+64ed13090",
25
+ "@react-aria/i18n": "3.0.0-nightly.2846+c5e4b3701",
26
+ "@react-aria/selection": "3.0.0-nightly.2846+c5e4b3701",
27
+ "@react-aria/utils": "3.0.0-nightly.2846+c5e4b3701",
28
+ "@react-stately/steplist": "3.0.0-nightly.4558+c5e4b3701",
29
+ "@react-types/shared": "3.0.0-nightly.2846+c5e4b3701",
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": "64ed13090ce77cc0e4cb4cd5602e75f655bff6bb"
39
+ "gitHead": "c5e4b3701fdb89eb551f1b3697ac253f06ef68fa"
40
40
  }