@activecollab/components 1.0.389 → 1.0.391
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/EditableContent/EditableContent.js +5 -3
- package/dist/cjs/components/EditableContent/EditableContent.js.map +1 -1
- package/dist/cjs/components/EditableHours/EditableHours.js +103 -34
- package/dist/cjs/components/EditableHours/EditableHours.js.map +1 -1
- package/dist/cjs/components/Input/InputHours.js +35 -17
- package/dist/cjs/components/Input/InputHours.js.map +1 -1
- package/dist/cjs/{components/HoursWrapper/HoursWrapper.js → hooks/useInputHours.js} +45 -76
- package/dist/cjs/hooks/useInputHours.js.map +1 -0
- package/dist/esm/components/EditableContent/EditableContent.d.ts.map +1 -1
- package/dist/esm/components/EditableContent/EditableContent.js +5 -3
- package/dist/esm/components/EditableContent/EditableContent.js.map +1 -1
- package/dist/esm/components/EditableHours/EditableHours.d.ts +5 -11
- package/dist/esm/components/EditableHours/EditableHours.d.ts.map +1 -1
- package/dist/esm/components/EditableHours/EditableHours.js +98 -36
- package/dist/esm/components/EditableHours/EditableHours.js.map +1 -1
- package/dist/esm/components/Input/InputHours.d.ts +2 -2
- package/dist/esm/components/Input/InputHours.d.ts.map +1 -1
- package/dist/esm/components/Input/InputHours.js +35 -17
- package/dist/esm/components/Input/InputHours.js.map +1 -1
- package/dist/esm/hooks/useInputHours.d.ts +27 -0
- package/dist/esm/hooks/useInputHours.d.ts.map +1 -0
- package/dist/esm/{components/HoursWrapper/HoursWrapper.js → hooks/useInputHours.js} +41 -68
- package/dist/esm/hooks/useInputHours.js.map +1 -0
- package/dist/index.js +305 -245
- 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/cjs/components/HoursWrapper/HoursWrapper.js.map +0 -1
- package/dist/cjs/components/HoursWrapper/index.js +0 -17
- package/dist/cjs/components/HoursWrapper/index.js.map +0 -1
- package/dist/esm/components/HoursWrapper/HoursWrapper.d.ts +0 -9
- package/dist/esm/components/HoursWrapper/HoursWrapper.d.ts.map +0 -1
- package/dist/esm/components/HoursWrapper/HoursWrapper.js.map +0 -1
- package/dist/esm/components/HoursWrapper/index.d.ts +0 -2
- package/dist/esm/components/HoursWrapper/index.d.ts.map +0 -1
- package/dist/esm/components/HoursWrapper/index.js +0 -2
- package/dist/esm/components/HoursWrapper/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -12412,105 +12412,20 @@
|
|
|
12412
12412
|
});
|
|
12413
12413
|
InputAdornment.displayName = "InputAdornment";
|
|
12414
12414
|
|
|
12415
|
-
var
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
})(["", " ", " ", ""], FontStyle, BoxSizingStyle, {
|
|
12419
|
-
"position": "relative",
|
|
12420
|
-
"display": "inline-block",
|
|
12421
|
-
"maxWidth": "100%"
|
|
12422
|
-
});
|
|
12423
|
-
var StyledSpan = styled__default["default"](Typography).withConfig({
|
|
12424
|
-
displayName: "Styles__StyledSpan",
|
|
12425
|
-
componentId: "sc-1wapx2a-1"
|
|
12426
|
-
})(["visibility:hidden;display:block;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;position:relative;border:1px solid transparent;border-radius:6px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:pre;font-variant-numeric:tabular-nums;", " &:empty:before{content:\" \";}"], function (_ref) {
|
|
12427
|
-
var $disabled = _ref.$disabled;
|
|
12428
|
-
return $disabled && styled.css(["visibility:visible;"]);
|
|
12429
|
-
});
|
|
12430
|
-
StyledSpan.displayName = "StyledSpan";
|
|
12431
|
-
var StyledInput$1 = styled__default["default"](Typography).withConfig({
|
|
12432
|
-
displayName: "Styles__StyledInput",
|
|
12433
|
-
componentId: "sc-1wapx2a-2"
|
|
12434
|
-
})(["", " background-color:inherit;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;text-overflow:ellipsis;font-variant-numeric:tabular-nums;&:focus-whitin{text-overflow:clip;}outline-width:0px;outline:none;&:disabled{display:none;}"], {
|
|
12435
|
-
"position": "absolute",
|
|
12436
|
-
"inset": "0px",
|
|
12437
|
-
"boxSizing": "border-box",
|
|
12438
|
-
"width": "100%",
|
|
12439
|
-
"overflow": "hidden",
|
|
12440
|
-
"whiteSpace": "nowrap",
|
|
12441
|
-
"borderRadius": "0.375rem",
|
|
12442
|
-
"borderWidth": "1px",
|
|
12443
|
-
"borderStyle": "solid",
|
|
12444
|
-
"borderColor": "transparent",
|
|
12445
|
-
":focus-within": {
|
|
12446
|
-
"overflow": "scroll",
|
|
12447
|
-
"borderColor": "var(--color-theme-700)"
|
|
12448
|
-
},
|
|
12449
|
-
":hover": {
|
|
12450
|
-
"borderColor": "var(--color-theme-700)"
|
|
12451
|
-
}
|
|
12452
|
-
});
|
|
12453
|
-
StyledInput$1.displayName = "StyledInput";
|
|
12454
|
-
|
|
12455
|
-
var _excluded$H = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef"];
|
|
12456
|
-
var EditableContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12457
|
-
var className = _ref.className,
|
|
12458
|
-
_ref$variant = _ref.variant,
|
|
12459
|
-
variant = _ref$variant === void 0 ? "Body 2" : _ref$variant,
|
|
12460
|
-
weight = _ref.weight,
|
|
12461
|
-
_ref$disabled = _ref.disabled,
|
|
12462
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12463
|
-
inputProps = _ref.inputProps,
|
|
12464
|
-
wrapRef = _ref.wrapRef,
|
|
12465
|
-
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
12466
|
-
var intInputRef = React.useRef(null);
|
|
12467
|
-
var handleRef = useForkRef(ref, intInputRef);
|
|
12468
|
-
var handleBlur = React.useCallback(function (evt) {
|
|
12469
|
-
if (intInputRef !== null && intInputRef !== void 0 && intInputRef.current) {
|
|
12470
|
-
intInputRef.current.scrollLeft = 0;
|
|
12471
|
-
}
|
|
12472
|
-
typeof (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur) === "function" && (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur(evt));
|
|
12473
|
-
}, [inputProps]);
|
|
12474
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledDiv, _extends({
|
|
12475
|
-
className: className,
|
|
12476
|
-
ref: wrapRef
|
|
12477
|
-
}, props), /*#__PURE__*/React__default["default"].createElement(StyledSpan, {
|
|
12478
|
-
variant: variant,
|
|
12479
|
-
forwardedAs: "span",
|
|
12480
|
-
weight: weight,
|
|
12481
|
-
$disabled: disabled
|
|
12482
|
-
}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.value), /*#__PURE__*/React__default["default"].createElement(StyledInput$1, _extends({}, inputProps, {
|
|
12483
|
-
ref: handleRef,
|
|
12484
|
-
forwardedAs: "input",
|
|
12485
|
-
variant: variant,
|
|
12486
|
-
weight: weight,
|
|
12487
|
-
value: inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
12488
|
-
onBlur: handleBlur,
|
|
12489
|
-
disabled: disabled,
|
|
12490
|
-
"data-form-type": "other"
|
|
12491
|
-
})));
|
|
12492
|
-
});
|
|
12493
|
-
EditableContent.displayName = "EditableContent";
|
|
12494
|
-
|
|
12495
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
12496
|
-
|
|
12497
|
-
var HoursWrapper = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
12498
|
-
var children = _ref.children,
|
|
12499
|
-
value = _ref.value,
|
|
12500
|
-
onCancel = _ref.onCancel,
|
|
12415
|
+
var useInputHours = function useInputHours(_ref, inputRef) {
|
|
12416
|
+
var value = _ref.value,
|
|
12417
|
+
withLeadingZero = _ref.withLeadingZero,
|
|
12501
12418
|
onSave = _ref.onSave,
|
|
12502
|
-
onEnterKeyPress = _ref.onEnterKeyPress,
|
|
12503
|
-
allowEmptyValue = _ref.allowEmptyValue,
|
|
12504
|
-
_ref$withLeadingZero = _ref.withLeadingZero,
|
|
12505
|
-
withLeadingZero = _ref$withLeadingZero === void 0 ? true : _ref$withLeadingZero,
|
|
12506
12419
|
_ref$validation = _ref.validation,
|
|
12507
12420
|
validation = _ref$validation === void 0 ? validateTimeInput : _ref$validation,
|
|
12508
|
-
|
|
12509
|
-
|
|
12421
|
+
allowEmptyValue = _ref.allowEmptyValue,
|
|
12422
|
+
onCancel = _ref.onCancel,
|
|
12510
12423
|
_ref$minuteIncrement = _ref.minuteIncrement,
|
|
12511
|
-
minuteIncrement = _ref$minuteIncrement === void 0 ? 1 : _ref$minuteIncrement
|
|
12512
|
-
|
|
12513
|
-
|
|
12424
|
+
minuteIncrement = _ref$minuteIncrement === void 0 ? 1 : _ref$minuteIncrement,
|
|
12425
|
+
incrementOnlySelected = _ref.incrementOnlySelected,
|
|
12426
|
+
onEnterKeyPress = _ref.onEnterKeyPress,
|
|
12427
|
+
onChange = _ref.onChange,
|
|
12428
|
+
onClick = _ref.onClick;
|
|
12514
12429
|
var _useState = React.useState(function () {
|
|
12515
12430
|
return decimalToHours(value, withLeadingZero);
|
|
12516
12431
|
}),
|
|
@@ -12524,17 +12439,6 @@
|
|
|
12524
12439
|
prevValue = _useState4[0],
|
|
12525
12440
|
setPrevValue = _useState4[1];
|
|
12526
12441
|
var escapeRef = React.useRef(false);
|
|
12527
|
-
React.useEffect(function () {
|
|
12528
|
-
var _value;
|
|
12529
|
-
if (value !== undefined) {
|
|
12530
|
-
_value = decimalToHours(value, withLeadingZero);
|
|
12531
|
-
}
|
|
12532
|
-
if (currentValue !== _value) {
|
|
12533
|
-
setCurrentValue(_value);
|
|
12534
|
-
setPrevValue(_value);
|
|
12535
|
-
}
|
|
12536
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12537
|
-
}, [value]);
|
|
12538
12442
|
var handleBlur = React.useCallback(function (e) {
|
|
12539
12443
|
if (escapeRef.current) {
|
|
12540
12444
|
setCurrentValue(prevValue);
|
|
@@ -12614,11 +12518,11 @@
|
|
|
12614
12518
|
}
|
|
12615
12519
|
}
|
|
12616
12520
|
}
|
|
12617
|
-
}, [currentValue, incrementOnlySelected, minuteIncrement, validation, withLeadingZero]);
|
|
12521
|
+
}, [currentValue, incrementOnlySelected, inputRef, minuteIncrement, validation, withLeadingZero]);
|
|
12618
12522
|
var handleKeyDown = React.useCallback(function (e) {
|
|
12619
12523
|
if (e.key === "Enter") {
|
|
12620
12524
|
e.target.blur();
|
|
12621
|
-
onEnterKeyPress
|
|
12525
|
+
if (typeof onEnterKeyPress === "function") onEnterKeyPress(e.target.value);
|
|
12622
12526
|
}
|
|
12623
12527
|
if (e.key === "ArrowLeft") {
|
|
12624
12528
|
return;
|
|
@@ -12687,11 +12591,12 @@
|
|
|
12687
12591
|
return;
|
|
12688
12592
|
}
|
|
12689
12593
|
}
|
|
12690
|
-
}, [handleIncrementDecrement, onCancel, onEnterKeyPress, validation, withLeadingZero]);
|
|
12594
|
+
}, [handleIncrementDecrement, inputRef, onCancel, onEnterKeyPress, validation, withLeadingZero]);
|
|
12691
12595
|
var handleChange = React.useCallback(function (e) {
|
|
12692
12596
|
setCurrentValue(e.target.value);
|
|
12693
|
-
|
|
12694
|
-
|
|
12597
|
+
if (onChange) onChange(e.target.value);
|
|
12598
|
+
}, [onChange]);
|
|
12599
|
+
var handleClick = React.useCallback(function (e) {
|
|
12695
12600
|
var _inputRef$current5;
|
|
12696
12601
|
var selectionStart = (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.selectionStart;
|
|
12697
12602
|
if (inputRef.current && currentValue && currentValue.length > 0 && typeof selectionStart === "number") {
|
|
@@ -12704,47 +12609,39 @@
|
|
|
12704
12609
|
(_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : _inputRef$current7.setSelectionRange(dotsIndex + 1, currentValue.length);
|
|
12705
12610
|
}
|
|
12706
12611
|
}
|
|
12707
|
-
|
|
12708
|
-
|
|
12612
|
+
if (typeof onClick === "function") {
|
|
12613
|
+
onClick(e);
|
|
12614
|
+
}
|
|
12615
|
+
}, [currentValue, inputRef, onClick]);
|
|
12616
|
+
var handleDoubleClick = React.useCallback(function () {
|
|
12709
12617
|
if (inputRef.current) {
|
|
12710
12618
|
var _inputRef$current8;
|
|
12711
12619
|
(_inputRef$current8 = inputRef.current) === null || _inputRef$current8 === void 0 ? void 0 : _inputRef$current8.select();
|
|
12712
12620
|
}
|
|
12621
|
+
}, [inputRef]);
|
|
12622
|
+
var inputProps = React.useMemo(function () {
|
|
12623
|
+
return {
|
|
12624
|
+
value: currentValue,
|
|
12625
|
+
onBlur: handleBlur,
|
|
12626
|
+
onKeyDown: handleKeyDown,
|
|
12627
|
+
onChange: handleChange,
|
|
12628
|
+
onClick: handleClick,
|
|
12629
|
+
onDoubleClick: handleDoubleClick
|
|
12630
|
+
};
|
|
12631
|
+
}, [currentValue, handleBlur, handleChange, handleClick, handleDoubleClick, handleKeyDown]);
|
|
12632
|
+
return {
|
|
12633
|
+
inputProps: inputProps,
|
|
12634
|
+
setCurrentValue: setCurrentValue,
|
|
12635
|
+
setPrevValue: setPrevValue
|
|
12713
12636
|
};
|
|
12714
|
-
|
|
12715
|
-
value: currentValue,
|
|
12716
|
-
onBlur: handleBlur,
|
|
12717
|
-
onKeyDown: handleKeyDown,
|
|
12718
|
-
onChange: handleChange,
|
|
12719
|
-
onClick: handleClick,
|
|
12720
|
-
onDoubleClick: handleDoubleClick,
|
|
12721
|
-
onEnterKeyPress: onEnterKeyPress
|
|
12722
|
-
};
|
|
12723
|
-
if (!children) {
|
|
12724
|
-
console.error("No children provided!");
|
|
12725
|
-
return null;
|
|
12726
|
-
}
|
|
12727
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].Children.map(children, function (child) {
|
|
12728
|
-
var el = child;
|
|
12729
|
-
if (el && el.type === EditableContent) {
|
|
12730
|
-
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
12731
|
-
ref: handleRef,
|
|
12732
|
-
inputProps: inputProps
|
|
12733
|
-
});
|
|
12734
|
-
}
|
|
12735
|
-
return /*#__PURE__*/React__default["default"].cloneElement(child, _objectSpread2({
|
|
12736
|
-
ref: handleRef
|
|
12737
|
-
}, inputProps));
|
|
12738
|
-
}));
|
|
12739
|
-
});
|
|
12740
|
-
HoursWrapper.displayName = "HoursWrapper";
|
|
12637
|
+
};
|
|
12741
12638
|
|
|
12742
|
-
var _excluded$
|
|
12639
|
+
var _excluded$H = ["value", "onCancel", "onSave", "onEnterKeyPress", "allowEmptyValue", "withLeadingZero", "validation", "incrementOnlySelected", "minuteIncrement", "className", "onChange", "onClick"];
|
|
12743
12640
|
var InputHours = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
12744
|
-
var
|
|
12641
|
+
var defaultValue = _ref.value,
|
|
12745
12642
|
onCancel = _ref.onCancel,
|
|
12746
12643
|
onSave = _ref.onSave,
|
|
12747
|
-
|
|
12644
|
+
externalEnterKeyPress = _ref.onEnterKeyPress,
|
|
12748
12645
|
allowEmptyValue = _ref.allowEmptyValue,
|
|
12749
12646
|
_ref$withLeadingZero = _ref.withLeadingZero,
|
|
12750
12647
|
withLeadingZero = _ref$withLeadingZero === void 0 ? true : _ref$withLeadingZero,
|
|
@@ -12755,32 +12652,50 @@
|
|
|
12755
12652
|
_ref$minuteIncrement = _ref.minuteIncrement,
|
|
12756
12653
|
minuteIncrement = _ref$minuteIncrement === void 0 ? 1 : _ref$minuteIncrement,
|
|
12757
12654
|
className = _ref.className,
|
|
12758
|
-
|
|
12655
|
+
externalOnChange = _ref.onChange,
|
|
12656
|
+
externalOnClick = _ref.onClick,
|
|
12657
|
+
rest = _objectWithoutProperties(_ref, _excluded$H);
|
|
12759
12658
|
var inputRef = React.useRef(null);
|
|
12760
12659
|
var handleRef = useForkRef(ref, inputRef);
|
|
12761
|
-
|
|
12660
|
+
var _useInputHours = useInputHours({
|
|
12661
|
+
value: defaultValue,
|
|
12662
|
+
withLeadingZero: withLeadingZero,
|
|
12663
|
+
onSave: onSave,
|
|
12664
|
+
validation: validation,
|
|
12665
|
+
allowEmptyValue: allowEmptyValue,
|
|
12666
|
+
onCancel: onCancel,
|
|
12667
|
+
minuteIncrement: minuteIncrement,
|
|
12668
|
+
incrementOnlySelected: incrementOnlySelected,
|
|
12669
|
+
onEnterKeyPress: externalEnterKeyPress,
|
|
12670
|
+
onChange: externalOnChange,
|
|
12671
|
+
onClick: externalOnClick
|
|
12672
|
+
}, inputRef),
|
|
12673
|
+
inputProps = _useInputHours.inputProps;
|
|
12674
|
+
var value = inputProps.value,
|
|
12675
|
+
onBlur = inputProps.onBlur,
|
|
12676
|
+
onKeyDown = inputProps.onKeyDown,
|
|
12677
|
+
onChange = inputProps.onChange,
|
|
12678
|
+
onClick = inputProps.onClick,
|
|
12679
|
+
onDoubleClick = inputProps.onDoubleClick;
|
|
12680
|
+
return /*#__PURE__*/React__default["default"].createElement(Input, _extends({}, rest, {
|
|
12681
|
+
className: className,
|
|
12682
|
+
placeholder: withLeadingZero ? "00:00" : "0:00",
|
|
12762
12683
|
value: value,
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
allowEmptyValue: allowEmptyValue,
|
|
12769
|
-
withLeadingZero: withLeadingZero,
|
|
12770
|
-
validation: validation,
|
|
12684
|
+
onBlur: onBlur,
|
|
12685
|
+
onKeyDown: onKeyDown,
|
|
12686
|
+
onChange: onChange,
|
|
12687
|
+
onClick: onClick,
|
|
12688
|
+
onDoubleClick: onDoubleClick,
|
|
12771
12689
|
ref: handleRef
|
|
12772
|
-
}
|
|
12773
|
-
className: className,
|
|
12774
|
-
placeholder: withLeadingZero ? "00:00" : "0:00"
|
|
12775
|
-
}, rest)));
|
|
12690
|
+
}));
|
|
12776
12691
|
});
|
|
12777
12692
|
InputHours.displayName = "InputHours";
|
|
12778
12693
|
|
|
12779
|
-
var _excluded$
|
|
12694
|
+
var _excluded$G = ["expanded"];
|
|
12780
12695
|
var ExpandAll = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12781
12696
|
var _ref$expanded = _ref.expanded,
|
|
12782
12697
|
expanded = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
12783
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12698
|
+
rest = _objectWithoutProperties(_ref, _excluded$G);
|
|
12784
12699
|
return /*#__PURE__*/React__default["default"].createElement(StyledExpand, _extends({
|
|
12785
12700
|
ref: ref,
|
|
12786
12701
|
viewBox: "0 0 24 24"
|
|
@@ -12898,14 +12813,14 @@
|
|
|
12898
12813
|
});
|
|
12899
12814
|
StyledTextarea.displayName = "StyledTextarea";
|
|
12900
12815
|
|
|
12901
|
-
var _excluded$
|
|
12816
|
+
var _excluded$F = ["className", "disabled", "invalid"];
|
|
12902
12817
|
var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12903
12818
|
var className = _ref.className,
|
|
12904
12819
|
_ref$disabled = _ref.disabled,
|
|
12905
12820
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12906
12821
|
_ref$invalid = _ref.invalid,
|
|
12907
12822
|
invalid = _ref$invalid === void 0 ? false : _ref$invalid,
|
|
12908
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12823
|
+
rest = _objectWithoutProperties(_ref, _excluded$F);
|
|
12909
12824
|
return /*#__PURE__*/React__default["default"].createElement(StyledTextarea, _extends({}, rest, {
|
|
12910
12825
|
$invalid: invalid,
|
|
12911
12826
|
ref: ref,
|
|
@@ -12937,7 +12852,7 @@
|
|
|
12937
12852
|
function () {});
|
|
12938
12853
|
}
|
|
12939
12854
|
|
|
12940
|
-
var _excluded$
|
|
12855
|
+
var _excluded$E = ["children", "disableFocusLock", "disableScrollLock", "disableBackgroundClick", "disableBackgroundColor", "disableCloseOnEsc", "open", "onClose", "onClickOutside"];
|
|
12941
12856
|
var getHasTransition = function getHasTransition(children) {
|
|
12942
12857
|
return children.props ? Object.prototype.hasOwnProperty.call(children.props, "in") : false;
|
|
12943
12858
|
};
|
|
@@ -12957,7 +12872,7 @@
|
|
|
12957
12872
|
defaultOpen = _ref$open === void 0 ? false : _ref$open,
|
|
12958
12873
|
onClose = _ref.onClose,
|
|
12959
12874
|
onClickOutside = _ref.onClickOutside,
|
|
12960
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12875
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
12961
12876
|
var _useState = React.useState(defaultOpen),
|
|
12962
12877
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12963
12878
|
open = _useState2[0],
|
|
@@ -13098,7 +13013,7 @@
|
|
|
13098
13013
|
});
|
|
13099
13014
|
StyledCssTransition.displayName = "StyledCssTransition";
|
|
13100
13015
|
|
|
13101
|
-
var _excluded$
|
|
13016
|
+
var _excluded$D = ["children", "onClose", "controls", "open", "animation", "position", "mode", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "disableBackgroundClick"];
|
|
13102
13017
|
var Sheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13103
13018
|
var children = _ref.children,
|
|
13104
13019
|
onClose = _ref.onClose,
|
|
@@ -13122,7 +13037,7 @@
|
|
|
13122
13037
|
bodyClassName = _ref.bodyClassName,
|
|
13123
13038
|
_ref$disableBackgroun2 = _ref.disableBackgroundClick,
|
|
13124
13039
|
disableBackgroundClick = _ref$disableBackgroun2 === void 0 ? false : _ref$disableBackgroun2,
|
|
13125
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13040
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
13126
13041
|
var _useState = React.useState(defaultOpen),
|
|
13127
13042
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13128
13043
|
open = _useState2[0],
|
|
@@ -13215,13 +13130,13 @@
|
|
|
13215
13130
|
});
|
|
13216
13131
|
StyledHeader.displayName = "StyledHeader";
|
|
13217
13132
|
|
|
13218
|
-
var _excluded$
|
|
13133
|
+
var _excluded$C = ["className", "size", "children"];
|
|
13219
13134
|
var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13220
13135
|
var className = _ref.className,
|
|
13221
13136
|
_ref$size = _ref.size,
|
|
13222
13137
|
size = _ref$size === void 0 ? "small" : _ref$size,
|
|
13223
13138
|
children = _ref.children,
|
|
13224
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13139
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
13225
13140
|
return /*#__PURE__*/React__default["default"].createElement(StyledHeader, _extends({
|
|
13226
13141
|
type: "paper-2",
|
|
13227
13142
|
className: classNames__default["default"]("c-header", className),
|
|
@@ -13237,7 +13152,7 @@
|
|
|
13237
13152
|
})(["white-space:pre-wrap;overflow-wrap:break-word;resize:none;"]);
|
|
13238
13153
|
StyledAutoResizeTextarea.displayName = "StyledAutoResizeTextarea";
|
|
13239
13154
|
|
|
13240
|
-
var _excluded$
|
|
13155
|
+
var _excluded$B = ["minRows", "maxRows", "lineHeight", "onChange", "className", "preventNewRowOnEnter", "cursorAtTextEnd", "onKeyDown", "value"];
|
|
13241
13156
|
var AutoResizeTextarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13242
13157
|
var _ref$minRows = _ref.minRows,
|
|
13243
13158
|
minRows = _ref$minRows === void 0 ? 1 : _ref$minRows,
|
|
@@ -13253,7 +13168,7 @@
|
|
|
13253
13168
|
cursorAtTextEnd = _ref$cursorAtTextEnd === void 0 ? false : _ref$cursorAtTextEnd,
|
|
13254
13169
|
onKeyDown = _ref.onKeyDown,
|
|
13255
13170
|
value = _ref.value,
|
|
13256
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13171
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
13257
13172
|
var innerRef = React.useRef(null);
|
|
13258
13173
|
var _useState = React.useState(minRows),
|
|
13259
13174
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -13529,7 +13444,7 @@
|
|
|
13529
13444
|
});
|
|
13530
13445
|
StyledChoose.displayName = "StyledChoose";
|
|
13531
13446
|
|
|
13532
|
-
var _excluded$
|
|
13447
|
+
var _excluded$A = ["children", "disabled", "active", "className"];
|
|
13533
13448
|
/**
|
|
13534
13449
|
* Choose component
|
|
13535
13450
|
*/
|
|
@@ -13540,7 +13455,7 @@
|
|
|
13540
13455
|
_ref$active = _ref.active,
|
|
13541
13456
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
13542
13457
|
className = _ref.className,
|
|
13543
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
13458
|
+
args = _objectWithoutProperties(_ref, _excluded$A);
|
|
13544
13459
|
return /*#__PURE__*/React__default["default"].createElement(StyledChoose, _extends({
|
|
13545
13460
|
disabled: disabled,
|
|
13546
13461
|
className: classNames__default["default"]("c-choose", className),
|
|
@@ -13636,21 +13551,21 @@
|
|
|
13636
13551
|
StyledLinkElements.displayName = "StyledLinkElements";
|
|
13637
13552
|
StyledLink.displayName = "StyledLink";
|
|
13638
13553
|
|
|
13639
|
-
var _excluded$
|
|
13554
|
+
var _excluded$z = ["children", "className"];
|
|
13640
13555
|
/**
|
|
13641
13556
|
* Back link component
|
|
13642
13557
|
*/
|
|
13643
13558
|
var BackLink = function BackLink(_ref) {
|
|
13644
13559
|
var children = _ref.children,
|
|
13645
13560
|
className = _ref.className,
|
|
13646
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
13561
|
+
args = _objectWithoutProperties(_ref, _excluded$z);
|
|
13647
13562
|
return /*#__PURE__*/React__default["default"].createElement(StyledBackLink, _extends({
|
|
13648
13563
|
className: classNames__default["default"]("c-back-link", className)
|
|
13649
13564
|
}, args), children);
|
|
13650
13565
|
};
|
|
13651
13566
|
BackLink.displayName = "BackLink";
|
|
13652
13567
|
|
|
13653
|
-
var _excluded$
|
|
13568
|
+
var _excluded$y = ["as", "children", "variant", "size", "disabled", "className"];
|
|
13654
13569
|
/**
|
|
13655
13570
|
* Link component
|
|
13656
13571
|
*/
|
|
@@ -13663,7 +13578,7 @@
|
|
|
13663
13578
|
_ref$disabled = _ref.disabled,
|
|
13664
13579
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
13665
13580
|
className = _ref.className,
|
|
13666
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
13581
|
+
args = _objectWithoutProperties(_ref, _excluded$y);
|
|
13667
13582
|
var Component = as || "a";
|
|
13668
13583
|
return /*#__PURE__*/React__default["default"].createElement(StyledLink, _extends({
|
|
13669
13584
|
ref: ref,
|
|
@@ -13774,7 +13689,7 @@
|
|
|
13774
13689
|
})(["padding:20px 30px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
13775
13690
|
StyledDialogActions.displayName = "StyledDialogActions";
|
|
13776
13691
|
|
|
13777
|
-
var _excluded$
|
|
13692
|
+
var _excluded$x = ["in", "children", "style", "timeout"];
|
|
13778
13693
|
var defaultStyle$1 = function defaultStyle(duration) {
|
|
13779
13694
|
return {
|
|
13780
13695
|
transition: "all ".concat(duration, "ms ease-in-out"),
|
|
@@ -13802,7 +13717,7 @@
|
|
|
13802
13717
|
style = _ref.style,
|
|
13803
13718
|
_ref$timeout = _ref.timeout,
|
|
13804
13719
|
timeout = _ref$timeout === void 0 ? 500 : _ref$timeout,
|
|
13805
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13720
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
13806
13721
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
|
|
13807
13722
|
appear: true,
|
|
13808
13723
|
in: inProp,
|
|
@@ -13817,7 +13732,7 @@
|
|
|
13817
13732
|
};
|
|
13818
13733
|
Fade.displayName = "Fade";
|
|
13819
13734
|
|
|
13820
|
-
var _excluded$
|
|
13735
|
+
var _excluded$w = ["in", "children", "style", "timeout", "initialDirection"];
|
|
13821
13736
|
var Slide = function Slide(_ref) {
|
|
13822
13737
|
var _ref$in = _ref.in,
|
|
13823
13738
|
inProp = _ref$in === void 0 ? false : _ref$in,
|
|
@@ -13827,7 +13742,7 @@
|
|
|
13827
13742
|
timeout = _ref$timeout === void 0 ? 300 : _ref$timeout,
|
|
13828
13743
|
_ref$initialDirection = _ref.initialDirection,
|
|
13829
13744
|
initialDirection = _ref$initialDirection === void 0 ? "left" : _ref$initialDirection,
|
|
13830
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13745
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
13831
13746
|
var directionSign;
|
|
13832
13747
|
switch (initialDirection) {
|
|
13833
13748
|
case "right":
|
|
@@ -13880,12 +13795,12 @@
|
|
|
13880
13795
|
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;}"]);
|
|
13881
13796
|
});
|
|
13882
13797
|
|
|
13883
|
-
var _excluded$
|
|
13798
|
+
var _excluded$v = ["children", "direction"];
|
|
13884
13799
|
var SlideLeftRightTransition = function SlideLeftRightTransition(_ref) {
|
|
13885
13800
|
var children = _ref.children,
|
|
13886
13801
|
_ref$direction = _ref.direction,
|
|
13887
13802
|
direction = _ref$direction === void 0 ? "left" : _ref$direction,
|
|
13888
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
13803
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
13889
13804
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.CSSTransition, _extends({
|
|
13890
13805
|
timeout: 200,
|
|
13891
13806
|
classNames: "c-slide",
|
|
@@ -13928,7 +13843,7 @@
|
|
|
13928
13843
|
};
|
|
13929
13844
|
ResizeTransition.displayName = "ResizeTransition";
|
|
13930
13845
|
|
|
13931
|
-
var _excluded$
|
|
13846
|
+
var _excluded$u = ["in", "children", "style", "timeout"];
|
|
13932
13847
|
var defaultStyle = function defaultStyle(duration) {
|
|
13933
13848
|
return {
|
|
13934
13849
|
transition: "all ".concat(duration, "ms ease-in"),
|
|
@@ -13962,7 +13877,7 @@
|
|
|
13962
13877
|
style = _ref.style,
|
|
13963
13878
|
_ref$timeout = _ref.timeout,
|
|
13964
13879
|
timeout = _ref$timeout === void 0 ? 200 : _ref$timeout,
|
|
13965
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13880
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
13966
13881
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, _extends({
|
|
13967
13882
|
appear: true,
|
|
13968
13883
|
in: inProp,
|
|
@@ -14012,13 +13927,13 @@
|
|
|
14012
13927
|
};
|
|
14013
13928
|
Scale.displayName = "Scale";
|
|
14014
13929
|
|
|
14015
|
-
var _excluded$
|
|
13930
|
+
var _excluded$t = ["className", "children"];
|
|
14016
13931
|
// import { useDialogContext } from "./DialogContext";
|
|
14017
13932
|
|
|
14018
13933
|
var DialogActions = function DialogActions(_ref) {
|
|
14019
13934
|
var className = _ref.className,
|
|
14020
13935
|
children = _ref.children,
|
|
14021
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13936
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
14022
13937
|
// useDialogContext();
|
|
14023
13938
|
|
|
14024
13939
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogActions, _extends({
|
|
@@ -14027,13 +13942,13 @@
|
|
|
14027
13942
|
};
|
|
14028
13943
|
DialogActions.displayName = "DialogActions";
|
|
14029
13944
|
|
|
14030
|
-
var _excluded$
|
|
13945
|
+
var _excluded$s = ["className", "children"];
|
|
14031
13946
|
// import { useDialogContext } from "./DialogContext";
|
|
14032
13947
|
|
|
14033
13948
|
var DialogContent = function DialogContent(_ref) {
|
|
14034
13949
|
var className = _ref.className,
|
|
14035
13950
|
children = _ref.children,
|
|
14036
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13951
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
14037
13952
|
// useDialogContext();
|
|
14038
13953
|
|
|
14039
13954
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogContent, _extends({
|
|
@@ -14054,7 +13969,7 @@
|
|
|
14054
13969
|
};
|
|
14055
13970
|
DialogContentDivider.displayName = "DialogContentDivider";
|
|
14056
13971
|
|
|
14057
|
-
var _excluded$
|
|
13972
|
+
var _excluded$r = ["children", "className", "disableDefaultHeading"];
|
|
14058
13973
|
// import { useDialogContext } from "./DialogContext";
|
|
14059
13974
|
|
|
14060
13975
|
var DialogTitle = function DialogTitle(_ref) {
|
|
@@ -14062,7 +13977,7 @@
|
|
|
14062
13977
|
className = _ref.className,
|
|
14063
13978
|
_ref$disableDefaultHe = _ref.disableDefaultHeading,
|
|
14064
13979
|
disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
|
|
14065
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13980
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
14066
13981
|
// useDialogContext();
|
|
14067
13982
|
|
|
14068
13983
|
return /*#__PURE__*/React__default["default"].createElement(StyledDialogTitle, _extends({
|
|
@@ -14071,7 +13986,7 @@
|
|
|
14071
13986
|
};
|
|
14072
13987
|
DialogTitle.displayName = "DialogTitle";
|
|
14073
13988
|
|
|
14074
|
-
var _excluded$
|
|
13989
|
+
var _excluded$q = ["children", "open", "onClose", "className", "enableBackgroundClick", "disableCloseOnEsc", "animate", "onClickOutside"];
|
|
14075
13990
|
var _Dialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14076
13991
|
var children = _ref.children,
|
|
14077
13992
|
_ref$open = _ref.open,
|
|
@@ -14085,7 +14000,7 @@
|
|
|
14085
14000
|
_ref$animate = _ref.animate,
|
|
14086
14001
|
animate = _ref$animate === void 0 ? "slide" : _ref$animate,
|
|
14087
14002
|
onClickOutside = _ref.onClickOutside,
|
|
14088
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14003
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
14089
14004
|
var animateDialog = function animateDialog() {
|
|
14090
14005
|
switch (animate) {
|
|
14091
14006
|
case "fade":
|
|
@@ -14334,7 +14249,7 @@
|
|
|
14334
14249
|
});
|
|
14335
14250
|
StyledPressed.displayName = "StyledPressed";
|
|
14336
14251
|
|
|
14337
|
-
var _excluded$
|
|
14252
|
+
var _excluded$p = ["children", "active", "className"];
|
|
14338
14253
|
/**
|
|
14339
14254
|
* Pressed wrapper for button component
|
|
14340
14255
|
* @deprecated
|
|
@@ -14344,7 +14259,7 @@
|
|
|
14344
14259
|
_ref$active = _ref.active,
|
|
14345
14260
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
14346
14261
|
className = _ref.className,
|
|
14347
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
14262
|
+
args = _objectWithoutProperties(_ref, _excluded$p);
|
|
14348
14263
|
return /*#__PURE__*/React__default["default"].createElement(StyledPressed, _extends({
|
|
14349
14264
|
active: active,
|
|
14350
14265
|
ref: ref,
|
|
@@ -14850,7 +14765,7 @@
|
|
|
14850
14765
|
StyledToastMessage.displayName = "StyledToastMessage";
|
|
14851
14766
|
StyledCloseSmallIcon.displayName = "StyledCloseSmallIcon";
|
|
14852
14767
|
|
|
14853
|
-
var _excluded$
|
|
14768
|
+
var _excluded$o = ["text", "type", "onClose", "dismissible", "dropShadow", "timeout"];
|
|
14854
14769
|
var ToastMessage = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14855
14770
|
var text = _ref.text,
|
|
14856
14771
|
type = _ref.type,
|
|
@@ -14861,7 +14776,7 @@
|
|
|
14861
14776
|
dropShadow = _ref$dropShadow === void 0 ? false : _ref$dropShadow,
|
|
14862
14777
|
_ref$timeout = _ref.timeout,
|
|
14863
14778
|
timeout = _ref$timeout === void 0 ? 0 : _ref$timeout,
|
|
14864
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14779
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
14865
14780
|
var handleOnClose = React.useCallback(function () {
|
|
14866
14781
|
if (typeof onClose === "function") {
|
|
14867
14782
|
onClose();
|
|
@@ -14909,7 +14824,7 @@
|
|
|
14909
14824
|
});
|
|
14910
14825
|
StyledValueButton.displayName = "StyledValueButton";
|
|
14911
14826
|
|
|
14912
|
-
var _excluded$
|
|
14827
|
+
var _excluded$n = ["active", "alwaysShowIcon", "icon", "label", "value"];
|
|
14913
14828
|
var ValueButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14914
14829
|
var _ref$active = _ref.active,
|
|
14915
14830
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
@@ -14918,7 +14833,7 @@
|
|
|
14918
14833
|
icon = _ref.icon,
|
|
14919
14834
|
label = _ref.label,
|
|
14920
14835
|
value = _ref.value,
|
|
14921
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
14836
|
+
args = _objectWithoutProperties(_ref, _excluded$n);
|
|
14922
14837
|
return /*#__PURE__*/React__default["default"].createElement(StyledValueButton, _extends({
|
|
14923
14838
|
className: "c-value-button"
|
|
14924
14839
|
}, args, {
|
|
@@ -14947,12 +14862,12 @@
|
|
|
14947
14862
|
})(["border:none;margin:0;padding:0;width:auto;overflow:visible;cursor:pointer;background:transparent;outline:none;color:inherit;font:inherit;line-height:inherit;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;&::-moz-focus-inner{border:0;padding:0;}"]);
|
|
14948
14863
|
StyledButton.displayName = "StyledButton";
|
|
14949
14864
|
|
|
14950
|
-
var _excluded$
|
|
14865
|
+
var _excluded$m = ["children", "type"];
|
|
14951
14866
|
var Trigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14952
14867
|
var children = _ref.children,
|
|
14953
14868
|
_ref$type = _ref.type,
|
|
14954
14869
|
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
14955
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14870
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
14956
14871
|
return /*#__PURE__*/React__default["default"].createElement(StyledButton, _extends({
|
|
14957
14872
|
ref: ref,
|
|
14958
14873
|
role: "button",
|
|
@@ -14998,7 +14913,7 @@
|
|
|
14998
14913
|
});
|
|
14999
14914
|
StyledCaretIcon.displayName = "StyledCaretIcon";
|
|
15000
14915
|
|
|
15001
|
-
var _excluded$
|
|
14916
|
+
var _excluded$l = ["children", "type", "size", "invalid", "open", "endAdornment", "typographyProps"];
|
|
15002
14917
|
var SelectTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15003
14918
|
var children = _ref.children,
|
|
15004
14919
|
_ref$type = _ref.type,
|
|
@@ -15011,7 +14926,7 @@
|
|
|
15011
14926
|
open = _ref$open === void 0 ? false : _ref$open,
|
|
15012
14927
|
endAdornment = _ref.endAdornment,
|
|
15013
14928
|
typographyProps = _ref.typographyProps,
|
|
15014
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
14929
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
15015
14930
|
return /*#__PURE__*/React__default["default"].createElement(StyledSelectTrigger, _extends({
|
|
15016
14931
|
ref: ref,
|
|
15017
14932
|
role: "button",
|
|
@@ -15058,11 +14973,11 @@
|
|
|
15058
14973
|
});
|
|
15059
14974
|
StyledToggle.displayName = "StyledToggle";
|
|
15060
14975
|
|
|
15061
|
-
var _excluded$
|
|
14976
|
+
var _excluded$k = ["hovered", "className"];
|
|
15062
14977
|
var Toggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15063
14978
|
var hovered = _ref.hovered,
|
|
15064
14979
|
className = _ref.className,
|
|
15065
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
14980
|
+
args = _objectWithoutProperties(_ref, _excluded$k);
|
|
15066
14981
|
return /*#__PURE__*/React__default["default"].createElement(StyledToggle, {
|
|
15067
14982
|
className: classNames__default["default"]("c-toggle", className),
|
|
15068
14983
|
$isHovered: hovered,
|
|
@@ -15166,7 +15081,7 @@
|
|
|
15166
15081
|
})(["color:var(--color-theme-700);"]);
|
|
15167
15082
|
ChipCloseIcon.displayName = "ChipCloseIcon";
|
|
15168
15083
|
|
|
15169
|
-
var _excluded$
|
|
15084
|
+
var _excluded$j = ["leftAdornment", "label", "onClose", "size", "color", "backgroundColor", "closeClassName", "variant", "typographyProps"];
|
|
15170
15085
|
var Chip = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
15171
15086
|
var leftAdornment = _ref.leftAdornment,
|
|
15172
15087
|
label = _ref.label,
|
|
@@ -15178,7 +15093,7 @@
|
|
|
15178
15093
|
closeClassName = _ref.closeClassName,
|
|
15179
15094
|
variant = _ref.variant,
|
|
15180
15095
|
typographyProps = _ref.typographyProps,
|
|
15181
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15096
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
15182
15097
|
var showClose = typeof onClose === "function";
|
|
15183
15098
|
var _variant = React.useMemo(function () {
|
|
15184
15099
|
if (typeof variant !== "undefined") {
|
|
@@ -15254,7 +15169,7 @@
|
|
|
15254
15169
|
return isFirst.current;
|
|
15255
15170
|
};
|
|
15256
15171
|
|
|
15257
|
-
var _excluded$
|
|
15172
|
+
var _excluded$i = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper", "onClose", "onClear"];
|
|
15258
15173
|
var ComboBox = function ComboBox(_ref) {
|
|
15259
15174
|
var _comboBoxRef$current2, _comboBoxRef$current3;
|
|
15260
15175
|
var _ref$options = _ref.options,
|
|
@@ -15287,7 +15202,7 @@
|
|
|
15287
15202
|
scrollWrapper = _ref.scrollWrapper,
|
|
15288
15203
|
onClose = _ref.onClose,
|
|
15289
15204
|
onClear = _ref.onClear,
|
|
15290
|
-
prop = _objectWithoutProperties(_ref, _excluded$
|
|
15205
|
+
prop = _objectWithoutProperties(_ref, _excluded$i);
|
|
15291
15206
|
var selectedName = React.useMemo(function () {
|
|
15292
15207
|
var value = "";
|
|
15293
15208
|
if (!selected) {
|
|
@@ -15691,11 +15606,11 @@
|
|
|
15691
15606
|
})(["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);
|
|
15692
15607
|
StyledAddToListButton.displayName = "StyledAddToListButton";
|
|
15693
15608
|
|
|
15694
|
-
var _excluded$
|
|
15609
|
+
var _excluded$h = ["text", "className"];
|
|
15695
15610
|
var AddToListButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15696
15611
|
var text = _ref.text,
|
|
15697
15612
|
className = _ref.className,
|
|
15698
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15613
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
15699
15614
|
return /*#__PURE__*/React__default["default"].createElement(StyledAddToListButton, _extends({
|
|
15700
15615
|
ref: ref,
|
|
15701
15616
|
className: classNames__default["default"]("c--add-to-list-btn", className)
|
|
@@ -15878,11 +15793,11 @@
|
|
|
15878
15793
|
};
|
|
15879
15794
|
ProgressRing.displayName = "ProgressRing";
|
|
15880
15795
|
|
|
15881
|
-
var _excluded$
|
|
15796
|
+
var _excluded$g = ["radius"];
|
|
15882
15797
|
var ProgressPie = function ProgressPie(_ref) {
|
|
15883
15798
|
var _ref$radius = _ref.radius,
|
|
15884
15799
|
radius = _ref$radius === void 0 ? 20 : _ref$radius,
|
|
15885
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15800
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
15886
15801
|
return /*#__PURE__*/React__default["default"].createElement(ProgressRing, _extends({}, rest, {
|
|
15887
15802
|
stroke: radius,
|
|
15888
15803
|
radius: radius
|
|
@@ -16206,7 +16121,7 @@
|
|
|
16206
16121
|
ThumbsDownIcon.displayName = "ThumbsDownIcon";
|
|
16207
16122
|
var ThumbsDownIcon$1 = ThumbsDownIcon;
|
|
16208
16123
|
|
|
16209
|
-
var _excluded$
|
|
16124
|
+
var _excluded$f = ["invalid", "required", "size", "children", "className", "weight", "htmlFor"];
|
|
16210
16125
|
var Label = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16211
16126
|
var _ref$invalid = _ref.invalid,
|
|
16212
16127
|
invalid = _ref$invalid === void 0 ? false : _ref$invalid,
|
|
@@ -16219,7 +16134,7 @@
|
|
|
16219
16134
|
_ref$weight = _ref.weight,
|
|
16220
16135
|
weight = _ref$weight === void 0 ? "bold" : _ref$weight,
|
|
16221
16136
|
htmlFor = _ref.htmlFor,
|
|
16222
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16137
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
16223
16138
|
var color = invalid ? "alert" : "primary";
|
|
16224
16139
|
var variant = size === "regular" ? "Body 2" : "Caption 1";
|
|
16225
16140
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
@@ -16236,6 +16151,88 @@
|
|
|
16236
16151
|
|
|
16237
16152
|
var GlobalStyle = styled.createGlobalStyle([":root{--color-primary:#5d2bff;--color-secondary:#5d2bff;--color-theme-100:#ffffff;--color-theme-200:#f6f6f9;--color-theme-300:#ebebee;--color-theme-400:#d7d7da;--color-theme-500:#b9b9bd;--color-theme-600:#89898e;--color-theme-700:#6d6d73;--color-theme-800:#5b5b61;--color-theme-900:#303037;--color-primary-200:rgba(93,43,255,0.05);--color-primary-300:rgba(93,43,255,0.1);--color-primary-400:rgba(93,43,255,0.25);--color-primary-500:rgba(93,43,255,0.5);--color-primary-600:rgba(93,43,255,0.75);--color-primary-700:#5d2bff;--color-primary-800:#4a21cd;--color-primary-900:#32178b;--color-secondary-200:rgba(93,43,255,0.05);--color-secondary-300:rgba(93,43,255,0.1);--color-secondary-400:rgba(93,43,255,0.25);--color-secondary-500:rgba(93,43,255,0.5);--color-secondary-600:rgba(93,43,255,0.75);--color-secondary-700:#5d2bff;--color-secondary-800:#4a21cd;--color-secondary-900:#32178b;--color-theme-transparent-200:rgba(36,36,76,0.04);--color-theme-transparent-300:rgba(48,48,55,0.1);--color-theme-transparent-400:rgba(48,48,55,0.2);--color-theme-transparent-500:rgba(48,48,55,0.34);--color-theme-transparent-600:rgba(48,48,55,0.57);--color-theme-transparent-700:rgba(48,48,55,0.7);--color-theme-transparent-800:rgba(48,48,55,0.8);--color-primary-opaque-300:#efeaff;--color-primary-opaque-400:#d6caff;--color-secondary-opaque-300:#efeaff;--color-secondary-opaque-400:#d6caff;--color-sucess-green:#64cd93;--color-pale-green:#c3e799;--body-bg-main:rgb(244,245,247);--body-bg-main-transparent:rgba(244,245,247,0);--page-paper-main:#ffffff;--border-primary:#d7d7da;--note-bg:#fff9f1;--shadow-primary-hover:0 64px 64px 0 rgba(0,0,0,0.1),0 32px 32px 0 rgba(0,0,0,0.06),0 16px 16px 0 rgba(0,0,0,0.04),0 4px 4px 0 rgba(0,0,0,0.04),0 2px 2px 0 rgba(0,0,0,0.04);--shadow-primary:0 64px 64px 0 rgba(0,0,0,0.06),0 32px 32px 0 rgba(0,0,0,0.03),0 16px 16px 0 rgba(0,0,0,0.02),0 4px 4px 0 rgba(0,0,0,0.02),0 2px 2px 0 rgba(0,0,0,0.02);--shadow-secondary:0 4px 14px 0 rgba(0,0,0,0.17);--shadow-tertiary:0 4px 6px -2px rgba(0,0,0,0.05),0 10px 15px -3px rgba(0,0,0,0.1);--shadow-tertiary-hover:0 4px 10px -2px rgba(0,0,0,0.1),0 12px 20px -3px rgba(0,0,0,0.2);--page-paper-main-shadow:rgba( 255,255,255,0 );--modal-background:rgba(244,245,247,0.6);--highlight-dark:rgba(0,0,0,0.03);--input-background-color:#ffffff;--red-alert:rgb(237,97,97);-- --warning:#ffcc6b;--only-white:#ffffff;--only-black:#000000;--ac-br-4:4px;--ac-br-6:6px;--ac-br-8:8px;--ac-br-rounded:999px;}.cupcake{--color-primary:#29bcdd;--color-secondary:#fe6fa7;--color-primary-200:rgba(41,188,221,0.07);--color-primary-300:rgba(41,188,221,0.12);--color-primary-400:rgba(41,188,221,0.26);--color-primary-500:rgba(41,188,221,0.52);--color-primary-600:rgba(41,188,221,0.75);--color-primary-700:#29bcdd;--color-primary-800:#219fbb;--color-primary-900:#1a768b;--color-secondary-200:rgba(254,111,167,0.07);--color-secondary-300:rgba(254,111,167,0.13);--color-secondary-400:rgba(254,111,167,0.27);--color-secondary-500:rgba(254,111,167,0.52);--color-secondary-600:rgba(254,111,167,0.75);--color-secondary-700:#fe6fa7;--color-secondary-800:#dd6091;--color-secondary-900:#ab496f;--color-primary-opaque-300:#e5f7fb;--color-primary-opaque-400:#c8eef6;--color-secondary-opaque-300:#ffecf4;--color-secondary-opaque-400:#ffd8e7;}.classic{--color-primary:#4182f2;--color-secondary:#4182f2;--color-primary-200:rgba(65,130,242,0.07);--color-primary-300:rgba(65,130,242,0.13);--color-primary-400:rgba(65,130,242,0.26);--color-primary-500:rgba(65,130,242,0.52);--color-primary-600:rgba(65,130,242,0.75);--color-primary-700:#4182f2;--color-primary-800:#356bc8;--color-primary-900:#244a8a;--color-secondary-200:rgba(65,130,242,0.07);--color-secondary-300:rgba(65,130,242,0.13);--color-secondary-400:rgba(65,130,242,0.26);--color-secondary-500:rgba(65,130,242,0.52);--color-secondary-600:rgba(65,130,242,0.75);--color-secondary-700:#4182f2;--color-secondary-800:#356bc8;--color-secondary-900:#244a8a;--color-primary-opaque-300:#e6effd;--color-primary-opaque-400:#cedffc;--color-secondary-opaque-300:#e6effd;--color-secondary-opaque-400:#cedffc;}.neon{--color-primary:#67ffc8;--color-secondary:#67ffc8;--color-theme-100:#000000;--color-theme-200:#31333e;--color-theme-300:#2b2d37;--color-theme-400:#1f2024;--color-theme-500:#6D6D73;--color-theme-600:#89898e;--color-theme-700:#b0b0b5;--color-theme-800:#dfdfe5;--color-theme-900:#ffffff;--color-primary-200:rgba(103,255,200,0.05);--color-primary-300:rgba(103,255,200,0.1);--color-primary-400:rgba(103,255,200,0.25);--color-primary-500:rgba(103,255,200,0.5);--color-primary-600:rgba(103,255,200,0.75);--color-primary-700:#67ffc8;--color-primary-800:#a5ffdf;--color-primary-900:#d0fdec;--color-secondary-200:rgba(103,255,200,0.05);--color-secondary-300:rgba(103,255,200,0.1);--color-secondary-400:rgba(103,255,200,0.25);--color-secondary-500:rgba(103,255,200,0.5);--color-secondary-600:rgba(103,255,200,0.75);--color-secondary-700:#67ffc8;--color-secondary-800:#a5ffdf;--color-secondary-900:#d0fdec;--color-theme-transparent-200:rgba(6,7,8,0.12);--color-theme-transparent-300:rgba(6,7,8,0.22);--color-theme-transparent-400:rgba(6,7,8,0.5);--color-theme-transparent-500:rgba(255,255,255,0.27);--color-theme-transparent-600:rgba(255,255,255,0.4);--color-theme-transparent-700:rgba(255,255,255,0.6);--color-theme-transparent-800:rgba(255,255,255,0.85);--color-primary-opaque-300:#3b4e51;--color-primary-opaque-400:#436b64;--color-secondary-opaque-300:#3b4e51;--color-secondary-opaque-400:#436b64;--body-bg-main:rgb(44,46,56);--body-bg-main-transparent:rgba(44,46,56,0);--page-paper-main:#373a44;--border-primary:#1f2024;--note-bg:#464545;--shadow-primary-hover:0 64px 64px 0 rgba(0,0,0,0.2),0 32px 32px 0 rgba(0,0,0,0.2),0 16px 16px 0 rgba(0,0,0,0.2),0 4px 4px 0 rgba(0,0,0,0.2),0 2px 2px 0 rgba(0,0,0,0.2);--shadow-primary:0 64px 64px 0 rgba(0,0,0,0.1),0 32px 32px 0 rgba(0,0,0,0.1),0 16px 16px 0 rgba(0,0,0,0.1),0 4px 4px 0 rgba(0,0,0,0.1),0 2px 2px 0 rgba(0,0,0,0.1);--shadow-secondary:0 4px 14px 0 rgba(0,0,0,0.3);--shadow-tertiary:0 4px 6px -2px rgba(0,0,0,0.1),0 10px 15px -3px rgba(0,0,0,0.15);--shadow-tertiary-hover:0 4px 12px -2px rgba(0,0,0,0.4),0 10px 30px -3px rgba(0,0,0,0.5);--page-paper-main-shadow:rgba( 55,58,68,0 );--modal-background:rgba(44,46,56,0.7);--highlight-dark:rgba(0,0,0,0.06);--input-background-color:#2c2e38;--only-white:#ffffff;--only-black:#000000;}html{color-scheme:light;}html{&.neon{color-scheme:dark;}}.ac-shadow,.ac-shadow--raised{&--lg{box-shadow:var(--shadow-primary);}&--sm{box-shadow:var(--shadow-tertiary);}}.ac-shadow--raised{&--lg{transition:box-shadow 0.3s;&:hover{box-shadow:var(--shadow-primary-hover);}}&--sm{transition:box-shadow 0.3s;&:hover{box-shadow:var(--shadow-tertiary-hover);}}}.ac-shadow-optimized--sm{position:relative;box-shadow:var(--shadow-tertiary);&::before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";box-shadow:var(--shadow-tertiary);opacity:0;border-radius:var(--ac-br-6);transition:opacity 0.3s ease;z-index:-1;}@media (hover:hover){&:hover::before{opacity:1;}}}.ac-shadow-optimized--lg{position:relative;box-shadow:var(--shadow-primary);&::before{position:absolute;top:0;left:0;width:100%;height:100%;content:\"\";box-shadow:var(--shadow-primary);opacity:0;border-radius:var(--ac-br-8);transition:opacity 0.3s ease;z-index:-1;}@media (hover:hover){&:hover::before{opacity:1;}}}.ac-border-radius{&-4{border-radius:var(--ac-br-4);}&-6{border-radius:var(--ac-br-6);}&-8{border-radius:var(--ac-br-8);}&-rounded{border-radius:var(--ac-br-rounded);}}.c-cooltip{position:relative;--cooltip-spacing:0.5rem;--cooltip-padding:0.25rem 0.625rem;--cooltip-max-width:12.5rem;--cooltip-transition-duration:0.15s,0.1s,0.15s;--cooltip-transition-delay:0.6s;--cooltip-timing:ease,ease,cubic-bezier(0.39,0.575,0.565,1);}.c-cooltip::after{pointer-events:none;content:attr(data-tooltip);position:absolute;color:#fff;opacity:0;background-color:rgba(0,0,0,0.9);border-radius:0.5rem;font-size:0.75rem;font-weight:500;line-height:1.3;max-width:var(--cooltip-max-width);padding:var(--cooltip-padding);text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.c-cooltip--top::after{bottom:calc(100% + var(--cooltip-spacing));left:50%;transform:scale(0.85) translateX(-50%);transform-origin:0;}.c-cooltip--right::after{left:calc(100% + var(--cooltip-spacing));transform:scale(0.85);}.c-cooltip--bottom::after{top:calc(100% + var(--cooltip-spacing));left:50%;transform:scale(0.85) translateX(-50%);transform-origin:0;}.c-cooltip--left::after{right:calc(100% + var(--cooltip-spacing));transform:scale(0.85);}.c-cooltip:disabled::after,[aria-pressed=\"true\"]::after{display:none;}@media (hover:hover){.c-cooltip--top:not(:focus):hover::after,.c-cooltip--bottom:not(:focus):hover::after{transition-property:opacity,transform;transition-duration:var(--cooltip-transition-duration);transition-delay:var(--cooltip-transition-delay);transition-timing-function:var(--cooltip-timing);transform:scale(1) translateX(-50%);opacity:1;}.c-cooltip--right:not(:focus):hover::after,.c-cooltip--left:not(:focus):hover::after{transition-property:opacity,transform;transition-duration:var(--cooltip-transition-duration);transition-delay:var(--cooltip-transition-delay);transition-timing-function:var(--cooltip-timing);transform:scale(1);opacity:1;}}"]);
|
|
16238
16153
|
|
|
16154
|
+
var StyledDiv = styled__default["default"].div.withConfig({
|
|
16155
|
+
displayName: "Styles__StyledDiv",
|
|
16156
|
+
componentId: "sc-1wapx2a-0"
|
|
16157
|
+
})(["", " ", " ", ""], FontStyle, BoxSizingStyle, {
|
|
16158
|
+
"position": "relative",
|
|
16159
|
+
"display": "inline-block",
|
|
16160
|
+
"maxWidth": "100%"
|
|
16161
|
+
});
|
|
16162
|
+
var StyledSpan = styled__default["default"](Typography).withConfig({
|
|
16163
|
+
displayName: "Styles__StyledSpan",
|
|
16164
|
+
componentId: "sc-1wapx2a-1"
|
|
16165
|
+
})(["visibility:hidden;display:block;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;position:relative;border:1px solid transparent;border-radius:6px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:pre;font-variant-numeric:tabular-nums;", " &:empty:before{content:\" \";}"], function (_ref) {
|
|
16166
|
+
var $disabled = _ref.$disabled;
|
|
16167
|
+
return $disabled && styled.css(["visibility:visible;"]);
|
|
16168
|
+
});
|
|
16169
|
+
StyledSpan.displayName = "StyledSpan";
|
|
16170
|
+
var StyledInput$1 = styled__default["default"](Typography).withConfig({
|
|
16171
|
+
displayName: "Styles__StyledInput",
|
|
16172
|
+
componentId: "sc-1wapx2a-2"
|
|
16173
|
+
})(["", " background-color:inherit;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;text-overflow:ellipsis;font-variant-numeric:tabular-nums;&:focus-whitin{text-overflow:clip;}outline-width:0px;outline:none;&:disabled{display:none;}"], {
|
|
16174
|
+
"position": "absolute",
|
|
16175
|
+
"inset": "0px",
|
|
16176
|
+
"boxSizing": "border-box",
|
|
16177
|
+
"width": "100%",
|
|
16178
|
+
"overflow": "hidden",
|
|
16179
|
+
"whiteSpace": "nowrap",
|
|
16180
|
+
"borderRadius": "0.375rem",
|
|
16181
|
+
"borderWidth": "1px",
|
|
16182
|
+
"borderStyle": "solid",
|
|
16183
|
+
"borderColor": "transparent",
|
|
16184
|
+
":focus-within": {
|
|
16185
|
+
"overflow": "scroll",
|
|
16186
|
+
"borderColor": "var(--color-theme-700)"
|
|
16187
|
+
},
|
|
16188
|
+
":hover": {
|
|
16189
|
+
"borderColor": "var(--color-theme-700)"
|
|
16190
|
+
}
|
|
16191
|
+
});
|
|
16192
|
+
StyledInput$1.displayName = "StyledInput";
|
|
16193
|
+
|
|
16194
|
+
var _excluded$e = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef", "children"];
|
|
16195
|
+
var EditableContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16196
|
+
var className = _ref.className,
|
|
16197
|
+
_ref$variant = _ref.variant,
|
|
16198
|
+
variant = _ref$variant === void 0 ? "Body 2" : _ref$variant,
|
|
16199
|
+
weight = _ref.weight,
|
|
16200
|
+
_ref$disabled = _ref.disabled,
|
|
16201
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
16202
|
+
inputProps = _ref.inputProps,
|
|
16203
|
+
wrapRef = _ref.wrapRef,
|
|
16204
|
+
children = _ref.children,
|
|
16205
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
16206
|
+
var intInputRef = React.useRef(null);
|
|
16207
|
+
var handleRef = useForkRef(ref, intInputRef);
|
|
16208
|
+
var handleBlur = React.useCallback(function (evt) {
|
|
16209
|
+
if (intInputRef !== null && intInputRef !== void 0 && intInputRef.current) {
|
|
16210
|
+
intInputRef.current.scrollLeft = 0;
|
|
16211
|
+
}
|
|
16212
|
+
typeof (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur) === "function" && (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur(evt));
|
|
16213
|
+
}, [inputProps]);
|
|
16214
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledDiv, _extends({
|
|
16215
|
+
className: className,
|
|
16216
|
+
ref: wrapRef
|
|
16217
|
+
}, props), /*#__PURE__*/React__default["default"].createElement(StyledSpan, {
|
|
16218
|
+
variant: variant,
|
|
16219
|
+
forwardedAs: "span",
|
|
16220
|
+
weight: weight,
|
|
16221
|
+
$disabled: disabled,
|
|
16222
|
+
className: "presentation"
|
|
16223
|
+
}, children ? children : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value), /*#__PURE__*/React__default["default"].createElement(StyledInput$1, _extends({}, inputProps, {
|
|
16224
|
+
ref: handleRef,
|
|
16225
|
+
forwardedAs: "input",
|
|
16226
|
+
variant: variant,
|
|
16227
|
+
weight: weight,
|
|
16228
|
+
value: inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
16229
|
+
onBlur: handleBlur,
|
|
16230
|
+
disabled: disabled,
|
|
16231
|
+
"data-form-type": "other"
|
|
16232
|
+
})));
|
|
16233
|
+
});
|
|
16234
|
+
EditableContent.displayName = "EditableContent";
|
|
16235
|
+
|
|
16239
16236
|
var _excluded$d = ["onSave", "onCancel", "value", "inputProps", "allowEmptyString"];
|
|
16240
16237
|
var EditableText = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
16241
16238
|
var onSave = _ref.onSave,
|
|
@@ -16301,41 +16298,104 @@
|
|
|
16301
16298
|
});
|
|
16302
16299
|
EditableText.displayName = "EditableText";
|
|
16303
16300
|
|
|
16304
|
-
var _excluded$c = ["value", "onCancel", "onSave", "allowEmptyValue", "withLeadingZero", "validation", "incrementOnlySelected", "minuteIncrement", "className", "inputProps"];
|
|
16305
|
-
var
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
|
|
16301
|
+
var _excluded$c = ["value", "onCancel", "onSave", "allowEmptyValue", "withLeadingZero", "validation", "incrementOnlySelected", "minuteIncrement", "className", "onEnterKeyPress", "inputProps", "onClick", "ticking", "onFocus"];
|
|
16302
|
+
var StyledEditableContent = styled__default["default"](EditableContent).withConfig({
|
|
16303
|
+
displayName: "EditableHours__StyledEditableContent",
|
|
16304
|
+
componentId: "sc-nvi34j-0"
|
|
16305
|
+
})(["", ""], function (_ref) {
|
|
16306
|
+
var $ticking = _ref.$ticking;
|
|
16307
|
+
return $ticking && styled.css([".presentation{visibility:visible;}input{opacity:0;}"]);
|
|
16308
|
+
});
|
|
16309
|
+
var EditableHours = /*#__PURE__*/React__default["default"].forwardRef(function (_ref2, ref) {
|
|
16310
|
+
var defaultValue = _ref2.value,
|
|
16311
|
+
onCancel = _ref2.onCancel,
|
|
16312
|
+
onSave = _ref2.onSave,
|
|
16313
|
+
allowEmptyValue = _ref2.allowEmptyValue,
|
|
16314
|
+
_ref2$withLeadingZero = _ref2.withLeadingZero,
|
|
16315
|
+
withLeadingZero = _ref2$withLeadingZero === void 0 ? true : _ref2$withLeadingZero,
|
|
16316
|
+
_ref2$validation = _ref2.validation,
|
|
16317
|
+
validation = _ref2$validation === void 0 ? validateTimeInput : _ref2$validation,
|
|
16318
|
+
_ref2$incrementOnlySe = _ref2.incrementOnlySelected,
|
|
16319
|
+
incrementOnlySelected = _ref2$incrementOnlySe === void 0 ? false : _ref2$incrementOnlySe,
|
|
16320
|
+
_ref2$minuteIncrement = _ref2.minuteIncrement,
|
|
16321
|
+
minuteIncrement = _ref2$minuteIncrement === void 0 ? 1 : _ref2$minuteIncrement,
|
|
16322
|
+
className = _ref2.className,
|
|
16323
|
+
externalEnterKeyPress = _ref2.onEnterKeyPress,
|
|
16324
|
+
externalInputProps = _ref2.inputProps,
|
|
16325
|
+
externalOnClick = _ref2.onClick,
|
|
16326
|
+
ticking = _ref2.ticking,
|
|
16327
|
+
onFocus = _ref2.onFocus,
|
|
16328
|
+
rest = _objectWithoutProperties(_ref2, _excluded$c);
|
|
16321
16329
|
var inputRef = React.useRef(null);
|
|
16322
16330
|
var handleRef = useForkRef(ref, inputRef);
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16331
|
+
var _useInputHours = useInputHours({
|
|
16332
|
+
value: defaultValue,
|
|
16333
|
+
withLeadingZero: withLeadingZero,
|
|
16334
|
+
onSave: onSave,
|
|
16335
|
+
validation: validation,
|
|
16336
|
+
allowEmptyValue: allowEmptyValue,
|
|
16337
|
+
onCancel: onCancel,
|
|
16338
|
+
minuteIncrement: minuteIncrement,
|
|
16339
|
+
incrementOnlySelected: incrementOnlySelected,
|
|
16340
|
+
onEnterKeyPress: externalEnterKeyPress,
|
|
16341
|
+
onClick: externalOnClick
|
|
16342
|
+
}, inputRef),
|
|
16343
|
+
inputProps = _useInputHours.inputProps,
|
|
16344
|
+
setCurrentValue = _useInputHours.setCurrentValue,
|
|
16345
|
+
setPrevValue = _useInputHours.setPrevValue;
|
|
16346
|
+
var value = inputProps.value,
|
|
16347
|
+
onBlur = inputProps.onBlur,
|
|
16348
|
+
onKeyDown = inputProps.onKeyDown,
|
|
16349
|
+
onChange = inputProps.onChange,
|
|
16350
|
+
onClick = inputProps.onClick,
|
|
16351
|
+
onDoubleClick = inputProps.onDoubleClick;
|
|
16352
|
+
React.useEffect(function () {
|
|
16353
|
+
var _value;
|
|
16354
|
+
if (defaultValue !== undefined) {
|
|
16355
|
+
_value = decimalToHours(defaultValue, withLeadingZero);
|
|
16356
|
+
}
|
|
16357
|
+
setCurrentValue(function (prevState) {
|
|
16358
|
+
if (prevState !== _value) {
|
|
16359
|
+
return _value;
|
|
16360
|
+
}
|
|
16361
|
+
return prevState;
|
|
16362
|
+
});
|
|
16363
|
+
setPrevValue(function (prevState) {
|
|
16364
|
+
if (prevState !== _value) {
|
|
16365
|
+
return _value;
|
|
16366
|
+
}
|
|
16367
|
+
return prevState;
|
|
16368
|
+
});
|
|
16369
|
+
}, [defaultValue, setCurrentValue, setPrevValue, withLeadingZero]);
|
|
16370
|
+
var splitTime = React.useMemo(function () {
|
|
16371
|
+
if (value && ticking) {
|
|
16372
|
+
var _value$split = value.split(":"),
|
|
16373
|
+
_value$split2 = _slicedToArray(_value$split, 2),
|
|
16374
|
+
hours = _value$split2[0],
|
|
16375
|
+
minutes = _value$split2[1];
|
|
16376
|
+
return {
|
|
16377
|
+
hours: hours,
|
|
16378
|
+
minutes: minutes
|
|
16379
|
+
};
|
|
16380
|
+
}
|
|
16381
|
+
}, [value, ticking]);
|
|
16382
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledEditableContent, _extends({
|
|
16333
16383
|
ref: handleRef,
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
|
|
16337
|
-
|
|
16338
|
-
|
|
16384
|
+
className: className,
|
|
16385
|
+
inputProps: _objectSpread2(_objectSpread2({}, externalInputProps), {}, {
|
|
16386
|
+
value: value,
|
|
16387
|
+
onBlur: onBlur,
|
|
16388
|
+
onKeyDown: onKeyDown,
|
|
16389
|
+
onChange: onChange,
|
|
16390
|
+
onClick: onClick,
|
|
16391
|
+
onDoubleClick: onDoubleClick,
|
|
16392
|
+
onFocus: onFocus,
|
|
16393
|
+
type: "text"
|
|
16394
|
+
}),
|
|
16395
|
+
$ticking: ticking
|
|
16396
|
+
}, rest), ticking && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, splitTime === null || splitTime === void 0 ? void 0 : splitTime.hours, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
16397
|
+
className: "tw-animate-ping"
|
|
16398
|
+
}, ":"), splitTime === null || splitTime === void 0 ? void 0 : splitTime.minutes));
|
|
16339
16399
|
});
|
|
16340
16400
|
EditableHours.displayName = "EditableHours";
|
|
16341
16401
|
|