@react-spectrum/steplist 3.0.0-nightly.4555 → 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 (40) hide show
  1. package/dist/StepList.main.js +73 -0
  2. package/dist/StepList.main.js.map +1 -0
  3. package/dist/StepList.mjs +68 -0
  4. package/dist/StepList.module.js +68 -0
  5. package/dist/StepList.module.js.map +1 -0
  6. package/dist/StepListContext.main.js +27 -0
  7. package/dist/StepListContext.main.js.map +1 -0
  8. package/dist/StepListContext.mjs +18 -0
  9. package/dist/StepListContext.module.js +18 -0
  10. package/dist/StepListContext.module.js.map +1 -0
  11. package/dist/StepListItem.main.js +122 -0
  12. package/dist/StepListItem.main.js.map +1 -0
  13. package/dist/StepListItem.mjs +117 -0
  14. package/dist/StepListItem.module.js +117 -0
  15. package/dist/StepListItem.module.js.map +1 -0
  16. package/dist/en-US.main.js +9 -0
  17. package/dist/en-US.main.js.map +1 -0
  18. package/dist/en-US.mjs +11 -0
  19. package/dist/en-US.module.js +11 -0
  20. package/dist/en-US.module.js.map +1 -0
  21. package/dist/import.mjs +1 -283
  22. package/dist/index.main.js +19 -0
  23. package/dist/index.main.js.map +1 -0
  24. package/dist/index.mjs +14 -0
  25. package/dist/index.module.js +14 -0
  26. package/dist/index.module.js.map +1 -0
  27. package/dist/main.js +2 -280
  28. package/dist/main.js.map +1 -1
  29. package/dist/module.js +1 -283
  30. package/dist/module.js.map +1 -1
  31. package/dist/steplist_vars_css.main.js +95 -0
  32. package/dist/steplist_vars_css.main.js.map +1 -0
  33. package/dist/steplist_vars_css.mjs +97 -0
  34. package/dist/steplist_vars_css.module.js +97 -0
  35. package/dist/steplist_vars_css.module.js.map +1 -0
  36. package/dist/{main.css → vars.0d2f4ddd.css} +1 -1
  37. package/dist/{main.css.map → vars.0d2f4ddd.css.map} +1 -1
  38. package/package.json +14 -14
  39. package/dist/module.css +0 -497
  40. package/dist/module.css.map +0 -1
