@activecollab/components 1.0.415 → 1.0.418
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 +12 -5
- package/dist/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/cjs/components/ComboBox/Styles.js +10 -7
- package/dist/cjs/components/ComboBox/Styles.js.map +1 -1
- package/dist/cjs/components/Icons/collection/MobileMenu.js +48 -0
- package/dist/cjs/components/Icons/collection/MobileMenu.js.map +1 -0
- package/dist/cjs/components/Icons/collection/index.js +7 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/components/Steppers/DateStepper/Styles.js +1 -1
- package/dist/cjs/components/Steppers/DateStepper/Styles.js.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.js +12 -5
- package/dist/esm/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/esm/components/ComboBox/Styles.d.ts +1 -0
- package/dist/esm/components/ComboBox/Styles.d.ts.map +1 -1
- package/dist/esm/components/ComboBox/Styles.js +10 -7
- package/dist/esm/components/ComboBox/Styles.js.map +1 -1
- package/dist/esm/components/Icons/collection/MobileMenu.d.ts +23 -0
- package/dist/esm/components/Icons/collection/MobileMenu.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/MobileMenu.js +41 -0
- package/dist/esm/components/Icons/collection/MobileMenu.js.map +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +1 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.d.ts.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.js +1 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.js.map +1 -1
- package/dist/index.js +62 -13
- 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
|
@@ -5206,6 +5206,44 @@
|
|
|
5206
5206
|
MinusIcon.displayName = "MinusIcon";
|
|
5207
5207
|
var MinusIcon$1 = MinusIcon;
|
|
5208
5208
|
|
|
5209
|
+
/**
|
|
5210
|
+
* @component MobileMenuIcon
|
|
5211
|
+
* @description
|
|
5212
|
+
*
|
|
5213
|
+
* The React Icon component is a visual element that displays an icon to represent a concept, object, or action.
|
|
5214
|
+
* The Icon component is
|
|
5215
|
+
* customizable, allowing for variations in size, color, and style to fit the needs of the application.
|
|
5216
|
+
*
|
|
5217
|
+
*
|
|
5218
|
+
* @example
|
|
5219
|
+
* return (
|
|
5220
|
+
* <MobileMenuIcon className="mr-2" />
|
|
5221
|
+
* )
|
|
5222
|
+
*
|
|
5223
|
+
* @see
|
|
5224
|
+
* https://system.activecollab.com/?path=/story/foundation-icons-icons--icons
|
|
5225
|
+
* @see
|
|
5226
|
+
* https://design.activecollab.com/docs/foundations/icons
|
|
5227
|
+
*/
|
|
5228
|
+
var MobileMenuIcon = /*#__PURE__*/React__default["default"].forwardRef(function (props, svgRef) {
|
|
5229
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", _extends({
|
|
5230
|
+
width: 24,
|
|
5231
|
+
height: 24,
|
|
5232
|
+
viewBox: "0 0 24 24",
|
|
5233
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5234
|
+
"data-testid": "MobileMenuIcon",
|
|
5235
|
+
fill: "var(--color-theme-600)",
|
|
5236
|
+
focusable: false,
|
|
5237
|
+
ref: svgRef
|
|
5238
|
+
}, props), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
5239
|
+
fillRule: "evenodd",
|
|
5240
|
+
clipRule: "evenodd",
|
|
5241
|
+
d: "M20 17a1 1 0 110 2H4a1 1 0 110-2h16zm0-6a1 1 0 110 2H4a1 1 0 110-2h16zm0-6a1 1 0 110 2H4a1 1 0 010-2h16z"
|
|
5242
|
+
}));
|
|
5243
|
+
});
|
|
5244
|
+
MobileMenuIcon.displayName = "MobileMenuIcon";
|
|
5245
|
+
var MobileMenuIcon$1 = MobileMenuIcon;
|
|
5246
|
+
|
|
5209
5247
|
/**
|
|
5210
5248
|
* @component MoveTriggerIcon
|
|
5211
5249
|
* @description
|
|
@@ -8995,7 +9033,7 @@
|
|
|
8995
9033
|
var StyledButton$1 = styled__default["default"].button.withConfig({
|
|
8996
9034
|
displayName: "Styles__StyledButton",
|
|
8997
9035
|
componentId: "sc-1v8h7mt-0"
|
|
8998
|
-
})(["", " ", " ", " color:var(--color-theme-700);margin:0;padding:0;background:none;width:100%;height:auto;border:none;height:30px;line-height:1;transition:all 0.3s ease;svg{fill:currentColor;}&::-moz-focus-inner{border:0;}&:focus{outline:none;}&:hover{text-decoration:none;}&:disabled{cursor:default;opacity:50%;pointer-events:none;}"], FontStyle, BoxSizingStyle, {
|
|
9036
|
+
})(["", " ", " ", " color:var(--color-theme-700);margin:0;padding:0;padding-top:0;background:none;width:100%;height:auto;border:none;height:30px;line-height:1;transition:all 0.3s ease;svg{fill:currentColor;}&::-moz-focus-inner{border:0;}&:focus{outline:none;}&:hover{text-decoration:none;}&:disabled{cursor:default;opacity:50%;pointer-events:none;}"], FontStyle, BoxSizingStyle, {
|
|
8999
9037
|
"position": "relative",
|
|
9000
9038
|
"margin": "0px",
|
|
9001
9039
|
"display": "inline-block",
|
|
@@ -15323,8 +15361,11 @@
|
|
|
15323
15361
|
var StyledComboBoxList = styled__default["default"].div.withConfig({
|
|
15324
15362
|
displayName: "Styles__StyledComboBoxList",
|
|
15325
15363
|
componentId: "sc-5qvkpb-3"
|
|
15326
|
-
})(["min-width:260px;background-color:var(--page-paper-main);border-radius:8px;border:1px solid var(--border-primary);box-shadow:var(--shadow-tertiary);margin:8px 0;width:", ";"], function (props) {
|
|
15364
|
+
})(["min-width:260px;background-color:var(--page-paper-main);border-radius:8px;border:1px solid var(--border-primary);box-shadow:var(--shadow-tertiary);margin:8px 0;width:", ";", ""], function (props) {
|
|
15327
15365
|
return "".concat(props.$width, "px");
|
|
15366
|
+
}, function (_ref) {
|
|
15367
|
+
var $hide = _ref.$hide;
|
|
15368
|
+
return $hide === true && styled.css(["display:none;"]);
|
|
15328
15369
|
});
|
|
15329
15370
|
StyledComboBoxList.displayName = "StyledComboBoxList";
|
|
15330
15371
|
var StyledChipWrapper = styled__default["default"].div.withConfig({
|
|
@@ -15336,18 +15377,18 @@
|
|
|
15336
15377
|
"gap": "0.25rem"
|
|
15337
15378
|
}, {
|
|
15338
15379
|
"flex": "1 1 0%"
|
|
15339
|
-
}, function (_ref) {
|
|
15340
|
-
var $open = _ref.$open;
|
|
15341
|
-
return $open ? "auto" : "hidden";
|
|
15342
15380
|
}, function (_ref2) {
|
|
15343
|
-
var $
|
|
15381
|
+
var $open = _ref2.$open;
|
|
15382
|
+
return $open ? "auto" : "hidden";
|
|
15383
|
+
}, function (_ref3) {
|
|
15384
|
+
var $autoSize = _ref3.$autoSize;
|
|
15344
15385
|
return $autoSize === "auto" && styled.css(["", ";", ";"], {
|
|
15345
15386
|
"flexWrap": "wrap"
|
|
15346
15387
|
}, {
|
|
15347
15388
|
"width": "100%"
|
|
15348
15389
|
});
|
|
15349
|
-
}, function (
|
|
15350
|
-
var $autoSize =
|
|
15390
|
+
}, function (_ref4) {
|
|
15391
|
+
var $autoSize = _ref4.$autoSize;
|
|
15351
15392
|
return $autoSize !== "auto" && styled.css(["align-items:center;"]);
|
|
15352
15393
|
});
|
|
15353
15394
|
StyledChipWrapper.displayName = "StyledChipWrapper";
|
|
@@ -15482,7 +15523,7 @@
|
|
|
15482
15523
|
return isFirst.current;
|
|
15483
15524
|
};
|
|
15484
15525
|
|
|
15485
|
-
var _excluded$j = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper", "onClose", "onClear", "onDeselect"];
|
|
15526
|
+
var _excluded$j = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper", "onClose", "onClear", "onDeselect", "defaultValue"];
|
|
15486
15527
|
var ComboBox = function ComboBox(_ref) {
|
|
15487
15528
|
var _comboBoxRef$current2, _comboBoxRef$current3;
|
|
15488
15529
|
var _ref$options = _ref.options,
|
|
@@ -15516,6 +15557,7 @@
|
|
|
15516
15557
|
onClose = _ref.onClose,
|
|
15517
15558
|
onClear = _ref.onClear,
|
|
15518
15559
|
onDeselect = _ref.onDeselect,
|
|
15560
|
+
defaultValue = _ref.defaultValue,
|
|
15519
15561
|
prop = _objectWithoutProperties(_ref, _excluded$j);
|
|
15520
15562
|
var selectedName = React.useMemo(function () {
|
|
15521
15563
|
var value = "";
|
|
@@ -15772,6 +15814,9 @@
|
|
|
15772
15814
|
}, [type, selected, options, open, limitChips, hiddenNumberText, renderChipAdornment, size]);
|
|
15773
15815
|
var showXIcon = Array.isArray(selected) && type === "multiple" && selected.length > 0;
|
|
15774
15816
|
var hasSelected = type === "multiple" && Array.isArray(selected) && selected.length > 0;
|
|
15817
|
+
var showMenu = React.useMemo(function () {
|
|
15818
|
+
return Boolean(options.length || defaultValue || Number(value.length) > 0);
|
|
15819
|
+
}, [defaultValue, options.length, value]);
|
|
15775
15820
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
15776
15821
|
className: "c-combo-box"
|
|
15777
15822
|
}, type === "multiple" ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(_StyledStyledInputWrapper, {
|
|
@@ -15816,7 +15861,7 @@
|
|
|
15816
15861
|
onMouseDown: handleMouseDown,
|
|
15817
15862
|
onClick: handleDeselect,
|
|
15818
15863
|
"data-testid": "deselect-all"
|
|
15819
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)), /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
|
|
15864
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)), showMenu && /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
|
|
15820
15865
|
$open: open
|
|
15821
15866
|
}))))) : /*#__PURE__*/React__default["default"].createElement(StyledComboBoxInput, {
|
|
15822
15867
|
className: classNames__default["default"]("c-combo-box-input", inputWrapperClassName),
|
|
@@ -15824,6 +15869,7 @@
|
|
|
15824
15869
|
wrapperClick: onOpen,
|
|
15825
15870
|
onFocus: function onFocus() {
|
|
15826
15871
|
setFocused(!focused);
|
|
15872
|
+
onOpen();
|
|
15827
15873
|
},
|
|
15828
15874
|
onClick: onOpen,
|
|
15829
15875
|
wrapRef: comboBoxRef,
|
|
@@ -15844,7 +15890,7 @@
|
|
|
15844
15890
|
onClick: handleDeselect,
|
|
15845
15891
|
variant: "text gray",
|
|
15846
15892
|
size: "small"
|
|
15847
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)) : null, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
|
|
15893
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)) : null, showMenu && /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
|
|
15848
15894
|
$open: open
|
|
15849
15895
|
})) : null
|
|
15850
15896
|
}), !disabled ? /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
@@ -15866,7 +15912,8 @@
|
|
|
15866
15912
|
noIsolation: true,
|
|
15867
15913
|
allowPinchZoom: true
|
|
15868
15914
|
}, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxList, {
|
|
15869
|
-
$width: (_comboBoxRef$current3 = comboBoxRef.current) === null || _comboBoxRef$current3 === void 0 ? void 0 : _comboBoxRef$current3.clientWidth
|
|
15915
|
+
$width: (_comboBoxRef$current3 = comboBoxRef.current) === null || _comboBoxRef$current3 === void 0 ? void 0 : _comboBoxRef$current3.clientWidth,
|
|
15916
|
+
$hide: !showMenu
|
|
15870
15917
|
}, /*#__PURE__*/React__default["default"].createElement(Autocomplete, _extends({}, prop, {
|
|
15871
15918
|
inputEl: childNode,
|
|
15872
15919
|
selected: selected,
|
|
@@ -15874,7 +15921,8 @@
|
|
|
15874
15921
|
renderOption: handleRenderOption,
|
|
15875
15922
|
options: options,
|
|
15876
15923
|
type: type,
|
|
15877
|
-
handleEmptyAction: emptyAction
|
|
15924
|
+
handleEmptyAction: emptyAction,
|
|
15925
|
+
defaultValue: defaultValue
|
|
15878
15926
|
})))))) : null);
|
|
15879
15927
|
};
|
|
15880
15928
|
ComboBox.displayName = "ComboBox";
|
|
@@ -18388,6 +18436,7 @@
|
|
|
18388
18436
|
exports.MessageSmallIcon = MessageSmallIcon$1;
|
|
18389
18437
|
exports.MessageSolidIcon = MessageSolidIcon$1;
|
|
18390
18438
|
exports.MinusIcon = MinusIcon$1;
|
|
18439
|
+
exports.MobileMenuIcon = MobileMenuIcon$1;
|
|
18391
18440
|
exports.Modal = Modal;
|
|
18392
18441
|
exports.MoveIcon = MoveIcon$1;
|
|
18393
18442
|
exports.MoveTriggerIcon = MoveTriggerIcon$1;
|