@activecollab/components 2.0.130 → 2.0.131

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
@@ -14625,7 +14625,7 @@
14625
14625
  var StyledTextarea = styled__default["default"].textarea.withConfig({
14626
14626
  displayName: "Styles__StyledTextarea",
14627
14627
  componentId: "sc-m6jqw8-0"
14628
- })(["", " ", " ", " ", " ", " ", " border-width:1px;border-style:solid;background-color:var(--input-background-color);", " border-radius:8px;padding:4px 8px 6px 8px;height:auto;transition:all 0.3s ease;width:360px;min-height:90px;outline:none;", " ", " ", " ", " ", " &::placeholder{", "}", " ", ""], {
14628
+ })(["", " ", " ", " ", " ", " border-width:1px;border-style:solid;background-color:var(--input-background-color);", " border-radius:8px;padding:4px 8px 6px 8px;height:auto;transition:all 0.3s ease;width:360px;min-height:90px;outline:none;", " ", " ", " ", " ", " &::placeholder{", "}", " ", ""], {
14629
14629
  "fontSize": "0.875rem"
14630
14630
  }, {
14631
14631
  "color": "var(--color-theme-900)"
@@ -14635,8 +14635,6 @@
14635
14635
  "letterSpacing": "0.02em"
14636
14636
  }, {
14637
14637
  "fontWeight": "400"
14638
- }, {
14639
- "resize": "none"
14640
14638
  }, {
14641
14639
  "borderColor": "var(--color-theme-500)"
14642
14640
  }, FontStyle, BoxSizingStyle, function (props) {
@@ -14659,158 +14657,10 @@
14659
14657
  }, function (props) {
14660
14658
  return !props.disabled && props.$invalid && props.$mode === "flat" && styled.css(["color:var(--red-alert);"]);
14661
14659
  });
14662
- var StyledTextAreaWrapper = styled__default["default"].div.withConfig({
14663
- displayName: "Styles__StyledTextAreaWrapper",
14664
- componentId: "sc-m6jqw8-1"
14665
- })(["", ""], {
14666
- "position": "relative",
14667
- "display": "flex",
14668
- "width": "fit-content"
14669
- });
14670
- var StyledProgressRingWrapper = styled__default["default"].div.withConfig({
14671
- displayName: "Styles__StyledProgressRingWrapper",
14672
- componentId: "sc-m6jqw8-2"
14673
- })(["", ""], {
14674
- "position": "absolute",
14675
- "bottom": "0.5rem",
14676
- "right": "0.5rem",
14677
- "display": "flex"
14678
- });
14679
14660
  StyledTextarea.displayName = "StyledTextarea";
14680
- StyledTextAreaWrapper.displayName = "StyledTextAreaWrapper";
14681
- StyledProgressRingWrapper.displayName = "StyledProgressRingWrapper";
14682
14661
 
