@sps-woodland/growler 8.51.3 → 8.52.1
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/README.md +1 -30
- package/lib/Growler.css.d.ts +17 -0
- package/lib/Growler.d.ts +22 -0
- package/lib/GrowlerListProvider.d.ts +13 -0
- package/lib/Sonner.css.d.ts +16 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +553 -34
- package/lib/index.umd.cjs +25 -24
- package/lib/sonner.d.ts +86 -0
- package/lib/style.css +1 -1
- package/package.json +16 -6
- package/vite.config.mjs +13 -6
package/README.md
CHANGED
|
@@ -1,32 +1,3 @@
|
|
|
1
1
|
## [@sps-woodland/growler](https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/growler#readme)
|
|
2
2
|
|
|
3
|
-
SPS Woodland Design System growler component and hook
|
|
4
|
-
|
|
5
|
-
> **Heads up — this is a wrapper package.** The component source now lives in
|
|
6
|
-
> [`@sps-woodland/core`](../react). This package re-exports from the
|
|
7
|
-
> mono-package so existing imports keep working, but new code should prefer the
|
|
8
|
-
> mono-package paths.
|
|
9
|
-
|
|
10
|
-
### Preferred imports (mono-package)
|
|
11
|
-
|
|
12
|
-
```ts
|
|
13
|
-
import {
|
|
14
|
-
Growler,
|
|
15
|
-
GrowlerListProvider,
|
|
16
|
-
GrowlerEmitter,
|
|
17
|
-
growl,
|
|
18
|
-
useGrowler,
|
|
19
|
-
} from "@sps-woodland/core/growler";
|
|
20
|
-
|
|
21
|
-
import "@sps-woodland/core/growler/style.css";
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
The growler family is barrel-only — there are no flat subpaths, since the
|
|
25
|
-
wrapper API has never differentiated them.
|
|
26
|
-
|
|
27
|
-
### Legacy imports (still supported)
|
|
28
|
-
|
|
29
|
-
```ts
|
|
30
|
-
import { Growler, GrowlerListProvider, GrowlerEmitter, growl } from "@sps-woodland/growler";
|
|
31
|
-
import "@sps-woodland/growler/style.css";
|
|
32
|
-
```
|
|
3
|
+
SPS Woodland Design System growler component and hook
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Tokens } from "@sps-woodland/tokens";
|
|
2
|
+
import type { VariantDefinitions, RecipeVariant, BooleanRecipeVariant } from "@sps-woodland/core";
|
|
3
|
+
export type GrowlerKind = keyof typeof Tokens.component.growler.kind;
|
|
4
|
+
interface GrowlerVariantDefinitions extends VariantDefinitions {
|
|
5
|
+
kind: RecipeVariant<GrowlerKind>;
|
|
6
|
+
fade: BooleanRecipeVariant;
|
|
7
|
+
}
|
|
8
|
+
export declare const growler: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<GrowlerVariantDefinitions>;
|
|
9
|
+
export declare const growlerArea: string;
|
|
10
|
+
export declare const growlerIconBox: string;
|
|
11
|
+
export declare const growlerIcon: string;
|
|
12
|
+
export declare const growlerMessageBox: string;
|
|
13
|
+
export declare const growlerMessageBoxText: string;
|
|
14
|
+
export declare const growlerMessageBoxTitle: string;
|
|
15
|
+
export declare const growlerMessageBoxSubtitle: string;
|
|
16
|
+
export declare const growlerCloseButton: string;
|
|
17
|
+
export {};
|
package/lib/Growler.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
|
+
import type { GrowlerKind } from "./Growler.css";
|
|
4
|
+
export declare const GrowlerIcons: Readonly<{
|
|
5
|
+
warning: "status-warning";
|
|
6
|
+
error: "status-error";
|
|
7
|
+
success: "status-ok";
|
|
8
|
+
info: "info-circle";
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `GrowlerEmitter` and `growl` instead
|
|
12
|
+
*/
|
|
13
|
+
export declare function Growler({ children, className, imgSrc, kind, onClose, removeFromList, persist, title, id, ...rest }: ComponentProps<{
|
|
14
|
+
imgSrc?: string;
|
|
15
|
+
kind?: GrowlerKind;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
removeFromList?: (id: string | number) => void;
|
|
18
|
+
closed?: boolean;
|
|
19
|
+
persist?: boolean;
|
|
20
|
+
title: string;
|
|
21
|
+
id?: string | number;
|
|
22
|
+
}> & React.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type RenderFn = () => React.ReactElement;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `GrowlerEmitter` and `growl` instead
|
|
5
|
+
*/
|
|
6
|
+
export declare function GrowlerListProvider(props: any): JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `GrowlerEmitter` and `growl` instead
|
|
9
|
+
*/
|
|
10
|
+
export declare const useGrowler: () => {
|
|
11
|
+
addGrowler: (NewGrowler: RenderFn) => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Tokens } from "@sps-woodland/tokens";
|
|
2
|
+
import type { VariantDefinitions, RecipeVariant } from "@sps-woodland/core";
|
|
3
|
+
export type GrowlerKind = keyof typeof Tokens.component.growler.kind;
|
|
4
|
+
interface GrowlerVariantDefinitions extends VariantDefinitions {
|
|
5
|
+
kind: RecipeVariant<GrowlerKind>;
|
|
6
|
+
}
|
|
7
|
+
export declare const growler: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<GrowlerVariantDefinitions>;
|
|
8
|
+
export declare const growlerArea: string;
|
|
9
|
+
export declare const growlerIconBox: string;
|
|
10
|
+
export declare const growlerIcon: string;
|
|
11
|
+
export declare const growlerMessageBox: string;
|
|
12
|
+
export declare const growlerMessageBoxText: string;
|
|
13
|
+
export declare const growlerMessageBoxTitle: string;
|
|
14
|
+
export declare const growlerMessageBoxSubtitle: string;
|
|
15
|
+
export declare const growlerCloseButton: string;
|
|
16
|
+
export {};
|
package/lib/index.d.ts
CHANGED