@react-aria/steplist 3.0.0-alpha.2 → 3.0.0-alpha.21
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/ar-AE.main.js +6 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +8 -0
- package/dist/ar-AE.module.js +8 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +6 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +8 -0
- package/dist/bg-BG.module.js +8 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/cs-CZ.main.js +6 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +8 -0
- package/dist/cs-CZ.module.js +8 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +6 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +8 -0
- package/dist/da-DK.module.js +8 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +6 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +8 -0
- package/dist/de-DE.module.js +8 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +6 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +8 -0
- package/dist/el-GR.module.js +8 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +6 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +8 -0
- package/dist/en-US.module.js +8 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +6 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +8 -0
- package/dist/es-ES.module.js +8 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +6 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +8 -0
- package/dist/et-EE.module.js +8 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +6 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +8 -0
- package/dist/fi-FI.module.js +8 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +6 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +8 -0
- package/dist/fr-FR.module.js +8 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +6 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +8 -0
- package/dist/he-IL.module.js +8 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +6 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +8 -0
- package/dist/hr-HR.module.js +8 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +6 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +8 -0
- package/dist/hu-HU.module.js +8 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +2 -329
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.main.js +6 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +8 -0
- package/dist/it-IT.module.js +8 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +6 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +8 -0
- package/dist/ja-JP.module.js +8 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +6 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +8 -0
- package/dist/ko-KR.module.js +8 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +6 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +8 -0
- package/dist/lt-LT.module.js +8 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +6 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +8 -0
- package/dist/lv-LV.module.js +8 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +4 -331
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -329
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.main.js +6 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +8 -0
- package/dist/nb-NO.module.js +8 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +6 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +8 -0
- package/dist/nl-NL.module.js +8 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +6 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +8 -0
- package/dist/pl-PL.module.js +8 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +6 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +8 -0
- package/dist/pt-BR.module.js +8 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +6 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +8 -0
- package/dist/pt-PT.module.js +8 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +6 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +8 -0
- package/dist/ro-RO.module.js +8 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +6 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +8 -0
- package/dist/ru-RU.module.js +8 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +6 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +8 -0
- package/dist/sk-SK.module.js +8 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +6 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +8 -0
- package/dist/sl-SI.module.js +8 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +6 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +8 -0
- package/dist/sr-SP.module.js +8 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +6 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +8 -0
- package/dist/sv-SE.module.js +8 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +6 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +8 -0
- package/dist/tr-TR.module.js +8 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.main.js +6 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +8 -0
- package/dist/uk-UA.module.js +8 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/useStepList.main.js +54 -0
- package/dist/useStepList.main.js.map +1 -0
- package/dist/useStepList.mjs +49 -0
- package/dist/useStepList.module.js +49 -0
- package/dist/useStepList.module.js.map +1 -0
- package/dist/useStepListItem.main.js +53 -0
- package/dist/useStepListItem.main.js.map +1 -0
- package/dist/useStepListItem.mjs +48 -0
- package/dist/useStepListItem.module.js +48 -0
- package/dist/useStepListItem.module.js.map +1 -0
- package/dist/zh-CN.main.js +6 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +8 -0
- package/dist/zh-CN.module.js +8 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +6 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +8 -0
- package/dist/zh-TW.module.js +8 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/package.json +14 -10
- package/src/useStepList.ts +3 -3
- package/src/useStepListItem.ts +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,aAAa,CAAC;AAC/C","sources":["packages/@react-aria/steplist/intl/sk-SK.json"],"sourcesContent":["{\n \"steplist\": \"Zoznam krokov\"\n}\n"],"names":[],"version":3,"file":"sk-SK.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,cAAc,CAAC;AAChD","sources":["packages/@react-aria/steplist/intl/sl-SI.json"],"sourcesContent":["{\n \"steplist\": \"Seznam korakov\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
|
package/dist/sl-SI.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,cAAc,CAAC;AAChD","sources":["packages/@react-aria/steplist/intl/sl-SI.json"],"sourcesContent":["{\n \"steplist\": \"Seznam korakov\"\n}\n"],"names":[],"version":3,"file":"sl-SI.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,YAAY,CAAC;AAC9C","sources":["packages/@react-aria/steplist/intl/sr-SP.json"],"sourcesContent":["{\n \"steplist\": \"Lista koraka\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
|
package/dist/sr-SP.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,YAAY,CAAC;AAC9C","sources":["packages/@react-aria/steplist/intl/sr-SP.json"],"sourcesContent":["{\n \"steplist\": \"Lista koraka\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,SAAS,CAAC;AAC3C","sources":["packages/@react-aria/steplist/intl/sv-SE.json"],"sourcesContent":["{\n \"steplist\": \"Steglista\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
|
package/dist/sv-SE.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,SAAS,CAAC;AAC3C","sources":["packages/@react-aria/steplist/intl/sv-SE.json"],"sourcesContent":["{\n \"steplist\": \"Steglista\"\n}\n"],"names":[],"version":3,"file":"sv-SE.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,kBAAY,CAAC;AAC9C","sources":["packages/@react-aria/steplist/intl/tr-TR.json"],"sourcesContent":["{\n \"steplist\": \"Adım Listesi\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
|
package/dist/tr-TR.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,kBAAY,CAAC;AAC9C","sources":["packages/@react-aria/steplist/intl/tr-TR.json"],"sourcesContent":["{\n \"steplist\": \"Adım Listesi\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { AriaLabelingProps, DOMProps, Key } from "@react-types/shared";
|
|
2
|
-
import { HTMLAttributes
|
|
1
|
+
import { AriaLabelingProps, DOMProps, RefObject, Key } from "@react-types/shared";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
3
|
import { StepListProps, StepListState } from "@react-stately/steplist";
|
|
4
4
|
export interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {
|
|
5
5
|
}
|
|
6
6
|
export interface StepListAria {
|
|
7
7
|
listProps: HTMLAttributes<HTMLElement>;
|
|
8
8
|
}
|
|
9
|
-
export function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria;
|
|
9
|
+
export function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement | null>): StepListAria;
|
|
10
10
|
export interface AriaStepListItemProps {
|
|
11
11
|
key: Key;
|
|
12
12
|
}
|
|
@@ -18,6 +18,6 @@ export interface StepListItemAria {
|
|
|
18
18
|
/** Text content for the visually hidden message indicating the status of the step state. */
|
|
19
19
|
stepStateText?: String;
|
|
20
20
|
}
|
|
21
|
-
export function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria;
|
|
21
|
+
export function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement | null>): StepListItemAria;
|
|
22
22
|
|
|
23
23
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAqBA,mCAAmC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ;CAAG;AAE9F;IACE,SAAS,EAAE,eAAe,WAAW,CAAC,CAAA;CACvC;AAED,4BAA4B,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,YAAY,
|
|
1
|
+
{"mappings":";;;AAqBA,mCAAmC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ;CAAG;AAE9F;IACE,SAAS,EAAE,eAAe,WAAW,CAAC,CAAA;CACvC;AAED,4BAA4B,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,YAAY,CAuB1I;ACjCD;IACE,GAAG,EAAE,GAAG,CAAA;CACT;AAED;IACE,uCAAuC;IACvC,SAAS,EAAE,eAAe,WAAW,CAAC,CAAC;IACvC,uEAAuE;IACvE,cAAc,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,gCAAgC,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,gBAAgB,CAoC9I","sources":["packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/useStepListItem.ts","packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/index.ts"],"sourcesContent":[null,null,null,"/*\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"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,qFAAa,CAAC;AAC/C","sources":["packages/@react-aria/steplist/intl/uk-UA.json"],"sourcesContent":["{\n \"steplist\": \"Список кроків\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
|
package/dist/uk-UA.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var $49a297f4b13082b0$exports = {};
|
|
2
|
+
$49a297f4b13082b0$exports = {
|
|
3
|
+
"steplist": `\u{421}\u{43F}\u{438}\u{441}\u{43E}\u{43A} \u{43A}\u{440}\u{43E}\u{43A}\u{456}\u{432}`
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export {$49a297f4b13082b0$exports as default};
|
|
8
|
+
//# sourceMappingURL=uk-UA.module.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var $49a297f4b13082b0$exports = {};
|
|
2
|
+
$49a297f4b13082b0$exports = {
|
|
3
|
+
"steplist": `\u{421}\u{43F}\u{438}\u{441}\u{43E}\u{43A} \u{43A}\u{440}\u{43E}\u{43A}\u{456}\u{432}`
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export {$49a297f4b13082b0$exports as default};
|
|
8
|
+
//# sourceMappingURL=uk-UA.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,qFAAa,CAAC;AAC/C","sources":["packages/@react-aria/steplist/intl/uk-UA.json"],"sourcesContent":["{\n \"steplist\": \"Список кроків\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var $819d2f6398427998$exports = require("./intlStrings.main.js");
|
|
2
|
+
var $7WRFn$reactariautils = require("@react-aria/utils");
|
|
3
|
+
var $7WRFn$reactariai18n = require("@react-aria/i18n");
|
|
4
|
+
var $7WRFn$reactariaselection = require("@react-aria/selection");
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function $parcel$interopDefault(a) {
|
|
8
|
+
return a && a.__esModule ? a.default : a;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function $parcel$export(e, n, v, s) {
|
|
12
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$parcel$export(module.exports, "useStepList", () => $900a30dd63582698$export$c51c7b7354499d04);
|
|
16
|
+
/*
|
|
17
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
18
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
+
*
|
|
22
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
+
* governing permissions and limitations under the License.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
function $900a30dd63582698$export$c51c7b7354499d04(props, state, ref) {
|
|
31
|
+
let { 'aria-label': ariaLabel } = props;
|
|
32
|
+
let { listProps: listProps } = (0, $7WRFn$reactariaselection.useSelectableList)({
|
|
33
|
+
...props,
|
|
34
|
+
...state,
|
|
35
|
+
allowsTabNavigation: true,
|
|
36
|
+
ref: ref
|
|
37
|
+
});
|
|
38
|
+
const strings = (0, $7WRFn$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($819d2f6398427998$exports))), '@react-aria/steplist');
|
|
39
|
+
const stepListProps = {
|
|
40
|
+
...(0, $7WRFn$reactariautils.mergeProps)(listProps, (0, $7WRFn$reactariautils.filterDOMProps)(props, {
|
|
41
|
+
labelable: true
|
|
42
|
+
})),
|
|
43
|
+
'aria-label': ariaLabel || strings.format('steplist')
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
listProps: {
|
|
47
|
+
...stepListProps,
|
|
48
|
+
tabIndex: undefined
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=useStepList.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBM,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAuC;IAC1H,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,mDAAW,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","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, RefObject} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes} 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 | null>): 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.main.js.map"}
|
|
@@ -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.module.js.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,GAAuC;IAC1H,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, RefObject} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes} 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 | null>): 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,GAAkC;IAC1H,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} from 'react';\nimport {Key, RefObject} 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 | null>): 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.module.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.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAAkC;IAC1H,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} from 'react';\nimport {Key, RefObject} 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 | null>): 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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,gCAAI,CAAC;AACtC","sources":["packages/@react-aria/steplist/intl/zh-CN.json"],"sourcesContent":["{\n \"steplist\": \"步骤列表\"\n}\n"],"names":[],"version":3,"file":"zh-CN.main.js.map"}
|
package/dist/zh-CN.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,gCAAI,CAAC;AACtC","sources":["packages/@react-aria/steplist/intl/zh-CN.json"],"sourcesContent":["{\n \"steplist\": \"步骤列表\"\n}\n"],"names":[],"version":3,"file":"zh-CN.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,YAAY,CAAC,gCAAI,CAAC;AACtC","sources":["packages/@react-aria/steplist/intl/zh-TW.json"],"sourcesContent":["{\n \"steplist\": \"步驟清單\"\n}\n"],"names":[],"version":3,"file":"zh-TW.main.js.map"}
|
package/dist/zh-TW.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,gCAAI,CAAC;AACtC","sources":["packages/@react-aria/steplist/intl/zh-TW.json"],"sourcesContent":["{\n \"steplist\": \"步驟清單\"\n}\n"],"names":[],"version":3,"file":"zh-TW.module.js.map"}
|