@connectif/ui-components 5.0.2 → 5.1.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.js CHANGED
@@ -841,9 +841,7 @@ var require_react_is_development2 = __commonJS({
841
841
  }
842
842
  }
843
843
  }
844
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
845
- Symbol.for("react.provider");
846
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
844
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
847
845
  exports.ContextConsumer = REACT_CONSUMER_TYPE;
848
846
  exports.ContextProvider = REACT_CONTEXT_TYPE;
849
847
  exports.Element = REACT_ELEMENT_TYPE;
@@ -8081,7 +8079,9 @@ var ListItemText = ({
8081
8079
  slotProps,
8082
8080
  "data-testid": dataTestId
8083
8081
  }) => {
8084
- const textElementRef = React8.useRef(null);
8082
+ const textElementRef = React8.useRef(
8083
+ null
8084
+ );
8085
8085
  return /* @__PURE__ */ jsx6(
8086
8086
  TextEllipsisTooltip_default,
8087
8087
  {
@@ -9595,7 +9595,9 @@ var TextEllipsis = ({
9595
9595
  sx,
9596
9596
  zIndex
9597
9597
  }) => {
9598
- const textElementRef = React17.useRef(null);
9598
+ const textElementRef = React17.useRef(
9599
+ null
9600
+ );
9599
9601
  return /* @__PURE__ */ jsx32(
9600
9602
  TextEllipsisTooltip_default,
9601
9603
  {
@@ -9742,7 +9744,7 @@ var MenuIconButton = React19.forwardRef(function MenuIconButton2({
9742
9744
  const setButtonRef = (element) => {
9743
9745
  if (typeof ref === "function") {
9744
9746
  ref(element);
9745
- } else if (ref) {
9747
+ } else if (ref && "current" in ref) {
9746
9748
  ref.current = element;
9747
9749
  }
9748
9750
  setAnchorEl(element);
@@ -10522,7 +10524,7 @@ var MenuButton = React24.forwardRef(function MenuButton2({
10522
10524
  const setButtonRef = (element) => {
10523
10525
  if (typeof ref === "function") {
10524
10526
  ref(element);
10525
- } else if (ref) {
10527
+ } else if (ref && "current" in ref) {
10526
10528
  ref.current = element;
10527
10529
  }
10528
10530
  setAnchorEl(element);
@@ -11479,7 +11481,7 @@ var MenuChip = React29.forwardRef(function MenuChip2({
11479
11481
  const setChipRef = (element) => {
11480
11482
  if (typeof ref === "function") {
11481
11483
  ref(element);
11482
- } else if (ref) {
11484
+ } else if (ref && "current" in ref) {
11483
11485
  ref.current = element;
11484
11486
  }
11485
11487
  setAnchorEl(element);
@@ -12055,11 +12057,19 @@ var EnhancedCard = React31.forwardRef(
12055
12057
  const getChildProps = () => typeof child.props === "object" ? child.props : {};
12056
12058
  switch (child.type) {
12057
12059
  case EnhancedCardTitle_default:
12060
+ return React31.cloneElement(
12061
+ child,
12062
+ {
12063
+ size: size === "S" ? "S" : "M",
12064
+ dataTest,
12065
+ cursor: cursor2,
12066
+ ...getChildProps()
12067
+ }
12068
+ );
12058
12069
  case EnhancedCardSubtitle_default:
12059
12070
  return React31.cloneElement(
12060
12071
  child,
12061
12072
  {
12062
- size,
12063
12073
  dataTest,
12064
12074
  cursor: cursor2,
12065
12075
  ...getChildProps()
@@ -12080,12 +12090,11 @@ var EnhancedCard = React31.forwardRef(
12080
12090
  child,
12081
12091
  {
12082
12092
  titleProps: {
12083
- size,
12093
+ size: size === "S" ? "S" : "M",
12084
12094
  dataTest,
12085
12095
  cursor: cursor2
12086
12096
  },
12087
12097
  subtitleProps: {
12088
- size,
12089
12098
  dataTest,
12090
12099
  cursor: cursor2
12091
12100
  },
@@ -18305,7 +18314,9 @@ var PhoneFormatter_default = PhoneFormatter;
18305
18314
  import * as React44 from "react";
18306
18315
  import { jsx as jsx92 } from "react/jsx-runtime";
18307
18316
  var HeaderTitle = ({ text }) => {
18308
- const textElementRef = React44.useRef(null);
18317
+ const textElementRef = React44.useRef(
18318
+ null
18319
+ );
18309
18320
  return /* @__PURE__ */ jsx92(
18310
18321
  TextEllipsisTooltip_default,
18311
18322
  {
@@ -18331,7 +18342,9 @@ var HeaderTitle_default = HeaderTitle;
18331
18342
  import * as React45 from "react";
18332
18343
  import { jsx as jsx93 } from "react/jsx-runtime";
18333
18344
  var HeaderSubtitle = ({ text }) => {
18334
- const textElementRef = React45.useRef(null);
18345
+ const textElementRef = React45.useRef(
18346
+ null
18347
+ );
18335
18348
  return typeof text === "string" ? /* @__PURE__ */ jsx93(
18336
18349
  TextEllipsisTooltip_default,
18337
18350
  {
@@ -18585,8 +18598,8 @@ var ImageEditor = ({
18585
18598
  TABS.FINETUNE,
18586
18599
  TABS.ANNOTATE
18587
18600
  ];
18588
- const updateStateRef = React46.useRef();
18589
- const getCurrentImgDataFnRef = React46.useRef();
18601
+ const updateStateRef = React46.useRef(null);
18602
+ const getCurrentImgDataFnRef = React46.useRef(null);
18590
18603
  const handleOnSave = React46.useCallback(
18591
18604
  (editedImageObject) => {
18592
18605
  const imageBase64 = editedImageObject.imageBase64;
@@ -19034,8 +19047,8 @@ import * as React52 from "react";
19034
19047
  // src/hooks/useDebouncedCallback.ts
19035
19048
  import { useEffect as useEffect10, useRef as useRef14 } from "react";
19036
19049
  function useDebouncedCallback(callback, wait) {
19037
- const argsRef = useRef14();
19038
- const timeout = useRef14();
19050
+ const argsRef = useRef14(null);
19051
+ const timeout = useRef14(null);
19039
19052
  function cleanup() {
19040
19053
  if (timeout.current) {
19041
19054
  clearTimeout(timeout.current);
@@ -21688,7 +21701,7 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21688
21701
  }
21689
21702
  );
21690
21703
  React62.useEffect(() => {
21691
- const handleColorChange = (color2) => {
21704
+ const handleInternalColorChange = (color2) => {
21692
21705
  setPreviousColors((prev) => [color2, ...prev.slice(0, 17)]);
21693
21706
  setTextFieldValue(rgbToHex(color2));
21694
21707
  onChange(color2);
@@ -21696,7 +21709,7 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21696
21709
  setColorChangeOccurred(false);
21697
21710
  };
21698
21711
  if (colorChangeOccurred && (isValidPickerChange || isPopoverInputFocused) && internalPickerValue && internalPickerValue !== value) {
21699
- handleColorChange(internalPickerValue);
21712
+ handleInternalColorChange(internalPickerValue);
21700
21713
  }
21701
21714
  }, [
21702
21715
  value,
@@ -21706,6 +21719,16 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21706
21719
  colorChangeOccurred,
21707
21720
  isPopoverInputFocused
21708
21721
  ]);
21722
+ React62.useEffect(() => {
21723
+ const handleExternalColorChange = (color2) => {
21724
+ setPreviousColors((prev) => [color2, ...prev.slice(0, 17)]);
21725
+ setTextFieldValue(rgbToHex(color2));
21726
+ setInternalPickerValue(color2);
21727
+ };
21728
+ if (!colorChangeOccurred && internalPickerValue && value && internalPickerValue !== value) {
21729
+ handleExternalColorChange(value || (allowEmpty ? "" : white));
21730
+ }
21731
+ }, [value, internalPickerValue, colorChangeOccurred, allowEmpty]);
21709
21732
  React62.useEffect(() => {
21710
21733
  if (anchorEl) {
21711
21734
  const handleFocus = () => {
@@ -21718,7 +21741,7 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21718
21741
  const timeoutId = setTimeout(() => {
21719
21742
  if (containerRef.current) {
21720
21743
  inputs = containerRef.current.querySelectorAll(
21721
- "input#rbgcp-input, input#rbgcp-hex-input"
21744
+ "input#rbgcp-R-input, input#rbgcp-G-input, input#rbgcp-B-input, input#rbgcp-hex-input"
21722
21745
  );
21723
21746
  inputs.forEach((input) => {
21724
21747
  input.addEventListener("focus", handleFocus);
@@ -21800,17 +21823,12 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21800
21823
  color: "black !important",
21801
21824
  fontFamily: "Source Sans Pro, sans-serif"
21802
21825
  },
21803
- "#rbgcp-input": {
21826
+ "#rbgcp-hex-input, #rbgcp-R-input, #rbgcp-G-input, #rbgcp-B-input": {
21804
21827
  color: "black !important",
21805
21828
  backgroundColor: "white !important",
21806
- border: "1px solid #bebebe",
21807
- fontFamily: "Source Sans Pro, sans-serif"
21808
- },
21809
- "#rbgcp-hex-input": {
21810
- color: "black !important",
21811
- backgroundColor: "white !important",
21812
- border: "1px solid #bebebe",
21813
- fontFamily: "Source Sans Pro, sans-serif"
21829
+ border: "1px solid #bebebe !important",
21830
+ fontFamily: "Source Sans Pro, sans-serif",
21831
+ boxSizing: "border-box !important"
21814
21832
  }
21815
21833
  },
21816
21834
  children: /* @__PURE__ */ jsx117(
@@ -21832,7 +21850,8 @@ var ColorPicker = React62.forwardRef(function ColorPickerWrapper({
21832
21850
  hideOpacity: !allowAlpha,
21833
21851
  hideInputType: true,
21834
21852
  hideColorTypeBtns: true,
21835
- hideGradientControls: true
21853
+ hideGradientControls: true,
21854
+ disableDarkMode: true
21836
21855
  }
21837
21856
  )
21838
21857
  }
@@ -25586,9 +25605,10 @@ var renderChildrenWithMath = (children) => React80.Children.map(children, (child
25586
25605
  return renderWithMath(child);
25587
25606
  }
25588
25607
  if (React80.isValidElement(child)) {
25589
- return React80.cloneElement(child, {
25590
- ...child.props,
25591
- children: renderChildrenWithMath(child.props.children)
25608
+ const element = child;
25609
+ return React80.cloneElement(element, {
25610
+ ...element.props,
25611
+ children: renderChildrenWithMath(element.props.children)
25592
25612
  });
25593
25613
  }
25594
25614
  return child;
@@ -26175,7 +26195,7 @@ function Carousel({
26175
26195
  const [isRightArrowHidden, setRightArrowHidden] = React85.useState(true);
26176
26196
  const [paddingElement, setPaddingElement] = React85.useState();
26177
26197
  const [visibleCount, setVisibleCount] = React85.useState();
26178
- const showedElementsRef = React85.useRef();
26198
+ const showedElementsRef = React85.useRef(void 0);
26179
26199
  const [showedElements, setShowedElements] = React85.useState();
26180
26200
  const updateArrows = React85.useCallback(() => {
26181
26201
  if (!showedElementsRef.current) {
@@ -26753,7 +26773,7 @@ function SwipeableViews({
26753
26773
  ...rootProps
26754
26774
  }) {
26755
26775
  const containerRef = useRef27(null);
26756
- const scrollTimeout = useRef27();
26776
+ const scrollTimeout = useRef27(null);
26757
26777
  const scrollingMethod = useRef27("none");
26758
26778
  const [previousIndex, setPreviousIndex] = useState34(index);
26759
26779
  const hideScrollAnimation = useRef27(true);
@@ -27391,7 +27411,9 @@ var ToolbarTitle = React91.forwardRef(function ToolbarTitle2({
27391
27411
  hoverActions,
27392
27412
  color: color2 = grey900
27393
27413
  }, ref) {
27394
- const textElementRef = React91.useRef(null);
27414
+ const textElementRef = React91.useRef(
27415
+ null
27416
+ );
27395
27417
  const [showHoverActions, setShowHoverActions] = useState37(false);
27396
27418
  return /* @__PURE__ */ jsx170(Box_default2, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx170(
27397
27419
  TextEllipsisTooltip_default,
@@ -28179,7 +28201,7 @@ react-is/cjs/react-is.development.js:
28179
28201
 
28180
28202
  @mui/styled-engine/esm/index.js:
28181
28203
  (**
28182
- * @mui/styled-engine v7.3.0
28204
+ * @mui/styled-engine v7.3.7
28183
28205
  *
28184
28206
  * @license MIT
28185
28207
  * This source code is licensed under the MIT license found in the
@@ -28188,7 +28210,7 @@ react-is/cjs/react-is.development.js:
28188
28210
 
28189
28211
  @mui/system/esm/index.js:
28190
28212
  (**
28191
- * @mui/system v7.3.0
28213
+ * @mui/system v7.3.7
28192
28214
  *
28193
28215
  * @license MIT
28194
28216
  * This source code is licensed under the MIT license found in the