14683
- var StyledWrapper = styled__default["default"].div.withConfig({
14684
- displayName: "Styles__StyledWrapper",
14685
- componentId: "sc-o6dcyu-0"
14686
- })(["position:relative;display:inline-flex;"]);
14687
- StyledWrapper.displayName = "StyledWrapper";
14688
- var StyledChildrenWrapper = styled__default["default"].div.withConfig({
14689
- displayName: "Styles__StyledChildrenWrapper",
14690
- componentId: "sc-o6dcyu-1"
14691
- })(["position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:inline-flex;"]);
14692
- StyledChildrenWrapper.displayName = "StyledChildrenWrapper";
14693
- var StyledSvg = styled__default["default"].svg.withConfig({
14694
- displayName: "Styles__StyledSvg",
14695
- componentId: "sc-o6dcyu-2"
14696
- })(["transform:rotate(-90deg);"]);
14697
- StyledSvg.displayName = "StyledSvg";
14698
- var StyledBackgroundCircle = styled__default["default"].circle.withConfig({
14699
- displayName: "Styles__StyledBackgroundCircle",
14700
- componentId: "sc-o6dcyu-3"
14701
- })(["fill:transparent;transition:stroke-dashoffset 0.5s linear,stroke 300ms ease-out;", " ", ""], function (props) {
14702
- return props.$color ? styled.css(["stroke:", ";"], props.$color) : styled.css(["stroke:var(--color-theme-transparent-300);"]);
14703
- }, function (props) {
14704
- return props.$strokeDashOffset && styled.css(["stroke-dashoffset:", ";"], props.$strokeDashOffset);
14705
- });
14706
- StyledBackgroundCircle.displayName = "StyledBackgroundCircle";
14707
- var StyledForegroundCircle = styled__default["default"].circle.withConfig({
14708
- displayName: "Styles__StyledForegroundCircle",
14709
- componentId: "sc-o6dcyu-4"
14710
- })(["fill:transparent;transition:stroke-dashoffset 0.5s linear,stroke 300ms ease-out;", " ", " ", ""], function (props) {
14711
- return props.$roundStroke && styled.css(["stroke-linecap:round;"]);
14712
- }, function (props) {
14713
- return props.$color ? styled.css(["stroke:", ";"], props.$color) : styled.css(["stroke:var(--color-secondary);"]);
14714
- }, function (props) {
14715
- return props.$strokeDashOffset && styled.css(["stroke-dashoffset:", ";"], props.$strokeDashOffset);
14716
- });
14717
- StyledForegroundCircle.displayName = "StyledForegroundCircle";
14718
- var StyledProgressRingPercentage = styled__default["default"].text.withConfig({
14719
- displayName: "Styles__StyledProgressRingPercentage",
14720
- componentId: "sc-o6dcyu-5"
14721
- })(["transform:rotate(90deg);", " ", ""], function (props) {
14722
- return props.$color ? styled.css(["fill:", ";"], props.$color) : styled.css(["fill:var(--color-secondary);"]);
14723
- }, function (props) {
14724
- return props.$fontSize ? styled.css(["font-size:", "px;"], props.$fontSize) : styled.css(["font-size:10px;"]);
14725
- });
14726
- StyledProgressRingPercentage.displayName = "StyledProgressRingPercentage";
14727
-
14728
- var _excluded$H = ["className", "children"];
14729
- var ProgressCircle = function ProgressCircle(_ref) {
14730
- var backgroundColor = _ref.backgroundColor,
14731
- progressColor = _ref.progressColor,
14732
- _ref$progress = _ref.progress,
14733
- progress = _ref$progress === void 0 ? 0 : _ref$progress,
14734
- _ref$radius = _ref.radius,
14735
- radius = _ref$radius === void 0 ? 20 : _ref$radius,
14736
- _ref$stroke = _ref.stroke,
14737
- stroke = _ref$stroke === void 0 ? 3 : _ref$stroke,
14738
- _ref$roundStroke = _ref.roundStroke,
14739
- roundStroke = _ref$roundStroke === void 0 ? false : _ref$roundStroke,
14740
- className = _ref.className,
14741
- _ref$showPercentage = _ref.showPercentage,
14742
- showPercentage = _ref$showPercentage === void 0 ? false : _ref$showPercentage,
14743
- fontSize = _ref.fontSize;
14744
- if (stroke > radius) {
14745
- console.warn("Stroke can not have value greater than the radius.");
14746
- stroke = radius;
14747
- }
14748
- var progressNumber = React.useMemo(function () {
14749
- var width = progress;
14750
- if (progress > 100) {
14751
- width = 100;
14752
- }
14753
- if (progress < 0) {
14754
- width = 0;
14755
- }
14756
- return width;
14757
- }, [progress]);
14758
- var normalizedRadius = React.useMemo(function () {
14759
- return radius - stroke / 2;
14760
- }, [radius, stroke]);
14761
- var circumference = React.useMemo(function () {
14762
- return normalizedRadius * 2 * Math.PI;
14763
- }, [normalizedRadius]);
14764
- var strokeDashoffsetOuter = React.useMemo(function () {
14765
- return circumference - (100 - progressNumber) / 100 * circumference;
14766
- }, [circumference, progressNumber]);
14767
- var strokeDashoffsetInner = React.useMemo(function () {
14768
- return circumference - progressNumber / 100 * circumference;
14769
- }, [circumference, progressNumber]);
14770
- return /*#__PURE__*/React__default["default"].createElement(StyledSvg, {
14771
- height: radius * 2,
14772
- width: radius * 2,
14773
- className: className
14774
- }, /*#__PURE__*/React__default["default"].createElement(StyledBackgroundCircle, {
14775
- $color: backgroundColor,
14776
- $strokeDashOffset: -strokeDashoffsetOuter,
14777
- strokeWidth: stroke,
14778
- strokeDasharray: "".concat(circumference, " ").concat(circumference),
14779
- r: normalizedRadius,
14780
- cx: radius,
14781
- cy: radius
14782
- }), /*#__PURE__*/React__default["default"].createElement(StyledForegroundCircle, {
14783
- $color: progressColor,
14784
- $strokeDashOffset: strokeDashoffsetInner,
14785
- strokeWidth: stroke,
14786
- strokeDasharray: "".concat(circumference, " ").concat(circumference),
14787
- $roundStroke: roundStroke,
14788
- r: normalizedRadius,
14789
- cx: radius,
14790
- cy: radius
14791
- }), showPercentage ? /*#__PURE__*/React__default["default"].createElement(StyledProgressRingPercentage, {
14792
- $color: progressColor,
14793
- $fontSize: fontSize,
14794
- x: "50%",
14795
- y: "-50%",
14796
- dominantBaseline: "central",
14797
- textAnchor: "middle"
14798
- }, progressNumber, "%") : null);
14799
- };
14800
- var ProgressRing = function ProgressRing(_ref2) {
14801
- var className = _ref2.className,
14802
- children = _ref2.children,
14803
- rest = _objectWithoutProperties(_ref2, _excluded$H);
14804
- return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
14805
- className: classNames__default["default"](className),
14806
- "data-testid": "progress-ring"
14807
- }, /*#__PURE__*/React__default["default"].createElement(ProgressCircle, rest), children ? /*#__PURE__*/React__default["default"].createElement(StyledChildrenWrapper, null, children) : null);
14808
- };
14809
- ProgressRing.displayName = "ProgressRing";
14810
-
14811
- var _excluded$G = ["className", "disabled", "invalid", "mode", "maxLength", "value", "hideProgress", "onChange"];
14662
+ var _excluded$H = ["className", "disabled", "invalid", "mode"];
14812
14663
  var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
14813
- var _value$length;
14814
14664
  var className = _ref.className,
14815
14665
  _ref$disabled = _ref.disabled,
14816
14666
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
@@ -14818,56 +14668,19 @@
14818
14668
  invalid = _ref$invalid === void 0 ? false : _ref$invalid,
14819
14669
  _ref$mode = _ref.mode,
14820
14670
  mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
