@thecb/components 7.7.3-beta.3 → 7.7.3-beta.5
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.cjs.js +36 -24
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +36 -24
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/WarningIconXS.js +20 -17
- package/src/components/molecules/popover/Popover.js +9 -5
- package/src/components/molecules/popover/index.d.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -431,6 +431,9 @@ interface PopoverProps {
|
|
|
431
431
|
arrowDirection?: "left" | "right" | "top" | "bottom";
|
|
432
432
|
transform?: string;
|
|
433
433
|
disclosedExtraStyles?: string;
|
|
434
|
+
borderColor?: string;
|
|
435
|
+
backgroundColor?: string;
|
|
436
|
+
popoverExtraStyles?: string;
|
|
434
437
|
}
|
|
435
438
|
|
|
436
439
|
declare const Popover: React.FC<Expand<PopoverProps> &
|
package/dist/index.esm.js
CHANGED
|
@@ -15544,7 +15544,14 @@ var CheckIcon = function CheckIcon() {
|
|
|
15544
15544
|
})))))));
|
|
15545
15545
|
};
|
|
15546
15546
|
|
|
15547
|
-
var WarningIconXS = function WarningIconXS() {
|
|
15547
|
+
var WarningIconXS = function WarningIconXS(_ref) {
|
|
15548
|
+
var _ref$color = _ref.color,
|
|
15549
|
+
color = _ref$color === void 0 ? "#B34A00" : _ref$color,
|
|
15550
|
+
title = _ref.title,
|
|
15551
|
+
_ref$titleID = _ref.titleID,
|
|
15552
|
+
titleID = _ref$titleID === void 0 ? "warning-icon-title" : _ref$titleID,
|
|
15553
|
+
_ref$iconIndex = _ref.iconIndex,
|
|
15554
|
+
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex;
|
|
15548
15555
|
return /*#__PURE__*/React.createElement("svg", {
|
|
15549
15556
|
width: "16px",
|
|
15550
15557
|
height: "13px",
|
|
@@ -15552,40 +15559,40 @@ var WarningIconXS = function WarningIconXS() {
|
|
|
15552
15559
|
version: "1.1",
|
|
15553
15560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15554
15561
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
15555
|
-
"aria-labelledby": "#
|
|
15562
|
+
"aria-labelledby": title && "#".concat(titleID, "-").concat(iconIndex),
|
|
15556
15563
|
role: "img"
|
|
15557
|
-
}, /*#__PURE__*/React.createElement("title", {
|
|
15558
|
-
id: "
|
|
15559
|
-
},
|
|
15564
|
+
}, title && /*#__PURE__*/React.createElement("title", {
|
|
15565
|
+
id: "".concat(titleID, "-").concat(iconIndex)
|
|
15566
|
+
}, title), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
15560
15567
|
d: "M11.0106463,4.4659633 C11.3063934,4.63914978 11.5526739,4.88543032 11.7258604,5.18117739 L16.7999622,13.846119 C17.3581267,14.7992854 17.0379144,16.0244612 16.0847481,16.5826257 C15.7781918,16.762142 15.4293522,16.8567653 15.0741018,16.8567653 L4.92589823,16.8567653 C3.82132873,16.8567653 2.92589823,15.9613348 2.92589823,14.8567653 C2.92589823,14.5015149 3.02052159,14.1526753 3.20003784,13.846119 L8.27413962,5.18117739 C8.83230416,4.22801102 10.0574799,3.90779877 11.0106463,4.4659633 Z M10.6666667,13.3333333 L9.33333333,13.3333333 L9.33333333,14.6666667 L10.6666667,14.6666667 L10.6666667,13.3333333 Z M10.6666667,6.66666667 L9.33333333,6.66666667 L9.33333333,12 L10.6666667,12 L10.6666667,6.66666667 Z",
|
|
15561
|
-
id: "WarningIconXs-path-1"
|
|
15568
|
+
id: "WarningIconXs-path-1-".concat(iconIndex)
|
|
15562
15569
|
})), /*#__PURE__*/React.createElement("g", {
|
|
15563
|
-
id: "WarningIconXs-
|
|
15570
|
+
id: "WarningIconXs-Group-1-".concat(iconIndex),
|
|
15564
15571
|
stroke: "none",
|
|
15565
15572
|
strokeWidth: "1",
|
|
15566
15573
|
fill: "none",
|
|
15567
15574
|
fillRule: "evenodd"
|
|
15568
15575
|
}, /*#__PURE__*/React.createElement("g", {
|
|
15569
|
-
id: "WarningIconXs-
|
|
15576
|
+
id: "WarningIconXs-Group-2-".concat(iconIndex),
|
|
15570
15577
|
transform: "translate(-135.000000, -483.000000)"
|
|
15571
15578
|
}, /*#__PURE__*/React.createElement("g", {
|
|
15572
|
-
id: "WarningIconXs-Group",
|
|
15579
|
+
id: "WarningIconXs-Group-3-".concat(iconIndex),
|
|
15573
15580
|
transform: "translate(133.000000, 479.000000)"
|
|
15574
15581
|
}, /*#__PURE__*/React.createElement("mask", {
|
|
15575
|
-
id: "WarningIconXs-mask-2",
|
|
15582
|
+
id: "WarningIconXs-mask-2-".concat(iconIndex),
|
|
15576
15583
|
fill: "white"
|
|
15577
15584
|
}, /*#__PURE__*/React.createElement("use", {
|
|
15578
|
-
xlinkHref: "#WarningIconXs-path-1"
|
|
15585
|
+
xlinkHref: "#WarningIconXs-path-1-".concat(iconIndex)
|
|
15579
15586
|
})), /*#__PURE__*/React.createElement("use", {
|
|
15580
|
-
id: "WarningIconXs-Mask",
|
|
15581
|
-
fill:
|
|
15587
|
+
id: "WarningIconXs-Mask-".concat(iconIndex),
|
|
15588
|
+
fill: color,
|
|
15582
15589
|
fillRule: "nonzero",
|
|
15583
|
-
xlinkHref: "#WarningIconXs-path-1"
|
|
15590
|
+
xlinkHref: "#WarningIconXs-path-1-".concat(iconIndex)
|
|
15584
15591
|
}), /*#__PURE__*/React.createElement("polygon", {
|
|
15585
|
-
id: "WarningIconXs-Path",
|
|
15586
|
-
fill:
|
|
15592
|
+
id: "WarningIconXs-Path-".concat(iconIndex),
|
|
15593
|
+
fill: color,
|
|
15587
15594
|
fillRule: "nonzero",
|
|
15588
|
-
mask: "url(#WarningIconXs-mask-2)",
|
|
15595
|
+
mask: "url(#WarningIconXs-mask-2-".concat(iconIndex, ")"),
|
|
15589
15596
|
points: "-2.84217094e-14 -4.26325641e-14 20 -4.26325641e-14 20 20 -2.84217094e-14 20"
|
|
15590
15597
|
})))));
|
|
15591
15598
|
};
|
|
@@ -23688,10 +23695,10 @@ var fallbackValues$i = {
|
|
|
23688
23695
|
popoverTriggerColor: popoverTriggerColor
|
|
23689
23696
|
};
|
|
23690
23697
|
|
|
23691
|
-
var arrowBorder = function arrowBorder(direction) {
|
|
23692
|
-
var width = arguments.length >
|
|
23698
|
+
var arrowBorder = function arrowBorder(borderColor, direction) {
|
|
23699
|
+
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
|
|
23693
23700
|
var angle = "".concat(width, " solid transparent");
|
|
23694
|
-
var straight = "".concat(width, " solid
|
|
23701
|
+
var straight = "".concat(width, " solid ").concat(borderColor);
|
|
23695
23702
|
|
|
23696
23703
|
if (direction == "down") {
|
|
23697
23704
|
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
|
|
@@ -23733,7 +23740,12 @@ var Popover = function Popover(_ref) {
|
|
|
23733
23740
|
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
23734
23741
|
_ref$transform = _ref.transform,
|
|
23735
23742
|
transform = _ref$transform === void 0 ? "none" : _ref$transform,
|
|
23736
|
-
buttonExtraStyles = _ref.buttonExtraStyles
|
|
23743
|
+
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
23744
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
23745
|
+
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
23746
|
+
_ref$borderColor = _ref.borderColor,
|
|
23747
|
+
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
23748
|
+
popoverExtraStyles = _ref.popoverExtraStyles;
|
|
23737
23749
|
var hoverColor = themeValues.hoverColor,
|
|
23738
23750
|
activeColor = themeValues.activeColor,
|
|
23739
23751
|
popoverTriggerColor = themeValues.popoverTriggerColor;
|
|
@@ -23819,7 +23831,7 @@ var Popover = function Popover(_ref) {
|
|
|
23819
23831
|
color: popoverTriggerColor,
|
|
23820
23832
|
extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
|
|
23821
23833
|
}, triggerText)), /*#__PURE__*/React.createElement(Box, {
|
|
23822
|
-
background:
|
|
23834
|
+
background: backgroundColor,
|
|
23823
23835
|
borderRadius: "4px",
|
|
23824
23836
|
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
23825
23837
|
id: "Disclosed".concat(popoverID),
|
|
@@ -23828,10 +23840,10 @@ var Popover = function Popover(_ref) {
|
|
|
23828
23840
|
tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
|
|
23829
23841
|
minWidth: minWidth,
|
|
23830
23842
|
maxWidth: maxWidth,
|
|
23831
|
-
extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n transform: ").concat(transform, ";\n ")
|
|
23843
|
+
extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n transform: ").concat(transform, ";\n ").concat(popoverExtraStyles, ";\n ")
|
|
23832
23844
|
}, /*#__PURE__*/React.createElement(Paragraph$1, null, content), /*#__PURE__*/React.createElement(Box, {
|
|
23833
23845
|
padding: "0",
|
|
23834
|
-
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
|
|
23846
|
+
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
|
|
23835
23847
|
})));
|
|
23836
23848
|
};
|
|
23837
23849
|
|