@7shifts/sous-chef 3.11.2 → 3.12.0
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/forms/TimeField/TimeField.d.ts +18 -7
- package/dist/forms/TimeField/TimeFieldDropdown/TimeFieldDropdown.d.ts +4 -3
- package/dist/forms/TimeField/TimeFieldDropdownTrigger/TimeFieldDropdownTrigger.d.ts +3 -3
- package/dist/forms/TimeField/TimeFieldInput/TimeFieldInput.d.ts +5 -1
- package/dist/forms/TimeField/domain.d.ts +2 -1
- package/dist/forms/TimeRangeField/TimeRangeEnd/TimeRangeEnd.d.ts +5 -0
- package/dist/forms/TimeRangeField/TimeRangeEnd/index.d.ts +1 -0
- package/dist/forms/TimeRangeField/TimeRangeField.d.ts +20 -0
- package/dist/forms/TimeRangeField/TimeRangeStart/TimeRangeStart.d.ts +5 -0
- package/dist/forms/TimeRangeField/TimeRangeStart/index.d.ts +1 -0
- package/dist/forms/TimeRangeField/index.d.ts +1 -0
- package/dist/forms/TimeRangeField/types.d.ts +9 -0
- package/dist/forms/index.d.ts +2 -1
- package/dist/foundation/color-constants.d.ts +1 -0
- package/dist/foundation/domain.d.ts +1 -0
- package/dist/index.css +574 -507
- package/dist/index.js +1222 -1034
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1222 -1035
- package/dist/index.modern.js.map +1 -1
- package/dist/typography/Text/Text.d.ts +3 -2
- package/dist/utils/date.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.modern.js
CHANGED
|
@@ -3,14 +3,14 @@ import classnames from 'classnames';
|
|
|
3
3
|
import { toast as toast$1, ToastContainer as ToastContainer$1, Slide } from 'react-toastify';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
5
|
import 'react-toastify/dist/ReactToastify.css';
|
|
6
|
+
import { debounce } from 'lodash-es';
|
|
7
|
+
import parseTime from 'time-autocomplete/src/core/AMPMParser';
|
|
6
8
|
import ReactModal from 'react-modal';
|
|
7
9
|
import DayPicker, { DateUtils } from 'react-day-picker';
|
|
8
10
|
import 'react-day-picker/lib/style.css';
|
|
9
11
|
import dateFnsFormat from 'date-fns/format';
|
|
10
12
|
import dateFnsParse from 'date-fns/parse';
|
|
11
13
|
import startOfDay from 'date-fns/startOfDay';
|
|
12
|
-
import { debounce } from 'lodash-es';
|
|
13
|
-
import parseTime from 'time-autocomplete/src/core/AMPMParser';
|
|
14
14
|
import Select, { components } from 'react-select';
|
|
15
15
|
import { Link as Link$1 } from 'react-router-dom';
|
|
16
16
|
import AsyncSelect from 'react-select/async';
|
|
@@ -4517,518 +4517,697 @@ var DROPDOWN_TRIGGER = {
|
|
|
4517
4517
|
CLICK: 'click'
|
|
4518
4518
|
};
|
|
4519
4519
|
|
|
4520
|
-
var styles$d = {"
|
|
4521
|
-
|
|
4522
|
-
var styles$e = {"header":"_36nxW","header__close-button":"_2zYre","sub-header":"_2XwRD"};
|
|
4523
|
-
|
|
4524
|
-
var ModalHeader = function ModalHeader(_ref) {
|
|
4525
|
-
var header = _ref.header,
|
|
4526
|
-
subHeader = _ref.subHeader,
|
|
4527
|
-
onClose = _ref.onClose,
|
|
4528
|
-
loading = _ref.loading;
|
|
4529
|
-
|
|
4530
|
-
if (!header && !subHeader) {
|
|
4531
|
-
return onClose ? React__default.createElement("div", {
|
|
4532
|
-
className: styles$e['header__close-button']
|
|
4533
|
-
}, React__default.createElement(Button$1, {
|
|
4534
|
-
theme: "link-icon",
|
|
4535
|
-
onClick: onClose,
|
|
4536
|
-
disabled: loading
|
|
4537
|
-
}, React__default.createElement(IconTimes, null))) : null;
|
|
4538
|
-
}
|
|
4520
|
+
var styles$d = {"label":"_h724f","label--truncate":"_1VUoF"};
|
|
4539
4521
|
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
marginBottom: 24
|
|
4543
|
-
}, React__default.createElement(Inline, {
|
|
4544
|
-
flex: [1],
|
|
4545
|
-
alignItems: "center"
|
|
4546
|
-
}, React__default.createElement("span", {
|
|
4547
|
-
className: styles$e['header']
|
|
4548
|
-
}, header), onClose && React__default.createElement(Button$1, {
|
|
4549
|
-
theme: "link-icon",
|
|
4550
|
-
onClick: onClose,
|
|
4551
|
-
disabled: loading
|
|
4552
|
-
}, React__default.createElement(IconTimes, null))), subHeader && React__default.createElement("div", {
|
|
4553
|
-
className: styles$e['sub-header']
|
|
4554
|
-
}, subHeader));
|
|
4522
|
+
var isEllipsisActive = function isEllipsisActive(e) {
|
|
4523
|
+
return e.offsetWidth < e.scrollWidth;
|
|
4555
4524
|
};
|
|
4556
4525
|
|
|
4557
|
-
var
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
var context = useContext(ModalContext);
|
|
4562
|
-
return context || {};
|
|
4563
|
-
};
|
|
4526
|
+
var useLabelTooltip = function useLabelTooltip(labelId, tooltipContent, truncate) {
|
|
4527
|
+
var _useState = useState(false),
|
|
4528
|
+
showTooltip = _useState[0],
|
|
4529
|
+
setShowTooltip = _useState[1];
|
|
4564
4530
|
|
|
4565
|
-
var
|
|
4566
|
-
var
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
_ref$zIndex = _ref.zIndex,
|
|
4572
|
-
zIndex = _ref$zIndex === void 0 ? Z_INDEX_LAYERS.MODAL : _ref$zIndex,
|
|
4573
|
-
rootElementId = _ref.rootElementId,
|
|
4574
|
-
_ref$width = _ref.width,
|
|
4575
|
-
width = _ref$width === void 0 ? 500 : _ref$width,
|
|
4576
|
-
height = _ref.height,
|
|
4577
|
-
maxWidth = _ref.maxWidth,
|
|
4578
|
-
_ref$shouldReturnFocu = _ref.shouldReturnFocusAfterClose,
|
|
4579
|
-
shouldReturnFocusAfterClose = _ref$shouldReturnFocu === void 0 ? true : _ref$shouldReturnFocu,
|
|
4580
|
-
testId = _ref.testId;
|
|
4581
|
-
var style = {
|
|
4582
|
-
content: {
|
|
4583
|
-
width: width,
|
|
4584
|
-
height: height,
|
|
4585
|
-
maxWidth: maxWidth
|
|
4586
|
-
},
|
|
4587
|
-
overlay: {
|
|
4588
|
-
zIndex: zIndex
|
|
4589
|
-
}
|
|
4590
|
-
};
|
|
4591
|
-
return React__default.createElement(ReactModal, {
|
|
4592
|
-
isOpen: true,
|
|
4593
|
-
testId: testId,
|
|
4594
|
-
shouldCloseOnEsc: true,
|
|
4595
|
-
shouldCloseOnOverlayClick: false,
|
|
4596
|
-
shouldReturnFocusAfterClose: shouldReturnFocusAfterClose,
|
|
4597
|
-
onRequestClose: onClose && !loading ? onClose : undefined,
|
|
4598
|
-
style: style,
|
|
4599
|
-
closeTimeoutMS: 200,
|
|
4600
|
-
contentLabel: "Modal",
|
|
4601
|
-
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
4602
|
-
overlayClassName: {
|
|
4603
|
-
base: styles$d['overlay'],
|
|
4604
|
-
afterOpen: styles$d['overlay--after-open'],
|
|
4605
|
-
beforeClose: styles$d['overlay--before-close']
|
|
4606
|
-
},
|
|
4607
|
-
className: {
|
|
4608
|
-
base: styles$d['content'],
|
|
4609
|
-
afterOpen: styles$d['content--after-open'],
|
|
4610
|
-
beforeClose: styles$d['content--before-close']
|
|
4611
|
-
}
|
|
4612
|
-
}, React__default.createElement(ModalHeader, {
|
|
4613
|
-
header: header,
|
|
4614
|
-
subHeader: subHeader,
|
|
4615
|
-
onClose: onClose,
|
|
4616
|
-
loading: loading
|
|
4617
|
-
}), React__default.createElement(ModalContext.Provider, {
|
|
4618
|
-
value: {
|
|
4619
|
-
isModalMounted: true
|
|
4531
|
+
var shouldTruncate = typeof tooltipContent === 'string' && truncate;
|
|
4532
|
+
var labelElement = document.getElementById(labelId);
|
|
4533
|
+
var isHidden = labelElement && labelElement.offsetParent === null;
|
|
4534
|
+
var handleApplyTooltip = useCallback(function () {
|
|
4535
|
+
if (!shouldTruncate) {
|
|
4536
|
+
return;
|
|
4620
4537
|
}
|
|
4621
|
-
}, children));
|
|
4622
|
-
};
|
|
4623
|
-
|
|
4624
|
-
Modal.setAppElement = function (rootElement) {
|
|
4625
|
-
ReactModal.setAppElement(rootElement);
|
|
4626
|
-
};
|
|
4627
|
-
|
|
4628
|
-
var THRESHOLD = 20;
|
|
4629
|
-
var useScrollShadow = function useScrollShadow() {
|
|
4630
|
-
var ref = useRef(null);
|
|
4631
4538
|
|
|
4632
|
-
|
|
4633
|
-
showScrollShadow = _useState[0],
|
|
4634
|
-
setShowScrollShadow = _useState[1];
|
|
4539
|
+
var labelElement = document.getElementById(labelId);
|
|
4635
4540
|
|
|
4636
|
-
|
|
4637
|
-
if (!ref.current) {
|
|
4541
|
+
if (!labelElement) {
|
|
4638
4542
|
return;
|
|
4639
4543
|
}
|
|
4640
4544
|
|
|
4641
|
-
var
|
|
4545
|
+
var shouldShowTooltip = isEllipsisActive(labelElement);
|
|
4642
4546
|
|
|
4643
|
-
if (
|
|
4644
|
-
|
|
4547
|
+
if (showTooltip !== shouldShowTooltip) {
|
|
4548
|
+
setShowTooltip(shouldShowTooltip);
|
|
4645
4549
|
}
|
|
4646
|
-
}, []);
|
|
4550
|
+
}, [shouldTruncate, isHidden]);
|
|
4551
|
+
useEffect(function () {
|
|
4552
|
+
var onWindowResize = debounce(handleApplyTooltip, 300);
|
|
4553
|
+
window.addEventListener('resize', onWindowResize);
|
|
4554
|
+
return function () {
|
|
4555
|
+
return window.removeEventListener('resize', onWindowResize);
|
|
4556
|
+
};
|
|
4557
|
+
}, [handleApplyTooltip]);
|
|
4558
|
+
useLayoutEffect(handleApplyTooltip, [handleApplyTooltip]);
|
|
4647
4559
|
return {
|
|
4648
|
-
|
|
4649
|
-
|
|
4560
|
+
showTooltip: showTooltip,
|
|
4561
|
+
shouldTruncate: shouldTruncate
|
|
4650
4562
|
};
|
|
4651
4563
|
};
|
|
4652
4564
|
|
|
4653
|
-
var
|
|
4654
|
-
|
|
4655
|
-
var ModalBody = function ModalBody(_ref) {
|
|
4565
|
+
var Label = function Label(_ref) {
|
|
4656
4566
|
var _classNames;
|
|
4657
4567
|
|
|
4658
|
-
var
|
|
4659
|
-
|
|
4568
|
+
var htmlFor = _ref.htmlFor,
|
|
4569
|
+
children = _ref.children,
|
|
4570
|
+
_ref$truncate = _ref.truncate,
|
|
4571
|
+
truncate = _ref$truncate === void 0 ? true : _ref$truncate;
|
|
4572
|
+
var labelId = "label-" + htmlFor;
|
|
4660
4573
|
|
|
4661
|
-
var
|
|
4662
|
-
|
|
4663
|
-
|
|
4574
|
+
var _useLabelTooltip = useLabelTooltip(labelId, children, truncate),
|
|
4575
|
+
showTooltip = _useLabelTooltip.showTooltip,
|
|
4576
|
+
shouldTruncate = _useLabelTooltip.shouldTruncate;
|
|
4664
4577
|
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4578
|
+
var LabelElement = React__default.createElement("label", {
|
|
4579
|
+
htmlFor: htmlFor,
|
|
4580
|
+
id: labelId,
|
|
4581
|
+
className: classnames(styles$d['label'], (_classNames = {}, _classNames[styles$d['label--truncate']] = shouldTruncate, _classNames))
|
|
4669
4582
|
}, children);
|
|
4670
|
-
};
|
|
4671
|
-
|
|
4672
|
-
var styles$g = {"modal-footer":"_LKOr5","tertiary-container":"_Qktd-"};
|
|
4673
|
-
|
|
4674
|
-
var updateButtonProps = function updateButtonProps(button, newProps) {
|
|
4675
|
-
if (!button) {
|
|
4676
|
-
return null;
|
|
4677
|
-
}
|
|
4678
4583
|
|
|
4679
|
-
if (
|
|
4680
|
-
return
|
|
4584
|
+
if (showTooltip) {
|
|
4585
|
+
return React__default.createElement(Tooltip$1, {
|
|
4586
|
+
overlay: children,
|
|
4587
|
+
placement: "top"
|
|
4588
|
+
}, LabelElement);
|
|
4681
4589
|
}
|
|
4682
4590
|
|
|
4683
|
-
return
|
|
4591
|
+
return LabelElement;
|
|
4684
4592
|
};
|
|
4685
4593
|
|
|
4686
|
-
var
|
|
4687
|
-
var children = _ref.children,
|
|
4688
|
-
actions = _ref.actions,
|
|
4689
|
-
testId = _ref.testId;
|
|
4594
|
+
var styles$e = {"caption":"_1DWBq"};
|
|
4690
4595
|
|
|
4691
|
-
|
|
4692
|
-
|
|
4596
|
+
var Caption = function Caption(_ref) {
|
|
4597
|
+
var fieldId = _ref.fieldId,
|
|
4598
|
+
children = _ref.children;
|
|
4599
|
+
return React__default.createElement("div", {
|
|
4600
|
+
id: fieldId && fieldId + "-describer",
|
|
4601
|
+
className: styles$e['caption']
|
|
4602
|
+
}, children);
|
|
4603
|
+
};
|
|
4693
4604
|
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
return React__default.createElement(FooterContainer, {
|
|
4707
|
-
testId: testId
|
|
4708
|
-
}, React__default.createElement(Inline, {
|
|
4709
|
-
justifyContent: "space-between"
|
|
4710
|
-
}, React__default.createElement("div", {
|
|
4711
|
-
className: classnames((_classnames = {}, _classnames[styles$g['tertiary-container']] = tertiaryButton && tertiaryButton.props.theme.startsWith('link'), _classnames))
|
|
4712
|
-
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
4713
|
-
space: 12
|
|
4714
|
-
}, secondaryButton, primaryButton)));
|
|
4715
|
-
}
|
|
4605
|
+
var WHITE = '#ffffff';
|
|
4606
|
+
var EGGPLANT200 = '#d3dbf4';
|
|
4607
|
+
var EGGPLANT300 = '#a7b7ea';
|
|
4608
|
+
var EGGPLANT400 = '#6d87dd';
|
|
4609
|
+
var EGGPLANT500 = '#6179c6';
|
|
4610
|
+
var EGGPLANT600 = '#415184';
|
|
4611
|
+
var RADISH400 = '#e76767';
|
|
4612
|
+
var GREY100 = '#F3F3F3';
|
|
4613
|
+
var GREY200 = '#D5D5D5';
|
|
4614
|
+
var GREY300 = '#949494';
|
|
4615
|
+
var GREY400 = '#767676';
|
|
4616
|
+
var GREY500 = '#464646';
|
|
4716
4617
|
|
|
4717
|
-
|
|
4718
|
-
};
|
|
4618
|
+
var styles$f = {"error-message":"_nZ2MD"};
|
|
4719
4619
|
|
|
4720
|
-
var
|
|
4721
|
-
var
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
var hasCustomAlignment = childrenItens.length === 1 && childrenItens[0].type === Inline;
|
|
4620
|
+
var ErrorMessage = function ErrorMessage(_ref) {
|
|
4621
|
+
var fieldId = _ref.fieldId,
|
|
4622
|
+
children = _ref.children,
|
|
4623
|
+
testId = _ref.testId;
|
|
4725
4624
|
return React__default.createElement("div", {
|
|
4726
|
-
|
|
4625
|
+
id: fieldId && fieldId + "-error-message",
|
|
4626
|
+
className: styles$f['error-message'],
|
|
4727
4627
|
"data-testid": testId
|
|
4728
4628
|
}, React__default.createElement(Inline, {
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4629
|
+
space: 8,
|
|
4630
|
+
alignItems: "center"
|
|
4631
|
+
}, React__default.createElement(IconTimesOctagon, {
|
|
4632
|
+
color: RADISH400,
|
|
4633
|
+
size: "medium"
|
|
4634
|
+
}), children));
|
|
4733
4635
|
};
|
|
4734
4636
|
|
|
4735
|
-
var
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
}
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
});
|
|
4754
|
-
}
|
|
4755
|
-
function setToMidnight(date) {
|
|
4756
|
-
return date && startOfDay(date);
|
|
4757
|
-
}
|
|
4758
|
-
function getStartOfWeek(date, weekIndex) {
|
|
4759
|
-
var d = new Date(date);
|
|
4760
|
-
var firstDay = d.getDate() - d.getDay() + weekIndex;
|
|
4761
|
-
var firstDayAdjusted = firstDay > d.getDate() ? firstDay - 7 : firstDay;
|
|
4762
|
-
return new Date(d.setDate(firstDayAdjusted));
|
|
4763
|
-
}
|
|
4764
|
-
function getEndOfWeek(date, weekIndex) {
|
|
4765
|
-
var startOfWeek = getStartOfWeek(date, weekIndex);
|
|
4766
|
-
var endDay = startOfWeek.getDate() + 6;
|
|
4767
|
-
return new Date(startOfWeek.setDate(endDay));
|
|
4768
|
-
}
|
|
4769
|
-
function createWeekRange(date, weekStart) {
|
|
4770
|
-
return {
|
|
4771
|
-
start: getStartOfWeek(date, weekStart),
|
|
4772
|
-
end: getEndOfWeek(date, weekStart)
|
|
4773
|
-
};
|
|
4774
|
-
}
|
|
4775
|
-
var DAYS = [getLocalizedString('time.sunday'), getLocalizedString('time.monday'), getLocalizedString('time.tuesday'), getLocalizedString('time.wednesday'), getLocalizedString('time.thursday'), getLocalizedString('time.friday'), getLocalizedString('time.saturday')];
|
|
4776
|
-
var MONTH_NAMES = [getLocalizedString('time.january'), getLocalizedString('time.february'), getLocalizedString('time.march'), getLocalizedString('time.april'), getLocalizedString('time.may'), getLocalizedString('time.june'), getLocalizedString('time.july'), getLocalizedString('time.august'), getLocalizedString('time.september'), getLocalizedString('time.october'), getLocalizedString('time.november'), getLocalizedString('time.december')];
|
|
4637
|
+
var Field = function Field(_ref) {
|
|
4638
|
+
var id = _ref.id,
|
|
4639
|
+
label = _ref.label,
|
|
4640
|
+
caption = _ref.caption,
|
|
4641
|
+
error = _ref.error,
|
|
4642
|
+
children = _ref.children;
|
|
4643
|
+
var shouldRenderLabel = label || typeof label === 'string';
|
|
4644
|
+
return React__default.createElement(Stack, {
|
|
4645
|
+
space: 8,
|
|
4646
|
+
flexItems: true
|
|
4647
|
+
}, shouldRenderLabel && React__default.createElement(Label, {
|
|
4648
|
+
htmlFor: id
|
|
4649
|
+
}, label), children, caption && React__default.createElement(Caption, {
|
|
4650
|
+
fieldId: id
|
|
4651
|
+
}, caption), error && React__default.createElement(ErrorMessage, {
|
|
4652
|
+
fieldId: id
|
|
4653
|
+
}, error));
|
|
4654
|
+
};
|
|
4777
4655
|
|
|
4778
|
-
var
|
|
4779
|
-
|
|
4780
|
-
|
|
4656
|
+
var Context$1 = createContext({});
|
|
4657
|
+
var useFormContext = function useFormContext() {
|
|
4658
|
+
var context = useContext(Context$1);
|
|
4659
|
+
return context || {};
|
|
4781
4660
|
};
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4661
|
+
|
|
4662
|
+
var useFieldId = function useFieldId(_ref) {
|
|
4663
|
+
var name = _ref.name,
|
|
4664
|
+
inputId = _ref.id;
|
|
4665
|
+
var id = useMemo(function () {
|
|
4666
|
+
return inputId ? inputId : name + "-" + Math.random();
|
|
4667
|
+
}, [inputId, name]);
|
|
4668
|
+
return id;
|
|
4785
4669
|
};
|
|
4786
4670
|
|
|
4787
|
-
var
|
|
4788
|
-
if (
|
|
4789
|
-
return
|
|
4790
|
-
left: 0,
|
|
4791
|
-
top: 0
|
|
4792
|
-
};
|
|
4671
|
+
var getFormikState = function getFormikState(name, formik) {
|
|
4672
|
+
if (formik === undefined) {
|
|
4673
|
+
return null;
|
|
4793
4674
|
}
|
|
4794
4675
|
|
|
4795
|
-
var
|
|
4796
|
-
var verticalPosition = getVerticalPosition(anchorPosition, placement, calendarDimensions);
|
|
4797
|
-
return _extends({}, horizontalPosition, verticalPosition);
|
|
4798
|
-
};
|
|
4676
|
+
var formikPath = getFormikArrayPath(name);
|
|
4799
4677
|
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4678
|
+
if (formikPath.length === 0) {
|
|
4679
|
+
return null;
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4682
|
+
var formikLatestLevel = formikPath.reduce(function (acc, path) {
|
|
4683
|
+
var _acc$touched, _acc$error, _acc$value;
|
|
4803
4684
|
|
|
4804
|
-
if (innerWidth > calendarRight + BUFFER) {
|
|
4805
4685
|
return {
|
|
4806
|
-
|
|
4686
|
+
touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
|
|
4687
|
+
error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
|
|
4688
|
+
value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
|
|
4807
4689
|
};
|
|
4808
|
-
}
|
|
4809
|
-
|
|
4690
|
+
}, {
|
|
4691
|
+
touched: formik.touched,
|
|
4692
|
+
error: formik.errors,
|
|
4693
|
+
value: formik.values
|
|
4694
|
+
});
|
|
4810
4695
|
return {
|
|
4811
|
-
|
|
4696
|
+
error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
|
|
4697
|
+
value: formikLatestLevel.value
|
|
4812
4698
|
};
|
|
4813
4699
|
};
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
var calendarTopAboveTrigger = anchorPosition.top - calendarDimensions.height - PADDING;
|
|
4817
|
-
var calendarTopBelowTrigger = anchorPosition.bottom + PADDING;
|
|
4818
|
-
|
|
4819
|
-
if (placement === CALENDAR_PLACEMENT.TOP) {
|
|
4820
|
-
if (calendarTopAboveTrigger < 0) {
|
|
4821
|
-
return {
|
|
4822
|
-
top: anchorPosition.bottom + PADDING
|
|
4823
|
-
};
|
|
4824
|
-
}
|
|
4825
|
-
|
|
4826
|
-
return {
|
|
4827
|
-
top: calendarTopAboveTrigger + window.scrollY
|
|
4828
|
-
};
|
|
4829
|
-
} else {
|
|
4830
|
-
if (calendarTopBelowTrigger + calendarDimensions.height > window.innerHeight) {
|
|
4831
|
-
return {
|
|
4832
|
-
top: calendarTopAboveTrigger + window.scrollY
|
|
4833
|
-
};
|
|
4834
|
-
}
|
|
4835
|
-
|
|
4836
|
-
return {
|
|
4837
|
-
top: calendarTopBelowTrigger + window.scrollY
|
|
4838
|
-
};
|
|
4839
|
-
}
|
|
4700
|
+
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
4701
|
+
return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
|
|
4840
4702
|
};
|
|
4841
4703
|
|
|
4842
|
-
var
|
|
4843
|
-
var
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
anchorRef = _ref.anchorRef,
|
|
4854
|
-
testId = _ref.testId;
|
|
4855
|
-
|
|
4856
|
-
var _useState = useState(null),
|
|
4857
|
-
calendarRef = _useState[0],
|
|
4858
|
-
setCalendarRef = _useState[1];
|
|
4704
|
+
var useFieldControllers = function useFieldControllers(_ref) {
|
|
4705
|
+
var name = _ref.name,
|
|
4706
|
+
inputId = _ref.id,
|
|
4707
|
+
value = _ref.value,
|
|
4708
|
+
_onChange = _ref.onChange,
|
|
4709
|
+
_onBlur = _ref.onBlur,
|
|
4710
|
+
_onFocus = _ref.onFocus,
|
|
4711
|
+
_onKeyDown = _ref.onKeyDown,
|
|
4712
|
+
error = _ref.error,
|
|
4713
|
+
_ref$type = _ref.type,
|
|
4714
|
+
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
4859
4715
|
|
|
4860
|
-
var
|
|
4861
|
-
|
|
4862
|
-
useOnClickOutside({
|
|
4863
|
-
current: calendarRef
|
|
4864
|
-
}, function (event) {
|
|
4865
|
-
var _anchorRef$current;
|
|
4716
|
+
var _useFormContext = useFormContext(),
|
|
4717
|
+
formik = _useFormContext.formik;
|
|
4866
4718
|
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4719
|
+
var id = useFieldId({
|
|
4720
|
+
name: name,
|
|
4721
|
+
id: inputId
|
|
4870
4722
|
});
|
|
4871
|
-
var
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4723
|
+
var controllers = {
|
|
4724
|
+
id: id,
|
|
4725
|
+
error: error,
|
|
4726
|
+
value: value,
|
|
4727
|
+
onChange: function onChange(e) {
|
|
4728
|
+
return _onChange && _onChange(e.target.value);
|
|
4729
|
+
},
|
|
4730
|
+
onBlur: function onBlur(e) {
|
|
4731
|
+
return _onBlur && _onBlur(e.target.value);
|
|
4732
|
+
},
|
|
4733
|
+
onFocus: function onFocus(e) {
|
|
4734
|
+
return _onFocus && _onFocus(e.target.value);
|
|
4735
|
+
},
|
|
4736
|
+
onKeyDown: function onKeyDown(e) {
|
|
4737
|
+
return _onKeyDown && _onKeyDown(e.key);
|
|
4738
|
+
}
|
|
4875
4739
|
};
|
|
4740
|
+
var formikState = getFormikState(name, formik);
|
|
4876
4741
|
|
|
4877
|
-
|
|
4878
|
-
var
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
}
|
|
4883
|
-
var _weekRange = createWeekRange(selectedDate, weekStart);
|
|
4742
|
+
if (formik && formikState) {
|
|
4743
|
+
var currencyBlur = function currencyBlur() {
|
|
4744
|
+
if (type === 'currency') {
|
|
4745
|
+
formik.setFieldValue(name, Number(value).toFixed(2));
|
|
4746
|
+
}
|
|
4747
|
+
};
|
|
4884
4748
|
|
|
4885
|
-
|
|
4886
|
-
|
|
4749
|
+
controllers = _extends({}, controllers, {
|
|
4750
|
+
error: error !== undefined ? controllers.error : formikState.error,
|
|
4751
|
+
value: value !== undefined ? controllers.value : formikState.value,
|
|
4752
|
+
onChange: _onChange ? controllers.onChange : function (e) {
|
|
4753
|
+
return formik.setFieldValue(name, e.target.value);
|
|
4754
|
+
},
|
|
4755
|
+
onBlur: _onBlur ? function (e) {
|
|
4756
|
+
_onBlur && _onBlur(e.target.value);
|
|
4757
|
+
formik.setFieldTouched(name);
|
|
4758
|
+
currencyBlur();
|
|
4759
|
+
} : function () {
|
|
4760
|
+
formik.setFieldTouched(name);
|
|
4761
|
+
currencyBlur();
|
|
4762
|
+
}
|
|
4763
|
+
});
|
|
4764
|
+
}
|
|
4887
4765
|
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
}, 100);
|
|
4891
|
-
};
|
|
4766
|
+
return controllers;
|
|
4767
|
+
};
|
|
4892
4768
|
|
|
4893
|
-
|
|
4894
|
-
return null;
|
|
4895
|
-
}
|
|
4769
|
+
var textFieldStyles = {"text-field":"_20YOA","text-field--invalid":"_3kUSh","text-field--prefixed":"_3IU3Q","text-field--suffixed":"_QXJOD"};
|
|
4896
4770
|
|
|
4897
|
-
|
|
4898
|
-
var
|
|
4899
|
-
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
4900
|
-
className: style.overlayWrapper
|
|
4901
|
-
}, React__default.createElement("div", {
|
|
4902
|
-
className: style.overlay,
|
|
4903
|
-
ref: function ref(_ref2) {
|
|
4904
|
-
return setCalendarRef(_ref2);
|
|
4905
|
-
},
|
|
4906
|
-
style: _extends({}, calendarPosition, {
|
|
4907
|
-
zIndex: Z_INDEX_LAYERS.MODAL
|
|
4908
|
-
}),
|
|
4909
|
-
"data-testid": testId
|
|
4910
|
-
}, React__default.createElement(DayPicker, {
|
|
4911
|
-
format: "MM/dd/yyyy",
|
|
4912
|
-
classNames: style,
|
|
4913
|
-
onDayClick: function onDayClick(day, activeModifiers) {
|
|
4914
|
-
var isDateDisabled = Object.keys(activeModifiers).find(function (modifier) {
|
|
4915
|
-
return modifier.includes('disabled');
|
|
4916
|
-
});
|
|
4771
|
+
var useTextField = function useTextField(_ref) {
|
|
4772
|
+
var _classnames;
|
|
4917
4773
|
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4774
|
+
var autoComplete = _ref.autoComplete,
|
|
4775
|
+
autoFocus = _ref.autoFocus,
|
|
4776
|
+
defaultValue = _ref.defaultValue,
|
|
4777
|
+
disabled = _ref.disabled,
|
|
4778
|
+
error = _ref.error,
|
|
4779
|
+
id = _ref.id,
|
|
4780
|
+
maxLength = _ref.maxLength,
|
|
4781
|
+
name = _ref.name,
|
|
4782
|
+
caption = _ref.caption,
|
|
4783
|
+
label = _ref.label,
|
|
4784
|
+
onBlur = _ref.onBlur,
|
|
4785
|
+
onChange = _ref.onChange,
|
|
4786
|
+
onFocus = _ref.onFocus,
|
|
4787
|
+
onKeyDown = _ref.onKeyDown,
|
|
4788
|
+
placeholder = _ref.placeholder,
|
|
4789
|
+
value = _ref.value,
|
|
4790
|
+
ref = _ref.ref,
|
|
4791
|
+
testId = _ref.testId;
|
|
4792
|
+
var controllers = useFieldControllers({
|
|
4793
|
+
error: error,
|
|
4794
|
+
id: id,
|
|
4795
|
+
name: name,
|
|
4796
|
+
onChange: onChange,
|
|
4797
|
+
onBlur: onBlur,
|
|
4798
|
+
onFocus: onFocus,
|
|
4799
|
+
onKeyDown: onKeyDown,
|
|
4800
|
+
value: value
|
|
4801
|
+
});
|
|
4802
|
+
var hasError = !!controllers.error;
|
|
4803
|
+
var inputProps = {
|
|
4804
|
+
'aria-describedby': hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
4805
|
+
'aria-invalid': hasError,
|
|
4806
|
+
autoComplete: autoComplete,
|
|
4807
|
+
autoFocus: autoFocus,
|
|
4808
|
+
className: classnames(textFieldStyles['text-field'], (_classnames = {}, _classnames[textFieldStyles['text-field--invalid']] = hasError, _classnames)),
|
|
4809
|
+
'data-testid': testId,
|
|
4810
|
+
disabled: disabled,
|
|
4811
|
+
defaultValue: defaultValue,
|
|
4812
|
+
id: controllers.id,
|
|
4813
|
+
maxLength: maxLength,
|
|
4814
|
+
name: name,
|
|
4815
|
+
onBlur: controllers.onBlur,
|
|
4816
|
+
onChange: controllers.onChange,
|
|
4817
|
+
onFocus: controllers.onFocus,
|
|
4818
|
+
onKeyDown: controllers.onKeyDown,
|
|
4819
|
+
placeholder: placeholder,
|
|
4820
|
+
ref: ref,
|
|
4821
|
+
size: 1,
|
|
4822
|
+
type: 'text',
|
|
4823
|
+
value: controllers.value
|
|
4824
|
+
};
|
|
4825
|
+
var fieldProps = {
|
|
4826
|
+
caption: caption,
|
|
4827
|
+
error: controllers.error,
|
|
4828
|
+
label: label,
|
|
4829
|
+
id: inputProps.id,
|
|
4830
|
+
name: name
|
|
4831
|
+
};
|
|
4832
|
+
return {
|
|
4833
|
+
inputProps: inputProps,
|
|
4834
|
+
fieldProps: fieldProps
|
|
4835
|
+
};
|
|
4933
4836
|
};
|
|
4934
4837
|
|
|
4935
|
-
var styles$
|
|
4838
|
+
var styles$g = {"affix-container":"_ybKOk","affix-container--prefixed":"_2COk3","affix-container--suffixed":"_1xXXN","prefix":"_eX5OL","suffix":"__YH01"};
|
|
4936
4839
|
|
|
4937
|
-
var
|
|
4938
|
-
var
|
|
4840
|
+
var AffixContainer = function AffixContainer(_ref) {
|
|
4841
|
+
var _classnames;
|
|
4939
4842
|
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4843
|
+
var prefix = _ref.prefix,
|
|
4844
|
+
suffix = _ref.suffix,
|
|
4845
|
+
children = _ref.children,
|
|
4846
|
+
testId = _ref.testId;
|
|
4847
|
+
var container = useRef(null);
|
|
4848
|
+
var prefixElement = useRef(null);
|
|
4849
|
+
var suffixElement = useRef(null);
|
|
4850
|
+
var isHidden = container.current && container.current.offsetParent === null;
|
|
4851
|
+
useLayoutEffect(function () {
|
|
4852
|
+
if (container.current) {
|
|
4853
|
+
var input = container.current.querySelector('input, [class$=control] > div');
|
|
4943
4854
|
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4855
|
+
if (input) {
|
|
4856
|
+
if (prefix && prefixElement.current) {
|
|
4857
|
+
var _prefixElement$curren;
|
|
4947
4858
|
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
return false;
|
|
4952
|
-
}
|
|
4859
|
+
var prefixWidth = prefixElement === null || prefixElement === void 0 ? void 0 : (_prefixElement$curren = prefixElement.current) === null || _prefixElement$curren === void 0 ? void 0 : _prefixElement$curren.offsetWidth;
|
|
4860
|
+
input.style.paddingLeft = prefixWidth + 'px';
|
|
4861
|
+
}
|
|
4953
4862
|
|
|
4954
|
-
|
|
4955
|
-
|
|
4863
|
+
if (suffix && suffixElement.current) {
|
|
4864
|
+
var suffixWidth = suffixElement.current.offsetWidth;
|
|
4865
|
+
input.style.paddingRight = suffixWidth + 'px';
|
|
4866
|
+
}
|
|
4867
|
+
}
|
|
4868
|
+
}
|
|
4869
|
+
}, [prefix, suffix, isHidden]);
|
|
4870
|
+
var hasPrefix = !!prefix;
|
|
4871
|
+
var hasSuffix = !!suffix;
|
|
4956
4872
|
|
|
4957
|
-
|
|
4873
|
+
if (!hasPrefix && !hasSuffix) {
|
|
4874
|
+
return children;
|
|
4958
4875
|
}
|
|
4959
4876
|
|
|
4960
|
-
var
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4877
|
+
var classes = classnames(styles$g['affix-container'], (_classnames = {}, _classnames[styles$g['affix-container--prefixed']] = hasPrefix, _classnames[styles$g['affix-container--suffixed']] = hasSuffix, _classnames));
|
|
4878
|
+
return React__default.createElement("div", {
|
|
4879
|
+
className: classes,
|
|
4880
|
+
ref: container,
|
|
4881
|
+
"data-testid": testId
|
|
4882
|
+
}, hasPrefix && React__default.createElement("div", {
|
|
4883
|
+
className: styles$g['prefix'],
|
|
4884
|
+
ref: prefixElement
|
|
4885
|
+
}, prefix), children, hasSuffix && React__default.createElement("div", {
|
|
4886
|
+
className: styles$g['suffix'],
|
|
4887
|
+
ref: suffixElement
|
|
4888
|
+
}, suffix));
|
|
4964
4889
|
};
|
|
4965
|
-
var findPreviousEnabledIndex = function findPreviousEnabledIndex(items, startAt) {
|
|
4966
|
-
for (var i = startAt - 1; i >= 0; i--) {
|
|
4967
|
-
if (!items[i].disabled) {
|
|
4968
|
-
return i;
|
|
4969
|
-
}
|
|
4970
|
-
}
|
|
4971
4890
|
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4891
|
+
var TimeFieldInput = function TimeFieldInput(_ref) {
|
|
4892
|
+
var inputProps = _ref.inputProps,
|
|
4893
|
+
allOtherProps = _ref.allOtherProps,
|
|
4894
|
+
prefix = _ref.prefix,
|
|
4895
|
+
duration = _ref.duration;
|
|
4896
|
+
return React__default.createElement(AffixContainer, {
|
|
4897
|
+
prefix: prefix ? prefix : React__default.createElement(IconClock, {
|
|
4898
|
+
size: "medium",
|
|
4899
|
+
color: GREY400
|
|
4900
|
+
}),
|
|
4901
|
+
suffix: duration
|
|
4902
|
+
}, React__default.createElement("input", Object.assign({}, inputProps, {
|
|
4903
|
+
onBlur: function onBlur(e) {
|
|
4904
|
+
e.target.value = parseTime(e.target.value, 'g:i A');
|
|
4905
|
+
inputProps.onChange(e);
|
|
4906
|
+
inputProps.onBlur(e);
|
|
4907
|
+
},
|
|
4908
|
+
onClick: allOtherProps.onClick,
|
|
4909
|
+
onMouseEnter: allOtherProps.onMouseEnter,
|
|
4910
|
+
onMouseLeave: allOtherProps.onMouseLeave,
|
|
4911
|
+
onInput: function onInput(e) {
|
|
4912
|
+
var target = e.target;
|
|
4913
|
+
allOtherProps.onInputChange(target.value);
|
|
4975
4914
|
}
|
|
4976
|
-
}
|
|
4977
|
-
|
|
4978
|
-
return null;
|
|
4915
|
+
})));
|
|
4979
4916
|
};
|
|
4980
4917
|
|
|
4981
|
-
var
|
|
4982
|
-
var _useState = useState(null),
|
|
4983
|
-
focusedItem = _useState[0],
|
|
4984
|
-
setFocusedItem = _useState[1];
|
|
4918
|
+
var _excluded$2g = ["placeholder", "autoComplete", "selectedTimeOption", "prefix", "startTime", "duration"];
|
|
4985
4919
|
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4920
|
+
var TimeFieldDropdownElement = function TimeFieldDropdownElement(_ref, ref) {
|
|
4921
|
+
var _ref$placeholder = _ref.placeholder,
|
|
4922
|
+
placeholder = _ref$placeholder === void 0 ? '9:00 AM' : _ref$placeholder,
|
|
4923
|
+
_ref$autoComplete = _ref.autoComplete,
|
|
4924
|
+
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
4925
|
+
selectedTimeOption = _ref.selectedTimeOption,
|
|
4926
|
+
prefix = _ref.prefix,
|
|
4927
|
+
duration = _ref.duration,
|
|
4928
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
|
|
4991
4929
|
|
|
4992
|
-
var
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
}
|
|
4930
|
+
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
4931
|
+
placeholder: placeholder,
|
|
4932
|
+
autoComplete: autoComplete,
|
|
4933
|
+
ref: ref
|
|
4934
|
+
})),
|
|
4935
|
+
inputProps = _useTextField.inputProps,
|
|
4936
|
+
fieldProps = _useTextField.fieldProps;
|
|
4997
4937
|
|
|
4998
|
-
|
|
4999
|
-
if (
|
|
5000
|
-
|
|
5001
|
-
|
|
4938
|
+
useEffect(function () {
|
|
4939
|
+
if (selectedTimeOption) {
|
|
4940
|
+
inputProps.onChange({
|
|
4941
|
+
target: {
|
|
4942
|
+
value: selectedTimeOption
|
|
4943
|
+
}
|
|
4944
|
+
});
|
|
5002
4945
|
}
|
|
4946
|
+
}, [selectedTimeOption]);
|
|
4947
|
+
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement(TimeFieldInput, {
|
|
4948
|
+
inputProps: inputProps,
|
|
4949
|
+
allOtherProps: allOtherProps,
|
|
4950
|
+
prefix: prefix,
|
|
4951
|
+
duration: duration
|
|
4952
|
+
}));
|
|
4953
|
+
};
|
|
5003
4954
|
|
|
5004
|
-
|
|
5005
|
-
return;
|
|
5006
|
-
}
|
|
4955
|
+
var TimeFieldDropdownTrigger = forwardRef(TimeFieldDropdownElement);
|
|
5007
4956
|
|
|
5008
|
-
|
|
5009
|
-
|
|
4957
|
+
var Dropdown = function Dropdown(_ref) {
|
|
4958
|
+
var trigger = _ref.trigger,
|
|
4959
|
+
_ref$triggersOn = _ref.triggersOn,
|
|
4960
|
+
triggersOn = _ref$triggersOn === void 0 ? DROPDOWN_TRIGGER.CLICK : _ref$triggersOn,
|
|
4961
|
+
_ref$alignment = _ref.alignment,
|
|
4962
|
+
alignment = _ref$alignment === void 0 ? DROPDOWN_ALIGNEMNT.RIGHT : _ref$alignment,
|
|
4963
|
+
width = _ref.width,
|
|
4964
|
+
maxHeight = _ref.maxHeight,
|
|
4965
|
+
testId = _ref.testId,
|
|
4966
|
+
children = _ref.children,
|
|
4967
|
+
triggerWidth = _ref.triggerWidth;
|
|
5010
4968
|
|
|
5011
|
-
var
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
var _actions$onNavigate;
|
|
4969
|
+
var _useState = useState(false),
|
|
4970
|
+
isOpen = _useState[0],
|
|
4971
|
+
setIsOpen = _useState[1];
|
|
5015
4972
|
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
4973
|
+
var triggerRef = useRef(null);
|
|
4974
|
+
var paneRef = useRef(null);
|
|
4975
|
+
var isFocusingOverlay = useRef(false);
|
|
5019
4976
|
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
4977
|
+
var handleToggleDropdown = function handleToggleDropdown() {
|
|
4978
|
+
return setIsOpen(!isOpen);
|
|
4979
|
+
};
|
|
5023
4980
|
|
|
5024
|
-
|
|
5025
|
-
|
|
4981
|
+
var handleMouseClick = function handleMouseClick(e) {
|
|
4982
|
+
if (trigger.type === TimeFieldDropdownTrigger) {
|
|
4983
|
+
setIsOpen(true);
|
|
4984
|
+
} else {
|
|
4985
|
+
handleToggleDropdown();
|
|
5026
4986
|
}
|
|
5027
4987
|
|
|
5028
|
-
|
|
5029
|
-
var _actions$onPressEnter;
|
|
4988
|
+
e.stopPropagation();
|
|
5030
4989
|
|
|
5031
|
-
|
|
4990
|
+
if ('onClick' in trigger.props) {
|
|
4991
|
+
trigger.props.onClick(e);
|
|
4992
|
+
}
|
|
4993
|
+
};
|
|
4994
|
+
|
|
4995
|
+
var handleMouseEnter = function handleMouseEnter(e) {
|
|
4996
|
+
if (triggersOn !== 'hover') {
|
|
4997
|
+
return;
|
|
4998
|
+
}
|
|
4999
|
+
|
|
5000
|
+
setIsOpen(true);
|
|
5001
|
+
|
|
5002
|
+
if ('onMouseEnter' in trigger.props) {
|
|
5003
|
+
trigger.props.onMouseEnter(e);
|
|
5004
|
+
}
|
|
5005
|
+
};
|
|
5006
|
+
|
|
5007
|
+
var handleFocus = function handleFocus(e) {
|
|
5008
|
+
if (triggersOn !== 'hover') {
|
|
5009
|
+
if (trigger.type === TimeFieldDropdownTrigger && !isOpen) {
|
|
5010
|
+
setIsOpen(true);
|
|
5011
|
+
}
|
|
5012
|
+
|
|
5013
|
+
if ('onFocus' in trigger.props) {
|
|
5014
|
+
trigger.props.onFocus(e);
|
|
5015
|
+
}
|
|
5016
|
+
|
|
5017
|
+
return;
|
|
5018
|
+
}
|
|
5019
|
+
|
|
5020
|
+
setIsOpen(true);
|
|
5021
|
+
|
|
5022
|
+
if ('onFocus' in trigger.props) {
|
|
5023
|
+
trigger.props.onFocus(e);
|
|
5024
|
+
}
|
|
5025
|
+
};
|
|
5026
|
+
|
|
5027
|
+
var handleMouseLeave = function handleMouseLeave(e) {
|
|
5028
|
+
if (triggersOn !== 'hover' || !paneRef.current) {
|
|
5029
|
+
return;
|
|
5030
|
+
}
|
|
5031
|
+
|
|
5032
|
+
var panePosition = paneRef.current.getBoundingClientRect();
|
|
5033
|
+
|
|
5034
|
+
if (!isGoingTowardsPane(panePosition, e.clientY)) {
|
|
5035
|
+
setIsOpen(false);
|
|
5036
|
+
|
|
5037
|
+
if ('onMouseLeave' in trigger.props) {
|
|
5038
|
+
trigger.props.onMouseLeave && trigger.props.onMouseLeave(e);
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
};
|
|
5042
|
+
|
|
5043
|
+
var handlePaneMouseEnter = function handlePaneMouseEnter() {
|
|
5044
|
+
isFocusingOverlay.current = true;
|
|
5045
|
+
};
|
|
5046
|
+
|
|
5047
|
+
var handlePaneMouseLeave = function handlePaneMouseLeave() {
|
|
5048
|
+
isFocusingOverlay.current = false;
|
|
5049
|
+
|
|
5050
|
+
if (triggersOn === 'hover') {
|
|
5051
|
+
setIsOpen(false);
|
|
5052
|
+
}
|
|
5053
|
+
};
|
|
5054
|
+
|
|
5055
|
+
var handleOnBlur = function handleOnBlur(e) {
|
|
5056
|
+
trigger.props.onBlur && trigger.props.onBlur(e);
|
|
5057
|
+
|
|
5058
|
+
if (!paneRef || !(paneRef !== null && paneRef !== void 0 && paneRef.current)) {
|
|
5059
|
+
return;
|
|
5060
|
+
}
|
|
5061
|
+
|
|
5062
|
+
var focusableElements = getKeyboardFocusableElements(paneRef.current);
|
|
5063
|
+
|
|
5064
|
+
if (focusableElements.length > 0) {
|
|
5065
|
+
window.setTimeout(function () {
|
|
5066
|
+
return focusableElements[0].focus();
|
|
5067
|
+
}, 0);
|
|
5068
|
+
} else {
|
|
5069
|
+
setIsOpen(false);
|
|
5070
|
+
}
|
|
5071
|
+
};
|
|
5072
|
+
|
|
5073
|
+
var getRef = function getRef() {
|
|
5074
|
+
if ((trigger.type === Button$1 || trigger.type === TimeFieldDropdownTrigger) && trigger.ref) {
|
|
5075
|
+
return trigger.ref;
|
|
5076
|
+
}
|
|
5077
|
+
|
|
5078
|
+
return triggerRef;
|
|
5079
|
+
};
|
|
5080
|
+
|
|
5081
|
+
var updatedRef = getRef();
|
|
5082
|
+
var triggerProps = {
|
|
5083
|
+
onClick: handleMouseClick,
|
|
5084
|
+
onMouseEnter: handleMouseEnter,
|
|
5085
|
+
onMouseLeave: handleMouseLeave,
|
|
5086
|
+
onBlur: handleOnBlur,
|
|
5087
|
+
ref: updatedRef,
|
|
5088
|
+
style: {
|
|
5089
|
+
width: triggerWidth === 'full' ? '100%' : 'fit-content'
|
|
5090
|
+
},
|
|
5091
|
+
onFocus: handleFocus
|
|
5092
|
+
};
|
|
5093
|
+
return React__default.createElement(DropdownContext.Provider, {
|
|
5094
|
+
value: {
|
|
5095
|
+
isOpen: isOpen,
|
|
5096
|
+
onToggleDropdown: handleToggleDropdown,
|
|
5097
|
+
triggerRef: updatedRef,
|
|
5098
|
+
paneRef: paneRef
|
|
5099
|
+
}
|
|
5100
|
+
}, trigger.type === Button$1 || trigger.type === TimeFieldDropdownTrigger ? React__default.cloneElement(trigger, _extends({}, trigger.props, triggerProps)) : React__default.createElement("button", Object.assign({}, triggerProps, {
|
|
5101
|
+
className: styles$c['dropdown__trigger'],
|
|
5102
|
+
ref: updatedRef,
|
|
5103
|
+
onFocus: handleFocus
|
|
5104
|
+
}), trigger), React__default.createElement(DropdownPane, {
|
|
5105
|
+
width: width,
|
|
5106
|
+
maxHeight: maxHeight,
|
|
5107
|
+
onMouseEnter: handlePaneMouseEnter,
|
|
5108
|
+
onMouseLeave: handlePaneMouseLeave,
|
|
5109
|
+
alignment: alignment,
|
|
5110
|
+
testId: testId
|
|
5111
|
+
}, children));
|
|
5112
|
+
};
|
|
5113
|
+
|
|
5114
|
+
var styles$h = {"dropdown-list":"_1v1df","dropdown-list__item--hover":"_eAjpa"};
|
|
5115
|
+
|
|
5116
|
+
var findNextActiveIndex = function findNextActiveIndex(items, startAt) {
|
|
5117
|
+
var startIndex = 0;
|
|
5118
|
+
|
|
5119
|
+
if (startAt !== null && startAt + 1 <= items.length) {
|
|
5120
|
+
startIndex = startAt + 1;
|
|
5121
|
+
}
|
|
5122
|
+
|
|
5123
|
+
var hasEnabledItems = items.slice(startIndex).some(function (item) {
|
|
5124
|
+
return !item.disabled;
|
|
5125
|
+
});
|
|
5126
|
+
|
|
5127
|
+
if (hasEnabledItems) {
|
|
5128
|
+
var _nextEnabledIndex = items.findIndex(function (item, index) {
|
|
5129
|
+
if (index < startIndex) {
|
|
5130
|
+
return false;
|
|
5131
|
+
}
|
|
5132
|
+
|
|
5133
|
+
return !item.disabled;
|
|
5134
|
+
});
|
|
5135
|
+
|
|
5136
|
+
return _nextEnabledIndex;
|
|
5137
|
+
}
|
|
5138
|
+
|
|
5139
|
+
var nextEnabledIndex = items.findIndex(function (item) {
|
|
5140
|
+
return !item.disabled;
|
|
5141
|
+
});
|
|
5142
|
+
return nextEnabledIndex >= 0 ? nextEnabledIndex : null;
|
|
5143
|
+
};
|
|
5144
|
+
var findPreviousEnabledIndex = function findPreviousEnabledIndex(items, startAt) {
|
|
5145
|
+
for (var i = startAt - 1; i >= 0; i--) {
|
|
5146
|
+
if (!items[i].disabled) {
|
|
5147
|
+
return i;
|
|
5148
|
+
}
|
|
5149
|
+
}
|
|
5150
|
+
|
|
5151
|
+
for (var _i = items.length - 1; _i > startAt - 1; _i--) {
|
|
5152
|
+
if (!items[_i].disabled) {
|
|
5153
|
+
return _i;
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
|
|
5157
|
+
return null;
|
|
5158
|
+
};
|
|
5159
|
+
|
|
5160
|
+
var useListKeyboardNavigation = function useListKeyboardNavigation(listItems, actions) {
|
|
5161
|
+
var _useState = useState(null),
|
|
5162
|
+
focusedItem = _useState[0],
|
|
5163
|
+
setFocusedItem = _useState[1];
|
|
5164
|
+
|
|
5165
|
+
var focusOnNextItem = function focusOnNextItem(callback) {
|
|
5166
|
+
var nextFocusItem = findNextActiveIndex(listItems, focusedItem);
|
|
5167
|
+
setFocusedItem(nextFocusItem);
|
|
5168
|
+
callback(nextFocusItem);
|
|
5169
|
+
};
|
|
5170
|
+
|
|
5171
|
+
var focusOnPrevItem = function focusOnPrevItem(callback) {
|
|
5172
|
+
var prevFocusItem = findPreviousEnabledIndex(listItems, focusedItem || 0);
|
|
5173
|
+
setFocusedItem(prevFocusItem);
|
|
5174
|
+
callback(prevFocusItem);
|
|
5175
|
+
};
|
|
5176
|
+
|
|
5177
|
+
var setFocusOnItem = function setFocusOnItem(index) {
|
|
5178
|
+
if (index < 0) {
|
|
5179
|
+
setFocusedItem(null);
|
|
5180
|
+
return;
|
|
5181
|
+
}
|
|
5182
|
+
|
|
5183
|
+
if (listItems[index].disabled) {
|
|
5184
|
+
return;
|
|
5185
|
+
}
|
|
5186
|
+
|
|
5187
|
+
setFocusedItem(index);
|
|
5188
|
+
};
|
|
5189
|
+
|
|
5190
|
+
var handleKeyPress = useCallback(function (event) {
|
|
5191
|
+
if (event.key === 'ArrowDown') {
|
|
5192
|
+
focusOnNextItem(function (focusItem) {
|
|
5193
|
+
var _actions$onNavigate;
|
|
5194
|
+
|
|
5195
|
+
return actions === null || actions === void 0 ? void 0 : (_actions$onNavigate = actions.onNavigate) === null || _actions$onNavigate === void 0 ? void 0 : _actions$onNavigate.call(actions, focusItem);
|
|
5196
|
+
});
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5199
|
+
if (event.key === 'ArrowUp') {
|
|
5200
|
+
focusOnPrevItem(function (focusItem) {
|
|
5201
|
+
var _actions$onNavigate2;
|
|
5202
|
+
|
|
5203
|
+
return actions === null || actions === void 0 ? void 0 : (_actions$onNavigate2 = actions.onNavigate) === null || _actions$onNavigate2 === void 0 ? void 0 : _actions$onNavigate2.call(actions, focusItem);
|
|
5204
|
+
});
|
|
5205
|
+
}
|
|
5206
|
+
|
|
5207
|
+
if (event.key === 'Enter' && focusedItem !== null) {
|
|
5208
|
+
var _actions$onPressEnter;
|
|
5209
|
+
|
|
5210
|
+
var onClick = listItems[focusedItem].onClick;
|
|
5032
5211
|
onClick(event);
|
|
5033
5212
|
actions && ((_actions$onPressEnter = actions.onPressEnter) === null || _actions$onPressEnter === void 0 ? void 0 : _actions$onPressEnter.call(actions));
|
|
5034
5213
|
}
|
|
@@ -5042,17 +5221,27 @@ var useListKeyboardNavigation = function useListKeyboardNavigation(listItems, ac
|
|
|
5042
5221
|
};
|
|
5043
5222
|
};
|
|
5044
5223
|
|
|
5045
|
-
var styles$
|
|
5224
|
+
var styles$i = {"dropdown-list-divider":"_3x1F6"};
|
|
5046
5225
|
|
|
5047
5226
|
var DropdownListDivider = function DropdownListDivider(_ref) {
|
|
5048
5227
|
var testId = _ref.testId;
|
|
5049
5228
|
return React__default.createElement("div", {
|
|
5050
|
-
className: styles$
|
|
5229
|
+
className: styles$i['dropdown-list-divider'],
|
|
5051
5230
|
"data-testid": testId
|
|
5052
5231
|
});
|
|
5053
5232
|
};
|
|
5054
5233
|
|
|
5055
|
-
var styles$
|
|
5234
|
+
var styles$j = {"dropdown-list-item":"_B3_I5","dropdown-list-item--selected":"_1mr1h","dropdown-list-item__content":"_2b7Fg","dropdown-list-item--disabled":"_2l0Cb"};
|
|
5235
|
+
|
|
5236
|
+
var COLORS = {};
|
|
5237
|
+
|
|
5238
|
+
var getColor = function getColor(color) {
|
|
5239
|
+
if (color && COLORS[color]) {
|
|
5240
|
+
return COLORS[color];
|
|
5241
|
+
} else {
|
|
5242
|
+
return color;
|
|
5243
|
+
}
|
|
5244
|
+
};
|
|
5056
5245
|
|
|
5057
5246
|
var TEXT_TYPES = {
|
|
5058
5247
|
CAPTION: 'caption',
|
|
@@ -5077,9 +5266,9 @@ var ALIGNMENTS = {
|
|
|
5077
5266
|
JUSTIFY: 'justify'
|
|
5078
5267
|
};
|
|
5079
5268
|
|
|
5080
|
-
var styles$
|
|
5269
|
+
var styles$k = {"text":"_3CIA3","text__body":"_1nnj8","text__caption":"_37K6o","text__insight":"_avqxy","text--bold":"_2TG6E","text--italic":"_2hlsn","text--underline":"_1Pjo6","text--monospace":"_eDdDI","text--align-left":"_2gNwS","text--align-right":"_ufv1W","text--align-center":"_2WMN6","text--align-justify":"_2iH-J"};
|
|
5081
5270
|
|
|
5082
|
-
var _excluded$
|
|
5271
|
+
var _excluded$2h = ["children", "as", "emphasis", "alignment", "color", "testId"];
|
|
5083
5272
|
|
|
5084
5273
|
var Text = function Text(_ref) {
|
|
5085
5274
|
var _classnames;
|
|
@@ -5091,14 +5280,14 @@ var Text = function Text(_ref) {
|
|
|
5091
5280
|
alignment = _ref.alignment,
|
|
5092
5281
|
color = _ref.color,
|
|
5093
5282
|
testId = _ref.testId,
|
|
5094
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5283
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
|
|
5095
5284
|
|
|
5096
5285
|
var positionStyles = usePositionStyles(positionProps);
|
|
5097
5286
|
var elementProps = {
|
|
5098
5287
|
style: _extends({
|
|
5099
|
-
color: color
|
|
5288
|
+
color: getColor(color)
|
|
5100
5289
|
}, positionStyles),
|
|
5101
|
-
className: classnames(styles$
|
|
5290
|
+
className: classnames(styles$k['text'], (_classnames = {}, _classnames[styles$k['text--bold']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.BOLD), _classnames[styles$k['text--italic']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.ITALIC), _classnames[styles$k['text--underline']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.UNDERLINE), _classnames[styles$k['text--monospace']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.MONOSPACE), _classnames[styles$k['text--align-left']] = alignment === ALIGNMENTS.LEFT, _classnames[styles$k['text--align-right']] = alignment === ALIGNMENTS.RIGHT, _classnames[styles$k['text--align-center']] = alignment === ALIGNMENTS.CENTER, _classnames[styles$k['text--align-justify']] = alignment === ALIGNMENTS.JUSTIFY, _classnames[styles$k['text__body']] = as === TEXT_TYPES.BODY, _classnames[styles$k['text__insight']] = as === TEXT_TYPES.INSIGHT, _classnames[styles$k['text__caption']] = as === TEXT_TYPES.CAPTION, _classnames)),
|
|
5102
5291
|
'data-testid': testId
|
|
5103
5292
|
};
|
|
5104
5293
|
var pTypes = [TEXT_TYPES.BODY, TEXT_TYPES.CAPTION, TEXT_TYPES.INSIGHT];
|
|
@@ -5109,37 +5298,24 @@ var Text = function Text(_ref) {
|
|
|
5109
5298
|
var Bold = function Bold(_ref) {
|
|
5110
5299
|
var children = _ref.children;
|
|
5111
5300
|
return React__default.createElement("span", {
|
|
5112
|
-
className: classnames(styles$
|
|
5301
|
+
className: classnames(styles$k['text--bold'], styles$k['text'])
|
|
5113
5302
|
}, children);
|
|
5114
5303
|
};
|
|
5115
5304
|
|
|
5116
5305
|
var Underline = function Underline(_ref) {
|
|
5117
5306
|
var children = _ref.children;
|
|
5118
5307
|
return React__default.createElement("span", {
|
|
5119
|
-
className: classnames(styles$
|
|
5308
|
+
className: classnames(styles$k['text--underline'], styles$k['text'])
|
|
5120
5309
|
}, children);
|
|
5121
5310
|
};
|
|
5122
5311
|
|
|
5123
5312
|
var Italic = function Italic(_ref) {
|
|
5124
5313
|
var children = _ref.children;
|
|
5125
5314
|
return React__default.createElement("span", {
|
|
5126
|
-
className: classnames(styles$
|
|
5315
|
+
className: classnames(styles$k['text--italic'], styles$k['text'])
|
|
5127
5316
|
}, children);
|
|
5128
5317
|
};
|
|
5129
5318
|
|
|
5130
|
-
var WHITE = '#ffffff';
|
|
5131
|
-
var EGGPLANT200 = '#d3dbf4';
|
|
5132
|
-
var EGGPLANT300 = '#a7b7ea';
|
|
5133
|
-
var EGGPLANT400 = '#6d87dd';
|
|
5134
|
-
var EGGPLANT500 = '#6179c6';
|
|
5135
|
-
var EGGPLANT600 = '#415184';
|
|
5136
|
-
var RADISH400 = '#e76767';
|
|
5137
|
-
var GREY100 = '#F3F3F3';
|
|
5138
|
-
var GREY200 = '#D5D5D5';
|
|
5139
|
-
var GREY300 = '#949494';
|
|
5140
|
-
var GREY400 = '#767676';
|
|
5141
|
-
var GREY500 = '#464646';
|
|
5142
|
-
|
|
5143
5319
|
var DropdownListItem = function DropdownListItem(_ref) {
|
|
5144
5320
|
var _classNames;
|
|
5145
5321
|
|
|
@@ -5179,7 +5355,7 @@ var DropdownListItem = function DropdownListItem(_ref) {
|
|
|
5179
5355
|
};
|
|
5180
5356
|
|
|
5181
5357
|
return React__default.createElement("li", {
|
|
5182
|
-
className: classnames(styles$
|
|
5358
|
+
className: classnames(styles$j['dropdown-list-item'], (_classNames = {}, _classNames[styles$j['dropdown-list-item--selected']] = selected, _classNames[styles$j['dropdown-list-item--disabled']] = disabled, _classNames)),
|
|
5183
5359
|
onMouseDown: function onMouseDown(e) {
|
|
5184
5360
|
return e.preventDefault();
|
|
5185
5361
|
},
|
|
@@ -5188,7 +5364,7 @@ var DropdownListItem = function DropdownListItem(_ref) {
|
|
|
5188
5364
|
role: "menuitem",
|
|
5189
5365
|
"data-testid": testId
|
|
5190
5366
|
}, prefix, React__default.createElement("div", {
|
|
5191
|
-
className: styles$
|
|
5367
|
+
className: styles$j['dropdown-list-item__content']
|
|
5192
5368
|
}, React__default.createElement(Stack, {
|
|
5193
5369
|
space: 4,
|
|
5194
5370
|
flex: [1]
|
|
@@ -5280,7 +5456,7 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
5280
5456
|
}
|
|
5281
5457
|
}, [highlightItemIndex]);
|
|
5282
5458
|
return React__default.createElement("ul", {
|
|
5283
|
-
className: styles$
|
|
5459
|
+
className: styles$h['dropdown-list'],
|
|
5284
5460
|
"data-testid": testId,
|
|
5285
5461
|
ref: listRef
|
|
5286
5462
|
}, React__default.Children.map(children, function (child, index) {
|
|
@@ -5288,7 +5464,7 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
5288
5464
|
|
|
5289
5465
|
return React__default.createElement("div", {
|
|
5290
5466
|
key: index,
|
|
5291
|
-
className: classnames(styles$
|
|
5467
|
+
className: classnames(styles$h['dropdown-list__item'], (_classNames = {}, _classNames[styles$h['dropdown-list__item--hover']] = focusedItem === index, _classNames)),
|
|
5292
5468
|
onMouseEnter: function onMouseEnter() {
|
|
5293
5469
|
return setFocusOnItem(index);
|
|
5294
5470
|
}
|
|
@@ -5296,537 +5472,438 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
5296
5472
|
}));
|
|
5297
5473
|
};
|
|
5298
5474
|
|
|
5299
|
-
var
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5475
|
+
var KebabMenu = function KebabMenu(_ref) {
|
|
5476
|
+
var actions = _ref.actions;
|
|
5477
|
+
return React__default.createElement(Dropdown, {
|
|
5478
|
+
trigger: React__default.createElement(Button$1, {
|
|
5479
|
+
theme: "link-icon"
|
|
5480
|
+
}, React__default.createElement(IconEllipsisV, null)),
|
|
5481
|
+
alignment: "right"
|
|
5482
|
+
}, React__default.createElement(DropdownList, null, actions.map(function (action) {
|
|
5483
|
+
return React__default.createElement(DropdownListItem, {
|
|
5484
|
+
onClick: action.onAction,
|
|
5485
|
+
key: action.action
|
|
5486
|
+
}, action.label);
|
|
5487
|
+
})));
|
|
5303
5488
|
};
|
|
5304
5489
|
|
|
5305
|
-
var
|
|
5306
|
-
var _useState = useState(false),
|
|
5307
|
-
showTooltip = _useState[0],
|
|
5308
|
-
setShowTooltip = _useState[1];
|
|
5490
|
+
var styles$l = {"data-table-cell":"_2Ybjx","data-table-cell--no-padding":"_5KXHH","data-table-cell--vertical-border":"_2-I0j","data-table-cell--invalid":"_D73Vx","data-table-cell__content":"_3A9-M","data-table-cell__content--right-align":"_17Km7","data-table-cell__content--with-error":"_2c6KQ","data-table-cell__error-icon":"_2hIl3","data-table-cell__error-icon--right-align":"_8Uhyd","data-table-cell__error-icon--left-align":"_3X51R"};
|
|
5309
5491
|
|
|
5310
|
-
|
|
5311
|
-
var labelElement = document.getElementById(labelId);
|
|
5312
|
-
var isHidden = labelElement && labelElement.offsetParent === null;
|
|
5313
|
-
var handleApplyTooltip = useCallback(function () {
|
|
5314
|
-
if (!shouldTruncate) {
|
|
5315
|
-
return;
|
|
5316
|
-
}
|
|
5317
|
-
|
|
5318
|
-
var labelElement = document.getElementById(labelId);
|
|
5319
|
-
|
|
5320
|
-
if (!labelElement) {
|
|
5321
|
-
return;
|
|
5322
|
-
}
|
|
5323
|
-
|
|
5324
|
-
var shouldShowTooltip = isEllipsisActive(labelElement);
|
|
5325
|
-
|
|
5326
|
-
if (showTooltip !== shouldShowTooltip) {
|
|
5327
|
-
setShowTooltip(shouldShowTooltip);
|
|
5328
|
-
}
|
|
5329
|
-
}, [shouldTruncate, isHidden]);
|
|
5330
|
-
useEffect(function () {
|
|
5331
|
-
var onWindowResize = debounce(handleApplyTooltip, 300);
|
|
5332
|
-
window.addEventListener('resize', onWindowResize);
|
|
5333
|
-
return function () {
|
|
5334
|
-
return window.removeEventListener('resize', onWindowResize);
|
|
5335
|
-
};
|
|
5336
|
-
}, [handleApplyTooltip]);
|
|
5337
|
-
useLayoutEffect(handleApplyTooltip, [handleApplyTooltip]);
|
|
5338
|
-
return {
|
|
5339
|
-
showTooltip: showTooltip,
|
|
5340
|
-
shouldTruncate: shouldTruncate
|
|
5341
|
-
};
|
|
5342
|
-
};
|
|
5343
|
-
|
|
5344
|
-
var Label = function Label(_ref) {
|
|
5345
|
-
var _classNames;
|
|
5346
|
-
|
|
5347
|
-
var htmlFor = _ref.htmlFor,
|
|
5348
|
-
children = _ref.children,
|
|
5349
|
-
_ref$truncate = _ref.truncate,
|
|
5350
|
-
truncate = _ref$truncate === void 0 ? true : _ref$truncate;
|
|
5351
|
-
var labelId = "label-" + htmlFor;
|
|
5492
|
+
var styles$m = {"overlay":"_2puqJ","overlay--after-open":"_1167h","overlay--before-close":"_t_t7L","content":"_wQQ_2","content--after-open":"_3jwux","content--before-close":"_2c2QP"};
|
|
5352
5493
|
|
|
5353
|
-
|
|
5354
|
-
showTooltip = _useLabelTooltip.showTooltip,
|
|
5355
|
-
shouldTruncate = _useLabelTooltip.shouldTruncate;
|
|
5494
|
+
var styles$n = {"header":"_36nxW","header__close-button":"_2zYre","sub-header":"_2XwRD"};
|
|
5356
5495
|
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5496
|
+
var ModalHeader = function ModalHeader(_ref) {
|
|
5497
|
+
var header = _ref.header,
|
|
5498
|
+
subHeader = _ref.subHeader,
|
|
5499
|
+
onClose = _ref.onClose,
|
|
5500
|
+
loading = _ref.loading;
|
|
5362
5501
|
|
|
5363
|
-
if (
|
|
5364
|
-
return React__default.createElement(
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5502
|
+
if (!header && !subHeader) {
|
|
5503
|
+
return onClose ? React__default.createElement("div", {
|
|
5504
|
+
className: styles$n['header__close-button']
|
|
5505
|
+
}, React__default.createElement(Button$1, {
|
|
5506
|
+
theme: "link-icon",
|
|
5507
|
+
onClick: onClose,
|
|
5508
|
+
disabled: loading
|
|
5509
|
+
}, React__default.createElement(IconTimes, null))) : null;
|
|
5368
5510
|
}
|
|
5369
5511
|
|
|
5370
|
-
return
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
var styles$o = {"caption":"_1DWBq"};
|
|
5374
|
-
|
|
5375
|
-
var Caption = function Caption(_ref) {
|
|
5376
|
-
var fieldId = _ref.fieldId,
|
|
5377
|
-
children = _ref.children;
|
|
5378
|
-
return React__default.createElement("div", {
|
|
5379
|
-
id: fieldId && fieldId + "-describer",
|
|
5380
|
-
className: styles$o['caption']
|
|
5381
|
-
}, children);
|
|
5382
|
-
};
|
|
5383
|
-
|
|
5384
|
-
var styles$p = {"error-message":"_nZ2MD"};
|
|
5385
|
-
|
|
5386
|
-
var ErrorMessage = function ErrorMessage(_ref) {
|
|
5387
|
-
var fieldId = _ref.fieldId,
|
|
5388
|
-
children = _ref.children,
|
|
5389
|
-
testId = _ref.testId;
|
|
5390
|
-
return React__default.createElement("div", {
|
|
5391
|
-
id: fieldId && fieldId + "-error-message",
|
|
5392
|
-
className: styles$p['error-message'],
|
|
5393
|
-
"data-testid": testId
|
|
5512
|
+
return React__default.createElement(Stack, {
|
|
5513
|
+
space: 12,
|
|
5514
|
+
marginBottom: 24
|
|
5394
5515
|
}, React__default.createElement(Inline, {
|
|
5395
|
-
|
|
5516
|
+
flex: [1],
|
|
5396
5517
|
alignItems: "center"
|
|
5397
|
-
}, React__default.createElement(
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
caption = _ref.caption,
|
|
5407
|
-
error = _ref.error,
|
|
5408
|
-
children = _ref.children;
|
|
5409
|
-
var shouldRenderLabel = label || typeof label === 'string';
|
|
5410
|
-
return React__default.createElement(Stack, {
|
|
5411
|
-
space: 8,
|
|
5412
|
-
flexItems: true
|
|
5413
|
-
}, shouldRenderLabel && React__default.createElement(Label, {
|
|
5414
|
-
htmlFor: id
|
|
5415
|
-
}, label), children, caption && React__default.createElement(Caption, {
|
|
5416
|
-
fieldId: id
|
|
5417
|
-
}, caption), error && React__default.createElement(ErrorMessage, {
|
|
5418
|
-
fieldId: id
|
|
5419
|
-
}, error));
|
|
5518
|
+
}, React__default.createElement("span", {
|
|
5519
|
+
className: styles$n['header']
|
|
5520
|
+
}, header), onClose && React__default.createElement(Button$1, {
|
|
5521
|
+
theme: "link-icon",
|
|
5522
|
+
onClick: onClose,
|
|
5523
|
+
disabled: loading
|
|
5524
|
+
}, React__default.createElement(IconTimes, null))), subHeader && React__default.createElement("div", {
|
|
5525
|
+
className: styles$n['sub-header']
|
|
5526
|
+
}, subHeader));
|
|
5420
5527
|
};
|
|
5421
5528
|
|
|
5422
|
-
var
|
|
5423
|
-
|
|
5424
|
-
|
|
5529
|
+
var ModalContext = createContext({
|
|
5530
|
+
isModalMounted: false
|
|
5531
|
+
});
|
|
5532
|
+
var useModalContext = function useModalContext() {
|
|
5533
|
+
var context = useContext(ModalContext);
|
|
5425
5534
|
return context || {};
|
|
5426
5535
|
};
|
|
5427
5536
|
|
|
5428
|
-
var
|
|
5429
|
-
var
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
var _acc$touched, _acc$error, _acc$value;
|
|
5450
|
-
|
|
5451
|
-
return {
|
|
5452
|
-
touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
|
|
5453
|
-
error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
|
|
5454
|
-
value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
|
|
5455
|
-
};
|
|
5456
|
-
}, {
|
|
5457
|
-
touched: formik.touched,
|
|
5458
|
-
error: formik.errors,
|
|
5459
|
-
value: formik.values
|
|
5460
|
-
});
|
|
5461
|
-
return {
|
|
5462
|
-
error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
|
|
5463
|
-
value: formikLatestLevel.value
|
|
5464
|
-
};
|
|
5465
|
-
};
|
|
5466
|
-
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
5467
|
-
return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
|
|
5468
|
-
};
|
|
5469
|
-
|
|
5470
|
-
var useFieldControllers = function useFieldControllers(_ref) {
|
|
5471
|
-
var name = _ref.name,
|
|
5472
|
-
inputId = _ref.id,
|
|
5473
|
-
value = _ref.value,
|
|
5474
|
-
_onChange = _ref.onChange,
|
|
5475
|
-
_onBlur = _ref.onBlur,
|
|
5476
|
-
_onFocus = _ref.onFocus,
|
|
5477
|
-
_onKeyDown = _ref.onKeyDown,
|
|
5478
|
-
error = _ref.error,
|
|
5479
|
-
_ref$type = _ref.type,
|
|
5480
|
-
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
5481
|
-
|
|
5482
|
-
var _useFormContext = useFormContext(),
|
|
5483
|
-
formik = _useFormContext.formik;
|
|
5484
|
-
|
|
5485
|
-
var id = useFieldId({
|
|
5486
|
-
name: name,
|
|
5487
|
-
id: inputId
|
|
5488
|
-
});
|
|
5489
|
-
var controllers = {
|
|
5490
|
-
id: id,
|
|
5491
|
-
error: error,
|
|
5492
|
-
value: value,
|
|
5493
|
-
onChange: function onChange(e) {
|
|
5494
|
-
return _onChange && _onChange(e.target.value);
|
|
5495
|
-
},
|
|
5496
|
-
onBlur: function onBlur(e) {
|
|
5497
|
-
return _onBlur && _onBlur(e.target.value);
|
|
5498
|
-
},
|
|
5499
|
-
onFocus: function onFocus(e) {
|
|
5500
|
-
return _onFocus && _onFocus(e.target.value);
|
|
5537
|
+
var Modal = function Modal(_ref) {
|
|
5538
|
+
var children = _ref.children,
|
|
5539
|
+
header = _ref.header,
|
|
5540
|
+
subHeader = _ref.subHeader,
|
|
5541
|
+
onClose = _ref.onClose,
|
|
5542
|
+
loading = _ref.loading,
|
|
5543
|
+
_ref$zIndex = _ref.zIndex,
|
|
5544
|
+
zIndex = _ref$zIndex === void 0 ? Z_INDEX_LAYERS.MODAL : _ref$zIndex,
|
|
5545
|
+
rootElementId = _ref.rootElementId,
|
|
5546
|
+
_ref$width = _ref.width,
|
|
5547
|
+
width = _ref$width === void 0 ? 500 : _ref$width,
|
|
5548
|
+
height = _ref.height,
|
|
5549
|
+
maxWidth = _ref.maxWidth,
|
|
5550
|
+
_ref$shouldReturnFocu = _ref.shouldReturnFocusAfterClose,
|
|
5551
|
+
shouldReturnFocusAfterClose = _ref$shouldReturnFocu === void 0 ? true : _ref$shouldReturnFocu,
|
|
5552
|
+
testId = _ref.testId;
|
|
5553
|
+
var style = {
|
|
5554
|
+
content: {
|
|
5555
|
+
width: width,
|
|
5556
|
+
height: height,
|
|
5557
|
+
maxWidth: maxWidth
|
|
5501
5558
|
},
|
|
5502
|
-
|
|
5503
|
-
|
|
5559
|
+
overlay: {
|
|
5560
|
+
zIndex: zIndex
|
|
5504
5561
|
}
|
|
5505
5562
|
};
|
|
5506
|
-
|
|
5563
|
+
return React__default.createElement(ReactModal, {
|
|
5564
|
+
isOpen: true,
|
|
5565
|
+
testId: testId,
|
|
5566
|
+
shouldCloseOnEsc: true,
|
|
5567
|
+
shouldCloseOnOverlayClick: false,
|
|
5568
|
+
shouldReturnFocusAfterClose: shouldReturnFocusAfterClose,
|
|
5569
|
+
onRequestClose: onClose && !loading ? onClose : undefined,
|
|
5570
|
+
style: style,
|
|
5571
|
+
closeTimeoutMS: 200,
|
|
5572
|
+
contentLabel: "Modal",
|
|
5573
|
+
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
5574
|
+
overlayClassName: {
|
|
5575
|
+
base: styles$m['overlay'],
|
|
5576
|
+
afterOpen: styles$m['overlay--after-open'],
|
|
5577
|
+
beforeClose: styles$m['overlay--before-close']
|
|
5578
|
+
},
|
|
5579
|
+
className: {
|
|
5580
|
+
base: styles$m['content'],
|
|
5581
|
+
afterOpen: styles$m['content--after-open'],
|
|
5582
|
+
beforeClose: styles$m['content--before-close']
|
|
5583
|
+
}
|
|
5584
|
+
}, React__default.createElement(ModalHeader, {
|
|
5585
|
+
header: header,
|
|
5586
|
+
subHeader: subHeader,
|
|
5587
|
+
onClose: onClose,
|
|
5588
|
+
loading: loading
|
|
5589
|
+
}), React__default.createElement(ModalContext.Provider, {
|
|
5590
|
+
value: {
|
|
5591
|
+
isModalMounted: true
|
|
5592
|
+
}
|
|
5593
|
+
}, children));
|
|
5594
|
+
};
|
|
5507
5595
|
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
formik.setFieldValue(name, Number(value).toFixed(2));
|
|
5512
|
-
}
|
|
5513
|
-
};
|
|
5596
|
+
Modal.setAppElement = function (rootElement) {
|
|
5597
|
+
ReactModal.setAppElement(rootElement);
|
|
5598
|
+
};
|
|
5514
5599
|
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
onChange: _onChange ? controllers.onChange : function (e) {
|
|
5519
|
-
return formik.setFieldValue(name, e.target.value);
|
|
5520
|
-
},
|
|
5521
|
-
onBlur: _onBlur ? function (e) {
|
|
5522
|
-
_onBlur && _onBlur(e.target.value);
|
|
5523
|
-
formik.setFieldTouched(name);
|
|
5524
|
-
currencyBlur();
|
|
5525
|
-
} : function () {
|
|
5526
|
-
formik.setFieldTouched(name);
|
|
5527
|
-
currencyBlur();
|
|
5528
|
-
}
|
|
5529
|
-
});
|
|
5530
|
-
}
|
|
5600
|
+
var THRESHOLD = 20;
|
|
5601
|
+
var useScrollShadow = function useScrollShadow() {
|
|
5602
|
+
var ref = useRef(null);
|
|
5531
5603
|
|
|
5532
|
-
|
|
5533
|
-
|
|
5604
|
+
var _useState = useState(false),
|
|
5605
|
+
showScrollShadow = _useState[0],
|
|
5606
|
+
setShowScrollShadow = _useState[1];
|
|
5534
5607
|
|
|
5535
|
-
|
|
5608
|
+
useEffect(function () {
|
|
5609
|
+
if (!ref.current) {
|
|
5610
|
+
return;
|
|
5611
|
+
}
|
|
5536
5612
|
|
|
5537
|
-
var
|
|
5538
|
-
var _classnames;
|
|
5613
|
+
var modalBody = ref.current;
|
|
5539
5614
|
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
error = _ref.error,
|
|
5545
|
-
id = _ref.id,
|
|
5546
|
-
maxLength = _ref.maxLength,
|
|
5547
|
-
name = _ref.name,
|
|
5548
|
-
caption = _ref.caption,
|
|
5549
|
-
label = _ref.label,
|
|
5550
|
-
onBlur = _ref.onBlur,
|
|
5551
|
-
onChange = _ref.onChange,
|
|
5552
|
-
onFocus = _ref.onFocus,
|
|
5553
|
-
onKeyDown = _ref.onKeyDown,
|
|
5554
|
-
placeholder = _ref.placeholder,
|
|
5555
|
-
value = _ref.value,
|
|
5556
|
-
ref = _ref.ref,
|
|
5557
|
-
testId = _ref.testId;
|
|
5558
|
-
var controllers = useFieldControllers({
|
|
5559
|
-
error: error,
|
|
5560
|
-
id: id,
|
|
5561
|
-
name: name,
|
|
5562
|
-
onChange: onChange,
|
|
5563
|
-
onBlur: onBlur,
|
|
5564
|
-
onFocus: onFocus,
|
|
5565
|
-
onKeyDown: onKeyDown,
|
|
5566
|
-
value: value
|
|
5567
|
-
});
|
|
5568
|
-
var hasError = !!controllers.error;
|
|
5569
|
-
var inputProps = {
|
|
5570
|
-
'aria-describedby': hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
5571
|
-
'aria-invalid': hasError,
|
|
5572
|
-
autoComplete: autoComplete,
|
|
5573
|
-
autoFocus: autoFocus,
|
|
5574
|
-
className: classnames(textFieldStyles['text-field'], (_classnames = {}, _classnames[textFieldStyles['text-field--invalid']] = hasError, _classnames)),
|
|
5575
|
-
'data-testid': testId,
|
|
5576
|
-
disabled: disabled,
|
|
5577
|
-
defaultValue: defaultValue,
|
|
5578
|
-
id: controllers.id,
|
|
5579
|
-
maxLength: maxLength,
|
|
5580
|
-
name: name,
|
|
5581
|
-
onBlur: controllers.onBlur,
|
|
5582
|
-
onChange: controllers.onChange,
|
|
5583
|
-
onFocus: controllers.onFocus,
|
|
5584
|
-
onKeyDown: controllers.onKeyDown,
|
|
5585
|
-
placeholder: placeholder,
|
|
5586
|
-
ref: ref,
|
|
5587
|
-
size: 1,
|
|
5588
|
-
type: 'text',
|
|
5589
|
-
value: controllers.value
|
|
5590
|
-
};
|
|
5591
|
-
var fieldProps = {
|
|
5592
|
-
caption: caption,
|
|
5593
|
-
error: controllers.error,
|
|
5594
|
-
label: label,
|
|
5595
|
-
id: inputProps.id,
|
|
5596
|
-
name: name
|
|
5597
|
-
};
|
|
5615
|
+
if (modalBody.offsetHeight > THRESHOLD) {
|
|
5616
|
+
setShowScrollShadow(true);
|
|
5617
|
+
}
|
|
5618
|
+
}, []);
|
|
5598
5619
|
return {
|
|
5599
|
-
|
|
5600
|
-
|
|
5620
|
+
ref: ref,
|
|
5621
|
+
showScrollShadow: showScrollShadow
|
|
5601
5622
|
};
|
|
5602
5623
|
};
|
|
5603
5624
|
|
|
5604
|
-
var
|
|
5605
|
-
var inputProps = _ref.inputProps,
|
|
5606
|
-
allOtherProps = _ref.allOtherProps;
|
|
5607
|
-
return React__default.createElement("input", Object.assign({}, inputProps, {
|
|
5608
|
-
onBlur: function onBlur(e) {
|
|
5609
|
-
e.target.value = parseTime(e.target.value, 'g:i A');
|
|
5610
|
-
inputProps.onChange(e);
|
|
5611
|
-
inputProps.onBlur(e);
|
|
5612
|
-
},
|
|
5613
|
-
onClick: allOtherProps.onClick,
|
|
5614
|
-
onMouseEnter: allOtherProps.onMouseEnter,
|
|
5615
|
-
onMouseLeave: allOtherProps.onMouseLeave,
|
|
5616
|
-
onInput: function onInput(e) {
|
|
5617
|
-
var target = e.target;
|
|
5618
|
-
allOtherProps.onInputChange(target.value);
|
|
5619
|
-
}
|
|
5620
|
-
}));
|
|
5621
|
-
};
|
|
5622
|
-
|
|
5623
|
-
var _excluded$2h = ["placeholder", "autoComplete", "selectedTimeOption"];
|
|
5624
|
-
|
|
5625
|
-
var TimeFieldDropdownElement = function TimeFieldDropdownElement(_ref, ref) {
|
|
5626
|
-
var _ref$placeholder = _ref.placeholder,
|
|
5627
|
-
placeholder = _ref$placeholder === void 0 ? '9:00 AM' : _ref$placeholder,
|
|
5628
|
-
_ref$autoComplete = _ref.autoComplete,
|
|
5629
|
-
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
5630
|
-
selectedTimeOption = _ref.selectedTimeOption,
|
|
5631
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
|
|
5625
|
+
var styles$o = {"modal-body":"_2J-ku","modal-body--with-scroll-shadow":"_2ErCP"};
|
|
5632
5626
|
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
autoComplete: autoComplete,
|
|
5636
|
-
ref: ref
|
|
5637
|
-
})),
|
|
5638
|
-
inputProps = _useTextField.inputProps,
|
|
5639
|
-
fieldProps = _useTextField.fieldProps;
|
|
5627
|
+
var ModalBody = function ModalBody(_ref) {
|
|
5628
|
+
var _classNames;
|
|
5640
5629
|
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
inputProps.onChange({
|
|
5644
|
-
target: {
|
|
5645
|
-
value: selectedTimeOption
|
|
5646
|
-
}
|
|
5647
|
-
});
|
|
5648
|
-
}
|
|
5649
|
-
}, [selectedTimeOption]);
|
|
5650
|
-
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement(TimeFieldInput, {
|
|
5651
|
-
inputProps: inputProps,
|
|
5652
|
-
allOtherProps: allOtherProps
|
|
5653
|
-
}));
|
|
5654
|
-
};
|
|
5630
|
+
var children = _ref.children,
|
|
5631
|
+
testId = _ref.testId;
|
|
5655
5632
|
|
|
5656
|
-
var
|
|
5633
|
+
var _useScrollShadow = useScrollShadow(),
|
|
5634
|
+
ref = _useScrollShadow.ref,
|
|
5635
|
+
showScrollShadow = _useScrollShadow.showScrollShadow;
|
|
5657
5636
|
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
width = _ref.width,
|
|
5665
|
-
maxHeight = _ref.maxHeight,
|
|
5666
|
-
testId = _ref.testId,
|
|
5667
|
-
children = _ref.children,
|
|
5668
|
-
triggerWidth = _ref.triggerWidth;
|
|
5637
|
+
return React__default.createElement("div", {
|
|
5638
|
+
className: classnames(styles$o['modal-body'], (_classNames = {}, _classNames[styles$o['modal-body--with-scroll-shadow']] = showScrollShadow, _classNames)),
|
|
5639
|
+
ref: ref,
|
|
5640
|
+
"data-testid": testId
|
|
5641
|
+
}, children);
|
|
5642
|
+
};
|
|
5669
5643
|
|
|
5670
|
-
|
|
5671
|
-
isOpen = _useState[0],
|
|
5672
|
-
setIsOpen = _useState[1];
|
|
5644
|
+
var styles$p = {"modal-footer":"_LKOr5","tertiary-container":"_Qktd-"};
|
|
5673
5645
|
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5646
|
+
var updateButtonProps = function updateButtonProps(button, newProps) {
|
|
5647
|
+
if (!button) {
|
|
5648
|
+
return null;
|
|
5649
|
+
}
|
|
5677
5650
|
|
|
5678
|
-
|
|
5679
|
-
return
|
|
5680
|
-
}
|
|
5651
|
+
if (button.type !== Button$1) {
|
|
5652
|
+
return button;
|
|
5653
|
+
}
|
|
5681
5654
|
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
setIsOpen(true);
|
|
5685
|
-
} else {
|
|
5686
|
-
handleToggleDropdown();
|
|
5687
|
-
}
|
|
5655
|
+
return React__default.cloneElement(button, _extends({}, newProps));
|
|
5656
|
+
};
|
|
5688
5657
|
|
|
5689
|
-
|
|
5658
|
+
var ModalFooter = function ModalFooter(_ref) {
|
|
5659
|
+
var children = _ref.children,
|
|
5660
|
+
actions = _ref.actions,
|
|
5661
|
+
testId = _ref.testId;
|
|
5690
5662
|
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
}
|
|
5694
|
-
};
|
|
5663
|
+
if (actions) {
|
|
5664
|
+
var _actions$primary, _actions$secondary, _actions$tertiary, _classnames;
|
|
5695
5665
|
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
}
|
|
5666
|
+
var primaryButton = updateButtonProps(actions.primary, {
|
|
5667
|
+
theme: (actions === null || actions === void 0 ? void 0 : (_actions$primary = actions.primary) === null || _actions$primary === void 0 ? void 0 : _actions$primary.props.theme) || 'primary',
|
|
5668
|
+
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
5669
|
+
});
|
|
5670
|
+
var secondaryButton = updateButtonProps(actions.secondary, {
|
|
5671
|
+
theme: (actions === null || actions === void 0 ? void 0 : (_actions$secondary = actions.secondary) === null || _actions$secondary === void 0 ? void 0 : _actions$secondary.props.theme) || 'default',
|
|
5672
|
+
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
5673
|
+
});
|
|
5674
|
+
var tertiaryButton = updateButtonProps(actions.tertiary, {
|
|
5675
|
+
theme: (actions === null || actions === void 0 ? void 0 : (_actions$tertiary = actions.tertiary) === null || _actions$tertiary === void 0 ? void 0 : _actions$tertiary.props.theme) || 'link-primary',
|
|
5676
|
+
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
5677
|
+
});
|
|
5678
|
+
return React__default.createElement(FooterContainer, {
|
|
5679
|
+
testId: testId
|
|
5680
|
+
}, React__default.createElement(Inline, {
|
|
5681
|
+
justifyContent: "space-between"
|
|
5682
|
+
}, React__default.createElement("div", {
|
|
5683
|
+
className: classnames((_classnames = {}, _classnames[styles$p['tertiary-container']] = tertiaryButton && tertiaryButton.props.theme.startsWith('link'), _classnames))
|
|
5684
|
+
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
5685
|
+
space: 12
|
|
5686
|
+
}, secondaryButton, primaryButton)));
|
|
5687
|
+
}
|
|
5700
5688
|
|
|
5701
|
-
|
|
5689
|
+
return React__default.createElement(FooterContainer, null, children);
|
|
5690
|
+
};
|
|
5702
5691
|
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5692
|
+
var FooterContainer = function FooterContainer(_ref2) {
|
|
5693
|
+
var children = _ref2.children,
|
|
5694
|
+
testId = _ref2.testId;
|
|
5695
|
+
var childrenItens = React__default.Children.toArray(children);
|
|
5696
|
+
var hasCustomAlignment = childrenItens.length === 1 && childrenItens[0].type === Inline;
|
|
5697
|
+
return React__default.createElement("div", {
|
|
5698
|
+
className: styles$p['modal-footer'],
|
|
5699
|
+
"data-testid": testId
|
|
5700
|
+
}, React__default.createElement(Inline, {
|
|
5701
|
+
justifyContent: "end",
|
|
5702
|
+
space: 12,
|
|
5703
|
+
flex: hasCustomAlignment ? [1] : undefined
|
|
5704
|
+
}, children));
|
|
5705
|
+
};
|
|
5707
5706
|
|
|
5708
|
-
|
|
5709
|
-
if (triggersOn !== 'hover') {
|
|
5710
|
-
if (trigger.type === TimeFieldDropdownTrigger && !isOpen) {
|
|
5711
|
-
setIsOpen(true);
|
|
5712
|
-
}
|
|
5707
|
+
var styles$q = {"container":"_v1b-5","wrapper":"_3mrLu","interactionDisabled":"_1J9dh","DayPicker-Day":"_8FcQE","navBar":"_1SPuq","todayButton":"_24FJ6","navButtonInteractionDisabled":"_Oxdm9","navButtonPrev":"_20uqc","navButtonNext":"_3C53z","months":"_M_eHz","month":"_3RPpJ","caption":"_1FXNw","weekdays":"_3KcRU","weekdaysRow":"_1fO_e","weekday":"_c1Y-X","body":"_34mA1","week":"_1PmqZ","day":"_1AWH2","disabled":"_3vJkw","selected":"_1DR0N","outside":"_276GV","footer":"_2M5xr","today":"_3N6fj","overlayWrapper":"_3Zqgu","overlay":"_20Ncd","weekNumber":"_2hb-S"};
|
|
5713
5708
|
|
|
5714
|
-
|
|
5715
|
-
trigger.props.onFocus(e);
|
|
5716
|
-
}
|
|
5709
|
+
var styles$r = {"container":"_okDvi","wrapper":"_17XdD","interactionDisabled":"_1O7OT","DayPicker-Day":"_3noGA","navBar":"_1Hl3Q","todayButton":"_m0Vs9","navButtonInteractionDisabled":"_1ULWH","navButtonPrev":"_3gjq8","navButtonNext":"_1m-Kd","months":"_Fq6Xh","month":"_3i0Oo","caption":"_36X9Y","weekdays":"_1aWPn","weekdaysRow":"_3HXCK","weekday":"_t-ctd","body":"_XAbiR","week":"_3Nwep","day":"_3nNcG","disabled":"_1M4ZF","selected":"_2PEs8","outside":"_1PIJa","footer":"_2T_z1","today":"_1hVM6","overlayWrapper":"_1L-hI","overlay":"_dDPZb","weekNumber":"_1alhT"};
|
|
5717
5710
|
|
|
5718
|
-
|
|
5719
|
-
|
|
5711
|
+
function parseDate(str, format, locale) {
|
|
5712
|
+
var parsed = dateFnsParse(str, format, new Date(), {
|
|
5713
|
+
locale: locale
|
|
5714
|
+
});
|
|
5720
5715
|
|
|
5721
|
-
|
|
5716
|
+
if (str.length === format.length && DateUtils.isDate(parsed)) {
|
|
5717
|
+
return parsed;
|
|
5718
|
+
}
|
|
5722
5719
|
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5720
|
+
return undefined;
|
|
5721
|
+
}
|
|
5722
|
+
function formatDate(date, format, locale) {
|
|
5723
|
+
return dateFnsFormat(date, format, {
|
|
5724
|
+
locale: locale
|
|
5725
|
+
});
|
|
5726
|
+
}
|
|
5727
|
+
function setToMidnight(date) {
|
|
5728
|
+
return date && startOfDay(date);
|
|
5729
|
+
}
|
|
5730
|
+
function getStartOfWeek(date, weekIndex) {
|
|
5731
|
+
var d = new Date(date);
|
|
5732
|
+
var firstDay = d.getDate() - d.getDay() + weekIndex;
|
|
5733
|
+
var firstDayAdjusted = firstDay > d.getDate() ? firstDay - 7 : firstDay;
|
|
5734
|
+
return new Date(d.setDate(firstDayAdjusted));
|
|
5735
|
+
}
|
|
5736
|
+
function getEndOfWeek(date, weekIndex) {
|
|
5737
|
+
var startOfWeek = getStartOfWeek(date, weekIndex);
|
|
5738
|
+
var endDay = startOfWeek.getDate() + 6;
|
|
5739
|
+
return new Date(startOfWeek.setDate(endDay));
|
|
5740
|
+
}
|
|
5741
|
+
function createWeekRange(date, weekStart) {
|
|
5742
|
+
return {
|
|
5743
|
+
start: getStartOfWeek(date, weekStart),
|
|
5744
|
+
end: getEndOfWeek(date, weekStart)
|
|
5726
5745
|
};
|
|
5746
|
+
}
|
|
5747
|
+
var DAYS = [getLocalizedString('time.sunday'), getLocalizedString('time.monday'), getLocalizedString('time.tuesday'), getLocalizedString('time.wednesday'), getLocalizedString('time.thursday'), getLocalizedString('time.friday'), getLocalizedString('time.saturday')];
|
|
5748
|
+
var MONTH_NAMES = [getLocalizedString('time.january'), getLocalizedString('time.february'), getLocalizedString('time.march'), getLocalizedString('time.april'), getLocalizedString('time.may'), getLocalizedString('time.june'), getLocalizedString('time.july'), getLocalizedString('time.august'), getLocalizedString('time.september'), getLocalizedString('time.october'), getLocalizedString('time.november'), getLocalizedString('time.december')];
|
|
5727
5749
|
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5750
|
+
var CALENDAR_MODE = {
|
|
5751
|
+
DAY: 'day',
|
|
5752
|
+
WEEK: 'week'
|
|
5753
|
+
};
|
|
5754
|
+
var CALENDAR_PLACEMENT = {
|
|
5755
|
+
BOTTOM: 'bottom',
|
|
5756
|
+
TOP: 'top'
|
|
5757
|
+
};
|
|
5732
5758
|
|
|
5733
|
-
|
|
5759
|
+
var calculateCalendarPosition = function calculateCalendarPosition(placement, anchorPosition, calendarDimensions) {
|
|
5760
|
+
if (!calendarDimensions) {
|
|
5761
|
+
return {
|
|
5762
|
+
left: 0,
|
|
5763
|
+
top: 0
|
|
5764
|
+
};
|
|
5765
|
+
}
|
|
5734
5766
|
|
|
5735
|
-
|
|
5736
|
-
|
|
5767
|
+
var horizontalPosition = getHorizontalPosition(anchorPosition, calendarDimensions);
|
|
5768
|
+
var verticalPosition = getVerticalPosition(anchorPosition, placement, calendarDimensions);
|
|
5769
|
+
return _extends({}, horizontalPosition, verticalPosition);
|
|
5770
|
+
};
|
|
5737
5771
|
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
}
|
|
5742
|
-
};
|
|
5772
|
+
var getHorizontalPosition = function getHorizontalPosition(anchorPosition, calendarDimensions) {
|
|
5773
|
+
var innerWidth = window.innerWidth;
|
|
5774
|
+
var calendarRight = anchorPosition.left + calendarDimensions.width;
|
|
5743
5775
|
|
|
5744
|
-
|
|
5745
|
-
|
|
5776
|
+
if (innerWidth > calendarRight + BUFFER) {
|
|
5777
|
+
return {
|
|
5778
|
+
left: anchorPosition.left
|
|
5779
|
+
};
|
|
5780
|
+
}
|
|
5781
|
+
|
|
5782
|
+
return {
|
|
5783
|
+
left: anchorPosition.right - calendarDimensions.width
|
|
5746
5784
|
};
|
|
5785
|
+
};
|
|
5747
5786
|
|
|
5748
|
-
|
|
5749
|
-
|
|
5787
|
+
var getVerticalPosition = function getVerticalPosition(anchorPosition, placement, calendarDimensions) {
|
|
5788
|
+
var calendarTopAboveTrigger = anchorPosition.top - calendarDimensions.height - PADDING;
|
|
5789
|
+
var calendarTopBelowTrigger = anchorPosition.bottom + PADDING;
|
|
5750
5790
|
|
|
5751
|
-
|
|
5752
|
-
|
|
5791
|
+
if (placement === CALENDAR_PLACEMENT.TOP) {
|
|
5792
|
+
if (calendarTopAboveTrigger < 0) {
|
|
5793
|
+
return {
|
|
5794
|
+
top: anchorPosition.bottom + PADDING
|
|
5795
|
+
};
|
|
5753
5796
|
}
|
|
5754
|
-
};
|
|
5755
5797
|
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5798
|
+
return {
|
|
5799
|
+
top: calendarTopAboveTrigger + window.scrollY
|
|
5800
|
+
};
|
|
5801
|
+
} else {
|
|
5802
|
+
if (calendarTopBelowTrigger + calendarDimensions.height > window.innerHeight) {
|
|
5803
|
+
return {
|
|
5804
|
+
top: calendarTopAboveTrigger + window.scrollY
|
|
5805
|
+
};
|
|
5759
5806
|
}
|
|
5760
5807
|
|
|
5761
|
-
|
|
5808
|
+
return {
|
|
5809
|
+
top: calendarTopBelowTrigger + window.scrollY
|
|
5810
|
+
};
|
|
5811
|
+
}
|
|
5812
|
+
};
|
|
5762
5813
|
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5814
|
+
var Calendar = function Calendar(_ref) {
|
|
5815
|
+
var _ref$mode = _ref.mode,
|
|
5816
|
+
mode = _ref$mode === void 0 ? CALENDAR_MODE.DAY : _ref$mode,
|
|
5817
|
+
_ref$position = _ref.position,
|
|
5818
|
+
position = _ref$position === void 0 ? CALENDAR_PLACEMENT.BOTTOM : _ref$position,
|
|
5819
|
+
_ref$weekStart = _ref.weekStart,
|
|
5820
|
+
weekStart = _ref$weekStart === void 0 ? 0 : _ref$weekStart,
|
|
5821
|
+
selected = _ref.selected,
|
|
5822
|
+
onSelect = _ref.onSelect,
|
|
5823
|
+
onClickOutside = _ref.onClickOutside,
|
|
5824
|
+
disabledDays = _ref.disabledDays,
|
|
5825
|
+
anchorRef = _ref.anchorRef,
|
|
5826
|
+
testId = _ref.testId;
|
|
5827
|
+
|
|
5828
|
+
var _useState = useState(null),
|
|
5829
|
+
calendarRef = _useState[0],
|
|
5830
|
+
setCalendarRef = _useState[1];
|
|
5831
|
+
|
|
5832
|
+
var style = mode === CALENDAR_MODE.DAY ? styles$q : styles$r;
|
|
5833
|
+
var anchorNode = anchorRef.current;
|
|
5834
|
+
useOnClickOutside({
|
|
5835
|
+
current: calendarRef
|
|
5836
|
+
}, function (event) {
|
|
5837
|
+
var _anchorRef$current;
|
|
5838
|
+
|
|
5839
|
+
if (!((_anchorRef$current = anchorRef.current) !== null && _anchorRef$current !== void 0 && _anchorRef$current.contains(event === null || event === void 0 ? void 0 : event.srcElement))) {
|
|
5840
|
+
onClickOutside();
|
|
5769
5841
|
}
|
|
5842
|
+
});
|
|
5843
|
+
var weekRange = selected ? createWeekRange(selected, weekStart) : undefined;
|
|
5844
|
+
var selectedRange = weekRange && {
|
|
5845
|
+
from: weekRange.start,
|
|
5846
|
+
to: weekRange.end
|
|
5770
5847
|
};
|
|
5771
5848
|
|
|
5772
|
-
var
|
|
5773
|
-
|
|
5774
|
-
|
|
5849
|
+
var handleSelect = function handleSelect(day) {
|
|
5850
|
+
var selectedDate = setToMidnight(day);
|
|
5851
|
+
|
|
5852
|
+
if (mode === CALENDAR_MODE.DAY) {
|
|
5853
|
+
onSelect(selectedDate);
|
|
5854
|
+
} else {
|
|
5855
|
+
var _weekRange = createWeekRange(selectedDate, weekStart);
|
|
5856
|
+
|
|
5857
|
+
onSelect(_weekRange.start);
|
|
5775
5858
|
}
|
|
5776
5859
|
|
|
5777
|
-
|
|
5860
|
+
setTimeout(function () {
|
|
5861
|
+
onClickOutside();
|
|
5862
|
+
}, 100);
|
|
5778
5863
|
};
|
|
5779
5864
|
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5865
|
+
if (!anchorNode) {
|
|
5866
|
+
return null;
|
|
5867
|
+
}
|
|
5868
|
+
|
|
5869
|
+
var anchorPosition = anchorNode.getBoundingClientRect();
|
|
5870
|
+
var calendarPosition = calculateCalendarPosition(position, anchorPosition, calendarRef === null || calendarRef === void 0 ? void 0 : calendarRef.getBoundingClientRect());
|
|
5871
|
+
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
5872
|
+
className: style.overlayWrapper
|
|
5873
|
+
}, React__default.createElement("div", {
|
|
5874
|
+
className: style.overlay,
|
|
5875
|
+
ref: function ref(_ref2) {
|
|
5876
|
+
return setCalendarRef(_ref2);
|
|
5789
5877
|
},
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
ref: updatedRef,
|
|
5802
|
-
onFocus: handleFocus
|
|
5803
|
-
}), trigger), React__default.createElement(DropdownPane, {
|
|
5804
|
-
width: width,
|
|
5805
|
-
maxHeight: maxHeight,
|
|
5806
|
-
onMouseEnter: handlePaneMouseEnter,
|
|
5807
|
-
onMouseLeave: handlePaneMouseLeave,
|
|
5808
|
-
alignment: alignment,
|
|
5809
|
-
testId: testId
|
|
5810
|
-
}, children));
|
|
5811
|
-
};
|
|
5878
|
+
style: _extends({}, calendarPosition, {
|
|
5879
|
+
zIndex: Z_INDEX_LAYERS.MODAL
|
|
5880
|
+
}),
|
|
5881
|
+
"data-testid": testId
|
|
5882
|
+
}, React__default.createElement(DayPicker, {
|
|
5883
|
+
format: "MM/dd/yyyy",
|
|
5884
|
+
classNames: style,
|
|
5885
|
+
onDayClick: function onDayClick(day, activeModifiers) {
|
|
5886
|
+
var isDateDisabled = Object.keys(activeModifiers).find(function (modifier) {
|
|
5887
|
+
return modifier.includes('disabled');
|
|
5888
|
+
});
|
|
5812
5889
|
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
},
|
|
5825
|
-
|
|
5890
|
+
if (!Boolean(isDateDisabled)) {
|
|
5891
|
+
handleSelect(day);
|
|
5892
|
+
}
|
|
5893
|
+
},
|
|
5894
|
+
selectedDays: mode === CALENDAR_MODE.DAY ? selected : selectedRange,
|
|
5895
|
+
disabledDays: disabledDays,
|
|
5896
|
+
months: MONTH_NAMES,
|
|
5897
|
+
weekdaysLong: DAYS,
|
|
5898
|
+
initialMonth: selected,
|
|
5899
|
+
weekdaysShort: DAYS.map(function (day) {
|
|
5900
|
+
return day.substring(0, 2);
|
|
5901
|
+
}),
|
|
5902
|
+
showOutsideDays: mode === CALENDAR_MODE.WEEK,
|
|
5903
|
+
firstDayOfWeek: weekStart
|
|
5904
|
+
}))));
|
|
5826
5905
|
};
|
|
5827
5906
|
|
|
5828
|
-
var styles$q = {"data-table-cell":"_2Ybjx","data-table-cell--no-padding":"_5KXHH","data-table-cell--vertical-border":"_2-I0j","data-table-cell--invalid":"_D73Vx","data-table-cell__content":"_3A9-M","data-table-cell__content--right-align":"_17Km7","data-table-cell__content--with-error":"_2c6KQ","data-table-cell__error-icon":"_2hIl3","data-table-cell__error-icon--right-align":"_8Uhyd","data-table-cell__error-icon--left-align":"_3X51R"};
|
|
5829
|
-
|
|
5830
5907
|
var DataTableCellElement = function DataTableCellElement(_ref, ref) {
|
|
5831
5908
|
var _columns$columnIndex, _classnames, _classnames2, _classnames3;
|
|
5832
5909
|
|
|
@@ -5848,17 +5925,17 @@ var DataTableCellElement = function DataTableCellElement(_ref, ref) {
|
|
|
5848
5925
|
var hasError = !!error;
|
|
5849
5926
|
var errorMessage = error;
|
|
5850
5927
|
var icon = hasError && React__default.createElement("div", {
|
|
5851
|
-
className: classnames(styles$
|
|
5928
|
+
className: classnames(styles$l['data-table-cell__error-icon'], (_classnames = {}, _classnames[styles$l['data-table-cell__error-icon--right-align']] = isRightAligned, _classnames[styles$l['data-table-cell__error-icon--left-align']] = !isRightAligned, _classnames))
|
|
5852
5929
|
}, React__default.createElement(IconTimesOctagon, {
|
|
5853
5930
|
size: "medium",
|
|
5854
5931
|
color: RADISH400
|
|
5855
5932
|
}));
|
|
5856
5933
|
var TableCell = React__default.createElement("td", {
|
|
5857
|
-
className: classnames((_classnames2 = {}, _classnames2[styles$
|
|
5934
|
+
className: classnames((_classnames2 = {}, _classnames2[styles$l['data-table-cell--invalid']] = hasError, _classnames2[styles$l['data-table-cell--no-padding']] = noPadding, _classnames2[styles$l['data-table-cell--vertical-border']] = hasVerticalBorders, _classnames2), styles$l['data-table-cell']),
|
|
5858
5935
|
colSpan: colSpan,
|
|
5859
5936
|
ref: ref
|
|
5860
5937
|
}, React__default.createElement("div", {
|
|
5861
|
-
className: classnames(styles$
|
|
5938
|
+
className: classnames(styles$l['data-table-cell__content'], (_classnames3 = {}, _classnames3[styles$l['data-table-cell__content--with-error']] = hasError, _classnames3[styles$l['data-table-cell__content--right-align']] = isRightAligned, _classnames3))
|
|
5862
5939
|
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
5863
5940
|
return React__default.createElement(Tooltip$1, {
|
|
5864
5941
|
overlay: errorMessage,
|
|
@@ -5895,59 +5972,6 @@ var DataTableRowActions = function DataTableRowActions(_ref) {
|
|
|
5895
5972
|
})));
|
|
5896
5973
|
};
|
|
5897
5974
|
|
|
5898
|
-
var styles$r = {"affix-container":"_ybKOk","affix-container--prefixed":"_2COk3","affix-container--suffixed":"_1xXXN","prefix":"_eX5OL","suffix":"__YH01"};
|
|
5899
|
-
|
|
5900
|
-
var AffixContainer = function AffixContainer(_ref) {
|
|
5901
|
-
var _classnames;
|
|
5902
|
-
|
|
5903
|
-
var prefix = _ref.prefix,
|
|
5904
|
-
suffix = _ref.suffix,
|
|
5905
|
-
children = _ref.children,
|
|
5906
|
-
testId = _ref.testId;
|
|
5907
|
-
var container = useRef(null);
|
|
5908
|
-
var prefixElement = useRef(null);
|
|
5909
|
-
var suffixElement = useRef(null);
|
|
5910
|
-
var isHidden = container.current && container.current.offsetParent === null;
|
|
5911
|
-
useLayoutEffect(function () {
|
|
5912
|
-
if (container.current) {
|
|
5913
|
-
var input = container.current.querySelector('input, [class$=control] > div');
|
|
5914
|
-
|
|
5915
|
-
if (input) {
|
|
5916
|
-
if (prefix && prefixElement.current) {
|
|
5917
|
-
var _prefixElement$curren;
|
|
5918
|
-
|
|
5919
|
-
var prefixWidth = prefixElement === null || prefixElement === void 0 ? void 0 : (_prefixElement$curren = prefixElement.current) === null || _prefixElement$curren === void 0 ? void 0 : _prefixElement$curren.offsetWidth;
|
|
5920
|
-
input.style.paddingLeft = prefixWidth + 'px';
|
|
5921
|
-
}
|
|
5922
|
-
|
|
5923
|
-
if (suffix && suffixElement.current) {
|
|
5924
|
-
var suffixWidth = suffixElement.current.offsetWidth;
|
|
5925
|
-
input.style.paddingRight = suffixWidth + 'px';
|
|
5926
|
-
}
|
|
5927
|
-
}
|
|
5928
|
-
}
|
|
5929
|
-
}, [prefix, suffix, isHidden]);
|
|
5930
|
-
var hasPrefix = !!prefix;
|
|
5931
|
-
var hasSuffix = !!suffix;
|
|
5932
|
-
|
|
5933
|
-
if (!hasPrefix && !hasSuffix) {
|
|
5934
|
-
return children;
|
|
5935
|
-
}
|
|
5936
|
-
|
|
5937
|
-
var classes = classnames(styles$r['affix-container'], (_classnames = {}, _classnames[styles$r['affix-container--prefixed']] = hasPrefix, _classnames[styles$r['affix-container--suffixed']] = hasSuffix, _classnames));
|
|
5938
|
-
return React__default.createElement("div", {
|
|
5939
|
-
className: classes,
|
|
5940
|
-
ref: container,
|
|
5941
|
-
"data-testid": testId
|
|
5942
|
-
}, hasPrefix && React__default.createElement("div", {
|
|
5943
|
-
className: styles$r['prefix'],
|
|
5944
|
-
ref: prefixElement
|
|
5945
|
-
}, prefix), children, hasSuffix && React__default.createElement("div", {
|
|
5946
|
-
className: styles$r['suffix'],
|
|
5947
|
-
ref: suffixElement
|
|
5948
|
-
}, suffix));
|
|
5949
|
-
};
|
|
5950
|
-
|
|
5951
5975
|
var styles$s = {"data-table-editable-cell":"_qYNve","data-table-editable-cell--right-aligned":"_3w6bw","data-table-editable-cell--currency":"_2y-_5","data-table-editable-cell--invalid":"_1Mx8j","data-table-editable-cell--top-left":"_2BlhN","data-table-editable-cell--top-right":"_1qDoN","data-table-editable-cell--bottom-left":"_2NUlb","data-table-editable-cell--bottom-right":"_3Mm-v"};
|
|
5952
5976
|
|
|
5953
5977
|
var DataTableEditableCellElement = function DataTableEditableCellElement(_ref, ref) {
|
|
@@ -8503,7 +8527,7 @@ var DateField = function DateField(_ref) {
|
|
|
8503
8527
|
error: controllers.error
|
|
8504
8528
|
};
|
|
8505
8529
|
var dayPickerProps = {
|
|
8506
|
-
classNames: styles$
|
|
8530
|
+
classNames: styles$q,
|
|
8507
8531
|
disabledDays: function disabledDays(day) {
|
|
8508
8532
|
return _disabledDays && _disabledDays(setToMidnight(day));
|
|
8509
8533
|
},
|
|
@@ -8521,7 +8545,7 @@ var DateField = function DateField(_ref) {
|
|
|
8521
8545
|
})
|
|
8522
8546
|
}, React__default.createElement(DayPickerInput, {
|
|
8523
8547
|
format: format,
|
|
8524
|
-
classNames: styles$
|
|
8548
|
+
classNames: styles$q,
|
|
8525
8549
|
formatDate: formatDate,
|
|
8526
8550
|
parseDate: parseDate,
|
|
8527
8551
|
placeholder: placeholder || format.toUpperCase(),
|
|
@@ -9001,7 +9025,7 @@ var WeekField = function WeekField(_ref) {
|
|
|
9001
9025
|
};
|
|
9002
9026
|
|
|
9003
9027
|
var dayPickerProps = {
|
|
9004
|
-
classNames: styles$
|
|
9028
|
+
classNames: styles$r,
|
|
9005
9029
|
disabledDays: function disabledDays(day) {
|
|
9006
9030
|
return _disabledDays && _disabledDays(setToMidnight(day));
|
|
9007
9031
|
},
|
|
@@ -9031,7 +9055,7 @@ var WeekField = function WeekField(_ref) {
|
|
|
9031
9055
|
})
|
|
9032
9056
|
}, React__default.createElement(DayPickerInput, {
|
|
9033
9057
|
format: format,
|
|
9034
|
-
classNames: styles$
|
|
9058
|
+
classNames: styles$r,
|
|
9035
9059
|
formatDate: formatDate,
|
|
9036
9060
|
parseDate: parseDate,
|
|
9037
9061
|
placeholder: placeholder || format.toUpperCase(),
|
|
@@ -9070,35 +9094,59 @@ var WeekField = function WeekField(_ref) {
|
|
|
9070
9094
|
})));
|
|
9071
9095
|
};
|
|
9072
9096
|
|
|
9073
|
-
var getTimeOptions = function getTimeOptions(interval, startTime) {
|
|
9097
|
+
var getTimeOptions = function getTimeOptions(interval, startTime, skipStartTime) {
|
|
9074
9098
|
if (startTime === void 0) {
|
|
9075
9099
|
startTime = new Date('Janurary 1 2023 00:00:00');
|
|
9076
9100
|
}
|
|
9077
9101
|
|
|
9102
|
+
if (skipStartTime === void 0) {
|
|
9103
|
+
skipStartTime = false;
|
|
9104
|
+
}
|
|
9105
|
+
|
|
9106
|
+
var intervalCoeffecient = 1000 * 60 * interval;
|
|
9078
9107
|
var optionsCount = 60 * 24 / interval;
|
|
9079
9108
|
var timeOptions = [];
|
|
9080
|
-
var intervalCoeffecient = 1000 * 60 * interval;
|
|
9081
9109
|
var rounded = new Date(Math.ceil(startTime.getTime() / intervalCoeffecient) * intervalCoeffecient);
|
|
9110
|
+
var skipFirstInterval = skipStartTime && startTime.getTime() === rounded.getTime();
|
|
9082
9111
|
|
|
9083
|
-
var
|
|
9084
|
-
if (hours === 0) {
|
|
9085
|
-
return 12;
|
|
9086
|
-
} else if (hours > 12) {
|
|
9087
|
-
return hours - 12;
|
|
9088
|
-
} else {
|
|
9089
|
-
return hours;
|
|
9090
|
-
}
|
|
9091
|
-
};
|
|
9092
|
-
|
|
9093
|
-
for (var i = 0; i < optionsCount; i++) {
|
|
9112
|
+
for (var i = skipFirstInterval ? 1 : 0; i < optionsCount; i++) {
|
|
9094
9113
|
var newDate = new Date(rounded.getTime());
|
|
9095
9114
|
newDate.setMinutes(rounded.getMinutes() + interval * i);
|
|
9115
|
+
var hours = formatHours(newDate.getHours());
|
|
9096
9116
|
var minutes = newDate.getMinutes();
|
|
9097
|
-
|
|
9117
|
+
var period = newDate.getHours() < 12 ? 'AM' : 'PM';
|
|
9118
|
+
timeOptions.push(hours + ":" + (minutes === 0 ? '00' : minutes) + " " + period);
|
|
9098
9119
|
}
|
|
9099
9120
|
|
|
9100
9121
|
return timeOptions;
|
|
9101
9122
|
};
|
|
9123
|
+
var getDuration = function getDuration(timeOption, startTime) {
|
|
9124
|
+
var start = new Date("Janurary 1 2023 " + startTime).getTime();
|
|
9125
|
+
var end = new Date("Janurary 1 2023 " + timeOption).getTime();
|
|
9126
|
+
var diffInMinutes = Math.round((end - start) / 60000);
|
|
9127
|
+
|
|
9128
|
+
if (diffInMinutes < 0) {
|
|
9129
|
+
diffInMinutes = diffInMinutes + 1440;
|
|
9130
|
+
}
|
|
9131
|
+
|
|
9132
|
+
if (diffInMinutes < 60) {
|
|
9133
|
+
return "(" + diffInMinutes + " min" + (diffInMinutes === 1 ? '' : 's') + ")";
|
|
9134
|
+
} else if (diffInMinutes >= 60) {
|
|
9135
|
+
return "(" + +(diffInMinutes / 60).toFixed(2) + " hr" + (diffInMinutes === 60 ? '' : 's') + ")";
|
|
9136
|
+
} else {
|
|
9137
|
+
return undefined;
|
|
9138
|
+
}
|
|
9139
|
+
};
|
|
9140
|
+
|
|
9141
|
+
var formatHours = function formatHours(hours) {
|
|
9142
|
+
if (hours === 0) {
|
|
9143
|
+
return 12;
|
|
9144
|
+
} else if (hours > 12) {
|
|
9145
|
+
return hours - 12;
|
|
9146
|
+
} else {
|
|
9147
|
+
return hours;
|
|
9148
|
+
}
|
|
9149
|
+
};
|
|
9102
9150
|
|
|
9103
9151
|
var TimeFieldDropdown = function TimeFieldDropdown(_ref) {
|
|
9104
9152
|
var trigger = _ref.trigger,
|
|
@@ -9106,7 +9154,9 @@ var TimeFieldDropdown = function TimeFieldDropdown(_ref) {
|
|
|
9106
9154
|
startTime = _ref.startTime,
|
|
9107
9155
|
onOptionClick = _ref.onOptionClick,
|
|
9108
9156
|
inputValue = _ref.inputValue,
|
|
9109
|
-
width = _ref.width
|
|
9157
|
+
width = _ref.width,
|
|
9158
|
+
_ref$endField = _ref.endField,
|
|
9159
|
+
endField = _ref$endField === void 0 ? false : _ref$endField;
|
|
9110
9160
|
var startTimeParsed;
|
|
9111
9161
|
|
|
9112
9162
|
if (startTime) {
|
|
@@ -9114,7 +9164,7 @@ var TimeFieldDropdown = function TimeFieldDropdown(_ref) {
|
|
|
9114
9164
|
}
|
|
9115
9165
|
|
|
9116
9166
|
var timeOptions = useMemo(function () {
|
|
9117
|
-
return getTimeOptions(interval, startTimeParsed);
|
|
9167
|
+
return getTimeOptions(interval, startTimeParsed, endField && !!startTime);
|
|
9118
9168
|
}, [interval, startTime]);
|
|
9119
9169
|
|
|
9120
9170
|
var _useState = useState(undefined),
|
|
@@ -9142,16 +9192,22 @@ var TimeFieldDropdown = function TimeFieldDropdown(_ref) {
|
|
|
9142
9192
|
onClick: function onClick() {
|
|
9143
9193
|
onOptionClick(option);
|
|
9144
9194
|
}
|
|
9145
|
-
},
|
|
9195
|
+
}, React__default.createElement(Inline, {
|
|
9196
|
+
space: 4
|
|
9197
|
+
}, option, endField && startTime && getDuration(option, startTime)));
|
|
9146
9198
|
})));
|
|
9147
9199
|
};
|
|
9148
9200
|
|
|
9149
|
-
var _excluded$2q = ["interval", "startTime"];
|
|
9201
|
+
var _excluded$2q = ["interval", "startTime", "prefix", "endField", "duration"];
|
|
9150
9202
|
|
|
9151
9203
|
var TimeFieldElement = function TimeFieldElement(_ref, forwardedRef) {
|
|
9152
9204
|
var _ref$interval = _ref.interval,
|
|
9153
9205
|
interval = _ref$interval === void 0 ? 15 : _ref$interval,
|
|
9154
9206
|
startTime = _ref.startTime,
|
|
9207
|
+
prefix = _ref.prefix,
|
|
9208
|
+
_ref$endField = _ref.endField,
|
|
9209
|
+
endField = _ref$endField === void 0 ? false : _ref$endField,
|
|
9210
|
+
duration = _ref.duration,
|
|
9155
9211
|
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2q);
|
|
9156
9212
|
|
|
9157
9213
|
var internalRef = useRef(null);
|
|
@@ -9195,17 +9251,148 @@ var TimeFieldElement = function TimeFieldElement(_ref, forwardedRef) {
|
|
|
9195
9251
|
onInputChange: function onInputChange(e) {
|
|
9196
9252
|
return setSelectedDropdownValue(e);
|
|
9197
9253
|
},
|
|
9198
|
-
selectedTimeOption: selectedDropdownValue
|
|
9254
|
+
selectedTimeOption: selectedDropdownValue,
|
|
9255
|
+
prefix: prefix,
|
|
9256
|
+
duration: duration
|
|
9199
9257
|
})),
|
|
9200
9258
|
startTime: startTime,
|
|
9201
9259
|
onOptionClick: onOptionClick,
|
|
9202
9260
|
inputValue: selectedDropdownValue,
|
|
9203
|
-
width: width
|
|
9261
|
+
width: width,
|
|
9262
|
+
endField: endField
|
|
9204
9263
|
});
|
|
9205
9264
|
};
|
|
9206
9265
|
|
|
9266
|
+
var TimeRangeSelector = forwardRef(TimeFieldElement);
|
|
9207
9267
|
var TimeField = forwardRef(TimeFieldElement);
|
|
9208
9268
|
|
|
9269
|
+
var styles$U = {"text-field":"_1EJlZ","time-range-field":"_20_Q3","text-field--invalid":"_3vaZG","text-field--prefixed":"_2dh_z","text-field--suffixed":"_2iyg-","time-range-field--invalid":"_22G5J","time-range-field--disabled":"_1bvhh"};
|
|
9270
|
+
|
|
9271
|
+
var TimeRangeEnd = function TimeRangeEnd(_ref) {
|
|
9272
|
+
var startTime = _ref.startTime,
|
|
9273
|
+
onChange = _ref.onChange,
|
|
9274
|
+
interval = _ref.interval,
|
|
9275
|
+
_ref$placeholder = _ref.placeholder,
|
|
9276
|
+
placeholder = _ref$placeholder === void 0 ? '2:00 PM' : _ref$placeholder,
|
|
9277
|
+
duration = _ref.duration,
|
|
9278
|
+
disabled = _ref.disabled,
|
|
9279
|
+
testId = _ref.testId;
|
|
9280
|
+
return React__default.createElement(TimeRangeSelector, {
|
|
9281
|
+
name: "end-time",
|
|
9282
|
+
startTime: startTime,
|
|
9283
|
+
onChange: onChange,
|
|
9284
|
+
placeholder: placeholder,
|
|
9285
|
+
interval: interval,
|
|
9286
|
+
prefix: React__default.createElement(IconArrowRight, {
|
|
9287
|
+
size: "medium",
|
|
9288
|
+
color: GREY400
|
|
9289
|
+
}),
|
|
9290
|
+
duration: duration,
|
|
9291
|
+
endField: true,
|
|
9292
|
+
testId: testId && testId + "-end-time",
|
|
9293
|
+
disabled: disabled
|
|
9294
|
+
});
|
|
9295
|
+
};
|
|
9296
|
+
|
|
9297
|
+
var TimeRangeStart = function TimeRangeStart(_ref) {
|
|
9298
|
+
var startTime = _ref.startTime,
|
|
9299
|
+
onChange = _ref.onChange,
|
|
9300
|
+
interval = _ref.interval,
|
|
9301
|
+
_ref$placeholder = _ref.placeholder,
|
|
9302
|
+
placeholder = _ref$placeholder === void 0 ? '9:00 AM' : _ref$placeholder,
|
|
9303
|
+
id = _ref.id,
|
|
9304
|
+
disabled = _ref.disabled,
|
|
9305
|
+
testId = _ref.testId;
|
|
9306
|
+
return React__default.createElement(TimeRangeSelector, {
|
|
9307
|
+
name: "start-time",
|
|
9308
|
+
startTime: startTime,
|
|
9309
|
+
onChange: onChange,
|
|
9310
|
+
placeholder: placeholder,
|
|
9311
|
+
interval: interval,
|
|
9312
|
+
testId: testId && testId + "-start-time",
|
|
9313
|
+
id: id,
|
|
9314
|
+
disabled: disabled
|
|
9315
|
+
});
|
|
9316
|
+
};
|
|
9317
|
+
|
|
9318
|
+
var TimeRangeField = function TimeRangeField(_ref) {
|
|
9319
|
+
var _classnames;
|
|
9320
|
+
|
|
9321
|
+
var name = _ref.name,
|
|
9322
|
+
inputId = _ref.id,
|
|
9323
|
+
value = _ref.value,
|
|
9324
|
+
_ref$interval = _ref.interval,
|
|
9325
|
+
interval = _ref$interval === void 0 ? 15 : _ref$interval,
|
|
9326
|
+
startTime = _ref.startTime,
|
|
9327
|
+
onChange = _ref.onChange,
|
|
9328
|
+
onBlur = _ref.onBlur,
|
|
9329
|
+
label = _ref.label,
|
|
9330
|
+
caption = _ref.caption,
|
|
9331
|
+
error = _ref.error,
|
|
9332
|
+
placeholder = _ref.placeholder,
|
|
9333
|
+
disabled = _ref.disabled,
|
|
9334
|
+
testId = _ref.testId;
|
|
9335
|
+
var controllers = useRangeFieldControllers({
|
|
9336
|
+
name: name,
|
|
9337
|
+
id: inputId,
|
|
9338
|
+
value: value,
|
|
9339
|
+
onChange: onChange,
|
|
9340
|
+
onBlur: onBlur,
|
|
9341
|
+
error: error
|
|
9342
|
+
});
|
|
9343
|
+
var hasError = controllers.error;
|
|
9344
|
+
var fieldProps = {
|
|
9345
|
+
name: name,
|
|
9346
|
+
id: controllers.id,
|
|
9347
|
+
label: label,
|
|
9348
|
+
caption: caption,
|
|
9349
|
+
error: controllers.error
|
|
9350
|
+
};
|
|
9351
|
+
var _controllers$value = controllers.value,
|
|
9352
|
+
start = _controllers$value.start,
|
|
9353
|
+
end = _controllers$value.end;
|
|
9354
|
+
|
|
9355
|
+
var onStartChange = function onStartChange(inputValue) {
|
|
9356
|
+
controllers.onChange({
|
|
9357
|
+
start: inputValue === '' ? undefined : inputValue,
|
|
9358
|
+
end: end
|
|
9359
|
+
});
|
|
9360
|
+
};
|
|
9361
|
+
|
|
9362
|
+
var onEndChange = function onEndChange(inputValue) {
|
|
9363
|
+
controllers.onChange({
|
|
9364
|
+
start: start,
|
|
9365
|
+
end: inputValue === '' ? undefined : inputValue
|
|
9366
|
+
});
|
|
9367
|
+
};
|
|
9368
|
+
|
|
9369
|
+
var timeRangeDuration = getDuration(end, start);
|
|
9370
|
+
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
9371
|
+
className: classnames(styles$U['time-range-field'], (_classnames = {}, _classnames[styles$U['time-range-field--invalid']] = hasError, _classnames[styles$U['time-range-field--disabled']] = disabled, _classnames)),
|
|
9372
|
+
"data-testid": testId
|
|
9373
|
+
}, React__default.createElement(TimeRangeStart, {
|
|
9374
|
+
startTime: startTime,
|
|
9375
|
+
interval: interval,
|
|
9376
|
+
onChange: function onChange(value) {
|
|
9377
|
+
return onStartChange(value);
|
|
9378
|
+
},
|
|
9379
|
+
placeholder: placeholder,
|
|
9380
|
+
testId: testId,
|
|
9381
|
+
id: controllers.id,
|
|
9382
|
+
disabled: disabled
|
|
9383
|
+
}), React__default.createElement(TimeRangeEnd, {
|
|
9384
|
+
startTime: start,
|
|
9385
|
+
interval: interval,
|
|
9386
|
+
onChange: function onChange(value) {
|
|
9387
|
+
return onEndChange(value);
|
|
9388
|
+
},
|
|
9389
|
+
placeholder: placeholder,
|
|
9390
|
+
duration: timeRangeDuration,
|
|
9391
|
+
testId: testId,
|
|
9392
|
+
disabled: disabled
|
|
9393
|
+
})));
|
|
9394
|
+
};
|
|
9395
|
+
|
|
9209
9396
|
var _excluded$2r = ["currencySymbol", "step"];
|
|
9210
9397
|
|
|
9211
9398
|
var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
@@ -9368,7 +9555,7 @@ var BUTTON_THEME = {
|
|
|
9368
9555
|
UPSELL: 'upsell'
|
|
9369
9556
|
};
|
|
9370
9557
|
|
|
9371
|
-
var styles$
|
|
9558
|
+
var styles$V = {"banner":"_vgLin","banner__title":"_63TwY","banner__body":"_3n6S7","banner__body--multilineCTA":"_2pMYs","banner--info":"_ON6Eg","banner__icon":"_1-D-E","banner--success":"_1FFZh","banner--danger":"_2R34O","banner--warning":"_3Cfhe","banner--upsell":"_1SIOw","banner__close":"_3SNQ1","banner--single-line":"_3nLTI"};
|
|
9372
9559
|
|
|
9373
9560
|
var ButtonCTA = function ButtonCTA(_ref) {
|
|
9374
9561
|
var button = _ref.button,
|
|
@@ -9391,7 +9578,7 @@ var ButtonCTA = function ButtonCTA(_ref) {
|
|
|
9391
9578
|
}, button.props));
|
|
9392
9579
|
};
|
|
9393
9580
|
|
|
9394
|
-
var styles$
|
|
9581
|
+
var styles$W = {"banner__caption":"_1jqm8"};
|
|
9395
9582
|
|
|
9396
9583
|
var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
9397
9584
|
var primaryButton = _ref.primaryButton,
|
|
@@ -9422,7 +9609,7 @@ var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
|
9422
9609
|
bannerTheme: bannerTheme,
|
|
9423
9610
|
primaryCTA: true
|
|
9424
9611
|
})), caption && multiLine && React__default.createElement("div", {
|
|
9425
|
-
className: styles$
|
|
9612
|
+
className: styles$W['banner__caption']
|
|
9426
9613
|
}, caption));
|
|
9427
9614
|
};
|
|
9428
9615
|
|
|
@@ -9469,14 +9656,14 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9469
9656
|
var Layout = multiLine ? Stack : Inline;
|
|
9470
9657
|
return React__default.createElement("div", {
|
|
9471
9658
|
"data-testid": testId,
|
|
9472
|
-
className: classnames(styles$
|
|
9659
|
+
className: classnames(styles$V['banner'], (_classnames = {}, _classnames[styles$V['banner--info']] = theme === BANNER_THEME.INFO, _classnames[styles$V['banner--warning']] = theme === BANNER_THEME.WARNING, _classnames[styles$V['banner--success']] = theme === BANNER_THEME.SUCCESS, _classnames[styles$V['banner--danger']] = theme === BANNER_THEME.DANGER, _classnames[styles$V['banner--upsell']] = theme === BANNER_THEME.UPSELL, _classnames[styles$V['banner--single-line']] = !multiLine, _classnames)),
|
|
9473
9660
|
style: positionStyles
|
|
9474
9661
|
}, React__default.createElement(Inline, {
|
|
9475
9662
|
alignItems: multiLine ? undefined : 'center',
|
|
9476
9663
|
flex: ['0 1 auto', 1],
|
|
9477
9664
|
space: 12
|
|
9478
9665
|
}, React__default.createElement("div", {
|
|
9479
|
-
className: styles$
|
|
9666
|
+
className: styles$V['banner__icon']
|
|
9480
9667
|
}, React__default.createElement(InlineBannerIcon, {
|
|
9481
9668
|
theme: theme
|
|
9482
9669
|
})), React__default.createElement(Layout, {
|
|
@@ -9486,9 +9673,9 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9486
9673
|
flex: ['min-content'],
|
|
9487
9674
|
flexWrap: multiLine ? undefined : 'wrap'
|
|
9488
9675
|
}, title && React__default.createElement("div", {
|
|
9489
|
-
className: styles$
|
|
9676
|
+
className: styles$V['banner__title']
|
|
9490
9677
|
}, title), React__default.createElement("div", {
|
|
9491
|
-
className: classnames(styles$
|
|
9678
|
+
className: classnames(styles$V['banner__body'], (_classnames2 = {}, _classnames2[styles$V['banner__body--multilineCTA']] = primaryButton && multiLine, _classnames2))
|
|
9492
9679
|
}, children), primaryButton && React__default.createElement(InlineBannerCTA, {
|
|
9493
9680
|
primaryButton: primaryButton,
|
|
9494
9681
|
secondaryButton: secondaryButton,
|
|
@@ -9496,7 +9683,7 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9496
9683
|
multiLine: multiLine,
|
|
9497
9684
|
bannerTheme: theme
|
|
9498
9685
|
})), dismissable && React__default.createElement("div", {
|
|
9499
|
-
className: styles$
|
|
9686
|
+
className: styles$V['banner__close']
|
|
9500
9687
|
}, React__default.createElement(Button$1, {
|
|
9501
9688
|
theme: "link-icon",
|
|
9502
9689
|
type: "button",
|
|
@@ -9510,7 +9697,7 @@ var PERSISTENT_BANNER_THEME = {
|
|
|
9510
9697
|
DANGER: 'danger'
|
|
9511
9698
|
};
|
|
9512
9699
|
|
|
9513
|
-
var styles$
|
|
9700
|
+
var styles$X = {"persistent-banner":"_1KO1J","persistent-banner--info":"_2mTN3","persistent-banner--danger":"_1YuCF","persistent-banner--upsell":"_tlNFk"};
|
|
9514
9701
|
|
|
9515
9702
|
var PersistentBanner = function PersistentBanner(_ref) {
|
|
9516
9703
|
var _classNames;
|
|
@@ -9539,7 +9726,7 @@ var PersistentBanner = function PersistentBanner(_ref) {
|
|
|
9539
9726
|
};
|
|
9540
9727
|
|
|
9541
9728
|
return React__default.createElement("div", {
|
|
9542
|
-
className: classnames(styles$
|
|
9729
|
+
className: classnames(styles$X['persistent-banner'], (_classNames = {}, _classNames[styles$X['persistent-banner--info']] = theme === PERSISTENT_BANNER_THEME.INFO, _classNames[styles$X['persistent-banner--danger']] = theme === PERSISTENT_BANNER_THEME.DANGER, _classNames[styles$X['persistent-banner--upsell']] = theme === PERSISTENT_BANNER_THEME.UPSELL, _classNames)),
|
|
9543
9730
|
"data-testid": testId
|
|
9544
9731
|
}, onDismiss ? React__default.createElement(Inline, {
|
|
9545
9732
|
flex: [1],
|
|
@@ -9611,7 +9798,7 @@ var useProgress = function useProgress(progress, maxValue, getMetric) {
|
|
|
9611
9798
|
};
|
|
9612
9799
|
};
|
|
9613
9800
|
|
|
9614
|
-
var styles$
|
|
9801
|
+
var styles$Y = {"circular-progress":"_1XR7V","circular-progress__label":"_1BygP","circular-progress__track":"_1Ak-z","circular-progress__indicator":"_22YIp"};
|
|
9615
9802
|
|
|
9616
9803
|
var CircularProgress = function CircularProgress(_ref) {
|
|
9617
9804
|
var progress = _ref.progress,
|
|
@@ -9626,7 +9813,7 @@ var CircularProgress = function CircularProgress(_ref) {
|
|
|
9626
9813
|
|
|
9627
9814
|
var determinant = metric.percentage * 2.79;
|
|
9628
9815
|
return React__default.createElement("div", Object.assign({}, elementProps, {
|
|
9629
|
-
className: styles$
|
|
9816
|
+
className: styles$Y['circular-progress'],
|
|
9630
9817
|
"data-testid": testId
|
|
9631
9818
|
}), React__default.createElement("svg", {
|
|
9632
9819
|
viewBox: "0 0 100 100"
|
|
@@ -9635,21 +9822,21 @@ var CircularProgress = function CircularProgress(_ref) {
|
|
|
9635
9822
|
cy: 50,
|
|
9636
9823
|
r: 45,
|
|
9637
9824
|
strokeWidth: "10px",
|
|
9638
|
-
className: styles$
|
|
9825
|
+
className: styles$Y['circular-progress__track']
|
|
9639
9826
|
}), React__default.createElement("circle", {
|
|
9640
9827
|
cx: 50,
|
|
9641
9828
|
cy: 50,
|
|
9642
9829
|
r: 45,
|
|
9643
9830
|
strokeWidth: "10px",
|
|
9644
|
-
className: styles$
|
|
9831
|
+
className: styles$Y['circular-progress__indicator'],
|
|
9645
9832
|
strokeDashoffset: "66",
|
|
9646
9833
|
strokeDasharray: determinant + " " + (279 - determinant)
|
|
9647
9834
|
})), React__default.createElement("div", {
|
|
9648
|
-
className: styles$
|
|
9835
|
+
className: styles$Y['circular-progress__label']
|
|
9649
9836
|
}, children || metric.progress + "/" + metric.maxValue));
|
|
9650
9837
|
};
|
|
9651
9838
|
|
|
9652
|
-
var styles$
|
|
9839
|
+
var styles$Z = {"progress-bar":"_3nyZN","progress-bar__indicator":"_11TEp","progress-bar__steps":"_3XFTU"};
|
|
9653
9840
|
|
|
9654
9841
|
var ProgressBar = function ProgressBar(_ref) {
|
|
9655
9842
|
var progress = _ref.progress,
|
|
@@ -9664,15 +9851,15 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
9664
9851
|
metric = _useProgress.metric;
|
|
9665
9852
|
|
|
9666
9853
|
return React__default.createElement(Stack, null, React__default.createElement("div", Object.assign({}, elementProps, {
|
|
9667
|
-
className: styles$
|
|
9854
|
+
className: styles$Z['progress-bar'],
|
|
9668
9855
|
"data-testid": testId
|
|
9669
9856
|
}), React__default.createElement("div", {
|
|
9670
|
-
className: styles$
|
|
9857
|
+
className: styles$Z['progress-bar__indicator'],
|
|
9671
9858
|
style: {
|
|
9672
9859
|
width: metric.percentage + "%"
|
|
9673
9860
|
}
|
|
9674
9861
|
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
9675
|
-
className: styles$
|
|
9862
|
+
className: styles$Z['progress-bar__steps']
|
|
9676
9863
|
}, steps.map(function (step) {
|
|
9677
9864
|
return React__default.createElement("div", {
|
|
9678
9865
|
key: step
|
|
@@ -9680,7 +9867,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
9680
9867
|
})));
|
|
9681
9868
|
};
|
|
9682
9869
|
|
|
9683
|
-
var styles$
|
|
9870
|
+
var styles$_ = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
|
|
9684
9871
|
|
|
9685
9872
|
var _excluded$2u = ["children", "theme", "title", "testId"];
|
|
9686
9873
|
|
|
@@ -9704,7 +9891,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
9704
9891
|
overlay: title,
|
|
9705
9892
|
ref: ref
|
|
9706
9893
|
}, React__default.createElement("div", Object.assign({
|
|
9707
|
-
className: classnames(styles$
|
|
9894
|
+
className: classnames(styles$_['badge'], (_classnames = {}, _classnames[styles$_['badge--success']] = theme === 'success', _classnames[styles$_['badge--danger']] = theme === 'danger', _classnames[styles$_['badge--info']] = theme === 'info', _classnames[styles$_['badge--warning']] = theme === 'warning', _classnames)),
|
|
9708
9895
|
ref: ref,
|
|
9709
9896
|
"data-testid": testId
|
|
9710
9897
|
}, otherProps), children));
|
|
@@ -9712,9 +9899,9 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
9712
9899
|
|
|
9713
9900
|
var Badge$1 = forwardRef(Badge);
|
|
9714
9901
|
|
|
9715
|
-
var styles
|
|
9902
|
+
var styles$$ = {"avatar":"_2wJGB","avatar--small":"_3QTSo","avatar__badge":"_2Rl8S","avatar--medium":"_1zwj0","avatar--large":"_3-U6x","avatar--extra-large":"_3qn2q"};
|
|
9716
9903
|
|
|
9717
|
-
var styles
|
|
9904
|
+
var styles$10 = {"avatar-image":"_GKL9P"};
|
|
9718
9905
|
|
|
9719
9906
|
var AvatarImage = function AvatarImage(_ref) {
|
|
9720
9907
|
var url = _ref.url,
|
|
@@ -9739,7 +9926,7 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
9739
9926
|
}
|
|
9740
9927
|
|
|
9741
9928
|
return React__default.createElement("div", {
|
|
9742
|
-
className: styles
|
|
9929
|
+
className: styles$10['avatar-image']
|
|
9743
9930
|
}, React__default.createElement(IconUserSolid, {
|
|
9744
9931
|
size: "flexible",
|
|
9745
9932
|
color: color
|
|
@@ -9808,7 +9995,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
9808
9995
|
|
|
9809
9996
|
var backgroundColor = url ? GREY200 : color;
|
|
9810
9997
|
return React__default.createElement("div", {
|
|
9811
|
-
className: classnames(styles
|
|
9998
|
+
className: classnames(styles$$['avatar'], (_classnames = {}, _classnames[styles$$['avatar--small']] = size === 'small', _classnames[styles$$['avatar--medium']] = size === 'medium', _classnames[styles$$['avatar--large']] = size === 'large', _classnames[styles$$['avatar--extra-large']] = size === 'extra-large', _classnames)),
|
|
9812
9999
|
style: {
|
|
9813
10000
|
backgroundColor: children || url && !showIconInsteadOfImage ? backgroundColor : defaultProfilePictureColors.backgroundColor
|
|
9814
10001
|
},
|
|
@@ -9821,7 +10008,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
9821
10008
|
return setShowIconInsteadOfImage(true);
|
|
9822
10009
|
}
|
|
9823
10010
|
}), badge && size !== 'small' && React__default.createElement("div", {
|
|
9824
|
-
className: styles
|
|
10011
|
+
className: styles$$['avatar__badge']
|
|
9825
10012
|
}, badge));
|
|
9826
10013
|
};
|
|
9827
10014
|
|
|
@@ -9834,7 +10021,7 @@ var CHIP_THEME = {
|
|
|
9834
10021
|
DANGER: 'danger'
|
|
9835
10022
|
};
|
|
9836
10023
|
|
|
9837
|
-
var styles$
|
|
10024
|
+
var styles$11 = {"chip":"_1fIeV","chip--marketing":"_V4byU","chip--success":"_37gN9","chip--upsell":"_Tw7tp","chip--warning":"_t94VZ","chip--info":"_3SmeO","chip--danger":"_2eoX0"};
|
|
9838
10025
|
|
|
9839
10026
|
var Chip = function Chip(_ref) {
|
|
9840
10027
|
var _classnames;
|
|
@@ -9845,11 +10032,11 @@ var Chip = function Chip(_ref) {
|
|
|
9845
10032
|
testId = _ref.testId;
|
|
9846
10033
|
return React__default.createElement("div", {
|
|
9847
10034
|
"data-testid": testId,
|
|
9848
|
-
className: classnames(styles$
|
|
10035
|
+
className: classnames(styles$11['chip'], (_classnames = {}, _classnames[styles$11['chip--marketing']] = theme === CHIP_THEME.MARKETING, _classnames[styles$11['chip--success']] = theme === CHIP_THEME.SUCCESS, _classnames[styles$11['chip--upsell']] = theme === CHIP_THEME.UPSELL, _classnames[styles$11['chip--warning']] = theme === CHIP_THEME.WARNING, _classnames[styles$11['chip--info']] = theme === CHIP_THEME.INFO, _classnames[styles$11['chip--danger']] = theme === CHIP_THEME.DANGER, _classnames))
|
|
9849
10036
|
}, children);
|
|
9850
10037
|
};
|
|
9851
10038
|
|
|
9852
|
-
var styles$
|
|
10039
|
+
var styles$12 = {"pill":"_23q4Y","pill--default":"_niDEM","pill--success":"_IwDRB","pill--danger":"_MPji-","pill--warning":"_3S2m8","pill--info":"_2G3ML"};
|
|
9853
10040
|
|
|
9854
10041
|
var PILL_THEME = {
|
|
9855
10042
|
INFO: 'info',
|
|
@@ -9868,7 +10055,7 @@ var Pill = function Pill(_ref) {
|
|
|
9868
10055
|
testId = _ref.testId;
|
|
9869
10056
|
return React__default.createElement("div", {
|
|
9870
10057
|
"data-testid": testId,
|
|
9871
|
-
className: classnames(styles$
|
|
10058
|
+
className: classnames(styles$12['pill'], (_classnames = {}, _classnames[styles$12['pill--default']] = theme === PILL_THEME.DEFAULT, _classnames[styles$12['pill--warning']] = theme === PILL_THEME.WARNING, _classnames[styles$12['pill--success']] = theme === PILL_THEME.SUCCESS, _classnames[styles$12['pill--danger']] = theme === PILL_THEME.DANGER, _classnames[styles$12['pill--info']] = theme === PILL_THEME.INFO, _classnames))
|
|
9872
10059
|
}, children);
|
|
9873
10060
|
};
|
|
9874
10061
|
|
|
@@ -9878,9 +10065,9 @@ var EMPTY_STATE_SIZE = {
|
|
|
9878
10065
|
LARGE: 'large'
|
|
9879
10066
|
};
|
|
9880
10067
|
|
|
9881
|
-
var styles$
|
|
10068
|
+
var styles$13 = {"empty-state-container-stack":"_2B8Vd","empty-state-container-stack__content":"_NBTDp","empty-state-container-stack__content--full-page":"_1UWbP","empty-state-container-stack__content--inline-horizontal":"_2BVOy","empty-state-container-stack__body":"_1LuiZ"};
|
|
9882
10069
|
|
|
9883
|
-
var styles$
|
|
10070
|
+
var styles$14 = {"empty-state-container-cta":"_1Cx9N","empty-state-container-cta--inside-modal":"_WbcaM"};
|
|
9884
10071
|
|
|
9885
10072
|
var EmptyStateContainerCTA = function EmptyStateContainerCTA(_ref) {
|
|
9886
10073
|
var _actions$primary, _actions$secondary, _classNames;
|
|
@@ -9898,7 +10085,7 @@ var EmptyStateContainerCTA = function EmptyStateContainerCTA(_ref) {
|
|
|
9898
10085
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
9899
10086
|
});
|
|
9900
10087
|
return React__default.createElement("div", {
|
|
9901
|
-
className: classnames(styles$
|
|
10088
|
+
className: classnames(styles$14['empty-state-container-cta'], (_classNames = {}, _classNames[styles$14['empty-state-container-cta--inside-modal']] = isInsideModal, _classNames))
|
|
9902
10089
|
}, primaryButton, secondaryButton);
|
|
9903
10090
|
};
|
|
9904
10091
|
|
|
@@ -9913,7 +10100,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9913
10100
|
isPaywall = _ref$isPaywall === void 0 ? false : _ref$isPaywall,
|
|
9914
10101
|
testId = _ref.testId;
|
|
9915
10102
|
return React__default.createElement("div", {
|
|
9916
|
-
className: styles$
|
|
10103
|
+
className: styles$13['empty-state-container-stack'],
|
|
9917
10104
|
"data-testid": testId
|
|
9918
10105
|
}, React__default.createElement("img", {
|
|
9919
10106
|
src: mediaUrl,
|
|
@@ -9929,7 +10116,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9929
10116
|
emphasis: "bold",
|
|
9930
10117
|
as: "body"
|
|
9931
10118
|
}, title), React__default.createElement("div", {
|
|
9932
|
-
className: styles$
|
|
10119
|
+
className: styles$13['empty-state-container-stack__body']
|
|
9933
10120
|
}, children)), React__default.createElement(Stack, {
|
|
9934
10121
|
space: 8,
|
|
9935
10122
|
alignItems: "center"
|
|
@@ -9941,7 +10128,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9941
10128
|
}, caption)));
|
|
9942
10129
|
};
|
|
9943
10130
|
|
|
9944
|
-
var styles$
|
|
10131
|
+
var styles$15 = {"empty-state-container-inline":"_eMr1V","empty-state-container-inline--inside-modal":"_2sweG","empty-state-container-inline__content":"_2jreb","empty-state-container-inline__content--full-page":"_3RLfH","empty-state-container-inline__content--inline-horizontal":"_3BMpx","empty-state-container-inline__body":"_2J5vn","empty-state-container-inline__image":"_G2VtA"};
|
|
9945
10132
|
|
|
9946
10133
|
var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
9947
10134
|
var _classNames, _classnames;
|
|
@@ -9962,10 +10149,10 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9962
10149
|
isInsideModal = _useModalContext.isModalMounted;
|
|
9963
10150
|
|
|
9964
10151
|
return React__default.createElement("div", {
|
|
9965
|
-
className: classnames(styles$
|
|
10152
|
+
className: classnames(styles$15['empty-state-container-inline'], (_classNames = {}, _classNames[styles$15['empty-state-container-inline--inside-modal']] = isInsideModal, _classNames)),
|
|
9966
10153
|
"data-testid": testId
|
|
9967
10154
|
}, React__default.createElement("div", {
|
|
9968
|
-
className: classnames(styles$
|
|
10155
|
+
className: classnames(styles$15['empty-state-container-inline__content'], (_classnames = {}, _classnames[styles$15['empty-state-container__content--full-page']] = size === EMPTY_STATE_SIZE.LARGE, _classnames[styles$15['empty-state-container__content--inline-horizontal']] = size === EMPTY_STATE_SIZE.MEDIUM, _classnames))
|
|
9969
10156
|
}, React__default.createElement(Stack, {
|
|
9970
10157
|
space: 8
|
|
9971
10158
|
}, header && React__default.createElement(Text, {
|
|
@@ -9974,7 +10161,7 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9974
10161
|
}, header), React__default.createElement(Text, {
|
|
9975
10162
|
as: "h1"
|
|
9976
10163
|
}, title)), React__default.createElement("div", {
|
|
9977
|
-
className: styles$
|
|
10164
|
+
className: styles$15['empty-state-container-inline__body']
|
|
9978
10165
|
}, children), React__default.createElement(Stack, {
|
|
9979
10166
|
space: 8,
|
|
9980
10167
|
marginTop: 12
|
|
@@ -9985,7 +10172,7 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9985
10172
|
}), caption && React__default.createElement(Text, {
|
|
9986
10173
|
as: "caption"
|
|
9987
10174
|
}, caption))), React__default.createElement("div", {
|
|
9988
|
-
className: styles$
|
|
10175
|
+
className: styles$15['empty-state-container-inline__image']
|
|
9989
10176
|
}, React__default.createElement("img", {
|
|
9990
10177
|
src: mediaUrl,
|
|
9991
10178
|
alt: String(title),
|
|
@@ -10059,5 +10246,5 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
10059
10246
|
}, children);
|
|
10060
10247
|
};
|
|
10061
10248
|
|
|
10062
|
-
export { AsyncSelectField, Avatar, Badge$1 as Badge, Bold, BreadcrumbItem, Breadcrumbs, Button$1 as Button, Calendar, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Dropdown, DropdownList, DropdownListDivider, DropdownListItem, EmptyState, Form, FormFeedback, FormFooter, FormRow, FormSection, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTable, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, Page, PaginationControls, PasswordField, Paywall, PercentageField, PersistentBanner, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, Underline, WeekField, toast };
|
|
10249
|
+
export { AsyncSelectField, Avatar, Badge$1 as Badge, Bold, BreadcrumbItem, Breadcrumbs, Button$1 as Button, Calendar, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Dropdown, DropdownList, DropdownListDivider, DropdownListItem, EmptyState, Form, FormFeedback, FormFooter, FormRow, FormSection, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTable, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, Page, PaginationControls, PasswordField, Paywall, PercentageField, PersistentBanner, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, TimeRangeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, Underline, WeekField, toast };
|
|
10063
10250
|
//# sourceMappingURL=index.modern.js.map
|