wini-web-components 2.5.9 → 2.6.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.
Files changed (34) hide show
  1. package/dist/component/button/button.js +9 -29
  2. package/dist/component/calendar/calendar.js +140 -173
  3. package/dist/component/checkbox/checkbox.js +26 -56
  4. package/dist/component/ck-editor/ckeditor.js +18 -29
  5. package/dist/component/component-status.js +6 -6
  6. package/dist/component/date-picker/date-picker.js +141 -174
  7. package/dist/component/dialog/dialog.js +37 -67
  8. package/dist/component/import-file/import-file.js +67 -106
  9. package/dist/component/infinite-scroll/infinite-scroll.js +17 -83
  10. package/dist/component/input-multi-select/input-multi-select.js +102 -178
  11. package/dist/component/input-otp/input-otp.js +29 -69
  12. package/dist/component/number-picker/number-picker.js +21 -33
  13. package/dist/component/pagination/pagination.js +19 -22
  14. package/dist/component/popup/popup.d.ts +2 -1
  15. package/dist/component/popup/popup.js +44 -70
  16. package/dist/component/progress-bar/progress-bar.js +12 -24
  17. package/dist/component/progress-circle/progress-circle.js +8 -19
  18. package/dist/component/radio-button/radio-button.js +11 -42
  19. package/dist/component/rating/rating.js +29 -48
  20. package/dist/component/select1/select1.js +91 -160
  21. package/dist/component/slider/slider.js +36 -54
  22. package/dist/component/switch/switch.js +22 -52
  23. package/dist/component/table/table.js +36 -89
  24. package/dist/component/tag/tag.js +8 -28
  25. package/dist/component/text/text.js +9 -40
  26. package/dist/component/text-area/text-area.js +12 -41
  27. package/dist/component/text-field/text-field.js +17 -47
  28. package/dist/component/toast-noti/toast-noti.js +7 -10
  29. package/dist/component/wini-icon/winicon.js +55 -113
  30. package/dist/form/login/view.js +28 -28
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.LICENSE.txt +1 -11
  33. package/dist/language/i18n.js +4 -4
  34. package/package.json +1 -1
@@ -1,62 +1,33 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
4
  };
31
5
  Object.defineProperty(exports, "__esModule", { value: true });
32
6
  exports.Switch = void 0;
