@thecb/components 4.1.7 → 4.1.8-beta.0
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
|
@@ -14696,6 +14696,30 @@ var VoidedIcon = function VoidedIcon() {
|
|
|
14696
14696
|
}))));
|
|
14697
14697
|
};
|
|
14698
14698
|
|
|
14699
|
+
var StatusUnknownIcon = function StatusUnknownIcon() {
|
|
14700
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
14701
|
+
width: "32px",
|
|
14702
|
+
height: "32px",
|
|
14703
|
+
viewBox: "0 0 32 32",
|
|
14704
|
+
version: "1.1",
|
|
14705
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14706
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
14707
|
+
}, /*#__PURE__*/React__default.createElement("g", {
|
|
14708
|
+
id: "STOR-3203",
|
|
14709
|
+
stroke: "none",
|
|
14710
|
+
strokeWidth: "1",
|
|
14711
|
+
fill: "none",
|
|
14712
|
+
fillRule: "evenodd"
|
|
14713
|
+
}, /*#__PURE__*/React__default.createElement("g", {
|
|
14714
|
+
id: "Icons",
|
|
14715
|
+
transform: "translate(-64.000000, -736.000000)",
|
|
14716
|
+
fill: "#6E727E"
|
|
14717
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
14718
|
+
d: "M80,736 C88.836556,736 96,743.163444 96,752 C96,760.836556 88.836556,768 80,768 C71.163444,768 64,760.836556 64,752 C64,743.163444 71.163444,736 80,736 Z M80.85,757 L78.85,757 L78.85,759 L80.85,759 L80.85,757 Z M80.1460007,745 C78.0670004,745 76.4650001,746.017 75.7,747.799 L75.7,747.799 L77.5900003,748.294001 L77.6622133,748.125985 C78.1059448,747.191195 79.1250006,746.557 80.1280007,746.557 C81.2800009,746.557 82.099001,747.187 82.099001,748.195001 C82.099001,750.301001 78.9670005,751.093001 78.9670005,754.459002 L78.9670005,754.459002 L80.7670008,754.459002 L80.7792965,754.169347 C81.0061162,751.541289 84.2950014,750.971966 84.2950014,748.087001 C84.2950014,746.341 82.6480011,745 80.1460007,745 Z",
|
|
14719
|
+
id: "status-icon---default-/-unknown"
|
|
14720
|
+
}))));
|
|
14721
|
+
};
|
|
14722
|
+
|
|
14699
14723
|
var color$2 = "#15749D";
|
|
14700
14724
|
var hoverColor$1 = "#116285";
|
|
14701
14725
|
var activeColor$1 = "#0E506D";
|
|
@@ -18842,7 +18866,7 @@ function _templateObject3$5() {
|
|
|
18842
18866
|
}
|
|
18843
18867
|
|
|
18844
18868
|
function _templateObject2$b() {
|
|
18845
|
-
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"]);
|
|
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: ", ";\n min-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"]);
|
|
18846
18870
|
|
|
18847
18871
|
_templateObject2$b = function _templateObject2() {
|
|
18848
18872
|
return data;
|
|
@@ -18852,7 +18876,7 @@ function _templateObject2$b() {
|
|
|
18852
18876
|
}
|
|
18853
18877
|
|
|
18854
18878
|
function _templateObject$n() {
|
|
18855
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n transition: transform 0.3s ease;\n ", "\n"]);
|
|
18879
|
+
var data = _taggedTemplateLiteral(["\n display: flex;\n padding-left: 8px;\n flex-direction: column;\n justify-content: center;\n transition: transform 0.3s ease;\n ", "\n"]);
|
|
18856
18880
|
|
|
18857
18881
|
_templateObject$n = function _templateObject() {
|
|
18858
18882
|
return data;
|
|
@@ -18865,47 +18889,52 @@ var IconWrapper = styled__default.div(_templateObject$n(), function (_ref) {
|
|
|
18865
18889
|
return open ? "transform: rotate(-180deg)" : "";
|
|
18866
18890
|
});
|
|
18867
18891
|
var DropdownContentWrapper = styled__default.div(_templateObject2$b(), GREY_CHATEAU, WHITE, function (_ref2) {
|
|
18868
|
-
var
|
|
18892
|
+
var widthFitOptions = _ref2.widthFitOptions;
|
|
18893
|
+
return widthFitOptions ? "fit-content" : "100%";
|
|
18894
|
+
}, function (_ref3) {
|
|
18895
|
+
var maxHeight = _ref3.maxHeight;
|
|
18869
18896
|
return maxHeight || "400px";
|
|
18870
18897
|
});
|
|
18871
|
-
var DropdownItemWrapper = styled__default.div(_templateObject3$5(), function (
|
|
18872
|
-
var selected =
|
|
18873
|
-
themeValues =
|
|
18898
|
+
var DropdownItemWrapper = styled__default.div(_templateObject3$5(), function (_ref4) {
|
|
18899
|
+
var selected = _ref4.selected,
|
|
18900
|
+
themeValues = _ref4.themeValues;
|
|
18874
18901
|
return selected ? themeValues.selectedColor : WHITE;
|
|
18875
|
-
}, function (_ref4) {
|
|
18876
|
-
var disabled = _ref4.disabled;
|
|
18877
|
-
return disabled ? "default" : "pointer";
|
|
18878
18902
|
}, function (_ref5) {
|
|
18879
|
-
var
|
|
18880
|
-
|
|
18881
|
-
themeValues = _ref5.themeValues;
|
|
18882
|
-
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
18903
|
+
var disabled = _ref5.disabled;
|
|
18904
|
+
return disabled ? "default" : "pointer";
|
|
18883
18905
|
}, function (_ref6) {
|
|
18884
18906
|
var selected = _ref6.selected,
|
|
18885
18907
|
disabled = _ref6.disabled,
|
|
18886
18908
|
themeValues = _ref6.themeValues;
|
|
18887
18909
|
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;
|
|
18888
18915
|
});
|
|
18889
|
-
var SearchInput = styled__default.input(_templateObject4$2(), function (
|
|
18890
|
-
var themeValues =
|
|
18916
|
+
var SearchInput = styled__default.input(_templateObject4$2(), function (_ref8) {
|
|
18917
|
+
var themeValues = _ref8.themeValues;
|
|
18891
18918
|
return themeValues.hoverColor && themeValues.hoverColor;
|
|
18892
18919
|
});
|
|
18893
18920
|
|
|
18894
|
-
var Dropdown = function Dropdown(
|
|
18921
|
+
var Dropdown = function Dropdown(_ref9) {
|
|
18895
18922
|
var _options$find;
|
|
18896
18923
|
|
|
18897
|
-
var placeholder =
|
|
18898
|
-
options =
|
|
18899
|
-
value =
|
|
18900
|
-
isOpen =
|
|
18901
|
-
isError =
|
|
18902
|
-
onSelect =
|
|
18903
|
-
|
|
18904
|
-
disabledValues =
|
|
18905
|
-
|
|
18906
|
-
onClick =
|
|
18907
|
-
themeValues =
|
|
18908
|
-
maxHeight =
|
|
18924
|
+
var placeholder = _ref9.placeholder,
|
|
18925
|
+
options = _ref9.options,
|
|
18926
|
+
value = _ref9.value,
|
|
18927
|
+
isOpen = _ref9.isOpen,
|
|
18928
|
+
isError = _ref9.isError,
|
|
18929
|
+
onSelect = _ref9.onSelect,
|
|
18930
|
+
_ref9$disabledValues = _ref9.disabledValues,
|
|
18931
|
+
disabledValues = _ref9$disabledValues === void 0 ? [] : _ref9$disabledValues,
|
|
18932
|
+
_ref9$onClick = _ref9.onClick,
|
|
18933
|
+
onClick = _ref9$onClick === void 0 ? noop : _ref9$onClick,
|
|
18934
|
+
themeValues = _ref9.themeValues,
|
|
18935
|
+
maxHeight = _ref9.maxHeight,
|
|
18936
|
+
_ref9$widthFitOptions = _ref9.widthFitOptions,
|
|
18937
|
+
widthFitOptions = _ref9$widthFitOptions === void 0 ? false : _ref9$widthFitOptions;
|
|
18909
18938
|
|
|
18910
18939
|
var _useState = React.useState(""),
|
|
18911
18940
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19001,7 +19030,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19001
19030
|
break;
|
|
19002
19031
|
}
|
|
19003
19032
|
|
|
19004
|
-
if (keyCode > 64 && keyCode < 91 || keyCode == 32) {
|
|
19033
|
+
if (keyCode > 64 && keyCode < 91 || keyCode == 32 || keyCode == 189) {
|
|
19005
19034
|
e.preventDefault();
|
|
19006
19035
|
setInputValue(inputValue + key);
|
|
19007
19036
|
}
|
|
@@ -19072,6 +19101,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19072
19101
|
maxHeight: maxHeight,
|
|
19073
19102
|
open: isOpen,
|
|
19074
19103
|
ref: dropdownRef,
|
|
19104
|
+
widthFitOptions: widthFitOptions,
|
|
19075
19105
|
tabIndex: 0
|
|
19076
19106
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19077
19107
|
childGap: "0"
|
|
@@ -40748,6 +40778,7 @@ exports.SolidDivider = SolidDivider$1;
|
|
|
40748
40778
|
exports.Spinner = Spinner$2;
|
|
40749
40779
|
exports.Stack = Stack;
|
|
40750
40780
|
exports.StateProvinceDropdown = FormStateDropdown;
|
|
40781
|
+
exports.StatusUnknownIcon = StatusUnknownIcon;
|
|
40751
40782
|
exports.SuccessfulIcon = SuccessfulIcon;
|
|
40752
40783
|
exports.Switcher = Switcher;
|
|
40753
40784
|
exports.TabSidebar = TabSidebar$1;
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ import { themeComponent } from "../../../util/themeUtils";
|
|
|
17
17
|
|
|
18
18
|
const IconWrapper = styled.div`
|
|
19
19
|
display: flex;
|
|
20
|
+
padding-left: 8px;
|
|
20
21
|
flex-direction: column;
|
|
21
22
|
justify-content: center;
|
|
22
23
|
transition: transform 0.3s ease;
|
|
@@ -30,7 +31,8 @@ const DropdownContentWrapper = styled.div`
|
|
|
30
31
|
background-color: ${WHITE};
|
|
31
32
|
padding: 8px 0 8px;
|
|
32
33
|
position: absolute;
|
|
33
|
-
width: 100
|
|
34
|
+
width: ${({ widthFitOptions }) => (widthFitOptions ? "fit-content" : "100%")};
|
|
35
|
+
min-width: 100%;
|
|
34
36
|
max-height: ${({ maxHeight }) => maxHeight || "400px"};
|
|
35
37
|
overflow-y: scroll;
|
|
36
38
|
z-index: 1;
|
|
@@ -89,7 +91,8 @@ const Dropdown = ({
|
|
|
89
91
|
disabledValues = [],
|
|
90
92
|
onClick = noop,
|
|
91
93
|
themeValues,
|
|
92
|
-
maxHeight
|
|
94
|
+
maxHeight,
|
|
95
|
+
widthFitOptions = false
|
|
93
96
|
}) => {
|
|
94
97
|
const [inputValue, setInputValue] = useState("");
|
|
95
98
|
const [optionsState, setOptionsState] = useState([]);
|
|
@@ -151,7 +154,7 @@ const Dropdown = ({
|
|
|
151
154
|
setInputValue(inputValue.slice(0, -1));
|
|
152
155
|
break;
|
|
153
156
|
}
|
|
154
|
-
if ((keyCode > 64 && keyCode < 91) || keyCode == 32) {
|
|
157
|
+
if ((keyCode > 64 && keyCode < 91) || keyCode == 32 || keyCode == 189) {
|
|
155
158
|
e.preventDefault();
|
|
156
159
|
setInputValue(inputValue + key);
|
|
157
160
|
}
|
|
@@ -247,6 +250,7 @@ const Dropdown = ({
|
|
|
247
250
|
maxHeight={maxHeight}
|
|
248
251
|
open={isOpen}
|
|
249
252
|
ref={dropdownRef}
|
|
253
|
+
widthFitOptions={widthFitOptions}
|
|
250
254
|
tabIndex={0}
|
|
251
255
|
>
|
|
252
256
|
<Stack childGap="0">
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const StatusUnknownIcon = () => (
|
|
4
|
+
<svg
|
|
5
|
+
width="32px"
|
|
6
|
+
height="32px"
|
|
7
|
+
viewBox="0 0 32 32"
|
|
8
|
+
version="1.1"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
11
|
+
>
|
|
12
|
+
<g
|
|
13
|
+
id="STOR-3203"
|
|
14
|
+
stroke="none"
|
|
15
|
+
strokeWidth="1"
|
|
16
|
+
fill="none"
|
|
17
|
+
fillRule="evenodd"
|
|
18
|
+
>
|
|
19
|
+
<g
|
|
20
|
+
id="Icons"
|
|
21
|
+
transform="translate(-64.000000, -736.000000)"
|
|
22
|
+
fill="#6E727E"
|
|
23
|
+
>
|
|
24
|
+
<path
|
|
25
|
+
d="M80,736 C88.836556,736 96,743.163444 96,752 C96,760.836556 88.836556,768 80,768 C71.163444,768 64,760.836556 64,752 C64,743.163444 71.163444,736 80,736 Z M80.85,757 L78.85,757 L78.85,759 L80.85,759 L80.85,757 Z M80.1460007,745 C78.0670004,745 76.4650001,746.017 75.7,747.799 L75.7,747.799 L77.5900003,748.294001 L77.6622133,748.125985 C78.1059448,747.191195 79.1250006,746.557 80.1280007,746.557 C81.2800009,746.557 82.099001,747.187 82.099001,748.195001 C82.099001,750.301001 78.9670005,751.093001 78.9670005,754.459002 L78.9670005,754.459002 L80.7670008,754.459002 L80.7792965,754.169347 C81.0061162,751.541289 84.2950014,750.971966 84.2950014,748.087001 C84.2950014,746.341 82.6480011,745 80.1460007,745 Z"
|
|
26
|
+
id="status-icon---default-/-unknown"
|
|
27
|
+
></path>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export default StatusUnknownIcon;
|
|
@@ -36,7 +36,8 @@ import {
|
|
|
36
36
|
RejectedIcon,
|
|
37
37
|
RejectedVelocityIcon,
|
|
38
38
|
SuccessfulIcon,
|
|
39
|
-
VoidedIcon
|
|
39
|
+
VoidedIcon,
|
|
40
|
+
StatusUnknownIcon
|
|
40
41
|
} from "./index";
|
|
41
42
|
|
|
42
43
|
const story = page({
|
|
@@ -80,3 +81,4 @@ export const rejectedIcon = () => <RejectedIcon />;
|
|
|
80
81
|
export const rejectedVelocityIcon = () => <RejectedVelocityIcon />;
|
|
81
82
|
export const successfulIcon = () => <SuccessfulIcon />;
|
|
82
83
|
export const voidedIcon = () => <VoidedIcon />;
|
|
84
|
+
export const statusUnknownIcon = () => <StatusUnknownIcon />;
|
|
@@ -38,6 +38,7 @@ import RejectedIcon from "./RejectedIcon";
|
|
|
38
38
|
import RejectedVelocityIcon from "./RejectedVelocityIcon";
|
|
39
39
|
import SuccessfulIcon from "./SuccessfulIcon";
|
|
40
40
|
import VoidedIcon from "./VoidedIcon";
|
|
41
|
+
import StatusUnknownIcon from "./StatusUnknownIcon";
|
|
41
42
|
|
|
42
43
|
export {
|
|
43
44
|
AccountsIcon,
|
|
@@ -79,5 +80,6 @@ export {
|
|
|
79
80
|
RejectedIcon,
|
|
80
81
|
RejectedVelocityIcon,
|
|
81
82
|
SuccessfulIcon,
|
|
82
|
-
VoidedIcon
|
|
83
|
+
VoidedIcon,
|
|
84
|
+
StatusUnknownIcon
|
|
83
85
|
};
|