@xfers/design-system 4.1.1-dev.461f5db012 → 4.1.1-dev.e9da41c35f

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.
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var react_1 = require("react");
8
+ var alert_1 = require("antd/es/alert");
9
+ require("antd/es/alert/style/css");
10
+ var styled_1 = require("@emotion/styled");
11
+ var ThemeContext_1 = require("src/theme/ThemeContext");
12
+ var icons_1 = require("src/icons");
13
+ var CustomAlert = function (_a) {
14
+ var type = _a.type, message = _a.message, closable = _a.closable, icon = _a.icon, showIcon = _a.showIcon, onClose = _a.onClose;
15
+ var brand = (0, ThemeContext_1.useTheme)().brand;
16
+ var StyledAlert = (0, styled_1.default)(alert_1.default)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n "], ["\n\n "])));
17
+ var getIcon = function () {
18
+ var iconElement = icon ?
19
+ react_1.default.cloneElement(icon, { width: 24, height: 24 }) :
20
+ react_1.default.createElement(icons_1.Bell, { width: 24, height: 24 });
21
+ return iconElement;
22
+ };
23
+ return (react_1.default.createElement(StyledAlert, { type: type, message: message, closable: closable, icon: getIcon(), showIcon: showIcon, onClose: onClose }));
24
+ };
25
+ exports.default = CustomAlert;
26
+ var templateObject_1;
27
+ //# sourceMappingURL=Alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":";;;;;;AAAA,+BAAyB;AACzB,uCAAiC;AACjC,mCAAgC;AAChC,0CAAoC;AACpC,uDAAiD;AAEjD,mCAAgC;AAEhC,IAAM,WAAW,GAAG,UAAC,EAAsE;QAApE,IAAI,UAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAA,EAAE,OAAO,aAAA;IAC3D,IAAA,KAAK,GAAK,IAAA,uBAAQ,GAAE,MAAf,CAAe;IAC5B,IAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,eAAK,CAAC,6EAAA,UAEhC,IAAA,CAAA;IACD,IAAM,OAAO,GAAG;QACZ,IAAM,WAAW,GAAG,IAAI,CAAC,CAAC;YACtB,eAAK,CAAC,YAAY,CAAC,IAA0B,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC3E,8BAAC,YAAI,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,CAAA;QAEnC,OAAO,WAAW,CAAA;IACtB,CAAC,CAAA;IAED,OAAO,CACH,8BAAC,WAAW,IACR,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,OAAO,EAAE,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GAClB,CACL,CAAA;AACL,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = void 0;
4
+ var Alert_1 = require("./Alert");
5
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return Alert_1.default; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Alert/index.tsx"],"names":[],"mappings":";;;AAAA,iCAAiC;AAAxB,gGAAA,OAAO,OAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Alert/styles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Alert/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import 'antd/es/alert/style/css';
3
+ import { CustomAlertProps } from './types';
4
+ declare const CustomAlert: ({ type, message, closable, icon, showIcon, onClose }: CustomAlertProps) => JSX.Element;
5
+ export default CustomAlert;
@@ -0,0 +1 @@
1
+ export { default } from './Alert';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { AlertProps } from 'antd/es/alert';
2
+ export type CustomAlertProps = Pick<AlertProps, 'type' | 'message' | 'closable' | 'icon' | 'showIcon' | 'onClose'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfers/design-system",
3
- "version": "4.1.1-dev.461f5db012",
3
+ "version": "4.1.1-dev.e9da41c35f",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "xfers",