@activecollab/components 2.0.128 → 2.0.129
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/Textarea/Styles.js +23 -2
- package/dist/cjs/components/Textarea/Styles.js.map +1 -1
- package/dist/cjs/components/Textarea/Textarea.js +52 -6
- package/dist/cjs/components/Textarea/Textarea.js.map +1 -1
- package/dist/esm/components/Textarea/Styles.d.ts +2 -0
- package/dist/esm/components/Textarea/Styles.d.ts.map +1 -1
- package/dist/esm/components/Textarea/Styles.js +22 -1
- package/dist/esm/components/Textarea/Styles.js.map +1 -1
- package/dist/esm/components/Textarea/Textarea.d.ts +5 -1
- package/dist/esm/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/esm/components/Textarea/Textarea.js +41 -7
- package/dist/esm/components/Textarea/Textarea.js.map +1 -1
- package/dist/index.js +243 -184
- 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
|
@@ -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,6 +14635,8 @@
|
|
|
14635
14635
|
"letterSpacing": "0.02em"
|
|
14636
14636
|
}, {
|
|
14637
14637
|
"fontWeight": "400"
|
|
14638
|
+
}, {
|
|
14639
|
+
"resize": "none"
|
|
14638
14640
|
}, {
|
|
14639
14641
|
"borderColor": "var(--color-theme-500)"
|
|
14640
14642
|
}, FontStyle, BoxSizingStyle, function (props) {
|
|
@@ -14657,10 +14659,158 @@
|
|
|
14657
14659
|
}, function (props) {
|
|
14658
14660
|
return !props.disabled && props.$invalid && props.$mode === "flat" && styled.css(["color:var(--red-alert);"]);
|
|
14659
14661
|
});
|
|
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
|
+
});
|
|
14660
14679
|
StyledTextarea.displayName = "StyledTextarea";
|
|
14680
|
+
StyledTextAreaWrapper.displayName = "StyledTextAreaWrapper";
|
|
14681
|
+
StyledProgressRingWrapper.displayName = "StyledProgressRingWrapper";
|
|
14661
14682
|
|
|
14662
|
-
var
|
|
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"];
|
|
14663
14812
|
var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14813
|
+
var _value$length;
|
|
14664
14814
|
var className = _ref.className,
|
|
14665
14815
|
_ref$disabled = _ref.disabled,
|
|
14666
14816
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -14668,19 +14818,56 @@
|
|
|
14668
14818
|
invalid = _ref$invalid === void 0 ? false : _ref$invalid,
|
|
14669
14819
|
_ref$mode = _ref.mode,
|
|
14670
14820
|
mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
|
|
14671
|
-
|
|
14672
|
-
|
|
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,
|
|
14673
14855
|
$invalid: invalid,
|
|
14674
|
-
ref:
|
|
14856
|
+
ref: handleRef,
|
|
14675
14857
|
$mode: mode,
|
|
14676
14858
|
disabled: disabled,
|
|
14677
14859
|
"aria-invalid": invalid,
|
|
14678
14860
|
className: classNames__default["default"]("c-textarea", {
|
|
14679
14861
|
"c-textarea__disabled": disabled
|
|
14680
|
-
}, className)
|
|
14681
|
-
|
|
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
|
+
})));
|
|
14682
14870
|
});
|
|
14683
|
-
Textarea.displayName = "Textarea";
|
|
14684
14871
|
|
|
14685
14872
|
function createChainedFunction() {
|
|
14686
14873
|
for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -14702,7 +14889,7 @@
|
|
|
14702
14889
|
function () {});
|
|
14703
14890
|
}
|
|
14704
14891
|
|
|
14705
|
-
var _excluded$
|
|
14892
|
+
var _excluded$F = ["children", "disableFocusLock", "disableScrollLock", "disableBackgroundClick", "disableBackgroundColor", "disableCloseOnEsc", "open", "onClose", "onClickOutside"];
|
|
14706
14893
|
var getHasTransition = function getHasTransition(children) {
|
|
14707
14894
|
return children.props ? Object.prototype.hasOwnProperty.call(children.props, "in") : false;
|
|
14708
14895
|
};
|
|
@@ -14722,7 +14909,7 @@
|
|
|
14722
14909
|
defaultOpen = _ref$open === void 0 ? false : _ref$open,
|
|
14723
14910
|
onClose = _ref.onClose,
|
|
14724
14911
|
onClickOutside = _ref.onClickOutside,
|
|
14725
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14912
|
+
rest = _objectWithoutProperties(_ref, _excluded$F);
|
|
14726
14913
|
var _useState = React.useState(defaultOpen),
|
|
14727
14914
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14728
14915
|
open = _useState2[0],
|
|
@@ -14863,7 +15050,7 @@
|
|
|
14863
15050
|
});
|
|
14864
15051
|
StyledCssTransition.displayName = "StyledCssTransition";
|
|
14865
15052
|
|
|
14866
|
-
var _excluded$
|
|
15053
|
+
var _excluded$E = ["children", "onClose", "controls", "open", "animation", "position", "mode", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "disableBackgroundClick"];
|
|
14867
15054
|
var Sheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14868
15055
|
var children = _ref.children,
|
|
14869
15056
|
onClose = _ref.onClose,
|
|
@@ -14887,7 +15074,7 @@
|
|
|
14887
15074
|
bodyClassName = _ref.bodyClassName,
|
|
14888
15075
|
_ref$disableBackgroun2 = _ref.disableBackgroundClick,
|
|
14889
15076
|
disableBackgroundClick = _ref$disableBackgroun2 === void 0 ? false : _ref$disableBackgroun2,
|
|
14890
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15077
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
14891
15078
|
var _useState = React.useState(defaultOpen),
|
|
14892
15079
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14893
15080
|
open = _useState2[0],
|
|
@@ -14980,13 +15167,13 @@
|
|
|
14980
15167
|
});
|
|
14981
15168
|
StyledHeader.displayName = "StyledHeader";
|
|
14982
15169
|
|
|
14983
|
-
var _excluded$
|
|
15170
|
+
var _excluded$D = ["className", "size", "children"];
|
|
14984
15171
|
var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14985
15172
|
var className = _ref.className,
|
|
14986
15173
|
_ref$size = _ref.size,
|
|
14987
15174
|
size = _ref$size === void 0 ? "small" : _ref$size,
|
|
14988
15175
|
children = _ref.children,
|
|
14989
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15176
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
14990
15177
|
return /*#__PURE__*/React__default["default"].createElement(StyledHeader, _extends({
|
|
14991
15178
|
type: "paper-2",
|
|
14992
15179
|
className: classNames__default["default"]("c-header", className),
|
|
@@ -15002,7 +15189,7 @@
|
|
|
15002
15189
|
})(["white-space:pre-wrap;overflow-wrap:break-word;resize:none;"]);
|
|
15003
15190
|
StyledAutoResizeTextarea.displayName = "StyledAutoResizeTextarea";
|
|
15004
15191
|
|
|
15005
|
-
var _excluded$
|
|
15192
|
+
var _excluded$C = ["minRows", "maxRows", "lineHeight", "onChange", "className", "preventNewRowOnEnter", "cursorAtTextEnd", "onKeyDown", "value", "mode"];
|
|
15006
15193
|
var AutoResizeTextarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15007
15194
|
var _ref$minRows = _ref.minRows,
|
|
15008
15195
|
minRows = _ref$minRows === void 0 ? 1 : _ref$minRows,
|
|
@@ -15020,7 +15207,7 @@
|
|
|
15020
15207
|
value = _ref.value,
|
|
15021
15208
|
_ref$mode = _ref.mode,
|
|
15022
15209
|
mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
|
|
15023
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15210
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
15024
15211
|
var innerRef = React.useRef(null);
|
|
15025
15212
|
var _useState = React.useState(minRows),
|
|
15026
15213
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -15297,7 +15484,7 @@
|
|
|
15297
15484
|
});
|
|
15298
15485
|
StyledChoose.displayName = "StyledChoose";
|
|
15299
15486
|
|
|
15300
|
-
var _excluded$
|
|
15487
|
+
var _excluded$B = ["children", "disabled", "active", "className"];
|
|
15301
15488
|
/**
|
|
15302
15489
|
* Choose component
|
|
15303
15490
|
*/
|
|
@@ -15308,7 +15495,7 @@
|
|
|
15308
15495
|
_ref$active = _ref.active,
|
|
15309
15496
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
15310
15497
|
className = _ref.className,
|
|
15311
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
15498
|
+
args = _objectWithoutProperties(_ref, _excluded$B);
|
|
15312
15499
|
return /*#__PURE__*/React__default["default"].createElement(StyledChoose, _extends({
|
|
15313
15500
|
disabled: disabled,
|
|
15314
15501
|
className: classNames__default["default"]("c-choose", className),
|
|
@@ -15404,21 +15591,21 @@
|
|
|
15404
15591
|
StyledLinkElements.displayName = "StyledLinkElements";
|
|
15405
15592
|
StyledLink.displayName = "StyledLink";
|
|
15406
15593
|
|
|
15407
|
-
var _excluded$
|
|
15594
|
+
var _excluded$A = ["children", "className"];
|
|
15408
15595
|
/**
|
|
15409
15596
|
* Back link component
|
|
15410
15597
|
*/
|
|
15411
15598
|
var BackLink = function BackLink(_ref) {
|
|
15412
15599
|
var children = _ref.children,
|
|
15413
15600
|
className = _ref.className,
|
|
15414
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
15601
|
+
args = _objectWithoutProperties(_ref, _excluded$A);
|
|
15415
15602
|
return /*#__PURE__*/React__default["default"].createElement(StyledBackLink, _extends({
|
|
15416
15603
|
className: classNames__default["default"]("c-back-link", className)
|
|
15417
15604
|
}, args), children);
|
|
15418
15605
|
};
|
|
15419
15606
|
BackLink.displayName = "BackLink";
|
|
15420
15607
|
|
|
15421
|
-
var _excluded$
|
|
15608
|
+
var _excluded$z = ["as", "children", "variant", "size", "disabled", "className"];
|
|
15422
15609
|
/**
|
|
15423
15610
|
* Link component
|
|
15424
15611
|
*/
|
|
@@ -15431,7 +15618,7 @@
|
|
|
15431
15618
|
_ref$disabled = _ref.disabled,
|
|
15432
15619
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
15433
15620
|
className = _ref.className,
|
|
15434
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
15621
|
+
args = _objectWithoutProperties(_ref, _excluded$z);
|
|
15435
15622
|
var Component = as || "a";
|
|
15436
15623
|
return /*#__PURE__*/React__default["default"].createElement(StyledLink, _extends({
|
|
15437
15624
|
ref: ref,
|
|
@@ -15489,13 +15676,13 @@
|
|
|
15489
15676
|
})(["padding:20px 30px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
15490
15677
|
StyledDialogActions.displayName = "StyledDialogActions";
|
|
15491
15678
|
|
|
15492
|
-
var _excluded$
|
|
15679
|
+
var _excluded$y = ["className", "children"];
|
|
15493
15680
|
// import { useDialogContext } from "./DialogContext";
|
|
15494
15681
|
|
|
15495
15682
|
var DialogActions = function DialogActions(_ref) {
|
|
15496
15683
|
var className = _ref.className,
|
|
15497
15684
|
children = _ref.children,
|
|
15498
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15685
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
15499
15686
|
// useDialogContext();
|
|
15500
15687
|
|
|
15501
15688
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogActions, _extends({
|
|
@@ -15504,13 +15691,13 @@
|
|
|
15504
15691
|
};
|
|
15505
15692
|
DialogActions.displayName = "DialogActions";
|
|
15506
15693
|
|
|
15507
|
-
var _excluded$
|
|
15694
|
+
var _excluded$x = ["className", "children"];
|
|
15508
15695
|
// import { useDialogContext } from "./DialogContext";
|
|
15509
15696
|
|
|
15510
15697
|
var DialogContent = function DialogContent(_ref) {
|
|
15511
15698
|
var className = _ref.className,
|
|
15512
15699
|
children = _ref.children,
|
|
15513
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15700
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
15514
15701
|
// useDialogContext();
|
|
15515
15702
|
|
|
15516
15703
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogContent, _extends({
|
|
@@ -15531,7 +15718,7 @@
|
|
|
15531
15718
|
};
|
|
15532
15719
|
DialogContentDivider.displayName = "DialogContentDivider";
|
|
15533
15720
|
|
|
15534
|
-
var _excluded$
|
|
15721
|
+
var _excluded$w = ["children", "className", "disableDefaultHeading"];
|
|
15535
15722
|
// import { useDialogContext } from "./DialogContext";
|
|
15536
15723
|
|
|
15537
15724
|
var DialogTitle = function DialogTitle(_ref) {
|
|
@@ -15539,7 +15726,7 @@
|
|
|
15539
15726
|
className = _ref.className,
|
|
15540
15727
|
_ref$disableDefaultHe = _ref.disableDefaultHeading,
|
|
15541
15728
|
disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
|
|
15542
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15729
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
15543
15730
|
// useDialogContext();
|
|
15544
15731
|
|
|
15545
15732
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogTitle, _extends({
|
|
@@ -15548,7 +15735,7 @@
|
|
|
15548
15735
|
};
|
|
15549
15736
|
DialogTitle.displayName = "DialogTitle";
|
|
15550
15737
|
|
|
15551
|
-
var _excluded$
|
|
15738
|
+
var _excluded$v = ["in", "children", "style", "timeout"];
|
|
15552
15739
|
var defaultStyle$2 = function defaultStyle(duration) {
|
|
15553
15740
|
return {
|
|
15554
15741
|
transition: "all ".concat(duration, "ms ease-in-out"),
|
|
@@ -15576,7 +15763,7 @@
|
|
|
15576
15763
|
style = _ref.style,
|
|
15577
15764
|
_ref$timeout = _ref.timeout,
|
|
15578
15765
|
timeout = _ref$timeout === void 0 ? 500 : _ref$timeout,
|
|
15579
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15766
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
15580
15767
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
|
|
15581
15768
|
appear: true,
|
|
15582
15769
|
in: inProp,
|
|
@@ -15591,7 +15778,7 @@
|
|
|
15591
15778
|
};
|
|
15592
15779
|
Fade.displayName = "Fade";
|
|
15593
15780
|
|
|
15594
|
-
var _excluded$
|
|
15781
|
+
var _excluded$u = ["in", "children", "style", "timeout", "initialDirection"];
|
|
15595
15782
|
var Slide = function Slide(_ref) {
|
|
15596
15783
|
var _ref$in = _ref.in,
|
|
15597
15784
|
inProp = _ref$in === void 0 ? false : _ref$in,
|
|
@@ -15601,7 +15788,7 @@
|
|
|
15601
15788
|
timeout = _ref$timeout === void 0 ? 300 : _ref$timeout,
|
|
15602
15789
|
_ref$initialDirection = _ref.initialDirection,
|
|
15603
15790
|
initialDirection = _ref$initialDirection === void 0 ? "left" : _ref$initialDirection,
|
|
15604
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15791
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
15605
15792
|
var directionSign;
|
|
15606
15793
|
switch (initialDirection) {
|
|
15607
15794
|
case "right":
|
|
@@ -15707,12 +15894,12 @@
|
|
|
15707
15894
|
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;}"]);
|
|
15708
15895
|
});
|
|
15709
15896
|
|
|
15710
|
-
var _excluded$
|
|
15897
|
+
var _excluded$t = ["children", "direction"];
|
|
15711
15898
|
var SlideLeftRightTransition = function SlideLeftRightTransition(_ref) {
|
|
15712
15899
|
var children = _ref.children,
|
|
15713
15900
|
_ref$direction = _ref.direction,
|
|
15714
15901
|
direction = _ref$direction === void 0 ? "left" : _ref$direction,
|
|
15715
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15902
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
15716
15903
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, _extends({
|
|
15717
15904
|
timeout: 200,
|
|
15718
15905
|
classNames: "c-slide",
|
|
@@ -15755,7 +15942,7 @@
|
|
|
15755
15942
|
};
|
|
15756
15943
|
ResizeTransition.displayName = "ResizeTransition";
|
|
15757
15944
|
|
|
15758
|
-
var _excluded$
|
|
15945
|
+
var _excluded$s = ["in", "children", "style", "timeout"];
|
|
15759
15946
|
var defaultStyle = function defaultStyle(duration) {
|
|
15760
15947
|
return {
|
|
15761
15948
|
transition: "all ".concat(duration, "ms ease-in"),
|
|
@@ -15789,7 +15976,7 @@
|
|
|
15789
15976
|
style = _ref.style,
|
|
15790
15977
|
_ref$timeout = _ref.timeout,
|
|
15791
15978
|
timeout = _ref$timeout === void 0 ? 200 : _ref$timeout,
|
|
15792
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15979
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
15793
15980
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
|
|
15794
15981
|
appear: true,
|
|
15795
15982
|
in: inProp,
|
|
@@ -15839,7 +16026,7 @@
|
|
|
15839
16026
|
};
|
|
15840
16027
|
Scale.displayName = "Scale";
|
|
15841
16028
|
|
|
15842
|
-
var _excluded$
|
|
16029
|
+
var _excluded$r = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
|
|
15843
16030
|
var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15844
16031
|
var children = _ref.children,
|
|
15845
16032
|
_ref$open = _ref.open,
|
|
@@ -15853,7 +16040,7 @@
|
|
|
15853
16040
|
_ref$animate = _ref.animate,
|
|
15854
16041
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
15855
16042
|
onClickOutside = _ref.onClickOutside,
|
|
15856
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16043
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
15857
16044
|
var animateDialog = function animateDialog() {
|
|
15858
16045
|
switch (animate) {
|
|
15859
16046
|
case "fade":
|
|
@@ -16604,7 +16791,7 @@
|
|
|
16604
16791
|
StyledToastMessage.displayName = "StyledToastMessage";
|
|
16605
16792
|
StyledCloseSmallIcon.displayName = "StyledCloseSmallIcon";
|
|
16606
16793
|
|
|
16607
|
-
var _excluded$
|
|
16794
|
+
var _excluded$q = ["text", "type", "onClose", "dismissible", "dropShadow", "timeout"];
|
|
16608
16795
|
var ToastMessage = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16609
16796
|
var text = _ref.text,
|
|
16610
16797
|
type = _ref.type,
|
|
@@ -16615,7 +16802,7 @@
|
|
|
16615
16802
|
dropShadow = _ref$dropShadow === void 0 ? false : _ref$dropShadow,
|
|
16616
16803
|
_ref$timeout = _ref.timeout,
|
|
16617
16804
|
timeout = _ref$timeout === void 0 ? 0 : _ref$timeout,
|
|
16618
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16805
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
16619
16806
|
var handleOnClose = React.useCallback(function () {
|
|
16620
16807
|
if (typeof onClose === "function") {
|
|
16621
16808
|
onClose();
|
|
@@ -16663,7 +16850,7 @@
|
|
|
16663
16850
|
});
|
|
16664
16851
|
StyledValueButton.displayName = "StyledValueButton";
|
|
16665
16852
|
|
|
16666
|
-
var _excluded$
|
|
16853
|
+
var _excluded$p = ["active", "alwaysShowIcon", "icon", "label", "value"];
|
|
16667
16854
|
var ValueButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16668
16855
|
var _ref$active = _ref.active,
|
|
16669
16856
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
@@ -16672,7 +16859,7 @@
|
|
|
16672
16859
|
icon = _ref.icon,
|
|
16673
16860
|
label = _ref.label,
|
|
16674
16861
|
value = _ref.value,
|
|
16675
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
16862
|
+
args = _objectWithoutProperties(_ref, _excluded$p);
|
|
16676
16863
|
return /*#__PURE__*/React__default["default"].createElement(StyledValueButton, _extends({
|
|
16677
16864
|
className: "c-value-button"
|
|
16678
16865
|
}, args, {
|
|
@@ -16695,12 +16882,12 @@
|
|
|
16695
16882
|
});
|
|
16696
16883
|
ValueButton.displayName = "ValueButton";
|
|
16697
16884
|
|
|
16698
|
-
var _excluded$
|
|
16885
|
+
var _excluded$o = ["children", "type"];
|
|
16699
16886
|
var Trigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16700
16887
|
var children = _ref.children,
|
|
16701
16888
|
_ref$type = _ref.type,
|
|
16702
16889
|
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
16703
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16890
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
16704
16891
|
return /*#__PURE__*/React__default["default"].createElement(StyledButton, _extends({
|
|
16705
16892
|
ref: ref,
|
|
16706
16893
|
role: "button",
|
|
@@ -16754,7 +16941,7 @@
|
|
|
16754
16941
|
});
|
|
16755
16942
|
StyledCaretIcon.displayName = "StyledCaretIcon";
|
|
16756
16943
|
|
|
16757
|
-
var _excluded$
|
|
16944
|
+
var _excluded$n = ["children", "type", "size", "invalid", "open", "endAdornment", "typographyProps", "mode"];
|
|
16758
16945
|
var SelectTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16759
16946
|
var children = _ref.children,
|
|
16760
16947
|
_ref$type = _ref.type,
|
|
@@ -16769,7 +16956,7 @@
|
|
|
16769
16956
|
typographyProps = _ref.typographyProps,
|
|
16770
16957
|
_ref$mode = _ref.mode,
|
|
16771
16958
|
mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
|
|
16772
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16959
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
16773
16960
|
var variant = React.useMemo(function () {
|
|
16774
16961
|
if (size === "big") {
|
|
16775
16962
|
return "Body 1";
|
|
@@ -16800,7 +16987,7 @@
|
|
|
16800
16987
|
});
|
|
16801
16988
|
SelectTrigger.displayName = "SelectTrigger";
|
|
16802
16989
|
|
|
16803
|
-
var _excluded$
|
|
16990
|
+
var _excluded$m = ["mode", "selected", "min", "max", "onChange", "target", "triggerMode"];
|
|
16804
16991
|
var SelectTime = function SelectTime(_ref) {
|
|
16805
16992
|
var _ref$mode = _ref.mode,
|
|
16806
16993
|
mode = _ref$mode === void 0 ? "24" : _ref$mode,
|
|
@@ -16811,7 +16998,7 @@
|
|
|
16811
16998
|
onChange = _ref.onChange,
|
|
16812
16999
|
target = _ref.target,
|
|
16813
17000
|
triggerMode = _ref.triggerMode,
|
|
16814
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17001
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
16815
17002
|
var generateTimeOptions = function generateTimeOptions() {
|
|
16816
17003
|
var minTime = moment__default["default"](isValidTime(min) ? min : "00:00", "HH:mm");
|
|
16817
17004
|
var maxTime = moment__default["default"](isValidTime(max) ? max : "23:45", "HH:mm");
|
|
@@ -16876,11 +17063,11 @@
|
|
|
16876
17063
|
});
|
|
16877
17064
|
StyledToggle.displayName = "StyledToggle";
|
|
16878
17065
|
|
|
16879
|
-
var _excluded$
|
|
17066
|
+
var _excluded$l = ["hovered", "className"];
|
|
16880
17067
|
var Toggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16881
17068
|
var hovered = _ref.hovered,
|
|
16882
17069
|
className = _ref.className,
|
|
16883
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
17070
|
+
args = _objectWithoutProperties(_ref, _excluded$l);
|
|
16884
17071
|
return /*#__PURE__*/React__default["default"].createElement(StyledToggle, {
|
|
16885
17072
|
className: classNames__default["default"]("c-toggle", className),
|
|
16886
17073
|
$isHovered: hovered,
|
|
@@ -17032,7 +17219,7 @@
|
|
|
17032
17219
|
})(["color:var(--color-theme-700);"]);
|
|
17033
17220
|
ChipCloseIcon.displayName = "ChipCloseIcon";
|
|
17034
17221
|
|
|
17035
|
-
var _excluded$
|
|
17222
|
+
var _excluded$k = ["startAdornment", "label", "onClose", "size", "color", "backgroundColor", "closeClassName", "variant", "typographyProps"];
|
|
17036
17223
|
var Chip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
17037
17224
|
var startAdornment = _ref.startAdornment,
|
|
17038
17225
|
label = _ref.label,
|
|
@@ -17044,7 +17231,7 @@
|
|
|
17044
17231
|
closeClassName = _ref.closeClassName,
|
|
17045
17232
|
variant = _ref.variant,
|
|
17046
17233
|
typographyProps = _ref.typographyProps,
|
|
17047
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17234
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
17048
17235
|
var showClose = typeof onClose === "function";
|
|
17049
17236
|
var _variant = React.useMemo(function () {
|
|
17050
17237
|
if (typeof variant !== "undefined") {
|
|
@@ -17079,7 +17266,7 @@
|
|
|
17079
17266
|
});
|
|
17080
17267
|
Chip.displayName = "Chip";
|
|
17081
17268
|
|
|
17082
|
-
var _excluded$
|
|
17269
|
+
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"];
|
|
17083
17270
|
var ComboBox = function ComboBox(_ref) {
|
|
17084
17271
|
var _comboBoxRef$current2, _comboBoxRef$current3;
|
|
17085
17272
|
var _ref$options = _ref.options,
|
|
@@ -17114,7 +17301,7 @@
|
|
|
17114
17301
|
onClear = _ref.onClear,
|
|
17115
17302
|
onDeselect = _ref.onDeselect,
|
|
17116
17303
|
defaultValue = _ref.defaultValue,
|
|
17117
|
-
prop = _objectWithoutProperties(_ref, _excluded$
|
|
17304
|
+
prop = _objectWithoutProperties(_ref, _excluded$j);
|
|
17118
17305
|
var selectedName = React.useMemo(function () {
|
|
17119
17306
|
var value = "";
|
|
17120
17307
|
if (!selected) {
|
|
@@ -17525,11 +17712,11 @@
|
|
|
17525
17712
|
})(["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);
|
|
17526
17713
|
StyledAddToListButton.displayName = "StyledAddToListButton";
|
|
17527
17714
|
|
|
17528
|
-
var _excluded$
|
|
17715
|
+
var _excluded$i = ["text", "className"];
|
|
17529
17716
|
var AddToListButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17530
17717
|
var text = _ref.text,
|
|
17531
17718
|
className = _ref.className,
|
|
17532
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17719
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
17533
17720
|
return /*#__PURE__*/React__default["default"].createElement(StyledAddToListButton, _extends({
|
|
17534
17721
|
ref: ref,
|
|
17535
17722
|
className: classNames__default["default"]("c--add-to-list-btn", className)
|
|
@@ -17609,134 +17796,6 @@
|
|
|
17609
17796
|
};
|
|
17610
17797
|
ProgressBar.displayName = "ProgressBar";
|
|
17611
17798
|
|
|
17612
|
-
var StyledWrapper = styled__default["default"].div.withConfig({
|
|
17613
|
-
displayName: "Styles__StyledWrapper",
|
|
17614
|
-
componentId: "sc-o6dcyu-0"
|
|
17615
|
-
})(["position:relative;display:inline-flex;"]);
|
|
17616
|
-
StyledWrapper.displayName = "StyledWrapper";
|
|
17617
|
-
var StyledChildrenWrapper = styled__default["default"].div.withConfig({
|
|
17618
|
-
displayName: "Styles__StyledChildrenWrapper",
|
|
17619
|
-
componentId: "sc-o6dcyu-1"
|
|
17620
|
-
})(["position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:inline-flex;"]);
|
|
17621
|
-
StyledChildrenWrapper.displayName = "StyledChildrenWrapper";
|
|
17622
|
-
var StyledSvg = styled__default["default"].svg.withConfig({
|
|
17623
|
-
displayName: "Styles__StyledSvg",
|
|
17624
|
-
componentId: "sc-o6dcyu-2"
|
|
17625
|
-
})(["transform:rotate(-90deg);"]);
|
|
17626
|
-
StyledSvg.displayName = "StyledSvg";
|
|
17627
|
-
var StyledBackgroundCircle = styled__default["default"].circle.withConfig({
|
|
17628
|
-
displayName: "Styles__StyledBackgroundCircle",
|
|
17629
|
-
componentId: "sc-o6dcyu-3"
|
|
17630
|
-
})(["fill:transparent;transition:stroke-dashoffset 0.5s linear,stroke 300ms ease-out;", " ", ""], function (props) {
|
|
17631
|
-
return props.$color ? styled.css(["stroke:", ";"], props.$color) : styled.css(["stroke:var(--color-theme-transparent-300);"]);
|
|
17632
|
-
}, function (props) {
|
|
17633
|
-
return props.$strokeDashOffset && styled.css(["stroke-dashoffset:", ";"], props.$strokeDashOffset);
|
|
17634
|
-
});
|
|
17635
|
-
StyledBackgroundCircle.displayName = "StyledBackgroundCircle";
|
|
17636
|
-
var StyledForegroundCircle = styled__default["default"].circle.withConfig({
|
|
17637
|
-
displayName: "Styles__StyledForegroundCircle",
|
|
17638
|
-
componentId: "sc-o6dcyu-4"
|
|
17639
|
-
})(["fill:transparent;transition:stroke-dashoffset 0.5s linear,stroke 300ms ease-out;", " ", " ", ""], function (props) {
|
|
17640
|
-
return props.$roundStroke && styled.css(["stroke-linecap:round;"]);
|
|
17641
|
-
}, function (props) {
|
|
17642
|
-
return props.$color ? styled.css(["stroke:", ";"], props.$color) : styled.css(["stroke:var(--color-secondary);"]);
|
|
17643
|
-
}, function (props) {
|
|
17644
|
-
return props.$strokeDashOffset && styled.css(["stroke-dashoffset:", ";"], props.$strokeDashOffset);
|
|
17645
|
-
});
|
|
17646
|
-
StyledForegroundCircle.displayName = "StyledForegroundCircle";
|
|
17647
|
-
var StyledProgressRingPercentage = styled__default["default"].text.withConfig({
|
|
17648
|
-
displayName: "Styles__StyledProgressRingPercentage",
|
|
17649
|
-
componentId: "sc-o6dcyu-5"
|
|
17650
|
-
})(["transform:rotate(90deg);", " ", ""], function (props) {
|
|
17651
|
-
return props.$color ? styled.css(["fill:", ";"], props.$color) : styled.css(["fill:var(--color-secondary);"]);
|
|
17652
|
-
}, function (props) {
|
|
17653
|
-
return props.$fontSize ? styled.css(["font-size:", "px;"], props.$fontSize) : styled.css(["font-size:10px;"]);
|
|
17654
|
-
});
|
|
17655
|
-
StyledProgressRingPercentage.displayName = "StyledProgressRingPercentage";
|
|
17656
|
-
|
|
17657
|
-
var _excluded$i = ["className", "children"];
|
|
17658
|
-
var ProgressCircle = function ProgressCircle(_ref) {
|
|
17659
|
-
var backgroundColor = _ref.backgroundColor,
|
|
17660
|
-
progressColor = _ref.progressColor,
|
|
17661
|
-
_ref$progress = _ref.progress,
|
|
17662
|
-
progress = _ref$progress === void 0 ? 0 : _ref$progress,
|
|
17663
|
-
_ref$radius = _ref.radius,
|
|
17664
|
-
radius = _ref$radius === void 0 ? 20 : _ref$radius,
|
|
17665
|
-
_ref$stroke = _ref.stroke,
|
|
17666
|
-
stroke = _ref$stroke === void 0 ? 3 : _ref$stroke,
|
|
17667
|
-
_ref$roundStroke = _ref.roundStroke,
|
|
17668
|
-
roundStroke = _ref$roundStroke === void 0 ? false : _ref$roundStroke,
|
|
17669
|
-
className = _ref.className,
|
|
17670
|
-
_ref$showPercentage = _ref.showPercentage,
|
|
17671
|
-
showPercentage = _ref$showPercentage === void 0 ? false : _ref$showPercentage,
|
|
17672
|
-
fontSize = _ref.fontSize;
|
|
17673
|
-
if (stroke > radius) {
|
|
17674
|
-
console.warn("Stroke can not have value greater than the radius.");
|
|
17675
|
-
stroke = radius;
|
|
17676
|
-
}
|
|
17677
|
-
var progressNumber = React.useMemo(function () {
|
|
17678
|
-
var width = progress;
|
|
17679
|
-
if (progress > 100) {
|
|
17680
|
-
width = 100;
|
|
17681
|
-
}
|
|
17682
|
-
if (progress < 0) {
|
|
17683
|
-
width = 0;
|
|
17684
|
-
}
|
|
17685
|
-
return width;
|
|
17686
|
-
}, [progress]);
|
|
17687
|
-
var normalizedRadius = React.useMemo(function () {
|
|
17688
|
-
return radius - stroke / 2;
|
|
17689
|
-
}, [radius, stroke]);
|
|
17690
|
-
var circumference = React.useMemo(function () {
|
|
17691
|
-
return normalizedRadius * 2 * Math.PI;
|
|
17692
|
-
}, [normalizedRadius]);
|
|
17693
|
-
var strokeDashoffsetOuter = React.useMemo(function () {
|
|
17694
|
-
return circumference - (100 - progressNumber) / 100 * circumference;
|
|
17695
|
-
}, [circumference, progressNumber]);
|
|
17696
|
-
var strokeDashoffsetInner = React.useMemo(function () {
|
|
17697
|
-
return circumference - progressNumber / 100 * circumference;
|
|
17698
|
-
}, [circumference, progressNumber]);
|
|
17699
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledSvg, {
|
|
17700
|
-
height: radius * 2,
|
|
17701
|
-
width: radius * 2,
|
|
17702
|
-
className: className
|
|
17703
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledBackgroundCircle, {
|
|
17704
|
-
$color: backgroundColor,
|
|
17705
|
-
$strokeDashOffset: -strokeDashoffsetOuter,
|
|
17706
|
-
strokeWidth: stroke,
|
|
17707
|
-
strokeDasharray: "".concat(circumference, " ").concat(circumference),
|
|
17708
|
-
r: normalizedRadius,
|
|
17709
|
-
cx: radius,
|
|
17710
|
-
cy: radius
|
|
17711
|
-
}), /*#__PURE__*/React__default["default"].createElement(StyledForegroundCircle, {
|
|
17712
|
-
$color: progressColor,
|
|
17713
|
-
$strokeDashOffset: strokeDashoffsetInner,
|
|
17714
|
-
strokeWidth: stroke,
|
|
17715
|
-
strokeDasharray: "".concat(circumference, " ").concat(circumference),
|
|
17716
|
-
$roundStroke: roundStroke,
|
|
17717
|
-
r: normalizedRadius,
|
|
17718
|
-
cx: radius,
|
|
17719
|
-
cy: radius
|
|
17720
|
-
}), showPercentage ? /*#__PURE__*/React__default["default"].createElement(StyledProgressRingPercentage, {
|
|
17721
|
-
$color: progressColor,
|
|
17722
|
-
$fontSize: fontSize,
|
|
17723
|
-
x: "50%",
|
|
17724
|
-
y: "-50%",
|
|
17725
|
-
dominantBaseline: "central",
|
|
17726
|
-
textAnchor: "middle"
|
|
17727
|
-
}, progressNumber, "%") : null);
|
|
17728
|
-
};
|
|
17729
|
-
var ProgressRing = function ProgressRing(_ref2) {
|
|
17730
|
-
var className = _ref2.className,
|
|
17731
|
-
children = _ref2.children,
|
|
17732
|
-
rest = _objectWithoutProperties(_ref2, _excluded$i);
|
|
17733
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
17734
|
-
className: classNames__default["default"](className),
|
|
17735
|
-
"data-testid": "progress-ring"
|
|
17736
|
-
}, /*#__PURE__*/React__default["default"].createElement(ProgressCircle, rest), children ? /*#__PURE__*/React__default["default"].createElement(StyledChildrenWrapper, null, children) : null);
|
|
17737
|
-
};
|
|
17738
|
-
ProgressRing.displayName = "ProgressRing";
|
|
17739
|
-
|
|
17740
17799
|
var _excluded$h = ["radius"];
|
|
17741
17800
|
var ProgressPie = function ProgressPie(_ref) {
|
|
17742
17801
|
var _ref$radius = _ref.radius,
|