@activecollab/components 2.0.16 → 2.0.18
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/EditableCurrency/EditableCurrency.js +38 -18
- package/dist/cjs/components/EditableCurrency/EditableCurrency.js.map +1 -1
- package/dist/cjs/components/Input/InputCurrency.js.map +1 -1
- package/dist/cjs/components/Input/InputNumber.js +35 -18
- package/dist/cjs/components/Input/InputNumber.js.map +1 -1
- package/dist/cjs/components/Input/index.js +22 -0
- package/dist/cjs/components/Input/index.js.map +1 -1
- package/dist/cjs/hooks/useInputNumber.js +152 -97
- package/dist/cjs/hooks/useInputNumber.js.map +1 -1
- package/dist/cjs/utils/currencyUtils.js +2 -2
- package/dist/cjs/utils/currencyUtils.js.map +1 -1
- package/dist/cjs/utils/currencyUtils.test.js +2 -2
- package/dist/cjs/utils/currencyUtils.test.js.map +1 -1
- package/dist/cjs/utils/index.js +3 -3
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/validation.js +19 -1
- package/dist/cjs/utils/validation.js.map +1 -1
- package/dist/esm/components/EditableCurrency/EditableCurrency.d.ts +6 -2
- package/dist/esm/components/EditableCurrency/EditableCurrency.d.ts.map +1 -1
- package/dist/esm/components/EditableCurrency/EditableCurrency.js +39 -17
- package/dist/esm/components/EditableCurrency/EditableCurrency.js.map +1 -1
- package/dist/esm/components/Input/InputCurrency.d.ts +2 -3
- package/dist/esm/components/Input/InputCurrency.d.ts.map +1 -1
- package/dist/esm/components/Input/InputCurrency.js.map +1 -1
- package/dist/esm/components/Input/InputNumber.d.ts +4 -1
- package/dist/esm/components/Input/InputNumber.d.ts.map +1 -1
- package/dist/esm/components/Input/InputNumber.js +36 -17
- package/dist/esm/components/Input/InputNumber.js.map +1 -1
- package/dist/esm/components/Input/index.d.ts +2 -0
- package/dist/esm/components/Input/index.d.ts.map +1 -1
- package/dist/esm/components/Input/index.js +22 -0
- package/dist/esm/components/Input/index.js.map +1 -1
- package/dist/esm/hooks/useInputNumber.d.ts +26 -13
- package/dist/esm/hooks/useInputNumber.d.ts.map +1 -1
- package/dist/esm/hooks/useInputNumber.js +132 -90
- package/dist/esm/hooks/useInputNumber.js.map +1 -1
- package/dist/esm/utils/currencyUtils.d.ts +1 -1
- package/dist/esm/utils/currencyUtils.d.ts.map +1 -1
- package/dist/esm/utils/currencyUtils.js +3 -3
- package/dist/esm/utils/currencyUtils.js.map +1 -1
- package/dist/esm/utils/currencyUtils.test.js +2 -2
- package/dist/esm/utils/currencyUtils.test.js.map +1 -1
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/utils/index.d.ts.map +1 -1
- package/dist/esm/utils/index.js +3 -3
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/validation.d.ts +1 -0
- package/dist/esm/utils/validation.d.ts.map +1 -1
- package/dist/esm/utils/validation.js +20 -1
- package/dist/esm/utils/validation.js.map +1 -1
- package/dist/index.js +420 -244
- 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
|
@@ -105,6 +105,9 @@
|
|
|
105
105
|
};
|
|
106
106
|
return _extends.apply(this, arguments);
|
|
107
107
|
}
|
|
108
|
+
function _objectDestructuringEmpty(obj) {
|
|
109
|
+
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
110
|
+
}
|
|
108
111
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
109
112
|
if (source == null) return {};
|
|
110
113
|
var target = {};
|
|
@@ -199,7 +202,7 @@
|
|
|
199
202
|
})(["display:inline-flex;svg{margin:0 4px;}"]);
|
|
200
203
|
StyledButtonElement.displayName = "StyledButtonElement";
|
|
201
204
|
|
|
202
|
-
var _excluded$
|
|
205
|
+
var _excluded$1r = ["children", "active", "variant", "size", "className"];
|
|
203
206
|
/**
|
|
204
207
|
* @component Button
|
|
205
208
|
* @description
|
|
@@ -229,7 +232,7 @@
|
|
|
229
232
|
_ref$size = _ref.size,
|
|
230
233
|
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
231
234
|
className = _ref.className,
|
|
232
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
235
|
+
args = _objectWithoutProperties(_ref, _excluded$1r);
|
|
233
236
|
return /*#__PURE__*/React__default["default"].createElement(StyledButton$2, _extends({
|
|
234
237
|
className: classNames__default["default"]("c-btn", className, {
|
|
235
238
|
"c-btn--contained": variant === "primary" || variant === "contained",
|
|
@@ -303,12 +306,12 @@
|
|
|
303
306
|
AddCrossTinyIcon.displayName = "AddCrossTinyIcon";
|
|
304
307
|
var AddCrossTinyIcon$1 = AddCrossTinyIcon;
|
|
305
308
|
|
|
306
|
-
var _excluded$
|
|
309
|
+
var _excluded$1q = ["className", "disabled"];
|
|
307
310
|
var GlobalAddButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
308
311
|
var className = _ref.className,
|
|
309
312
|
_ref$disabled = _ref.disabled,
|
|
310
313
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
311
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
314
|
+
rest = _objectWithoutProperties(_ref, _excluded$1q);
|
|
312
315
|
return /*#__PURE__*/React__default["default"].createElement(StyledGlobalAddButton, _extends({
|
|
313
316
|
ref: ref,
|
|
314
317
|
variant: "contained",
|
|
@@ -340,11 +343,11 @@
|
|
|
340
343
|
});
|
|
341
344
|
StyledButtonGroup$1.displayName = "StyledButtonGroup";
|
|
342
345
|
|
|
343
|
-
var _excluded$
|
|
346
|
+
var _excluded$1p = ["children", "className"];
|
|
344
347
|
var ButtonGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
345
348
|
var children = _ref.children,
|
|
346
349
|
className = _ref.className,
|
|
347
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
350
|
+
rest = _objectWithoutProperties(_ref, _excluded$1p);
|
|
348
351
|
return /*#__PURE__*/React__default["default"].createElement(StyledButtonGroup$1, _extends({
|
|
349
352
|
ref: ref,
|
|
350
353
|
className: classNames__default["default"]("c-btn-group", className)
|
|
@@ -368,11 +371,11 @@
|
|
|
368
371
|
})(["border-top:1px solid var(--border-primary);margin:12px 16px;height:1px;"]);
|
|
369
372
|
StyledListSeparator.displayName = "StyledListSeparator";
|
|
370
373
|
|
|
371
|
-
var _excluded$
|
|
374
|
+
var _excluded$1o = ["children", "className"];
|
|
372
375
|
var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
373
376
|
var children = _ref.children,
|
|
374
377
|
className = _ref.className,
|
|
375
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
378
|
+
props = _objectWithoutProperties(_ref, _excluded$1o);
|
|
376
379
|
return /*#__PURE__*/React__default["default"].createElement(StyledListItem, _extends({
|
|
377
380
|
className: classNames__default["default"]("c-list-item", className),
|
|
378
381
|
ref: ref,
|
|
@@ -381,21 +384,21 @@
|
|
|
381
384
|
});
|
|
382
385
|
ListItem.displayName = "ListItem";
|
|
383
386
|
|
|
384
|
-
var _excluded$
|
|
387
|
+
var _excluded$1n = ["className"];
|
|
385
388
|
var ListSeparator = function ListSeparator(_ref) {
|
|
386
389
|
var className = _ref.className,
|
|
387
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
390
|
+
props = _objectWithoutProperties(_ref, _excluded$1n);
|
|
388
391
|
return /*#__PURE__*/React__default["default"].createElement(StyledListSeparator, _extends({
|
|
389
392
|
className: classNames__default["default"]("c-list-separator", className)
|
|
390
393
|
}, props));
|
|
391
394
|
};
|
|
392
395
|
ListSeparator.displayName = "ListSeparator";
|
|
393
396
|
|
|
394
|
-
var _excluded$
|
|
397
|
+
var _excluded$1m = ["children", "className"];
|
|
395
398
|
var _List = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
396
399
|
var children = _ref.children,
|
|
397
400
|
className = _ref.className,
|
|
398
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
401
|
+
props = _objectWithoutProperties(_ref, _excluded$1m);
|
|
399
402
|
return /*#__PURE__*/React__default["default"].createElement(StyledList, _extends({
|
|
400
403
|
className: className,
|
|
401
404
|
ref: ref,
|
|
@@ -561,6 +564,40 @@
|
|
|
561
564
|
}
|
|
562
565
|
};
|
|
563
566
|
|
|
567
|
+
var currencyMultiplier = {
|
|
568
|
+
k: 1000,
|
|
569
|
+
m: 1000000,
|
|
570
|
+
b: 1000000000,
|
|
571
|
+
t: 1000000000000
|
|
572
|
+
};
|
|
573
|
+
var formatNumber = function formatNumber(n) {
|
|
574
|
+
var thousandSeparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ",";
|
|
575
|
+
var number = parseFloat(String(n).replaceAll(thousandSeparator, ""));
|
|
576
|
+
if (isNaN(number)) {
|
|
577
|
+
return "";
|
|
578
|
+
}
|
|
579
|
+
var isNegative = number < 0;
|
|
580
|
+
var absoluteNumber = Math.abs(number);
|
|
581
|
+
var suffixes = ["", "K", "M", "B", "T"];
|
|
582
|
+
var scale = 0;
|
|
583
|
+
while (absoluteNumber >= 1000 && scale < suffixes.length - 1) {
|
|
584
|
+
absoluteNumber /= 1000;
|
|
585
|
+
scale++;
|
|
586
|
+
}
|
|
587
|
+
var formattedNum = scale === 0 ? absoluteNumber.toFixed(0) : absoluteNumber.toFixed(1);
|
|
588
|
+
var result = formattedNum.endsWith(".0") ? formattedNum.slice(0, -2) : formattedNum;
|
|
589
|
+
return isNegative ? `-${result}${suffixes[scale]}` : `${result}${suffixes[scale]}`;
|
|
590
|
+
};
|
|
591
|
+
var numberWithSeparator = function numberWithSeparator(x, thousandSeparator) {
|
|
592
|
+
var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
593
|
+
if (!format) {
|
|
594
|
+
return x;
|
|
595
|
+
}
|
|
596
|
+
var parts = x.toString().split(".");
|
|
597
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, thousandSeparator);
|
|
598
|
+
return parts.join(".");
|
|
599
|
+
};
|
|
600
|
+
|
|
564
601
|
var validateStopwatchTime = function validateStopwatchTime(value) {
|
|
565
602
|
return /^([0-9]{0,2})?(((:([0-5][0-9])?)|(:[0-5]?))|(\.[0-9]{0,2})|(,[0-9]{0,2}))?$/g.test(value);
|
|
566
603
|
};
|
|
@@ -571,6 +608,23 @@
|
|
|
571
608
|
return /^(([1-9][0-9]*|0)?(([:,.][0-5][0-9]?)|([:,.][0-5]?)|(\.[0-9]{1,2})|(,[0-9]{1,2}))?)$/.test(value);
|
|
572
609
|
}
|
|
573
610
|
};
|
|
611
|
+
var validateNumberInput = function validateNumberInput(value, disableMacros, decimalSeparator, decimalLength, limit) {
|
|
612
|
+
if (value.startsWith("00")) {
|
|
613
|
+
return false;
|
|
614
|
+
}
|
|
615
|
+
var numericInput = disableMacros ? value : value.replace(/([0-9.]+)([kmbtKMBT])/, function (_, num, unit) {
|
|
616
|
+
return (parseFloat(num) * currencyMultiplier[unit.toLowerCase()]).toString();
|
|
617
|
+
});
|
|
618
|
+
if (limit) {
|
|
619
|
+
var decimalIndex = numericInput.indexOf(decimalSeparator);
|
|
620
|
+
var integerPart = decimalIndex !== -1 ? numericInput.substring(0, decimalIndex) : numericInput;
|
|
621
|
+
if (integerPart.length > limit) {
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
var regexString = `^(-?\\d{0,9}(?:\\${decimalSeparator}\\d{0,${decimalLength}})?)?$`;
|
|
626
|
+
return new RegExp(regexString).test(numericInput);
|
|
627
|
+
};
|
|
574
628
|
|
|
575
629
|
function setRef(ref, value) {
|
|
576
630
|
if (typeof ref === "function") {
|
|
@@ -701,40 +755,6 @@
|
|
|
701
755
|
return !Number.isInteger(num);
|
|
702
756
|
};
|
|
703
757
|
|
|
704
|
-
var currencyMultiplier = {
|
|
705
|
-
k: 1000,
|
|
706
|
-
m: 1000000,
|
|
707
|
-
b: 1000000000,
|
|
708
|
-
t: 1000000000000
|
|
709
|
-
};
|
|
710
|
-
var formatCurrency = function formatCurrency(n) {
|
|
711
|
-
var thousandSeparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ",";
|
|
712
|
-
var number = parseFloat(String(n).replaceAll(thousandSeparator, ""));
|
|
713
|
-
if (isNaN(number)) {
|
|
714
|
-
return "";
|
|
715
|
-
}
|
|
716
|
-
var isNegative = number < 0;
|
|
717
|
-
var absoluteNumber = Math.abs(number);
|
|
718
|
-
var suffixes = ["", "K", "M", "B", "T"];
|
|
719
|
-
var scale = 0;
|
|
720
|
-
while (absoluteNumber >= 1000 && scale < suffixes.length - 1) {
|
|
721
|
-
absoluteNumber /= 1000;
|
|
722
|
-
scale++;
|
|
723
|
-
}
|
|
724
|
-
var formattedNum = scale === 0 ? absoluteNumber.toFixed(0) : absoluteNumber.toFixed(1);
|
|
725
|
-
var result = formattedNum.endsWith(".0") ? formattedNum.slice(0, -2) : formattedNum;
|
|
726
|
-
return isNegative ? `-${result}${suffixes[scale]}` : `${result}${suffixes[scale]}`;
|
|
727
|
-
};
|
|
728
|
-
var numberWithSeparator = function numberWithSeparator(x, thousandSeparator) {
|
|
729
|
-
var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
730
|
-
if (!format) {
|
|
731
|
-
return x;
|
|
732
|
-
}
|
|
733
|
-
var parts = x.toString().split(".");
|
|
734
|
-
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, thousandSeparator);
|
|
735
|
-
return parts.join(".");
|
|
736
|
-
};
|
|
737
|
-
|
|
738
758
|
var StyledIconButton = styled__default["default"](Button).withConfig({
|
|
739
759
|
displayName: "Styles__StyledIconButton",
|
|
740
760
|
componentId: "sc-1teza2f-0"
|
|
@@ -746,7 +766,7 @@
|
|
|
746
766
|
return size === "big" && styled.css(["width:40px;"]);
|
|
747
767
|
});
|
|
748
768
|
|
|
749
|
-
var _excluded$
|
|
769
|
+
var _excluded$1l = ["children", "className", "variant", "size", "active"];
|
|
750
770
|
|
|
751
771
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
752
772
|
|
|
@@ -776,7 +796,7 @@
|
|
|
776
796
|
variant = _ref.variant,
|
|
777
797
|
size = _ref.size,
|
|
778
798
|
active = _ref.active,
|
|
779
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
799
|
+
args = _objectWithoutProperties(_ref, _excluded$1l);
|
|
780
800
|
return /*#__PURE__*/React__default["default"].createElement(StyledIconButton, _extends({
|
|
781
801
|
className: className,
|
|
782
802
|
variant: variant,
|
|
@@ -7342,7 +7362,7 @@
|
|
|
7342
7362
|
}, FontStyle, BoxSizingStyle);
|
|
7343
7363
|
StyledBubble.displayName = "StyledBubble";
|
|
7344
7364
|
|
|
7345
|
-
var _excluded$
|
|
7365
|
+
var _excluded$1k = ["children", "className", "innerRef", "style"];
|
|
7346
7366
|
var Bubble = function Bubble(_ref) {
|
|
7347
7367
|
var children = _ref.children,
|
|
7348
7368
|
className = _ref.className,
|
|
@@ -7350,7 +7370,7 @@
|
|
|
7350
7370
|
innerRef = _ref$innerRef === void 0 ? null : _ref$innerRef,
|
|
7351
7371
|
_ref$style = _ref.style,
|
|
7352
7372
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
7353
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7373
|
+
rest = _objectWithoutProperties(_ref, _excluded$1k);
|
|
7354
7374
|
return /*#__PURE__*/React__default["default"].createElement(StyledBubble, _extends({}, rest, {
|
|
7355
7375
|
ref: innerRef,
|
|
7356
7376
|
className: classNames__default["default"]("c-bubble", className),
|
|
@@ -7411,12 +7431,12 @@
|
|
|
7411
7431
|
});
|
|
7412
7432
|
StyledOverlay.displayName = "StyledOverlay";
|
|
7413
7433
|
|
|
7414
|
-
var _excluded$
|
|
7434
|
+
var _excluded$1j = ["className", "disableBackgroundColor"];
|
|
7415
7435
|
var Overlay = function Overlay(_ref) {
|
|
7416
7436
|
var className = _ref.className,
|
|
7417
7437
|
_ref$disableBackgroun = _ref.disableBackgroundColor,
|
|
7418
7438
|
disableBackgroundColor = _ref$disableBackgroun === void 0 ? false : _ref$disableBackgroun,
|
|
7419
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7439
|
+
rest = _objectWithoutProperties(_ref, _excluded$1j);
|
|
7420
7440
|
return /*#__PURE__*/React__default["default"].createElement(StyledOverlay, _extends({
|
|
7421
7441
|
className: classNames__default["default"]("c-overlay", className),
|
|
7422
7442
|
$disableBackgroundColor: disableBackgroundColor
|
|
@@ -7424,7 +7444,7 @@
|
|
|
7424
7444
|
};
|
|
7425
7445
|
Overlay.displayName = "Overlay";
|
|
7426
7446
|
|
|
7427
|
-
var _excluded$
|
|
7447
|
+
var _excluded$1i = ["children", "anchorEl", "open", "style", "transition", "placement", "strategy", "afterWrite"];
|
|
7428
7448
|
var Popper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
7429
7449
|
var children = _ref.children,
|
|
7430
7450
|
anchorEl = _ref.anchorEl,
|
|
@@ -7438,7 +7458,7 @@
|
|
|
7438
7458
|
_ref$strategy = _ref.strategy,
|
|
7439
7459
|
strategy = _ref$strategy === void 0 ? "absolute" : _ref$strategy,
|
|
7440
7460
|
afterWrite = _ref.afterWrite,
|
|
7441
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7461
|
+
rest = _objectWithoutProperties(_ref, _excluded$1i);
|
|
7442
7462
|
var _useState = React.useState(true),
|
|
7443
7463
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7444
7464
|
exited = _useState2[0],
|
|
@@ -7561,7 +7581,7 @@
|
|
|
7561
7581
|
};
|
|
7562
7582
|
var LayerContext$1 = LayerContext;
|
|
7563
7583
|
|
|
7564
|
-
var _excluded$
|
|
7584
|
+
var _excluded$1h = ["children", "onClose", "className", "style", "onKeyDown", "disableFocusLock", "disableScrollLock", "disableCloseOnEsc", "onClick"];
|
|
7565
7585
|
var returnFocus = {
|
|
7566
7586
|
preventScroll: true
|
|
7567
7587
|
};
|
|
@@ -7578,7 +7598,7 @@
|
|
|
7578
7598
|
_ref$disableCloseOnEs = _ref.disableCloseOnEsc,
|
|
7579
7599
|
disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs,
|
|
7580
7600
|
onClick = _ref.onClick,
|
|
7581
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7601
|
+
rest = _objectWithoutProperties(_ref, _excluded$1h);
|
|
7582
7602
|
var innerRef = React.useRef(null);
|
|
7583
7603
|
var handleRef = useForkRef(innerRef, ref);
|
|
7584
7604
|
var _useLayerContext = useLayerContext(),
|
|
@@ -7889,7 +7909,7 @@
|
|
|
7889
7909
|
});
|
|
7890
7910
|
StyledTypography.displayName = "StyledTypography";
|
|
7891
7911
|
|
|
7892
|
-
var _excluded$
|
|
7912
|
+
var _excluded$1g = ["variant", "as", "color", "italic", "tabularNums", "letterSpacing", "lineHeight", "align", "decoration", "transform", "overflow", "whitespace", "wordBreak", "weight", "className", "children"];
|
|
7893
7913
|
var Typography = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
7894
7914
|
var _ref$variant = _ref.variant,
|
|
7895
7915
|
variant = _ref$variant === void 0 ? "Title 1" : _ref$variant,
|
|
@@ -7920,7 +7940,7 @@
|
|
|
7920
7940
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
7921
7941
|
className = _ref.className,
|
|
7922
7942
|
children = _ref.children,
|
|
7923
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7943
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
7924
7944
|
var Component = as || "div";
|
|
7925
7945
|
return /*#__PURE__*/React__default["default"].createElement(StyledTypography, _extends({
|
|
7926
7946
|
as: Component,
|
|
@@ -7943,13 +7963,13 @@
|
|
|
7943
7963
|
});
|
|
7944
7964
|
Typography.displayName = "Typography";
|
|
7945
7965
|
|
|
7946
|
-
var _excluded$
|
|
7966
|
+
var _excluded$1f = ["title", "className", "leftElement", "rightElement"];
|
|
7947
7967
|
var MenuHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
7948
7968
|
var title = _ref.title,
|
|
7949
7969
|
className = _ref.className,
|
|
7950
7970
|
leftElement = _ref.leftElement,
|
|
7951
7971
|
rightElement = _ref.rightElement,
|
|
7952
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7972
|
+
props = _objectWithoutProperties(_ref, _excluded$1f);
|
|
7953
7973
|
return /*#__PURE__*/React__default["default"].createElement(StyledMenuHeader, _extends({}, props, {
|
|
7954
7974
|
className: classNames__default["default"]("c-menu-header", className),
|
|
7955
7975
|
ref: ref
|
|
@@ -7974,11 +7994,11 @@
|
|
|
7974
7994
|
});
|
|
7975
7995
|
MenuHeader.displayName = "MenuHeader";
|
|
7976
7996
|
|
|
7977
|
-
var _excluded$
|
|
7997
|
+
var _excluded$1e = ["children", "className"];
|
|
7978
7998
|
var MenuFooter = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
7979
7999
|
var children = _ref.children,
|
|
7980
8000
|
className = _ref.className,
|
|
7981
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8001
|
+
props = _objectWithoutProperties(_ref, _excluded$1e);
|
|
7982
8002
|
return /*#__PURE__*/React__default["default"].createElement(StyledMenuFooter$1, _extends({}, props, {
|
|
7983
8003
|
className: classNames__default["default"]("c-menu-footer", className),
|
|
7984
8004
|
ref: ref
|
|
@@ -7986,14 +8006,14 @@
|
|
|
7986
8006
|
});
|
|
7987
8007
|
MenuFooter.displayName = "MenuFooter";
|
|
7988
8008
|
|
|
7989
|
-
var _excluded$
|
|
8009
|
+
var _excluded$1d = ["children", "className", "separator"];
|
|
7990
8010
|
var Breadcrumbs = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
7991
8011
|
var _dimensions$width, _childDimensions$widt;
|
|
7992
8012
|
var children = _ref.children,
|
|
7993
8013
|
className = _ref.className,
|
|
7994
8014
|
_ref$separator = _ref.separator,
|
|
7995
8015
|
separator = _ref$separator === void 0 ? "/" : _ref$separator,
|
|
7996
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8016
|
+
rest = _objectWithoutProperties(_ref, _excluded$1d);
|
|
7997
8017
|
var internalRef = React.useRef(null);
|
|
7998
8018
|
var listWrapperRef = React.useRef(null);
|
|
7999
8019
|
var olRef = React.useRef(null);
|
|
@@ -8171,12 +8191,12 @@
|
|
|
8171
8191
|
}, value && value > 100 ? 99 + "+" : value);
|
|
8172
8192
|
};
|
|
8173
8193
|
|
|
8174
|
-
var _excluded$
|
|
8194
|
+
var _excluded$1c = ["weight", "children"];
|
|
8175
8195
|
var Body2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8176
8196
|
var _ref$weight = _ref.weight,
|
|
8177
8197
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
8178
8198
|
children = _ref.children,
|
|
8179
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8199
|
+
props = _objectWithoutProperties(_ref, _excluded$1c);
|
|
8180
8200
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
8181
8201
|
variant: "Body 2",
|
|
8182
8202
|
weight: weight,
|
|
@@ -8284,10 +8304,10 @@
|
|
|
8284
8304
|
};
|
|
8285
8305
|
FromElement.displayName = "FromElement";
|
|
8286
8306
|
|
|
8287
|
-
var _excluded$
|
|
8307
|
+
var _excluded$1b = ["children"];
|
|
8288
8308
|
var TooltipAnimation = function TooltipAnimation(_ref) {
|
|
8289
8309
|
var children = _ref.children,
|
|
8290
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
8310
|
+
props = _objectWithoutProperties(_ref, _excluded$1b);
|
|
8291
8311
|
return /*#__PURE__*/React__default["default"].createElement(FromElement, _extends({
|
|
8292
8312
|
timeout: 0
|
|
8293
8313
|
}, props), children);
|
|
@@ -8362,7 +8382,7 @@
|
|
|
8362
8382
|
});
|
|
8363
8383
|
Tooltip.displayName = "Tooltip";
|
|
8364
8384
|
|
|
8365
|
-
var _excluded$
|
|
8385
|
+
var _excluded$1a = ["label", "icon", "active", "counter", "tooltipText", "onClearAll", "className", "disabled"];
|
|
8366
8386
|
var CounterButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8367
8387
|
var label = _ref.label,
|
|
8368
8388
|
icon = _ref.icon,
|
|
@@ -8374,7 +8394,7 @@
|
|
|
8374
8394
|
className = _ref.className,
|
|
8375
8395
|
_ref$disabled = _ref.disabled,
|
|
8376
8396
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
8377
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
8397
|
+
args = _objectWithoutProperties(_ref, _excluded$1a);
|
|
8378
8398
|
return /*#__PURE__*/React__default["default"].createElement(StyledCounterButtonWrapper, {
|
|
8379
8399
|
ref: ref,
|
|
8380
8400
|
className: className
|
|
@@ -8769,7 +8789,7 @@
|
|
|
8769
8789
|
};
|
|
8770
8790
|
YearMonthPicker.displayName = "YearMonthPicker";
|
|
8771
8791
|
|
|
8772
|
-
var _excluded$
|
|
8792
|
+
var _excluded$19 = ["className", "onChange", "onDayClick", "selectedDays", "disabledDays", "selectionMode", "month", "onMonthChange", "dateRequired", "firstDayOfWeek", "fixedWeeks", "modifiers", "renderDay"];
|
|
8773
8793
|
var formatWeekdayName = function formatWeekdayName(str) {
|
|
8774
8794
|
return moment__default["default"](str).format("ddd").charAt(0);
|
|
8775
8795
|
};
|
|
@@ -8795,7 +8815,7 @@
|
|
|
8795
8815
|
fixedWeeks = _ref$fixedWeeks === void 0 ? true : _ref$fixedWeeks,
|
|
8796
8816
|
defaultModifiers = _ref.modifiers,
|
|
8797
8817
|
renderDay = _ref.renderDay,
|
|
8798
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8818
|
+
rest = _objectWithoutProperties(_ref, _excluded$19);
|
|
8799
8819
|
var _useState = React.useState(),
|
|
8800
8820
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8801
8821
|
enteredTo = _useState2[0],
|
|
@@ -9627,10 +9647,10 @@
|
|
|
9627
9647
|
componentId: "sc-x4ge7a-0"
|
|
9628
9648
|
})(["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;.neon &{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;"], linearAnimation);
|
|
9629
9649
|
|
|
9630
|
-
var _excluded$
|
|
9650
|
+
var _excluded$18 = ["className"];
|
|
9631
9651
|
var LinearLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9632
9652
|
var className = _ref.className,
|
|
9633
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9653
|
+
rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
9634
9654
|
return /*#__PURE__*/React__default["default"].createElement(StyledLinearLoader, _extends({
|
|
9635
9655
|
ref: ref,
|
|
9636
9656
|
className: classNames__default["default"]("c-loader c-loader--linear", className)
|
|
@@ -9644,10 +9664,10 @@
|
|
|
9644
9664
|
componentId: "sc-1f35d5h-0"
|
|
9645
9665
|
})(["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);
|
|
9646
9666
|
|
|
9647
|
-
var _excluded$
|
|
9667
|
+
var _excluded$17 = ["className"];
|
|
9648
9668
|
var DotsLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9649
9669
|
var className = _ref.className,
|
|
9650
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9670
|
+
rest = _objectWithoutProperties(_ref, _excluded$17);
|
|
9651
9671
|
return /*#__PURE__*/React__default["default"].createElement(StyledDotsLoader, _extends({
|
|
9652
9672
|
ref: ref,
|
|
9653
9673
|
className: classNames__default["default"]("c-loader c-loader--dots", className)
|
|
@@ -9669,7 +9689,7 @@
|
|
|
9669
9689
|
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);
|
|
9670
9690
|
});
|
|
9671
9691
|
|
|
9672
|
-
var _excluded$
|
|
9692
|
+
var _excluded$16 = ["radius", "stroke", "activeStrokeColor", "inactiveStrokeColor", "activeColorPercentage", "rotateDurationInSeconds", "className"];
|
|
9673
9693
|
var SpinnerLoader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9674
9694
|
var _ref$radius = _ref.radius,
|
|
9675
9695
|
radius = _ref$radius === void 0 ? 10 : _ref$radius,
|
|
@@ -9684,7 +9704,7 @@
|
|
|
9684
9704
|
_ref$rotateDurationIn = _ref.rotateDurationInSeconds,
|
|
9685
9705
|
rotateDurationInSeconds = _ref$rotateDurationIn === void 0 ? 0.75 : _ref$rotateDurationIn,
|
|
9686
9706
|
className = _ref.className,
|
|
9687
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9707
|
+
rest = _objectWithoutProperties(_ref, _excluded$16);
|
|
9688
9708
|
return /*#__PURE__*/React__default["default"].createElement(StyledSpinnerLoader$1, _extends({
|
|
9689
9709
|
ref: ref,
|
|
9690
9710
|
className: className,
|
|
@@ -9698,7 +9718,7 @@
|
|
|
9698
9718
|
});
|
|
9699
9719
|
SpinnerLoader.displayName = "SpinnerLoader";
|
|
9700
9720
|
|
|
9701
|
-
var _excluded$
|
|
9721
|
+
var _excluded$15 = ["header", "rows", "className", "sortBy", "sortDirection", "onSortCallback", "theadClass", "noResultsCallback", "groupBy", "groupHead", "isCollapsible", "emptyValue", "loading", "loadingRows"];
|
|
9702
9722
|
var SortDirection = /*#__PURE__*/function (SortDirection) {
|
|
9703
9723
|
SortDirection["None"] = "none";
|
|
9704
9724
|
SortDirection["Asc"] = "asc";
|
|
@@ -9748,7 +9768,7 @@
|
|
|
9748
9768
|
loading = _ref.loading,
|
|
9749
9769
|
_ref$loadingRows = _ref.loadingRows,
|
|
9750
9770
|
loadingRows = _ref$loadingRows === void 0 ? 7 : _ref$loadingRows,
|
|
9751
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
9771
|
+
args = _objectWithoutProperties(_ref, _excluded$15);
|
|
9752
9772
|
var _useState = React.useState(sortDirection),
|
|
9753
9773
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9754
9774
|
columnDirection = _useState2[0],
|
|
@@ -10108,7 +10128,7 @@
|
|
|
10108
10128
|
});
|
|
10109
10129
|
StyledCompleteCheckbox.displayName = "StyledCompleteCheckbox";
|
|
10110
10130
|
|
|
10111
|
-
var _excluded$
|
|
10131
|
+
var _excluded$14 = ["completed", "disabled", "animate", "onClick", "className", "primary", "checkMarkClassName"];
|
|
10112
10132
|
var CompleteCheckbox = function CompleteCheckbox(_ref) {
|
|
10113
10133
|
var _ref$completed = _ref.completed,
|
|
10114
10134
|
completed = _ref$completed === void 0 ? false : _ref$completed,
|
|
@@ -10121,7 +10141,7 @@
|
|
|
10121
10141
|
_ref$primary = _ref.primary,
|
|
10122
10142
|
primary = _ref$primary === void 0 ? false : _ref$primary,
|
|
10123
10143
|
checkMarkClassName = _ref.checkMarkClassName,
|
|
10124
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10144
|
+
rest = _objectWithoutProperties(_ref, _excluded$14);
|
|
10125
10145
|
return /*#__PURE__*/React__default["default"].createElement(StyledCompleteCheckbox, _extends({
|
|
10126
10146
|
onClick: onClick,
|
|
10127
10147
|
className: classNames__default["default"]("c-complete-checkbox", className),
|
|
@@ -10152,7 +10172,7 @@
|
|
|
10152
10172
|
});
|
|
10153
10173
|
StyledPaper.displayName = "StyledPaper";
|
|
10154
10174
|
|
|
10155
|
-
var _excluded$
|
|
10175
|
+
var _excluded$13 = ["children", "className", "type", "hover", "useOptimizedShadow"];
|
|
10156
10176
|
/**
|
|
10157
10177
|
* This is a component description and should sit directly above your component
|
|
10158
10178
|
*/
|
|
@@ -10165,7 +10185,7 @@
|
|
|
10165
10185
|
hover = _ref$hover === void 0 ? false : _ref$hover,
|
|
10166
10186
|
_ref$useOptimizedShad = _ref.useOptimizedShadow,
|
|
10167
10187
|
useOptimizedShadow = _ref$useOptimizedShad === void 0 ? false : _ref$useOptimizedShad,
|
|
10168
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10188
|
+
rest = _objectWithoutProperties(_ref, _excluded$13);
|
|
10169
10189
|
return /*#__PURE__*/React__default["default"].createElement(StyledPaper, _extends({
|
|
10170
10190
|
className: classNames__default["default"](className, {
|
|
10171
10191
|
"ac-shadow--raised--lg": !useOptimizedShadow && hover && type === "paper-1",
|
|
@@ -10218,7 +10238,7 @@
|
|
|
10218
10238
|
});
|
|
10219
10239
|
StyledCard.displayName = "StyledCard";
|
|
10220
10240
|
|
|
10221
|
-
var _excluded$
|
|
10241
|
+
var _excluded$12 = ["children", "className", "hoverable", "paperType"];
|
|
10222
10242
|
var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10223
10243
|
var children = _ref.children,
|
|
10224
10244
|
className = _ref.className,
|
|
@@ -10226,7 +10246,7 @@
|
|
|
10226
10246
|
hoverable = _ref$hoverable === void 0 ? false : _ref$hoverable,
|
|
10227
10247
|
_ref$paperType = _ref.paperType,
|
|
10228
10248
|
paperType = _ref$paperType === void 0 ? "paper-2" : _ref$paperType,
|
|
10229
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10249
|
+
rest = _objectWithoutProperties(_ref, _excluded$12);
|
|
10230
10250
|
return /*#__PURE__*/React__default["default"].createElement(StyledCard, _extends({}, rest, {
|
|
10231
10251
|
type: paperType,
|
|
10232
10252
|
className: classNames__default["default"]("c-card", className),
|
|
@@ -10333,12 +10353,12 @@
|
|
|
10333
10353
|
});
|
|
10334
10354
|
StyledIcon$1.displayName = "StyledIcon";
|
|
10335
10355
|
|
|
10336
|
-
var _excluded$
|
|
10356
|
+
var _excluded$11 = ["weight", "children"];
|
|
10337
10357
|
var Title1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10338
10358
|
var _ref$weight = _ref.weight,
|
|
10339
10359
|
weight = _ref$weight === void 0 ? "light" : _ref$weight,
|
|
10340
10360
|
children = _ref.children,
|
|
10341
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10361
|
+
props = _objectWithoutProperties(_ref, _excluded$11);
|
|
10342
10362
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10343
10363
|
weight: weight,
|
|
10344
10364
|
variant: "Title 1",
|
|
@@ -10347,12 +10367,12 @@
|
|
|
10347
10367
|
});
|
|
10348
10368
|
Title1.displayName = "Title1";
|
|
10349
10369
|
|
|
10350
|
-
var _excluded
|
|
10370
|
+
var _excluded$10 = ["weight", "children"];
|
|
10351
10371
|
var Title2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10352
10372
|
var _ref$weight = _ref.weight,
|
|
10353
10373
|
weight = _ref$weight === void 0 ? "light" : _ref$weight,
|
|
10354
10374
|
children = _ref.children,
|
|
10355
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
10375
|
+
props = _objectWithoutProperties(_ref, _excluded$10);
|
|
10356
10376
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10357
10377
|
weight: weight,
|
|
10358
10378
|
variant: "Title 2",
|
|
@@ -10361,10 +10381,10 @@
|
|
|
10361
10381
|
});
|
|
10362
10382
|
Title2.displayName = "Title2";
|
|
10363
10383
|
|
|
10364
|
-
var _excluded
|
|
10384
|
+
var _excluded$$ = ["children"];
|
|
10365
10385
|
var Header2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10366
10386
|
var children = _ref.children,
|
|
10367
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
10387
|
+
props = _objectWithoutProperties(_ref, _excluded$$);
|
|
10368
10388
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10369
10389
|
weight: "bold",
|
|
10370
10390
|
variant: "Header 2",
|
|
@@ -10373,10 +10393,10 @@
|
|
|
10373
10393
|
});
|
|
10374
10394
|
Header2.displayName = "Header2";
|
|
10375
10395
|
|
|
10376
|
-
var _excluded$
|
|
10396
|
+
var _excluded$_ = ["children"];
|
|
10377
10397
|
var Header3 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10378
10398
|
var children = _ref.children,
|
|
10379
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10399
|
+
props = _objectWithoutProperties(_ref, _excluded$_);
|
|
10380
10400
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10381
10401
|
weight: "bold",
|
|
10382
10402
|
variant: "Header 3",
|
|
@@ -10385,12 +10405,12 @@
|
|
|
10385
10405
|
});
|
|
10386
10406
|
Header3.displayName = "Header3";
|
|
10387
10407
|
|
|
10388
|
-
var _excluded$
|
|
10408
|
+
var _excluded$Z = ["weight", "children"];
|
|
10389
10409
|
var Body1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10390
10410
|
var _ref$weight = _ref.weight,
|
|
10391
10411
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
10392
10412
|
children = _ref.children,
|
|
10393
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10413
|
+
props = _objectWithoutProperties(_ref, _excluded$Z);
|
|
10394
10414
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10395
10415
|
variant: "Body 1",
|
|
10396
10416
|
weight: weight,
|
|
@@ -10399,12 +10419,12 @@
|
|
|
10399
10419
|
});
|
|
10400
10420
|
Body1.displayName = "Body1";
|
|
10401
10421
|
|
|
10402
|
-
var _excluded$
|
|
10422
|
+
var _excluded$Y = ["weight", "children"];
|
|
10403
10423
|
var Caption1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10404
10424
|
var _ref$weight = _ref.weight,
|
|
10405
10425
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
10406
10426
|
children = _ref.children,
|
|
10407
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10427
|
+
props = _objectWithoutProperties(_ref, _excluded$Y);
|
|
10408
10428
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10409
10429
|
variant: "Caption 1",
|
|
10410
10430
|
weight: weight,
|
|
@@ -10413,12 +10433,12 @@
|
|
|
10413
10433
|
});
|
|
10414
10434
|
Caption1.displayName = "Caption1";
|
|
10415
10435
|
|
|
10416
|
-
var _excluded$
|
|
10436
|
+
var _excluded$X = ["weight", "children"];
|
|
10417
10437
|
var Caption2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10418
10438
|
var _ref$weight = _ref.weight,
|
|
10419
10439
|
weight = _ref$weight === void 0 ? "regular" : _ref$weight,
|
|
10420
10440
|
children = _ref.children,
|
|
10421
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10441
|
+
props = _objectWithoutProperties(_ref, _excluded$X);
|
|
10422
10442
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
10423
10443
|
variant: "Caption 2",
|
|
10424
10444
|
weight: weight,
|
|
@@ -10502,7 +10522,7 @@
|
|
|
10502
10522
|
componentId: "sc-5x2tyd-1"
|
|
10503
10523
|
})(["border-radius:100%;object-fit:cover;"]);
|
|
10504
10524
|
|
|
10505
|
-
var _excluded$
|
|
10525
|
+
var _excluded$W = ["url", "alt", "size", "className", "imgClassName", "children"];
|
|
10506
10526
|
/**
|
|
10507
10527
|
* @component Avatar
|
|
10508
10528
|
* @description
|
|
@@ -10537,7 +10557,7 @@
|
|
|
10537
10557
|
className = _ref.className,
|
|
10538
10558
|
imgClassName = _ref.imgClassName,
|
|
10539
10559
|
children = _ref.children,
|
|
10540
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10560
|
+
rest = _objectWithoutProperties(_ref, _excluded$W);
|
|
10541
10561
|
var _useState = React.useState(false),
|
|
10542
10562
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10543
10563
|
imageLoaded = _useState2[0],
|
|
@@ -10578,13 +10598,13 @@
|
|
|
10578
10598
|
return props.$color && styled.css(["background-color:", ";"], props.$color);
|
|
10579
10599
|
});
|
|
10580
10600
|
|
|
10581
|
-
var _excluded$
|
|
10601
|
+
var _excluded$V = ["color", "size", "className"];
|
|
10582
10602
|
var Dot = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10583
10603
|
var color = _ref.color,
|
|
10584
10604
|
_ref$size = _ref.size,
|
|
10585
10605
|
size = _ref$size === void 0 ? 8 : _ref$size,
|
|
10586
10606
|
className = _ref.className,
|
|
10587
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10607
|
+
rest = _objectWithoutProperties(_ref, _excluded$V);
|
|
10588
10608
|
return /*#__PURE__*/React__default["default"].createElement(StyledDot, _extends({
|
|
10589
10609
|
className: classNames__default["default"]("c-dot", className),
|
|
10590
10610
|
ref: ref,
|
|
@@ -10621,7 +10641,7 @@
|
|
|
10621
10641
|
});
|
|
10622
10642
|
StyledTagText.displayName = "StyledTagText";
|
|
10623
10643
|
|
|
10624
|
-
var _excluded$
|
|
10644
|
+
var _excluded$U = ["name", "color", "showText", "showDot", "className"];
|
|
10625
10645
|
var Tag = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10626
10646
|
var name = _ref.name,
|
|
10627
10647
|
color = _ref.color,
|
|
@@ -10630,7 +10650,7 @@
|
|
|
10630
10650
|
_ref$showDot = _ref.showDot,
|
|
10631
10651
|
showDot = _ref$showDot === void 0 ? true : _ref$showDot,
|
|
10632
10652
|
className = _ref.className,
|
|
10633
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10653
|
+
rest = _objectWithoutProperties(_ref, _excluded$U);
|
|
10634
10654
|
return /*#__PURE__*/React__default["default"].createElement(StyledTag, _extends({
|
|
10635
10655
|
className: classNames__default["default"]("c-tag", className),
|
|
10636
10656
|
ref: ref
|
|
@@ -10736,7 +10756,7 @@
|
|
|
10736
10756
|
});
|
|
10737
10757
|
StyledNavAsMoreTarget.displayName = "StyledNavAsMoreTarget";
|
|
10738
10758
|
|
|
10739
|
-
var _excluded$
|
|
10759
|
+
var _excluded$T = ["children", "active", "disabled", "className", "role"];
|
|
10740
10760
|
var Item = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
10741
10761
|
var children = _ref.children,
|
|
10742
10762
|
_ref$active = _ref.active,
|
|
@@ -10745,7 +10765,7 @@
|
|
|
10745
10765
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
10746
10766
|
className = _ref.className,
|
|
10747
10767
|
role = _ref.role,
|
|
10748
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10768
|
+
rest = _objectWithoutProperties(_ref, _excluded$T);
|
|
10749
10769
|
return /*#__PURE__*/React__default["default"].createElement(StyledNavListItem, _extends({
|
|
10750
10770
|
className: classNames__default["default"](`c-nav__item`, {
|
|
10751
10771
|
"c-nav__item--active": active
|
|
@@ -10786,11 +10806,11 @@
|
|
|
10786
10806
|
});
|
|
10787
10807
|
StyledExpandSingle.displayName = "StyledExpandSingle";
|
|
10788
10808
|
|
|
10789
|
-
var _excluded$
|
|
10809
|
+
var _excluded$S = ["expanded"];
|
|
10790
10810
|
var ExpandSingle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10791
10811
|
var _ref$expanded = _ref.expanded,
|
|
10792
10812
|
expanded = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
10793
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10813
|
+
rest = _objectWithoutProperties(_ref, _excluded$S);
|
|
10794
10814
|
return /*#__PURE__*/React__default["default"].createElement(StyledExpandSingle, _extends({
|
|
10795
10815
|
ref: ref,
|
|
10796
10816
|
viewBox: "0 0 24 24",
|
|
@@ -10966,7 +10986,7 @@
|
|
|
10966
10986
|
};
|
|
10967
10987
|
OptionContent.displayName = "OptionContent";
|
|
10968
10988
|
|
|
10969
|
-
var _excluded$
|
|
10989
|
+
var _excluded$R = ["isIndeterminate", "data-testid"];
|
|
10970
10990
|
|
|
10971
10991
|
/**
|
|
10972
10992
|
* @component CheckboxIcon
|
|
@@ -10990,7 +11010,7 @@
|
|
|
10990
11010
|
var CheckboxIcon = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, svgRef) {
|
|
10991
11011
|
var isIndeterminate = _ref.isIndeterminate,
|
|
10992
11012
|
testId = _ref["data-testid"],
|
|
10993
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11013
|
+
props = _objectWithoutProperties(_ref, _excluded$R);
|
|
10994
11014
|
// const [animate, setAnimate] = useState(false);
|
|
10995
11015
|
// const mountRef = useRef(false);
|
|
10996
11016
|
|
|
@@ -11080,7 +11100,7 @@
|
|
|
11080
11100
|
});
|
|
11081
11101
|
StyledCheckbox$1.displayName = "StyledCheckbox";
|
|
11082
11102
|
|
|
11083
|
-
var _excluded$
|
|
11103
|
+
var _excluded$Q = ["className", "hover", "id", "isIndeterminate"];
|
|
11084
11104
|
/**
|
|
11085
11105
|
* Checkbox component
|
|
11086
11106
|
*/
|
|
@@ -11090,7 +11110,7 @@
|
|
|
11090
11110
|
_ref$id = _ref.id,
|
|
11091
11111
|
id = _ref$id === void 0 ? "checkbox" : _ref$id,
|
|
11092
11112
|
isIndeterminate = _ref.isIndeterminate,
|
|
11093
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11113
|
+
rest = _objectWithoutProperties(_ref, _excluded$Q);
|
|
11094
11114
|
return /*#__PURE__*/React__default["default"].createElement(StyledCheckbox$1, {
|
|
11095
11115
|
className: classNames__default["default"]("c-checkbox", {
|
|
11096
11116
|
"c-checkbox__hover": hover,
|
|
@@ -11150,7 +11170,7 @@
|
|
|
11150
11170
|
});
|
|
11151
11171
|
StyledInput$2.displayName = "StyledInput";
|
|
11152
11172
|
|
|
11153
|
-
var _excluded$
|
|
11173
|
+
var _excluded$P = ["className", "style", "type", "disabled", "size", "invalid", "startAdornment", "endAdornment", "wrapRef", "wrapperClick"];
|
|
11154
11174
|
var Input = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
11155
11175
|
var _ref$className = _ref.className,
|
|
11156
11176
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
@@ -11167,7 +11187,7 @@
|
|
|
11167
11187
|
endAdornment = _ref.endAdornment,
|
|
11168
11188
|
wrapRef = _ref.wrapRef,
|
|
11169
11189
|
wrapperClick = _ref.wrapperClick,
|
|
11170
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11190
|
+
rest = _objectWithoutProperties(_ref, _excluded$P);
|
|
11171
11191
|
var intInputRef = React.useRef(null);
|
|
11172
11192
|
var handleRef = useForkRef(ref, intInputRef);
|
|
11173
11193
|
var handleWrapperClick = React.useCallback(function () {
|
|
@@ -11221,14 +11241,14 @@
|
|
|
11221
11241
|
}, StyledRadioLabel);
|
|
11222
11242
|
StyledRadioButton$1.displayName = "StyledRadioButton";
|
|
11223
11243
|
|
|
11224
|
-
var _excluded$
|
|
11244
|
+
var _excluded$O = ["className", "id", "hover"];
|
|
11225
11245
|
var RadioButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11226
11246
|
var _ref$className = _ref.className,
|
|
11227
11247
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
11228
11248
|
_ref$id = _ref.id,
|
|
11229
11249
|
id = _ref$id === void 0 ? "radio" : _ref$id,
|
|
11230
11250
|
hover = _ref.hover,
|
|
11231
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11251
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
11232
11252
|
return /*#__PURE__*/React__default["default"].createElement(StyledRadioButton$1, {
|
|
11233
11253
|
className: classNames__default["default"]("c-radio-btn", {
|
|
11234
11254
|
"c-radio-btn__hover": hover,
|
|
@@ -11376,7 +11396,7 @@
|
|
|
11376
11396
|
StyledScrollShadowLeft.displayName = "StyledScrollShadowLeft";
|
|
11377
11397
|
StyledScrollShadowRight.displayName = "StyledScrollShadowRight";
|
|
11378
11398
|
|
|
11379
|
-
var _excluded$
|
|
11399
|
+
var _excluded$N = ["children", "className", "disableVertical", "disableHorizontal", "invertHorizontal", "invertVertical", "innerColor", "outerColor"];
|
|
11380
11400
|
var ScrollShadow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11381
11401
|
var children = _ref.children,
|
|
11382
11402
|
className = _ref.className,
|
|
@@ -11390,7 +11410,7 @@
|
|
|
11390
11410
|
invertVertical = _ref$invertVertical === void 0 ? false : _ref$invertVertical,
|
|
11391
11411
|
innerColor = _ref.innerColor,
|
|
11392
11412
|
outerColor = _ref.outerColor,
|
|
11393
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11413
|
+
rest = _objectWithoutProperties(_ref, _excluded$N);
|
|
11394
11414
|
var _useState = React.useState({
|
|
11395
11415
|
top: 0,
|
|
11396
11416
|
right: 0,
|
|
@@ -11510,10 +11530,7 @@
|
|
|
11510
11530
|
return height;
|
|
11511
11531
|
};
|
|
11512
11532
|
|
|
11513
|
-
|
|
11514
|
-
// @TODO: Pitati foo za testove.
|
|
11515
|
-
|
|
11516
|
-
var useInputNumber = function useInputNumber(_ref, ref) {
|
|
11533
|
+
var useInputNumber = function useInputNumber(_ref, inputRef) {
|
|
11517
11534
|
var _ref$decimalSeparator = _ref.decimalSeparator,
|
|
11518
11535
|
decimalSeparator = _ref$decimalSeparator === void 0 ? "." : _ref$decimalSeparator,
|
|
11519
11536
|
_ref$thousandSeparato = _ref.thousandSeparator,
|
|
@@ -11522,95 +11539,69 @@
|
|
|
11522
11539
|
disableMacros = _ref.disableMacros,
|
|
11523
11540
|
decimalLength = _ref.decimalLength,
|
|
11524
11541
|
value = _ref.value,
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11542
|
+
onChange = _ref.onChange,
|
|
11543
|
+
onSave = _ref.onSave,
|
|
11544
|
+
onEnterKeyPress = _ref.onEnterKeyPress,
|
|
11545
|
+
onClick = _ref.onClick,
|
|
11546
|
+
onCancel = _ref.onCancel,
|
|
11547
|
+
allowEmptyValue = _ref.allowEmptyValue,
|
|
11548
|
+
_ref$step = _ref.step,
|
|
11549
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
11550
|
+
limit = _ref.limit,
|
|
11551
|
+
_ref$validation = _ref.validation,
|
|
11552
|
+
validation = _ref$validation === void 0 ? validateNumberInput : _ref$validation;
|
|
11553
|
+
var _useState = React.useState(function () {
|
|
11554
|
+
return disableAbbreviation ? value : formatNumber(value, thousandSeparator);
|
|
11555
|
+
}),
|
|
11532
11556
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
var _useState3 = React.useState(
|
|
11557
|
+
currentValue = _useState2[0],
|
|
11558
|
+
setCurrentValue = _useState2[1];
|
|
11559
|
+
var _useState3 = React.useState(function () {
|
|
11560
|
+
return disableAbbreviation ? value : formatNumber(value, thousandSeparator);
|
|
11561
|
+
}),
|
|
11536
11562
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
var _useState5 = React.useState(
|
|
11563
|
+
prevValue = _useState4[0],
|
|
11564
|
+
setPrevValue = _useState4[1];
|
|
11565
|
+
var _useState5 = React.useState(function () {
|
|
11566
|
+
return value;
|
|
11567
|
+
}),
|
|
11540
11568
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
var
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
var
|
|
11549
|
-
if (
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
};
|
|
11553
|
-
var handleChange = function handleChange(e) {
|
|
11554
|
-
var inputValue = e.target.value;
|
|
11555
|
-
var isValidInput = false;
|
|
11556
|
-
if (inputValue.startsWith("00")) {
|
|
11557
|
-
return;
|
|
11558
|
-
}
|
|
11559
|
-
var numericInput = disableMacros ? inputValue : inputValue.replace(/([0-9.]+)([kmbtKMBT])/, function (_, num, unit) {
|
|
11560
|
-
return (parseFloat(num) * currencyMultiplier[unit.toLowerCase()]).toString();
|
|
11561
|
-
});
|
|
11562
|
-
var regexString = `^(-?\\d{0,9}(?:[${thousandSeparator}]?\\d{0,3})*(?:\\${decimalSeparator}\\d{0,${decimalLength}})?)?$`;
|
|
11563
|
-
if (thousandSeparator === ",") {
|
|
11564
|
-
isValidInput = new RegExp(regexString).test(numericInput);
|
|
11565
|
-
}
|
|
11566
|
-
if (thousandSeparator === ".") {
|
|
11567
|
-
isValidInput = new RegExp(regexString).test(numericInput);
|
|
11568
|
-
}
|
|
11569
|
-
if (!isValidInput) {
|
|
11570
|
-
return;
|
|
11571
|
-
}
|
|
11572
|
-
setFormatted(numericInput);
|
|
11573
|
-
onValueChange && onValueChange(numericInput);
|
|
11574
|
-
};
|
|
11575
|
-
var handleKeyDown = function handleKeyDown(e) {
|
|
11576
|
-
var key = e.key;
|
|
11577
|
-
var _step = parseFloat(String(step));
|
|
11578
|
-
if (key === "Escape") {
|
|
11579
|
-
handleInputBlur();
|
|
11580
|
-
}
|
|
11581
|
-
if (key === "ArrowUp") {
|
|
11582
|
-
e.preventDefault();
|
|
11583
|
-
updateValue("increment", _step);
|
|
11584
|
-
}
|
|
11585
|
-
if (key === "ArrowDown") {
|
|
11586
|
-
e.preventDefault();
|
|
11587
|
-
updateValue("decrement", _step);
|
|
11588
|
-
}
|
|
11589
|
-
if ((e.metaKey || e.ctrlKey) && e.key === "a") {
|
|
11590
|
-
handleSelect();
|
|
11591
|
-
}
|
|
11592
|
-
if (decimalLength === 0 && e.key === decimalSeparator) {
|
|
11593
|
-
e.preventDefault();
|
|
11594
|
-
}
|
|
11595
|
-
onKeyDown && onKeyDown(e);
|
|
11596
|
-
};
|
|
11597
|
-
var handleBlur = function handleBlur(e) {
|
|
11598
|
-
if (disableAbbreviation) {
|
|
11599
|
-
setFormatted(formattedValue);
|
|
11569
|
+
unformattedValue = _useState6[0],
|
|
11570
|
+
setUnformattedValue = _useState6[1];
|
|
11571
|
+
var _useState7 = React.useState(false),
|
|
11572
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
11573
|
+
focused = _useState8[0],
|
|
11574
|
+
setFocused = _useState8[1];
|
|
11575
|
+
var escapeRef = React.useRef(false);
|
|
11576
|
+
var handleBlur = React.useCallback(function (e) {
|
|
11577
|
+
if (escapeRef.current) {
|
|
11578
|
+
setCurrentValue(prevValue);
|
|
11579
|
+
setUnformattedValue(prevValue);
|
|
11600
11580
|
} else {
|
|
11601
|
-
|
|
11581
|
+
if (e.target.value.trim().length > 0 && prevValue !== e.target.value) {
|
|
11582
|
+
var _value = disableAbbreviation ? currentValue : formatNumber(currentValue, thousandSeparator);
|
|
11583
|
+
setPrevValue(_value);
|
|
11584
|
+
setUnformattedValue(currentValue);
|
|
11585
|
+
setCurrentValue(_value);
|
|
11586
|
+
typeof onSave === "function" && onSave(e);
|
|
11587
|
+
} else {
|
|
11588
|
+
if (!allowEmptyValue) {
|
|
11589
|
+
setCurrentValue(prevValue);
|
|
11590
|
+
setUnformattedValue(prevValue);
|
|
11591
|
+
typeof onCancel === "function" && onCancel(e);
|
|
11592
|
+
} else {
|
|
11593
|
+
if (typeof onSave === "function" && prevValue !== e.target.value) {
|
|
11594
|
+
onSave(e);
|
|
11595
|
+
} else {
|
|
11596
|
+
typeof onCancel === "function" && onCancel(e);
|
|
11597
|
+
}
|
|
11598
|
+
}
|
|
11599
|
+
}
|
|
11602
11600
|
}
|
|
11603
|
-
setRootValue(formattedValue);
|
|
11604
11601
|
setFocused(false);
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
setFormatted(rootValue);
|
|
11609
|
-
setFocused(true);
|
|
11610
|
-
onFocus && onFocus(e);
|
|
11611
|
-
};
|
|
11612
|
-
var updateValue = function updateValue(type, step) {
|
|
11613
|
-
var value = String(formattedValue);
|
|
11602
|
+
}, [allowEmptyValue, disableAbbreviation, onCancel, onSave, prevValue, thousandSeparator, currentValue]);
|
|
11603
|
+
var updateValue = React.useCallback(function (type) {
|
|
11604
|
+
var value = String(unformattedValue);
|
|
11614
11605
|
var decimalPart = "";
|
|
11615
11606
|
var increasedValue = 0;
|
|
11616
11607
|
var nonDecimalPart = value.replaceAll(thousandSeparator, "");
|
|
@@ -11632,21 +11623,104 @@
|
|
|
11632
11623
|
increasedValue = parseFloat(increasedValue.toFixed(decimalLength));
|
|
11633
11624
|
}
|
|
11634
11625
|
var joinedValue = numberWithSeparator(increasedValue, thousandSeparator, value.includes(thousandSeparator));
|
|
11635
|
-
|
|
11636
|
-
|
|
11626
|
+
setUnformattedValue(decimalPart ? joinedValue + decimalPart : joinedValue);
|
|
11627
|
+
setCurrentValue(decimalPart ? joinedValue + decimalPart : joinedValue);
|
|
11628
|
+
}, [decimalLength, decimalSeparator, step, thousandSeparator, unformattedValue]);
|
|
11629
|
+
var handleKeyDown = React.useCallback(function (e) {
|
|
11630
|
+
if (e.key === "Enter") {
|
|
11631
|
+
e.target.blur();
|
|
11632
|
+
if (typeof onEnterKeyPress === "function") onEnterKeyPress(e.target.value);
|
|
11633
|
+
}
|
|
11634
|
+
if (e.key === "ArrowLeft") {
|
|
11635
|
+
return;
|
|
11636
|
+
}
|
|
11637
|
+
if (e.key === "ArrowRight") {
|
|
11638
|
+
return;
|
|
11639
|
+
}
|
|
11640
|
+
if (e.key === "ArrowUp") {
|
|
11641
|
+
e.preventDefault();
|
|
11642
|
+
updateValue("increment");
|
|
11643
|
+
}
|
|
11644
|
+
if (e.key === "ArrowDown") {
|
|
11645
|
+
e.preventDefault();
|
|
11646
|
+
updateValue("decrement");
|
|
11647
|
+
}
|
|
11648
|
+
if (e.key === "Escape") {
|
|
11649
|
+
escapeRef.current = true;
|
|
11650
|
+
e.target.blur();
|
|
11651
|
+
typeof onCancel === "function" && onCancel(e);
|
|
11652
|
+
escapeRef.current = false;
|
|
11653
|
+
}
|
|
11654
|
+
if (e.key === "Backspace") {
|
|
11655
|
+
return;
|
|
11656
|
+
}
|
|
11657
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "a") {
|
|
11658
|
+
var _inputRef$current;
|
|
11659
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.select();
|
|
11660
|
+
return;
|
|
11661
|
+
}
|
|
11662
|
+
if (e.key === "Tab") {
|
|
11663
|
+
return;
|
|
11664
|
+
}
|
|
11665
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "v") {
|
|
11666
|
+
e.preventDefault();
|
|
11667
|
+
return;
|
|
11668
|
+
}
|
|
11669
|
+
var input = e.target;
|
|
11670
|
+
var currentValue = input.value;
|
|
11671
|
+
var start = input.selectionStart;
|
|
11672
|
+
var end = input.selectionEnd;
|
|
11673
|
+
var newValue = currentValue.substring(0, start) + e.key + currentValue.substring(end);
|
|
11674
|
+
if (!validation(newValue, Boolean(disableMacros), decimalSeparator, decimalLength !== null && decimalLength !== void 0 ? decimalLength : 0, limit)) {
|
|
11675
|
+
e.preventDefault();
|
|
11676
|
+
return;
|
|
11677
|
+
}
|
|
11678
|
+
}, [decimalLength, decimalSeparator, disableMacros, inputRef, limit, onCancel, onEnterKeyPress, updateValue, validation]);
|
|
11679
|
+
var handleChange = React.useCallback(function (e) {
|
|
11680
|
+
var inputValue = e.target.value;
|
|
11681
|
+
var numericInput = disableMacros ? inputValue : inputValue.replace(/([0-9.]+)([kmbtKMBT])/, function (_, num, unit) {
|
|
11682
|
+
return (parseFloat(num) * currencyMultiplier[unit.toLowerCase()]).toString();
|
|
11683
|
+
});
|
|
11684
|
+
setCurrentValue(numericInput);
|
|
11685
|
+
setUnformattedValue(numericInput);
|
|
11686
|
+
if (onChange) onChange(numericInput);
|
|
11687
|
+
}, [disableMacros, onChange]);
|
|
11688
|
+
var handleClick = React.useCallback(function (e) {
|
|
11689
|
+
if (typeof onClick === "function") {
|
|
11690
|
+
onClick(e);
|
|
11691
|
+
}
|
|
11692
|
+
}, [onClick]);
|
|
11693
|
+
var handleFocus = React.useCallback(function () {
|
|
11694
|
+
setCurrentValue(unformattedValue);
|
|
11695
|
+
setFocused(true);
|
|
11696
|
+
}, [unformattedValue]);
|
|
11697
|
+
var handleDoubleClick = React.useCallback(function () {
|
|
11698
|
+
if (inputRef.current) {
|
|
11699
|
+
var _inputRef$current2;
|
|
11700
|
+
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.select();
|
|
11701
|
+
}
|
|
11702
|
+
}, [inputRef]);
|
|
11703
|
+
var inputProps = React.useMemo(function () {
|
|
11704
|
+
return {
|
|
11705
|
+
value: currentValue,
|
|
11706
|
+
onBlur: handleBlur,
|
|
11707
|
+
onKeyDown: handleKeyDown,
|
|
11708
|
+
onChange: handleChange,
|
|
11709
|
+
onClick: handleClick,
|
|
11710
|
+
onDoubleClick: handleDoubleClick,
|
|
11711
|
+
onFocus: handleFocus,
|
|
11712
|
+
focused,
|
|
11713
|
+
unformattedValue
|
|
11714
|
+
};
|
|
11715
|
+
}, [currentValue, handleBlur, handleKeyDown, handleChange, handleClick, handleDoubleClick, handleFocus, focused, unformattedValue]);
|
|
11637
11716
|
return {
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
handleChange,
|
|
11642
|
-
handleKeyDown,
|
|
11643
|
-
handleBlur,
|
|
11644
|
-
handleFocus,
|
|
11645
|
-
onValueChange
|
|
11717
|
+
inputProps,
|
|
11718
|
+
setCurrentValue,
|
|
11719
|
+
setPrevValue
|
|
11646
11720
|
};
|
|
11647
11721
|
};
|
|
11648
11722
|
|
|
11649
|
-
var _excluded$
|
|
11723
|
+
var _excluded$M = ["as", "className", "invert", "style"];
|
|
11650
11724
|
var ScrollElement = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11651
11725
|
var _ref$as = _ref.as,
|
|
11652
11726
|
as = _ref$as === void 0 ? "div" : _ref$as,
|
|
@@ -11654,7 +11728,7 @@
|
|
|
11654
11728
|
_ref$invert = _ref.invert,
|
|
11655
11729
|
invert = _ref$invert === void 0 ? false : _ref$invert,
|
|
11656
11730
|
style = _ref.style,
|
|
11657
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11731
|
+
rest = _objectWithoutProperties(_ref, _excluded$M);
|
|
11658
11732
|
var internalRef = useInitScrollRef(null, invert);
|
|
11659
11733
|
var handleRef = useForkRef(internalRef, ref);
|
|
11660
11734
|
var props = _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
@@ -12282,7 +12356,7 @@
|
|
|
12282
12356
|
componentId: "sc-9x4q7e-0"
|
|
12283
12357
|
})(["cursor:auto"]);
|
|
12284
12358
|
|
|
12285
|
-
var _excluded$
|
|
12359
|
+
var _excluded$L = ["type", "mode", "target", "options", "selected", "position", "onChange", "placeholder", "emptyAction", "disableSearch", "forceCloseMenu", "selectClassName", "keepSameOptionsOrder", "onSelectOpen", "onSelectClose", "renderOption", "handleDefaultOptionChange", "preselectDefaultValue", "startAdornment", "endAdornment", "focusInput"];
|
|
12286
12360
|
var Select = function Select(_ref) {
|
|
12287
12361
|
var _ref$type = _ref.type,
|
|
12288
12362
|
type = _ref$type === void 0 ? "single" : _ref$type,
|
|
@@ -12318,7 +12392,7 @@
|
|
|
12318
12392
|
endAdornment = _ref.endAdornment,
|
|
12319
12393
|
_ref$focusInput = _ref.focusInput,
|
|
12320
12394
|
focusInput = _ref$focusInput === void 0 ? false : _ref$focusInput,
|
|
12321
|
-
prop = _objectWithoutProperties(_ref, _excluded$
|
|
12395
|
+
prop = _objectWithoutProperties(_ref, _excluded$L);
|
|
12322
12396
|
if (disableSearch && (startAdornment || endAdornment)) {
|
|
12323
12397
|
console.warn("Adornments are not visible when search bar is hidden");
|
|
12324
12398
|
}
|
|
@@ -12749,7 +12823,7 @@
|
|
|
12749
12823
|
};
|
|
12750
12824
|
Nav.displayName = "Nav";
|
|
12751
12825
|
|
|
12752
|
-
var _excluded$
|
|
12826
|
+
var _excluded$K = ["children", "as", "disablePointerEvents"];
|
|
12753
12827
|
var InputAdornmentBase = styled__default["default"].div.withConfig({
|
|
12754
12828
|
displayName: "InputAdornment__InputAdornmentBase",
|
|
12755
12829
|
componentId: "sc-1xfjx1z-0"
|
|
@@ -12766,7 +12840,7 @@
|
|
|
12766
12840
|
var children = _ref.children,
|
|
12767
12841
|
as = _ref.as,
|
|
12768
12842
|
disablePointerEvents = _ref.disablePointerEvents,
|
|
12769
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12843
|
+
rest = _objectWithoutProperties(_ref, _excluded$K);
|
|
12770
12844
|
var Component = as || "div";
|
|
12771
12845
|
return /*#__PURE__*/React__default["default"].createElement(InputAdornmentBase, _extends({}, rest, {
|
|
12772
12846
|
as: Component,
|
|
@@ -13001,7 +13075,7 @@
|
|
|
13001
13075
|
};
|
|
13002
13076
|
};
|
|
13003
13077
|
|
|
13004
|
-
var _excluded$
|
|
13078
|
+
var _excluded$J = ["value", "onCancel", "onSave", "onEnterKeyPress", "allowEmptyValue", "withLeadingZero", "validation", "incrementOnlySelected", "minuteIncrement", "className", "onChange", "onClick", "align"];
|
|
13005
13079
|
var InputHours = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
13006
13080
|
var defaultValue = _ref.value,
|
|
13007
13081
|
onCancel = _ref.onCancel,
|
|
@@ -13021,7 +13095,7 @@
|
|
|
13021
13095
|
externalOnClick = _ref.onClick,
|
|
13022
13096
|
_ref$align = _ref.align,
|
|
13023
13097
|
align = _ref$align === void 0 ? "center" : _ref$align,
|
|
13024
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13098
|
+
rest = _objectWithoutProperties(_ref, _excluded$J);
|
|
13025
13099
|
var inputRef = React.useRef(null);
|
|
13026
13100
|
var handleRef = useForkRef(ref, inputRef);
|
|
13027
13101
|
var _useInputHours = useInputHours({
|
|
@@ -13060,6 +13134,85 @@
|
|
|
13060
13134
|
});
|
|
13061
13135
|
InputHours.displayName = "InputHours";
|
|
13062
13136
|
|
|
13137
|
+
var _excluded$I = ["decimalLength", "decimalSeparator", "disableAbbreviation", "disabled", "disableMacros", "invalid", "step", "thousandSeparator", "value", "onCancel", "onSave", "onEnterKeyPress", "allowEmptyValue", "onChange", "onClick", "limit"];
|
|
13138
|
+
var InputNumber = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13139
|
+
var _ref$decimalLength = _ref.decimalLength,
|
|
13140
|
+
decimalLength = _ref$decimalLength === void 0 ? 2 : _ref$decimalLength,
|
|
13141
|
+
_ref$decimalSeparator = _ref.decimalSeparator,
|
|
13142
|
+
decimalSeparator = _ref$decimalSeparator === void 0 ? "." : _ref$decimalSeparator,
|
|
13143
|
+
_ref$disableAbbreviat = _ref.disableAbbreviation,
|
|
13144
|
+
disableAbbreviation = _ref$disableAbbreviat === void 0 ? false : _ref$disableAbbreviat,
|
|
13145
|
+
disabled = _ref.disabled,
|
|
13146
|
+
_ref$disableMacros = _ref.disableMacros,
|
|
13147
|
+
disableMacros = _ref$disableMacros === void 0 ? false : _ref$disableMacros,
|
|
13148
|
+
invalid = _ref.invalid,
|
|
13149
|
+
_ref$step = _ref.step,
|
|
13150
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
13151
|
+
_ref$thousandSeparato = _ref.thousandSeparator,
|
|
13152
|
+
thousandSeparator = _ref$thousandSeparato === void 0 ? "," : _ref$thousandSeparato,
|
|
13153
|
+
defaultValue = _ref.value,
|
|
13154
|
+
onCancel = _ref.onCancel,
|
|
13155
|
+
onSave = _ref.onSave,
|
|
13156
|
+
externalEnterKeyPress = _ref.onEnterKeyPress,
|
|
13157
|
+
allowEmptyValue = _ref.allowEmptyValue,
|
|
13158
|
+
externalOnChange = _ref.onChange,
|
|
13159
|
+
externalOnClick = _ref.onClick,
|
|
13160
|
+
limit = _ref.limit,
|
|
13161
|
+
rest = _objectWithoutProperties(_ref, _excluded$I);
|
|
13162
|
+
var inputRef = React.useRef(null);
|
|
13163
|
+
var handleRef = useForkRef(ref, inputRef);
|
|
13164
|
+
var _useInputNumber = useInputNumber({
|
|
13165
|
+
decimalLength,
|
|
13166
|
+
decimalSeparator,
|
|
13167
|
+
disableAbbreviation,
|
|
13168
|
+
disableMacros,
|
|
13169
|
+
step,
|
|
13170
|
+
thousandSeparator,
|
|
13171
|
+
onEnterKeyPress: externalEnterKeyPress,
|
|
13172
|
+
onChange: externalOnChange,
|
|
13173
|
+
onClick: externalOnClick,
|
|
13174
|
+
value: defaultValue,
|
|
13175
|
+
onCancel,
|
|
13176
|
+
onSave,
|
|
13177
|
+
allowEmptyValue,
|
|
13178
|
+
limit
|
|
13179
|
+
}, inputRef),
|
|
13180
|
+
inputProps = _useInputNumber.inputProps;
|
|
13181
|
+
var value = inputProps.value,
|
|
13182
|
+
onBlur = inputProps.onBlur,
|
|
13183
|
+
onKeyDown = inputProps.onKeyDown,
|
|
13184
|
+
onChange = inputProps.onChange,
|
|
13185
|
+
onClick = inputProps.onClick,
|
|
13186
|
+
onDoubleClick = inputProps.onDoubleClick,
|
|
13187
|
+
onFocus = inputProps.onFocus;
|
|
13188
|
+
return /*#__PURE__*/React__default["default"].createElement(Input, _extends({}, rest, {
|
|
13189
|
+
ref: handleRef,
|
|
13190
|
+
placeholder: `5000${decimalSeparator}00`,
|
|
13191
|
+
value: value,
|
|
13192
|
+
type: "text",
|
|
13193
|
+
disabled: disabled,
|
|
13194
|
+
invalid: invalid,
|
|
13195
|
+
onChange: onChange,
|
|
13196
|
+
onBlur: onBlur,
|
|
13197
|
+
onKeyDown: onKeyDown,
|
|
13198
|
+
onClick: onClick,
|
|
13199
|
+
onDoubleClick: onDoubleClick,
|
|
13200
|
+
onFocus: onFocus,
|
|
13201
|
+
"aria-placeholder": `5${thousandSeparator}000${decimalSeparator}00`,
|
|
13202
|
+
"aria-disabled": disabled,
|
|
13203
|
+
"aria-invalid": invalid
|
|
13204
|
+
}));
|
|
13205
|
+
});
|
|
13206
|
+
InputNumber.displayName = "InputNumber";
|
|
13207
|
+
|
|
13208
|
+
var InputCurrency = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13209
|
+
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
13210
|
+
return /*#__PURE__*/React__default["default"].createElement(InputNumber, _extends({
|
|
13211
|
+
ref: ref
|
|
13212
|
+
}, rest));
|
|
13213
|
+
});
|
|
13214
|
+
InputCurrency.displayName = "InputCurrency";
|
|
13215
|
+
|
|
13063
13216
|
var _excluded$H = ["expanded"];
|
|
13064
13217
|
var ExpandAll = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13065
13218
|
var _ref$expanded = _ref.expanded,
|
|
@@ -16773,8 +16926,8 @@
|
|
|
16773
16926
|
});
|
|
16774
16927
|
EditableHours.displayName = "EditableHours";
|
|
16775
16928
|
|
|
16776
|
-
var _excluded$c = ["decimalLength", "decimalSeparator", "disableAbbreviation", "disabled", "disableMacros", "
|
|
16777
|
-
var EditableCurrency = /*#__PURE__*/
|
|
16929
|
+
var _excluded$c = ["decimalLength", "decimalSeparator", "disableAbbreviation", "disabled", "disableMacros", "step", "thousandSeparator", "value", "onSave", "onCancel", "className", "allowEmptyValue", "onEnterKeyPress", "onClick", "onChange", "limit"];
|
|
16930
|
+
var EditableCurrency = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
16778
16931
|
var _ref$decimalLength = _ref.decimalLength,
|
|
16779
16932
|
decimalLength = _ref$decimalLength === void 0 ? 2 : _ref$decimalLength,
|
|
16780
16933
|
_ref$decimalSeparator = _ref.decimalSeparator,
|
|
@@ -16784,13 +16937,19 @@
|
|
|
16784
16937
|
disabled = _ref.disabled,
|
|
16785
16938
|
_ref$disableMacros = _ref.disableMacros,
|
|
16786
16939
|
disableMacros = _ref$disableMacros === void 0 ? false : _ref$disableMacros,
|
|
16787
|
-
onValueChange = _ref.onValueChange,
|
|
16788
16940
|
_ref$step = _ref.step,
|
|
16789
16941
|
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
16790
16942
|
_ref$thousandSeparato = _ref.thousandSeparator,
|
|
16791
16943
|
thousandSeparator = _ref$thousandSeparato === void 0 ? "," : _ref$thousandSeparato,
|
|
16792
|
-
|
|
16944
|
+
defaultValue = _ref.value,
|
|
16945
|
+
onSave = _ref.onSave,
|
|
16946
|
+
onCancel = _ref.onCancel,
|
|
16793
16947
|
className = _ref.className,
|
|
16948
|
+
allowEmptyValue = _ref.allowEmptyValue,
|
|
16949
|
+
externalEnterKeyPress = _ref.onEnterKeyPress,
|
|
16950
|
+
externalOnClick = _ref.onClick,
|
|
16951
|
+
externalOnChange = _ref.onChange,
|
|
16952
|
+
limit = _ref.limit,
|
|
16794
16953
|
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
16795
16954
|
var inputRef = React.useRef(null);
|
|
16796
16955
|
var handleRef = useForkRef(ref, inputRef);
|
|
@@ -16799,20 +16958,32 @@
|
|
|
16799
16958
|
decimalSeparator,
|
|
16800
16959
|
disableAbbreviation,
|
|
16801
16960
|
disableMacros,
|
|
16802
|
-
onValueChange,
|
|
16803
16961
|
step,
|
|
16804
16962
|
thousandSeparator,
|
|
16805
|
-
value
|
|
16963
|
+
value: defaultValue,
|
|
16964
|
+
onSave,
|
|
16965
|
+
allowEmptyValue,
|
|
16966
|
+
onCancel,
|
|
16967
|
+
onChange: externalOnChange,
|
|
16968
|
+
onEnterKeyPress: externalEnterKeyPress,
|
|
16969
|
+
onClick: externalOnClick,
|
|
16970
|
+
limit
|
|
16806
16971
|
}, inputRef),
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16972
|
+
inputProps = _useInputNumber.inputProps;
|
|
16973
|
+
var value = inputProps.value,
|
|
16974
|
+
onBlur = inputProps.onBlur,
|
|
16975
|
+
onKeyDown = inputProps.onKeyDown,
|
|
16976
|
+
onChange = inputProps.onChange,
|
|
16977
|
+
onClick = inputProps.onClick,
|
|
16978
|
+
onDoubleClick = inputProps.onDoubleClick,
|
|
16979
|
+
onFocus = inputProps.onFocus,
|
|
16980
|
+
focused = inputProps.focused,
|
|
16981
|
+
unformattedValue = inputProps.unformattedValue;
|
|
16982
|
+
var formattedValue = React.useMemo(function () {
|
|
16983
|
+
return focused ? value : numberWithSeparator(value !== null && value !== void 0 ? value : "", thousandSeparator);
|
|
16984
|
+
}, [focused, value, thousandSeparator]);
|
|
16814
16985
|
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
16815
|
-
title:
|
|
16986
|
+
title: unformattedValue,
|
|
16816
16987
|
disable: focused
|
|
16817
16988
|
}, /*#__PURE__*/React__default["default"].createElement(EditableContent, {
|
|
16818
16989
|
disabled: disabled,
|
|
@@ -16820,10 +16991,12 @@
|
|
|
16820
16991
|
className: className,
|
|
16821
16992
|
inputProps: _objectSpread2({
|
|
16822
16993
|
value: formattedValue,
|
|
16823
|
-
onBlur:
|
|
16824
|
-
onChange:
|
|
16825
|
-
|
|
16826
|
-
|
|
16994
|
+
onBlur: onBlur,
|
|
16995
|
+
onChange: onChange,
|
|
16996
|
+
onKeyDown: onKeyDown,
|
|
16997
|
+
onClick: onClick,
|
|
16998
|
+
onFocus: onFocus,
|
|
16999
|
+
onDoubleClick: onDoubleClick
|
|
16827
17000
|
}, rest)
|
|
16828
17001
|
}));
|
|
16829
17002
|
});
|
|
@@ -18411,7 +18584,9 @@
|
|
|
18411
18584
|
exports.InfoSmallIcon = InfoSmallIcon$1;
|
|
18412
18585
|
exports.Input = Input;
|
|
18413
18586
|
exports.InputAdornment = InputAdornment;
|
|
18587
|
+
exports.InputCurrency = InputCurrency;
|
|
18414
18588
|
exports.InputHours = InputHours;
|
|
18589
|
+
exports.InputNumber = InputNumber;
|
|
18415
18590
|
exports.InsertLinkIcon = InsertLinkIcon$1;
|
|
18416
18591
|
exports.IntegrationsIcon = IntegrationsIcon$1;
|
|
18417
18592
|
exports.InvoicesIcon = InvoicesIcon$1;
|
|
@@ -18572,7 +18747,7 @@
|
|
|
18572
18747
|
exports._List = _List;
|
|
18573
18748
|
exports.colors = colors$1;
|
|
18574
18749
|
exports.decimalToHours = decimalToHours;
|
|
18575
|
-
exports.
|
|
18750
|
+
exports.formatNumber = formatNumber;
|
|
18576
18751
|
exports.isOptionGroup = isOptionGroup;
|
|
18577
18752
|
exports.layers = layers;
|
|
18578
18753
|
exports.numberWithSeparator = numberWithSeparator;
|
|
@@ -18586,6 +18761,7 @@
|
|
|
18586
18761
|
exports.useMenuContext = useMenuContext;
|
|
18587
18762
|
exports.useResizeObserver = useResizeObserver$1;
|
|
18588
18763
|
exports.useWizardContext = useWizardContext;
|
|
18764
|
+
exports.validateNumberInput = validateNumberInput;
|
|
18589
18765
|
exports.validateStopwatchTime = validateStopwatchTime;
|
|
18590
18766
|
exports.validateTimeInput = validateTimeInput;
|
|
18591
18767
|
|