@trafilea/afrodita-components 5.0.0-beta.209 → 5.0.0-beta.210
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 +4 -1
- package/build/index.esm.js +14 -8
- package/build/index.esm.js.map +1 -1
- package/build/index.js +14 -8
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1168,8 +1168,11 @@ interface ProgressBarProps {
|
|
|
1168
1168
|
fillColor: string;
|
|
1169
1169
|
widthAuto?: boolean;
|
|
1170
1170
|
percent?: number;
|
|
1171
|
+
height?: string;
|
|
1172
|
+
backgroundColor?: string;
|
|
1173
|
+
borderRadius?: string;
|
|
1171
1174
|
}
|
|
1172
|
-
declare const ProgressBar: ({ description, fillColor, widthAuto, percent, }: ProgressBarProps) => JSX.Element;
|
|
1175
|
+
declare const ProgressBar: ({ description, fillColor, widthAuto, percent, height, backgroundColor, borderRadius, }: ProgressBarProps) => JSX.Element;
|
|
1173
1176
|
|
|
1174
1177
|
interface IconButtonProps {
|
|
1175
1178
|
children: React.ReactNode;
|
package/build/index.esm.js
CHANGED
|
@@ -11694,12 +11694,18 @@ var H2 = newStyled.h2(function (_a) {
|
|
|
11694
11694
|
margin: '0.938rem 4.188rem',
|
|
11695
11695
|
});
|
|
11696
11696
|
});
|
|
11697
|
-
var Bar = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemplateObject(["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height:
|
|
11697
|
+
var Bar = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemplateObject(["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: ", ";\n background-color: ", ";\n width: ", ";\n border-radius: ", ";\n position: absolute;\n left: ", ";\n animation: ", ";\n"], ["\n @keyframes loading {\n 0% {\n transform: translateX(0);\n }\n to {\n transform: translateX(400%);\n }\n }\n\n height: ", ";\n background-color: ", ";\n width: ", ";\n border-radius: ", ";\n position: absolute;\n left: ", ";\n animation: ", ";\n"])), function (_a) {
|
|
11698
|
+
var height = _a.height;
|
|
11699
|
+
return height || '0.5rem';
|
|
11700
|
+
}, function (_a) {
|
|
11698
11701
|
var backgroundColor = _a.backgroundColor;
|
|
11699
11702
|
return backgroundColor;
|
|
11700
11703
|
}, function (_a) {
|
|
11701
11704
|
var percent = _a.percent;
|
|
11702
11705
|
return (percent ? getBarWithBasedOnPercent(percent) : '50%');
|
|
11706
|
+
}, function (_a) {
|
|
11707
|
+
var borderRadius = _a.borderRadius;
|
|
11708
|
+
return borderRadius || '0.25rem';
|
|
11703
11709
|
}, function (_a) {
|
|
11704
11710
|
var percent = _a.percent;
|
|
11705
11711
|
return (percent ? '0' : '-50%');
|
|
@@ -11708,30 +11714,30 @@ var Bar = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemp
|
|
|
11708
11714
|
return (percent ? 'none' : 'loading 1s ease-in 0.5s infinite');
|
|
11709
11715
|
});
|
|
11710
11716
|
var Background = newStyled.div(function (_a) {
|
|
11711
|
-
var backgroundColor = _a.backgroundColor;
|
|
11717
|
+
var backgroundColor = _a.backgroundColor, height = _a.height, borderRadius = _a.borderRadius;
|
|
11712
11718
|
return ({
|
|
11713
|
-
height: '0.5rem',
|
|
11719
|
+
height: height || '0.5rem',
|
|
11714
11720
|
width: '100%',
|
|
11715
11721
|
backgroundColor: backgroundColor,
|
|
11716
|
-
borderRadius: '0.25rem',
|
|
11722
|
+
borderRadius: borderRadius || '0.25rem',
|
|
11717
11723
|
position: 'absolute',
|
|
11718
11724
|
});
|
|
11719
11725
|
});
|
|
11720
11726
|
var Container$M = newStyled.div(function (_a) {
|
|
11721
|
-
var widthAuto = _a.widthAuto;
|
|
11727
|
+
var widthAuto = _a.widthAuto, description = _a.description;
|
|
11722
11728
|
return ({
|
|
11723
11729
|
width: widthAuto ? 'auto' : 'fit-content',
|
|
11724
11730
|
position: 'relative',
|
|
11725
|
-
overflow: 'hidden',
|
|
11731
|
+
overflow: description ? 'hidden' : '',
|
|
11726
11732
|
});
|
|
11727
11733
|
});
|
|
11728
11734
|
var getBarWithBasedOnPercent = function (percent) {
|
|
11729
11735
|
return percent <= 100 && percent >= 0 ? "".concat(percent, "%") : '0%';
|
|
11730
11736
|
};
|
|
11731
11737
|
var ProgressBar = function (_a) {
|
|
11732
|
-
var description = _a.description, fillColor = _a.fillColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, percent = _a.percent;
|
|
11738
|
+
var description = _a.description, fillColor = _a.fillColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, percent = _a.percent, height = _a.height, backgroundColor = _a.backgroundColor, borderRadius = _a.borderRadius;
|
|
11733
11739
|
var theme = useTheme();
|
|
11734
|
-
return (jsxs$1(Container$M, __assign$1({ "data-testid": "PBContainer", widthAuto: widthAuto }, { children: [jsx$1(Background, __assign$1({ backgroundColor: theme.colors.shades['100'].color }, { children: jsx$1(Bar, { "data-testid": "PBBar", backgroundColor: fillColor, percent: percent }, void 0) }), void 0), description && jsx$1(H2, __assign$1({ color: theme.colors.pallete.secondary.color }, { children: description }), void 0)] }), void 0));
|
|
11740
|
+
return (jsxs$1(Container$M, __assign$1({ "data-testid": "PBContainer", widthAuto: widthAuto, description: description }, { children: [jsx$1(Background, __assign$1({ backgroundColor: backgroundColor || theme.colors.shades['100'].color, height: height, borderRadius: borderRadius, "data-testid": "PBBackground" }, { children: jsx$1(Bar, { "data-testid": "PBBar", backgroundColor: fillColor, percent: percent, height: height, borderRadius: borderRadius }, void 0) }), void 0), description && jsx$1(H2, __assign$1({ color: theme.colors.pallete.secondary.color }, { children: description }), void 0)] }), void 0));
|
|
11735
11741
|
};
|
|
11736
11742
|
var templateObject_1$17;
|
|
11737
11743
|
|