@react-spectrum/steplist 3.0.0-alpha.22 → 3.0.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +3 -3
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +3 -0
- package/package.json +14 -36
- package/src/index.ts +4 -3
- package/dist/StepList.main.js +0 -72
- package/dist/StepList.main.js.map +0 -1
- package/dist/StepList.mjs +0 -67
- package/dist/StepList.module.js +0 -67
- package/dist/StepList.module.js.map +0 -1
- package/dist/StepListContext.main.js +0 -27
- package/dist/StepListContext.main.js.map +0 -1
- package/dist/StepListContext.mjs +0 -18
- package/dist/StepListContext.module.js +0 -18
- package/dist/StepListContext.module.js.map +0 -1
- package/dist/StepListItem.main.js +0 -122
- package/dist/StepListItem.main.js.map +0 -1
- package/dist/StepListItem.mjs +0 -117
- package/dist/StepListItem.module.js +0 -117
- package/dist/StepListItem.module.js.map +0 -1
- package/dist/en-US.main.js +0 -9
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -11
- package/dist/en-US.module.js +0 -11
- package/dist/en-US.module.js.map +0 -1
- package/dist/index.main.js +0 -19
- package/dist/index.main.js.map +0 -1
- package/dist/index.mjs +0 -14
- package/dist/index.module.js +0 -14
- package/dist/index.module.js.map +0 -1
- package/dist/steplist.5b736ed7.css +0 -497
- package/dist/steplist.5b736ed7.css.map +0 -1
- package/dist/steplist_vars_css.main.js +0 -95
- package/dist/steplist_vars_css.main.js.map +0 -1
- package/dist/steplist_vars_css.mjs +0 -97
- package/dist/steplist_vars_css.module.js +0 -97
- package/dist/steplist_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -26
- package/dist/types.d.ts.map +0 -1
- package/src/StepList.tsx +0 -77
- package/src/StepListContext.ts +0 -16
- package/src/StepListItem.tsx +0 -115
package/dist/import.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {StepList as $
|
|
2
|
-
import {Item as $
|
|
1
|
+
import {StepList as $db3caf82310b6cbf$re_export$StepList} from "@adobe/react-spectrum/private/steplist/StepList";
|
|
2
|
+
import {Item as $db3caf82310b6cbf$re_export$Item} from "react-stately/Item";
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2023 Adobe. All rights reserved.
|
|
@@ -16,5 +16,5 @@ import {Item as $6f77c10bf951cb4f$re_export$Item} from "@react-stately/collectio
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
export {$
|
|
19
|
+
export {$db3caf82310b6cbf$re_export$StepList as StepList, $db3caf82310b6cbf$re_export$Item as Item};
|
|
20
20
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
1
|
+
var $xMTDa$adobereactspectrumprivatesteplistStepList = require("@adobe/react-spectrum/private/steplist/StepList");
|
|
2
|
+
var $xMTDa$reactstatelyItem = require("react-stately/Item");
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
$parcel$export(module.exports, "StepList", ()
|
|
10
|
-
$parcel$export(module.exports, "Item", ()
|
|
9
|
+
$parcel$export(module.exports, "StepList", function () { return $xMTDa$adobereactspectrumprivatesteplistStepList.StepList; });
|
|
10
|
+
$parcel$export(module.exports, "Item", function () { return $xMTDa$reactstatelyItem.Item; });
|
|
11
11
|
/*
|
|
12
12
|
* Copyright 2023 Adobe. All rights reserved.
|
|
13
13
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/steplist/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {StepList} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/steplist/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {StepList} from '@adobe/react-spectrum/private/steplist/StepList';\n\nexport type {SpectrumStepListProps} from '@adobe/react-spectrum/private/steplist/StepList';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {StepList as $
|
|
2
|
-
import {Item as $
|
|
1
|
+
import {StepList as $db3caf82310b6cbf$re_export$StepList} from "@adobe/react-spectrum/private/steplist/StepList";
|
|
2
|
+
import {Item as $db3caf82310b6cbf$re_export$Item} from "react-stately/Item";
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2023 Adobe. All rights reserved.
|
|
@@ -16,5 +16,5 @@ import {Item as $6f77c10bf951cb4f$re_export$Item} from "@react-stately/collectio
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
export {$
|
|
19
|
+
export {$db3caf82310b6cbf$re_export$StepList as StepList, $db3caf82310b6cbf$re_export$Item as Item};
|
|
20
20
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/steplist/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {StepList} from '
|
|
1
|
+
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/steplist/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {StepList} from '@adobe/react-spectrum/private/steplist/StepList';\n\nexport type {SpectrumStepListProps} from '@adobe/react-spectrum/private/steplist/StepList';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/steplist",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.24",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,45 +24,23 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"@react-aria/steplist": "3.0.0-alpha.24",
|
|
47
|
-
"@react-aria/utils": "^3.33.0",
|
|
48
|
-
"@react-aria/visually-hidden": "^3.8.30",
|
|
49
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
50
|
-
"@react-stately/collections": "^3.12.9",
|
|
51
|
-
"@react-stately/steplist": "3.0.0-alpha.20",
|
|
52
|
-
"@react-types/shared": "^3.33.0",
|
|
53
|
-
"@spectrum-icons/ui": "^3.6.22",
|
|
54
|
-
"@swc/helpers": "^0.5.0"
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
35
|
+
"@swc/helpers": "^0.5.0",
|
|
36
|
+
"react-stately": "3.46.0"
|
|
58
37
|
},
|
|
59
38
|
"peerDependencies": {
|
|
60
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
61
39
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
62
40
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
63
41
|
},
|
|
64
42
|
"publishConfig": {
|
|
65
43
|
"access": "public"
|
|
66
44
|
},
|
|
67
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
68
46
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {StepList} from '
|
|
16
|
-
|
|
17
|
-
export type {SpectrumStepListProps} from '
|
|
15
|
+
export {StepList} from '@adobe/react-spectrum/private/steplist/StepList';
|
|
16
|
+
|
|
17
|
+
export type {SpectrumStepListProps} from '@adobe/react-spectrum/private/steplist/StepList';
|
|
18
|
+
export {Item} from 'react-stately/Item';
|
package/dist/StepList.main.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var $b9b57d2de2195519$exports = require("./StepListContext.main.js");
|
|
2
|
-
var $d2e2cd0667356b5d$exports = require("./StepListItem.main.js");
|
|
3
|
-
require("./steplist.5b736ed7.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
|
-
const $a64198f1506264d6$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, ($parcel$interopDefault($i9j2Q$react))).forwardRef(function 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
|
-
|
|
71
|
-
|
|
72
|
-
//# sourceMappingURL=StepList.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA8BM,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAA2B,KAA+B,EAAE,GAA6B;IACzI,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","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\nexport const StepList = React.forwardRef(function 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}) as <T>(props: SpectrumStepListProps<T> & {ref?: DOMRef<HTMLOListElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"StepList.main.js.map"}
|
package/dist/StepList.mjs
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.mjs";
|
|
2
|
-
import {StepListItem as $24c3cb1adfb0acc5$export$87c2a8a94eda1754} from "./StepListItem.mjs";
|
|
3
|
-
import "./steplist.5b736ed7.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
|
-
const $6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, $kkmdw$react).forwardRef(function 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
|
-
|
|
65
|
-
|
|
66
|
-
export {$6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 as StepList};
|
|
67
|
-
//# sourceMappingURL=StepList.module.js.map
|
package/dist/StepList.module.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {StepListContext as $739a883ac33f90d8$export$66136572efa4af6e} from "./StepListContext.module.js";
|
|
2
|
-
import {StepListItem as $24c3cb1adfb0acc5$export$87c2a8a94eda1754} from "./StepListItem.module.js";
|
|
3
|
-
import "./steplist.5b736ed7.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
|
-
const $6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 = /*#__PURE__*/ (0, $kkmdw$react).forwardRef(function 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
|
-
|
|
65
|
-
|
|
66
|
-
export {$6bd0589d5d2f8b66$export$ff2e09ca3ba758a9 as StepList};
|
|
67
|
-
//# sourceMappingURL=StepList.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA8BM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAA2B,KAA+B,EAAE,GAA6B;IACzI,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","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\nexport const StepList = React.forwardRef(function 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}) as <T>(props: SpectrumStepListProps<T> & {ref?: DOMRef<HTMLOListElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"StepList.module.js.map"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/StepListContext.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
var $fed92386245d94a4$exports = require("./index.main.js");
|
|
2
|
-
var $b9b57d2de2195519$exports = require("./StepListContext.main.js");
|
|
3
|
-
require("./steplist.5b736ed7.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, $fed92386245d94a4$exports.default), '@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
|
|
@@ -1 +0,0 @@
|
|
|
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,iCAAW,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,GAAG,SAAS,CAAC,EAAE,SAAS;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, {ReactNode, 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>): ReactNode {\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"}
|