@activecollab/components 2.0.445 → 2.0.447

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.
Files changed (37) hide show
  1. package/dist/cjs/components/Avatar/Avatar.js +15 -5
  2. package/dist/cjs/components/Avatar/Avatar.js.map +1 -1
  3. package/dist/cjs/components/Bubble/Styles.js +2 -2
  4. package/dist/cjs/components/Bubble/Styles.js.map +1 -1
  5. package/dist/cjs/components/Button/Button.js +4 -1
  6. package/dist/cjs/components/Button/Button.js.map +1 -1
  7. package/dist/cjs/components/Button/Styles.js +4 -4
  8. package/dist/cjs/components/Button/Styles.js.map +1 -1
  9. package/dist/cjs/presentation/whiteboard/canvasElements.js +15 -17
  10. package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
  11. package/dist/cjs/presentation/whiteboard/projectElements.js +76 -16
  12. package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -1
  13. package/dist/esm/components/Avatar/Avatar.d.ts.map +1 -1
  14. package/dist/esm/components/Avatar/Avatar.js +15 -6
  15. package/dist/esm/components/Avatar/Avatar.js.map +1 -1
  16. package/dist/esm/components/Bubble/Styles.js +2 -2
  17. package/dist/esm/components/Bubble/Styles.js.map +1 -1
  18. package/dist/esm/components/Button/Button.d.ts +2 -0
  19. package/dist/esm/components/Button/Button.d.ts.map +1 -1
  20. package/dist/esm/components/Button/Button.js +4 -1
  21. package/dist/esm/components/Button/Button.js.map +1 -1
  22. package/dist/esm/components/Button/Styles.d.ts +1 -0
  23. package/dist/esm/components/Button/Styles.d.ts.map +1 -1
  24. package/dist/esm/components/Button/Styles.js +1 -1
  25. package/dist/esm/components/Button/Styles.js.map +1 -1
  26. package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
  27. package/dist/esm/presentation/whiteboard/canvasElements.js +11 -9
  28. package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
  29. package/dist/esm/presentation/whiteboard/projectElements.d.ts +12 -3
  30. package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -1
  31. package/dist/esm/presentation/whiteboard/projectElements.js +76 -16
  32. package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -1
  33. package/dist/index.js +23 -12
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.min.js +1 -1
  36. package/dist/index.min.js.map +1 -1
  37. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -171,7 +171,7 @@
