wini-web-components 2.2.8 → 2.3.2
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/component/button/button.d.ts +16 -16
- package/dist/component/button/button.js +39 -39
- package/dist/component/calendar/calendar.d.ts +30 -46
- package/dist/component/calendar/calendar.js +437 -432
- package/dist/component/checkbox/checkbox.d.ts +24 -22
- package/dist/component/checkbox/checkbox.js +120 -81
- package/dist/component/component-status.d.ts +8 -8
- package/dist/component/component-status.js +39 -39
- package/dist/component/date-picker/date-picker.d.ts +25 -36
- package/dist/component/date-picker/date-picker.js +362 -359
- package/dist/component/dialog/dialog.d.ts +36 -34
- package/dist/component/dialog/dialog.js +99 -97
- package/dist/component/import-file/import-file.d.ts +24 -36
- package/dist/component/import-file/import-file.js +154 -119
- package/dist/component/infinite-scroll/infinite-scroll.d.ts +17 -17
- package/dist/component/infinite-scroll/infinite-scroll.js +103 -103
- package/dist/component/input-multi-select/input-multi-select.d.ts +21 -38
- package/dist/component/input-multi-select/input-multi-select.js +334 -323
- package/dist/component/input-opt/input-opt.d.ts +21 -21
- package/dist/component/input-opt/input-opt.js +157 -147
- package/dist/component/number-picker/number-picker.d.ts +19 -19
- package/dist/component/number-picker/number-picker.js +137 -127
- package/dist/component/pagination/pagination.d.ts +13 -13
- package/dist/component/pagination/pagination.js +93 -82
- package/dist/component/popup/popup.d.ts +33 -33
- package/dist/component/popup/popup.js +138 -105
- package/dist/component/progress-bar/progress-bar.d.ts +16 -16
- package/dist/component/progress-bar/progress-bar.js +35 -36
- package/dist/component/progress-circle/progress-circle.d.ts +14 -14
- package/dist/component/progress-circle/progress-circle.js +30 -31
- package/dist/component/radio-button/radio-button.d.ts +20 -20
- package/dist/component/radio-button/radio-button.js +64 -64
- package/dist/component/rating/rating.d.ts +23 -23
- package/dist/component/rating/rating.js +73 -74
- package/dist/component/select1/select1.d.ts +31 -50
- package/dist/component/select1/select1.js +320 -309
- package/dist/component/slider/slider.d.ts +31 -31
- package/dist/component/slider/slider.js +80 -81
- package/dist/component/switch/switch.d.ts +23 -23
- package/dist/component/switch/switch.js +80 -81
- package/dist/component/table/table.d.ts +51 -51
- package/dist/component/table/table.js +119 -119
- package/dist/component/tag/tag.d.ts +17 -17
- package/dist/component/tag/tag.js +39 -39
- package/dist/component/text/text.d.ts +16 -16
- package/dist/component/text/text.js +51 -51
- package/dist/component/text-area/text-area.d.ts +28 -28
- package/dist/component/text-area/text-area.js +83 -73
- package/dist/component/text-field/text-field.d.ts +33 -33
- package/dist/component/text-field/text-field.js +107 -97
- package/dist/component/toast-noti/toast-noti.d.ts +5 -5
- package/dist/component/toast-noti/toast-noti.js +28 -28
- package/dist/component/wini-icon/winicon.d.ts +16 -16
- package/dist/component/wini-icon/winicon.js +121 -112
- package/dist/form/login/view.d.ts +40 -40
- package/dist/form/login/view.js +66 -65
- package/dist/i18n.d.ts +2 -0
- package/dist/i18n.js +125 -0
- package/dist/index.d.ts +32 -31
- package/dist/index.js +1 -1
- package/dist/language/i18n.d.ts +2 -0
- package/dist/language/i18n.js +125 -0
- package/package.json +5 -3
|
@@ -1,105 +1,138 @@
|
|
|
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
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var _this = this;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
35
|
+
}) : (function(o, m, k, k2) {
|
|
36
|
+
if (k2 === undefined) k2 = k;
|
|
37
|
+
o[k2] = m[k];
|
|
38
|
+
}));
|
|
39
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
+
}) : function(o, v) {
|
|
42
|
+
o["default"] = v;
|
|
43
|
+
});
|
|
44
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
45
|
+
var ownKeys = function(o) {
|
|
46
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
49
|
+
return ar;
|
|
50
|
+
};
|
|
51
|
+
return ownKeys(o);
|
|
52
|
+
};
|
|
53
|
+
return function (mod) {
|
|
54
|
+
if (mod && mod.__esModule) return mod;
|
|
55
|
+
var result = {};
|
|
56
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
57
|
+
__setModuleDefault(result, mod);
|
|
58
|
+
return result;
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
exports.Popup = exports.closePopup = exports.showPopup = void 0;
|
|
66
|
+
var react_1 = __importStar(require("react"));
|
|
67
|
+
var react_dom_1 = __importDefault(require("react-dom"));
|
|
68
|
+
require("./popup.css");
|
|
69
|
+
var showPopup = function (props) {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
(_b = (_a = props.ref) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.onOpen({
|
|
72
|
+
heading: props.heading,
|
|
73
|
+
content: props.content,
|
|
74
|
+
body: props.body,
|
|
75
|
+
footer: props.footer,
|
|
76
|
+
clickOverlayClosePopup: props.clickOverlayClosePopup,
|
|
77
|
+
style: props.style,
|
|
78
|
+
hideButtonClose: props.hideButtonClose
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
exports.showPopup = showPopup;
|
|
82
|
+
var closePopup = function (ref) {
|
|
83
|
+
ref.current.onClose();
|
|
84
|
+
};
|
|
85
|
+
exports.closePopup = closePopup;
|
|
86
|
+
var Popup = /** @class */ (function (_super) {
|
|
87
|
+
__extends(Popup, _super);
|
|
88
|
+
function Popup(props) {
|
|
89
|
+
var _this = _super.call(this, props) || this;
|
|
90
|
+
_this.ref = (0, react_1.createRef)();
|
|
91
|
+
_this.state = {
|
|
92
|
+
open: false,
|
|
93
|
+
};
|
|
94
|
+
return _this;
|
|
95
|
+
}
|
|
96
|
+
Popup.prototype.onOpen = function (data) {
|
|
97
|
+
this.setState(__assign({ open: true }, data));
|
|
98
|
+
};
|
|
99
|
+
Popup.prototype.onClose = function () {
|
|
100
|
+
this.setState({ open: false });
|
|
101
|
+
};
|
|
102
|
+
Popup.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
103
|
+
var _a;
|
|
104
|
+
if (prevState.open !== this.state.open && this.state.open && this.state.style) {
|
|
105
|
+
var thisPopupRect = (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
106
|
+
if (thisPopupRect) {
|
|
107
|
+
var style = void 0;
|
|
108
|
+
if (thisPopupRect.right > document.body.offsetWidth) {
|
|
109
|
+
style = __assign(__assign({}, this.state.style), { right: '0.4rem' });
|
|
110
|
+
delete style.left;
|
|
111
|
+
}
|
|
112
|
+
if (thisPopupRect.bottom > document.body.offsetHeight) {
|
|
113
|
+
style = style ? __assign(__assign({}, style), { bottom: '0.4rem' }) : __assign(__assign({}, this.state.style), { bottom: '0.4rem' });
|
|
114
|
+
delete style.top;
|
|
115
|
+
}
|
|
116
|
+
if (style)
|
|
117
|
+
this.setState(__assign(__assign({}, this.state), { style: style }));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
Popup.prototype.render = function () {
|
|
122
|
+
var _this = this;
|
|
123
|
+
var _a;
|
|
124
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, this.state.open &&
|
|
125
|
+
react_dom_1.default.createPortal(react_1.default.createElement("div", { className: "popup-overlay ".concat(this.state.clickOverlayClosePopup ? 'hidden-overlay' : ''), onClick: this.state.clickOverlayClosePopup ? function (ev) {
|
|
126
|
+
if (ev.target.classList.contains('popup-overlay'))
|
|
127
|
+
_this.onClose();
|
|
128
|
+
} : undefined }, (_a = this.state.content) !== null && _a !== void 0 ? _a : react_1.default.createElement("div", { ref: this.ref, className: 'popup-container col', onClick: function (e) { return e.stopPropagation(); }, style: this.state.style },
|
|
129
|
+
this.state.heading,
|
|
130
|
+
this.state.body,
|
|
131
|
+
this.state.footer,
|
|
132
|
+
this.state.hideButtonClose ? null : react_1.default.createElement("button", { type: 'button', onClick: function () { return _this.onClose(); }, className: 'popup-close-btn row' },
|
|
133
|
+
react_1.default.createElement("svg", { width: '100%', height: '100%', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', style: { width: '2rem', height: '2rem' } },
|
|
134
|
+
react_1.default.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M16.4223 4.7559C16.7477 4.43047 16.7477 3.90283 16.4223 3.57739C16.0968 3.25195 15.5692 3.25195 15.2438 3.57739L9.99967 8.82147L4.7556 3.57739C4.43016 3.25195 3.90252 3.25195 3.57709 3.57739C3.25165 3.90283 3.25165 4.43047 3.57709 4.7559L8.82116 9.99998L3.57709 15.2441C3.25165 15.5695 3.25165 16.0971 3.57709 16.4226C3.90252 16.748 4.43016 16.748 4.7556 16.4226L9.99967 11.1785L15.2438 16.4226C15.5692 16.748 16.0968 16.748 16.4223 16.4226C16.7477 16.0971 16.7477 15.5695 16.4223 15.2441L11.1782 9.99998L16.4223 4.7559Z', fill: '#00204D', fillOpacity: 0.6 }))))), document.body)));
|
|
135
|
+
};
|
|
136
|
+
return Popup;
|
|
137
|
+
}(react_1.default.Component));
|
|
138
|
+
exports.Popup = Popup;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ComponentStatus } from '../../index';
|
|
4
|
-
export declare function ProgressBar({ id, status, percent, titleText, title, hideTitle, progressBarOnly, fullColor, percentColor, style, progressBarStyle }: {
|
|
5
|
-
id?: string;
|
|
6
|
-
percent: number;
|
|
7
|
-
titleText?: string;
|
|
8
|
-
title?: ReactNode;
|
|
9
|
-
hideTitle: boolean;
|
|
10
|
-
progressBarOnly: boolean;
|
|
11
|
-
fullColor: string;
|
|
12
|
-
percentColor: string;
|
|
13
|
-
style?: CSSProperties;
|
|
14
|
-
status: ComponentStatus;
|
|
15
|
-
progressBarStyle?: CSSProperties;
|
|
16
|
-
}): React.JSX.Element;
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ComponentStatus } from '../../index';
|
|
4
|
+
export declare function ProgressBar({ id, status, percent, titleText, title, hideTitle, progressBarOnly, fullColor, percentColor, style, progressBarStyle }: {
|
|
5
|
+
id?: string;
|
|
6
|
+
percent: number;
|
|
7
|
+
titleText?: string;
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
hideTitle: boolean;
|
|
10
|
+
progressBarOnly: boolean;
|
|
11
|
+
fullColor: string;
|
|
12
|
+
percentColor: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
status: ComponentStatus;
|
|
15
|
+
progressBarStyle?: CSSProperties;
|
|
16
|
+
}): React.JSX.Element;
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ProgressBar =
|
|
18
|
-
var react_1 = require("react");
|
|
19
|
-
var progress_bar_module_css_1 = __importDefault(require("./progress-bar.module.css"));
|
|
20
|
-
var react_2 = __importDefault(require("react"));
|
|
21
|
-
var index_1 = require("../../index");
|
|
22
|
-
function ProgressBar(_a) {
|
|
23
|
-
var id = _a.id, _b = _a.status, status = _b === void 0 ? index_1.ComponentStatus.INFOR : _b, _c = _a.percent, percent = _c === void 0 ? 100 : _c, titleText = _a.titleText, title = _a.title, _d = _a.hideTitle, hideTitle = _d === void 0 ? false : _d, _e = _a.progressBarOnly, progressBarOnly = _e === void 0 ? false : _e, _f = _a.fullColor, fullColor = _f === void 0 ? 'var(--neutral-main-background-color)' : _f, _g = _a.percentColor, percentColor = _g === void 0 ? 'var(--primary-main-color)' : _g, style = _a.style, progressBarStyle = _a.progressBarStyle;
|
|
24
|
-
var _h = (0, react_1.useState)(true), openDetails = _h[0], setOpenDetails = _h[1];
|
|
25
|
-
return react_2.default.createElement("div", { id: id, className: "col ".concat(progress_bar_module_css_1.default["progress-bar-container"]), style: style ? __assign({ padding: progressBarOnly ? '0' : '1.6rem 2.4rem' }, style) : { padding: progressBarOnly ? '0' : '1.6rem 2.4rem' } },
|
|
26
|
-
(hideTitle || progressBarOnly) ? null : (title !== null && title !== void 0 ? title : react_2.default.createElement("div", { className: "row ".concat(progress_bar_module_css_1.default["progress-bar-title"]) },
|
|
27
|
-
react_2.default.createElement("div", { className: "heading-8" }, titleText),
|
|
28
|
-
react_2.default.createElement(index_1.Winicon, { src: openDetails ? "fill/arrows/down-arrow" : "fill/arrows/up-arrow", onClick: function () { setOpenDetails(!openDetails); } }))),
|
|
29
|
-
openDetails ? react_2.default.createElement("div", { className: "row ".concat(progress_bar_module_css_1.default["progress-bar-tile"]) },
|
|
30
|
-
react_2.default.createElement("div", { className: progress_bar_module_css_1.default["progress-bar-value"], style: __assign({ '--percent-color': percentColor, '--full-color': fullColor, '--percent': "".concat(percent, "%") }, (progressBarStyle !== null && progressBarStyle !== void 0 ? progressBarStyle : {})) }),
|
|
31
|
-
progressBarOnly || status === index_1.ComponentStatus.INFOR ? null : react_2.default.createElement("div", { className: "".concat(progress_bar_module_css_1.default["status-icon"]) }, (0, index_1.getStatusIcon)(status)),
|
|
32
|
-
progressBarOnly ? null : react_2.default.createElement("div", { className: 'label-4' },
|
|
33
|
-
percent,
|
|
34
|
-
"/100")) : null);
|
|
35
|
-
}
|
|
36
|
-
exports.ProgressBar = ProgressBar;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ProgressBar = ProgressBar;
|
|
18
|
+
var react_1 = require("react");
|
|
19
|
+
var progress_bar_module_css_1 = __importDefault(require("./progress-bar.module.css"));
|
|
20
|
+
var react_2 = __importDefault(require("react"));
|
|
21
|
+
var index_1 = require("../../index");
|
|
22
|
+
function ProgressBar(_a) {
|
|
23
|
+
var id = _a.id, _b = _a.status, status = _b === void 0 ? index_1.ComponentStatus.INFOR : _b, _c = _a.percent, percent = _c === void 0 ? 100 : _c, titleText = _a.titleText, title = _a.title, _d = _a.hideTitle, hideTitle = _d === void 0 ? false : _d, _e = _a.progressBarOnly, progressBarOnly = _e === void 0 ? false : _e, _f = _a.fullColor, fullColor = _f === void 0 ? 'var(--neutral-main-background-color)' : _f, _g = _a.percentColor, percentColor = _g === void 0 ? 'var(--primary-main-color)' : _g, style = _a.style, progressBarStyle = _a.progressBarStyle;
|
|
24
|
+
var _h = (0, react_1.useState)(true), openDetails = _h[0], setOpenDetails = _h[1];
|
|
25
|
+
return react_2.default.createElement("div", { id: id, className: "col ".concat(progress_bar_module_css_1.default["progress-bar-container"]), style: style ? __assign({ padding: progressBarOnly ? '0' : '1.6rem 2.4rem' }, style) : { padding: progressBarOnly ? '0' : '1.6rem 2.4rem' } },
|
|
26
|
+
(hideTitle || progressBarOnly) ? null : (title !== null && title !== void 0 ? title : react_2.default.createElement("div", { className: "row ".concat(progress_bar_module_css_1.default["progress-bar-title"]) },
|
|
27
|
+
react_2.default.createElement("div", { className: "heading-8" }, titleText),
|
|
28
|
+
react_2.default.createElement(index_1.Winicon, { src: openDetails ? "fill/arrows/down-arrow" : "fill/arrows/up-arrow", onClick: function () { setOpenDetails(!openDetails); } }))),
|
|
29
|
+
openDetails ? react_2.default.createElement("div", { className: "row ".concat(progress_bar_module_css_1.default["progress-bar-tile"]) },
|
|
30
|
+
react_2.default.createElement("div", { className: progress_bar_module_css_1.default["progress-bar-value"], style: __assign({ '--percent-color': percentColor, '--full-color': fullColor, '--percent': "".concat(percent, "%") }, (progressBarStyle !== null && progressBarStyle !== void 0 ? progressBarStyle : {})) }),
|
|
31
|
+
progressBarOnly || status === index_1.ComponentStatus.INFOR ? null : react_2.default.createElement("div", { className: "".concat(progress_bar_module_css_1.default["status-icon"]) }, (0, index_1.getStatusIcon)(status)),
|
|
32
|
+
progressBarOnly ? null : react_2.default.createElement("div", { className: 'label-4' },
|
|
33
|
+
percent,
|
|
34
|
+
"/100")) : null);
|
|
35
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import './progress-circle.css';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export declare function ProgressCircle(props: {
|
|
5
|
-
id?: string;
|
|
6
|
-
/** value: 0 - 100 (%)*/
|
|
7
|
-
percent?: number;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
fillColor?: string;
|
|
10
|
-
percentColor?: string;
|
|
11
|
-
strokeWidth?: number;
|
|
12
|
-
strokeColor?: string;
|
|
13
|
-
textStyle?: CSSProperties;
|
|
14
|
-
}): React.JSX.Element;
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import './progress-circle.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare function ProgressCircle(props: {
|
|
5
|
+
id?: string;
|
|
6
|
+
/** value: 0 - 100 (%)*/
|
|
7
|
+
percent?: number;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
fillColor?: string;
|
|
10
|
+
percentColor?: string;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
strokeColor?: string;
|
|
13
|
+
textStyle?: CSSProperties;
|
|
14
|
+
}): React.JSX.Element;
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ProgressCircle =
|
|
18
|
-
require("./progress-circle.css");
|
|
19
|
-
var react_1 = __importDefault(require("react"));
|
|
20
|
-
function ProgressCircle(props) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22
|
-
var radius = 30 - ((_a = props.strokeWidth) !== null && _a !== void 0 ? _a : 4);
|
|
23
|
-
var diameter = Math.PI * 2 * radius;
|
|
24
|
-
var strokeOffset = (1 - (((_b = props.percent) !== null && _b !== void 0 ? _b : 0) / 100)) * diameter;
|
|
25
|
-
return react_1.default.createElement("svg", { id: props.id, width: "100%", height: "100%", viewBox: "0 0 60 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: __assign({ width: '6rem', height: '6rem' }, ((_c = props.style) !== null && _c !== void 0 ? _c : {})) },
|
|
26
|
-
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: "none", stroke: (_d = props.strokeColor) !== null && _d !== void 0 ? _d : "var(--neutral-main-background-color)", strokeWidth: (_e = props.strokeWidth) !== null && _e !== void 0 ? _e : '4px', } }),
|
|
27
|
-
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: (_f = props.fillColor) !== null && _f !== void 0 ? _f : "none", stroke: (_g = props.percentColor) !== null && _g !== void 0 ? _g : "var(--primary-main-color)", strokeWidth: (_h = props.strokeWidth) !== null && _h !== void 0 ? _h : '4px', strokeLinecap: 'round', strokeDasharray: "".concat(diameter, "px ").concat(diameter, "px"), strokeDashoffset: "".concat(strokeOffset, "px") } }),
|
|
28
|
-
react_1.default.createElement("text", { x: "50%", y: "50%", dy: ".3em", textAnchor: "middle", fontSize: "1.6rem", fontWeight: '600', style: __assign({ fill: "var(neutral-text-title-color)" }, ((_j = props.textStyle) !== null && _j !== void 0 ? _j : {})) }, (_k = props.percent) !== null && _k !== void 0 ? _k : 0,
|
|
29
|
-
"%"));
|
|
30
|
-
}
|
|
31
|
-
exports.ProgressCircle = ProgressCircle;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ProgressCircle = ProgressCircle;
|
|
18
|
+
require("./progress-circle.css");
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
function ProgressCircle(props) {
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22
|
+
var radius = 30 - ((_a = props.strokeWidth) !== null && _a !== void 0 ? _a : 4);
|
|
23
|
+
var diameter = Math.PI * 2 * radius;
|
|
24
|
+
var strokeOffset = (1 - (((_b = props.percent) !== null && _b !== void 0 ? _b : 0) / 100)) * diameter;
|
|
25
|
+
return react_1.default.createElement("svg", { id: props.id, width: "100%", height: "100%", viewBox: "0 0 60 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: __assign({ width: '6rem', height: '6rem' }, ((_c = props.style) !== null && _c !== void 0 ? _c : {})) },
|
|
26
|
+
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: "none", stroke: (_d = props.strokeColor) !== null && _d !== void 0 ? _d : "var(--neutral-main-background-color)", strokeWidth: (_e = props.strokeWidth) !== null && _e !== void 0 ? _e : '4px', } }),
|
|
27
|
+
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: (_f = props.fillColor) !== null && _f !== void 0 ? _f : "none", stroke: (_g = props.percentColor) !== null && _g !== void 0 ? _g : "var(--primary-main-color)", strokeWidth: (_h = props.strokeWidth) !== null && _h !== void 0 ? _h : '4px', strokeLinecap: 'round', strokeDasharray: "".concat(diameter, "px ").concat(diameter, "px"), strokeDashoffset: "".concat(strokeOffset, "px") } }),
|
|
28
|
+
react_1.default.createElement("text", { x: "50%", y: "50%", dy: ".3em", textAnchor: "middle", fontSize: "1.6rem", fontWeight: '600', style: __assign({ fill: "var(neutral-text-title-color)" }, ((_j = props.textStyle) !== null && _j !== void 0 ? _j : {})) }, (_k = props.percent) !== null && _k !== void 0 ? _k : 0,
|
|
29
|
+
"%"));
|
|
30
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { UseFormRegister } from 'react-hook-form';
|
|
3
|
-
interface RadioButtonProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
6
|
-
value?: string | number | readonly string[];
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
size?: number | string;
|
|
10
|
-
defaultChecked?: boolean;
|
|
11
|
-
name?: string;
|
|
12
|
-
activeColor?: string;
|
|
13
|
-
offColor?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
register?: UseFormRegister<{}>;
|
|
16
|
-
}
|
|
17
|
-
export declare class RadioButton extends React.Component<RadioButtonProps> {
|
|
18
|
-
render(): React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { UseFormRegister } from 'react-hook-form';
|
|
3
|
+
interface RadioButtonProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
6
|
+
value?: string | number | readonly string[];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
size?: number | string;
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
name?: string;
|
|
12
|
+
activeColor?: string;
|
|
13
|
+
offColor?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
register?: UseFormRegister<{}>;
|
|
16
|
+
}
|
|
17
|
+
export declare class RadioButton extends React.Component<RadioButtonProps> {
|
|
18
|
+
render(): React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -1,64 +1,64 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.RadioButton = void 0;
|
|
33
|
-
var react_1 = __importDefault(require("react"));
|
|
34
|
-
var radio_button_module_css_1 = __importDefault(require("./radio-button.module.css"));
|
|
35
|
-
var RadioButton = /** @class */ (function (_super) {
|
|
36
|
-
__extends(RadioButton, _super);
|
|
37
|
-
function RadioButton() {
|
|
38
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
-
}
|
|
40
|
-
RadioButton.prototype.render = function () {
|
|
41
|
-
var _a, _b, _c;
|
|
42
|
-
var convertStyle = {
|
|
43
|
-
'--off-color': (_a = this.props.offColor) !== null && _a !== void 0 ? _a : 'var(--neutral-bolder-border-color)',
|
|
44
|
-
'--active-color': (_b = this.props.activeColor) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
45
|
-
'--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '20px'
|
|
46
|
-
};
|
|
47
|
-
if (this.props.style) {
|
|
48
|
-
delete this.props.style.width;
|
|
49
|
-
delete this.props.style.minWidth;
|
|
50
|
-
delete this.props.style.maxWidth;
|
|
51
|
-
delete this.props.style.height;
|
|
52
|
-
delete this.props.style.minHeight;
|
|
53
|
-
delete this.props.style.maxHeight;
|
|
54
|
-
convertStyle = __assign(__assign({}, this.props.style), convertStyle);
|
|
55
|
-
}
|
|
56
|
-
return react_1.default.createElement("label", { id: this.props.id, className: "row ".concat(radio_button_module_css_1.default['radio-btn-container'], " ").concat((_c = this.props.className) !== null && _c !== void 0 ? _c : ''), style: convertStyle },
|
|
57
|
-
this.props.register ?
|
|
58
|
-
react_1.default.createElement("input", __assign({}, this.props.register, { type: "radio", value: this.props.value, disabled: this.props.disabled })) :
|
|
59
|
-
react_1.default.createElement("input", { type: "radio", name: this.props.name, value: this.props.value, defaultChecked: this.props.defaultChecked, disabled: this.props.disabled, onChange: this.props.onChange }),
|
|
60
|
-
react_1.default.createElement("span", { className: radio_button_module_css_1.default['checkmark'] }));
|
|
61
|
-
};
|
|
62
|
-
return RadioButton;
|
|
63
|
-
}(react_1.default.Component));
|
|
64
|
-
exports.RadioButton = RadioButton;
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.RadioButton = void 0;
|
|
33
|
+
var react_1 = __importDefault(require("react"));
|
|
34
|
+
var radio_button_module_css_1 = __importDefault(require("./radio-button.module.css"));
|
|
35
|
+
var RadioButton = /** @class */ (function (_super) {
|
|
36
|
+
__extends(RadioButton, _super);
|
|
37
|
+
function RadioButton() {
|
|
38
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
+
}
|
|
40
|
+
RadioButton.prototype.render = function () {
|
|
41
|
+
var _a, _b, _c;
|
|
42
|
+
var convertStyle = {
|
|
43
|
+
'--off-color': (_a = this.props.offColor) !== null && _a !== void 0 ? _a : 'var(--neutral-bolder-border-color)',
|
|
44
|
+
'--active-color': (_b = this.props.activeColor) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
45
|
+
'--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '20px'
|
|
46
|
+
};
|
|
47
|
+
if (this.props.style) {
|
|
48
|
+
delete this.props.style.width;
|
|
49
|
+
delete this.props.style.minWidth;
|
|
50
|
+
delete this.props.style.maxWidth;
|
|
51
|
+
delete this.props.style.height;
|
|
52
|
+
delete this.props.style.minHeight;
|
|
53
|
+
delete this.props.style.maxHeight;
|
|
54
|
+
convertStyle = __assign(__assign({}, this.props.style), convertStyle);
|
|
55
|
+
}
|
|
56
|
+
return react_1.default.createElement("label", { id: this.props.id, className: "row ".concat(radio_button_module_css_1.default['radio-btn-container'], " ").concat((_c = this.props.className) !== null && _c !== void 0 ? _c : ''), style: convertStyle },
|
|
57
|
+
this.props.register ?
|
|
58
|
+
react_1.default.createElement("input", __assign({}, this.props.register, { type: "radio", value: this.props.value, disabled: this.props.disabled })) :
|
|
59
|
+
react_1.default.createElement("input", { type: "radio", name: this.props.name, value: this.props.value, defaultChecked: this.props.defaultChecked, disabled: this.props.disabled, onChange: this.props.onChange }),
|
|
60
|
+
react_1.default.createElement("span", { className: radio_button_module_css_1.default['checkmark'] }));
|
|
61
|
+
};
|
|
62
|
+
return RadioButton;
|
|
63
|
+
}(react_1.default.Component));
|
|
64
|
+
exports.RadioButton = RadioButton;
|