@speakapbv/dough-component-library 10.1.0 → 10.1.1
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/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { Tooltip, TooltipDirection } from "./components/tooltip/tooltip";
|
|
|
37
37
|
export { AppBackground } from "./components/app-background/app-background";
|
|
38
38
|
export { AppWrapper } from "./components/app-wrapper/app-wrapper";
|
|
39
39
|
export { PanelOverlay } from "./components/panel-overlay/panel-overlay";
|
|
40
|
+
export { MultiProgressBar, MultiProgressBarProps, } from "./components/progress-bar/multi-progress-bar";
|
|
40
41
|
export { ProgressBar, ProgressBarProps, } from "./components/progress-bar/progress-bar";
|
|
41
42
|
export { AlertText } from "./components/alert-textbox/alert-textbox";
|
|
42
43
|
export { Notification } from "./components/notification/notification";
|
package/dist/index.es.js
CHANGED
|
@@ -4715,6 +4715,24 @@ var getColorWithFallback = function (color) {
|
|
|
4715
4715
|
return isStandardColor(color) || isFixedColor(color) ? "var(--" + color + ")" : color;
|
|
4716
4716
|
};
|
|
4717
4717
|
|
|
4718
|
+
var MultiProgressBar = function (_a) {
|
|
4719
|
+
var dataAttributes = _a.dataAttributes, className = _a.className, _b = _a.railColor, railColor = _b === void 0 ? "#EDEDED" : _b, data = _a.data, total = _a.total;
|
|
4720
|
+
var aggregatedTotal = data.reduce(function (agg, el) { return agg + el.value; }, 0);
|
|
4721
|
+
var normalizedTotal = aggregatedTotal > total ? aggregatedTotal : total;
|
|
4722
|
+
return (React.createElement("div", __assign({ className: cn("dough-multi-progress-bar", className) }, dataAttributes, { style: {
|
|
4723
|
+
backgroundColor: getColorWithFallback(railColor),
|
|
4724
|
+
} }),
|
|
4725
|
+
data.filter(Boolean).map(function (_a, index) {
|
|
4726
|
+
var value = _a.value, color = _a.color;
|
|
4727
|
+
return (React.createElement("div", { key: index, className: "dough-multi-progress-bar__progress", style: {
|
|
4728
|
+
backgroundColor: getColorWithFallback(color),
|
|
4729
|
+
width: "calc(" + value + " / " + normalizedTotal + " * 100%)",
|
|
4730
|
+
} }));
|
|
4731
|
+
}),
|
|
4732
|
+
aggregatedTotal < total && (React.createElement("div", { className: "dough-multi-progress-bar__progress" }))));
|
|
4733
|
+
};
|
|
4734
|
+
MultiProgressBar.displayName = "MultiProgressBar";
|
|
4735
|
+
|
|
4718
4736
|
var ProgressBar = function (_a) {
|
|
4719
4737
|
var total = _a.total, completed = _a.completed, _b = _a.railColor, railColor = _b === void 0 ? "#EDEDED" : _b, _c = _a.barColor, barColor = _c === void 0 ? Colors.SUCCESS : _c, dataAttributes = _a.dataAttributes, className = _a.className;
|
|
4720
4738
|
return (React.createElement("div", __assign({ className: cn("dough-progress-bar", className) }, dataAttributes, { style: {
|
|
@@ -5654,4 +5672,4 @@ GridItem.displayName = "GridItem";
|
|
|
5654
5672
|
|
|
5655
5673
|
injectRobotoFont();
|
|
5656
5674
|
|
|
5657
|
-
export { AlertStatus, AlertText, AppBackground, AppWrapper, Avatar, BR, Badge, BorderStyles, Box, BoxAlign, BoxAlignContent, BoxAlignment, BoxDirection, BoxDisplay, BoxJustifyContent, BoxOverflow, BoxWrap, BreadCrumb, BreadCrumbText, BreakpointViewer, BreakpointViewportSizes, Button, ButtonInputType, Card, Carousel, CheckBox, Collapser, ColorTile, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, DoughListItem, DropMenu, Fader, FixedColors, Footer, Grid, GridContentAlignment, GridFlow, GridItem, GridItemsAlignment, H1, H2, H3, H4, H5, H6, H7, Header, HorizontalAlignment, HorizontalListSlider, Image, ImageCarousel, ImageContentShowOnHoverClassName, InputWrapper, LayoutContainer, LayoutFlexBox, Link, Notification, NumericInput, Overlay, OverlayVariant, PanelOverlay, Paragraph, ProgressBar, RadioGroup, RadioOption, SelectBox, Sizes, Skeleton, SkeletonShape, Spacer, Spacings, Spinner, StepsIndicator, StrengthIndicator, Subtitle, Switch, Table, TableCell, TableRow, TableRowStyle, TabsContainer, Tag, Text, TextAlignment, TextArea, TextInput, TimePicker, Toggle, ToggleWithText, Tooltip, TooltipDirection, UnorderedList, VerticalAlignment, cancelEvent, checkComponentType, cn, findParentBySelector, generateUID, hideLastDoughTooltip, isStandardColor, setBreakpointSizeManually };
|
|
5675
|
+
export { AlertStatus, AlertText, AppBackground, AppWrapper, Avatar, BR, Badge, BorderStyles, Box, BoxAlign, BoxAlignContent, BoxAlignment, BoxDirection, BoxDisplay, BoxJustifyContent, BoxOverflow, BoxWrap, BreadCrumb, BreadCrumbText, BreakpointViewer, BreakpointViewportSizes, Button, ButtonInputType, Card, Carousel, CheckBox, Collapser, ColorTile, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, DoughListItem, DropMenu, Fader, FixedColors, Footer, Grid, GridContentAlignment, GridFlow, GridItem, GridItemsAlignment, H1, H2, H3, H4, H5, H6, H7, Header, HorizontalAlignment, HorizontalListSlider, Image, ImageCarousel, ImageContentShowOnHoverClassName, InputWrapper, LayoutContainer, LayoutFlexBox, Link, MultiProgressBar, Notification, NumericInput, Overlay, OverlayVariant, PanelOverlay, Paragraph, ProgressBar, RadioGroup, RadioOption, SelectBox, Sizes, Skeleton, SkeletonShape, Spacer, Spacings, Spinner, StepsIndicator, StrengthIndicator, Subtitle, Switch, Table, TableCell, TableRow, TableRowStyle, TabsContainer, Tag, Text, TextAlignment, TextArea, TextInput, TimePicker, Toggle, ToggleWithText, Tooltip, TooltipDirection, UnorderedList, VerticalAlignment, cancelEvent, checkComponentType, cn, findParentBySelector, generateUID, hideLastDoughTooltip, isStandardColor, setBreakpointSizeManually };
|
package/dist/index.js
CHANGED
|
@@ -4698,6 +4698,24 @@ var getColorWithFallback = function (color) {
|
|
|
4698
4698
|
return isStandardColor(color) || isFixedColor(color) ? "var(--" + color + ")" : color;
|
|
4699
4699
|
};
|
|
4700
4700
|
|
|
4701
|
+
var MultiProgressBar = function (_a) {
|
|
4702
|
+
var dataAttributes = _a.dataAttributes, className = _a.className, _b = _a.railColor, railColor = _b === void 0 ? "#EDEDED" : _b, data = _a.data, total = _a.total;
|
|
4703
|
+
var aggregatedTotal = data.reduce(function (agg, el) { return agg + el.value; }, 0);
|
|
4704
|
+
var normalizedTotal = aggregatedTotal > total ? aggregatedTotal : total;
|
|
4705
|
+
return (React__default.createElement("div", __assign({ className: cn("dough-multi-progress-bar", className) }, dataAttributes, { style: {
|
|
4706
|
+
backgroundColor: getColorWithFallback(railColor),
|
|
4707
|
+
} }),
|
|
4708
|
+
data.filter(Boolean).map(function (_a, index) {
|
|
4709
|
+
var value = _a.value, color = _a.color;
|
|
4710
|
+
return (React__default.createElement("div", { key: index, className: "dough-multi-progress-bar__progress", style: {
|
|
4711
|
+
backgroundColor: getColorWithFallback(color),
|
|
4712
|
+
width: "calc(" + value + " / " + normalizedTotal + " * 100%)",
|
|
4713
|
+
} }));
|
|
4714
|
+
}),
|
|
4715
|
+
aggregatedTotal < total && (React__default.createElement("div", { className: "dough-multi-progress-bar__progress" }))));
|
|
4716
|
+
};
|
|
4717
|
+
MultiProgressBar.displayName = "MultiProgressBar";
|
|
4718
|
+
|
|
4701
4719
|
var ProgressBar = function (_a) {
|
|
4702
4720
|
var total = _a.total, completed = _a.completed, _b = _a.railColor, railColor = _b === void 0 ? "#EDEDED" : _b, _c = _a.barColor, barColor = _c === void 0 ? exports.Colors.SUCCESS : _c, dataAttributes = _a.dataAttributes, className = _a.className;
|
|
4703
4721
|
return (React__default.createElement("div", __assign({ className: cn("dough-progress-bar", className) }, dataAttributes, { style: {
|
|
@@ -5676,6 +5694,7 @@ exports.InputWrapper = InputWrapper;
|
|
|
5676
5694
|
exports.LayoutContainer = LayoutContainer;
|
|
5677
5695
|
exports.LayoutFlexBox = LayoutFlexBox;
|
|
5678
5696
|
exports.Link = Link;
|
|
5697
|
+
exports.MultiProgressBar = MultiProgressBar;
|
|
5679
5698
|
exports.Notification = Notification;
|
|
5680
5699
|
exports.NumericInput = NumericInput;
|
|
5681
5700
|
exports.Overlay = Overlay;
|
package/package.json
CHANGED
|
File without changes
|