@viasat/beam-react 2.43.1 → 2.44.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.
|
@@ -7,4 +7,9 @@ export interface MenuContextValue {
|
|
|
7
7
|
maxHeight?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare const MenuContext: import('react').Context<MenuContextValue | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Access the surrounding Menu's context to imperatively `open`/`close` it (e.g. from a
|
|
12
|
+
* custom item). Returns `undefined` when called outside a `<Menu>` subtree, so callers must
|
|
13
|
+
* null-check before use: `const menu = useMenuContext(); menu?.close();`
|
|
14
|
+
*/
|
|
10
15
|
export declare const useMenuContext: () => MenuContextValue | undefined;
|
|
@@ -33,6 +33,13 @@ export interface Config {
|
|
|
33
33
|
*/
|
|
34
34
|
validateStep?: (stepId: string) => Promise<boolean>;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Initialize a Stepper from your `steps` and `config`, then destructure the returned
|
|
38
|
+
* `Stepper` component and helpers and render them: `const { Stepper, all, getStatus,
|
|
39
|
+
* goToNextStep, goToPrevStep } = useBeamStepper(steps, config);` then render `<Stepper>`
|
|
40
|
+
* with a `<Stepper.Step>` per step (e.g. `all.map(s => <Stepper.Step status={getStatus(s.id)} />)`)
|
|
41
|
+
* and advance with `goToNextStep()` / `goToPrevStep()` / `goToStep(id)`.
|
|
42
|
+
*/
|
|
36
43
|
export declare const useBeamStepper: (steps: Step[], config: Config) => {
|
|
37
44
|
utils: import('@stepperize/core').Utils<Step[]>;
|
|
38
45
|
resetStepper: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viasat/beam-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.44.0",
|
|
4
4
|
"description": "React component library for the Beam design system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Viasat",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@viasat/beam-fonts": "2.
|
|
63
|
-
"@viasat/beam-shared": "2.
|
|
64
|
-
"@viasat/beam-styles": "2.
|
|
65
|
-
"@viasat/beam-tokens": "2.
|
|
66
|
-
"@viasat/beam-icons": "2.
|
|
62
|
+
"@viasat/beam-fonts": "2.44.0",
|
|
63
|
+
"@viasat/beam-shared": "2.44.0",
|
|
64
|
+
"@viasat/beam-styles": "2.44.0",
|
|
65
|
+
"@viasat/beam-tokens": "2.44.0",
|
|
66
|
+
"@viasat/beam-icons": "2.44.0",
|
|
67
67
|
"clsx": "^1.2.1",
|
|
68
68
|
"@floating-ui/react": "^0.26.18",
|
|
69
69
|
"@stepperize/react": "^5.1.5",
|