@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.js CHANGED
@@ -11720,12 +11720,18 @@ var H2 = newStyled.h2(function (_a) {
11720
11720
  margin: '0.938rem 4.188rem',
11721
11721
  });
11722
11722
  });
11723
- 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: 0.5rem;\n background-color: ", ";\n width: ", ";\n border-radius: 0.25rem;\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: 0.5rem;\n background-color: ", ";\n width: ", ";\n border-radius: 0.25rem;\n position: absolute;\n left: ", ";\n animation: ", ";\n"])), function (_a) {
11723
+ 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) {
11724
+ var height = _a.height;
11725
+ return height || '0.5rem';
11726
+ }, function (_a) {
11724
11727
  var backgroundColor = _a.backgroundColor;
11725
11728
  return backgroundColor;
11726
11729
  }, function (_a) {
11727
11730
  var percent = _a.percent;
11728
11731
  return (percent ? getBarWithBasedOnPercent(percent) : '50%');
11732
+ }, function (_a) {
11733
+ var borderRadius = _a.borderRadius;
11734
+ return borderRadius || '0.25rem';
11729
11735
  }, function (_a) {
11730
11736
  var percent = _a.percent;
11731
11737
  return (percent ? '0' : '-50%');
@@ -11734,30 +11740,30 @@ var Bar = newStyled.div(templateObject_1$17 || (templateObject_1$17 = __makeTemp
11734
11740
  return (percent ? 'none' : 'loading 1s ease-in 0.5s infinite');
11735
11741
  });
11736
11742
  var Background = newStyled.div(function (_a) {
11737
- var backgroundColor = _a.backgroundColor;
11743
+ var backgroundColor = _a.backgroundColor, height = _a.height, borderRadius = _a.borderRadius;
11738
11744
  return ({
11739
- height: '0.5rem',
11745
+ height: height || '0.5rem',
11740
11746
  width: '100%',
11741
11747
  backgroundColor: backgroundColor,
11742
- borderRadius: '0.25rem',
11748
+ borderRadius: borderRadius || '0.25rem',
11743
11749
  position: 'absolute',
11744
11750
  });
11745
11751
  });
11746
11752
  var Container$M = newStyled.div(function (_a) {
11747
- var widthAuto = _a.widthAuto;
11753
+ var widthAuto = _a.widthAuto, description = _a.description;
11748
11754
  return ({
11749
11755
  width: widthAuto ? 'auto' : 'fit-content',
11750
11756
  position: 'relative',
11751
- overflow: 'hidden',
11757
+ overflow: description ? 'hidden' : '',
11752
11758
  });
11753
11759
  });
11754
11760
  var getBarWithBasedOnPercent = function (percent) {
11755
11761
  return percent <= 100 && percent >= 0 ? "".concat(percent, "%") : '0%';
11756
11762
  };
11757
11763
  var ProgressBar = function (_a) {
11758
- var description = _a.description, fillColor = _a.fillColor, _b = _a.widthAuto, widthAuto = _b === void 0 ? true : _b, percent = _a.percent;
11764
+ 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;
11759
11765
  var theme = useTheme();
11760
- return (jsxRuntime.jsxs(Container$M, __assign$1({ "data-testid": "PBContainer", widthAuto: widthAuto }, { children: [jsxRuntime.jsx(Background, __assign$1({ backgroundColor: theme.colors.shades['100'].color }, { children: jsxRuntime.jsx(Bar, { "data-testid": "PBBar", backgroundColor: fillColor, percent: percent }, void 0) }), void 0), description && jsxRuntime.jsx(H2, __assign$1({ color: theme.colors.pallete.secondary.color }, { children: description }), void 0)] }), void 0));
11766
+ return (jsxRuntime.jsxs(Container$M, __assign$1({ "data-testid": "PBContainer", widthAuto: widthAuto, description: description }, { children: [jsxRuntime.jsx(Background, __assign$1({ backgroundColor: backgroundColor || theme.colors.shades['100'].color, height: height, borderRadius: borderRadius, "data-testid": "PBBackground" }, { children: jsxRuntime.jsx(Bar, { "data-testid": "PBBar", backgroundColor: fillColor, percent: percent, height: height, borderRadius: borderRadius }, void 0) }), void 0), description && jsxRuntime.jsx(H2, __assign$1({ color: theme.colors.pallete.secondary.color }, { children: description }), void 0)] }), void 0));
11761
11767
  };
11762
11768
  var templateObject_1$17;
11763
11769