@groupeactual/ui-kit 0.4.24 → 0.4.25
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/dist/cjs/components/EmbbededNotification/EmbeddedNotification.d.ts +9 -0
- package/dist/cjs/components/EmbbededNotification/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/index.js +45 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/EmbbededNotification/EmbeddedNotification.d.ts +9 -0
- package/dist/esm/components/EmbbededNotification/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/index.js +45 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +28 -21
- package/package.json +3 -1
- package/src/components/EmbbededNotification/EmbeddedNotification.tsx +95 -0
- package/src/components/EmbbededNotification/index.ts +1 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
interface Props extends BoxProps {
|
|
4
|
+
variant: 'warning' | 'error' | 'success' | 'infos';
|
|
5
|
+
title: string;
|
|
6
|
+
text?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const EmbeddedNotification: ({ title, text, variant, ...props }: Props) => JSX.Element;
|
|
9
|
+
export default EmbeddedNotification;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './EmbeddedNotification';
|
|
@@ -7,3 +7,4 @@ export { default as Accordion } from './Accordion';
|
|
|
7
7
|
export { default as IconProvider } from './Icon/Icon';
|
|
8
8
|
export { default as Pagination } from './Pagination';
|
|
9
9
|
export { default as Chip } from './Chip/Chip';
|
|
10
|
+
export { default as EmbeddedNotification } from './EmbbededNotification/EmbeddedNotification';
|
package/dist/esm/index.js
CHANGED
|
@@ -52315,6 +52315,50 @@ var Chip = function (props) {
|
|
|
52315
52315
|
return jsx(ChipMUI, __assign$1({}, props));
|
|
52316
52316
|
};
|
|
52317
52317
|
|
|
52318
|
+
var faCircleExclamation = {
|
|
52319
|
+
prefix: 'fas',
|
|
52320
|
+
iconName: 'circle-exclamation',
|
|
52321
|
+
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]
|
|
52322
|
+
};
|
|
52323
|
+
var faCircleCheck = {
|
|
52324
|
+
prefix: 'fas',
|
|
52325
|
+
iconName: 'circle-check',
|
|
52326
|
+
icon: [512, 512, [61533, "check-circle"], "f058", "M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]
|
|
52327
|
+
};
|
|
52328
|
+
var faCircleInfo = {
|
|
52329
|
+
prefix: 'fas',
|
|
52330
|
+
iconName: 'circle-info',
|
|
52331
|
+
icon: [512, 512, ["info-circle"], "f05a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]
|
|
52332
|
+
};
|
|
52333
|
+
var faCircleXmark = {
|
|
52334
|
+
prefix: 'fas',
|
|
52335
|
+
iconName: 'circle-xmark',
|
|
52336
|
+
icon: [512, 512, [61532, "times-circle", "xmark-circle"], "f057", "M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]
|
|
52337
|
+
};
|
|
52338
|
+
|
|
52339
|
+
var EmbeddedNotification = function (_a) {
|
|
52340
|
+
var title = _a.title, text = _a.text, _b = _a.variant, variant = _b === void 0 ? 'infos' : _b, props = __rest(_a, ["title", "text", "variant"]);
|
|
52341
|
+
var variantNotification = {
|
|
52342
|
+
warning: {
|
|
52343
|
+
color: 'orangeWarning',
|
|
52344
|
+
icon: faCircleExclamation
|
|
52345
|
+
},
|
|
52346
|
+
error: {
|
|
52347
|
+
color: 'redError',
|
|
52348
|
+
icon: faCircleXmark
|
|
52349
|
+
},
|
|
52350
|
+
success: {
|
|
52351
|
+
color: 'greenSuccess',
|
|
52352
|
+
icon: faCircleCheck
|
|
52353
|
+
},
|
|
52354
|
+
infos: {
|
|
52355
|
+
color: 'blueInfo',
|
|
52356
|
+
icon: faCircleInfo
|
|
52357
|
+
}
|
|
52358
|
+
};
|
|
52359
|
+
return (jsx(Box$1, __assign$1({ border: "1px solid", borderColor: variantNotification[variant].color, mt: "4px", p: "4px", borderRadius: "5px" }, props, { children: jsxs(Box$1, __assign$1({ display: "flex", alignItems: "center", pb: "2px" }, { children: [jsx(Box$1, __assign$1({ sx: { pl: '12px', pr: '16px', display: 'flex' } }, { children: jsx(Icon, { icon: variantNotification[variant].icon, color: variantNotification[variant].color }) })), jsxs(Box$1, { children: [jsx(Box$1, { children: jsx(Text, __assign$1({ align: "left", variant: "body1Bold", color: variantNotification[variant].color, display: "inline-block" }, { children: title })) }), text && (jsx(Box$1, { children: jsx(Text, __assign$1({ align: "left", variant: "body1Regular", color: "greyDark", display: "inline-block" }, { children: text })) }))] })] })) })));
|
|
52360
|
+
};
|
|
52361
|
+
|
|
52318
52362
|
/******************************************************************************
|
|
52319
52363
|
Copyright (c) Microsoft Corporation.
|
|
52320
52364
|
|
|
@@ -53230,5 +53274,5 @@ var DesignSystemProvider = function (_a) {
|
|
|
53230
53274
|
return (jsx(DesignSystemContext.Provider, __assign$1({ value: { isDarkTheme: isDarkTheme, themeName: themeName, toggleDarkTheme: toggleDarkTheme } }, { children: jsx(MaterialThemeProvider, { children: children }) })));
|
|
53231
53275
|
};
|
|
53232
53276
|
|
|
53233
|
-
export { Accordion, Button, Checkbox, Chip, DesignSystemContext, DesignSystemProvider, Icon as IconProvider, Link, Pagination, Text, TextField };
|
|
53277
|
+
export { Accordion, Button, Checkbox, Chip, DesignSystemContext, DesignSystemProvider, EmbeddedNotification, Icon as IconProvider, Link, Pagination, Text, TextField };
|
|
53234
53278
|
//# sourceMappingURL=index.js.map
|