@carbon-labs/react-ui-shell 0.12.0 → 0.13.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/components/HeaderPanel.js +6 -6
- package/es/components/Link.d.ts +48 -0
- package/es/components/Link.js +60 -0
- package/es/components/SideNav.d.ts +3 -3
- package/es/components/SideNav.js +16 -16
- package/es/components/SideNavItems.js +1 -1
- package/es/components/SideNavMenu.js +8 -8
- package/es/components/SideNavMenuItem.d.ts +1 -1
- package/es/components/SideNavMenuItem.js +4 -4
- package/es/components/SideNavToggle.js +1 -1
- package/es/internal/environment.d.ts +12 -0
- package/es/internal/environment.js +15 -0
- package/es/internal/keyboard/index.d.ts +3 -0
- package/es/internal/keyboard/keys.d.ts +126 -0
- package/es/internal/keyboard/keys.js +67 -0
- package/es/internal/keyboard/match.d.ts +63 -0
- package/es/internal/keyboard/match.js +88 -0
- package/es/internal/keyboard/navigation.d.ts +19 -0
- package/es/internal/useDelayedState.d.ts +19 -0
- package/es/internal/useDelayedState.js +56 -0
- package/es/internal/useEvent.d.ts +31 -0
- package/es/internal/useEvent.js +55 -0
- package/es/internal/useMatchMedia.d.ts +1 -0
- package/es/internal/useMatchMedia.js +52 -0
- package/es/internal/useMergedRefs.d.ts +13 -0
- package/es/internal/useMergedRefs.js +38 -0
- package/es/internal/usePrefix.d.ts +9 -0
- package/es/internal/usePrefix.js +23 -0
- package/es/internal/warning.d.ts +7 -0
- package/es/internal/warning.js +31 -0
- package/es/prop-types/AriaPropTypes.d.ts +1 -0
- package/es/prop-types/AriaPropTypes.js +16 -0
- package/es/prop-types/deprecate.d.ts +1 -0
- package/es/prop-types/deprecate.js +39 -0
- package/es/prop-types/isRequiredOneOf.d.ts +13 -0
- package/es/prop-types/isRequiredOneOf.js +40 -0
- package/es/types/common.d.ts +29 -0
- package/lib/components/HeaderPanel.js +6 -6
- package/lib/components/Link.d.ts +48 -0
- package/lib/components/Link.js +65 -0
- package/lib/components/SideNav.d.ts +3 -3
- package/lib/components/SideNav.js +16 -35
- package/lib/components/SideNavItems.js +1 -1
- package/lib/components/SideNavMenu.js +10 -29
- package/lib/components/SideNavMenuItem.d.ts +1 -1
- package/lib/components/SideNavMenuItem.js +6 -6
- package/lib/components/SideNavToggle.js +1 -1
- package/lib/internal/environment.d.ts +12 -0
- package/lib/internal/environment.js +17 -0
- package/lib/internal/keyboard/index.d.ts +3 -0
- package/lib/internal/keyboard/keys.d.ts +126 -0
- package/lib/internal/keyboard/keys.js +76 -0
- package/lib/internal/keyboard/match.d.ts +63 -0
- package/lib/internal/keyboard/match.js +91 -0
- package/lib/internal/keyboard/navigation.d.ts +19 -0
- package/lib/internal/useDelayedState.d.ts +19 -0
- package/lib/internal/useDelayedState.js +58 -0
- package/lib/internal/useEvent.d.ts +31 -0
- package/lib/internal/useEvent.js +57 -0
- package/lib/internal/useMatchMedia.d.ts +1 -0
- package/lib/internal/useMatchMedia.js +54 -0
- package/lib/internal/useMergedRefs.d.ts +13 -0
- package/lib/internal/useMergedRefs.js +40 -0
- package/lib/internal/usePrefix.d.ts +9 -0
- package/lib/internal/usePrefix.js +26 -0
- package/lib/internal/warning.d.ts +7 -0
- package/lib/internal/warning.js +33 -0
- package/lib/prop-types/AriaPropTypes.d.ts +1 -0
- package/lib/prop-types/AriaPropTypes.js +18 -0
- package/lib/prop-types/deprecate.d.ts +1 -0
- package/lib/prop-types/deprecate.js +43 -0
- package/lib/prop-types/isRequiredOneOf.d.ts +13 -0
- package/lib/prop-types/isRequiredOneOf.js +44 -0
- package/lib/types/common.d.ts +29 -0
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
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
|
+
import * as React from 'react';
|
|
8
|
+
export type ReactAttr<T = HTMLElement> = React.HTMLAttributes<T>;
|
|
9
|
+
export type ForwardRefProps<T, P = unknown> = React.PropsWithoutRef<React.PropsWithChildren<P>> & React.RefAttributes<T>;
|
|
10
|
+
export type ForwardRefReturn<T, P = unknown> = React.ForwardRefExoticComponent<ForwardRefProps<T, P>>;
|
|
11
|
+
/**
|
|
12
|
+
* For "as" props. Creates an "as" property that supports native html tags such as 'span', 'a', 'button' as well as custom functional components
|
|
13
|
+
* All native props for the supplied html tag/component are inferred as part of the base component props, allowing us to use props like `href` on an 'a' element etc
|
|
14
|
+
*/
|
|
15
|
+
export type PolymorphicProps<Element extends React.ElementType, Props> = Props & Omit<React.ComponentProps<Element>, 'as'> & {
|
|
16
|
+
as?: Element;
|
|
17
|
+
};
|
|
18
|
+
export interface TranslateWithId<MID = string, ARGS = Record<string, unknown>> {
|
|
19
|
+
/**
|
|
20
|
+
* Supply a method to translate internal strings with your i18n tool of
|
|
21
|
+
* choice.
|
|
22
|
+
*/
|
|
23
|
+
translateWithId?(messageId: MID, args?: ARGS): string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Alias of TranslateWithId. Will be removed in v12
|
|
27
|
+
* @deprecated Use TranslateWithId instead
|
|
28
|
+
*/
|
|
29
|
+
export type InternationalProps<MID = string, ARGS = Record<string, unknown>> = TranslateWithId<MID, ARGS>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-ui-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ibm/telemetry-js": "^1.9.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "c69a942f7ab78befba4030efc0588ad8dcb0ce71"
|
|
37
37
|
}
|