@carbon/utilities-react 0.21.0 → 0.22.0
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/es/StepFlow/index.d.ts +1 -1
- package/es/StepFlow/index.js +1 -2
- package/es/chunk.d.ts +2 -2
- package/es/chunk.js +1 -4
- package/es/index.d.ts +0 -1
- package/es/index.js +2 -4
- package/es/useNoInteractiveChildren/index.js +1 -3
- package/lib/StepFlow/index.js +5 -6
- package/lib/chunk.js +27 -35
- package/lib/index.js +13 -12
- package/lib/useNoInteractiveChildren/index.js +3 -5
- package/package.json +4 -4
package/es/StepFlow/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { i as StepGroup, n as useStepContext, r as StepContextType, t as StepProvider } from "../chunk.js";
|
|
2
|
-
export {
|
|
2
|
+
export { StepContextType, StepGroup, StepProvider, useStepContext };
|
package/es/StepFlow/index.js
CHANGED
package/es/chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Dispatch, ReactNode, SetStateAction } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/StepFlow/StepGroup.d.ts
|
|
5
5
|
interface StepGroupProps {
|
|
@@ -39,7 +39,7 @@ interface StepProviderProps {
|
|
|
39
39
|
}
|
|
40
40
|
declare const StepProvider: ({
|
|
41
41
|
children
|
|
42
|
-
}: StepProviderProps) => react_jsx_runtime0.JSX.Element;
|
|
42
|
+
}: StepProviderProps) => _$react_jsx_runtime0.JSX.Element;
|
|
43
43
|
declare const useStepContext: () => StepContextType;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { StepGroup as i, useStepContext as n, StepContextType as r, StepProvider as t };
|
package/es/chunk.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
3
|
//#region src/StepFlow/StepGroup.tsx
|
|
5
4
|
/**
|
|
6
5
|
* Copyright IBM Corp. 2025, 2025
|
|
@@ -21,7 +20,6 @@ const StepGroup = ({ children }) => {
|
|
|
21
20
|
}, [childrenArray.length, setTotalSteps]);
|
|
22
21
|
return childrenArray[currentStep - 1];
|
|
23
22
|
};
|
|
24
|
-
|
|
25
23
|
//#endregion
|
|
26
24
|
//#region src/StepFlow/StepContext.tsx
|
|
27
25
|
/**
|
|
@@ -55,6 +53,5 @@ const useStepContext = () => {
|
|
|
55
53
|
if (context === void 0) throw new Error("Context hook used outside of Step provider");
|
|
56
54
|
return context;
|
|
57
55
|
};
|
|
58
|
-
|
|
59
56
|
//#endregion
|
|
60
|
-
export { useStepContext as n, StepGroup as r, StepProvider as t };
|
|
57
|
+
export { useStepContext as n, StepGroup as r, StepProvider as t };
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren } from "./useNoInteractiveChildren/index.js";
|
|
2
2
|
import { i as StepGroup, n as useStepContext, r as StepContextType, t as StepProvider } from "./chunk.js";
|
|
3
|
-
import "./StepFlow/index.js";
|
|
4
3
|
export * from "@carbon/utilities";
|
|
5
4
|
export { type StepContextType, StepGroup, StepProvider, getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren, useStepContext };
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren } from "./useNoInteractiveChildren/index.js";
|
|
2
2
|
import { n as useStepContext, r as StepGroup, t as StepProvider } from "./chunk.js";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
export { StepGroup, StepProvider, getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren, useStepContext };
|
|
3
|
+
export * from "@carbon/utilities";
|
|
4
|
+
export { StepGroup, StepProvider, getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren, useStepContext };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/useNoInteractiveChildren/index.jsx
|
|
4
3
|
/**
|
|
5
4
|
* Copyright IBM Corp. 2016, 2026
|
|
@@ -75,6 +74,5 @@ function isFocusable(element) {
|
|
|
75
74
|
default: return true;
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
|
-
|
|
79
77
|
//#endregion
|
|
80
|
-
export { getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren };
|
|
78
|
+
export { getInteractiveContent, getRoleContent, useInteractiveChildrenNeedDescription, useNoInteractiveChildren };
|
package/lib/StepFlow/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.useStepContext = require_StepContext.useStepContext;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_StepFlow = require("../chunk.js");
|
|
3
|
+
exports.StepGroup = require_StepFlow.StepGroup;
|
|
4
|
+
exports.StepProvider = require_StepFlow.StepProvider;
|
|
5
|
+
exports.useStepContext = require_StepFlow.useStepContext;
|
package/lib/chunk.js
CHANGED
|
@@ -6,16 +6,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
19
15
|
}
|
|
20
16
|
return to;
|
|
21
17
|
};
|
|
@@ -23,12 +19,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
19
|
value: mod,
|
|
24
20
|
enumerable: true
|
|
25
21
|
}) : target, mod));
|
|
26
|
-
|
|
27
22
|
//#endregion
|
|
28
23
|
let react = require("react");
|
|
29
24
|
react = __toESM(react);
|
|
30
25
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
|
|
32
26
|
//#region src/StepFlow/StepGroup.tsx
|
|
33
27
|
/**
|
|
34
28
|
* Copyright IBM Corp. 2025, 2025
|
|
@@ -49,7 +43,6 @@ const StepGroup = ({ children }) => {
|
|
|
49
43
|
}, [childrenArray.length, setTotalSteps]);
|
|
50
44
|
return childrenArray[currentStep - 1];
|
|
51
45
|
};
|
|
52
|
-
|
|
53
46
|
//#endregion
|
|
54
47
|
//#region src/StepFlow/StepContext.tsx
|
|
55
48
|
/**
|
|
@@ -83,29 +76,28 @@ const useStepContext = () => {
|
|
|
83
76
|
if (context === void 0) throw new Error("Context hook used outside of Step provider");
|
|
84
77
|
return context;
|
|
85
78
|
};
|
|
86
|
-
|
|
87
79
|
//#endregion
|
|
88
|
-
Object.defineProperty(exports,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
80
|
+
Object.defineProperty(exports, "StepGroup", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function() {
|
|
83
|
+
return StepGroup;
|
|
84
|
+
}
|
|
93
85
|
});
|
|
94
|
-
Object.defineProperty(exports,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
Object.defineProperty(exports, "StepProvider", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function() {
|
|
89
|
+
return StepProvider;
|
|
90
|
+
}
|
|
99
91
|
});
|
|
100
|
-
Object.defineProperty(exports,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
92
|
+
Object.defineProperty(exports, "__toESM", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function() {
|
|
95
|
+
return __toESM;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "useStepContext", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function() {
|
|
101
|
+
return useStepContext;
|
|
102
|
+
}
|
|
105
103
|
});
|
|
106
|
-
Object.defineProperty(exports, 'useStepContext', {
|
|
107
|
-
enumerable: true,
|
|
108
|
-
get: function () {
|
|
109
|
-
return useStepContext;
|
|
110
|
-
}
|
|
111
|
-
});
|
package/lib/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const
|
|
3
|
-
const require_useNoInteractiveChildren_index = require(
|
|
4
|
-
|
|
5
|
-
exports.
|
|
6
|
-
exports.StepProvider = require_StepContext.StepProvider;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_StepFlow = require("./chunk.js");
|
|
3
|
+
const require_useNoInteractiveChildren_index = require("./useNoInteractiveChildren/index.js");
|
|
4
|
+
exports.StepGroup = require_StepFlow.StepGroup;
|
|
5
|
+
exports.StepProvider = require_StepFlow.StepProvider;
|
|
7
6
|
exports.getInteractiveContent = require_useNoInteractiveChildren_index.getInteractiveContent;
|
|
8
7
|
exports.getRoleContent = require_useNoInteractiveChildren_index.getRoleContent;
|
|
9
8
|
exports.useInteractiveChildrenNeedDescription = require_useNoInteractiveChildren_index.useInteractiveChildrenNeedDescription;
|
|
10
9
|
exports.useNoInteractiveChildren = require_useNoInteractiveChildren_index.useNoInteractiveChildren;
|
|
11
|
-
exports.useStepContext =
|
|
10
|
+
exports.useStepContext = require_StepFlow.useStepContext;
|
|
12
11
|
var _carbon_utilities = require("@carbon/utilities");
|
|
13
|
-
Object.keys(_carbon_utilities).forEach(function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
Object.keys(_carbon_utilities).forEach(function(k) {
|
|
13
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function() {
|
|
16
|
+
return _carbon_utilities[k];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
18
19
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../chunk.js");
|
|
3
3
|
let react = require("react");
|
|
4
|
-
|
|
5
4
|
//#region src/useNoInteractiveChildren/index.jsx
|
|
6
5
|
/**
|
|
7
6
|
* Copyright IBM Corp. 2016, 2026
|
|
@@ -77,9 +76,8 @@ function isFocusable(element) {
|
|
|
77
76
|
default: return true;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
|
|
81
79
|
//#endregion
|
|
82
80
|
exports.getInteractiveContent = getInteractiveContent;
|
|
83
81
|
exports.getRoleContent = getRoleContent;
|
|
84
82
|
exports.useInteractiveChildrenNeedDescription = useInteractiveChildrenNeedDescription;
|
|
85
|
-
exports.useNoInteractiveChildren = useNoInteractiveChildren;
|
|
83
|
+
exports.useNoInteractiveChildren = useNoInteractiveChildren;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/utilities-react",
|
|
3
3
|
"description": "Utilities and helpers to drive consistency across software products using the Carbon Design System with React",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rimraf": "^6.0.1",
|
|
58
|
-
"tsdown": "^0.
|
|
58
|
+
"tsdown": "^0.21.0",
|
|
59
59
|
"typescript-config-carbon": "^0.9.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@carbon/utilities": "^0.
|
|
62
|
+
"@carbon/utilities": "^0.19.0",
|
|
63
63
|
"@ibm/telemetry-js": "^1.6.1"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "5e89339998bd16c8ddd42e1cc6a2d0c15b3b0af5"
|
|
66
66
|
}
|