14821
- maxLength = _ref.maxLength,
14822
- value = _ref.value,
14823
- _ref$hideProgress = _ref.hideProgress,
14824
- hideProgress = _ref$hideProgress === void 0 ? false : _ref$hideProgress,
14825
- onChange = _ref.onChange,
14826
- rest = _objectWithoutProperties(_ref, _excluded$G);
14827
- var innerRef = React.useRef(null);
14828
- var handleRef = useForkRef(ref, innerRef);
14829
- var _React$useState = React__default["default"].useState((_value$length = value === null || value === void 0 ? void 0 : value.length) !== null && _value$length !== void 0 ? _value$length : 0),
14830
- _React$useState2 = _slicedToArray(_React$useState, 2),
14831
- currentLength = _React$useState2[0],
14832
- setCurrentLength = _React$useState2[1];
14833
- var warningGauge = React.useMemo(function () {
14834
- return 75 * Number(maxLength) / 100;
14835
- }, [maxLength]);
14836
- var progressColor = React.useMemo(function () {
14837
- if (currentLength >= Number(maxLength)) {
14838
- return "var(--red-alert)";
14839
- }
14840
- if (currentLength > warningGauge && currentLength < Number(maxLength)) {
14841
- return "var(--warning)";
14842
- }
14843
- return "var(--color-sucess-green)";
14844
- }, [currentLength, maxLength, warningGauge]);
14845
- var max = Number(maxLength !== null && maxLength !== void 0 ? maxLength : 1);
14846
- var progress = Math.min(currentLength / max * 100, 100);
14847
- var handleChange = function handleChange(e) {
14848
- setCurrentLength(e.target.value.length);
14849
- if (onChange) {
14850
- onChange(e);
14851
- }
14852
- };
14853
- return /*#__PURE__*/React__default["default"].createElement(StyledTextAreaWrapper, null, /*#__PURE__*/React__default["default"].createElement(StyledTextarea, _extends({}, rest, {
14854
- value: value,
14671
+ rest = _objectWithoutProperties(_ref, _excluded$H);
14672
+ return /*#__PURE__*/React__default["default"].createElement(StyledTextarea, _extends({}, rest, {
14855
14673
  $invalid: invalid,
14856
- ref: handleRef,
14674
+ ref: ref,
14857
14675
  $mode: mode,
14858
14676
  disabled: disabled,
14859
14677
  "aria-invalid": invalid,
14860
14678
  className: classNames__default["default"]("c-textarea", {
14861
14679
  "c-textarea__disabled": disabled
14862
- }, className),
14863
- onChange: handleChange
14864
- })), maxLength && !hideProgress && /*#__PURE__*/React__default["default"].createElement(StyledProgressRingWrapper, null, /*#__PURE__*/React__default["default"].createElement(ProgressRing, {
14865
- progress: progress,
14866
- radius: 10,
14867
- stroke: 1.5,
14868
- progressColor: progressColor
14869
- })));
14680
+ }, className)
14681
+ }));
14870
14682
  });
14683
+ Textarea.displayName = "Textarea";
14871
14684
 
14872
14685
  function createChainedFunction() {
14873
14686
  for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -14889,7 +14702,7 @@
14889
14702
  function () {});
14890
14703
  }
14891
14704
 
14892
- var _excluded$F = ["children", "disableFocusLock", "disableScrollLock", "disableBackgroundClick", "disableBackgroundColor", "disableCloseOnEsc", "open", "onClose", "onClickOutside"];
14705
+ var _excluded$G = ["children", "disableFocusLock", "disableScrollLock", "disableBackgroundClick", "disableBackgroundColor", "disableCloseOnEsc", "open", "onClose", "onClickOutside"];
14893
14706
  var getHasTransition = function getHasTransition(children) {
14894
14707
  return children.props ? Object.prototype.hasOwnProperty.call(children.props, "in") : false;
14895
14708
  };
@@ -14909,7 +14722,7 @@
14909
14722
  defaultOpen = _ref$open === void 0 ? false : _ref$open,
14910
14723
  onClose = _ref.onClose,
14911
14724
  onClickOutside = _ref.onClickOutside,
14912
- rest = _objectWithoutProperties(_ref, _excluded$F);
14725
+ rest = _objectWithoutProperties(_ref, _excluded$G);
14913
14726
  var _useState = React.useState(defaultOpen),
14914
14727
  _useState2 = _slicedToArray(_useState, 2),
14915
14728
  open = _useState2[0],
@@ -15050,7 +14863,7 @@
15050
14863
  });
15051
14864
  StyledCssTransition.displayName = "StyledCssTransition";
15052
14865
 
15053
- var _excluded$E = ["children", "onClose", "controls", "open", "animation", "position", "mode", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "disableBackgroundClick"];
14866
+ var _excluded$F = ["children", "onClose", "controls", "open", "animation", "position", "mode", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "disableBackgroundClick"];
15054
14867
  var Sheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15055
14868
  var children = _ref.children,
15056
14869
  onClose = _ref.onClose,
@@ -15074,7 +14887,7 @@
15074
14887
  bodyClassName = _ref.bodyClassName,
15075
14888
  _ref$disableBackgroun2 = _ref.disableBackgroundClick,
15076
14889
  disableBackgroundClick = _ref$disableBackgroun2 === void 0 ? false : _ref$disableBackgroun2,
15077
- rest = _objectWithoutProperties(_ref, _excluded$E);
14890
+ rest = _objectWithoutProperties(_ref, _excluded$F);
15078
14891
  var _useState = React.useState(defaultOpen),
15079
14892
  _useState2 = _slicedToArray(_useState, 2),
15080
14893
  open = _useState2[0],
@@ -15167,13 +14980,13 @@
15167
14980
  });
15168
14981
  StyledHeader.displayName = "StyledHeader";
15169
14982
 
15170
- var _excluded$D = ["className", "size", "children"];
14983
+ var _excluded$E = ["className", "size", "children"];
15171
14984
  var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15172
14985
  var className = _ref.className,
15173
14986
  _ref$size = _ref.size,
15174
14987
  size = _ref$size === void 0 ? "small" : _ref$size,
15175
14988
  children = _ref.children,