33
- var react_1 = __importDefault(require("react"));
34
- var switch_module_css_1 = __importDefault(require("./switch.module.css"));
35
- var Switch = /** @class */ (function (_super) {
36
- __extends(Switch, _super);
37
- function Switch() {
7
+ const react_1 = __importDefault(require("react"));
8
+ const switch_module_css_1 = __importDefault(require("./switch.module.css"));
9
+ class Switch extends react_1.default.Component {
10
+ constructor() {
38
11
  var _a;
39
- var _this = _super.apply(this, arguments) || this;
40
- _this.state = {
41
- value: (_a = _this.props.value) !== null && _a !== void 0 ? _a : false
12
+ super(...arguments);
13
+ this.state = {
14
+ value: (_a = this.props.value) !== null && _a !== void 0 ? _a : false
42
15
  };
43
- return _this;
44
16
  }
45
- Switch.prototype.componentDidUpdate = function (prevProps) {
17
+ componentDidUpdate(prevProps) {
46
18
  if (prevProps.value !== this.props.value) {
47
19
  this.setState({ value: this.props.value });
48
20
  }
49
- };
50
- Switch.prototype.render = function () {
51
- var _this = this;
21
+ }
22
+ render() {
52
23
  var _a, _b, _c, _d, _e;
53
- var propStyle = {
24
+ const propStyle = {
54
25
  '--off-bg': (_a = this.props.offBackground) !== null && _a !== void 0 ? _a : 'var(--neutral-main-background-color)',
55
26
  '--on-bg': (_b = this.props.onBackground) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
56
27
  '--dot-color': (_c = this.props.dotColor) !== null && _c !== void 0 ? _c : '#ffffff',
57
- '--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '2rem'
28
+ '--size': this.props.size ? (typeof this.props.size === 'number') ? `${this.props.size}px` : this.props.size : '2rem'
58
29
  };
59
- var convertStyle = __assign({ height: (_d = this.props.size) !== null && _d !== void 0 ? _d : '2rem', width: "calc(".concat(this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '2rem', " * 9 / 5)") }, propStyle);
30
+ let convertStyle = Object.assign({ height: (_d = this.props.size) !== null && _d !== void 0 ? _d : '2rem', width: `calc(${this.props.size ? (typeof this.props.size === 'number') ? `${this.props.size}px` : this.props.size : '2rem'} * 9 / 5)` }, propStyle);
60
31
  if (this.props.style) {
61
32
  delete this.props.style.width;
62
33
  delete this.props.style.minWidth;
@@ -64,17 +35,16 @@ var Switch = /** @class */ (function (_super) {
64
35
  delete this.props.style.height;
65
36
  delete this.props.style.minHeight;
66
37
  delete this.props.style.maxHeight;
67
- convertStyle = __assign(__assign({}, this.props.style), convertStyle);
38
+ convertStyle = Object.assign(Object.assign({}, this.props.style), convertStyle);
68
39
  }
69
- return react_1.default.createElement("label", { id: this.props.id, className: "".concat(switch_module_css_1.default['switch-container'], " row ").concat((_e = this.props.className) !== null && _e !== void 0 ? _e : ''), style: convertStyle },
70
- react_1.default.createElement("input", { type: "checkbox", checked: this.state.value, name: this.props.name, disabled: this.props.disabled, onChange: function () {
71
- var newValue = !_this.state.value;
72
- _this.setState({ value: newValue });
73
- if (_this.props.onChange)
74
- _this.props.onChange(newValue);
40
+ return react_1.default.createElement("label", { id: this.props.id, className: `${switch_module_css_1.default['switch-container']} row ${(_e = this.props.className) !== null && _e !== void 0 ? _e : ''}`, style: convertStyle },
41
+ react_1.default.createElement("input", { type: "checkbox", checked: this.state.value, name: this.props.name, disabled: this.props.disabled, onChange: () => {
42
+ const newValue = !this.state.value;
43
+ this.setState({ value: newValue });
44
+ if (this.props.onChange)
45
+ this.props.onChange(newValue);
75
46
  } }),
76
47
  react_1.default.createElement("span", { className: switch_module_css_1.default['slider'] }));
77
- };
78
- return Switch;
79
- }(react_1.default.Component));
48
+ }
49
+ }
80
50
  exports.Switch = Switch;
@@ -1,36 +1,10 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
4
  };
31
5
  Object.defineProperty(exports, "__esModule", { value: true });
32
6
  exports.Table = exports.TbBody = exports.TbHeader = exports.TbRow = exports.TbCell = exports.CellAlignItems = void 0;
33
- var react_1 = __importDefault(require("react"));
7
+ const react_1 = __importDefault(require("react"));
34
8
  require("./table.css");
35
9
  var CellAlignItems;
36
10
  (function (CellAlignItems) {
@@ -38,82 +12,55 @@ var CellAlignItems;
38
12
  CellAlignItems["center"] = "center";
39
13
  CellAlignItems["end"] = "end";
40
14
  })(CellAlignItems || (exports.CellAlignItems = CellAlignItems = {}));
41
- var TbCell = /** @class */ (function (_super) {
42
- __extends(TbCell, _super);
43
- function TbCell() {
44
- return _super !== null && _super.apply(this, arguments) || this;
45
- }
46
- TbCell.prototype.render = function () {
15
+ class TbCell extends react_1.default.Component {
16
+ render() {
47
17
  var _a, _b;
48
- return react_1.default.createElement("td", { id: this.props.id, onClick: this.props.onClick, style: this.props.style, "align-cell": (_a = this.props.align) !== null && _a !== void 0 ? _a : CellAlignItems.start, className: "tb-cell ".concat((_b = this.props.className) !== null && _b !== void 0 ? _b : '', " ").concat(this.props.fixed ? 'tb-cell-fixed' : '') }, this.props.children);
49
- };
50
- return TbCell;
51
- }(react_1.default.Component));
52
- exports.TbCell = TbCell;
53
- var TbRow = /** @class */ (function (_super) {
54
- __extends(TbRow, _super);
55
- function TbRow() {
56
- return _super !== null && _super.apply(this, arguments) || this;
18
+ return react_1.default.createElement("td", { id: this.props.id, onClick: this.props.onClick, style: this.props.style, "align-cell": (_a = this.props.align) !== null && _a !== void 0 ? _a : CellAlignItems.start, className: `tb-cell ${(_b = this.props.className) !== null && _b !== void 0 ? _b : ''} ${this.props.fixed ? 'tb-cell-fixed' : ''}` }, this.props.children);
57
19
  }
58
- TbRow.prototype.render = function () {
59
- var _this = this;
20
+ }
21
+ exports.TbCell = TbCell;
22
+ class TbRow extends react_1.default.Component {
23
+ render() {
60
24
  var _a, _b;
61
- return react_1.default.createElement("tr", { id: this.props.id, style: this.props.style, className: "tb-row ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ""), onClick: this.props.onClick }, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map(function (e, i) {
25
+ return react_1.default.createElement("tr", { id: this.props.id, style: this.props.style, className: `tb-row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : ""}`, onClick: this.props.onClick }, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map((e, i) => {
62
26
  var _a, _b;
63
- var ox = 0;
64
- if (_this.props.children && i > 0 && i < (_this.props.children.length - 1)) {
65
- ox = "calc(".concat(_this.props.children.slice(0, i).map(function (tb) {
27
+ let ox = 0;
28
+ if (this.props.children && i > 0 && i < (this.props.children.length - 1)) {
29
+ ox = `calc(${this.props.children.slice(0, i).map(tb => {
66
30
  var _a, _b, _c;
67
- var wValue = (_b = (_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.minWidth) !== null && _b !== void 0 ? _b : (_c = tb.props.style) === null || _c === void 0 ? void 0 : _c.width;
68
- return wValue ? typeof wValue === 'number' ? "".concat(wValue, "px") : wValue : '60px';
69
- }).join(" + "), ")");
31
+ const wValue = (_b = (_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.minWidth) !== null && _b !== void 0 ? _b : (_c = tb.props.style) === null || _c === void 0 ? void 0 : _c.width;
32
+ return wValue ? typeof wValue === 'number' ? `${wValue}px` : wValue : '60px';
33
+ }).join(" + ")})`;
70
34
  }
71
- return react_1.default.createElement(TbCell, { id: e.props.id, key: "tb-cell-".concat(i), align: e.props.align, children: e.props.children, fixed: e.props.fixed, onClick: e.props.onClick, style: e.props.fixed ? (_this.props.children && i === _this.props.children.length - 1) ? __assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : __assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
35
+ return react_1.default.createElement(TbCell, { id: e.props.id, key: `tb-cell-${i}`, align: e.props.align, children: e.props.children, fixed: e.props.fixed, onClick: e.props.onClick, style: e.props.fixed ? (this.props.children && i === this.props.children.length - 1) ? Object.assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : Object.assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
72
36
  }));
73
- };
74
- return TbRow;
75
- }(react_1.default.Component));
76
- exports.TbRow = TbRow;
77
- var TbHeader = /** @class */ (function (_super) {
78
- __extends(TbHeader, _super);
79
- function TbHeader() {
80
- return _super !== null && _super.apply(this, arguments) || this;
81
37
  }
82
- TbHeader.prototype.render = function () {
83
- var _this = this;
38
+ }
39
+ exports.TbRow = TbRow;
40
+ class TbHeader extends react_1.default.Component {
41
+ render() {
84
42
  var _a, _b;
85
- return react_1.default.createElement("thead", { style: this.props.style, className: "tb-header ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : "") },
86
- react_1.default.createElement("tr", null, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map(function (e, i) {
43
+ return react_1.default.createElement("thead", { style: this.props.style, className: `tb-header ${(_a = this.props.className) !== null && _a !== void 0 ? _a : ""}` },
44
+ react_1.default.createElement("tr", null, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map((e, i) => {
87
45
  var _a, _b;
88
- var ox = 0;
89
- if (_this.props.children && i > 0 && i < (_this.props.children.length - 1)) {
90
- ox = "calc(".concat(_this.props.children.slice(0, i).map(function (tb) { var _a; return ((_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.width) ? typeof tb.props.style.width === 'number' ? "".concat(tb.props.style.width, "px") : tb.props.style.width : '60px'; }).join(" + "), ")");
46
+ let ox = 0;
47
+ if (this.props.children && i > 0 && i < (this.props.children.length - 1)) {
48
+ ox = `calc(${this.props.children.slice(0, i).map(tb => { var _a; return ((_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.width) ? typeof tb.props.style.width === 'number' ? `${tb.props.style.width}px` : tb.props.style.width : '60px'; }).join(" + ")})`;
91
49
  }
92
- return react_1.default.createElement(TbCell, { id: e.props.id, key: "tb-cell-".concat(i), align: e.props.align, children: e.props.children, onClick: e.props.onClick, fixed: e.props.fixed, style: e.props.fixed ? (_this.props.children && i === _this.props.children.length - 1) ? __assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : __assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
50
+ return react_1.default.createElement(TbCell, { id: e.props.id, key: `tb-cell-${i}`, align: e.props.align, children: e.props.children, onClick: e.props.onClick, fixed: e.props.fixed, style: e.props.fixed ? (this.props.children && i === this.props.children.length - 1) ? Object.assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : Object.assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
93
51
  })));
94
- };
95
- return TbHeader;
96
- }(react_1.default.Component));
97
- exports.TbHeader = TbHeader;
98
- var TbBody = /** @class */ (function (_super) {
99
- __extends(TbBody, _super);
100
- function TbBody() {
101
- return _super !== null && _super.apply(this, arguments) || this;
102
52
  }
103
- TbBody.prototype.render = function () {
53
+ }
54
+ exports.TbHeader = TbHeader;
55
+ class TbBody extends react_1.default.Component {
56
+ render() {
104
57
  return react_1.default.createElement("tbody", { id: this.props.id }, this.props.children);
105
- };
106
- return TbBody;
107
- }(react_1.default.Component));
58
+ }
59
+ }
108
60
  exports.TbBody = TbBody;
109
- var Table = /** @class */ (function (_super) {
110
- __extends(Table, _super);
111
- function Table() {
112
- return _super !== null && _super.apply(this, arguments) || this;
61
+ class Table extends react_1.default.Component {
62
+ render() {
63
+ return react_1.default.createElement("table", { id: this.props.id, className: `custom-table ${this.props.className}`, style: this.props.style }, this.props.children);
113
64
  }
114
- Table.prototype.render = function () {
115
- return react_1.default.createElement("table", { id: this.props.id, className: "custom-table ".concat(this.props.className), style: this.props.style }, this.props.children);
116
- };
117
- return Table;
118
- }(react_1.default.Component));
65
+ }
119
66
  exports.Table = Table;
@@ -1,39 +1,19 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
6
  exports.Tag = void 0;
22
- var react_1 = __importDefault(require("react"));
23
- var text_1 = require("../text/text");
24
- var tag_module_css_1 = __importDefault(require("./tag.module.css"));
25
- var Tag = /** @class */ (function (_super) {
26
- __extends(Tag, _super);
27
- function Tag() {
28
- return _super !== null && _super.apply(this, arguments) || this;
29
- }
30
- Tag.prototype.render = function () {
7
+ const react_1 = __importDefault(require("react"));
8
+ const text_1 = require("../text/text");
9
+ const tag_module_css_1 = __importDefault(require("./tag.module.css"));
10
+ class Tag extends react_1.default.Component {
11
+ render() {
31
12
  var _a, _b;
32
- return react_1.default.createElement("div", { id: this.props.id, "tag-type": (_a = this.props.status) !== null && _a !== void 0 ? _a : 'default', className: "".concat(tag_module_css_1.default['tag-container'], " row ").concat(this.props.onClick ? tag_module_css_1.default['type-button'] : '', " ").concat(this.props.disabled ? tag_module_css_1.default['disabled'] : "", " ").concat((_b = this.props.className) !== null && _b !== void 0 ? _b : "button-text-6", " "), style: this.props.style, onClick: this.props.onClick },
13
+ return react_1.default.createElement("div", { id: this.props.id, "tag-type": (_a = this.props.status) !== null && _a !== void 0 ? _a : 'default', className: `${tag_module_css_1.default['tag-container']} row ${this.props.onClick ? tag_module_css_1.default['type-button'] : ''} ${this.props.disabled ? tag_module_css_1.default['disabled'] : ""} ${(_b = this.props.className) !== null && _b !== void 0 ? _b : "button-text-6"} `, style: this.props.style, onClick: this.props.onClick },
33
14
  this.props.prefix,
34
15
  react_1.default.createElement(text_1.Text, { maxLine: 1, className: tag_module_css_1.default['tag-label'] }, this.props.title),
35
16
  this.props.suffix);
36
- };
37
- return Tag;
38
- }(react_1.default.Component));
17
+ }
18
+ }
39
19
  exports.Tag = Tag;
@@ -1,51 +1,20 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
29
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
4
  };
31
5
  Object.defineProperty(exports, "__esModule", { value: true });
32
6
  exports.Text = void 0;
33
- var react_1 = __importDefault(require("react"));
7
+ const react_1 = __importDefault(require("react"));
34
8
  require("./text.css");
35
- var Text = /** @class */ (function (_super) {
36
- __extends(Text, _super);
37
- function Text() {
38
- return _super !== null && _super.apply(this, arguments) || this;
39
- }
40
- Text.prototype.render = function () {
9
+ class Text extends react_1.default.Component {
10
+ render() {
41
11
  var _a, _b, _c;
42
- var convertStyle = (_a = this.props.style) !== null && _a !== void 0 ? _a : {};
12
+ let convertStyle = (_a = this.props.style) !== null && _a !== void 0 ? _a : {};
43
13
  if (this.props.maxLine) {
44
- convertStyle = __assign(__assign({}, convertStyle), { '--max-line': this.props.maxLine });
14
+ convertStyle = Object.assign(Object.assign({}, convertStyle), { '--max-line': this.props.maxLine });
45
15
  }
46
- return this.props.html ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: this.props.html }, id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className: "comp-text innerhtml ".concat(this.props.onClick ? 'type-button' : '', " ").concat((_b = this.props.className) !== null && _b !== void 0 ? _b : ''), style: convertStyle }) :
47
- react_1.default.createElement("div", { id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className: "comp-text ".concat(this.props.onClick ? 'type-button' : '', " ").concat((_c = this.props.className) !== null && _c !== void 0 ? _c : ''), style: convertStyle }, this.props.children);
48
- };
49
- return Text;
50
- }(react_1.default.Component));
16
+ return this.props.html ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: this.props.html }, id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className: `comp-text innerhtml ${this.props.onClick ? 'type-button' : ''} ${(_b = this.props.className) !== null && _b !== void 0 ? _b : ''}`, style: convertStyle }) :
17
+ react_1.default.createElement("div", { id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className: `comp-text ${this.props.onClick ? 'type-button' : ''} ${(_c = this.props.className) !== null && _c !== void 0 ? _c : ''}`, style: convertStyle }, this.props.children);
18
+ }
19
+ }
51
20
  exports.Text = Text;
@@ -1,30 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
3
  if (k2 === undefined) k2 = k;
30
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -60,24 +34,21 @@ var __importStar = (this && this.__importStar) || (function () {
60
34
  })();
61
35
  Object.defineProperty(exports, "__esModule", { value: true });
62
36
  exports.TextArea = void 0;
63
- var react_1 = __importStar(require("react"));
37
+ const react_1 = __importStar(require("react"));
64
38
  require("./text-area.css");
65
- var TextArea = /** @class */ (function (_super) {
66
- __extends(TextArea, _super);
67
- function TextArea() {
68
- var _this = _super !== null && _super.apply(this, arguments) || this;
69
- _this.containerRef = (0, react_1.createRef)();
70
- _this.getTextarea = function () {
39
+ class TextArea extends react_1.default.Component {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.containerRef = (0, react_1.createRef)();
43
+ this.getTextarea = () => {
71
44
  var _a;
72
- return (_a = _this.containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
45
+ return (_a = this.containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
73
46
  };
74
- return _this;
75
47
  }
76
- TextArea.prototype.render = function () {
48
+ render() {
77
49
  var _a, _b, _c, _d;
78
- return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: "text-area-container row ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3', " ").concat(((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) && 'helper-text'), "helper-text": this.props.helperText, style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } }, this.props.register ?
79
- react_1.default.createElement("textarea", __assign({ name: this.props.name, autoFocus: this.props.autoFocus }, this.props.register, { maxLength: this.props.maxLength, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus })) : react_1.default.createElement("textarea", { autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur }));
80
- };
81
- return TextArea;
82
- }(react_1.default.Component));
50
+ return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: `text-area-container row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3'} ${((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) && 'helper-text'}`, "helper-text": this.props.helperText, style: this.props.style ? Object.assign(Object.assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } }, this.props.register ?
51
+ react_1.default.createElement("textarea", Object.assign({ name: this.props.name, autoFocus: this.props.autoFocus }, this.props.register, { maxLength: this.props.maxLength, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus })) : react_1.default.createElement("textarea", { autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur }));
52
+ }
53
+ }
83
54
  exports.TextArea = TextArea;
@@ -1,30 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
3
  if (k2 === undefined) k2 = k;
30
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -60,40 +34,37 @@ var __importStar = (this && this.__importStar) || (function () {
60
34
  })();
61
35
  Object.defineProperty(exports, "__esModule", { value: true });
62
36
  exports.TextField = void 0;
63
- var react_1 = __importStar(require("react"));
37
+ const react_1 = __importStar(require("react"));
64
38
  require("./text-field.css");
65
- var TextField = /** @class */ (function (_super) {
66
- __extends(TextField, _super);
67
- function TextField() {
68
- var _this = _super !== null && _super.apply(this, arguments) || this;
69
- _this.containerRef = (0, react_1.createRef)();
70
- _this.getInput = function () {
39
+ class TextField extends react_1.default.Component {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.containerRef = (0, react_1.createRef)();
43
+ this.getInput = () => {
71
44
  var _a;
72
- return (_a = _this.containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("input");
45
+ return (_a = this.containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("input");
73
46
  };
74
- return _this;
75
47
  }
76
- TextField.prototype.render = function () {
77
- var _this = this;
48
+ render() {
78
49
  var _a, _b, _c, _d, _e, _f;
79
- return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: "text-field-container row ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3', " ").concat(((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) ? 'helper-text' : ""), "helper-text": this.props.helperText, style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } },
50
+ return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: `text-field-container row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3'} ${((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) ? 'helper-text' : ""}`, "helper-text": this.props.helperText, style: this.props.style ? Object.assign(Object.assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } },
80
51
  this.props.prefix,
81
52
  this.props.register ?
82
- react_1.default.createElement("input", __assign({ name: this.props.name }, this.props.register, { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, type: (_e = this.props.type) !== null && _e !== void 0 ? _e : 'text', placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus, onKeyDown: this.props.onComplete ? function (ev) {
83
- if (_this.props.onComplete) {
53
+ react_1.default.createElement("input", Object.assign({ name: this.props.name }, this.props.register, { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, type: (_e = this.props.type) !== null && _e !== void 0 ? _e : 'text', placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus, onKeyDown: this.props.onComplete ? (ev) => {
54
+ if (this.props.onComplete) {
84
55
  switch (ev.key.toLowerCase()) {
85
56
  case "enter":
86
- _this.props.onComplete(ev);
57
+ this.props.onComplete(ev);
87
58
  break;
88
59
  default:
89
60
  break;
90
61
  }
91
62
  }
92
- } : undefined })) : react_1.default.createElement("input", { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, type: (_f = this.props.type) !== null && _f !== void 0 ? _f : 'text', defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur, onKeyDown: this.props.onComplete ? function (ev) {
93
- if (_this.props.onComplete) {
63
+ } : undefined })) : react_1.default.createElement("input", { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, type: (_f = this.props.type) !== null && _f !== void 0 ? _f : 'text', defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur, onKeyDown: this.props.onComplete ? (ev) => {
64
+ if (this.props.onComplete) {
94
65
  switch (ev.key.toLowerCase()) {
95
66
  case "enter":
96
- _this.props.onComplete(ev);
67
+ this.props.onComplete(ev);
97
68
  break;
98
69
  default:
99
70
  break;
@@ -101,7 +72,6 @@ var TextField = /** @class */ (function (_super) {
101
72
  }
102
73
  } : undefined }),
103
74
  this.props.suffix);
104
- };
105
- return TextField;
106
- }(react_1.default.Component));
75
+ }
76
+ }
107
77
  exports.TextField = TextField;
@@ -1,20 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToastMessage = void 0;
4
- var react_toastify_1 = require("react-toastify");
4
+ const react_toastify_1 = require("react-toastify");
5
5
  require("./toast-noti.css");
6
- var ToastMessage = /** @class */ (function () {
7
- function ToastMessage() {
8
- }
9
- ToastMessage.success = function (message) {
6
+ class ToastMessage {
7
+ static success(message) {
10
8
  react_toastify_1.toast.success(message, {
11
9
  hideProgressBar: true,
12
10
  transition: react_toastify_1.Slide,
13
11
  autoClose: 800,
14
12
  theme: "colored",
15
13
  });
16
- };
17
- ToastMessage.errors = function (message) {
14
+ }
15
+ static errors(message) {
18
16
  react_toastify_1.toast.error(message, {
19
17
  theme: "colored",
20
18
  pauseOnHover: false,
@@ -22,7 +20,6 @@ var ToastMessage = /** @class */ (function () {
22
20
  transition: react_toastify_1.Slide,
23
21
  autoClose: 800,
24
22
  });
25
- };
26
- return ToastMessage;
27
- }());
23
+ }
24
+ }
28
25
  exports.ToastMessage = ToastMessage;