react-restyle-components 0.1.7 → 0.1.8

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.
@@ -1,8 +1,10 @@
1
+ import { ToastContainer } from "react-toastify";
2
+ import Toast from "@/library/modules/toast";
1
3
  import * as Buttons from './Atoms/buttons';
2
4
  import * as Form from './Atoms/form';
3
5
  import * as Svg from './Atoms/svg';
4
6
  import * as Icons from './Atoms/icons';
5
- export { Buttons, Form, Svg, Icons };
7
+ export { ToastContainer, Toast, Buttons, Form, Svg, Icons };
6
8
  export * from './Atoms/carousel';
7
9
  export * from './Atoms/grid';
8
10
  export * from './Atoms/header';
@@ -21,8 +21,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
21
21
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
22
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
23
  };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
24
27
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Icons = exports.Svg = exports.Form = exports.Buttons = void 0;
28
+ exports.Icons = exports.Svg = exports.Form = exports.Buttons = exports.Toast = exports.ToastContainer = void 0;
29
+ const react_toastify_1 = require("react-toastify");
30
+ Object.defineProperty(exports, "ToastContainer", { enumerable: true, get: function () { return react_toastify_1.ToastContainer; } });
31
+ const toast_1 = __importDefault(require("@/library/modules/toast"));
32
+ exports.Toast = toast_1.default;
26
33
  const Buttons = __importStar(require("./Atoms/buttons"));
27
34
  exports.Buttons = Buttons;
