@nimbus-ds/alert 1.0.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/CHANGELOG.md +21 -0
- package/README.md +13 -0
- package/dist/Alert.d.ts +4 -0
- package/dist/alert.definitions.d.ts +22 -0
- package/dist/alert.types.d.ts +17 -0
- package/dist/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Skeleton/skeleton.types.d.ts +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -0
- package/dist/index.js.LICENSE.txt +103 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
The alert component is used to showcase relevant or time-sensitive information to the user in a visually prominent banner.
|
|
4
|
+
|
|
5
|
+
## 2022-10-26
|
|
6
|
+
|
|
7
|
+
### 📚 3rd party library updates
|
|
8
|
+
|
|
9
|
+
- Added `@vanilla-extract/webpack-plugin@2.1.11`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
10
|
+
- Added `terser-webpack-plugin@5.3.5`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
11
|
+
- Added `ts-loader@9.3.1`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
12
|
+
- Added `typescript@4.7.4`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
13
|
+
- Added `webpack@5.74.0`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
14
|
+
- Added `webpack-cli@4.10.0`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
15
|
+
|
|
16
|
+
### 🎉 New features
|
|
17
|
+
|
|
18
|
+
- Added `title`, `appearance`, `children`, `onRemove` and `show` properties to the component API. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
19
|
+
- Added stories to the component. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
20
|
+
- Created new `Alert.Skeleton` subcomponent. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
|
21
|
+
- Added stories to the subcomponent `Alert.Skeleton`. ([#50](https://github.com/TiendaNube/nimbus-design-system/pull/50) by [@juanchigallego](https://github.com/juanchigallego))
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# `@nimbus-ds/alert`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nimbus-ds/alert)
|
|
4
|
+
|
|
5
|
+
The alert component is used to showcase relevant or time-sensitive information to the user in a visually prominent banner.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ yarn add @nimbus-ds/alert
|
|
11
|
+
# or
|
|
12
|
+
$ npm install @nimbus-ds/alert
|
|
13
|
+
```
|
package/dist/Alert.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const alertVariants: {
|
|
2
|
+
neutral: {
|
|
3
|
+
icon: import("@tiendanube/icons/dist/icons").Icon;
|
|
4
|
+
role: string;
|
|
5
|
+
};
|
|
6
|
+
primary: {
|
|
7
|
+
icon: import("@tiendanube/icons/dist/icons").Icon;
|
|
8
|
+
role: string;
|
|
9
|
+
};
|
|
10
|
+
success: {
|
|
11
|
+
icon: import("@tiendanube/icons/dist/icons").Icon;
|
|
12
|
+
role: string;
|
|
13
|
+
};
|
|
14
|
+
warning: {
|
|
15
|
+
icon: import("@tiendanube/icons/dist/icons").Icon;
|
|
16
|
+
role: string;
|
|
17
|
+
};
|
|
18
|
+
danger: {
|
|
19
|
+
icon: import("@tiendanube/icons/dist/icons").Icon;
|
|
20
|
+
role: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { Skeleton } from "./components";
|
|
3
|
+
export interface AlertComponents {
|
|
4
|
+
Skeleton: typeof Skeleton;
|
|
5
|
+
}
|
|
6
|
+
export interface AlertProps extends HTMLAttributes<HTMLElement> {
|
|
7
|
+
/** Alert title */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Alert appearance */
|
|
10
|
+
appearance?: "primary" | "success" | "warning" | "danger" | "neutral";
|
|
11
|
+
/** Alert body content */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Function to be passed on actioning the dismiss button */
|
|
14
|
+
onRemove?: () => void;
|
|
15
|
+
/** Determines if the alert is shown or not */
|
|
16
|
+
show?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Skeleton";
|