@activecollab/components 2.0.401 → 2.0.402
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/ConfirmDialog/ConfirmDialog.js +39 -5
- package/dist/cjs/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/cjs/components/ConfirmDialog/Styles.js +14 -0
- package/dist/cjs/components/ConfirmDialog/Styles.js.map +1 -0
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts +2 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.js +31 -6
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.js.map +1 -1
- package/dist/esm/components/ConfirmDialog/Styles.d.ts +2 -0
- package/dist/esm/components/ConfirmDialog/Styles.d.ts.map +1 -0
- package/dist/esm/components/ConfirmDialog/Styles.js +7 -0
- package/dist/esm/components/ConfirmDialog/Styles.js.map +1 -0
- package/dist/index.js +287 -255
- 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
|
@@ -15529,6 +15529,198 @@
|
|
|
15529
15529
|
StyledButton$1.displayName = "StyledButton";
|
|
15530
15530
|
StyledControl.displayName = "StyledControl";
|
|
15531
15531
|
|
|
15532
|
+
var _excluded$1m = ["mixed", "data-testid"];
|
|
15533
|
+
|
|
15534
|
+
/**
|
|
15535
|
+
* @component CheckboxIcon
|
|
15536
|
+
* @description
|
|
15537
|
+
*
|
|
15538
|
+
* The React Icon component is a visual element that displays an icon to represent a concept, object, or action.
|
|
15539
|
+
* The Icon component is
|
|
15540
|
+
* customizable, allowing for variations in size, color, and style to fit the needs of the application.
|
|
15541
|
+
*
|
|
15542
|
+
*
|
|
15543
|
+
* @example
|
|
15544
|
+
* return (
|
|
15545
|
+
* <CheckboxIcon className="mr-2" showAdditionalIcon={true} />
|
|
15546
|
+
* )
|
|
15547
|
+
*
|
|
15548
|
+
* @see
|
|
15549
|
+
* https://system.activecollab.com/?path=/story/foundation-icons-icons--icons
|
|
15550
|
+
* @see
|
|
15551
|
+
* https://design.activecollab.com/docs/foundations/icons
|
|
15552
|
+
*/
|
|
15553
|
+
var CheckboxIcon = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, svgRef) {
|
|
15554
|
+
var mixed = _ref.mixed,
|
|
15555
|
+
testId = _ref["data-testid"],
|
|
15556
|
+
props = _objectWithoutProperties(_ref, _excluded$1m);
|
|
15557
|
+
// const [animate, setAnimate] = useState(false);
|
|
15558
|
+
// const mountRef = useRef(false);
|
|
15559
|
+
|
|
15560
|
+
// useEffect(() => {
|
|
15561
|
+
// if (mountRef.current) {
|
|
15562
|
+
// setAnimate(true);
|
|
15563
|
+
// } else {
|
|
15564
|
+
// mountRef.current = true;
|
|
15565
|
+
// }
|
|
15566
|
+
// }, [mixed]);
|
|
15567
|
+
|
|
15568
|
+
if (mixed) {
|
|
15569
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
15570
|
+
width: "16",
|
|
15571
|
+
height: "16",
|
|
15572
|
+
viewBox: "0 0 16 16",
|
|
15573
|
+
fill: "none",
|
|
15574
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15575
|
+
"data-testid": "checkbox-mixed-icon"
|
|
15576
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
15577
|
+
fillRule: "evenodd",
|
|
15578
|
+
clipRule: "evenodd",
|
|
15579
|
+
d: "M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z",
|
|
15580
|
+
fill: "var(--color-secondary)"
|
|
15581
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
15582
|
+
x: "3",
|
|
15583
|
+
y: "7",
|
|
15584
|
+
width: 10,
|
|
15585
|
+
height: "2",
|
|
15586
|
+
rx: "1",
|
|
15587
|
+
fill: "var(--page-paper-main)"
|
|
15588
|
+
}));
|
|
15589
|
+
}
|
|
15590
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", _extends({
|
|
15591
|
+
width: 16,
|
|
15592
|
+
height: 16,
|
|
15593
|
+
viewBox: "0 0 16 16",
|
|
15594
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15595
|
+
fill: "var(--color-theme-600)",
|
|
15596
|
+
focusable: false,
|
|
15597
|
+
ref: svgRef
|
|
15598
|
+
}, props, {
|
|
15599
|
+
"data-testid": testId
|
|
15600
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
15601
|
+
fillRule: "evenodd"
|
|
15602
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
15603
|
+
stroke: "#8E8E8E",
|
|
15604
|
+
x: 0.5,
|
|
15605
|
+
y: 0.5,
|
|
15606
|
+
width: 15,
|
|
15607
|
+
height: 15,
|
|
15608
|
+
rx: 2
|
|
15609
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
15610
|
+
stroke: "#979797",
|
|
15611
|
+
strokeWidth: 2,
|
|
15612
|
+
d: "M12.243 5l-5.657 5.657-2.829-2.829"
|
|
15613
|
+
})));
|
|
15614
|
+
});
|
|
15615
|
+
CheckboxIcon.displayName = "CheckboxIcon";
|
|
15616
|
+
var CheckboxIcon$1 = CheckboxIcon;
|
|
15617
|
+
|
|
15618
|
+
var StyledInput$4 = styled__default["default"].input.withConfig({
|
|
15619
|
+
displayName: "Styles__StyledInput",
|
|
15620
|
+
componentId: "sc-y7zymm-0"
|
|
15621
|
+
})(["border:0px;clip:rect(0px,0px,0px,0px);cursor:pointer;height:1px;margin:-1px;opacity:0;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:1px;"]);
|
|
15622
|
+
StyledInput$4.displayName = "StyledInput";
|
|
15623
|
+
var StyledLabel$1 = styled__default["default"].label.withConfig({
|
|
15624
|
+
displayName: "Styles__StyledLabel",
|
|
15625
|
+
componentId: "sc-y7zymm-1"
|
|
15626
|
+
})([""]);
|
|
15627
|
+
StyledLabel$1.displayName = "StyledLabel";
|
|
15628
|
+
var StyledCheckbox$1 = styled__default["default"].div.withConfig({
|
|
15629
|
+
displayName: "Styles__StyledCheckbox",
|
|
15630
|
+
componentId: "sc-y7zymm-2"
|
|
15631
|
+
})(["height:16px;width:16px;position:relative;transition-duration:0.2s;border-radius:2px;path{transition-duration:0.2s;stroke:transparent;stroke-dashoffset:12;stroke-dasharray:12;}svg{cursor:pointer;border-radius:2px;fill:transparent;}", " rect{transition-duration:0.2s;", " ", "}", ":disabled ~ ", "{opacity:0.5;cursor:not-allowed;}", ":focus ~ ", "{", "}&:not(.c-checkbox__controlled) ", ":hover:not(:checked) ~ ", "{path{stroke:var(--color-secondary-500);stroke-dashoffset:24;}rect{stroke:var(--color-secondary);", " stroke-width:3px;}}", " ", ":checked ~ ", "{path{", "}rect{stroke:var(--color-secondary);stroke-width:19px;", "}}"], function (props) {
|
|
15632
|
+
return props.$disabled && styled.css(["svg{cursor:not-allowed;}"]);
|
|
15633
|
+
}, function (props) {
|
|
15634
|
+
return !props.mixed && styled.css(["stroke:var(--color-theme-500);"]);
|
|
15635
|
+
}, function (props) {
|
|
15636
|
+
return props.mixed && styled.css(["stroke:transparent;"]);
|
|
15637
|
+
}, StyledInput$4, StyledLabel$1, StyledInput$4, StyledLabel$1, function (props) {
|
|
15638
|
+
return !props.mixed && styled.css(["rect{stroke:var(--color-secondary);stroke-width:3px;}"]);
|
|
15639
|
+
}, StyledInput$4, StyledLabel$1, function (props) {
|
|
15640
|
+
return props.mixed && styled.css(["stroke:transparent;"]);
|
|
15641
|
+
}, function (props) {
|
|
15642
|
+
return props.hover && !props.mixed && styled.css(["", ":not(:checked) ~ ", "{path{stroke:var(--color-secondary-500);stroke-dashoffset:24;}rect{stroke:var(--color-secondary);stroke-width:3px;}}"], StyledInput$4, StyledLabel$1);
|
|
15643
|
+
}, StyledInput$4, StyledLabel$1, function (props) {
|
|
15644
|
+
return !props.mixed && styled.css(["stroke:var(--page-paper-main);stroke-dashoffset:24;"]);
|
|
15645
|
+
}, function (props) {
|
|
15646
|
+
return props.mixed && styled.css(["stroke:transparent;"]);
|
|
15647
|
+
});
|
|
15648
|
+
StyledCheckbox$1.displayName = "StyledCheckbox";
|
|
15649
|
+
|
|
15650
|
+
var _excluded$1l = ["className", "hover", "id", "mixed", "checked", "onChange", "disabled"];
|
|
15651
|
+
/**
|
|
15652
|
+
* Checkbox component
|
|
15653
|
+
*/
|
|
15654
|
+
var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15655
|
+
var className = _ref.className,
|
|
15656
|
+
hover = _ref.hover,
|
|
15657
|
+
_ref$id = _ref.id,
|
|
15658
|
+
id = _ref$id === void 0 ? "checkbox" : _ref$id,
|
|
15659
|
+
_ref$mixed = _ref.mixed,
|
|
15660
|
+
mixed = _ref$mixed === void 0 ? false : _ref$mixed,
|
|
15661
|
+
checked = _ref.checked,
|
|
15662
|
+
onChange = _ref.onChange,
|
|
15663
|
+
disabled = _ref.disabled,
|
|
15664
|
+
rest = _objectWithoutProperties(_ref, _excluded$1l);
|
|
15665
|
+
var _useState = React.useState(mixed && !checked),
|
|
15666
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15667
|
+
indeterminate = _useState2[0],
|
|
15668
|
+
setIndeterminate = _useState2[1];
|
|
15669
|
+
var _useState3 = React.useState(checked),
|
|
15670
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
15671
|
+
initialChecked = _useState4[0],
|
|
15672
|
+
setInitialChecked = _useState4[1];
|
|
15673
|
+
var handleChange = React.useCallback(function (e) {
|
|
15674
|
+
typeof onChange === "function" && onChange(e);
|
|
15675
|
+
setInitialChecked(function (prev) {
|
|
15676
|
+
return !prev;
|
|
15677
|
+
});
|
|
15678
|
+
setIndeterminate(false);
|
|
15679
|
+
}, [onChange]);
|
|
15680
|
+
React.useEffect(function () {
|
|
15681
|
+
if (checked !== initialChecked) {
|
|
15682
|
+
setInitialChecked(checked);
|
|
15683
|
+
setIndeterminate(false);
|
|
15684
|
+
}
|
|
15685
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15686
|
+
}, [checked]);
|
|
15687
|
+
React.useEffect(function () {
|
|
15688
|
+
if (mixed !== indeterminate && !checked) {
|
|
15689
|
+
setIndeterminate(mixed);
|
|
15690
|
+
}
|
|
15691
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15692
|
+
}, [mixed]);
|
|
15693
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledCheckbox$1, {
|
|
15694
|
+
className: classNames__default["default"]("c-checkbox", {
|
|
15695
|
+
"c-checkbox__hover": hover,
|
|
15696
|
+
"c-checkbox__controlled": typeof hover === "boolean"
|
|
15697
|
+
}, className),
|
|
15698
|
+
hover: hover,
|
|
15699
|
+
tabIndex: -1,
|
|
15700
|
+
mixed: indeterminate,
|
|
15701
|
+
$disabled: disabled
|
|
15702
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledInput$4, _extends({
|
|
15703
|
+
role: "checkbox",
|
|
15704
|
+
id: id,
|
|
15705
|
+
className: "c-checkbox--input",
|
|
15706
|
+
type: "checkbox",
|
|
15707
|
+
ref: ref
|
|
15708
|
+
}, rest, {
|
|
15709
|
+
checked: initialChecked,
|
|
15710
|
+
onChange: handleChange,
|
|
15711
|
+
disabled: disabled
|
|
15712
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledLabel$1, {
|
|
15713
|
+
htmlFor: id,
|
|
15714
|
+
className: "c-checkbox--label"
|
|
15715
|
+
}, /*#__PURE__*/React__default["default"].createElement(CheckboxIcon$1, {
|
|
15716
|
+
"data-testid": "checkbox-icon",
|
|
15717
|
+
height: 16,
|
|
15718
|
+
width: 16,
|
|
15719
|
+
mixed: indeterminate
|
|
15720
|
+
})));
|
|
15721
|
+
});
|
|
15722
|
+
Checkbox.displayName = "Checkbox";
|
|
15723
|
+
|
|
15532
15724
|
var size = {
|
|
15533
15725
|
sm: "640px",
|
|
15534
15726
|
md: "768px",
|
|
@@ -15570,13 +15762,13 @@
|
|
|
15570
15762
|
})(["padding:20px 30px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
15571
15763
|
StyledDialogActions.displayName = "StyledDialogActions";
|
|
15572
15764
|
|
|
15573
|
-
var _excluded$
|
|
15765
|
+
var _excluded$1k = ["className", "children"];
|
|
15574
15766
|
// import { useDialogContext } from "./DialogContext";
|
|
15575
15767
|
|
|
15576
15768
|
var DialogActions = function DialogActions(_ref) {
|
|
15577
15769
|
var className = _ref.className,
|
|
15578
15770
|
children = _ref.children,
|
|
15579
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15771
|
+
rest = _objectWithoutProperties(_ref, _excluded$1k);
|
|
15580
15772
|
// useDialogContext();
|
|
15581
15773
|
|
|
15582
15774
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogActions, _extends({
|
|
@@ -15585,13 +15777,13 @@
|
|
|
15585
15777
|
};
|
|
15586
15778
|
DialogActions.displayName = "DialogActions";
|
|
15587
15779
|
|
|
15588
|
-
var _excluded$
|
|
15780
|
+
var _excluded$1j = ["className", "children"];
|
|
15589
15781
|
// import { useDialogContext } from "./DialogContext";
|
|
15590
15782
|
|
|
15591
15783
|
var DialogContent = function DialogContent(_ref) {
|
|
15592
15784
|
var className = _ref.className,
|
|
15593
15785
|
children = _ref.children,
|
|
15594
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15786
|
+
rest = _objectWithoutProperties(_ref, _excluded$1j);
|
|
15595
15787
|
// useDialogContext();
|
|
15596
15788
|
|
|
15597
15789
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogContent, _extends({
|
|
@@ -15612,10 +15804,10 @@
|
|
|
15612
15804
|
};
|
|
15613
15805
|
DialogContentDivider.displayName = "DialogContentDivider";
|
|
15614
15806
|
|
|
15615
|
-
var _excluded$
|
|
15807
|
+
var _excluded$1i = ["children"];
|
|
15616
15808
|
var Header3 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15617
15809
|
var children = _ref.children,
|
|
15618
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15810
|
+
props = _objectWithoutProperties(_ref, _excluded$1i);
|
|
15619
15811
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
15620
15812
|
weight: "bold",
|
|
15621
15813
|
variant: "Header 3",
|
|
@@ -15624,7 +15816,7 @@
|
|
|
15624
15816
|
});
|
|
15625
15817
|
Header3.displayName = "Header3";
|
|
15626
15818
|
|
|
15627
|
-
var _excluded$
|
|
15819
|
+
var _excluded$1h = ["children", "className", "disableDefaultHeading"];
|
|
15628
15820
|
// import { useDialogContext } from "./DialogContext";
|
|
15629
15821
|
|
|
15630
15822
|
var DialogTitle = function DialogTitle(_ref) {
|
|
@@ -15632,7 +15824,7 @@
|
|
|
15632
15824
|
className = _ref.className,
|
|
15633
15825
|
_ref$disableDefaultHe = _ref.disableDefaultHeading,
|
|
15634
15826
|
disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
|
|
15635
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15827
|
+
rest = _objectWithoutProperties(_ref, _excluded$1h);
|
|
15636
15828
|
// useDialogContext();
|
|
15637
15829
|
|
|
15638
15830
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogTitle, _extends({
|
|
@@ -15661,7 +15853,7 @@
|
|
|
15661
15853
|
function () {});
|
|
15662
15854
|
}
|
|
15663
15855
|
|
|
15664
|
-
var _excluded$
|
|
15856
|
+
var _excluded$1g = ["children", "disableFocusLock", "disableScrollLock", "disableBackgroundClick", "disableBackgroundColor", "disableCloseOnEsc", "open", "onClose", "onClickOutside"];
|
|
15665
15857
|
var getHasTransition = function getHasTransition(children) {
|
|
15666
15858
|
return children.props ? Object.prototype.hasOwnProperty.call(children.props, "in") : false;
|
|
15667
15859
|
};
|
|
@@ -15681,7 +15873,7 @@
|
|
|
15681
15873
|
defaultOpen = _ref$open === void 0 ? false : _ref$open,
|
|
15682
15874
|
onClose = _ref.onClose,
|
|
15683
15875
|
onClickOutside = _ref.onClickOutside,
|
|
15684
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15876
|
+
rest = _objectWithoutProperties(_ref, _excluded$1g);
|
|
15685
15877
|
var _useState = React.useState(defaultOpen),
|
|
15686
15878
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15687
15879
|
open = _useState2[0],
|
|
@@ -15749,7 +15941,7 @@
|
|
|
15749
15941
|
});
|
|
15750
15942
|
Modal.displayName = "Modal";
|
|
15751
15943
|
|
|
15752
|
-
var _excluded$
|
|
15944
|
+
var _excluded$1f = ["in", "children", "style", "timeout"];
|
|
15753
15945
|
var defaultStyle$2 = function defaultStyle(duration) {
|
|
15754
15946
|
return {
|
|
15755
15947
|
transition: "all ".concat(duration, "ms ease-in-out"),
|
|
@@ -15777,7 +15969,7 @@
|
|
|
15777
15969
|
style = _ref.style,
|
|
15778
15970
|
_ref$timeout = _ref.timeout,
|
|
15779
15971
|
timeout = _ref$timeout === void 0 ? 500 : _ref$timeout,
|
|
15780
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15972
|
+
rest = _objectWithoutProperties(_ref, _excluded$1f);
|
|
15781
15973
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
|
|
15782
15974
|
appear: true,
|
|
15783
15975
|
in: inProp,
|
|
@@ -15792,7 +15984,7 @@
|
|
|
15792
15984
|
};
|
|
15793
15985
|
Fade.displayName = "Fade";
|
|
15794
15986
|
|
|
15795
|
-
var _excluded$
|
|
15987
|
+
var _excluded$1e = ["in", "children", "style", "timeout", "initialDirection"];
|
|
15796
15988
|
var Slide = function Slide(_ref) {
|
|
15797
15989
|
var _ref$in = _ref.in,
|
|
15798
15990
|
inProp = _ref$in === void 0 ? false : _ref$in,
|
|
@@ -15802,7 +15994,7 @@
|
|
|
15802
15994
|
timeout = _ref$timeout === void 0 ? 300 : _ref$timeout,
|
|
15803
15995
|
_ref$initialDirection = _ref.initialDirection,
|
|
15804
15996
|
initialDirection = _ref$initialDirection === void 0 ? "left" : _ref$initialDirection,
|
|
15805
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15997
|
+
rest = _objectWithoutProperties(_ref, _excluded$1e);
|
|
15806
15998
|
var directionSign;
|
|
15807
15999
|
switch (initialDirection) {
|
|
15808
16000
|
case "right":
|
|
@@ -15908,12 +16100,12 @@
|
|
|
15908
16100
|
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;}"]);
|
|
15909
16101
|
});
|
|
15910
16102
|
|
|
15911
|
-
var _excluded$
|
|
16103
|
+
var _excluded$1d = ["children", "direction"];
|
|
15912
16104
|
var SlideLeftRightTransition = function SlideLeftRightTransition(_ref) {
|
|
15913
16105
|
var children = _ref.children,
|
|
15914
16106
|
_ref$direction = _ref.direction,
|
|
15915
16107
|
direction = _ref$direction === void 0 ? "left" : _ref$direction,
|
|
15916
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16108
|
+
props = _objectWithoutProperties(_ref, _excluded$1d);
|
|
15917
16109
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, _extends({
|
|
15918
16110
|
timeout: 200,
|
|
15919
16111
|
classNames: "c-slide",
|
|
@@ -15956,7 +16148,7 @@
|
|
|
15956
16148
|
};
|
|
15957
16149
|
ResizeTransition.displayName = "ResizeTransition";
|
|
15958
16150
|
|
|
15959
|
-
var _excluded$
|
|
16151
|
+
var _excluded$1c = ["in", "children", "style", "timeout"];
|
|
15960
16152
|
var defaultStyle = function defaultStyle(duration) {
|
|
15961
16153
|
return {
|
|
15962
16154
|
transition: "all ".concat(duration, "ms ease-in"),
|
|
@@ -15990,7 +16182,7 @@
|
|
|
15990
16182
|
style = _ref.style,
|
|
15991
16183
|
_ref$timeout = _ref.timeout,
|
|
15992
16184
|
timeout = _ref$timeout === void 0 ? 200 : _ref$timeout,
|
|
15993
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16185
|
+
rest = _objectWithoutProperties(_ref, _excluded$1c);
|
|
15994
16186
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
|
|
15995
16187
|
appear: true,
|
|
15996
16188
|
in: inProp,
|
|
@@ -16040,7 +16232,7 @@
|
|
|
16040
16232
|
};
|
|
16041
16233
|
Scale.displayName = "Scale";
|
|
16042
16234
|
|
|
16043
|
-
var _excluded$
|
|
16235
|
+
var _excluded$1b = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
|
|
16044
16236
|
var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16045
16237
|
var children = _ref.children,
|
|
16046
16238
|
_ref$open = _ref.open,
|
|
@@ -16054,7 +16246,7 @@
|
|
|
16054
16246
|
_ref$animate = _ref.animate,
|
|
16055
16247
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
16056
16248
|
onClickOutside = _ref.onClickOutside,
|
|
16057
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16249
|
+
rest = _objectWithoutProperties(_ref, _excluded$1b);
|
|
16058
16250
|
var animateDialog = function animateDialog() {
|
|
16059
16251
|
switch (animate) {
|
|
16060
16252
|
case "fade":
|
|
@@ -16095,6 +16287,13 @@
|
|
|
16095
16287
|
Actions: DialogActions
|
|
16096
16288
|
});
|
|
16097
16289
|
|
|
16290
|
+
var StyledConfirmation = styled__default["default"].div.withConfig({
|
|
16291
|
+
displayName: "Styles__StyledConfirmation",
|
|
16292
|
+
componentId: "sc-1hepb1k-0"
|
|
16293
|
+
})(["display:flex;align-items:center;gap:8px;margin-top:16px;label{cursor:pointer;}"]);
|
|
16294
|
+
StyledConfirmation.displayName = "StyledConfirmation";
|
|
16295
|
+
|
|
16296
|
+
var CONFIRMATION_CHECKBOX_ID = "confirm-dialog-confirmation";
|
|
16098
16297
|
var ConfirmDialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16099
16298
|
var _ref$open = _ref.open,
|
|
16100
16299
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
@@ -16112,10 +16311,24 @@
|
|
|
16112
16311
|
_ref$shouldShowCancel = _ref.shouldShowCancelButton,
|
|
16113
16312
|
shouldShowCancelButton = _ref$shouldShowCancel === void 0 ? true : _ref$shouldShowCancel,
|
|
16114
16313
|
_ref$isLoading = _ref.isLoading,
|
|
16115
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading
|
|
16314
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
16315
|
+
confirmationLabel = _ref.confirmationLabel;
|
|
16316
|
+
var _useState = React.useState(false),
|
|
16317
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16318
|
+
confirmed = _useState2[0],
|
|
16319
|
+
setConfirmed = _useState2[1];
|
|
16320
|
+
var isConfirmBlocked = Boolean(confirmationLabel) && !confirmed;
|
|
16321
|
+
var handleToggleConfirmed = React.useCallback(function (event) {
|
|
16322
|
+
return setConfirmed(event.target.checked);
|
|
16323
|
+
}, []);
|
|
16324
|
+
React.useEffect(function () {
|
|
16325
|
+
if (!open) {
|
|
16326
|
+
setConfirmed(false);
|
|
16327
|
+
}
|
|
16328
|
+
}, [open]);
|
|
16116
16329
|
React.useEffect(function () {
|
|
16117
16330
|
var handleKeyDown = function handleKeyDown(event) {
|
|
16118
|
-
if (event.key === "Enter" && onConfirm) {
|
|
16331
|
+
if (event.key === "Enter" && onConfirm && !isConfirmBlocked) {
|
|
16119
16332
|
event.preventDefault();
|
|
16120
16333
|
onConfirm();
|
|
16121
16334
|
}
|
|
@@ -16126,7 +16339,7 @@
|
|
|
16126
16339
|
return function () {
|
|
16127
16340
|
window.removeEventListener("keydown", handleKeyDown);
|
|
16128
16341
|
};
|
|
16129
|
-
}, [open, onConfirm]);
|
|
16342
|
+
}, [open, onConfirm, isConfirmBlocked]);
|
|
16130
16343
|
return /*#__PURE__*/React__default["default"].createElement(Dialog, {
|
|
16131
16344
|
ref: ref,
|
|
16132
16345
|
open: open,
|
|
@@ -16137,13 +16350,24 @@
|
|
|
16137
16350
|
lineHeight: "loose",
|
|
16138
16351
|
color: "secondary",
|
|
16139
16352
|
whitespace: "pre-line"
|
|
16140
|
-
}, dialogContent)
|
|
16353
|
+
}, dialogContent), confirmationLabel ? /*#__PURE__*/React__default["default"].createElement(StyledConfirmation, {
|
|
16354
|
+
className: "c-confirm-dialog--confirmation"
|
|
16355
|
+
}, /*#__PURE__*/React__default["default"].createElement(Checkbox, {
|
|
16356
|
+
id: CONFIRMATION_CHECKBOX_ID,
|
|
16357
|
+
checked: confirmed,
|
|
16358
|
+
onChange: handleToggleConfirmed,
|
|
16359
|
+
disabled: isLoading
|
|
16360
|
+
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
|
16361
|
+
htmlFor: CONFIRMATION_CHECKBOX_ID
|
|
16362
|
+
}, /*#__PURE__*/React__default["default"].createElement(Body2, {
|
|
16363
|
+
color: "secondary"
|
|
16364
|
+
}, confirmationLabel))) : null), /*#__PURE__*/React__default["default"].createElement(Dialog.ContentDivider, null), /*#__PURE__*/React__default["default"].createElement(Dialog.Actions, null, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
16141
16365
|
variant: "primary",
|
|
16142
16366
|
style: {
|
|
16143
16367
|
marginRight: "12px"
|
|
16144
16368
|
},
|
|
16145
16369
|
onClick: onConfirm,
|
|
16146
|
-
disabled: isLoading
|
|
16370
|
+
disabled: isLoading || isConfirmBlocked
|
|
16147
16371
|
}, confirmBtnText), shouldShowCancelButton ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
16148
16372
|
variant: "secondary",
|
|
16149
16373
|
"data-action": "cancel",
|
|
@@ -17584,10 +17808,10 @@
|
|
|
17584
17808
|
componentId: "sc-1n0a2yl-0"
|
|
17585
17809
|
})(["width:70%;background:linear-gradient( 90deg,rgba(255,255,255,0) 20%,rgba(0,0,0,0.05) 50%,rgba(255,255,255,0) 60% );background-size:400%;height:16px;border-radius:8px;", " &{background:linear-gradient( 90deg,rgba(255,255,255,0) 20%,rgba(0,0,0,0.2) 50%,rgba(255,255,255,0) 60% );background-size:500%;}animation-duration:1s;animation-iteration-count:infinite;animation-name:", ";animation-timing-function:linear;animation-direction:reverse;"], DARK_THEME_SELECTOR, linearAnimation);
|
|
17586
17810
|
|
|
17587
|
-
var _excluded$
|
|
17811
|
+
var _excluded$1a = ["className"];
|
|
17588
17812
|
var SkeletonLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17589
17813
|
var className = _ref.className,
|
|
17590
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17814
|
+
rest = _objectWithoutProperties(_ref, _excluded$1a);
|
|
17591
17815
|
return /*#__PURE__*/React__default["default"].createElement(StyledSkeletonLoader, _extends({
|
|
17592
17816
|
ref: ref,
|
|
17593
17817
|
className: classNames__default["default"]("c-loader c-loader--linear", className)
|
|
@@ -17601,10 +17825,10 @@
|
|
|
17601
17825
|
componentId: "sc-1f35d5h-0"
|
|
17602
17826
|
})(["display:inline-block;text-align:center;& > span{display:inline-block;width:18px;height:18px;background-color:#777;border-radius:100%;animation:", " 1.4s infinite ease-in-out both;}span:nth-child(1){animation-delay:-0.32s;}span:nth-child(2){animation-delay:-0.16s;}"], dotAnimation);
|
|
17603
17827
|
|
|
17604
|
-
var _excluded$
|
|
17828
|
+
var _excluded$19 = ["className"];
|
|
17605
17829
|
var DotsLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17606
17830
|
var className = _ref.className,
|
|
17607
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17831
|
+
rest = _objectWithoutProperties(_ref, _excluded$19);
|
|
17608
17832
|
return /*#__PURE__*/React__default["default"].createElement(StyledDotsLoader, _extends({
|
|
17609
17833
|
ref: ref,
|
|
17610
17834
|
className: classNames__default["default"]("c-loader c-loader--dots", className)
|
|
@@ -17626,7 +17850,7 @@
|
|
|
17626
17850
|
return props.$activeColorPercentage === "75%" && styled.css(["border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";border-top:", "px solid ", ";"], props.$stroke, props.$activeStrokeColor, props.$stroke, props.$activeStrokeColor, props.$stroke, props.$inactiveStrokeColor, props.$stroke, props.$activeStrokeColor);
|
|
17627
17851
|
});
|
|
17628
17852
|
|
|
17629
|
-
var _excluded$
|
|
17853
|
+
var _excluded$18 = ["radius", "stroke", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "rotateDurationInSeconds", "className"];
|
|
17630
17854
|
var SpinnerLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17631
17855
|
var _ref$radius = _ref.radius,
|
|
17632
17856
|
radius = _ref$radius === void 0 ? 10 : _ref$radius,
|
|
@@ -17641,7 +17865,7 @@
|
|
|
17641
17865
|
_ref$rotateDurationIn = _ref.rotateDurationInSeconds,
|
|
17642
17866
|
rotateDurationInSeconds = _ref$rotateDurationIn === void 0 ? 0.75 : _ref$rotateDurationIn,
|
|
17643
17867
|
className = _ref.className,
|
|
17644
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17868
|
+
rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
17645
17869
|
return /*#__PURE__*/React__default["default"].createElement(StyledSpinnerLoader$1, _extends({
|
|
17646
17870
|
ref: ref,
|
|
17647
17871
|
className: className,
|
|
@@ -17680,7 +17904,7 @@
|
|
|
17680
17904
|
});
|
|
17681
17905
|
StyledLinearLoader.displayName = "StyledLinearLoader";
|
|
17682
17906
|
|
|
17683
|
-
var _excluded$
|
|
17907
|
+
var _excluded$17 = ["height", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "animationDuration"];
|
|
17684
17908
|
var LinearLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17685
17909
|
var _ref$height = _ref.height,
|
|
17686
17910
|
height = _ref$height === void 0 ? 4 : _ref$height,
|
|
@@ -17692,7 +17916,7 @@
|
|
|
17692
17916
|
activeColorPercentage = _ref$activeColorPerce === void 0 ? "25%" : _ref$activeColorPerce,
|
|
17693
17917
|
_ref$animationDuratio = _ref.animationDuration,
|
|
17694
17918
|
animationDuration = _ref$animationDuratio === void 0 ? 0.75 : _ref$animationDuratio,
|
|
17695
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
17919
|
+
rest = _objectWithoutProperties(_ref, _excluded$17);
|
|
17696
17920
|
return /*#__PURE__*/React__default["default"].createElement(StyledLinearLoader, _extends({
|
|
17697
17921
|
ref: ref,
|
|
17698
17922
|
$height: height,
|
|
@@ -17704,7 +17928,7 @@
|
|
|
17704
17928
|
});
|
|
17705
17929
|
LinearLoader.displayName = "LinearLoader";
|
|
17706
17930
|
|
|
17707
|
-
var _excluded$
|
|
17931
|
+
var _excluded$16 = ["header", "rows", "className", "sortBy", "sortDirection", "onSortCallback", "theadClass", "noResultsCallback", "groupBy", "groupHead", "isCollapsible", "emptyValue", "loading", "loadingRows"];
|
|
17708
17932
|
var SortDirection = /*#__PURE__*/function (SortDirection) {
|
|
17709
17933
|
SortDirection["None"] = "none";
|
|
17710
17934
|
SortDirection["Asc"] = "asc";
|
|
@@ -17754,7 +17978,7 @@
|
|
|
17754
17978
|
loading = _ref.loading,
|
|
17755
17979
|
_ref$loadingRows = _ref.loadingRows,
|
|
17756
17980
|
loadingRows = _ref$loadingRows === void 0 ? 7 : _ref$loadingRows,
|
|
17757
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
17981
|
+
args = _objectWithoutProperties(_ref, _excluded$16);
|
|
17758
17982
|
var _useState = React.useState(sortDirection),
|
|
17759
17983
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17760
17984
|
columnDirection = _useState2[0],
|
|
@@ -18114,7 +18338,7 @@
|
|
|
18114
18338
|
});
|
|
18115
18339
|
StyledCompleteCheckbox.displayName = "StyledCompleteCheckbox";
|
|
18116
18340
|
|
|
18117
|
-
var _excluded$
|
|
18341
|
+
var _excluded$15 = ["completed", "disabled", "animate", "onClick", "className", "primary", "checkMarkClassName"];
|
|
18118
18342
|
var CompleteCheckbox = function CompleteCheckbox(_ref) {
|
|
18119
18343
|
var _ref$completed = _ref.completed,
|
|
18120
18344
|
completed = _ref$completed === void 0 ? false : _ref$completed,
|
|
@@ -18127,7 +18351,7 @@
|
|
|
18127
18351
|
_ref$primary = _ref.primary,
|
|
18128
18352
|
primary = _ref$primary === void 0 ? false : _ref$primary,
|
|
18129
18353
|
checkMarkClassName = _ref.checkMarkClassName,
|
|
18130
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18354
|
+
rest = _objectWithoutProperties(_ref, _excluded$15);
|
|
18131
18355
|
return /*#__PURE__*/React__default["default"].createElement(StyledCompleteCheckbox, _extends({
|
|
18132
18356
|
onClick: onClick,
|
|
18133
18357
|
className: classNames__default["default"]("c-complete-checkbox", className),
|
|
@@ -18162,7 +18386,7 @@
|
|
|
18162
18386
|
});
|
|
18163
18387
|
StyledPaper.displayName = "StyledPaper";
|
|
18164
18388
|
|
|
18165
|
-
var _excluded$
|
|
18389
|
+
var _excluded$14 = ["children", "className", "type", "hover", "useOptimizedShadow"];
|
|
18166
18390
|
/**
|
|
18167
18391
|
* This is a component description and should sit directly above your component
|
|
18168
18392
|
*/
|
|
@@ -18175,7 +18399,7 @@
|
|
|
18175
18399
|
hover = _ref$hover === void 0 ? false : _ref$hover,
|
|
18176
18400
|
_ref$useOptimizedShad = _ref.useOptimizedShadow,
|
|
18177
18401
|
useOptimizedShadow = _ref$useOptimizedShad === void 0 ? false : _ref$useOptimizedShad,
|
|
18178
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18402
|
+
rest = _objectWithoutProperties(_ref, _excluded$14);
|
|
18179
18403
|
return /*#__PURE__*/React__default["default"].createElement(StyledPaper, _extends({
|
|
18180
18404
|
className: classNames__default["default"](className, {
|
|
18181
18405
|
"ac-shadow--raised--lg": !useOptimizedShadow && hover && type === "paper-1",
|
|
@@ -18231,7 +18455,7 @@
|
|
|
18231
18455
|
});
|
|
18232
18456
|
StyledCard.displayName = "StyledCard";
|
|
18233
18457
|
|
|
18234
|
-
var _excluded$
|
|
18458
|
+
var _excluded$13 = ["children", "className", "hoverable", "variant", "onClick"];
|
|
18235
18459
|
var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18236
18460
|
var children = _ref.children,
|
|
18237
18461
|
className = _ref.className,
|
|
@@ -18240,7 +18464,7 @@
|
|
|
18240
18464
|
_ref$variant = _ref.variant,
|
|
18241
18465
|
variant = _ref$variant === void 0 ? "paper-2" : _ref$variant,
|
|
18242
18466
|
onClick = _ref.onClick,
|
|
18243
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18467
|
+
rest = _objectWithoutProperties(_ref, _excluded$13);
|
|
18244
18468
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard, _extends({}, rest, {
|
|
18245
18469
|
type: variant,
|
|
18246
18470
|
className: classNames__default["default"]("c-card", className),
|
|
@@ -18321,12 +18545,12 @@
|
|
|
18321
18545
|
});
|
|
18322
18546
|
EntityCard$1.displayName = "EntityCard";
|
|
18323
18547
|
|
|
18324
|
-
var _excluded$
|
|
18548
|
+
var _excluded$12 = ["weight", "children"];
|
|
18325
18549
|
var Title1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18326
18550
|
var _ref$weight = _ref.weight,
|
|
18327
18551
|
weight = _ref$weight === void 0 ? "light" : _ref$weight,
|
|
18328
18552
|
children = _ref.children,
|
|
18329
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18553
|
+
props = _objectWithoutProperties(_ref, _excluded$12);
|
|
18330
18554
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
18331
18555
|
weight: weight,
|
|
18332
18556
|
variant: "Title 1",
|
|
@@ -18335,12 +18559,12 @@
|
|
|
18335
18559
|
});
|
|
18336
18560
|
Title1.displayName = "Title1";
|
|
18337
18561
|
|
|
18338
|
-
var _excluded$
|
|
18562
|
+
var _excluded$11 = ["weight", "children"];
|
|
18339
18563
|
var Title2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18340
18564
|
var _ref$weight = _ref.weight,
|
|
18341
18565
|
weight = _ref$weight === void 0 ? "light" : _ref$weight,
|
|
18342
18566
|
children = _ref.children,
|
|
18343
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18567
|
+
props = _objectWithoutProperties(_ref, _excluded$11);
|
|
18344
18568
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
18345
18569
|
weight: weight,
|
|
18346
18570
|
variant: "Title 2",
|
|
@@ -18349,10 +18573,10 @@
|
|
|
18349
18573
|
});
|
|
18350
18574
|
Title2.displayName = "Title2";
|
|
18351
18575
|
|
|
18352
|
-
var _excluded$
|
|
18576
|
+
var _excluded$10 = ["children"];
|
|
18353
18577
|
var Header2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18354
18578
|
var children = _ref.children,
|
|
18355
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18579
|
+
props = _objectWithoutProperties(_ref, _excluded$10);
|
|
18356
18580
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
18357
18581
|
weight: "bold",
|
|
18358
18582
|
variant: "Header 2",
|
|
@@ -18361,12 +18585,12 @@
|
|
|
18361
18585
|
});
|
|
18362
18586
|
Header2.displayName = "Header2";
|
|
18363
18587
|
|
|
18364
|
-
var _excluded
|
|
18588
|
+
var _excluded$$ = ["weight", "children"];
|
|
18365
18589
|
var Body1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18366
18590
|
var _ref$weight = _ref.weight,
|
|
18367
18591
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
18368
18592
|
children = _ref.children,
|
|
18369
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
18593
|
+
props = _objectWithoutProperties(_ref, _excluded$$);
|
|
18370
18594
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
18371
18595
|
variant: "Body 1",
|
|
18372
18596
|
weight: weight,
|
|
@@ -18375,12 +18599,12 @@
|
|
|
18375
18599
|
});
|
|
18376
18600
|
Body1.displayName = "Body1";
|
|
18377
18601
|
|
|
18378
|
-
var _excluded$
|
|
18602
|
+
var _excluded$_ = ["weight", "children"];
|
|
18379
18603
|
var Caption1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18380
18604
|
var _ref$weight = _ref.weight,
|
|
18381
18605
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
18382
18606
|
children = _ref.children,
|
|
18383
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
18607
|
+
props = _objectWithoutProperties(_ref, _excluded$_);
|
|
18384
18608
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
18385
18609
|
variant: "Caption 1",
|
|
18386
18610
|
weight: weight,
|
|
@@ -18389,12 +18613,12 @@
|
|
|
18389
18613
|
});
|
|
18390
18614
|
Caption1.displayName = "Caption1";
|
|
18391
18615
|
|
|
18392
|
-
var _excluded
|
|
18616
|
+
var _excluded$Z = ["weight", "children"];
|
|
18393
18617
|
var Caption2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18394
18618
|
var _ref$weight = _ref.weight,
|
|
18395
18619
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
18396
18620
|
children = _ref.children,
|
|
18397
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
18621
|
+
props = _objectWithoutProperties(_ref, _excluded$Z);
|
|
18398
18622
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
18399
18623
|
variant: "Caption 2",
|
|
18400
18624
|
weight: weight,
|
|
@@ -18607,7 +18831,7 @@
|
|
|
18607
18831
|
componentId: "sc-5x2tyd-1"
|
|
18608
18832
|
})(["border-radius:100%;object-fit:cover;"]);
|
|
18609
18833
|
|
|
18610
|
-
var _excluded$
|
|
18834
|
+
var _excluded$Y = ["url", "alt", "size", "className", "imgClassName", "children"];
|
|
18611
18835
|
/**
|
|
18612
18836
|
* @component Avatar
|
|
18613
18837
|
* @description
|
|
@@ -18642,7 +18866,7 @@
|
|
|
18642
18866
|
className = _ref.className,
|
|
18643
18867
|
imgClassName = _ref.imgClassName,
|
|
18644
18868
|
children = _ref.children,
|
|
18645
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18869
|
+
rest = _objectWithoutProperties(_ref, _excluded$Y);
|
|
18646
18870
|
var _useState = React.useState(false),
|
|
18647
18871
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18648
18872
|
imageLoaded = _useState2[0],
|
|
@@ -18683,13 +18907,13 @@
|
|
|
18683
18907
|
return props.$color && styled.css(["background-color:", ";"], props.$color);
|
|
18684
18908
|
});
|
|
18685
18909
|
|
|
18686
|
-
var _excluded$
|
|
18910
|
+
var _excluded$X = ["color", "size", "className"];
|
|
18687
18911
|
var Dot = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18688
18912
|
var color = _ref.color,
|
|
18689
18913
|
_ref$size = _ref.size,
|
|
18690
18914
|
size = _ref$size === void 0 ? 8 : _ref$size,
|
|
18691
18915
|
className = _ref.className,
|
|
18692
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18916
|
+
rest = _objectWithoutProperties(_ref, _excluded$X);
|
|
18693
18917
|
return /*#__PURE__*/React__default["default"].createElement(StyledDot, _extends({
|
|
18694
18918
|
className: classNames__default["default"]("c-dot", className),
|
|
18695
18919
|
ref: ref,
|
|
@@ -18726,7 +18950,7 @@
|
|
|
18726
18950
|
});
|
|
18727
18951
|
StyledTagText.displayName = "StyledTagText";
|
|
18728
18952
|
|
|
18729
|
-
var _excluded$
|
|
18953
|
+
var _excluded$W = ["name", "color", "showText", "showDot", "className"];
|
|
18730
18954
|
var Tag = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18731
18955
|
var name = _ref.name,
|
|
18732
18956
|
color = _ref.color,
|
|
@@ -18735,7 +18959,7 @@
|
|
|
18735
18959
|
_ref$showDot = _ref.showDot,
|
|
18736
18960
|
showDot = _ref$showDot === void 0 ? true : _ref$showDot,
|
|
18737
18961
|
className = _ref.className,
|
|
18738
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
18962
|
+
rest = _objectWithoutProperties(_ref, _excluded$W);
|
|
18739
18963
|
return /*#__PURE__*/React__default["default"].createElement(StyledTag, _extends({
|
|
18740
18964
|
className: classNames__default["default"]("c-tag", className),
|
|
18741
18965
|
ref: ref
|
|
@@ -18847,7 +19071,7 @@
|
|
|
18847
19071
|
});
|
|
18848
19072
|
StyledNavAsMoreTarget.displayName = "StyledNavAsMoreTarget";
|
|
18849
19073
|
|
|
18850
|
-
var _excluded$
|
|
19074
|
+
var _excluded$V = ["children", "active", "disabled", "className", "role"];
|
|
18851
19075
|
var Item = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
18852
19076
|
var children = _ref.children,
|
|
18853
19077
|
_ref$active = _ref.active,
|
|
@@ -18856,7 +19080,7 @@
|
|
|
18856
19080
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
18857
19081
|
className = _ref.className,
|
|
18858
19082
|
role = _ref.role,
|
|
18859
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19083
|
+
rest = _objectWithoutProperties(_ref, _excluded$V);
|
|
18860
19084
|
return /*#__PURE__*/React__default["default"].createElement(StyledNavListItem, _extends({
|
|
18861
19085
|
className: classNames__default["default"]("c-nav__item", {
|
|
18862
19086
|
"c-nav__item--active": active
|
|
@@ -18904,11 +19128,11 @@
|
|
|
18904
19128
|
});
|
|
18905
19129
|
StyledExpandSingle.displayName = "StyledExpandSingle";
|
|
18906
19130
|
|
|
18907
|
-
var _excluded$
|
|
19131
|
+
var _excluded$U = ["expanded"];
|
|
18908
19132
|
var ExpandSingle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18909
19133
|
var _ref$expanded = _ref.expanded,
|
|
18910
19134
|
expanded = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
18911
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19135
|
+
rest = _objectWithoutProperties(_ref, _excluded$U);
|
|
18912
19136
|
return /*#__PURE__*/React__default["default"].createElement(StyledExpandSingle, _extends({
|
|
18913
19137
|
ref: ref,
|
|
18914
19138
|
viewBox: "0 0 24 24",
|
|
@@ -19093,198 +19317,6 @@
|
|
|
19093
19317
|
};
|
|
19094
19318
|
OptionContent.displayName = "OptionContent";
|
|
19095
19319
|
|
|
19096
|
-
var _excluded$V = ["mixed", "data-testid"];
|
|
19097
|
-
|
|
19098
|
-
/**
|
|
19099
|
-
* @component CheckboxIcon
|
|
19100
|
-
* @description
|
|
19101
|
-
*
|
|
19102
|
-
* The React Icon component is a visual element that displays an icon to represent a concept, object, or action.
|
|
19103
|
-
* The Icon component is
|
|
19104
|
-
* customizable, allowing for variations in size, color, and style to fit the needs of the application.
|
|
19105
|
-
*
|
|
19106
|
-
*
|
|
19107
|
-
* @example
|
|
19108
|
-
* return (
|
|
19109
|
-
* <CheckboxIcon className="mr-2" showAdditionalIcon={true} />
|
|
19110
|
-
* )
|
|
19111
|
-
*
|
|
19112
|
-
* @see
|
|
19113
|
-
* https://system.activecollab.com/?path=/story/foundation-icons-icons--icons
|
|
19114
|
-
* @see
|
|
19115
|
-
* https://design.activecollab.com/docs/foundations/icons
|
|
19116
|
-
*/
|
|
19117
|
-
var CheckboxIcon = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, svgRef) {
|
|
19118
|
-
var mixed = _ref.mixed,
|
|
19119
|
-
testId = _ref["data-testid"],
|
|
19120
|
-
props = _objectWithoutProperties(_ref, _excluded$V);
|
|
19121
|
-
// const [animate, setAnimate] = useState(false);
|
|
19122
|
-
// const mountRef = useRef(false);
|
|
19123
|
-
|
|
19124
|
-
// useEffect(() => {
|
|
19125
|
-
// if (mountRef.current) {
|
|
19126
|
-
// setAnimate(true);
|
|
19127
|
-
// } else {
|
|
19128
|
-
// mountRef.current = true;
|
|
19129
|
-
// }
|
|
19130
|
-
// }, [mixed]);
|
|
19131
|
-
|
|
19132
|
-
if (mixed) {
|
|
19133
|
-
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
19134
|
-
width: "16",
|
|
19135
|
-
height: "16",
|
|
19136
|
-
viewBox: "0 0 16 16",
|
|
19137
|
-
fill: "none",
|
|
19138
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19139
|
-
"data-testid": "checkbox-mixed-icon"
|
|
19140
|
-
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
19141
|
-
fillRule: "evenodd",
|
|
19142
|
-
clipRule: "evenodd",
|
|
19143
|
-
d: "M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z",
|
|
19144
|
-
fill: "var(--color-secondary)"
|
|
19145
|
-
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
19146
|
-
x: "3",
|
|
19147
|
-
y: "7",
|
|
19148
|
-
width: 10,
|
|
19149
|
-
height: "2",
|
|
19150
|
-
rx: "1",
|
|
19151
|
-
fill: "var(--page-paper-main)"
|
|
19152
|
-
}));
|
|
19153
|
-
}
|
|
19154
|
-
return /*#__PURE__*/React__default["default"].createElement("svg", _extends({
|
|
19155
|
-
width: 16,
|
|
19156
|
-
height: 16,
|
|
19157
|
-
viewBox: "0 0 16 16",
|
|
19158
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19159
|
-
fill: "var(--color-theme-600)",
|
|
19160
|
-
focusable: false,
|
|
19161
|
-
ref: svgRef
|
|
19162
|
-
}, props, {
|
|
19163
|
-
"data-testid": testId
|
|
19164
|
-
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
19165
|
-
fillRule: "evenodd"
|
|
19166
|
-
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
19167
|
-
stroke: "#8E8E8E",
|
|
19168
|
-
x: 0.5,
|
|
19169
|
-
y: 0.5,
|
|
19170
|
-
width: 15,
|
|
19171
|
-
height: 15,
|
|
19172
|
-
rx: 2
|
|
19173
|
-
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
19174
|
-
stroke: "#979797",
|
|
19175
|
-
strokeWidth: 2,
|
|
19176
|
-
d: "M12.243 5l-5.657 5.657-2.829-2.829"
|
|
19177
|
-
})));
|
|
19178
|
-
});
|
|
19179
|
-
CheckboxIcon.displayName = "CheckboxIcon";
|
|
19180
|
-
var CheckboxIcon$1 = CheckboxIcon;
|
|
19181
|
-
|
|
19182
|
-
var StyledInput$4 = styled__default["default"].input.withConfig({
|
|
19183
|
-
displayName: "Styles__StyledInput",
|
|
19184
|
-
componentId: "sc-y7zymm-0"
|
|
19185
|
-
})(["border:0px;clip:rect(0px,0px,0px,0px);cursor:pointer;height:1px;margin:-1px;opacity:0;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:1px;"]);
|
|
19186
|
-
StyledInput$4.displayName = "StyledInput";
|
|
19187
|
-
var StyledLabel$1 = styled__default["default"].label.withConfig({
|
|
19188
|
-
displayName: "Styles__StyledLabel",
|
|
19189
|
-
componentId: "sc-y7zymm-1"
|
|
19190
|
-
})([""]);
|
|
19191
|
-
StyledLabel$1.displayName = "StyledLabel";
|
|
19192
|
-
var StyledCheckbox$1 = styled__default["default"].div.withConfig({
|
|
19193
|
-
displayName: "Styles__StyledCheckbox",
|
|
19194
|
-
componentId: "sc-y7zymm-2"
|
|
19195
|
-
})(["height:16px;width:16px;position:relative;transition-duration:0.2s;border-radius:2px;path{transition-duration:0.2s;stroke:transparent;stroke-dashoffset:12;stroke-dasharray:12;}svg{cursor:pointer;border-radius:2px;fill:transparent;}", " rect{transition-duration:0.2s;", " ", "}", ":disabled ~ ", "{opacity:0.5;cursor:not-allowed;}", ":focus ~ ", "{", "}&:not(.c-checkbox__controlled) ", ":hover:not(:checked) ~ ", "{path{stroke:var(--color-secondary-500);stroke-dashoffset:24;}rect{stroke:var(--color-secondary);", " stroke-width:3px;}}", " ", ":checked ~ ", "{path{", "}rect{stroke:var(--color-secondary);stroke-width:19px;", "}}"], function (props) {
|
|
19196
|
-
return props.$disabled && styled.css(["svg{cursor:not-allowed;}"]);
|
|
19197
|
-
}, function (props) {
|
|
19198
|
-
return !props.mixed && styled.css(["stroke:var(--color-theme-500);"]);
|
|
19199
|
-
}, function (props) {
|
|
19200
|
-
return props.mixed && styled.css(["stroke:transparent;"]);
|
|
19201
|
-
}, StyledInput$4, StyledLabel$1, StyledInput$4, StyledLabel$1, function (props) {
|
|
19202
|
-
return !props.mixed && styled.css(["rect{stroke:var(--color-secondary);stroke-width:3px;}"]);
|
|
19203
|
-
}, StyledInput$4, StyledLabel$1, function (props) {
|
|
19204
|
-
return props.mixed && styled.css(["stroke:transparent;"]);
|
|
19205
|
-
}, function (props) {
|
|
19206
|
-
return props.hover && !props.mixed && styled.css(["", ":not(:checked) ~ ", "{path{stroke:var(--color-secondary-500);stroke-dashoffset:24;}rect{stroke:var(--color-secondary);stroke-width:3px;}}"], StyledInput$4, StyledLabel$1);
|
|
19207
|
-
}, StyledInput$4, StyledLabel$1, function (props) {
|
|
19208
|
-
return !props.mixed && styled.css(["stroke:var(--page-paper-main);stroke-dashoffset:24;"]);
|
|
19209
|
-
}, function (props) {
|
|
19210
|
-
return props.mixed && styled.css(["stroke:transparent;"]);
|
|
19211
|
-
});
|
|
19212
|
-
StyledCheckbox$1.displayName = "StyledCheckbox";
|
|
19213
|
-
|
|
19214
|
-
var _excluded$U = ["className", "hover", "id", "mixed", "checked", "onChange", "disabled"];
|
|
19215
|
-
/**
|
|
19216
|
-
* Checkbox component
|
|
19217
|
-
*/
|
|
19218
|
-
var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
19219
|
-
var className = _ref.className,
|
|
19220
|
-
hover = _ref.hover,
|
|
19221
|
-
_ref$id = _ref.id,
|
|
19222
|
-
id = _ref$id === void 0 ? "checkbox" : _ref$id,
|
|
19223
|
-
_ref$mixed = _ref.mixed,
|
|
19224
|
-
mixed = _ref$mixed === void 0 ? false : _ref$mixed,
|
|
19225
|
-
checked = _ref.checked,
|
|
19226
|
-
onChange = _ref.onChange,
|
|
19227
|
-
disabled = _ref.disabled,
|
|
19228
|
-
rest = _objectWithoutProperties(_ref, _excluded$U);
|
|
19229
|
-
var _useState = React.useState(mixed && !checked),
|
|
19230
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
19231
|
-
indeterminate = _useState2[0],
|
|
19232
|
-
setIndeterminate = _useState2[1];
|
|
19233
|
-
var _useState3 = React.useState(checked),
|
|
19234
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
19235
|
-
initialChecked = _useState4[0],
|
|
19236
|
-
setInitialChecked = _useState4[1];
|
|
19237
|
-
var handleChange = React.useCallback(function (e) {
|
|
19238
|
-
typeof onChange === "function" && onChange(e);
|
|
19239
|
-
setInitialChecked(function (prev) {
|
|
19240
|
-
return !prev;
|
|
19241
|
-
});
|
|
19242
|
-
setIndeterminate(false);
|
|
19243
|
-
}, [onChange]);
|
|
19244
|
-
React.useEffect(function () {
|
|
19245
|
-
if (checked !== initialChecked) {
|
|
19246
|
-
setInitialChecked(checked);
|
|
19247
|
-
setIndeterminate(false);
|
|
19248
|
-
}
|
|
19249
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19250
|
-
}, [checked]);
|
|
19251
|
-
React.useEffect(function () {
|
|
19252
|
-
if (mixed !== indeterminate && !checked) {
|
|
19253
|
-
setIndeterminate(mixed);
|
|
19254
|
-
}
|
|
19255
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19256
|
-
}, [mixed]);
|
|
19257
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledCheckbox$1, {
|
|
19258
|
-
className: classNames__default["default"]("c-checkbox", {
|
|
19259
|
-
"c-checkbox__hover": hover,
|
|
19260
|
-
"c-checkbox__controlled": typeof hover === "boolean"
|
|
19261
|
-
}, className),
|
|
19262
|
-
hover: hover,
|
|
19263
|
-
tabIndex: -1,
|
|
19264
|
-
mixed: indeterminate,
|
|
19265
|
-
$disabled: disabled
|
|
19266
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledInput$4, _extends({
|
|
19267
|
-
role: "checkbox",
|
|
19268
|
-
id: id,
|
|
19269
|
-
className: "c-checkbox--input",
|
|
19270
|
-
type: "checkbox",
|
|
19271
|
-
ref: ref
|
|
19272
|
-
}, rest, {
|
|
19273
|
-
checked: initialChecked,
|
|
19274
|
-
onChange: handleChange,
|
|
19275
|
-
disabled: disabled
|
|
19276
|
-
})), /*#__PURE__*/React__default["default"].createElement(StyledLabel$1, {
|
|
19277
|
-
htmlFor: id,
|
|
19278
|
-
className: "c-checkbox--label"
|
|
19279
|
-
}, /*#__PURE__*/React__default["default"].createElement(CheckboxIcon$1, {
|
|
19280
|
-
"data-testid": "checkbox-icon",
|
|
19281
|
-
height: 16,
|
|
19282
|
-
width: 16,
|
|
19283
|
-
mixed: indeterminate
|
|
19284
|
-
})));
|
|
19285
|
-
});
|
|
19286
|
-
Checkbox.displayName = "Checkbox";
|
|
19287
|
-
|
|
19288
19320
|
var InputResetStyle = styled.css(["margin:0;padding:0;border:0;outline:0;font:inherit;"]);
|
|
19289
19321
|
|
|
19290
19322
|
var StyledInputWrapper = styled__default["default"].div.withConfig({
|