rbro-tat-uds 2.2.2 → 2.2.4
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/build/cjs/assets/icons/face-happy.svg.cjs +39 -0
- package/build/cjs/assets/icons/person-level.svg.cjs +43 -0
- package/build/cjs/components/Button/Button.cjs +2 -0
- package/build/cjs/components/GraficContributieUnitlinked/GraficContributieUnitlinked.cjs +157 -0
- package/build/cjs/components/GraficContributieUnitlinked/index.cjs +12 -0
- package/build/cjs/components/Icon/IconsList.cjs +5 -1
- package/build/cjs/components/IconButton/IconButton.cjs +2 -0
- package/build/cjs/components/PageMessage/PageMessage.cjs +2 -0
- package/build/cjs/components/TextInput/TextInput.cjs +2 -0
- package/build/cjs/components/index.cjs +2 -0
- package/build/cjs/index.cjs +813 -632
- package/build/esm/assets/icons/face-happy.svg.js +18 -0
- package/build/esm/assets/icons/person-level.svg.js +22 -0
- package/build/esm/components/Button/Button.js +2 -0
- package/build/esm/components/GraficContributieUnitlinked/GraficContributieUnitlinked.js +153 -0
- package/build/esm/components/GraficContributieUnitlinked/index.js +8 -0
- package/build/esm/components/Icon/IconsList.js +5 -1
- package/build/esm/components/IconButton/IconButton.js +2 -0
- package/build/esm/components/PageMessage/PageMessage.js +2 -0
- package/build/esm/components/TextInput/TextInput.js +2 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/index.js +813 -633
- package/build/types/components/GraficContributieUnitlinked/GraficContributieUnitlinked.d.ts +16 -0
- package/build/types/components/GraficContributieUnitlinked/index.d.ts +6 -0
- package/build/types/components/Icon/Icon.types.d.ts +1 -1
- package/build/types/components/Icon/IconsList.d.ts +2 -0
- package/build/types/index.d.ts +1 -0
- package/package.json +1 -1
@@ -0,0 +1,39 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var React = require('react');
|
4
|
+
|
5
|
+
function _interopNamespaceDefault(e) {
|
6
|
+
var n = Object.create(null);
|
7
|
+
if (e) {
|
8
|
+
Object.keys(e).forEach(function (k) {
|
9
|
+
if (k !== 'default') {
|
10
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
12
|
+
enumerable: true,
|
13
|
+
get: function () { return e[k]; }
|
14
|
+
});
|
15
|
+
}
|
16
|
+
});
|
17
|
+
}
|
18
|
+
n.default = e;
|
19
|
+
return Object.freeze(n);
|
20
|
+
}
|
21
|
+
|
22
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
23
|
+
|
24
|
+
var _path, _path2;
|
25
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
26
|
+
var SvgFaceHappy = function SvgFaceHappy(props) {
|
27
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
29
|
+
viewBox: "0 0 24 24"
|
30
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
31
|
+
d: "M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M15.5 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M12 16a3.99 3.99 0 0 1-2.961-1.31l-1.48 1.344A5.99 5.99 0 0 0 11.999 18c1.761 0 3.346-.76 4.442-1.966l-1.48-1.345A3.99 3.99 0 0 1 12 16"
|
32
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
33
|
+
fillRule: "evenodd",
|
34
|
+
d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12m10-8a8 8 0 1 0 0 16 8 8 0 0 0 0-16",
|
35
|
+
clipRule: "evenodd"
|
36
|
+
})));
|
37
|
+
};
|
38
|
+
|
39
|
+
module.exports = SvgFaceHappy;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var React = require('react');
|
4
|
+
|
5
|
+
function _interopNamespaceDefault(e) {
|
6
|
+
var n = Object.create(null);
|
7
|
+
if (e) {
|
8
|
+
Object.keys(e).forEach(function (k) {
|
9
|
+
if (k !== 'default') {
|
10
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
12
|
+
enumerable: true,
|
13
|
+
get: function () { return e[k]; }
|
14
|
+
});
|
15
|
+
}
|
16
|
+
});
|
17
|
+
}
|
18
|
+
n.default = e;
|
19
|
+
return Object.freeze(n);
|
20
|
+
}
|
21
|
+
|
22
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
23
|
+
|
24
|
+
var _path, _path2, _path3;
|
25
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
26
|
+
var SvgPersonLevel = function SvgPersonLevel(props) {
|
27
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
29
|
+
viewBox: "0 0 24 24"
|
30
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
31
|
+
fillRule: "evenodd",
|
32
|
+
d: "M4 7a5 5 0 1 1 10 0A5 5 0 0 1 4 7m5-3a3 3 0 1 0 0 6 3 3 0 0 0 0-6",
|
33
|
+
clipRule: "evenodd"
|
34
|
+
})), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
35
|
+
d: "M1 22c0-4.402 3.09-9 8.5-9 1.12 0 2.157.201 3.094.57l-.73 1.86A6.4 6.4 0 0 0 9.5 15C5.473 15 3 18.402 3 22z"
|
36
|
+
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
37
|
+
fillRule: "evenodd",
|
38
|
+
d: "M15 15a1 1 0 0 0-.832.445l-1 1.5a1 1 0 0 0 .125 1.262l4 4a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0 .125-1.262l-1-1.5A1 1 0 0 0 21 15zm.287 2.373.248-.373h4.93l.248.373L18 20.086z",
|
39
|
+
clipRule: "evenodd"
|
40
|
+
})));
|
41
|
+
};
|
42
|
+
|
43
|
+
module.exports = SvgPersonLevel;
|
@@ -147,6 +147,8 @@ require('../../assets/icons/warning-exclamation.svg.cjs');
|
|
147
147
|
require('../../assets/icons/warning-outlined.svg.cjs');
|
148
148
|
require('../../assets/icons/info-outlined.svg.cjs');
|
149
149
|
require('../../assets/icons/hint-outlined.svg.cjs');
|
150
|
+
require('../../assets/icons/face-happy.svg.cjs');
|
151
|
+
require('../../assets/icons/person-level.svg.cjs');
|
150
152
|
var Icon = require('../Icon/Icon.cjs');
|
151
153
|
var Spinner = require('../Spinner/Spinner.cjs');
|
152
154
|
var utils = require('../../utils');
|
@@ -0,0 +1,157 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
7
|
+
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
9
|
+
var utils = require('../../utils');
|
10
|
+
var React = require('react');
|
11
|
+
var styled = require('styled-components');
|
12
|
+
|
13
|
+
const GraficContributieUnitlinkedStyled = styled.svg`
|
14
|
+
& > .limit_label_main {
|
15
|
+
font-size: 14px;
|
16
|
+
font-weight: 400;
|
17
|
+
fill: ${utils.colors.gray_950};
|
18
|
+
}
|
19
|
+
& > .limit_label_secondary {
|
20
|
+
font-size: 16px;
|
21
|
+
font-weight: 700;
|
22
|
+
fill: ${utils.colors.gray_950};
|
23
|
+
}
|
24
|
+
`;
|
25
|
+
const GraficContributieUnitlinked = ({
|
26
|
+
limitTop = 50,
|
27
|
+
limitBottom = 100,
|
28
|
+
limitTopLabel = "Top Label",
|
29
|
+
limitBottomLabel = "Bottom Label",
|
30
|
+
currency = "RON",
|
31
|
+
height = 142,
|
32
|
+
colorBar = utils.colors.danger_100,
|
33
|
+
colorFilledBar = utils.colors.success_400
|
34
|
+
}) => {
|
35
|
+
const RO = new Intl.NumberFormat("RO");
|
36
|
+
const svg_ref = React.useRef(null);
|
37
|
+
const [w, setW] = React.useState(0);
|
38
|
+
const BAR_HEIGHT = 24;
|
39
|
+
const configuration = React.useMemo(() => {
|
40
|
+
const barY = height / 2 - BAR_HEIGHT / 2;
|
41
|
+
const barYStop = barY + BAR_HEIGHT;
|
42
|
+
const limitTopHeight = height - barYStop + BAR_HEIGHT;
|
43
|
+
const limitTopX = Math.min(Math.max(0, limitTop / limitBottom * w), w - 2);
|
44
|
+
const limitTopLabelsAnchor = limitTopX > w * 0.75 ? "end" : "start";
|
45
|
+
const limitBottomX = w - 2;
|
46
|
+
const limitBottomY = barY;
|
47
|
+
const limitBottomHeight = limitTopHeight;
|
48
|
+
return {
|
49
|
+
barY,
|
50
|
+
barYStop,
|
51
|
+
limitTopHeight,
|
52
|
+
limitTopX,
|
53
|
+
limitTopLabelsAnchor,
|
54
|
+
limitBottomY,
|
55
|
+
limitBottomHeight,
|
56
|
+
limitBottomX
|
57
|
+
};
|
58
|
+
}, [limitTop, limitBottom, height, w]);
|
59
|
+
React.useEffect(() => {
|
60
|
+
if (svg_ref.current) {
|
61
|
+
setW(svg_ref.current.clientWidth);
|
62
|
+
}
|
63
|
+
}, [svg_ref]);
|
64
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
65
|
+
GraficContributieUnitlinkedStyled,
|
66
|
+
{
|
67
|
+
ref: svg_ref,
|
68
|
+
width: "100%",
|
69
|
+
height,
|
70
|
+
xmlns: "http://www.w3.org/2000/svg",
|
71
|
+
children: [
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
73
|
+
"rect",
|
74
|
+
{
|
75
|
+
x: 0,
|
76
|
+
y: configuration.barY,
|
77
|
+
width: "100%",
|
78
|
+
height: BAR_HEIGHT,
|
79
|
+
fill: colorBar
|
80
|
+
}
|
81
|
+
),
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
83
|
+
"rect",
|
84
|
+
{
|
85
|
+
x: 0,
|
86
|
+
y: configuration.barY,
|
87
|
+
width: configuration.limitTopX,
|
88
|
+
height: BAR_HEIGHT,
|
89
|
+
fill: colorFilledBar
|
90
|
+
}
|
91
|
+
),
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
93
|
+
"rect",
|
94
|
+
{
|
95
|
+
x: configuration.limitTopX,
|
96
|
+
y: 0,
|
97
|
+
height: configuration.limitTopHeight,
|
98
|
+
fill: "black",
|
99
|
+
width: 2
|
100
|
+
}
|
101
|
+
),
|
102
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
103
|
+
"text",
|
104
|
+
{
|
105
|
+
className: "limit_label_main",
|
106
|
+
textAnchor: configuration.limitTopLabelsAnchor,
|
107
|
+
x: configuration.limitTopX + (configuration.limitTopLabelsAnchor === "start" ? 12 : -12),
|
108
|
+
y: 12,
|
109
|
+
children: limitTopLabel
|
110
|
+
}
|
111
|
+
),
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
113
|
+
"text",
|
114
|
+
{
|
115
|
+
className: "limit_label_secondary",
|
116
|
+
textAnchor: configuration.limitTopLabelsAnchor,
|
117
|
+
x: configuration.limitTopX + (configuration.limitTopLabelsAnchor === "start" ? 12 : -12),
|
118
|
+
y: 12 + 20,
|
119
|
+
children: RO.format(limitTop) + " " + currency
|
120
|
+
}
|
121
|
+
),
|
122
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
123
|
+
"rect",
|
124
|
+
{
|
125
|
+
x: configuration.limitBottomX,
|
126
|
+
y: configuration.limitBottomY,
|
127
|
+
height: configuration.limitBottomHeight,
|
128
|
+
fill: "black",
|
129
|
+
width: 2
|
130
|
+
}
|
131
|
+
),
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
133
|
+
"text",
|
134
|
+
{
|
135
|
+
className: "limit_label_main",
|
136
|
+
textAnchor: "end",
|
137
|
+
x: configuration.limitBottomX - 12,
|
138
|
+
y: height - 20,
|
139
|
+
children: limitBottomLabel
|
140
|
+
}
|
141
|
+
),
|
142
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
143
|
+
"text",
|
144
|
+
{
|
145
|
+
className: "limit_label_secondary",
|
146
|
+
textAnchor: "end",
|
147
|
+
x: configuration.limitBottomX - 12,
|
148
|
+
y: height,
|
149
|
+
children: RO.format(limitBottom) + " " + currency
|
150
|
+
}
|
151
|
+
)
|
152
|
+
]
|
153
|
+
}
|
154
|
+
);
|
155
|
+
};
|
156
|
+
|
157
|
+
exports.default = GraficContributieUnitlinked;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
7
|
+
|
8
|
+
var GraficContributieUnitlinked = require('./GraficContributieUnitlinked.cjs');
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
exports.default = GraficContributieUnitlinked.default;
|
@@ -144,6 +144,8 @@ var WarningExclamationIcon = require('../../assets/icons/warning-exclamation.svg
|
|
144
144
|
var WarningOutlinedIcon = require('../../assets/icons/warning-outlined.svg.cjs');
|
145
145
|
var InfoOutlinedIcon = require('../../assets/icons/info-outlined.svg.cjs');
|
146
146
|
var HintOutlinedIcon = require('../../assets/icons/hint-outlined.svg.cjs');
|
147
|
+
var FaceHappyIcon = require('../../assets/icons/face-happy.svg.cjs');
|
148
|
+
var PersonLevelIcon = require('../../assets/icons/person-level.svg.cjs');
|
147
149
|
|
148
150
|
const IconsList = {
|
149
151
|
asterix: AsterixIcon,
|
@@ -284,7 +286,9 @@ const IconsList = {
|
|
284
286
|
"warning-exclamation": WarningExclamationIcon,
|
285
287
|
"warning-outlined": WarningOutlinedIcon,
|
286
288
|
"info-outlined": InfoOutlinedIcon,
|
287
|
-
"hint-outlined": HintOutlinedIcon
|
289
|
+
"hint-outlined": HintOutlinedIcon,
|
290
|
+
"face-happy": FaceHappyIcon,
|
291
|
+
"person-level": PersonLevelIcon
|
288
292
|
};
|
289
293
|
|
290
294
|
exports.default = IconsList;
|
@@ -146,6 +146,8 @@ require('../../assets/icons/warning-exclamation.svg.cjs');
|
|
146
146
|
require('../../assets/icons/warning-outlined.svg.cjs');
|
147
147
|
require('../../assets/icons/info-outlined.svg.cjs');
|
148
148
|
require('../../assets/icons/hint-outlined.svg.cjs');
|
149
|
+
require('../../assets/icons/face-happy.svg.cjs');
|
150
|
+
require('../../assets/icons/person-level.svg.cjs');
|
149
151
|
var styled = require('styled-components');
|
150
152
|
var Icon = require('../Icon/Icon.cjs');
|
151
153
|
var Spinner = require('../Spinner/Spinner.cjs');
|
@@ -146,6 +146,8 @@ require('../../assets/icons/warning-exclamation.svg.cjs');
|
|
146
146
|
require('../../assets/icons/warning-outlined.svg.cjs');
|
147
147
|
require('../../assets/icons/info-outlined.svg.cjs');
|
148
148
|
require('../../assets/icons/hint-outlined.svg.cjs');
|
149
|
+
require('../../assets/icons/face-happy.svg.cjs');
|
150
|
+
require('../../assets/icons/person-level.svg.cjs');
|
149
151
|
var styled = require('styled-components');
|
150
152
|
var Icon = require('../Icon/Icon.cjs');
|
151
153
|
var utils = require('../../utils');
|
@@ -147,6 +147,8 @@ require('../../assets/icons/warning-exclamation.svg.cjs');
|
|
147
147
|
require('../../assets/icons/warning-outlined.svg.cjs');
|
148
148
|
require('../../assets/icons/info-outlined.svg.cjs');
|
149
149
|
require('../../assets/icons/hint-outlined.svg.cjs');
|
150
|
+
require('../../assets/icons/face-happy.svg.cjs');
|
151
|
+
require('../../assets/icons/person-level.svg.cjs');
|
150
152
|
var reactDom = require('react-dom');
|
151
153
|
var Icon = require('../Icon/Icon.cjs');
|
152
154
|
var Numpad = require('../Numpad/Numpad.cjs');
|
@@ -89,6 +89,7 @@ var UnitlinkGraph = require('./UnitlinkGraph/UnitlinkGraph.cjs');
|
|
89
89
|
var VerticalHeat = require('./VerticalHeat/VerticalHeat.cjs');
|
90
90
|
var Icon = require('./Icon/Icon.cjs');
|
91
91
|
var Spinner = require('./Spinner/Spinner.cjs');
|
92
|
+
var GraficContributieUnitlinked = require('./GraficContributieUnitlinked/GraficContributieUnitlinked.cjs');
|
92
93
|
|
93
94
|
|
94
95
|
|
@@ -178,3 +179,4 @@ exports.UnitlinkGraph = UnitlinkGraph.default;
|
|
178
179
|
exports.VerticalHeat = VerticalHeat.default;
|
179
180
|
exports.Icon = Icon.default;
|
180
181
|
exports.Spinner = Spinner.default;
|
182
|
+
exports.GraficContributieUnitlinked = GraficContributieUnitlinked.default;
|