@trafilea/afrodita-components 4.3.1-beta.8 → 4.3.1-beta.9
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/index.d.ts +2 -1
- package/build/index.esm.js +4 -4
- package/build/index.js +4 -4
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1079,8 +1079,9 @@ interface TimeProps {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
interface TimerProps extends TimeProps {
|
|
1081
1081
|
onTimeUp: () => void;
|
|
1082
|
+
displayZeroValues?: boolean;
|
|
1082
1083
|
}
|
|
1083
|
-
declare const Timer: ({ onTimeUp, ...rest }: TimerProps) => JSX.Element;
|
|
1084
|
+
declare const Timer: ({ onTimeUp, displayZeroValues, ...rest }: TimerProps) => JSX.Element;
|
|
1084
1085
|
|
|
1085
1086
|
interface BaseInputCommmonProps {
|
|
1086
1087
|
defaultValue?: string;
|
package/build/index.esm.js
CHANGED
|
@@ -7501,8 +7501,8 @@ var secondsToTime = function (secs) {
|
|
|
7501
7501
|
return { hours: hours, minutes: minutes, seconds: seconds };
|
|
7502
7502
|
};
|
|
7503
7503
|
var Timer = function (_a) {
|
|
7504
|
-
var onTimeUp = _a.onTimeUp, rest = __rest(_a, ["onTimeUp"]);
|
|
7505
|
-
var
|
|
7504
|
+
var onTimeUp = _a.onTimeUp, _b = _a.displayZeroValues, displayZeroValues = _b === void 0 ? false : _b, rest = __rest(_a, ["onTimeUp", "displayZeroValues"]);
|
|
7505
|
+
var _c = useState(timeToSeconds(rest)), secs = _c[0], setSecs = _c[1];
|
|
7506
7506
|
useEffect(function () {
|
|
7507
7507
|
var timer = setInterval(function () {
|
|
7508
7508
|
setSecs(function (seconds) {
|
|
@@ -7516,8 +7516,8 @@ var Timer = function (_a) {
|
|
|
7516
7516
|
}, 1000);
|
|
7517
7517
|
return function () { return clearInterval(timer); };
|
|
7518
7518
|
}, [onTimeUp]);
|
|
7519
|
-
var
|
|
7520
|
-
return (jsxs$1("div", __assign({ "data-testid": "Time" }, { children: [hours, "h ", minutes, "m ", seconds, "s"] }), void 0));
|
|
7519
|
+
var _d = secondsToTime(secs), hours = _d.hours, minutes = _d.minutes, seconds = _d.seconds;
|
|
7520
|
+
return (jsxs$1("div", __assign({ "data-testid": "Time" }, { children: [(hours || displayZeroValues) && "".concat(hours, "h "), (minutes || displayZeroValues) && "".concat(minutes, "m "), seconds, "s"] }), void 0));
|
|
7521
7521
|
};
|
|
7522
7522
|
|
|
7523
7523
|
var Label = newStyled.span(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n font-weight: 600;\n color: ", ";\n font-size: 1.125rem;\n line-height: 1.75rem;\n"], ["\n font-weight: 600;\n color: ", ";\n font-size: 1.125rem;\n line-height: 1.75rem;\n"])), function (_a) {
|
package/build/index.js
CHANGED
|
@@ -7527,8 +7527,8 @@ var secondsToTime = function (secs) {
|
|
|
7527
7527
|
return { hours: hours, minutes: minutes, seconds: seconds };
|
|
7528
7528
|
};
|
|
7529
7529
|
var Timer = function (_a) {
|
|
7530
|
-
var onTimeUp = _a.onTimeUp, rest = __rest(_a, ["onTimeUp"]);
|
|
7531
|
-
var
|
|
7530
|
+
var onTimeUp = _a.onTimeUp, _b = _a.displayZeroValues, displayZeroValues = _b === void 0 ? false : _b, rest = __rest(_a, ["onTimeUp", "displayZeroValues"]);
|
|
7531
|
+
var _c = React.useState(timeToSeconds(rest)), secs = _c[0], setSecs = _c[1];
|
|
7532
7532
|
React.useEffect(function () {
|
|
7533
7533
|
var timer = setInterval(function () {
|
|
7534
7534
|
setSecs(function (seconds) {
|
|
@@ -7542,8 +7542,8 @@ var Timer = function (_a) {
|
|
|
7542
7542
|
}, 1000);
|
|
7543
7543
|
return function () { return clearInterval(timer); };
|
|
7544
7544
|
}, [onTimeUp]);
|
|
7545
|
-
var
|
|
7546
|
-
return (jsxRuntime.jsxs("div", __assign({ "data-testid": "Time" }, { children: [hours, "h ", minutes, "m ", seconds, "s"] }), void 0));
|
|
7545
|
+
var _d = secondsToTime(secs), hours = _d.hours, minutes = _d.minutes, seconds = _d.seconds;
|
|
7546
|
+
return (jsxRuntime.jsxs("div", __assign({ "data-testid": "Time" }, { children: [(hours || displayZeroValues) && "".concat(hours, "h "), (minutes || displayZeroValues) && "".concat(minutes, "m "), seconds, "s"] }), void 0));
|
|
7547
7547
|
};
|
|
7548
7548
|
|
|
7549
7549
|
var Label = newStyled.span(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n font-weight: 600;\n color: ", ";\n font-size: 1.125rem;\n line-height: 1.75rem;\n"], ["\n font-weight: 600;\n color: ", ";\n font-size: 1.125rem;\n line-height: 1.75rem;\n"])), function (_a) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Trafilea's Design System",
|
|
4
4
|
"author": "Trafilea",
|
|
5
5
|
"repository": "https://github.com/trafilea/afrodita-components",
|
|
6
|
-
"version": "4.3.1-beta.
|
|
6
|
+
"version": "4.3.1-beta.9",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "build/index.js",
|
|
9
9
|
"style": "build/index.css",
|