@@ -0,0 +1,73 @@
1
+ var $b9b57d2de2195519$exports = require("./StepListContext.main.js");
2
+ var $d2e2cd0667356b5d$exports = require("./StepListItem.main.js");
3
+ require("./vars.0d2f4ddd.css");
4
+ var $390add5aac6e4d73$exports = require("./steplist_vars_css.main.js");
5
+ var $i9j2Q$reactariasteplist = require("@react-aria/steplist");
6
+ var $i9j2Q$reactspectrumutils = require("@react-spectrum/utils");
7
+ var $i9j2Q$react = require("react");
8
+ var $i9j2Q$reactspectrumprovider = require("@react-spectrum/provider");
9
+ var $i9j2Q$reactstatelysteplist = require("@react-stately/steplist");
10
+
11
+
12
+ function $parcel$interopDefault(a) {
13
+ return a && a.__esModule ? a.default : a;
14
+ }
15
+
16
+ function $parcel$export(e, n, v, s) {
17
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
18
+ }
19
+
20
+ $parcel$export(module.exports, "StepList", () => $a64198f1506264d6$export$ff2e09ca3ba758a9);
21
+ /*
22
+ * Copyright 2023 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ function $a64198f1506264d6$var$StepList(props, ref) {
40
+ const { size: size = "M", orientation: orientation = "horizontal" } = props;
41
+ props = (0, $i9j2Q$reactspectrumprovider.useProviderProps)(props);
42
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized } = props;
43
+ let { styleProps: styleProps } = (0, $i9j2Q$reactspectrumutils.useStyleProps)(props);
44
+ let domRef = (0, $i9j2Q$reactspectrumutils.useDOMRef)(ref);
45
+ let state = (0, $i9j2Q$reactstatelysteplist.useStepListState)(props);
46
+ let { listProps: listProps } = (0, $i9j2Q$reactariasteplist.useStepList)(props, state, domRef);
47
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($i9j2Q$react))).createElement("ol", {
48
+ ...listProps,
49
+ ...styleProps,
50
+ ref: domRef,
51
+ className: (0, $i9j2Q$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist", styleProps.className, {
52
+ "spectrum-Steplist--small": size === "S",
53
+ "spectrum-Steplist--medium": size === "M",
54
+ "spectrum-Steplist--large": size === "L",
55
+ "spectrum-Steplist--xlarge": size === "XL",
56
+ "spectrum-Steplist--emphasized": isEmphasized,
57
+ "spectrum-Steplist--horizontal": orientation === "horizontal",
58
+ "spectrum-Steplist--vertical": orientation === "vertical"
59
+ })
60
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($i9j2Q$react))).createElement((0, $b9b57d2de2195519$exports.StepListContext).Provider, {
61
+ value: state
62
+ }, [
63
+ ...state.collection
64
+ ].map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($i9j2Q$react))).createElement((0, $d2e2cd0667356b5d$exports.StepListItem), {
65
+ key: item.key,
66
+ isDisabled: isDisabled,
67
+ item: item
68
+ }))));
69
+ }
70
+ const $a64198f1506264d6$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, ($parcel$interopDefault($i9j2Q$react))).forwardRef($a64198f1506264d6$var$StepList);
71
+
72
+
73
+ //# sourceMappingURL=StepList.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA8BD,SAAS,+BAA2B,KAA+B,EAAE,GAA6B;IAChG,MAAM,QAAC,OAAO,kBAAK,cAAc,cAAa,GAAG;IACjD,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,MAAM,cAAC,UAAU,gBAAE,YAAY,EAAC,GAAG;IACnC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,4CAAe,EAAE;IAC7B,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAU,EAAE,OAAO,OAAO;IAG5C,qBACE,0DAAC;QACE,GAAG,SAAS;QACZ,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,qBAAqB,WAAW,SAAS,EAAE;YACvE,4BAA4B,SAAS;YACrC,6BAA6B,SAAS;YACtC,4BAA4B,SAAS;YACrC,6BAA6B,SAAS;YACtC,iCAAiC;YACjC,iCAAiC,gBAAgB;YACjD,+BAA+B,gBAAgB;QACjD;qBACA,0DAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;QAAC,OAAO;OAC9B;WAAI,MAAM,UAAU;KAAC,CAAC,GAAG,CAAC,CAAC,qBAC1B,0DAAC,CAAA,GAAA,sCAAW;YACV,KAAK,KAAK,GAAG;YACb,YAAY;YACZ,MAAM;;AAMlB;AAEA,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/steplist/src/StepList.tsx"],"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 {AriaStepListProps, useStepList} from '@react-aria/steplist';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Orientation, StyleProps} from '@react-types/shared';\nimport React, {ReactElement} from 'react';\nimport {StepListContext} from './StepListContext';\nimport {StepListItem} from './StepListItem';\nimport styles from '@adobe/spectrum-css-temp/components/steplist/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useStepListState} from '@react-stately/steplist';\n\nexport interface SpectrumStepListProps<T> extends AriaStepListProps<T>, StyleProps {\n /**\n * Whether the step list should be displayed with a emphasized style.\n * @default false\n */\n isEmphasized?: boolean,\n /**\n * The orientation of the step list.\n * @default 'horizontal'\n */\n orientation?: Orientation,\n /**\n * The size of the step list.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nfunction StepList<T extends object>(props: SpectrumStepListProps<T>, ref: DOMRef<HTMLOListElement>) {\n const {size = 'M', orientation = 'horizontal'} = props;\n props = useProviderProps(props);\n const {isDisabled, isEmphasized} = props;\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n\n let state = useStepListState(props);\n let {listProps} = useStepList(props, state, domRef);\n\n\n return (\n <ol\n {...listProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Steplist', styleProps.className, {\n 'spectrum-Steplist--small': size === 'S',\n 'spectrum-Steplist--medium': size === 'M',\n 'spectrum-Steplist--large': size === 'L',\n 'spectrum-Steplist--xlarge': size === 'XL',\n 'spectrum-Steplist--emphasized': isEmphasized,\n 'spectrum-Steplist--horizontal': orientation === 'horizontal',\n 'spectrum-Steplist--vertical': orientation === 'vertical'\n })}>\n <StepListContext.Provider value={state}>\n {[...state.collection].map((item) => (\n <StepListItem\n key={item.key}\n isDisabled={isDisabled}\n item={item} />\n )\n )}\n </StepListContext.Provider>\n </ol>\n );\n}\n\nconst _StepList = React.forwardRef(StepList) as <T>(props: SpectrumStepListProps<T> & {ref?: DOMRef<HTMLOListElement>}) => ReactElement;\nexport {_StepList as StepList};\n"],"names":[],"version":3,"file":"StepList.main.js.map"}
@@ -0,0 +1,68 @@
1
+ import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.mjs";
2
+ import {StepListItem as $24c3cb1adfb0acc5$export$87c2a8a94eda1754} from "./StepListItem.mjs";
3
+ import "./vars.0d2f4ddd.css";
4
+ import $kkmdw$steplist_vars_cssmodulejs from "./steplist_vars_css.mjs";
5
+ import {useStepList as $kkmdw$useStepList} from "@react-aria/steplist";
6
+ import {useStyleProps as $kkmdw$useStyleProps, useDOMRef as $kkmdw$useDOMRef, classNames as $kkmdw$classNames} from "@react-spectrum/utils";
7
+ import $kkmdw$react from "react";
8
+ import {useProviderProps as $kkmdw$useProviderProps} from "@react-spectrum/provider";
9
+ import {useStepListState as $kkmdw$useStepListState} from "@react-stately/steplist";
10
+
11
+
12
+ function $parcel$interopDefault(a) {
13
+ return a && a.__esModule ? a.default : a;
14
+ }
15
+ /*
16
+ * Copyright 2023 Adobe. All rights reserved.
17
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
+ * you may not use this file except in compliance with the License. You may obtain a copy
19
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software distributed under
22
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
+ * OF ANY KIND, either express or implied. See the License for the specific language
24
+ * governing permissions and limitations under the License.
25
+ */
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+ function $6bd0589d5d2f8b66$var$StepList(props, ref) {
34
+ const { size: size = "M", orientation: orientation = "horizontal" } = props;
35
+ props = (0, $kkmdw$useProviderProps)(props);
36
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized } = props;
37
+ let { styleProps: styleProps } = (0, $kkmdw$useStyleProps)(props);
38
+ let domRef = (0, $kkmdw$useDOMRef)(ref);
39
+ let state = (0, $kkmdw$useStepListState)(props);
40
+ let { listProps: listProps } = (0, $kkmdw$useStepList)(props, state, domRef);
41
+ return /*#__PURE__*/ (0, $kkmdw$react).createElement("ol", {
42
+ ...listProps,
43
+ ...styleProps,
44
+ ref: domRef,
45
+ className: (0, $kkmdw$classNames)((0, ($parcel$interopDefault($kkmdw$steplist_vars_cssmodulejs))), "spectrum-Steplist", styleProps.className, {
46
+ "spectrum-Steplist--small": size === "S",
47
+ "spectrum-Steplist--medium": size === "M",
48
+ "spectrum-Steplist--large": size === "L",
49
+ "spectrum-Steplist--xlarge": size === "XL",
50
+ "spectrum-Steplist--emphasized": isEmphasized,
51
+ "spectrum-Steplist--horizontal": orientation === "horizontal",
52
+ "spectrum-Steplist--vertical": orientation === "vertical"
53
+ })
54
+ }, /*#__PURE__*/ (0, $kkmdw$react).createElement((0, $739a883ac33f90d8$export$66136572efa4af6e).Provider, {
55
+ value: state
56
+ }, [
57
+ ...state.collection
58
+ ].map((item)=>/*#__PURE__*/ (0, $kkmdw$react).createElement((0, $24c3cb1adfb0acc5$export$87c2a8a94eda1754), {
59
+ key: item.key,
60
+ isDisabled: isDisabled,
61
+ item: item
62
+ }))));
63
+ }
64
+ const $6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, $kkmdw$react).forwardRef($6bd0589d5d2f8b66$var$StepList);
65
+
66
+
67
+ export {$6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 as StepList};
68
+ //# sourceMappingURL=StepList.mjs.map
@@ -0,0 +1,68 @@
1
+ import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.module.js";
2
+ import {StepListItem as $24c3cb1adfb0acc5$export$87c2a8a94eda1754} from "./StepListItem.module.js";
3
+ import "./vars.0d2f4ddd.css";
4
+ import $kkmdw$steplist_vars_cssmodulejs from "./steplist_vars_css.module.js";
5
+ import {useStepList as $kkmdw$useStepList} from "@react-aria/steplist";
6
+ import {useStyleProps as $kkmdw$useStyleProps, useDOMRef as $kkmdw$useDOMRef, classNames as $kkmdw$classNames} from "@react-spectrum/utils";
7
+ import $kkmdw$react from "react";
8
+ import {useProviderProps as $kkmdw$useProviderProps} from "@react-spectrum/provider";
9
+ import {useStepListState as $kkmdw$useStepListState} from "@react-stately/steplist";
10
+
11
+
12
+ function $parcel$interopDefault(a) {
13
+ return a && a.__esModule ? a.default : a;
14
+ }
15
+ /*
16
+ * Copyright 2023 Adobe. All rights reserved.
17
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
+ * you may not use this file except in compliance with the License. You may obtain a copy
19
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software distributed under
22
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
+ * OF ANY KIND, either express or implied. See the License for the specific language
24
+ * governing permissions and limitations under the License.
25
+ */
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+ function $6bd0589d5d2f8b66$var$StepList(props, ref) {
34
+ const { size: size = "M", orientation: orientation = "horizontal" } = props;
35
+ props = (0, $kkmdw$useProviderProps)(props);
36
+ const { isDisabled: isDisabled, isEmphasized: isEmphasized } = props;
37
+ let { styleProps: styleProps } = (0, $kkmdw$useStyleProps)(props);
38
+ let domRef = (0, $kkmdw$useDOMRef)(ref);
39
+ let state = (0, $kkmdw$useStepListState)(props);
40
+ let { listProps: listProps } = (0, $kkmdw$useStepList)(props, state, domRef);
41
+ return /*#__PURE__*/ (0, $kkmdw$react).createElement("ol", {
42
+ ...listProps,
43
+ ...styleProps,
44
+ ref: domRef,
45
+ className: (0, $kkmdw$classNames)((0, ($parcel$interopDefault($kkmdw$steplist_vars_cssmodulejs))), "spectrum-Steplist", styleProps.className, {
46
+ "spectrum-Steplist--small": size === "S",
47
+ "spectrum-Steplist--medium": size === "M",
48
+ "spectrum-Steplist--large": size === "L",
49
+ "spectrum-Steplist--xlarge": size === "XL",
50
+ "spectrum-Steplist--emphasized": isEmphasized,
51
+ "spectrum-Steplist--horizontal": orientation === "horizontal",
52
+ "spectrum-Steplist--vertical": orientation === "vertical"
53
+ })
54
+ }, /*#__PURE__*/ (0, $kkmdw$react).createElement((0, $739a883ac33f90d8$export$66136572efa4af6e).Provider, {
55
+ value: state
56
+ }, [
57
+ ...state.collection
58
+ ].map((item)=>/*#__PURE__*/ (0, $kkmdw$react).createElement((0, $24c3cb1adfb0acc5$export$87c2a8a94eda1754), {
59
+ key: item.key,
60
+ isDisabled: isDisabled,
61
+ item: item
62
+ }))));
63
+ }
64
+ const $6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, $kkmdw$react).forwardRef($6bd0589d5d2f8b66$var$StepList);
65
+
66
+
67
+ export {$6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 as StepList};
68
+ //# sourceMappingURL=StepList.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA8BD,SAAS,+BAA2B,KAA+B,EAAE,GAA6B;IAChG,MAAM,QAAC,OAAO,kBAAK,cAAc,cAAa,GAAG;IACjD,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,MAAM,cAAC,UAAU,gBAAE,YAAY,EAAC,GAAG;IACnC,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,QAAQ,CAAA,GAAA,uBAAe,EAAE;IAC7B,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,kBAAU,EAAE,OAAO,OAAO;IAG5C,qBACE,gCAAC;QACE,GAAG,SAAS;QACZ,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG,qBAAqB,WAAW,SAAS,EAAE;YACvE,4BAA4B,SAAS;YACrC,6BAA6B,SAAS;YACtC,4BAA4B,SAAS;YACrC,6BAA6B,SAAS;YACtC,iCAAiC;YACjC,iCAAiC,gBAAgB;YACjD,+BAA+B,gBAAgB;QACjD;qBACA,gCAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;QAAC,OAAO;OAC9B;WAAI,MAAM,UAAU;KAAC,CAAC,GAAG,CAAC,CAAC,qBAC1B,gCAAC,CAAA,GAAA,yCAAW;YACV,KAAK,KAAK,GAAG;YACb,YAAY;YACZ,MAAM;;AAMlB;AAEA,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/steplist/src/StepList.tsx"],"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 {AriaStepListProps, useStepList} from '@react-aria/steplist';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Orientation, StyleProps} from '@react-types/shared';\nimport React, {ReactElement} from 'react';\nimport {StepListContext} from './StepListContext';\nimport {StepListItem} from './StepListItem';\nimport styles from '@adobe/spectrum-css-temp/components/steplist/vars.css';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useStepListState} from '@react-stately/steplist';\n\nexport interface SpectrumStepListProps<T> extends AriaStepListProps<T>, StyleProps {\n /**\n * Whether the step list should be displayed with a emphasized style.\n * @default false\n */\n isEmphasized?: boolean,\n /**\n * The orientation of the step list.\n * @default 'horizontal'\n */\n orientation?: Orientation,\n /**\n * The size of the step list.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nfunction StepList<T extends object>(props: SpectrumStepListProps<T>, ref: DOMRef<HTMLOListElement>) {\n const {size = 'M', orientation = 'horizontal'} = props;\n props = useProviderProps(props);\n const {isDisabled, isEmphasized} = props;\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n\n let state = useStepListState(props);\n let {listProps} = useStepList(props, state, domRef);\n\n\n return (\n <ol\n {...listProps}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'spectrum-Steplist', styleProps.className, {\n 'spectrum-Steplist--small': size === 'S',\n 'spectrum-Steplist--medium': size === 'M',\n 'spectrum-Steplist--large': size === 'L',\n 'spectrum-Steplist--xlarge': size === 'XL',\n 'spectrum-Steplist--emphasized': isEmphasized,\n 'spectrum-Steplist--horizontal': orientation === 'horizontal',\n 'spectrum-Steplist--vertical': orientation === 'vertical'\n })}>\n <StepListContext.Provider value={state}>\n {[...state.collection].map((item) => (\n <StepListItem\n key={item.key}\n isDisabled={isDisabled}\n item={item} />\n )\n )}\n </StepListContext.Provider>\n </ol>\n );\n}\n\nconst _StepList = React.forwardRef(StepList) as <T>(props: SpectrumStepListProps<T> & {ref?: DOMRef<HTMLOListElement>}) => ReactElement;\nexport {_StepList as StepList};\n"],"names":[],"version":3,"file":"StepList.module.js.map"}
@@ -0,0 +1,27 @@
1
+ var $cVd2T$react = require("react");
2
+
3
+
4
+ function $parcel$interopDefault(a) {
5
+ return a && a.__esModule ? a.default : a;
6
+ }
7
+
8
+ function $parcel$export(e, n, v, s) {
9
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
10
+ }
11
+
12
+ $parcel$export(module.exports, "StepListContext", () => $b9b57d2de2195519$export$66136572efa4af6e);
13
+ /*
14
+ * Copyright 202 Adobe. All rights reserved.
15
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License. You may obtain a copy
17
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software distributed under
20
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
+ * OF ANY KIND, either express or implied. See the License for the specific language
22
+ * governing permissions and limitations under the License.
23
+ */
24
+ const $b9b57d2de2195519$export$66136572efa4af6e = (0, ($parcel$interopDefault($cVd2T$react))).createContext(null);
25
+
26
+
27
+ //# sourceMappingURL=StepListContext.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAKM,MAAM,4CAAkB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAgC","sources":["packages/@react-spectrum/steplist/src/StepListContext.ts"],"sourcesContent":["/*\n * Copyright 202 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 React from 'react';\nimport {StepListState} from '@react-stately/steplist';\n\nexport const StepListContext = React.createContext<StepListState<unknown> | null>(null);\n"],"names":[],"version":3,"file":"StepListContext.main.js.map"}
@@ -0,0 +1,18 @@
1
+ import $ksFc4$react from "react";
2
+
3
+ /*
4
+ * Copyright 202 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
+ const $739a883ac33f90d8$export$66136572efa4af6e = (0, $ksFc4$react).createContext(null);
15
+
16
+
17
+ export {$739a883ac33f90d8$export$66136572efa4af6e as StepListContext};
18
+ //# sourceMappingURL=StepListContext.mjs.map
@@ -0,0 +1,18 @@
1
+ import $ksFc4$react from "react";
2
+
3
+ /*
4
+ * Copyright 202 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
+ const $739a883ac33f90d8$export$66136572efa4af6e = (0, $ksFc4$react).createContext(null);
15
+
16
+
17
+ export {$739a883ac33f90d8$export$66136572efa4af6e as StepListContext};
18
+ //# sourceMappingURL=StepListContext.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAKM,MAAM,4CAAkB,CAAA,GAAA,YAAI,EAAE,aAAa,CAAgC","sources":["packages/@react-spectrum/steplist/src/StepListContext.ts"],"sourcesContent":["/*\n * Copyright 202 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 React from 'react';\nimport {StepListState} from '@react-stately/steplist';\n\nexport const StepListContext = React.createContext<StepListState<unknown> | null>(null);\n"],"names":[],"version":3,"file":"StepListContext.module.js.map"}
@@ -0,0 +1,122 @@
1
+ var $fed92386245d94a4$exports = require("./index.main.js");
2
+ var $b9b57d2de2195519$exports = require("./StepListContext.main.js");
3
+ require("./vars.0d2f4ddd.css");
4
+ var $390add5aac6e4d73$exports = require("./steplist_vars_css.main.js");
5
+ var $bJioC$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
6
+ var $bJioC$reactspectrumutils = require("@react-spectrum/utils");
7
+ var $bJioC$reactariafocus = require("@react-aria/focus");
8
+ var $bJioC$reactariautils = require("@react-aria/utils");
9
+ var $bJioC$react = require("react");
10
+ var $bJioC$reactariainteractions = require("@react-aria/interactions");
11
+ var $bJioC$reactariai18n = require("@react-aria/i18n");
12
+ var $bJioC$reactariasteplist = require("@react-aria/steplist");
13
+ var $bJioC$reactariavisuallyhidden = require("@react-aria/visually-hidden");
14
+
15
+
16
+ function $parcel$interopDefault(a) {
17
+ return a && a.__esModule ? a.default : a;
18
+ }
19
+
20
+ function $parcel$export(e, n, v, s) {
21
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
22
+ }
23
+
24
+ $parcel$export(module.exports, "StepListItem", () => $d2e2cd0667356b5d$export$87c2a8a94eda1754);
25
+ /*
26
+ * Copyright 2023 Adobe. All rights reserved.
27
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
28
+ * you may not use this file except in compliance with the License. You may obtain a copy
29
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software distributed under
32
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
33
+ * OF ANY KIND, either express or implied. See the License for the specific language
34
+ * governing permissions and limitations under the License.
35
+ */
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+ function $d2e2cd0667356b5d$export$87c2a8a94eda1754(props) {
48
+ let { isDisabled: isDisabled, item: item } = props;
49
+ let { key: key } = item;
50
+ let ref = (0, $bJioC$react.useRef)(null);
51
+ let { direction: direction } = (0, $bJioC$reactariai18n.useLocale)();
52
+ let state = (0, $bJioC$react.useContext)((0, $b9b57d2de2195519$exports.StepListContext));
53
+ const isSelected = state.selectedKey === key;
54
+ const isCompleted = state.isCompleted(key);
55
+ const isItemDisabled = isDisabled || state.disabledKeys.has(key);
56
+ let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $bJioC$reactariasteplist.useStepListItem)({
57
+ ...props,
58
+ key: key
59
+ }, state, ref);
60
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $bJioC$reactariainteractions.useHover)({
61
+ ...props,
62
+ isDisabled: isItemDisabled || isSelected || props.isReadOnly
63
+ });
64
+ let stepStateText = "";
65
+ const stringFormatter = (0, $bJioC$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($fed92386245d94a4$exports))), "@react-spectrum/steplist");
66
+ const numberFormatter = (0, $bJioC$reactariai18n.useNumberFormatter)();
67
+ if (isSelected) stepStateText = stringFormatter.format("current");
68
+ else if (isCompleted) stepStateText = stringFormatter.format("completed");
69
+ else stepStateText = stringFormatter.format("notCompleted");
70
+ let markerId = (0, $bJioC$reactariautils.useId)();
71
+ let labelId = (0, $bJioC$reactariautils.useId)();
72
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("li", {
73
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-item")
74
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement((0, $bJioC$reactariafocus.FocusRing), {
75
+ within: true,
76
+ focusRingClass: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "focus-ring")
77
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("a", {
78
+ ...(0, $bJioC$reactariautils.mergeProps)(hoverProps, stepProps),
79
+ "aria-labelledby": `${markerId} ${labelId}`,
80
+ ref: ref,
81
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-link", {
82
+ "is-selected": isSelected && !isItemDisabled,
83
+ "is-disabled": isItemDisabled,
84
+ "is-hovered": isHovered,
85
+ "is-completed": isCompleted,
86
+ "is-selectable": state.isSelectable(key) && !isSelected
87
+ })
88
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement((0, $bJioC$reactariavisuallyhidden.VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("div", {
89
+ id: labelId,
90
+ "aria-hidden": "true",
91
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-label")
92
+ }, item.rendered), /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("div", {
93
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-segment", {
94
+ "is-completed": isCompleted
95
+ })
96
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("svg", {
97
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-segmentLine"),
98
+ xmlns: "http://www.w3.org/2000/svg",
99
+ height: "100%",
100
+ viewBox: "0 0 2 8",
101
+ preserveAspectRatio: "none"
102
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("line", {
103
+ x1: "1",
104
+ y1: "0",
105
+ x2: "1",
106
+ y2: "8",
107
+ vectorEffect: "non-scaling-stroke"
108
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement((0, ($parcel$interopDefault($bJioC$spectrumiconsuiChevronRightMedium))), {
109
+ UNSAFE_className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-chevron", {
110
+ "is-reversed": direction === "rtl"
111
+ })
112
+ })), /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("div", {
113
+ "aria-hidden": "true",
114
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-markerWrapper")
115
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($bJioC$react))).createElement("div", {
116
+ id: markerId,
117
+ className: (0, $bJioC$reactspectrumutils.classNames)((0, ($parcel$interopDefault($390add5aac6e4d73$exports))), "spectrum-Steplist-marker")
118
+ }, numberFormatter.format((item.index || 0) + 1))))));
119
+ }
120
+
121
+
122
+ //# sourceMappingURL=StepListItem.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AAsBM,SAAS,0CAAgB,KAAmC;IACjE,IAAI,cACF,UAAU,QACV,IAAI,EACL,GAAG;IACJ,IAAI,OAAC,GAAG,EAAC,GAAG;IAEZ,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,QAAQ,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,yCAAc;IACrC,MAAM,aAAa,MAAM,WAAW,KAAK;IACzC,MAAM,cAAc,MAAM,WAAW,CAAC;IACtC,MAAM,iBAAiB,cAAc,MAAM,YAAY,CAAC,GAAG,CAAC;IAC5D,IAAI,aAAC,SAAS,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,wCAAc,EAAE;QAAC,GAAG,KAAK;aAAE;IAAG,GAAG,OAAO;IAE1E,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QAAC,GAAG,KAAK;QAAE,YAAY,kBAAkB,cAAc,MAAM,UAAU;IAAA;IAG9G,IAAI,gBAAgB;IACpB,MAAM,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAClE,MAAM,kBAAkB,CAAA,GAAA,uCAAiB;IAEzC,IAAI,YACF,gBAAgB,gBAAgB,MAAM,CAAC;SAClC,IAAI,aACT,gBAAgB,gBAAgB,MAAM,CAAC;SAEvC,gBAAgB,gBAAgB,MAAM,CAAC;IAGzC,IAAI,WAAW,CAAA,GAAA,2BAAI;IACnB,IAAI,UAAU,CAAA,GAAA,2BAAI;IAElB,qBACE,0DAAC;QACC,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;qBAGJ,0DAAC,CAAA,GAAA,+BAAQ;QAAE,QAAA;QAAO,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACnD,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,YAAY,UAAU;QACrC,mBAAiB,CAAC,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC;QACzC,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,0BACA;YACE,eAAe,cAAc,CAAC;YAC9B,eAAe;YACf,cAAc;YACd,gBAAgB;YAChB,iBAAiB,MAAM,YAAY,CAAC,QAAQ,CAAC;QAC/C;qBAEF,0DAAC,CAAA,GAAA,6CAAa,GAAM,gBAAiB,8BACrC,0DAAC;QAAI,IAAI;QAAS,eAAY;QAAO,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAChE,KAAK,QAAQ,iBAEhB,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,6BAA6B;YAC3B,gBAAgB;QAClB;qBACF,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAAkC,OAAM;QAA6B,QAAO;QAAO,SAAQ;QAAU,qBAAoB;qBAC1J,0DAAC;QAAK,IAAG;QAAI,IAAG;QAAI,IAAG;QAAI,IAAG;QAAI,cAAa;uBAEjD,0DAAC,CAAA,GAAA,kEAAiB;QAChB,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,6BAA6B;YAChE,eAAe,cAAc;QAC/B;uBAEJ,0DAAC;QAAI,eAAY;QAAO,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACpD,0DAAC;QAAI,IAAI;QAAW,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OAA8B,gBAAgB,MAAM,CAAC,AAAC,CAAA,KAAK,KAAK,IAAI,CAAA,IAAK;AAMvI","sources":["packages/@react-spectrum/steplist/src/StepListItem.tsx"],"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 */\nimport ChevronRightMedium from '@spectrum-icons/ui/ChevronRightMedium';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport intlMessages from '../intl';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {useContext, useRef} from 'react';\nimport {StepListContext} from './StepListContext';\nimport styles from '@adobe/spectrum-css-temp/components/steplist/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale, useLocalizedStringFormatter, useNumberFormatter} from '@react-aria/i18n';\nimport {useStepListItem} from '@react-aria/steplist';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface SpectrumStepListItemProps<T> {\n item: Node<T>,\n isDisabled?: boolean,\n isEmphasized?: boolean,\n isReadOnly?: boolean\n}\n\nexport function StepListItem<T>(props: SpectrumStepListItemProps<T>) {\n let {\n isDisabled,\n item\n } = props;\n let {key} = item;\n\n let ref = useRef(null);\n let {direction} = useLocale();\n let state = useContext(StepListContext)!;\n const isSelected = state.selectedKey === key;\n const isCompleted = state.isCompleted(key);\n const isItemDisabled = isDisabled || state.disabledKeys.has(key);\n let {stepProps, stepStateProps} = useStepListItem({...props, key}, state, ref);\n\n let {hoverProps, isHovered} = useHover({...props, isDisabled: isItemDisabled || isSelected || props.isReadOnly});\n\n\n let stepStateText = '';\n const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/steplist');\n const numberFormatter = useNumberFormatter();\n\n if (isSelected) {\n stepStateText = stringFormatter.format('current');\n } else if (isCompleted) {\n stepStateText = stringFormatter.format('completed');\n } else {\n stepStateText = stringFormatter.format('notCompleted');\n }\n\n let markerId = useId();\n let labelId = useId();\n\n return (\n <li\n className={\n classNames(\n styles,\n 'spectrum-Steplist-item'\n )\n }>\n <FocusRing within focusRingClass={classNames(styles, 'focus-ring')}>\n <a\n {...mergeProps(hoverProps, stepProps)}\n aria-labelledby={`${markerId} ${labelId}`}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Steplist-link',\n {\n 'is-selected': isSelected && !isItemDisabled,\n 'is-disabled': isItemDisabled,\n 'is-hovered': isHovered,\n 'is-completed': isCompleted,\n 'is-selectable': state.isSelectable(key) && !isSelected\n }\n )}>\n <VisuallyHidden {...stepStateProps}>{stepStateText}</VisuallyHidden>\n <div id={labelId} aria-hidden=\"true\" className={classNames(styles, 'spectrum-Steplist-label')}>\n {item.rendered}\n </div>\n <div\n className={classNames(\n styles,\n 'spectrum-Steplist-segment', {\n 'is-completed': isCompleted\n })} >\n <svg className={classNames(styles, 'spectrum-Steplist-segmentLine')} xmlns=\"http://www.w3.org/2000/svg\" height=\"100%\" viewBox=\"0 0 2 8\" preserveAspectRatio=\"none\">\n <line x1=\"1\" y1=\"0\" x2=\"1\" y2=\"8\" vectorEffect=\"non-scaling-stroke\" />\n </svg>\n <ChevronRightMedium\n UNSAFE_className={classNames(styles, 'spectrum-Steplist-chevron', {\n 'is-reversed': direction === 'rtl'\n })} />\n </div>\n <div aria-hidden=\"true\" className={classNames(styles, 'spectrum-Steplist-markerWrapper')}>\n <div id={markerId} className={classNames(styles, 'spectrum-Steplist-marker')}>{numberFormatter.format((item.index || 0) + 1)}</div>\n </div>\n </a>\n </FocusRing>\n </li>\n );\n}\n"],"names":[],"version":3,"file":"StepListItem.main.js.map"}
@@ -0,0 +1,117 @@
1
+ import $62132693388ec24a$export$2e2bcd8739ae039 from "./index.mjs";
2
+ import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.mjs";
3
+ import "./vars.0d2f4ddd.css";
4
+ import $j1UBu$steplist_vars_cssmodulejs from "./steplist_vars_css.mjs";
5
+ import $j1UBu$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
6
+ import {classNames as $j1UBu$classNames} from "@react-spectrum/utils";
7
+ import {FocusRing as $j1UBu$FocusRing} from "@react-aria/focus";
8
+ import {useId as $j1UBu$useId, mergeProps as $j1UBu$mergeProps} from "@react-aria/utils";
9
+ import $j1UBu$react, {useRef as $j1UBu$useRef, useContext as $j1UBu$useContext} from "react";
10
+ import {useHover as $j1UBu$useHover} from "@react-aria/interactions";
11
+ import {useLocale as $j1UBu$useLocale, useLocalizedStringFormatter as $j1UBu$useLocalizedStringFormatter, useNumberFormatter as $j1UBu$useNumberFormatter} from "@react-aria/i18n";
12
+ import {useStepListItem as $j1UBu$useStepListItem} from "@react-aria/steplist";
13
+ import {VisuallyHidden as $j1UBu$VisuallyHidden} from "@react-aria/visually-hidden";
14
+
15
+
16
+ function $parcel$interopDefault(a) {
17
+ return a && a.__esModule ? a.default : a;
18
+ }
19
+ /*
20
+ * Copyright 2023 Adobe. All rights reserved.
21
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
+ * you may not use this file except in compliance with the License. You may obtain a copy
23
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software distributed under
26
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
27
+ * OF ANY KIND, either express or implied. See the License for the specific language
28
+ * governing permissions and limitations under the License.
29
+ */
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ function $24c3cb1adfb0acc5$export$87c2a8a94eda1754(props) {
42
+ let { isDisabled: isDisabled, item: item } = props;
43
+ let { key: key } = item;
44
+ let ref = (0, $j1UBu$useRef)(null);
45
+ let { direction: direction } = (0, $j1UBu$useLocale)();
46
+ let state = (0, $j1UBu$useContext)((0, $739a883ac33f90d8$export$66136572efa4af6e));
47
+ const isSelected = state.selectedKey === key;
48
+ const isCompleted = state.isCompleted(key);
49
+ const isItemDisabled = isDisabled || state.disabledKeys.has(key);
50
+ let { stepProps: stepProps, stepStateProps: stepStateProps } = (0, $j1UBu$useStepListItem)({
51
+ ...props,
52
+ key: key
53
+ }, state, ref);
54
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $j1UBu$useHover)({
55
+ ...props,
56
+ isDisabled: isItemDisabled || isSelected || props.isReadOnly
57
+ });
58
+ let stepStateText = "";
59
+ const stringFormatter = (0, $j1UBu$useLocalizedStringFormatter)((0, $62132693388ec24a$export$2e2bcd8739ae039), "@react-spectrum/steplist");
60
+ const numberFormatter = (0, $j1UBu$useNumberFormatter)();
61
+ if (isSelected) stepStateText = stringFormatter.format("current");
62
+ else if (isCompleted) stepStateText = stringFormatter.format("completed");
63
+ else stepStateText = stringFormatter.format("notCompleted");
64
+ let markerId = (0, $j1UBu$useId)();
65
+ let labelId = (0, $j1UBu$useId)();
66
+ return /*#__PURE__*/ (0, $j1UBu$react).createElement("li", {
67
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-item")
68
+ }, /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$FocusRing), {
69
+ within: true,
70
+ focusRingClass: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "focus-ring")
71
+ }, /*#__PURE__*/ (0, $j1UBu$react).createElement("a", {
72
+ ...(0, $j1UBu$mergeProps)(hoverProps, stepProps),
73
+ "aria-labelledby": `${markerId} ${labelId}`,
74
+ ref: ref,
75
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-link", {
76
+ "is-selected": isSelected && !isItemDisabled,
77
+ "is-disabled": isItemDisabled,
78
+ "is-hovered": isHovered,
79
+ "is-completed": isCompleted,
80
+ "is-selectable": state.isSelectable(key) && !isSelected
81
+ })
82
+ }, /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$VisuallyHidden), stepStateProps, stepStateText), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
83
+ id: labelId,
84
+ "aria-hidden": "true",
85
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-label")
86
+ }, item.rendered), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
87
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-segment", {
88
+ "is-completed": isCompleted
89
+ })
90
+ }, /*#__PURE__*/ (0, $j1UBu$react).createElement("svg", {
91
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-segmentLine"),
92
+ xmlns: "http://www.w3.org/2000/svg",
93
+ height: "100%",
94
+ viewBox: "0 0 2 8",
95
+ preserveAspectRatio: "none"
96
+ }, /*#__PURE__*/ (0, $j1UBu$react).createElement("line", {
97
+ x1: "1",
98
+ y1: "0",
99
+ x2: "1",
100
+ y2: "8",
101
+ vectorEffect: "non-scaling-stroke"
102
+ })), /*#__PURE__*/ (0, $j1UBu$react).createElement((0, $j1UBu$spectrumiconsuiChevronRightMedium), {
103
+ UNSAFE_className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-chevron", {
104
+ "is-reversed": direction === "rtl"
105
+ })
106
+ })), /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
107
+ "aria-hidden": "true",
108
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-markerWrapper")
109
+ }, /*#__PURE__*/ (0, $j1UBu$react).createElement("div", {
110
+ id: markerId,
111
+ className: (0, $j1UBu$classNames)((0, ($parcel$interopDefault($j1UBu$steplist_vars_cssmodulejs))), "spectrum-Steplist-marker")
112
+ }, numberFormatter.format((item.index || 0) + 1))))));
113
+ }
114
+
115
+
116
+ export {$24c3cb1adfb0acc5$export$87c2a8a94eda1754 as StepListItem};
117
+ //# sourceMappingURL=StepListItem.mjs.map