@activecollab/components 1.0.74 → 1.0.75
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/cjs/components/ComboBox/ComboBox.js +11 -14
- package/dist/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/cjs/components/ComboBox/Styles.js +11 -17
- package/dist/cjs/components/ComboBox/Styles.js.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.d.ts +3 -3
- package/dist/esm/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.js +12 -15
- package/dist/esm/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/esm/components/ComboBox/Styles.d.ts +1 -3
- package/dist/esm/components/ComboBox/Styles.d.ts.map +1 -1
- package/dist/esm/components/ComboBox/Styles.js +9 -15
- package/dist/esm/components/ComboBox/Styles.js.map +1 -1
- package/dist/index.js +20 -29
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9736,28 +9736,20 @@
|
|
|
9736
9736
|
var StyledComboBox = styled__default["default"].div.withConfig({
|
|
9737
9737
|
displayName: "Styles__StyledComboBox",
|
|
9738
9738
|
componentId: "sc-5qvkpb-0"
|
|
9739
|
-
})(["
|
|
9740
|
-
return props.$open && styled.css(["border-color:var(--color-primary);"]);
|
|
9741
|
-
}, function (props) {
|
|
9739
|
+
})(["position:relative;cursor:text;", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
|
|
9742
9740
|
return props.$loading && styled.css(["cursor:progress;"]);
|
|
9743
|
-
}, function (props) {
|
|
9744
|
-
return props.$size == "small" && styled.css(["height:26px;"]);
|
|
9745
|
-
}, function (props) {
|
|
9746
|
-
return props.$size == "big" && styled.css(["height:42px;"]);
|
|
9747
9741
|
});
|
|
9748
9742
|
StyledComboBox.displayName = "StyledComboBox";
|
|
9749
|
-
var
|
|
9750
|
-
displayName: "
|
|
9743
|
+
var StyledComboBoxControls = styled__default["default"].div.withConfig({
|
|
9744
|
+
displayName: "Styles__StyledComboBoxControls",
|
|
9751
9745
|
componentId: "sc-5qvkpb-1"
|
|
9752
|
-
})(["
|
|
9753
|
-
|
|
9754
|
-
});
|
|
9755
|
-
StyledComboBoxWrapper.displayName = "StyledComboBoxWrapper";
|
|
9746
|
+
})(["position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;justify-content:center;"]);
|
|
9747
|
+
StyledComboBoxControls.displayName = "StyledComboBoxControls";
|
|
9756
9748
|
var StyledIconDefaults = styled.css(["flex-shrink:0;cursor:pointer;"]);
|
|
9757
9749
|
var StyledComboBoxCloseSmallIcon = styled__default["default"](CloseSmallIcon$1).withConfig({
|
|
9758
9750
|
displayName: "Styles__StyledComboBoxCloseSmallIcon",
|
|
9759
9751
|
componentId: "sc-5qvkpb-2"
|
|
9760
|
-
})(["", " opacity:0;transition-property:all;transition-duration:0.2s;transition-delay:0.5s;", ":hover &{opacity:1;transition-delay:0s;}"], StyledIconDefaults,
|
|
9752
|
+
})(["", " opacity:0;transition-property:all;transition-duration:0.2s;transition-delay:0.5s;", ":hover &{opacity:1;transition-delay:0s;}"], StyledIconDefaults, StyledComboBox);
|
|
9761
9753
|
StyledComboBoxCloseSmallIcon.displayName = "StyledComboBoxCloseSmallIcon";
|
|
9762
9754
|
var StyledComboBoxCollapseExpandSingleIcon = styled__default["default"](CollapseExpandSingleIcon$1).withConfig({
|
|
9763
9755
|
displayName: "Styles__StyledComboBoxCollapseExpandSingleIcon",
|
|
@@ -9769,7 +9761,9 @@
|
|
|
9769
9761
|
var StyledComboBoxInput = styled__default["default"](Input).withConfig({
|
|
9770
9762
|
displayName: "Styles__StyledComboBoxInput",
|
|
9771
9763
|
componentId: "sc-5qvkpb-4"
|
|
9772
|
-
})(["overflow:hidden;text-overflow:ellipsis;
|
|
9764
|
+
})(["overflow:hidden;text-overflow:ellipsis;width:100%;padding-right:80px;", ":hover &{", "}"], StyledComboBox, {
|
|
9765
|
+
"borderColor": "var(--color-primary)"
|
|
9766
|
+
});
|
|
9773
9767
|
StyledComboBoxInput.displayName = "StyledComboBoxInput";
|
|
9774
9768
|
var StyledComboBoxList = styled__default["default"].div.withConfig({
|
|
9775
9769
|
displayName: "Styles__StyledComboBoxList",
|
|
@@ -9781,7 +9775,7 @@
|
|
|
9781
9775
|
|
|
9782
9776
|
var _excluded$1 = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size"];
|
|
9783
9777
|
var ComboBox = function ComboBox(_ref) {
|
|
9784
|
-
var
|
|
9778
|
+
var _comboBoxRef$current;
|
|
9785
9779
|
|
|
9786
9780
|
var _ref$options = _ref.options,
|
|
9787
9781
|
options = _ref$options === void 0 ? [] : _ref$options,
|
|
@@ -9794,7 +9788,8 @@
|
|
|
9794
9788
|
handleEmptyAction = _ref.handleEmptyAction,
|
|
9795
9789
|
_ref$disabled = _ref.disabled,
|
|
9796
9790
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
9797
|
-
size = _ref.size,
|
|
9791
|
+
_ref$size = _ref.size,
|
|
9792
|
+
size = _ref$size === void 0 ? "regular" : _ref$size,
|
|
9798
9793
|
prop = _objectWithoutProperties(_ref, _excluded$1);
|
|
9799
9794
|
|
|
9800
9795
|
var selectedName = React.useMemo(function () {
|
|
@@ -9851,7 +9846,6 @@
|
|
|
9851
9846
|
e.stopPropagation();
|
|
9852
9847
|
}
|
|
9853
9848
|
}, [open, selectedName]);
|
|
9854
|
-
var formRef = React.useRef(null);
|
|
9855
9849
|
React.useEffect(function () {
|
|
9856
9850
|
open && (childNode === null || childNode === void 0 ? void 0 : childNode.focus());
|
|
9857
9851
|
!open && (childNode === null || childNode === void 0 ? void 0 : childNode.blur());
|
|
@@ -9912,29 +9906,26 @@
|
|
|
9912
9906
|
className: "c-combo-box",
|
|
9913
9907
|
$open: open,
|
|
9914
9908
|
$loading: loading,
|
|
9915
|
-
|
|
9916
|
-
ref: comboBoxRef
|
|
9917
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxWrapper, {
|
|
9909
|
+
ref: comboBoxRef,
|
|
9918
9910
|
onClick: onOpen,
|
|
9919
|
-
onFocus: onOpen
|
|
9920
|
-
ref: formRef,
|
|
9921
|
-
$loading: loading
|
|
9911
|
+
onFocus: onOpen
|
|
9922
9912
|
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxInput, {
|
|
9923
9913
|
ref: handleRef,
|
|
9924
9914
|
value: loading && loadingText ? loadingText : value,
|
|
9925
9915
|
onKeyDown: handleOnKeyDown,
|
|
9926
9916
|
onChange: handleOnChange,
|
|
9927
9917
|
placeholder: placeholder,
|
|
9928
|
-
disabled: disabled
|
|
9929
|
-
|
|
9918
|
+
disabled: disabled,
|
|
9919
|
+
size: size
|
|
9920
|
+
}), !disabled ? /*#__PURE__*/React__default["default"].createElement(StyledComboBoxControls, null, loading ? /*#__PURE__*/React__default["default"].createElement(SpinnerLoader, null) : selected ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
9930
9921
|
onMouseDown: handleMouseDown,
|
|
9931
9922
|
onClick: handleDeselect,
|
|
9932
9923
|
variant: "text gray",
|
|
9933
9924
|
size: "small"
|
|
9934
9925
|
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)) : null, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
|
|
9935
9926
|
$open: open
|
|
9936
|
-
})) : null
|
|
9937
|
-
anchorEl:
|
|
9927
|
+
})) : null, !disabled ? /*#__PURE__*/React__default["default"].createElement(Popper, {
|
|
9928
|
+
anchorEl: comboBoxRef.current,
|
|
9938
9929
|
open: open,
|
|
9939
9930
|
placement: "bottom",
|
|
9940
9931
|
style: {
|
|
@@ -9944,7 +9935,7 @@
|
|
|
9944
9935
|
noIsolation: true,
|
|
9945
9936
|
allowPinchZoom: true
|
|
9946
9937
|
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxList, {
|
|
9947
|
-
$width: (
|
|
9938
|
+
$width: (_comboBoxRef$current = comboBoxRef.current) === null || _comboBoxRef$current === void 0 ? void 0 : _comboBoxRef$current.clientWidth
|
|
9948
9939
|
}, /*#__PURE__*/React__default["default"].createElement(Autocomplete, _extends({}, prop, {
|
|
9949
9940
|
inputEl: childNode,
|
|
9950
9941
|
selected: selected,
|