@appquality/unguess-design-system 2.12.18 → 2.12.20
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#### 🐛 Bug Fix
|
|
4
4
|
|
|
5
|
+
- fix(bullet-chart): use only the compact component + insert handful props [#101](https://github.com/AppQuality/unguess-design-system/pull/101) ([@marcbon](https://github.com/marcbon))
|
|
5
6
|
- Remove line chart and update types [#102](https://github.com/AppQuality/unguess-design-system/pull/102) ([@d-beezee](https://github.com/d-beezee) [@cannarocks](https://github.com/cannarocks))
|
|
6
7
|
- Setup pie charts [#100](https://github.com/AppQuality/unguess-design-system/pull/100) ([@d-beezee](https://github.com/d-beezee))
|
|
7
8
|
- Cup 1372 charts [#94](https://github.com/AppQuality/unguess-design-system/pull/94) ([@marcbon](https://github.com/marcbon) [@iacopolea](https://github.com/iacopolea) [@cannarocks](https://github.com/cannarocks))
|
package/build/index.js
CHANGED
|
@@ -264,10 +264,10 @@ var isMac = function () {
|
|
|
264
264
|
var os = parser.getOS().name;
|
|
265
265
|
return os && /Mac OS|iOS/.test(os);
|
|
266
266
|
};
|
|
267
|
-
styled.css(templateObject_1$
|
|
267
|
+
styled.css(templateObject_1$1l || (templateObject_1$1l = __makeTemplateObject(["\n transition: opacity 0.2s ease;\n"], ["\n transition: opacity 0.2s ease;\n"])));
|
|
268
268
|
var sidebarNavItemExpanded = styled.css(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n visibility: visible;\n opacity: 1;\n // transition: opacity 0.2s ease;\n"], ["\n visibility: visible;\n opacity: 1;\n // transition: opacity 0.2s ease;\n"])));
|
|
269
269
|
var sidebarNavItemHidden = styled.css(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n visibility: hidden;\n pointer-events: none;\n color: transparent;\n"], ["\n visibility: hidden;\n pointer-events: none;\n color: transparent;\n"])));
|
|
270
|
-
var templateObject_1$
|
|
270
|
+
var templateObject_1$1l, templateObject_2$y, templateObject_3$l;
|
|
271
271
|
|
|
272
272
|
var gradients = {
|
|
273
273
|
horizontal: "linear-gradient(90.81deg, ".concat(hex2rgba(palette.blue[600]), " 11.98%, ").concat(hex2rgba(palette.kale[400]), " 100%);"),
|
|
@@ -284,8 +284,8 @@ var components = __assign(__assign({}, reactTheming.DEFAULT_THEME.components), {
|
|
|
284
284
|
var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { breakpoints: __assign(__assign({}, reactTheming.DEFAULT_THEME.breakpoints), { xxl: "1440px" }), colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: palette.blue[600], warningHue: palette.yellow[600], successHue: palette.teal["M600"], dangerHue: palette.red[600], accentHue: palette.water[600] }), palette: palette, fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }), fontWeights: __assign(__assign({}, reactTheming.DEFAULT_THEME.fontWeights), { semibold: 500 }), gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), lineHeights: __assign(__assign({}, reactTheming.DEFAULT_THEME.lineHeights), { xs: '16px' // same as sm
|
|
285
285
|
}), components: components, shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }) });
|
|
286
286
|
|
|
287
|
-
var GlobalStyle = styled.createGlobalStyle(templateObject_1$
|
|
288
|
-
var templateObject_1$
|
|
287
|
+
var GlobalStyle = styled.createGlobalStyle(templateObject_1$1k || (templateObject_1$1k = __makeTemplateObject(["\n ::-webkit-scrollbar-track:hover {\n border-left: solid 1px ", ";\n border-right: solid 1px ", ";\n }\n\n ::-webkit-scrollbar {\n width: 10px;\n }\n\n ::-webkit-scrollbar-track {\n border: solid 2px transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px ", ";\n border: solid 2px transparent;\n border-radius: 25px;\n }\n\n /* This stuff is for Firefox */\n * {\n scrollbar-color: ", " #FFFFFF;\n scrollbar-width: thin;\n }\n\n html {\n overflow-y: auto;\n }\n\n body {\n font-family: ", ";\n margin: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n\n"], ["\n ::-webkit-scrollbar-track:hover {\n border-left: solid 1px ", ";\n border-right: solid 1px ", ";\n }\n\n ::-webkit-scrollbar {\n width: 10px;\n }\n\n ::-webkit-scrollbar-track {\n border: solid 2px transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px ", ";\n border: solid 2px transparent;\n border-radius: 25px;\n }\n\n /* This stuff is for Firefox */\n * {\n scrollbar-color: ", " #FFFFFF;\n scrollbar-width: thin;\n }\n\n html {\n overflow-y: auto;\n }\n\n body {\n font-family: ", ";\n margin: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n\n"])), theme.palette.grey["200"], theme.palette.grey["200"], theme.palette.blue["200"], theme.palette.blue["200"], theme.fonts.system);
|
|
288
|
+
var templateObject_1$1k;
|
|
289
289
|
|
|
290
290
|
/**
|
|
291
291
|
* Accordions are headers that can be expanded to reveal content or collapsed to hide it.
|
|
@@ -301,7 +301,7 @@ Accordion.Header = reactAccordions.Accordion.Header;
|
|
|
301
301
|
Accordion.Label = reactAccordions.Accordion.Label;
|
|
302
302
|
Accordion.Panel = reactAccordions.Accordion.Panel;
|
|
303
303
|
|
|
304
|
-
var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObject_1$
|
|
304
|
+
var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObject_1$1j || (templateObject_1$1j = __makeTemplateObject(["\n background-color: white;\n color: ", ";\n border-width: 2px;\n font-size: ", ";\n"], ["\n background-color: white;\n color: ", ";\n border-width: 2px;\n font-size: ", ";\n"])), function (_a) {
|
|
305
305
|
var theme = _a.theme;
|
|
306
306
|
return theme.palette.grey[700];
|
|
307
307
|
}, function (_a) {
|
|
@@ -322,9 +322,9 @@ var UgAlertTitle = styled__default["default"](reactNotifications.Title)(template
|
|
|
322
322
|
var Alert = function (props) { return jsxRuntime.jsx(UgAlert, __assign({}, props)); };
|
|
323
323
|
Alert.Title = UgAlertTitle;
|
|
324
324
|
Alert.Close = reactNotifications.Close;
|
|
325
|
-
var templateObject_1$
|
|
325
|
+
var templateObject_1$1j, templateObject_2$x;
|
|
326
326
|
|
|
327
|
-
var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$
|
|
327
|
+
var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$1i || (templateObject_1$1i = __makeTemplateObject(["\n text-transform: uppercase;\n\n ", "\n"], ["\n text-transform: uppercase;\n\n ", "\n"])), function (props) {
|
|
328
328
|
return props.avatarType &&
|
|
329
329
|
props.avatarType !== "image" &&
|
|
330
330
|
"background: ".concat(props.backgroundColor || theme.gradients.dark, ";");
|
|
@@ -348,7 +348,7 @@ var Avatar = function (props) {
|
|
|
348
348
|
return (jsxRuntime.jsx(UgAvatar, __assign({}, props, { badge: fixedBadge, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
|
|
349
349
|
};
|
|
350
350
|
Avatar.Text = UgAvatar.Text;
|
|
351
|
-
var templateObject_1$
|
|
351
|
+
var templateObject_1$1i;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* Breadcrumbs mark and communicate a user’s location in the product.
|
|
@@ -379,7 +379,7 @@ var getThemeStyle = function (props) {
|
|
|
379
379
|
}
|
|
380
380
|
return theme;
|
|
381
381
|
};
|
|
382
|
-
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$
|
|
382
|
+
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$1h || (templateObject_1$1h = __makeTemplateObject([""], [""])));
|
|
383
383
|
/**
|
|
384
384
|
* Buttons let users take action quickly.
|
|
385
385
|
* Use a Button to enable actions or decisions that are important to a user’s workflow.
|
|
@@ -398,7 +398,7 @@ var ButtonComponent = React.forwardRef(function (props, ref) {
|
|
|
398
398
|
var Button = ButtonComponent;
|
|
399
399
|
Button.StartIcon = UgButton.StartIcon;
|
|
400
400
|
Button.EndIcon = UgButton.EndIcon;
|
|
401
|
-
var templateObject_1$
|
|
401
|
+
var templateObject_1$1h;
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
404
|
A Button group lets users make a selection from a set of options.
|
|
@@ -428,7 +428,7 @@ Used for this:
|
|
|
428
428
|
**/
|
|
429
429
|
var SplitButton = React.forwardRef(function (props, ref) { return jsxRuntime.jsx(reactButtons.SplitButton, __assign({ ref: ref }, props)); });
|
|
430
430
|
|
|
431
|
-
var UgCard = styled__default["default"](reactNotifications.Well)(templateObject_1$
|
|
431
|
+
var UgCard = styled__default["default"](reactNotifications.Well)(templateObject_1$1g || (templateObject_1$1g = __makeTemplateObject(["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n\n ", "\n"], ["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n\n ", "\n"])), function (_a) {
|
|
432
432
|
var theme = _a.theme;
|
|
433
433
|
return theme.borderRadii.lg;
|
|
434
434
|
}, function (_a) {
|
|
@@ -466,7 +466,7 @@ var UgContainerCard = styled__default["default"](reactNotifications.Well)(templa
|
|
|
466
466
|
return "".concat(theme.space.xl, " ").concat(theme.space.md);
|
|
467
467
|
});
|
|
468
468
|
var ContainerCard = function (props) { return jsxRuntime.jsx(UgContainerCard, __assign({}, props)); };
|
|
469
|
-
var templateObject_1$
|
|
469
|
+
var templateObject_1$1g, templateObject_2$w;
|
|
470
470
|
|
|
471
471
|
/**
|
|
472
472
|
* Tags let users categorize content using a keyword.
|
|
@@ -671,7 +671,7 @@ var SvgCampaignIncoming = function SvgCampaignIncoming(props) {
|
|
|
671
671
|
})));
|
|
672
672
|
};
|
|
673
673
|
|
|
674
|
-
var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObject_1$
|
|
674
|
+
var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObject_1$1f || (templateObject_1$1f = __makeTemplateObject(["\n border-radius: ", ";\n ", "\n"], ["\n border-radius: ", ";\n ", "\n"])), function (props) { return props.theme.borderRadii.xxl; }, function (props) {
|
|
675
675
|
return props.isLight ?
|
|
676
676
|
"\n &:before {\n background-image: linear-gradient(45deg, transparent, ".concat(props.theme.palette.grey[200], ", transparent);\n }\n ") : "\n background-color: ".concat(props.theme.palette.grey[200], ";\n ");
|
|
677
677
|
});
|
|
@@ -689,22 +689,22 @@ var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObjec
|
|
|
689
689
|
- To communicate a typing status, use Inline instead
|
|
690
690
|
*/
|
|
691
691
|
var Skeleton = function (props) { return jsxRuntime.jsx(UgSkeleton, __assign({}, props)); };
|
|
692
|
-
var templateObject_1$
|
|
692
|
+
var templateObject_1$1f;
|
|
693
693
|
|
|
694
|
-
var CardMeta = styled__default["default"].div(templateObject_1$
|
|
694
|
+
var CardMeta = styled__default["default"].div(templateObject_1$1e || (templateObject_1$1e = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
695
695
|
var theme = _a.theme, direction = _a.direction, justifyContent = _a.justifyContent;
|
|
696
696
|
return "\n display: flex;\n align-items: center;\n flex-direction: ".concat(direction || "row", ";\n justify-content: ").concat(justifyContent || "space-between", ";\n height: ").concat(theme.space.base * 6, "px;\n padding: ").concat(theme.space.xxs, " 0;\n margin-bottom: ").concat(theme.space.xs, ";\n ");
|
|
697
697
|
});
|
|
698
|
-
var templateObject_1$
|
|
698
|
+
var templateObject_1$1e;
|
|
699
699
|
|
|
700
|
-
var CardThumbnail = styled__default["default"].div(templateObject_1$
|
|
700
|
+
var CardThumbnail = styled__default["default"].div(templateObject_1$1d || (templateObject_1$1d = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
701
701
|
var theme = _a.theme, align = _a.align, isStretched = _a.isStretched;
|
|
702
702
|
return "\n display: flex;\n\n ".concat(!isStretched ? "max-width: ".concat(theme.space.base * 16, "px") : "", ";\n max-height: ").concat(isStretched ? '150px' : "".concat(theme.space.base * 16, "px"), ";\n ").concat(align === "left" ? "margin-right: auto;" : '', "\n ").concat(align === "right" ? "margin-left: auto;" : '', "\n ").concat(align === "center" || isStretched ? "margin: auto;" : '', "\n\n padding: ").concat(theme.space.xxs, " 0;\n\n svg {\n width: 100%;\n height: auto;\n }\n ");
|
|
703
703
|
});
|
|
704
704
|
CardThumbnail.defaultProps = {
|
|
705
705
|
align: "left"
|
|
706
706
|
};
|
|
707
|
-
var templateObject_1$
|
|
707
|
+
var templateObject_1$1d;
|
|
708
708
|
|
|
709
709
|
/**
|
|
710
710
|
* Type components come in small, medium, large, extra-large, extra-extra-large, and extra-extra-extra-large.
|
|
@@ -716,7 +716,7 @@ var XL = function (props) { return jsxRuntime.jsx(reactTypography.XL, __assign({
|
|
|
716
716
|
var XXL = function (props) { return jsxRuntime.jsx(reactTypography.XXL, __assign({}, props)); };
|
|
717
717
|
var XXXL = function (props) { return jsxRuntime.jsx(reactTypography.XXXL, __assign({}, props)); };
|
|
718
718
|
|
|
719
|
-
var Label$2 = styled__default["default"](SM)(templateObject_1$
|
|
719
|
+
var Label$2 = styled__default["default"](SM)(templateObject_1$1c || (templateObject_1$1c = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
720
720
|
var theme = _a.theme;
|
|
721
721
|
return theme.palette.grey[500];
|
|
722
722
|
});
|
|
@@ -745,9 +745,9 @@ var CardHeader = function (props) { return jsxRuntime.jsx(Container$2, __assign(
|
|
|
745
745
|
CardHeader.Label = Label$2;
|
|
746
746
|
CardHeader.Title = Title$2;
|
|
747
747
|
CardHeader.Text = Description$2;
|
|
748
|
-
var templateObject_1$
|
|
748
|
+
var templateObject_1$1c, templateObject_2$v, templateObject_3$k, templateObject_4$f;
|
|
749
749
|
|
|
750
|
-
var Divider = styled__default["default"].div(templateObject_1$
|
|
750
|
+
var Divider = styled__default["default"].div(templateObject_1$1b || (templateObject_1$1b = __makeTemplateObject(["\n width: 100%;\n height: 1px;\n margin-top: ", "px;\n margin-bottom: ", ";\n background-color: ", ";\n"], ["\n width: 100%;\n height: 1px;\n margin-top: ", "px;\n margin-bottom: ", ";\n background-color: ", ";\n"])), function (_a) {
|
|
751
751
|
var theme = _a.theme;
|
|
752
752
|
return theme.space.base * 3;
|
|
753
753
|
}, function (_a) {
|
|
@@ -763,9 +763,9 @@ var Container$1 = styled__default["default"].div(templateObject_3$j || (template
|
|
|
763
763
|
return "\n display: flex;\n align-items: center;\n flex-direction: ".concat(direction || "row", ";\n justify-content: ").concat(justifyContent || "space-between", ";\n padding: ").concat(theme.space.xxs, " 0;\n margin-top: ").concat(theme.space.xs, ";\n ").concat(wrap ? "flex-wrap: wrap;" : "", "\n ");
|
|
764
764
|
});
|
|
765
765
|
var CardFooter = function (props) { return (jsxRuntime.jsxs(Footer$2, { children: [!props.noDivider && jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(Container$1, __assign({}, props, { children: props.children }))] })); };
|
|
766
|
-
var templateObject_1$
|
|
766
|
+
var templateObject_1$1b, templateObject_2$u, templateObject_3$j;
|
|
767
767
|
|
|
768
|
-
var UgContentCard = styled__default["default"](reactNotifications.Well)(templateObject_1$
|
|
768
|
+
var UgContentCard = styled__default["default"](reactNotifications.Well)(templateObject_1$1a || (templateObject_1$1a = __makeTemplateObject(["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n height: 100%;\n display: flex;\n flex-direction: column;\n cursor: pointer;\n\n ", "\n\n ", "\n"], ["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n height: 100%;\n display: flex;\n flex-direction: column;\n cursor: pointer;\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
769
769
|
var theme = _a.theme;
|
|
770
770
|
return theme.borderRadii.lg;
|
|
771
771
|
}, function (_a) {
|
|
@@ -795,7 +795,7 @@ SpecialCard.Meta = CardMeta;
|
|
|
795
795
|
SpecialCard.Thumb = CardThumbnail;
|
|
796
796
|
SpecialCard.Header = CardHeader;
|
|
797
797
|
SpecialCard.Footer = CardFooter;
|
|
798
|
-
var templateObject_1$
|
|
798
|
+
var templateObject_1$1a;
|
|
799
799
|
|
|
800
800
|
var CampaignCardSkeleton = function () {
|
|
801
801
|
return (jsxRuntime.jsxs(SpecialCard, { children: [jsxRuntime.jsx(SpecialCard.Meta, { children: jsxRuntime.jsx(Skeleton, { width: "30%" }) }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(Skeleton, { height: "18px", width: "50%" }), jsxRuntime.jsx("br", {}), jsxRuntime.jsx(Skeleton, { height: "26px", style: { backgroundColor: theme.palette.blue[400] } })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [jsxRuntime.jsx(Skeleton, { height: "18px", width: "45%" }), jsxRuntime.jsx(Skeleton, { width: "26px", height: "26px", style: { borderRadius: "100%" } })] })] }));
|
|
@@ -828,7 +828,7 @@ var getTypeDataIcon = function (type) {
|
|
|
828
828
|
return SvgCampaignFunctional;
|
|
829
829
|
}
|
|
830
830
|
};
|
|
831
|
-
var StyledTag$2 = styled__default["default"](Tag)(templateObject_1$
|
|
831
|
+
var StyledTag$2 = styled__default["default"](Tag)(templateObject_1$19 || (templateObject_1$19 = __makeTemplateObject(["\n color: ", ";\n cursor: pointer;\n"], ["\n color: ", ";\n cursor: pointer;\n"])), function (_a) {
|
|
832
832
|
var theme = _a.theme;
|
|
833
833
|
return theme.palette.grey["700"];
|
|
834
834
|
});
|
|
@@ -855,9 +855,9 @@ var CampaignCard = function (_a) {
|
|
|
855
855
|
var PillIcon = getTypeDataIcon(type);
|
|
856
856
|
return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, __assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$2, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$2, __assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), jsxRuntime.jsx(Ellipsis, __assign({ style: { maxWidth: "180px" } }, { children: props.pillText }))] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
|
|
857
857
|
};
|
|
858
|
-
var templateObject_1$
|
|
858
|
+
var templateObject_1$19, templateObject_2$t, templateObject_3$i;
|
|
859
859
|
|
|
860
|
-
var StyledTagNew = styled__default["default"](Tag)(templateObject_1$
|
|
860
|
+
var StyledTagNew = styled__default["default"](Tag)(templateObject_1$18 || (templateObject_1$18 = __makeTemplateObject(["\n height: ", "px;\n padding: ", "px\n ", "px;\n color: ", ";\n position: absolute;\n right: 16px;\n top: 16px;\n"], ["\n height: ", "px;\n padding: ", "px\n ", "px;\n color: ", ";\n position: absolute;\n right: 16px;\n top: 16px;\n"])), function (_a) {
|
|
861
861
|
var theme = _a.theme;
|
|
862
862
|
return theme.space.base * 6;
|
|
863
863
|
}, function (_a) {
|
|
@@ -874,9 +874,9 @@ var ProductCard = function (props) {
|
|
|
874
874
|
var isNew = props.isNew, productTitle = props.productTitle, labelNew = props.labelNew;
|
|
875
875
|
return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, __assign({ title: productTitle }, props, { children: [jsxRuntime.jsx(SpecialCard.Meta, { children: isNew && (jsxRuntime.jsx(StyledTagNew, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" }))) }), props.icon && jsxRuntime.jsx(SpecialCard.Thumb, __assign({ align: "center" }, { children: props.icon })), jsxRuntime.jsxs(SpecialCard.Header, __assign({ onClick: props.onCtaClick, align: "center" }, { children: [props.preTitle && (jsxRuntime.jsx(SpecialCard.Header.Label, { children: props.preTitle })), jsxRuntime.jsx(SpecialCard.Header.Title, { children: productTitle })] })), jsxRuntime.jsx(SpecialCard.Footer, __assign({ direction: "column", justifyContent: "center" }, { children: jsxRuntime.jsx(Button, __assign({ isPill: true, isPrimary: true, onClick: props.onCtaClick, themeColor: theme.colors.accentHue, size: "small" }, { children: props.ctaLabel })) }))] })));
|
|
876
876
|
};
|
|
877
|
-
var templateObject_1$
|
|
877
|
+
var templateObject_1$18;
|
|
878
878
|
|
|
879
|
-
var ServiceSubtitle = styled__default["default"](SM)(templateObject_1$
|
|
879
|
+
var ServiceSubtitle = styled__default["default"](SM)(templateObject_1$17 || (templateObject_1$17 = __makeTemplateObject(["\n color: ", ";\n margin-bottom: ", "px;\n"], ["\n color: ", ";\n margin-bottom: ", "px;\n"])), function (_a) {
|
|
880
880
|
var theme = _a.theme;
|
|
881
881
|
return theme.palette.grey[500];
|
|
882
882
|
}, function (_a) {
|
|
@@ -928,13 +928,13 @@ var ServiceCard = function (props) {
|
|
|
928
928
|
var serviceIcon = props.serviceIcon, serviceTitle = props.serviceTitle, serviceSubtitle = props.serviceSubtitle;
|
|
929
929
|
return (jsxRuntime.jsxs(StyledCard$1, __assign({}, props, { children: [props.isHoverable && (jsxRuntime.jsxs(HoverBody, { children: [jsxRuntime.jsxs(HoverMetaContainer, { children: [props.hoverTitle && (jsxRuntime.jsx(ServiceTitle, { children: props.hoverTitle })), props.hoverSubtitle && (jsxRuntime.jsx(ServiceSubtitle, { children: props.hoverSubtitle }))] }), props.hoverButtons && (jsxRuntime.jsx(ButtonsWrap$1, { children: props.hoverButtons.map(function (button) { return button; }) }))] })), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [serviceIcon && jsxRuntime.jsx(SpecialCard.Thumb, { children: serviceIcon }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: serviceSubtitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: serviceTitle })] })] }), props.tags && (jsxRuntime.jsx(SpecialCard.Footer, __assign({ justifyContent: "start", wrap: true }, { children: props.tags.map(function (tag, index) { return (jsxRuntime.jsxs(StyledTag$1, __assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(StyledTag$1.Avatar, { children: tag.icon }), tag.label] }), index)); }) })))] })] })));
|
|
930
930
|
};
|
|
931
|
-
var templateObject_1$
|
|
931
|
+
var templateObject_1$17, templateObject_2$s, templateObject_3$h, templateObject_4$e, templateObject_5$6, templateObject_6$2, templateObject_7$1, templateObject_8$1;
|
|
932
932
|
|
|
933
|
-
var ButtonsWrap = styled__default["default"].div(templateObject_1$
|
|
933
|
+
var ButtonsWrap = styled__default["default"].div(templateObject_1$16 || (templateObject_1$16 = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n justify-content: flex-start;\n width: 100%;\n"], ["\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n justify-content: flex-start;\n width: 100%;\n"])));
|
|
934
934
|
var InfoCard = function (props) {
|
|
935
935
|
return (jsxRuntime.jsxs(SpecialCard, __assign({}, (props.infoTitle && { title: props.infoTitle }), props, { children: [props.infoImg && (jsxRuntime.jsx(SpecialCard.Thumb, __assign({ isStretched: true }, { children: props.infoImg }))), jsxRuntime.jsxs(SpecialCard.Header, { children: [props.infoSubtitle && (jsxRuntime.jsx(SpecialCard.Header.Label, { children: props.infoSubtitle })), props.infoTitle && (jsxRuntime.jsx(SpecialCard.Header.Title, { children: props.infoTitle }))] }), props.infoButtons && (jsxRuntime.jsx(SpecialCard.Footer, __assign({ direction: "column", justifyContent: "center" }, { children: jsxRuntime.jsx(ButtonsWrap, { children: props.infoButtons.map(function (button) { return button; }) }) })))] })));
|
|
936
936
|
};
|
|
937
|
-
var templateObject_1$
|
|
937
|
+
var templateObject_1$16;
|
|
938
938
|
|
|
939
939
|
var DEFAULT_CHARTS_THEME = {
|
|
940
940
|
background: theme.palette.white,
|
|
@@ -1105,14 +1105,14 @@ var CHARTS_COLOR_SCHEME_CATEGORICAL_8_A = [
|
|
|
1105
1105
|
chartColors.blue, // Blue 900
|
|
1106
1106
|
];
|
|
1107
1107
|
|
|
1108
|
-
var ChartContainer = styled__default["default"].div(templateObject_1$
|
|
1108
|
+
var ChartContainer = styled__default["default"].div(templateObject_1$15 || (templateObject_1$15 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n"], ["\n height: ", ";\n width: ", ";\n"])), function (_a) {
|
|
1109
1109
|
var height = _a.height;
|
|
1110
1110
|
return height || "300px";
|
|
1111
1111
|
}, function (_a) {
|
|
1112
1112
|
var width = _a.width;
|
|
1113
1113
|
return width || "100%";
|
|
1114
1114
|
});
|
|
1115
|
-
var templateObject_1$
|
|
1115
|
+
var templateObject_1$15;
|
|
1116
1116
|
|
|
1117
1117
|
var BarChart = function (_a) {
|
|
1118
1118
|
var theme = _a.theme, colors = _a.colors, width = _a.width, height = _a.height, props = __rest(_a, ["theme", "colors", "width", "height"]);
|
|
@@ -1129,19 +1129,26 @@ var CustomBulletChartRange = function (_a) {
|
|
|
1129
1129
|
return (jsxRuntime.jsx("rect", { x: x, y: y, width: width - 2, height: height, fill: fill }));
|
|
1130
1130
|
};
|
|
1131
1131
|
|
|
1132
|
+
var UgBulletChart = styled__default["default"](bullet.ResponsiveBullet)(templateObject_1$14 || (templateObject_1$14 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
1132
1133
|
var BulletChart = function (_a) {
|
|
1133
|
-
var
|
|
1134
|
-
var rangesCount =
|
|
1135
|
-
return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(
|
|
1134
|
+
var width = _a.width, height = _a.height, ranges = _a.ranges, values = _a.values, markerColor = _a.markerColor, markerSize = _a.markerSize, rangeColor = _a.rangeColor, measureSize = _a.measureSize, measureColor = _a.measureColor, props = __rest(_a, ["width", "height", "ranges", "values", "markerColor", "markerSize", "rangeColor", "measureSize", "measureColor"]);
|
|
1135
|
+
var rangesCount = ranges.length;
|
|
1136
|
+
return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(UgBulletChart, __assign({ data: [{
|
|
1137
|
+
id: "",
|
|
1138
|
+
title: "",
|
|
1139
|
+
ranges: ranges,
|
|
1140
|
+
measures: values,
|
|
1141
|
+
markers: values,
|
|
1142
|
+
}], measureColors: measureColor !== null && measureColor !== void 0 ? measureColor : chartColors.darkGrey, measureSize: measureSize !== null && measureSize !== void 0 ? measureSize : 0.2, markerComponent: function (_a) {
|
|
1136
1143
|
_a.size; var markerProps = __rest(_a, ["size"]);
|
|
1137
|
-
return (jsxRuntime.jsx(CustomBulletChartMarker, __assign({ bulletRadius: 4, fill: markerColor !== null && markerColor !== void 0 ? markerColor : chartColors.darkPine, size: markerSize !== null && markerSize !== void 0 ? markerSize :
|
|
1144
|
+
return (jsxRuntime.jsx(CustomBulletChartMarker, __assign({ bulletRadius: 4, fill: markerColor !== null && markerColor !== void 0 ? markerColor : chartColors.darkPine, size: markerSize !== null && markerSize !== void 0 ? markerSize : 1 }, markerProps)));
|
|
1138
1145
|
}, rangeComponent: function (_a) {
|
|
1139
|
-
var index = _a.index, rangeProps = __rest(_a, ["index"]);
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1146
|
+
var index = _a.index, width = _a.width, rangeProps = __rest(_a, ["index", "width"]);
|
|
1147
|
+
var isLast = index === rangesCount - 1;
|
|
1148
|
+
return (jsxRuntime.jsx(CustomBulletChartRange, __assign({ fill: rangeColor !== null && rangeColor !== void 0 ? rangeColor : chartColors.lightGrey }, rangeProps, { width: isLast ? width + 2 : width })));
|
|
1149
|
+
}, margin: { top: 0, right: 10, bottom: -1, left: 10 } }, props)) })));
|
|
1150
|
+
};
|
|
1151
|
+
var templateObject_1$14;
|
|
1145
1152
|
|
|
1146
1153
|
var CenteredItem = function (_a) {
|
|
1147
1154
|
var centerX = _a.centerX, centerY = _a.centerY, theme = _a.theme, radius = _a.radius, label = _a.label, value = _a.value;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import { BulletSvgProps, Datum } from "@nivo/bullet";
|
|
2
|
-
export interface BulletChartDefaultProps extends Omit<BulletSvgProps, "width" | "height"> {
|
|
3
|
-
data: Datum[];
|
|
4
|
-
lineHeight?: number;
|
|
5
|
-
bulletRadius?: number;
|
|
6
|
-
width?: string;
|
|
7
|
-
height?: string;
|
|
8
|
-
}
|
|
9
1
|
export interface BulletChartProps {
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
ranges: number[];
|
|
3
|
+
values: number[];
|
|
12
4
|
width?: string;
|
|
13
5
|
height?: string;
|
|
14
6
|
markerColor?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BulletChartProps } from "./_types";
|
|
2
|
-
declare const BulletChart: ({
|
|
2
|
+
declare const BulletChart: ({ width, height, ranges, values, markerColor, markerSize, rangeColor, measureSize, measureColor, ...props }: BulletChartProps) => JSX.Element;
|
|
3
3
|
export { BulletChart };
|
|
@@ -2,5 +2,5 @@ import { ComponentMeta, Story } from "@storybook/react";
|
|
|
2
2
|
import { BulletChartProps } from "./_types";
|
|
3
3
|
export declare const Default: Story<BulletChartProps>;
|
|
4
4
|
export declare const Widget: Story<BulletChartProps>;
|
|
5
|
-
declare const _default: ComponentMeta<({
|
|
5
|
+
declare const _default: ComponentMeta<({ width, height, ranges, values, markerColor, markerSize, rangeColor, measureSize, measureColor, ...props }: BulletChartProps) => JSX.Element>;
|
|
6
6
|
export default _default;
|