@thecb/components 4.1.8-beta.0 → 4.1.9
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
CHANGED
|
@@ -14720,6 +14720,47 @@ var StatusUnknownIcon = function StatusUnknownIcon() {
|
|
|
14720
14720
|
}))));
|
|
14721
14721
|
};
|
|
14722
14722
|
|
|
14723
|
+
var CarrotIcon = function CarrotIcon(_ref) {
|
|
14724
|
+
var themeValues = _ref.themeValues;
|
|
14725
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
14726
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14727
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
14728
|
+
width: "10",
|
|
14729
|
+
height: "5",
|
|
14730
|
+
viewBox: "0 0 10 5"
|
|
14731
|
+
}, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("path", {
|
|
14732
|
+
id: "carrot-path-1",
|
|
14733
|
+
d: "M6.99999958 9.9999994L11.9999993 14.9999991 16.999999 9.9999994z"
|
|
14734
|
+
})), /*#__PURE__*/React__default.createElement("g", {
|
|
14735
|
+
fill: "none",
|
|
14736
|
+
fillRule: "evenodd",
|
|
14737
|
+
stroke: "none",
|
|
14738
|
+
strokeWidth: "1"
|
|
14739
|
+
}, /*#__PURE__*/React__default.createElement("g", {
|
|
14740
|
+
transform: "translate(-423 -974)"
|
|
14741
|
+
}, /*#__PURE__*/React__default.createElement("g", {
|
|
14742
|
+
transform: "translate(372 958)"
|
|
14743
|
+
}, /*#__PURE__*/React__default.createElement("g", {
|
|
14744
|
+
transform: "translate(44 6)"
|
|
14745
|
+
}, /*#__PURE__*/React__default.createElement("mask", {
|
|
14746
|
+
id: "carrot-mask-2",
|
|
14747
|
+
fill: "#fff"
|
|
14748
|
+
}, /*#__PURE__*/React__default.createElement("use", {
|
|
14749
|
+
xlinkHref: "#carrot-path-1"
|
|
14750
|
+
})), /*#__PURE__*/React__default.createElement("use", {
|
|
14751
|
+
fill: "#000",
|
|
14752
|
+
xlinkHref: "#carrot-path-1"
|
|
14753
|
+
}), /*#__PURE__*/React__default.createElement("g", {
|
|
14754
|
+
fill: themeValues.singleIconColor,
|
|
14755
|
+
fillRule: "nonzero",
|
|
14756
|
+
mask: "url(#carrot-mask-2)"
|
|
14757
|
+
}, /*#__PURE__*/React__default.createElement("g", null, /*#__PURE__*/React__default.createElement("path", {
|
|
14758
|
+
d: "M0 0H24V24H0z"
|
|
14759
|
+
}))))))));
|
|
14760
|
+
};
|
|
14761
|
+
|
|
14762
|
+
var CarrotIcon$1 = themeComponent(CarrotIcon, "Icons", fallbackValues$2, "darkMode");
|
|
14763
|
+
|
|
14723
14764
|
var color$2 = "#15749D";
|
|
14724
14765
|
var hoverColor$1 = "#116285";
|
|
14725
14766
|
var activeColor$1 = "#0E506D";
|
|
@@ -18866,7 +18907,7 @@ function _templateObject3$5() {
|
|
|
18866
18907
|
}
|
|
18867
18908
|
|
|
18868
18909
|
function _templateObject2$b() {
|
|
18869
|
-
var data = _taggedTemplateLiteral(["\n transform-origin: 0 0;\n border: 1px solid ", ";\n border-radius: 2px;\n background-color: ", ";\n padding: 8px 0 8px;\n position: absolute;\n width:
|
|
18910
|
+
var data = _taggedTemplateLiteral(["\n transform-origin: 0 0;\n border: 1px solid ", ";\n border-radius: 2px;\n background-color: ", ";\n padding: 8px 0 8px;\n position: absolute;\n width: 100%;\n max-height: ", ";\n overflow-y: scroll;\n z-index: 1;\n box-sizing: border-box;\n &:focus {\n outline: none;\n }\n"]);
|
|
18870
18911
|
|
|
18871
18912
|
_templateObject2$b = function _templateObject2() {
|
|
18872
18913
|
return data;
|
|
@@ -18876,7 +18917,7 @@ function _templateObject2$b() {
|
|
|
18876
18917
|
}
|
|
18877
18918
|
|
|
18878
18919
|
function _templateObject$n() {
|
|
18879
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n
|
|
18920
|
+
var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n transition: transform 0.3s ease;\n ", "\n"]);
|
|
18880
18921
|
|
|
18881
18922
|
_templateObject$n = function _templateObject() {
|
|
18882
18923
|
return data;
|
|
@@ -18889,52 +18930,47 @@ var IconWrapper = styled__default.div(_templateObject$n(), function (_ref) {
|
|
|
18889
18930
|
return open ? "transform: rotate(-180deg)" : "";
|
|
18890
18931
|
});
|
|
18891
18932
|
var DropdownContentWrapper = styled__default.div(_templateObject2$b(), GREY_CHATEAU, WHITE, function (_ref2) {
|
|
18892
|
-
var
|
|
18893
|
-
return widthFitOptions ? "fit-content" : "100%";
|
|
18894
|
-
}, function (_ref3) {
|
|
18895
|
-
var maxHeight = _ref3.maxHeight;
|
|
18933
|
+
var maxHeight = _ref2.maxHeight;
|
|
18896
18934
|
return maxHeight || "400px";
|
|
18897
18935
|
});
|
|
18898
|
-
var DropdownItemWrapper = styled__default.div(_templateObject3$5(), function (
|
|
18899
|
-
var selected =
|
|
18900
|
-
themeValues =
|
|
18936
|
+
var DropdownItemWrapper = styled__default.div(_templateObject3$5(), function (_ref3) {
|
|
18937
|
+
var selected = _ref3.selected,
|
|
18938
|
+
themeValues = _ref3.themeValues;
|
|
18901
18939
|
return selected ? themeValues.selectedColor : WHITE;
|
|
18902
|
-
}, function (
|
|
18903
|
-
var disabled =
|
|
18940
|
+
}, function (_ref4) {
|
|
18941
|
+
var disabled = _ref4.disabled;
|
|
18904
18942
|
return disabled ? "default" : "pointer";
|
|
18943
|
+
}, function (_ref5) {
|
|
18944
|
+
var selected = _ref5.selected,
|
|
18945
|
+
disabled = _ref5.disabled,
|
|
18946
|
+
themeValues = _ref5.themeValues;
|
|
18947
|
+
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
18905
18948
|
}, function (_ref6) {
|
|
18906
18949
|
var selected = _ref6.selected,
|
|
18907
18950
|
disabled = _ref6.disabled,
|
|
18908
18951
|
themeValues = _ref6.themeValues;
|
|
18909
18952
|
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
18910
|
-
}, function (_ref7) {
|
|
18911
|
-
var selected = _ref7.selected,
|
|
18912
|
-
disabled = _ref7.disabled,
|
|
18913
|
-
themeValues = _ref7.themeValues;
|
|
18914
|
-
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
18915
18953
|
});
|
|
18916
|
-
var SearchInput = styled__default.input(_templateObject4$2(), function (
|
|
18917
|
-
var themeValues =
|
|
18954
|
+
var SearchInput = styled__default.input(_templateObject4$2(), function (_ref7) {
|
|
18955
|
+
var themeValues = _ref7.themeValues;
|
|
18918
18956
|
return themeValues.hoverColor && themeValues.hoverColor;
|
|
18919
18957
|
});
|
|
18920
18958
|
|
|
18921
|
-
var Dropdown = function Dropdown(
|
|
18959
|
+
var Dropdown = function Dropdown(_ref8) {
|
|
18922
18960
|
var _options$find;
|
|
18923
18961
|
|
|
18924
|
-
var placeholder =
|
|
18925
|
-
options =
|
|
18926
|
-
value =
|
|
18927
|
-
isOpen =
|
|
18928
|
-
isError =
|
|
18929
|
-
onSelect =
|
|
18930
|
-
|
|
18931
|
-
disabledValues =
|
|
18932
|
-
|
|
18933
|
-
onClick =
|
|
18934
|
-
themeValues =
|
|
18935
|
-
maxHeight =
|
|
18936
|
-
_ref9$widthFitOptions = _ref9.widthFitOptions,
|
|
18937
|
-
widthFitOptions = _ref9$widthFitOptions === void 0 ? false : _ref9$widthFitOptions;
|
|
18962
|
+
var placeholder = _ref8.placeholder,
|
|
18963
|
+
options = _ref8.options,
|
|
18964
|
+
value = _ref8.value,
|
|
18965
|
+
isOpen = _ref8.isOpen,
|
|
18966
|
+
isError = _ref8.isError,
|
|
18967
|
+
onSelect = _ref8.onSelect,
|
|
18968
|
+
_ref8$disabledValues = _ref8.disabledValues,
|
|
18969
|
+
disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
|
|
18970
|
+
_ref8$onClick = _ref8.onClick,
|
|
18971
|
+
onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
|
|
18972
|
+
themeValues = _ref8.themeValues,
|
|
18973
|
+
maxHeight = _ref8.maxHeight;
|
|
18938
18974
|
|
|
18939
18975
|
var _useState = React.useState(""),
|
|
18940
18976
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19030,7 +19066,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19030
19066
|
break;
|
|
19031
19067
|
}
|
|
19032
19068
|
|
|
19033
|
-
if (keyCode > 64 && keyCode < 91 || keyCode == 32
|
|
19069
|
+
if (keyCode > 64 && keyCode < 91 || keyCode == 32) {
|
|
19034
19070
|
e.preventDefault();
|
|
19035
19071
|
setInputValue(inputValue + key);
|
|
19036
19072
|
}
|
|
@@ -19101,7 +19137,6 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19101
19137
|
maxHeight: maxHeight,
|
|
19102
19138
|
open: isOpen,
|
|
19103
19139
|
ref: dropdownRef,
|
|
19104
|
-
widthFitOptions: widthFitOptions,
|
|
19105
19140
|
tabIndex: 0
|
|
19106
19141
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19107
19142
|
childGap: "0"
|
|
@@ -36540,9 +36575,9 @@ var fallbackValues$u = {
|
|
|
36540
36575
|
var NavMenuDesktop = function NavMenuDesktop(_ref) {
|
|
36541
36576
|
var id = _ref.id,
|
|
36542
36577
|
_ref$top = _ref.top,
|
|
36543
|
-
top = _ref$top === void 0 ? "
|
|
36578
|
+
top = _ref$top === void 0 ? "115%" : _ref$top,
|
|
36544
36579
|
_ref$left = _ref.left,
|
|
36545
|
-
left = _ref$left === void 0 ? "-
|
|
36580
|
+
left = _ref$left === void 0 ? "-165%" : _ref$left,
|
|
36546
36581
|
_ref$menuContent = _ref.menuContent,
|
|
36547
36582
|
menuContent = _ref$menuContent === void 0 ? [] : _ref$menuContent,
|
|
36548
36583
|
_ref$visible = _ref.visible,
|
|
@@ -36565,7 +36600,7 @@ var NavMenuDesktop = function NavMenuDesktop(_ref) {
|
|
|
36565
36600
|
extraStyles: "position: relative; ".concat(menuCarat),
|
|
36566
36601
|
background: themeValues.backgroundColor,
|
|
36567
36602
|
borderRadius: "5px",
|
|
36568
|
-
boxShadow: "0px
|
|
36603
|
+
boxShadow: "0px 1px 8px -1px rgba(0, 0, 0, 0.3), 0px 1px 4px 0px ".concat(themeValues.shadowColor, ", 0px 7px 32px 0px ").concat(themeValues.shadowColor),
|
|
36569
36604
|
onMouseEnter: onMouseEnter,
|
|
36570
36605
|
onMouseLeave: onMouseLeave,
|
|
36571
36606
|
onFocus: onFocus,
|
|
@@ -40680,6 +40715,7 @@ exports.Breadcrumb = Breadcrumbs;
|
|
|
40680
40715
|
exports.ButtonWithAction = ButtonWithAction;
|
|
40681
40716
|
exports.ButtonWithLink = ButtonWithLink;
|
|
40682
40717
|
exports.CalendarIcon = CalendarIcon;
|
|
40718
|
+
exports.CarrotIcon = CarrotIcon$1;
|
|
40683
40719
|
exports.Center = Center;
|
|
40684
40720
|
exports.CenterSingle = CenterSingle$1;
|
|
40685
40721
|
exports.CenterStack = CenterStack$1;
|
package/package.json
CHANGED
|
@@ -17,7 +17,6 @@ import { themeComponent } from "../../../util/themeUtils";
|
|
|
17
17
|
|
|
18
18
|
const IconWrapper = styled.div`
|
|
19
19
|
display: flex;
|
|
20
|
-
padding-left: 8px;
|
|
21
20
|
flex-direction: column;
|
|
22
21
|
justify-content: center;
|
|
23
22
|
transition: transform 0.3s ease;
|
|
@@ -31,8 +30,7 @@ const DropdownContentWrapper = styled.div`
|
|
|
31
30
|
background-color: ${WHITE};
|
|
32
31
|
padding: 8px 0 8px;
|
|
33
32
|
position: absolute;
|
|
34
|
-
width:
|
|
35
|
-
min-width: 100%;
|
|
33
|
+
width: 100%;
|
|
36
34
|
max-height: ${({ maxHeight }) => maxHeight || "400px"};
|
|
37
35
|
overflow-y: scroll;
|
|
38
36
|
z-index: 1;
|
|
@@ -91,8 +89,7 @@ const Dropdown = ({
|
|
|
91
89
|
disabledValues = [],
|
|
92
90
|
onClick = noop,
|
|
93
91
|
themeValues,
|
|
94
|
-
maxHeight
|
|
95
|
-
widthFitOptions = false
|
|
92
|
+
maxHeight
|
|
96
93
|
}) => {
|
|
97
94
|
const [inputValue, setInputValue] = useState("");
|
|
98
95
|
const [optionsState, setOptionsState] = useState([]);
|
|
@@ -154,7 +151,7 @@ const Dropdown = ({
|
|
|
154
151
|
setInputValue(inputValue.slice(0, -1));
|
|
155
152
|
break;
|
|
156
153
|
}
|
|
157
|
-
if ((keyCode > 64 && keyCode < 91) || keyCode == 32
|
|
154
|
+
if ((keyCode > 64 && keyCode < 91) || keyCode == 32) {
|
|
158
155
|
e.preventDefault();
|
|
159
156
|
setInputValue(inputValue + key);
|
|
160
157
|
}
|
|
@@ -250,7 +247,6 @@ const Dropdown = ({
|
|
|
250
247
|
maxHeight={maxHeight}
|
|
251
248
|
open={isOpen}
|
|
252
249
|
ref={dropdownRef}
|
|
253
|
-
widthFitOptions={widthFitOptions}
|
|
254
250
|
tabIndex={0}
|
|
255
251
|
>
|
|
256
252
|
<Stack childGap="0">
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { fallbackValues } from "./Icons.theme";
|
|
3
|
+
import { themeComponent } from "../../../util/themeUtils";
|
|
4
|
+
|
|
5
|
+
const CarrotIcon = ({ themeValues }) => {
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
10
|
+
width="10"
|
|
11
|
+
height="5"
|
|
12
|
+
viewBox="0 0 10 5"
|
|
13
|
+
>
|
|
14
|
+
<defs>
|
|
15
|
+
<path
|
|
16
|
+
id="carrot-path-1"
|
|
17
|
+
d="M6.99999958 9.9999994L11.9999993 14.9999991 16.999999 9.9999994z"
|
|
18
|
+
></path>
|
|
19
|
+
</defs>
|
|
20
|
+
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
|
|
21
|
+
<g transform="translate(-423 -974)">
|
|
22
|
+
<g transform="translate(372 958)">
|
|
23
|
+
<g transform="translate(44 6)">
|
|
24
|
+
<mask id="carrot-mask-2" fill="#fff">
|
|
25
|
+
<use xlinkHref="#carrot-path-1"></use>
|
|
26
|
+
</mask>
|
|
27
|
+
<use fill="#000" xlinkHref="#carrot-path-1"></use>
|
|
28
|
+
<g
|
|
29
|
+
fill={themeValues.singleIconColor}
|
|
30
|
+
fillRule="nonzero"
|
|
31
|
+
mask="url(#carrot-mask-2)"
|
|
32
|
+
>
|
|
33
|
+
<g>
|
|
34
|
+
<path d="M0 0H24V24H0z"></path>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</g>
|
|
40
|
+
</g>
|
|
41
|
+
</svg>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default themeComponent(CarrotIcon, "Icons", fallbackValues, "darkMode");
|
|
@@ -39,6 +39,7 @@ import RejectedVelocityIcon from "./RejectedVelocityIcon";
|
|
|
39
39
|
import SuccessfulIcon from "./SuccessfulIcon";
|
|
40
40
|
import VoidedIcon from "./VoidedIcon";
|
|
41
41
|
import StatusUnknownIcon from "./StatusUnknownIcon";
|
|
42
|
+
import CarrotIcon from "./CarrotIcon";
|
|
42
43
|
|
|
43
44
|
export {
|
|
44
45
|
AccountsIcon,
|
|
@@ -81,5 +82,6 @@ export {
|
|
|
81
82
|
RejectedVelocityIcon,
|
|
82
83
|
SuccessfulIcon,
|
|
83
84
|
VoidedIcon,
|
|
84
|
-
StatusUnknownIcon
|
|
85
|
+
StatusUnknownIcon,
|
|
86
|
+
CarrotIcon
|
|
85
87
|
};
|
|
@@ -5,8 +5,8 @@ import { themeComponent } from "../../../util/themeUtils";
|
|
|
5
5
|
|
|
6
6
|
const NavMenuDesktop = ({
|
|
7
7
|
id,
|
|
8
|
-
top = "
|
|
9
|
-
left = "-
|
|
8
|
+
top = "115%",
|
|
9
|
+
left = "-165%",
|
|
10
10
|
menuContent = [],
|
|
11
11
|
visible = true,
|
|
12
12
|
onMouseEnter,
|
|
@@ -25,7 +25,7 @@ const NavMenuDesktop = ({
|
|
|
25
25
|
extraStyles={`position: relative; ${menuCarat}`}
|
|
26
26
|
background={themeValues.backgroundColor}
|
|
27
27
|
borderRadius="5px"
|
|
28
|
-
boxShadow={`0px
|
|
28
|
+
boxShadow={`0px 1px 8px -1px rgba(0, 0, 0, 0.3), 0px 1px 4px 0px ${themeValues.shadowColor}, 0px 7px 32px 0px ${themeValues.shadowColor}`}
|
|
29
29
|
onMouseEnter={onMouseEnter}
|
|
30
30
|
onMouseLeave={onMouseLeave}
|
|
31
31
|
onFocus={onFocus}
|