15176
- rest = _objectWithoutProperties(_ref, _excluded$D);
14989
+ rest = _objectWithoutProperties(_ref, _excluded$E);
15177
14990
  return /*#__PURE__*/React__default["default"].createElement(StyledHeader, _extends({
15178
14991
  type: "paper-2",
15179
14992
  className: classNames__default["default"]("c-header", className),
@@ -15189,7 +15002,7 @@
15189
15002
  })(["white-space:pre-wrap;overflow-wrap:break-word;resize:none;"]);
15190
15003
  StyledAutoResizeTextarea.displayName = "StyledAutoResizeTextarea";
15191
15004
 
15192
- var _excluded$C = ["minRows", "maxRows", "lineHeight", "onChange", "className", "preventNewRowOnEnter", "cursorAtTextEnd", "onKeyDown", "value", "mode"];
15005
+ var _excluded$D = ["minRows", "maxRows", "lineHeight", "onChange", "className", "preventNewRowOnEnter", "cursorAtTextEnd", "onKeyDown", "value", "mode"];
15193
15006
  var AutoResizeTextarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15194
15007
  var _ref$minRows = _ref.minRows,
15195
15008
  minRows = _ref$minRows === void 0 ? 1 : _ref$minRows,
@@ -15207,7 +15020,7 @@
15207
15020
  value = _ref.value,
15208
15021
  _ref$mode = _ref.mode,
15209
15022
  mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
15210
- rest = _objectWithoutProperties(_ref, _excluded$C);
15023
+ rest = _objectWithoutProperties(_ref, _excluded$D);
15211
15024
  var innerRef = React.useRef(null);
15212
15025
  var _useState = React.useState(minRows),
15213
15026
  _useState2 = _slicedToArray(_useState, 2),
@@ -15484,7 +15297,7 @@
15484
15297
  });
15485
15298
  StyledChoose.displayName = "StyledChoose";
15486
15299
 
15487
- var _excluded$B = ["children", "disabled", "active", "className"];
15300
+ var _excluded$C = ["children", "disabled", "active", "className"];
15488
15301
  /**
15489
15302
  * Choose component
15490
15303
  */
@@ -15495,7 +15308,7 @@
15495
15308
  _ref$active = _ref.active,
15496
15309
  active = _ref$active === void 0 ? false : _ref$active,
15497
15310
  className = _ref.className,
