@carbon-labs/utilities 0.14.0 → 0.14.1-canary.387

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/index.js CHANGED
@@ -7,4 +7,5 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- export * from './settings/index.js';
10
+ export * from './settings/index.js';
11
+ export * from './usePrefix.js';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import React from 'react';
9
+
10
+ export const PrefixContext = React.createContext('clabs');
11
+
12
+ /**
13
+ * Sets the prefix context
14
+ * @returns context value
15
+ */
16
+ export function usePrefix() {
17
+ return React.useContext(PrefixContext);
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/utilities",
3
- "version": "0.14.0",
3
+ "version": "0.14.1-canary.387+1225d25",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -29,9 +29,13 @@
29
29
  "es/**/*.js",
30
30
  "es/index.js"
31
31
  ],
32
+ "dependencies": {
33
+ "react": "^18.3.1",
34
+ "react-dom": "^18.3.1"
35
+ },
32
36
  "devDependencies": {
33
37
  "@rollup/plugin-babel": "^6.0.4",
34
38
  "babel-cli": "^6.26.0"
35
39
  },
36
- "gitHead": "02dc54d42b31bf352abc606d5707dc54814f287d"
40
+ "gitHead": "1225d2596923bc5ca816e110ee5d1416283b8fc9"
37
41
  }
package/src/index.js CHANGED
@@ -8,3 +8,4 @@
8
8
  */
9
9
 
10
10
  export * from './settings/index.js';
11
+ export * from './usePrefix.js';