28
35
  const Form = __importStar(require("./Atoms/form"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/library/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA0C;AAIjC,0BAAO;AAHhB,mDAAoC;AAGnB,oBAAI;AAFrB,iDAAkC;AAEZ,kBAAG;AADzB,qDAAsC;AACZ,sBAAK;AAC/B,mDAAiC;AACjC,+CAA4B;AAC5B,iDAA+B;AAC/B,gDAA6B;AAC7B,+CAA4B;AAC5B,iDAA8B;AAC9B,iDAA8B;AAC9B,kDAA+B;AAI/B,2DAAwC;AACxC,gEAA6C;AAC7C,+EAA4D;AAC5D,4EAAyD;AACzD,2EAAwD;AACxD,6FAA0E;AAC1E,6EAA0D;AAC1D,+FAA4E;AAC5E,kEAA+C;AAC/C,uEAAoD;AACpD,+DAA4C;AAE5C,mCAAmC;AACnC,qEAAkD;AAClD,wEAAqD;AACrD,qEAAkD;AAClD,oEAAiD;AACjD,oEAAiD;AACjD,yDAAsC;AACtC,6DAA0C;AAC1C,oDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/library/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAiD;AAOzC,+FAPC,+BAAc,OAOD;AANtB,oEAA2C;AAMpB,gBANhB,eAAK,CAMgB;AAL5B,yDAA0C;AAKb,0BAAO;AAJpC,mDAAoC;AAIC,oBAAI;AAHzC,iDAAkC;AAGQ,kBAAG;AAF7C,qDAAsC;AAEQ,sBAAK;AACnD,mDAAiC;AACjC,+CAA4B;AAC5B,iDAA+B;AAC/B,gDAA6B;AAC7B,+CAA4B;AAC5B,iDAA8B;AAC9B,iDAA8B;AAC9B,kDAA+B;AAI/B,2DAAwC;AACxC,gEAA6C;AAC7C,+EAA4D;AAC5D,4EAAyD;AACzD,2EAAwD;AACxD,6FAA0E;AAC1E,6EAA0D;AAC1D,+FAA4E;AAC5E,kEAA+C;AAC/C,uEAAoD;AACpD,+DAA4C;AAE5C,mCAAmC;AACnC,qEAAkD;AAClD,wEAAqD;AACrD,qEAAkD;AAClD,oEAAiD;AACjD,oEAAiD;AACjD,yDAAsC;AACtC,6DAA0C;AAC1C,oDAAiC"}
@@ -0,0 +1,2 @@
1
+ import Toast from './module';
2
+ export default Toast;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const module_1 = __importDefault(require("./module"));
7
+ exports.default = module_1.default;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/library/modules/toast/index.ts"],"names":[],"mappings":";;;;;AAAA,sDAA6B;AAE7B,kBAAe,gBAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare class Toast {
2
+ success: (details: any) => Promise<void>;
3
+ error: (details: any) => Promise<void>;
4
+ warning: (details: any) => Promise<void>;
5
+ }
6
+ declare const _default: Toast;
7
+ export default _default;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const react_toastify_1 = require("react-toastify");
13
+ class Toast {
14
+ constructor() {
15
+ this.success = (details) => __awaiter(this, void 0, void 0, function* () {
16
+ react_toastify_1.toast.success(details.message, {
17
+ position: "bottom-right",
18
+ autoClose: details.timer || 10000,
19
+ hideProgressBar: false,
20
+ closeOnClick: true,
21
+ pauseOnHover: true,
22
+ draggable: true,
23
+ progress: undefined,
24
+ });
25
+ });
26
+ this.error = (details) => __awaiter(this, void 0, void 0, function* () {
27
+ react_toastify_1.toast.error(details.message, {
28
+ position: "bottom-right",
29
+ autoClose: details.timer || 10000,
30
+ hideProgressBar: false,
31
+ closeOnClick: true,
32
+ pauseOnHover: true,
33
+ draggable: true,
34
+ progress: undefined,
35
+ });
36
+ });
37
+ this.warning = (details) => __awaiter(this, void 0, void 0, function* () {
38
+ react_toastify_1.toast.warning(details.message, {
39
+ position: "bottom-right",
40
+ autoClose: details.timer || 10000,
41
+ hideProgressBar: false,
42
+ closeOnClick: true,
43
+ pauseOnHover: true,
44
+ draggable: true,
45
+ progress: undefined,
46
+ });
47
+ });
48
+ }
49
+ }
50
+ exports.default = new Toast();
51
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/library/modules/toast/module.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAAsC;AACtC,MAAM,KAAK;IAAX;QACE,YAAO,GAAG,CAAO,OAAY,EAAE,EAAE;YAC/B,sBAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC7B,QAAQ,EAAE,cAAc;gBACxB,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;gBACjC,eAAe,EAAE,KAAK;gBACtB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;QACD,UAAK,GAAG,CAAO,OAAY,EAAE,EAAE;YAC7B,sBAAK,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC3B,QAAQ,EAAE,cAAc;gBACxB,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;gBACjC,eAAe,EAAE,KAAK;gBACtB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;QACD,YAAO,GAAG,CAAO,OAAY,EAAE,EAAE;YAC/B,sBAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC7B,QAAQ,EAAE,cAAc;gBACxB,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;gBACjC,eAAe,EAAE,KAAK;gBACtB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;IACH,CAAC;CAAA;AACD,kBAAe,IAAI,KAAK,EAAE,CAAA"}
@@ -1,8 +1,10 @@
1
+ import { ToastContainer } from "react-toastify";
2
+ import Toast from "@/library/modules/toast";
1
3
  import * as Buttons from './Atoms/buttons';
2
4
  import * as Form from './Atoms/form';
3
5
  import * as Svg from './Atoms/svg';
4
6
  import * as Icons from './Atoms/icons';
5
- export { Buttons, Form, Svg, Icons };
7
+ export { ToastContainer, Toast, Buttons, Form, Svg, Icons };
6
8
  export * from './Atoms/carousel';
7
9
  export * from './Atoms/grid';
8
10
  export * from './Atoms/header';
@@ -1,8 +1,10 @@
1
+ import { ToastContainer, } from "react-toastify";
2
+ import Toast from "@/library/modules/toast";
1
3
  import * as Buttons from './Atoms/buttons';
2
4
  import * as Form from './Atoms/form';
3
5
  import * as Svg from './Atoms/svg';
4
6
  import * as Icons from './Atoms/icons';
5
- export { Buttons, Form, Svg, Icons };
7
+ export { ToastContainer, Toast, Buttons, Form, Svg, Icons };
6
8
  export * from './Atoms/carousel';
7
9
  export * from './Atoms/grid';
8
10
  export * from './Atoms/header';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/library/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AACpC,OAAO,KAAK,GAAG,MAA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C,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,GAAG,EAAC,KAAK,EAAC,CAAA;AACpD,cAAe,kBAAkB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAe,gBAAgB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAI/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,8CAA8C,CAAA;AAC5D,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,4DAA4D,CAAA;AAC1E,cAAc,4CAA4C,CAAA;AAC1D,cAAc,8DAA8D,CAAA;AAC5E,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sCAAsC,CAAA;AACpD,cAAc,8BAA8B,CAAA;AAE5C,mCAAmC;AACnC,cAAc,oCAAoC,CAAA;AAClD,cAAc,uCAAuC,CAAA;AACrD,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import Toast from './module';
2
+ export default Toast;
@@ -0,0 +1,3 @@
1
+ import Toast from './module';
2
+ export default Toast;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/library/modules/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,eAAe,KAAK,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare class Toast {
2
+ success: (details: any) => Promise<void>;
3
+ error: (details: any) => Promise<void>;
4
+ warning: (details: any) => Promise<void>;
5
+ }
6
+ declare const _default: Toast;
7
+ export default _default;
@@ -0,0 +1,49 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { toast } from "react-toastify";
11
+ class Toast {
12
+ constructor() {
13
+ this.success = (details) => __awaiter(this, void 0, void 0, function* () {
14
+ toast.success(details.message, {
15
+ position: "bottom-right",
16
+ autoClose: details.timer || 10000,
17
+ hideProgressBar: false,
18
+ closeOnClick: true,
19
+ pauseOnHover: true,
20
+ draggable: true,
21
+ progress: undefined,
22
+ });
23
+ });
24
+ this.error = (details) => __awaiter(this, void 0, void 0, function* () {
25
+ toast.error(details.message, {
26
+ position: "bottom-right",
27
+ autoClose: details.timer || 10000,
28
+ hideProgressBar: false,
29
+ closeOnClick: true,
30
+ pauseOnHover: true,
31
+ draggable: true,
32
+ progress: undefined,
33
+ });
34
+ });
35
+ this.warning = (details) => __awaiter(this, void 0, void 0, function* () {
36
+ toast.warning(details.message, {
37
+ position: "bottom-right",
38
+ autoClose: details.timer || 10000,
39
+ hideProgressBar: false,
40
+ closeOnClick: true,
41
+ pauseOnHover: true,
42
+ draggable: true,
43
+ progress: undefined,
44
+ });
45
+ });
46
+ }
47
+ }
48
+ export default new Toast();
49
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../src/library/modules/toast/module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,MAAM,KAAK;IAAX;QACE,YAAO,GAAG,CAAO,OAAY,EAAE,EAAE;YAC/B,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC7B,QAAQ,EAAE,cAAc;gBACxB,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;gBACjC,eAAe,EAAE,KAAK;gBACtB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;QACD,UAAK,GAAG,CAAO,OAAY,EAAE,EAAE;YAC7B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC3B,QAAQ,EAAE,cAAc;gBACxB,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;gBACjC,eAAe,EAAE,KAAK;gBACtB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;QACD,YAAO,GAAG,CAAO,OAAY,EAAE,EAAE;YAC/B,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC7B,QAAQ,EAAE,cAAc;gBACxB,SAAS,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK;gBACjC,eAAe,EAAE,KAAK;gBACtB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,SAAS;aACpB,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;IACH,CAAC;CAAA;AACD,eAAe,IAAI,KAAK,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "types": "lib/index.d.ts",
@@ -38,7 +38,8 @@
38
38
  "classnames": "^2.2.6",
39
39
  "lodash": "^4.17.21",
40
40
  "react-hook-form": "^7.12.0",
41
- "react-timekeeper": "^2.1.3"
41
+ "react-timekeeper": "^2.1.3",
42
+ "react-toastify": "^7.0.4"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@types/node": "^15.6.1",