15498
- args = _objectWithoutProperties(_ref, _excluded$B);
15311
+ args = _objectWithoutProperties(_ref, _excluded$C);
15499
15312
  return /*#__PURE__*/React__default["default"].createElement(StyledChoose, _extends({
15500
15313
  disabled: disabled,
15501
15314
  className: classNames__default["default"]("c-choose", className),
@@ -15591,21 +15404,21 @@
15591
15404
  StyledLinkElements.displayName = "StyledLinkElements";
15592
15405
  StyledLink.displayName = "StyledLink";
15593
15406
 
15594
- var _excluded$A = ["children", "className"];
15407
+ var _excluded$B = ["children", "className"];
15595
15408
  /**
15596
15409
  * Back link component
15597
15410
  */
15598
15411
  var BackLink = function BackLink(_ref) {
15599
15412
  var children = _ref.children,
15600
15413
  className = _ref.className,
15601
- args = _objectWithoutProperties(_ref, _excluded$A);
15414
+ args = _objectWithoutProperties(_ref, _excluded$B);
15602
15415
  return /*#__PURE__*/React__default["default"].createElement(StyledBackLink, _extends({
15603
15416
  className: classNames__default["default"]("c-back-link", className)
15604
15417
  }, args), children);
15605
15418
  };
15606
15419
  BackLink.displayName = "BackLink";
15607
15420
 
15608
- var _excluded$z = ["as", "children", "variant", "size", "disabled", "className"];
15421
+ var _excluded$A = ["as", "children", "variant", "size", "disabled", "className"];
15609
15422
  /**
15610
15423
  * Link component
15611
15424
  */
@@ -15618,7 +15431,7 @@
15618
15431
  _ref$disabled = _ref.disabled,
15619
15432
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
15620
15433
  className = _ref.className,
15621
- args = _objectWithoutProperties(_ref, _excluded$z);
15434
+ args = _objectWithoutProperties(_ref, _excluded$A);
15622
15435
  var Component = as || "a";
15623
15436
  return /*#__PURE__*/React__default["default"].createElement(StyledLink, _extends({
15624
15437
  ref: ref,
@@ -15676,13 +15489,13 @@
15676
15489
  })(["padding:20px 30px;", " ", ""], FontStyle, BoxSizingStyle);
15677
15490
  StyledDialogActions.displayName = "StyledDialogActions";
15678
15491
 
15679
- var _excluded$y = ["className", "children"];
15492
+ var _excluded$z = ["className", "children"];
15680
15493
  // import { useDialogContext } from "./DialogContext";
15681
15494
 
15682
15495
  var DialogActions = function DialogActions(_ref) {
15683
15496
  var className = _ref.className,
15684
15497
  children = _ref.children,
15685
- rest = _objectWithoutProperties(_ref, _excluded$y);
15498
+ rest = _objectWithoutProperties(_ref, _excluded$z);
15686
15499
  // useDialogContext();
15687
15500
 
15688
15501
  return /*#__PURE__*/React__default["default"].createElement(StyledDialogActions, _extends({
@@ -15691,13 +15504,13 @@
15691
15504
  };
15692
15505
  DialogActions.displayName = "DialogActions";
15693
15506
 
15694
- var _excluded$x = ["className", "children"];
15507
+ var _excluded$y = ["className", "children"];
15695
15508
  // import { useDialogContext } from "./DialogContext";
15696
15509
 
15697
15510
  var DialogContent = function DialogContent(_ref) {
15698
15511
  var className = _ref.className,
15699
15512
  children = _ref.children,
15700
- rest = _objectWithoutProperties(_ref, _excluded$x);
15513
+ rest = _objectWithoutProperties(_ref, _excluded$y);
15701
15514
  // useDialogContext();
15702
15515
 
15703
15516
  return /*#__PURE__*/React__default["default"].createElement(StyledDialogContent, _extends({
@@ -15718,7 +15531,7 @@
15718
15531
  };
15719
15532
  DialogContentDivider.displayName = "DialogContentDivider";
15720
15533
 
15721
- var _excluded$w = ["children", "className", "disableDefaultHeading"];
15534
+ var _excluded$x = ["children", "className", "disableDefaultHeading"];
15722
15535
  // import { useDialogContext } from "./DialogContext";
15723
15536
 
15724
15537
  var DialogTitle = function DialogTitle(_ref) {
@@ -15726,7 +15539,7 @@
15726
15539
  className = _ref.className,
15727
15540
  _ref$disableDefaultHe = _ref.disableDefaultHeading,
15728
15541
  disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
15729
- rest = _objectWithoutProperties(_ref, _excluded$w);
15542
+ rest = _objectWithoutProperties(_ref, _excluded$x);
15730
15543
  // useDialogContext();
15731
15544
 
15732
15545
  return /*#__PURE__*/React__default["default"].createElement(StyledDialogTitle, _extends({
@@ -15735,7 +15548,7 @@
15735
15548
  };
15736
15549
  DialogTitle.displayName = "DialogTitle";
15737
15550
 
15738
- var _excluded$v = ["in", "children", "style", "timeout"];
15551
+ var _excluded$w = ["in", "children", "style", "timeout"];
15739
15552
  var defaultStyle$2 = function defaultStyle(duration) {
15740
15553
  return {
15741
15554
  transition: "all ".concat(duration, "ms ease-in-out"),
@@ -15763,7 +15576,7 @@
15763
15576
  style = _ref.style,
15764
15577
  _ref$timeout = _ref.timeout,
15765
15578
  timeout = _ref$timeout === void 0 ? 500 : _ref$timeout,
15766
- rest = _objectWithoutProperties(_ref, _excluded$v);
15579
+ rest = _objectWithoutProperties(_ref, _excluded$w);
15767
15580
  return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
15768
15581
  appear: true,
15769
15582
  in: inProp,
@@ -15778,7 +15591,7 @@
15778
15591
  };
15779
15592
  Fade.displayName = "Fade";
15780
15593
 
15781
- var _excluded$u = ["in", "children", "style", "timeout", "initialDirection"];
15594
+ var _excluded$v = ["in", "children", "style", "timeout", "initialDirection"];
15782
15595
  var Slide = function Slide(_ref) {
15783
15596
  var _ref$in = _ref.in,
15784
15597
  inProp = _ref$in === void 0 ? false : _ref$in,
@@ -15788,7 +15601,7 @@
15788
15601
  timeout = _ref$timeout === void 0 ? 300 : _ref$timeout,
15789
15602
  _ref$initialDirection = _ref.initialDirection,
15790
15603
  initialDirection = _ref$initialDirection === void 0 ? "left" : _ref$initialDirection,
15791
- rest = _objectWithoutProperties(_ref, _excluded$u);
15604
+ rest = _objectWithoutProperties(_ref, _excluded$v);
15792
15605
  var directionSign;
15793
15606
  switch (initialDirection) {
15794
15607
  case "right":
@@ -15894,12 +15707,12 @@
15894
15707
  return props.$direction === "right" && styled.css(["&.c-slide-enter{position:absolute;transform:translateX(-100%);}&.c-slide-enter-active{transform:translateX(0%);transition:all 200ms ease;}&.c-slide-exit{position:absolute;}&.c-slide-exit-active{transform:translateX(100%);transition:all 200ms ease;}"]);
15895
15708
  });
15896
15709
 
15897
- var _excluded$t = ["children", "direction"];
15710
+ var _excluded$u = ["children", "direction"];
15898
15711
  var SlideLeftRightTransition = function SlideLeftRightTransition(_ref) {
15899
15712
  var children = _ref.children,
15900
15713
  _ref$direction = _ref.direction,
15901
15714
  direction = _ref$direction === void 0 ? "left" : _ref$direction,
15902
- props = _objectWithoutProperties(_ref, _excluded$t);
15715
+ props = _objectWithoutProperties(_ref, _excluded$u);
15903
15716
  return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, _extends({
15904
15717
  timeout: 200,
15905
15718
  classNames: "c-slide",
@@ -15942,7 +15755,7 @@
15942
15755
  };
15943
15756
  ResizeTransition.displayName = "ResizeTransition";
15944
15757
 
15945
- var _excluded$s = ["in", "children", "style", "timeout"];
15758
+ var _excluded$t = ["in", "children", "style", "timeout"];
15946
15759
  var defaultStyle = function defaultStyle(duration) {
15947
15760
  return {
15948
15761
  transition: "all ".concat(duration, "ms ease-in"),
@@ -15976,7 +15789,7 @@
15976
15789
  style = _ref.style,
15977
15790
  _ref$timeout = _ref.timeout,
15978
15791
  timeout = _ref$timeout === void 0 ? 200 : _ref$timeout,
15979
- rest = _objectWithoutProperties(_ref, _excluded$s);
15792
+ rest = _objectWithoutProperties(_ref, _excluded$t);
15980
15793
  return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
15981
15794
  appear: true,
15982
15795
  in: inProp,
@@ -16026,7 +15839,7 @@
16026
15839
  };
16027
15840
  Scale.displayName = "Scale";
16028
15841
 
16029
- var _excluded$r = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
15842
+ var _excluded$s = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
16030
15843
  var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16031
15844
  var children = _ref.children,
16032
15845
  _ref$open = _ref.open,
@@ -16040,7 +15853,7 @@
16040
15853
  _ref$animate = _ref.animate,
16041
15854
  animate = _ref$animate === void 0 ? "slide" : _ref$animate,
16042
15855
  onClickOutside = _ref.onClickOutside,
16043
- rest = _objectWithoutProperties(_ref, _excluded$r);
15856
+ rest = _objectWithoutProperties(_ref, _excluded$s);
16044
15857
  var animateDialog = function animateDialog() {
16045
15858
  switch (animate) {
16046
15859
  case "fade":
@@ -16791,7 +16604,7 @@
16791
16604
  StyledToastMessage.displayName = "StyledToastMessage";
16792
16605
  StyledCloseSmallIcon.displayName = "StyledCloseSmallIcon";
16793
16606
 
16794
- var _excluded$q = ["text", "type", "onClose", "dismissible", "dropShadow", "timeout"];
16607
+ var _excluded$r = ["text", "type", "onClose", "dismissible", "dropShadow", "timeout"];
16795
16608
  var ToastMessage = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16796
16609
  var text = _ref.text,
16797
16610
  type = _ref.type,
@@ -16802,7 +16615,7 @@
16802
16615
  dropShadow = _ref$dropShadow === void 0 ? false : _ref$dropShadow,
16803
16616
  _ref$timeout = _ref.timeout,
16804
16617
  timeout = _ref$timeout === void 0 ? 0 : _ref$timeout,
16805
- rest = _objectWithoutProperties(_ref, _excluded$q);
16618
+ rest = _objectWithoutProperties(_ref, _excluded$r);
16806
16619
  var handleOnClose = React.useCallback(function () {
16807
16620
  if (typeof onClose === "function") {
16808
16621
  onClose();
@@ -16850,7 +16663,7 @@
16850
16663
  });
16851
16664
  StyledValueButton.displayName = "StyledValueButton";
16852
16665
 
16853
- var _excluded$p = ["active", "alwaysShowIcon", "icon", "label", "value"];
16666
+ var _excluded$q = ["active", "alwaysShowIcon", "icon", "label", "value"];
16854
16667
  var ValueButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16855
16668
  var _ref$active = _ref.active,
16856
16669
  active = _ref$active === void 0 ? false : _ref$active,
@@ -16859,7 +16672,7 @@
16859
16672
  icon = _ref.icon,
16860
16673
  label = _ref.label,
16861
16674
  value = _ref.value,
16862
- args = _objectWithoutProperties(_ref, _excluded$p);
16675
+ args = _objectWithoutProperties(_ref, _excluded$q);
16863
16676
  return /*#__PURE__*/React__default["default"].createElement(StyledValueButton, _extends({
16864
16677
  className: "c-value-button"
16865
16678
  }, args, {
@@ -16882,12 +16695,12 @@
16882
16695
  });
16883
16696
  ValueButton.displayName = "ValueButton";
16884
16697
 
16885
- var _excluded$o = ["children", "type"];
16698
+ var _excluded$p = ["children", "type"];
16886
16699
  var Trigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16887
16700
  var children = _ref.children,
16888
16701
  _ref$type = _ref.type,
16889
16702
  type = _ref$type === void 0 ? "button" : _ref$type,
16890
- rest = _objectWithoutProperties(_ref, _excluded$o);
16703
+ rest = _objectWithoutProperties(_ref, _excluded$p);
16891
16704
  return /*#__PURE__*/React__default["default"].createElement(StyledButton, _extends({
16892
16705
  ref: ref,
16893
16706
  role: "button",
@@ -16941,7 +16754,7 @@
16941
16754
  });
16942
16755
  StyledCaretIcon.displayName = "StyledCaretIcon";
16943
16756
 
16944
- var _excluded$n = ["children", "type", "size", "invalid", "open", "endAdornment", "typographyProps", "mode"];
16757
+ var _excluded$o = ["children", "type", "size", "invalid", "open", "endAdornment", "typographyProps", "mode"];
16945
16758
  var SelectTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16946
16759
  var children = _ref.children,
16947
16760
  _ref$type = _ref.type,
@@ -16956,7 +16769,7 @@
16956
16769
  typographyProps = _ref.typographyProps,
16957
16770
  _ref$mode = _ref.mode,
16958
16771
  mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
16959
- rest = _objectWithoutProperties(_ref, _excluded$n);
16772
+ rest = _objectWithoutProperties(_ref, _excluded$o);
16960
16773
  var variant = React.useMemo(function () {
16961
16774
  if (size === "big") {
16962
16775
  return "Body 1";
@@ -16987,7 +16800,7 @@
16987
16800
  });
16988
16801
  SelectTrigger.displayName = "SelectTrigger";
16989
16802
 
16990
- var _excluded$m = ["mode", "selected", "min", "max", "onChange", "target", "triggerMode"];
16803
+ var _excluded$n = ["mode", "selected", "min", "max", "onChange", "target", "triggerMode"];
16991
16804
  var SelectTime = function SelectTime(_ref) {
16992
16805
  var _ref$mode = _ref.mode,
16993
16806
  mode = _ref$mode === void 0 ? "24" : _ref$mode,
@@ -16998,7 +16811,7 @@
16998
16811
  onChange = _ref.onChange,
16999
16812
  target = _ref.target,
17000
16813
  triggerMode = _ref.triggerMode,
17001
- rest = _objectWithoutProperties(_ref, _excluded$m);
16814
+ rest = _objectWithoutProperties(_ref, _excluded$n);
17002
16815
  var generateTimeOptions = function generateTimeOptions() {
17003
16816
  var minTime = moment__default["default"](isValidTime(min) ? min : "00:00", "HH:mm");
17004
16817
  var maxTime = moment__default["default"](isValidTime(max) ? max : "23:45", "HH:mm");
@@ -17063,11 +16876,11 @@
17063
16876
  });
17064
16877
  StyledToggle.displayName = "StyledToggle";
17065
16878
 
17066
- var _excluded$l = ["hovered", "className"];
16879
+ var _excluded$m = ["hovered", "className"];
17067
16880
  var Toggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
17068
16881
  var hovered = _ref.hovered,
17069
16882
  className = _ref.className,
17070
- args = _objectWithoutProperties(_ref, _excluded$l);
16883
+ args = _objectWithoutProperties(_ref, _excluded$m);
17071
16884
  return /*#__PURE__*/React__default["default"].createElement(StyledToggle, {
17072
16885
  className: classNames__default["default"]("c-toggle", className),
17073
16886
  $isHovered: hovered,
@@ -17219,7 +17032,7 @@
17219
17032
  })(["color:var(--color-theme-700);"]);
17220
17033
  ChipCloseIcon.displayName = "ChipCloseIcon";
17221
17034
 
17222
- var _excluded$k = ["startAdornment", "label", "onClose", "size", "color", "backgroundColor", "closeClassName", "typographyProps"];
17035
+ var _excluded$l = ["startAdornment", "label", "onClose", "size", "color", "backgroundColor", "closeClassName", "typographyProps"];
17223
17036
  var Chip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
17224
17037
  var startAdornment = _ref.startAdornment,
17225
17038
  label = _ref.label,
@@ -17230,7 +17043,7 @@
17230
17043
  backgroundColor = _ref.backgroundColor,
17231
17044
  closeClassName = _ref.closeClassName,
17232
17045
  typographyProps = _ref.typographyProps,
17233
- rest = _objectWithoutProperties(_ref, _excluded$k);
17046
+ rest = _objectWithoutProperties(_ref, _excluded$l);
17234
17047
  var showClose = typeof onClose === "function";
17235
17048
  var variant = React.useMemo(function () {
17236
17049
  switch (size) {
@@ -17263,7 +17076,7 @@
17263
17076
  });
17264
17077
  Chip.displayName = "Chip";
17265
17078
 
17266
- 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"];
17079
+ var _excluded$k = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper", "onClose", "onClear", "onDeselect", "defaultValue"];
17267
17080
  var ComboBox = function ComboBox(_ref) {
17268
17081
  var _comboBoxRef$current2, _comboBoxRef$current3;
17269
17082
  var _ref$options = _ref.options,
@@ -17298,7 +17111,7 @@
17298
17111
  onClear = _ref.onClear,
17299
17112
  onDeselect = _ref.onDeselect,
17300
17113
  defaultValue = _ref.defaultValue,
17301
- prop = _objectWithoutProperties(_ref, _excluded$j);
17114
+ prop = _objectWithoutProperties(_ref, _excluded$k);
17302
17115
  var selectedName = React.useMemo(function () {
17303
17116
  var value = "";
17304
17117
  if (!selected) {
@@ -17708,11 +17521,11 @@
17708
17521
  })(["display:flex;justify-content:center;gap:12px;align-items:center;height:32px;padding:4px 16px 4px 4px;position:relative;background:none;border:none;cursor:pointer;&:before{content:\"\";display:block;height:2px;width:0%;position:absolute;left:16px;background:var(--color-primary);transition:ease 0.3s all;border-radius:30px;opacity:0;}&:hover{", "{color:var(--page-paper-main);}&:before{height:32px;width:100%;left:0;opacity:1;}", "{fill:var(--page-paper-main);transform:rotate(90deg);transition:ease 0.3s;}}"], StyledText, StyledAddCrossIcon);
17709
17522
  StyledAddToListButton.displayName = "StyledAddToListButton";
17710
17523
 
17711
- var _excluded$i = ["text", "className"];
17524
+ var _excluded$j = ["text", "className"];
17712
17525
  var AddToListButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
17713
17526
  var text = _ref.text,
17714
17527
  className = _ref.className,
17715
- rest = _objectWithoutProperties(_ref, _excluded$i);
17528
+ rest = _objectWithoutProperties(_ref, _excluded$j);
17716
17529
  return /*#__PURE__*/React__default["default"].createElement(StyledAddToListButton, _extends({
17717
17530
  ref: ref,
17718
17531
  className: classNames__default["default"]("c--add-to-list-btn", className)
@@ -17792,6 +17605,134 @@
17792
17605
  };
17793
17606
  ProgressBar.displayName = "ProgressBar";
17794
17607
 
17608
+ var StyledWrapper = styled__default["default"].div.withConfig({
17609
+ displayName: "Styles__StyledWrapper",
17610
+ componentId: "sc-o6dcyu-0"
17611
+ })(["position:relative;display:inline-flex;"]);
17612
+ StyledWrapper.displayName = "StyledWrapper";
17613
+ var StyledChildrenWrapper = styled__default["default"].div.withConfig({
17614
+ displayName: "Styles__StyledChildrenWrapper",
17615
+ componentId: "sc-o6dcyu-1"
17616
+ })(["position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:inline-flex;"]);
17617
+ StyledChildrenWrapper.displayName = "StyledChildrenWrapper";
17618
+ var StyledSvg = styled__default["default"].svg.withConfig({
17619
+ displayName: "Styles__StyledSvg",
17620
+ componentId: "sc-o6dcyu-2"
17621
+ })(["transform:rotate(-90deg);"]);
17622
+ StyledSvg.displayName = "StyledSvg";
17623
+ var StyledBackgroundCircle = styled__default["default"].circle.withConfig({
17624
+ displayName: "Styles__StyledBackgroundCircle",
17625
+ componentId: "sc-o6dcyu-3"
17626
+ })(["fill:transparent;transition:stroke-dashoffset 0.5s linear,stroke 300ms ease-out;", " ", ""], function (props) {
17627
+ return props.$color ? styled.css(["stroke:", ";"], props.$color) : styled.css(["stroke:var(--color-theme-transparent-300);"]);
17628
+ }, function (props) {
17629
+ return props.$strokeDashOffset && styled.css(["stroke-dashoffset:", ";"], props.$strokeDashOffset);
17630
+ });
17631
+ StyledBackgroundCircle.displayName = "StyledBackgroundCircle";
17632
+ var StyledForegroundCircle = styled__default["default"].circle.withConfig({
17633
+ displayName: "Styles__StyledForegroundCircle",
17634
+ componentId: "sc-o6dcyu-4"
17635
+ })(["fill:transparent;transition:stroke-dashoffset 0.5s linear,stroke 300ms ease-out;", " ", " ", ""], function (props) {
17636
+ return props.$roundStroke && styled.css(["stroke-linecap:round;"]);
17637
+ }, function (props) {
17638
+ return props.$color ? styled.css(["stroke:", ";"], props.$color) : styled.css(["stroke:var(--color-secondary);"]);
17639
+ }, function (props) {
17640
+ return props.$strokeDashOffset && styled.css(["stroke-dashoffset:", ";"], props.$strokeDashOffset);
17641
+ });
17642
+ StyledForegroundCircle.displayName = "StyledForegroundCircle";
17643
+ var StyledProgressRingPercentage = styled__default["default"].text.withConfig({
17644
+ displayName: "Styles__StyledProgressRingPercentage",
17645
+ componentId: "sc-o6dcyu-5"
17646
+ })(["transform:rotate(90deg);", " ", ""], function (props) {
17647
+ return props.$color ? styled.css(["fill:", ";"], props.$color) : styled.css(["fill:var(--color-secondary);"]);
17648
+ }, function (props) {
17649
+ return props.$fontSize ? styled.css(["font-size:", "px;"], props.$fontSize) : styled.css(["font-size:10px;"]);
17650
+ });
17651
+ StyledProgressRingPercentage.displayName = "StyledProgressRingPercentage";
17652
+
17653
+ var _excluded$i = ["className", "children"];
17654
+ var ProgressCircle = function ProgressCircle(_ref) {
17655
+ var backgroundColor = _ref.backgroundColor,
17656
+ progressColor = _ref.progressColor,
17657
+ _ref$progress = _ref.progress,
17658
+ progress = _ref$progress === void 0 ? 0 : _ref$progress,
17659
+ _ref$radius = _ref.radius,
17660
+ radius = _ref$radius === void 0 ? 20 : _ref$radius,
17661
+ _ref$stroke = _ref.stroke,
17662
+ stroke = _ref$stroke === void 0 ? 3 : _ref$stroke,
17663
+ _ref$roundStroke = _ref.roundStroke,
17664
+ roundStroke = _ref$roundStroke === void 0 ? false : _ref$roundStroke,
17665
+ className = _ref.className,
17666
+ _ref$showPercentage = _ref.showPercentage,
17667
+ showPercentage = _ref$showPercentage === void 0 ? false : _ref$showPercentage,
17668
+ fontSize = _ref.fontSize;
17669
+ if (stroke > radius) {
17670
+ console.warn("Stroke can not have value greater than the radius.");
17671
+ stroke = radius;
17672
+ }
17673
+ var progressNumber = React.useMemo(function () {
17674
+ var width = progress;
17675
+ if (progress > 100) {
17676
+ width = 100;
17677
+ }
17678
+ if (progress < 0) {
17679
+ width = 0;
17680
+ }
17681
+ return width;
17682
+ }, [progress]);
17683
+ var normalizedRadius = React.useMemo(function () {
17684
+ return radius - stroke / 2;
17685
+ }, [radius, stroke]);
17686
+ var circumference = React.useMemo(function () {
17687
+ return normalizedRadius * 2 * Math.PI;
17688
+ }, [normalizedRadius]);
17689
+ var strokeDashoffsetOuter = React.useMemo(function () {
17690
+ return circumference - (100 - progressNumber) / 100 * circumference;
17691
+ }, [circumference, progressNumber]);
17692
+ var strokeDashoffsetInner = React.useMemo(function () {
17693
+ return circumference - progressNumber / 100 * circumference;
17694
+ }, [circumference, progressNumber]);
17695
+ return /*#__PURE__*/React__default["default"].createElement(StyledSvg, {
17696
+ height: radius * 2,
17697
+ width: radius * 2,
17698
+ className: className
17699
+ }, /*#__PURE__*/React__default["default"].createElement(StyledBackgroundCircle, {
17700
+ $color: backgroundColor,
17701
+ $strokeDashOffset: -strokeDashoffsetOuter,
17702
+ strokeWidth: stroke,
17703
+ strokeDasharray: "".concat(circumference, " ").concat(circumference),
17704
+ r: normalizedRadius,
17705
+ cx: radius,
17706
+ cy: radius
17707
+ }), /*#__PURE__*/React__default["default"].createElement(StyledForegroundCircle, {
17708
+ $color: progressColor,
17709
+ $strokeDashOffset: strokeDashoffsetInner,
17710
+ strokeWidth: stroke,
17711
+ strokeDasharray: "".concat(circumference, " ").concat(circumference),
17712
+ $roundStroke: roundStroke,
17713
+ r: normalizedRadius,
17714
+ cx: radius,
17715
+ cy: radius
17716
+ }), showPercentage ? /*#__PURE__*/React__default["default"].createElement(StyledProgressRingPercentage, {
17717
+ $color: progressColor,
17718
+ $fontSize: fontSize,
17719
+ x: "50%",
17720
+ y: "-50%",
17721
+ dominantBaseline: "central",
17722
+ textAnchor: "middle"
17723
+ }, progressNumber, "%") : null);
17724
+ };
17725
+ var ProgressRing = function ProgressRing(_ref2) {
17726
+ var className = _ref2.className,
17727
+ children = _ref2.children,
17728
+ rest = _objectWithoutProperties(_ref2, _excluded$i);
17729
+ return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
17730
+ className: classNames__default["default"](className),
17731
+ "data-testid": "progress-ring"
17732
+ }, /*#__PURE__*/React__default["default"].createElement(ProgressCircle, rest), children ? /*#__PURE__*/React__default["default"].createElement(StyledChildrenWrapper, null, children) : null);
17733
+ };
17734
+ ProgressRing.displayName = "ProgressRing";
17735
+
17795
17736
  var _excluded$h = ["radius"];
17796
17737
  var ProgressPie = function ProgressPie(_ref) {
17797
17738
  var _ref$radius = _ref.radius,