171
171
  var StyledButton$2 = styled__default["default"].button.withConfig({
172
172
  displayName: "Styles__StyledButton",
173
173
  componentId: "sc-vi1kcr-0"
174
- })(["", " ", " -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle;font-weight:500;display:inline-block;line-height:1;margin:0;text-decoration:none;font-size:0.875rem;user-select:none;cursor:pointer;text-align:center;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:288px;border:none;height:32px;transition:background-color 0.3s ease,box-shadow 0.3s ease,color 0.3s ease,border-color 0.3s ease;svg{fill:currentColor;}&:focus{outline:none;}&:hover{text-decoration:none;}&:disabled{cursor:default;opacity:50%;pointer-events:none;}", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
174
+ })(["", " ", " -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle;font-weight:500;display:inline-block;line-height:1;margin:0;text-decoration:none;font-size:0.875rem;user-select:none;cursor:pointer;text-align:center;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:288px;--c-btn-text-inset:8px;--c-btn-icon-inset:8px;--c-btn-icon-tight-inset:6px;--c-btn-inset:0px;border:none;height:32px;transition:background-color 0.3s ease,box-shadow 0.3s ease,color 0.3s ease,border-color 0.3s ease;svg{fill:currentColor;}&:focus{outline:none;}&:hover{text-decoration:none;}&:disabled{cursor:default;opacity:50%;pointer-events:none;}", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
175
175
  return props.size === "small" && styled.css(["height:24px;"]);
176
176
  }, function (props) {
177
177
  return props.size === "big" && styled.css(["height:40px;"]);
@@ -182,13 +182,13 @@
182
182
  }, function (props) {
183
183
  return props.variant === "dark transparent" && styled.css(["padding:0 8px;background-color:rgba(0,0,0,0.5);border-radius:var(--ac-br-6);color:var(--only-white);&:hover,&:focus-visible{background-color:rgba(0,0,0,0.85);}&:active{background-color:var(--only-black);}"]);
184
184
  }, function (props) {
185
- return (props.variant === "tertiary" || props.variant === "text colored") && styled.css(["padding:0 8px;background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-primary);&:hover,&:focus-visible{background-color:var(--color-primary-200);}&:active{background-color:var(--color-primary-300);}"]);
185
+ return (props.variant === "tertiary" || props.variant === "text colored") && styled.css(["padding:0 var(--c-btn-text-inset);--c-btn-inset:var(--c-btn-text-inset);background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-primary);&:hover,&:focus-visible{background-color:var(--color-primary-200);}&:active{background-color:var(--color-primary-300);}"]);
186
186
  }, function (props) {
187
- return (props.variant === "option" || props.variant === "text gray") && styled.css(["padding:0 8px;background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-theme-700);&:hover,&:focus-visible{background-color:var(--color-theme-300);color:var(--color-theme-900);}&:active{background-color:var(--color-theme-400);color:var(--color-theme-900);}"]);
187
+ return (props.variant === "option" || props.variant === "text gray") && styled.css(["padding:0 var(--c-btn-text-inset);--c-btn-inset:var(--c-btn-text-inset);background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-theme-700);&:hover,&:focus-visible{background-color:var(--color-theme-300);color:var(--color-theme-900);}&:active{background-color:var(--color-theme-400);color:var(--color-theme-900);}"]);
188
188
  }, function (props) {
189
189
  return props.variant === "circle raised" && styled.css(["padding:0 6px;background-color:transparent;border-radius:var(--ac-br-rounded);color:var(--color-theme-700);&:hover,&:focus-visible{background-color:var(--page-paper-main);box-shadow:var(--shadow-tertiary);}&:active{background-color:var(--page-paper-main);box-shadow:var(--shadow-tertiary-hover);}"]);
190
190
  }, function (props) {
191
- return props.iconOnly && styled.css(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;", ";", " ", ""], (props.size === "small" || props.size === "big") && styled.css(["border-radius:var(--ac-br-rounded);"]), props.size === "small" && styled.css(["width:24px;"]), props.size === "big" && styled.css(["width:40px;"]));
191
+ return props.iconOnly && styled.css(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;--c-btn-inset:0px;", " ", ";", " ", ""], (props.variant === "tertiary" || props.variant === "text colored" || props.variant === "option" || props.variant === "text gray") && props.size !== "small" && props.size !== "big" && styled.css(["--c-btn-inset:", ";"], props.$inset === "tight" ? "var(--c-btn-icon-tight-inset)" : "var(--c-btn-icon-inset)"), (props.size === "small" || props.size === "big") && styled.css(["border-radius:var(--ac-br-rounded);"]), props.size === "small" && styled.css(["width:24px;"]), props.size === "big" && styled.css(["width:40px;"]));
192
192
  }, function (props) {
193
193
  return (props.variant === "primary" || props.variant === "contained" || props.variant === "secondary" || props.variant === "outlined") && styled.css([".c-btn__elements__element:first-child svg{margin-left:-6px;}.c-btn__elements__element:last-child svg{margin-right:-6px;}", ""], (props.size === "small" || props.size === "big") && styled.css(["border-radius:var(--ac-br-rounded);"]));
194
194
  }, function (props) {
@@ -208,7 +208,7 @@
208
208
  })(["display:inline-flex;svg{margin:0 4px;}"]);
209
209
  StyledButtonElement.displayName = "StyledButtonElement";
210
210
 
211
- var _excluded$5Y = ["children", "active", "variant", "size", "type", "className"];
211
+ var _excluded$5Y = ["children", "active", "variant", "size", "type", "inset", "className"];
212
212
  /**
213
213
  * @component Button
214
214
  * @description
@@ -240,6 +240,8 @@
240
240
  size = _ref$size === void 0 ? "medium" : _ref$size,
241
241
  _ref$type = _ref.type,
242
242
  type = _ref$type === void 0 ? "button" : _ref$type,
243
+ _ref$inset = _ref.inset,
244
+ inset = _ref$inset === void 0 ? "default" : _ref$inset,
243
245
  className = _ref.className,
244
246
  args = _objectWithoutProperties(_ref, _excluded$5Y);
245
247
  return /*#__PURE__*/React__default["default"].createElement(StyledButton$2, _extends({
@@ -258,6 +260,7 @@
258
260
  variant: variant,
259
261
  active: active,
260
262
  size: size,
263
+ $inset: inset,
261
264
  ref: ref,
262
265
  "aria-pressed": active,
263
266
  role: "button",
@@ -14592,8 +14595,8 @@
14592
14595
  "backgroundColor": "rgb(255 255 255 / var(--tw-bg-opacity, 1))",
14593
14596
  "color": "var(--color-theme-800)",
14594
14597
  "opacity": "1",
14595
- "--tw-shadow": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
14596
- "--tw-shadow-colored": "0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color)",
14598
+ "--tw-shadow": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
14599
+ "--tw-shadow-colored": "0 25px 50px -12px var(--tw-shadow-color)",
14597
14600
  "boxShadow": "var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"
14598
14601
  }, FontStyle, BoxSizingStyle);
14599
14602
  StyledBubble.displayName = "StyledBubble";
@@ -19573,10 +19576,18 @@
19573
19576
  _useState2 = _slicedToArray(_useState, 2),
19574
19577
  imageLoaded = _useState2[0],
19575
19578
  setImageLoaded = _useState2[1];
19579
+ var imageRef = React.useRef(null);
19580
+ var handleRef = useForkRef(ref, imageRef);
19581
+ React.useLayoutEffect(function () {
19582
+ var _imageRef$current;
19583
+ if ((_imageRef$current = imageRef.current) !== null && _imageRef$current !== void 0 && _imageRef$current.complete && imageRef.current.naturalWidth > 0) {
19584
+ setImageLoaded(true);
19585
+ }
19586
+ }, [url]);
19576
19587
  return /*#__PURE__*/React__default["default"].createElement(StyledWrapper$1, {
19577
19588
  className: className
19578
19589
  }, children, /*#__PURE__*/React__default["default"].createElement(StyledAvatar, _extends({
19579
- ref: ref,
19590
+ ref: handleRef,
19580
19591
  src: url,
19581
19592
  alt: alt,
19582
19593
  width: size,
@@ -19585,13 +19596,13 @@
19585
19596
  setImageLoaded(true);
19586
19597
  },
19587
19598
  role: "img",
19588
- className: imgClassName,
19589
- style: {
19590
- display: imageLoaded ? "block" : "none"
19591
- }
19599
+ className: imgClassName
19592
19600
  }, rest)), !imageLoaded && /*#__PURE__*/React__default["default"].createElement(SkeletonLoader, {
19593
19601
  "data-testid": "loader",
19594
19602
  style: {
19603
+ position: "absolute",
19604
+ top: 0,
19605
+ left: 0,
19595
19606
  width: size,
19596
19607
  height: size,
19597
19608
  borderRadius: "100%"